一键导入
to-spec
Capture load-bearing technical decisions into a standalone `.task/spec/<slug>.md` — Decision/Rationale/Constrains sections cited via `Spec:`.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Capture load-bearing technical decisions into a standalone `.task/spec/<slug>.md` — Decision/Rationale/Constrains sections cited via `Spec:`.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Fan an approved `.task/roadmap/<slug>.md` out to a dynamic Workflow — parallel planning, serialized implementation, dependency-ordered waves.
Capture a multi-task initiative into `.task/roadmap/<slug>.md` — a phase-grouped backlog of ready-to-pick-up items.
Interrogate a plan or decision one question at a time before capture, keeping a decision-plus-rationale ledger, then route to the right capture skill.
Capture the chat into `.task/task/<slug>.md` with `## Description` plus `## Plan` (Goal/Touches/Logic) — the deepest one-task capture.
Capture the current chat discussion into a task, no implementation plan
Self-audit this skills repo against CLAUDE.md invariants, the v3 artifact contract, and README/CLAUDE.md/docs sync via three parallel read-only subagents. Local meta-skill — independent of the /task:* pipeline.
| name | to-spec |
| description | Capture load-bearing technical decisions into a standalone `.task/spec/<slug>.md` — Decision/Rationale/Constrains sections cited via `Spec:`. |
| disable-model-invocation | true |
| user-invocable | true |
Fix load-bearing technical decisions — a protocol, a cross-cutting data shape, a "we picked X over Y because…" whose reasoning wouldn't survive re-derivation — into .task/spec/<slug>.md. Unlike to-task / to-plan / to-roadmap, a spec does not decompose work; it pins the decisions that work must honor. A task or roadmap references it via a Spec: <slug> header, and the executing session reads it as a fixed anchor (per the ## Execution block). One spec may be cited by many tasks and roadmaps, and can be captured before any exist.
Input: $ARGUMENTS — a rough description of the decision area, or a reference back to a prior discussion in this conversation ("write a spec from what we settled").
Format contract: docs/contract.md § Spec file format is the single source of truth for the output structure. This file describes the authoring flow that produces it.
Run bash "${CLAUDE_PLUGIN_ROOT}/skills/validate/validate.sh" all.
config.md not found → /task:to-spec is intake-capable: run the inline setup gate exactly as skills/to-task/SKILL.md Step 0 does (detect stack → one AskUserQuestion confirmation, Accept / Edit / Decline chips → write config.md + git config --local task.root + exclude .task), then re-run validate.sh all. If config is now present → continue. If the user declined setup → report "config.md not written. → Next: run /task:to-spec again when ready" and stop.to-task Step 0 and roadmap-to-workflow, and validate.sh is advisory, never config-malformed — it doesn't inspect config.md content). Only a missing config.md (exit 2, handled above) hard-stops./task:to-task or /task:to-plan instead.(The slug-collision check runs at save time, once the slug is derived — see Step 4.)
Read .task/config/config.md (Language, conventions), CLAUDE.md if present, and list .task/spec/* — match existing structural style and avoid duplicating a decision an existing spec already pins. List the docs/ top level and skim entry points if any exist. Open source files only as far as needed to state a decision accurately — this is decision capture, not implementation.
Branch first. The file is written from decisions settled here — where they come from matters:
$ARGUMENTS reads as a handle for prior discussion. → Go to Step 2H.On the fence, prefer harvest — a false positive costs one extra recap the user skims; a false negative silently drops reasoning.
Comb the prior conversation and print, as message text in your reply (chat-only, never written to a file; heading skeleton English, prose in config language):
## Spec — Decision Inventory
{Writing this spec from our discussion. Before I save the file, here is
every technical decision I captured with its load-bearing reasoning —
confirm nothing dropped or misstated.}
### Decisions locked so far
1. {decision at full specificity} — because {the load-bearing reason}
2. {...}
### Open forks (not yet decided)
- {unresolved technical question}
### Coverage caveat
{Only if part of the discussion is out of context. Omit otherwise.}
This inventory is a recap of decisions (with their reasoning) the user already reached in the discussion: print it, no confirmation chip. Then proceed — if open forks remain, resolve them first, then go to Step 3 (draft). If the recap misreads, drops, or misstates a decision or its rationale, the user says so in chat — correct it and reprint before drafting.
For a decision area with no prior discussion, work each fork with the user before drafting. For each load-bearing choice, lay out the real options with a recommendation:
## Spec — Round 1
### Decision area as I understand it
{2–4 sentences.}
### Fork: {the choice to make}
**A) {option}** — {sketch}. Pros / Cons: {...}
**B) {alternative}** — {sketch}. Pros / Cons: {...}
### My recommendation
{a real opinion, not a hedge}
### What I need from you
{One focused question on the most load-bearing fork.}
Offer ≥2 options per fork (or justify why only one is viable). Iterate (Round N) until decisions are settled, then reprint the full list as message text — a recap: print it, no confirmation chip. If a decision or its rationale is wrong, the user corrects it in chat before drafting.
Topics the user explicitly said to skip stay skipped.
Once the decision list is confirmed, draft per docs/contract.md § Spec file format: a # Spec: <Title> line, a blockquote purpose header, then one numbered ## N. <title> section per decision:
Keep one decision per section. Before saving, a quick self-check, fixed inline:
## N. section stands alone — a reader who hasn't seen this chat understands the decision and why.TBD, TODO, ???, fill in).Spec references → <slug> §N citations depend on stable numbering.Write the file directly — no in-chat preview, no confirmation prompt; the chat discussion (recapped in Step 2) was the review, and Step 5's digest lets the user judge whether to open the file.
event-envelope, auth-token-model). Its own identity — independent of any roadmap..task/spec/ if missing. If .task/spec/<slug>.md already exists → stop and pose an AskUserQuestion (Overwrite / Pick different slug). Never silently overwrite..task/spec/<slug>.md with the full content.Spec: header into a task or roadmap is the job of to-task / to-plan / to-roadmap when they reference this spec.bash "${CLAUDE_PLUGIN_ROOT}/skills/validate/validate.sh" spec <slug> — surface any WARN/ERROR in the Step 5 digest; only a config-precondition failure (exit 2) hard-stops.Print the structural digest of what was written (convention (b)) as message text. A spec is read by the executing session as a fixed anchor, so list every pin in full — this is the user's one glance to catch a misstated decision:
Wrote `.task/spec/<slug>.md`
# Spec: {Title}
Pins:
- 1. {decision, one line}
- 2. {…}
validate: {OK — 0 errors, N warning(s) | the FAIL lines}
The file is already written — to change any pin, just say so. Then close with the handoff footer (convention (a), flag-free): → Next: \/task:to-plan` a task that relies on this spec — or add a `Spec: ` header to an existing roadmap or task.`
## Plan, a step list, file paths with line numbers, or implementation code — a spec pins decisions, it does not plan or implement.### Outcomes / ### Acceptance criteria — those are not spec material..task/spec/<slug>.md — stamping a Spec: header onto a task or roadmap is the referencing skill's job, never this one's..task/spec/<slug>.md — surface the collision and let the user choose.