Skip to main content

Magic Specification-Driven Development (SDD) Workflow

Project description

๐Ÿช„ Magic Spec

NPM version PyPI version License: MIT

๐Ÿ“– Description

The Specification-Driven Development (SDD) Operating System for AI Coding Agents.

Stop your AI from writing fragile code before it fully understands the problem. magic-spec installs a high-performance, structured pipeline โ€” Thought โ†’ Spec โ†’ Task โ†’ Run โ†’ Code โ€” directly into any project, regardless of the tech stack.

Whether you are a coding novice building your first application or a senior engineer architecting enterprise systems, Magic Spec brings maximum automation and professional rigor to your development process. It enforces a deterministic workflow that ensures your AI agent perfectly aligns with your vision before writing a single line of code.

The Core Concept

magic-spec is a set of markdown-based workflow instructions specifically designed for AI coding agents like Cursor, Windsurf, Claude, and Gemini. It acts as a project-level operating system that orchestrates agentic development.

Instead of chaotic prompt-engineering, Magic Spec provides a rigorous pipeline:

๐Ÿ’ก Idea  โ†’  ๐Ÿ“‹ Specification  โ†’  ๐Ÿ—บ๏ธ Task & Plan  โ†’  โšก Run  โ†’  ๐Ÿš€ Code

Once initialized, your AI agent will automatically:

  • Formulate a strong conceptual and technical specification.
  • Build a phased implementation plan with hierarchical dependencies.
  • Decompose the plan into prioritized, atomic, trackable tasks.
  • Facilitate safe architectural brainstorming via Explore Mode.
  • Analyze its own workflow and suggest improvements via Auto-Retrospectives.

What Gets Installed

After running the installer, your project directory will be augmented with the following structure:

root-project/
โ”œโ”€โ”€ .agent/workflows/         # Slash commands wrapper (e.g., magic.spec, magic.task)
โ”œโ”€โ”€ .magic/                   # The SDD Engine (workflow logic and scripts - read-only)
โ””โ”€โ”€ .design/                  # Your Project Design Workspace (INDEX.md, RULES.md, PLAN.md)
  1. .magic/: Deploys the core SDD engine.
  2. .agent/: Sets up workflows for your AI.
  3. .design/: Initializes your project's workspace for Specifications, Rules, and Plans.
  4. Onboarding: An interactive tutorial (magic.onboard) helps you and your AI get started smoothly.

๐Ÿ–ผ๏ธ Visuals

The engine operates on a smart, self-correcting feedback loop:

graph TD
    IDEA["๐Ÿ’ก Idea"] --> INIT{"๐Ÿ—๏ธ Auto-Init"}
    INIT -->|.design/ exists| SPEC
    INIT -->|.design/ missing| CREATE["Create .design/ structure"] --> SPEC
    SPEC["๐Ÿ“‹ Specification"] <--> RULE["๐Ÿ“œ Rule"]
    SPEC --> TASK["๐Ÿ—บ๏ธ Task & Plan"]
    TASK --> RUN["โšก Run"]
    RUN --> CODE["๐Ÿš€ Code"]
    RUN -.->|"auto: phase done"| RETRO["๐Ÿ” Retrospective"]
    RETRO -.->|Feedback loop| SPEC

โš™๏ธ Requirements

Before installing Magic Spec, ensure you have one of the following available on your system:

Requirement Details
Node.js Version 16.x or higher (for npx method)
Python Version 3.8 or higher (for uvx or pipx methods)
Git Required for installing edge versions directly from GitHub
Terminal tar utility (pre-installed on Windows/Linux/macOS)

๐Ÿ“ฆ Installation

Works perfectly with any project โ€” Rust, Go, Python, JavaScript, C++, or anything else. No runtime lock-in.

Option A: Node.js (npx)

Stable Release:

npx magic-spec@latest

Edge Version (GitHub):

npx --yes github:teratron/magic-spec

Option B: Python (uvx)

Stable Release:

uvx magic-spec

Edge Version (GitHub):

uvx --from git+https://github.com/teratron/magic-spec.git magic-spec

Option C: Python (pipx)

pipx run magic-spec

Option D: Manual Installation

If automated installers do not fit your environment:

  1. Engine: Download the .magic/ folder from the GitHub repository.
  2. Workflows: Download command wrappers from .agent/workflows/.
  3. Deploy: Place files into your AI agent's instruction directory (e.g., .cursor/commands).

๐Ÿš€ Usage

Just talk to your AI agent naturally in your prompt interface. No complex commands to learn:

  • "Dispatch this thought into specs..." โ†’ Triggers Specification workflow.
  • "Create an implementation plan" โ†’ Triggers Task & Plan workflow.
  • "Execute the next task" โ†’ Triggers Run workflow.
  • "Add a rule: always use Inter font" โ†’ Triggers Rule workflow.

๐Ÿค Compatibility

Magic Spec is heavily optimized and provides native workflow generation for the world's most powerful AI development environments:

AI Agent / IDE Installation Flag
Cursor (Agent Mode) --cursor
Windsurf (Cascade) --windsurf
Claude Code --claude
Gemini CLI --gemini
GitHub Copilot --copilot
Roo Code --roo
Amp --amp
Amazon Q Developer --q
Kilo Code --kilocode
Qwen Code --qwen
OpenCode --opencode
SHAI (OVHcloud) --shai
IBM Bob --bob
CodeBuddy --codebuddy
Qoder IDE --qoder
Codex CLI --codex
Auggie CLI --augment
Antigravity IDE --antigravity
Lingma IDE --lingma

๐Ÿ“š Documentation

  • Main Documentation โ€” Detailed guide on workflows, architecture, and advanced features.
  • Installers Guide โ€” Advanced CLI options and platform specifics.
  • Contributing โ€” How to develop, test, and extend the engine.

๐Ÿ›Ÿ Support

If you encounter issues or have questions:

  • Open an Issue on GitHub.
  • Run magic.onboard in your agent to restart the interactive tutorial.

๐Ÿ—บ๏ธ Roadmap

  • Multi-agent adapter system.
  • Phased implementation planning.
  • Extended support for local-first LLM agents.
  • Advanced visual dashboard for project health.
  • Integration with CI/CD for automated spec validation.

๐Ÿค Contributing

We welcome contributions! Whether it's a bug fix, a new adapter, or an improvement to the workflow logic. Please see Contributing Guide for details.

๐Ÿ‘ฅ Authors and Acknowledgments

  • Oleg Alexandrov โ€” Creator and Lead Maintainer.
  • Special thanks to the AI agent community for inspiration and testing.

๐Ÿ“„ License

Distributed under the MIT License.

๐Ÿ“Š Project Status

Active Development (v1.x). We are constantly refining the SDD engine based on real-world usage.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

magic_spec-1.3.2.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

magic_spec-1.3.2-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file magic_spec-1.3.2.tar.gz.

File metadata

  • Download URL: magic_spec-1.3.2.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for magic_spec-1.3.2.tar.gz
Algorithm Hash digest
SHA256 b922b2d32a5232e7930c6d48ec8124bac2fb221a982909fce66fc7155d36e04a
MD5 841b88a606864ad74a2e21f9e6e13a4f
BLAKE2b-256 1058627780a82067d6bef52bc3ea3032cd8ca56b147bcc4eed7a2ac098b3c190

See more details on using hashes here.

File details

Details for the file magic_spec-1.3.2-py3-none-any.whl.

File metadata

  • Download URL: magic_spec-1.3.2-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for magic_spec-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 793e04094700ce60a6406d811cb53f6cc1c1e32b32a5d466cbdd0eefe26fca65
MD5 8b4fbcbf75e7eab358de8fe5b804acdf
BLAKE2b-256 b82f9f5a70ebb0abbc7206b4c3926def1397333a4e5e5bc40bc216f999be0d61

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page