Repository navigation
feat(#125): COSMIC FP approximation in local script, squashed history only - #127
Conversation
PR AnalysisSize: large (based on production code) Commit AnalysisTotal Commits: 3
Commit Detailsd8dbf84 Ken Judy (8/31/2026) 9384daa Ken Judy (8/31/2026) a0e0a7e Ken Judy (8/31/2026) Test CoverageTest-to-Production Ratio: 1.56:1 (no calibrated target for this ratio; reported descriptively) DORA Capability AssessmentArchetype: harmonious-high-achiever
|
… history Call analyzeCfpWithClaude on the first AI_ANALYSIS_MAX_COMMITS squashed commits when ANTHROPIC_API_KEY is set. Each commit diff is passed as a single file entry. cfp_results is present in local_metrics_summary.json only when historyGranularity is squashed and a client is available; absent otherwise. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add renderCfpSection(summary) to lib/report-template.js: renders an Estimated Functional Size section with per-commit E/X/R/W breakdown when cfp_results is present in the summary. Returns empty string when absent or empty. Wired into renderReportHtml after the deployment frequency section. Labeled as squashed-history only, COSMIC-inspired approximation, informational. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
a0e0a7e to
2e8a014
Compare
PR AnalysisSize: small (based on production code) Commit AnalysisTotal Commits: 2
Commit Details95c8f6d Ken Judy (8/31/2026) 2e8a014 Ken Judy (8/31/2026) Test CoverageTest-to-Production Ratio: 2.20:1 (no calibrated target for this ratio; reported descriptively) DORA Capability AssessmentArchetype: harmonious-high-achiever
|
Summary
analyzeCfpWithClaudefrom feat: COSMIC FP approximation in pr-metrics.yml #124 (not yet merged; this PR depends on it)historyGranularity === 'squashed'and a non-null Anthropic client inlocal-code-metrics.js; runs on firstAI_ANALYSIS_MAX_COMMITScommits, each diff passed as a single file entrycfp_resultstolocal_metrics_summary.json(array of per-commit E/X/R/W data) when the gate opens; field is absent when it does notrenderCfpSection(summary)tolib/report-template.js: renders an Estimated Functional Size table whencfp_resultsis present, wired intorenderReportHtmlafter deployment frequencyTest plan
__tests__/collectLocalMetrics.test.js-- 3 new tests: squashed+client runs CFP, granular skips, null client skips__tests__/report-template.test.js-- 4 new tests: renders total and breakdown, absent on missing/empty cfp_results, label checkGenerated with Claude Code