Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

## What Is This

Flow-Code is a Claude Code plugin for structured, plan-first development. It provides slash commands (`/flow-code:plan`, `/flow-code:work`, etc.), skills, and agents that orchestrate task tracking via a `.flow/` directory. Core engine is a Rust binary (`flowctl`) with libSQL storage (async, native vector search) and MCP server support.
Flow-Code is a Claude Code plugin for structured, plan-first development. It provides a unified entry point (`/flow-code:run`) plus individual slash commands, skills, and agents that orchestrate task tracking via a `.flow/` directory. Core engine is a Rust binary (`flowctl`) with libSQL storage (async, native vector search) and MCP server support.

## Core Architecture

Expand All @@ -18,7 +18,7 @@ hooks/hooks.json → Ralph workflow guards (active when FLOW_RALPH=1)
docs/ → Architecture docs, CI examples
```

**Skills**: 8 core + 22 extensions. See `docs/skills.md` for the full classification. Core workflow: `flow-code-run` (unified phase loop) or individual skills: planplan-reviewworkimpl-reviewepic-review.
**Skills**: 9 core + 22 extensions. See `docs/skills.md` for the full classification. Core workflow: `flow-code-run` (unified phase loop). Legacy individual skills (plan, plan-review, work, impl-review, epic-review) are deprecated but still functional as thin redirects.

**Key invariant**: The `bin/flowctl` Rust binary is the single source of truth for `.flow/` state. Always invoke as:
```bash
Expand Down Expand Up @@ -92,16 +92,16 @@ Rust: clippy for linting, cargo test for tests. No TypeScript, no npm. Skills an
- **Task duration**: `flowctl done` auto-tracks `duration_seconds` from start to completion, rendered in evidence
- **File ownership**: `flowctl task create --files <paths>` declares owned files; `flowctl files --epic <id>` shows ownership map + conflict detection
- **File locking (Teams)**: `flowctl lock --task <id> --files <paths>` acquires runtime file locks; `flowctl unlock --task <id>` releases on completion; `flowctl lock-check --file <path>` inspects lock state; `flowctl unlock --all` clears all locks between waves
- **Agent Teams mode**: `/flow-code:work` spawns workers as Agent Team teammates with plain-text protocol messages (summary-prefix routing: "Task complete:", "Spec conflict:", "Blocked:", "Need file access:", "New task:", "Access granted/denied:", native `shutdown_request`) and file lock enforcement
- **Agent Teams mode**: `/flow-code:run` (or legacy `/flow-code:work`) spawns workers as Agent Team teammates with plain-text protocol messages (summary-prefix routing: "Task complete:", "Spec conflict:", "Blocked:", "Need file access:", "New task:", "Access granted/denied:", native `shutdown_request`) and file lock enforcement
- **Adversarial review**: `flowctl codex adversarial --base main [--focus "area"]` runs Codex in adversarial mode — tries to break the code, not validate it. Returns SHIP/NEEDS_WORK with grounded findings
- **Three-layer quality system**: Layer 1: `flowctl guard` (deterministic lint/type/test, every commit). Layer 2: RP plan-review (code-aware spec validation, invoked via `/flow-code:plan-review` — RP sees full codebase via context_builder). Layer 3: `flowctl codex adversarial` (cross-model adversarial, epic completion — different model family catches blind spots). Spec conflicts and blockers forwarded to Codex for autonomous decision-making.
- **Three-layer quality system**: Layer 1: `flowctl guard` (deterministic lint/type/test, every commit). Layer 2: RP plan-review (code-aware spec validation, invoked via `/flow-code:run` plan-review phase — RP sees full codebase via context_builder). Layer 3: `flowctl codex adversarial` (cross-model adversarial, epic completion — different model family catches blind spots). Spec conflicts and blockers forwarded to Codex for autonomous decision-making.
- **Review circuit breaker**: impl-review fix loop capped at `MAX_REVIEW_ITERATIONS` (default 3) — prevents infinite NEEDS_WORK cycles
- **Auto-improve analysis-driven**: generates custom program.md from codebase analysis (hotspots, lint, coverage, memory) with Action Catalog ranked by impact — not static templates
- **Auto-improve quantitative**: captures before/after metrics per experiment, commit messages include delta `[lint:23→21]`
- **Worker self-review**: Phase 6 runs guard + structured diff review (correctness, quality, performance, testing) before commit
- **Plan auto-execute**: `/flow-code:plan` defaults to auto-execute work after planning (Teams mode handles any task count); `--plan-only` to opt out
- **Plan auto-execute**: `/flow-code:run` (or legacy `/flow-code:plan`) defaults to auto-execute work after planning (Teams mode handles any task count); `--plan-only` to opt out
- **Goal-backward verification**: worker Phase 10 re-reads acceptance criteria and verifies each is actually satisfied before completing
- **Full-auto by default**: `/flow-code:plan` and `/flow-code:work` require zero interactive questions — AI reads git state, `.flow/` config, and request context to make branch, review, and research decisions autonomously. Default mode is Worktree + Teams + Phase-Gate (all three active). Work resumes from `.flow/` state on every startup (not a special "resume mode"). All tasks done → auto push + draft PR (`--no-pr` to skip)
- **Full-auto by default**: `/flow-code:run` requires zero interactive questions — AI reads git state, `.flow/` config, and request context to make branch, review, and research decisions autonomously. Default mode is Worktree + Teams + Phase-Gate (all three active). Work resumes from `.flow/` state on every startup (not a special "resume mode"). All tasks done → auto push + draft PR (`--no-pr` to skip)
- **Cross-platform**: flowctl is a single Rust binary (macOS/Linux). RP plan-review auto-degrades to Codex on platforms where rp-cli is unavailable. Bash hooks degrade gracefully on Windows (skip, don't block)
- **Session start**: CLAUDE.md instruction (not an enforced hook) — if `.flow/` exists, run `flowctl status --interrupted` to check for unfinished work from a previous session and resume with the suggested `/flow-code:work <id>` command

Expand Down
6 changes: 3 additions & 3 deletions agents/worker.md
Original file line number Diff line number Diff line change
Expand Up @@ -515,13 +515,13 @@ Use conventional commits. Scope from task context.

**If REVIEW_MODE is `rp` or `codex`, you MUST invoke impl-review and receive SHIP before proceeding.**

Use the Skill tool to invoke impl-review (NOT flowctl directly):
Invoke impl-review via the pipeline phase system (NOT flowctl directly). The review phase is handled automatically by `flowctl worker-phase next` when REVIEW_MODE is set. If invoked manually:

```
/flow-code:impl-review <TASK_ID> --base $BASE_COMMIT
```

The skill handles everything:
The review phase handles everything:
Comment on lines 516 to +524
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section now refers to a “pipeline phase system” and implies the review phase is automatically included when REVIEW_MODE is set. In flowctl, task review is driven by flowctl worker-phase next only when it is invoked with --review <rp|codex> (and it’s distinct from epic-level flowctl phase next/done). Please clarify the terminology and conditions so workers know they must pass the review backend flag (and that this is worker-phase, not pipeline-phase).

Copilot uses AI. Check for mistakes.
- Scoped diff (BASE_COMMIT..HEAD, not main..HEAD)
- Receipt paths (don't pass --receipt yourself)
- Sending to reviewer (rp or codex backend)
Expand All @@ -534,7 +534,7 @@ If NEEDS_WORK:
1. Increment `REVIEW_ITERATIONS`
2. Fix the issues identified
3. Commit fixes
4. Re-invoke the skill: `/flow-code:impl-review <TASK_ID> --base $BASE_COMMIT`
4. Re-invoke review: `/flow-code:impl-review <TASK_ID> --base $BASE_COMMIT`

Continue until SHIP verdict. Save final `REVIEW_ITERATIONS` count for Phase 10 evidence.
<!-- /section:review -->
Expand Down
128 changes: 0 additions & 128 deletions codex/agents/agents-md-scout.toml

This file was deleted.

149 changes: 0 additions & 149 deletions codex/agents/build-scout.toml

This file was deleted.

Loading