Написание NLSpec — структурированной спецификации на основе мульти-ИИ исследования и консенсуса.

Звёзды4 465
Авторnyldn
Установок86

Установка

SKILL.md

STOP - SKILL ALREADY LOADED

DO NOT call Skill() again. DO NOT load any more skills. Execute directly.


EXECUTION CONTRACT (MANDATORY - CANNOT SKIP)

This skill uses ENFORCED execution mode. You MUST follow this exact 8-step sequence.


STEP 1: Clarifying Questions (MANDATORY)

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.


STEP 2: Display Visual Indicators (MANDATORY - BLOCKING)

Check provider availability:

provider_status=$(bash "${HOME}/.claude-octopus/plugin/scripts/helpers/check-providers.sh")
codex_status=$(echo "$provider_status" | grep -q '^codex:available' && echo "Available" || echo "Not installed")
gemini_status=$(echo "$provider_status" | grep -q '^gemini:available' && echo "Available" || echo "Not installed")
agy_status=$(echo "$provider_status" | grep -q '^agy:available' && echo "Available" || echo "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}
Antigravity CLI: ${agy_status}
Claude: Available (Synthesis & NLSpec generation)

Estimated Cost: $0.01-0.05
Estimated Time: 3-7 minutes

Validation:

  • If no external providers are available -> STOP, suggest: /octo:setup
  • If one or more external providers are available -> Continue with available provider(s)

DO NOT PROCEED TO STEP 3 until banner displayed.


STEP 3: Read Prior State (MANDATORY - State Management)

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:

  • Prior discover phases (if user ran /octo:discover first)
  • Architectural decisions already made
  • User vision captured in earlier phases

DO NOT PROCEED TO STEP 4 until state read.


STEP 4: Execute orchestrate.sh probe (MANDATORY - Use Bash Tool)

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:

  • Researching directly without calling orchestrate.sh — direct spec writing skips the multi-AI research that surfaces edge cases, alternative architectures, and constraint interactions
  • Using web search instead of orchestrate.sh
  • Claiming you're "simulating" the workflow
  • Proceeding to Step 5 without running this command
  • Substituting with direct Claude analysis

You MUST use the Bash tool to invoke orchestrate.sh.


STEP 5: Verify Probe Synthesis (MANDATORY - Validation Gate)

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:

  1. Report error to user
  2. Show logs from ~/.claude-octopus/logs/
  3. DO NOT proceed with generating NLSpec
  4. DO NOT substitute with direct research — fallback to single-model analysis skips the multi-provider synthesis that surfaces edge cases and alternative approaches

STEP 6: Synthesize into NLSpec Format (MANDATORY)

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:

  • Use research findings to fill in realistic, specific values (not placeholders)
  • Behaviors should be concrete and testable, not vague
  • Constraints should have measurable targets where possible
  • For "clear" complexity: aim for 0.95 satisfaction target
  • For "complicated" complexity: aim for 0.90 satisfaction target
  • For "complex" complexity: aim for 0.85 satisfaction target

STEP 6.5: Adversarial Completeness Challenge (RECOMMENDED)

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 through Octopus routing to a different provider:

review_provider=""
command -v codex >/dev/null 2>&1 && review_provider="codex"
[[ -z "$review_provider" ]] && command -v agy >/dev/null 2>&1 && review_provider="agy"
[[ -z "$review_provider" ]] && command -v gemini >/dev/null 2>&1 && review_provider="gemini"

if [[ -n "$review_provider" ]]; then
  "${HOME}/.claude-octopus/plugin/scripts/orchestrate.sh" spawn "$review_provider" \
    "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>"
fi

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:

  • Review each challenge point
  • Revise the NLSpec to address valid challenges (add missing behaviors, tighten constraints, add edge cases)
  • Dismiss challenges that are out of scope — but note WHY in the spec's Non-Goals or Constraints section
  • Track changes: note in the spec's Meta section Adversarial review: applied (N challenges addressed, M dismissed)

Skip with --fast or when user requests speed over thoroughness.


STEP 7: Validate Completeness (MANDATORY - Validation Gate)

Check the generated NLSpec for completeness:

Verify each section:

  1. Purpose section exists and is non-empty (not placeholder text)
  2. Actors section has at least 1 actor with description
  3. Behaviors section has at least 1 behavior with trigger + postconditions
  4. Constraints section exists with at least 1 constraint category filled
  5. Dependencies section exists
  6. Acceptance Definition has a satisfaction target between 0.0 and 1.0

Calculate completeness score:

  • Total sections: 6 (Purpose, Actors, Behaviors, Constraints, Dependencies, Acceptance)
  • Score = sections adequately filled / 6
  • Report: "Completeness: X/6 sections (XX%)"

Flag any issues:

  • Missing sections -> "WARNING: [Section] is missing"
  • Weak sections (placeholder text, single word) -> "NOTE: [Section] could be strengthened"
  • No edge cases defined -> "NOTE: Consider adding edge cases to behaviors"

Display validation report to user.


STEP 7.5: Native Plan View Integration (OPTIONAL — CC v2.1.70+)

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.


STEP 8: Save & Update State (MANDATORY)

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 | Antigravity | Claude

Error Handling

If any step fails:

  • Step 1 (Questions): If user declines all questions, proceed with best-effort assumptions and note them
  • Step 2 (Providers): If all external providers are unavailable, suggest /octo:setup and STOP
  • Step 3 (State): If state-manager.sh fails, continue without prior state (warn user)
  • Step 4 (orchestrate.sh): Show bash error, check logs, report to user. DO NOT substitute with direct research
  • Step 5 (Validation): If synthesis missing, show orchestrate.sh logs, DO NOT proceed
  • Step 6 (Synthesis): If research is thin, generate NLSpec with what's available and flag weak sections
  • Step 7 (Completeness): Always report score, even if low
  • Step 8 (Save): If write fails, output NLSpec to chat so user can copy it

Prohibited Actions

  • CANNOT skip orchestrate.sh probe execution
  • CANNOT simulate or fake multi-AI research
  • CANNOT substitute direct Claude analysis for probe results
  • CANNOT skip completeness validation — an incomplete spec (missing actors, behaviors, or constraints) produces ambiguous implementation targets that cause rework
  • CANNOT proceed past a failed validation gate — gates exist to catch missing sections before the spec reaches implementers
  • CANNOT create working/progress files in plugin directory

START WITH STEP 1 CLARIFYING QUESTIONS NOW.

Вставить в README

Ссылка на карточку для вашего README — без картинок и счётчиков.

[DarkPlay: flow-spec](https://darkplay.ru/ai/skills/nyldn-claude-octopus-flow-spec)

Похожие скиллы и другие разделы каталога

Популярное в разделе «Скиллы»

Самые востребованные скиллов раздела по установкам и звёздам.

find-skillsvercel-labs · Помогает находить и устанавливать навыки агентов по запросам вроде «как сделать X»…
4 400 000 устан.
grill-memattpocock · Настойчивое интервью для доработки плана или дизайна.
1 600 000 устан.
hyperframesheygen-com · Обязательная точка входа для любых задач по видео, анимации и motion-графике в…
1 600 000 устан.
hyperframes-cliheygen-com · Цикл разработки HyperFrames CLI: init, add, render, preview, publish и другие команды.
1 600 000 устан.
agent-browservercel-labs · CLI для автоматизации браузера для ИИ-агентов: навигация по страницам, заполнение форм…
1 600 000 устан.
media-useheygen-com · Agent Media OS: единый навык для медиа в HyperFrames — BGM, SFX, изображения, голос, LUT.
1 500 000 устан.
hyperframes-registryheygen-com · Установка и подключение блоков реестра в композиции HyperFrames через add и catalog.
1 400 000 устан.
grill-with-docsmattpocock · Настойчивое интервью для доработки плана или дизайна, попутно создающее документацию (ADR…
1 300 000 устан.
improve-codebase-architecturemattpocock · Поиск в кодовой базе возможностей для углубления, визуальный HTML-отчёт о них и детальный…
1 300 000 устан.
tddmattpocock · Разработка через тестирование (TDD): red-green-refactor и интеграционные тесты.
1 300 000 устан.
Похожее в других разделах каталога

Соседние разделы каталога: возможно, нужный инструмент живёт там.

mattpocock-skillsmattpocock · Агентские навыки Matt Pocock для настоящей инженерии: разбор задач, потоки спецификаций и…
41 комп.
eccaffaan-m · Нативный для harness операторский слой ECC: 67 агентов, 278 навыков, 94 шима устаревших…
441 комп.
A11y Architectaffaan-m · Архитектор доступности, специализирующийся на соответствии WCAG 2.2 для веба и нативных…
225 587 ★
Add Language Rulesaffaan-m · Каркас команды workflow для add-language-rules в everything-claude-code.
225 587 ★
Architectaffaan-m · Специалист по архитектуре ПО для проектирования систем, масштабируемости и принятия…
225 587 ★
Build Error Resolveraffaan-m · Специалист по устранению ошибок сборки и TypeScript. Используйте ПРОАКТИВНО при сбое…
225 587 ★
Chief Of Staffaffaan-m · Личный руководитель коммуникаций, который сортирует почту, Slack, LINE и Messenger…
225 587 ★
Code Architectaffaan-m · Проектирует архитектуру функций, анализируя существующие паттерны и соглашения кодовой…
225 587 ★
Code Revieweraffaan-m · Эксперт по ревью кода. Проактивно проверяет код на качество, безопасность и…
225 587 ★
Cpp Build Resolveraffaan-m · Специалист по ошибкам сборки C++, CMake и линковки.
225 587 ★

Лучшие ИИ-инструменты для генерации видео

Генерация видео

Подборка нейросетей для генерации и монтажа видео. Инструменты, которые превращают текст в готовые ролики, экономят часы на съемках и постпродакшне. Подходит для SMM-специалистов,

VEED.IOVeed
По запросу
5.0
MootionMootion
По запросу
5.0
FlyviFlyvi
Есть бесплатный тариф
4.9
Google Veo 3.1Google
Платно
4.9
Sora (OpenAI)OpenAI
Платно
4.9
PikaPika
Платно
4.9
captions space
Есть бесплатный тариф
4.8
Клайп
Есть бесплатный тариф
4.8
viralpulse.appViralpulse
По запросу
4.8
Viral Maker AIViral-maker
Есть бесплатный тариф
4.8

Лучшие ИИ-инструменты для генерации текста и копирайтинга

Генерация текста и копирайтинг

Подборка нейросетей для генерации текстов и копирайтинга. Сервисы, которые помогают создавать статьи, посты и рекламные объявления с нуля или по черновику, экономя часы рутинной ра

NeuroscribeNeuroscribe
Есть бесплатный тариф
5.0
GoGPTGogpt
По запросу
5.0
ChatsonicChatsonic
По запросу
4.9
НейроТекстерNeuro-texter
По запросу
4.9
ChatGPTOpenAI
По подписке
4.9
Редактум
Есть бесплатный тариф
4.8
ChadGPTChadgpt
По запросу
4.8
Cosmo ScribeCosmoscribe
Есть бесплатный тариф
4.8
Memo HelperCopilot33
По запросу
4.8
LibraChatLibrachat
Есть бесплатный тариф
4.8

Лучшие ИИ-инструменты для генерации изображений

Генерация изображений

Подборка нейросетей для генерации изображений от фотореализма до концепт-арта. Сервисы, которые экономят часы ручной работы, создавая визуал для блогов, рекламы и дизайна за минуты

MagviMagvi
По запросу
5.0
DALL-E 3OpenAI
По подписке
5.0
SupaLabSupalab
По запросу
5.0
Freestyling.aiFreestyling
Есть бесплатный тариф
4.9
ArtGeneration.meArtgeneration
Есть бесплатный тариф
4.9
BigjpgBigjpg
По запросу
4.9
Художник от VKVK
Бесплатно
4.9
Wonderink — ИИ-книги
Есть бесплатный тариф
4.8
Avato AI12ai
По запросу
4.8
Virton AIVirton
По запросу
4.8