ultimate-pi 0.10.1 → 0.11.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.
Files changed (50) hide show
  1. package/.agents/skills/harness-decisions/SKILL.md +3 -3
  2. package/.agents/skills/harness-orchestration/SKILL.md +19 -11
  3. package/.agents/skills/harness-plan/SKILL.md +15 -9
  4. package/.pi/agents/harness/planner.md +6 -47
  5. package/.pi/agents/harness/planning/decompose.md +84 -0
  6. package/.pi/agents/harness/planning/hypothesis-eval.md +59 -0
  7. package/.pi/agents/harness/planning/hypothesis.md +90 -0
  8. package/.pi/agents/harness/planning/plan-adversary.md +50 -0
  9. package/.pi/agents/harness/planning/planner.md +20 -0
  10. package/.pi/agents/harness/planning/scout-graphify.md +48 -0
  11. package/.pi/agents/harness/planning/scout-semantic.md +42 -0
  12. package/.pi/agents/harness/planning/scout-structure.md +44 -0
  13. package/.pi/extensions/harness-ask-user.ts +5 -0
  14. package/.pi/extensions/harness-plan-approval.ts +137 -3
  15. package/.pi/extensions/harness-run-context.ts +1 -1
  16. package/.pi/extensions/harness-subagents.ts +8 -3
  17. package/.pi/extensions/harness-web-tools.ts +2 -0
  18. package/.pi/extensions/lib/extension-load-guard.ts +39 -0
  19. package/.pi/extensions/lib/harness-subagents/harness-subagent-policy.ts +33 -5
  20. package/.pi/extensions/lib/harness-subagents/parent-harness-ui-bridge.ts +2 -175
  21. package/.pi/extensions/lib/harness-subagents/parent-harness-ui-hooks.ts +18 -0
  22. package/.pi/extensions/lib/harness-subagents/spawn-policy.ts +1 -5
  23. package/.pi/extensions/lib/harness-subagents/vendored/agent-runner.ts +0 -18
  24. package/.pi/extensions/lib/harness-subagents/vendored/index.ts +1 -35
  25. package/.pi/extensions/lib/plan-approval/create-plan.ts +5 -0
  26. package/.pi/extensions/lib/plan-approval/plan-review.ts +393 -0
  27. package/.pi/extensions/lib/plan-approval/schema.ts +16 -1
  28. package/.pi/extensions/lib/plan-approval/types.ts +10 -0
  29. package/.pi/extensions/lib/plan-approval/validate.ts +2 -0
  30. package/.pi/extensions/policy-gate.ts +1 -1
  31. package/.pi/extensions/ultimate-pi-vcc.ts +5 -0
  32. package/.pi/harness/agents.manifest.json +114 -82
  33. package/.pi/harness/docs/adrs/0032-harness-command-orchestration.md +3 -3
  34. package/.pi/harness/docs/adrs/0033-parent-orchestrated-planning.md +34 -0
  35. package/.pi/harness/docs/adrs/0034-darwin-plan-research-pipeline.md +41 -0
  36. package/.pi/harness/docs/adrs/README.md +2 -0
  37. package/.pi/harness/specs/README.md +1 -1
  38. package/.pi/harness/specs/harness-spawn-context.schema.json +2 -1
  39. package/.pi/harness/specs/plan-adversary-brief.schema.json +45 -0
  40. package/.pi/harness/specs/plan-decomposition-brief.schema.json +108 -0
  41. package/.pi/harness/specs/plan-hypothesis-brief.schema.json +96 -0
  42. package/.pi/harness/specs/plan-hypothesis-eval.schema.json +61 -0
  43. package/.pi/lib/harness-run-context.ts +12 -0
  44. package/.pi/prompts/harness-auto.md +1 -1
  45. package/.pi/prompts/harness-plan.md +111 -28
  46. package/.pi/prompts/harness-setup.md +1 -1
  47. package/.pi/scripts/harness-resolve-up-pkg.mjs +13 -0
  48. package/CHANGELOG.md +12 -0
  49. package/biome.json +4 -1
  50. package/package.json +2 -2
@@ -1,84 +1,116 @@
1
1
  {
2
- "schema_version": "1.0.0",
3
- "package": "ultimate-pi",
4
- "package_version": "0.9.0",
5
- "generated_at": "2026-05-17T10:06:28.388Z",
6
- "agents": {
7
- "pi-pi/agent-expert": {
8
- "path": ".pi/agents/pi-pi/agent-expert.md",
9
- "sha256": "86561eb092b92fa43f221bfc6305de8d5afe10d43c5f577b9bf15a71bda051c6"
10
- },
11
- "pi-pi/cli-expert": {
12
- "path": ".pi/agents/pi-pi/cli-expert.md",
13
- "sha256": "6ecdbc37c60f1da7c68d504187454c95197dd19bd7091d97d136c6fb9e866838"
14
- },
15
- "pi-pi/config-expert": {
16
- "path": ".pi/agents/pi-pi/config-expert.md",
17
- "sha256": "c23b9b70a4c326cca2d139f18de48f8db2e0e28fa5ceb8205600f25430822a40"
18
- },
19
- "pi-pi/ext-expert": {
20
- "path": ".pi/agents/pi-pi/ext-expert.md",
21
- "sha256": "47c64a9e2cffe00a50cac5541b0edc89fe8bcbd66ec3bb302eecc10d405a977f"
22
- },
23
- "pi-pi/keybinding-expert": {
24
- "path": ".pi/agents/pi-pi/keybinding-expert.md",
25
- "sha256": "bb83f5fd2178075c8374ef28c360339f7de9faeedf811670b43a536c5f65c58e"
26
- },
27
- "pi-pi/pi-orchestrator": {
28
- "path": ".pi/agents/pi-pi/pi-orchestrator.md",
29
- "sha256": "1323fc262112030320bdd7d7866fd69e1b861377bb30fd3553a5e3a4398f9090"
30
- },
31
- "pi-pi/prompt-expert": {
32
- "path": ".pi/agents/pi-pi/prompt-expert.md",
33
- "sha256": "0d9f5e3e8ab162149cac8f08e159a7b2150a11f53ebe7021e72f8277fa004d0c"
34
- },
35
- "pi-pi/skill-expert": {
36
- "path": ".pi/agents/pi-pi/skill-expert.md",
37
- "sha256": "91732a2479097a2645b6af56171d5cdc1ed67a0896ca54bc4badba250341698f"
38
- },
39
- "pi-pi/theme-expert": {
40
- "path": ".pi/agents/pi-pi/theme-expert.md",
41
- "sha256": "3d256049203356d87c36eac2232c0ad6261fec8af02eb15d3144b18a400ed64d"
42
- },
43
- "pi-pi/tui-expert": {
44
- "path": ".pi/agents/pi-pi/tui-expert.md",
45
- "sha256": "a619b2ee3d3d94fe599abb61db0904f90d30335ec426851c3f1efdf2e5ce5390"
46
- },
47
- "harness/adversary": {
48
- "path": ".pi/agents/harness/adversary.md",
49
- "sha256": "b965f90610ca942d08b656f1aee839266d08a92beb174b8761dd5e840694a899"
50
- },
51
- "harness/evaluator": {
52
- "path": ".pi/agents/harness/evaluator.md",
53
- "sha256": "6c0de777a10de26dba4a6feb5641495fa5c2d31072a8b0e597a5ecc9921f129f"
54
- },
55
- "harness/executor": {
56
- "path": ".pi/agents/harness/executor.md",
57
- "sha256": "5af3ec2be4d64a738834e36d480a36c2bee4359e8cd5a2e1aac49be4cff79589"
58
- },
59
- "harness/incident-recorder": {
60
- "path": ".pi/agents/harness/incident-recorder.md",
61
- "sha256": "2de405f77b62dde38f331665bff220a3ef131c3c1cd42eebee364000fc83352b"
62
- },
63
- "harness/meta-optimizer": {
64
- "path": ".pi/agents/harness/meta-optimizer.md",
65
- "sha256": "ef2fb950e18e3a6439e91a68f764fc7ec922cd2d6b35de8f656f376854974d04"
66
- },
67
- "harness/planner": {
68
- "path": ".pi/agents/harness/planner.md",
69
- "sha256": "eb0459a1fcb018e4ca8d4339141e294828fa7014879d9a64258ae01abc13d3ad"
70
- },
71
- "harness/sentrux-bootstrap": {
72
- "path": ".pi/agents/harness/sentrux-bootstrap.md",
73
- "sha256": "3a0b43b94386a7c541b8a806a37524a5e53f1c8049270db7a420680df5799eeb"
74
- },
75
- "harness/tie-breaker": {
76
- "path": ".pi/agents/harness/tie-breaker.md",
77
- "sha256": "651f50b9e2c7903c542700e94908b1fcd026ebed12aa1f1d6ec481df3567e34f"
78
- },
79
- "harness/trace-librarian": {
80
- "path": ".pi/agents/harness/trace-librarian.md",
81
- "sha256": "d63fe08a2ea0466c0fd89fff4da03ac1d9d3580c306381cee251c89d4e8fdb97"
82
- }
83
- }
2
+ "schema_version": "1.0.0",
3
+ "package": "ultimate-pi",
4
+ "package_version": "0.10.1",
5
+ "generated_at": "2026-05-17T17:48:22.826Z",
6
+ "agents": {
7
+ "pi-pi/agent-expert": {
8
+ "path": ".pi/agents/pi-pi/agent-expert.md",
9
+ "sha256": "86561eb092b92fa43f221bfc6305de8d5afe10d43c5f577b9bf15a71bda051c6"
10
+ },
11
+ "pi-pi/cli-expert": {
12
+ "path": ".pi/agents/pi-pi/cli-expert.md",
13
+ "sha256": "6ecdbc37c60f1da7c68d504187454c95197dd19bd7091d97d136c6fb9e866838"
14
+ },
15
+ "pi-pi/config-expert": {
16
+ "path": ".pi/agents/pi-pi/config-expert.md",
17
+ "sha256": "c23b9b70a4c326cca2d139f18de48f8db2e0e28fa5ceb8205600f25430822a40"
18
+ },
19
+ "pi-pi/ext-expert": {
20
+ "path": ".pi/agents/pi-pi/ext-expert.md",
21
+ "sha256": "47c64a9e2cffe00a50cac5541b0edc89fe8bcbd66ec3bb302eecc10d405a977f"
22
+ },
23
+ "pi-pi/keybinding-expert": {
24
+ "path": ".pi/agents/pi-pi/keybinding-expert.md",
25
+ "sha256": "bb83f5fd2178075c8374ef28c360339f7de9faeedf811670b43a536c5f65c58e"
26
+ },
27
+ "pi-pi/pi-orchestrator": {
28
+ "path": ".pi/agents/pi-pi/pi-orchestrator.md",
29
+ "sha256": "1323fc262112030320bdd7d7866fd69e1b861377bb30fd3553a5e3a4398f9090"
30
+ },
31
+ "pi-pi/prompt-expert": {
32
+ "path": ".pi/agents/pi-pi/prompt-expert.md",
33
+ "sha256": "0d9f5e3e8ab162149cac8f08e159a7b2150a11f53ebe7021e72f8277fa004d0c"
34
+ },
35
+ "pi-pi/skill-expert": {
36
+ "path": ".pi/agents/pi-pi/skill-expert.md",
37
+ "sha256": "91732a2479097a2645b6af56171d5cdc1ed67a0896ca54bc4badba250341698f"
38
+ },
39
+ "pi-pi/theme-expert": {
40
+ "path": ".pi/agents/pi-pi/theme-expert.md",
41
+ "sha256": "3d256049203356d87c36eac2232c0ad6261fec8af02eb15d3144b18a400ed64d"
42
+ },
43
+ "pi-pi/tui-expert": {
44
+ "path": ".pi/agents/pi-pi/tui-expert.md",
45
+ "sha256": "a619b2ee3d3d94fe599abb61db0904f90d30335ec426851c3f1efdf2e5ce5390"
46
+ },
47
+ "harness/adversary": {
48
+ "path": ".pi/agents/harness/adversary.md",
49
+ "sha256": "b965f90610ca942d08b656f1aee839266d08a92beb174b8761dd5e840694a899"
50
+ },
51
+ "harness/evaluator": {
52
+ "path": ".pi/agents/harness/evaluator.md",
53
+ "sha256": "6c0de777a10de26dba4a6feb5641495fa5c2d31072a8b0e597a5ecc9921f129f"
54
+ },
55
+ "harness/executor": {
56
+ "path": ".pi/agents/harness/executor.md",
57
+ "sha256": "5af3ec2be4d64a738834e36d480a36c2bee4359e8cd5a2e1aac49be4cff79589"
58
+ },
59
+ "harness/incident-recorder": {
60
+ "path": ".pi/agents/harness/incident-recorder.md",
61
+ "sha256": "2de405f77b62dde38f331665bff220a3ef131c3c1cd42eebee364000fc83352b"
62
+ },
63
+ "harness/meta-optimizer": {
64
+ "path": ".pi/agents/harness/meta-optimizer.md",
65
+ "sha256": "ef2fb950e18e3a6439e91a68f764fc7ec922cd2d6b35de8f656f376854974d04"
66
+ },
67
+ "harness/planner": {
68
+ "path": ".pi/agents/harness/planner.md",
69
+ "sha256": "648b9e4c56a6c0f983ae990238952579bb4745af81eb6c79add5325ea4929c91"
70
+ },
71
+ "harness/sentrux-bootstrap": {
72
+ "path": ".pi/agents/harness/sentrux-bootstrap.md",
73
+ "sha256": "3a0b43b94386a7c541b8a806a37524a5e53f1c8049270db7a420680df5799eeb"
74
+ },
75
+ "harness/tie-breaker": {
76
+ "path": ".pi/agents/harness/tie-breaker.md",
77
+ "sha256": "651f50b9e2c7903c542700e94908b1fcd026ebed12aa1f1d6ec481df3567e34f"
78
+ },
79
+ "harness/trace-librarian": {
80
+ "path": ".pi/agents/harness/trace-librarian.md",
81
+ "sha256": "d63fe08a2ea0466c0fd89fff4da03ac1d9d3580c306381cee251c89d4e8fdb97"
82
+ },
83
+ "harness/planning/decompose": {
84
+ "path": ".pi/agents/harness/planning/decompose.md",
85
+ "sha256": "a4f33869759ebdc049e77b344ae050be5ede08ea9a92216b8599cc7d2f14c052"
86
+ },
87
+ "harness/planning/hypothesis-eval": {
88
+ "path": ".pi/agents/harness/planning/hypothesis-eval.md",
89
+ "sha256": "7a05e2f746bf79f20096cbfb12aaee31a0717e660680b44cb285ea967b3141e5"
90
+ },
91
+ "harness/planning/hypothesis": {
92
+ "path": ".pi/agents/harness/planning/hypothesis.md",
93
+ "sha256": "7f2af6dda328d6cc1279dbff20a46b1d93aacfda9d57857cc6117685f8a585dd"
94
+ },
95
+ "harness/planning/plan-adversary": {
96
+ "path": ".pi/agents/harness/planning/plan-adversary.md",
97
+ "sha256": "4beceb8c4181f82b7eb006d87392c0adb4c7ce41992193790888e7298c1b7594"
98
+ },
99
+ "harness/planning/planner": {
100
+ "path": ".pi/agents/harness/planning/planner.md",
101
+ "sha256": "570c501c976e26d79a36814787eb03fab6aa97f79cc895af319dc717648a2a65"
102
+ },
103
+ "harness/planning/scout-graphify": {
104
+ "path": ".pi/agents/harness/planning/scout-graphify.md",
105
+ "sha256": "76a66a3dc8bce60a91ed30ffdc683fb1eab0692006b0ee80fbdc67b11b374b61"
106
+ },
107
+ "harness/planning/scout-semantic": {
108
+ "path": ".pi/agents/harness/planning/scout-semantic.md",
109
+ "sha256": "99aedca25fd81000d3bb532e0191ce9e1a87b84ab4039f089734f3a0d24ba44b"
110
+ },
111
+ "harness/planning/scout-structure": {
112
+ "path": ".pi/agents/harness/planning/scout-structure.md",
113
+ "sha256": "83fd09e5eccd77b27d9de464d7e32536d9a762469e021b86b0ca665942bb40af"
114
+ }
115
+ }
84
116
  }
@@ -10,11 +10,11 @@ Harness slash prompts duplicated logic already defined in `harness/*` agents. Co
10
10
  ## Decision
11
11
 
12
12
  1. **Slash commands** (prompt templates) are orchestrators: spawn `harness/*` agents once, perform policy-gated writes, emit handoff blocks. Command identity is captured on Pi **`input`** as `harness-turn` (raw `/harness-*`), not from expanded prompt markdown.
13
- 2. **Agents** perform multi-turn reads and emit structured JSON drafts. **Planner** runs clarification and plan approval via `ask_user` (parent UI bridge); planner does not write `plan-packet.json`.
13
+ 2. **Agents** perform multi-turn reads and emit structured JSON drafts. **Planning** (`harness/planning/*`) scouts and plan-adversary are read-only; parent orchestrator runs `ask_user`, `approve_plan`, and `create_plan` (see ADR 0033).
14
14
  3. **HarnessSpawnContext** is injected in `[HarnessRunContext]`; orchestrator copies it into spawn prompts. Subagents do not receive `[HarnessActivePlan]` injection.
15
15
  4. **Review isolation** uses `Agent` spawn with `inherit_context: false`. `review-integrity` allows `Agent` / `get_subagent_result` for evaluator/adversary/tie-breaker.
16
- 5. **Subagent policy** blocks mutating tools for read-only phase agents; `ask_user` allowed for planner/evaluator/adversary/tie-breaker only.
17
- 6. **Parent** does not duplicate planner `ask_user` or re-spawn for clarification. `get_subagent_result` syncs `harness-plan-approval` from subagent sessions.
16
+ 5. **Subagent policy** blocks mutating tools for read-only phase agents; `ask_user` bridged for evaluator/adversary/tie-breaker only (not planning scouts).
17
+ 6. **Parent** owns plan-phase `ask_user`, `approve_plan`, and `create_plan` per ADR 0033.
18
18
 
19
19
  ## Consequences
20
20
 
@@ -0,0 +1,34 @@
1
+ # ADR 0033: Parent-orchestrated harness planning
2
+
3
+ - **Status:** Accepted
4
+ - **Date:** 2026-05-17
5
+
6
+ ## Context
7
+
8
+ `/harness-plan` delegated the full plan lifecycle to a single `harness/planner` subagent. Plans and approval UI were largely invisible in the parent transcript until `get_subagent_result`, and the orchestrator could not call `ask_user` / `approve_plan` / `create_plan` directly.
9
+
10
+ ## Decision
11
+
12
+ 1. **Parent orchestrator** runs `/harness-plan`: parallel read-only scouts under `harness/planning/*`, parent-built `PlanPacket`, `ask_user`, `harness/planning/plan-adversary`, then parent `approve_plan` + `create_plan`.
13
+ 2. **Planning agents** live in `.pi/agents/harness/planning/` (`scout-graphify`, `scout-structure`, `scout-semantic`, `plan-adversary`). Deprecated `harness/planner` shim retained at old path for one release.
14
+ 3. **`approve_plan` and `create_plan`** are parent-session tools only; subagents cannot call them.
15
+ 4. **`classifyHarnessAgent`** treats `harness/planning/*` as read-only (planner kind).
16
+
17
+ ## Consequences
18
+
19
+ ### Positive
20
+
21
+ - Full plan visible in parent session; editor `plan-review.md` path surfaced from parent.
22
+ - Specialized scouts (graphify, ast-grep, ck) run in parallel with clear JSON contracts.
23
+ - Pre-approval adversary separate from post-run `harness/adversary`.
24
+
25
+ ### Negative
26
+
27
+ - More subagent spawns per plan (3 scouts + adversary) vs one planner.
28
+ - Parent prompt must parse multiple JSON blocks and handle partial scout failure.
29
+
30
+ ## References
31
+
32
+ - `.pi/prompts/harness-plan.md`
33
+ - `.pi/agents/harness/planning/`
34
+ - ADR 0032
@@ -0,0 +1,41 @@
1
+ # ADR 0034: Darwin plan research pipeline
2
+
3
+ - **Status:** Accepted
4
+ - **Date:** 2026-05-17
5
+
6
+ ## Context
7
+
8
+ `/harness-plan` (ADR 0033) parent-orchestrated scouts and a single adversary before approval. Users need vague tasks transformed into rigorous, falsifiable hypotheses before execution plans are approved — not only codebase maps and scope bullets.
9
+
10
+ ## Decision
11
+
12
+ 1. **Always-on research chain** after parallel scouts:
13
+ - `harness/planning/decompose` — DeepMind-style problem decomposition (`PlanDecompositionBrief`)
14
+ - `harness/planning/hypothesis` — DARWIN hypothesis generation (`PlanHypothesisBrief`)
15
+ 2. **Parent maps hypothesis → PlanPacket** — `plan-packet.schema.json` unchanged; execution gating stable.
16
+ 3. **Parallel pre-approval reviews:**
17
+ - `harness/planning/plan-adversary` — execution risk on PlanPacket
18
+ - `harness/planning/hypothesis-eval` — blind self-eval (task + hypothesis only)
19
+ 4. **`approve_plan` optional `research_brief`** — rendered in `plan-review.md`; not written to `plan-packet.json`.
20
+ 5. **`--quick`** still skips semantic scout only; never skips decompose/hypothesis.
21
+
22
+ ## Consequences
23
+
24
+ ### Positive
25
+
26
+ - Plans grounded in explicit tensions, falsifiable claims, and experiments.
27
+ - Self-eval isolated from decomposition (reduces grade inflation).
28
+ - Editor review shows full research narrative plus PlanPacket.
29
+
30
+ ### Negative
31
+
32
+ - More subagent spawns per plan (scouts + decompose + hypothesis + 2 reviews; optional hypothesis revision).
33
+ - Longer plan phase latency and token cost.
34
+
35
+ ## References
36
+
37
+ - `.pi/prompts/harness-plan.md`
38
+ - `.pi/harness/specs/plan-decomposition-brief.schema.json`
39
+ - `.pi/harness/specs/plan-hypothesis-brief.schema.json`
40
+ - `.pi/harness/specs/plan-hypothesis-eval.schema.json`
41
+ - ADR 0033
@@ -18,6 +18,8 @@ Team-shared ADRs for the ultimate-pi harness live under `.pi/harness/docs/adrs/`
18
18
  | [0030](0030-inhouse-vcc-compaction.md) | In-house VCC compaction (vendored pi-vcc) | Accepted |
19
19
  | [0031](0031-harness-run-context.md) | Harness active run context | Accepted |
20
20
  | [0032](0032-harness-command-orchestration.md) | Harness commands as agent orchestrators | Accepted |
21
+ | [0033](0033-parent-orchestrated-planning.md) | Parent-orchestrated harness planning | Accepted |
22
+ | [0034](0034-darwin-plan-research-pipeline.md) | Darwin plan research pipeline | Accepted |
21
23
 
22
24
  ## Template
23
25
 
@@ -13,7 +13,7 @@ This directory is the canonical contract surface for Phase 1 harness artifacts.
13
13
 
14
14
  These schemas define the minimum machine-readable contracts for:
15
15
 
16
- - planning (`PlanPacket`)
16
+ - planning (`PlanPacket`, `PlanDecompositionBrief`, `PlanHypothesisBrief`, `PlanHypothesisEval`, `PlanAdversaryBrief`)
17
17
  - execution telemetry (`RunTrace`, `HarnessRunRecord`)
18
18
  - PostHog harness events (`HarnessPostHogEvent`)
19
19
  - observation bus (`HarnessObservation`)
@@ -14,13 +14,14 @@
14
14
  "agent": {
15
15
  "type": "string",
16
16
  "minLength": 1,
17
- "description": "Target subagent id, e.g. harness/planner"
17
+ "description": "Target subagent id, e.g. harness/planning/scout-graphify"
18
18
  },
19
19
  "mode": {
20
20
  "type": "string",
21
21
  "enum": [
22
22
  "create",
23
23
  "revise",
24
+ "plan_review",
24
25
  "execute",
25
26
  "benchmark",
26
27
  "verdict",
@@ -0,0 +1,45 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ultimate-pi.local/.pi/harness/specs/plan-adversary-brief.schema.json",
4
+ "title": "PlanAdversaryBrief",
5
+ "description": "Pre-approval adversarial review of a draft PlanPacket (plan phase only).",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schema_version",
10
+ "edge_cases",
11
+ "failure_modes",
12
+ "acceptance_gaps",
13
+ "mitigations",
14
+ "recommendation"
15
+ ],
16
+ "properties": {
17
+ "schema_version": {
18
+ "type": "string",
19
+ "const": "1.0.0"
20
+ },
21
+ "edge_cases": {
22
+ "type": "array",
23
+ "items": { "type": "string", "minLength": 1 }
24
+ },
25
+ "failure_modes": {
26
+ "type": "array",
27
+ "items": { "type": "string", "minLength": 1 }
28
+ },
29
+ "acceptance_gaps": {
30
+ "type": "array",
31
+ "items": { "type": "string", "minLength": 1 }
32
+ },
33
+ "mitigations": {
34
+ "type": "array",
35
+ "items": { "type": "string", "minLength": 1 }
36
+ },
37
+ "recommendation": {
38
+ "type": "string",
39
+ "enum": ["proceed", "revise"]
40
+ },
41
+ "human_summary": {
42
+ "type": "string"
43
+ }
44
+ }
45
+ }
@@ -0,0 +1,108 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ultimate-pi.local/.pi/harness/specs/plan-decomposition-brief.schema.json",
4
+ "title": "PlanDecompositionBrief",
5
+ "description": "DeepMind-style problem decomposition (harness plan phase 1).",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schema_version",
10
+ "problem_restatement",
11
+ "problem_types",
12
+ "scope",
13
+ "hard_constraints",
14
+ "soft_constraints",
15
+ "success_metrics",
16
+ "prior_art",
17
+ "tensions",
18
+ "core_tension"
19
+ ],
20
+ "properties": {
21
+ "schema_version": {
22
+ "type": "string",
23
+ "const": "1.0.0"
24
+ },
25
+ "problem_restatement": {
26
+ "type": "string",
27
+ "minLength": 1,
28
+ "description": "Precise restatement; what solving this looks like."
29
+ },
30
+ "problem_types": {
31
+ "type": "array",
32
+ "minItems": 1,
33
+ "items": {
34
+ "type": "string",
35
+ "enum": [
36
+ "optimization",
37
+ "discovery",
38
+ "explanation",
39
+ "design",
40
+ "selection"
41
+ ]
42
+ }
43
+ },
44
+ "scope": {
45
+ "type": "object",
46
+ "additionalProperties": false,
47
+ "required": ["narrowed_focus", "excluded"],
48
+ "properties": {
49
+ "narrowed_focus": {
50
+ "type": "string",
51
+ "minLength": 1
52
+ },
53
+ "excluded": {
54
+ "type": "array",
55
+ "items": { "type": "string", "minLength": 1 }
56
+ }
57
+ }
58
+ },
59
+ "hard_constraints": {
60
+ "type": "array",
61
+ "items": { "type": "string", "minLength": 1 }
62
+ },
63
+ "soft_constraints": {
64
+ "type": "array",
65
+ "items": { "type": "string", "minLength": 1 }
66
+ },
67
+ "success_metrics": {
68
+ "type": "array",
69
+ "minItems": 1,
70
+ "items": { "type": "string", "minLength": 1 }
71
+ },
72
+ "prior_art": {
73
+ "type": "object",
74
+ "additionalProperties": false,
75
+ "required": ["best_approach", "gap", "dead_ends"],
76
+ "properties": {
77
+ "best_approach": { "type": "string", "minLength": 1 },
78
+ "gap": { "type": "string", "minLength": 1 },
79
+ "dead_ends": {
80
+ "type": "array",
81
+ "items": { "type": "string", "minLength": 1 }
82
+ }
83
+ }
84
+ },
85
+ "tensions": {
86
+ "type": "array",
87
+ "minItems": 1,
88
+ "items": {
89
+ "type": "object",
90
+ "additionalProperties": false,
91
+ "required": ["claim_a", "claim_b", "why_matters"],
92
+ "properties": {
93
+ "claim_a": { "type": "string", "minLength": 1 },
94
+ "claim_b": { "type": "string", "minLength": 1 },
95
+ "why_matters": { "type": "string", "minLength": 1 }
96
+ }
97
+ }
98
+ },
99
+ "core_tension": {
100
+ "type": "string",
101
+ "minLength": 1,
102
+ "description": "One paragraph summarizing the tension that feeds hypothesis generation."
103
+ },
104
+ "human_summary": {
105
+ "type": "string"
106
+ }
107
+ }
108
+ }
@@ -0,0 +1,96 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ultimate-pi.local/.pi/harness/specs/plan-hypothesis-brief.schema.json",
4
+ "title": "PlanHypothesisBrief",
5
+ "description": "DARWIN-style hypothesis brief (harness plan phase 2).",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schema_version",
10
+ "primary",
11
+ "dialectical_fork",
12
+ "alternatives",
13
+ "recommended_next_steps"
14
+ ],
15
+ "properties": {
16
+ "schema_version": {
17
+ "type": "string",
18
+ "const": "1.0.0"
19
+ },
20
+ "primary": {
21
+ "type": "object",
22
+ "additionalProperties": false,
23
+ "required": [
24
+ "claim",
25
+ "mechanism",
26
+ "prediction",
27
+ "experiment",
28
+ "tension_resolution"
29
+ ],
30
+ "properties": {
31
+ "claim": {
32
+ "type": "string",
33
+ "minLength": 1,
34
+ "description": "One falsifiable sentence."
35
+ },
36
+ "mechanism": {
37
+ "type": "string",
38
+ "minLength": 1,
39
+ "description": "Concrete processes, algorithms, principles."
40
+ },
41
+ "prediction": {
42
+ "type": "string",
43
+ "minLength": 1,
44
+ "description": "Measurable outcome that confirms the hypothesis."
45
+ },
46
+ "experiment": {
47
+ "type": "string",
48
+ "minLength": 1,
49
+ "description": "How to test: tools, datasets, benchmarks, protocols."
50
+ },
51
+ "tension_resolution": {
52
+ "type": "string",
53
+ "minLength": 1,
54
+ "description": "Link back to core_tension from decomposition."
55
+ }
56
+ }
57
+ },
58
+ "dialectical_fork": {
59
+ "type": "object",
60
+ "additionalProperties": false,
61
+ "required": ["fork", "path_a", "path_b"],
62
+ "properties": {
63
+ "fork": {
64
+ "type": "string",
65
+ "minLength": 1,
66
+ "description": "Key assumption that splits approaches."
67
+ },
68
+ "path_a": { "type": "string", "minLength": 1 },
69
+ "path_b": { "type": "string", "minLength": 1 }
70
+ }
71
+ },
72
+ "alternatives": {
73
+ "type": "array",
74
+ "minItems": 1,
75
+ "maxItems": 3,
76
+ "items": {
77
+ "type": "object",
78
+ "additionalProperties": false,
79
+ "required": ["claim", "key_bet"],
80
+ "properties": {
81
+ "claim": { "type": "string", "minLength": 1 },
82
+ "key_bet": { "type": "string", "minLength": 1 }
83
+ }
84
+ }
85
+ },
86
+ "recommended_next_steps": {
87
+ "type": "array",
88
+ "minItems": 1,
89
+ "maxItems": 5,
90
+ "items": { "type": "string", "minLength": 1 }
91
+ },
92
+ "human_summary": {
93
+ "type": "string"
94
+ }
95
+ }
96
+ }
@@ -0,0 +1,61 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ultimate-pi.local/.pi/harness/specs/plan-hypothesis-eval.schema.json",
4
+ "title": "PlanHypothesisEval",
5
+ "description": "Blind self-evaluation of a PlanHypothesisBrief (harness plan phase).",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["schema_version", "dimensions", "relevance", "human_summary"],
9
+ "properties": {
10
+ "schema_version": {
11
+ "type": "string",
12
+ "const": "1.0.0"
13
+ },
14
+ "dimensions": {
15
+ "type": "object",
16
+ "additionalProperties": false,
17
+ "required": ["novelty", "coherence", "testability", "impact"],
18
+ "properties": {
19
+ "novelty": { "$ref": "#/$defs/scoredDimension" },
20
+ "coherence": { "$ref": "#/$defs/scoredDimension" },
21
+ "testability": { "$ref": "#/$defs/scoredDimension" },
22
+ "impact": { "$ref": "#/$defs/scoredDimension" }
23
+ }
24
+ },
25
+ "relevance": {
26
+ "type": "object",
27
+ "additionalProperties": false,
28
+ "required": ["passes", "rationale"],
29
+ "properties": {
30
+ "passes": { "type": "boolean" },
31
+ "rationale": { "type": "string", "minLength": 1 }
32
+ }
33
+ },
34
+ "revision_recommended": {
35
+ "type": "boolean",
36
+ "description": "True when testability < 70 or relevance fails."
37
+ },
38
+ "human_summary": {
39
+ "type": "string",
40
+ "minLength": 1
41
+ }
42
+ },
43
+ "$defs": {
44
+ "scoredDimension": {
45
+ "type": "object",
46
+ "additionalProperties": false,
47
+ "required": ["score", "rationale"],
48
+ "properties": {
49
+ "score": {
50
+ "type": "integer",
51
+ "minimum": 0,
52
+ "maximum": 100
53
+ },
54
+ "rationale": {
55
+ "type": "string",
56
+ "minLength": 1
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }