@axiomantic/garden 0.2.12 → 0.2.14

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
@@ -5,7 +5,7 @@
5
5
  **Multi-Agent Swarm Orchestration, Empirical Dialectics & Ceremonies on top of Rhizo & Vine**
6
6
 
7
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
8
- [![Rhizo](https://img.shields.io/badge/Rhizo-0.2.13%2B-red.svg)](https://github.com/axiomantic/rhizo)
8
+ [![Rhizo](https://img.shields.io/badge/Rhizo-0.2.14%2B-red.svg)](https://github.com/axiomantic/rhizo)
9
9
  [![Vine](https://img.shields.io/badge/Vine-0.2.4%2B-purple.svg)](https://github.com/axiomantic/vine)
10
10
  [![Swarm](https://img.shields.io/badge/Swarm-Prompt--Bootstrapped-brightgreen.svg)](README.md)
11
11
  [![Platform](https://img.shields.io/badge/Platform-macOS%20%7C%20Linux-blue.svg)](README.md)
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.12",
3
+ "version": "0.2.14",
4
4
  "description": "Multi-Agent Swarm Orchestration, Empirical Dialectics & Ceremonies on top of Rhizo & Vine",
5
5
  "main": "bin/run.js",
6
6
  "bin": {
@@ -56,8 +56,8 @@ Execute phases sequentially. Never skip phases or invert the order.
56
56
  | **Phase 1** | [`choose-personas`](../choose-personas/SKILL.md) | Synthesize and write `garden-swarm.json` reflecting detected harness and chosen shape. | Valid JSON written to repo root. |
57
57
  | **Phase 2** | [`launch-workers`](../launch-workers/SKILL.md) | Output 10-backtick raw markdown prompt cards and numbered session instructions. | `rhizo who --json` confirms 100% of workers active & listening. |
58
58
  | **Phase 3** | [`dialectical-pump`](../dialectical-pump/SKILL.md) | Grounded triadic deliberation: research, design, adversarial audit. | Zero open `CRIT` or `BLOCKER` defects in `audit_report.md`. |
59
- | **Phase 4** | [`plan-implementation`](../plan-implementation/SKILL.md) | Author master implementation plan with locking schedules and strands. | Complete `implementation_plan.md` with task-locking matrix. |
60
- | **Phase 5** | [`orchestrate-swarm`](../orchestrate-swarm/SKILL.md) | Main-chat governor: task dispatch, heartbeat monitoring, trunk weaving. | All plan tasks woven via `vine weave` after passing Two-Key Gate. |
59
+ | **Phase 4** | [`plan-implementation`](../plan-implementation/SKILL.md) | Author master implementation plan with locking schedules, strands, and Two-Point Diff contracts (Provider, Consumer, Replacement deletion). | Complete `implementation_plan.md` with task-locking matrix. |
60
+ | **Phase 5** | [`orchestrate-swarm`](../orchestrate-swarm/SKILL.md) | Main-chat governor: task dispatch, heartbeat monitoring, Closed-Circuit & Two-Key gate verification, trunk weaving. | All plan tasks woven via `vine weave` after passing Two-Key Gate. |
61
61
 
62
62
  ---
63
63
 
@@ -252,6 +252,11 @@ When 'rhizo listen' delivers an incoming task and exits, workers MUST NOT wait f
252
252
  They MUST immediately transition to active execution: claim the task, enter the isolated Vine strand, perform the work, verify the Two-Key Gate, report results, and re-arm the single-shot listener before concluding their turn.
253
253
  </CRITICAL>
254
254
 
255
+ <CRITICAL>
256
+ Closed-Circuit & Holistic Integration Invariant:
257
+ Never build isolated code in a vacuum. Every deliverable must exhibit a Two-Point Diff: the Provider (new capability) and the Consumer (live production call-site, router, UI canvas, or CLI entrypoint). Modules that are only imported by their own test suites are strictly prohibited as incomplete shelfware. Furthermore, the implementation must holistically integrate into the live application—it must never be a toy, stub, mock, or hollow heuristic approximation. If the deliverable is intended to replace, upgrade, or obsolete existing code or configuration, the legacy code MUST be deleted immediately in the same strand; hoarding dead code, maintaining vestigial fallbacks, or leaving commented-out logic in the codebase is strictly prohibited.
258
+ </CRITICAL>
259
+
255
260
  <INVARIANT>
256
261
  Never merge code into the canonical trunk without a verified Two-Key Gate pass ('vine gate' exit code 0) inside an isolated Rift strand.
257
262
  </INVARIANT>
@@ -314,6 +319,10 @@ To prevent silent deadlocks when workers stall, crash, or fail to re-arm listene
314
319
  - **Codex / ChatGPT Watchdog Only**: In OpenAI Codex Desktop / CLI where background processes cannot reactively wake the harness, arm a scheduled watchdog timer or cron job with stepped backoff (15m $\rightarrow$ 30m $\rightarrow$ 60m $\rightarrow$ 120m $\rightarrow$ Stand Down at check 4).
315
320
  - **Reset Invariant**: Resets immediately to base 15m (streak 0) on any listener failure, unread inbox backlog, outbound task dispatch (`rhizo send`/`enqueue`), worker reply, or user chat prompt.
316
321
  - When the timer fires in Codex, execute the short check: `rhizo watchdog check --agent <orchestrator> --json` and follow `next_action` (`SCHEDULE_TIMER` or `STAND_DOWN`).
322
+ 4. **Post-Push Remote CI Verification Timer (Loose Guideline)**:
323
+ - After weaving (`vine weave`) and pushing (`git push`) to a remote repository where CI workflows run, if the coding harness supports timers/scheduling (e.g., `schedule`), set a periodic timer to check CI status (`gh run list --limit 3`):
324
+ - **Default Cadence**: Every 5 minutes (`DurationSeconds=300` or `CronExpression="*/5 * * * *"`).
325
+ - **Max Checks**: Maximum 12 checks (1 hour total, `MaxIterations=12`), cancelling the timer early as soon as all CI workflows finish (pass or fail).
317
326
 
318
327
  ---
319
328
 
@@ -41,6 +41,10 @@ description: "Generates and formats X distinct copy-pasteable bootstrap prompts
41
41
  <CRITICAL>
42
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.
43
43
  </CRITICAL>
44
+ 7. **Closed-Circuit & Holistic Integration Invariant**:
45
+ <CRITICAL>
46
+ Swarm workers must never produce isolated shelfware or mock toys. Every task must implement both the Provider and an active Consumer call-site in live entrypoints, must holistically integrate with real application state and events, and must aggressively delete any legacy code it replaces in the same strand.
47
+ </CRITICAL>
44
48
 
45
49
  ---
46
50
 
@@ -36,6 +36,16 @@ Instead, it MUST STOP and ask the operator how they want the work routed using `
36
36
  This intake gate applies to ANY request to "work on X", "build Y", "fix Z", or "implement feature W". Direct inline implementation is prohibited unless the operator explicitly directs the orchestrator to code it inline in the main session.
37
37
  </CRITICAL>
38
38
 
39
+ <CRITICAL>
40
+ Closed-Circuit Call-Site & Replacement Audit Invariant:
41
+ The Lead Orchestrator is the final gatekeeper against hermetic shelfware, hollow mocks, and dead code accumulation.
42
+ Before executing `vine weave` on any worker strand, the Orchestrator MUST verify:
43
+ 1. Two-Point Diff: The branch modifies both a Provider and an active Consumer call-site (live router, CLI command dispatcher, UI, or event loop). Unwired modules tested solely by their own test suites are strictly rejected back to the worker as incomplete shelfware.
44
+ 2. Holistic Integration (Anti-Stub / Anti-Toy): Real system behavior, state, and errors must be handled; no placeholder toys, stubs, mocks, or shallow heuristics pretending to be integrated.
45
+ 3. Replacement Purge: All legacy or obsolete code targeted for replacement is completely deleted in the strand diff. Preserving dead code as "fallbacks" or leaving commented-out blocks is prohibited.
46
+ Contract Exception: Only foundational tasks explicitly contracted as `[STAGED - NOT WIRED]` in `implementation_plan.md` may defer consumer wiring to a scheduled follow-up wiring task in the subsequent wave.
47
+ </CRITICAL>
48
+
39
49
  <CRITICAL>
40
50
  Compaction Preservation Rider & Post-Compact Invariant (GVR-010):
41
51
  Context compaction purges detailed operational invariants, ceremony rules, and protocol mechanics from working memory.
@@ -85,8 +95,9 @@ Whenever the Lead Orchestrator dispatches a task, broadcasts instructions, or aw
85
95
 
86
96
  FORBIDDEN: Never yield the conversation turn to the operator after dispatching work without an active background listener running. Yielding a turn without a listener severs the swarm's physical lifeline, trapping worker replies in Redis and causing silent swarm stalls.
87
97
 
88
- Safety Net (Scheduled Watchdog Protocol — ONLY for OpenAI Codex / ChatGPT):
89
- - **Antigravity & OpenCode Exemption**: In Google Antigravity (using background `run_command(CommandLine="rhizo listen <orchestrator>", IsDaemon=false, WaitMsBeforeAsync=500)`) and OpenCode (using background ear), DO NOT schedule timers or cron tasks (`schedule(...)`). Antigravity's task manager natively and reactively resumes execution on process exit when `rhizo listen` delivers a message, with zero timer overhead.
98
+ Safety Net (In-Flight Task Liveness Probe & Watchdog Protocol):
99
+ - **Antigravity & OpenCode Idle Exemption**: When idle or waiting for routine replies in Google Antigravity (using background `run_command(CommandLine="rhizo listen <orchestrator>", IsDaemon=false, WaitMsBeforeAsync=500)`) and OpenCode (using background ear), DO NOT schedule recurring cron timers. Antigravity's task manager natively and reactively resumes execution on process exit when `rhizo listen` delivers a message.
100
+ - **In-Flight Task Liveness Probe (Preventing Indefinite Orchestrator Deadlocks)**: When an orchestrator dispatches a heavy multi-step task (e.g., multi-file UI work or E2E Playwright suites taking >5 minutes) and wants a safeguard against silent worker stalls, it may arm a **one-shot conditional timer** (`schedule(DurationSeconds=300, TimerCondition="any", Prompt="Probe in-flight worker status via rhizo probe <worker>")`) alongside its `rhizo listen` task. Because `TimerCondition="any"` is set, the timer cancels automatically with zero overhead if the worker replies within 5 minutes; if 5 minutes elapse in silence, the timer wakes the orchestrator to run `rhizo probe <worker>` (which inspects `current_task`, `task_state`, `task_progress`, and `task_lease_remaining_sec`) to distinguish active in-flight progress from a stalled worker.
90
101
  - **Codex / ChatGPT Watchdog Only**: In OpenAI Codex Desktop / CLI where background processes cannot reactively wake the harness, arm a scheduled watchdog timer or cron job using stepped backoff:
91
102
  - Initial / After Activity: Base 15 minutes (`DurationSeconds=900`).
92
103
  - Quiescent Check 1 (Streak 1): 30 minutes (`DurationSeconds=1800`).
@@ -305,7 +316,12 @@ When a worker replies indicating task completion:
305
316
  }
306
317
  ```
307
318
 
308
- The Orchestrator verifies and integrates:
319
+ The Orchestrator conducts the **Closed-Circuit Call-Site & Replacement Audit** before weaving:
320
+ 1. **Two-Point Diff Audit**: Inspect the strand diff against `origin/main` (`git -C "$strand_path" diff --name-only origin/main...HEAD`). Confirm that the diff touches BOTH the provider (new module/logic) AND at least one live consumer call-site (application entrypoint, router, CLI dispatcher, UI view). If the diff only contains the new module and unit tests (and was not contracted as `[STAGED - NOT WIRED]`), reject the strand back to the worker:
321
+ `rhizo reply --to <worker> --subject "Weave Blocked: Missing Consumer Call-Site" --body "Your deliverable lacks an active consumer call-site. Wire your provider into the live system before requesting weave."`
322
+ 2. **Holistic Integration Audit**: Verify that the integration uses real data flow and handles runtime state (no hollow stubs, fake data mocks, or superficial heuristic shortcuts).
323
+ 3. **Aggressive Replacement Purge**: Verify that any existing code, obsolete configurations, or vestigial fallbacks meant to be replaced by the feature were deleted in the strand diff.
324
+ 4. **Weave & Unlock**:
309
325
  ```bash
310
326
  # 1. Weave the verified strand into main
311
327
  vine weave
@@ -313,6 +329,11 @@ vine weave
313
329
  # 2. Release any held fencing locks if applicable
314
330
  rhizo unlock file:src/types.nim
315
331
  ```
332
+ 5. **Post-Push CI Verification Timer (Loose Guideline)**:
333
+ Whenever woven changes or releases are pushed to a remote (`git push`) and trigger remote CI pipelines (e.g. GitHub Actions, Forgejo Actions, GitLab CI):
334
+ - If your coding harness supports native timers or scheduled tasks (e.g. `schedule`), set a periodic timer to check CI status (`gh run list` / `gh run view`).
335
+ - **Default Cadence**: Check every **5 minutes** (`DurationSeconds=300` or `CronExpression="*/5 * * * *"`), up to a **maximum of 12 checks (1 hour total)** (`MaxIterations=12`).
336
+ - **Early Termination**: As soon as CI reaches a terminal state (`success` or `failure`), immediately cancel any remaining recurring timer (`manage_task(Action="kill", ...)`). If CI failed, inspect failure logs (`gh run view --log-failed`) and remediate.
316
337
 
317
338
  ### SOP 4: Updating Dynamic Progress Checklists
318
339
  Immediately after weaving:
@@ -18,6 +18,7 @@ The Orchestrator authors `implementation_plan.md` adhering to four core invarian
18
18
  2. **Resource Fencing Before Mutation**: Any non-mergeable resource (e.g. database schemas, configuration files, migration scripts) must have an explicit `rhizo lock file:<path> --fencing` lease scheduled before modification begins.
19
19
  3. **Workspace Isolation via Vine**: Complex, multi-file changes must occur in isolated Rift strands (`vine new <task_id>`). Strands cannot be woven until passing the Two-Key Gate (`vine gate`).
20
20
  4. **Zero Silent Architectural Drift**: If an implementer encounters an unforeseen constraint during coding, it cannot unilaterally alter the architecture. It must submit a formal design addendum.
21
+ 5. **Closed-Circuit Two-Point Diff & Holistic Integration**: Every task specification must declare both the **Provider** (new capability) and the active **Consumer Call-Site** (runtime entrypoint, router, UI canvas, or CLI loop). Modules tested only by isolated unit tests are strictly prohibited as incomplete shelfware. The implementation must holistically integrate with real application state and live events (no toys, stubs, mocks, or hollow approximations). Any code intended to be replaced must be explicitly scheduled for **immediate deletion** in the same strand—never kept as a vestigial fallback or commented-out logic.
21
22
 
22
23
  ---
23
24
 
@@ -77,22 +78,27 @@ For all parallel development tracks:
77
78
  - [ ] **Task 1.1: Core Data Structures** (`<project>-architect`)
78
79
  - *Strand*: `strand/task-core-ds`
79
80
  - *Lock*: `rhizo lock file:src/types.nim 300 --fencing`
80
- - *Actions*: Define AST node kinds and message serializers.
81
- - *Verification*: `nim c -r tests/test_types.nim`
81
+ - *Provider*: `src/types.nim` (AST node kinds and serializers)
82
+ - *Consumer / Call-Site*: Wire into `src/parser.nim` parse loop and `src/eval.nim`
83
+ - *Replacement Deletion*: Delete deprecated ad-hoc string tuples in `src/legacy_types.nim`
84
+ - *Holistic Verification*: Real AST nodes evaluate in full parser pipeline (no dummy mocks)
82
85
  - *Weave*: `vine gate && vine weave && rhizo unlock file:src/types.nim`
83
86
 
84
87
  - [ ] **Task 1.2: Test Harness & Negative Controls** (`<project>-auditor`)
85
88
  - *Strand*: `strand/task-test-harness`
86
- - *Actions*: Implement negative assertion tests for malformed JSON.
87
- - *Verification*: `pytest tests/test_harness.py`
89
+ - *Provider*: `tests/test_harness.py`
90
+ - *Consumer / Call-Site*: Wire test runner into CI workflow and `tests/all.py`
91
+ - *Verification*: `pytest tests/test_harness.py` (proves negative controls catch malformed JSON)
88
92
  - *Weave*: `vine gate && vine weave`
89
93
 
90
94
  ### Phase 2: High-Level CLI & Integration
91
95
  - [ ] **Task 2.1: CLI Subcommand Wiring** (`implementer`)
92
96
  - *Dependency*: Task 1.1, Task 1.2
93
97
  - *Strand*: `strand/task-cli-wiring`
94
- - *Actions*: Expose new subcommands in CLI parser.
95
- - *Verification*: `garden --help` and tripwire tests.
98
+ - *Provider*: `src/commands/generate.nim`
99
+ - *Consumer / Call-Site*: Wire into `src/main.nim` CLI argument dispatcher table
100
+ - *Replacement Deletion*: Delete old prototype script `scripts/gen_proto.sh`
101
+ - *Holistic Verification*: Run compiled binary `app generate --input data.json` and verify live output
96
102
  - *Weave*: `vine gate && vine weave`
97
103
 
98
104
  ---