Constraint-first development framework that makes ALL constraints visible BEFORE implementation.
TRADITIONAL MANIFOLD
───────────────────────────────── ─────────────────────────────────
Spec → Design → Build → Test All constraints exist NOW
Discover problems during build Problems visible before build
Sequential planning Constraint satisfaction
Forward reasoning Backward from outcome
| I want to... | Go to |
|---|---|
| Get running in 15 minutes | Quickstart |
| See a full feature walkthrough | Walkthrough |
| Look up a CLI command | CLI Reference |
| Understand the terminology | Glossary |
| Use pre-built constraint patterns | Templates |
| Generate PRDs and user stories | PM Guide |
| Fix something that's broken | Troubleshooting |
| Contribute to Manifold | Contributing |
- Constraint-First Development — Surface all constraints before writing code
- Backward Reasoning — Reason from desired outcomes to required truths
- Tension Detection — Find conflicts between constraints early
- All-at-Once Generation — Generate code, tests, docs, runbooks, and alerts from a single source
- Evidence System — Verify constraints with concrete proof
- Constraint Templates — Pre-built patterns for auth, CRUD, API, payment, and 13 PM templates
- Light Mode — Simplified 3-phase workflow for quick changes
- PM Workflows — Generate PRDs and user stories with constraint traceability
- Parallel Execution — Run independent tasks concurrently using git worktrees
- Native CLI — Fast, deterministic operations (<100ms) for CI/CD
- Multi-Agent Support — Works with Claude Code, AMP, Gemini CLI, and Codex CLI
claude plugin:install github:dhanesh/manifold#pluginThis installs Manifold as a native Claude Code plugin, giving you:
- 12 slash commands (
/manifold:m0-initthrough/manifold:parallel) - 2 hooks (context preservation across compaction + schema injection at session start)
- Constraint templates (auth, CRUD, API, payment, + 13 PM templates)
/manifold:setupcommand to install the native CLI binary
After installing the plugin, run /manifold:setup inside Claude Code to get the fast CLI binary.
curl -fsSL https://raw.githubusercontent.com/dhanesh/manifold/main/install/install.sh | bashThe installer auto-detects which AI agents you have and installs per-agent:
| Agent | What Gets Installed | Location |
|---|---|---|
| Claude Code | 12 slash commands (.md), parallel library, hooks, schema snippet in CLAUDE.md |
~/.claude/commands/, lib/, hooks/ |
| AMP | Same as Claude Code | ~/.amp/commands/, lib/, hooks/ |
| Gemini CLI | Translated .toml commands, parallel bundle (.js), schema snippet in GEMINI.md |
~/.gemini/commands/, lib/ |
| Codex CLI | SKILL.md skill dirs, hook skills, parallel bundle, schema snippet in AGENTS.md |
~/.agents/skills/manifold-*/, ~/.codex/lib/ |
| CLI binary | manifold binary for your platform (darwin/linux, arm64/x64) |
/usr/local/bin/ or ~/.local/bin/ |
Specifically, the installer creates:
commands/— 12 Manifold slash command files (m0-init through parallel, plus SCHEMA_REFERENCE)lib/parallel/— 11 TypeScript modules for git worktree-based parallel executionhooks/— 2 hooks:manifold-context.ts(context preservation) andauto-suggester.ts(parallel suggestions)skills/manifold/SKILL.md— Overview skill for/manifoldcommand- Schema snippet appended to your agent's instruction file (CLAUDE.md, GEMINI.md, or AGENTS.md)
The installer is idempotent — running it again updates existing files without duplication. Run install.sh --validate to check what was installed. See Uninstall to remove.
Verify it worked:
manifold --versionDownload platform-specific binaries from Releases:
# macOS (Apple Silicon)
curl -fsSL https://github.com/dhanesh/manifold/releases/latest/download/manifold-darwin-arm64 -o manifold
# macOS (Intel)
curl -fsSL https://github.com/dhanesh/manifold/releases/latest/download/manifold-darwin-x64 -o manifold
# Linux (x64)
curl -fsSL https://github.com/dhanesh/manifold/releases/latest/download/manifold-linux-x64 -o manifold
# Linux (ARM64)
curl -fsSL https://github.com/dhanesh/manifold/releases/latest/download/manifold-linux-arm64 -o manifold
chmod +x manifold/manifold:m0-init payment-retry --outcome="95% retry success"
/manifold:m1-constrain payment-retry # Discover constraints across 5 categories
/manifold:m2-tension payment-retry # Surface conflicts: latency vs idempotency
/manifold:m3-anchor payment-retry # Backward reasoning → solution options
/manifold:m4-generate payment-retry # Create code, tests, docs, runbooks, alerts
/manifold:m5-verify payment-retry # Validate all artifacts against constraintsFor simple changes that don't need full constraint analysis:
/manifold:m-quick fix-login-bug --outcome="Fix 504 timeout on login"See Quickstart for a complete 15-minute guide, or When NOT to Use for when simpler approaches work better.
| Command | Purpose | Phase |
|---|---|---|
/manifold:m0-init |
Initialize constraint manifold | INITIALIZED |
/manifold:m1-constrain |
Discover constraints (interview-driven) | CONSTRAINED |
/manifold:m2-tension |
Surface constraint conflicts | TENSIONED |
/manifold:m3-anchor |
Backward reasoning from outcome | ANCHORED |
/manifold:m4-generate |
Create all artifacts simultaneously | GENERATED |
/manifold:m5-verify |
Validate against constraints | VERIFIED |
/manifold:m6-integrate |
Wire artifacts together | - |
/manifold:m-status |
Show current state | - |
/manifold:m-solve |
Generate parallel execution plan | - |
/manifold:m-quick |
Light mode: 3-phase workflow | - |
/manifold:parallel |
Execute tasks in parallel worktrees | - |
The CLI provides instant operations without AI round-trips. See CLI Reference for complete documentation.
manifold status [feature] # Show manifold state
manifold validate [feature] # Validate schema (exit 2 = invalid)
manifold init <feature> # Initialize new manifold
manifold verify [feature] # Verify artifacts exist
manifold graph [feature] # Visualize constraint network
manifold show [feature] # Combined JSON+MD view
manifold solve [feature] # Parallel execution plan
manifold migrate [feature] # Convert YAML → JSON+MD
manifold completion [shell] # Shell completions (bash/zsh/fish)When to use CLI vs AI commands:
- CLI: Status checks, CI/CD validation, visualization, quick verification
- AI: Constraint discovery, tension analysis, code generation
INITIALIZED → CONSTRAINED → TENSIONED → ANCHORED → GENERATED → VERIFIED
↑ |
└──────────────────── (iteration) ─────────────────────────────┘
Each phase builds on the previous:
- Initialize — Name the feature, state the outcome
- Constrain — Interview-driven discovery across 5 categories (business, technical, UX, security, operational)
- Tension — Find and resolve conflicts between constraints
- Anchor — Reason backward from outcome to derive required truths
- Generate — Create ALL artifacts (code, tests, docs, runbooks, alerts) simultaneously
- Verify — Validate every artifact against every constraint with evidence
See the Walkthrough for a real example with actual outputs.
| Type | Meaning | Priority | Example |
|---|---|---|---|
| invariant | Must NEVER be violated | Highest | "No duplicate payments" |
| boundary | Hard limits | Medium | "Retry window ≤ 72 hours" |
| goal | Should be optimized | Lowest | "95% retry success rate" |
| Category | ID Prefix | Focus |
|---|---|---|
| Business | B1, B2... | Revenue, compliance, stakeholders |
| Technical | T1, T2... | Performance, integration, data |
| User Experience | U1, U2... | Response times, errors, accessibility |
| Security | S1, S2... | Data protection, auth, audit |
| Operational | O1, O2... | Monitoring, incidents, deployment |
Manifold uses JSON+Markdown hybrid format stored in .manifold/:
.manifold/
├── <feature>.json # Structure (IDs, types, phases)
├── <feature>.md # Content (statements, rationale)
└── <feature>.verify.json # Verification results
Legacy YAML format (
.yamlfiles) is still supported. Usemanifold migrateto convert.
| Field | Valid Values |
|---|---|
phase |
INITIALIZED, CONSTRAINED, TENSIONED, ANCHORED, GENERATED, VERIFIED |
constraint.type |
invariant, goal, boundary |
tension.type |
trade_off, resource_tension, hidden_dependency |
tension.status |
resolved, unresolved |
required_truth.status |
SATISFIED, PARTIAL, NOT_SATISFIED, SPECIFICATION_READY |
convergence.status |
NOT_STARTED, IN_PROGRESS, CONVERGED |
See Schema Reference for complete documentation.
Pre-built constraint patterns for common scenarios:
/manifold:m0-init user-auth --template=auth # Authentication flows
/manifold:m0-init user-crud --template=crud # CRUD operations
/manifold:m0-init payment-flow --template=payment # Payment processing
/manifold:m0-init api-endpoint --template=api # API endpointsSee Constraint Templates for all 17 templates including PM-specific patterns.
# Validate manifolds (exit 2 = validation failure)
manifold validate --json
# Verify artifacts exist
manifold verify --json
# Evidence verification (strict mode for CI)
manifold verify --verify-evidence --strict --json# .github/workflows/ci.yml
jobs:
manifold:
uses: dhanesh/manifold/.github/workflows/manifold-verify.yml@main
with:
fail-on-gaps: false # Set true to fail on non-blocking gapsRun independent tasks concurrently using isolated git worktrees:
/manifold:parallel "implement auth module" "add logging middleware" "create user tests"See Parallel Agents Guide for configuration and advanced usage.
Generate PRDs and user stories with constraint traceability:
/manifold:m0-init mobile-checkout --template=pm/feature-launch
/manifold:m1-constrain mobile-checkout
/manifold:m2-tension mobile-checkout
/manifold:m3-anchor mobile-checkout
/manifold:m4-generate mobile-checkout --prd --storiesSee PM Guide for detailed workflows and PM Templates for all 10 PM-specific templates.
Manifold's constraint-first approach extends beyond software:
| Domain | Best For |
|---|---|
| Research/Analysis | Methodology design, study planning |
| Business | Strategic decisions, expansion planning |
| Personal | Major life decisions, career choices |
| Creative | Project planning (not creative direction) |
See Non-Programming Guide for adapted categories and examples.
| Document | Description |
|---|---|
| Quickstart | Get started in 15 minutes |
| CLI Reference | Complete CLI command documentation |
| Evidence System | Evidence types and verification |
| Walkthrough | End-to-end feature example |
| Glossary | Plain-language terminology |
| Troubleshooting | Common errors and fixes |
| When NOT to Use | Know when simpler approaches work |
| Scientific Foundations | Research supporting each phase |
| Contributing | How to contribute |
curl -fsSL https://raw.githubusercontent.com/dhanesh/manifold/main/install/uninstall.sh | bashMIT