moonshot-decide-sequence
根据分析上下文(任务类型、复杂性、信号)确定阶段和执行链。在不确定性检测后使用。
📖 中文导读:根据分析上下文(任务类型、复杂性、信号)确定阶段和执行链。在不确定性检测后使用。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: moonshot-decide-sequence description: Determines phase and execution chain based on analysisContext (task type, complexity, signals). Use after uncertainty detection. context: fork
PM Sequence Decision
Shared schema (analysisContext.v1)
schemaVersion: "1.0"
request:
userMessage: "..."
taskType: feature|modification|bugfix|refactor|unknown
keywords: []
repo:
gitBranch: "..."
gitStatus: clean|dirty
openFiles: []
changedFiles: []
signals:
hasContextMd: false
hasPendingQuestions: false
requirementsClear: false
implementationReady: false
implementationComplete: false
hasMockImplementation: false
apiSpecConfirmed: false
estimates:
estimatedFiles: 0
estimatedLines: 0
estimatedTime: unknown
phase: planning|implementation|integration|verification|unknown
complexity: simple|medium|complex|unknown
missingInfo: []
decisions:
recommendedAgents: []
skillChain: []
parallelGroups: []
artifacts:
contextDocPath: {tasksRoot}/{feature-name}/context.md
verificationScript: .claude/agents/verification/verify-changes.sh
notes: []
Phase rules
- hasPendingQuestions == true -> planning
- implementationComplete == true && (complexity == complex or (apiSpecConfirmed && hasMockImplementation)) -> integration
- implementationComplete == true -> verification
- requirementsClear && hasContextMd && implementationReady -> implementation
- otherwise -> planning
Chain rules
Include only stages to run after moonshot-decide-sequence (do not include moonshot-* skills).
- simple: implementation-runner -> verify-changes.sh
- medium: requirements-analyzer -> implementation-runner -> codex-review-code -> efficiency-tracker
- complex: pre-flight-check -> requirements-analyzer -> context-builder -> codex-validate-plan -> implementation-runner -> codex-review-code -> codex-test-integration -> efficiency-tracker -> session-logger
Complex always includes the Codex three-step validation.
Testing Integration (ref: .claude/rules/testing.md):
- Complex chain always includes
codex-test-integration - Request additional tests if coverage < 80%
- API changes require integration tests
Security & Build Error Integration:
security-reviewer: Triggered when security concern detected (auth changes, env file modified, new dependencies)build-error-resolver: Triggered whentsc/buildfails, inserted before next implementation step
Parallel execution guide
Only run dependency-free steps in parallel. If results affect the next stage, do not parallelize.
Possible parallel examples:
- After
/moonshot-classify-task:/moonshot-evaluate-complexity+/moonshot-detect-uncertainty - After implementation:
codex-review-code+verify-changes.sh(re-run verify if review changes) - Logging:
efficiency-tracker+session-logger
Not allowed in parallel:
requirements-analyzer<->context-builder(requirements must precede)codex-validate-plan<->implementation-runner(plan validation before implementation)
Output (patch)
phase: planning
decisions.skillChain:
- pre-flight-check
- requirements-analyzer
- context-builder
decisions.parallelGroups:
- - moonshot-evaluate-complexity
- moonshot-detect-uncertainty
decisions.recommendedAgents:
- requirements-analyzer
- context-builder
notes:
- "phase=planning, chain=complex"