Skip to content
Back to skills

Superspec Mini

ASecurity

Lightweight spec-driven development for bounded but consequential changes. One SPEC.md, a fresh-context default-REJECT Advisor gate, then the implementation. Use it proactively when a change carries real risk (load-bearing code, deletions, AI prompt behavior, code that several parts of the system share) but does not need the full superspec process. Triggers on "mini superspec", "mini spec" and "light spec". It owns the routing table that decides between no spec, mini and full superspec. The s...

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 29, 2026
ai-agentspythongobashsqlnodegitapidatabase

Works with

  • claude code
  • cli
  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 29, 2026

npx -y skills add bradennapier/intellagents --skill superspec-mini --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Superspec Mini?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Superspec Mini
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bradennapier-superspec-mini/badge)](https://www.skillsdirectory.com/skills/bradennapier-superspec-mini)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: superspec-mini
description: Lightweight spec-driven development for bounded but consequential changes. One SPEC.md, a fresh-context default-REJECT Advisor gate, then the implementation. Use it proactively when a change carries real risk (load-bearing code, deletions, AI prompt behavior, code that several parts of the system share) but does not need the full superspec process. Triggers on "mini superspec", "mini spec" and "light spec". It owns the routing table that decides between no spec, mini and full superspec. The superspec skill defers to this file for routing.
allowed-tools:
  - Bash(${CLAUDE_SKILL_DIR}/scripts/spec-root.sh)
---

# superspec-mini

The least process that still catches a severe bug. Self-contained: no reference files to load
first, no required external CLI, exactly three artifacts. Use the companion skills at the marked
points and do not restate them: `gather-context` (Phase 1) and `asd-ste100` (before the first draft
of any spec text). For everything else, follow the repository rules in `AGENTS.md` (Claude Code
reads it as `CLAUDE.md`) and `CONTRIBUTING.md`.

**Prime rule: a gate is a command that exits 0, or a logged Advisor verdict. A gate is never a
prose checklist that you certify yourself.** Corollaries:

- A command can go in SPEC.md only after you verified in this session that it exists: in a
  `package.json` script, in the check table of `CONTRIBUTING.md`, or through `--help`. A gate that
  names a command that cannot run is fiction.
- Run gate commands bare and read the EXIT CODE. `cmd | tail` reports the exit code of `tail`, not
  the exit code of the gate.

**Design rules. These two are a pair. Apply them together:**

- **Do not over-engineer.** Verify thoroughly, but build the SIMPLEST design that meets the
  acceptance criteria: no speculative abstraction, no configuration surface "for later", no
  boilerplate when a plain alternative exists. The Advisor applies this lens. A credible simpler
  counter-design means REJECT.
- **Scope expansion is legitimate when a signal names it.** Simplicity is the default, not a
  muzzle. Named signals: hot-path code (AI prompts, sign-in and access checks, code that writes or
  deletes stored data, contracts that two parts of the system share), a possible bug or an
  unexpected behavior change that you find during the work, an unhandled edge case, and an
  antipattern in code that this change already touches. Never act on such a finding silently, and
  never drop it silently. In mini, the Advisor gate approves: record the expansion in SPEC.md as a
  Plan change plus a Decision Log entry, and send it to a fresh Advisor. If it trips a full-tier
  routing signal, escalate.

## Phase 0 — Route: pick the tier FIRST

Read the table from top to bottom. The first match wins. Then state the tier and its deciding
signal out loud (for example "mini: signal 6, deletes shared code") before anything else. An
explicit invocation is AUTONOMOUS: when the table decides, state the result and continue. Do not
ask the user. Ask the user only when the table itself cannot decide (see the bullets below). That
question is not a "routing question" in the prohibited sense. Escalate loudly on evidence. This
table is the only routing authority. Full `superspec` defers to it, and owns the downgrade
question on direct invocations.

Phase numbers match the phases of `superspec`: 0 Route, 1 Context and Discovery, 2 Spec, 3 Advisor
gate, 4 Implement. Mini does validation in Phase 4, and `superspec` makes it a separate Phase 5. So "Phase 3" means the same gate in both tiers.

<!-- routing-table -->

| #   | Signal                                                                                                                    | Tier                            |
| --- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------- |
| 1   | Schema migration, backfill or data movement                                                                               | **full `superspec`**            |
| 2   | New or changed contract between parts of the system (API shape, stored row shape, file format that another program reads) | **full**                        |
| 3   | Staged rollout behind a feature flag                                                                                      | **full**                        |
| 4   | 3 or more milestones, or expected to span more than one PR or session                                                     | **full**                        |
| 5   | Work that you want as a task graph of tasks that can start independently                                                  | **full**                        |
| 6   | Deletes or refactors load-bearing or shared code                                                                          | **mini**                        |
| 7   | The premise is a claim about AI or model behavior (prompts, extraction, recommendations)                                  | **mini**                        |
| 8   | Real ambiguity that needs decisions from the user                                                                         | **mini**                        |
| 9   | Touches more than 3 files, or 2 or more top-level parts of the repository                                                 | **mini**                        |
| 10  | None of the above (3 files or fewer, one part, no ambiguity, one revert undoes it)                                        | **no spec: implement directly** |

- Signal 5 gets a task graph that you work through by readiness. It does not get agents that run
  at the same time. Neither tier has a parallel team mode, so do not escalate to get one.
- A tie between no spec and mini goes to mini: an hour of spec costs less than one severe bug. A
  tie between mini and full starts as mini and escalates on evidence (see the last section). When
  the tier is really unclear, ask the user (in Claude Code, with `AskUserQuestion`). Offer the two
  candidate tiers and mark your recommendation.
- Score the table again each time discovery changes the picture. Log the routing call, and each
  change to it, in the Decision Log. An escalation is a finding, not a failure.

## Process at a glance

Phase 0 Route (above) → Phase 1 Context → Phase 2 Spec (one file) → Phase 3 Advisor gate (BLOCKING)
→ Phase 4 Implement and verify.

Exactly three artifacts, in `<spec-root>/<spec-name>/`:

- `00-INITIAL_PROMPT.md`, always. The verbatim request of the user, written the moment the folder
  exists. Append later steering from the user as dated addenda. The file grounds the work again
  after a loss of context.
- `00-CONTEXT.md`, the `gather-context` output. Write it only for an issue or PR target.
  It is always a discovery INPUT.
- `SPEC.md`, always. It holds the spec, the plan and the decision log.

There are no TLDR, DISCOVERY, CHANGELOG or EXEC files, no completion-marker file and no required
task graph. SPEC.md does those jobs.

### Spec folder: name it and create it EARLY

`<spec-root>` is:
!`${CLAUDE_SKILL_DIR}/scripts/spec-root.sh`

The line above ran in the folder where the session started. Run the script again when you work in
another worktree, or when the line shows a command and not a path. Make the worktree your current
folder, and run `bash <folder of this skill>/scripts/spec-root.sh`. Use only its latest output.

The script prints `docs/specs` in the repository root when it is a real folder and git ignores no
spec file in it. Otherwise (`docs/specs` is missing, is a symlink, or git ignores spec files in it),
the script prints `~/.superspec/projects/<repository name>/specs`, outside the repository.

- Read and write spec files by that absolute path, typed in full. Put the path in the prompt of
  each subagent that reads or writes spec files.
- **`<spec-root>` inside the repository:** the spec files belong to the checkout. Create the branch
  or the worktree first, run the script there, and then create the folder. Commit the spec files
  with the work, on the same branch. They are public: follow `docs/specs/README.md`.
- **`<spec-root>` outside the repository:** the main checkout and each worktree share the folder, so
  you can create it before the worktree. Nothing is copied and nothing waits. Do not commit or
  publish these files unless the user asks.

Derive `<spec-name>`, create `<spec-root>/<spec-name>/`, write `00-INITIAL_PROMPT.md` first (the
verbatim request, before anything else), and start `gather-context` immediately, so that it writes
`00-CONTEXT.md` into the folder. Ordering rule: when `<spec-root>` is outside the repository, you can gather the issue and PR context (no
codebase inspection) before you enter the worktree. When it is inside the repository, enter the
worktree first. ALL codebase investigation happens INSIDE the
worktree.

Name the folder by the first rule that applies. A name never contains `/`, because a slash
silently nests a folder. A name never has a numbered prefix, because counters from different
branches collide.

1. The branch name minus its leading type segment (`feat/`, `fix/`, ...), with each other `/`
   changed to `-`. So `feat/issue-42-session-search` becomes `issue-42-session-search`.
2. `issue-<number>-<title>` when there is an issue but no branch yet.
3. `<title>` alone.

## Phase 1 — Context

Phases 1 to 3 change no product code. A plan mode fits them.

1. **Freshness gate, before discovery begins.** A spec written against old code is fiction:

   ```bash
   git fetch origin && git merge-base --is-ancestor origin/main HEAD   # exit 0 required
   ```

   In a fork, use the remote of the upstream repository in place of `origin`. On failure, rebase
   onto `origin/main` or create a fresh worktree BEFORE any investigation. Run this check again
   before final validation when the work spanned more than one session or day.

2. Run `gather-context` on the target unless a current `00-CONTEXT.md` already exists for it. Pass
   `<spec-root>/<spec-name>/00-CONTEXT.md` as the artifact path, because its default path is
   different. The file is a discovery INPUT, not a spec artifact, so it breaks no gate. Work with
   no issue and no PR skips this step.
3. Targeted exploration. Use a language server (hover, find references) when your agent has one.
   Otherwise search with `rg`, and say so in `## Evidence`. Two checks are required, and they
   happen NOW, not later: each symbol that the spec will name gets a hover and a reference search
   at its cited location, and each "unused / orphaned / dead / no callers" claim gets a new
   reference search. Example of the failure: a spec says that a helper has no callers, from a text
   search for its name. A re-export under another name still calls it, and the deletion breaks
   the build.
4. **Check data claims on invented data.** Do it when a fact about stored data can change your
   confidence in the problem, its reach or the fix. Measure it with a test, a test fixture or the
   demo install (in this repository, `./intellagents demo`). Never read, query or copy the real
   history of a person to prove a spec claim. The "Private data" rule in `AGENTS.md` applies. Cite
   the test, the fixture or the steps in `## Evidence`.
5. **Map each behavior change before you write the Plan.** A behavior is an output that leaves the
   changed code. It can reach a user, an API caller, a job, a stored row, an export, an AI prompt or
   another system. For each behavior that the change alters:
   - Read today's behavior in the code. Cite it as `file:line`.
   - Find each consumer of the changed value. Use find references for code symbols. Use `rg` for
     route paths, JSON keys, column names, SQL and prompt text.
   - Name what happens to data in flight: queued work, stored rows in the old shape, and cached
     values.
   - For a changed rule or limit that our code decides, find the test that records today's output.
     When no test does, plan a characterization test.
   - When the reach of the change can change the plan, measure it with step 4.

   When the map shows a full-tier signal of the Phase 0 table, escalate. Write the result in
   `## Behavior changes`.

6. Questions: conditional, not ceremonial. If real ambiguity survives the context, ask the user (3
   or 4 substantive questions at most, options with trade-offs). If nothing is unresolved, do NOT
   make up questions. Log `No open questions` and continue.

## Phase 2 — Spec (one file)

Write `<spec-root>/<spec-name>/SPEC.md`. Keep it easy to scan. If a section needs more than one
screen, the scope is too large for mini. Use exactly these sections:

```text
# <spec-name>
> TLDR: 2 to 4 sentences. What changes, why, what it can break, how to roll it back.
> Routing: mini (signal: <which>). Issue: <#number or none>. Branch: <branch>.

## Goal / Non-goals

## Evidence
What discovery PROVED, with file:line receipts only. The Advisor attacks each claim here.

## Plan
- [ ] 1. <step. It can be validated on its own. It states its own observable acceptance and its
         check: a verified command, or the observable behavior>
- [ ] 2. ...
2 to 6 steps. ONE sizing rule: a coherent deliverable that you can validate on its own, typically
1 to 4 hours and up to about 5 files. Split a larger step, or a step that spans subsystems. NEVER
size a STEP by line count. Each step leaves all checks green. Steps that run at the same time
share no file.

## Behavior changes
One row for each behavior that this change alters (Phase 1 step 5):
| # | Behavior and input | Today (file:line) → after | Consumers | Data in flight | Reach | Proof |
- Behavior and input: the output that changes, and the input case that produces it.
- Consumers: each screen, API caller, payload, export, prompt or table that reads the changed
  value.
- Data in flight: what happens to queued work, rows in the old shape and cached values. Or
  "none", with the reason.
- Reach: who or what the change reaches, for example each install that has rows in the old
  shape. Cite the measurement (Phase 1 step 4). Or "not measured", with the reason.
- Proof: the Plan step and the check that shows the change, for example "Step 2: <test name>".
  Use the check that fits the behavior:
  - A changed rule or limit that our code decides: a characterization test, which records
    today's output of the rule. An existing test counts when it already records the changed
    cases. Else add one in its own commit, before the change. Give it one input case for each
    branch or limit that the change touches. Put one test in each part of the code that holds a
    copy of the rule. The step that changes the rule first edits the expected output of each
    changed case. The test must then fail. Then the step changes the rule. The edit of the
    expected output is the proof.
  - A new behavior: a test or an eval that fails on today's code and passes after the change.
    For an eval, the proof follows the run strategy that `## Evals` records.
  - A changed label or copy text, or another change where a test would only copy the
    implementation: "No test", with the reason. Write the manual check in Phase 2. Add its
    result when the step lands.
When the change keeps every output the same, write "No behavior change" in place of the table.
Then name the check that shows it. A behavior change that this table does not list is a defect,
also when it looks like a fix.

## DO NOT CHANGE
Files, functions, contracts and tests that must stay as they are, and why each one is
load-bearing.

## Validation
Only commands verified to exist in THIS session. This repository's checks are in the table in
CONTRIBUTING.md. Name the checks of each part that the change touches, for example:
  pnpm -C app typecheck
  pnpm -C app test                          # narrow: pnpm -C app test -t "<pattern>"
  node --test explorer/
  python3 -m unittest discover -s tests     # narrow: add -k <pattern>
  pnpm fmt:check
  # A -t filter that matches no test still exits 0, with every test skipped: a vacuous green.
  # Confirm that the output shows at least one test that ran and passed.

## Evals
A required answer. Does this change AI or model behavior? If the PREMISE of the fix is a claim
about model output, the answer is YES. ("No eval needed" is a common wrong answer for a prompt
change.) Name the scenario. Then ask the user for the run strategy (mark your recommendation):
red→green live runs during the fix, a live run as the completion gate, or write the eval and leave
the runs to the user. Live runs call real models and cost money. The eval harness of this
repository: pnpm -C app eval --list lists the scenarios (no credentials, no network), and
pnpm -C app eval <scenario> --model <model> runs one live. A live run reads and changes the install
that it targets, by default the main install with the real history of the user (sessions, tags,
notes, dashboards, a zz_eval database). Agree on the target install with the user too. Record only
PASS or FAIL here, never the answers of the model. Read app/server/evals/README.md first. If NO: one line that says why.

## Rollback
One or two lines: how to revert a bad landing.

## Decision Log
Append only. Dates only. Decisions only: routing, user answers, Advisor rounds, scope changes.
- YYYY-MM-DD — <decision>
```

**SPEC.md is the single source of truth.** Track execution with its Plan boxes. You can copy them
into the session todo list, but that list is disposable, and the SPEC is the record. There is no
second task system to keep in sync. Do not restate a rule that `AGENTS.md` or `CONTRIBUTING.md`
owns.

## Phase 3 — Advisor gate (BLOCKING)

Self-review does not catch the errors that this gate exists for: a cited symbol that does not
exist, an "unused" claim with live callers, and headline evidence that proves the opposite of its
claim. **Implement nothing before APPROVE.**

1. Start ONE fresh-context Advisor subagent (in Claude Code, the Agent tool) on the most capable
   model. It is never the author of the spec and never a continuation of this context. Use TWO,
   with different lenses (for example a factual-claims audit and a blast-radius review, or a
   simplicity review), when the spec deletes code, touches a sign-in or access check, touches code
   that writes or deletes stored data, or changes AI prompts.
2. Give the Advisor the SPEC.md path, the `00-CONTEXT.md` path when it exists, and this charge,
   word for word:
   - Default-REJECT: approve only when you are sure that this spec is correct and that
     implementing it as written breaks nothing. Any doubt about a blocker or a major finding is a
     REJECT. A minor finding alone is not a reason to REJECT. Find why it is wrong.
   - Open each file that the spec names. Confirm that each cited symbol exists there (with a
     language server when you have one, not with grep). Prove each "unused / orphaned / dead"
     claim again yourself with a reference search.
   - Walk the Plan in order. After each step, would the checks still pass? Search for consumers of
     each deleted symbol in later steps and in other parts of the repository.
   - Behavior changes: read the code that each Plan step touches. Name each behavior change that
     the table does not list. Open each "Today" citation and confirm it. Confirm that each row
     names its consumers, its data in flight and the proof that fits its kind. These are major
     findings: a missing row, a wrong "Today", and a changed rule or limit with no
     characterization test and no "No test" reason.
   - Data claims: confirm that each claim about stored data cites a test, a fixture or steps on
     invented data. A data claim with no such citation is a major finding. A spec that holds
     private data or real session content is a blocker.
   - Simplicity lens: is there a materially SIMPLER design that meets the same acceptance
     criteria? A credible simpler counter-design is grounds for REJECT. Judge each proposed scope
     expansion on its named signal and its evidence: approve it, reject it, or rule that it needs
     the full tier.
   - Confirm that DO NOT CHANGE covers the load-bearing neighbors of what the Plan touches, that
     each Validation command exists in the package.json or the CONTRIBUTING.md row that it claims,
     that the Evidence supports the claims of the TLDR, and that no full-tier routing signal was
     missed.
   - Return exactly `VERDICT: APPROVE` or `VERDICT: REJECT`, then numbered findings:
     claim → evidence (file:line) → severity.
3. Log each round in the Decision Log (`YYYY-MM-DD — Advisor round N: REJECT — <reason>`). Revise.
   Then run the gate again with a FRESH Advisor, never the one that saw the previous draft. A
   material scope change at ANY later point runs this gate again too (usually one quick round).

## Phase 4 — Implement and verify

- Implement in this session. You can give mechanical or high-volume steps to fresh-context
  subagents (prompt: "SPEC.md is the source of truth. Read it first."). **Right-size the model.**
  An execution subagent that FOLLOWS a coherent plan runs on a smaller model (mechanical, scoped
  work) or a mid-tier model (well-specified work across several files). Keep the most capable
  model for Advisors, judges and ambiguous synthesis. The test: "Does this subagent decide, or
  does it follow?" When you are not sure, use the stronger model.
- **Implementation review is a gate, not a self-report.** Before you check a Plan box whose step
  touched product code, give the diff of the step (`git diff <base>...HEAD -- <paths>`) and the
  SPEC.md path to a FRESH-context reviewer subagent. The reviewer is not the implementer and not
  the author of the spec. Charge: does the diff do what the step of the spec says, no more and no
  less? Name each drift, missed acceptance criterion, orphaned path, DO NOT CHANGE violation, and
  behavior change that `## Behavior changes` does not list, with file:line. Fix what it returns,
  then check again. For an unlisted behavior change, revert it. Or keep it through the
  scope-expansion rule of the design rules, with its row and its proof. To keep a changed rule or
  limit, restore the old rule first. Then follow the Proof rules. Plans that an Advisor approved
  still drift during the writing, and commands alone do not catch that.
- **Dead-code hygiene ships with the change that caused it.** When a step orphans a path (a
  branch, an export, a configuration key, a flag, a test or a helper), prove it with a reference
  search, then delete it in that same step. Never leave dead code "for later". The next reader
  treats it as live.
- Check each Plan box when its step lands. Commit at coherent boundaries, as the "Send a change"
  part of `CONTRIBUTING.md` says. Unattended runs can enforce the check of a step with automation:
  a Stop hook that runs the check again and blocks the end of the turn until it exits 0 (recipe
  for Claude Code: `.agents/skills/superspec/references/hooks-recipe.md`).
- **Done means ALL of these (per the prime rule: commands and verdicts, not self-certification):**
  - [ ] Each Plan box is checked, and a fresh-context diff review cleared each step that touched
        code
  - [ ] The Validation block is green: you ran the commands bare and checked the EXIT CODES
  - [ ] You ran the full checks of each part that the change touches before the push. No hook in
        this repository runs them for you
  - [ ] The Evals answer is satisfied: if YES, the red→green eval is green
  - [ ] Each `## Behavior changes` row has its proof: a green test, an eval per the `## Evals` run
        strategy, or a manual check with its result in the row. No unlisted behavior change
        remains
  - [ ] Each path that this change orphaned is deleted, each one proven by a reference search
  - [ ] `git diff --stat` shows that no DO NOT CHANGE file changed
  - [ ] When `<spec-root>` is in the repository: the spec files are committed on the work branch,
        they hold no private data (`docs/specs/README.md`), and the PR body names the spec folder
- The PR body follows the "Send a change" part of `CONTRIBUTING.md`: what changed, how you tested
  it, and what you did not test.

## Escalating and de-escalating

- Mini discovery hits a full-tier routing signal (a schema change appears, a third milestone
  appears, the work needs a task graph): STOP, log it in the Decision Log, and start `superspec`.
  Keep the folder: `00-CONTEXT.md` stays as it is, and SPEC.md becomes discovery input.
- **Escalation is one-way. Do not go back and forth.** The Decision Log records the escalation, so
  `superspec` treats the routing call as made and SKIPS its downgrade question. Never route back to
  mini from there. The reverse move, a full target that gets smaller during discovery, is an offer
  that `superspec` makes on its own direct invocations. This skill does not decide it.
- If the implementation makes the plan wrong, fix the SPEC and run the Advisor gate again before
  you continue.

## Appendix — dex (optional, only for persistence across sessions)

A default mini needs no `dex` (a task-graph CLI). Create an epic ONLY when the execution spans
sessions, goes to another agent, or the user asks for durable tracking, and only when
`command -v dex` finds the CLI. Without it, the Plan boxes of SPEC.md are the record. Before you
script anything, run `dex --help` and `dex <cmd> --help` live. The CLI is the authority, and these
snippets (checked against v0.16.0) WILL eventually be out of date. Documented aliases:
`add`→`create`, `update`→`edit`, `done`→`complete`. There is no epic subcommand: an epic is a plain
parent task. `list` prints the tree by default (no flag needed). Bare `dex status` is the
dashboard.

```bash
dex create "<spec-name>" -d "Mini-spec epic. Source of truth: <spec-root>/<spec-name>/SPEC.md"
dex create "M1: <title>" --parent <epic> -d "Do SPEC.md step 1. <2-3 line summary>"
dex create "M2: <title>" --parent <epic> --blocked-by <m1-id> -d "Do SPEC.md step 2."
dex edit <id> --add-blocker <ids>          # add blockers after creation (--blocked-by works only on create)
dex done <id> -r "what shipped" -c <sha>   # done is the documented alias for complete
dex list --ready                           # where to continue in the next session
dex list --json                            # read the ids back for the parent and blocker flags above
```

The parent and blocker flags need ids. Read them back with `dex list --json` after you create the
tasks. The create output is not the documented way to get them.

Descriptions are POINTERS (title, 2 or 3 lines, and "see SPEC.md step N"). They are never copies of
the spec and never code blocks. Notes go in the description through `edit -d`. There is no note
flag. Sync goes one way: a spec change updates SPEC.md and only the affected pointers, and a
completed task checks its box in SPEC.md. A copy of the spec in dex doubles the work of each edit.

---

_superspec-mini: one spec, one gate, no drift surface._

Files in this skill

  • SKILL.md26.6 KB
  • scripts/spec-root.sh2.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.