Project Maintenance
Use this skill only for explicit $project-maintenance ... requests unless the user clearly asks for this exact maintenance workflow.
Core Rules
- Treat the current code as the primary observable fact.
- Do not decide that code or documentation is correct when they conflict. Report the contradiction, cite evidence, and ask how to treat it when the answer changes behavior or scope.
- Do not perform broad redesign, broad refactoring, unrelated cleanup, unnecessary renames, unnecessary abstraction, avoidable file splitting, or dependency additions/updates.
- Preserve currently working behavior unless the accepted change explicitly replaces it.
- Mark uncertain findings as assumptions, inferred, or unverified.
- Create an implementation plan before code edits.
- Add or update tests only around the changed behavior. Do not attempt whole-project test coverage in one pass.
- Run available tests, lint, and type checks when practical.
- Finish by mapping specs, implementation, tests, and verification results.
Commit Rule
When this skill creates or modifies repository files, commit only files changed as part of this skill execution before completing the task. Inspect the working tree and identify only those files; do not stage, modify, or commit pre-existing or unrelated changes. Stage the identified files explicitly by path, and never use git add ., git add -A, or a blanket commit of the working tree. Create a Conventional Commits-format commit message that accurately reflects the change. Do not create a commit for read-only modes or when this skill made no repository changes. Report the commit hash and message in the completion summary.
Mode Selection
bootstrap: Use for a project that lacks maintenance documentation. Analyze and create docs only.change "<request>": Use for a requested implementation change in a project that already has docs or needs docs established around the change.inspect: Use for read-only assessment of structure, risks, documentation state, or likely next maintenance work.docs-check: Use to compare current docs/specs/ADRs against code and report gaps or contradictions.
Read references/documentation-rules.md before creating or updating docs. Read references/spec-template.md before writing specs. Read references/adr-template.md before writing ADRs.
Bootstrap Mode
- Read repository instruction files, README files, build/test configuration, dependency manifests, and existing docs.
- Inspect directory structure, major features, data models, APIs, external services, entry points, and tests.
- Identify unknowns, technical debt, and doc/code contradictions.
- Present the documents to create or update and the evidence for each.
- If explicit approval is not required by the user, create documentation only:
docs/overview.mddocs/decisions.mddocs/specs/docs/adr/
- Do not change production or test code.
- Label anything not proven from code/config/docs as inferred or unverified.
Change Mode
- Read
AGENTS.md, README files,docs/overview.md,docs/decisions.md, relevant specs, and relevant ADRs. - Inspect the target code and tests.
- Classify the change as one or more of:
- existing behavior change
- independent new feature
- bug where implementation violates an existing spec
- internal-only implementation change
- important technical decision
- Before code edits, present:
- classification and reason
- docs to create or update
- acceptance criteria
- impact area
- planned files
- risks
- test strategy
- Update required specs, ADRs, overview, or decisions before implementation.
- Implement the smallest change that satisfies the accepted spec.
- Add or update focused tests.
- Run relevant tests, lint, and type checks.
- Report classification, documentation changes, code changes, acceptance criteria to test mapping, verification results, unresolved items, and remaining risk.
Inspect And Docs-Check
inspect: Stay read-only. Summarize architecture, documentation state, risk areas, likely missing specs, and recommended next steps.docs-check: Stay read-only unless the user asks to fix docs. Compare docs/specs/ADRs with code and tests, then report matches, gaps, contradictions, and confidence.
Reference Loading
- Use
references/documentation-rules.mdfor doc creation/update criteria and conflict handling. - Use
references/spec-template.mdwhen deciding whether to update or create a spec and when drafting spec content. - Use
references/adr-template.mdwhen an important technical decision is involved.