@axiomantic/garden 0.2.9 → 0.2.10

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.
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.9",
3
+ "version": "0.2.10",
4
4
  "description": "Multi-Agent Swarm Orchestration, Empirical Dialectics & Ceremonies on top of Rhizo & Vine",
5
5
  "main": "bin/run.js",
6
6
  "bin": {
@@ -37,22 +37,32 @@ graph TD
37
37
 
38
38
  ---
39
39
 
40
- ## 2. Harness & Model Matching Matrix
40
+ ## 2. Harness & Model Alignment
41
41
 
42
- When proposing personas, the assistant must explicitly pair each persona with an appropriate **coding harness** and **foundation model**, taking operator preferences into account (defaulting to Antigravity + Gemini 3.8 Flash for rapid implementation, and invoking Claude for deep adversarial auditing):
42
+ Every recommended worker represents an INDEPENDENT, DEDICATED CODING SESSION (separate terminal tab or dedicated IDE window) bootstrapped via Garden 10-backtick prompt cards.
43
+
44
+ Workers inherit whatever foundation model is native or configured in that session:
45
+ - In **Antigravity IDE**: Workers run on Antigravity's active session models (Gemini).
46
+ - In **Claude Code CLI**: Workers run on Claude CLI's active models (Claude 3.7 Sonnet).
47
+ - In **OpenCode Desktop**: Workers run on models configured in `opencode.json`.
48
+ - In **Headless Terminal / Pi**: Workers run on provider CLI configuration.
43
49
 
44
50
  <CRITICAL>
45
51
  Sovereign Dedicated Sessions Only (Universal Subagent Prohibition):
46
- Every recommended harness represents an INDEPENDENT, DEDICATED CODING SESSION (separate terminal tab or dedicated IDE window) to be bootstrapped by the operator via Garden 10-backtick prompt cards.
47
- 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.
52
+ 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.
53
+ </CRITICAL>
54
+
55
+ <CRITICAL>
56
+ Session Default Models (No Cross-Harness Model Quizzes):
57
+ 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 `garden-swarm.json` and prompt cards, models default to `"Session Default (active in window/tab)"`.
48
58
  </CRITICAL>
49
59
 
50
- | Role Mandate | Recommended Harness | Recommended Model Tier | Rationale |
60
+ | Role Mandate | Recommended Harness | Model Alignment | Rationale |
51
61
  | :--- | :--- | :--- | :--- |
52
- | **Architectural Design & Systems Modeling** | **Antigravity (Dedicated Window)** or **OpenCode (Dedicated Session)** | **Gemini 3.8 Flash** or **Claude 3.5 Sonnet** | Fast token throughput, deep reasoning, superior multi-file architectural comprehension, and native background ear support. |
53
- | **Adversarial Audit & Code Quality Purism** | **Claude Code CLI (Dedicated Tab)** | **Claude 3 Opus** or **Claude 3.5 Sonnet** | Uncompromising adherence to instructions, meticulous attention to negative controls, zero tolerance for superficial green tests. |
54
- | **DevEx, Rapid Prototyping & Implementation** | **Antigravity (Dedicated Window)** | **Gemini 3.8 Flash** | Native reactive tool execution (`run_command`), rapid file modification, direct terminal feedback. |
55
- | **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. |
62
+ | **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. |
63
+ | **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. |
64
+ | **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. |
65
+ | **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. |
56
66
 
57
67
  ---
58
68
 
@@ -62,17 +72,27 @@ Harness-internal subagents (e.g. Antigravity's `invoke_subagent`, Claude Code's
62
72
  sequenceDiagram
63
73
  autonumber
64
74
  participant Orch as Orchestrator Chat
75
+ participant Redis as Rhizo Cluster
65
76
  participant Repo as Codebase Context
66
77
  participant User as Human Operator
67
78
 
68
- Orch->>Repo: Inspects project language, repo structure & open issues
69
- Note over Orch: Formulates primary triad + 2 alternate candidates
70
- Orch->>User: Renders interactive ask_question modal with recommendations & alternatives
71
- User-->>Orch: Submits chosen triad (or specifies custom modifications)
72
- Orch->>Repo: Writes garden-swarm.json manifest
79
+ Orch->>Redis: rhizo who --json (Pre-Flight Check)
80
+ alt Active Workers Found
81
+ Redis-->>Orch: Active workers online
82
+ Note over Orch: Bypasses intake; reuses active cluster workers
83
+ else Zero Workers Online
84
+ Orch->>Repo: Inspects project language, repo structure & open issues
85
+ Note over Orch: Formulates primary triad + harness pairing
86
+ Orch->>User: Renders unified ask_question modal (Team shape + Harness)
87
+ User-->>Orch: Submits chosen triad
88
+ Orch->>Repo: Writes garden-swarm.json manifest
89
+ end
73
90
  ```
74
91
 
75
- ### Step 1: Codebase & Task Analysis
92
+ ### Step 0: Pre-Flight Cluster Check
93
+ Run `rhizo who --json` and inspect `garden-swarm.json`. If active, healthy workers already exist in the cluster, skip persona selection and reuse the existing workers.
94
+
95
+ ### Step 1: Codebase & Task Analysis (Cold Starts Only)
76
96
  1. Inspect repository stack (e.g., Nim, Rust, Python, TypeScript, C).
77
97
  2. Read project `AGENTS.md` and `README.md` to identify existing conventions.
78
98
  3. Determine task scope:
@@ -80,21 +100,20 @@ sequenceDiagram
80
100
  - *Greenfield Subsystem*: Prioritize Systems Architect + API Designer.
81
101
  - *Security / Compliance*: Prioritize ISO Compliance Auditor + Security Adversary.
82
102
 
83
- ### Step 2: Formulate Recommendation & Alternatives
84
- Synthesize the primary triad and at least two alternative candidates:
103
+ ### Step 2: Formulate Unified Recommendation & Alternatives
104
+ Synthesize the primary triad paired with target harness environments:
85
105
  - **Primary Triad**:
86
- - Persona 1: Name, Role title, Mandate, Suggested Harness, Suggested Model.
87
- - Persona 2: Name, Role title, Mandate, Suggested Harness, Suggested Model.
88
- - Persona 3: Name, Role title, Mandate, Suggested Harness, Suggested Model.
89
- - **Alternative Candidates**:
90
- - Alternate A: e.g. Performance Benchmarking Engineer.
91
- - Alternate B: e.g. Documentation & Developer Education Lead.
106
+ - Persona 1: Marcus Vance, Staff Systems Architect (Invariants, boundaries, structure)
107
+ - Persona 2: Caleb Thorne, Verification & Adversarial Auditor (Negative controls, purism)
108
+ - Persona 3: Elena Rostova, DevEx & Implementation Lead (Velocity, ergonomics)
92
109
 
93
110
  ### Step 3: Interactive Operator Ratification (`ask_question`)
94
- Invoke `ask_question` with structured, selectable options:
95
- - Option 1 (Recommended): Primary Triad (with explicit harnesses and models listed).
96
- - Option 2: Alternative balance (e.g. replacing Purist with Performance Engineer).
97
- - Option 3: Custom configuration (allows user write-in).
111
+ Invoke `ask_question` with unified, selectable options combining team shape and harness:
112
+ - Option 1 (Recommended): Balanced Triad in Antigravity IDE (3 dedicated workspace windows, session-native models)
113
+ - Option 2: Balanced Triad in Claude Code CLI (3 dedicated terminal tabs)
114
+ - Option 3: Balanced Triad in OpenCode (3 dedicated sessions)
115
+ - Option 4: Focused Duo (Implementation Lead + Adversarial Auditor in preferred harness)
116
+ - Option 5: Custom configuration (allows user write-in).
98
117
 
99
118
  ### Step 4: Generate Swarm Manifest (`garden-swarm.json`)
100
119
  Once ratified, write `garden-swarm.json` to the target project directory:
@@ -110,8 +129,8 @@ Once ratified, write `garden-swarm.json` to the target project directory:
110
129
  "name": "my-project-architect",
111
130
  "persona": "Marcus Vance",
112
131
  "role": "Staff Systems Architect",
113
- "harness": "Antigravity / OpenCode",
114
- "model": "Gemini 3.8 Flash / Claude 3.5 Sonnet",
132
+ "harness": "Antigravity / Claude Code",
133
+ "model": "Session Default (active in window/tab)",
115
134
  "tags": ["my-project", "systems", "architecture", "invariants"],
116
135
  "system_prompt": "You are Marcus Vance, Staff Systems Architect for project my-project...",
117
136
  "opposing_priority": "Structural purity, invariant guarantees, and long-term maintainability over hasty quick fixes."
@@ -121,7 +140,7 @@ Once ratified, write `garden-swarm.json` to the target project directory:
121
140
  "persona": "Caleb Thorne",
122
141
  "role": "Verification & Adversarial Auditor",
123
142
  "harness": "Claude Code CLI / Antigravity",
124
- "model": "Claude 3.5 Sonnet / Claude 3 Opus",
143
+ "model": "Session Default (active in window/tab)",
125
144
  "tags": ["my-project", "qa", "audit", "verifier", "purist"],
126
145
  "system_prompt": "You are Caleb Thorne, Verification & Adversarial Auditor for project my-project...",
127
146
  "opposing_priority": "Adversarial skepticism, rigorous negative controls, and proof over convenience."
@@ -131,7 +150,7 @@ Once ratified, write `garden-swarm.json` to the target project directory:
131
150
  "persona": "Elena Rostova",
132
151
  "role": "DevEx & Implementation Lead",
133
152
  "harness": "Antigravity / OpenCode",
134
- "model": "Gemini 3.8 Flash / Claude 3.5 Sonnet",
153
+ "model": "Session Default (active in window/tab)",
135
154
  "tags": ["my-project", "dev", "devex", "build", "implementation"],
136
155
  "system_prompt": "You are Elena Rostova, DevEx & Implementation Lead for project my-project...",
137
156
  "opposing_priority": "High-velocity implementation, pragmatic delivery, and developer ergonomics."
@@ -63,27 +63,38 @@ Execute phases sequentially. Never skip phases or invert the order.
63
63
 
64
64
  ### Phase 0: Interactive Project Intake & Swarm Calibration
65
65
 
66
- When an operator initiates a project or requests multi-agent coordination, the session MUST NOT silently guess configuration or begin writing code directly. It immediately invokes `ask_question` to conduct the **Interactive Intake Interview**:
66
+ #### Fast-Path: Re-using an Active / Existing Swarm (First-Look Invariant)
67
+ Before asking ANY intake questions or presenting configuration modals, the orchestrator MUST run `rhizo who --json` to inspect the cluster.
68
+ If active, healthy workers are ALREADY registered and listening on the Rhizo cluster:
69
+ - **DO NOT** ask intake interview questions or prompt the operator for new sessions or models.
70
+ - **DO NOT** display swarm composition or harness questions.
71
+ - Automatically attach to the existing online workers (`@worker-1`, `@worker-2`, ...).
72
+ - Confirm cluster readiness and proceed immediately to Phase 3 (Dialectical Pump / Task Breakdown) or Phase 5 (Task Dispatch).
73
+
74
+ #### Cold-Start Intake Protocol (Zero Active Workers Only)
75
+ 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. It invokes `ask_question` to conduct a streamlined **Interactive Intake Interview** of at most TWO questions:
67
76
 
68
77
  1. **Question 1: Execution Mode**:
69
78
  - *Option 1 (Recommended)*: Multi-Agent Swarm (Dedicated terminal tabs/coding harnesses over Rhizo & Vine).
70
79
  - *Option 2*: Single-Agent Inline (Sequential execution within current chat session).
71
- 2. **Question 2: Swarm Composition & Team Sizing**:
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
- - *Option 3*: Custom Swarm (Operator specifies custom roles and headcount).
75
- 3. **Question 3: Available AI Coding Harnesses**:
76
- - The operator specifies which coding environments they will open dedicated tabs/windows for (Claude Code CLI, OpenCode, Antigravity, Pi, Cursor, Headless Terminal).
77
- <CRITICAL>
78
- Sovereign Sessions Only (Universal Subagent Prohibition):
79
- Swarm workers are ALWAYS sovereign, independent interactive sessions (dedicated terminal tabs, CLI windows, or IDE sessions) bootstrapped via copy-paste prompt cards. 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. NEVER offer or present "subagents" as an option in Question 3 or any other intake question.
80
- </CRITICAL>
81
- 4. **Question 4: Foundation Model Pairing & Equivalencies**:
82
- - Recommend optimal models with fallback equivalents:
83
- - `@<project>-architect`: Gemini 3.8 Flash / Claude 3.5 Sonnet / GPT-4o (deep architecture comprehension).
84
- - `@<project>-auditor`: Claude 3.5 Sonnet / Claude 3 Opus (strict negative controls, zero sloppy approvals).
85
- - `@<project>-implementer`: Gemini 3.8 Flash / Claude 3.5 Sonnet (rapid, iterative coding velocity).
86
- - *Air-gapped / Local*: Ollama / DeepSeek-R1.
80
+
81
+ 2. **Question 2: Swarm Composition & Harness Environment (Unified)**:
82
+ Pair team composition directly with the target coding harness in a single decision point:
83
+ - *Option 1 (Recommended)*: Balanced Triad in Antigravity IDE (3 dedicated workspace windows, session-native models).
84
+ - *Option 2*: Balanced Triad in Claude Code CLI (3 dedicated terminal tabs, Claude models).
85
+ - *Option 3*: Balanced Triad in OpenCode (3 dedicated sessions, configured workspace models).
86
+ - *Option 4*: Focused Duo (2 Workers: Implementation Lead & Adversarial Auditor in preferred harness).
87
+ - *Option 5*: Custom / Mixed Harnesses (Operator specifies custom distribution).
88
+
89
+ <CRITICAL>
90
+ Sovereign Sessions Only (Universal Subagent Prohibition):
91
+ Swarm workers are ALWAYS sovereign, independent interactive sessions (dedicated terminal tabs, CLI windows, or IDE sessions) bootstrapped via copy-paste prompt cards. 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. NEVER offer or present "subagents" as an option in Question 2 or any other intake question.
92
+ </CRITICAL>
93
+
94
+ <CRITICAL>
95
+ Standalone Foundation Model Pairing Quiz Prohibited:
96
+ 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, provider settings in OpenCode). NEVER present a separate question asking the operator to choose "Foundation Model Pairings", and NEVER present model options (Claude, GPT, Gemini) that do not correspond to the chosen harness. In `garden-swarm.json` and prompt cards, model configuration defaults to `"Session Default (active in window/tab)"`.
97
+ </CRITICAL>
87
98
 
88
99
  #### Automatic Fulfillment & 10-Backtick Prompt Generation:
89
100
  Upon receiving the operator's responses:
@@ -94,11 +94,11 @@ The Orchestrator presents the generated prompt blocks to the operator with clear
94
94
 
95
95
  1. **Numbered Terminal Tab / Session Instructions**:
96
96
  Provide a concise setup list instructing the operator on how many sessions to open and which harness/model to configure for each:
97
- - **Session 1 (@<project>-architect)**: e.g. Antigravity or OpenCode with Gemini 3.8 Flash / Claude 3.5 Sonnet $\to$ Paste Card 1
98
- - **Session 2 (@<project>-auditor)**: e.g. Claude Code CLI with Claude 3.5 Sonnet / Claude 3 Opus $\to$ Paste Card 2
99
- - **Session 3 (@<project>-implementer)**: e.g. Antigravity or OpenCode with Gemini 3.8 Flash $\to$ Paste Card 3
97
+ - **Session 1 (@<project>-architect)**: e.g. Antigravity IDE (Window 1) or Claude Code CLI (Tab 1) $\to$ Paste Card 1
98
+ - **Session 2 (@<project>-auditor)**: e.g. Claude Code CLI (Tab 2) or Antigravity IDE (Window 2) $\to$ Paste Card 2
99
+ - **Session 3 (@<project>-implementer)**: e.g. Antigravity IDE (Window 3) or OpenCode $\to$ Paste Card 3
100
100
  2. **Harness & Model Agnostic Flexibility**:
101
- 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)."*
101
+ Explicitly reassure the operator: *"Workers can run in ANY coding harness (Antigravity, Claude Code, OpenCode, Pi, Cursor) and inherit the active model configured in that window/session. Coordination occurs strictly over Rhizo (local Redis) and Vine (Rift strands)."*
102
102
  3. **10-Backtick Raw Markdown Formatting**:
103
103
  Ensure every prompt card is displayed inside ` ``````````markdown ` fences so the operator can copy the clean, unrendered text with a single click.
104
104
  4. **Immediate Autonomous Onboarding**: