@axiomantic/garden 0.2.6 → 0.2.7

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
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.7",
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
 
@@ -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**:
@@ -231,7 +231,7 @@ Depending on the task distribution model in `implementation_plan.md`:
231
231
 
232
232
  - **Direct Assignment (O2O)**:
233
233
  ```bash
234
- rhizo send --to architect \
234
+ rhizo send --to <project>-architect \
235
235
  --subject "Task 1.1: Core Data Structures" \
236
236
  --body '{"task_id": "task-core-ds", "instructions": "Implement AST node kinds and message serializers. Use vine strand.", "strand": "strand/task-core-ds"}'
237
237
  ```
@@ -246,7 +246,7 @@ Depending on the task distribution model in `implementation_plan.md`:
246
246
  - **Mandatory Turn-End Listener Arming**:
247
247
  Immediately after executing `rhizo send` or `rhizo enqueue`, arm your single-shot background listener before completing your turn:
248
248
  ```bash
249
- run_command(CommandLine="rhizo listen orchestrator", IsDaemon=false, WaitMsBeforeAsync=500)
249
+ run_command(CommandLine="rhizo listen <project>-orchestrator", IsDaemon=false, WaitMsBeforeAsync=500)
250
250
  ```
251
251
  *(Never end your turn without this active background task; without it, worker gate reports cannot wake you up).*
252
252
 
@@ -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`