Repository navigation
feat(autonomy): add the drift-delta-sweep v1 routine class and its leaf - #3903
Conversation
The routine catalog had ten `v1` classes and no class that runs the repository's installed drift lanes on a cadence, so those lanes ran only when a human remembered to invoke them. Adds an eleventh `v1` class, `drift-delta-sweep`, as a sibling row under Code quality / knowledge with its own tracked leaf. The leaf carries the fan-out instruction content per the catalog's Instruction provenance rule: the instruction-placement delta lane (with its audit bootstrap), the enforcement-surface delta lane (two layers rotating on the ISO week), and the repository drift audit lane (one dimension rotating on the same week, never with `--fix`). Each invocation is presence-gated on its owning plugin and states its fallback in the same sentence. It ships as a sibling of `doc-freshness-sweep` rather than an extension of it: `doc-freshness-sweep/advisory` is ratified admission data on org security bindings, and broadening its substance would change what a ratified entry authorizes without an org re-reviewing it. A class parameter records the one dimension the two classes overlap on, and that the class's substantive prerequisites are not representable in the generated emission. The generated `identity-prerequisites.json` is regenerated, not hand-edited; it goes from thirteen identities to fourteen. Closes #3819 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012jiwedVq2GxuzN7siXQbr4
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Claude finished @kyle-sexton's task in 1m 4s —— View job Security review (
|
|
Last security-reviewed head: |
|
Claude finished @kyle-sexton's task in 6m 13s —— View job Code review complete
Reviewed per What I independently checked (not just re-stating the PR's own claims):
One finding posted inline ( Nothing else rose to the "a careful senior reviewer would block" bar. The Per the skill's rules, I didn't re-verify the author's claimed local tool runs ( |
|
PR body contract — issue linkage This PR body does not yet satisfy the issue-linkage contract:
Edit the body and this comment updates itself on the next run. |
| enforcement surface since its own last run. The layer pair rotates on the ISO week number, | ||
| read with `date -u +%V`; the pair index is (ISO week − 1) mod 5: | ||
|
|
||
| | Pair index | Layers | | ||
| |---|---| | ||
| | 0 | `agent-hooks agent-instructions` | | ||
| | 1 | `repo-hooks vcs-hooks` | | ||
| | 2 | `ci-lanes gate-scripts` | | ||
| | 3 | `satellite-workflows branch-protection` | | ||
| | 4 | `forge-apps external-integrations` | | ||
|
|
||
| The rotation is stateless — a function of the week alone — so a 53-week year repeats one |
There was a problem hiding this comment.
Minor: the "53-week year" framing understates how uneven the rotation already is.
(ISO week − 1) mod 5 over an ordinary 52-week year already splits unevenly: pair indices 0 and 1 land on 11 weeks each (weeks 1,6,…,51 and 2,7,…,52), while indices 2–4 land on only 10 weeks each. That's true every year, not only in a 53-week year — a 53-week year just adds one more hit to whichever index week 53 falls on. The sentence "so a 53-week year repeats one pair" reads as though evenness is the normal case and the leap week is the exception, which isn't what the arithmetic does.
Since this leaf explicitly wants the coverage line to record rotation fairness (## Output contract), the inaccurate premise could mislead whoever audits that coverage claim later. Consider rephrasing to state plainly that the 5-way split over a ~52-week year is inherently uneven (2 pairs get 11 hits, 3 get 10), independent of the 53rd-week case.
| enforcement surface since its own last run. The layer pair rotates on the ISO week number, | ||
| read with `date -u +%V`; the pair index is (ISO week − 1) mod 5: | ||
|
|
||
| | Pair index | Layers | | ||
| |---|---| | ||
| | 0 | `agent-hooks agent-instructions` | | ||
| | 1 | `repo-hooks vcs-hooks` | | ||
| | 2 | `ci-lanes gate-scripts` | | ||
| | 3 | `satellite-workflows branch-protection` | | ||
| | 4 | `forge-apps external-integrations` | | ||
|
|
||
| The rotation is stateless — a function of the week alone — so a 53-week year repeats one |
There was a problem hiding this comment.
Minor: the "53-week year" framing understates how uneven the rotation already is.
(ISO week − 1) mod 5 over an ordinary 52-week year already splits unevenly: pair indices 0 and 1 land on 11 weeks each (weeks 1,6,…,51 and 2,7,…,52), while indices 2–4 land on only 10 weeks each. That's true every year, not only in a 53-week year — a 53-week year just adds one more hit to whichever index week 53 falls on. The sentence "so a 53-week year repeats one pair" reads as though evenness is the normal case and the leap week is the exception, which isn't what the arithmetic does.
Since this leaf explicitly wants the coverage line to record rotation fairness (## Output contract), the inaccurate premise could mislead whoever audits that coverage claim later. Consider rephrasing to state plainly that the 5-way split over a ~52-week year is inherently uneven (2 pairs get 11 hits, 3 get 10), independent of the 53rd-week case.
|
Claude has reviewed this PR 1 time. The lane skips further automatic reviews after 5; deleting this comment resets the count. |
Closes #3819
What
Adds an eleventh
v1routine class,drift-delta-sweep, to the autonomy routine catalog, with its own tracked definition leaf carrying the fan-out as instruction content.plugins/autonomy/reference/routines/drift-delta-sweep.mdplugins/autonomy/reference/routines.mddoc-freshness-sweep, class-parameter bullet, v1-leaves link, countten→eleven.plugins/autonomy/skills/setup/scripts/generate-identity-prerequisites.mjsten→elevenv1 leaves. No logic change.plugins/autonomy/generated/identity-prerequisites.jsonplugins/autonomy/CHANGELOG.md## [0.23.0]### Added.plugins/autonomy/.claude-plugin/plugin.jsonversion→0.23.0.The leaf fans out, in order, to
/instruction-placement:delta(with the/instruction-placement:auditbootstrap),/overengineering:deltawithunattendedand a two-layer pair rotating on the ISO week, and/codebase-health:auditwithout--fixwith one dimension rotating on the same week. Each invocation is presence-gated on its owning plugin and states its fallback in the same sentence; an absent or blocked lane is recorded as not run rather than silently skipped. Lanes are named by slash invocation only, with no file paths, so a relocation of any of them cannot contradict this leaf.Sibling, not an extension
The row ships as a sibling of
doc-freshness-sweepwith its own leaf, not as a broadening of that class.doc-freshness-sweep/advisoryis ratified admission data on org security bindings; broadening its substance would change what a ratified entry authorizes without an org re-reviewing it, and two of the three lanes are not doc freshness. The one dimension the two classes overlap on is recorded as a class parameter.Routine instructions live in the tracked leaf, never a stored prompt, per the catalog's Instruction provenance rule.
Open question for review: the
v1statusRecorded by the planning slice (#3809) as a PR-review switch condition, carried here rather than decided:
The row ships as
v1on the class-level pattern (operators re-run report-only drift detectors on a cadence) with all three lanes built, and because the container Brief requires a leaf, which only av1row ships. No run record exists for these three lanes together, and the leaf says so plainly in itsPrecedentsection. CHANGELOG[0.19.1]refusedv1forcant-fail-test-repairbecause its judgment portion was unbuilt; here it is built.If review rules
v1unearned until a lane-specific run record exists, the row instead files asjoin: proven recurring manual patternwith no leaf, which makes this slice's leaf criteria and the container's criterion 2 unsatisfiable as written; the slice then returns to decompose, and the cheapest run record is a recurring-schedule row for this repository.Notes
reference/routines/directory), so it is untouched.docs/topics/. The plan document lives on the contract-tier branchplan/3809-drift-delta-routineand never merges..github/recurring-schedule.jsonis untouched. The leaf names one illustrativeci-cronbinding and excludes no scheduling surface.lycheeis installed and passes on the leaf and the catalog (52 links, 52 OK, 0 errors).0.22.30→0.23.0. The real base carried0.22.32(main moved). The landing version0.23.0is unchanged and is still the correct next minor, strictly greater than the base.Verification
Every line of the issue's Sanity Checks block passes, plus:
node plugins/autonomy/skills/setup/scripts/generate-identity-prerequisites.mjs --check→ in sync; emission holds 14 identities anddrift-delta-sweepneeds exactlydocumentation_corpus,source_tree,tracker.bash plugins/autonomy/skills/setup/scripts/generate-identity-prerequisites.test.sh→ Passed: 6, Failed: 0.node plugins/autonomy/skills/setup/scripts/resolve-prerequisites.fixtures.test.mjs→ All 22 checks passed.node scripts/validate-plugin-contracts.mjs→ 53 setup skills, 3 retirement manifests, 3345 plugin files checked.npx markdownlint-cli2on the changed markdown → 0 issues.bash scripts/check-changelog-parity.sh --check-bump origin/main,--check,--check-preserved origin/main,--check-order→ all green; 92 changelogs read newest-first, 81 headings preserved.bash scripts/check-stale-base-overlap.sh --check origin/main→ no overlapping paths.bash scripts/check-purged-em-dashes.sh→ 91 declared paths, 122 files, no em dashes.Two independent fresh-context verifiers reviewed the change against the issue with the author's reasoning withheld. The first found one MAJOR (the mandated verbatim trigger-section sentence was soft-wrapped, so the contract's own
grepfailed underset -e); it was fixed by a reflow with no content change. The second, run on the rebased commit, returned no CRITICAL, MAJOR, or MINOR findings.🤖 Generated with Claude Code
https://claude.ai/code/session_012jiwedVq2GxuzN7siXQbr4