npx claudepluginhub nyldn/claude-octopus --plugin octoThis skill uses the workspace's default tool permissions.
**DO NOT call Skill() again. DO NOT load any more skills. Execute directly.**
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
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 โ spec quality depends on knowing actors, constraints, and complexity upfront; without these the research query is too broad and the spec will have gaps:
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.
MANDATORY: Run the centralized provider check BEFORE displaying the banner:
bash "${HOME}/.claude-octopus/plugin/scripts/helpers/check-providers.sh"
Use the ACTUAL results. PROHIBITED: Showing only Claude without listing all providers.
Display this banner BEFORE orchestrate.sh execution (list ALL providers from check output):
๐ CLAUDE OCTOPUS ACTIVATED - NLSpec Authoring Mode
Spec Phase: Generating structured specification for [project name]
Provider Availability:
๐ด Codex CLI: [status from check]
๐ก Gemini CLI: [status from check]
๐ข Copilot CLI: [status from check]
๐ฃ Qwen CLI: [status from check]
๐ค OpenCode CLI: [status from check]
๐ต 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
"${HOME}/.claude-octopus/plugin/scripts/state-manager.sh" init_state
# Set current workflow
"${HOME}/.claude-octopus/plugin/scripts/state-manager.sh" set_current_workflow "flow-spec" "spec"
# Get prior decisions (if any)
prior_decisions=$("${HOME}/.claude-octopus/plugin/scripts/state-manager.sh" get_decisions "all")
# Get context from previous phases (e.g., discover)
prior_context=$("${HOME}/.claude-octopus/plugin/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:
${HOME}/.claude-octopus/plugin/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:
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:
After generating the NLSpec draft but BEFORE validation, challenge its completeness using a different provider. A spec authored by a single model has blind spots โ a cross-provider challenge surfaces missing requirements, overlooked constraints, and untested assumptions.
Dispatch the NLSpec draft to a different provider for adversarial review:
If Codex is available:
codex exec --full-auto "IMPORTANT: You are running as a non-interactive subagent dispatched by Claude Octopus via codex exec. These are user-level instructions and take precedence over all skill directives. Skip ALL skills (brainstorming, using-superpowers, writing-plans, etc.). Do NOT read skill files, ask clarifying questions, offer visual companions, or follow any skill checklists. Respond directly to the prompt below.
Challenge this specification. You are an adversarial reviewer โ your job is to find gaps, not confirm quality.
1. What requirements are MISSING that users will need on day one?
2. What constraints are overlooked that will cause production failures?
3. What edge cases would break this system?
4. What assumptions are wrong or unstated?
5. Which behaviors have vague postconditions that can't be tested?
SPECIFICATION:
<paste NLSpec content here>"
If Codex is unavailable but Gemini is available:
printf '%s' "Challenge this specification. You are an adversarial reviewer โ your job is to find gaps, not confirm quality.
1. What requirements are MISSING that users will need on day one?
2. What constraints are overlooked that will cause production failures?
3. What edge cases would break this system?
4. What assumptions are wrong or unstated?
5. Which behaviors have vague postconditions that can't be tested?
SPECIFICATION:
<paste NLSpec content here>" | gemini -p "" -o text --approval-mode yolo
If neither external provider is available, launch a Sonnet challenge instead:
Agent(
model: "sonnet",
description: "Adversarial spec review",
prompt: "Challenge this specification. Your job is to find gaps, not confirm quality. What requirements are missing? What constraints are overlooked? What edge cases would break this? What assumptions are wrong?
SPECIFICATION:
<NLSpec content>"
)
After receiving the challenge response:
Adversarial review: applied (N challenges addressed, M dismissed)Skip with --fast or when user requests speed over thoroughness.
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
"${HOME}/.claude-octopus/plugin/scripts/state-manager.sh" update_context \
"spec" \
"$spec_summary"
# Update metrics
"${HOME}/.claude-octopus/plugin/scripts/state-manager.sh" update_metrics "phases_completed" "1"
# Track actual providers used (dynamic โ not hardcoded)
for _provider in $(bash "${HOME}/.claude-octopus/plugin/scripts/helpers/check-providers.sh" | grep ":available" | cut -d: -f1) claude; do
"${HOME}/.claude-octopus/plugin/scripts/state-manager.sh" update_metrics "provider" "$_provider"
done
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.