rpamis/comet/assets/skills/comet-build/SKILL.md
comet-build
Phase 3 of Comet Classic — recover or create the implementation plan and execute its tasks.
- Source repository stars
- 2,841
- Declared platforms
- 0
- Static risk flags
- 2
- Last source update
- 2026-08-26
- Source checked
- 2026-08-26
Decision brief
What it does: where it fits
Before starting or recovering, read and follow comet-classic/reference/classic-layout.md. Every OpenSpec CLI call in this file must use the adapter, and every file path must use the logical roots bound by that protocol.
Not for
- Tasks that require unconfirmed production actions or broad system permissions.
- Environments where the pinned source and install steps cannot be inspected.
Compatibility matrix
Platform support, with evidence labels
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
Inspect first. Install second.
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/rpamis/comet --skill "assets/skills/comet-build"Inspect the Agent Skill "comet-build" from https://github.com/rpamis/comet/blob/99fd7495f8b9217efbaae3a46d885f6fa7f4102a/assets/skills/comet-build/SKILL.md at commit 99fd7495f8b9217efbaae3a46d885f6fa7f4102a. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
What the source asks the agent to do
- 01
0. Entry State Verification (Entry Check)
Use the stable comet CLI described in comet-classic/reference/scripts.md, then run entry verification. When resuming from any entry point, first run the recovery check in comet-classic/reference/context-recovery.md:
Use the stable comet CLI described in comet-classic/reference/scripts.md, then run entry verification. When resuming from any entry point, first run the recovery check in comet-classic/reference/context-recovery.md:Proceed to Step 1 after verification passes. The script outputs specific failure reasons when verification fails.If the select / check output is BLOCKED because boundbranch does not match the current branch, immediately pause under comet-classic/reference/decision-point.md and let the user choose one option: switch back to the bou… - 02
2. Update Plan Status and Jointly Confirm Workflow Configuration
No manual phase update needed — guard auto-transitions when exit conditions are met.
No manual phase update needed — guard auto-transitions when exit conditions are met.When presenting the joint decision, provide only the execution method, TDD mode, and code-review mode supported by this workflow. The workspace was prepared and bound during Open; if the change has no valid isolation, r…After recording the plan, provide exactly one joint decision point that collects whether to continue now, execution method, TDD mode, and code review mode. Do not ask continue/pause first and then create another configu… - 03
3. Apply the Confirmed Workflow Configuration
If resuming with buildpause: plan-ready and the plan file exists, do not rerun writing-plans. Reissue the same joint Step 2 decision and clear the pause only after the user supplies complete configuration:
Task count ≥ 3 → Recommend ATask count ≤ 2 and no cross-module dependencies → Recommend BFrom hotfix path → Recommend B - 04
Automatic Handoff to Next Phase
Follow comet-classic/reference/auto-transition.md. Key command:
NEXT: auto → invoke the skill pointed to by SKILL to enter the next phaseNEXT: manual → do not invoke the next skill; return control with HINT, end the invocation, and do not create another confirmation pointNEXT: done → workflow is complete, no further action needed - 05
Prerequisites
Design Doc has been created (Phase 2 complete)
Design Doc has been created (Phase 2 complete)Active change exists- Design Doc has been created (Phase 2 complete) - Active change exists
Permission review
Static risk signals and limitations
Runs scripts
The documentation asks the agent to run terminal commands or scripts.
git rev-parse HEADReads files
The documentation asks the agent to read local files, directories, or repositories.
Open has already prepared the current directory, branch, or Worktree according to `isolation` and returned the actual `projectRoot`. On resume, run `comet classic workspace resolve <name> --json`, enter the returned directory, then run `comRuns scripts
The documentation asks the agent to run terminal commands or scripts.
If the project has no automatically inferred build command, the user or Agent must run the real build command first, then record its evidence separately:Evidence record
Why each signal appears
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 94/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 2,841 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Provenance and original SKILL.md
- Repository
- rpamis/comet
- Skill path
- assets/skills/comet-build/SKILL.md
- Commit
- 99fd7495f8b9217efbaae3a46d885f6fa7f4102a
- License
- MIT
- Collected
- 2026-08-26
- Default branch
- master
View the original SKILL.md
Comet Phase 3: Plan and Build (Build)
Before starting or recovering, read and follow comet-classic/reference/classic-layout.md. Every OpenSpec CLI call in this file must use the adapter, and every file path must use the <classic-*> logical roots bound by that protocol.
Prerequisites
- Design Doc has been created (Phase 2 complete)
- Active change exists
Steps
0. Entry State Verification (Entry Check)
Use the stable comet CLI described in comet-classic/reference/scripts.md, then run entry verification. When resuming from any entry point, first run the recovery check in comet-classic/reference/context-recovery.md:
comet state select <change-name>
comet state check <name> build
Proceed to Step 1 after verification passes. The script outputs specific failure reasons when verification fails.
If the select / check output is BLOCKED because bound_branch does not match the current branch, immediately pause under comet-classic/reference/decision-point.md and let the user choose one option: switch back to the bound branch and rerun entry verification, or run comet state rebind <change-name> after the user explicitly confirms the current branch should take over this change, then rerun entry verification. Do not switch branches or rebind on your own.
Idempotency: All build phase operations can be safely re-executed. Read .comet.yaml phase to confirm build, read the plan header base-ref, then parse tasks.md checkboxes in document order and resume from the first unchecked task. Already-committed tasks must not be re-committed.
1. Create Plan (Subagent Offload)
Create the implementation plan through a subagent, avoiding planning skill occupying main session context. Plan files and execution feedback must use the configured Comet artifact language from comet state get <name> language.
Before dispatching, the main session fixes the full plan path docs/superpowers/plans/<YYYY-MM-DD>-<change-name>.md (e.g. docs/superpowers/plans/2026-08-21-rename-alert.md) and passes it into the instructions below verbatim.
Subagent instructions:
You are an implementation planning expert. Create an implementation plan based on the following inputs:
- Immediately execute: Use the Skill tool to load the Superpowers
writing-plansskill. Skipping this step is prohibited. After the skill loads, ARGUMENTS must include:Language: Use the configured Comet artifact language from comet state get <name> language. If the Skill tool is unavailable or the skill cannot be found, end immediately with a single-line final replySKILL_UNAVAILABLE; do not retry and do not write the plan yourself without the skill - Read the Design Doc (technical design document under
docs/superpowers/specs/) - Read
<classic-change-dir>/tasks.md(task boundaries) - Follow the skill's guidance to create the plan; no user will answer you during the run, so skip steps that ask the user a question (such as the
writing-plansExecution Handoff at the end) and do not ask the user anything
Plan requirements:
- Save to the plan path given in the instructions; do not change the file name
- Cover only the tasks listed in tasks.md; do not expand scope
- Reference design document, break down into executable tasks
- Plan file header must contain associated metadata:
---
change: <openspec-change-name>
design-doc: docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md
base-ref: <git rev-parse HEAD before implementation>
---
base-ref is used during verification to measure committed changes across the full implementation range. Record the current commit when creating the plan:
git rev-parse HEAD
After writing the plan to file, the last line of your final reply must be exactly:
PLAN_PATH: <relative path of the plan file>
Execute subagent: Dispatch the above task to a subagent.
After the subagent completes:
- Read the
PLAN_PATH:line at the end of the reply; if the file exists, record it as the plan; if the line is missing, look for an existing valid path in the reply text - If the subagent reports
SKILL_UNAVAILABLE, the dispatch fails, or no valid path can be obtained, fall back to loading the Superpowerswriting-plansskill inline in the main session (degraded fallback), remember that dispatch is unavailable for this session, and go inline directly on later Step 1 entries
2. Update Plan Status and Jointly Confirm Workflow Configuration
Record plan path:
comet state set <name> plan docs/superpowers/plans/YYYY-MM-DD-feature.md
No manual phase update needed — guard auto-transitions when exit conditions are met.
When presenting the joint decision, provide only the execution method, TDD mode, and code-review mode supported by this workflow. The workspace was prepared and bound during Open; if the change has no valid isolation, return to /comet-open instead of creating or switching a workspace in Build.
After recording the plan, provide exactly one joint decision point that collects whether to continue now, execution method, TDD mode, and code review mode. Do not ask continue/pause first and then create another configuration blocker.
| Option | Behavior | Description |
|---|---|---|
| A | Continue with configuration | Provide all Step 3 execution, TDD, and review choices in the same response |
| B | Pause to switch model | Record build_pause: plan-ready, stop this /comet-build invocation, and allow the user to resume later from /comet-classic or /comet-build |
This is a user decision point. Follow comet-classic/reference/decision-point.md once and show the plan summary, pause option, and every executable Step 3 setting together. Do not auto-select or write the pause into build_mode.
When the user chooses to continue and supplies complete configuration:
comet state set <name> build_pause null
When the user chooses to pause:
comet state set <name> build_pause plan-ready
After setting build_pause: plan-ready, stop the current invocation. Do not choose isolation or build_mode, and do not load an execution skill.
3. Apply the Confirmed Workflow Configuration
If resuming with build_pause: plan-ready and the plan file exists, do not rerun writing-plans. Reissue the same joint Step 2 decision and clear the pause only after the user supplies complete configuration:
comet state set <name> build_pause null
Then apply the execution method, TDD mode, and code review mode below.
The plan is in the workspace prepared during Open. First verify the existing binding:
comet state get <name> isolation
If the result is empty, stop Build and return to /comet-open for workspace resolve/prepare; do not make the first current/branch/worktree choice or create a workspace here.
Execution Method:
| Option | Skill | Applicable Scenario |
|---|---|---|
| A | Superpowers subagent-driven-development | Independent tasks, high complexity; each task runs in an isolated implementer subagent with review driven by review_mode |
| B | Superpowers executing-plans | The main session executes the plan sequentially; suitable for fewer or tightly coupled tasks |
Execution method recommendation rules:
- Task count ≥ 3 → Recommend A
- Task count ≤ 2 and no cross-module dependencies → Recommend B
- From hotfix path → Recommend B
The execution, TDD, and review tables are part of the Step 2 joint decision and do not create another pause. Recommendations never replace user confirmation.
After user selection, update only the execution method, TDD mode, and code-review mode fields; preserve the isolation and bound_branch established during Open.
- If the user chooses
executing-plans: runcomet state set <name> subagent_dispatch null, then runcomet state set <name> build_mode executing-plans - If the user chooses
subagent-driven-development: runcomet state set <name> subagent_dispatch confirmedto record the selected subagent execution, then runcomet state set <name> build_mode subagent-driven-development
TDD Mode:
| Option | Meaning | Applicable Scenario |
|---|---|---|
tdd | Write a failing test first for each task, then implement | Recommended. Changes involving business logic, new features, APIs |
direct | Implementation-first, no per-task Red-Green-Refactor requirement | Still requires relevant tests and bug-regression evidence; hotfix/tweak presets default to direct |
Run comet state set <name> tdd_mode <tdd|direct>
Code Review Mode:
| Option | Meaning | Applicable Scenario |
|---|---|---|
off | No automatic code review dispatch | Documentation, configuration, copywriting, small low-risk tasks |
standard | No per-task reviewer by default; dispatch a per-task reviewer only when a task hits a risk signal, plus one final lightweight code review | Default recommended, suits most ordinary changes |
thorough | Dispatch a per-task reviewer (spec + quality) on every task, plus one final complete review | High-risk, multi-module, architecture or security-related changes |
Run comet state set <name> review_mode <off|standard|thorough>
isolation is a script-enforced hard constraint. Full workflow must write current, branch, or worktree during Open and complete the corresponding workspace preparation and bound_branch binding before entering Build; if it is missing, Build may only stop and return to Open for repair.
subagent_dispatch is a script-enforced hard constraint that records the user's selected subagent execution. build_mode: subagent-driven-development requires subagent_dispatch: confirmed before leaving the build phase, otherwise both comet guard build --apply and comet state transition build-complete will fail; it is not a capability check.
tdd_mode is a script-enforced hard constraint. Full workflow must have tdd_mode selected as tdd or direct before leaving the build phase, otherwise both comet guard build --apply and comet state transition build-complete will fail.
review_mode is a script-enforced hard constraint. Full workflow must have review_mode selected as off, standard, or thorough before leaving the build phase, otherwise both comet guard build --apply and comet state transition build-complete will fail. Legacy state files without this field follow a compat path, but should be backfilled on recovery.
build_mode defaults to direct only for hotfix/tweak presets. Full workflow must not default to direct. Use it only when the user explicitly asks to bypass the plan execution skills and you record an explicit override:
comet state set <name> direct_override true
comet state set <name> build_mode direct
Without direct_override: true, build_mode=direct in full workflow is blocked by both guard and state transition.
Execution location:
Open has already prepared the current directory, branch, or Worktree according to isolation and returned the actual projectRoot. On resume, run comet classic workspace resolve <name> --json, enter the returned directory, then run comet state select <change-name>; do not create a Worktree, switch branches, commit a plan to transfer it across Worktrees, or rebind isolation in Build.
Execute plan: Must handle execution according to the actual runtime of build_mode.
build_mode: executing-plans: Immediately execute: Use the Skill tool to load the Superpowersexecuting-plansskill. Skipping this step is prohibited. If loading fails, stop and report the error; do not substitute with normal conversation. After the skill loads, ARGUMENTS must include the same Language constraint as Step 1:Language: Use the configured Comet artifact language from comet state get <name> language. Execute according to plan.build_mode: subagent-driven-development: The main session only coordinates and must not write implementation code directly. Immediately execute: Use the Skill tool to load the Superpowerssubagent-driven-developmentskill. After the skill loads, readcomet-classic/reference/subagent-dispatch.mdfor Comet-specific extensions (subagent dispatch, task isolation, checkoff verification, TDD constraints, continuous execution, context recovery) and apply them alongside the skill's workflow. If they conflict, the more specific Comet extensions take precedence.- If subagent dispatch fails, follow
comet-classic/reference/subagent-dispatch.mdto record the current task asBLOCKEDwith the failure reason; the main session must not take over implementation.
TDD Mode Execution Constraints:
If tdd_mode: tdd:
build_mode: executing-plans: After loading the execution skill and before executing the first task, Immediately execute: Use the Skill tool to load the Superpowerstest-driven-developmentskill once. Skipping this step is prohibited. After the skill loads, start from the first unchecked task and follow the loaded TDD Red-Green-Refactor cycle for each task. Must not skip the failing test verification phase. Do not reload this skill for subsequent tasks; follow the already-loaded flow. If resuming after context compaction, re-run this step to load the TDD skill once, then continue from the first unchecked task.build_mode: subagent-driven-development: The main session does not load the TDD skill. TDD constraints and evidence thresholds are defined incomet-classic/reference/subagent-dispatch.md; every background implementer and fix agent must use the Skill tool to load the Superpowerstest-driven-developmentskill and follow the Comet-injected TDD hard constraint.
If tdd_mode: direct: Follow normal flow, no enforced TDD.
executing-plans review gate:
Under executing-plans, the main session executes tasks directly (no isolated implementer subagent), so there is no per-task reviewer as in subagent-driven-development. Code review is done against completed diffs and scales with review_mode:
review_mode: off: No automatic code review. Do not loadrequesting-code-review. Record the skip reason in the verification report draft or tasks.md.review_mode: standard: After all planned tasks are complete and before the build → verify phase guard, use the Skill tool to load the Superpowersrequesting-code-reviewskill once and request one lightweight code review (correctness, security, edge cases) scoped to the whole change.review_mode: thorough: In addition to the single final review, request one segmented code review per task segment (every 3 tasks, scoped to that segment's diff). If total tasks ≤ 3, skip the mid-execution segments and only do the final review. Each segment review usesrequesting-code-reviewagainst the segment's commit range. This is the closest equivalent tosubagent-driven-development's per-task review thatexecuting-planscan offer, since it has no isolated implementer to review per task.
Requirements (apply to standard and thorough):
- the
requesting-code-reviewskill must be loaded beforecomet guard <change-name> build --apply - if loading
requesting-code-reviewfails understandardorthorough, stop and ask the user to resolve the error and retry, or explicitly switch toreview_mode: offwith a recorded reason; never skip the gate or continue guard before that explicit switch - CRITICAL review findings (security vulnerabilities, data loss risk, build/test failures) must be fixed first and must not be carried into verify
- if non-CRITICAL review findings are accepted, record the acceptance reason and impact scope in tasks.md, the commit body, a verification report draft, or another durable artifact
3b. In-Execution Debugging (Debug Gate)
During task execution, whenever a crash, unexpected behavior, test failure, or build failure appears while running the program, tests, build, or manual verification, must use the Skill tool to load the Superpowers systematic-debugging skill. Before root-cause investigation is complete, must not propose or implement source-code fixes.
For specific investigation, minimal failing test, fix verification, and keeping the current change verification loop, follow comet-classic/reference/debug-gate.md.
4. Spec Incremental Updates
When the initial spec is found incomplete during implementation, handle by scale:
| Scale | Trigger Conditions | Approach |
|---|---|---|
| Small | Missing acceptance scenarios, edge cases | Directly edit delta spec + design.md, append tasks.md tasks |
| Medium | Interface changes, new components, data flow changes | Pause, present the choice, and wait for the user to explicitly confirm, then must use Skill tool to load the Superpowers brainstorming skill to update Design Doc + delta spec |
| Large | Brand-new capability requirements | Pause, present the split choice, and wait for the user to explicitly confirm; after user confirms, create independent change through /comet-open |
50% Threshold Determination: Using initial task count in tasks.md as baseline, if new tasks exceed half of that total, it's considered outside original plan scope, must follow the comet-classic/reference/decision-point.md protocol to pause and wait for the user to decide whether to split into a new change.
When creating an independent change, must invoke /comet-open, not /opsx:new directly. /comet-open creates both OpenSpec artifacts and .comet.yaml, preventing the new change from leaving the Comet state machine.
User choices must include:
- "Split into new change" — create independent change via
/comet-open - "Continue in current change" — record scope-expansion decision, update tasks.md and delta spec, then continue
Principles:
- Delta spec is a living document, can be modified at any time during this phase
- Each update should be committed with commit message explaining the change reason
- Do not sync to main spec in advance, sync uniformly during archiving
- For small-scale incremental direct delta spec edits, note in commit message to facilitate design doc drift assessment during archiving
Handoff synchronization: adding, modifying, or removing a delta spec expires the design handoff pack (handoff_hash). During Build you can regenerate it directly without reverting the current phase or step:
comet handoff <change-name> design --write
Regeneration rebuilds the handoff from the current OpenSpec artifacts and updates handoff_hash; it does not change the phase field or the Runtime currentStep, so you can continue in the Build phase after refreshing.
5. Context Management
Build is the longest phase and may span many tasks. To support resume after context compaction:
- After each task: complete acceptance per the current execution branch and
review_modebefore checking off and committing.subagent-driven-developmentdispatches no per-task reviewer underoff; understandard, a per-task reviewer fires only when the task hits a risk signal; underthorough, every task gets a per-task reviewer. All modes must perform targeted verification by unique task text. Parse tasks.md checkboxes to count remaining work without rereading unrelated task bodies - Context compression recovery: Follow
comet-classic/reference/context-recovery.mdwith phase set tobuild. - User manual-change resume: handle uncommitted changes through
comet-classic/reference/dirty-worktree.md. That protocol defines checks, attribution, and prohibitions. Build-specific handling:- After attribution, if the diff implies plan or spec changes, handle it through Step 4 "Spec Incremental Updates"
- Long task split: if a single task exceeds 200 lines of code changes, consider splitting it into multiple subtasks and commits
Exit Conditions
- All tasks.md checked
- Code committed
- Project-specific build/tests explicitly run and pass; do not rely only on guard auto-detection
isolationhas been written ascurrent,branch, orworktreebuild_modehas been written assubagent-driven-development,executing-plans, ordirectwith explicit override; ifsubagent-driven-development,subagent_dispatchmust beconfirmedtdd_modehas been written astddordirectreview_modehas been written asoff,standard, orthorough- Code review has been completed per the
executing-plansreview gate (Section "Execute plan") for the chosenreview_mode: understandardorthorough, code review has been requested and CRITICAL review findings fixed or non-CRITICAL acceptance rationale recorded; underreview_mode: off, the reason for skipping automatic code review has been recorded in a persistent artifact - Phase guard: Run
comet guard <change-name> build --apply; after all PASS, state advances tophase: verify
Guard runs the inferred project build check (npm run build, Maven, or Cargo when detected). When the inferred command fails, guard prints the command output as evidence for debugging.
If the project has no automatically inferred build command, the user or Agent must run the real build command first, then record its evidence separately:
comet state record-check <change-name> build --command "<actual build command>" --exit-code 0
--command records command text only; Comet never executes it. Build and verify evidence are separate and cannot substitute for each other. COMET_SKIP_BUILD=1 is only a compatibility bypass for legacy workflows, not auditable build evidence.
Before exit, run guard to auto-transition:
comet guard <change-name> build --apply
State file is automatically updated to phase: verify, verify_result: pending.
Automatic Handoff to Next Phase
Follow comet-classic/reference/auto-transition.md. Key command:
comet state next <change-name>
NEXT: auto→ invoke the skill pointed to bySKILLto enter the next phaseNEXT: manual→ do not invoke the next skill; return control withHINT, end the invocation, and do not create another confirmation pointNEXT: done→ workflow is complete, no further action needed
Frequently asked questions
What to verify before installation and use
What does the comet-build source document cover?
Before starting or recovering, read and follow comet-classic/reference/classic-layout.md. Every OpenSpec CLI call in this file must use the adapter, and every file path must use the logical roots bound by that protocol.
How do I install comet-build?
The source record exposes this install command: npx skills add https://github.com/rpamis/comet --skill "assets/skills/comet-build". Inspect the command and pinned source before running it.
Which permission-related actions were detected?
Static rules flagged exec-script, read-files in the source; the page lists the matching lines and excerpts.
Alternatives
Compare before choosing
rpamis/comet
comet-build
Comet Phase 3: Plan and Build. Invoke with /comet-build. Create plans and select execution method (subagent or direct) for implementation.
garrytan/gbrain
bulk-ingestion
End-to-end discipline for turning any large data source (audio libraries, email takeouts, document corpora, chat exports, API dumps) into brain pages at scale. The lifecycle spine: SCHEMA → ACCESS → TRIAL → EVALUATE → IMPROVE → CODIFY → TEST → SKILLIFY → BULK → MONITOR. State is tracked in a durable JSON manifest (see MANIFEST-PATTERN.md) so any crash, session boundary, or subagent fan-out resumes from ground truth instead of memory.
alirezarezvani/claude-skills
app-store-optimization
App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist
wanshuiyin/Auto-claude-code-research-in-sleep
citation-audit
Use it for operations and research tasks; the detail page covers purpose, installation, and practical steps.