Repository navigation
feat(architecture): scan-briefing template + verification gate (deepening F2/F3/F4) - #1162
Conversation
…ning F2/F3/F4) Three coupled gaps in the deepening lens's scan->report path, from the SW2030 consumer audit of 0.3.5: - F3: no canonical scan-subagent briefing. New research/deepening/scan-briefing.md — vocabulary primer, friction checklist, dependency categories, both badge-acceptance heuristics, and a per-candidate return schema (with shallow-signal + runtime-claim fields). Phase 1 now briefs every scan agent from it. - F2: no verification between scan and report. New Phase 1.5 gate reproduces every Strong-badge candidate's shallow-signal and every runtime-bug/dead-code claim against the actual code before the user-facing report lends them its authority. Worked failure the audit caught: a "registered but never composed" claim a single grep refuted. - F4: badge heuristics arrived too late. Confidence is now calibrated against the two acceptance heuristics at scan time (in the briefing), and Phase 2 opens with an explicit re-badge against them plus the Phase 1.5 result. The durable candidate artifact gains a shallow-signal field so the verified evidence survives the planning handoff. Pure-ADD: existing phase contracts and vocabulary discipline unchanged. architecture 0.4.0. Closes #1157 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Claude finished @kyle-sexton's task in 2m 59s —— View job PR Review — feat(architecture): scan-briefing template + verification gate
Overall: The structural idea is sound — briefing every scan agent from a canonical template, gating the report on reproduced evidence, and applying heuristics at scan time are all good discipline. Two correctness issues need attention before the gate logic reliably works. 🔴 Important — Intro count in scan-briefing.md doesn't match the document
The document actually has five numbered sections — §4 (Badge-acceptance heuristics) is absent from this enumeration. An agent told to "assemble a briefing with four parts" and given a five-section template will see §4 as uncounted/supplementary content and may omit it entirely. That's the section this PR exists to inject at scan time (F4). The fix the PR is delivering can be silently skipped by a model following the intro literally. 🔴 Important — Phase 1.5 gate condition references a field that doesn't exist yet at that point
At Phase 1.5 time, only the scan-time Additionally, the value styles diverge across the two schemas:
No explicit mapping is provided anywhere. Recommend wording the Phase 1.5 gate as "every candidate whose scan returned 🟡 Nit —
|
|
Claude finished @kyle-sexton's task in 2m 19s —— View job Security Review
ScopeFour files changed: FindingsSUGGESTION — Unescaped code-derived content in HTML report (pre-existing gap, new field participates)Confidence: Medium The Phase 2 HTML report is rendered from candidate data that originates in the scanned codebase. The The new
A file in the scanned codebase whose name or a comment contains something like The attack scenario requires an attacker to control a file path or code comment in the scanned codebase (e.g., a malicious transitive npm/NuGet dependency), which is realistic in supply-chain attack scenarios. The HTML escaping gap predates this PR — What a fix looks like: Add a note to the Phase 2 HTML report instructions (e.g., in No other findings
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 77816004f6
ℹ️ 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".
…ld (PR #1162 review) Two Important review findings on the scan-briefing change: - scan-briefing.md intro declared "four parts" but the template has five sections; the omitted one is §4 badge-acceptance heuristics — exactly the scan-time calibration this change exists to inject (F4). A caller following the stated count could send a briefing without it. Now "five parts", heuristics enumerated. (claude review #1 + Codex P2) - Phase 1.5 gated on candidates that "will carry a Strong badge" and their shallow-signal, but at Phase 1.5 only the scan-time confidence field exists (strong|worth-exploring|speculative) — the recommendation badge is assigned in Phase 2. Gate now keys on `confidence: strong`, and Phase 2 states the confidence->badge mapping explicitly, resolving the field-name and case-style mismatch. (claude review #2) Also sharpened the durable artifact's deepening vs shallow-signal field descriptions with contrasting examples so they aren't filled redundantly (claude review nit). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Claude finished @kyle-sexton's task in 1m 17s —— View job Re-review after fix commit
|
|
Claude finished @kyle-sexton's task in 2m 13s —— View job Security Review — feat(architecture): scan-briefing template + verification gate
ScopeFour files changed: FindingsSUGGESTION — Unescaped code-derived content in HTML report (pre-existing gap;
|
|
Review + security findings classified (fix commit
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fe07dfd546
ℹ️ 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".
…l-verified flag (PR #1162 round 2) Two Codex P2 findings on the verification design: - Phase 1.5 only reproduced the original `confidence: strong` set, but Phase 2 re-badging can promote a lower-confidence candidate to `Strong` (confidence is an input, not the final badge) — that promoted candidate reached the report with a Strong badge but an unreproduced signal, defeating the guarantee. Re-badge now applies the Phase 1.5 reproduction to any candidate promoted into Strong before it carries the badge. - The durable artifact described every `shallow-signal` as "verified, reproduced in Phase 1.5", but only Strong + runtime-claim candidates pass the gate — so the planning handoff asserted verification that did not occur for surviving worth-exploring/speculative candidates. The field description is now honest about which signals are reproduced, and a new `signal-verified` boolean records per-candidate status so a consumer never reads an unverified signal as verified. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Claude finished @kyle-sexton's task in 1m 35s —— View job Re-review after fix commit
|
|
Claude finished @kyle-sexton's task in 2m 30s —— View job Security Review — Round 3 (HEAD
|
|
Round-2 findings classified (fix commit
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 74761ce070
ℹ️ 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".
… runtime-claim (PR #1162 round 3) Codex P2: signal-verified was defined true for all runtime-claim candidates, but Phase 1.5 reproduces a runtime-claim candidate's *claim*, not its shallow-signal. A worth-exploring/speculative candidate with a valid runtime-claim would therefore have its shallowness observation marked verified when it was never reproduced. signal-verified now tracks the shallow-signal specifically (true = the Strong set, whose signal IS the reproduction target); a runtime-claim candidate left below Strong keeps signal-verified false. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Claude finished @kyle-sexton's task in 1m 40s —— View job Re-review after fix commit
|
| Field | Before | After |
|---|---|---|
shallow-signal |
claimed reproduced for "every Strong candidate and every runtime-claim" |
correctly scopes reproduction to Strong candidates only; names what is reproduced for runtime-claim candidates (the claim, not this signal) |
signal-verified |
true for "all Strong candidates, all runtime-claims" |
true only for Strong candidates; explicitly notes that a runtime-claim reproduction leaves signal-verified: false unless the candidate is also Strong |
The distinction matters at the planning handoff: a worth-exploring candidate with a confirmed runtime-claim (claim reproduced → bug is real) now correctly carries signal-verified: false, so a downstream planning agent reading the artifact knows the shallowness observation itself is the scan's as-reported view, not independently confirmed. That's honest.
The fix is also consistent with the promotion gate from 74761ce (Phase 2 re-badge applies the same Phase 1.5 reproduction before assigning Strong), so "every Strong candidate" in the updated description correctly covers both paths — original-Strong and promoted-to-Strong.
No new issues found
All four rounds of review have now closed:
| Round | Finding | Commit |
|---|---|---|
| 1 | Briefing intro says "four parts" but template has five; F4 badge heuristics omitted | fe07dfd |
| 1 | Phase 1.5 gates on wrong field (Strong badge vs confidence: strong) |
fe07dfd |
| P2 | Promoted candidates skip Phase 1.5 reproduction | 74761ce |
| P2 | Artifact labels all shallow-signal entries as verified |
74761ce |
| P3 | Runtime-claim reproduction marks signal-verified: true for the shallow-signal it never reproduced |
b39e49c |
The overall chain — briefing → scan (with calibrated confidence) → Phase 1.5 (gate on Strong and runtime-claims) → re-badge (promotion closes the gate) → honest artifact (signal-verified tracks the shallow-signal specifically) → report — is coherent and self-consistent across all three files.
|
Claude finished @kyle-sexton's task in 1m 46s —— View job Security Review — Round 4 (HEAD
|
Closes #1157
Summary
Three coupled gaps in the deepening lens's scan→report path, all from the SW2030 consumer audit of [email protected]. F3's briefing template is the natural carrier for F2's verify instruction and F4's heuristics, so they land as one coherent change (architecture 0.3.6 → 0.4.0, pure-ADD).
research/deepening/scan-briefing.md: vocabulary primer, friction checklist, dependency categories, both badge-acceptance heuristics, and a per-candidate return schema (withshallow-signalandruntime-claimfields). Phase 1 now briefs every scan agent from it, the same wayinterface-design.mdbriefs the Design-It-Twice agents — so scan quality no longer varies run-to-run.Strong-badge candidate'sshallow-signal, and check every runtime-bug / dead-code claim against the actual code, before the user-facing HTML report lends them its authority. The worked failure the audit caught: a scan reporting a service "registered but never composed" that a single grep refuted (the service is consumed, via a different consumer, with tests).The durable candidate artifact gains a
shallow-signalfield so the verified evidence survives the planning handoff.Test plan
scripts/check-changelog-parity.sh --check-bump origin/main— pass (0.4.0 entry present).scripts/check-changed-skills.sh origin/main— PASS, 0 errors (1 pre-existing Gotchas warning, scoped to architecture: ADR discovery ladder, Gotchas surface, exemplar-validation line (deepening F5/F6 + appendix) #1158).markdownlint-cli2 'plugins/architecture/**/*.md'— 0 issues.../research/deepening/scan-briefing.mdresolves fromactions/(verified: siblingresearch/deepening/dir).Related
Refs #1156 (merged — the F1 predecessor this was serialized behind), #1158 (F5/F6, blocked on this).
🤖 Generated with Claude Code