agentleFS
awjackson2awjackson2/phase-skills/phase-audit/SKILL.md

phase-audit

Skill0 starsChanged 3 months agoMITView on GitHub

Use to check the integrity of the phase log and the workflow's git state. Trigger when the user asks to "audit the phases", "check the phase log", "is the phase log healthy", "phase doctor", "validate the phases", "any drift?", or before relying on the log for a release or a recap. Reports drift between plans, logs, the index, design docs, and git (missing logs, broken index links, dangling worktrees, stale design-doc sync, numbering gaps), most-severe first, then offers to fix what's safely fixable via a docs-lane PR. Read-only by default.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 8 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run these against development/phase_log/ and git.

    line 21
  2. Distinctive:

    Use read-only git for 8–10 (git worktree list, git branch --merged, git status).

    line 47
  3. Distinctive:

    If everything passes, say so plainly — a clean audit is a valid, useful result.

    line 70
  4. Distinctive:

    Do not invent a missing log or plan from nothing — surface the orphan and ask.

    line 77
  5. Distinctive:

    Before a recap or release where the log must be trusted.

    line 83
  6. Distinctive:

    After a messy session (interrupted phases, manual git surgery, several branches in flight).

    line 84
  7. Distinctive:

    Do not treat appendability — late additions to old themes, numbering gaps, non-numeric index order — as drift.

    line 89
  8. Very specific:

    Do not read source code to "verify" a phase's claims.

    line 90
  9. Distinctive:

    Do not fix anything without the user's go-ahead, and never commit fixes directly to the default branch.

    line 91
  10. Distinctive:

    Do not run as a phase; it needs no plan or log.

    line 92

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Phase Audit

This skill verifies that the artifacts the rest of the workflow trusts are actually consistent: that the index matches the logs, the logs match the files they cite, design docs are in sync, and git has no leftover branches/worktrees. Everything downstream (phase-recap, phase-loop, phase-decompose) assumes these hold — this skill is what guards that assumption.

It is not a phase (no plan/log for running it). It is read-only by default; any fixes it applies are a docs-lane change (branch + PR), never a direct commit to the default branch.

It produces a report — the 🩺 banner below.

Appendability is not a defect

Before listing checks: never flag later additions to an old theme as drift. A 3.8.0 logged long after Major 3 "finished", or a 3.4.3 Patch on a months-old Minor, is the workflow working correctly (see TERMINOLOGY.md → Core principle). Numbering gaps and out-of-numeric-order index lines are expected, not errors. Audit checks consistency, not recency or numeric tidiness.

What to check

Run these against development/phase_log/ and git. Order findings most-severe first.

Integrity (high severity — the log is lying):

  1. Orphan plan. A phase_<NUM>_plan.md with no matching log, where the index does not annotate it as open/partial/planned/abandoned. Either it's an undocumented in-flight phase or a forgotten one. (A plan-with-no-log that the index does annotate is fine — that's a known open phase.)
  2. Unlogged-but-merged work. A phase whose code is on the default branch but has no log / no index entry.
  3. Broken index links. An index entry whose [plan]/[log] link points at a file that doesn't exist.
  4. Missing index entry. A phase_<NUM>_log.md that exists but has no line in the index.
  5. Cited file missing. A log's "Artifacts Produced" (or a plan's Confirmed Starting Point) citing a path that doesn't exist in the repo. Best-effort; report as a warning, since paths may have been moved by later phases.

Sync (medium severity — curated state is stale): 6. Stale design docs. A Last synced: Phase X.Y.Z marker that is behind the latest phase known to have touched that doc. Report each living design doc's marker against the newest index phase; flag suspicious lag rather than asserting staleness you can't prove. 7. Umbrella vs index. For any MAJOR.0.0 umbrella, roadmap items checked off but absent from the index, or shipped (in the index) but still unchecked. (Unchecked-but-shipped is low severity — the checklist is advisory per phase-loop.)

Git hygiene (medium severity — leftovers): 8. Dangling worktrees. git worktree list entries for phases that have already merged/wrapped. Phase worktrees live under .worktrees/; also flag any phase worktree created outside that directory as a convention violation. One exception worth stating rather than flagging repeatedly: a project set up before the provider-neutral rename may still keep its worktrees under the older agent-specific directory. That is a superseded convention, not drift — report it once, offer to move the directory and update the project's .gitignore, and do not re-raise it per worktree. 9. Stale phase branches. phase-* branches already merged into the default branch and never deleted, or a phase-* branch with no corresponding plan file. 10. Uncommitted phase work. A dirty working tree inside a phase worktree (work that should be committed or stashed).

Bundle contract (high severity — records are malformed): 11. Malformed records. There is no validator tool; this check is a read-through of the phase records against the bundle contract. For each record, verify: front matter present with phase equal to the number in the filename; a plan and its log agreeing on phase, phase_status, and delivery_status; exactly one ## OKF relationships footer; the log linking its plan; at least one impact relationship (Intended on a plan, Verified on a log); footer links resolving to real files. Name the file and the broken rule for each finding. 12. Evidence inside the bundle. Anything in development/ that is not index.md, log.md, design/, or phase_log/. Audits, triage notes, and scratch research belong outside; the bundle holds only concepts.

Scaffolding (low severity): 13. Missing templates. phase_plan_template.md, phase_log_template.md, or phase_index.md absent from development/phase_log/. 14. Numbering note. List numbering gaps (e.g. no 5.9 between 5.8 and 5.11) for the user to confirm are intentional reserved slots — not as errors. Do not "fix" gaps.

Use read-only git for 8–10 (git worktree list, git branch --merged, git status). This is the one phase skill that reads git — integrity is its whole job.

A project that declined git (an option at phase-project-init) is not a failing audit; checks 2 and 8–10 simply do not apply. Say so rather than reporting a gap, and audit the phase-log side in full.

Report format

🩺 PHASE AUDIT

### 🩺 PHASE AUDIT · <N> findings (<H> high · <M> medium · <L> low)

**HIGH**
- <[file:line] one-line finding> — <suggested fix>

**MEDIUM**
- <finding> — <fix>

**LOW / confirm**
- <finding> — <ask / fix>

**Clean:** <checks that passed, one line — e.g. "index links resolve; no dangling worktrees">

If everything passes, say so plainly — a clean audit is a valid, useful result.

Fixing

Audit is read-only until the user opts in. When they do:

  • Apply only the safe, mechanical fixes: regenerate a missing index entry from an existing log, fix a broken link, remove a dangling worktree, delete a merged branch, refresh an umbrella checkbox, bump a Last synced marker after re-syncing the doc.
  • Do not invent a missing log or plan from nothing — surface the orphan and ask; the human knows whether it shipped.
  • Bundle the doc/index fixes into one docs-lane branch (chore/phase-audit-<date> or docs/...) and open a PR — never commit straight to the default branch. Removing worktrees/branches is local and needs no PR.

When to trigger

  • Explicit: "audit the phases", "phase doctor", "is the log healthy", "any drift".
  • Before a recap or release where the log must be trusted.
  • After a messy session (interrupted phases, manual git surgery, several branches in flight).
  • Periodically on a long-running project.

What this skill should not do

  • Do not treat appendability — late additions to old themes, numbering gaps, non-numeric index order — as drift. Those are correct by design.
  • Do not read source code to "verify" a phase's claims; it checks artifact consistency, not implementation correctness (that's /code-review or phase-review).
  • Do not fix anything without the user's go-ahead, and never commit fixes directly to the default branch.
  • Do not run as a phase; it needs no plan or log.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.