Repository navigation
docs(agents): raise the tech-debt sweep bar and stop its churn - #5191
Conversation
The scheduled sweep merged eight refactors in the 2026-11-02 to 2026-11-09 window, out of 50 merges. Five reworked the same date-picker hint cluster: EventFormDateField.tsx and LifeBirthDateField.tsx were each rewritten four times in seven days. Each PR was defensible and each passed review; in aggregate they spent review attention, CI time, and regression risk on code that was already correct, for no user-visible change. The same window held one finding worth shipping (#5187). Three causes, each addressed: - A prompt listing many debt categories guarantees a category matches. The skill replaces the list with one question: what breaks if nobody touches this. Three admissible finding classes, each with required evidence; taste, load-bearing mess, and fixes larger than the problem are inadmissible. - Re-reading a fixed trailing window re-surfaces the files the sweep itself just edited, which look densest precisely because they are freshest. The gate excludes prior sweep commits, and a churn guard puts any file a sweep touched in the last 30 days off limits absent a mechanical finding or a real bug. - Nothing recorded a decision to leave code alone, so every run re-litigated settled ground. judged-fine.md is that record, seeded with the seven areas examined and kept on 2026-11-09. No PR is now the expected result, a sweep is capped at one, and the cheap mechanical detectors run before any diff reading so a clean sweep is cheap. The trigger lives in the owner's Claude app and is not changed here; the bar reaches each run through the AGENTS.md Lookups entry. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HmwVQGU4sTAu5rbJPLsEbE
The Lookups entry added in the previous commit took AGENTS.md to exactly
700 words, one over the budget asserted by
agent-os-pack-deletion.test.ts ("loads one instruction file for every
harness"). The merge queue caught it in unit-leg (scripts).
The budget is the point of that test: AGENTS.md is auto-loaded into every
agent session, so it stays short, and detail belongs in the skill it
points at. So this shortens the entry to one terse line rather than
touching the assertion. 696 words, which leaves headroom instead of
scraping under at 699.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HmwVQGU4sTAu5rbJPLsEbE
|
Dequeued on Check: Cause: Fix: shortened the entry to one line, Reproduced locally before and after:
Note for anyone reading the earlier green tick: Generated by Claude Code |
|
Dequeued a second time, on a different check. This one is not this PR's, evidence below. Re-queuing once. Check: The month-picker day never takes focus after Why it is not this PR's:
On the three failures within the job: the initial run plus both retries failed, but all three ran inside the same job on the same runner, so that shows the condition persisted for the duration of that job, not that the spec is deterministic across runs. It passed on the same base 40 minutes earlier. No fix exists to port. I looked for a regression to attribute it to and did not find one I can stand behind. #5190 did touch this area (it added a Worth a separate look regardless of this PR: this spec asserts a focus handoff with no settling wait between Generated by Claude Code |
What and why
The scheduled tech-debt sweep merged eight refactors out of 50 merges in the 2026-11-02 to 2026-11-09 window. Five reworked the same date-picker hint cluster:
EventFormDateField.tsxandLifeBirthDateField.tsxwere each rewritten four times in seven days, by PRs titled "share the helpers", then "fold leftover copies", then "fold the duplication", then "own the key semantics", then "fold leftover hint copies". Each was individually defensible and each passed review. In aggregate they spent review attention, CI time and regression risk on code that was already correct, for no user-visible change. The same window held exactly one finding worth shipping (#5187, a driftedWEEKS_PER_ROWcopy that could silently desync the life PDF grid from the percentage printed beside it).This adds
.agents/skills/tech-debt-sweep/to govern the sweep, and diagnoses three causes rather than just asking future runs to try harder:knip/lint/type signal; a drifted copy of a shared definition, with the observable divergence named; an expired hack). Taste, collapsing things that change for different reasons, load-bearing mess, and fixes larger than the problem are explicitly inadmissible.judged-fine.mdis that record, seeded with the seven areas examined and kept on 2026-11-09 (theproviderVersioncluster, the date-picker key-util split,date-picker-keyboard-dom.util.tsas load-bearing mess, the life-image typography iteration, and three smaller calls).No PR is now the stated expected result of a sweep, a sweep is capped at one, and the cheap mechanical detectors run before any diff reading, so a clean sweep costs three commands and a ledger read instead of a pass over a week of diffs.
Scope note: the trigger and its stored prompt live in the owner's Claude app, so this PR cannot and does not change the schedule. The bar reaches every future run through the new
AGENTS.mdLookups entry, which is auto-loaded regardless of how that prompt is worded. The routine doc records that the merge cadence suggests roughly daily and that weekly or fortnightly would do, as an owner-side change.Docs and agent-instruction files only. No product code.
Verify
VERDICT: PASSfrombun run verify --strict.Checks run:
type-check,lint,knip. Checks skipped: none. Selected packages: none (docs-only diff).bun lintpasses all rules includingagent-constraints, which is the one that governs these files.PRE-EXISTING: none. FLAKY: none.
Generated by Claude Code