Spec create
Add a single new spec/<topic>.md when a fresh concept, subsystem, or integration enters the project — OR add a pipeline-spec (HTML workflow walkthrough) at spec/pipelines/<topic>.html when the user passes --pipeline or asks for a "flow chart", "pipeline", "workflow diagram". Use when the user runs /adam:spec-create, /spec-create, or asks to "add a spec for X", "document the new <subsystem>", "create a spec covering <topic>", "we just added <X>, write its spec", "draw a pipeline for <flow>", "add a workflow walkthrough for <X>". Will refuse if spec-driven scaffolding (`spec/INDEX.md`, `CLAUDE.md`) is missing — points the user at /adam:setup instead.From its SKILL.md
npx -y skills add lkzppm/adam --skill spec-createAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.9 KB, as published. Nobody here has run it
spec-create
Add ONE new spec to the project's spec set, then re-weave the index (markdown specs) or refresh the viewer manifest (pipeline-specs).
Mode selection — markdown spec vs pipeline-spec
Inspect $ARGUMENTS for --pipeline (or interpret intent: "pipeline", "flow chart", "workflow walkthrough", "visual diagram of how X moves").
- Markdown spec (default): grounded in symbols, anchored to code, lives in
spec/<topic>.md, participates in the spec index + audit. Use the GitNexus preflight. Follow the rest of this file. - Pipeline-spec (
--pipeline): user-facing HTML walkthrough, lives inspec/pipelines/<topic>.html, exempt from spec-audit/spec-lint.Read${CLAUDE_PLUGIN_ROOT}/skills/spec-create/_pipeline-mode.mdand follow it instead of the markdown-spec process below. Without--pipeline, do NOT load that file.
Preconditions
spec/INDEX.mdmust exist. If it doesn't → tell the user to run/adam:setupfirst and stop.CLAUDE.mdmust contain a spec index table. If it doesn't → same.- The user must have specified (or implied) a topic. If unclear, ask.
Process — markdown spec (default)
-
Confirm the topic isn't already covered. Read every existing
spec/*.mddescription; if there's a clear match, propose updating that spec instead. -
Run the GitNexus preflight script to get a code-grounded briefing for the topic. Do not interpret these steps yourself; call the script.
bash ${CLAUDE_PLUGIN_ROOT}/scripts/tools/spec-preflight.sh "<topic>" [path-hint ...]The script:
- Verifies
gitnexusis on PATH and that the current repo is indexed. - Calls
gitnexus queryfor processes/definitions matching the topic. - Calls
gitnexus contexton the resulting symbols (plus any path hints the user passed). - Emits a single JSON briefing on stdout:
{topic, repo, summary, candidates, search_processes, path_hints}wherecandidates[]contains{name, uid, kind, file, line, incoming, outgoing}for each symbol.
Capture the JSON. If
status != "ok"(gitnexus missing or repo unindexed), surface the error and stop — tell the user to run/adam:setuporgitnexus analyze. Do not delegate to the agent without a briefing. - Verifies
-
Select a stack-specific seed so the new spec lands on the conventional layout for the project's framework. Do not interpret these steps yourself; call the script.
bash ${CLAUDE_PLUGIN_ROOT}/scripts/template/select-seed.sh "$PWD"The script inspects
package.json,pyproject.toml,requirements*.txt, andmanage.pyto detect the stack and emits JSON:{"stack": "<name>", "seed": "<absolute path>"}or{"stack": "unknown", "seed": null}. Currently shipped seeds:nextjs,hono,fastapi,django. Ifseedisnull, skip the seed-injection paragraph in step 4 and fall back to the unseeded prompt. -
Open the actual code the new spec will describe (use the briefing's
primary_filesas the read list) so the spec is grounded in real symbols/paths. -
Delegate to the
adamsub-agent, passing both the preflight briefing and (if available) the seed contents in one prompt:Add a new spec for
<topic>to this project. The GitNexus preflight identified the following code structure — treat it as canonical, do not re-grep symbols already resolved here:<briefing JSON from step 2>Use the following stack-specific seed as your structural starting point — keep its section layout (anchors block, How-to recipe, conventions list), replace the
<…>placeholders with concrete project values, and drop sections that don't apply. Do not invent sections that aren't in the seed; consistency across specs is part of how adam keeps the index readable.<contents of the seed file from step 3>Write
spec/<topic>.mdwith standard frontmatter (name, description, tags, updated, anchors). Use thecandidates[]list from the briefing to populate the anchors block — every entry there is a verifiedfile:line:symboltriple. Then add a row to bothspec/INDEX.mdand the spec table inCLAUDE.md, picking the correct reading-order position. Run the spec-lint MCP and token-count MCP to verify and to fill the token column.If
seed: null, drop the seed paragraph but keep the briefing paragraph. -
Surface the agent's report.
Frontmatter for the new spec
---
name: <topic>
description: <one-line summary, used by future spec-create/update calls for relevance checks>
tags: [<a few>]
updated: YYYY-MM-DD
---
Use today's date. Tags should be the 2–4 closest topical labels (e.g. [backend, fastapi, auth]).
Reading-order placement
In INDEX.md and the CLAUDE.md table:
overview.mdalways first.- Major subsystem specs (backend, frontend, infrastructure) before integration / detail specs.
- Integration specs (one per external service) grouped together, after subsystem specs.
- Workflow / flowchart specs last.
Output format
Show the agent's final report to the user. Then one line:
If this concept replaces or overlaps with an existing spec, run
/adam:spec-updateto reconcile.
(Pipeline-spec mode has its own follow-up line — see _pipeline-mode.md.)