agentsclimarketplace

Speq audit

Skill marconae/speq-skill/.claude/skills/speq-audit

A light-weight and straightforward system for spec-driven development with Claude Code or OpenAI Codex. Written in Rust πŸ¦€

Install
npx -y skills add marconae/speq-skill --skill speq-audit

Assembled 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 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 β€” 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:

  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 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:

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)

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.