OpenParable
Skip to content
← Back to skills

Spec Driven Collaboration

Productivity
spec-driven-collaboration

Spec Driven Collaboration is an Agent Skill for productivity published in the majiayu000/claude-skill-registry repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Generate self-contained collaboration documents for sharing issues with external AI systems (Gemini, ChatGPT, etc.) with structural anti-skip enforcement (Execute-Verify-Record pattern at every step). Interactively gathers context, reads actual code files, loads constitutional constraints, and produces a complete 10-section package ready to paste into the target LLM. Use when the user wants to collaborate with another AI, share an issue for joint problem-solving, get a fresh perspective from a peer LLM, or needs help from an external AI that doesn't have access to the codebase. Make sure to use this skill whenever the user mentions cross-AI collaboration, sharing issues with Gemini/ChatGPT/Copilot, peer review from another AI, or wants a second opinion from an external LLM.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/majiayu000/claude-skill-registry/blob/HEAD/skills/ai-llm/spec-driven-collaboration-bankielewicz-devforgeai/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/spec-driven-collaboration, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Spec-Driven Collaboration

Generate a self-contained collaboration document that packages an issue with actual code, constitutional constraints, analysis, and targeted questions for an external AI to review.

Constitution files are THE LAW: tech-stack.md, source-tree.md, dependencies.md, coding-standards.md, architecture-constraints.md, anti-patterns.md

If ambiguous or conflicts detected: HALT and use AskUserQuestion


Execution Model

This skill expands inline. After invocation, execute Phase 01 immediately. Do not wait passively, ask permission, or offer execution options.

Self-Check (if ANY box is true = VIOLATION):

  • Stopping to ask about token budget
  • Stopping to offer execution options
  • Waiting passively after skill invocation
  • Asking "should I execute this?"
  • Skipping a phase because it "seems simple"
  • Combining multiple phases into one
  • Summarizing instead of loading a reference file
  • Skipping verification because "I already wrote the file"

IF any box checked: EXECUTION MODEL VIOLATION. Go directly to Phase 01 now.


Anti-Skip Enforcement Contract

This skill enforces structural anti-skip at every step using the Execute-Verify-Record pattern. Every mandatory step in every phase has three parts:

  • EXECUTE: The exact action to perform (Read, Write, AskUserQuestion, Glob, Grep)
  • VERIFY: How to confirm the action happened (file exists, content matches, count correct)
  • RECORD: Confirmation that the step completed successfully

Token Optimization Bias is PROHIBITED. Do not skip, compress, or shortcut any step. Every phase step exists because a previous failure proved it necessary.

Prohibited rationalizations:

  • "The template is simple enough to populate from memory" — Load the template file fresh.
  • "I already read the constitution files" — Read them again in Phase 02.
  • "The document is short, no need to verify" — Read it back to verify in Phase 05.
  • "Phase 06 is just a display, I can skip it" — Execute it fully.
  • "I can combine Phases 04 and 05" — Execute them separately, in order.

Parameter Extraction

Extract parameters from conversation context set by the /collaborate command:

Context MarkerSet ByDescription
ISSUE_DESCRIPTION/collaborateIssue description from user argument or AskUserQuestion
TARGET_AI/collaborateTarget AI platform (default: "Gemini")

Extraction Method:

  1. Search conversation for **Issue Description:** marker → ISSUE_DESCRIPTION
  2. Search conversation for **Target AI:** marker → TARGET_AI
  3. If markers not found, search for natural language context about the issue
  4. If still not found: AskUserQuestion to gather missing parameters

Phase Table

PhaseNameFileStepsKey Tools
01Context Gatheringphases/phase-01-context-gathering.md4AskUserQuestion, Glob, Grep
02Constitution Loadingphases/phase-02-constitution-loading.md3Read (×6 parallel)
03Code Collectionphases/phase-03-code-collection.md4Read, Glob, Grep
04Analysis & Template Populationphases/phase-04-analysis-template.md4Read
05Document Generationphases/phase-05-document-generation.md3Write, Read
06Completion Reportphases/phase-06-completion-report.md2Display

Phase Orchestration Loop

FOR phase_num in [01, 02, 03, 04, 05, 06]:

    1. LOAD: Read(file_path="src/claude/skills/spec-driven-collaboration/phases/{phase_file}")
       Do NOT rely on memory of previous reads. Load the phase file FRESH.

    2. EXECUTE: Follow every step in the phase file (EXECUTE-VERIFY-RECORD triplets)
       - Each step's EXECUTE instruction tells you exactly what to do
       - Each step's VERIFY instruction tells you how to confirm it happened
       - Each step's RECORD instruction confirms completion

    3. GATE: Verify all gate conditions before proceeding to next phase
       IF any gate condition fails: HALT

Critical: Load each phase file fresh using Read(). Do not execute phases from memory.


Success Criteria

  • All 6 phases executed in sequence
  • ISSUE_DESCRIPTION and TARGET_AI extracted
  • AFFECTED_FILES identified (≥1 file)
  • All 6 constitution files loaded and constraints extracted
  • All affected files read with actual code captured
  • Template loaded fresh from reference file
  • All 10 sections populated (no empty sections, no placeholders)
  • Document written to tmp/collaborate-{target}-{slug}-{date}.md
  • Document verified by read-back (≥100 lines, all 10 section headers present)
  • Completion report displayed to user

Reference Files

FilePurposeLoaded In
references/collaboration-prompt-template.md10-section output document templatePhase 04
references/context-gathering-guide.mdInteractive context gathering patternsPhase 01
references/code-collection-patterns.mdFile discovery, test finding, error capturePhase 03
references/analysis-reasoning-guide.mdHypothesis ranking, constraint analysis, question craftingPhase 04

Error Handling

ErrorPhaseResolution
No issue description from command01AskUserQuestion for description
Affected file not found03Warn user, skip file, continue
Constitution file missing02HALT — constitution files are required
Template reference missing04HALT — verify skill installation
tmp/ directory missing05Create it, then write
Write fails05Report error path, suggest manual creation
Document verification fails05HALT — re-examine document content