์ํด๋ฆญ์ผ๋ก
spectre-plan
// ๐ป | Unified planning entry point - researches, assesses complexity, routes to workflow - primary agent
// ๐ป | Unified planning entry point - researches, assesses complexity, routes to workflow - primary agent
๐ป | Transform requirements into executable tasks - primary agent
๐ป | Independent multi-lens review of plan.md and/or tasks.md โ finds overengineering, missing verification, hallucinated deps, weak references
๐ป | Unified planning entry point - researches, assesses complexity, routes to workflow - primary agent
๐ป | Transform requirements into executable tasks - primary agent
๐ป | Independent multi-lens review of plan.md and/or tasks.md โ finds overengineering, missing verification, hallucinated deps, weak references
Run the SPECTRE release workflow, including version bumps, Codex sync, global Codex install verification, GitHub release, manual npm publish handoff, npm verification, and final global Codex refresh.
| name | spectre-plan |
| description | ๐ป | Unified planning entry point - researches, assesses complexity, routes to workflow - primary agent |
| user-invocable | true |
Treat the current command arguments as this workflow's input. When invoked from a slash command, use the forwarded $ARGUMENTS value.
plan.md + tasks.md; STANDARD adds adversarial review; COMPREHENSIVE adds full research, design gate, and full review.<ARGUMENTS> $ARGUMENTS </ARGUMENTS>
โ ๏ธ NON-NEGOTIABLE: After tier routing, MICRO must produce an inline checklist; LIGHT must invoke
Skill(spectre-create_plan)andSkill(spectre-create_tasks); STANDARD/COMPREHENSIVE must invokeSkill(spectre-create_plan),Skill(spectre-create_tasks), andSkill(spectre-plan_review)(Claude slash route:/spectre:create_plan,/spectre:create_tasks, and/spectre:plan_review). Failure to invoke the required routed action is a critical error. Do NOT summarize, describe, or skip these workflows. INVOKE THEM.
After ANY user conversation or questions:
You MUST call these skills (not describe them):
skill: "spectre-create_plan" and args: "{path} --depth {tier}" โ generates plan.md, including LIGHTskill: "spectre-create_tasks" and args: "{path} --depth {tier}" โ generates tasks.mdskill: "spectre-plan_review" and args: "{OUT_DIR} --mode {adversarial|full} --auto-apply scope-safe" โ reviews and integrates scope-safe feedback for STANDARD/COMPREHENSIVEtasks.md or plan.md โ use scoped namesconcepts/scope.md (then specs/prd.md / specs/ux.md when present) as canonical. Plan generation, task generation, review, and feedback integration may change implementation approach, sequencing, verification, references, and YAGNI fences, but MUST NOT cut, narrow, expand, or reinterpret the agreed scope without an explicit user scope-change gate.Action โ DetermineOutputDir:
OUT_DIR=docs/tasks/{branch_name} (or user-specified)mkdir -p "${OUT_DIR}"Action โ ScanExistingContext: Read existing artifacts in {OUT_DIR}/ if present: task_context.md, specs/plan.md, specs/tasks.md, concepts/scope.md, specs/ux.md, research/*.md. Extract filled assumptions from scope/UX for later design review.
Action โ CheapLocalScan: Use only thread context, provided files, existing artifacts, and cheap local search (rg, filenames, package manifests). Do not spawn subagents.
Action โ CheckHardStops: Any true = automatic COMPREHENSIVE.
db_schema_destructive โ drops, renames, or non-additive column changesdata_migration_required โ backfill, transform, or row-by-row data changenew_service_or_component โ net-new service, daemon, or top-level componentauth_or_pii_change โ authn/authz flow, session handling, PII storage/exposuresecrets_or_credentials_handling โ new secret introduced, rotation, or boundary changepayment_billing_logic โ money flow, invoicing, charge logicpublic_api_change โ externally-consumed API surface modifiedconcurrent_writes_or_locking โ concurrency, locking, or distributed coordinationcaching_consistency โ cache invalidation, staleness windows, multi-tier cachingcross_service_or_cross_workspace_change โ coordinated change across services or workspacesslo_sla_risk โ latency, throughput, or availability budget at stakeAction โ DetermineTier:
| Tier | Use when |
|---|---|
| MICRO | Obvious <=1 file change, no artifact needed, no hard-stop. |
| LIGHT | Clear internal change, known pattern, roughly <=5 files / 1-2 components, no hard-stop. |
| STANDARD | Multi-file or moderate ambiguity, no hard-stop, needs adversarial execution-readiness review. |
| COMPREHENSIVE | Any hard-stop, new architecture/service/component, high ambiguity, or broad blast radius. |
When unsure between adjacent tiers, prefer the lower tier if the missing information can be checked during execution; prefer the higher tier if the uncertainty affects scope, security/privacy, data correctness, public API behavior, or rollback safety.
Action โ LogTier: Note the assessed tier in your response for transparency, then proceed immediately to the next step. Do NOT ask for confirmation.
Action โ ResearchByTier:
| Tier | Research budget |
|---|---|
| MICRO | None. Use cheap scan only. |
| LIGHT | None by default; dispatch @finder only if files are unclear. |
| STANDARD | Dispatch only missing dimensions, max two of @finder, @analyst, @patterns. No @web-research unless new external dependency/API/framework is likely. |
| COMPREHENSIVE | Dispatch all needed dimensions: @finder, @analyst, @patterns, and @web-research only when external choices matter. |
Action โ SaveResearch: For MICRO, skip artifacts. Otherwise write {OUT_DIR}/task_context.md with ## Technical Research plus any filled assumptions. Keep it concise; downstream skills must consume this instead of repeating research.
CHECKPOINT: After determining tier and completing its research budget, proceed IMMEDIATELY to Step 3 for STANDARD/COMPREHENSIVE, or Step 4 for MICRO/LIGHT. Do NOT end turn here. Do NOT ask user to confirm the tier.
SKIP IF MICRO/LIGHT โ proceed directly to Step 4. LIGHT still generates a real plan; it skips the human alignment gate.
Goal: align on the shape of the solution before generating a full plan. This catches misalignments early and gives the user a chance to redirect before reading a long plan doc.
Action โ PresentDesign: Synthesize research from Step 2 into a single proposed approach with open questions. Present inline (do not write a separate design file).
Format:
Here's the high-level design I'd take. Scan the shape, then resolve any open questions or push back on the approach.
Approach: [1-2 paragraph summary of the solution shape โ what changes structurally, not file-by-file]
Key components touched:
path/file.tsโ [what shifts and why]path/other.tsโ [what shifts and why]Key decisions:
- [decision] โ [rationale; alternative considered]
- [decision] โ [rationale; alternative considered]
How we'll know it works (verification spine):
- [change] โ [test name | observable behavior | state condition]
- [change] โ [test name | observable behavior | state condition]
Filled assumptions (surfaced from scope.md / ux.md / inferred):
- [assumption] โ source: [scope.md / ux.md / default]
- [assumption] โ source: [scope.md / ux.md / default]
Open questions (with default assumption):
- [question] โ default: [assumption]
- [question] โ default: [assumption]
Reply with answers, edits to the approach, or 'looks good' to continue.
CRITICAL:
create_plan.create_plan and create_tasks build on.Action โ IterateDesign: If the user replies with answers, edits, or pushback, update the design and re-present. Loop until user says 'looks good' (or equivalent).
Wait โ User signals alignment.
Action โ PersistDesign: Append a "Selected Design" section to {OUT_DIR}/task_context.md capturing the agreed approach, key decisions, and resolved questions. This is what create_plan consumes.
CHECKPOINT: After alignment, proceed IMMEDIATELY to Step 4. This is the early gate. The next valid actions are Skill invocations that generate the draft plan, generate tasks, run plan_review, integrate scope-safe feedback, and then present the final plan/tasks for the user's final gate.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ YOU MUST USE THE SKILL TOOL TO INVOKE THESE COMMANDS โ
โ โ
โ โ WRONG: "I'll now create the plan..." โ
โ โ WRONG: "The next step would be to run /spectre:create_plan" โ
โ โ WRONG: Ending turn without invoking Skill tool โ
โ โ
โ โ
CORRECT: MICRO inline checklist OR required Skill invocations โ
โ โ
CORRECT: Skill tool with skill: "spectre-create_plan", args: "..." โ
โ โ
CORRECT: Skill tool with skill: "spectre-create_tasks", args: "..."โ
โ โ
CORRECT: Skill tool with skill: "spectre-plan_review", args: "..." โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
DO NOT:
YOU MUST:
skill: "spectre-create_plan", args: "{OUT_DIR}/task_context.md --depth {tier}"skill: "spectre-create_tasks", args: "{OUT_DIR}/task_context.md --depth {tier}"skill: "spectre-plan_review", args: "{OUT_DIR} --mode adversarial --auto-apply scope-safe"skill: "spectre-plan_review", args: "{OUT_DIR} --mode full --auto-apply scope-safe"If MICRO:
ElseIf LIGHT:
skill: "spectre-create_plan", args: "{OUT_DIR}/task_context.md --depth light --no-review"skill: "spectre-create_tasks", args: "{OUT_DIR}/task_context.md --depth light"{OUT_DIR}/specs/plan.md and {OUT_DIR}/specs/tasks.md. State that LIGHT skipped plan_review and the human execution gate by design.ElseIf STANDARD:
skill: "spectre-create_plan", args: "{OUT_DIR}/task_context.md --depth standard --no-review"skill: "spectre-create_tasks", args: "{OUT_DIR}/task_context.md --depth standard"skill: "spectre-plan_review", args: "{OUT_DIR} --mode adversarial --auto-apply scope-safe"plan_review. Confirm every scope-safe Blocker/High finding is reflected in plan.md and/or tasks.md. If plan_review produced a scope-safe suggested edit but did not apply it because it needed minor adaptation, apply the smallest artifact edit now and record it in the final summary. Do not apply Scope Change Required findings.ElseIf COMPREHENSIVE:
skill: "spectre-create_plan", args: "{OUT_DIR}/task_context.md --depth comprehensive --no-review"skill: "spectre-create_tasks", args: "{OUT_DIR}/task_context.md --depth comprehensive"skill: "spectre-plan_review", args: "{OUT_DIR} --mode full --auto-apply scope-safe"plan_review. Confirm every scope-safe Blocker/High finding is reflected in plan.md and/or tasks.md. If plan_review produced a scope-safe suggested edit but did not apply it because it needed minor adaptation, apply the smallest artifact edit now and record it in the final summary. Do not apply Scope Change Required findings.After tasks return, do a fast self-check against tier signals:
If an escalation/downgrade is triggered, surface it as a recommendation โ do NOT silently re-run. Format:
Tier reassessment: I planned this as {original tier}, but tasks revealed {signal}. Recommend re-running as {new tier}. Reply 'rerun' to regenerate or 'keep' to proceed as-is.
Only proceed past this checkpoint when the user confirms.
Action โ PresentFinalArtifacts:
{OUT_DIR}/specs/plan.md, {OUT_DIR}/specs/tasks.md, and the saved plan_review report under {OUT_DIR}/reviews/.plan_review, any additional plan-orchestrator edits applied to integrate feedback, skipped edits, and any recommendations that were blocked because they would change canonical scope.Approved to proceed to execution, or provide final feedback."Wait โ User final approval or feedback.
If feedback preserves canonical scope โ apply the smallest edits to plan.md/tasks.md, re-run plan_review {OUT_DIR} --auto-apply scope-safe if the feedback changes implementation approach, verification, dependencies, task sequencing, or references, then present the Final Gate again.
If feedback changes canonical scope โ stop and route back to /spectre:scope (or explicitly update the canonical scope artifact if the user directs it). Do not silently update plan/tasks against stale scope.
@skill-spectre:spectre-guide skill for Next Steps