How this skill is triggered — by the user, by Claude, or both
Slash command
/octo:flow-specThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**DO NOT call Skill() again. DO NOT load any more skills. Execute directly.**
DO NOT call Skill() again. DO NOT load any more skills. Execute directly.
This skill uses ENFORCED execution mode. You MUST follow this exact 8-step sequence.
Ask via AskUserQuestion BEFORE any other action.
You MUST gather these inputs from the user:
AskUserQuestion with these questions:
1. **What to specify**: Project or feature name + brief description
- "What system/feature should I specify?"
2. **Actors**: Who interacts with this system?
- Options: End Users, Developers, Admins, External Services, Other
3. **Key constraints**: What matters most?
- Options: Performance, Security, Compatibility, Scale
- (multiSelect: true)
4. **Complexity class**: How complex is this?
- Clear (well-understood, straightforward)
- Complicated (multiple parts, but knowable)
- Complex (emergent behavior, unknowns)
If user provided a description inline with the command (e.g., /octo:spec user authentication system), use that as the project description but STILL ask remaining questions (actors, constraints, complexity).
If user says "skip" for any question, note assumptions and proceed.
DO NOT PROCEED TO STEP 2 until questions answered.
Check provider availability:
command -v codex &> /dev/null && codex_status="Available" || codex_status="Not installed"
command -v gemini &> /dev/null && gemini_status="Available" || gemini_status="Not installed"
Display this banner BEFORE orchestrate.sh execution:
CLAUDE OCTOPUS ACTIVATED - NLSpec Authoring Mode
Spec Phase: Generating structured specification for [project name]
Provider Availability:
Codex CLI: ${codex_status}
Gemini CLI: ${gemini_status}
Claude: Available (Synthesis & NLSpec generation)
Estimated Cost: $0.01-0.05
Estimated Time: 3-7 minutes
Validation:
/octo:setupDO NOT PROCEED TO STEP 3 until banner displayed.
Before executing the workflow, read any prior context:
# Initialize state if needed
"${CLAUDE_PLUGIN_ROOT}/scripts/state-manager.sh" init_state
# Set current workflow
"${CLAUDE_PLUGIN_ROOT}/scripts/state-manager.sh" set_current_workflow "flow-spec" "spec"
# Get prior decisions (if any)
prior_decisions=$("${CLAUDE_PLUGIN_ROOT}/scripts/state-manager.sh" get_decisions "all")
# Get context from previous phases (e.g., discover)
prior_context=$("${CLAUDE_PLUGIN_ROOT}/scripts/state-manager.sh" read_state | jq -r '.context')
# Display what you found (if any)
if [[ "$prior_decisions" != "[]" && "$prior_decisions" != "null" ]]; then
echo "Building on prior decisions:"
echo "$prior_decisions" | jq -r '.[] | " - \(.decision) (\(.phase)): \(.rationale)"'
fi
This provides context from:
/octo:discover first)DO NOT PROCEED TO STEP 4 until state read.
You MUST execute this command via the Bash tool:
${CLAUDE_PLUGIN_ROOT}/scripts/orchestrate.sh probe "specification research for: <project description>. Key areas: actors (<actors>), constraints (<constraints>), complexity (<complexity class>)"
Incorporate the user's answers from Step 1 into the probe query to focus the research.
CRITICAL: You are PROHIBITED from:
This is NOT optional. You MUST use the Bash tool to invoke orchestrate.sh.
After orchestrate.sh completes, verify it succeeded:
# Find the latest synthesis file (created within last 10 minutes)
SYNTHESIS_FILE=$(find ~/.claude-octopus/results -name "probe-synthesis-*.md" -mmin -10 2>/dev/null | head -n1)
if [[ -z "$SYNTHESIS_FILE" ]]; then
echo "VALIDATION FAILED: No synthesis file found"
echo "orchestrate.sh did not execute properly"
exit 1
fi
echo "VALIDATION PASSED: $SYNTHESIS_FILE"
cat "$SYNTHESIS_FILE"
If validation fails:
~/.claude-octopus/logs/Read the probe synthesis file from Step 5 and the user's answers from Step 1.
Synthesize into the NLSpec template below. This is YOUR (Claude's) synthesis role - you read the multi-AI research and structure it into the specification format.
NLSpec Template:
# NLSpec: [Project Name]
## Meta
- Version: 1.0.0
- Author: [human author from user context, or "TBD"]
- Created: [today's date]
- Complexity: [clear | complicated | complex - from Step 1]
## Purpose
[1-3 sentences: what this software does and for whom. Derived from user description + probe research.]
## Actors
- **[Actor 1]**: [Role description and capabilities]
- **[Actor 2]**: [Role description and capabilities]
[Include all actors from Step 1 answers + any discovered in research]
## Behaviors
### B1: [Behavior Name]
- **Trigger**: [What initiates this behavior]
- **Preconditions**: [What must be true before execution]
- **Steps**:
1. [Step 1]
2. [Step 2]
- **Postconditions**: [What must be true after execution]
- **Edge Cases**:
- [Edge case]: [Expected handling]
### B2: [Behavior Name]
- **Trigger**: [What initiates this behavior]
- **Preconditions**: [What must be true before execution]
- **Steps**:
1. [Step 1]
- **Postconditions**: [What must be true after execution]
- **Edge Cases**:
- [Edge case]: [Expected handling]
[Add as many behaviors as the research and scope warrant. Aim for 3-7 core behaviors.]
## Constraints
- **Performance**: [Latency, throughput requirements]
- **Security**: [Authentication, authorization, data handling]
- **Compatibility**: [APIs, platforms, browsers, versions]
- **Scale**: [Expected load, data volume, growth projections]
[Populate from Step 1 constraint answers + probe research findings]
## Dependencies
- **External Services**: [APIs, databases, third-party services]
- **Libraries/Frameworks**: [Required packages, minimum versions]
## Acceptance Definition
- **Satisfaction Target**: [0.0-1.0, e.g., 0.90 - based on complexity class]
- **Critical Behaviors**: [Which behaviors must achieve 1.0 satisfaction]
Guidelines for synthesis:
Check the generated NLSpec for completeness:
Verify each section:
Calculate completeness score:
Flag any issues:
Display validation report to user.
If VSCode is active and Claude Code supports plan view (v2.1.70+):
Use EnterPlanMode to present the generated NLSpec as a structured plan that the user
can review, comment on, and approve through the native plan UI. This provides a richer
review experience than plain markdown output.
EnterPlanMode with the NLSpec content as the plan body
If plan mode is not available or the user is in terminal mode: Skip this step and proceed to Step 8 (file save).
This aligns the spec workflow with Claude Code's native structured planning features when they are available, while falling back gracefully to file-based output.
Save the NLSpec:
Default filename: spec.md in the current working directory.
If user specified a different filename, use that instead.
# Write the NLSpec to file (use Write tool, not Bash)
Update state with spec context:
# Extract summary for state
spec_summary="NLSpec generated for [project name] with [N] behaviors, complexity: [class]"
# Update spec phase context
"${CLAUDE_PLUGIN_ROOT}/scripts/state-manager.sh" update_context \
"spec" \
"$spec_summary"
# Update metrics
"${CLAUDE_PLUGIN_ROOT}/scripts/state-manager.sh" update_metrics "phases_completed" "1"
"${CLAUDE_PLUGIN_ROOT}/scripts/state-manager.sh" update_metrics "provider" "codex"
"${CLAUDE_PLUGIN_ROOT}/scripts/state-manager.sh" update_metrics "provider" "gemini"
"${CLAUDE_PLUGIN_ROOT}/scripts/state-manager.sh" update_metrics "provider" "claude"
Present final summary to user:
NLSpec saved to: [filename]
Completeness: X/6 sections (XX%)
Behaviors defined: N
Complexity class: [clear|complicated|complex]
Satisfaction target: [0.XX]
Next steps:
- Review and refine the spec manually
- Use /octo:develop to implement from this spec
- Use /octo:embrace for full lifecycle from spec
Include attribution:
---
Multi-AI Research powered by Claude Octopus
Providers: Codex | Gemini | Claude
If any step fails:
/octo:setup and STOPSTART WITH STEP 1 CLARIFYING QUESTIONS NOW.
npx claudepluginhub jetsongdev/claude-octopusCreates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
3plugins reuse this skill
First indexed Jul 13, 2026