Skip to content

fix(architecture): build deepening report cards from solution and wins fields - #17825

Merged
kyle-sexton merged 18 commits into
mainfrom
fix/deepening-report-cards
Nov 21, 2026
Merged

kyle-sexton merged 18 commits into
mainfrom
fix/deepening-report-cards

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Closes #17798.

Summary

Every card in the /architecture:improve deepening report showed an empty Solution:. No stage of the pipeline had a solution field: the scan schema had none, the candidate artifact's deepening field holds the problem narrative, and the model wrote the HTML by hand each run with nothing checking the page against the record. This PR adds the fields, builds the report from the record with a renderer that refuses an incomplete card, and lays the page out for choosing a candidate.

Fix

  • solution (one sentence: what the deepened module would own and hide) and wins (<vocabulary term>: <at most six words>, at least one leverage or locality win) join the scan return schema (scan-briefing.md) and the candidate artifact (deepening.md).
  • A deepening kind in plugins/architecture/scripts/build-view.mjs, rendered by scripts/deepening-report.mjs. It reads the record strictly and exits 1 naming the candidate and field for a missing or empty card part, an unknown key, a win over six words or a card with no leverage or locality win, a bad verified value (a corrected: clause holds no semicolon), or a Mermaid label outside the allowed characters. Every string is escaped with the shared lib/html-escape.mjs, imported unchanged. Each page is named after its record file, so a later scan never overwrites an earlier page.
  • The page keeps Mermaid 12.3.0 and Tailwind 4.3.5 from jsDelivr at exact pins, under the html-report.md policy, and does not go through the shared lib/view-builder.mjs: that builder's validator refuses outside scripts, and it is synced into eight plugins. With the CDN blocked, each Mermaid panel shows its arrows as a text list, which also stays available to screen readers when the drawing renders.
  • Page order: header with scope and commit, a collapsed key that defines every badge, tag, term and drawing style the page uses, the top recommendation with the candidates built on it (derived from depends_on), an index of every candidate (short id, title, problem, badge, Verified word, dependency, solution; rows stack below 600 px), then the badge bands. Card order: short id and title, badges, problem, solution, before/after diagram, wins, one Verified line (reproduced, corrected: <clause> or unverified), files, depends-on, a link back to the index.
  • Diagrams draw at reading size: labels wrap only between words, below 600 px a diagram scrolls inside its panel, and every diagram sits on white paper in both themes. A graph with no edges is drawn as plain boxes. The bars pattern is removed, since its values measured nothing.
  • A finding whose conclusion is to leave the code as it is goes to a "Looked at, no change" section after the bands (record field kept, artifact section of the same name): title, reason and files, no badge, outside the index, never the top pick, so a later scan sees the code was already looked at (owner decision).
  • The rule against building HTML for another repository's files stays. A page loading CDN scripts cannot meet the rendered-views escape-helper gate.
  • lib/rendered-view.md ("The deepening report") now says the report builds through build-view. Its copies regenerate in architecture, planning, discovery and debugging; the planning owner session confirmed no collision.
  • docs/upstream/mattpocock-skills.md re-checked at mattpocock/skills 7739eaed7f.
  • Eval grader card-parts-complete fails any card with an empty or missing part.

Verification

Against #17798's done-when:

  1. The old run's candidates re-rendered (scripts/testdata/deepening-candidates.json: 23 cards, plus P6 under "Looked at, no change" since it proposes none): problem, solution, wins and a drawn diagram on 23/23 cards, 0 empty parts, 25/25 Mermaid diagrams drawn in Chromium with no console error.

  2. Blind UX evaluation, the same Nielsen heuristic evaluation plus a pick-one task walkthrough on both pages, one fresh evaluator per run, three runs per round:

    Round Old page, findings at severity 1-4 (median) New page (median) New page, worst severity
    1 (head 9153c7a) 15, 17, 14 (15) 13, 13, 15 (13) 2
    2 (head 11875c9) 12, 17, 19 (17) 10, 12, 15 (12) 2

    Every run found a severity 4 problem on the old page; no run found one above severity 2 on the new page. Round 2's fixes came from the findings rounds 1's runs agreed on.

  3. The card-parts-complete grader, run offline on the re-rendered page and a fresh scan's page: passes both as built, and fails each with one solution part removed, one problem emptied, or one wins part missing (8/8 cases).

  4. Two fresh claude -p "/architecture:improve deepening" runs with this branch's plugin (--plugin-dir), scope plugins/planning/skills/interview, read-only:

    • first run: 12 candidates, solution and wins on 12/12, every card part on 12/12; its first build refused a corrected: clause holding a semicolon, which led to the clause rule above;
    • second run, after that rule: 17 candidates, solution and wins on 17/17, every card part on 17/17, builder exit 0 with no refusal.

Also:

  • node --test plugins/architecture/scripts/deepening-report.test.mjs: 20 pass.
  • build-view.test.sh: every deepening check passes; 9 "builds under the temp directory" checks for the map kinds fail on Windows, the same 9 on main. CI on Linux is the reference.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 8 commits November 21, 2026 00:39
Add a deepening kind to build-view.mjs. Its record is a JSON candidate
list read strictly: a missing or empty card part, an unknown key, a win
over six words or outside the vocabulary terms, or a Verified line other
than reproduced, unverified or corrected fails with exit 1 naming the
candidate and field. The page loads Mermaid 12.3.0 and Tailwind 4.3.5 at
their pins under the html-report.md policy, generates Mermaid source from
per-candidate graph data, and must pass its own validator.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Add solution and wins to the scan return schema and the candidate
artifact, plus a one-clause verified line with the full notes kept in
verification-notes. Phase 2 now writes a report record and builds the
page with build-view.mjs; html-report.md defines the record, page order,
card parts and diagram patterns. The carve-out that skips the page for
another repository's files stays: the page loads two pinned CDN scripts,
so it cannot meet the escape-helper profile the baseline requires there.
The chrome eval case builds through the builder and gains a grader that
fails any card with an empty or missing part. The upstream record notes
the new fields.

Closes #17798

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The shared rendered-view reference still said /architecture:improve wrote
the deepening HTML itself. Its copies in planning, discovery and debugging
regenerate from lib/rendered-view.md; the planning session confirmed no
collision.

Refs #17798

Co-Authored-By: Claude Opus 5.5 <[email protected]>
On Windows the engine resolves /usr/bin/ffplay to D:\usr�infplay before
the fs.exists stand-in sees it, so the sound test never found its player and
failed there, blocking unrelated pushes through the pre-push check. The
stand-in now drops the drive letter and backslashes before comparing.

Closes #17823

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… card

The renderer refuses a card whose wins name neither leverage nor locality;
the other wins may use any vocabulary term. The docs said both, which 19 of
the 24 real candidates do not have. Owner decision in the #17798 interview.

Refs #17798

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A blind UX evaluation of the rendered fixture found the page hard to
compare and read. The header now names the scope and commit and defines
every drawing style, badge and term the page uses; the index gains
Verified and Depends on and stacks on a phone; Mermaid panels size from
their drawing with no inner scroll, an edgeless graph draws as boxes,
and a blocked CDN shows each graph as an edge list. The bars pattern is
removed, muted text reaches 4.5:1, and Phase 2 drops a candidate that
proposes no change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…n phones

Mermaid wrapped node labels at its 120 px default and split file names
mid-word; wrap at 260 px instead. Below 600 px a diagram keeps its own
size and scrolls inside its panel, and the card's grid column no longer
grows past the viewport, so the page itself never scrolls sideways.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
kyle-sexton and others added 3 commits November 21, 2026 02:53
The Windows sound-test fix landed on main in #17852 with its own change
note, so this branch's copy would list the same fix twice.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…table

Blind evaluation runs 2 and 3 of the new page agreed on these findings:

- The 20-line key came before all content. It is now collapsed under the
  header, and Strong's line defines the deletion test and the two-adapter
  rule it rests on.
- The index had no problem column. Each row now shows its problem under the
  title, beside a short id (S1) the card's title also shows.
- top_why named dependents in prose that matched no title. The builder now
  lists the candidates built on the top one from depends_on, linked.
- Cards had no way back. Each now ends with a link to the index.
- Hand-drawn deep boxes turned light in dark mode. All diagrams now sit on
  white paper in both themes, and box labels keep their case.
- Verified words broke mid-word, and the Mermaid text list was hidden from
  screen readers.
- The stacked-rows and nested-boxes key lines now say what those drawings
  show, and four record texts match their own cards.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 21, 2026 08:32
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T08:34:22.200355Z 11875c9 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 11875c9ffd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

kyle-sexton and others added 2 commits November 21, 2026 03:35
Select Tests failed: plan-test-lanes found deepening-report.test.mjs
selected with no sibling .test.sh and no Node package in the test-node
lane, so no lane ran it and no lane could plan. run-plugin-tests.sh
discovers only .test.sh files; the wrapper follows
lib/ui-feedback/note-model.test.sh, and its test-scope names the module,
its fixture and the escape helper the suite imports. 20/20 pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… rule

- build-view wrote every deepening page to architecture-views/deepening.html
  and deleted the one before, though deepening.md says the printed path is
  the delivery and is never deleted. A deepening page is now named after its
  record file, so one scan's page never replaces another's.
- A `corrected:` Verified line holds one clause, and the builder refuses a
  semicolon. The record and artifact docs and the builder's message now say
  so; a fresh scan had written one and needed a second build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-refine/fix-docs

Run 44885373714, attempt 1

Field Value
Model rung 0
Leg handoff
Run job success
Activity step skipped
Commits pushed none (read lane)
Run 44885373714

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 2c1eaaa7974e83cf9b1eacfbb3dbafd4a11e2f17: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Security review (incremental, blocking only): no security issues found

Scope. This pass covers one file changed since d904e35d: plugins/architecture/scripts/testdata/deepening-candidates.json. I read its only hunk.

What changed. One prose string in test fixture candidate s3 changed. Its problem field said "each step's contract is split" and now says "each step's rules are split". No other field, id, file reference or diagram value changed.

Security relevance. None. The file is test data for the deepening renderer. The new string is plain text with no markup or Mermaid syntax. It passes through the renderer's escaping and the page validator, which the previous review of this PR checked. The change touches no trust control, workflow, manifest, standing instruction or token path, and no trusted-path glob matches it.

Prior findings. This lane's earlier summary reported 0 findings, so there is nothing to carry forward. This lane already reviewed an earlier head, so this pass looked only for CRITICAL and IMPORTANT findings. It found none.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 2c1eaaa7974e83cf9b1eacfbb3dbafd4a11e2f17: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Code review (incremental, blocking only): one word changed in the deepening fixture

This lane already reviewed an earlier head, so this pass reports blocking findings only. I read the whole change since d904e35d28. It touches one file, plugins/architecture/scripts/testdata/deepening-candidates.json.

What changed

  • In candidate s3, the problem text changes from "each step's contract is split" to "each step's rules are split".
  • No other field, key or structure changes, and the JSON stays well-formed.

What I checked

  • Tests. I searched plugins/architecture/scripts for any test or script that matches the old wording ("step's contract" or "contract"). Nothing does. The fixture's other uses of "contract" (the s2 gate-contract title and the "6 places restate the gate contract" line) are a different sense, and no assertion depends on the edited sentence. I did not run the tests.
  • Settled thread. The build-view.mjs thread is marked lines changed since resolution: no, and this change does not touch it.

I found no blocking defect.

Not applicable this round

  • No manifest changed, so there are no manifest lines.
  • No path-scoped rule or paved-path criterion applies to this fixture.
  • No closing-issue criteria fall on this change.

Loosened checks: none. The change loosens no check. The prompt has no loosened_check_verdict: or loosened_check_patterns: lines, so I used fail with no consumer entries. It has no loosened_check_decision_record: line either, so the citation requirement was not checked. Loosened checks would be marked: fail (bundled default); patterns: 0.

Verifier dropped 0 of 0 candidates.

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/resolve-conflicts

Run 44886423491, attempt 1

Field Value
Model rung 0
Leg handoff
Run job success
Activity step success
Commits pushed none (read lane)
Run 44886423491

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/apply-conflict-patch

Run 44886423491, attempt 1

Field Value
Model rung 0
Leg base
Run job success
Activity step skipped
Commits pushed none recorded
Run 44886423491

Failed GitHub API calls

No failed call recorded by the run job's scripts.

kyle-sexton and others added 3 commits November 21, 2026 04:01
The org-repo-token lint refuses this organization's repository name in
shipped plugin content, and the fixture's repo field is display text only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… own section

Phase 2 dropped a finding whose conclusion is to leave the code alone, so
nothing recorded that the code had been looked at, and a later scan could
flag it again. Such a finding now goes to the record's optional `kept` list
and the artifact's "Looked at, no change" section: title, one-sentence
reason and files, with no badge, outside the index and bands, and never the
top recommendation. The page lists it last and the header links to it.
The fixture's P6 returns as the one kept finding.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…epening fixture

The s3 candidate's problem text paired "contract" with "Brief", which
the vocabulary check reads as the retired contract-brief sense. Say
"rules" instead; the fixture's meaning and every test that reads it
are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit cc81107 Nov 21, 2026
51 checks passed
@kyle-sexton
kyle-sexton deleted the fix/deepening-report-cards branch November 21, 2026 09:31
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 2, survived 5, timeout 0, no coverage 0, invalid 0, not run 0.
Covered-code score 29%; mutation score 29%.

File Killed Survived Timeout No coverage Invalid Not run
plugins/architecture/scripts/build-view.mjs 0 2 0 0 0 0
plugins/architecture/scripts/deepening-report.mjs 2 3 0 0 0 0

Surviving mutants

Location Operator Disposition Cause
plugins/architecture/scripts/build-view.mjs:106 SBR equivalent none
plugins/architecture/scripts/build-view.mjs:139 other productive input-gap
plugins/architecture/scripts/deepening-report.mjs:174 other productive input-gap
plugins/architecture/scripts/deepening-report.mjs:471 ROR unclassified none
plugins/architecture/scripts/deepening-report.mjs:489 LCR productive input-gap

The run's summary has the full report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

architecture:improve: the deepening report drops every card's solution, and is hard to read

1 participant