Skip to content

hygiene routine: standing scheduled doc/code hygiene sweep with sliced coverage rotation + audit-memory state (instantiates #242's deferred V1 class definitions) #1219

Closed as not planned

Description

@kyle-sexton

Filed by AI on operator direction (attended feedback session, 2026-07-23).

Category: design · Source: operator direction, loop-lane feedback session

Problem

Hygiene auditing — doc drift, copied-external-content, SSOT violations, encapsulation/derivability audits, general tidying, standards adherence — happens only reactively today: an operator remembers to fire the skills, pays a heavy token bill for a full-repo inventory each time, and gets no credit for yesterday's pass (the next run re-inventories and can re-audit the same area). Static rules (project instructions) reduce but never eliminate drift at write time, so a standing reactive sweep is structurally necessary — the question is making it affordable and non-redundant.

#242 already resolved the governing contract: this work class sits in the locked V1 standing subset ("doc-freshness", "tech-debt and dead-code sweeps"), a routine (standing schedule trigger + saved definition) whose output is a report or work items into the governed queue — never a private direct-change path. #242 deferred the per-class routine definitions; this issue is that instantiation for the hygiene classes, plus one new abstraction #242 didn't cover.

Direction

1. Hygiene-routine definition (the #242-deferred instantiation). A scheduled routine composing the installed hygiene skill set — the doc-hygiene audits (noise, SSOT extraction, encapsulation, derivability, compression), code-tidying, the copied-external-content / capability-enumeration / internal-name-coupling scan (#253 owns that scanner), and standards-adherence checks. Findings file as ordinary work items through the queue (triage classifies; the guardrail matrix governs execution) — the routine itself never mutates the repo. Simplification passes are explicitly OUT of this routine: they mutate the artifact and belong upstream of verification (#1213), not in a standing audit.

2. Coverage-state abstraction (new). Durable audit memory: which repo partition was last audited by which check class, when, with what outcome. Each run selects the stalest slice(s) within a per-run token budget instead of re-inventorying the whole repo — consecutive runs rotate coverage rather than repeat it, and full-repo coverage emerges over the rotation period. Seam-level concept: the partition scheme, staleness ordering, and budget are the contract; where the state lives (tracked file, tracker items, telemetry surface) is a deployment/adapter concern per #242's hosting resolution. Change-aware staleness is a natural refinement: slices with recent churn age faster than untouched ones.

3. Cadence + hosting resolve per #242's decision inputs (deployment-owned binding); the heavy token cost is exactly why the coverage budget, not the calendar, is the primary throttle — a daily light rotation and a weekly heavy rotation are both expressible as budget × cadence choices, not contract changes.

Relations

Activity

  1. added
    needs-triage
    on Jul 24, 2026
  2. added
    needs-human
    and removed
    needs-triage
    on Jul 24, 2026
  3. kyle-sexton commented on Jul 24, 2026

    @kyle-sexton
    MemberAuthor

    This was generated by AI during the /work-items:work-loop autonomous drain cycle.

    Surfaced in the --autonomous frontier (unassigned, unblocked, not human-gated) but carries no role label — already triaged (priority set) yet never routed to agent-ready or needs-human. Content reads as structural/cross-cutting (convention, contract, or design-space work) rather than a scoped bug fix, so this cycle's admission gate classifies it C4-shaped or unclassified and routes it human-gated per the fail-closed default rather than admitting it to autonomous dispatch.

    Routing: added needs-human. No other state changed — priority and existing labels are left as-is. If this is actually scoped/delegable, re-label to agent-ready (+ status: ready) and it will be picked up by a later drain cycle.

  4. kyle-sexton commented on Jul 29, 2026

    @kyle-sexton
    MemberAuthor

    AI-generated: a triage-lane gate-audit agent has claimed this item for escalation review. This comment changes no labels, code, or item state.

  5. kyle-sexton commented on Jul 29, 2026

    @kyle-sexton
    MemberAuthor

    This comment was generated by AI (autonomous gate-audit triage lane). It is a decision-ready summary for a human. No labels were changed — this item remains needs-human by design.

    The escalated question

    The work-loop escalation above contains no explicit worker question — it is a fail-closed routing note ("Surfaced in the --autonomous frontier … carries no role label … routes it human-gated per the fail-closed default"), ending with an invitation: "If this is actually scoped/delegable, re-label to agent-ready." The implicit question is therefore:

    Is #1219 scoped and delegable to an autonomous agent, or does it require human routing first?

    Answer: it requires human routing — and this part is engineering-settled

    The routing question needs no judgment. The repo's own governing policy produces human-gated on every path this item could take:

    Path Citation Disposition
    Item carries no work-class: label → unclassified plugins/work-items/skills/work-loop/SKILL.md — Admission gate (work-class, fail-closed) fail-closed human-gated
    Lands at C3 plugins/autonomy/reference/guardrails/admission-policy.md:48 human-gated — per-item human admission
    Lands at C4 plugins/autonomy/reference/guardrails/admission-policy.md:49 human-gated
    No rule matches plugins/autonomy/reference/guardrails/admission-policy.md:52 human-gated
    Feature-shaped at any class plugins/work-items/skills/work-loop/SKILL.md — C3 scoped feature-shaped → human-gated human-gated

    C4 additionally carries structural-plan-approval — upfront plan approval before execution, plus mandatory human review and human merge (plugins/autonomy/reference/guardrails.md; plugins/autonomy/reference/guardrails/work-classes.md — "C4 — structural. Refactors, migrations, contract changes").

    So the classification debate below does not change the outcome. What does need a human is the scope decision, described next.

    What the evidence changed about this item's shape

    Direction 1 is substantially already shipped. plugins/autonomy/reference/routines/ contains ten normative v1 class leaves, including both classes this issue names as governing — doc-freshness-sweep.md (96 lines: trigger slot, cadence, access scope, output contract, derived guardrail row, posture-qualified protected identities) and tech-debt-sweep.md (64 lines). One seat traced them to PR #600 / 4ec48b52 feat(autonomy): standing-routine catalog, v1 leaves, setup routine slice (WP6), landed after #242 closed.

    This leaves the work's shape undetermined across three valid readings — an agent cannot pick among them without a human scope call:

    1. a new catalog row + v1 leaf for a distinct hygiene-sweep class (no such row exists today), or
    2. an extension of the two existing leaves to compose this repo's hygiene skill set, or
    3. a pure deployment binding of what already exists.

    Direction 2 is the genuinely novel contract work. A repo-wide grep for coverage.state|coverage rotation|sliced coverage|stalest slice|audit memory across all *.md returns zero hits. The issue body itself concedes it is "one new abstraction #242 didn't cover" and calls its partition scheme / staleness ordering / budget "the contract" — verbatim the repo's work-class: structural definition.

    Cadence and hosting are NOT a contract blocker. doc-freshness-sweep.md states the cadence default is "an org-bindable value set in the org's routine binding, never contract-fixed," and routines.md makes hosting a "deployment-owned binding." These are deployment decisions, not gates on the contract work.

    Recurring-schedule infrastructure — precise statement. .github/recurring-schedule.json exists but is empty ({"items": []}); no workflow under .github/workflows/ references recurring; no issue has ever carried the recurring label. Whether an untracked local /schedule or cloud routine exists is not observable from the repo — which is itself the open hosting question.

    Dependencies

    Panel

    Three seats, prior lane rationale withheld from both external seats (the packet was title + body + a neutrally-phrased question only; the escalation comment was deliberately excluded so its verdict could not leak).

    Seat A — fresh Claude reviewer (own context, grounded in repo files) Seat B — OpenAI Codex (alternate vendor) Seat C — this agent's own read (recorded before reading A or B)
    Class C4 C4 C4
    Shape Feature-shaped Feature-shaped Feature-shaped
    (a) security-surface NO for code; YES for the governance binding YES NO
    (b) dependency-pin NO NO NO
    (c) cross-cutting YES YES YES
    (d) hard to reverse NO (markdown in git; C4 earned by blast radius) YES YES
    (e) human product/priority call YES NO YES
    Verdict Leave human-gated Leave human-gated Leave human-gated
    Confidence High High High

    Unanimous on class (C4), shape (feature), (b) NO, (c) YES, and the verdict.

    Disagreements reported, not smoothed:

    • (a) Seats A and B both surface a dimension this agent's own read missed: routines.md §Routine identity — "The identity-to-class mapping is admission data on the security binding" — and admission-policy.md's warning that "an agent-writable admission policy is a bypass channel." Not a code security surface; a governance-binding one. Contested but well-cited.
    • (d) Seat A argues NO — these are markdown contracts in git, so C4 is earned by blast radius rather than irreversibility. Seats B and C say YES. Does not change the outcome.
    • (e) Seat B says NO (intent is already fixed by the issue; human involvement is C4 plan approval, not product invention). Seats A and C say YES. Does not change the outcome.

    Why the hold stands

    Both stated grounds apply:

    Options — RECOMMENDED first

    1. RECOMMENDED — Re-scope against what already shipped, then split.
    Decide which of the three shapes this is. Direction 1 is largely satisfied by the shipped doc-freshness-sweep / tech-debt-sweep leaves, so narrow #1219 to Direction 2 (the coverage-state contract: partition scheme, staleness ordering, per-run budget), which has no implementation anywhere in the tree. Route Direction 2 as a wayfind: design decision item; whatever Direction-1 residue remains may then re-classify as C3 and become delegable under plan approval.
    Why first: it is the only option that acts on the strongest finding (Direction 1 is mostly built), and it converts one oversized item into a real design decision plus a possibly-delegable remainder.

    2. Split out the bounded slice first.
    File a one-shot, report-only hygiene sweep over a single named slice — no schedule, no persisted coverage state, no contract. That slice could go agent-ready on its own and would de-risk Direction 2 empirically before its contract is specified.
    Tradeoff: produces value sooner, but risks an ad-hoc mechanic the later contract has to absorb or discard.

    3. Hold pending #253.
    Resolve #253 (OPEN, needs-human, wayfind: design) and its "prerequisite or co-developed" question first, since its scanner is a composed check of this routine.
    Tradeoff: cleanest sequencing, slowest; leaves a priority: high item parked behind a priority: medium one.

    Suggested labels (NOT applied)

    work-class: structural would make the fail-closed unclassified path explicit rather than implicit. Deliberately not applied — this lane changes no labels on a gated item. Current state is unchanged: priority: high + needs-human.

  6. kyle-sexton commented on Jul 29, 2026

    @kyle-sexton
    MemberAuthor

    AI-generated: the triage-lane gate-audit is complete and this claim is released. Item left gated — no labels changed (priority: high + needs-human unchanged).

  7. added theissue type on Aug 13, 2026
  8. kyle-sexton commented on Aug 13, 2026

    @kyle-sexton
    MemberAuthor

    Frontier disposition (drain session)

    Ruling: Close as not planned.

    Standing scheduled hygiene routine instantiates #242's deferred V1 class definitions; not staffed and no rotation schedule is due.

    Re-open trigger: When #242 V1 class definitions land and a hygiene rotation is scheduled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-human

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions