GitHunt
JC

jcmrs/SpecDrafter

Build the right thing from the start. Two AI agents collaborate to transform ideas into implementation-ready technical specs.

SpecDrafter

License
Node Version
Claude SDK

An AI collaboration platform that helps technical specification writing through dual-Claude architecture, ensuring you build the right thing before you write a single line of code.

SpecDrafter - Where two AI minds collaborate to transform your ideas into crystal-clear technical specifications.

๐ŸŽฏ Why SpecDrafter?

Ever spent weeks building a feature only to realize it wasn't what you actually needed?

Building software without clear specifications is like constructing a house without blueprints. SpecDrafter ensures you build the right thing from the start.

The Problem: AI Coding tools performs much better with clear specifications

โŒ Requirements get lost in translation between stakeholders and developers
โŒ Over-engineering creeps in - building features nobody asked for
โŒ Technical constraints discovered too late in the process
โŒ Specs take forever to write and become outdated immediately

The Solution: Dual-AI Collaborative Intelligence

โœ… Two Specialized AI Minds Working Together:

AI Role What It Does Why It Matters
Discovery AI ๐Ÿ”ต โ€ข Talks to humans naturally
โ€ข Challenges assumptions
โ€ข Anti-over-engineering built-in
Gets to what users ACTUALLY need, not what they think they want
Review AI ๐Ÿ”ด โ€ข Technical reality checks
โ€ข Feasibility analysis
โ€ข Architecture validation
Catches problems before you write code
Screenshot 2025-08-08 at 21 34 16 Screenshot 2025-08-08 at 21 06 15

Quick Start

Prerequisites

  • Node.js 18+ (required for ES modules)
  • Claude Code installed globally
  • Valid Claude API credentials

While SpecDrafter works out of the box, installing these MCP servers greatly enhances the AI's capabilities:

  • Context7 - Provides up-to-date library documentation for Review AI's technical analysis
  • DeepWiki - Enables AI to access and search public repository documentation

These servers allow the Review AI to validate technical decisions against current best practices and real-world implementations.

Installation

# Clone the repository
git clone https://github.com/peterkrueck/SpecDrafter.git
cd SpecDrafter

# Install dependencies
npm install

# Start the application
npm start

The application will open at:

Architecture

Dual-Claude Intelligence System

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ USER INTERFACE โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                                                                              โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚  โ”‚                     โ”‚                    โ”‚                              โ”‚ โ”‚
โ”‚  โ”‚    CHAT PANEL       โ”‚                    โ”‚   COLLABORATION PANEL        โ”‚ โ”‚
โ”‚  โ”‚                     โ”‚                    โ”‚                              โ”‚ โ”‚
โ”‚  โ”‚  User โ†โ†’ Discovery  โ”‚                    โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚ โ”‚
โ”‚  โ”‚                     โ”‚                    โ”‚  โ”‚  AI Dialogue Tab       โ”‚  โ”‚ โ”‚
โ”‚  โ”‚  - Natural language โ”‚                    โ”‚  โ”‚                        โ”‚  โ”‚ โ”‚
โ”‚  โ”‚  - Requirements     โ”‚                    โ”‚  โ”‚  Discovery โ†โ†’ Review   โ”‚  โ”‚ โ”‚
โ”‚  โ”‚  - Q&A flow         โ”‚                    โ”‚  โ”‚  Real-time dialogue    โ”‚  โ”‚ โ”‚
โ”‚  โ”‚                     โ”‚                    โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚ โ”‚
โ”‚  โ”‚                     โ”‚                    โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚ โ”‚
โ”‚  โ”‚  [Generate & Review โ”‚                    โ”‚  โ”‚  Specification Tab     โ”‚  โ”‚ โ”‚
โ”‚  โ”‚   Spec Button]      โ”‚                    โ”‚  โ”‚                        โ”‚  โ”‚ โ”‚
โ”‚  โ”‚                     โ”‚                    โ”‚  โ”‚  Live spec preview     โ”‚  โ”‚ โ”‚
โ”‚  โ”‚                     โ”‚                    โ”‚  โ”‚  Markdown โ†’ HTML       โ”‚  โ”‚ โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                    โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚ โ”‚
โ”‚             โ”‚                               โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
              โ”‚
              โ”‚ User message
              โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      @review:      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                         โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ โ”‚                         โ”‚
โ”‚     DISCOVERY AI        โ”‚                    โ”‚       REVIEW AI         โ”‚
โ”‚   (Claude Instance 1)   โ”‚                    โ”‚   (Claude Instance 2)   โ”‚
โ”‚                         โ”‚ โ†โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ”‚                         โ”‚
โ”‚ โ€ข Requirements focus    โ”‚   Auto-routed      โ”‚ โ€ข Technical analysis    โ”‚
โ”‚ โ€ข User communication    โ”‚    responses       โ”‚ โ€ข Feasibility checks    โ”‚
โ”‚ โ€ข Anti-over-engineering โ”‚                    โ”‚ โ€ข Architecture review   โ”‚
โ”‚ โ€ข Spec drafting         โ”‚                    โ”‚ โ€ข No user interaction   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
             โ”‚
             โ”‚ Final specification
             โ–ผ
      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
      โ”‚ SPEC OUTPUT  โ”‚
      โ”‚              โ”‚
      โ”‚ specs/*/     โ”‚
      โ”‚  spec.md     โ”‚
      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
Screenshot 2025-08-08 at 21 33 12

Customizing AI Behavior

Each AI has its own CLAUDE.md configuration:

  • backend/workspaces/requirements-discovery/CLAUDE.md - Discovery AI behavior
  • backend/workspaces/technical-review/CLAUDE.md - Review AI behavior

Configuration

Model Selection

Choose between two Claude 4 models:

  • Opus: Best for complex projects requiring deep analysis
  • Sonnet: Balanced performance for most use cases (default)

Environment Variables

# Optional: Set custom ports
FRONTEND_PORT=3001
BACKEND_PORT=3002

# Optional: Enable debug logging
DEBUG=true

Best Practices

  1. Don't Use Claude Code While Using SpecDrafter: Avoid using Claude Code simultaneously as this can lead to context mixing
  2. Use Opus 4.1 Model: Opus 4.1 is recommended as it follows instructions best
  3. Let Discovery AI Lead: Don't jump straight to technical details
  4. Trust the Process: The anti-over-engineering principle works
  5. Watch the Collaboration: Understanding AI reasoning helps you make better decisions
  6. Iterate: Use the Review AI's feedback to refine requirements
  7. Export Early: Download specs as markdown for version control

Frequently Asked Questions

Can I use SpecDrafter without Claude Code installed?

No. SpecDrafter is built with the Claude Code SDK which requires a locally installed Claude Code CLI. You must have Claude Code installed (npm install -g @anthropic-ai/claude-code) and connected to your Anthropic account with valid API credentials. The entire dual-AI architecture depends on the Claude Code SDK for managing the AI instances.


How is this different from just using Claude or ChatGPT?

SpecDrafter implements a dual-AI system where two specialized Claude instances collaborate. Discovery AI focuses on understanding your actual needs while Review AI ensures technical feasibility. You get the benefit of two expert perspectives working together, plus a structured specification process.


Can I use this with languages other than English?

Currently, SpecDrafter is optimized for English. The AI instructions and prompts are in English, though Claude can understand other languages.


What happens to my specifications?

All specifications are stored locally in your specs/ directory. Nothing is sent to external servers except the Claude API calls for AI processing.


Can I customize the AI behavior?

Yes! Each AI's behavior is controlled by its CLAUDE.md file in the workspaces directory. You can modify these to adjust how the AIs interact with users and each other.


Why two AIs instead of one?

Separation of concerns. Discovery AI can focus entirely on understanding user needs without getting bogged down in implementation details. Review AI can be brutally honest about technical feasibility without worrying about user relationships. This creates better outcomes than a single AI trying to balance both roles.


Is this suitable for non-technical users?

Absolutely! SpecDrafter adapts its communication style based on your technical background. Non-technical users get plain English explanations, while developers can dive into technical details.


What about security? Can the Claude Code SDK access my files or execute system commands?

No. SpecDrafter implements strict security sandboxing for both AI instances:

File System Access:

  • Both AIs can ONLY access the specs/ directory in your project
  • No access to your home directory, system files, or other projects
  • Discovery AI can read/write specifications only
  • Review AI has read-only access (cannot modify any files)

Tool Restrictions:

  • No shell/bash access - Neither AI can execute system commands
  • No arbitrary code execution - AIs cannot run scripts or programs
  • Limited to safe operations: File reading, web searches, and documentation lookups
  • Discovery AI cannot spawn sub-agents (no Task tool)
  • Review AI cannot modify files (no Write/Edit tools)

What Each AI Can Do:

  • Discovery AI: Read/write specs, search web, fetch documentation
  • Review AI: Read specs only, analyze code, spawn analysis sub-agents

This sandboxing is enforced through Claude Code's permission system (.claude/settings.json in each workspace), ensuring the AIs can help you create specifications without any risk to your system or other files. You can verify these restrictions yourself in the backend/workspaces/ directory.


How can I contribute to SpecDrafter?

We welcome contributions in many ways:

  • Code Contributions: Submit PRs for bug fixes, features, or improvements
  • Documentation: Help improve docs, add examples, or translate content
  • Testing & Feedback: Use SpecDrafter and share your experience
  • Report Issues: Found a bug? Let us know!
  • Feature Ideas: Share your ideas for making SpecDrafter better

Check the Open_Issues/ folder to see documented challenges where we'd especially appreciate help. Each file contains detailed investigation notes that can help you understand the codebase better.

License

Apache License 2.0 - see LICENSE.md for details.

Acknowledgments


Remember: The best code is the code you don't have to write because you built the right thing the first time. ๐ŸŽฏ

Feel free to contact me on LinkedIn: https://www.linkedin.com/in/peterkrueck/

jcmrs/SpecDrafter | GitHunt