一键导入
speckit-implement
Execute the implementation plan by processing and executing all tasks defined in tasks.md
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Execute the implementation plan by processing and executing all tasks defined in tasks.md
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.
Execute the implementation planning workflow using the plan template to generate design artifacts.
Create or update the feature specification from a natural language feature description.
Generate an actionable, dependency-ordered tasks.md for the feature based on available design artifacts.
| name | speckit-implement |
| description | Execute the implementation plan by processing and executing all tasks defined in tasks.md |
| compatibility | Requires spec-kit project structure with .specify/ directory |
| metadata | {"author":"github-spec-kit","source":"preset:companion-standard"} |
| user-invocable | true |
| disable-model-invocation | false |
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
Check for extension hooks (before implementation):
.specify/extensions.yml exists in the project root.hooks.before_implement keyenabled is explicitly false. Treat hooks without an enabled field as enabled by default.condition expressions:
condition field, or it is null/empty, treat the hook as executablecondition, skip the hook and leave condition evaluation to the HookExecutor implementation.) with hyphens (-). For example, speckit.git.commit → /speckit-git-commit.optional flag:
optional: true):
## Extension Hooks
**Optional Pre-Hook**: {extension}
Command: `/{command}`
Description: {description}
Prompt: {prompt}
To execute: `/{command}`
optional: false):
## Extension Hooks
**Automatic Pre-Hook**: {extension}
Executing: `/{command}`
EXECUTE_COMMAND: {command}
Wait for the result of the hook command before proceeding to the Outline.
.specify/extensions.yml does not exist, skip silentlyRun .specify/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks from repo root and parse FEATURE_DIR and AVAILABLE_DOCS list. All paths must be absolute. For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'''m Groot' (or double-quote if possible: "I'm Groot").
python3 .specify/extensions/companion/scripts/write-context.py --feature-dir FEATURE_DIR --step implement --status implementing --kind start --by extension
Check checklists status (if FEATURE_DIR/checklists/ exists):
Scan all checklist files in the checklists/ directory
For each checklist, count:
- [ ] or - [X] or - [x]- [X] or - [x]- [ ]Create a status table:
| Checklist | Total | Completed | Incomplete | Status |
|-----------|-------|-----------|------------|--------|
| ux.md | 12 | 12 | 0 | ✓ PASS |
| test.md | 8 | 5 | 3 | ✗ FAIL |
| security.md | 6 | 6 | 0 | ✓ PASS |
Calculate overall status:
If any checklist is incomplete:
If all checklists are complete:
Load and analyze the implementation context:
Project Setup Verification:
Detection & Creation Logic:
Check if the following command succeeds to determine if the repository is a git repo (create/verify .gitignore if so):
git rev-parse --git-dir 2>/dev/null
Check if Dockerfile* exists or Docker in plan.md → create/verify .dockerignore
Check if .eslintrc* exists → create/verify .eslintignore
Check if eslint.config.* exists → ensure the config's ignores entries cover required patterns
Check if .prettierrc* exists → create/verify .prettierignore
Check if .npmrc or package.json exists → create/verify .npmignore (if publishing)
Check if terraform files (*.tf) exist → create/verify .terraformignore
Check if .helmignore needed (helm charts present) → create/verify .helmignore
If ignore file already exists: Verify it contains essential patterns, append missing critical patterns only If ignore file missing: Create with full pattern set for detected technology
Common Patterns by Technology (from plan.md tech stack):
node_modules/, dist/, build/, *.log, .env*__pycache__/, *.pyc, .venv/, venv/, dist/, *.egg-info/target/, *.class, *.jar, .gradle/, build/bin/, obj/, *.user, *.suo, packages/*.exe, *.test, vendor/, *.out.bundle/, log/, tmp/, *.gem, vendor/bundle/vendor/, *.log, *.cache, *.envtarget/, debug/, release/, *.rs.bk, *.rlib, *.prof*, .idea/, *.log, .env*build/, out/, .gradle/, .idea/, *.class, *.jar, *.iml, *.log, .env*build/, bin/, obj/, out/, *.o, *.so, *.a, *.exe, *.dll, .idea/, *.log, .env*build/, bin/, obj/, out/, *.o, *.a, *.so, *.exe, *.dll, autom4te.cache/, config.status, config.log, .idea/, *.log, .env*.build/, DerivedData/, *.swiftpm/, Packages/.Rproj.user/, .Rhistory, .RData, .Ruserdata, *.Rproj, packrat/, renv/.DS_Store, Thumbs.db, *.tmp, *.swp, .vscode/, .idea/Tool-Specific Patterns:
node_modules/, .git/, Dockerfile*, .dockerignore, *.log*, .env*, coverage/node_modules/, dist/, build/, coverage/, *.min.jsnode_modules/, dist/, build/, coverage/, package-lock.json, yarn.lock, pnpm-lock.yaml.terraform/, *.tfstate*, *.tfvars, .terraform.lock.hcl*.secret.yaml, secrets/, .kube/, kubeconfig*, *.key, *.crtParse tasks.md structure and extract:
Execute implementation following the task plan:
Implementation execution rules:
Progress tracking and error handling:
Completion validation:
Note: This command assumes a complete task breakdown exists in tasks.md. If tasks are incomplete or missing, suggest running /speckit-tasks first to regenerate the task list.
.specify/extensions.yml exists in the project root.
hooks.after_implement keyenabled is explicitly false. Treat hooks without an enabled field as enabled by default.condition expressions:
condition field, or it is null/empty, treat the hook as executablecondition, skip the hook and leave condition evaluation to the HookExecutor implementation.) with hyphens (-). For example, speckit.git.commit → /speckit-git-commit.optional flag:
optional: true):
## Extension Hooks
**Optional Hook**: {extension}
Command: `/{command}`
Description: {description}
Prompt: {prompt}
To execute: `/{command}`
optional: false):
## Extension Hooks
**Automatic Hook**: {extension}
Executing: `/{command}`
EXECUTE_COMMAND: {command}
.specify/extensions.yml does not exist, skip silently.spec-context.json honestThese rules apply to every Companion profile command. The extension records lifecycle timing with its own scripts wherever it can; these rules keep anything you append consistent with that and accurate for any dispatcher (terminal, IDE chat, or the GUI). The model is finish-only: each task and each substep records a single finish event, and its duration is the gap to the previous finish (or the step's start). Never a start+complete pair for a task or substep — a pair stamped at one instant is what produces 0s ticks and bursts.
Never hand-edit .spec-context.json. Record every finish by running the writer script, never by editing the JSON file yourself — a hand-authored edit is what corrupts the file (a duplicated status key). The script stamps the real clock, writes atomically, and is idempotent. The commands below are the only way you touch timing.
Self-close — but not specify or implement. When your own work for plan, tasks, clarify, or analyze ends, record the step finish (feature dir from .specify/feature.json):
python3 .specify/extensions/companion/scripts/write-context.py --feature-dir <feature_dir> --step <this step> --finish --by ai
--finish appends a single step-level complete and touches nothing else (it leaves status/currentStep to the lifecycle hooks). Do NOT self-close specify or implement: the extension closes those itself (specify from its own command, implement from the end-of-step hook), so an ai complete there would duplicate it.
Substeps — one finish each, via the script. For each substep boundary (plan: research, design; tasks: generate), the moment that substep ends, run:
python3 .specify/extensions/companion/scripts/write-context.py --feature-dir <feature_dir> --step <step> --substep <name> --finish --by ai
One call per substep, each stamped with its own real clock at the moment it finishes — never two substeps in one batch, never a separate start. The delta between consecutive finishes is each substep's duration.
Implement — finishing a task is logging it (finish-only). Recording a task's finish is the closing action of that task, done the instant its work is complete and before you start the next one — not a bookkeeping pass you batch at the end of a phase. The closing action is a single append (feature dir from .specify/feature.json):
python3 .specify/extensions/companion/scripts/write-context.py --feature-dir <feature_dir> --task <TaskID> --kind complete --by ai --did "<one-line summary of what this task did>" --files "<comma,separated,files,touched>" --append
--append writes one line to .spec-context.events.jsonl and does not read or rewrite the shared .spec-context.json, so it never hits the "read the file first" retry and parallel workers can each append their own finish at the same time without contending — the line carries its own real timestamp (date -u is stamped by the script). The --did/--files flags ride along so the Activity panel's Tasks card is populated from the script. Do NOT hand-edit the - [ ] checkbox in tasks.md — the script owns it: materialize flips it to - [x] from your appended finish, so a fanned-out subagent only appends and never touches the shared tasks.md. Do NOT hand-author per-task JSON and do NOT write a per-task start.
Then fold the appended lines into .spec-context.json — run this once per wave (after the wave reconciles) and again when the step ends:
python3 .specify/extensions/companion/scripts/write-context.py --feature-dir <feature_dir> --materialize
--materialize is the one read-modify-write: it folds the finishes into the panel and checks off the matching tasks.md boxes for every journaled task, idempotently (re-folding never double-counts), so running it per wave keeps the GUI current without re-serializing the work. The end-of-step hook is a backstop that materializes anything you didn't fold and fills any task you didn't journal. What's trustworthy here is the per-task summary (did/files) and the order tasks completed, plus the step-level start→complete span, which the scripts stamp exactly. The per-task timestamps are best-effort — a single agent logs a task right after building it, so they reflect when you recorded it, not a precisely measured duration; that's fine, the summaries are the point. Still, record each finish as you go, wave by wave rather than dumping every task at the very end — a per-wave cadence keeps the panel live and the ordering true.
Never write the next step's start. Only the next command appends the next step's start entry; writing it here makes the viewer render a phantom "Generating …".