diff options
| author | Morgan Lunt <morganl@anthropic.com> | 2026-09-24 20:25:50 -0700 |
|---|---|---|
| committer | Morgan Lunt <morganl@anthropic.com> | 2026-09-24 20:25:50 -0700 |
| commit | e510be1304643082b148b129498dd8edeeef4176 (patch) | |
| tree | e80e00d9b6d6dcd7b5b5845027517bd1ba8ca4b0 /plugins/code-modernization/commands | |
| parent | b6b148f496e8da208676b4a1553bdf292ce340d9 (diff) | |
code-modernization: measure portfolio complexity one way for every system
The portfolio sweep let each survey agent pick its own complexity tool, so
one system's number was a per-file total and another's a per-function mean,
and the heat-map compared them anyway. Every agent now takes the same
measure (the per-file decision-point total, and the most complex single
file), the workflow computes complexity per thousand lines in code, and the
table shows those columns. Documentation coverage no longer counts a license
header as documentation.
Diffstat (limited to 'plugins/code-modernization/commands')
| -rw-r--r-- | plugins/code-modernization/commands/modernize-assess.md | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/plugins/code-modernization/commands/modernize-assess.md b/plugins/code-modernization/commands/modernize-assess.md index 7f280347..dec2eb23 100644 --- a/plugins/code-modernization/commands/modernize-assess.md +++ b/plugins/code-modernization/commands/modernize-assess.md @@ -36,18 +36,19 @@ relaunch with `resumeFromRunId` and finished systems return from cache. Without the Workflow tool, gather the same row per system yourself. Per system: SLOC and dominant language (`cloc --csv`, else `scc`, else `find` + -`wc -l`), file count, mean and max cyclomatic complexity (`lizard`, else count -decision keywords), dependency freshness (age or pinned-version count of the -manifest), documentation coverage (source files with a header comment, and -architecture docs present), and the COCOMO index `2.94 × KSLOC^1.10`. **The +`wc -l`), file count, complexity measured one way for every system (`scc`'s per-file +complexity summed, divided by KSLOC, and the most complex single file; without `scc`, +count decision keywords the same way everywhere), dependency freshness (age or pinned-version count of the +manifest), documentation coverage (source files whose opening comment +describes the file, not just a license, and architecture docs present), and the COCOMO index `2.94 × KSLOC^1.10`. **The index is a relative size measure for ranking systems, never a timeline or a cost** (it assumes human-team productivity): label the column "index", never print person-months, a date or a duration. Write `analysis/portfolio.html` (dark `#1e1e1e` background, `#d4d4d4` text, `#cc785c` accent, system-ui, CSS inline): one row per system, columns **System · -Lang · KSLOC · Files · Mean CCN · Max CCN · Dep Freshness · Doc Coverage % · -Complexity index · Risk**, index and Risk cells graded green to red, and a +Lang · KSLOC · Files · Complexity per KSLOC · Most complex file · Dep Freshness · Doc +Coverage % · Complexity index · Risk**, index and Risk cells graded green to red, and a 2–3 sentence recommendation of which system goes first and why. Tell the user to open it, then stop. |
