Spec Auditor (Orchestrator)

SkillMonitoring & ops

Audit a speq project's health — spec-library structure, feature/decision-log/plan validation, mission-to-spec sync, unrecorded plans, and gitignore hygiene — then guide fixes. Use when the user asks to audit, health-check, doctor, lint, or sanity-check the specs or repo, or after cloning or inheriting a speq project.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Spec Auditor (Orchestrator) skill

What this skill tells your AI

The instructions your AI receives, as published by marconae/speq-skill in .claude/skills/speq-audit/SKILL.md and read by ahel’s review.

Thin orchestrator. It runs read-only health checks over a speq project, delegates the mission ↔ spec-library sync check to audit-agent, prints a BLUF summary, and offers to fix each finding. Always ask before a fix.

Required Skills (for the orchestrator)

Invoke before starting:

  • /speq-cli — spec discovery and the validate commands
  • /speq-writing-guardrails — prose style for the summary

The audit-agent sub-agent invokes /speq-cli itself. Read references/checks.md for the per-check detection recipes, thresholds, and remediation procedures.

Workflow

Phase 0: Load Project Hook (orchestrator)

Check for .speq/audit-hook.md in the repo root.

  • Present: read it. Announce "Loaded project hook: .speq/audit-hook.md". Its content is authoritative: it can add to, change, or override any part of this workflow. If the hook conflicts with this workflow, the hook wins.
  • Absent: continue normally, no mention.

Note it (not its full content) as a Project Hook: line in the audit-agent brief below.

Phase 1: Preconditions (orchestrator)

Check: specs/ directory exists?
├─ Yes → proceed
└─ No  → STOP: "No spec library found. Run /speq-mission to bootstrap."

Phase 2: Run checks (orchestrator, READ-ONLY)

Run every check in references/checks.md, recording a / / and a one-line detail for each. Modify nothing in this phase. The checks:

  1. Spec structure — every spec.md is at specs/<domain>/<feature>/spec.md
  2. Feature specs — speq feature validate
  3. Decision log — old specs/decision-log.md vs new specs/_decision/; speq decision-log validate
  4. _recorded gitignored — specs/.gitignore contains /_recorded
  5. Mission sync — delegated to audit-agent (Phase 3)
  6. Unrecorded plans — specs/_plans/*/ with a verification-report.md
  7. Recorded-folder naming — _recorded/* follows NNN-<plan>
  8. Library thresholds — >10 scenarios/spec, >8 features/domain
  9. Reserved-dir gitignore — _decision/_plans tracked; only _recorded ignored
  10. Git hygiene — git status --short specs/ is clean
  11. Active-plan validity — speq plan validate <plan> per active plan
  12. Project hooks — informational only; list any .speq/*-hook.md present

Reuse the CLI (no new commands): speq feature validate, speq decision-log validate, speq plan validate, speq plan list, speq domain list, speq feature list.

Phase 3: Delegate mission sync to audit-agent

Delegate to audit-agent — Verify mission ↔ spec library

## Context
- Mission: specs/mission.md
- Inventory: run `speq domain list` and `speq feature list`

## Your Task
Diff the mission against the real spec library. Return two lists: (a) domains/features
present in the library but NOT reflected in the mission's Core Capabilities / Domain
Glossary / Architecture; (b) mission capabilities with NO backing spec. Advisory only —
do NOT edit mission.md.

Project Hook: <if active, ".speq/audit-hook.md — read it and apply it"; otherwise omit this line>

If specs/mission.md is absent, skip the delegation and mark the check ✗ (no mission.md).

Phase 4: Print the summary (orchestrator)

Lead with the verdict (BLUF), then the checks table, then numbered remediations. End each remediation with the concrete next-step command. Tables are exempt from prose guardrails. Keep the Summary line terse. Use this format:

# speq:audit — <project>

| Result | Summary |
|--------|---------|
| **✓ healthy** _or_ **⚠ N findings** | <one-line BLUF: what's wrong, most important first> |

## Checks
| Check                                 | Status | Detail |
|---------------------------------------|--------|--------|
| Spec structure (<domain>/<feature>)   | ✓ | 4 domains · 11 features |
| Feature specs (feature validate)      | ✓ | 0 errors |
| Decision log format                   | ✗ | old specs/decision-log.md (7 ADRs) |
| _recorded gitignored                  | ✗ | missing from specs/.gitignore |
| Reserved dirs tracked                 | ✓ | _decision, _plans tracked |
| mission.md ↔ spec library             | ⚠ | 2 features unmentioned · 1 capability unbacked |
| Unrecorded plans                      | ✗ | 1: add-export-command |
| Recorded-folder naming                | ⚠ | 3 legacy names |
| Library thresholds                    | ✓ | max 8 scenarios · 5 features |
| Git hygiene                           | ✓ | specs/ clean |
| Project hooks                         | — | 1 active: plan-hook.md |

## Recommended actions  (I ask before each change)
1. Migrate specs/decision-log.md → specs/_decision/ fragments (7 ADRs → slugs)
2. Add `/_recorded` to specs/.gitignore
3. Record the finished plan → /speq-record add-export-command
4. Reconcile mission.md → /speq-mission (seeded): features `cli/export`, `cli/import` unmentioned; capability "Diff specs" unbacked

A clean project prints ✓ healthy and omits the actions section.

Phase 5: Remediate (orchestrator — each finding gated)

For each actionable finding, ask with AskUserQuestion (Yes / No / Skip). Apply per references/checks.md. Never act without a Yes. After an applied fix, re-run the affected validator and reprint its one-line result. Routing:

FindingRemediation
_recorded not ignored · wrong reserved-dir ignored · legacy _recorded/ nameApply inline on Yes (edit specs/.gitignore / mv the folder)
Old decision-log.md · non-conforming domain/feature layoutDelegate to a spawned worker on Yes (see references/checks.md); re-validate
Unrecorded planPoint to /speq-record <plan>
Over-threshold domain/featureRecommend /speq-plan (structural — not auto-fixed)
Mission driftOn Yes, spawn /speq-mission seeded with the audit-agent's inconsistency lists; never edit mission.md directly

Phase 6: Close (orchestrator)

Print the final status and any remaining manual next steps.

Work Split (reference)

StepPerformed byWhy
CLI validators, filesystem/structure checks, summary, remediation gatesThis skill (pins Sonnet)Mechanical + conversational
Mission ↔ spec-library semantic diffaudit-agent sub-agentReasoning-heavy cross-referencing

Anti-Patterns

PatternWhy Wrong
Modifying files during Phase 2Audit is read-only until the user confirms
Applying a fix without a YesEvery remediation is user-gated
Editing mission.md directly/speq-mission owns that file
Auto-restructuring domains or thresholdsReorganization is a user decision
Reporting "fast"/"clean" without countsQuantify findings (N features, N scenarios)

Signals

GitHub stars
50
Forks
9
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
speq-audit
Source
github.com/marconae/speq-skill