@axiomantic/garden 0.2.31 → 0.2.33

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
@@ -71,6 +71,10 @@ Options:
71
71
  - `--json`: Structured machine-parseable JSON output.
72
72
  - `--list`: Displays all sown seeds and their dynamic lifecycle status.
73
73
 
74
+ > [!IMPORTANT]
75
+ > **Canonical Trunk `ROADMAP.md` Handling Rule**:
76
+ > Both `garden plant` and `rhizo task create` (`autoSowGardenTask`) automatically mutate `ROADMAP.md` (and write `.garden/seeds/<id>.toml`) in the canonical trunk working directory. The Lead Orchestrator MUST commit updated `ROADMAP.md` (and any tracked `.garden/seeds/` files) on canonical trunk `main` **before** running `vine new` or `vine weave` so trunk stays clean and strands do not hit merge conflicts during `vine weave`. Never delegate `ROADMAP.md` updates to `@auditor`.
77
+
74
78
  ### B. Deterministic Germination (`garden germinate <subcommand> <seed>`)
75
79
  To prevent LLM tool-calling omissions, germination uses dedicated positional subcommands:
76
80
  1. **`garden germinate dispatch <seed>`**: Enqueues the seed directly to Rhizo cluster work queues (`queue:<project>:tasks`) with dialectical pump specifications.
@@ -228,6 +232,12 @@ Upon receiving the operator's response:
228
232
  - **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
233
  5. Verify cluster readiness (`rhizo who --json`) before proceeding to Phase 3.
230
234
 
235
+ > [!CRITICAL]
236
+ > **Pre-Submit Auditor Registration Invariant & Zero-`--force` Recovery**:
237
+ > `vine submit` mints per-auditor cryptographic `audit_ticket`s (`audit_ticket_hash:<agent_id>`) via `STRAND_SUBMITTED` delivery only for agents already registered on the project in Rhizo at the moment `vine submit` runs (a manual `rhizo send` from an orchestrator does **not** mint a `vine` `audit_ticket`).
238
+ > - **Register `@auditor` During Bootstrap**: The designated `@auditor` MUST register via `rhizo open <auditor_id> --tags "<project>,auditor"` **before** any worker executes `vine submit` (ideally during Phase 2 swarm bootstrap alongside the workers).
239
+ > - **Zero-`--force` Late-Auditor Recovery**: If an auditor registers after `vine submit` already ran, never bypass with `--force` (`--force` is banned on `vine audit approve`). Once `<auditor_id>` is online in `rhizo who`, have the worker re-run `vine submit --author <author_id> ...` (or have the orchestrator dispatch an updated `STRAND_SUBMITTED` ticket generated after registration) so an authentic `audit_ticket_hash:<auditor_id>` is minted.
240
+
231
241
 
232
242
  ---
233
243
 
@@ -396,18 +406,20 @@ They MUST immediately transition to active execution: claim the task, enter the
396
406
  </CRITICAL>
397
407
 
398
408
  <CRITICAL>
399
- Closed-Circuit Two-Point Diff, Literal Fidelity & Holistic Integration Invariant:
409
+ Closed-Circuit Two-Point Diff, Literal Fidelity, 3-Checkpoint Anti-Heuristic Quality Gate & Holistic Integration Invariant:
400
410
  1. Two-Point Diff Mandate: 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.
401
- 2. Holistic Integration (Anti-Stub / Anti-Toy): The implementation must holistically integrate into the live application—it must never be a toy, stub, mock, or hollow heuristic approximation.
402
- 3. Literal Fidelity & True-Fidelity Mandate (Anti-Approximation): When recreating, porting, reverse-engineering, duplicating functionality from an existing reference, or executing an operator directive where fidelity is expected:
403
- - "Approximate", "looks right", "heuristic shortcut", "gist-level", or "good enough for happy paths" implementations are STRICTLY REJECTED.
404
- - The implementation must be literally and precisely the thing that was asked for, matching all edge cases, type boundaries, flags, and error flows.
405
- 4. Aggressive Replacement Purge: Any existing code, configurations, or fallbacks meant to be replaced or upgraded 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.
406
- 5. Structural Assertion Rigor: Partial or loose assertions ("loosey goosey" tests like `assert 'foo' in bar`) are strictly forbidden. Tests must assert complete object equality (`assert actual == expected`) and cover negative controls.
411
+ 2. Holistic Integration (Anti-Stub / Anti-Toy / Zero Silent Mock Fallbacks): The implementation must holistically integrate into the live application—it must never be a toy, stub, mock, or silent mock fallback (`BLOCKER: MISSING_DEPENDENCY` required instead).
412
+ 3. Three-Checkpoint Anti-Heuristic Quality Gate (Gates A, B, C — Pillar 6):
413
+ - **Gate A (Design / Task-Spec / Addendum Gate)**: Reject (`CRIT-HEURISTIC-SPEC`) any design doc, task spec, or addendum prescribing arbitrary "sufficiency" cutoffs, magic count/score/hop thresholds, word/substring/prefix matching to classify intent or decide control flow where structural AST/type/schema/state-machine/model evaluation belongs, hardcoded canned templates, or static word-blacklist pseudo-gates.
414
+ - **Gate B (Worker Decision-Mechanism Disclosure)**: Implementers must disclose every new conditional branch, classifier, or stopping condition and its structural invariant in Section 2.5 of their Deliverable Claim Bundle.
415
+ - **Gate C (Key 3 Six-Pillar Audit — Pillar 6 Overrides Pillar 3 Literal Fidelity)**: At Key 3 (`vine audit inspect` prints all Six Pillars), Pillar 6 (`CRIT-HEURISTIC-HANDWAVE` / `CRIT-HEURISTIC-SPEC`) strictly overrides Literal Fidelity if a task prompt/spec itself prescribed a heuristic.
416
+ 4. Literal Fidelity & True-Fidelity Mandate (Subordinate to Pillar 6): When recreating, porting, reverse-engineering, duplicating functionality from an existing reference, or executing an operator directive where fidelity is expected, the implementation must literally be the thing asked for across all edge cases, type boundaries, flags, and error flows—EXCEPT where Pillar 6 overrides a heuristic spec.
417
+ 5. Aggressive Replacement Purge: Any existing code, configurations, or fallbacks meant to be replaced or upgraded 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.
418
+ 6. Structural Assertion Rigor: Partial or loose assertions ("loosey goosey" tests like `assert 'foo' in bar`) are strictly forbidden. Tests must assert complete object equality (`assert actual == expected`) and cover negative controls.
407
419
  </CRITICAL>
408
420
 
409
421
  <INVARIANT>
410
- Never merge code into the canonical trunk without passing the Three-Key Gate: Key 1 (mechanical merge-tree 'git merge-tree'), Key 2 (semantic test runner 'vine gate'), and Key 3 (Pre-Weave Adversarial Code Audit Pump with 0 open defects under the presumption of guilt) inside an isolated Rift strand.
422
+ Never merge code into the canonical trunk without passing the Three-Key Gate: Key 1 (mechanical merge-tree 'git merge-tree'), Key 2 (semantic test runner 'vine gate'), and Key 3 (Six-Pillar Pre-Weave Adversarial Code Audit Pump including Pillar 6 Anti-Heuristic with 0 open defects under the presumption of guilt) inside an isolated Rift strand.
411
423
  </INVARIANT>
412
424
 
413
425
  <FORBIDDEN>
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.31",
3
+ "version": "0.2.33",
4
4
  "description": "Multi-Agent Swarm Orchestration, Empirical Dialectics & Ceremonies on top of Rhizo & Vine",
5
5
  "main": "bin/run.js",
6
6
  "bin": {
@@ -38,7 +38,7 @@ graph TD
38
38
  <CRITICAL>
39
39
  Mandatory Independent Auditor Role (Key 3 Invariant):
40
40
  Swarm rosters MUST ALWAYS include a dedicated, independent Adversarial Auditor (routable via `@auditor` capability tag, with unique listener codename allocated via `rhizo name <project>`).
41
- Workers who write code are strictly prohibited from auditing or ratifying their own deliverables. Vine's Key 3 gate mechanically rejects self-auditing (ExitGateAuditViolation = 6). The Adversarial Auditor must run in a dedicated, independent session to inspect submitted strands, enforce the Five Pillars, and execute 'vine audit approve --auditor <name>'.
41
+ Workers who write code are strictly prohibited from auditing or ratifying their own deliverables. Vine's Key 3 gate mechanically rejects self-auditing (ExitGateAuditViolation = 6). The Adversarial Auditor must run in a dedicated, independent session to inspect submitted strands, enforce the Six Pillars (including Pillar 6: Anti-Heuristic & Non-Arbitrary Decision Logic), and execute 'vine audit approve --auditor <name>'.
42
42
  </CRITICAL>
43
43
 
44
44
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: dialectical-pump
3
- description: "Drives empirical multi-perspective deliberation and synthesis across agent personas. Enforces the strict invariant that dialectical exchanges are NOT theatrical dialogue: every turn must be grounded in tool calls (reading file lines, executing tests, running benchmarks, checking git history). Operates across four sequential stages: (1) Research & Understanding Doc with Codebase Idioms and Fact-Check Gate, (2) Product & System Architecture Design Doc, (3) Adversarial Design Review, (3.5) Pre-Plan Contract Skeleton Strand on epic/<slug>, and (4) Pre-Weave Adversarial Code Audit Pump with Contract Immutability (The Third Key Gate: Shelfware, Heuristic Hand-Waves, Literal Fidelity & Parity, Carcass Purge, Green Mirage elimination, and Delta Re-Pump). Triggers: 'dialectical pump', 'run dialectical pump', 'pump perspectives', 'triadic deliberation', 'adversarial code audit', 'code audit pump', 'pre-weave audit', 'literal fidelity audit', 'contract skeleton'."
3
+ description: "Drives empirical multi-perspective deliberation and synthesis across agent personas. Enforces the strict invariant that dialectical exchanges are NOT theatrical dialogue: every turn must be grounded in tool calls (reading file lines, executing tests, running benchmarks, checking git history). Operates across four sequential stages: (1) Research & Understanding Doc with Codebase Idioms and Fact-Check Gate, (2) Product & System Architecture Design Doc (Gate A Anti-Heuristic Design Gate), (3) Adversarial Design Review, (3.5) Pre-Plan Contract Skeleton Strand on epic/<slug>, and (4) Pre-Weave Six-Pillar Adversarial Code Audit Pump with Contract Immutability (The Third Key Gate: Shelfware, Gate B Decision-Mechanism Disclosure, Gate C Pillar 6 Anti-Heuristic overriding Literal Fidelity, Carcass Purge, Green Mirage elimination, and Delta Re-Pump). Triggers: 'dialectical pump', 'run dialectical pump', 'pump perspectives', 'triadic deliberation', 'adversarial code audit', 'code audit pump', 'pre-weave audit', 'literal fidelity audit', 'contract skeleton'."
4
4
  ---
5
5
 
6
6
  # `dialectical-pump`: Grounded Multi-Persona Deliberation Engine
@@ -109,6 +109,7 @@ The Purist Auditor stress-tests the proposal against concrete failure modes:
109
109
  The DevEx Lead resolves the dialectic:
110
110
  - Eliminates unnecessary abstractions that create ergonomics drag.
111
111
  - Hardens the API contracts: specifies exact public types, headers/interfaces, exported procedure/function signatures, and contract test cases adhering to discovered idioms.
112
+ - Enforces **Gate A (Design & Spec Anti-Heuristic Gate)**: ensures `design.md` never prescribes arbitrary "sufficiency" thresholds, magic count/score/hop cutoffs, word/substring/prefix matching to classify intent or decide control flow where structural AST/type/schema/state-machine/model evaluation belongs, hardcoded canned templates, or static word-blacklist pseudo-gates.
112
113
  - Produces the ratified **`design.md`**.
113
114
 
114
115
  ---
@@ -116,8 +117,9 @@ The DevEx Lead resolves the dialectic:
116
117
  ## 5. Stage 3: Adversarial Review & Audit Report
117
118
 
118
119
  ### Step 3.1: Forensic Audit Inspection
119
- An Auditor persona performs a line-by-line inspection of `design.md` against single-source truth and ISO standards, generating **`audit_report.md`**:
120
- - Defect codes: `CRIT-01`, `WARN-02`, `DOC-03`.
120
+ An Auditor persona performs a line-by-line inspection of `design.md` against single-source truth, ISO standards, and **Gate A (Anti-Heuristic Design & Spec Gate)**, generating **`audit_report.md`**:
121
+ - Defect codes: `CRIT-01`, `CRIT-HEURISTIC-SPEC`, `WARN-02`, `DOC-03`.
122
+ - Any design section, contract, or task spec that prescribes heuristic hand-waves (`CRIT-HEURISTIC-SPEC`) is rejected back to Stage 2 before entering Stage 3.5 or Stage 4.
121
123
  - Root cause analysis.
122
124
  - Specific non-prescriptive recommendation options.
123
125
 
@@ -206,6 +208,10 @@ The Thesis in a code review is neither a raw dump of files nor vague conversatio
206
208
  - Consumer Call-Sites: Live production callers (CLI parser, HTTP router, UI canvas, event loop)
207
209
  - Replacement Purge: Explicit list of obsolete files, functions, or fallbacks deleted in this diff
208
210
 
211
+ ## 2.5. Decision & Transition Mechanisms (Anti-Heuristic Disclosure — Gate B)
212
+ - Conditional Branches / Classifiers / Stopping Conditions: Every new branch, classifier, state transition, or loop exit added in this strand
213
+ - Structural / Invariant Mechanism: Exact AST/type/schema/state-machine/model evaluation backing each decision (confirming zero arbitrary "sufficiency" cutoffs, magic count thresholds, word/substring control-flow matching, canned templates, or static word-blacklist pseudo-gates)
214
+
209
215
  ## 3. Test Evidence & Assertion Rigor
210
216
  - Test Suite Executed: Exact command and execution time
211
217
  - Assertion Style: Complete structural equality (`assert actual == expected`) or tripwire snapshots
@@ -216,9 +222,9 @@ The Thesis in a code review is neither a raw dump of files nor vague conversatio
216
222
  - Unreleased Entry: Exact entry recorded under `## [Unreleased]` via `vine changelog`
217
223
  ```
218
224
 
219
- ### Step 4.2: The Five-Pillar Forensic Code Audit (Antithesis)
225
+ ### Step 4.2: The Six-Pillar Forensic Code Audit (Antithesis)
220
226
 
221
- The Auditor executes the following checks against the Claim Bundle and the strand diff (`git diff origin/main...HEAD`):
227
+ The Auditor executes the following checks against the Claim Bundle and the strand diff (`git diff origin/main...HEAD`, inspected via `vine audit inspect` which emits the Six-Pillar rubric):
222
228
 
223
229
  #### Pillar 0: Changelog Gate & Release Discipline
224
230
  - [ ] **Changelog Updated**: If the project contains a changelog (`CHANGELOG.md`, `changelog.md`, etc.), verify that the strand diff modifies it under `## [Unreleased]`.
@@ -230,21 +236,20 @@ The Auditor executes the following checks against the Claim Bundle and the stran
230
236
  - [ ] **Import Audit**: Is the provider module imported and exercised outside of its own unit test files?
231
237
  - [ ] **Hermetic Shelfware Rejection**: Code tested only by its own unit tests is rejected back to the worker as incomplete shelfware (unless explicitly contracted as `[STAGED - NOT WIRED]` in `implementation_plan.md`).
232
238
 
233
- #### Pillar 2: Holistic Integration vs. Heuristic Hand-Waves & Hollow Stubs
239
+ #### Pillar 2: Holistic Integration & Zero Silent Mock Fallbacks
234
240
  - [ ] **Anti-Stub & Anti-Toy Check**: Does the implementation handle real application state, real network/file I/O, and real concurrent events?
235
241
  - [ ] **No Hollow Mocks in Production**: Reject artificial `sleep()` calls, hardcoded success responses, or fake test doubles in production paths.
236
242
  - [ ] **Absolute Ban on Silent Mock Fallbacks (`BLOCKER: MISSING_DEPENDENCY`)**: Strictly prohibit inventing silent mock fallbacks (e.g. `lesMockFallback`, synthetic mock questionnaires, or dummy stub responses) when an external dependency, hardware target, API key, or neural model is unavailable. If a dependency cannot be satisfied, the worker MUST immediately halt execution and emit a formal blocker (`BLOCKER: MISSING_DEPENDENCY`). Sweeping missing dependencies under the rug with silent fake mocks is grounds for immediate audit rejection (`CRIT-MOCK-FALLBACK`).
237
- - [ ] **Anti-Defeat-Device & Anti-Theatrical Interceptor Mandate**: Strictly reject prompt keyword interceptors (e.g. `if 'flight game' in q or 'webworker' in q`) and theatrical mock questionnaires in generic runtimes that bypass genuine neural/radar/algorithmic pipelines to fake benchmark compliance. This is a critical `CRIT-DEFEAT-DEVICE` defect requiring complete elimination.
238
- - [ ] **Autonomous Intensive Audit Mandate**: Intensive audits are Standard Operating Procedure (SOP) and pre-authorized. Auditors must execute without requesting operator confirmation or input.
243
+ - [ ] **Autonomous Intensive Audit Mandate**: Intensive Six-Pillar audits are Standard Operating Procedure (SOP) and pre-authorized. Auditors must execute without requesting operator confirmation or input.
239
244
  - [ ] **Brittle String-Split Hacks**: Reject naive string splits (`str.split(" ")[0]`) pretending to parse structured protocols or payloads; compliant lexers/parsers must be used.
240
245
  - [ ] **Swallowed Exceptions**: Reject empty `except: pass` or `catch: discard` blocks that sweep real error conditions under the rug.
241
246
 
242
- #### Pillar 3: Literal Fidelity & Reference Parity Mandate (Anti-Approximation)
247
+ #### Pillar 3: Literal Fidelity & Reference Parity Mandate (Subordinate to Pillar 6)
243
248
  <CRITICAL>
244
- Literal Fidelity & True-Fidelity Mandate:
249
+ Literal Fidelity & True-Fidelity Mandate (Subordinate to Pillar 6):
245
250
  When a deliverable is recreating, porting, reverse-engineering, duplicating functionality from an existing reference, or executing an operator directive where fidelity is expected:
246
251
  1. Anti-Approximation Rule: "Approximate", "looks right", "heuristic shortcut", "gist-level", or "good enough for happy paths" implementations are STRICTLY REJECTED.
247
- 2. Literal Specification Adherence: The implementation must be literally and precisely the thing that was asked for. The auditor must verify compliance against every specified edge case, type boundary, flag interaction, return semantic, and error flow of the original reference or operator prompt.
252
+ 2. Literal Specification Adherence: The implementation must be literally and precisely the thing that was asked for—EXCEPT where the task prompt, spec, or addendum itself prescribed a heuristic hand-wave, in which case Pillar 6 (Anti-Heuristic) strictly overrides Literal Fidelity (`CRIT-HEURISTIC-SPEC`).
248
253
  3. Zero Corner-Cutting: Tedious, difficult, or complex cases cannot be hand-waved away or substituted with shallow shortcuts.
249
254
  4. Empirical Parity Testing: Wherever a reference implementation or specification exists, the audit requires characterization tests, golden file outputs, or structural round-trip comparisons proving exact functional parity.
250
255
  </CRITICAL>
@@ -266,6 +271,17 @@ Assertion Rigor & Anti-Green-Mirage Mandate:
266
271
  4. Zero Happy-Path-Only Testing: Boundary values (empty, 0, 1, max, unicode, timeout, disconnection) must be explicitly exercised.
267
272
  </CRITICAL>
268
273
 
274
+ #### Pillar 6: Anti-Heuristic & Non-Arbitrary Decision Logic (Gate C — Overrides Pillar 3 Literal Fidelity)
275
+ <CRITICAL>
276
+ Anti-Heuristic Quality Gate (Pillar 6 Overrides Pillar 3 Literal Fidelity):
277
+ Reject (`CRIT-HEURISTIC-HANDWAVE` for unrequested heuristics; `CRIT-HEURISTIC-SPEC` when a task prompt, design spec, or addendum itself prescribed a heuristic) any strand diff that relies on:
278
+ 1. **Arbitrary "Sufficiency" Concepts & Magic Thresholds**: Magic count, score, or hop cutoffs (`count >= N`, `score > X`, `hasSufficient...`) used as a proxy for structural or semantic completeness.
279
+ 2. **Word / Substring / Prefix Matching as Control-Flow Decision Logic**: Using `contains`, `startsWith`, regex keyword bags, or static keyword lists to classify intent, infer state, or route execution where structural AST/type/schema/state-machine/model evaluation belongs.
280
+ 3. **Hardcoded Canned Templates or Domain/Benchmark Spoofing**: Emitting static canned templates or domain-specific bypass branches instead of genuine data-driven synthesis.
281
+ 4. **Static Word-Blacklist Pseudo-Gates**: Hardcoded keyword blacklists masquerading as semantic quality verification.
282
+ Workers who discover a spec violates Gate A / Pillar 6 MUST halt or escalate via `[DESIGN ADDENDUM]` rather than implementing the heuristic verbatim.
283
+ </CRITICAL>
284
+
269
285
  #### Contract Immutability & Anti-Drift Invariant
270
286
  <CRITICAL>
271
287
  Contract Immutability on Feature Integration Branches (`epic/<slug>`):
@@ -289,7 +305,7 @@ sequenceDiagram
289
305
  Note over W: Worker finishes and runs 'vine submit'
290
306
  W->>A: Submit Deliverable Claim Bundle ('vine submit')
291
307
  Note over A: Step 4.3.0: Mandatory Inspection ('vine audit inspect <task_id>')
292
- A->>A: Five-Pillar Presumption-of-Guilt Audit (Antithesis)
308
+ A->>A: Six-Pillar Presumption-of-Guilt Audit (Antithesis + Gate C)
293
309
 
294
310
  alt Findings > 0 (CRIT / HIGH / MED)
295
311
  A->>G: 'vine audit reject --ticket <hex> --reason <text>'
@@ -371,6 +387,6 @@ At the conclusion of the Dialectical Pump:
371
387
  2. `design.md` (Stage 2: Debated, hardened, and synthesized with idiomatic types & interfaces).
372
388
  3. `design_audit_report.md` (Stage 3: Design findings addressed and closed).
373
389
  4. **Committed Contract Skeleton & Red Tests on `epic/<slug>`** (Stage 3.5: Public types, callable stubs with `UNIMPLEMENTED_CONTRACT`, and red contract test suites).
374
- 5. `code_audit_report.md` (Stage 4: Pre-weave Five-Pillar audit cleared with 0 open defects under Contract Immutability).
390
+ 5. `code_audit_report.md` (Stage 4: Pre-weave Six-Pillar audit cleared with 0 open defects under Contract Immutability and Gate C Anti-Heuristic).
375
391
 
376
392
  Proceed to [`orchestrate-swarm`](../orchestrate-swarm/SKILL.md) for trunk weaving.
@@ -71,6 +71,10 @@ Options:
71
71
  - `--json`: Structured machine-parseable JSON output.
72
72
  - `--list`: Displays all sown seeds and their dynamic lifecycle status.
73
73
 
74
+ > [!IMPORTANT]
75
+ > **Canonical Trunk `ROADMAP.md` Handling Rule**:
76
+ > Both `garden plant` and `rhizo task create` (`autoSowGardenTask`) automatically mutate `ROADMAP.md` (and write `.garden/seeds/<id>.toml`) in the canonical trunk working directory. The Lead Orchestrator MUST commit updated `ROADMAP.md` (and any tracked `.garden/seeds/` files) on canonical trunk `main` **before** running `vine new` or `vine weave` so trunk stays clean and strands do not hit merge conflicts during `vine weave`. Never delegate `ROADMAP.md` updates to `@auditor`.
77
+
74
78
  ### B. Deterministic Germination (`garden germinate <subcommand> <seed>`)
75
79
  To prevent LLM tool-calling omissions, germination uses dedicated positional subcommands:
76
80
  1. **`garden germinate dispatch <seed>`**: Enqueues the seed directly to Rhizo cluster work queues (`queue:<project>:tasks`) with dialectical pump specifications.
@@ -228,6 +232,12 @@ Upon receiving the operator's response:
228
232
  - **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
233
  5. Verify cluster readiness (`rhizo who --json`) before proceeding to Phase 3.
230
234
 
235
+ > [!CRITICAL]
236
+ > **Pre-Submit Auditor Registration Invariant & Zero-`--force` Recovery**:
237
+ > `vine submit` mints per-auditor cryptographic `audit_ticket`s (`audit_ticket_hash:<agent_id>`) via `STRAND_SUBMITTED` delivery only for agents already registered on the project in Rhizo at the moment `vine submit` runs (a manual `rhizo send` from an orchestrator does **not** mint a `vine` `audit_ticket`).
238
+ > - **Register `@auditor` During Bootstrap**: The designated `@auditor` MUST register via `rhizo open <auditor_id> --tags "<project>,auditor"` **before** any worker executes `vine submit` (ideally during Phase 2 swarm bootstrap alongside the workers).
239
+ > - **Zero-`--force` Late-Auditor Recovery**: If an auditor registers after `vine submit` already ran, never bypass with `--force` (`--force` is banned on `vine audit approve`). Once `<auditor_id>` is online in `rhizo who`, have the worker re-run `vine submit --author <author_id> ...` (or have the orchestrator dispatch an updated `STRAND_SUBMITTED` ticket generated after registration) so an authentic `audit_ticket_hash:<auditor_id>` is minted.
240
+
231
241
 
232
242
  ---
233
243
 
@@ -396,18 +406,20 @@ They MUST immediately transition to active execution: claim the task, enter the
396
406
  </CRITICAL>
397
407
 
398
408
  <CRITICAL>
399
- Closed-Circuit Two-Point Diff, Literal Fidelity & Holistic Integration Invariant:
409
+ Closed-Circuit Two-Point Diff, Literal Fidelity, 3-Checkpoint Anti-Heuristic Quality Gate & Holistic Integration Invariant:
400
410
  1. Two-Point Diff Mandate: 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.
401
- 2. Holistic Integration (Anti-Stub / Anti-Toy): The implementation must holistically integrate into the live application—it must never be a toy, stub, mock, or hollow heuristic approximation.
402
- 3. Literal Fidelity & True-Fidelity Mandate (Anti-Approximation): When recreating, porting, reverse-engineering, duplicating functionality from an existing reference, or executing an operator directive where fidelity is expected:
403
- - "Approximate", "looks right", "heuristic shortcut", "gist-level", or "good enough for happy paths" implementations are STRICTLY REJECTED.
404
- - The implementation must be literally and precisely the thing that was asked for, matching all edge cases, type boundaries, flags, and error flows.
405
- 4. Aggressive Replacement Purge: Any existing code, configurations, or fallbacks meant to be replaced or upgraded 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.
406
- 5. Structural Assertion Rigor: Partial or loose assertions ("loosey goosey" tests like `assert 'foo' in bar`) are strictly forbidden. Tests must assert complete object equality (`assert actual == expected`) and cover negative controls.
411
+ 2. Holistic Integration (Anti-Stub / Anti-Toy / Zero Silent Mock Fallbacks): The implementation must holistically integrate into the live application—it must never be a toy, stub, mock, or silent mock fallback (`BLOCKER: MISSING_DEPENDENCY` required instead).
412
+ 3. Three-Checkpoint Anti-Heuristic Quality Gate (Gates A, B, C — Pillar 6):
413
+ - **Gate A (Design / Task-Spec / Addendum Gate)**: Reject (`CRIT-HEURISTIC-SPEC`) any design doc, task spec, or addendum prescribing arbitrary "sufficiency" cutoffs, magic count/score/hop thresholds, word/substring/prefix matching to classify intent or decide control flow where structural AST/type/schema/state-machine/model evaluation belongs, hardcoded canned templates, or static word-blacklist pseudo-gates.
414
+ - **Gate B (Worker Decision-Mechanism Disclosure)**: Implementers must disclose every new conditional branch, classifier, or stopping condition and its structural invariant in Section 2.5 of their Deliverable Claim Bundle.
415
+ - **Gate C (Key 3 Six-Pillar Audit — Pillar 6 Overrides Pillar 3 Literal Fidelity)**: At Key 3 (`vine audit inspect` prints all Six Pillars), Pillar 6 (`CRIT-HEURISTIC-HANDWAVE` / `CRIT-HEURISTIC-SPEC`) strictly overrides Literal Fidelity if a task prompt/spec itself prescribed a heuristic.
416
+ 4. Literal Fidelity & True-Fidelity Mandate (Subordinate to Pillar 6): When recreating, porting, reverse-engineering, duplicating functionality from an existing reference, or executing an operator directive where fidelity is expected, the implementation must literally be the thing asked for across all edge cases, type boundaries, flags, and error flows—EXCEPT where Pillar 6 overrides a heuristic spec.
417
+ 5. Aggressive Replacement Purge: Any existing code, configurations, or fallbacks meant to be replaced or upgraded 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.
418
+ 6. Structural Assertion Rigor: Partial or loose assertions ("loosey goosey" tests like `assert 'foo' in bar`) are strictly forbidden. Tests must assert complete object equality (`assert actual == expected`) and cover negative controls.
407
419
  </CRITICAL>
408
420
 
409
421
  <INVARIANT>
410
- Never merge code into the canonical trunk without passing the Three-Key Gate: Key 1 (mechanical merge-tree 'git merge-tree'), Key 2 (semantic test runner 'vine gate'), and Key 3 (Pre-Weave Adversarial Code Audit Pump with 0 open defects under the presumption of guilt) inside an isolated Rift strand.
422
+ Never merge code into the canonical trunk without passing the Three-Key Gate: Key 1 (mechanical merge-tree 'git merge-tree'), Key 2 (semantic test runner 'vine gate'), and Key 3 (Six-Pillar Pre-Weave Adversarial Code Audit Pump including Pillar 6 Anti-Heuristic with 0 open defects under the presumption of guilt) inside an isolated Rift strand.
411
423
  </INVARIANT>
412
424
 
413
425
  <FORBIDDEN>
@@ -48,9 +48,9 @@ description: "Generates and formats X distinct copy-pasteable bootstrap prompts
48
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
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.
50
50
  </CRITICAL>
51
- 7. **Closed-Circuit & Holistic Integration Invariant**:
51
+ 7. **Closed-Circuit, Holistic Integration & Anti-Heuristic Gate Invariant**:
52
52
  <CRITICAL>
53
- 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.
53
+ Swarm workers must never produce isolated shelfware, mock toys, or arbitrary heuristic hand-waves. Every task must implement both the Provider and an active Consumer call-site in live entrypoints, holistically integrate with real application state and events, aggressively delete any legacy code it replaces in the same strand, and pass the **3-Checkpoint Anti-Heuristic Quality Gate** (Gate A Design/Spec check, Gate B Worker Claim Bundle Decision-Mechanism Disclosure, and Gate C Key 3 Six-Pillar / Pillar 6 audit where Anti-Heuristic overrides Literal Fidelity).
54
54
  </CRITICAL>
55
55
 
56
56
  8. **Mutual Arrival Handshake Invariant**:
@@ -20,7 +20,7 @@ The main chat session assumes the role of **Lead Orchestrator**:
20
20
  <CRITICAL>
21
21
  The Worker is NOT the Auditor Invariant:
22
22
  Workers are autonomous implementers, NEVER their own auditors. When a worker completes their tasks and passes Keys 1 & 2, they MUST run 'vine submit' to mark the strand READY_FOR_AUDIT. The worker is strictly forbidden from executing 'vine audit approve' on their own work.
23
- The Lead Orchestrator provisions an independent Adversarial Auditor persona to inspect the strand, verify the Five Pillars, and run 'vine audit approve --auditor <name>'. Self-auditing is mechanically rejected by Vine (ExitGateAuditViolation = 6).
23
+ The Lead Orchestrator provisions an independent Adversarial Auditor persona to inspect the strand, verify the Six Pillars (including Pillar 6 Anti-Heuristic overriding Literal Fidelity), and run 'vine audit approve --auditor <name>'. Self-auditing is mechanically rejected by Vine (ExitGateAuditViolation = 6).
24
24
  </CRITICAL>
25
25
 
26
26
  <CRITICAL>
@@ -56,10 +56,12 @@ The orchestrator inspects the cluster state via `rhizo who --all --json`:
56
56
  </CRITICAL>
57
57
 
58
58
  <CRITICAL>
59
- Pre-Weave Adversarial Audit, Contract Immutability & Auditor Merge-Clerk Decoupling:
60
- The Lead Orchestrator is the final gatekeeper against hermetic shelfware, hollow mocks, superficial heuristics, benchmark defeat devices, and green mirages.
61
- Intensive Five-Pillar adversarial audits are Standard Operating Procedure (SOP). They are pre-authorized, mandatory, and autonomous across the Triad; the Orchestrator executes them automatically without prompting for human operator input.
59
+ Pre-Weave Adversarial Audit, 3-Checkpoint Anti-Heuristic Quality Gate, Contract Immutability & Auditor Merge-Clerk Decoupling:
60
+ The Lead Orchestrator is the final gatekeeper against hermetic shelfware, hollow mocks, arbitrary heuristic hand-waves, and green mirages.
61
+ Intensive Six-Pillar adversarial audits are Standard Operating Procedure (SOP). They are pre-authorized, mandatory, and autonomous across the Triad; the Orchestrator executes them automatically without prompting for human operator input.
62
62
 
63
+ 0. **Gate A (Orchestrator Task-Dispatch & Addendum Anti-Heuristic Gate — `CRIT-HEURISTIC-SPEC`)**:
64
+ Before dispatching any task spec or ratifying any `[DESIGN ADDENDUM]`, verify that the specification relies on structural AST/type/schema/state-machine/model invariants rather than arbitrary "sufficiency" cutoffs, magic count/score/hop thresholds, word/substring/prefix matching for control flow, hardcoded canned templates, or static word-blacklist pseudo-gates.
63
65
  1. Pre-Plan Contract Skeleton Ceremony (Option B):
64
66
  Before authoring `implementation_plan.md` and dispatching parallel workers, the Triad commits idiomatic public types, callable stubs (`UNIMPLEMENTED_CONTRACT`), and red contract test suites onto the feature integration branch `epic/<slug>` via `vine new task-<slug>-skeleton --parent epic/<slug>`, `vine submit --skeleton`, and Key 3 audit. Parallel implementation strands branch off `--parent epic/<slug>`.
65
67
  2. Contract Immutability:
@@ -70,14 +72,15 @@ Intensive Five-Pillar adversarial audits are Standard Operating Procedure (SOP).
70
72
  - **Auditor Merge-Clerk Decoupling**: The Adversarial Auditor ONLY inspects and ratifies/rejects Key 3 (`vine audit inspect` + `vine audit approve/reject`). The Lead Orchestrator is solely responsible for running `vine weave` after Key 3 ratification. The Orchestrator is strictly forbidden from delegating weaving (`--weave`), merge conflict resolution, `ROADMAP.md` updates, or release chores to the Adversarial Auditor. Turning the Auditor into a merge clerk biases the LLM toward rubber-stamping audits just to finish its administrative checklist.
71
73
  - **Single-Strand Audit Isolation (Anti-Batching Invariant)**: Orchestrators MUST dispatch at most ONE strand per Key 3 audit request. Batching multiple strands into a single audit message ("Audit tasks 3.1, 3.2, 3.3, 3.5") collapses LLM attention, blinds the auditor to edge cases, and causes rubber-stamping. Every strand must be audited independently in its own focused turn.
72
74
  - **Inverted Effort Gradient & Evidence Mandate**: Rejection is the fast path whenever ANY doubt or defect exists (`vine audit reject <task_id> --ticket <hex> --reason "..."`). Approval is evidence-bound and strictly requires `--evidence "..."` citing specific changed file basenames, provider->consumer call-sites, and negative control assertions from the diff (`vine audit approve <task_id> --ticket <hex> --evidence "..."`).
73
- - The independent Adversarial Auditor MUST run `vine audit inspect <task_id>` before approving. Using `--force` on audit approvals is strictly prohibited. Auditors are adversarial verifiers, NOT release or merge clerks (auditors never edit `ROADMAP.md` or resolve `CHANGELOG.md` merge conflicts on behalf of workers).
75
+ - The independent Adversarial Auditor MUST run `vine audit inspect <task_id>` before approving (which outputs the Six-Pillar rubric). Using `--force` on audit approvals is strictly prohibited. Auditors are adversarial verifiers, NOT release or merge clerks (auditors never edit `ROADMAP.md` or resolve `CHANGELOG.md` merge conflicts on behalf of workers).
74
76
 
75
- Before executing `vine weave` on any worker strand, the Orchestrator MUST enforce the Five-Pillar Pre-Weave Adversarial Audit (Key 3 of the Three-Key Gate):
77
+ Before executing `vine weave` on any worker strand, the Orchestrator MUST enforce the **Six-Pillar Pre-Weave Adversarial Audit** (Key 3 of the Three-Key Gate) plus Gate B Worker Decision-Mechanism Disclosure:
76
78
  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.
77
- 2. Holistic Integration & Anti-Defeat-Device: Real system behavior, state, and errors must be handled; no placeholder toys, stubs, mocks, naive string splits, or prompt keyword interceptors (e.g. 'if flight game in q'). Any prompt-matching defeat device that bypasses genuine pipelines to fake benchmark compliance is mechanically rejected at Key 2 (`ExitGateDefeatDeviceViolation` = 7) and Key 3.
78
- 3. Literal Fidelity & Reference Parity Mandate (Anti-Approximation): If the task ports, reverse-engineers, duplicates functionality from a reference, or executes a specific operator directive, it must exhibit literal, true fidelity. Approximations ("looks right", "good enough for happy paths") are strictly rejected. All edge cases, flags, type boundaries, and error flows must match the specification precisely.
79
+ 2. Holistic Integration & Zero Silent Mock Fallbacks: Real system behavior, state, and errors must be handled; no placeholder toys, stubs, mocks, naive string splits, or silent mock fallbacks (`BLOCKER: MISSING_DEPENDENCY` required instead).
80
+ 3. Literal Fidelity & Reference Parity Mandate (Subordinate to Pillar 6): If the task ports, reverse-engineers, duplicates functionality from a reference, or executes a specific operator directive, it must exhibit literal, true fidelity—EXCEPT where the prompt/spec/addendum itself prescribed a heuristic hand-wave, in which case Pillar 6 overrides Literal Fidelity (`CRIT-HEURISTIC-SPEC`).
79
81
  4. 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.
80
82
  5. Structural Assertion Rigor (Anti-Green-Mirage): Reject tests relying on partial/loose assertions (`assert "foo" in bar` or `assert len(x) > 0`). Require full structural equality (`assert actual == expected`) and mandatory negative controls.
83
+ 6. Anti-Heuristic & Non-Arbitrary Decision Logic (Gate C — Overrides Pillar 3 Literal Fidelity): Reject (`CRIT-HEURISTIC-HANDWAVE` / `CRIT-HEURISTIC-SPEC`) arbitrary "sufficiency" cutoffs or magic count/score/hop thresholds, word/substring/prefix matching to classify intent or decide control flow where structural/model evaluation belongs, hardcoded canned templates, and static word-blacklist pseudo-gates. Static word-matching pseudo-gates in `vine gate` are removed; heuristic prevention operates across Gates A, B, and C.
81
84
  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.
82
85
  </CRITICAL>
83
86
 
@@ -274,6 +277,10 @@ stateDiagram-v2
274
277
  ### SOP 1: Dispatching Tasks to Workers
275
278
  Depending on the task distribution model in `implementation_plan.md`:
276
279
 
280
+ - **Pre-Dispatch Hygiene (`ROADMAP.md` & `@auditor` Readiness)**:
281
+ - Both `garden plant` and `rhizo task create` (`autoSowGardenTask`) automatically mutate `ROADMAP.md` (and write `.garden/seeds/<id>.toml`) on canonical trunk. Commit updated `ROADMAP.md` (and tracked seed files) on canonical trunk `main` **before** running `vine new` or `vine weave` so strands branch from a clean trunk and never collide on `ROADMAP.md`.
282
+ - Confirm the designated `@auditor` is already registered (`rhizo open <auditor_id> --tags "<project>,auditor"` visible in `rhizo who --json`) **before** dispatching implementation tasks so per-auditor `audit_ticket`s mint automatically when workers run `vine submit` (see SOP 3).
283
+
277
284
  - **Direct Assignment (O2O)**:
278
285
  ```bash
279
286
  rhizo send --to @architect \
@@ -358,19 +365,22 @@ When a worker finishes implementation in their strand, they run `vine submit --a
358
365
 
359
366
  > [!CRITICAL]
360
367
  > **THE WORKER IS NOT THE AUDITOR**: Workers cannot audit or approve their own strands (`vine audit approve` strictly enforces `auditor != author`).
368
+ > **PRE-SUBMIT AUDITOR REGISTRATION INVARIANT & ZERO-`--force` RECOVERY**: `vine submit` mints per-auditor cryptographic `audit_ticket`s (`audit_ticket_hash:<agent_id>`) via `STRAND_SUBMITTED` delivery only for agents already registered on the project in Rhizo at submit time (a manual `rhizo send` from an orchestrator does **not** mint a `vine` `audit_ticket`). Therefore, `@auditor` MUST register (`rhizo open <auditor_id> --tags "<project>,auditor"`) **before** any worker runs `vine submit`. If an auditor registers late, never bypass with `--force` (`--force` is banned on `vine audit approve`); once `<auditor_id>` is online in `rhizo who`, have the worker re-run `vine submit --author <author_id> ...` (or dispatch an updated `STRAND_SUBMITTED` ticket generated after registration).
369
+ > **CANONICAL TRUNK `ROADMAP.md` HANDLING RULE**: Because `garden plant` and `rhizo task create` (`autoSowGardenTask`) automatically mutate canonical `ROADMAP.md` (and `.garden/seeds/<id>.toml`), the Lead Orchestrator MUST commit updated `ROADMAP.md` (and tracked seed files) on `main` **before** running `vine new` or `vine weave`, and harvest post-weave `ROADMAP.md` updates exclusively in the Lead Orchestrator (never delegated to `@auditor`).
361
370
  > **SINGLE-STRAND AUDIT ISOLATION**: The Lead Orchestrator dispatches an audit request for at most ONE strand at a time (batching multiple strands into a single audit message is strictly prohibited):
362
371
  > `rhizo send @auditor --subject "Audit Request: task-core-ds" --body '{"strand_path": "...", "author": "implementer", "ticket": "<64-char-hex-delivery-ticket>"}'`
363
372
 
364
373
  The independent Auditor initiates **Key 3: The Pre-Weave Adversarial Code Audit Pump** under the **Presumption of Guilt**:
365
374
 
366
- 1. **Thesis Intake**: Demand the worker's **Deliverable Claim Bundle** (task contract, Two-Point Diff mapping, test evidence, negative controls, delivery ticket).
367
- 2. **Five-Pillar Presumption-of-Guilt Audit**:
375
+ 1. **Thesis Intake**: Demand the worker's **Deliverable Claim Bundle** (task contract, Two-Point Diff mapping, **Gate B Decision & Transition Mechanisms disclosure**, test evidence, negative controls, delivery ticket).
376
+ 2. **Six-Pillar Presumption-of-Guilt Audit (Gate C)**:
368
377
  - **Changelog Gate (Key 2 Interlock)**: If the repository contains a changelog (`CHANGELOG.md`, `changelog.md`, etc.), verify that changes are documented under `## [Unreleased]`. Confirm `vine gate` passed without changelog violations (or verify worker ran `vine changelog "..."`). Reject if an existing changelog is untouched unless `--allow-no-changelog` was explicitly approved.
369
378
  - **Pillar 1 (Closed-Circuit Two-Point Diff)**: Inspect strand diff against `origin/main` (`git -C "$strand_path" diff --name-only origin/main...HEAD`). Confirm both Provider and live Consumer call-sites are modified. Reject hermetic shelfware lacking a live consumer.
370
- - **Pillar 2 (Holistic Integration)**: Verify real production integration (no hollow mocks, stubs, naive string splits, or swallowed exceptions).
371
- - **Pillar 3 (Literal Fidelity & Reference Parity)**: When duplicating functionality, porting, or executing specific operator directives, demand literal true fidelity. Reject approximations ("looks right", "good enough for happy paths") and verify edge case parity against reference specifications.
379
+ - **Pillar 2 (Holistic Integration & Zero Silent Mock Fallbacks)**: Verify real production integration (no hollow mocks, stubs, naive string splits, swallowed exceptions, or silent mock fallbacks).
380
+ - **Pillar 3 (Literal Fidelity & Reference Parity — Subordinate to Pillar 6)**: When duplicating functionality, porting, or executing specific operator directives, demand literal true fidelity—EXCEPT where the task prompt/spec/addendum itself prescribed a heuristic hand-wave, in which case Pillar 6 overrides Literal Fidelity (`CRIT-HEURISTIC-SPEC`).
372
381
  - **Pillar 4 (Aggressive Replacement Purge)**: Ensure all superseded legacy code, fallbacks, and commented-out blocks are deleted in the strand.
373
382
  - **Pillar 5 (Structural Assertion Rigor)**: Reject partial/loose assertions (`assert "foo" in bar`). Mandate complete structural equality (`assert actual == expected`) and negative controls.
383
+ - **Pillar 6 (Anti-Heuristic & Non-Arbitrary Decision Logic — Overrides Pillar 3 Literal Fidelity)**: Reject (`CRIT-HEURISTIC-HANDWAVE` / `CRIT-HEURISTIC-SPEC`) any diff relying on arbitrary "sufficiency" cutoffs or magic count/score/hop thresholds, word/substring/prefix matching to classify intent or decide control flow where structural/model evaluation belongs, hardcoded canned templates, or static word-blacklist pseudo-gates.
374
384
  3. **Audit Ratification or Delta Re-Pump Loop**:
375
385
  - **Step 3.0: Mandatory Inspection & Merge-Clerk Decoupling**: The Auditor MUST run `vine audit inspect <task_id>` to review the Deliverable Claim Bundle, test results, and git diff. Blind approvals are forbidden, and `--force` is strictly prohibited. The Auditor is strictly decoupled from merge/release duties: auditors NEVER run `--weave`, NEVER edit `ROADMAP.md`, and NEVER resolve merge conflicts. Any conflict or missing changelog must be rejected back to the worker.
376
386
  - **If findings exist**: Auditor executes rejection against the delivery ticket:
@@ -409,7 +419,7 @@ Immediately after weaving:
409
419
  ### SOP 5: Handling Emergent Design Addenda
410
420
  If an incoming message contains `[DESIGN ADDENDUM]`:
411
421
  1. Read the drafted addendum: `view_file(AbsolutePath="docs/addenda/addendum_<topic>.md")`.
412
- 2. Evaluate trade-offs (performance, API impact, scope).
422
+ 2. Evaluate trade-offs (performance, API impact, scope) AND enforce **Gate A (Anti-Heuristic Addendum Gate)** (`CRIT-HEURISTIC-SPEC` if the addendum proposes arbitrary "sufficiency" cutoffs, magic thresholds, word/substring control-flow matching, canned templates, or static word-blacklist pseudo-gates).
413
423
  3. If approved:
414
424
  - Append addendum section to `design.md`.
415
425
  - Adjust downstream tasks in `implementation_plan.md`.
@@ -23,6 +23,7 @@ The Orchestrator authors `implementation_plan.md` adhering to four core invarian
23
23
  5. **Auditor Merge-Clerk Decoupling & Inverted Effort Gradient**: The independent Adversarial Auditor ONLY inspects and ratifies Key 3 (`vine audit inspect` + `vine audit approve/reject`). Rejection is the fast path for any defect (`vine audit reject`); approval requires `--evidence "..."` citing changed files, call-sites, and negative controls. Using `--force` on audit approvals is strictly prohibited. The Auditor NEVER runs `vine weave`, NEVER edits `ROADMAP.md`, and NEVER resolves `CHANGELOG.md` merge conflicts on behalf of workers. Weaving is strictly the Lead Orchestrator's role.
24
24
  6. **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.
25
25
  7. **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.
26
+ 8. **Gate A: Anti-Heuristic Task-Spec & Addendum Gate (`CRIT-HEURISTIC-SPEC`)**: Every task specification and emergent design addendum in `implementation_plan.md` must specify structural AST/type/schema/state-machine/model invariants rather than arbitrary "sufficiency" concepts, magic count/score/hop thresholds, word/substring/prefix matching to decide control flow, hardcoded canned templates, or static word-blacklist pseudo-gates. Workers must disclose every new decision/transition mechanism in their Claim Bundle (Gate B), and Pillar 6 overrides Literal Fidelity at Key 3 if any spec prescribes a heuristic (Gate C).
26
27
 
27
28
  ---
28
29
 
@@ -68,7 +69,7 @@ For all parallel development tracks:
68
69
  - Run local unit tests and formatters.
69
70
  3. **Three-Key Gate Verification**:
70
71
  - **Worker**: Runs `vine submit --author <worker>` (evaluates Key 1 mechanical merge-tree + Key 2 live compiler/test suite + changelog, and stamps cryptographic delivery ticket / `gate_token`).
71
- - **Independent Auditor**: Inspects Five Pillars and runs:
72
+ - **Independent Auditor**: Inspects Six Pillars (including Pillar 6 Anti-Heuristic overriding Literal Fidelity) via `vine audit inspect <task_id>` and runs:
72
73
  ```bash
73
74
  # Step 1: Mandatory forensic inspection
74
75
  vine audit inspect <task_id>
@@ -105,6 +106,7 @@ For all parallel development tracks:
105
106
  - *Provider*: `src/types.nim` (AST node kinds and serializers)
106
107
  - *Consumer / Call-Site*: Wire into `src/parser.nim` parse loop and `src/eval.nim`
107
108
  - *Replacement Deletion*: Delete deprecated ad-hoc string tuples in `src/legacy_types.nim`
109
+ - *Decision / Transition Invariant*: Structural AST/state-machine transitions only (no arbitrary count cutoffs or word/substring matching; disclose in Claim Bundle Section 2.5)
108
110
  - *Holistic Verification*: Real AST nodes evaluate in full parser pipeline (no dummy mocks)
109
111
  - *Weave*: `vine submit && vine audit inspect task-core-ds && vine audit approve && vine weave && rhizo unlock file:src/types.nim`
110
112
 
@@ -145,7 +147,7 @@ If a worker discovers that an assumption in `design.md` is flawed or impossible
145
147
  - *Proposed Deviation*: Exact technical changes.
146
148
  - *Tradeoff Analysis*: Performance, ergonomics, backwards compatibility.
147
149
  3. Submit notification to Orchestrator via `rhizo send --to orchestrator --subject "Design Addendum: <topic>"`.
148
- 4. Orchestrator reviews and ratifies the addendum, updates `design.md`, updates `implementation_plan.md`, and replies with approval before implementation resumes.
150
+ 4. Orchestrator reviews the addendum against **Gate A (Anti-Heuristic Spec Gate)** (`CRIT-HEURISTIC-SPEC`), ratifies if clean, updates `design.md`, updates `implementation_plan.md`, and replies with approval before implementation resumes.
149
151
  ```
150
152
 
151
153
  ---