[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M72W1625PMN8TJYS3ECBHXRD":3,"skill-same:01M72W1625PMN8TJYS3ECBHXRD":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M72W1625PMN8TJYS3ECBHXRD","comet-design",null,"Comet Phase 2: Deep Design. Invoke with \u002Fcomet-design. Produce Design Doc and delta spec through brainstorming.","rpamis\u002Fcomet","rpamis","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F153429891?v=4","01M72VXBR7EQYMM7KN8C19244V","01M72VXBRYC06QG0ZH0JBGV09V",3298,"MIT","https:\u002F\u002Fgithub.com\u002Frpamis\u002Fcomet\u002Fblob\u002Fmaster\u002Feval\u002Flocal\u002Fskills\u002Fbenchmarks\u002F039-release\u002Fcomet-classic-039-design\u002FSKILL.md",[],[],"2026-11-10 22:39:42",false,"---\nname: comet-design\ndescription: \"Comet Phase 2: Deep Design. Invoke with \u002Fcomet-design. Produce Design Doc and delta spec through brainstorming.\"\n---\n\n# Comet Phase 2: Deep Design (Design)\n\n## Prerequisites\n\n- Active change exists (proposal.md, design.md, tasks.md)\n- No Design Doc (no corresponding file under `docs\u002Fsuperpowers\u002Fspecs\u002F`)\n\n## Steps\n\n### 0. Entry State Verification (Entry Check)\n\nExecute entry verification:\n\n```bash\nCOMET_ENV=\"${COMET_ENV:-$(find . \"$HOME\"\u002F.*\u002Fskills \"$HOME\u002F.config\" \"$HOME\u002F.gemini\" -path '*\u002Fcomet\u002Fscripts\u002Fcomet-env.sh' -type f -print -quit 2>\u002Fdev\u002Fnull)}\"\nif [ -z \"$COMET_ENV\" ]; then\n  echo \"ERROR: comet-env.sh not found. Ensure the comet skill is installed.\" >&2\n  return 1\nfi\n. \"$COMET_ENV\"\n\"$COMET_BASH\" \"$COMET_STATE\" check \u003Cname> design\n```\n\nProceed to Step 1 after verification passes. The script outputs specific failure reasons when verification fails.\n\n**Idempotency**: All design phase operations can be safely re-executed. If `handoff_context` and `handoff_hash` already exist, confirm they match current artifacts before deciding whether to regenerate.\n\n### 1a. Generate OpenSpec → Superpowers Handoff Package\n\n**Must be generated by script. Agent writing summaries on the fly is not allowed.**\n\n```bash\n\"$COMET_BASH\" \"$COMET_HANDOFF\" \u003Cchange-name> design --write\n```\n\nThe script reads the change `.comet.yaml` `context_compression` snapshot, then generates and records the matching handoff package.\n\nDefault `context_compression: off` generates:\n\n```\nopenspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\u002Fdesign-context.json\nopenspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\u002Fdesign-context.md\n```\n\nBeta mode (`context_compression: beta` in project `.comet\u002Fconfig.yaml`, snapshotted into `.comet.yaml` when the change is created) generates:\n\n```\nopenspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\u002Fspec-context.json\nopenspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\u002Fspec-context.md\n```\n\nAnd writes to `.comet.yaml`:\n\n```yaml\nhandoff_context: openspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\u002Fdesign-context.json\nhandoff_hash: \u003Csha256>\n```\n\nThe default handoff package is a **compact traceable excerpt**, not an agent summary:\n- `design-context.json`: machine index containing change, phase, canonical spec, source paths, hash\n- `design-context.md`: context for Superpowers to read, containing script markers, source path, line range, sha256, deterministic excerpts\n- When exceeding excerpt budget, marks `[TRUNCATED]` and retains Full source path\n\nThe beta handoff package is a **structured spec projection** that reduces OpenSpec token load without replacing the canonical spec:\n- `spec-context.json`: machine index containing change, phase, canonical spec, source paths, hash, and file roles\n- `spec-context.md`: context for Superpowers to read, verbatim-projecting delta spec files and referencing supporting artifacts by hash\n- OpenSpec delta specs remain canonical; if the projection is missing, stale, or unclear, regenerate the handoff or read the source spec directly instead of writing an agent summary\n\nIf full context is genuinely needed, explicitly run:\n\n```bash\n\"$COMET_BASH\" \"$COMET_HANDOFF\" \u003Cchange-name> design --write --full\n```\n\nHandoff package sources come from OpenSpec open phase artifacts:\n- `proposal.md`: goals, motivation, scope, non-goals\n- `design.md`: high-level architecture decisions, approach constraints\n- `tasks.md`: initial task boundaries\n- `specs\u002F*\u002Fspec.md`: delta capability specs\n\n### 1b. Execute Brainstorming (with Context)\n\n**Immediately execute:** Use the Skill tool to load the Superpowers `brainstorming` skill. Skipping this step is prohibited.\n\nWhen loading the skill, ARGUMENTS must include:\n\n```text\nLanguage: Use the language of the user request that triggered this workflow\n```\n\nAfter the skill loads, follow its guidance and use the following context:\n\n```\nChange: \u003Cchange-name>\nOpenSpec Context Pack: openspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\u002Fdesign-context.md\nMachine handoff: openspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\u002Fdesign-context.json\n\nIf context_compression is beta, use:\nOpenSpec Context Pack: openspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\u002Fspec-context.md\nMachine handoff: openspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\u002Fspec-context.json\n\nOpenSpec artifacts are the upstream source of truth, but you must not weaken the Superpowers `brainstorming` clarification flow by \"skipping redundant context exploration\".\nYour task is to perform deep technical design based on the handoff package: implementation approach, technical risks, testing strategy, boundary conditions.\nIf goals, scope, non-goals, acceptance scenarios, or key constraints remain unclear, you must continue asking questions and form the design proposal first; must not create the Design Doc after only one Q&A turn.\nDo not rewrite proposal\u002Fspec; if you find OpenSpec delta spec missing acceptance scenarios, you may only propose Spec Patches and write them back to OpenSpec delta spec; do not create a second requirements spec in the Design Doc. Spec Patches are limited to supplementing acceptance scenarios, correcting ambiguous descriptions, or adding boundary conditions — they must not substantially rewrite the delta spec's structure or scope. If major changes are needed, flag them as design findings and return to brainstorming for confirmation.\n\nDesign Doc frontmatter must be minimal, containing only:\n---\ncomet_change: \u003Cchange-name>\nrole: technical-design\ncanonical_spec: openspec\n---\n\nProceed through the original `brainstorming` skill flow: clarifying questions, 2-3 approaches, and step-by-step design confirmation. Do not write the Design Doc early.\n```\n\nProceeding without loading this skill is prohibited.\n\nIf the Superpowers `brainstorming` skill is unavailable, stop the process and prompt to install or enable Superpowers skills. Do not substitute this step with normal conversation.\n\nAfter the skill loads, follow its guidance to produce design proposals (presented as conversation):\n- Technical approach: architecture, data flow, key technology choices and risks\n- Testing strategy\n- Requirement\u002Fscope gaps and Spec Patches to be written back\n- If acceptance scenarios need supplementing, indicate delta spec changes to be written back\n\nThe brainstorming phase does not write to the Design Doc file; it only produces design proposals for Step 1c user confirmation. Only after confirmation should `docs\u002Fsuperpowers\u002Fspecs\u002FYYYY-MM-DD-\u003Ctopic>-design.md` be created and delta spec written back.\n\nFor context compaction recovery, the agent must incrementally update `brainstorm-summary.md` during brainstorming. After each clarification round or proposal iteration, update the file whenever new confirmed facts, key constraints, candidate approaches, trade-offs\u002Frisks, testing strategy, or Spec Patch candidates emerge; mark unconfirmed items as \"pending\" or \"candidate\". This file is a recovery checkpoint, not the Design Doc, and must not replace the Step 1c user confirmation.\n\n### 1c. User Confirms Design Proposal (Blocking Point)\n\nAfter brainstorming produces a design proposal, **must follow the `comet\u002Freference\u002Fdecision-point.md` protocol to pause and wait for the user to explicitly confirm the design proposal**. Must not create the final Design Doc, write `design_doc`, run design guard, or enter `\u002Fcomet-build` before user confirmation.\n\nWhen pausing, only present essential summary:\n- Technical approach adopted\n- Key trade-offs and risks\n- Testing strategy\n- If there are Spec Patches, list the delta spec changes to be written back\n\nOnly after the user explicitly confirms, proceed to Step 2. If the user requests adjustments, continue brainstorming iteration until the user confirms.\n\n### 1d. Brainstorming Checkpoint Finalization\n\nAfter the user confirms the design proposal, before creating the Design Doc, create or update the incrementally maintained checkpoint file and finalize it as the confirmed design summary:\n\n```bash\nmkdir -p openspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\n```\n\n`openspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\u002Fbrainstorm-summary.md` structure:\n\n```markdown\n# Brainstorm Summary\n\n- Change: \u003Cchange-name>\n- Date: \u003CYYYY-MM-DD>\n\n## Confirmed Technical Approach\n\n\u003Csummary of the user-confirmed approach>\n\n## Key Trade-offs and Risks\n\n\u003Cmajor trade-offs and risks>\n\n## Testing Strategy\n\n\u003Ctesting method overview>\n\n## Spec Patches\n\n\u003Cdelta spec changes to write back, or \"None\" if none>\n```\n\n**Context compaction note**: Each incremental update to `brainstorm-summary.md` is a relatively safe recovery point. After brainstorming completes, if the context window is tight, prefer compacting here. After compaction, reload the following files to continue Step 2:\n- `openspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\u002Fbrainstorm-summary.md`\n- `openspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\u002Fdesign-context.md` (or `spec-context.md` in beta mode)\n- `openspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\u002Fdesign-context.json` (or `spec-context.json` in beta mode)\n\n### 1e. Active Context Compaction Gate\n\nAfter Step 1d completes and `brainstorm-summary.md` is written, enter the active compaction gate before creating the Design Doc. At this point the OpenSpec handoff, brainstorming decisions, and pending items are durable, so the agent should proactively release the earlier Spec and brainstorming context to preserve window space for Step 2 and the later Build phase.\n\nRules:\n- If the current platform provides a native context compaction\u002Fcleanup mechanism (for example, the host agent's compact\u002Fcompaction command, tool, or UI action), trigger active compaction here once; do not try to fake compaction through a shell script.\n- The compaction resume prompt must include the change name, current step (Design Step 2), and the three handoff file categories listed above.\n- If the current platform cannot be compacted programmatically by the agent, pause and tell the user to run the host platform's manual compaction action; continue to Step 2 only after the user confirms compaction is unavailable or asks to continue.\n\n### 2. Create Design Doc\n\nCreate the Design Doc based on the full brainstorming conversation context (still in the main session).\n\nDesign Doc frontmatter must be minimal:\n\n```yaml\n---\ncomet_change: \u003Cchange-name>\nrole: technical-design\ncanonical_spec: openspec\n---\n```\n\nWrite the Design Doc to `docs\u002Fsuperpowers\u002Fspecs\u002FYYYY-MM-DD-\u003Ctopic>-design.md`.\nIf Spec Patches need to be written back, also edit the corresponding `specs\u002F*\u002Fspec.md`.\n\n**Context compaction recovery**: If context has been compacted, resume from `brainstorm-summary.md` + handoff context. If the user has not confirmed the design proposal yet, return to Step 1b\u002F1c and continue brainstorming; if the user has confirmed it, continue creating the Design Doc. brainstorm-summary.md is the compaction checkpoint, not the sole input for the Design Doc — when creating, leverage the full recovered context as much as possible.\n\n### 3. Update Comet State\n\nFirst record the design_doc path. If Spec Patches wrote back delta spec (added or modified `specs\u002F*\u002Fspec.md`), must regenerate handoff to update hash:\n\n```bash\n# Record design_doc path\n\"$COMET_BASH\" \"$COMET_STATE\" set \u003Cname> design_doc docs\u002Fsuperpowers\u002Fspecs\u002FYYYY-MM-DD-topic-design.md\n\n# If delta spec changes exist, regenerate handoff (update hash)\n\"$COMET_BASH\" \"$COMET_HANDOFF\" \u003Cchange-name> design --write\n\n# Auto-transition to next phase\n\"$COMET_BASH\" \"$COMET_GUARD\" \u003Cchange-name> design --apply\n```\n\nIf there are no delta spec changes, skip the handoff regeneration step. The state file updates automatically; no manual editing of other fields needed.\n\n## Exit Conditions\n\n- Design Doc created and saved\n- Design Doc frontmatter contains `comet_change`, `role: technical-design`, `canonical_spec: openspec`\n- `handoff_context` and `handoff_hash` written to `.comet.yaml` (enforced by guard)\n- `handoff_hash` matches current OpenSpec open phase artifacts (enforced by guard)\n- `design-context.md` or beta `spec-context.md` must be script-generated and contain source path, mode, sha256 traceability markers (enforced by guard)\n- In beta mode, `spec-context.json` must be structurally valid and reference the current source files (enforced by guard)\n- If new capabilities or supplementary acceptance scenarios exist, OpenSpec delta spec has been created\u002Fupdated\n- `design_doc` written to `.comet.yaml`\n- **Phase guard**: Run `\"$COMET_BASH\" \"$COMET_GUARD\" \u003Cchange-name> design --apply`; after all PASS, auto-transitions to `phase: build`\n\nMust use `--apply` before exit:\n\n```bash\n\"$COMET_BASH\" \"$COMET_GUARD\" \u003Cchange-name> design --apply\n```\n\n## Context Compression Recovery\n\nFollow `comet\u002Freference\u002Fcontext-recovery.md` with phase set to `design`.\n\n## Automatic Handoff to Next Phase\n\nFollow `comet\u002Freference\u002Fauto-transition.md`. Key command:\n\n```bash\n\"$COMET_BASH\" \"$COMET_STATE\" next \u003Cchange-name>\n```\n\n- `NEXT: auto` → invoke the skill pointed to by `SKILL` to enter the next phase\n- `NEXT: manual` → do not invoke the next skill; prompt user to run `\u002F\u003CSKILL>` manually\n- `NEXT: done` → workflow is complete, no further action needed\n","# Comet Phase 2: Deep Design (Design)\n\n## Prerequisites\n\n- Active change exists (proposal.md, design.md, tasks.md)\n- No Design Doc (no corresponding file under `docs\u002Fsuperpowers\u002Fspecs\u002F`)\n\n## Steps\n\n### 0. Entry State Verification (Entry Check)\n\nExecute entry verification:\n\n```bash\nCOMET_ENV=\"${COMET_ENV:-$(find . \"$HOME\"\u002F.*\u002Fskills \"$HOME\u002F.config\" \"$HOME\u002F.gemini\" -path '*\u002Fcomet\u002Fscripts\u002Fcomet-env.sh' -type f -print -quit 2>\u002Fdev\u002Fnull)}\"\nif [ -z \"$COMET_ENV\" ]; then\n  echo \"ERROR: comet-env.sh not found. Ensure the comet skill is installed.\" >&2\n  return 1\nfi\n. \"$COMET_ENV\"\n\"$COMET_BASH\" \"$COMET_STATE\" check \u003Cname> design\n```\n\nProceed to Step 1 after verification passes. The script outputs specific failure reasons when verification fails.\n\n**Idempotency**: All design phase operations can be safely re-executed. If `handoff_context` and `handoff_hash` already exist, confirm they match current artifacts before deciding whether to regenerate.\n\n### 1a. Generate OpenSpec → Superpowers Handoff Package\n\n**Must be generated by script. Agent writing summaries on the fly is not allowed.**\n\n```bash\n\"$COMET_BASH\" \"$COMET_HANDOFF\" \u003Cchange-name> design --write\n```\n\nThe script reads the change `.comet.yaml` `context_compression` snapshot, then generates and records the matching handoff package.\n\nDefault `context_compression: off` generates:\n\n```\nopenspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\u002Fdesign-context.json\nopenspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\u002Fdesign-context.md\n```\n\nBeta mode (`context_compression: beta` in project `.comet\u002Fconfig.yaml`, snapshotted into `.comet.yaml` when the change is created) generates:\n\n```\nopenspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\u002Fspec-context.json\nopenspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\u002Fspec-context.md\n```\n\nAnd writes to `.comet.yaml`:\n\n```yaml\nhandoff_context: openspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\u002Fdesign-context.json\nhandoff_hash: \u003Csha256>\n```\n\nThe default handoff package is a **compact traceable excerpt**, not an agent summary:\n- `design-context.json`: machine index containing change, phase, canonical spec, source paths, hash\n- `design-context.md`: context for Superpowers to read, containing script markers, source path, line range, sha256, deterministic excerpts\n- When exceeding excerpt budget, marks `[TRUNCATED]` and retains Full source path\n\nThe beta handoff package is a **structured spec projection** that reduces OpenSpec token load without replacing the canonical spec:\n- `spec-context.json`: machine index containing change, phase, canonical spec, source paths, hash, and file roles\n- `spec-context.md`: context for Superpowers to read, verbatim-projecting delta spec files and referencing supporting artifacts by hash\n- OpenSpec delta specs remain canonical; if the projection is missing, stale, or unclear, regenerate the handoff or read the source spec directly instead of writing an agent summary\n\nIf full context is genuinely needed, explicitly run:\n\n```bash\n\"$COMET_BASH\" \"$COMET_HANDOFF\" \u003Cchange-name> design --write --full\n```\n\nHandoff package sources come from OpenSpec open phase artifacts:\n- `proposal.md`: goals, motivation, scope, non-goals\n- `design.md`: high-level architecture decisions, approach constraints\n- `tasks.md`: initial task boundaries\n- `specs\u002F*\u002Fspec.md`: delta capability specs\n\n### 1b. Execute Brainstorming (with Context)\n\n**Immediately execute:** Use the Skill tool to load the Superpowers `brainstorming` skill. Skipping this step is prohibited.\n\nWhen loading the skill, ARGUMENTS must include:\n\n```text\nLanguage: Use the language of the user request that triggered this workflow\n```\n\nAfter the skill loads, follow its guidance and use the following context:\n\n```\nChange: \u003Cchange-name>\nOpenSpec Context Pack: openspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\u002Fdesign-context.md\nMachine handoff: openspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\u002Fdesign-context.json\n\nIf context_compression is beta, use:\nOpenSpec Context Pack: openspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\u002Fspec-context.md\nMachine handoff: openspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\u002Fspec-context.json\n\nOpenSpec artifacts are the upstream source of truth, but you must not weaken the Superpowers `brainstorming` clarification flow by \"skipping redundant context exploration\".\nYour task is to perform deep technical design based on the handoff package: implementation approach, technical risks, testing strategy, boundary conditions.\nIf goals, scope, non-goals, acceptance scenarios, or key constraints remain unclear, you must continue asking questions and form the design proposal first; must not create the Design Doc after only one Q&A turn.\nDo not rewrite proposal\u002Fspec; if you find OpenSpec delta spec missing acceptance scenarios, you may only propose Spec Patches and write them back to OpenSpec delta spec; do not create a second requirements spec in the Design Doc. Spec Patches are limited to supplementing acceptance scenarios, correcting ambiguous descriptions, or adding boundary conditions — they must not substantially rewrite the delta spec's structure or scope. If major changes are needed, flag them as design findings and return to brainstorming for confirmation.\n\nDesign Doc frontmatter must be minimal, containing only:\n---\ncomet_change: \u003Cchange-name>\nrole: technical-design\ncanonical_spec: openspec\n---\n\nProceed through the original `brainstorming` skill flow: clarifying questions, 2-3 approaches, and step-by-step design confirmation. Do not write the Design Doc early.\n```\n\nProceeding without loading this skill is prohibited.\n\nIf the Superpowers `brainstorming` skill is unavailable, stop the process and prompt to install or enable Superpowers skills. Do not substitute this step with normal conversation.\n\nAfter the skill loads, follow its guidance to produce design proposals (presented as conversation):\n- Technical approach: architecture, data flow, key technology choices and risks\n- Testing strategy\n- Requirement\u002Fscope gaps and Spec Patches to be written back\n- If acceptance scenarios need supplementing, indicate delta spec changes to be written back\n\nThe brainstorming phase does not write to the Design Doc file; it only produces design proposals for Step 1c user confirmation. Only after confirmation should `docs\u002Fsuperpowers\u002Fspecs\u002FYYYY-MM-DD-\u003Ctopic>-design.md` be created and delta spec written back.\n\nFor context compaction recovery, the agent must incrementally update `brainstorm-summary.md` during brainstorming. After each clarification round or proposal iteration, update the file whenever new confirmed facts, key constraints, candidate approaches, trade-offs\u002Frisks, testing strategy, or Spec Patch candidates emerge; mark unconfirmed items as \"pending\" or \"candidate\". This file is a recovery checkpoint, not the Design Doc, and must not replace the Step 1c user confirmation.\n\n### 1c. User Confirms Design Proposal (Blocking Point)\n\nAfter brainstorming produces a design proposal, **must follow the `comet\u002Freference\u002Fdecision-point.md` protocol to pause and wait for the user to explicitly confirm the design proposal**. Must not create the final Design Doc, write `design_doc`, run design guard, or enter `\u002Fcomet-build` before user confirmation.\n\nWhen pausing, only present essential summary:\n- Technical approach adopted\n- Key trade-offs and risks\n- Testing strategy\n- If there are Spec Patches, list the delta spec changes to be written back\n\nOnly after the user explicitly confirms, proceed to Step 2. If the user requests adjustments, continue brainstorming iteration until the user confirms.\n\n### 1d. Brainstorming Checkpoint Finalization\n\nAfter the user confirms the design proposal, before creating the Design Doc, create or update the incrementally maintained checkpoint file and finalize it as the confirmed design summary:\n\n```bash\nmkdir -p openspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\n```\n\n`openspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\u002Fbrainstorm-summary.md` structure:\n\n```markdown\n# Brainstorm Summary\n\n- Change: \u003Cchange-name>\n- Date: \u003CYYYY-MM-DD>\n\n## Confirmed Technical Approach\n\n\u003Csummary of the user-confirmed approach>\n\n## Key Trade-offs and Risks\n\n\u003Cmajor trade-offs and risks>\n\n## Testing Strategy\n\n\u003Ctesting method overview>\n\n## Spec Patches\n\n\u003Cdelta spec changes to write back, or \"None\" if none>\n```\n\n**Context compaction note**: Each incremental update to `brainstorm-summary.md` is a relatively safe recovery point. After brainstorming completes, if the context window is tight, prefer compacting here. After compaction, reload the following files to continue Step 2:\n- `openspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\u002Fbrainstorm-summary.md`\n- `openspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\u002Fdesign-context.md` (or `spec-context.md` in beta mode)\n- `openspec\u002Fchanges\u002F\u003Cname>\u002F.comet\u002Fhandoff\u002Fdesign-context.json` (or `spec-context.json` in beta mode)\n\n### 1e. Active Context Compaction Gate\n\nAfter Step 1d completes and `brainstorm-summary.md` is written, enter the active compaction gate before creating the Design Doc. At this point the OpenSpec handoff, brainstorming decisions, and pending items are durable, so the agent should proactively release the earlier Spec and brainstorming context to preserve window space for Step 2 and the later Build phase.\n\nRules:\n- If the current platform provides a native context compaction\u002Fcleanup mechanism (for example, the host agent's compact\u002Fcompaction command, tool, or UI action), trigger active compaction here once; do not try to fake compaction through a shell script.\n- The compaction resume prompt must include the change name, current step (Design Step 2), and the three handoff file categories listed above.\n- If the current platform cannot be compacted programmatically by the agent, pause and tell the user to run the host platform's manual compaction action; continue to Step 2 only after the user confirms compaction is unavailable or asks to continue.\n\n### 2. Create Design Doc\n\nCreate the Design Doc based on the full brainstorming conversation context (still in the main session).\n\nDesign Doc frontmatter must be minimal:\n\n```yaml\n---\ncomet_change: \u003Cchange-name>\nrole: technical-design\ncanonical_spec: openspec\n---\n```\n\nWrite the Design Doc to `docs\u002Fsuperpowers\u002Fspecs\u002FYYYY-MM-DD-\u003Ctopic>-design.md`.\nIf Spec Patches need to be written back, also edit the corresponding `specs\u002F*\u002Fspec.md`.\n\n**Context compaction recovery**: If context has been compacted, resume from `brainstorm-summary.md` + handoff context. If the user has not confirmed the design proposal yet, return to Step 1b\u002F1c and continue brainstorming; if the user has confirmed it, continue creating the Design Doc. brainstorm-summary.md is the compaction checkpoint, not the sole input for the Design Doc — when creating, leverage the full recovered context as much as possible.\n\n### 3. Update Comet State\n\nFirst record the design_doc path. If Spec Patches wrote back delta spec (added or modified `specs\u002F*\u002Fspec.md`), must regenerate handoff to update hash:\n\n```bash\n# Record design_doc path\n\"$COMET_BASH\" \"$COMET_STATE\" set \u003Cname> design_doc docs\u002Fsuperpowers\u002Fspecs\u002FYYYY-MM-DD-topic-design.md\n\n# If delta spec changes exist, regenerate handoff (update hash)\n\"$COMET_BASH\" \"$COMET_HANDOFF\" \u003Cchange-name> design --write\n\n# Auto-transition to next phase\n\"$COMET_BASH\" \"$COMET_GUARD\" \u003Cchange-name> design --apply\n```\n\nIf there are no delta spec changes, skip the handoff regeneration step. The state file updates automatically; no manual editing of other fields needed.\n\n## Exit Conditions\n\n- Design Doc created and saved\n- Design Doc frontmatter contains `comet_change`, `role: technical-design`, `canonical_spec: openspec`\n- `handoff_context` and `handoff_hash` written to `.comet.yaml` (enforced by guard)\n- `handoff_hash` matches current OpenSpec open phase artifacts (enforced by guard)\n- `design-context.md` or beta `spec-context.md` must be script-generated and contain source path, mode, sha256 traceability markers (enforced by guard)\n- In beta mode, `spec-context.json` must be structurally valid and reference the current source files (enforced by guard)\n- If new capabilities or supplementary acceptance scenarios exist, OpenSpec delta spec has been created\u002Fupdated\n- `design_doc` written to `.comet.yaml`\n- **Phase guard**: Run `\"$COMET_BASH\" \"$COMET_GUARD\" \u003Cchange-name> design --apply`; after all PASS, auto-transitions to `phase: build`\n\nMust use `--apply` before exit:\n\n```bash\n\"$COMET_BASH\" \"$COMET_GUARD\" \u003Cchange-name> design --apply\n```\n\n## Context Compression Recovery\n\nFollow `comet\u002Freference\u002Fcontext-recovery.md` with phase set to `design`.\n\n## Automatic Handoff to Next Phase\n\nFollow `comet\u002Freference\u002Fauto-transition.md`. Key command:\n\n```bash\n\"$COMET_BASH\" \"$COMET_STATE\" next \u003Cchange-name>\n```\n\n- `NEXT: auto` → invoke the skill pointed to by `SKILL` to enter the next phase\n- `NEXT: manual` → do not invoke the next skill; prompt user to run `\u002F\u003CSKILL>` manually\n- `NEXT: done` → workflow is complete, no further action needed\n",{"name":5,"description":7},"master","a61a2e5b4766e1ad62377dec598e402560a259b6","eval\u002Flocal\u002Fskills\u002Fbenchmarks\u002F039-release\u002Fcomet-classic-039-design",314,"https:\u002F\u002Fgithub.com\u002Frpamis\u002Fcomet","https:\u002F\u002Fdocs.comet.rpamis.com","https:\u002F\u002Fgithub.com\u002Frpamis","More Efficient, Easier to Use, and Less Annoying","2026-11-15 00:26:58",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add rpamis\u002Fcomet --skill comet-design",{"tool":38,"command":39},"bunx","bunx skills add rpamis\u002Fcomet --skill comet-design",{"tool":41,"command":42},"pnpm","pnpm dlx skills add rpamis\u002Fcomet --skill comet-design","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Frpamis\u002Fcomet\u002Fblob\u002Fmaster\u002Feval\u002Flocal\u002Fskills\u002Fbenchmarks\u002F039-release\u002Fcomet-classic-039-design\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":18},"01M72W3K6F0C2FKZ8DHABM49R7","writing-skills","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002Frpamis\u002Fcomet\u002Fblob\u002Fmaster\u002Feval\u002Flocal\u002Fskills\u002Fbenchmarks\u002Fdependency\u002Fsuperpowers\u002Fwriting-skills\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":18},"01M72W3HCPQ3GVMACX61QJTD4B","writing-plans","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002Frpamis\u002Fcomet\u002Fblob\u002Fmaster\u002Feval\u002Flocal\u002Fskills\u002Fbenchmarks\u002Fdependency\u002Fsuperpowers\u002Fwriting-plans\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M72W3F8EVD3EK4NXJG40P84K","verification-before-completion","Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always","https:\u002F\u002Fgithub.com\u002Frpamis\u002Fcomet\u002Fblob\u002Fmaster\u002Feval\u002Flocal\u002Fskills\u002Fbenchmarks\u002Fdependency\u002Fsuperpowers\u002Fverification-before-completion\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M72W3CA9YM0Y6CSXXTNCV1CA","using-git-worktrees","Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback","https:\u002F\u002Fgithub.com\u002Frpamis\u002Fcomet\u002Fblob\u002Fmaster\u002Feval\u002Flocal\u002Fskills\u002Fbenchmarks\u002Fdependency\u002Fsuperpowers\u002Fusing-git-worktrees\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M72W3AEH0F548GTPRNYRR3H3","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002Frpamis\u002Fcomet\u002Fblob\u002Fmaster\u002Feval\u002Flocal\u002Fskills\u002Fbenchmarks\u002Fdependency\u002Fsuperpowers\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M72W38EN8NEKX1YN4W9G19Y2","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes","https:\u002F\u002Fgithub.com\u002Frpamis\u002Fcomet\u002Fblob\u002Fmaster\u002Feval\u002Flocal\u002Fskills\u002Fbenchmarks\u002Fdependency\u002Fsuperpowers\u002Fsystematic-debugging\u002FSKILL.md",[],[]]