@axiomantic/garden 0.2.6 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/SKILL.md CHANGED
@@ -69,16 +69,16 @@ When an operator initiates a project or requests multi-agent coordination, the s
69
69
  - *Option 1 (Recommended)*: Multi-Agent Swarm (Dedicated terminal tabs/coding harnesses over Rhizo & Vine).
70
70
  - *Option 2*: Single-Agent Inline (Sequential execution within current chat session).
71
71
  2. **Question 2: Swarm Composition & Team Sizing**:
72
- - *Option 1 (Recommended)*: Balanced Triad (3 Workers: Systems Architect `@architect`, Adversarial Auditor `@auditor`, DevEx Lead `@implementer`).
73
- - *Option 2*: Focused Duo (2 Workers: Implementation Lead `@implementer`, Adversarial Auditor `@auditor`).
72
+ - *Option 1 (Recommended)*: Balanced Triad (3 Workers: Systems Architect `@<project>-architect`, Adversarial Auditor `@<project>-auditor`, DevEx Lead `@<project>-implementer`).
73
+ - *Option 2*: Focused Duo (2 Workers: Implementation Lead `@<project>-implementer`, Adversarial Auditor `@<project>-auditor`).
74
74
  - *Option 3*: Custom Swarm (Operator specifies custom roles and headcount).
75
75
  3. **Question 3: Available AI Coding Harnesses**:
76
76
  - The operator specifies which coding environments they have available (Claude Code CLI, Antigravity, OpenCode, Pi, Cursor, Headless Terminal). Explain that workers can run in **any** combination of harnesses!
77
77
  4. **Question 4: Foundation Model Pairing & Equivalencies**:
78
78
  - Recommend optimal models with fallback equivalents:
79
- - `@architect`: Gemini 3.8 Flash / Claude 3.5 Sonnet / GPT-4o (deep architecture comprehension).
80
- - `@auditor`: Claude 3.5 Sonnet / Claude 3 Opus (strict negative controls, zero sloppy approvals).
81
- - `@implementer`: Gemini 3.8 Flash / Claude 3.5 Sonnet (rapid, iterative coding velocity).
79
+ - `@<project>-architect`: Gemini 3.8 Flash / Claude 3.5 Sonnet / GPT-4o (deep architecture comprehension).
80
+ - `@<project>-auditor`: Claude 3.5 Sonnet / Claude 3 Opus (strict negative controls, zero sloppy approvals).
81
+ - `@<project>-implementer`: Gemini 3.8 Flash / Claude 3.5 Sonnet (rapid, iterative coding velocity).
82
82
  - *Air-gapped / Local*: Ollama / DeepSeek-R1.
83
83
 
84
84
  #### Automatic Fulfillment & 10-Backtick Prompt Generation:
@@ -92,9 +92,116 @@ Upon receiving the operator's responses:
92
92
  2. Copy the raw block inside each 10-backtick pre block below and paste it into its corresponding session.
93
93
  3. Once pasted, tell me here (or I will automatically detect them online via `rhizo who`).
94
94
  ```
95
- 5. Register the orchestrator's presence (`rhizo open orchestrator`) and arm the listener.
95
+ 5. Register the orchestrator's presence (`rhizo open <project>-orchestrator`) and arm the listener.
96
96
  6. Poll or await cluster readiness gate (`rhizo who --json`) before proceeding to Phase 3.
97
97
 
98
+
99
+ ---
100
+
101
+ ## Unified Work Item State Machine (WISM)
102
+
103
+ Rhizo, Garden, and Vine coordinate all multi-agent work through the formal **Work Item State Machine (WISM)**. Every task progresses through 10 deterministic states with atomic Redis transitions, automated DAG unblocking, and Two-Key integration gates.
104
+
105
+ ```mermaid
106
+ stateDiagram-v2
107
+ [*] --> DRAFTED : rhizo task create <id>
108
+ DRAFTED --> BLOCKED : Unmet DAG dependencies (depends_on)
109
+ DRAFTED --> QUEUED : Zero unmet dependencies
110
+ BLOCKED --> QUEUED : Parent task COMPLETED (Auto-promoted by Lua engine)
111
+
112
+ QUEUED --> DELIVERED : Listener pops message (Transport Receipt emitted)
113
+ DELIVERED --> CLAIMED : Worker acknowledges (Acquires monotonic lease)
114
+ DELIVERED --> ORPHANED : Receipt timeout (180s without claim)
115
+
116
+ CLAIMED --> IN_PROGRESS : Worker provisions strand (vine new <id>)
117
+ IN_PROGRESS --> IN_PROGRESS : Progress reported (rhizo task progress, lease extended)
118
+ IN_PROGRESS --> GATE_EVALUATING : Verification initiated (vine gate)
119
+ IN_PROGRESS --> YIELDED : rhizo task yield (Returned to pool)
120
+ IN_PROGRESS --> ORPHANED : Lease expires without progress
121
+
122
+ GATE_EVALUATING --> IN_PROGRESS : Gate failed (Tests red or merge conflict)
123
+ GATE_EVALUATING --> READY_TO_WEAVE : Two-Key Gate PASSED (Cryptographic gate token stamped)
124
+
125
+ READY_TO_WEAVE --> COMPLETED : vine weave && rhizo task complete (Unblocks downstream DAG children)
126
+
127
+ ORPHANED --> QUEUED : Re-queued for retry (attempts < 3)
128
+ ORPHANED --> DEAD_LETTER : Max delivery retries exceeded (attempts >= 3)
129
+ YIELDED --> QUEUED : Returned to pool
130
+
131
+ COMPLETED --> [*]
132
+ DEAD_LETTER --> [*]
133
+ ```
134
+
135
+ ### ASCII State Transition Reference (LLM Fast-Path)
136
+
137
+ ```text
138
+ [rhizo task create]
139
+ │
140
+ ▼
141
+ +---------+ Unmet deps
142
+ | DRAFTED | ──────────────────► [ BLOCKED ]
143
+ +---------+ │
144
+ │ Zero deps │ Parent task COMPLETED
145
+ ▼ ▼
146
+ +---------+ ◄───────────────────────+
147
+ | QUEUED |
148
+ +---------+
149
+ │
150
+ │ rhizo listen pops task (Transport Receipt emitted)
151
+ ▼
152
+ +-----------+ 180s Receipt Timeout
153
+ | DELIVERED | ─────────────────────────────────► [ ORPHANED ]
154
+ +-----------+ │
155
+ │ │ Attempts >= 3
156
+ │ rhizo task claim / rhizo reply ▼
157
+ ▼ [ DEAD_LETTER ]
158
+ +---------+
159
+ | CLAIMED |
160
+ +---------+
161
+ │
162
+ │ vine new <task_id> (Provision strand)
163
+ ▼
164
+ +-------------+ Lease expires
165
+ | IN_PROGRESS | ────────────────────────────────► [ ORPHANED ]
166
+ +-------------+
167
+ │ ▲
168
+ │ vine │ Gate fails
169
+ │ gate │ (Tests red or conflict)
170
+ ▼ │
171
+ +-----------------+
172
+ | GATE_EVALUATING |
173
+ +-----------------+
174
+ │
175
+ │ Two-Key Gate PASSED (Key 1 merge-tree + Key 2 live test suite green)
176
+ ▼
177
+ +----------------+
178
+ | READY_TO_WEAVE |
179
+ +----------------+
180
+ │
181
+ │ vine weave && rhizo task complete
182
+ ▼
183
+ +-----------+
184
+ | COMPLETED | ──► Auto-promotes BLOCKED child tasks to QUEUED!
185
+ +-----------+
186
+ ```
187
+
188
+ ### State Definitions & Invariants
189
+
190
+ | State | CLI Trigger | Atomic Action & Side Effects | Timeout / Failure Escalation |
191
+ | :--- | :--- | :--- | :--- |
192
+ | **`DRAFTED`** | `rhizo task create <id> --title <t>` | Creates immutable task contract hash `task:<id>` in Redis. | N/A |
193
+ | **`BLOCKED`** | Evaluated on create | Stamped if `depends_on` contains incomplete tasks. Workers cannot claim. | N/A |
194
+ | **`QUEUED`** | Auto on create or parent complete | Pushed to queue/inbox. Available for worker consumption. | N/A |
195
+ | **`DELIVERED`** | `rhizo listen` consumes payload | **Atomically moves into `task:<id>` DELIVERED state**. Instant transport receipt emitted to orchestrator. Mirrored to local `~/.config/rhizo/current_task.json` for turn-end hook interlocks. | 180s Receipt Timeout $
196
+ | **`CLAIMED`** | `rhizo task claim <id>` / `rhizo reply` | Worker acquires monotonic fencing lease. Isolated Vine strand provisioned (`vine new <id>`). Turn-end hook blocks until work starts. | Lease expires $
197
+ | **`IN_PROGRESS`** | Worker coding in strand | Enforces single-active-lease invariant. Periodic `rhizo task progress` extends lease. | Lease expires $
198
+ | **`GATE_EVALUATING`**| `vine gate` | Key 1 (mechanical merge-tree) & Key 2 (live compiler/test suite) evaluated. | Exit 1 $
199
+ | **`READY_TO_WEAVE`** | Both keys pass 100% | Cryptographic gate token stamped (`gate_token`). Report sent to orchestrator. | N/A |
200
+ | **`COMPLETED`** | `vine weave && rhizo task complete` | Fast-forward merged into canonical trunk. Strand pruned. Locks released. **Downstream DAG dependencies automatically unblocked (`BLOCKED` $
201
+ | **`ORPHANED`** | Receipt timeout or lease expired | Stalled worker detected. Increments `delivery_attempts`. If $\ge 3
202
+ | **`YIELDED`** | `rhizo task yield <id>` | Worker gracefully steps aside. Task returned to `QUEUED`. | N/A |
203
+ | **`DEAD_LETTER`** | Retries exhausted ($\ge 3$) | Moved to dead-letter queue. Alerts orchestrator and operator. | Requires manual operator triage |
204
+
98
205
  ---
99
206
 
100
207
  ## 3. Core Operational Invariants
@@ -188,12 +295,11 @@ To prevent silent deadlocks when workers stall, crash, or fail to re-arm listene
188
295
  2. **Watchdog Window**: If a worker fails to respond within the expected turn window (e.g. 5–10 minutes) and `rhizo probe` reveals `NO_LISTENER` or unread inbox items:
189
296
  - **Escalate Immediately**: Prompt the operator via `ask_question` with the diagnostic status.
190
297
  - **Actionable Remediation**: Offer options to (1) re-arm the listener in the worker's terminal session (`rhizo listen <worker>`), (2) reboot the agent harness, or (3) reassign the task via `rhizo reroute <worker> <new_worker>`.
191
- 3. **Orchestrator Self-Audit Watchdog & Stepped Backoff Protocol (GVR-014, GVR-015)**:
192
- - For harnesses supporting `schedule` (e.g. Antigravity), arm a debounced watchdog timer (`schedule(DurationSeconds=cadence, Prompt="...", TimerCondition="any")`).
193
- - **Stepped Backoff & 4-Strike Cap**: Starts at base 15m (900s). On consecutive quiescent checks with a stable listener, backs off (15m $\rightarrow$ 30m $\rightarrow$ 60m $\rightarrow$ 120m) and stands down at check 4 (`recommended_cadence=0`), preventing infinite token-eating polling loops.
298
+ 3. **Orchestrator Self-Audit Watchdog (ONLY for OpenAI Codex / ChatGPT)**:
299
+ - **Antigravity & OpenCode Exemption**: In Google Antigravity and OpenCode, DO NOT schedule timers or cron tasks (`schedule(...)`). Antigravity natively and reactively wakes up on background process completion when `rhizo listen` delivers a message.
300
+ - **Codex / ChatGPT Watchdog Only**: In OpenAI Codex Desktop / CLI where background processes cannot reactively wake the harness, arm a scheduled watchdog timer or cron job with stepped backoff (15m $\rightarrow$ 30m $\rightarrow$ 60m $\rightarrow$ 120m $\rightarrow$ Stand Down at check 4).
194
301
  - **Reset Invariant**: Resets immediately to base 15m (streak 0) on any listener failure, unread inbox backlog, outbound task dispatch (`rhizo send`/`enqueue`), worker reply, or user chat prompt.
195
- - **Replace, Never Stack**: Kills previous timer via `manage_task(Action='kill')` before arming a new one. Arriving worker traffic cancels the timer automatically with zero token overhead.
196
- - When the timer fires, execute the short check: `rhizo watchdog check --agent <orchestrator> --json` and follow `next_action` (`SCHEDULE_TIMER` or `STAND_DOWN`).
302
+ - When the timer fires in Codex, execute the short check: `rhizo watchdog check --agent <orchestrator> --json` and follow `next_action` (`SCHEDULE_TIMER` or `STAND_DOWN`).
197
303
 
198
304
  ---
199
305
 
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axiomantic/garden",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "description": "Multi-Agent Swarm Orchestration, Empirical Dialectics & Ceremonies on top of Rhizo & Vine",
5
5
  "main": "bin/run.js",
6
6
  "bin": {
@@ -98,10 +98,10 @@ Once ratified, write `garden-swarm.json` to the target project directory:
98
98
  "project": "my-project",
99
99
  "created_at": "2026-09-28T12:00:00Z",
100
100
  "target_repo": "/Users/eek/Development/my-project",
101
- "orchestrator": "orchestrator",
101
+ "orchestrator": "my-project-orchestrator",
102
102
  "workers": [
103
103
  {
104
- "name": "architect",
104
+ "name": "my-project-architect",
105
105
  "persona": "Marcus Vance",
106
106
  "role": "Staff Systems Architect",
107
107
  "harness": "Antigravity / OpenCode",
@@ -111,7 +111,7 @@ Once ratified, write `garden-swarm.json` to the target project directory:
111
111
  "opposing_priority": "Structural purity, invariant guarantees, and long-term maintainability over hasty quick fixes."
112
112
  },
113
113
  {
114
- "name": "auditor",
114
+ "name": "my-project-auditor",
115
115
  "persona": "Caleb Thorne",
116
116
  "role": "Verification & Adversarial Auditor",
117
117
  "harness": "Claude Code CLI / Antigravity",
@@ -121,7 +121,7 @@ Once ratified, write `garden-swarm.json` to the target project directory:
121
121
  "opposing_priority": "Adversarial skepticism, rigorous negative controls, and proof over convenience."
122
122
  },
123
123
  {
124
- "name": "implementer",
124
+ "name": "my-project-implementer",
125
125
  "persona": "Elena Rostova",
126
126
  "role": "DevEx & Implementation Lead",
127
127
  "harness": "Antigravity / OpenCode",
@@ -69,16 +69,16 @@ When an operator initiates a project or requests multi-agent coordination, the s
69
69
  - *Option 1 (Recommended)*: Multi-Agent Swarm (Dedicated terminal tabs/coding harnesses over Rhizo & Vine).
70
70
  - *Option 2*: Single-Agent Inline (Sequential execution within current chat session).
71
71
  2. **Question 2: Swarm Composition & Team Sizing**:
72
- - *Option 1 (Recommended)*: Balanced Triad (3 Workers: Systems Architect `@architect`, Adversarial Auditor `@auditor`, DevEx Lead `@implementer`).
73
- - *Option 2*: Focused Duo (2 Workers: Implementation Lead `@implementer`, Adversarial Auditor `@auditor`).
72
+ - *Option 1 (Recommended)*: Balanced Triad (3 Workers: Systems Architect `@<project>-architect`, Adversarial Auditor `@<project>-auditor`, DevEx Lead `@<project>-implementer`).
73
+ - *Option 2*: Focused Duo (2 Workers: Implementation Lead `@<project>-implementer`, Adversarial Auditor `@<project>-auditor`).
74
74
  - *Option 3*: Custom Swarm (Operator specifies custom roles and headcount).
75
75
  3. **Question 3: Available AI Coding Harnesses**:
76
76
  - The operator specifies which coding environments they have available (Claude Code CLI, Antigravity, OpenCode, Pi, Cursor, Headless Terminal). Explain that workers can run in **any** combination of harnesses!
77
77
  4. **Question 4: Foundation Model Pairing & Equivalencies**:
78
78
  - Recommend optimal models with fallback equivalents:
79
- - `@architect`: Gemini 3.8 Flash / Claude 3.5 Sonnet / GPT-4o (deep architecture comprehension).
80
- - `@auditor`: Claude 3.5 Sonnet / Claude 3 Opus (strict negative controls, zero sloppy approvals).
81
- - `@implementer`: Gemini 3.8 Flash / Claude 3.5 Sonnet (rapid, iterative coding velocity).
79
+ - `@<project>-architect`: Gemini 3.8 Flash / Claude 3.5 Sonnet / GPT-4o (deep architecture comprehension).
80
+ - `@<project>-auditor`: Claude 3.5 Sonnet / Claude 3 Opus (strict negative controls, zero sloppy approvals).
81
+ - `@<project>-implementer`: Gemini 3.8 Flash / Claude 3.5 Sonnet (rapid, iterative coding velocity).
82
82
  - *Air-gapped / Local*: Ollama / DeepSeek-R1.
83
83
 
84
84
  #### Automatic Fulfillment & 10-Backtick Prompt Generation:
@@ -92,7 +92,7 @@ Upon receiving the operator's responses:
92
92
  2. Copy the raw block inside each 10-backtick pre block below and paste it into its corresponding session.
93
93
  3. Once pasted, tell me here (or I will automatically detect them online via `rhizo who`).
94
94
  ```
95
- 5. Register the orchestrator's presence (`rhizo open orchestrator`) and arm the listener.
95
+ 5. Register the orchestrator's presence (`rhizo open <project>-orchestrator`) and arm the listener.
96
96
  6. Poll or await cluster readiness gate (`rhizo who --json`) before proceeding to Phase 3.
97
97
 
98
98
 
@@ -295,12 +295,11 @@ To prevent silent deadlocks when workers stall, crash, or fail to re-arm listene
295
295
  2. **Watchdog Window**: If a worker fails to respond within the expected turn window (e.g. 5–10 minutes) and `rhizo probe` reveals `NO_LISTENER` or unread inbox items:
296
296
  - **Escalate Immediately**: Prompt the operator via `ask_question` with the diagnostic status.
297
297
  - **Actionable Remediation**: Offer options to (1) re-arm the listener in the worker's terminal session (`rhizo listen <worker>`), (2) reboot the agent harness, or (3) reassign the task via `rhizo reroute <worker> <new_worker>`.
298
- 3. **Orchestrator Self-Audit Watchdog & Stepped Backoff Protocol (GVR-014, GVR-015)**:
299
- - For harnesses supporting `schedule` (e.g. Antigravity), arm a debounced watchdog timer (`schedule(DurationSeconds=cadence, Prompt="...", TimerCondition="any")`).
300
- - **Stepped Backoff & 4-Strike Cap**: Starts at base 15m (900s). On consecutive quiescent checks with a stable listener, backs off (15m $\rightarrow$ 30m $\rightarrow$ 60m $\rightarrow$ 120m) and stands down at check 4 (`recommended_cadence=0`), preventing infinite token-eating polling loops.
298
+ 3. **Orchestrator Self-Audit Watchdog (ONLY for OpenAI Codex / ChatGPT)**:
299
+ - **Antigravity & OpenCode Exemption**: In Google Antigravity and OpenCode, DO NOT schedule timers or cron tasks (`schedule(...)`). Antigravity natively and reactively wakes up on background process completion when `rhizo listen` delivers a message.
300
+ - **Codex / ChatGPT Watchdog Only**: In OpenAI Codex Desktop / CLI where background processes cannot reactively wake the harness, arm a scheduled watchdog timer or cron job with stepped backoff (15m $\rightarrow$ 30m $\rightarrow$ 60m $\rightarrow$ 120m $\rightarrow$ Stand Down at check 4).
301
301
  - **Reset Invariant**: Resets immediately to base 15m (streak 0) on any listener failure, unread inbox backlog, outbound task dispatch (`rhizo send`/`enqueue`), worker reply, or user chat prompt.
302
- - **Replace, Never Stack**: Kills previous timer via `manage_task(Action='kill')` before arming a new one. Arriving worker traffic cancels the timer automatically with zero token overhead.
303
- - When the timer fires, execute the short check: `rhizo watchdog check --agent <orchestrator> --json` and follow `next_action` (`SCHEDULE_TIMER` or `STAND_DOWN`).
302
+ - When the timer fires in Codex, execute the short check: `rhizo watchdog check --agent <orchestrator> --json` and follow `next_action` (`SCHEDULE_TIMER` or `STAND_DOWN`).
304
303
 
305
304
  ---
306
305
 
@@ -77,22 +77,22 @@ Run `garden prompts` (or `garden launch`) from the project root:
77
77
  garden prompts --write garden-prompts.md
78
78
 
79
79
  # Or generate for a specific worker:
80
- garden prompts --worker architect
80
+ garden prompts --worker <project>-architect # (or suffix shorthand: --worker architect)
81
81
  ```
82
82
 
83
83
  If `garden-swarm.json` exists in the repository, Garden uses its configured personas, mandates, harnesses, and models. If missing, Garden automatically synthesizes the standard balanced triad:
84
- - `@architect` (Marcus Vance - Staff Systems Architect)
85
- - `@auditor` (Caleb Thorne - Verification & Adversarial Auditor)
86
- - `@implementer` (Elena Rostova - DevEx & Implementation Lead)
84
+ - `@<project>-architect` (Marcus Vance - Staff Systems Architect)
85
+ - `@<project>-auditor` (Caleb Thorne - Verification & Adversarial Auditor)
86
+ - `@<project>-implementer` (Elena Rostova - DevEx & Implementation Lead)
87
87
 
88
88
  ### Step 2: Present & Paste Prompts into Sessions
89
89
  The Orchestrator presents the generated prompt blocks to the operator with clear, structured guidance:
90
90
 
91
91
  1. **Numbered Terminal Tab / Session Instructions**:
92
92
  Provide a concise setup list instructing the operator on how many sessions to open and which harness/model to configure for each:
93
- - **Session 1 (@architect)**: e.g. Antigravity or OpenCode with Gemini 3.8 Flash / Claude 3.5 Sonnet $\to$ Paste Card 1
94
- - **Session 2 (@auditor)**: e.g. Claude Code CLI with Claude 3.5 Sonnet / Claude 3 Opus $\to$ Paste Card 2
95
- - **Session 3 (@implementer)**: e.g. Antigravity or OpenCode with Gemini 3.8 Flash $\to$ Paste Card 3
93
+ - **Session 1 (@<project>-architect)**: e.g. Antigravity or OpenCode with Gemini 3.8 Flash / Claude 3.5 Sonnet $\to$ Paste Card 1
94
+ - **Session 2 (@<project>-auditor)**: e.g. Claude Code CLI with Claude 3.5 Sonnet / Claude 3 Opus $\to$ Paste Card 2
95
+ - **Session 3 (@<project>-implementer)**: e.g. Antigravity or OpenCode with Gemini 3.8 Flash $\to$ Paste Card 3
96
96
  2. **Harness & Model Agnostic Flexibility**:
97
97
  Explicitly reassure the operator: *"Workers can run in ANY coding harness (Claude Code, OpenCode, Antigravity, Pi, Cursor) and use any equivalent model tier. Coordination occurs strictly over Rhizo (local Redis) and Vine (Rift strands)."*
98
98
  3. **10-Backtick Raw Markdown Formatting**:
@@ -104,8 +104,9 @@ The Orchestrator presents the generated prompt blocks to the operator with clear
104
104
  - `rhizo open "<name>" "<tags>"`
105
105
  - `rhizo hook install --codex --agent "<name>"` (if running in Codex CLI/Desktop)
106
106
  - `rhizo listen "<name>"` (blocking foreground command with infinite wait)
107
- 5. **Scheduled Health Check Template (For Codex / Antigravity / Schedulers)**:
108
- If workers configure a recurring 15-minute listener health check, prompts include the bulletproof 4-step template:
107
+ 5. **Scheduled Health Check Template (ONLY for OpenAI Codex / ChatGPT CLI)**:
108
+ In Google Antigravity (using background `run_command`) and OpenCode (using background ear), DO NOT configure scheduled tasks; reactive background process completion handles wakeups natively.
109
+ In Codex Desktop / CLI where sessions cannot wake from background process exits without external stimulation, prompts include the bulletproof 4-step template:
109
110
  - STEP 1: Inspect completed subagents/tasks for unhandled delivered tasks and execute them immediately (never stay quiet with pending work).
110
111
  - STEP 2: Inspect active tasks to verify a listener is currently running, and re-arm if missing.
111
112
  - STEP 3: Run `rhizo probe <name> --json` and drain any inbox backlog.
@@ -85,9 +85,9 @@ Whenever the Lead Orchestrator dispatches a task, broadcasts instructions, or aw
85
85
 
86
86
  FORBIDDEN: Never yield the conversation turn to the operator after dispatching work without an active background listener running. Yielding a turn without a listener severs the swarm's physical lifeline, trapping worker replies in Redis and causing silent swarm stalls.
87
87
 
88
- Safety Net (Scheduled Timer Watchdog & Debouncer Protocol — Stepped Backoff & 4-Strike Cap):
89
- In harnesses supporting `schedule` (e.g. Google Antigravity), arm a debounced watchdog timer to ensure an orchestrator session is never abandoned if a listener fails to arm or terminates prematurely.
90
- - **Base Cadence & Stepped Backoff**:
88
+ Safety Net (Scheduled Watchdog Protocol — ONLY for OpenAI Codex / ChatGPT):
89
+ - **Antigravity & OpenCode Exemption**: In Google Antigravity (using background `run_command(CommandLine="rhizo listen <orchestrator>", IsDaemon=false, WaitMsBeforeAsync=500)`) and OpenCode (using background ear), DO NOT schedule timers or cron tasks (`schedule(...)`). Antigravity's task manager natively and reactively resumes execution on process exit when `rhizo listen` delivers a message, with zero timer overhead.
90
+ - **Codex / ChatGPT Watchdog Only**: In OpenAI Codex Desktop / CLI where background processes cannot reactively wake the harness, arm a scheduled watchdog timer or cron job using stepped backoff:
91
91
  - Initial / After Activity: Base 15 minutes (`DurationSeconds=900`).
92
92
  - Quiescent Check 1 (Streak 1): 30 minutes (`DurationSeconds=1800`).
93
93
  - Quiescent Check 2 (Streak 2): 60 minutes (`DurationSeconds=3600`).
@@ -100,18 +100,14 @@ In harnesses supporting `schedule` (e.g. Google Antigravity), arm a debounced wa
100
100
  3. Any outbound task dispatch (`rhizo send`, `rhizo enqueue`, `rhizo reply`).
101
101
  4. Any worker gate report or message receipt.
102
102
  5. Any operator interaction or new prompt in chat.
103
- - **Replace, Never Stack Invariant**:
104
- Harnesses prohibit concurrent timers with `TimerCondition="any"`. Before setting a timer, inspect running tasks with `manage_task(Action='list')`. If an existing watchdog task is active (`toolName == "schedule"` or prompt includes `[RHIZO WATCHDOG]`), cancel it via `manage_task(Action='kill', TaskId=...)`.
105
103
  - **Stand Down Invariants**:
106
- 1. When all tasks in `implementation_plan.md` are complete (`- [x]` 100%), kill any running watchdog timer and do not reschedule.
104
+ 1. When all tasks in `implementation_plan.md` are complete (`- [x]` 100%), cancel any running watchdog timer and do not reschedule.
107
105
  2. When the watchdog reaches `substatus: "MAX_STREAK_REACHED"` (streak 4/4), stand down and do not reschedule. The background listener process (`rhizo listen`) remains continuously active on Redis `BRPOP` and will wake the session on any new message.
108
- - **Zero-Token Happy Path**:
109
- Because `TimerCondition="any"` is set, any arriving worker message or background task completion automatically cancels the timer early before it expires. The timer only fires if the orchestrator was silent and deaf for the full cadence duration.
110
- - **The Short Check (When Timer Fires)**:
106
+ - **The Short Check (When Timer Fires in Codex)**:
111
107
  Run `rhizo watchdog check --agent <name> --json`.
112
108
  * If `ACTION_REQUIRED: REARM_LISTENER`: start `rhizo listen <name>` in background and schedule base timer (`DurationSeconds=900`).
113
109
  * If `ACTION_REQUIRED: UNREAD_MESSAGES`: drain messages with `rhizo drain 10 <name>`, start listener, and schedule base timer (`DurationSeconds=900`).
114
- * If `OK: LISTENING`: listener is healthy; check `recommended_cadence`. If `next_action == "SCHEDULE_TIMER"`, schedule timer with `DurationSeconds=recommended_cadence` and return to sleep with minimal or no user-facing chat output.
110
+ * If `OK: LISTENING`: listener is healthy; check `recommended_cadence`. If `next_action == "SCHEDULE_TIMER"`, schedule timer with `DurationSeconds=recommended_cadence`.
115
111
  * If `STAND_DOWN: MAX_STREAK_REACHED` or `STAND_DOWN: IDLE`: stand down and do NOT reschedule.
116
112
  </CRITICAL>
117
113
 
@@ -231,7 +227,7 @@ Depending on the task distribution model in `implementation_plan.md`:
231
227
 
232
228
  - **Direct Assignment (O2O)**:
233
229
  ```bash
234
- rhizo send --to architect \
230
+ rhizo send --to <project>-architect \
235
231
  --subject "Task 1.1: Core Data Structures" \
236
232
  --body '{"task_id": "task-core-ds", "instructions": "Implement AST node kinds and message serializers. Use vine strand.", "strand": "strand/task-core-ds"}'
237
233
  ```
@@ -246,7 +242,7 @@ Depending on the task distribution model in `implementation_plan.md`:
246
242
  - **Mandatory Turn-End Listener Arming**:
247
243
  Immediately after executing `rhizo send` or `rhizo enqueue`, arm your single-shot background listener before completing your turn:
248
244
  ```bash
249
- run_command(CommandLine="rhizo listen orchestrator", IsDaemon=false, WaitMsBeforeAsync=500)
245
+ run_command(CommandLine="rhizo listen <project>-orchestrator", IsDaemon=false, WaitMsBeforeAsync=500)
250
246
  ```
251
247
  *(Never end your turn without this active background task; without it, worker gate reports cannot wake you up).*
252
248
 
@@ -31,20 +31,20 @@ The generated implementation plan must follow this exact template:
31
31
  ## 1. Swarm Roster & Role Mapping
32
32
  | Worker Name | Persona | Role | Assigned Subsystems |
33
33
  | :--- | :--- | :--- | :--- |
34
- | `architect` | Marcus Vance | Staff Systems Architect | Core data structures, API contracts |
35
- | `auditor` | Caleb Thorne | Refactoring Purist | Unit tests, negative controls, linter |
36
- | `implementer` | Elena Rostova | DevEx & Implementation Lead | CLI commands, adapters, docs |
34
+ | `<project>-architect` | Marcus Vance | Staff Systems Architect | Core data structures, API contracts |
35
+ | `<project>-auditor` | Caleb Thorne | Refactoring Purist | Unit tests, negative controls, linter |
36
+ | `<project>-implementer` | Elena Rostova | DevEx & Implementation Lead | CLI commands, adapters, docs |
37
37
 
38
38
  ---
39
39
 
40
40
  ## 2. Distributed Locking & Concurrency Schedule
41
41
  Before modifying any shared or non-mergeable file, the designated worker must obtain an atomic lease:
42
42
  - **Lock Target**: `file:src/config.nim`
43
- - *Owner*: `architect`
43
+ - *Owner*: `<project>-architect`
44
44
  - *Command*: `rhizo lock file:src/config.nim 600 --fencing`
45
45
  - *Monotonic Fencing Counter*: Record token in task execution log.
46
46
  - **Lock Target**: `file:migrations/001_schema.sql`
47
- - *Owner*: `implementer`
47
+ - *Owner*: `<project>-implementer`
48
48
  - *Command*: `rhizo lock file:migrations/001_schema.sql 300 --fencing`
49
49
 
50
50
  ---
@@ -74,14 +74,14 @@ For all parallel development tracks:
74
74
  ## 4. Phase-by-Phase Task Checklist
75
75
 
76
76
  ### Phase 1: Core Engine Primitives
77
- - [ ] **Task 1.1: Core Data Structures** (`architect`)
77
+ - [ ] **Task 1.1: Core Data Structures** (`<project>-architect`)
78
78
  - *Strand*: `strand/task-core-ds`
79
79
  - *Lock*: `rhizo lock file:src/types.nim 300 --fencing`
80
80
  - *Actions*: Define AST node kinds and message serializers.
81
81
  - *Verification*: `nim c -r tests/test_types.nim`
82
82
  - *Weave*: `vine gate && vine weave && rhizo unlock file:src/types.nim`
83
83
 
84
- - [ ] **Task 1.2: Test Harness & Negative Controls** (`auditor`)
84
+ - [ ] **Task 1.2: Test Harness & Negative Controls** (`<project>-auditor`)
85
85
  - *Strand*: `strand/task-test-harness`
86
86
  - *Actions*: Implement negative assertion tests for malformed JSON.
87
87
  - *Verification*: `pytest tests/test_harness.py`