Skip to content
This repository was archived by the owner on Apr 11, 2026. It is now read-only.

Commit d41495c

Browse files
z23ccclaude
andcommitted
feat: RP Orchestrate pattern adoption — parallel explore, plan-as-contract, concurrency awareness (v0.1.50)
- Brainstorm phase now spawns 3 parallel explore agents (patterns, gaps, impact) before context_builder call for multi-dimensional codebase analysis - flowctl worker-prompt outputs PLAN CONTRACT preamble (workers must read epic spec first, implement only their task) and CONCURRENT_WORKERS block (other active tasks + locked files) - worker.md Phase 2 restructured: plan-as-contract (2.0), concurrency awareness (2.1), read specs (2.2) — workers parse concurrent context and escalate file conflicts - Codex step-03-find-ready.md updated with lock + worker-prompt generation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3af37bc commit d41495c

12 files changed

Lines changed: 141 additions & 12 deletions

File tree

.claude-plugin/flowctl-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.1.49
1+
v0.1.50

.claude-plugin/marketplace.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
},
77
"metadata": {
88
"description": "Structured plan-first development plugin for Claude Code with .flow/ task tracking, Agent Teams, and Ralph autonomous mode",
9-
"version": "0.1.49"
9+
"version": "0.1.50"
1010
},
1111
"plugins": [
1212
{
1313
"name": "flow-code",
1414
"description": "Zero-dependency planning + execution with .flow/ task tracking. Three-layer quality (guard + RP plan-review + Codex adversarial). Full-auto, zero questions. Teams auto-parallel, DAG mutation, Codex-driven decisions, auto draft-PR, session summary. 5 prompt templates plus dedicated subagents, slash commands, and skills.",
15-
"version": "0.1.49",
15+
"version": "0.1.50",
1616
"source": "./",
1717
"category": "workflow",
1818
"tags": [
@@ -26,5 +26,5 @@
2626
"strict": true
2727
}
2828
],
29-
"version": "0.1.49"
29+
"version": "0.1.50"
3030
}

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flow-code",
3-
"version": "0.1.49",
3+
"version": "0.1.50",
44
"description": "Zero-dependency planning + execution with .flow/ task tracking and Ralph autonomous mode (multi-model review gates). Worker subagent per task with git worktree isolation for parallel execution. Three-layer quality system (guard + RP plan-review + Codex adversarial). Full-auto by default — AI decides from context, zero questions. Teams-default with file locking, DAG mutation, Codex-driven conflict resolution, auto draft-PR. Auto-detected stack profiles with one-command guard (test/lint/typecheck). Enhanced agent definitions with permissionMode/maxTurns/effort. Lifecycle hooks with state preservation (PreCompact injects .flow state into compaction, TaskCompleted auto-unlocks files, SubagentStart context injection). Memory v2 with atomic entries, dedup, and progressive disclosure. TDD enforcement mode. Multi-epic queue with dependency visualization. Includes dedicated subagents, slash commands, and skills for planning, execution, review, and autonomous operation.",
55
"author": {
66
"name": "z23cc",

.codex-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flow-code",
3-
"version": "0.1.49",
3+
"version": "0.1.50",
44
"description": "Zero-dependency planning + execution with .flow/ task tracking and Ralph autonomous mode (multi-model review gates). Worker subagent per task with git worktree isolation for parallel execution. Three-layer quality system (guard + RP plan-review + Codex adversarial). Full-auto by default. Teams-default with file locking, DAG mutation, Codex-driven conflict resolution, auto draft-PR.",
55
"author": {
66
"name": "z23cc",

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ All notable changes to Flow-Code are documented in this file.
44

55
Format follows [Keep a Changelog](https://keepachangelog.com/). Versions use [Semantic Versioning](https://semver.org/).
66

7+
## [0.1.50] - 2026-04-10
8+
9+
### Added
10+
- **Parallel explore agents** in brainstorm phase — 3 concurrent agents (patterns, gaps, impact) scan codebase before context_builder call
11+
- **PLAN CONTRACT** in worker prompts — workers must read epic spec first, implement only their task
12+
- **CONCURRENT_WORKERS** in worker prompts — workers see other active tasks and their locked files
13+
- **Concurrency awareness** in worker Phase 2 — mandatory plan citation and conflict escalation protocol
14+
15+
### Changed
16+
- `flowctl worker-prompt` now outputs plan-as-contract preamble and concurrent worker context
17+
- Worker agent (`worker.md`) Phase 2 restructured with plan-as-contract (2.0), concurrency awareness (2.1), and read specs (2.2) sub-phases
18+
- Codex worker steps (`step-03-find-ready.md`) updated with lock + worker-prompt generation guidance
19+
720
## [0.1.49] - 2026-04-10
821

922
### Changed

agents/worker.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,32 @@ When you receive a steer instruction, integrate it into your current work.
157157
<!-- section:core -->
158158
## Phase 2: Re-anchor (CRITICAL - DO NOT SKIP)
159159

160+
### 2.0: Plan-as-Contract (MANDATORY)
161+
162+
Your prompt begins with a `PLAN CONTRACT` line. You MUST honor it:
163+
1. Read the epic spec file referenced in the contract (`.flow/specs/<EPIC_ID>.md`)
164+
2. Find the section relevant to YOUR task and cite it (copy the relevant paragraph)
165+
3. Confirm your task's scope matches the spec — if it doesn't, output `STATUS: spec_conflict`
166+
167+
This is not optional. The spec file is the binding contract between you and the coordinator.
168+
169+
### 2.1: Concurrency Awareness
170+
171+
If your prompt contains a `CONCURRENT_WORKERS` section:
172+
1. Parse each concurrent worker's ID, title, and locked files
173+
2. Do NOT modify any files listed as owned by other workers
174+
3. If you discover you need a file owned by another worker, output:
175+
```
176+
STATUS: needs_file_access
177+
NEEDS_ACCESS: <file-path>
178+
CONFLICT_WITH: <other-task-id>
179+
```
180+
4. The coordinator will resolve the conflict via `steer`
181+
182+
If no `CONCURRENT_WORKERS` section is present, you are the only active worker — no restrictions beyond your OWNED_FILES.
183+
184+
### 2.2: Read Specs and Context
185+
160186
Use the FLOWCTL path and IDs from your prompt:
161187

162188
```bash

bin/flowctl

0 Bytes
Binary file not shown.

codex/skills/flow-code-work/steps/step-03-find-ready.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,25 @@ $FLOWCTL cat <task-id>
6060
# 1. Start each task
6161
$FLOWCTL start <task-id-1> --json
6262
$FLOWCTL start <task-id-2> --json
63+
64+
# 2. Lock owned files
65+
$FLOWCTL lock --task <task-id-1> --files "<file1>,<file2>" --json
66+
$FLOWCTL lock --task <task-id-2> --files "<file3>,<file4>" --json
67+
```
68+
69+
## Worker Prompt Generation
70+
71+
Use `flowctl worker-prompt` to generate the bootstrap prompt for each worker. The generated prompt automatically includes:
72+
73+
- **PLAN CONTRACT**: Instructs the worker to read the epic spec first and implement only their task
74+
- **CONCURRENT_WORKERS**: Lists other in-progress tasks and their locked files so the worker avoids conflicts
75+
76+
```bash
77+
$FLOWCTL worker-prompt --task <task-id> --bootstrap --inline-skills --json
6378
```
6479

80+
The worker MUST honor the PLAN CONTRACT and CONCURRENT_WORKERS sections. See `agents/worker.md` Phase 2 for the worker's handling of these sections.
81+
6582
## Next Step
6683

67-
Read `steps/step-04-spawn-workers.md` and execute.
84+
Spawn workers using `agent_run` with the generated prompts. Each worker runs in an isolated git worktree.

flowctl/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flowctl/crates/flowctl-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "flowctl-cli"
3-
version = "0.1.49"
3+
version = "0.1.50"
44
description = "CLI entry point for flowctl"
55
edition.workspace = true
66
rust-version.workspace = true

0 commit comments

Comments
 (0)