@axiomantic/garden 0.2.27 → 0.2.29
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 +7 -7
- package/SKILL.md +68 -69
- package/bin/binaries/garden-darwin-arm64 +0 -0
- package/bin/binaries/garden-darwin-x64 +0 -0
- package/bin/binaries/garden-linux-arm64 +0 -0
- package/bin/binaries/garden-linux-x64 +0 -0
- package/bin/binaries/garden-win32-x64.exe +0 -0
- package/package.json +1 -1
- package/skills/choose-personas/SKILL.md +1 -1
- package/skills/dialectical-pump/SKILL.md +126 -21
- package/skills/garden/SKILL.md +68 -69
- package/skills/launch-workers/SKILL.md +47 -57
- package/skills/orchestrate-swarm/SKILL.md +66 -62
- package/skills/plan-implementation/SKILL.md +41 -16
package/README.md
CHANGED
|
@@ -182,10 +182,10 @@ Garden utilizes the **Active Swarm Fast-Path (First-Look Invariant)**:
|
|
|
182
182
|
|
|
183
183
|
### 3. Prompt-Based Swarm Bootstrapping (`launch-workers`)
|
|
184
184
|
Garden writes `garden-swarm.json` and runs `garden prompts` to write prompt cards directly to temporary files (`/tmp/garden-<project>/<worker>.md`) rather than flooding the chat window with thousands of lines of raw text:
|
|
185
|
-
- The Orchestrator displays concise session assignments with clickable file links
|
|
186
|
-
1. Open **Tab 1 / Window 1**:
|
|
187
|
-
2. Open **Tab 2 / Window 2**:
|
|
188
|
-
3. Open **Tab 3 / Window 3**:
|
|
185
|
+
- The Orchestrator displays concise session assignments with clickable file links:
|
|
186
|
+
1. Open **Tab 1 / Window 1**: Reference Prompt 1 (`/tmp/garden-<project>/<project>-auditor.md`)
|
|
187
|
+
2. Open **Tab 2 / Window 2**: Reference Prompt 2 (`/tmp/garden-<project>/<project>-architect.md`)
|
|
188
|
+
3. Open **Tab 3 / Window 3**: Reference Prompt 3 (`/tmp/garden-<project>/<project>-implementer.md`)
|
|
189
189
|
- Each session enters the project directory, exports `RHIZO_AGENT_NAME`, registers on the Redis bus (`rhizo open`), and arms its single-shot listener (`rhizo listen`).
|
|
190
190
|
- The Orchestrator confirms all workers are live via `rhizo who --json` before dispatching tasks!
|
|
191
191
|
|
|
@@ -202,7 +202,7 @@ Garden authors `implementation_plan.md`:
|
|
|
202
202
|
- Sets up dynamic progress checkboxes and harness To-Do tracking.
|
|
203
203
|
|
|
204
204
|
### 6. Live Orchestration & Trunk Weaving (`orchestrate-swarm`)
|
|
205
|
-
The main chat orchestrator dispatches work over Redis. Workers code in isolated strands, run unit tests, and verify Keys 1 & 2
|
|
205
|
+
The main chat orchestrator dispatches work over Redis. Workers code in isolated strands (where Vine tracks identity in `.git/config` and state in Redis with zero on-disk manifests), run unit tests, and verify Keys 1 & 2 via `vine submit` (which generates a cryptographic delivery ticket). An independent adversarial auditor reviews and ratifies Key 3 (`vine audit approve <task_id> --auditor <name> --ticket <hex> --evidence "<files, call-sites, negative controls>" --listen`). When ratified, the Lead Orchestrator runs `vine weave` to fast-forward verified code into `main` with zero merge conflicts, automatically calling `rhizo task complete` and promoting downstream DAG child tasks!
|
|
206
206
|
|
|
207
207
|
---
|
|
208
208
|
|
|
@@ -281,8 +281,8 @@ The main chat orchestrator dispatches work over Redis. Workers code in isolated
|
|
|
281
281
|
The main chat session coordinates, reviews, and integrates. Intensive multi-file edits are executed by the worker fleet in isolated strands.
|
|
282
282
|
2. **Empirical Grounding Protocol (Zero Theatrical Dialogue)**:
|
|
283
283
|
Dialectical deliberations must cite hard evidence from real tool calls (line citations, test outputs, compiler errors). Theatrical roleplay is strictly banned.
|
|
284
|
-
3. **Three-Key Gate Verification**:
|
|
285
|
-
No code is merged into the trunk without passing Key 1 (in-memory `git merge-tree` mechanical check), Key 2 (live semantic compiler and test suite run), and Key 3 (independent adversarial audit ratification via `vine audit approve`). Workers submit strands with `vine submit` and CANNOT audit their own work.
|
|
284
|
+
3. **Three-Key Gate Verification & Auditor Decoupling**:
|
|
285
|
+
No code is merged into the trunk without passing Key 1 (in-memory `git merge-tree` mechanical check), Key 2 (live semantic compiler and test suite run), and Key 3 (independent adversarial audit ratification via `vine audit approve <task_id> --auditor <name> --ticket <hex> --evidence "..." --listen`). Workers submit strands with `vine submit` (which generates a delivery ticket) and CANNOT audit their own work. The Adversarial Auditor ONLY inspects and ratifies Key 3; the Lead Orchestrator executes `vine weave`, which automatically invokes `rhizo task complete` and unblocks downstream DAG child tasks.
|
|
286
286
|
4. **Zero Dirty Commits**:
|
|
287
287
|
All agent identity files, session state, and temporary lockfiles are strictly ignored in `.gitignore`.
|
|
288
288
|
|
package/SKILL.md
CHANGED
|
@@ -89,8 +89,8 @@ Execute phases sequentially. Never skip phases or invert the order.
|
|
|
89
89
|
| **Phase 0** | **Intake Gate** | Fast-path check (`rhizo who --json`) or single-question intake via `ask_question` calibrated to detected harness. | Active cluster workers confirmed or operator submits choice. |
|
|
90
90
|
| **Phase 1** | [`choose-personas`](../choose-personas/SKILL.md) | Synthesize swarm configuration reflecting detected harness and chosen shape (zero on-disk JSON). | Swarm roles ratified. |
|
|
91
91
|
| **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. |
|
|
92
|
-
| **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
|
|
93
|
-
| **Phase 4** | [`plan-implementation`](../plan-implementation/SKILL.md) | Author master implementation plan
|
|
92
|
+
| **Phase 3** | [`dialectical-pump`](../dialectical-pump/SKILL.md) | Grounded triadic deliberation: research (extracting codebase idioms), design (specifying exact types & interfaces), adversarial audit, and Stage 3.5 Pre-Plan Contract Skeleton Strand on `epic/<slug>`. | Zero open `CRIT` or `BLOCKER` defects in `audit_report.md` and contract skeleton committed. |
|
|
93
|
+
| **Phase 4** | [`plan-implementation`](../plan-implementation/SKILL.md) | Author master implementation plan anchored to committed skeleton symbols on `epic/<slug>`, locking schedules, parallel strands (`--parent epic/<slug>`), and Two-Point Diff contracts. | Complete `implementation_plan.md` with task-locking matrix and Contract Immutability. |
|
|
94
94
|
| **Phase 5** | [`orchestrate-swarm`](../orchestrate-swarm/SKILL.md) | Main-chat governor: task dispatch, heartbeat monitoring, Closed-Circuit & Three-Key gate verification, trunk weaving. | All plan tasks woven via `vine weave` after passing Three-Key Gate (Mechanical, Semantic, Adversarial Audit). |
|
|
95
95
|
|
|
96
96
|
---
|
|
@@ -110,24 +110,24 @@ Instead, it acts as an **Intelligent Intake Concierge**:
|
|
|
110
110
|
1. **Evaluate Request Scope & Blast Radius (Cold Start Only)**:
|
|
111
111
|
- **High Complexity / Architectural Shifts / New Subsystems / Multi-File Migrations**: The request impacts foundational contracts, multiple modules, or shared abstractions. Requires empirical research, RFC design, adversarial review, and parallel strand isolation. Recommend **Option 1**.
|
|
112
112
|
- **Medium Complexity / Well-Defined Features / Self-Contained Deliverables**: The scope is clear, boundaries are known, and it can be implemented without a 3-stage dialectical design cycle. Recommend **Option 2**.
|
|
113
|
-
- **Low Complexity / Single-File Fixes / Documentation / Scratch Tweaks**:
|
|
113
|
+
- **Low Complexity / Single-File Fixes / Documentation / Scratch Tweaks**: Even for single-file fixes or small tweaks, Single-Worker Direct Dispatch (`rhizo send` to 1 worker in a dedicated Vine strand) is strongly preferred to keep the orchestrator context window dedicated to planning and governance. Recommend **Option 2 (Single-Worker Dispatch)** or **Option 3 (Inline Execution - Non-Code / Scratch Only)**.
|
|
114
114
|
|
|
115
115
|
2. **Present Interactive Triage Modal (`ask_question`)**:
|
|
116
116
|
The orchestrator invokes `ask_question` with 3 mutually exclusive options clearly explaining the tradeoffs:
|
|
117
|
-
- **Option 1 (Full Ceremony - RFE ➔ RFD ➔ RFC ➔ Swarm)**:
|
|
117
|
+
- **Option 1 (Full Ceremony - RFE ➔ RFD ➔ RFC ➔ Contract Skeleton Strand ➔ Swarm)**:
|
|
118
118
|
*Scope*: Architectural shifts, new subsystems, major refactors, or cross-cutting migrations.
|
|
119
|
-
*Process*: Sows the idea as a persistent roadmap seed (`garden plant`), authors the Research/RFD, System Architecture/RFC, and Adversarial Audit documents, schedules monotonic locks and isolated Vine strands, and writes worker prompts to `/tmp/garden-<project>/`.
|
|
119
|
+
*Process*: Sows the idea as a persistent roadmap seed (`garden plant`), authors the Research/RFD (extracting codebase idioms), System Architecture/RFC (defining exact types & interfaces), and Adversarial Audit documents, commits the Pre-Plan Contract Skeleton Strand on `epic/<slug>` with red contract tests, schedules monotonic locks and isolated Vine strands, and writes worker prompts to `/tmp/garden-<project>/`.
|
|
120
120
|
- **Option 2 (Direct Swarm Dispatch)**:
|
|
121
|
-
*Scope*: Well-defined, self-contained features, bugfixes, or bounded deliverables.
|
|
121
|
+
*Scope*: Well-defined, self-contained features, bugfixes, or bounded deliverables (including small or single-file changes via Single-Worker Direct Dispatch).
|
|
122
122
|
*Process*: Bypasses heavy research/design documentation; enqueues tasks straight to cluster work queues (`rhizo enqueue queue:<project>:tasks`) or dispatches directly to active workers (`rhizo send <worker>`).
|
|
123
|
-
- **Option 3 (Inline Execution)**:
|
|
124
|
-
*Scope*:
|
|
125
|
-
*Process*:
|
|
123
|
+
- **Option 3 (Inline Execution - Strongly Deprioritized / Non-Code Only)**:
|
|
124
|
+
*Scope*: High-level planning, architectural analysis, design discussions, or non-code scratch inspection.
|
|
125
|
+
*Process*: Strongly discouraged for code implementation. The orchestrator context window must remain dedicated to high-level planning, analysis, and governance. Even for small or single-file code changes, Single-Worker Direct Dispatch is strongly preferred. Direct inline coding in the orchestrator is strictly deprioritized.
|
|
126
126
|
|
|
127
127
|
3. **Execution Branching**:
|
|
128
128
|
- **If Option 1 selected**: Run `garden plant "<prompt>"`, then proceed to Cold-Start Swarm Calibration / Phase 1 `choose-personas` (or attach to active swarm via Fast-Path) and Phase 3 `dialectical-pump`.
|
|
129
129
|
- **If Option 2 selected**: Check `rhizo who --all --json`. If workers are online, dispatch via `rhizo send` or `rhizo enqueue`. If cold, run Cold-Start Swarm Calibration to spin up workers.
|
|
130
|
-
- **If Option 3 selected**: Execute inline in the current session.
|
|
130
|
+
- **If Option 3 selected**: Execute inline in the current session (reserved strictly for planning, analysis, and non-code tasks).
|
|
131
131
|
|
|
132
132
|
#### Adaptive Swarm On-Ramp & Dynamic Worker Repurposing (First-Look Invariant)
|
|
133
133
|
|
|
@@ -196,7 +196,7 @@ Because the coding harness is auto-detected from the session environment (`ANTIG
|
|
|
196
196
|
1. **Single Question: Execution Mode & Swarm Shape in <Detected Harness>**:
|
|
197
197
|
- *Option 1 (Recommended)*: Multi-Agent Swarm: Balanced Triad in <Detected Harness> (Systems Architect `@<project>-architect`, Adversarial Auditor `@<project>-auditor`, DevEx Lead `@<project>-implementer`).
|
|
198
198
|
- *Option 2*: Multi-Agent Swarm: Focused Duo in <Detected Harness> (Implementation Lead `@<project>-implementer`, Adversarial Auditor `@<project>-auditor`).
|
|
199
|
-
- *Option 3*: Single-Agent Inline (Execute sequentially within current chat session).
|
|
199
|
+
- *Option 3 (Deprioritized)*: Single-Agent Inline (Execute sequentially within current chat session; strongly discouraged for code edits to preserve orchestrator context for governance).
|
|
200
200
|
- *Option 4*: Custom Swarm (Operator specifies custom roles or cross-harness distribution).
|
|
201
201
|
|
|
202
202
|
<CRITICAL>
|
|
@@ -214,11 +214,11 @@ Upon receiving the operator's response:
|
|
|
214
214
|
1. Run `garden init` if `garden.toml` or `AGENTS.md` is not yet initialized.
|
|
215
215
|
2. Synthesize swarm configuration reflecting the chosen workers, roles, detected harness, and session-default models (zero on-disk JSON).
|
|
216
216
|
3. Run `garden prompts` which writes individual prompt cards to `/tmp/garden-<project>/<worker>.md` and all cards to `/tmp/garden-<project>/all-workers.md`.
|
|
217
|
-
4. Present the operator with concise setup instructions
|
|
217
|
+
4. Present the operator with concise setup instructions with clickable prompt file paths (NEVER paste prompt cards inline in chat):
|
|
218
218
|
```text
|
|
219
219
|
1. Open X terminal tabs or windows in your detected coding harness.
|
|
220
|
-
2.
|
|
221
|
-
3. Once
|
|
220
|
+
2. Pass each worker's prompt card into its session (e.g. paste or reference /tmp/garden-<project>/<worker>.md).
|
|
221
|
+
3. Once launched, tell me here (or I will automatically detect them online via `rhizo who`).
|
|
222
222
|
```
|
|
223
223
|
5. Register the orchestrator's presence (`rhizo open <project>-orchestrator`) and arm the listener.
|
|
224
224
|
6. Poll or await cluster readiness gate (`rhizo who --json`) before proceeding to Phase 3.
|
|
@@ -235,26 +235,22 @@ stateDiagram-v2
|
|
|
235
235
|
[*] --> DRAFTED : rhizo task create <id>
|
|
236
236
|
DRAFTED --> BLOCKED : Unmet DAG dependencies (depends_on)
|
|
237
237
|
DRAFTED --> QUEUED : Zero unmet dependencies
|
|
238
|
-
BLOCKED --> QUEUED : Parent task COMPLETED (Auto-promoted by
|
|
238
|
+
BLOCKED --> QUEUED : Parent task COMPLETED (Auto-promoted by vine weave)
|
|
239
239
|
|
|
240
|
-
QUEUED -->
|
|
241
|
-
DELIVERED --> CLAIMED : Worker acknowledges (Acquires monotonic lease)
|
|
242
|
-
DELIVERED --> ORPHANED : Receipt timeout (180s without claim)
|
|
243
|
-
|
|
244
|
-
CLAIMED --> IN_PROGRESS : Worker provisions strand (vine new <id>)
|
|
240
|
+
QUEUED --> IN_PROGRESS : Task claimed / delivered (rhizo claim / rhizo task claim)
|
|
245
241
|
IN_PROGRESS --> IN_PROGRESS : Progress reported (rhizo task progress, lease extended)
|
|
246
242
|
IN_PROGRESS --> GATE_EVALUATING : Verification initiated (vine submit / vine gate)
|
|
247
243
|
IN_PROGRESS --> YIELDED : rhizo task yield (Returned to pool)
|
|
248
244
|
IN_PROGRESS --> ORPHANED : Lease expires without progress
|
|
249
245
|
|
|
250
246
|
GATE_EVALUATING --> IN_PROGRESS : Gate failed (Tests red, changelog missing, or merge conflict)
|
|
251
|
-
GATE_EVALUATING --> READY_FOR_AUDIT : Keys 1 & 2 PASSED (vine submit,
|
|
247
|
+
GATE_EVALUATING --> READY_FOR_AUDIT : Keys 1 & 2 PASSED (vine submit, delivery ticket stamped)
|
|
252
248
|
|
|
253
|
-
READY_FOR_AUDIT --> AUDIT_RATIFIED : Key 3 PASSED (vine audit approve
|
|
254
|
-
READY_FOR_AUDIT --> AUDIT_REJECTED : Key 3 FAILED (vine audit reject)
|
|
249
|
+
READY_FOR_AUDIT --> AUDIT_RATIFIED : Key 3 PASSED (vine audit approve --ticket <hex>, audit token stamped)
|
|
250
|
+
READY_FOR_AUDIT --> AUDIT_REJECTED : Key 3 FAILED (vine audit reject --ticket <hex> --reason "...")
|
|
255
251
|
AUDIT_REJECTED --> IN_PROGRESS : Remediate defects in strand
|
|
256
252
|
|
|
257
|
-
AUDIT_RATIFIED --> COMPLETED : vine weave
|
|
253
|
+
AUDIT_RATIFIED --> COMPLETED : vine weave (Auto-completes task via rhizo task complete & unblocks DAG children)
|
|
258
254
|
|
|
259
255
|
ORPHANED --> QUEUED : Re-queued for retry (attempts < 3)
|
|
260
256
|
ORPHANED --> DEAD_LETTER : Max delivery retries exceeded (attempts >= 3)
|
|
@@ -273,51 +269,42 @@ stateDiagram-v2
|
|
|
273
269
|
+---------+ Unmet deps
|
|
274
270
|
| DRAFTED | ──────────────────► [ BLOCKED ]
|
|
275
271
|
+---------+ │
|
|
276
|
-
│ Zero deps │ Parent task COMPLETED
|
|
272
|
+
│ Zero deps │ Parent task COMPLETED (Auto-promoted by vine weave)
|
|
277
273
|
▼ ▼
|
|
278
274
|
+---------+ ◄───────────────────────+
|
|
279
275
|
| QUEUED |
|
|
280
276
|
+---------+
|
|
281
277
|
│
|
|
282
|
-
│ rhizo
|
|
283
|
-
|
|
284
|
-
+-----------+ 180s Receipt Timeout
|
|
285
|
-
| DELIVERED | ─────────────────────────────────► [ ORPHANED ]
|
|
286
|
-
+-----------+ │
|
|
287
|
-
│ │ Attempts >= 3
|
|
288
|
-
│ rhizo task claim / rhizo reply ▼
|
|
289
|
-
▼ [ DEAD_LETTER ]
|
|
290
|
-
+---------+
|
|
291
|
-
| CLAIMED |
|
|
292
|
-
+---------+
|
|
293
|
-
│
|
|
294
|
-
│ vine new <task_id> (Provision strand)
|
|
278
|
+
│ Task claimed / delivered (rhizo claim / rhizo task claim / rhizo send)
|
|
279
|
+
│ Collapses DELIVERED ➔ CLAIMED ➔ IN_PROGRESS with monotonic lease
|
|
295
280
|
▼
|
|
296
281
|
+-------------+ Lease expires
|
|
297
282
|
| IN_PROGRESS | ────────────────────────────────► [ ORPHANED ]
|
|
298
|
-
+-------------+
|
|
299
|
-
│ ▲
|
|
300
|
-
│ vine │ Gate fails
|
|
301
|
-
│ submit │ (Tests red or conflict)
|
|
283
|
+
+-------------+ │
|
|
284
|
+
│ ▲ │ Attempts >= 3
|
|
285
|
+
│ vine │ Gate fails ▼
|
|
286
|
+
│ submit │ (Tests red or conflict) [ DEAD_LETTER ]
|
|
302
287
|
▼ │
|
|
303
288
|
+-----------------+
|
|
304
289
|
| GATE_EVALUATING |
|
|
305
290
|
+-----------------+
|
|
306
291
|
│
|
|
307
|
-
│ Keys 1 & 2 PASSED (vine submit:
|
|
292
|
+
│ Keys 1 & 2 PASSED (vine submit: delivery ticket stamped)
|
|
308
293
|
▼
|
|
309
294
|
+------------------+
|
|
310
|
-
| READY_FOR_AUDIT |
|
|
311
|
-
+------------------+
|
|
312
|
-
│ │
|
|
313
|
-
│ approve │ reject
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
295
|
+
| READY_FOR_AUDIT | ◄──────────────────────────────┐
|
|
296
|
+
+------------------+ │
|
|
297
|
+
│ │ │
|
|
298
|
+
│ approve │ reject │ Remediate
|
|
299
|
+
│ --ticket │ --ticket │
|
|
300
|
+
▼ ▼ │
|
|
301
|
+
+------------+ +----------------+ │
|
|
302
|
+
| AUDIT_ | | AUDIT_REJECTED | ──────────────────┘
|
|
317
303
|
| RATIFIED | +----------------+
|
|
318
304
|
+------------+
|
|
319
305
|
│
|
|
320
|
-
│ vine weave
|
|
306
|
+
│ vine weave (Executed by Lead Orchestrator)
|
|
307
|
+
│ Auto-executes rhizo task complete & unblocks DAG children
|
|
321
308
|
▼
|
|
322
309
|
+-----------+
|
|
323
310
|
| COMPLETED | ──► Auto-promotes BLOCKED child tasks to QUEUED!
|
|
@@ -331,19 +318,13 @@ stateDiagram-v2
|
|
|
331
318
|
| **`DRAFTED`** | `rhizo task create <id> --title <t>` | Creates immutable task contract hash `task:<id>` in Redis. | N/A |
|
|
332
319
|
| **`BLOCKED`** | Evaluated on create | Stamped if `depends_on` contains incomplete tasks. Workers cannot claim. | N/A |
|
|
333
320
|
| **`QUEUED`** | Auto on create or parent complete | Pushed to queue/inbox. Available for worker consumption. | N/A |
|
|
334
|
-
| **`
|
|
335
|
-
ightarrow$ `ORPHANED` |
|
|
336
|
-
| **`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 $
|
|
337
|
-
ightarrow$ `ORPHANED` |
|
|
338
|
-
| **`IN_PROGRESS`** | Worker coding in strand | Enforces single-active-lease invariant. Periodic `rhizo task progress` extends lease. | Lease expires $
|
|
339
|
-
ightarrow$ `ORPHANED` |
|
|
321
|
+
| **`IN_PROGRESS`** | `rhizo task claim <id>` / `rhizo claim` / task delivery | **Collapsed claim & delivery**: Worker acquires monotonic fencing lease and enters isolated Vine strand (`vine new <id>`). Zero on-disk manifests; strand identity is stored in `.git/config` (`vine.taskId`, `vine.project`) and authoritative state in Redis. Periodic `rhizo task progress` extends lease. | Lease expires $\rightarrow$ `ORPHANED` |
|
|
340
322
|
| **`GATE_EVALUATING`**| `vine submit` / `vine gate` | Key 1 (mechanical merge-tree) & Key 2 (live compiler/test suite + changelog) evaluated. | Exit 1 $\rightarrow$ `CONFLICTED`<br>Exit 2 $\rightarrow$ `GATE_FAILED` |
|
|
341
|
-
| **`READY_FOR_AUDIT`**| `vine submit` | Keys 1 & 2 passed. Strand submitted for independent adversarial review. | N/A |
|
|
342
|
-
| **`AUDIT_REJECTED`** | `vine audit reject` | Auditor rejected deliverable with recorded defect reasons. Worker returns to `IN_PROGRESS` for delta remediation. | N/A |
|
|
343
|
-
| **`AUDIT_RATIFIED`** | `vine audit approve` | Key 3 passed! Cryptographic `audit_token` stamped. Auditor and author identities strictly decoupled (`auditor != author`). | N/A |
|
|
344
|
-
| **`COMPLETED`** | `vine weave
|
|
345
|
-
| **`ORPHANED`** |
|
|
346
|
-
ightarrow$ `DEAD_LETTER`. Otherwise returns to `QUEUED`. | Escalates to operator if Dead-Lettered |
|
|
323
|
+
| **`READY_FOR_AUDIT`**| `vine submit` | Keys 1 & 2 passed. Cryptographic delivery ticket (`gate_token`) stamped into strand state. Strand submitted for independent adversarial review. | N/A |
|
|
324
|
+
| **`AUDIT_REJECTED`** | `vine audit reject <task_id> --auditor <name> --ticket <hex> --reason "..." --listen` | Auditor rejected deliverable with recorded defect reasons against delivery ticket. Worker returns to `IN_PROGRESS` for delta remediation. | N/A |
|
|
325
|
+
| **`AUDIT_RATIFIED`** | `vine audit approve <task_id> --auditor <name> --ticket <hex> --evidence "..." [--listen]` | Key 3 passed! Cryptographic delivery ticket verified and `audit_token` stamped. Auditor and author identities strictly decoupled (`auditor != author`). Auditor NEVER weaves. | N/A |
|
|
326
|
+
| **`COMPLETED`** | `vine weave` | Fast-forward merged into canonical trunk by the Lead Orchestrator. Strand pruned. Locks released. **`vine weave` automatically invokes `rhizo task complete`**, auto-promoting downstream DAG dependencies (`BLOCKED` $\rightarrow$ `QUEUED`)! | N/A |
|
|
327
|
+
| **`ORPHANED`** | Lease expired without progress | Stalled worker detected. Increments `delivery_attempts`. If $\ge 3 \rightarrow$ `DEAD_LETTER`. Otherwise returns to `QUEUED`. | Escalates to operator if Dead-Lettered |
|
|
347
328
|
| **`YIELDED`** | `rhizo task yield <id>` | Worker gracefully steps aside. Task returned to `QUEUED`. | N/A |
|
|
348
329
|
| **`DEAD_LETTER`** | Retries exhausted ($\ge 3$) | Moved to dead-letter queue. Alerts orchestrator and operator. | Requires manual operator triage |
|
|
349
330
|
|
|
@@ -357,15 +338,33 @@ The primary conversation session acts as the Lead Orchestrator. The orchestrator
|
|
|
357
338
|
|
|
358
339
|
<CRITICAL>
|
|
359
340
|
Orchestrator Intake Gate & Non-Implementation Invariant (GVR-016):
|
|
360
|
-
The Lead Orchestrator is a CONDUCTOR, NOT A CODER.
|
|
341
|
+
The Lead Orchestrator is a CONDUCTOR, NOT A CODER. The orchestrator context window must remain dedicated to high-level planning, architectural analysis, and governance.
|
|
361
342
|
Whenever the operator presents a task, feature request, bugfix, or asks to work on something:
|
|
362
343
|
THE ORCHESTRATOR MUST NEVER DIRECTLY JUMP INTO CODE EDITING OR IMPLEMENTATION TOOLS (e.g. `write_to_file`, `replace_file_content`).
|
|
363
344
|
Instead, it MUST STOP and ask the operator how they want the work routed using `ask_question`:
|
|
364
345
|
- Option 1 (Recommended): Enqueue to Cluster Work Queue (`rhizo enqueue queue:<project>:tasks --subject "..." --body "..."`) for background cluster workers.
|
|
365
|
-
- Option 2: Dispatch directly to an active cluster worker (`rhizo send <worker> --subject "..." --body "..."`).
|
|
366
|
-
- Option 3: Execute inline in main chat (only if the operator explicitly
|
|
346
|
+
- Option 2: Dispatch directly to an active cluster worker (`rhizo send <worker> --subject "..." --body "..."`). Single-Worker Direct Dispatch in a dedicated Vine strand is strongly preferred even for small or single-file changes.
|
|
347
|
+
- Option 3 (Strongly Deprioritized): Execute inline in main chat (strictly reserved for non-code planning/analysis, or only if the operator explicitly commands direct inline coding).
|
|
348
|
+
|
|
349
|
+
This intake gate applies to ANY request to "work on X", "build Y", "fix Z", or "implement feature W". Direct inline code editing is prohibited unless the operator explicitly directs the orchestrator to code it inline in the main session.
|
|
350
|
+
</CRITICAL>
|
|
367
351
|
|
|
368
|
-
|
|
352
|
+
<INVARIANT>
|
|
353
|
+
Pre-Plan Contract Skeleton Ceremony (Option B):
|
|
354
|
+
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>'.
|
|
355
|
+
</INVARIANT>
|
|
356
|
+
|
|
357
|
+
<CRITICAL>
|
|
358
|
+
Contract Immutability & Anti-Mock-Fallback:
|
|
359
|
+
Workers branching off '--parent epic/<slug>' MUST NOT alter exported contract signatures or weaken contract tests without an approved '[DESIGN ADDENDUM]'. Workers are strictly prohibited from implementing silent mock fallbacks (e.g. 'lesMockFallback'); missing dependencies require halting immediately with 'BLOCKER: MISSING_DEPENDENCY'.
|
|
360
|
+
</CRITICAL>
|
|
361
|
+
|
|
362
|
+
<CRITICAL>
|
|
363
|
+
Auditor Merge-Clerk Decoupling & Inverted Effort Gradient:
|
|
364
|
+
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.
|
|
365
|
+
- Single-Strand Audit Isolation: Orchestrators MUST dispatch at most ONE strand per Key 3 audit request. Batching multiple strands into a single audit message is strictly prohibited.
|
|
366
|
+
- Inverted Effort Gradient: 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 "..."`).
|
|
367
|
+
- The independent 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.
|
|
369
368
|
</CRITICAL>
|
|
370
369
|
|
|
371
370
|
<INVARIANT>
|
|
@@ -403,7 +402,7 @@ Never merge code into the canonical trunk without passing the Three-Key Gate: Ke
|
|
|
403
402
|
</INVARIANT>
|
|
404
403
|
|
|
405
404
|
<FORBIDDEN>
|
|
406
|
-
Never stage coordination metadata (*.lock, .rhizo.*,
|
|
405
|
+
Never stage coordination metadata (*.lock, .rhizo.*, workspaces/) into Git. Vine stores strand identity in `.git/config` (`vine.taskId`, `vine.project`) and authoritative state in Redis (zero state files in the working tree). Keep all agent state ignored.
|
|
407
406
|
</FORBIDDEN>
|
|
408
407
|
|
|
409
408
|
<CRITICAL>
|
|
@@ -456,7 +455,7 @@ To prevent silent deadlocks when workers stall, crash, or fail to re-arm listene
|
|
|
456
455
|
- **Escalate Immediately**: Prompt the operator via `ask_question` with the diagnostic status.
|
|
457
456
|
- **Actionable Remediation**: Offer options to (1) re-arm the listener in the worker's terminal session (`rhizo listen <worker>`), (2) reboot the agent harness, or (3) reassign the task via `rhizo reroute <worker> <new_worker>`.
|
|
458
457
|
3. **Orchestrator Self-Audit Watchdog (ONLY for OpenAI Codex / ChatGPT)**:
|
|
459
|
-
- **Antigravity & OpenCode Exemption**: In Google Antigravity and OpenCode, DO NOT schedule timers or cron tasks (`schedule(...)`). Antigravity natively and reactively
|
|
458
|
+
- **Antigravity & OpenCode Exemption**: In Google Antigravity and OpenCode, DO NOT schedule timers or cron tasks (`schedule(...)`). Antigravity natively and reactively receives incoming messages via the continuous background ear (`--agy-ear`) and `agentapi send-message`.
|
|
460
459
|
- **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).
|
|
461
460
|
- **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.
|
|
462
461
|
- 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`).
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -133,7 +133,7 @@ Synthesize the primary triad targeting the detected harness with session-default
|
|
|
133
133
|
Invoke `ask_question` with a SINGLE concise question combining execution mode and swarm shape in the detected harness:
|
|
134
134
|
- Option 1 (Recommended): Multi-Agent Swarm: Balanced Triad in <Detected Harness> (Architect, Auditor, Implementer with session-native models)
|
|
135
135
|
- Option 2: Multi-Agent Swarm: Focused Duo in <Detected Harness> (Implementation Lead + Adversarial Auditor)
|
|
136
|
-
- Option 3: Single-Agent Inline (Execute sequentially within current chat session)
|
|
136
|
+
- Option 3 (Deprioritized): Single-Agent Inline (Execute sequentially within current chat session; strongly discouraged for code edits to preserve orchestrator context for governance)
|
|
137
137
|
- Option 4: Custom configuration (allows user write-in).
|
|
138
138
|
|
|
139
139
|
### Step 4: Synthesize Swarm Specification
|
|
@@ -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
|
|
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'."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# `dialectical-pump`: Grounded Multi-Persona Deliberation Engine
|
|
@@ -29,17 +29,18 @@ Every turn taken by a persona in the Dialectical Pump must follow the **Empirica
|
|
|
29
29
|
|
|
30
30
|
---
|
|
31
31
|
|
|
32
|
-
## 2. The
|
|
32
|
+
## 2. The Dialectical Stages & Contract Skeleton Ceremony
|
|
33
33
|
|
|
34
|
-
The Dialectical Pump executes across
|
|
34
|
+
The Dialectical Pump executes across five distinct project gates adhering to Option B (`RFD -> RFC -> Contract Skeleton Strand on epic/<slug> -> Implementation Plan -> Parallel Strands`):
|
|
35
35
|
|
|
36
36
|
```mermaid
|
|
37
37
|
flowchart TD
|
|
38
38
|
subgraph DesignPhase["Design Dialectics (Pre-Implementation)"]
|
|
39
|
-
Stage1["Stage 1: Grounded Research (understanding.md + Fact-Check Gate)"]
|
|
39
|
+
Stage1["Stage 1: Grounded Research (understanding.md + Idioms + Fact-Check Gate)"]
|
|
40
40
|
Stage2["Stage 2: Architecture & Design (design.md)"]
|
|
41
41
|
Stage3["Stage 3: Adversarial Design Audit (audit_report.md)"]
|
|
42
|
-
|
|
42
|
+
Stage35["Stage 3.5: Pre-Plan Contract Skeleton Strand on epic/slug"]
|
|
43
|
+
Stage1 --> Stage2 --> Stage3 --> Stage35
|
|
43
44
|
end
|
|
44
45
|
|
|
45
46
|
subgraph ImplementationPhase["Implementation Dialectics (Pre-Weave)"]
|
|
@@ -52,7 +53,7 @@ flowchart TD
|
|
|
52
53
|
Stage4D -.->|"Findings > 0"| Stage4B
|
|
53
54
|
end
|
|
54
55
|
|
|
55
|
-
|
|
56
|
+
Stage35 --> ImplementationPhase
|
|
56
57
|
Stage4D -->|"0 Findings"| Weave["vine weave (Trunk Fast-Forward)"]
|
|
57
58
|
```
|
|
58
59
|
|
|
@@ -72,6 +73,11 @@ Workers read actual files, verify test suites, and map domain structures.
|
|
|
72
73
|
### Step 1.3: Generate Understanding Document (`understanding.md`)
|
|
73
74
|
The triad synthesizes their findings into `understanding.md` containing:
|
|
74
75
|
- Domain Glossary & Invariants.
|
|
76
|
+
- **Existing Codebase Idioms, Type Conventions & Test Patterns**:
|
|
77
|
+
- *Naming Conventions*: Module, type, procedure/function, and variable casing conventions (e.g. `camelCase` procs vs `PascalCase` types in Nim; `snake_case` in Python/Rust; private symbol prefixes).
|
|
78
|
+
- *Error-Handling Styles*: Result types (`Result[T, E]`), optional types (`Option[T]`), error return codes, or language-specific exception hierarchies.
|
|
79
|
+
- *Header, Type & Module Layout*: How public types, constants, interfaces, and exported symbols are structured across files.
|
|
80
|
+
- *Test Harness & Assertion Patterns*: Test runner conventions (`unittest`, `tripwire`, `pytest-tripwire`), golden file strategies, and negative control idioms.
|
|
75
81
|
- Data Flow Diagrams.
|
|
76
82
|
- Identified Constraints & Technical Debt.
|
|
77
83
|
|
|
@@ -89,7 +95,7 @@ Once research is fact-checked, the pump shifts to product and technical design:
|
|
|
89
95
|
|
|
90
96
|
### Step 2.1: The Thesis (Systems Architect)
|
|
91
97
|
The Systems Architect proposes the macro architecture:
|
|
92
|
-
- Module decomposition.
|
|
98
|
+
- Module decomposition adhering to discovered codebase idioms.
|
|
93
99
|
- Data structures and wire formats.
|
|
94
100
|
- Concurrency model and lifecycle states.
|
|
95
101
|
|
|
@@ -102,7 +108,7 @@ The Purist Auditor stress-tests the proposal against concrete failure modes:
|
|
|
102
108
|
### Step 2.3: The Synthesis (DevEx & Implementation Lead)
|
|
103
109
|
The DevEx Lead resolves the dialectic:
|
|
104
110
|
- Eliminates unnecessary abstractions that create ergonomics drag.
|
|
105
|
-
- Hardens the API contracts.
|
|
111
|
+
- Hardens the API contracts: specifies exact public types, headers/interfaces, exported procedure/function signatures, and contract test cases adhering to discovered idioms.
|
|
106
112
|
- Produces the ratified **`design.md`**.
|
|
107
113
|
|
|
108
114
|
---
|
|
@@ -122,6 +128,56 @@ The triad meets to address every finding in `audit_report.md`:
|
|
|
122
128
|
|
|
123
129
|
---
|
|
124
130
|
|
|
131
|
+
## 5.5. Stage 3.5: Pre-Plan Contract Skeleton Strand on `epic/<slug>`
|
|
132
|
+
|
|
133
|
+
Before authoring `implementation_plan.md` and dispatching parallel workers, the Triad commits the idiomatic public contracts, callable stubs, and red contract tests onto the feature integration branch `epic/<slug>`:
|
|
134
|
+
|
|
135
|
+
```mermaid
|
|
136
|
+
sequenceDiagram
|
|
137
|
+
autonumber
|
|
138
|
+
participant A as Architect (Lead)
|
|
139
|
+
participant S as Skeleton Strand (epic/slug)
|
|
140
|
+
participant V as Auditor (Key 3)
|
|
141
|
+
participant P as Implementation Plan (Stage 4)
|
|
142
|
+
|
|
143
|
+
A->>S: vine new task-<slug>-skeleton --parent epic/<slug>
|
|
144
|
+
Note over S: Commit idiomatic types, headers & callable stubs (UNIMPLEMENTED_CONTRACT)
|
|
145
|
+
Note over S: Commit red contract test suites (asserting contract compliance)
|
|
146
|
+
S->>V: vine submit --skeleton (evaluates Keys 1 & 2)
|
|
147
|
+
Note over V: vine audit inspect task-<slug>-skeleton
|
|
148
|
+
V->>S: vine audit approve --ticket <hex> --evidence "<files, types, red tests>"
|
|
149
|
+
Note over S: Lead Orchestrator runs vine weave into epic/<slug>
|
|
150
|
+
S->>P: Stage 4 anchors implementation_plan.md to committed skeleton files & lines
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Step 3.5.1: Provision the Skeleton Strand
|
|
154
|
+
```bash
|
|
155
|
+
vine new task-<slug>-skeleton --parent epic/<slug>
|
|
156
|
+
```
|
|
157
|
+
*Creates the feature integration branch `epic/<slug>` if not already present, isolating foundational contracts from canonical `main`.*
|
|
158
|
+
|
|
159
|
+
### Step 3.5.2: Commit Idiomatic Contracts & Red Stubs
|
|
160
|
+
Inside the strand, the Architect implements:
|
|
161
|
+
1. **Public Types & Interfaces**: Concrete types, enums, structs/objects matching the discovered idioms from Stage 1 and Stage 2.
|
|
162
|
+
2. **Exported Callable Stubs**: Exported procedures/functions that compile cleanly but return an explicit `UNIMPLEMENTED_CONTRACT` defect or error code (or throw a structured `NotImplementedDefect` / exception).
|
|
163
|
+
3. **Red Contract Test Suites**: Rigorous contract tests that call the exported stubs. Under test execution, these tests must run and fail deterministically with `UNIMPLEMENTED_CONTRACT` (proving that tests genuinely invoke the contract and do not pass vacuously).
|
|
164
|
+
|
|
165
|
+
### Step 3.5.3: Submit and Audit the Skeleton Strand
|
|
166
|
+
- The worker executes `vine submit --skeleton` (evaluating Key 1 merge-tree and Key 2 compilation/contract tests).
|
|
167
|
+
- The Adversarial Auditor runs `vine audit inspect task-<slug>-skeleton` to forensic-check type signatures and error semantics against `design.md`.
|
|
168
|
+
- Upon verification, the auditor ratifies Key 3 (evidence-bound approval without weaving):
|
|
169
|
+
```bash
|
|
170
|
+
vine audit approve task-<slug>-skeleton --auditor <auditor_name> --ticket <hex> --evidence "Committed idiomatic types in src/types.nim, stubs in src/api.nim, and red contract tests in tests/test_contract.nim" --listen
|
|
171
|
+
```
|
|
172
|
+
- The Lead Orchestrator then weaves the verified skeleton into `epic/<slug>`:
|
|
173
|
+
```bash
|
|
174
|
+
vine weave
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Proceed to [`plan-implementation`](../plan-implementation/SKILL.md) to author `implementation_plan.md` anchored to the committed skeleton symbols, and spawn parallel worker strands branching off `--parent epic/<slug>`.
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
125
181
|
## 6. Stage 4: Pre-Weave Adversarial Code Audit Pump (The Third Key Gate)
|
|
126
182
|
|
|
127
183
|
Before any strand is woven into canonical trunk (`vine weave`), it must pass the **Adversarial Code Audit Pump**. Passing Key 1 (mechanical merge-tree) and Key 2 (semantic test runner) is necessary but insufficient: tests may be green mirages, and code may be disconnected shelfware or heuristic hand-waves.
|
|
@@ -177,6 +233,7 @@ The Auditor executes the following checks against the Claim Bundle and the stran
|
|
|
177
233
|
#### Pillar 2: Holistic Integration vs. Heuristic Hand-Waves & Hollow Stubs
|
|
178
234
|
- [ ] **Anti-Stub & Anti-Toy Check**: Does the implementation handle real application state, real network/file I/O, and real concurrent events?
|
|
179
235
|
- [ ] **No Hollow Mocks in Production**: Reject artificial `sleep()` calls, hardcoded success responses, or fake test doubles in production paths.
|
|
236
|
+
- [ ] **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`).
|
|
180
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.
|
|
181
238
|
- [ ] **Autonomous Intensive Audit Mandate**: Intensive audits are Standard Operating Procedure (SOP) and pre-authorized. Auditors must execute without requesting operator confirmation or input.
|
|
182
239
|
- [ ] **Brittle String-Split Hacks**: Reject naive string splits (`str.split(" ")[0]`) pretending to parse structured protocols or payloads; compliant lexers/parsers must be used.
|
|
@@ -209,6 +266,15 @@ Assertion Rigor & Anti-Green-Mirage Mandate:
|
|
|
209
266
|
4. Zero Happy-Path-Only Testing: Boundary values (empty, 0, 1, max, unicode, timeout, disconnection) must be explicitly exercised.
|
|
210
267
|
</CRITICAL>
|
|
211
268
|
|
|
269
|
+
#### Contract Immutability & Anti-Drift Invariant
|
|
270
|
+
<CRITICAL>
|
|
271
|
+
Contract Immutability on Feature Integration Branches (`epic/<slug>`):
|
|
272
|
+
When parallel implementation strands branch off `--parent epic/<slug>` following the Stage 3.5 Skeleton Ceremony:
|
|
273
|
+
1. Exported Contract Immutability: Workers MUST NOT alter exported type declarations, procedure/function signatures, error types, or CLI options established in the committed contract skeleton. If an implementation constraint requires modifying an exported signature, the worker MUST NOT unilaterally drift code; it MUST draft a formal `docs/addenda/addendum_<topic>.md` and await Orchestrator ratification.
|
|
274
|
+
2. Contract Test Protection: Workers MUST NOT weaken, disable, comment out, or delete contract tests committed during Stage 3.5. Contract tests define the acceptance criteria; all tests must turn from red to green under genuine production logic.
|
|
275
|
+
3. Anti-Mock-Fallback: If an external dependency or hardware environment cannot be satisfied, workers MUST NOT invent fake fallbacks (e.g. `lesMockFallback`); they MUST halt and report `BLOCKER: MISSING_DEPENDENCY`.
|
|
276
|
+
</CRITICAL>
|
|
277
|
+
|
|
212
278
|
### Step 4.3: The Delta Re-Pump Loop (Iterative until Zero Findings)
|
|
213
279
|
|
|
214
280
|
A single review pass is never sufficient. The Adversarial Code Audit executes as an **iterative dialectical pump**:
|
|
@@ -222,17 +288,18 @@ sequenceDiagram
|
|
|
222
288
|
|
|
223
289
|
Note over W: Worker finishes and runs 'vine submit'
|
|
224
290
|
W->>A: Submit Deliverable Claim Bundle ('vine submit')
|
|
291
|
+
Note over A: Step 4.3.0: Mandatory Inspection ('vine audit inspect <task_id>')
|
|
225
292
|
A->>A: Five-Pillar Presumption-of-Guilt Audit (Antithesis)
|
|
226
293
|
|
|
227
294
|
alt Findings > 0 (CRIT / HIGH / MED)
|
|
228
|
-
A->>G: 'vine audit reject --reason <text>'
|
|
295
|
+
A->>G: 'vine audit reject --ticket <hex> --reason <text>'
|
|
229
296
|
A-->>W: Emit audit_report.md with empirical citations
|
|
230
297
|
Note over W: Worker remediates findings inside Strand
|
|
231
298
|
W->>A: Re-pump: 'vine submit' (Delta Claim Bundle + git diff against last audit commit)
|
|
232
299
|
A->>A: Delta Audit: Verify fix + full test regression sweep
|
|
233
300
|
Note over A,W: Loop repeats until 0 open defects
|
|
234
301
|
else Findings == 0
|
|
235
|
-
A->>G: 'vine audit approve --
|
|
302
|
+
A->>G: 'vine audit approve --ticket <hex>' (Stamps audit_token)
|
|
236
303
|
G->>G: Execute vine weave (Trunk Fast-Forward)
|
|
237
304
|
end
|
|
238
305
|
```
|
|
@@ -240,29 +307,67 @@ sequenceDiagram
|
|
|
240
307
|
> [!CRITICAL]
|
|
241
308
|
> **THE WORKER IS NOT THE AUDITOR**: Workers cannot audit or approve their own strands (`vine audit approve` strictly enforces `auditor != author`). The audit MUST be performed by an independent Adversarial Auditor session.
|
|
242
309
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
310
|
+
#### Key 3 Auditor Discipline, Single-Strand Isolation & Forensic Standards
|
|
311
|
+
|
|
312
|
+
<CRITICAL>
|
|
313
|
+
Auditor Merge-Clerk Decoupling Invariant:
|
|
314
|
+
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.
|
|
315
|
+
</CRITICAL>
|
|
316
|
+
|
|
317
|
+
<CRITICAL>
|
|
318
|
+
Single-Strand Audit Isolation (Anti-Batching Invariant):
|
|
319
|
+
Orchestrators MUST dispatch at most ONE strand per Key 3 audit request. Batching multiple strands into a single audit message (e.g. "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.
|
|
320
|
+
</CRITICAL>
|
|
321
|
+
|
|
322
|
+
<CRITICAL>
|
|
323
|
+
Inverted Approval vs Rejection Effort Gradient (`--evidence` Mandate):
|
|
324
|
+
Rejection is the low-friction fast path whenever ANY doubt, defect, green mirage, or missing negative control exists:
|
|
325
|
+
`vine audit reject <task_id> --auditor <name> --ticket <hex> --reason "<findings>" --listen`
|
|
326
|
+
|
|
327
|
+
Approval is intentionally high-friction and evidence-bound. Running `vine audit approve` strictly requires `--evidence "..."` citing specific changed file basenames, provider->consumer call-sites, and negative control assertions from the diff:
|
|
328
|
+
`vine audit approve <task_id> --auditor <name> --ticket <hex> --evidence "<changed files, provider->consumer call-sites, negative controls>" --listen`
|
|
329
|
+
Passing vague praise or empty justifications without empirical diff citations is mechanically and procedurally rejected.
|
|
330
|
+
</CRITICAL>
|
|
331
|
+
|
|
332
|
+
1. **Mandatory Inspection (`vine audit inspect <task_id>`)**: Before issuing any audit decision (`approve` or `reject`), the Auditor MUST execute `vine audit inspect <task_id>` to inspect the deliverable claim bundle, delivery ticket, strand git diff, and test evidence. Approving an audit blindly without inspection is strictly prohibited.
|
|
333
|
+
2. **Strict Prohibition on `--force` on Approvals**: Auditors MUST NEVER pass `--force` to bypass failing tests, uncommitted dirty files, or mismatched delivery tickets. If verification fails, the auditor MUST reject (`vine audit reject`) back to the worker.
|
|
334
|
+
3. **Auditors Are NOT Release or Merge Clerks**: Auditors are adversarial verifiers of code correctness, NOT administrative clerks.
|
|
335
|
+
- Auditors MUST NEVER edit `ROADMAP.md` or update roadmap statuses on behalf of workers.
|
|
336
|
+
- Auditors MUST NEVER resolve `CHANGELOG.md` or code merge conflicts on behalf of workers.
|
|
337
|
+
- If a strand has merge conflicts or a missing/conflicted changelog entry, the Auditor rejects the deliverable with a defect code (`REJECT: MERGE_CONFLICT` or `REJECT: CHANGELOG_VIOLATION`); the worker must resolve it cleanly inside the strand.
|
|
338
|
+
4. **Defect Issuance**: If defects are discovered, the Auditor runs `vine audit reject <task_id> --auditor <auditor_name> --ticket <hex> --reason "<defects>" --listen` and records findings in `audit_report.md` with defect codes (`CRIT-XX`, `HIGH-XX`, `FIDELITY-XX`, `MIRAGE-XX`), exact file lines, and failure proof.
|
|
339
|
+
5. **In-Strand Remediation**: The worker fixes findings strictly inside the isolated Vine strand.
|
|
340
|
+
6. **The Delta Re-Pump**: When resubmitting with `vine submit` (which generates a refreshed delivery ticket), the auditor audits the **exact delta** (`git diff <audit_commit>...HEAD`) to ensure fixes do not introduce secondary defects, while re-running the full project test suite (`vine gate`) to guarantee no regressions.
|
|
341
|
+
7. **Exit Condition**: The pump loops until **ZERO open defects of severity CRIT, HIGH, or MED remain**, and all low/nit items are resolved or empirically justified.
|
|
247
342
|
|
|
248
343
|
### Step 4.4: Gate Clearance & Cryptographic Token
|
|
249
344
|
|
|
250
|
-
When all findings reach 0, the independent auditor ratifies Key 3:
|
|
345
|
+
When all findings reach 0, the independent auditor ratifies Key 3 (evidence-bound approval, with `--weave` removed):
|
|
251
346
|
```bash
|
|
252
|
-
|
|
347
|
+
# 1. Mandatory inspection
|
|
348
|
+
vine audit inspect <task_id>
|
|
349
|
+
|
|
350
|
+
# 2. Ratify Key 3 with empirical evidence citations (Auditor NEVER runs --weave):
|
|
351
|
+
vine audit approve <task_id> --auditor <auditor_name> --ticket <hex> --evidence "Provider in src/provider.nim, Consumer in src/consumer.nim:42, negative control in tests/test_cases.nim:88" --listen
|
|
253
352
|
```
|
|
254
|
-
This mechanically verifies Keys 1 & 2, checks that the strand has zero uncommitted changes, ensures `auditor != author`, and stamps a cryptographic `audit_token
|
|
353
|
+
This mechanically verifies Keys 1 & 2 against the delivery ticket, checks that the strand has zero uncommitted changes, ensures `auditor != author`, verifies that `--evidence` is provided, and stamps a cryptographic `audit_token`. Vine stores strand identity in `.git/config` (`vine.taskId`, `vine.project`) and authoritative state in Redis (zero on-disk state files).
|
|
255
354
|
|
|
256
|
-
Only strands in `AUDIT_RATIFIED` state with a valid cryptographic audit token are permitted to weave into trunk
|
|
355
|
+
Only strands in `AUDIT_RATIFIED` state with a valid cryptographic audit token are permitted to weave into trunk. **The Lead Orchestrator then executes trunk weaving**:
|
|
356
|
+
```bash
|
|
357
|
+
# Executed by Lead Orchestrator upon receiving Key 3 ratification:
|
|
358
|
+
vine weave
|
|
359
|
+
```
|
|
360
|
+
*(This automatically invokes `rhizo task complete` and promotes downstream DAG child tasks from `BLOCKED` to `QUEUED`).*
|
|
257
361
|
|
|
258
362
|
---
|
|
259
363
|
|
|
260
364
|
## 7. Output Artifacts
|
|
261
365
|
|
|
262
366
|
At the conclusion of the Dialectical Pump:
|
|
263
|
-
1. `understanding.md` (Stage 1: Grounded and fact-checked).
|
|
264
|
-
2. `design.md` (Stage 2: Debated, hardened, and synthesized).
|
|
367
|
+
1. `understanding.md` (Stage 1: Grounded, idioms extracted, and fact-checked).
|
|
368
|
+
2. `design.md` (Stage 2: Debated, hardened, and synthesized with idiomatic types & interfaces).
|
|
265
369
|
3. `design_audit_report.md` (Stage 3: Design findings addressed and closed).
|
|
266
|
-
4. `
|
|
370
|
+
4. **Committed Contract Skeleton & Red Tests on `epic/<slug>`** (Stage 3.5: Public types, callable stubs with `UNIMPLEMENTED_CONTRACT`, and red contract test suites).
|
|
371
|
+
5. `code_audit_report.md` (Stage 4: Pre-weave Five-Pillar audit cleared with 0 open defects under Contract Immutability).
|
|
267
372
|
|
|
268
373
|
Proceed to [`orchestrate-swarm`](../orchestrate-swarm/SKILL.md) for trunk weaving.
|