code-design
Create a high-quality code design document through an iterative research/design/audit workflow
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Create a high-quality code design document through an iterative research/design/audit workflow
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Create a researched, durable, approval-gated goal contract whose verification tools, repository-vault authentication, exact proof steps, rollout safety, and evidence lifecycle are ready before execution. Use when the user asks to set, create, refine, save, or verify a goal; asks whether an agent has everything needed to prove completion; wants a proof-driven alternative to a raw `/goal`; or explicitly invokes `$verify-goal`.
Relentlessly interview the user in dependency-aware batches to sharpen a plan, decision, design, idea, codebase change, or bug fix. Use when the user wants to get grilled, investigate a bug from a ticket or screenshots, pass unfinished grilling to a teammate, or pick it up from a PR. Begin each session by choosing native dialogs or one full text batch, then Sideshow or experimental Grill Visuals for live diagrams. In repositories, inspect current behavior, run a mandatory gap and blast-radius pass, and maintain durable decision docs as answers settle.
Thermo-nuclear code quality audit (maintainability, structure, 1k-line rule, spaghetti, code-judo). Invoked via Task after a parent gathers diff and file contents. Loads the rubric from the `thermo-nuclear-code-quality-review` skill in the cursor-team-kit plugin.
Validate your code changes through the no-mistakes pipeline - automated code review, tests, lint, docs, push, PR, and CI - before they reach upstream. Use when the user asks to run no-mistakes, gate or ship or validate their changes, push safely, asks you to do a task and then validate it, or invokes /no-mistakes.
Ask which skill or flow fits your situation. A router over the user-invoked skills in this repo.
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
| name | code-design |
| description | Create a high-quality code design document through an iterative research/design/audit workflow |
| aliases | code-design,design-doc,iterative-design,architecture-design |
| usage | /goal code-design --doc .ai/docs/realtime-voice/design-feature-name.md --title "Feature name" --minutes 7 -- Describe the issue, feature, constraints, known files, and desired outcome |
| examples | /goal code-design --doc .ai/docs/realtime-voice/design-copy-capture-command.md --title "Copy capture command" --minutes 7 -- Design a command that copies the current capture buffer to the clipboard; /goal iterative-design --doc .ai/docs/realtime-voice/design-utterance-aggregation-delay.md --title "Utterance aggregation delay" --minutes 10 -- Design configurable transcript aggregation before capture/backend routing |
| allow_commands | true |
| command_timeout_ms | 10000 |
| command_output_limit | 30000 |
Create a code design document for the requested issue, feature, improvement, or architectural change.
<design_goal_request>
{{title}} {{doc}} {{minutes}} {{args}}This is a design-document goal, not an implementation goal. Do not edit runtime/source code for the feature unless the user explicitly authorizes implementation in the goal context. Design artifacts, validation probes for the design document, and documentation edits directly needed for the design goal are allowed when appropriate.
iterative-code-design goal template.{{doc}}.{{minutes}} minutes.
sleep to satisfy the floor.AGENTS.md and any project-local instructions relevant to the target files/workstream..ai/docs/architecture-and-system-design-style.md.ai/docs/code-style.md.ai/docs/prompt-template-authoring.md first.Use this initial read-only repository context, then inspect targeted files directly as needed:
<repo_status>
!git status --short --untracked-files=all
</repo_status>
<existing_design_docs>
!find .ai/docs -type f -name 'design-*.md' 2>/dev/null | sort | tail -80
</existing_design_docs>
Design the cleanest, most robust implementation possible for {{title}}, grounded in the provided context and inspected code/docs.
The design must keep the architecture:
The design document must answer:
Before drafting the proposed design, create a Baseline design inventory section in {{doc}}.
This is mandatory. Do not skip it. Do not treat it as optional background research.
The inventory must list the existing design decisions in the current repo that constrain, shape, or risk being invalidated by the requested design.
A baseline decision can come from:
For every relevant existing decision, write one row in this format:
| id | source | decision | location | current assumption | why it matters now | pressure signal |
|---|---|---|---|---|---|---|
| B1 | existing code | Realtime requests enter Pi through pi-realtime.request custom messages instead of normal user messages | .pi/extensions/pi-realtime/runtime.ts, .pi/extensions/pi-realtime/service.ts | Realtime-originated work must remain visibly distinct from typed user turns | The new design must preserve backend routing semantics | If the design adds another request route or wraps this path, review whether the original route should be widened instead |
Rules:
id must be stable within the document: B1, B2, B3.source must name where the decision came from, such as existing code, design doc, issue doc, validation probe, or git history.decision must describe the actual design choice, not a vague topic.location must name concrete files, symbols, docs, or probes.current assumption must state what the existing design appears to believe.why it matters now must connect the existing decision to this requested design.pressure signal must say what kind of future finding would force this decision to be reviewed.If no baseline decision is found, the design document must include a Baseline design inventory section with:
Do not proceed to the main proposed design until this baseline section exists.
Iterate continuously through this loop until the design is semantically complete.
Each iteration must include all six steps below. Do not skip the design compression review.
For each iteration, formulate and answer the 5 most critical technical questions about the design.
Cover:
Baseline design inventory;At least one question in each iteration must explicitly reference one or more baseline decision ids, such as B1 or B3.
Inspect the codebase, docs, examples, design guides, validation probes, prior issue/design docs, and external docs if needed.
Do not rely on memory when concrete file evidence is available.
Record the important files/docs inspected inside the design document.
When research touches a file, symbol, behavior, state path, provider path, lifecycle hook, command, or tool already named in the Baseline design inventory, record that connection in the design document.
Integrate findings directly into {{doc}}:
Every new proposed design choice that constrains implementation must be recorded in a Proposed design decision ledger.
Use this format:
| id | decision | location | reason | assumption | related baseline ids |
|---|---|---|---|---|---|
| D1 | Add a provider-neutral capture buffer service instead of putting capture state in the command handler | .pi/extensions/pi-realtime/service.ts, .pi/extensions/pi-realtime/runtime.ts | Keeps command wiring separate from capture state | Capture buffering is core realtime domain behavior | B2, B4 |
Rules:
id must be stable within the document: D1, D2, D3.decision must name the actual implementation-shaping choice.location must name concrete files, symbols, docs, or probes.reason must explain why this shape is better than a local patch.assumption must state what the proposed design depends on.related baseline ids must list every baseline decision this proposed choice touches. Use none only when the choice truly does not touch an existing decision.This step is mandatory in every iteration after synthesis.
Review every row in:
Baseline design inventory;Proposed design decision ledger.For each row, answer these exact checks:
location?current assumption or assumption too narrow?location?For every yes, add or update a Compression review section in {{doc}}.
Use this format:
| review id | decision id | trigger | finding | action | design update required |
|---|---|---|---|---|---|
| C1 | B2 | New command also needs capture text | Existing command-local capture shape would create a second capture path | rewrite | Move capture ownership into provider-neutral service before designing the command |
The action must be exactly one of:
keep: the existing or proposed decision still fits the final design.rewrite: replace the decision with a broader or simpler design.split: separate two responsibilities that were combined too early.merge: fold the new behavior into an existing path instead of adding another path.defer: leave the pressure unresolved, with the exact reason and risk named.Operational rules:
rewrite, split, or merge, update the proposed design before continuing to the next iteration.keep, the finding must explain why the current shape still fits.defer, the design must name the exact risk left for implementation or future work.reviewed, looks fine, or no issue.rewrite, split, or merge and the document has not been updated to match that action.Review the whole design document for coherence.
Restructure unclear sections so the document becomes the best possible draft so far, not a chronological scratchpad.
The baseline inventory, proposed decision ledger, and compression review must remain readable as durable design evidence. They may be reorganized, but they must not be deleted unless their content is replaced by an equally explicit section.
Continue iterating until all are true:
{{minutes}} minute floor has been met;Baseline design inventory exists and is grounded in inspected files/docs/probes;Proposed design decision ledger covers every implementation-shaping proposed decision;Compression review has evaluated every baseline and proposed decision touched by the final design;rewrite, split, or merge action has been reflected in the final proposed design;Write the final design document to:
{{doc}}
Recommended structure:
# Design: {{title}}Do not include placeholder sections like TODO, TBD, or empty headings. If a section is not applicable, explicitly say why or omit it.
The Baseline design inventory, Proposed design decision ledger, and Compression review sections are not optional. If one of them has no rows, the section must explain why, using inspected evidence.
Before marking the goal complete:
{{doc}} against:
AGENTS.md;.ai/docs/architecture-and-system-design-style.md when present;.ai/docs/code-style.md when present;test -f {{doc}}rg -n "TODO|TBD|FIXME|placeholder" {{doc}} should find nothing unless discussing those words as concepts.git status --short --untracked-files=allgit check-ignore -v {{doc}} || truerg -n "Baseline design inventory|Proposed design decision ledger|Compression review" {{doc}}rewrite, split, or merge action may remain without a matching design update described in the document.defer action must name the risk, reason, and owner of the future decision.Final response must include:
Do not treat the minimum minute mark as a completion gate, instead of treat it as only the earliest possible wrap-up point.
The instruction “take all the time necessary” should override any impulse to stop at the minimum.