Add spec-delta: baseline comparison for the Gate-B reviewer (vision 2c, part 3) - #37
Conversation
…r intake (Daniel, 2026-10-03)
…aniel, 2026-10-03)
…rt 3) A read-only report shows the Gate-B reviewer, for every relevant spec and plan, the change from an explicitly given baseline to the candidate. It quotes the baseline commit's cycle records verbatim, names any ambiguity, and claims no review attribution. A missing baseline stays visibly unknown. Pass 1 led to Daniel narrowing the scope on 2026-10-03 (47db446). cycle 7mdof8i8pb; floor 3 per {docs/superpowers/stories/2026-10-03-spec-delta-for-gate-b-story.md (level 1)}; hook reminder threshold absent cycle 7mdof8i8pb; Gate-A spec (passes 1-4, gpt-6-astra): Findings 13,9,8,6. Blockers 0,0,0,0. Majors 8,4,4,0.
The plan embeds the tested report, its POSIX-sh suite (16 cases) and the
docs/CI edit script, plus twelve rulings where it settles what the closed
spec left open.
cycle i0rng7770i; floor 3 per {docs/superpowers/stories/2026-10-03-spec-delta-for-gate-b-story.md (level 1)}; hook reminder threshold absent
cycle i0rng7770i; Gate-A plan (passes 1-4, gpt-6-astra): Findings 16,8,4,2. Blockers 0,0,0,0. Majors 9,5,1,0.
…e B (vision 2c, part 3) scripts/spec-delta.py shows a Gate-B reviewer, for every relevant spec and plan, the change from an explicitly given baseline commit to the candidate. Relevant artifacts are changed plans and specs, the specs a contributing plan's header cites, and every --spec and --baseline path. For each baseline, the report quotes that commit's cycle records verbatim and names any ambiguity: no matching record, several cycles, several same-kind files, or a likely squash. It claims no review attribution. A missing baseline stays visibly unknown. The report writes nothing and informs without obliging. scripts/spec-delta.test.sh (16 cases) joins the quality and lint rows, CI and the inventories in AGENTS.md and README.md. Evidence — docs/superpowers/stories/2026-10-03-spec-delta-for-gate-b-story.md Battery: AGENTS.md quality row, exit 0 at f8b8e3541428872828f2e4d6a166de7ee426b4fe. Check (counterfactual): at 7a36b80 no report exists (git ls-tree prints nothing). Negative control in the suite: a copy that reads every **Spec:** line picks up a task-level reference, and the suite catches it. Suite 16/16 under sh (in the quality row) and under dash. Real Gate-B input: python3 -B scripts/spec-delta.py --base 8b52829 --plan docs/superpowers/plans/2026-10-03-spec-delta.md --baseline 7a36b80:docs/superpowers/specs/2026-10-03-spec-delta-design.md --baseline 8b52829:docs/superpowers/plans/2026-10-03-spec-delta.md f8b8e3541428872828f2e4d6a166de7ee426b4fe — exit 0; "artifacts 2: no change 2". Gate-B passes 2 and 3 carried this output in additionalContext; pass 1 carried the same invocation's output for its own head. cycle hc7bzri2yb; floor 3 per {docs/superpowers/stories/2026-10-03-spec-delta-for-gate-b-story.md (level 1)}; hook reminder threshold absent cycle hc7bzri2yb; Gate B (passes 1-3, gpt-6-astra): Findings 3,2,1. Blockers 0,0,0. Majors 1,0,0. Each logical pass is one reviewType full call. Pass 1 ran against 8b52829.../8eb984f...; its Major (a ./ header citation was dropped) and a Minor (newlines in file names) were fixed by an amend. Passes 2 and 3 ran against 8b52829.../f8b8e35....
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 42 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (2)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (9)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughAdds a read-only CLI that compares selected specs and plans at explicit baseline commits with a candidate commit. It reports Gate-A records, ambiguity, artifact states, and diffs. A fixture-based regression suite and repository guidance, documentation, and CI updates support the report. ChangesSpec Delta Report
P5 Light Intake Update
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
actor Reviewer as Gate-B reviewer
participant Report as spec-delta.py
participant Git as Git repository
participant Parser as ledger-metrics.py
Reviewer->>Report: Provide artifact paths, baselines, and optional head
Report->>Git: Resolve refs and read artifact history
Report->>Parser: Load Gate-A record parser
Parser-->>Report: Parsed cycle records
Report->>Git: Read baseline and candidate content
Report-->>Reviewer: Print artifact states, records, and diffs
Merge Risk: ⚪ Minimal · up to No actionable merge-blocking issue was established for the report; it is ready for normal merge checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The report remains advisory and limits revision and path inputs before invoking Git. The inspected CI configuration does not grant additional privileges. Residual uncertainty concerns execution from untrusted checkouts and environments outside this repository’s CI configuration. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 24.24% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 33 functions across 2 files. (7 skipped: 7 unsupported.) ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. I’m a rabbit with a baseline to compare, Comment |
|
git's NUL-delimited path lists are now decoded with os.fsdecode, so a changed spec whose name is not valid UTF-8 keeps its bytes. It can be looked up again and deduplicated against a --baseline for the same path. The output escapes it. The suite adds such a spec, written through the index, with a baseline. Evidence — docs/superpowers/stories/2026-10-03-spec-delta-for-gate-b-story.md Battery: AGENTS.md quality row, exit 0 at 5aeb3b66d2d64816441d46baaf57d17eaacee466. Check (counterfactual): with scripts/spec-delta.py from c12a412, the extended fixture's report differs (the non-UTF-8 spec appears twice, once with a replaced name), and the report case fails; with the fix, 16/16 under sh and dash. Real Gate-B input: python3 -B scripts/spec-delta.py --base c12a412 --plan docs/superpowers/plans/2026-10-03-spec-delta.md --baseline 7a36b80:docs/superpowers/specs/2026-10-03-spec-delta-design.md --baseline 8b52829:docs/superpowers/plans/2026-10-03-spec-delta.md 5aeb3b66d2d64816441d46baaf57d17eaacee466 — exit 0; "artifacts 2: no change 2". cycle 0yfsl8xv5o; floor 3 per {docs/superpowers/stories/2026-10-03-spec-delta-for-gate-b-story.md (level 1)}; hook reminder threshold absent cycle 0yfsl8xv5o; Gate B (passes 1, gpt-6-astra): Findings 0. Blockers 0. Majors 0. The single logical pass was one reviewType full call against c12a412.../5aeb3b6...; both branches found nothing: the zero-finding exit.
What
scripts/spec-delta.pycovers vision step 2c, part 3. Daniel narrowed it on 2026-10-03 to an explicit baseline comparison. For every relevant spec and plan, a Gate-B reviewer sees the change from a baseline commit the caller names (usually the Gate-A closing commit) to the candidate.Relevant artifacts are:
--specand--baselinepath.For each baseline, the report quotes that commit's cycle records verbatim. It names any ambiguity: no matching record, several cycles, several same-kind files, or a likely squash. It claims no review attribution, because no record names the file a cycle reviewed. A missing baseline stays visibly unknown.
The report informs and obliges nothing: no gate rule, pass rule or record format changes. It writes nothing and is not shipped.
scripts/spec-delta.test.sh(16 cases) is now in the quality row, the lint row and CI. This PR's own Gate B carried the report as its input, which is story criterion 4.Also in this PR: P5 light is marked "trigger met, ready for intake" in
todos.md. That covers the IDs only; G1b and 4e are not activated. Daniel decided on 2026-10-03 to rank P5 against part 4 after this part.docs/superpowers/stories/2026-10-03-spec-delta-for-gate-b-story.md, narrowed with a dated fate table.docs/superpowers/specs/2026-10-03-spec-delta-design.md.docs/superpowers/plans/2026-10-03-spec-delta.md.Review record
7mdof8i8pb: 4 passes, Majors 8,4,4,0 (7a36b80). Pass 1 led to the scope decision.i0rng7770i: 4 passes, Majors 9,5,1,0 (8b52829).hc7bzri2yb: 3 passes, Majors 1,0,0.What no check covers
docs/./superpowersheader spellings, and filename bytes that are not UTF-8.Summary by CodeRabbit