Skip to content

Commit b8a7a23

Browse files
vinidlidooclaude
andcommitted
chore(reports): default the report recipes to the committable form
Plan 59's PR #51 incident: the obvious recipe name (report-agent) produced the --baseline delta form, which bakes a machine path into the markdown and fails CI's freshness gate — and a git diff against your own stale commit reads clean, so the bad form looked verified locally. Fix the mechanism, not the instance: - report-agent / report-ios now emit the no-baseline form CI compares; delta prints move to new -diff recipes that omit --out, so the uncommittable form never touches reports/ at all. - code-quality-cycle skill: prove a report-touching commit green by running the gate's own check script locally, never by eyeballing a diff (follow-up pushes don't re-trigger PR CI). - check-report.mjs stale message: recommend report-ios, not -save (re-snapping the baseline mid-PR would absorb a ratchet regression). - quality-status seeds marked priority-ordered (#1 = next cycle's default scope) after the cycle-5 seed deflection. Plan: 59 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 3d6e6e6 commit b8a7a23

6 files changed

Lines changed: 30 additions & 13 deletions

File tree

.claude/skills/code-quality-cycle/SKILL.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ surface inherits its *shape* (report → baseline → assessments → CI gate),
5757
(summon → `session.start()`, unit-unreachable), that exercise is the **dev-runner selector** (plan 46):
5858
`just coach-dev`, flip the app's debug pane **Coach worker → Dev**, summon ✨, confirm a response.
5959
Deliverable = before/after deltas, zero broken tests. Also the **stopping line** (no churn-for-churn).
60-
`npm run report -- --baseline reports/viewer.baseline.json`
60+
`npm run report -- --baseline reports/viewer.baseline.json` · `just report-agent-diff` · `just report-ios-diff`
6161
5. **Evolve.** Write `reports/assessments/cycle-NN-plan-XX.md` (table + "where the numbers mislead" + next
6262
recommendation) and add its index row; **update `plans/quality-status.md`** (status row, verdict, worklist
6363
seeds); **graduate knowingly-deferred findings into `plans/tech-debt-tracker.md`** (debt lives there
@@ -110,8 +110,9 @@ Coverage records lines **executed, not asserted**, and can't tell unit from inte
110110
Majors pinned in `TOOLS` (bump deliberately; resolved versions recorded in the JSON so drift shows).
111111
**Surface-agnostic:** `SURFACES` holds per-surface scope + thresholds; the runners take the binding.
112112
`slopWaivers` = reviewed false positives, subtracted *and* printed in a "waived" section. **Commit the
113-
*no-baseline* form** (`report:save` / `report.py --out`) — the `--baseline` delta print embeds a
114-
machine-specific path and reads as stale on CI. Tool runners **fail loud** (a crashed scanner is an error,
113+
*no-baseline* form** (`report:save` / `just report-agent` / `just report-ios`) — the `--baseline` delta print
114+
embeds a machine-specific path and reads as stale on CI; the `-diff` recipes print it without writing to
115+
`reports/`, so the uncommittable form never lands on disk. Tool runners **fail loud** (a crashed scanner is an error,
115116
never a green 0), and behavior claims about deps are **enforced in the manifest + lockfile**
116117
(`uv sync --locked`), not in comments — the freshness gate guards the report, not its inputs.
117118

@@ -126,6 +127,10 @@ never a green 0), and behavior claims about deps are **enforced in the manifest
126127
toolchain-split surface, a **projected** freshness diff over the toolchain-independent fields). **Fails only on
127128
a target regression**, never a guide. Once gated, the baseline = current hardened state, so feature PRs are
128129
gated against "don't regress." Minify-on-deploy (`viewer/vercel.json`) realizes the bundle target on the wire.
130+
Before pushing a commit that touches a committed report, prove the gate green locally by running its own
131+
check script (`scripts/check-report.*`) against what you're about to commit — never by eyeballing a diff: a
132+
fresh regen diffed against your own stale commit reads clean. (CI also won't re-run on follow-up pushes to an
133+
open PR, so local proof is the only proof.)
129134

130135
## Per-cycle autonomy
131136

agent/reports/assessment.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ does two jobs:
1212

1313
- At cycle start, snapshot `reports/agent.json``reports/agent.baseline.json`; at cycle end, re-snapshot to
1414
the hardened floor (the CI gate enforces it going forward).
15-
- Run `just report-agent` for the deltas vs the committed baseline.
15+
- Run `just report-agent-diff` for the deltas vs the committed baseline (local print only); `just report-agent`
16+
regenerates `reports/` in the committable no-baseline form.
1617
- Write the cycle up as `assessments/cycle-NN-plan-XX.md` (full table + "where the numbers mislead" +
1718
recommendation), and add one row below. **Targets** may be driven; **guides** are read-only (Goodhart) — a
1819
red guide delta is a prompt to *look*, never an automatic fail.

ios/reports/assessment.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ two jobs:
1313

1414
- At cycle start, snapshot `reports/ios.json``reports/ios.baseline.json`; at cycle end, re-snapshot to the
1515
hardened floor (the CI gate enforces it going forward). `just report-ios-save`.
16-
- Run `just report-ios` for the deltas vs the committed baseline (slow — a real `xcodebuild clean test`).
16+
- Run `just report-ios-diff` for the deltas vs the committed baseline (local print only; slow — a real
17+
`xcodebuild clean test`); `just report-ios` regenerates `reports/` in the committable no-baseline form.
1718
- Write the cycle up as `assessments/cycle-NN-plan-XX.md` (full table + "where the numbers mislead" +
1819
recommendation), and add one row below. **Targets** may be driven; **guides** are read-only (Goodhart) — a
1920
red guide delta is a prompt to *look*, never an automatic fail.

ios/scripts/check-report.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ if (checkFreshness) {
6969
try {
7070
const committed = JSON.parse(execFileSync('git', ['show', 'HEAD:ios/reports/ios.json'], { encoding: 'utf8' }));
7171
if (freshnessProjection(cur) !== freshnessProjection(committed)) {
72-
failures.push('report stale: committed reports/ios.json disagrees with a fresh run on the toolchain-independent fields (LOC / duplication / complexity / slop / scenarios / testability / structure / dead-code) — run `just report-ios-save` and commit the result');
72+
failures.push('report stale: committed reports/ios.json disagrees with a fresh run on the toolchain-independent fields (LOC / duplication / complexity / slop / scenarios / testability / structure / dead-code) — run `just report-ios` and commit the result');
7373
}
7474
} catch (e) {
7575
console.log(` (freshness check skipped: ${(e.message || '').split('\n')[0]})`);

justfile

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,21 +132,31 @@ test-ios-ui:
132132
test-agent:
133133
cd agent && uv run --group dev pytest -q
134134

135-
# Deterministic code-quality report for the coach-agent surface (plan 43): prints
136-
# the markdown (via the shared renderer) with deltas vs the committed baseline.
135+
# Deterministic code-quality report for the coach-agent surface (plan 43).
136+
# Regenerates agent/reports/ in the committable no-baseline form (what CI's freshness gate compares).
137137
report-agent:
138-
cd agent && uv run scripts/report.py --out reports --baseline reports/agent.baseline.json
138+
cd agent && uv run scripts/report.py --out reports
139+
140+
# The delta form bakes a machine path into the markdown — that's why it never touches reports/.
141+
# Print agent deltas vs the committed baseline (local-only; writes nothing to reports/).
142+
report-agent-diff:
143+
cd agent && uv run scripts/report.py --baseline reports/agent.baseline.json
139144

140145
# Re-snapshot the agent baseline to the current hardened state (after a cycle).
141146
report-agent-save:
142147
cd agent && uv run scripts/report.py --out reports && cp reports/agent.json reports/agent.baseline.json
143148

144149
# Deterministic code-quality report for the iOS surface (plan 48): runs a real
145-
# `xcodebuild clean test` (coverage + warnings) + periphery/swiftlint, rendered
146-
# via the shared renderer with deltas vs the committed baseline. Slow (~5 min);
150+
# `xcodebuild clean test` (coverage + warnings) + periphery/swiftlint. Slow (~5 min);
147151
# needs Xcode == report.mjs's PINNED_XCODE for the warning ratchet to be comparable.
152+
# Regenerates ios/reports/ in the committable no-baseline form (what CI's freshness gate compares).
148153
report-ios:
149-
cd ios && node scripts/report.mjs --out reports --baseline reports/ios.baseline.json
154+
cd ios && node scripts/report.mjs --out reports
155+
156+
# The delta form bakes a machine path into the markdown — that's why it never touches reports/.
157+
# Print iOS deltas vs the committed baseline (local-only; slow — a real xcodebuild clean test).
158+
report-ios-diff:
159+
cd ios && node scripts/report.mjs --baseline reports/ios.baseline.json
150160

151161
# Re-snapshot the iOS baseline to the current hardened state (after a cycle).
152162
report-ios-save:

plans/quality-status.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ describes the *process*. Known defects/debts live canonically in the tracker; wo
1717
| **coach agent** (`agent/`) | provider keys + LiveKit secrets; prompt/trust boundary; summons are billed | 4 (plans 43, 45, 51, 55) | 01–03 | 82.75% | **closed** — same triggers |
1818
| **iOS app** (`ios/`) | HMAC seeds baked in binary; `GlassesSource.publish` frame path ~6.6% covered (#197-blocked, on-device-verified); live vendor fold-crash | 5 (plans 48, 53, 54, 56, 59) | 01 | 22.0% | **active** — next cycles land here |
1919

20-
## iOS worklist seeds (next cycles)
20+
## iOS worklist seeds (priority-ordered — #1 is the next cycle's default scope; argue deviations to the user)
2121

2222
- **File the [fold crash](tech-debt/dat-fold-channel-open-race.md) upstream with Meta** — 3 cycles overdue (3→4→5); the single highest-leverage parked item, re-confirmed on-device in cycle 5 (the only thing between the glasses path and a clean fold).
2323
- [RoomConnection recording dual-writer](tech-debt/roomconnection-recording-dual-writer.md) restructure (correctness; off the glasses path, fully off-device-verifiable).

0 commit comments

Comments
 (0)