一键导入
spec-implement
Implements a spec completely end-to-end including all code, tests, and verifications. Follows a strict read-understand-implement-verify workflow.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Implements a spec completely end-to-end including all code, tests, and verifications. Follows a strict read-understand-implement-verify workflow.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
StagedSpec: Guides iterative development and assessment of project specs in /specs with an architecture index, staged specs, implemented status tracking, and feature documentation. Use when creating, refining, or checking specs, architecture.md, stage files, features.md, security.md, or testing.md.
Bootstraps the StagedSpec framework in a new project: creates the /specs folder, guardrail documents (intent.md, security.md, testing.md), architecture.md index, optional features.md for existing code, and optional initial stage specs. Use when a project has no /specs folder or is missing guardrail documents.
Audits specs marked as Implemented in specs/architecture.md against the actual codebase. Verifies feature implementation, tests, and verification items end-to-end, reporting gaps between specified and built behavior.
Derives a Project Intent Summary from an existing /specs folder that has stages but no intent.md. Analyzes all documents in /specs and produces specs/intent.md, then adds an intent summary paragraph to specs/architecture.md. Use when a project already has specs but is missing intent.md — for new projects, use spec_init instead.
Reviews a single stage spec for implementation readiness. Uses the spec_development skill's single_stage_assessment reference for detailed assessment guidance. Produces one direct assessment from the current agent.
Updates specs/features.md to reflect actual implemented behavior by inspecting the current codebase end-to-end.
| name | spec_implement |
| description | Implements a spec completely end-to-end including all code, tests, and verifications. Follows a strict read-understand-implement-verify workflow. |
<task_block> StagedSpec — Spec Implementer
Implement this spec completely end-to-end, including all tests and verifications. Read the spec thoroughly — understand desired behavior, implementation steps, dependencies, and scope boundary before writing code. Read the guardrail documents — load `specs/security.md` and `specs/testing.md` and extract the constraints that apply to this stage (security requirements, trust boundaries, secrets handling, test levels, framework choices, coverage policy, CI expectations). Hold these as project-wide defaults that shape every implementation and test decision below. Understand the existing codebase — read the code that is already implemented, including existing tests. This is your foundation: understand the patterns, conventions, and architecture in use and extend them consistently as you add new code, so new work builds on the existing shape of the codebase. Implement the code — follow the implementation steps in order, building on top of what already exists. Respect the scope boundary: implement everything inside scope, skip everything outside it. Apply the security constraints loaded from `specs/security.md` to every code path touched by this stage. Name every code artifact — files, modules, classes, functions, variables, and tests — after the feature or observable behavior it represents, so each identifier reads as the behavior it delivers. Reserve stage labels (stage numbers, stage short-names, the literal word "stage") for spec files under `specs/`; keep production code and test code feature-oriented, deriving test function names from the feature-oriented verification topic heading. Implement tests and verification — map each verification topic in the spec's "Tests and verification" section to one test function, using a feature-oriented test name derived from the topic heading. The behavioral checks listed under each topic are the assertions that test must contain. Treat every listed topic as a required deliverable. Align test level, framework choice, and structure with `specs/testing.md` so new tests match the project's established testing strategy. Cross-check against the spec — walk through each item in "Desired behavior" and each verification topic in "Tests and verification" and confirm the implementation covers it. Resolve any gap before proceeding. Run all tests — execute the full test suite (existing tests plus new ones). Fix failures until the suite passes cleanly with no errors or warnings. Update documentation — record newly implemented behavior in `specs/features.md` in behavior-first form, and synchronize status in `specs/architecture.md` and the stage file.