Repository Housekeeping
Make the smallest evidence-backed documentation update that lets the next agent
resume correctly. Follow the owning repository's instructions; do not impose a
universal filename or duplicate repository doctrine.
Scope
- Work in the named repository. If none is named, use the current workspace;
do not fan out across repositories by inference.
- Treat unrelated dirty changes as user or agent work. Preserve them and edit
only the files this closeout owns.
- Housekeeping does not authorize implementation, release, deployment,
destructive cleanup, or another repository's writes.
Closeout
- Read the applicable repository-local
AGENTS.md files when present,
git status --short, and the relevant diff, code, tests, or artifacts from
the work being closed out.
- Use the repository's declared instruction precedence and path scope to
identify the canonical current-truth surface. It may be
STATUS.md,
docs/STATUS.md, RESUME_MANIFEST.md, or an equivalent. If AGENTS.md
is missing or names no such surface, inspect existing repository
instruction entry points and their first-read links; select an existing
handoff only when its canonical role is unambiguous. Never choose by
filename alone or create a new status document merely to finish closeout.
When several surfaces exist, preserve their declared roles and avoid
repeating the same state across them.
- If instructions conflict, a declared handoff is missing, or canonical
ownership remains ambiguous after applying declared precedence, do not
guess or rewrite the disputed surfaces. Report the conflict as the
remaining blocker and ask the user to identify the authority.
- Update an existing
AGENTS.md only when a durable operating rule,
boundary, canonical command, first-read path, or ownership fact actually
changed. Do not create one solely to complete housekeeping.
- Bring the canonical current-truth surface up to verified live state:
outcome, decisive evidence, unresolved blocker or residual risk, approval
gates still closed, and the smallest next action. Include branch or commit
identity when it matters to resumption or release truth.
- Remove completed work from active context. Keep status concise and current,
not chronological; link to existing evidence or immutable artifacts rather
than copying their history.
- Reconcile an active plan only when live evidence invalidated its assumptions,
scope, sequencing, or acceptance check. Do not create or polish a plan merely
to complete housekeeping.
- If the repository declares an upstream coordination or portfolio handoff,
leave its compact return record only when the outcome changed information
that surface owns. Do not write upstream or into another repository unless
that write is explicitly in scope.
- Run the repository's documented focused checks for changed agent surfaces,
plus
git diff --check when available.
If evidence is incomplete, write unknown or name the unverified boundary.
Never manufacture a clean closeout from stale prose.
Return
Report the files changed, the current truth established, validation performed,
and any remaining blocker. If no durable documentation fact changed, say so and
leave the files untouched.
1---2name: repo-housekeeping3description: Refresh repository agent instructions and the canonical current-state handoff after meaningful work. Use when the user asks to do repo or project housekeeping, update agent docs, bring status current, refresh a resume manifest, clean up the documents agents use, or close work out properly. Do not use for a broad documentation rewrite or doc-rot audit.4---56# Repository Housekeeping78Make the smallest evidence-backed documentation update that lets the next agent9resume correctly. Follow the owning repository's instructions; do not impose a10universal filename or duplicate repository doctrine.1112## Scope1314- Work in the named repository. If none is named, use the current workspace;15 do not fan out across repositories by inference.16- Treat unrelated dirty changes as user or agent work. Preserve them and edit17 only the files this closeout owns.18- Housekeeping does not authorize implementation, release, deployment,19 destructive cleanup, or another repository's writes.2021## Closeout22231. Read the applicable repository-local `AGENTS.md` files when present,24 `git status --short`, and the relevant diff, code, tests, or artifacts from25 the work being closed out.262. Use the repository's declared instruction precedence and path scope to27 identify the canonical current-truth surface. It may be `STATUS.md`,28 `docs/STATUS.md`, `RESUME_MANIFEST.md`, or an equivalent. If `AGENTS.md`29 is missing or names no such surface, inspect existing repository30 instruction entry points and their first-read links; select an existing31 handoff only when its canonical role is unambiguous. Never choose by32 filename alone or create a new status document merely to finish closeout.33 When several surfaces exist, preserve their declared roles and avoid34 repeating the same state across them.353. If instructions conflict, a declared handoff is missing, or canonical36 ownership remains ambiguous after applying declared precedence, do not37 guess or rewrite the disputed surfaces. Report the conflict as the38 remaining blocker and ask the user to identify the authority.394. Update an existing `AGENTS.md` only when a durable operating rule,40 boundary, canonical command, first-read path, or ownership fact actually41 changed. Do not create one solely to complete housekeeping.425. Bring the canonical current-truth surface up to verified live state:43 outcome, decisive evidence, unresolved blocker or residual risk, approval44 gates still closed, and the smallest next action. Include branch or commit45 identity when it matters to resumption or release truth.466. Remove completed work from active context. Keep status concise and current,47 not chronological; link to existing evidence or immutable artifacts rather48 than copying their history.497. Reconcile an active plan only when live evidence invalidated its assumptions,50 scope, sequencing, or acceptance check. Do not create or polish a plan merely51 to complete housekeeping.528. If the repository declares an upstream coordination or portfolio handoff,53 leave its compact return record only when the outcome changed information54 that surface owns. Do not write upstream or into another repository unless55 that write is explicitly in scope.569. Run the repository's documented focused checks for changed agent surfaces,57 plus `git diff --check` when available.5859If evidence is incomplete, write `unknown` or name the unverified boundary.60Never manufacture a clean closeout from stale prose.6162## Return6364Report the files changed, the current truth established, validation performed,65and any remaining blocker. If no durable documentation fact changed, say so and66leave the files untouched.