plan-flow.ts
// main.ts

> Plan-Flow

> for AI-assisted development

const workflow = "structured";
// Discovery → Plan → Execute → Review
/**
* Stop coding without a plan.
* 14 commands for discovery, planning,
* execution, review, and knowledge capture.
* Autopilot mode included.
*/
terminal
$ npx planflow-ai init --claude
Installing plan-flow...
Created 14 commands
Created rules and resources
Created agent profiles
Initialized project brain
Updated CLAUDE.md
$ /setup
Indexing project patterns...
Ready! 42 files indexed.
$npx planflow-ai init

Click to see installation options

demo.md

# See it in action

A complete workflow from setup to code review

plan-flow session
commands.md

# Available Commands

Everything you need for structured development

setup.md
1export setup
2// Analyze project, detect stack, security baseline
discovery.md
1export discovery
2// Gather requirements before coding
create-plan.md
1export create-plan
2// Generate structured implementation plans
execute-plan.md
1export execute-plan
2// Execute plans phase by phase
create-contract.md
1export create-contract
2// Build integration contracts from API docs
review-code.md
1export review-code
2// Multi-agent code review with adaptive depth
review-pr.md
1export review-pr
2// Multi-agent PR analysis with adaptive depth
write-tests.md
1export write-tests
2// Generate test suites
note.md
1export note
2// Capture notes, ideas, and decisions
learn.md
1export learn
2// Extract reusable patterns from sessions
flow.md
1export flow
2// Autopilot mode with 4 workflow types
features.md

# Advanced Features

Beyond slash commands — what makes Plan-Flow different

export Autopilot Mode

Auto-chain discovery, planning, execution, and review. Supports feature, bugfix, refactor, and security workflows.

export Eval-Driven Development

Testable assertions embedded in plans with pass@k metrics tracking across phases.

export Complexity Scoring

Phases scored 0-10 to determine execution strategy. Higher scores trigger sequential execution with extra verification.

export Multi-Agent Review

Large changesets spawn 4 specialized agents (security, logic, performance, patterns) in parallel. Coordinator deduplicates, verifies, and ranks results.

export Project Brain

Persistent knowledge system capturing features, errors, decisions, and sessions in Obsidian-compatible format.

export Security Integration

Automatic baseline scanning, secret detection during execution, and dedicated security workflow with verification.

export Agent Profiles

Role-based access control limiting tool availability per command — read-only, write-restricted, or full-access.

export Session Continuity

Execution state persists across sessions. Pick up exactly where you left off.

export Adaptive Review Depth

Reviews auto-scale: lightweight (<50 lines), standard (50-500), or deep (500+) with multi-pass analysis and executive summary.

export Verification Pass

Every finding is re-examined against surrounding context. False positives are filtered, ambiguous findings tagged, and only real issues survive.

export Severity Re-Ranking

Findings sorted by impact (critical first), related issues grouped across files, and executive summary added for 5+ findings.

workflow.ts
1// Manual workflow
2const steps = [
3"1. /setup", // Index project patterns
4"2. /discovery", // Gather requirements
5"3. /create-plan", // Generate plan
6"4. /execute-plan", // Build phase by phase
7"5. /review-code", // Review before commit
8]
9// Or use autopilot mode
10const autopilot = {
11feature: "contracts → discovery → plan → execute → review",
12bugfix: "review → plan → execute → verify",
13refactor: "baseline → discovery → plan → execute → compare",
14security: "audit → discovery → plan → execute → verify",
15}
INSTALL.md

# Installation

Choose your platform and run the command in your project directory

quick-start.sh
## Quick Start (interactive)
$ npx planflow-ai init

Prompts you to select which platform(s) to install for.

Claude Code--claude
$ npx planflow-ai init --claude

Installs to .claude/commands/ and .claude/rules/

Cursor--cursor
$ npx planflow-ai init --cursor

Copies rules to rules/*.mdc

OpenClaw--openclaw
$ npx planflow-ai init --openclaw

Copies skills to skills/plan-flow/

Codex CLI--codex
$ npx planflow-ai init --codex

Copies to .agents/skills/plan-flow/

install-all.sh
## All Platforms (recommended)
$ npx planflow-ai init --all

Installs for Claude Code, Cursor, OpenClaw, and Codex CLI simultaneously.

options.md
## Additional Options
--forceOverwrite existing files
--target <dir>Target directory (defaults to current)
FAQ.md

# Frequently Asked Questions

Everything you need to know about Plan-Flow