Skip to content
Back to skills

Superspec

ASecurity

Full-tier spec-driven development with optional dex task tracking. Routed discovery, versioned spec artifacts, a blocking Advisor gate and validated subagent execution. Use it proactively to plan, specify and implement large or complex features, refactors, migrations and work with several milestones. Bounded but consequential work goes to superspec-mini instead.

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

Works with

  • claude code
  • cli

Security analysis

A100/100

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

Scanned November 29, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Superspec?

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

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

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
description: Full-tier spec-driven development with optional dex task tracking. Routed discovery, versioned spec artifacts, a blocking Advisor gate and validated subagent execution. Use it proactively to plan, specify and implement large or complex features, refactors, migrations and work with several milestones. Bounded but consequential work goes to superspec-mini instead.
allowed-tools:
  - Bash(${CLAUDE_SKILL_DIR}/scripts/spec-root.sh)
---

# superspec

The full tier, for work where a wrong plan costs a lot: six phases, one blocking Advisor gate, and
reference files that you read only in the phase that needs them. **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.** A command can go in an artifact 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`). Run
gate commands bare and read the EXIT CODE: a pipe to `tail` reports the status of `tail`. Use the
companion skills at the marked points and do not restate them: `gather-context` (Phase 1) and
`asd-ste100` (load it before you write any spec prose: `00-CONTEXT.md`, `03-DISCOVERY.md`,
`04-SPEC.md`, `02-CHANGELOG.md`, the TLDR and the Advisor write-ups). Repository rules:
`AGENTS.md` (Claude Code reads it as `CLAUDE.md`) and `CONTRIBUTING.md`.

## Spec principles: simplicity, and its counterweight

- **Do not over-engineer.** Be thorough in verification, but prefer the SIMPLEST design that meets
  the acceptance criteria: no speculative abstraction, configuration surface or boilerplate when a
  simple alternative exists. A credible simpler counter-design is grounds for an Advisor REJECT.
- **Scope expansion is legitimate when a NAMED signal motivates it:** hot-path code (AI prompts,
  sign-in and access checks, code that writes or deletes stored data, shared contracts), a possible
  bug or an unexpected behavior change, an unhandled edge case, or an antipattern in touched code.
  Never act on it silently and never drop it silently. Propose it to the user (in Claude Code,
  with `AskUserQuestion`): current scope against expanded scope, what each one catches and costs,
  with your recommendation marked. Log the decision in `02-CHANGELOG.md`.
- **Dead code is part of the change.** When the work orphans a path, prove it with a reference
  search, then delete it in the SAME change.

## Phase 0 — Route

`superspec-mini` owns the routing table. `.agents/skills/superspec-mini/SKILL.md` is the only
authority and the only copy. Score the work against it, and never restate its signals. The first
score is PROVISIONAL, because you cannot count files and milestones before the investigation.
Score again after `gather-context` and after discovery, and log changes in `02-CHANGELOG.md`. Once
Phase 2 artifacts exist, stay in the full tier.

- **Direct `superspec` invocation:** first look for a Decision Log escalation entry in
  `<spec-root>/<spec-name>/SPEC.md`. If it is there, this run IS a mini escalation (next bullet).
  Otherwise score the table when `00-CONTEXT.md` exists. A full-tier score continues with NO
  routing question: the question budget belongs to substantive discovery questions. Only when the
  score says that the work does NOT benefit from the full process (mini or a plan alone) offer the
  downgrade to the user, with your recommendation marked. Never downgrade silently. Log it in
  `02-CHANGELOG.md`.
- **Entered through a mini escalation** (that Decision Log entry): SKIP the downgrade question.
  Routing is decided and logged. It goes one way only. Keep `00-CONTEXT.md` as it is. The mini
  `SPEC.md` becomes discovery input.

## Phase 1 — Discovery

`<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.

**Create the spec folder EARLY.**

- **`<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
  `<spec-root>/<spec-name>/` survives the creation of a worktree. Nothing is copied and nothing
  waits. Do not commit or publish these files unless the user asks.

Derive `<spec-name>`, create the folder, and write **`00-INITIAL_PROMPT.md` first**: the verbatim
request of the user, 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. Then start `gather-context`
immediately, so that it writes into the folder. 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.

**Freshness gate, before discovery begins**, and again before final validation when the work
spanned sessions. On failure, rebase onto `origin/main` or create a fresh worktree BEFORE you
investigate. In a fork, use the remote of the upstream repository in place of `origin`.

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

1. **`gather-context`** on the target. Pass `<spec-root>/<spec-name>/00-CONTEXT.md` explicitly,
   because its default path is different. The file is a discovery INPUT, so no "no files yet" gate
   applies to it. Work with no issue and no PR skips this step.
2. **Code exploration.** Use a language server (hover, find references) when your agent has one.
   Otherwise search with `rg`, and say so in `03-DISCOVERY.md`. Two checks 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.
3. **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 `03-DISCOVERY.md`.
4. **Map each behavior change:** today's `file:line`, its consumers, its data in flight, and its
   reach (step 3). `references/WORKFLOW.md` §2.2 defines a behavior, each column and the Proof
   rules. Step 6 writes the map to `03-DISCOVERY.md`. Phase 2 copies it to `04-SPEC.md`.
5. **Questions: conditional, never ceremonial.** If real ambiguity survives the context, ask the
   user (3 or 4 substantive questions, options with trade-offs). Otherwise record "no open
   questions" and continue. Do not make up questions.
6. Write **`03-DISCOVERY.md`**: findings with `file:line` receipts, risks, edge cases, answers.

**Spec folder name.** Derive `<spec-name>` once, by the first rule that applies. A name never
contains `/` (a slash silently nests a folder) and never has a numbered prefix (counters from
different branches collide): (1) the branch name minus its conventional type segment, with each
other `/` changed to `-` (`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.

**Artifacts.** All of them go in `<spec-root>/<spec-name>/`. There is no completion-marker file.
The finished epic (in `05-EXEC.md`, or `dex done <epic> -r "..."` when you use dex) is the durable
record.

| File                   | Phase | Purpose                                    | Required                  |
| ---------------------- | ----- | ------------------------------------------ | ------------------------- |
| `00-INITIAL_PROMPT.md` | 1     | Verbatim user request and dated steering   | Yes                       |
| `00-CONTEXT.md`        | 1     | `gather-context` output, a discovery input | For an issue or PR target |
| `03-DISCOVERY.md`      | 1     | Research, receipts, risks, user answers    | Yes                       |
| `01-TLDR.md`           | 2     | Summary for readers who do not read code   | Yes                       |
| `02-CHANGELOG.md`      | 2+    | Decision log (dates only)                  | Yes                       |
| `04-SPEC.md`           | 2     | Technical implementation spec              | Yes                       |
| `05-EXEC.md`           | 2     | Execution plan for the epic                | Yes                       |

When `<spec-root>` is in the repository, commit the folder on the work branch, and name it in the
body of each PR of the epic. Commit it again each time it changes.

## Phase 2 — Specification and decomposition

Read `references/tldr-template.md` and `references/changelog-template.md` here. For the
decomposition, read `references/task-templates.md`, and `references/dex-integration.md` when you
use dex. `04-SPEC.md` holds **Goal / Non-goals**, **Milestones** (each with acceptance criteria),
**Behavior changes** (one row for each changed behavior, with its proof, see
`references/WORKFLOW.md` §2.2), **DO NOT CHANGE** (what must stay as it is, and why each entry is
load-bearing), an **Evals** row (Phase 5), and **Rollback**. Write `01-TLDR.md` and start
`02-CHANGELOG.md`. `05-EXEC.md` is the execution plan for the epic: the order of the milestones,
what each one needs before it can start, and the validation that each one must pass.

**One sizing rule, everywhere:** a task is a coherent deliverable that you can validate on its own,
typically 1 to 4 hours and up to about 5 files. Split it when it spans more than about 5 files or
more than one subsystem. Never split by line count. Build the task graph last: an epic and one task
for each milestone, with blockers only for real dependencies. **Descriptions are POINTERS**: a
title, 2 or 3 lines, and `Read: <spec-root>/<spec-name>/04-SPEC.md §M2`. Never put spec prose or code in a task. Sync goes
one way: first the spec, then the pointer. The task table of `05-EXEC.md` is the task graph. When
`command -v dex` finds the `dex` CLI, you can keep the same graph in dex too.

## Phase 3 — Advisor gate (BLOCKING)

**Implement nothing before APPROVE.** Self-review does not catch these failures: a spec that orders
the removal of a "dead" branch that is a load-bearing check, an "unused" export with live callers,
and headline evidence that proves the opposite of its claim. Start a 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 Advisors with different lenses when the
spec deletes code, touches a sign-in or access check, touches code that writes or deletes stored
data, or changes AI prompts. Give each Advisor the spec folder path. The charge:

- **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 milestones in order. After each one, would the checks still pass? Search for consumers
  of each deleted symbol in later milestones and in other parts of the repository. Confirm that DO
  NOT CHANGE covers the load-bearing neighbors, that each validation command exists where the spec
  says, and that the evidence supports the TLDR.
- **Behavior changes:** read the code that each milestone 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:** 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.
- Return exactly `VERDICT: APPROVE` or `VERDICT: REJECT`, then numbered findings:
  claim → evidence (`file:line`) → severity.

Log each round in `02-CHANGELOG.md` (`YYYY-MM-DD — Advisor round N: <verdict> — <reason>`). Revise,
then run the gate again with a FRESH Advisor. A later material scope change runs this gate again.

## Phase 4 — Execution

- **Start tasks by readiness, not by wave** (read `references/WORKFLOW.md` and
  `references/best-practices.md` when you need them). A task is ready when each of its blockers is
  done: start it, implement it, validate it, mark it done, and look for the next ready task (in
  the task table of `05-EXEC.md`, or with `dex list --ready`). There is no parallel team mode.
- **Right-size the model of each subagent.** A subagent that FOLLOWS the 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 it
  decide, or does it follow?" When you are not sure, use the stronger model.
- Each dispatch prompt says: `04-SPEC.md` is the source of truth, read it first. Here is the
  §section and the §Behavior changes rows of this milestone. Here is the validation command that
  must exit 0. Commit at coherent boundaries, as the "Send a change" part of `CONTRIBUTING.md`
  says. Delete what this change orphaned, in this change, proven by a reference search.
- Before each PR is ready for review, run the behavior diff review of Phase 5 on that PR.

## Phase 5 — Validation and convergence

Run the checks of each part that the change touches. The table in `CONTRIBUTING.md` is the
authority. For example:

```bash
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. Confirm that the output
shows at least one test that ran and passed. No hook in this repository runs the checks for you,
so run the full checks of each affected part before you push.

**The eval question is required, and `04-SPEC.md` answers it:** if the PREMISE of the change is a
claim about model output, the answer is YES. Name the scenario. If NO, write one line that says
why. When evals need to be created, edited or removed, ask the user for the run strategy
(recommendation marked): red→green live runs during the fix, a live run as the completion gate, or
write the eval now and leave the runs to the user. Live runs call real models and cost money. In this
repository, the eval harness is `pnpm -C app eval`. Read `app/server/evals/README.md` first.
`pnpm -C app eval --list` lists the scenarios with no credentials and no network. A live run
(`pnpm -C app eval <scenario> --model <model>`) calls a real model. It also reads and changes the install that it targets, by default the
main install with the real history of the user: it reads and summarizes sessions, adds tags, notes
and dashboards, and creates a `zz_eval` database. Its cleanup removes most of these. Start a live
run only after the user agrees to the run and to its target install. Record only PASS or FAIL in
spec files, never the answers of the model.

**Behavior diff review: a gate, not a self-report.** Run it before each PR of the epic is ready
for review. Give a fresh-context reviewer subagent the diff of the PR (`git diff <base>...HEAD` or
`gh pr diff <n>`), the `04-SPEC.md` path, and the milestones that this PR delivers. The reviewer is
not the implementer and not the author of the spec. It returns `CLEAN`, or a numbered list with
`file:line` of:

- Each behavior change in the diff that §Behavior changes does not list.
- Each row of the milestones of this PR whose proof is missing.

Log its verdict in `02-CHANGELOG.md`. Fix each item, then run the review again with a fresh
reviewer. For an unlisted change, revert it. Or propose to keep it, as the scope-expansion rule
says. On a yes, add its row with a proof and log it. When the kept row is a rule, a limit or a new
behavior, run Phase 3 again. To keep a changed rule or limit, restore the old rule first. Then
follow the Proof rules. Converge before done:

- [ ] Work that spanned sessions: `git fetch origin` and
      `git merge-base --is-ancestor origin/main HEAD` exit 0
- [ ] Each milestone met its acceptance criteria, and its validation command exited 0
- [ ] The behavior diff review returned `CLEAN` on each PR, and its verdict is logged
- [ ] `git diff --stat` shows that no DO NOT CHANGE file changed. Orphaned paths are deleted and
      proven
- [ ] `04-SPEC.md` agrees with the shipped code (a spec that is not true is of no use)
- [ ] When `<spec-root>` is in the repository: the spec folder is committed on the work branch, it
      holds no private data (`docs/specs/README.md`), and each PR body names it
- [ ] The epic is done in `05-EXEC.md` (and `dex done <epic> -r "<shipped>" -c <sha>` when you use
      dex)

Each PR body follows the "Send a change" part of `CONTRIBUTING.md`: what changed, how you tested
it, and what you did not test.

Optional, for Claude Code: a Stop hook can block the end of a turn until the check of the step
passes. See `references/hooks-recipe.md`.

## dex quick reference (optional)

`dex` is an optional task-graph CLI. Use it only when `command -v dex` finds it. Checked against
v0.16.0. The CLI is the authority, and these snippets WILL eventually be out of date, so run
`dex --help` and `dex <cmd> --help` live before you script anything.

```bash
dex create "<spec-name>" -d "Epic. Source of truth: <spec-root>/<spec-name>/04-SPEC.md"
dex create "M2: <title>" --parent <epic> --blocked-by <m1-id> -d "Read: <spec-root>/<spec-name>/04-SPEC.md §M2"
dex edit <id> --add-blocker <ids>   # add blockers after creation (--blocked-by works only on create)
dex list --ready                    # what is ready now. Use show <id> --full for detail
dex start <id> && dex done <id> -r "<what shipped>" -c <sha>
```

Aliases in the help: `add` → `create`, `update` → `edit`, `done` → `complete`. Bare `dex status` is
the dashboard. There is no epic subcommand (an epic is a plain parent task) and no resume
subcommand (`dex list --ready` shows where to continue). `list` shows the tree by default. Notes go
in the description through `edit -d`.

Files in this skill

  • SKILL.md19.4 KB
  • references/WORKFLOW.md26.6 KB
  • references/best-practices.md5.3 KB
  • references/changelog-template.md2 KB
  • references/dex-integration.md7.2 KB
  • references/hooks-recipe.md4 KB
  • references/task-templates.md8.4 KB
  • references/tldr-template.md3.8 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.