audit-plans
Audit Plans
Five modes: audit (default), quick, prioritize, investigate, and focus.
This skill is intentionally generic. Tracked files describe the reusable workflow; workspace-specific paths, repo groupings, and validation commands come from the client overlay (skillbox-config/clients/{client}/overlay.yaml → auto-generated context.yaml).
Companion skills:
/domain-reviewer retire {slice}for consolidating completed domain slices/domain-reviewer retire-claude-plansfor consolidating completed session plans
Shared orchestration rules: use references/orchestration-contract.md for background-task handling and worker ownership.
Mode Contract
Before reading or mutating any real plan catalog, load the client overlay from context.yaml (auto-generated from skillbox-config/clients/{client}/overlay.yaml).
If no overlay is available, try auto-detection (see below). If auto-detection succeeds, offer to save the result as a client overlay. If auto-detection fails, create an overlay using the skillbox-quickstart scan + generate flow before proceeding.
Required exports
PLAN_ROOT: top-level directory that contains the plan catalogPLAN_DIRS: space-separated domain-plan roots to audit, for example"${PLAN_ROOT}/released ${PLAN_ROOT}/planned"
Auto-derived exports
These are derived automatically from PLAN_ROOT and PLAN_DIRS when not explicitly set:
RELEASED_INDEX: firstINDEX.mdfound in a directory namedreleasedunderPLAN_DIRS, or emptyPLANNED_INDEX: firstINDEX.mdfound in a directory namedplannedunderPLAN_DIRS, or emptySESSION_INDEX:${PLAN_ROOT}/session-plans/INDEX.mdif it exists, otherwise emptySESSION_PLAN_GLOB:${PLAN_ROOT}/session-plans/*.mdif session-plans directory exists, otherwise empty
Derivation rule: for each directory in PLAN_DIRS, check if INDEX.md exists. Map directories whose basename is released to RELEASED_INDEX and planned to PLANNED_INDEX. Other directories with an INDEX.md are additional indexes to audit.
Optional exports
MERMAID_VALIDATE_CMD: command to validate diagrams in the catalogFOCUS_RELATED_REPOS: newline-separatedrepo=repo1,repo2mappings for focus mode
Auto-detection (no overlay)
When no client overlay is available:
- Walk upward from
cwdlooking for a directory containingreleased/INDEX.mdorplanned/INDEX.md - If found, set
PLAN_ROOTto that directory and derive the rest - Also check common locations relative to the repo root:
plans/,docs/plans/,src/data/db-schemas/ - If multiple candidates are found, list them and ask the user to pick
- If none are found, ask the user for
PLAN_ROOT - After successful auto-detection, offer to save the result in the client overlay for next time
Session plan support
Session plans are conditional. When SESSION_INDEX resolves to empty or the session-plans directory does not exist:
- skip orphaned session plan detection
- skip
parent:frontmatter validation - skip session plan hierarchy grouping
- do not flag the absence as an integrity issue
Only activate session plan features when session plans actually exist in the catalog.
Conventions
- domain slice folders may contain
plan.md,shared.md,backend.md,frontend.md, orCOMPLETED.md - session plans may use
parent:frontmatter pointing to a slice name or slice path - index rows may include
STATUS,PRIORITY, and free-text descriptions with domain/repo tags
Mode Selection
| Trigger | Mode | Action |
|---|---|---|
/audit-plans |
Audit | Dashboard: status, integrity, hierarchy, sequencing, cleanup suggestions |
/audit-plans quick |
Quick Check | Single-plan relevance and index placement check |
/audit-plans prioritize |
Prioritize | Deep-read plans, verify statuses against code, assign priorities |
/audit-plans prioritize [billing] |
Prioritize (scoped) | Same, filtered to a domain tag |
/audit-plans prioritize app-api |
Prioritize (scoped) | Same, filtered to a repo tag |
/audit-plans investigate |
Investigate | Deep-read active + upcoming plans, verify implementation status, propose execution order |
/audit-plans investigate --include-done |
Investigate (all) | Include completed plans for a full recheck |
/audit-plans focus |
Focus | Auto-detect repo from cwd, output prioritized user story backlog |
what are we working on next here |
Focus | Same, natural-language trigger |
what's next / what's the plan here |
Focus | Same, natural-language trigger |
is this plan relevant anymore |
Quick Check | Same, one-plan relevance and indexing check |
investigate backlog depth |
Investigate | Same, implementation verification pass |
verify implementation status |
Investigate | Same, deep status + dependency review |
recalibrate priorities |
Investigate | Same, non-done status and ordering review |
For prioritize mode: read references/prioritize-mode.md. For investigate mode: read references/investigate-mode.md. For focus mode: read references/focus-mode.md.
Key prioritize rules:
- same priority number means concurrent and intentionally parallel
- verify
IN_PROGRESSplans against code before preserving that status - clear stale priorities from
DONEplans - present proposed priority edits before applying them
Quick Check Mode
Use this for fast, single-plan relevance and indexing checks instead of a full catalog audit.
- Read every configured index and locate the target plan.
- Report indexed location,
STATUS,PRIORITY, date, and description. - Verify the referenced plan path exists.
- Flag immediate integrity issues:
- unindexed plan
- index points to missing file or folder
- Read only the target plan's opening section for dependency context (
Depends on:/parent:). - Return one of:
KEEPARCHIVE CANDIDATEBLOCKED
- Keep output concise:
- no mermaid validation unless the plan itself is diagram-focused
- no bulk remediation list
- if broader cleanup is needed, hand off to full audit mode
Files
All real file locations come from the active mode or auto-detection.
- Released index:
${RELEASED_INDEX}(auto-derived or explicit) - Planned index:
${PLANNED_INDEX}(auto-derived or explicit) - Session index:
${SESSION_INDEX}(conditional — only when session plans exist) - Domain plan roots:
${PLAN_DIRS} - Session plans:
${SESSION_PLAN_GLOB}(conditional — only when session plans exist)
Never hardcode repo-specific plan roots in tracked files.
Workflow
- Load client overlay, auto-detect, or ask for the missing catalog locations.
- If
MERMAID_VALIDATE_CMDis set, launch it in the background. - Read all configured indexes (released, planned, and session if it exists).
- Parse rows and compare them against the real plan files/folders.
- Build a dependency graph from
Depends on:andparent:references. - Audit status consistency and FUTURE/PLANNING sequencing.
- If session plans exist, group them under their parent slice.
- Display summary with hierarchy, blocker, and sequencing issues.
- Collect background validation results if a validator was started.
- Offer concrete fixes or next actions.
Background Diagram Validation
If the mode provides MERMAID_VALIDATE_CMD, start it immediately and let it run while the main audit proceeds.
Example mode value:
export MERMAID_VALIDATE_CMD='cd "$PLAN_ROOT" && npm run docs:validate-mermaid'
Why background: diagram validation can take several seconds and should not block index or dependency review.
Collecting Results
After the index and dependency pass, retrieve the background task output and summarize only failures.
Look for:
- success lines for valid diagrams and ignore them
- failing diagram paths plus parse errors or line numbers
Fixing Broken Diagrams
When broken diagrams are found, offer to fix them.
Auto-fix worker brief:
Fix the diagram at {path}.
Error: {error_message}
1. Read the file.
2. Repair the syntax or structure issue.
3. Re-run the configured diagram validation command.
4. Return the exact change and the verification result.
Integrity Checks
Detecting Unindexed Domain Plans
Use the client overlay's directory roots and index links instead of hardcoded paths.
- Enumerate plan directories under each entry in
PLAN_DIRS. - Extract linked slice names from the corresponding index.
- Report folders that exist on disk but are absent from the index as UNINDEXED.
Detecting Orphaned Session Plans
Skip this check entirely when SESSION_INDEX is empty or the session-plans directory does not exist.
When session plans are present:
- Enumerate session plan files from
SESSION_PLAN_GLOB. - Extract linked plan names from
SESSION_INDEX. - Report files that exist on disk but are absent from the index as ORPHANED.
Parent-Child Hierarchy And Dependency Graph
Building The Graph
For each domain slice, read the plan header and look for:
Depends on:references- a
## Dependenciessection - domain or repo tags in the index description
For each session plan, read the opening frontmatter:
parent: standalonemeans independentparent: nullmeans unassigned and should be flaggedparent: path/to/slicemeans child of that sliceparent: slice_namemeans shorthand reference to a domain slice
Hierarchy Validation
Flag these issues:
| Issue | Severity | Condition | Example |
|---|---|---|---|
| Broken parent ref | ERROR | Session plans exist | Session plan points to non-existent slice |
| Missing parent frontmatter | WARN | Session plans exist | Session plan has no parent: field |
parent: null |
INFO | Session plans exist | Plan needs domain assignment |
| Dependency on non-existent slice | ERROR | Always | Depends on: auth-foundation but no such slice exists |
| Circular dependency | ERROR | Always | A depends on B and B depends on A |
| FUTURE depends on FUTURE with no ordering | WARN | Always | Blocker chain exists but priority order is missing |
The first three checks only apply when the catalog has session plans. Skip them when SESSION_INDEX is empty.
Hierarchy Display
Show the graph as an indented tree grouped by domain tag when tags exist.
## Plan Hierarchy
### [billing]
invoice-foundation (DONE) -- base
payment-reconciliation (IN_PROGRESS P1) -- depends on: invoice-foundation
settlement-ledger-followup (FUTURE) -- session child
### [auth]
access-control (FUTURE P2) -- base
tenant-roles (FUTURE P3) -- depends on: access-control
### Unaffiliated
speedy-spark (FUTURE P4) -- standalone session plan
Rules:
- group by the first domain tag when one exists
- indent dependency chains and child session plans
- show status and priority inline
- place standalone or untagged plans in an unaffiliated section
Sequencing Audit
Priority rules:
- blockers must never rank below their dependents
- independent work can share a priority number
IN_PROGRESSwork stays at the front unless it is actually done or staleDONEplans should not keep active priority numbers
When the catalog violates those rules, explain the exact conflict and propose a corrected order before editing any index.
More from build000r/skills
openclaw-client-bootstrap
Build a production-ready OpenClaw client setup for DigitalOcean, Tailscale, Telegram, and SPAPS using a reusable hardened template with read-only defaults and human approval. Use for "set up OpenClaw on a droplet", "create a first claw kit", "bootstrap client box", or approval-gated OpenClaw deployment work.
20unclawg-internet
Run self-service OpenClaw onboarding with browser device auth, agent machine-key provisioning, a soul interview, and discovery-mode setup. Use for "/unclawg-internet", "set me up", "connect to openclaw", "onboard me", "sign up for openclaw", or approval-gated setup.
15domain-scaffolder-backend
|
7unclawg-discover
Run multi-platform customer discovery across Reddit, Hacker News, Twitter/X, and LinkedIn, then output a ranked engagement feed for downstream workflows. Use for "/unclawg-discover", "find customers", "find leads", "find posts to reply to", "build engagement queue", or agent-builder prospecting.
3remotion-best-practices
Best practices for Remotion - Video creation in React. Use when working with Remotion compositions, animations, sequences, or video rendering. Covers project setup for a shared Remotion hub, animation patterns, timing/interpolation, audio, captions, and media handling.
3divide-and-conquer
Decompose complex work into independent parallel sub-agents with no write overlap, synthesize or consume a `WORKGRAPH.md` execution artifact, and launch describe-style worker briefs before review. Use before spawning multiple agents for multi-file, multi-domain, or naturally parallel tasks.
3