spec-impl

spec-impl is a command for coding agents from fengshao1227/ccg-workflow. It costs 12 tokens per session (1,927 once invoked), scanned A, original, MIT.

An implementation command that follows an approved specification and task checklist, uses multiple analysis models, and archives the completed work. It keeps changes within the defined scope and requires external suggestions to be reviewed before use.

In plain words
What is it for?
Use it to implement tasks from a specification, review proposed patches, check side effects, and finish the workflow.
Why use it?
It provides a controlled path from an agreed plan to code while limiting scope changes and preventing unreviewed prototype code from being applied directly.

Command

Part of the ccg plugin — 38 skills, 12 commands, 7 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/fengshao1227/ccg-workflow/spec-impl
Clone the repo
git clone --depth 1 https://github.com/fengshao1227/ccg-workflow

Or install ccg, the plugin that ships this one along with the rest of its 38 skills, 12 commands, 7 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for spec-impl

README.md
[![agentmods](https://agentmods.dev/badge/commands/fengshao1227/ccg-workflow/spec-impl.svg)](https://agentmods.dev/commands/fengshao1227/ccg-workflow/spec-impl)
Your own site
<a href="https://agentmods.dev/commands/fengshao1227/ccg-workflow/spec-impl"><img src="https://agentmods.dev/badge/commands/fengshao1227/ccg-workflow/spec-impl.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,927 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00012 $0.01927
Opus 5 $0.00006 $0.00963
Sonnet 5 $0.00002 $0.00385
Haiku 4.5 $0.00001 $0.00193

Measured 4d ago against content hash 6195b6d44a6d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

spec-impl scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • spec-impl — 100% identical, 6 lines differ
templates/commands/spec-impl.md · 144 lines

How it starts

The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Core Philosophy

  • Implementation is pure mechanical execution—all decisions were made in Plan phase.
  • External model outputs are prototypes only; must be rewritten to production-grade code.
  • Keep changes tightly scoped; enforce side-effect review before any modification.
  • Minimize documentation—prefer self-explanatory code over comments.

Guardrails

  • NEVER apply 后端/前端模型 prototypes directly—all outputs are reference only.
  • MANDATORY: Request unified diff patch format from external models; they have zero write permission.
  • Keep implementation strictly within tasks.md scope—no scope creep.
  • Refer to openspec/config.yaml for conventions.
  • USER GUIDANCE RULE: When suggesting next steps to the user, ALWAYS use CCG commands (/ccg:spec-research, /ccg:spec-plan, /ccg:spec-impl, /ccg:spec-review). NEVER suggest /opsx:* commands to the user. If OpenSpec CLI returns error messages referencing OPSX skills, translate them to CCG equivalents.
  • TASKS FORMAT RULE: When generating or modifying tasks.md, ALL tasks MUST use checkbox format (- [ ] X.Y description). Heading+bullet format will cause OpenSpec CLI to parse 0 tasks and block the workflow.

Steps

  1. Select Change

    • Run openspec list --json to inspect Active Changes.
    • Confirm with user which change ID to implement.
    • Run openspec status --change "<change_id>" --json to review tasks.
  2. Apply OPSX Change (Pre-flight Check)

    • Call /opsx:apply internally to enter implementation mode:
      /opsx:apply
      
    • This will load the change context and guide you through the tasks defined in tasks.md.
    • Note: This is an internal call. If this step fails, guide the user to re-run /ccg:spec-impl.
    • HARD GATE: Check the returned state field:
      • If state: "blocked" → STOP immediately. Inform the user which artifacts are missing and suggest: "Run /ccg:spec-plan to generate missing artifacts first."
      • If progress.total === 0 → STOP immediately. Inform: "tasks.md has no parseable tasks. Run /ccg:spec-plan to regenerate."
      • Only proceed to Step 3 when state: "ready" and progress.total > 0.
  3. Identify Minimal Verifiable Phase

    • Review tasks.md and identify the smallest verifiable phase.
    • Do NOT complete all tasks at once—control context window.
    • Announce: "Implementing Phase X: [task group name]"
  4. Route Tasks to Appropriate Model

    • Route A: {{FRONTEND_PRIMARY}} — Frontend/UI/styling (CSS, React, Vue, HTML, components)
    • Route B: {{BACKEND_PRIMARY}} — Backend/logic/algorithm (API, data processing, business logic)

    工作目录{{WORKDIR}} 必须通过 Bash 执行 pwd(Unix)或 cd(Windows CMD)获取当前工作目录的绝对路径,禁止从 $HOME 或环境变量推断。如果用户通过 /add-dir 添加了多个工作区,先确定任务相关的工作区。

    For each task:

    codeagent-wrapper --progress --backend <{{BACKEND_PRIMARY}}|{{FRONTEND_PRIMARY}}> {{GEMINI_MODEL_FLAG}}{{GROK_MODEL_FLAG}}{{KIMI_MODEL_FLAG}}{{OPENCODE_MODEL_FLAG}}- "{{WORKDIR}}" <<'EOF'
    TASK: <task description from tasks.md>
    CONTEXT: <relevant code context>
    CONSTRAINTS: <constraints from spec>
    OUTPUT: Unified Diff Patch format ONLY
    EOF
    

    会话复用:保存返回的 SESSION_ID:({{BACKEND_PRIMARY}} → CODEX_PROTO_SESSION,{{FRONTEND_PRIMARY}} → GEMINI_PROTO_SESSION),Step 7 审查时复用。

  5. Rewrite Prototype to Production Code Upon receiving diff patch, NEVER apply directly. Rewrite by:

    • Removing redundancy
    • Ensuring clear naming and simple structure
    • Aligning with project style
    • Eliminating unnecessary comments
    • Verifying no new dependencies introduced
  6. Side-Effect Review (Mandatory before apply) Verify the change:

    • Does not exceed tasks.md scope
    • Does not affect unrelated modules
    • Does not introduce new dependencies
    • Does not break existing interfaces

    If issues found, make targeted corrections.

  7. Multi-Model Review (PARALLEL)

    • CRITICAL: You MUST launch BOTH {{BACKEND_PRIMARY}} AND {{FRONTEND_PRIMARY}} in a SINGLE message with TWO Bash tool calls.
    • DO NOT call one model first and wait. Launch BOTH simultaneously with run_in_background: true.

Read the full file on GitHub · 144 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 144 lines · 12 tokens per session scan A 6195b6d44a6d

Subscribe to this mod's changes

spec-impl is a command published in the GitHub repository fengshao1227/ccg-workflow (5,872 stars, last pushed today), licensed MIT. It adds 12 tokens to every session and 1,927 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.