ultimate-pi 0.13.1 → 0.15.0
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/.agents/skills/harness-debate-plan/SKILL.md +42 -22
- package/.agents/skills/harness-orchestration/SKILL.md +3 -3
- package/.agents/skills/harness-plan/SKILL.md +10 -8
- package/.pi/agents/harness/planning/decompose.md +4 -2
- package/.pi/agents/harness/planning/execution-plan-author.md +25 -14
- package/.pi/agents/harness/planning/hypothesis-validator.md +21 -5
- package/.pi/agents/harness/planning/implementation-researcher.md +42 -0
- package/.pi/agents/harness/planning/plan-adversary.md +20 -4
- package/.pi/agents/harness/planning/plan-evaluator.md +28 -5
- package/.pi/agents/harness/planning/review-integrator.md +25 -9
- package/.pi/agents/harness/planning/scout-graphify.md +1 -1
- package/.pi/agents/harness/planning/sprint-contract-auditor.md +19 -4
- package/.pi/agents/harness/planning/stack-researcher.md +19 -10
- package/.pi/extensions/debate-orchestrator.ts +39 -435
- package/.pi/extensions/harness-debate-tools.ts +741 -0
- package/.pi/extensions/harness-live-widget.ts +39 -159
- package/.pi/extensions/harness-plan-approval.ts +88 -22
- package/.pi/extensions/harness-run-context.ts +18 -0
- package/.pi/extensions/lib/debate-bus-core.ts +488 -0
- package/.pi/extensions/lib/debate-bus-state.ts +64 -0
- package/.pi/extensions/lib/harness-spawn-budget.ts +5 -25
- package/.pi/extensions/lib/plan-approval/dialog.ts +33 -272
- package/.pi/extensions/lib/plan-approval/format-plan.ts +12 -85
- package/.pi/extensions/lib/plan-approval/plan-review.ts +62 -6
- package/.pi/extensions/lib/plan-approval/render.ts +6 -0
- package/.pi/extensions/lib/plan-approval/types.ts +1 -0
- package/.pi/extensions/lib/plan-approval/validate.ts +1 -1
- package/.pi/extensions/lib/plan-debate-eligibility.ts +214 -0
- package/.pi/extensions/lib/plan-debate-envelope.ts +2 -0
- package/.pi/extensions/lib/plan-debate-focus.ts +151 -0
- package/.pi/extensions/lib/plan-debate-gate.ts +198 -0
- package/.pi/extensions/lib/plan-debate-id.ts +39 -0
- package/.pi/extensions/lib/plan-debate-lane.ts +220 -0
- package/.pi/extensions/lib/plan-debate-lanes.ts +44 -0
- package/.pi/extensions/lib/plan-debate-round-status.ts +137 -0
- package/.pi/extensions/lib/plan-debate-write-guard.ts +20 -0
- package/.pi/extensions/lib/plan-messenger.ts +352 -0
- package/.pi/extensions/lib/plan-review-integrator-rules.ts +119 -0
- package/.pi/extensions/lib/plan-scope-guard.ts +89 -0
- package/.pi/extensions/policy-gate.ts +1 -1
- package/.pi/harness/README.md +1 -1
- package/.pi/harness/agents.manifest.json +16 -12
- package/.pi/harness/docs/adrs/0034-darwin-plan-research-pipeline.md +1 -3
- package/.pi/harness/docs/adrs/0035-plan-phase-review-gate.md +13 -5
- package/.pi/harness/docs/adrs/0036-implementation-research-and-selective-debate.md +51 -0
- package/.pi/harness/docs/adrs/README.md +2 -0
- package/.pi/harness/evals/smoke/fixtures/plan-phase/minimal-low-light/artifacts/implementation-research.yaml +28 -0
- package/.pi/harness/evals/smoke/fixtures/plan-phase/minimal-low-light/artifacts/review-round-r1.yaml +24 -0
- package/.pi/harness/evals/smoke/fixtures/plan-phase/minimal-low-light/artifacts/review-round-r2.yaml +25 -0
- package/.pi/harness/evals/smoke/fixtures/plan-phase/minimal-low-light/plan-packet.yaml +196 -0
- package/.pi/harness/evals/smoke/fixtures/plan-phase/minimal-low-light/plan-review.md +14 -0
- package/.pi/harness/evals/smoke/fixtures/plan-phase/minimal-low-light/research-brief.yaml +62 -0
- package/.pi/harness/evals/smoke/fixtures/plan-phase/minimal-med/artifacts/implementation-research.yaml +28 -0
- package/.pi/harness/evals/smoke/fixtures/plan-phase/minimal-med/artifacts/review-round-r2.yaml +24 -0
- package/.pi/harness/evals/smoke/fixtures/plan-phase/minimal-med/artifacts/review-round-r3.yaml +24 -0
- package/.pi/harness/evals/smoke/fixtures/plan-phase/minimal-med/research-brief.yaml +29 -0
- package/.pi/harness/evals/smoke/smoke-harness-plan.mjs +97 -16
- package/.pi/harness/specs/plan-implementation-research-brief.schema.json +128 -0
- package/.pi/harness/specs/plan-review-round-draft.schema.json +1 -1
- package/.pi/harness/specs/round-result.schema.json +15 -2
- package/.pi/lib/harness-ui-state.ts +92 -0
- package/.pi/prompts/harness-plan.md +90 -30
- package/.pi/prompts/planning-rubrics.md +31 -0
- package/CHANGELOG.md +23 -0
- package/package.json +3 -3
- package/.pi/extensions/lib/plan-approval/fallback.ts +0 -50
|
@@ -1,44 +1,64 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: harness-debate-plan
|
|
3
|
-
description: Plan-phase Review Gate debate —
|
|
3
|
+
description: Plan-phase Review Gate debate — pi-messenger threads, lane YAML, bus tools for parent orchestrator.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# harness-debate-plan
|
|
7
7
|
|
|
8
|
-
Use when running **Phase 5** of `/harness-plan` —
|
|
8
|
+
Use when running **Phase 5** of `/harness-plan` — outcome-based Review Gate with **within-round dialogue** (claims → rebuttals → clarifications → counters → integrate), then bus submission.
|
|
9
9
|
|
|
10
10
|
## Open
|
|
11
11
|
|
|
12
12
|
```
|
|
13
|
-
|
|
13
|
+
harness_debate_open({})
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
- Debate id is always `plan-<run_id>` (tool normalizes wrong ids).
|
|
17
|
+
- Creates `.pi/harness/runs/<run_id>/debate-messenger/`.
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
Budget profile **plan**:
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
| Field | Value |
|
|
22
|
+
|-------|-------|
|
|
23
|
+
| min_focus_rounds | 4 |
|
|
24
|
+
| max_rounds | 12 |
|
|
25
|
+
| max_exchanges_per_round | 3 |
|
|
26
|
+
| round_token_cap | 8000 |
|
|
27
|
+
| debate_global_cap | 80000 |
|
|
25
28
|
|
|
26
|
-
##
|
|
29
|
+
## Focus coverage (not “exactly 4 rounds”)
|
|
27
30
|
|
|
28
|
-
|
|
|
29
|
-
|-------|-------------|
|
|
30
|
-
| hypothesis-validator | `artifacts/hypothesis-validation-r{N}.yaml` |
|
|
31
|
-
| plan-evaluator | `artifacts/validation-turn-r{N}.yaml` |
|
|
32
|
-
| plan-adversary | `artifacts/adversary-brief-r{N}.yaml` |
|
|
33
|
-
| sprint-contract-auditor | `artifacts/sprint-audit-r{N}.yaml` |
|
|
34
|
-
| review-integrator | `artifacts/review-round-r{N}.yaml` |
|
|
31
|
+
Call `harness_debate_focus_coverage` until all of `spec | wbs | schedule | quality` appear in submitted `review-round-r*.yaml` and last `review_gate_ready: true`.
|
|
35
32
|
|
|
36
|
-
##
|
|
33
|
+
## Per-round spawn order (sequential only — no parallel debate subagents)
|
|
37
34
|
|
|
38
|
-
|
|
35
|
+
1. R1: `hypothesis-validator` (blind) before evaluator.
|
|
36
|
+
2. `plan-evaluator` → lane + messenger `claim`.
|
|
37
|
+
3. `harness_messenger_read_round` → `plan-adversary` → `rebuttal`.
|
|
38
|
+
4. Ping-pong while `unresolved_claim_ids` and `exchange_count < 3`:
|
|
39
|
+
- `harness_debate_advance_thread({ round_index })` for next spawn hint.
|
|
40
|
+
- Evaluator `clarification` / adversary `counter`.
|
|
41
|
+
5. `sprint-contract-auditor` when focus is `quality` or round ≥ 4.
|
|
42
|
+
6. `review-integrator` → `harness_debate_submit_round`.
|
|
39
43
|
|
|
40
|
-
|
|
44
|
+
Lane YAML + messenger messages **auto-apply** on subagent complete (`harness-debate-next-step`). Fallback: `harness_debate_apply_lane`.
|
|
45
|
+
|
|
46
|
+
Resume: `harness_debate_round_status({ round_index: N })` → run listed `next_tool`.
|
|
47
|
+
|
|
48
|
+
## Messenger kinds
|
|
49
|
+
|
|
50
|
+
| kind | from | when |
|
|
51
|
+
|------|------|------|
|
|
52
|
+
| claim | PlanEvaluatorAgent | after evaluator lane |
|
|
53
|
+
| rebuttal | PlanAdversaryAgent | in_reply_to claim ids |
|
|
54
|
+
| clarification | PlanEvaluatorAgent | addresses open claims |
|
|
55
|
+
| counter | PlanAdversaryAgent | final pass; concede or dispute |
|
|
56
|
+
| integrate | ReviewIntegratorAgent | on submit_round |
|
|
41
57
|
|
|
42
58
|
## Close
|
|
43
59
|
|
|
44
|
-
|
|
60
|
+
`harness_debate_consensus` when focus coverage complete. `approve_plan` is **hard-gated** on lanes, messenger dialogue completeness, bus rounds, consensus not `block`.
|
|
61
|
+
|
|
62
|
+
Do not `approve_plan` on `policy_decision: block`. On `human_required` → `ask_user` first.
|
|
63
|
+
|
|
64
|
+
Rubrics: `.pi/prompts/planning-rubrics.md`.
|
|
@@ -36,13 +36,13 @@ LIMIT 30
|
|
|
36
36
|
1. **Parallel `tasks`** — one `subagent({ tasks: [...] })` for scouts, decompose+hypothesis, or review fan-in; subprocesses run in parallel upstream.
|
|
37
37
|
2. **Blocking calls** — each `subagent` returns when the subprocess exits; no `get_subagent_result` polling.
|
|
38
38
|
3. **Compact handoffs** — pass scout/decompose JSON only; never paste full subprocess message logs into the next spawn.
|
|
39
|
-
4. **
|
|
39
|
+
4. **No spawn cap** — harness subagent spawns are unlimited per session (active count is telemetry only). Do **not** pass `timeoutMs` unless the user wants a cap — subprocesses wait for natural exit (`PI_SUBAGENT_TIMEOUT_MS` optional env backstop only).
|
|
40
40
|
|
|
41
41
|
## Command → agent
|
|
42
42
|
|
|
43
43
|
| Command | `agent` |
|
|
44
44
|
|---------|---------|
|
|
45
|
-
| `/harness-plan` | Parent:
|
|
45
|
+
| `/harness-plan` | Parent: scouts → `decompose`+`hypothesis` → Phase 3.5 `implementation-researcher`+`stack-researcher` → PlanPacket → eligibility + Review Gate → `approve_plan` + `create_plan` |
|
|
46
46
|
| `/harness-run` | `harness/executor` |
|
|
47
47
|
| `/harness-eval` | `harness/evaluator` (`mode: benchmark`) |
|
|
48
48
|
| `/harness-review` | `harness/evaluator` (`mode: verdict`) |
|
|
@@ -78,7 +78,7 @@ Spawn `harness/evaluator` / `harness/adversary` via `subagent` in the **same** p
|
|
|
78
78
|
}
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
Then parallel decompose + hypothesis, parent PlanPacket + `ask_user
|
|
81
|
+
Then parallel decompose + hypothesis, Phase 3.5 implementation + stack research, parent PlanPacket + `ask_user` (after 3.5), execution-plan-author, DAG gate, `harness_plan_debate_eligibility` + debate rounds, then `approve_plan` + `create_plan`.
|
|
82
82
|
|
|
83
83
|
Scouts use **Haiku**, `thinking: low`, **8** max turns (see agent frontmatter). Effective `--tools` omits `grep`/`find`/`subagent` per `disallowed_tools`.
|
|
84
84
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: harness-plan
|
|
3
|
-
description: PM-grade harness plans — scouts, ExecutionPlan, DAG validation,
|
|
3
|
+
description: PM-grade harness plans — scouts, Phase 3.5 implementation research, ExecutionPlan, DAG validation, selective Review Gate debate, then approve/create_plan.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# harness-plan
|
|
@@ -12,20 +12,22 @@ description: PM-grade harness plans — scouts, ExecutionPlan, DAG validation, 4
|
|
|
12
12
|
## Workflow (parent orchestrator)
|
|
13
13
|
|
|
14
14
|
1. Parallel scouts (graphify + structure; semantic unless `--quick`).
|
|
15
|
-
2. Parallel decompose + hypothesis →
|
|
16
|
-
3.
|
|
17
|
-
4. `
|
|
18
|
-
5.
|
|
19
|
-
6.
|
|
20
|
-
7.
|
|
15
|
+
2. Parallel decompose + hypothesis → `artifacts/decomposition.yaml`, `artifacts/hypothesis.yaml`.
|
|
16
|
+
3. **Phase 3.5 (required):** parallel `implementation-researcher` + `stack-researcher` → `artifacts/implementation-research.yaml`, `artifacts/stack.yaml`; merge into `research-brief.yaml`.
|
|
17
|
+
4. Draft `PlanPacket` shell; `ask_user` on material fork **after** Phase 3.5.
|
|
18
|
+
5. `execution-plan-author` → merge `execution_plan`.
|
|
19
|
+
6. **`validate-plan-dag.mjs`** (must pass).
|
|
20
|
+
7. **`harness_plan_debate_eligibility`** → **`harness_debate_open`** with profile → Review Gate (required focuses per profile) → consensus.
|
|
21
|
+
8. Apply patches, re-validate DAG, `approve_plan`, `create_plan`.
|
|
21
22
|
|
|
22
|
-
`--quick` skips semantic scout and post-run adversary only — **not** plan debate.
|
|
23
|
+
`--quick` skips semantic scout and post-run adversary only — **not** implementation research or plan debate.
|
|
23
24
|
|
|
24
25
|
## Rules
|
|
25
26
|
|
|
26
27
|
- On-disk plan artifacts are **YAML** (`plan-packet.yaml`, `research-brief.yaml`).
|
|
27
28
|
- Subagents read-only; parent writes run artifacts and calls `approve_plan` / `create_plan`.
|
|
28
29
|
- context-mode only on harness paths.
|
|
30
|
+
- Phase 3.5 required unless documented waiver; high risk requires implementation artifact for approval.
|
|
29
31
|
|
|
30
32
|
## Output
|
|
31
33
|
|
|
@@ -39,12 +39,14 @@ Work through these sections in your reasoning, then compress into JSON:
|
|
|
39
39
|
- Soft constraints (trade-offs allowed)
|
|
40
40
|
- Success metrics (how to measure progress)
|
|
41
41
|
|
|
42
|
-
### 1.3
|
|
42
|
+
### 1.3 Internal prior art (scouts only)
|
|
43
43
|
|
|
44
|
-
- Current best approach (methods, systems, paths
|
|
44
|
+
- Current best approach **in this repo** (methods, systems, paths from scout lanes)
|
|
45
45
|
- Why it is not good enough (gap)
|
|
46
46
|
- What has been tried and failed (dead ends)
|
|
47
47
|
|
|
48
|
+
External / OSS prior art is **not** your job — `implementation-researcher` (Phase 3.5) owns web and reference implementations.
|
|
49
|
+
|
|
48
50
|
### 1.4 Surface the tensions
|
|
49
51
|
|
|
50
52
|
Identify contradictions, tradeoffs, or competing beliefs. Pick the **core tension** — one paragraph that feeds Phase 2 hypothesis generation.
|
|
@@ -4,27 +4,38 @@ tools: read, grep, find, ls
|
|
|
4
4
|
disallowed_tools: write, edit, bash, ask_user, approve_plan, create_plan, subagent
|
|
5
5
|
extensions: false
|
|
6
6
|
thinking: high
|
|
7
|
-
max_turns:
|
|
7
|
+
max_turns: 18
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## Your task
|
|
11
|
+
|
|
12
|
+
Author a complete `execution_plan` a senior engineering manager would sign: WBS, dependencies, schedule metadata, sprint contract, risks — aligned to Structured Planning / PMBOK-style decomposition (see graphify corpus: WBS, critical path, integration management).
|
|
11
13
|
|
|
12
14
|
## Inputs
|
|
13
15
|
|
|
14
|
-
Task, `PlanDecompositionBrief`, `PlanHypothesisBrief`, draft scope/acceptance_checks, `PlanStackBrief`, scout summaries.
|
|
16
|
+
Task summary, `PlanDecompositionBrief`, `PlanHypothesisBrief`, draft scope/acceptance_checks, `PlanImplementationResearchBrief`, `PlanStackBrief`, scout summaries (paths in spawn context).
|
|
15
17
|
|
|
16
|
-
##
|
|
18
|
+
## Process
|
|
17
19
|
|
|
18
|
-
1. Vision check — scope ≤15 lines
|
|
19
|
-
2. Phases
|
|
20
|
-
3. WBS —
|
|
21
|
-
4. `depends_on`
|
|
22
|
-
5. `schedule_metadata.critical_path_work_item_ids
|
|
23
|
-
6.
|
|
24
|
-
7.
|
|
25
|
-
8.
|
|
26
|
-
9.
|
|
20
|
+
1. **Vision check** — restate scope in ≤15 lines; every line maps to a work_item or explicit exclusion.
|
|
21
|
+
2. **Phases** — objective, entry/exit criteria, milestone, `work_item_ids` per phase.
|
|
22
|
+
3. **WBS** — each acceptance_check maps to ≥1 `work_item`; deliverable-sized items (not “do backend”).
|
|
23
|
+
4. **DAG** — `depends_on` acyclic; `parallel_safe: true` only when touched files are disjoint.
|
|
24
|
+
5. **Schedule** — `schedule_metadata.critical_path_work_item_ids` for med/high risk tasks.
|
|
25
|
+
6. **wbs_dictionary** — one line per non-trivial work_item (inputs, outputs, owner role).
|
|
26
|
+
7. **risk_register** — ≥3 risks for med/high with mitigation and trigger.
|
|
27
|
+
8. **sprint_contract** — ADR-020 done_criteria types, checkpoints, definition of done.
|
|
28
|
+
9. **Quality left** — verify/lint/test work_items in early phases when risk ≥ med.
|
|
29
|
+
10. **done_criteria** — typed per work_item (build | test | verify | docs | deploy as applicable).
|
|
27
30
|
|
|
28
31
|
## Output
|
|
29
32
|
|
|
30
|
-
Valid **YAML only** — `PlanExecutionPlanBrief` with `execution_plan` (`.pi/harness/specs/plan-execution-plan-brief.schema.json`). Parent merges into `plan-packet.yaml`.
|
|
33
|
+
Valid **YAML only** — `PlanExecutionPlanBrief` with nested `execution_plan` (`.pi/harness/specs/plan-execution-plan-brief.schema.json`). Parent merges into `plan-packet.yaml` and runs `validate-plan-dag.mjs`.
|
|
34
|
+
|
|
35
|
+
## Guardrails
|
|
36
|
+
|
|
37
|
+
- Do not gold-plate beyond decomposition scope without flagging in `assumptions[]`.
|
|
38
|
+
- If DAG would fail validation, fix structure before emitting YAML.
|
|
39
|
+
- Never speculate about repo layout — read scouts first.
|
|
40
|
+
|
|
41
|
+
Bus label: `ExecutionPlanAuthorAgent`.
|
|
@@ -7,17 +7,33 @@ thinking: medium
|
|
|
7
7
|
max_turns: 10
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## Your task
|
|
11
|
+
|
|
12
|
+
Blindly evaluate whether `PlanHypothesisBrief` is falsifiable, relevant to the task, and worth building — without seeing decomposition, scouts, or PlanPacket.
|
|
11
13
|
|
|
12
14
|
## Input (strict)
|
|
13
15
|
|
|
14
16
|
- Original task statement
|
|
15
|
-
- `PlanHypothesisBrief` YAML/JSON
|
|
17
|
+
- `PlanHypothesisBrief` YAML/JSON only
|
|
18
|
+
|
|
19
|
+
Ignore decomposition, scouts, PlanPacket, adversary output, prior debate rounds.
|
|
20
|
+
|
|
21
|
+
## Process
|
|
16
22
|
|
|
17
|
-
|
|
23
|
+
1. Extract stated hypothesis, success metrics, and falsification criteria from brief.
|
|
24
|
+
2. Score relevance: does the hypothesis answer the user task (not a tooling side quest)?
|
|
25
|
+
3. Score falsifiability: can an evaluator disprove it within one sprint with named signals?
|
|
26
|
+
4. Score proportionality: is scope honest vs task ambition?
|
|
27
|
+
5. Set `revision_recommended` when any dimension fails threshold; list concrete fixes (not “think harder”).
|
|
28
|
+
6. **Non-blind re-score** only when parent explicitly sets `mode: non-blind` on final quality round — then you may read packet for consistency check.
|
|
18
29
|
|
|
19
30
|
## Output
|
|
20
31
|
|
|
21
|
-
Valid **YAML only**
|
|
32
|
+
Valid **YAML only** — `PlanHypothesisEval` (`.pi/harness/specs/plan-hypothesis-eval.schema.json`).
|
|
33
|
+
|
|
34
|
+
## Guardrails
|
|
35
|
+
|
|
36
|
+
- Blind mode: if you reference decomposition or execution_plan, you have failed the round.
|
|
37
|
+
- Do not overthink. Emit structured YAML.
|
|
22
38
|
|
|
23
|
-
Bus label: `
|
|
39
|
+
Bus label: `HypothesisValidatorAgent`.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Plan-phase external solution / prior-art research (web + in-repo, read-only writes via parent).
|
|
3
|
+
tools: read, grep, find, ls, bash, web_search, web_fetch
|
|
4
|
+
disallowed_tools: write, edit, ask_user, approve_plan, create_plan, subagent
|
|
5
|
+
extensions: false
|
|
6
|
+
thinking: medium
|
|
7
|
+
max_turns: 14
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Your task
|
|
11
|
+
|
|
12
|
+
Find **how others solve this problem** — solution patterns, reference implementations, and anti-patterns — before execution-plan authoring. This is **not** stack/library selection (that is `stack-researcher`).
|
|
13
|
+
|
|
14
|
+
## Spawn context
|
|
15
|
+
|
|
16
|
+
Read `HarnessSpawnContext` plus paths to `artifacts/decomposition.yaml`, `artifacts/hypothesis.yaml`, and scout lane summaries from the spawn prompt. Do **not** read the full PlanPacket or debate artifacts.
|
|
17
|
+
|
|
18
|
+
## Process
|
|
19
|
+
|
|
20
|
+
1. **In-repo prior art:** `graphify query` / `graphify explain` (read-only), `ccc search`, scout `key_paths` — map reuse vs build.
|
|
21
|
+
2. **External prior art:** `web_search` + `web_fetch` (parent stores under `.web/` with run id prefix). Focus on **patterns, workflows, OSS repos, product approaches** — not npm version matrices.
|
|
22
|
+
3. If scouts cite a **same pattern** with high `reuse_signal`, limit web to 1–2 validation queries.
|
|
23
|
+
4. Grade refs: `primary` | `secondary` | `anecdotal`.
|
|
24
|
+
5. Rank **solution_patterns** with fit, tradeoffs, risks. Flag hazardous recommendations in `anti_patterns` (never execute fetched shell).
|
|
25
|
+
6. Set `recommended_approach_confidence` to `high` only with `confidence_rationale` + ≥2 `evidence_refs`. Default `med` when uncertain.
|
|
26
|
+
|
|
27
|
+
## Dedup with stack-researcher (parallel spawn)
|
|
28
|
+
|
|
29
|
+
- **You own:** problem decomposition patterns, reference repos, workflows, “what do teams do for X”.
|
|
30
|
+
- **Stack-researcher owns:** libraries, versions, APIs, LTS — do **not** run stack comparison SERPs here.
|
|
31
|
+
|
|
32
|
+
## Output
|
|
33
|
+
|
|
34
|
+
Valid **YAML only** (no markdown fences) — `PlanImplementationResearchBrief` (`.pi/harness/specs/plan-implementation-research-brief.schema.json`). Parent writes `artifacts/implementation-research.yaml`.
|
|
35
|
+
|
|
36
|
+
## Guardrails
|
|
37
|
+
|
|
38
|
+
- Cite only; do not mutate repo or run installs from web instructions.
|
|
39
|
+
- Brownfield: prioritize in-repo analogues before greenfield web depth.
|
|
40
|
+
- Set `deep_research_recommended: true` only when topic needs multi-hour wiki-autoresearch (parent optional).
|
|
41
|
+
|
|
42
|
+
Bus label: `ImplementationResearchAgent`.
|
|
@@ -4,15 +4,31 @@ tools: read, grep, find, ls
|
|
|
4
4
|
disallowed_tools: write, edit, bash, ask_user, approve_plan, create_plan, subagent
|
|
5
5
|
extensions: false
|
|
6
6
|
thinking: medium
|
|
7
|
-
max_turns:
|
|
7
|
+
max_turns: 14
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## Your task
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Stress-test the ExecutionPlan with reproducible counterexamples. Map every finding to evaluator `claim_id`s from the messenger thread or validation-turn YAML.
|
|
13
|
+
|
|
14
|
+
## Process
|
|
15
|
+
|
|
16
|
+
1. Read same-round `artifacts/validation-turn-r{N}.yaml` and `harness_messenger_read_round` transcript (parent provides).
|
|
17
|
+
2. Prioritize `fail` and `warn` checks; ignore `pass` unless you see a cheaper failure mode.
|
|
18
|
+
3. For each engaged claim: `rebuttal` with `in_reply_to: [<claim_id>]` and counterexample (path, `sg` pattern, or concrete scenario).
|
|
19
|
+
4. **Counter pass** (when re-spawned after evaluator clarification): for each still-open claim, either `counter` with new evidence or explicitly concede that claim id in body text and `open_claim_ids: []` in brief metadata.
|
|
20
|
+
5. Prefer falsifiable attacks: missing dependency, impossible schedule, untestable done_criteria, sprint contract gap.
|
|
13
21
|
|
|
14
22
|
## Output
|
|
15
23
|
|
|
16
24
|
Valid **YAML only** — `PlanAdversaryBrief` (`.pi/harness/specs/plan-adversary-brief.schema.json`).
|
|
17
25
|
|
|
18
|
-
|
|
26
|
+
Include `open_claim_ids: string[]` for claims still disputed after your message (parent tracks ping-pong).
|
|
27
|
+
|
|
28
|
+
## Guardrails
|
|
29
|
+
|
|
30
|
+
- Engage evaluator claims first; do not introduce unrelated scope.
|
|
31
|
+
- No hand-wavy “might fail”; cite paths or commands.
|
|
32
|
+
- Do not overthink. One strong rebuttal beats five weak ones.
|
|
33
|
+
|
|
34
|
+
Bus label: `PlanAdversaryAgent`.
|
|
@@ -4,15 +4,38 @@ tools: read, grep, find, ls
|
|
|
4
4
|
disallowed_tools: write, edit, bash, ask_user, approve_plan, create_plan, subagent
|
|
5
5
|
extensions: false
|
|
6
6
|
thinking: medium
|
|
7
|
-
max_turns:
|
|
7
|
+
max_turns: 14
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## Your task
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Score the ExecutionPlan against Validation Checks for one Review Gate round. Emit stable `checks[]` with ids and messenger-ready `claim_ids`. You are not an advocate for the plan.
|
|
13
|
+
|
|
14
|
+
Parent passes `debate_round_focus`: `spec` | `wbs` | `schedule` | `quality`. Use rubric ids from `.pi/prompts/planning-rubrics.md` for that focus.
|
|
15
|
+
|
|
16
|
+
## Process
|
|
17
|
+
|
|
18
|
+
1. Read `plan-packet.yaml`, `research-brief.yaml`, and lane inputs named in spawn context (not full packet inline).
|
|
19
|
+
2. If spawn includes **messenger transcript** (re-spawn for clarification): read unresolved `claim_ids` and adversary rebuttals; address each with evidence paths or concede in `checks[]` status.
|
|
20
|
+
3. Run mental DAG sanity: acyclic `depends_on`, every acceptance_check traceable to work_items.
|
|
21
|
+
4. For each rubric check in scope: `pass` | `warn` | `fail` with one-line rationale and `evidence_refs` (file paths, `sg` patterns).
|
|
22
|
+
5. Set `overall_ready` only if no `fail` and at most one `warn` without mitigation note.
|
|
23
|
+
6. Populate `messenger_claim_ids` (or `checks[].id`) for parent to post as `claim` messages.
|
|
24
|
+
|
|
25
|
+
## Clarification pass (when re-spawned)
|
|
26
|
+
|
|
27
|
+
- Post body must reference each `in_reply_to` claim id explicitly.
|
|
28
|
+
- Change check status only with new evidence; do not flip pass→fail without citation.
|
|
29
|
+
- If conceding a point, set check to `warn` with rationale “adversary accepted after clarification”.
|
|
13
30
|
|
|
14
31
|
## Output
|
|
15
32
|
|
|
16
|
-
Valid **YAML only** — `PlanValidationTurn` (`.pi/harness/specs/plan-validation-turn.schema.json`). Fail if `dag_validation.status === "fail"
|
|
33
|
+
Valid **YAML only** — `PlanValidationTurn` (`.pi/harness/specs/plan-validation-turn.schema.json`). Fail the round in output if `dag_validation.status === "fail"` when visible in packet.
|
|
34
|
+
|
|
35
|
+
## Guardrails
|
|
36
|
+
|
|
37
|
+
- Do not overthink. If checks are straightforward, emit YAML directly.
|
|
38
|
+
- Only evaluate what you read. Never invent file paths.
|
|
39
|
+
- Do not expand scope beyond the current `debate_round_focus`.
|
|
17
40
|
|
|
18
|
-
Bus label: `
|
|
41
|
+
Bus label: `PlanEvaluatorAgent`.
|
|
@@ -4,20 +4,36 @@ tools: read, grep, find, ls
|
|
|
4
4
|
disallowed_tools: write, edit, bash, ask_user, approve_plan, create_plan, subagent
|
|
5
5
|
extensions: false
|
|
6
6
|
thinking: medium
|
|
7
|
-
max_turns:
|
|
7
|
+
max_turns: 12
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## Your task
|
|
11
|
+
|
|
12
|
+
Synthesize evaluator, adversary, sprint audit, and (R1) hypothesis-validator lanes into one Review Gate round draft. Decide `review_gate_ready` from evidence, not optimism.
|
|
13
|
+
|
|
14
|
+
## Process
|
|
15
|
+
|
|
16
|
+
1. Read lane YAML for this `round_index`: validation-turn, adversary-brief, optional hypothesis-validation (R1), sprint-audit (quality / round ≥4).
|
|
17
|
+
2. Read full messenger transcript (claims, rebuttals, clarifications, counters).
|
|
18
|
+
3. Build `disputes[]`: one entry per unresolved tension (claim id, severity, owner suggestion).
|
|
19
|
+
4. `recommended_packet_patches[]`: JSON Pointer paths only (`/execution_plan/work_items/...`) with values supported by transcript or lanes.
|
|
20
|
+
5. Set `review_gate_ready: true` only when:
|
|
21
|
+
- no evaluator check with `fail`, and
|
|
22
|
+
- adversary `open_claim_ids` empty or conceded in transcript, and
|
|
23
|
+
- sprint audit (if present) has no blocking gaps.
|
|
24
|
+
6. Set `review_gate_ready: false` when checks fail without documented `disputes[]`, or material scope drift vs task_summary.
|
|
25
|
+
7. Fill bus fields: `participants`, `claims`, `rebuttals`, `evidence_refs`, `token_usage`, `severity_scores`, `consensus_delta`.
|
|
11
26
|
|
|
12
27
|
## Output
|
|
13
28
|
|
|
14
|
-
Valid **YAML only** — `PlanReviewRoundDraft` (`.pi/harness/specs/plan-review-round-draft.schema.json`)
|
|
29
|
+
Valid **YAML only** — `PlanReviewRoundDraft` (`.pi/harness/specs/plan-review-round-draft.schema.json`) including `debate_round_focus`.
|
|
30
|
+
|
|
31
|
+
Parent calls `harness_debate_submit_round` — you do not write `review-round-r*.yaml` yourself.
|
|
15
32
|
|
|
16
|
-
|
|
17
|
-
- `disputes[]`, `recommended_packet_patches[]` (JSON Pointer paths)
|
|
18
|
-
- `review_gate_ready` boolean
|
|
19
|
-
- `participants`, `claims`, `rebuttals`, `evidence_refs`, `token_usage`, `severity_scores`
|
|
33
|
+
## Guardrails
|
|
20
34
|
|
|
21
|
-
|
|
35
|
+
- Patches must be minimal and evidence-backed.
|
|
36
|
+
- Do not set `review_gate_ready: true` to “move on” with open high-severity disputes.
|
|
37
|
+
- Never speculate about files you did not read.
|
|
22
38
|
|
|
23
|
-
Bus label: `
|
|
39
|
+
Bus label: `ReviewIntegratorAgent`.
|
|
@@ -4,15 +4,30 @@ tools: read, grep, find, ls
|
|
|
4
4
|
disallowed_tools: write, edit, bash, ask_user, approve_plan, create_plan, subagent
|
|
5
5
|
extensions: false
|
|
6
6
|
thinking: medium
|
|
7
|
-
max_turns:
|
|
7
|
+
max_turns: 12
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## Your task
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Audit `execution_plan.sprint_contract` and work_item `done_criteria` against ADR-020 (Sprint Contract, Done Criteria Types, Keep Quality Left).
|
|
13
|
+
|
|
14
|
+
Required when `debate_round_focus` is `quality` or round_index ≥ 4. Optional spot-check on round 2 if done_criteria are sparse.
|
|
15
|
+
|
|
16
|
+
## Process
|
|
17
|
+
|
|
18
|
+
1. Read `plan-packet.yaml` execution_plan section and sprint_contract block.
|
|
19
|
+
2. Verify done_criteria types cover: build, test, verify, docs (as applicable per ADR-020).
|
|
20
|
+
3. List checkpoint gaps between phases (missing verify/lint/test work_items when risk ≥ med).
|
|
21
|
+
4. Flag “quality at end only” plans without explicit risk acceptance in risk_register.
|
|
22
|
+
5. Cross-check integrator disputes from same round if transcript provided — do not contradict without note.
|
|
13
23
|
|
|
14
24
|
## Output
|
|
15
25
|
|
|
16
26
|
Valid **YAML only** — `PlanSprintAuditTurn` (`.pi/harness/specs/plan-sprint-audit-turn.schema.json`).
|
|
17
27
|
|
|
18
|
-
|
|
28
|
+
## Guardrails
|
|
29
|
+
|
|
30
|
+
- Cite ADR-020 rule ids in rationale fields.
|
|
31
|
+
- Read-only; parent persists artifact.
|
|
32
|
+
|
|
33
|
+
Bus label: `SprintContractAuditorAgent`.
|
|
@@ -4,21 +4,30 @@ tools: read, grep, find, ls, bash, web_search, web_fetch
|
|
|
4
4
|
disallowed_tools: write, edit, ask_user, approve_plan, create_plan, subagent
|
|
5
5
|
extensions: false
|
|
6
6
|
thinking: medium
|
|
7
|
-
max_turns:
|
|
7
|
+
max_turns: 16
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## Your task
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Produce evidence-backed stack recommendations before ExecutionPlan authoring. Rank options; grade evidence quality.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## Process
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
1. Read spawn context: task_summary, brownfield vs greenfield, constraints.
|
|
17
|
+
2. **Libraries / APIs:** use context7-cli skill (`ctx7 library`, `ctx7 docs`). Record library ids in `evidence_refs`.
|
|
18
|
+
3. **Landscape / comparisons:** `web_search` + `web_fetch` (parent stores under `.web/`).
|
|
19
|
+
4. Brownfield: always include **extend current stack** as a ranked option with migration risk.
|
|
20
|
+
5. Greenfield: ≥3 distinct options with pros/cons/risks and selection criteria.
|
|
21
|
+
6. Grade each ref: `primary` (official docs), `secondary` (reputable guide), `anecdotal` (blog/issue thread).
|
|
21
22
|
|
|
22
23
|
## Output
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
Valid **YAML only** (no markdown fences) — `PlanStackBrief` (`.pi/harness/specs/plan-stack-brief.schema.json`). Parent writes `artifacts/stack.yaml`.
|
|
26
|
+
|
|
27
|
+
## Guardrails
|
|
28
|
+
|
|
29
|
+
- Do not recommend stacks you did not research.
|
|
30
|
+
- Prefer LTS/stable versions; note breaking changes when found.
|
|
31
|
+
- Do not overthink — 3 solid options beat 10 shallow ones.
|
|
32
|
+
|
|
33
|
+
Bus label: `StackResearchAgent`.
|