Speq audit
A light-weight and straightforward system for spec-driven development with Claude Code or OpenAI Codex. Written in Rust π¦
npx -y skills add marconae/speq-skill --skill speq-auditAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
What its author says it does
Copied from the file, not written here
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.
SKILL.md
7.3 KB, as published. Nobody here has run it
Spec Auditor (Orchestrator)
This skill is a thin orchestrator. It runs read-only health checks over a speq project, delegates the one reasoning-heavy check (mission β spec-library sync) to the audit-agent, prints a BLUF summary, and offers to fix each finding β always asking first. Auditing is mostly mechanical (CLI validators + filesystem checks); only mission sync needs reasoning.
Required Skills (for the orchestrator)
Invoke before starting:
/speq-cliβ spec discovery and thevalidatecommands/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 β the workflow below is the skeleton; the recipes live there.
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 may add, change, or override any part of this skill's workflow below when the two conflict.
- 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:
- Spec structure β every
spec.mdis atspecs/<domain>/<feature>/spec.md - Feature specs β
speq feature validate - Decision log β old
specs/decision-log.mdvs newspecs/_decision/;speq decision-log validate _recordedgitignored βspecs/.gitignorecontains/_recorded- Mission sync β delegated to
audit-agent(Phase 3) - Unrecorded plans β
specs/_plans/*/with averification-report.md - Recorded-folder naming β
_recorded/*followsNNN-<plan> - Library thresholds β >10 scenarios/spec, >8 features/domain
- Reserved-dir gitignore β
_decision/_planstracked; only_recordedignored - Git hygiene β
git status --short specs/is clean - Active-plan validity β
speq plan validate <plan>per active plan - Project hooks β informational only; list any
.speq/*-hook.mdpresent
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 each ending in the concrete next-step command. Tables are exempt from prose guardrails; the Summary line is 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:
| Finding | Remediation |
|---|---|
_recorded not ignored Β· wrong reserved-dir ignored Β· legacy _recorded/ name | Apply inline on Yes (edit specs/.gitignore / mv the folder) |
Old decision-log.md Β· non-conforming domain/feature layout | Delegate to a spawned worker on Yes (see references/checks.md); re-validate |
| Unrecorded plan | Point to /speq-record <plan> |
| Over-threshold domain/feature | Recommend /speq-plan (structural β not auto-fixed) |
| Mission drift | On 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)
| Step | Performed by | Why |
|---|---|---|
| CLI validators, filesystem/structure checks, summary, remediation gates | This skill (pins Sonnet) | Mechanical + conversational |
| Mission β spec-library semantic diff | audit-agent sub-agent | Reasoning-heavy cross-referencing |
Anti-Patterns
| Pattern | Why Wrong |
|---|---|
| Modifying files during Phase 2 | Audit is read-only until the user confirms |
| Applying a fix without a Yes | Every remediation is user-gated |
Editing mission.md directly | /speq-mission owns that file |
| Auto-restructuring domains or thresholds | Reorganization is a user decision |
| Reporting "fast"/"clean" without counts | Quantify findings (N features, N scenarios) |