@axiomantic/garden 0.2.30 → 0.2.31

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/README.md CHANGED
@@ -176,17 +176,19 @@ Garden utilizes the **Active Swarm Fast-Path (First-Look Invariant)**:
176
176
  1. **Execution Mode & Swarm Shape in <Detected Harness>**: Multi-Agent Swarm (Balanced Triad or Focused Duo in the detected harness) vs Single-Agent Inline.
177
177
 
178
178
  > [!IMPORTANT]
179
- > **Universal Sovereign Sessions & Model Inheritance**:
180
- > - **Sovereign Sessions Only (Universal Subagent & Tmux Prohibition)**: Swarm workers are strictly independent sessions (separate terminal tabs or IDE windows) bootstrapped via 10-backtick prompt cards. Harness-internal subagents (e.g. Antigravity's `invoke_subagent`, Claude Code's `Task`, OpenCode subtasks) and terminal multiplexers (`tmux`) are **strictly prohibited**.
179
+ > **Capability-Aware Execution Modes & Model Inheritance**:
180
+ > - **Adaptive Worker Modes (`execution_mode = "auto"`)**: First checks `rhizo who --all --json` to attach to existing project/pool workers. On cold starts, Antigravity IDE and OpenCode Desktop default to **persistent drillable subagents** (`subagents`, with clickable `conversation://<id>` / session-tree chat drill-down); Codex CLI defaults to automated **`tmux` panes** (`garden launch --tmux`); and Codex Desktop / non-`tmux` CLI defaults to **10-backtick Prompt Cards** (`prompts`). Opaque, non-interactive CLI subagents remain prohibited as swarm workers.
181
181
  > - **Session-Native Model Inheritance**: Swarm workers inherit whatever foundation model is active in that harness window (`Session Default (active in window/tab)`). Disconnected model pairing quizzes are eliminated.
182
182
 
183
- ### 3. Prompt-Based Swarm Bootstrapping (`launch-workers`)
184
- Garden writes `garden-swarm.json` and runs `garden prompts` to write prompt cards directly to temporary files (`/tmp/garden-<project>/<worker>.md`) rather than flooding the chat window with thousands of lines of raw text:
185
- - The Orchestrator displays concise session assignments with clickable file links:
186
- 1. Open **Tab 1 / Window 1**: Reference Prompt 1 (`/tmp/garden-<project>/<project>-auditor.md`)
187
- 2. Open **Tab 2 / Window 2**: Reference Prompt 2 (`/tmp/garden-<project>/<project>-architect.md`)
188
- 3. Open **Tab 3 / Window 3**: Reference Prompt 3 (`/tmp/garden-<project>/<project>-implementer.md`)
189
- - Each session enters the project directory, exports `RHIZO_AGENT_NAME`, registers on the Redis bus (`rhizo open`), and arms its single-shot listener (`rhizo listen`).
183
+ ### 3. Capability-Aware Swarm Bootstrapping (`launch-workers`)
184
+ Garden runs `garden prompts` (or `garden launch --tmux` / `garden prompts --subagent --json`) to write prompt cards (`/tmp/garden-<project>/<worker>.md`) and subagent briefs (`/tmp/garden-<project>/subagent-<worker>.md`) directly to temporary files rather than flooding the chat window with thousands of lines of raw text:
185
+ - **In `subagents` mode (Antigravity IDE & OpenCode Desktop default)**: The orchestrator spawns persistent drillable subagents with each worker's brief and prints clickable session links (`conversation://<id>`) directly in chat.
186
+ - **In `tmux` mode (Codex CLI default / CLI `--tmux`)**: `garden launch --tmux` opens one `tmux` window per worker pointing at `/tmp/garden-<project>/<worker>.md`.
187
+ - **In `prompts` mode (Codex Desktop & non-`tmux` CLI default)**: The Orchestrator displays concise session assignments with clickable file links:
188
+ 1. Open **Tab 1 / Window 1**: Reference Prompt 1 (`/tmp/garden-<project>/<worker-1>.md`)
189
+ 2. Open **Tab 2 / Window 2**: Reference Prompt 2 (`/tmp/garden-<project>/<worker-2>.md`)
190
+ 3. Open **Tab 3 / Window 3**: Reference Prompt 3 (`/tmp/garden-<project>/<worker-3>.md`)
191
+ - Each worker registers on the Redis bus (`rhizo open`), claims its task (`rhizo task claim`), isolates work 1:1 in a Vine strand (`vine new`), submits for independent Key 3 audit (`vine submit`), and (in CLI harnesses) arms its single-shot listener (`rhizo listen`).
190
192
  - The Orchestrator confirms all workers are live via `rhizo who --json` before dispatching tasks!
191
193
 
192
194
  ### 4. The Dialectical Pump (`dialectical-pump`)
package/SKILL.md CHANGED
@@ -167,8 +167,11 @@ When target project workers are needed and unassigned idle cluster peers exist,
167
167
  The recipient worker inspects its local toolchain, self-selects a compatible role, adds corresponding tags (`rhizo tag add <tags>`), and replies with `WORKER_READY`.
168
168
  - **Negative Control & Tenancy Guardrail**: Repurposing rejects workers belonging to other named projects unless `--allow-cross-project` is specified. It also rejects workers that are actively `BUSY` on tasks (requires `--force`).
169
169
 
170
- - **Pathway B (Fresh Session Bootstrapping via Prompt Cards)**:
171
- When zero unassigned cluster listeners exist (even if workers from other projects are online) or the operator prefers isolated fresh sessions, Garden generates self-contained 10-backtick prompt cards in `/tmp/garden-<project>/` via `garden prompts` (or `garden launch`). Dedicated prompt cards are the primary and intended mechanism for spinning up workers for a new project!
170
+ - **Pathway B (Fresh Session Bootstrapping via Capability-Aware Mode)**:
171
+ When zero unassigned cluster listeners exist (even if workers from other projects are online) or the operator prefers fresh sessions, Garden selects the execution mode based on detected harness capabilities (`execution_mode = "auto"`):
172
+ 1. **`subagents` (Default on Antigravity IDE & OpenCode Desktop)**: Spawns persistent, drillable subagents (`invoke_subagent` + `send_message` with clickable `[Persona (@name)](conversation://<id>)` pills in Antigravity, or child sessions in OpenCode Desktop) using briefs generated by `garden prompts --subagent --json`.
173
+ 2. **`tmux` (Default on Codex CLI in `tmux`; opt-in on OpenCode CLI / Claude Code CLI)**: Runs `garden launch --tmux` to spawn one `tmux` window/pane per worker running `codex` / `opencode` / `claude` against `/tmp/garden-<project>/<worker>.md`.
174
+ 3. **`prompts` (Default on Codex Desktop & non-`tmux` CLI)**: Generates self-contained 10-backtick prompt cards in `/tmp/garden-<project>/` via `garden prompts` (or `garden prompts --force-prompts`).
172
175
 
173
176
  <CRITICAL>
174
177
  Operator-Named Worker Delegation Mandate:
@@ -191,37 +194,39 @@ Never Hijack or Kill Another Session's Active Listener: When 'rhizo listen <agen
191
194
 
192
195
  #### Cold-Start Intake Protocol (Zero Active Workers Only)
193
196
  When an operator initiates a fresh project or requests multi-agent coordination and NO active cluster workers exist, the session MUST NOT silently guess configuration.
194
- Because the coding harness is auto-detected from the session environment (`ANTIGRAVITY_APP_DIR` $\to$ Antigravity IDE, `CLAUDE_CODE` $\to$ Claude Code CLI, `OPENCODE_SESSION_ID` $\to$ OpenCode, `CODEX_SESSION_ID` $\to$ ChatGPT Desktop / Codex, `PI_SESSION_ID` $\to$ Pi), the orchestrator invokes `ask_question` to conduct a streamlined **Single-Question Intake Interview**:
197
+ Because the coding harness is auto-detected from the session environment (`ANTIGRAVITY_APP_DIR` $\to$ Antigravity IDE, `CLAUDE_CODE` $\to$ Claude Code CLI, `OPENCODE_DESKTOP` $\to$ OpenCode Desktop, `OPENCODE_SESSION_ID` $\to$ OpenCode, `CODEX_CLI` $\to$ Codex CLI, `CODEX_SESSION_ID` $\to$ ChatGPT Desktop / Codex, `PI_SESSION_ID` $\to$ Pi), the orchestrator invokes `ask_question` to conduct a streamlined **Single-Question Intake Interview**:
195
198
 
196
199
  1. **Single Question: Execution Mode & Swarm Shape in <Detected Harness>**:
197
- - *Option 1 (Recommended)*: Multi-Agent Swarm: Balanced Triad in <Detected Harness> (Systems Architect `@architect`, Adversarial Auditor `@auditor`, DevEx Lead `@implementer`; unique listener codenames allocated via `rhizo name <project>`).
200
+ - *Option 1 (Recommended)*: Multi-Agent Swarm: Balanced Triad in <Detected Harness> using the harness default (`subagents` on Antigravity IDE / OpenCode Desktop; `tmux` panes on Codex CLI in `tmux`; `prompts` on Codex Desktop / non-`tmux` CLI) — Systems Architect `@architect`, Adversarial Auditor `@auditor`, DevEx Lead `@implementer`; unique listener codenames allocated via `rhizo name <project>`.
198
201
  - *Option 2*: Multi-Agent Swarm: Focused Duo in <Detected Harness> (Implementation Lead `@implementer`, Adversarial Auditor `@auditor`; unique listener codenames allocated via `rhizo name <project>`).
199
202
  - *Option 3 (Deprioritized)*: Single-Agent Inline (Execute sequentially within current chat session; strongly discouraged for code edits to preserve orchestrator context for governance).
200
- - *Option 4*: Custom Swarm (Operator specifies custom roles or cross-harness distribution).
203
+ - *Option 4*: Custom Swarm / Mode Override (Operator specifies custom roles, `--mode prompts`, `--tmux`, or cross-harness distribution).
201
204
 
202
205
  <CRITICAL>
203
- Sovereign Dedicated Sessions Only (Universal Subagent & Tmux Prohibition):
204
- Swarm workers are ALWAYS sovereign, independent interactive sessions (dedicated terminal tabs or IDE windows) bootstrapped via copy-paste prompt cards wrapped in 10 backticks. Harness-internal subagents (e.g. Antigravity's `invoke_subagent`, Claude Code's `Task`, OpenCode subtasks, Cursor sub-composers) are STRICTLY PROHIBITED as swarm workers across all harnesses. Internal subagents are ephemeral, cannot maintain continuous background listeners, and cause severe context poisoning. Terminal multiplexers (tmux) are unsupported. NEVER offer or present "subagents" or "tmux" as options during intake.
206
+ Capability-Aware Worker Execution & Opaque-Subagent Prohibition:
207
+ Match the execution mechanism to what the active harness makes live, inspectable, and directly chat-steerable for the operator:
208
+ - **Antigravity IDE & OpenCode Desktop (`subagents` default)**: Spawn persistent drillable subagents (`invoke_subagent` + `send_message` in Antigravity, or sidebar child sessions in OpenCode Desktop) via `garden prompts --subagent --json`. Always print clickable session links (e.g. `[Systems Architect (@<name>)](conversation://<id>)`) at the top of the orchestrator response so the operator can click in and chat directly. Every subagent worker MUST follow the full worker procedure: unique `rhizo name` + `rhizo open <name>`, explicit `--agent <name>`, 1:1 isolated Vine strand (`vine new <task_id>`), `vine submit`, and independent Key 3 audit by a separate `@auditor` subagent.
209
+ - **OpenCode CLI (TUI)**: Defaults to drillable child sessions (`subagents`) or opt-in `tmux` split panes (`--tmux`).
210
+ - **Codex CLI (Text)**: Defaults to automated `tmux` windows/panes (`garden launch --tmux`) when `tmux` is available, falling back to 10-backtick prompt cards outside `tmux`.
211
+ - **Codex Desktop & Claude Code CLI**: Default to top-level sessions via 10-backtick prompt cards in `/tmp/garden-<project>/<worker>.md` (or `--tmux` for Claude Code CLI inside `tmux`).
212
+ - **Opaque CLI Subagents Prohibited as Swarm Workers**: Headless/non-interactive subagent tools (such as Claude Code `Task` jobs where the user cannot drill in and chat mid-flight) MUST NEVER be used as swarm workers and remain restricted to transient read-only inspections.
205
213
  </CRITICAL>
206
214
 
207
215
  <CRITICAL>
208
216
  Session Default Models (Standalone Model Quizzes Prohibited):
209
- Swarm workers operate in sovereign interactive sessions and inherit whatever foundation model is active in that harness session (e.g., Gemini in Antigravity, Claude in Claude Code, configured workspace models in OpenCode). NEVER present a separate question asking the operator to choose "Foundation Model Pairings". In prompt cards, model configuration defaults to `"Session Default (active in window/tab)"`.
217
+ Swarm workers inherit whatever foundation model is active in that harness session (e.g., Gemini in Antigravity, Claude in Claude Code, configured workspace models in OpenCode). NEVER present a separate question asking the operator to choose "Foundation Model Pairings". In prompt cards and subagent briefs, model configuration defaults to `"Session Default (active in window/tab)"`.
210
218
  </CRITICAL>
211
219
 
212
- #### Automatic Fulfillment & 10-Backtick Prompt Generation:
220
+ #### Automatic Fulfillment & Worker Launch:
213
221
  Upon receiving the operator's response:
214
222
  1. Run `garden init` if `garden.toml` or `AGENTS.md` is not yet initialized.
215
- 2. Synthesize swarm configuration reflecting the chosen workers, roles, detected harness, and session-default models (zero on-disk JSON).
216
- 3. Run `garden prompts` which writes individual prompt cards to `/tmp/garden-<project>/<worker>.md` and all cards to `/tmp/garden-<project>/all-workers.md`.
217
- 4. Present the operator with concise setup instructions with clickable prompt file paths (NEVER paste prompt cards inline in chat):
218
- ```text
219
- 1. Open X terminal tabs or windows in your detected coding harness.
220
- 2. Pass each worker's prompt card into its session (e.g. paste or reference /tmp/garden-<project>/<worker>.md).
221
- 3. Once launched, tell me here (or I will automatically detect them online via `rhizo who`).
222
- ```
223
- 5. Register the orchestrator's presence (`rhizo open <project>-orchestrator`) and arm the listener.
224
- 6. Poll or await cluster readiness gate (`rhizo who --json`) before proceeding to Phase 3.
223
+ 2. Synthesize swarm configuration reflecting the chosen workers, roles, detected harness, and resolved execution mode (`auto`, `subagents`, `tmux`, or `prompts`).
224
+ 3. Run `garden prompts --json` (or `garden launch --tmux` when launching `tmux` panes, or `garden prompts --subagent --json` for drillable subagent briefs), which writes cards/briefs to `/tmp/garden-<project>/`.
225
+ 4. Launch or instruct based on the resolved mode:
226
+ - **If `subagents`**: Invoke persistent drillable subagents with each worker's brief, print clickable `[Persona (@<name>)](conversation://<id>)` links in chat, and verify their registration via `rhizo who --json`.
227
+ - **If `tmux`**: `garden launch --tmux` opens one `tmux` window per worker pointing at `/tmp/garden-<project>/<worker>.md`, and the orchestrator arms `rhizo listen <orchestrator>`.
228
+ - **If `prompts`**: Present concise setup instructions with clickable `/tmp/garden-<project>/<worker>.md` paths (NEVER paste full prompt cards inline in chat), register the orchestrator (`rhizo open`), and arm the listener if in a CLI subprocess harness.
229
+ 5. Verify cluster readiness (`rhizo who --json`) before proceeding to Phase 3.
225
230
 
226
231
 
227
232
  ---
@@ -368,11 +373,15 @@ The Adversarial Auditor ONLY inspects and ratifies/rejects Key 3 (`vine audit in
368
373
  </CRITICAL>
369
374
 
370
375
  <INVARIANT>
371
- Sovereign Session & Subagent Prohibition: Swarm workers are ALWAYS sovereign, independent interactive sessions (dedicated terminal tabs, CLI windows, or IDE sessions) bootstrapped via Garden 10-backtick prompt cards. Harness-internal subagents (e.g., Antigravity's 'invoke_subagent', Claude Code's 'Task', OpenCode subagents, Cursor sub-composers) are STRICTLY PROHIBITED from acting as cluster swarm workers across all harnesses. Internal subagents are ephemeral, terminate upon single-task completion, cannot maintain persistent blocking listeners ('rhizo listen'), corrupt workspace isolation, and cause severe context poisoning by dumping execution traces back into the parent prompt. When orchestrating or bootstrapping a swarm, an orchestrator must NEVER spawn internal subagents and must NEVER offer "subagents" as a worker execution option during intake.
376
+ Capability-Aware Worker Execution & Subagent Policy: First check `rhizo who --all --json` and attach to active project or unassigned pool workers when available. On cold starts, execution mode matches harness visibility and direct chat interactivity:
377
+ 1. Drillable Persistent Subagents (`subagents` — Default on Antigravity IDE & OpenCode Desktop): Persistent child sessions where the user can click in and chat interactively (`conversation://<id>` pills in Antigravity; sidebar session tree in OpenCode Desktop) are valid swarm workers when they follow the full worker procedure (unique `rhizo name` + `rhizo open <name>`, explicit `--agent <name>`, 1:1 isolated Vine strand `vine new <task_id>`, `vine submit`, and independent Key 3 audit by a separate `@auditor` subagent).
378
+ 2. Automated `tmux` Panes (`tmux` — Default on Codex CLI in `tmux`; opt-in for CLI harnesses): CLI sessions spawned via `garden launch --tmux` wired to `rhizo listen` and `/tmp/garden-<project>/<worker>.md`.
379
+ 3. Top-Level Prompt Cards (`prompts` — Default on Codex Desktop & non-`tmux` CLI): Independent interactive windows bootstrapped via Garden 10-backtick prompt cards.
380
+ Opaque, non-interactive CLI subagents (such as headless `Task` jobs that cannot be drilled into or steered) are STRICTLY PROHIBITED as cluster swarm workers.
372
381
  </INVARIANT>
373
382
 
374
383
  <INVARIANT>
375
- Delegation Precedence: When instructed to "delegate", "assign", or "dispatch" work, the Lead Orchestrator MUST route tasks to active cluster workers via Rhizo (`rhizo send <worker>`, `rhizo enqueue queue:<project>:tasks`, or `rhizo task assign/claim`). Harness-internal subagents (e.g. `invoke_subagent`, `Task`, `Agent`) must NEVER be used to fulfill cluster swarm roles; they are restricted solely to transient, single-turn ad-hoc inspections in non-swarm solo chats when the operator explicitly requests a "subagent" by name.
384
+ Delegation Precedence: When instructed to "delegate", "assign", or "dispatch" work, the Lead Orchestrator MUST route tasks to active cluster workers via Rhizo (`rhizo send <worker>`, `rhizo enqueue queue:<project>:tasks`, or `rhizo task assign/claim`). On cold starts with no online cluster workers, dispatch via the harness's capability-aware default (`subagents` with clickable session links on Antigravity IDE & OpenCode Desktop; `tmux` panes or 10-backtick prompt cards on CLI / Codex Desktop). Opaque non-interactive CLI subagents must NEVER fulfill cluster swarm roles and remain restricted solely to transient ad-hoc inspections.
376
385
  </INVARIANT>
377
386
 
378
387
  <INVARIANT>
Binary file
Binary file
Binary file
Binary file
Binary file
package/bin/run.js CHANGED
@@ -81,7 +81,7 @@ function resolveBinary() {
81
81
  ? (process.env.LOCALAPPDATA || path.join(os.homedir(), 'AppData', 'Local'))
82
82
  : path.join(os.homedir(), '.cache')
83
83
  );
84
- const cacheBinDir = path.join(cacheBase, PKG_NAME, 'bin');
84
+ const cacheBinDir = path.join(cacheBase, PKG_NAME, VERSION, 'bin');
85
85
  const cachedBin = path.join(cacheBinDir, `${PKG_NAME}${ext}`);
86
86
 
87
87
  if (isCompatibleBinary(cachedBin)) {
@@ -116,7 +116,8 @@ function resolveBinary() {
116
116
  const srcFile = path.join(__dirname, '..', 'src', `${PKG_NAME}.nim`);
117
117
  if (fs.existsSync(srcFile)) {
118
118
  try {
119
- execSync('which nim', { stdio: 'ignore' });
119
+ const whichCmd = process.platform === 'win32' ? 'where nim' : 'which nim';
120
+ execSync(whichCmd, { stdio: 'ignore' });
120
121
  process.stderr.write(`[@axiomantic/${PKG_NAME}] Building from source via Nim compiler...\n`);
121
122
  fs.mkdirSync(cacheBinDir, { recursive: true });
122
123
  execSync(`nim c -d:release --opt:speed -o:"${cachedBin}" "${srcFile}"`, { stdio: 'inherit' });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axiomantic/garden",
3
- "version": "0.2.30",
3
+ "version": "0.2.31",
4
4
  "description": "Multi-Agent Swarm Orchestration, Empirical Dialectics & Ceremonies on top of Rhizo & Vine",
5
5
  "main": "bin/run.js",
6
6
  "bin": {
@@ -45,22 +45,27 @@ Workers who write code are strictly prohibited from auditing or ratifying their
45
45
 
46
46
  ## 2. Harness & Model Alignment
47
47
 
48
- Every recommended worker represents an INDEPENDENT, DEDICATED CODING SESSION (separate terminal tab or dedicated IDE window) bootstrapped via Garden 10-backtick prompt cards.
48
+ Every recommended worker represents either a **persistent drillable subagent** (default on Antigravity IDE and OpenCode Desktop, where you can click into the child session and chat directly), an **automated `tmux` pane** (default on Codex CLI in `tmux`, opt-in on OpenCode CLI / Claude Code CLI), or a **top-level interactive session** bootstrapped via Garden 10-backtick prompt cards (default on Codex Desktop and non-`tmux` terminals).
49
49
 
50
50
  Workers inherit whatever foundation model is native or configured in that session:
51
- - In **Antigravity IDE**: Workers run on Antigravity's active session models (Gemini).
52
- - In **Claude Code CLI**: Workers run on Claude CLI's active models (Claude 3.7 Sonnet).
53
- - In **OpenCode Desktop**: Workers run on models configured in `opencode.json`.
51
+ - In **Antigravity IDE**: Workers run as persistent subagents (`invoke_subagent` + `send_message` with clickable `conversation://<id>` links) or dedicated windows on Antigravity's active session models.
52
+ - In **Claude Code CLI**: Workers run in dedicated tabs or `tmux` panes on Claude CLI's active models.
53
+ - In **OpenCode Desktop**: Workers run as drillable child sessions (sidebar tree) or dedicated sessions on models configured in `opencode.json`.
54
+ - In **Codex Desktop / Codex CLI**: Codex Desktop threads use top-level Prompt Cards; Codex CLI defaults to `garden launch --tmux` (when `tmux` is available) or Prompt Cards.
54
55
  - In **Headless Terminal / Pi**: Workers run on provider CLI configuration.
55
56
 
56
57
  <CRITICAL>
57
- Sovereign Dedicated Sessions Only (Universal Subagent Prohibition):
58
- Swarm workers are ALWAYS sovereign, independent interactive sessions (separate terminal tabs or dedicated IDE windows) bootstrapped via Garden 10-backtick prompt cards. Harness-internal subagents (e.g. Antigravity's `invoke_subagent`, Claude Code's `Task`, OpenCode subtasks, Cursor sub-composers) are STRICTLY FORBIDDEN from acting as swarm workers. NEVER pair a persona with internal subagents.
58
+ Capability-Aware Worker Execution & Opaque Subagent Prohibition:
59
+ Match worker execution to what the harness makes inspectable and interactively steerable:
60
+ - **Antigravity IDE & OpenCode Desktop**: Default to persistent drillable subagents (`subagents`) obeying the full worker procedure (unique Rhizo ID, explicit `--agent <name>`, 1:1 Vine strand, `vine submit`, independent Key 3 audit).
61
+ - **Codex CLI (`tmux`) / OpenCode CLI (`--tmux`)**: Automated `tmux` windows/panes via `garden launch --tmux`.
62
+ - **Codex Desktop & Non-`tmux` CLI**: Top-level sessions via 10-backtick prompt cards.
63
+ - **Opaque CLI Subagents Prohibited**: Non-interactive, headless subagent tools (where the operator cannot drill in and chat mid-flight) are STRICTLY FORBIDDEN as swarm workers.
59
64
  </CRITICAL>
60
65
 
61
66
  <CRITICAL>
62
67
  Session Default Models (No Cross-Harness Model Quizzes):
63
- Swarm workers operate in sovereign interactive sessions and inherit whatever foundation model is active in that harness session. NEVER present a separate question asking the operator to choose "Foundation Model Pairings", and NEVER present model options that do not correspond to the chosen harness. In prompt cards and swarm specifications, models default to `"Session Default (active in window/tab)"`.
68
+ Swarm workers operate in interactive sessions or inherited subagent sessions and inherit whatever foundation model is active in that harness session. NEVER present a separate question asking the operator to choose "Foundation Model Pairings", and NEVER present model options that do not correspond to the chosen harness. In prompt cards and swarm specifications, models default to `"Session Default (active in window/tab)"`.
64
69
  </CRITICAL>
65
70
 
66
71
  <CRITICAL>
@@ -69,12 +74,12 @@ Whimsical Non-Human Personas & Dynamic Invention Invariant (GVR-017):
69
74
  2. Dynamic Synthesis Mandate: When configuring or recommending swarm personas, NEVER draw from or reuse static, generic, or example lists. Dynamically synthesize completely original, inventive compound monikers ([Descriptor]-[Entity/Craft]) tailored specifically to the target project's domain.
70
75
  </CRITICAL>
71
76
 
72
- | Role Mandate | Recommended Harness | Model Alignment | Rationale |
77
+ | Role Mandate | Recommended Mode / Harness | Model Alignment | Rationale |
73
78
  | :--- | :--- | :--- | :--- |
74
- | **Architectural Design & Systems Modeling** | **Antigravity (Dedicated Window)** or **OpenCode (Dedicated Session)** | Session Default (Native in window) | Fast token throughput, deep reasoning, superior multi-file architectural comprehension, and native background ear support. |
75
- | **Adversarial Audit & Code Quality Purism** | **Claude Code CLI (Dedicated Tab)** or **Antigravity (Dedicated Window)** | Session Default (Native in tab/window) | Uncompromising adherence to instructions, meticulous attention to negative controls, zero tolerance for superficial green tests. |
76
- | **DevEx, Rapid Prototyping & Implementation** | **Antigravity (Dedicated Window)** or **OpenCode (Dedicated Session)** | Session Default (Native in window) | Native reactive tool execution (`run_command`), rapid file modification, direct terminal feedback. |
77
- | **Hermetic / Local Security Analysis** | **Headless Terminal Worker (Dedicated Tab)** | Ollama / Local DeepSeek-R1 | Air-gapped execution for proprietary credentials, licensing checks, or sensitive security audits. |
79
+ | **Architectural Design & Systems Modeling** | **Antigravity (`subagents` default / Window)** or **OpenCode Desktop (`subagents`)** | Session Default (Native in window) | Zero-setup drillable child sessions (`conversation://<id>`) or top-level sessions with fast architectural comprehension. |
80
+ | **Adversarial Audit & Code Quality Purism** | **Separate `@auditor` Subagent (`subagents`)** or **Codex / Claude Code (`tmux` / Tab)** | Session Default (Native in tab/window) | Strict separation (`auditor != author`), uncompromising negative controls, zero tolerance for superficial green tests. |
81
+ | **DevEx, Rapid Prototyping & Implementation** | **Antigravity (`subagents` default / Window)**, **OpenCode Desktop**, or **Codex CLI (`tmux`)** | Session Default (Native in window) | Isolated 1:1 Vine strand execution, rapid file modification, direct verification (`vine gate` / `vine submit`). |
82
+ | **Hermetic / Local Security Analysis** | **Headless Terminal Worker (Dedicated Tab / `tmux`)** | Ollama / Local DeepSeek-R1 | Air-gapped execution for proprietary credentials, licensing checks, or sensitive security audits. |
78
83
 
79
84
  ---
80
85
 
@@ -116,11 +121,13 @@ Run `rhizo who --all --json` to triage cluster listener state:
116
121
 
117
122
  ### Step 2: Formulate Recommendation in Detected Harness
118
123
  Auto-detect the orchestrator's active harness from environment variables:
119
- - `ANTIGRAVITY_APP_DIR` $\to$ "Antigravity IDE"
120
- - `CLAUDE_CODE` $\to$ "Claude Code CLI"
121
- - `OPENCODE_SESSION_ID` $\to$ "OpenCode"
122
- - `CODEX_SESSION_ID` $\to$ "ChatGPT Desktop / Codex"
123
- - `PI_SESSION_ID` $\to$ "Pi"
124
+ - `ANTIGRAVITY_APP_DIR` $\to$ "Antigravity IDE" (`subagents` default)
125
+ - `CLAUDE_CODE` $\to$ "Claude Code CLI" (`tmux` in `$TMUX` / `prompts` default)
126
+ - `OPENCODE_DESKTOP` $\to$ "OpenCode Desktop" (`subagents` default)
127
+ - `OPENCODE_SESSION_ID` $\to$ "OpenCode" (`subagents` default)
128
+ - `CODEX_CLI` $\to$ "Codex CLI" (`tmux` default when available, else `prompts`)
129
+ - `CODEX_SESSION_ID` $\to$ "ChatGPT Desktop / Codex" (`prompts` default)
130
+ - `PI_SESSION_ID` $\to$ "Pi" (`tmux` in `$TMUX` / `prompts` default)
124
131
  - Default fallback $\to$ "Antigravity / Claude Code"
125
132
 
126
133
  Synthesize the primary triad targeting the detected harness with session-default models:
@@ -131,10 +138,10 @@ Synthesize the primary triad targeting the detected harness with session-default
131
138
 
132
139
  ### Step 3: Interactive Operator Ratification (`ask_question`)
133
140
  Invoke `ask_question` with a SINGLE concise question combining execution mode and swarm shape in the detected harness:
134
- - Option 1 (Recommended): Multi-Agent Swarm: Balanced Triad in <Detected Harness> (Architect, Auditor, Implementer with session-native models)
141
+ - Option 1 (Recommended): Multi-Agent Swarm: Balanced Triad in <Detected Harness> using harness default (`subagents` on Antigravity IDE / OpenCode Desktop, `tmux` on Codex CLI, `prompts` on Codex Desktop)
135
142
  - Option 2: Multi-Agent Swarm: Focused Duo in <Detected Harness> (Implementation Lead + Adversarial Auditor)
136
143
  - Option 3 (Deprioritized): Single-Agent Inline (Execute sequentially within current chat session; strongly discouraged for code edits to preserve orchestrator context for governance)
137
- - Option 4: Custom configuration (allows user write-in).
144
+ - Option 4: Custom configuration or mode override (`--mode prompts`, `--tmux`, `--subagent`).
138
145
 
139
146
  ### Step 4: Synthesize Swarm Specification
140
147
  Once ratified, Garden synthesizes the swarm configuration dynamically in memory (zero on-disk JSON).
@@ -167,8 +167,11 @@ When target project workers are needed and unassigned idle cluster peers exist,
167
167
  The recipient worker inspects its local toolchain, self-selects a compatible role, adds corresponding tags (`rhizo tag add <tags>`), and replies with `WORKER_READY`.
168
168
  - **Negative Control & Tenancy Guardrail**: Repurposing rejects workers belonging to other named projects unless `--allow-cross-project` is specified. It also rejects workers that are actively `BUSY` on tasks (requires `--force`).
169
169
 
170
- - **Pathway B (Fresh Session Bootstrapping via Prompt Cards)**:
171
- When zero unassigned cluster listeners exist (even if workers from other projects are online) or the operator prefers isolated fresh sessions, Garden generates self-contained 10-backtick prompt cards in `/tmp/garden-<project>/` via `garden prompts` (or `garden launch`). Dedicated prompt cards are the primary and intended mechanism for spinning up workers for a new project!
170
+ - **Pathway B (Fresh Session Bootstrapping via Capability-Aware Mode)**:
171
+ When zero unassigned cluster listeners exist (even if workers from other projects are online) or the operator prefers fresh sessions, Garden selects the execution mode based on detected harness capabilities (`execution_mode = "auto"`):
172
+ 1. **`subagents` (Default on Antigravity IDE & OpenCode Desktop)**: Spawns persistent, drillable subagents (`invoke_subagent` + `send_message` with clickable `[Persona (@name)](conversation://<id>)` pills in Antigravity, or child sessions in OpenCode Desktop) using briefs generated by `garden prompts --subagent --json`.
173
+ 2. **`tmux` (Default on Codex CLI in `tmux`; opt-in on OpenCode CLI / Claude Code CLI)**: Runs `garden launch --tmux` to spawn one `tmux` window/pane per worker running `codex` / `opencode` / `claude` against `/tmp/garden-<project>/<worker>.md`.
174
+ 3. **`prompts` (Default on Codex Desktop & non-`tmux` CLI)**: Generates self-contained 10-backtick prompt cards in `/tmp/garden-<project>/` via `garden prompts` (or `garden prompts --force-prompts`).
172
175
 
173
176
  <CRITICAL>
174
177
  Operator-Named Worker Delegation Mandate:
@@ -191,37 +194,39 @@ Never Hijack or Kill Another Session's Active Listener: When 'rhizo listen <agen
191
194
 
192
195
  #### Cold-Start Intake Protocol (Zero Active Workers Only)
193
196
  When an operator initiates a fresh project or requests multi-agent coordination and NO active cluster workers exist, the session MUST NOT silently guess configuration.
194
- Because the coding harness is auto-detected from the session environment (`ANTIGRAVITY_APP_DIR` $\to$ Antigravity IDE, `CLAUDE_CODE` $\to$ Claude Code CLI, `OPENCODE_SESSION_ID` $\to$ OpenCode, `CODEX_SESSION_ID` $\to$ ChatGPT Desktop / Codex, `PI_SESSION_ID` $\to$ Pi), the orchestrator invokes `ask_question` to conduct a streamlined **Single-Question Intake Interview**:
197
+ Because the coding harness is auto-detected from the session environment (`ANTIGRAVITY_APP_DIR` $\to$ Antigravity IDE, `CLAUDE_CODE` $\to$ Claude Code CLI, `OPENCODE_DESKTOP` $\to$ OpenCode Desktop, `OPENCODE_SESSION_ID` $\to$ OpenCode, `CODEX_CLI` $\to$ Codex CLI, `CODEX_SESSION_ID` $\to$ ChatGPT Desktop / Codex, `PI_SESSION_ID` $\to$ Pi), the orchestrator invokes `ask_question` to conduct a streamlined **Single-Question Intake Interview**:
195
198
 
196
199
  1. **Single Question: Execution Mode & Swarm Shape in <Detected Harness>**:
197
- - *Option 1 (Recommended)*: Multi-Agent Swarm: Balanced Triad in <Detected Harness> (Systems Architect `@architect`, Adversarial Auditor `@auditor`, DevEx Lead `@implementer`; unique listener codenames allocated via `rhizo name <project>`).
200
+ - *Option 1 (Recommended)*: Multi-Agent Swarm: Balanced Triad in <Detected Harness> using the harness default (`subagents` on Antigravity IDE / OpenCode Desktop; `tmux` panes on Codex CLI in `tmux`; `prompts` on Codex Desktop / non-`tmux` CLI) — Systems Architect `@architect`, Adversarial Auditor `@auditor`, DevEx Lead `@implementer`; unique listener codenames allocated via `rhizo name <project>`.
198
201
  - *Option 2*: Multi-Agent Swarm: Focused Duo in <Detected Harness> (Implementation Lead `@implementer`, Adversarial Auditor `@auditor`; unique listener codenames allocated via `rhizo name <project>`).
199
202
  - *Option 3 (Deprioritized)*: Single-Agent Inline (Execute sequentially within current chat session; strongly discouraged for code edits to preserve orchestrator context for governance).
200
- - *Option 4*: Custom Swarm (Operator specifies custom roles or cross-harness distribution).
203
+ - *Option 4*: Custom Swarm / Mode Override (Operator specifies custom roles, `--mode prompts`, `--tmux`, or cross-harness distribution).
201
204
 
202
205
  <CRITICAL>
203
- Sovereign Dedicated Sessions Only (Universal Subagent & Tmux Prohibition):
204
- Swarm workers are ALWAYS sovereign, independent interactive sessions (dedicated terminal tabs or IDE windows) bootstrapped via copy-paste prompt cards wrapped in 10 backticks. Harness-internal subagents (e.g. Antigravity's `invoke_subagent`, Claude Code's `Task`, OpenCode subtasks, Cursor sub-composers) are STRICTLY PROHIBITED as swarm workers across all harnesses. Internal subagents are ephemeral, cannot maintain continuous background listeners, and cause severe context poisoning. Terminal multiplexers (tmux) are unsupported. NEVER offer or present "subagents" or "tmux" as options during intake.
206
+ Capability-Aware Worker Execution & Opaque-Subagent Prohibition:
207
+ Match the execution mechanism to what the active harness makes live, inspectable, and directly chat-steerable for the operator:
208
+ - **Antigravity IDE & OpenCode Desktop (`subagents` default)**: Spawn persistent drillable subagents (`invoke_subagent` + `send_message` in Antigravity, or sidebar child sessions in OpenCode Desktop) via `garden prompts --subagent --json`. Always print clickable session links (e.g. `[Systems Architect (@<name>)](conversation://<id>)`) at the top of the orchestrator response so the operator can click in and chat directly. Every subagent worker MUST follow the full worker procedure: unique `rhizo name` + `rhizo open <name>`, explicit `--agent <name>`, 1:1 isolated Vine strand (`vine new <task_id>`), `vine submit`, and independent Key 3 audit by a separate `@auditor` subagent.
209
+ - **OpenCode CLI (TUI)**: Defaults to drillable child sessions (`subagents`) or opt-in `tmux` split panes (`--tmux`).
210
+ - **Codex CLI (Text)**: Defaults to automated `tmux` windows/panes (`garden launch --tmux`) when `tmux` is available, falling back to 10-backtick prompt cards outside `tmux`.
211
+ - **Codex Desktop & Claude Code CLI**: Default to top-level sessions via 10-backtick prompt cards in `/tmp/garden-<project>/<worker>.md` (or `--tmux` for Claude Code CLI inside `tmux`).
212
+ - **Opaque CLI Subagents Prohibited as Swarm Workers**: Headless/non-interactive subagent tools (such as Claude Code `Task` jobs where the user cannot drill in and chat mid-flight) MUST NEVER be used as swarm workers and remain restricted to transient read-only inspections.
205
213
  </CRITICAL>
206
214
 
207
215
  <CRITICAL>
208
216
  Session Default Models (Standalone Model Quizzes Prohibited):
209
- Swarm workers operate in sovereign interactive sessions and inherit whatever foundation model is active in that harness session (e.g., Gemini in Antigravity, Claude in Claude Code, configured workspace models in OpenCode). NEVER present a separate question asking the operator to choose "Foundation Model Pairings". In prompt cards, model configuration defaults to `"Session Default (active in window/tab)"`.
217
+ Swarm workers inherit whatever foundation model is active in that harness session (e.g., Gemini in Antigravity, Claude in Claude Code, configured workspace models in OpenCode). NEVER present a separate question asking the operator to choose "Foundation Model Pairings". In prompt cards and subagent briefs, model configuration defaults to `"Session Default (active in window/tab)"`.
210
218
  </CRITICAL>
211
219
 
212
- #### Automatic Fulfillment & 10-Backtick Prompt Generation:
220
+ #### Automatic Fulfillment & Worker Launch:
213
221
  Upon receiving the operator's response:
214
222
  1. Run `garden init` if `garden.toml` or `AGENTS.md` is not yet initialized.
215
- 2. Synthesize swarm configuration reflecting the chosen workers, roles, detected harness, and session-default models (zero on-disk JSON).
216
- 3. Run `garden prompts` which writes individual prompt cards to `/tmp/garden-<project>/<worker>.md` and all cards to `/tmp/garden-<project>/all-workers.md`.
217
- 4. Present the operator with concise setup instructions with clickable prompt file paths (NEVER paste prompt cards inline in chat):
218
- ```text
219
- 1. Open X terminal tabs or windows in your detected coding harness.
220
- 2. Pass each worker's prompt card into its session (e.g. paste or reference /tmp/garden-<project>/<worker>.md).
221
- 3. Once launched, tell me here (or I will automatically detect them online via `rhizo who`).
222
- ```
223
- 5. Register the orchestrator's presence (`rhizo open <project>-orchestrator`) and arm the listener.
224
- 6. Poll or await cluster readiness gate (`rhizo who --json`) before proceeding to Phase 3.
223
+ 2. Synthesize swarm configuration reflecting the chosen workers, roles, detected harness, and resolved execution mode (`auto`, `subagents`, `tmux`, or `prompts`).
224
+ 3. Run `garden prompts --json` (or `garden launch --tmux` when launching `tmux` panes, or `garden prompts --subagent --json` for drillable subagent briefs), which writes cards/briefs to `/tmp/garden-<project>/`.
225
+ 4. Launch or instruct based on the resolved mode:
226
+ - **If `subagents`**: Invoke persistent drillable subagents with each worker's brief, print clickable `[Persona (@<name>)](conversation://<id>)` links in chat, and verify their registration via `rhizo who --json`.
227
+ - **If `tmux`**: `garden launch --tmux` opens one `tmux` window per worker pointing at `/tmp/garden-<project>/<worker>.md`, and the orchestrator arms `rhizo listen <orchestrator>`.
228
+ - **If `prompts`**: Present concise setup instructions with clickable `/tmp/garden-<project>/<worker>.md` paths (NEVER paste full prompt cards inline in chat), register the orchestrator (`rhizo open`), and arm the listener if in a CLI subprocess harness.
229
+ 5. Verify cluster readiness (`rhizo who --json`) before proceeding to Phase 3.
225
230
 
226
231
 
227
232
  ---
@@ -368,11 +373,15 @@ The Adversarial Auditor ONLY inspects and ratifies/rejects Key 3 (`vine audit in
368
373
  </CRITICAL>
369
374
 
370
375
  <INVARIANT>
371
- Sovereign Session & Subagent Prohibition: Swarm workers are ALWAYS sovereign, independent interactive sessions (dedicated terminal tabs, CLI windows, or IDE sessions) bootstrapped via Garden 10-backtick prompt cards. Harness-internal subagents (e.g., Antigravity's 'invoke_subagent', Claude Code's 'Task', OpenCode subagents, Cursor sub-composers) are STRICTLY PROHIBITED from acting as cluster swarm workers across all harnesses. Internal subagents are ephemeral, terminate upon single-task completion, cannot maintain persistent blocking listeners ('rhizo listen'), corrupt workspace isolation, and cause severe context poisoning by dumping execution traces back into the parent prompt. When orchestrating or bootstrapping a swarm, an orchestrator must NEVER spawn internal subagents and must NEVER offer "subagents" as a worker execution option during intake.
376
+ Capability-Aware Worker Execution & Subagent Policy: First check `rhizo who --all --json` and attach to active project or unassigned pool workers when available. On cold starts, execution mode matches harness visibility and direct chat interactivity:
377
+ 1. Drillable Persistent Subagents (`subagents` — Default on Antigravity IDE & OpenCode Desktop): Persistent child sessions where the user can click in and chat interactively (`conversation://<id>` pills in Antigravity; sidebar session tree in OpenCode Desktop) are valid swarm workers when they follow the full worker procedure (unique `rhizo name` + `rhizo open <name>`, explicit `--agent <name>`, 1:1 isolated Vine strand `vine new <task_id>`, `vine submit`, and independent Key 3 audit by a separate `@auditor` subagent).
378
+ 2. Automated `tmux` Panes (`tmux` — Default on Codex CLI in `tmux`; opt-in for CLI harnesses): CLI sessions spawned via `garden launch --tmux` wired to `rhizo listen` and `/tmp/garden-<project>/<worker>.md`.
379
+ 3. Top-Level Prompt Cards (`prompts` — Default on Codex Desktop & non-`tmux` CLI): Independent interactive windows bootstrapped via Garden 10-backtick prompt cards.
380
+ Opaque, non-interactive CLI subagents (such as headless `Task` jobs that cannot be drilled into or steered) are STRICTLY PROHIBITED as cluster swarm workers.
372
381
  </INVARIANT>
373
382
 
374
383
  <INVARIANT>
375
- Delegation Precedence: When instructed to "delegate", "assign", or "dispatch" work, the Lead Orchestrator MUST route tasks to active cluster workers via Rhizo (`rhizo send <worker>`, `rhizo enqueue queue:<project>:tasks`, or `rhizo task assign/claim`). Harness-internal subagents (e.g. `invoke_subagent`, `Task`, `Agent`) must NEVER be used to fulfill cluster swarm roles; they are restricted solely to transient, single-turn ad-hoc inspections in non-swarm solo chats when the operator explicitly requests a "subagent" by name.
384
+ Delegation Precedence: When instructed to "delegate", "assign", or "dispatch" work, the Lead Orchestrator MUST route tasks to active cluster workers via Rhizo (`rhizo send <worker>`, `rhizo enqueue queue:<project>:tasks`, or `rhizo task assign/claim`). On cold starts with no online cluster workers, dispatch via the harness's capability-aware default (`subagents` with clickable session links on Antigravity IDE & OpenCode Desktop; `tmux` panes or 10-backtick prompt cards on CLI / Codex Desktop). Opaque non-interactive CLI subagents must NEVER fulfill cluster swarm roles and remain restricted solely to transient ad-hoc inspections.
376
385
  </INVARIANT>
377
386
 
378
387
  <INVARIANT>
@@ -12,14 +12,19 @@ description: "Generates and formats X distinct copy-pasteable bootstrap prompts
12
12
 
13
13
  ## 1. System Philosophy & Invariants
14
14
 
15
- 1. **Human-in-the-Loop Sovereign Session Autonomy**:
16
- - Terminal multiplexers (tmux) are unsupported. We do not blindly spawn tmux background processes or attempt to drive terminal multiplexers with fragile subshell scripting.
17
- - Workers run in sovereign, independent interactive sessions (dedicated terminal tabs or IDE windows) in the operator's active coding harness.
18
- 2. **Prompt Card Temp File Delivery (Zero Chat Flooding)**:
15
+ 1. **Capability-Aware Swarm Launch Pathways**:
16
+ Before launching new workers, always check `rhizo who --all --json` first to reuse active project workers or repurpose idle unassigned peers (`garden repurpose`). On cold starts (`execution_mode = "auto"`), choose the pathway matching the harness's visibility and direct chat interactivity:
17
+ - **Pathway 1 (Default on Antigravity IDE & OpenCode Desktop): Persistent Drillable Subagents (`subagents`)**:
18
+ Run `garden prompts --subagent --json` to generate per-worker briefs (`/tmp/garden-<project>/subagent-<worker>.md`), spawn persistent child sessions (`invoke_subagent` + `send_message` in Antigravity; child sessions in OpenCode Desktop), and surface clickable `[Persona (@name)](conversation://<id>)` links in chat so the operator can drill in and steer directly.
19
+ - **Pathway 2 (Default on Codex CLI in `tmux`; opt-in on OpenCode CLI / Claude Code CLI): Automated `tmux` Split-Pane / Window Factory (`tmux`)**:
20
+ Run `garden launch --tmux` to spawn one `tmux` window/pane per worker running `codex` / `opencode` / `claude` pointed at `/tmp/garden-<project>/<worker>.md`.
21
+ - **Pathway 3 (Default on Codex Desktop & Non-`tmux` CLI): 10-Backtick Prompt Cards (`prompts`)**:
22
+ Workers run in top-level interactive sessions bootstrapped from 10-backtick prompt cards in `/tmp/garden-<project>/<worker>.md`.
23
+ 2. **Prompt Card & Subagent Brief Temp File Delivery (Zero Chat Flooding)**:
19
24
  <CRITICAL>
20
- `garden prompts` and `garden launch` automatically write worker prompt cards to `/tmp/garden-<project>/<worker-name>.md` and a combined roster to `/tmp/garden-<project>/all-workers.md`.
25
+ `garden prompts` and `garden launch` automatically write worker prompt cards to `/tmp/garden-<project>/<worker-name>.md`, subagent briefs to `/tmp/garden-<project>/subagent-<worker-name>.md`, and a combined roster to `/tmp/garden-<project>/all-workers.md`.
21
26
  Orchestrator agents MUST NEVER dump thousands of lines of prompt text inline into the chat conversation. Dumping cards inline exhausts token context budgets, causes scrolling fatigue, and triggers chat UI rendering bugs.
22
- Instead, orchestrators MUST output concise session assignments with clickable file links (e.g. `/tmp/garden-<project>/<worker>.md`).
27
+ Instead, orchestrators MUST output concise session assignments with clickable file links (e.g. `/tmp/garden-<project>/<worker>.md` or `[Persona (@name)](conversation://<id>)`).
23
28
  Inside the generated files and when `--inline` is passed, blocks are wrapped in 10 backticks (``````````markdown) to protect nested markdown and shell code blocks.
24
29
  </CRITICAL>
25
30
  3. **Listener Discipline & Multiplexed Router**:
@@ -37,9 +42,11 @@ description: "Generates and formats X distinct copy-pasteable bootstrap prompts
37
42
  </CRITICAL>
38
43
  5. **Zero Dirty Commits**:
39
44
  - Never stage coordination state (`.rhizo.*`, `*.lock`, `workspaces/`) into Git. Vine stores strand identity in `.git/config` (`vine.taskId`, `vine.project`) and authoritative state in Redis (zero state files in the working tree).
40
- 6. **Sovereign Dedicated Session Invariant (Universal Subagent Prohibition)**:
45
+ 6. **Capability-Aware Subagent & Session Invariant**:
41
46
  <CRITICAL>
42
- Swarm workers are ALWAYS sovereign, independent interactive sessions (separate terminal tabs or IDE windows) bootstrapped via Garden 10-backtick prompt cards. Harness-internal subagents (e.g. Antigravity's `invoke_subagent`, Claude Code's `Task`, OpenCode subtasks, Cursor sub-composers) are STRICTLY FORBIDDEN from acting as swarm workers. Prompt cards are generated strictly for human operators to paste into separate sessions. The orchestrator must NEVER attempt to automate prompt cards by feeding them into internal subagents.
47
+ - **Drillable Persistent Subagents (Antigravity IDE & OpenCode Desktop)**: Allowed and recommended as first-class swarm workers when spawned from `garden prompts --subagent --json`, provided each subagent follows the full worker procedure: unique Rhizo identity (`rhizo open <name>`), explicit `--agent <name>`, 1:1 isolated Vine strand (`vine new <task_id>`), `vine submit`, and independent Key 3 audit by a separate `@auditor` subagent. Always display clickable session links (`conversation://<id>`) in chat.
48
+ - **Top-Level / `tmux` Interactive Sessions (Codex Desktop, Codex CLI, Claude Code CLI)**: Bootstrapped via `/tmp/garden-<project>/<worker>.md` (manually pasted or spawned via `garden launch --tmux`).
49
+ - **Opaque Ephemeral Subagents Prohibited**: Non-interactive CLI subagents (such as headless `Task` jobs that the user cannot click into and chat with) are STRICTLY FORBIDDEN from acting as swarm workers.
43
50
  </CRITICAL>
44
51
  7. **Closed-Circuit & Holistic Integration Invariant**:
45
52
  <CRITICAL>
@@ -26,7 +26,11 @@ The Lead Orchestrator provisions an independent Adversarial Auditor persona to i
26
26
  <CRITICAL>
27
27
  Delegation Precedence & Operator-Named Worker Mandate:
28
28
  Whenever instructed to "delegate", "assign", or "dispatch" work, the Lead Orchestrator MUST route tasks to active cluster workers via Rhizo (`rhizo send <worker>`, `rhizo enqueue queue:<project>:tasks`, or `rhizo task assign/claim`).
29
- Cluster workers operate exclusively in dedicated, sovereign sessions bootstrapped via 10-backtick prompt cards. NEVER spawn harness-internal subagents (e.g. `invoke_subagent`, `Task`, OpenCode subtasks) to act as cluster workers. Internal subagents are ephemeral, cannot maintain persistent blocking listeners, and cause severe context poisoning. Harness-internal subagents are restricted solely to transient, single-turn ad-hoc inspections in non-swarm solo chats when the operator explicitly specifies the word "subagent".
29
+ On cold starts with zero active cluster workers, dispatch via the harness's capability-aware default (`execution_mode = "auto"`):
30
+ - **Antigravity IDE & OpenCode Desktop (`subagents`)**: Spawn persistent drillable subagents (`invoke_subagent` + `send_message`, or OpenCode child sessions) using `garden prompts --subagent --json`, print clickable `[Persona (@name)](conversation://<id>)` links in chat, and strictly enforce 1:1 Vine strand isolation plus independent Key 3 audit by a separate `@auditor` subagent.
31
+ - **Codex CLI (`tmux`) / CLI with `--tmux`**: Spawn `tmux` windows via `garden launch --tmux`.
32
+ - **Codex Desktop & Non-`tmux` CLI (`prompts`)**: Bootstrap top-level sessions via 10-backtick prompt cards in `/tmp/garden-<project>/`.
33
+ Opaque, non-interactive CLI subagents (such as headless `Task` jobs that the user cannot drill into and steer mid-flight) must NEVER act as cluster swarm workers and remain restricted to transient read-only inspections.
30
34
  Furthermore, when the operator explicitly requests or names a worker or peer session (e.g. 'u + autopxd-architect' or 'assign to worker-1'), the Lead Orchestrator MUST dispatch directly to that named recipient over Rhizo (`rhizo send --to <worker> ...`). The orchestrator MUST NEVER gate delegation on whether that worker appears in local single-project `rhizo who`, and MUST NEVER fall back to internal subagents. When inspecting the cluster roster for active workers, an orchestrator MUST query `rhizo who --all --json` (or check specific peers via `rhizo who <worker>` / `rhizo probe <worker>`). Never assume the cluster is empty based solely on local single-project `rhizo who` output.
31
35
  </CRITICAL>
32
36