@axiomantic/garden 0.2.0 → 0.2.1
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 +68 -0
- package/SKILL.md +11 -0
- package/bin/binaries/garden-darwin-arm64 +0 -0
- package/bin/binaries/garden-darwin-x64 +0 -0
- package/bin/binaries/garden-linux-arm64 +0 -0
- package/bin/binaries/garden-linux-x64 +0 -0
- package/bin/binaries/garden-win32-x64.exe +0 -0
- package/package.json +1 -1
- package/skills/garden/SKILL.md +16 -0
- package/skills/orchestrate-swarm/SKILL.md +50 -0
package/README.md
CHANGED
|
@@ -187,6 +187,74 @@ The main chat orchestrator dispatches work over Redis. Workers code in isolated
|
|
|
187
187
|
|
|
188
188
|
---
|
|
189
189
|
|
|
190
|
+
## CLI Reference
|
|
191
|
+
|
|
192
|
+
| Command | Arguments | Description |
|
|
193
|
+
| :--- | :--- | :--- |
|
|
194
|
+
| `garden prompts` | `[--worker <name>] [--write [file]] [--json] [--project-dir <dir>] [--swarm-file <file>]` | Generate 10-backtick raw markdown prompt cards for pasting into worker sessions. |
|
|
195
|
+
| `garden launch` | `[--worker <name>] [--write [file]] [--json] [--tmux] [--session-name <name>]` | Bootstrap swarm worker sessions (defaults to generating prompt cards). |
|
|
196
|
+
| `garden status` | `[--json] [--session-name <name>]` | Telemetry query across active Rhizo agents, listener status, and Vine strands. |
|
|
197
|
+
| `garden init` | `[<target_dir>] [--force]` | Initialize `garden.toml`, docs scaffold, and install guide in `AGENTS.md`. |
|
|
198
|
+
| `garden teardown`| `[--session-name <name>] [--swarm-file <file>]` | Gracefully close registered swarm agents on the Redis bus. |
|
|
199
|
+
| `garden guide` | `<install\|check\|uninstall> [path]` | Install or manage Garden Multi-Agent Swarm Guide in `AGENTS.md`. |
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## Configuration & Swarm Manifest Reference
|
|
204
|
+
|
|
205
|
+
> [!TIP]
|
|
206
|
+
> For the complete specification of `garden.toml`, `garden-swarm.json` schemas, and environment variables, see the [Garden Configuration & Swarm Manifest Reference](docs/configuration.md).
|
|
207
|
+
|
|
208
|
+
### Environment Variables
|
|
209
|
+
|
|
210
|
+
| Variable | Type | Default | Description |
|
|
211
|
+
| :--- | :--- | :--- | :--- |
|
|
212
|
+
| `GARDEN_SWARM_FILE` | Path | `garden-swarm.json` | Explicit path to swarm manifest JSON file. |
|
|
213
|
+
| `GARDEN_CONFIG` | Path | `garden.toml` | Explicit path to project `garden.toml`. |
|
|
214
|
+
| `GARDEN_PROJECT_DIR`| Path | *Auto-detected* | Target repository root directory. |
|
|
215
|
+
| `GARDEN_TERMINAL_APP`| String | `auto` | Preferred terminal viewer for tmux sessions (`Ghostty`, `Terminal`, `iTerm`, `none`). |
|
|
216
|
+
|
|
217
|
+
### Example `garden-swarm.json`
|
|
218
|
+
|
|
219
|
+
```json
|
|
220
|
+
{
|
|
221
|
+
"project": "myproject",
|
|
222
|
+
"target_repo": "/Users/developer/Development/myproject",
|
|
223
|
+
"orchestrator": "orchestrator",
|
|
224
|
+
"workers": [
|
|
225
|
+
{
|
|
226
|
+
"name": "architect",
|
|
227
|
+
"persona": "Dr. Marcus Vance (Systems Architect)",
|
|
228
|
+
"role": "Systems Architect & Formal Invariant Specifier",
|
|
229
|
+
"harness": "Claude Code",
|
|
230
|
+
"model": "claude-3-5-sonnet",
|
|
231
|
+
"tags": ["design", "spec"],
|
|
232
|
+
"opposing_priority": "Formal mathematical correctness and zero architectural drift."
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"name": "auditor",
|
|
236
|
+
"persona": "Lyra Sterling (Adversarial Quality Auditor)",
|
|
237
|
+
"role": "Adversarial Code Reviewer & Security Auditor",
|
|
238
|
+
"harness": "OpenCode",
|
|
239
|
+
"model": "gemini-3.8-flash",
|
|
240
|
+
"tags": ["audit", "testing"],
|
|
241
|
+
"opposing_priority": "Aggressive edge-case fault injection and invariant verification."
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"name": "implementer",
|
|
245
|
+
"persona": "Elena Rostova (Lead Implementation Engineer)",
|
|
246
|
+
"role": "Polyglot Systems & Performance Engineer",
|
|
247
|
+
"harness": "Antigravity",
|
|
248
|
+
"model": "claude-3-5-sonnet",
|
|
249
|
+
"tags": ["implementation", "perf"],
|
|
250
|
+
"opposing_priority": "Rapid implementation velocity and minimal dependency footprint."
|
|
251
|
+
}
|
|
252
|
+
]
|
|
253
|
+
}
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
190
258
|
## Core Invariants
|
|
191
259
|
|
|
192
260
|
1. **The Supreme Orchestrator Invariant**:
|
package/SKILL.md
CHANGED
|
@@ -102,3 +102,14 @@ To prevent silent deadlocks when workers stall, crash, or fail to re-arm listene
|
|
|
102
102
|
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:
|
|
103
103
|
- **Escalate Immediately**: Prompt the operator via `ask_question` with the diagnostic status.
|
|
104
104
|
- **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>`.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## 5. Configuration & Swarm Manifest Reference
|
|
109
|
+
|
|
110
|
+
See [`docs/configuration.md`](docs/configuration.md) for full details on:
|
|
111
|
+
- **Environment Variables**: `GARDEN_SWARM_FILE`, `GARDEN_CONFIG`, `GARDEN_PROJECT_DIR`, and `GARDEN_TERMINAL_APP`.
|
|
112
|
+
- **`garden.toml`**: Project-level defaults (`name`, `preferred_terminal`, `session_prefix`, `default_triad`).
|
|
113
|
+
- **`garden-swarm.json`**: Swarm specification schema (`project`, `target_repo`, `orchestrator`, `shared_workspace`, `workers` array: `name`, `persona`, `role`, `harness`, `model`, `tags`, `system_prompt`, `opposing_priority`).
|
|
114
|
+
- **The 10-Backtick Protocol**: Clean raw markdown formatting for copy-paste worker bootstrap prompts.
|
|
115
|
+
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
package/skills/garden/SKILL.md
CHANGED
|
@@ -102,3 +102,19 @@ To prevent silent deadlocks when workers stall, crash, or fail to re-arm listene
|
|
|
102
102
|
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:
|
|
103
103
|
- **Escalate Immediately**: Prompt the operator via `ask_question` with the diagnostic status.
|
|
104
104
|
- **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>`.
|
|
105
|
+
3. **Orchestrator Self-Audit Watchdog & Debouncer Protocol (GVR-014)**:
|
|
106
|
+
- For harnesses supporting `schedule` (e.g. Antigravity), arm a debounced 15-minute watchdog timer (`schedule(DurationSeconds=900, Prompt="...", TimerCondition="any")`).
|
|
107
|
+
- Debouncer replaces (kills previous timer via `manage_task(Action='kill')` before arming a new one) on task dispatch, worker reports, and plan updates ("early and often"). Arriving worker traffic cancels the timer for free with 0 token overhead.
|
|
108
|
+
- When the timer fires, execute the short check: `rhizo watchdog check --agent <orchestrator> --json`. If `ACTION_REQUIRED: REARM_LISTENER`, revive `rhizo listen` in the background and debounce. When all tasks in the plan are complete (`- [x]`), stand down.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 5. Configuration & Swarm Manifest Reference
|
|
113
|
+
|
|
114
|
+
See [`docs/configuration.md`](../../docs/configuration.md) for full details on:
|
|
115
|
+
- **Environment Variables**: `GARDEN_SWARM_FILE`, `GARDEN_CONFIG`, `GARDEN_PROJECT_DIR`, and `GARDEN_TERMINAL_APP`.
|
|
116
|
+
- **`garden.toml`**: Project-level defaults (`name`, `preferred_terminal`, `session_prefix`, `default_triad`).
|
|
117
|
+
- **`garden-swarm.json`**: Swarm specification schema (`project`, `target_repo`, `orchestrator`, `shared_workspace`, `workers` array: `name`, `persona`, `role`, `harness`, `model`, `tags`, `system_prompt`, `opposing_priority`).
|
|
118
|
+
- **The 10-Backtick Protocol**: Clean raw markdown formatting for copy-paste worker bootstrap prompts.
|
|
119
|
+
|
|
120
|
+
|
|
@@ -33,6 +33,38 @@ Maintain this exact block in the working context:
|
|
|
33
33
|
<!-- END_SWARM_RUNTIME_STATE -->
|
|
34
34
|
</CRITICAL>
|
|
35
35
|
|
|
36
|
+
<CRITICAL>
|
|
37
|
+
Orchestrator Turn-End Listener Invariant (GVR-014):
|
|
38
|
+
Coding harnesses (Antigravity, Claude Code, OpenCode) are event-driven: when the model yields a turn with text output, execution is completely suspended. Redis inbox state changes CANNOT wake an idle harness without an active child process registered in the task manager.
|
|
39
|
+
|
|
40
|
+
Whenever the Supreme Orchestrator dispatches a task, broadcasts instructions, or awaits worker responses, THE FINAL ACTION OF THAT TURN MUST BE ARMING A BACKGROUND LISTENER:
|
|
41
|
+
`run_command(CommandLine="rhizo listen <orchestrator>", IsDaemon=false, WaitMsBeforeAsync=500)`
|
|
42
|
+
|
|
43
|
+
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.
|
|
44
|
+
|
|
45
|
+
Safety Net (Scheduled Timer Watchdog & Debouncer Protocol):
|
|
46
|
+
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.
|
|
47
|
+
- **Cadence**: 15 minutes (`DurationSeconds=900`, range 10m–30m / 600s–1800s). Defaulting to 15m avoids slurping token budgets while guaranteeing a 15m upper bound on any stall.
|
|
48
|
+
- **Replace, Never Stack Invariant**:
|
|
49
|
+
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=...)`.
|
|
50
|
+
- **Debounce Triggers (Early and Often)**:
|
|
51
|
+
Run the debouncer subroutine on:
|
|
52
|
+
1. Task Dispatch (`rhizo send`, `rhizo enqueue`).
|
|
53
|
+
2. Worker Message / Gate Report receipt.
|
|
54
|
+
3. Implementation Plan updates (`implementation_plan.md` checkboxes).
|
|
55
|
+
4. Watchdog Wakeup turn (if tasks are still in flight).
|
|
56
|
+
- **Stand Down Invariant**:
|
|
57
|
+
When all tasks in `implementation_plan.md` are complete (`- [x]` 100%), kill any running watchdog timer and do not reschedule.
|
|
58
|
+
- **Zero-Token Happy Path**:
|
|
59
|
+
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 a full 15 minutes.
|
|
60
|
+
- **The Short Check (When Timer Fires)**:
|
|
61
|
+
Run `rhizo watchdog check --agent <name> --json`.
|
|
62
|
+
* If `ACTION_REQUIRED: REARM_LISTENER`: start `rhizo listen <name>` in background and debounce timer.
|
|
63
|
+
* If `ACTION_REQUIRED: UNREAD_MESSAGES`: drain messages with `rhizo drain 10 <name>`, start listener, and debounce.
|
|
64
|
+
* If `OK: LISTENING`: listener is healthy; debounce timer and return to sleep.
|
|
65
|
+
* If `STAND_DOWN: IDLE`: no tasks in flight; stand down.
|
|
66
|
+
</CRITICAL>
|
|
67
|
+
|
|
36
68
|
---
|
|
37
69
|
|
|
38
70
|
## 2. The Runtime Governance Loop
|
|
@@ -75,12 +107,30 @@ Depending on the task distribution model in `implementation_plan.md`:
|
|
|
75
107
|
--body '{"task_id": "task-test-harness", "strand": "strand/task-test-harness"}'
|
|
76
108
|
```
|
|
77
109
|
|
|
110
|
+
- **Mandatory Turn-End Listener Arming**:
|
|
111
|
+
Immediately after executing `rhizo send` or `rhizo enqueue`, arm your single-shot background listener before completing your turn:
|
|
112
|
+
```bash
|
|
113
|
+
run_command(CommandLine="rhizo listen orchestrator", IsDaemon=false, WaitMsBeforeAsync=500)
|
|
114
|
+
```
|
|
115
|
+
*(Never end your turn without this active background task; without it, worker gate reports cannot wake you up).*
|
|
116
|
+
|
|
78
117
|
### SOP 2: Monitoring Swarm Health, Watchdog & Escalation (GVR-011)
|
|
79
118
|
Check active workers and cluster status:
|
|
80
119
|
```bash
|
|
81
120
|
rhizo who --json
|
|
82
121
|
```
|
|
83
122
|
|
|
123
|
+
#### Orchestrator Self-Audit Watchdog
|
|
124
|
+
Verify that the orchestrator itself is actively listening while tasks are in-flight:
|
|
125
|
+
```bash
|
|
126
|
+
rhizo watchdog check [--agent <orchestrator>] [--json]
|
|
127
|
+
```
|
|
128
|
+
Returns:
|
|
129
|
+
- `status: OK (LISTENING)`: Listener process active and healthy.
|
|
130
|
+
- `status: ACTION_REQUIRED (REARM_LISTENER)`: In-flight tasks exist but listener is dead/missing. Re-arm immediately.
|
|
131
|
+
- `status: ACTION_REQUIRED (UNREAD_MESSAGES)`: Unconsumed inbox messages waiting. Drain immediately.
|
|
132
|
+
- `status: STAND_DOWN (IDLE)`: Zero in-flight tasks and zero unread messages. Stand down.
|
|
133
|
+
|
|
84
134
|
#### Responsiveness Watchdog & Health Probing
|
|
85
135
|
When waiting for a worker to finish an assigned task, run a health probe if no message is received within the expected window (e.g. 5–10 minutes):
|
|
86
136
|
```bash
|