ultimate-pi 0.17.0 → 0.18.1

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 (137) hide show
  1. package/.agents/skills/harness-context/SKILL.md +13 -6
  2. package/.agents/skills/harness-debate-plan/SKILL.md +37 -20
  3. package/.agents/skills/harness-decisions/SKILL.md +1 -1
  4. package/.agents/skills/harness-eval/SKILL.md +6 -21
  5. package/.agents/skills/harness-governor/SKILL.md +4 -3
  6. package/.agents/skills/harness-orchestration/SKILL.md +41 -53
  7. package/.agents/skills/harness-plan/SKILL.md +23 -12
  8. package/.agents/skills/harness-review/SKILL.md +52 -0
  9. package/.agents/skills/harness-sentrux-setup/SKILL.md +16 -3
  10. package/.agents/skills/harness-steer/SKILL.md +14 -0
  11. package/.agents/skills/sentrux/SKILL.md +9 -9
  12. package/.pi/agents/harness/planning/decompose.md +7 -4
  13. package/.pi/agents/harness/planning/hypothesis-validator.md +2 -0
  14. package/.pi/agents/harness/planning/hypothesis.md +3 -1
  15. package/.pi/agents/harness/planning/plan-adversary.md +2 -0
  16. package/.pi/agents/harness/planning/plan-evaluator.md +2 -0
  17. package/.pi/agents/harness/planning/plan-synthesizer.md +25 -0
  18. package/.pi/agents/harness/planning/planning-context.md +48 -0
  19. package/.pi/agents/harness/planning/review-integrator.md +2 -0
  20. package/.pi/agents/harness/planning/sprint-contract-auditor.md +2 -0
  21. package/.pi/agents/harness/{adversary.md → reviewing/adversary.md} +3 -10
  22. package/.pi/agents/harness/{evaluator.md → reviewing/evaluator.md} +3 -12
  23. package/.pi/agents/harness/running/executor.md +45 -0
  24. package/.pi/agents/harness/sentrux-steward.md +51 -0
  25. package/.pi/extensions/00-harness-project-control.ts +133 -0
  26. package/.pi/extensions/00-posthog-network-bootstrap.ts +11 -0
  27. package/.pi/extensions/budget-guard.ts +2 -0
  28. package/.pi/extensions/debate-orchestrator.ts +2 -0
  29. package/.pi/extensions/harness-ask-user.ts +2 -2
  30. package/.pi/extensions/harness-debate-tools.ts +2 -2
  31. package/.pi/extensions/harness-live-widget.ts +60 -3
  32. package/.pi/extensions/harness-plan-approval.ts +64 -58
  33. package/.pi/extensions/harness-run-context.ts +715 -90
  34. package/.pi/extensions/harness-subagent-submit.ts +46 -12
  35. package/.pi/extensions/harness-subagents.ts +2 -2
  36. package/.pi/extensions/harness-telemetry.ts +2 -0
  37. package/.pi/extensions/harness-web-tools.ts +2 -2
  38. package/.pi/extensions/lib/extension-load-guard.ts +10 -0
  39. package/.pi/extensions/lib/harness-artifact-gate.ts +172 -0
  40. package/.pi/extensions/lib/harness-posthog.ts +9 -5
  41. package/.pi/extensions/lib/harness-spawn-topology.ts +165 -0
  42. package/.pi/extensions/lib/harness-subagent-auth.ts +1 -2
  43. package/.pi/extensions/lib/harness-subagent-policy.ts +28 -24
  44. package/.pi/extensions/lib/harness-subagent-precheck.ts +36 -10
  45. package/.pi/extensions/lib/harness-subagent-submit-pipeline.ts +66 -2
  46. package/.pi/extensions/lib/harness-subagent-submit-registry.ts +22 -22
  47. package/.pi/extensions/lib/harness-subagents-bridge.ts +7 -29
  48. package/.pi/extensions/lib/harness-subprocess-bootstrap.ts +73 -0
  49. package/.pi/extensions/lib/plan-approval/create-plan.ts +2 -3
  50. package/.pi/extensions/lib/plan-approval/resolve-disk.ts +102 -0
  51. package/.pi/extensions/lib/plan-approval/schema.ts +22 -8
  52. package/.pi/extensions/lib/plan-approval/types.ts +1 -1
  53. package/.pi/extensions/lib/plan-approval/validate.ts +2 -2
  54. package/.pi/extensions/lib/plan-approval-readiness.ts +192 -0
  55. package/.pi/extensions/lib/plan-debate-eligibility.ts +12 -5
  56. package/.pi/extensions/lib/plan-debate-gate.ts +22 -1
  57. package/.pi/extensions/lib/plan-debate-lanes.ts +32 -2
  58. package/.pi/extensions/lib/plan-review-gate.ts +8 -0
  59. package/.pi/extensions/lib/posthog-client.ts +76 -0
  60. package/.pi/extensions/lib/spawn-policy.ts +3 -3
  61. package/.pi/extensions/observation-bus.ts +2 -0
  62. package/.pi/extensions/policy-gate.ts +26 -19
  63. package/.pi/extensions/review-integrity.ts +91 -10
  64. package/.pi/extensions/sentrux-rules-sync.ts +2 -0
  65. package/.pi/extensions/test-diff-integrity.ts +1 -0
  66. package/.pi/extensions/trace-recorder.ts +2 -0
  67. package/.pi/harness/agents.manifest.json +37 -37
  68. package/.pi/harness/corpus/cron.example +8 -0
  69. package/.pi/harness/corpus/graphify-kb-updater.config.json +214 -0
  70. package/.pi/harness/corpus/systemd/graphify-kb-updater.env.template +4 -0
  71. package/.pi/harness/corpus/systemd/graphify-kb-updater.service +17 -0
  72. package/.pi/harness/corpus/systemd/graphify-kb-updater.timer +11 -0
  73. package/.pi/harness/docs/adrs/0001-harness-constitution.md +2 -1
  74. package/.pi/harness/docs/adrs/0006-sentrux-dual-layer.md +8 -6
  75. package/.pi/harness/docs/adrs/0009-sentrux-rules-lifecycle.md +6 -1
  76. package/.pi/harness/docs/adrs/0031-harness-run-context.md +1 -1
  77. package/.pi/harness/docs/adrs/0032-harness-command-orchestration.md +7 -0
  78. package/.pi/harness/docs/adrs/0034-darwin-plan-research-pipeline.md +3 -3
  79. package/.pi/harness/docs/adrs/0036-implementation-research-and-selective-debate.md +8 -5
  80. package/.pi/harness/docs/adrs/0039-harness-post-run-review-gate.md +47 -0
  81. package/.pi/harness/docs/adrs/0040-practice-grounded-orchestration.md +40 -0
  82. package/.pi/harness/docs/adrs/0041-intelligent-planning-reconnaissance.md +39 -0
  83. package/.pi/harness/docs/adrs/0042-agent-native-orchestration.md +35 -0
  84. package/.pi/harness/docs/adrs/0043-path-first-harness-tools.md +38 -0
  85. package/.pi/harness/docs/adrs/0044-harness-steer-loop.md +37 -0
  86. package/.pi/harness/docs/adrs/0045-phase-scoped-agent-directories.md +33 -0
  87. package/.pi/harness/docs/adrs/README.md +11 -0
  88. package/.pi/harness/docs/graphify-kb-updater-runbook.md +163 -0
  89. package/.pi/harness/docs/practice-map.md +110 -0
  90. package/.pi/harness/env.harness.template +5 -3
  91. package/.pi/harness/evals/smoke/sentrux-stub.json +1 -1
  92. package/.pi/harness/evals/smoke/smoke-harness-plan.mjs +5 -2
  93. package/.pi/harness/specs/README.md +1 -1
  94. package/.pi/harness/specs/harness-run-context.schema.json +11 -0
  95. package/.pi/harness/specs/harness-spawn-context.schema.json +15 -1
  96. package/.pi/harness/specs/plan-execution-plan.schema.json +39 -1
  97. package/.pi/harness/specs/plan-packet.schema.json +4 -0
  98. package/.pi/harness/specs/plan-phase-status.schema.json +17 -0
  99. package/.pi/harness/specs/plan-phase-waiver.schema.json +25 -0
  100. package/.pi/harness/specs/plan-planning-context.schema.json +50 -0
  101. package/.pi/harness/specs/repair-brief.schema.json +45 -0
  102. package/.pi/harness/specs/review-outcome.schema.json +46 -0
  103. package/.pi/harness/specs/sentrux-manifest-proposal.schema.json +80 -0
  104. package/.pi/harness/specs/sentrux-signal.schema.json +43 -0
  105. package/.pi/harness/specs/steer-state.schema.json +20 -0
  106. package/.pi/lib/harness-context-mode-policy.ts +256 -0
  107. package/.pi/lib/harness-project-config.ts +91 -0
  108. package/.pi/lib/harness-repair-brief.ts +145 -0
  109. package/.pi/lib/harness-run-context.ts +591 -32
  110. package/.pi/lib/harness-ui-state.ts +114 -21
  111. package/.pi/prompts/harness-auto.md +10 -10
  112. package/.pi/prompts/harness-critic.md +3 -30
  113. package/.pi/prompts/harness-eval.md +4 -37
  114. package/.pi/prompts/harness-plan.md +116 -54
  115. package/.pi/prompts/harness-review.md +150 -15
  116. package/.pi/prompts/harness-run.md +62 -10
  117. package/.pi/prompts/harness-sentrux-steward.md +55 -0
  118. package/.pi/prompts/harness-setup.md +5 -4
  119. package/.pi/prompts/harness-steer.md +30 -0
  120. package/.pi/scripts/README.md +1 -0
  121. package/.pi/scripts/graphify-kb-updater.mjs +398 -0
  122. package/.pi/scripts/harness-agents-manifest.mjs +1 -1
  123. package/.pi/scripts/harness-project-toggle.mjs +129 -0
  124. package/.pi/scripts/harness-sentrux-cli.mjs +142 -0
  125. package/.pi/scripts/harness-verify.mjs +22 -6
  126. package/.pi/scripts/harness-web-policy-guard.mjs +68 -0
  127. package/.pi/scripts/validate-plan-dag.mjs +3 -3
  128. package/AGENTS.md +1 -0
  129. package/CHANGELOG.md +23 -0
  130. package/README.md +94 -58
  131. package/package.json +5 -4
  132. package/.pi/agents/harness/executor.md +0 -47
  133. package/.pi/agents/harness/planning/scout-graphify.md +0 -37
  134. package/.pi/agents/harness/planning/scout-semantic.md +0 -39
  135. package/.pi/agents/harness/planning/scout-structure.md +0 -35
  136. package/.pi/prompts/git-sync.md +0 -124
  137. /package/.pi/agents/harness/{tie-breaker.md → reviewing/tie-breaker.md} +0 -0
@@ -0,0 +1,110 @@
1
+ # Harness practice map
2
+
3
+ Source of truth linking harness phases to proven practices (graphify corpus), agents/scripts, spawn topology, and **agent translation** (ADR 0042). Orchestrators and agents should cite this doc when unsure why a lane exists.
4
+
5
+ See also: [ADRs](adrs/README.md), [ADR 0040](adrs/0040-practice-grounded-orchestration.md), [ADR 0041](adrs/0041-intelligent-planning-reconnaissance.md), [ADR 0042](adrs/0042-agent-native-orchestration.md), [ADR 0043](adrs/0043-path-first-harness-tools.md), [ADR 0044](adrs/0044-harness-steer-loop.md), [`raw/modules/structured-planning.md`](../../../raw/modules/structured-planning.md).
6
+
7
+ ## Agent translation (human practice → agent design)
8
+
9
+ | Human practice | Agent translation |
10
+ |----------------|-------------------|
11
+ | Meeting / chair | Parent as **scheduler + gate checker** only |
12
+ | Fagan inspection rounds | **Schema-bound probes** + merge (`parallel_probes` profile) |
13
+ | Two-pizza cap per batch | **Token/spawn budget** per phase (`harness-spawn-budget.ts`) |
14
+ | RACI roles | **Disjoint prompt contexts**, not serial speakers |
15
+ | WBS decomposition | **Lake-first `execution_plan`** (few outcomes, bundled context) |
16
+ | Sprint / story points | **`executor_strategy` + lake `done_criteria`** |
17
+ | Critical path | **`critical_path_lake_ids`** |
18
+ | Replan on every failure | **Steer loop** (`implementation_gap`) vs **plan revise** (`plan_gap`) |
19
+ | Tool payloads in chat | **Path-first** approve/submit/merge (ADR 0043) |
20
+
21
+ ## Team management rules (all `/harness-*` orchestrators)
22
+
23
+ 1. **Parallelism law** — Parallel `subagent` `tasks` only when outputs are independent inputs to a later merge (implementation ∥ stack research; inspector ∥ adversary in `parallel_probes`). Never parallelize decompose ∥ hypothesis.
24
+ 2. **Two-pizza cap per batch** — Max 2 research lanes, max 1 optional `planning-context` subagent, max 1 executor, max 1 debate lane agent per `subagent` call (plan-verify may use 2 probes + integrator in separate batches).
25
+ 3. **No redundant thinkers** — If artifact X exists, downstream agents read it; they do not re-derive (e.g. decompose after `planning-context.yaml`).
26
+ 4. **Sequential dependency chain** — planning context → problem framing / decompose → hypothesis → research → synthesis/author → DAG → plan-verify → approve → execute → review → (steer)* → policy.
27
+ 5. **Plan-verify (agent-native)** — For `fast`/`standard`, parallel probes then integrator; parent is chair, not participant. Threaded debate remains for `full` until parity.
28
+ 6. **Tool intelligence** — Parent chooses graphify, sg, ccc; subprocesses optional. **Path-first:** disk is source of truth; tool args are pointers (ADR 0043).
29
+
30
+ ## `/harness-plan` — Planning Process Group
31
+
32
+ | Phase | Practice | Agent translation | Actor | Spawn |
33
+ |-------|----------|---------------------|-------|-------|
34
+ | 0 | Tooling / fast feedback | Pre-index once | Parent + `ccc` | Automatic |
35
+ | 1 | Reconnaissance before WBS | **ContextPack** on disk | Parent tools or optional `planning-context` | No default subprocess |
36
+ | 2a | Problem framing / lakes | Lake outcomes, not ticket tree | `decompose` or synthesizer section | Sequential after context gate |
37
+ | 2b | Hypothesis-driven approach | Falsifiable claim grounded in framing | `hypothesis` or synthesizer | After `artifacts/decomposition.yaml` |
38
+ | 3.5 | Spike / external research | Paths in research brief | Researchers optional | Artifacts required |
39
+ | 4 | Fork resolution (batched) | One `ask_user` gate | Parent | After 3.5 |
40
+ | 4b | Lake-first execution plan | `executor_strategy`, context bundles | `plan-synthesizer` (low/med) or `execution-plan-author` (high) | Single agent |
41
+ | 4c | Deterministic quality gate | Script, not LLM | `validate-plan-dag.mjs` | Parent; hard stop |
42
+ | 4d | Tailor process to risk | Probe depth, not meeting count | `harness_plan_debate_eligibility` | Pre plan-verify |
43
+ | 4e | Architectural intent | Fitness-function spec | `harness/sentrux-steward` optional | When structural risk |
44
+ | 5 | Plan-verify (Review Gate) | Parallel probes + integrator | Debate cast / probes | `parallel_probes` or threaded |
45
+ | 6 | Baseline + approve | Path-only `approve_plan` | Parent | `approve_plan`, `create_plan` |
46
+
47
+ ### Review Gate — debate RACI (threaded / full profile)
48
+
49
+ | Agent | Inspection role | Practice | When |
50
+ |-------|-----------------|----------|------|
51
+ | `hypothesis-validator` | Blind verifier | Independent verification (ADR 0034) | Round 1 / fast path |
52
+ | `plan-evaluator` | Inspector | Neutral checklist | Every required focus |
53
+ | `plan-adversary` | Red team | Adversarial review | Every required focus |
54
+ | `sprint-contract-auditor` | DoD auditor | Sprint contract | `quality` focus |
55
+ | `review-integrator` | Recorder | Single round artifact | End of round |
56
+ | Parent | Chair | Gates only | Always |
57
+
58
+ ### Plan-verify profiles
59
+
60
+ | Profile | When | Team shape |
61
+ |---------|------|------------|
62
+ | `full` | High risk, material fork | Threaded: all four focuses |
63
+ | `standard` | Default med | `parallel_probes`: inspector ∥ adversary → integrator |
64
+ | `light` | Low risk | Threaded: `spec` + `quality` |
65
+ | `fast` | Med/low, clear stack | Consolidated verify + blind hypothesis-validator |
66
+
67
+ ## `/harness-run` — Executing Process Group
68
+
69
+ | Step | Practice | Agent translation | Actor |
70
+ |------|----------|-------------------|-------|
71
+ | Gate | Change control | `plan_ready` required | Parent |
72
+ | Pre-work | Fitness baseline | `sentrux gate --save` | Parent |
73
+ | Work | Single implementer | `executor_strategy` | `harness/running/executor` |
74
+ | Post-work | Observation | `sentrux check` / signal artifact | Parent |
75
+ | Handoff | Generator–evaluator | `submit_executor_handoff` | Executor |
76
+ | Next | Always verify | **`/harness-review`** (not replan on blocked) | Parent routing |
77
+
78
+ ## `/harness-review` — Monitoring and Controlling
79
+
80
+ | Phase | Practice | Agent translation | Actor |
81
+ |-------|----------|-------------------|-------|
82
+ | 1 | Automated QC + fitness | Deterministic first | Parent scripts |
83
+ | 2 | Measure vs plan | Benchmark on disk | `evaluator` benchmark |
84
+ | 3 | Policy audit | Verdict (no fail-fast skip) | `evaluator` verdict |
85
+ | 4 | Red team | Tiered: full attempt 1, lite 2+ steer | `adversary` |
86
+ | 5 | Outcome + repair brief | Machine routing | Parent + `review-outcome.yaml`, `repair-brief.yaml` |
87
+ | 6 | Steer gate | One `ask_user` | harness-decisions |
88
+ | 7 | Steer / revise | `implementation_gap` → `/harness-steer`; `plan_gap` → plan revise | ADR 0044 |
89
+
90
+ `--quick` = deterministic + benchmark + verdict (no adversary). Steer attempts 2+ default to lite review unless `block_merge`.
91
+
92
+ ## `/harness-steer` — Repair sub-cycle (ADR 0044)
93
+
94
+ | Step | Practice | Actor |
95
+ |------|----------|-------|
96
+ | 0 | Read review + repair briefs | Parent |
97
+ | 1 | Policy phase → `execute` | Parent |
98
+ | 2 | Repair scope | `harness/running/executor` `mode: repair` |
99
+ | 3 | Re-verify | `/harness-review` |
100
+
101
+ ## Anti-patterns
102
+
103
+ - **Do not** spawn `decompose` and `hypothesis` in the same parallel `tasks` batch.
104
+ - **Do not** run `graphify query` in `decompose` when planning-context coverage is ok (ADR 0041).
105
+ - **Do not** parallelize threaded debate lanes in one batch (except `parallel_probes` inspector ∥ adversary per ADR 0042).
106
+ - **Do not** let executor or parent self-certify.
107
+ - **Do not** stop review on benchmark fail — complete verdict and route via steer (ADR 0044).
108
+ - **Do not** tell user to run `/harness-plan "<new task>"` on test failure — use `/harness-steer` with `repair-brief.yaml`.
109
+ - **Do not** re-`approve_plan` every steer attempt — only when packet changes.
110
+ - **Do not** embed full plan packets in `approve_plan` / `submit_*` tool args (ADR 0043).
@@ -21,6 +21,8 @@ HARNESS_WEB_SEARCH_ENGINE=ddg_html
21
21
 
22
22
  # --- PostHog (optional) ---
23
23
  # Project key — required for harness_* telemetry when HARNESS_TELEMETRY_ENABLED=true
24
+ # WSL2: ultimate-pi loads 00-posthog-network-bootstrap.ts (IPv4 fetch for *.posthog.com).
25
+ # If flush still fails, set POSTHOG_ENABLED=false or fix outbound HTTPS to PostHog.
24
26
  # POSTHOG_API_KEY=
25
27
  # POSTHOG_HOST=https://us.i.posthog.com
26
28
  # POSTHOG_ENABLED=true
@@ -39,6 +41,6 @@ HARNESS_WEB_SEARCH_ENGINE=ddg_html
39
41
  # --- Wiki / Obsidian vault (optional) ---
40
42
  VAULT_WIKI_PATH=vault/wiki
41
43
 
42
- # --- Sentrux gate (optional) ---
43
- # Require Sentrux stub for harness-verify (see .pi/scripts/harness-verify.mjs)
44
- # HARNESS_SENTRUX_REQUIRED=true
44
+ # --- Sentrux fitness functions ---
45
+ # Require sentrux check + run signal (or CI stub) in harness-verify
46
+ HARNESS_SENTRUX_REQUIRED=true
@@ -2,5 +2,5 @@
2
2
  "schema_version": "1.0.0",
3
3
  "signal_type": "stub",
4
4
  "score": 0.5,
5
- "note": "Placeholder until Sentrux MCP is wired. Satisfies HARNESS_SENTRUX_REQUIRED gate in harness:verify."
5
+ "note": "Fallback when HARNESS_RUN_DIR/artifacts/sentrux-signal.yaml is absent. Prefer run signal from /harness-run (ADR 0006)."
6
6
  }
@@ -26,13 +26,16 @@ async function scanFocusCoverage(fixtureRoot, requiredFocus) {
26
26
  let last_round_index = 0;
27
27
  const { readdir } = await import("node:fs/promises");
28
28
  const files = (await readdir(art)).filter((f) =>
29
- /^review-round(?:-r\d+|-consolidated)\.yaml$/i.test(f),
29
+ /^review-round(?:-r\d+|-consolidated|-parallel-probes)\.yaml$/i.test(f),
30
30
  );
31
31
  for (const name of files.sort()) {
32
32
  const consolidated = /^review-round-consolidated\.yaml$/i.test(name);
33
+ const parallelProbes = /^review-round-parallel-probes\.yaml$/i.test(name);
33
34
  const m = consolidated
34
35
  ? ["review-round-consolidated.yaml", "1"]
35
- : /^review-round-r(\d+)\.yaml$/i.exec(name);
36
+ : parallelProbes
37
+ ? ["review-round-parallel-probes.yaml", "1"]
38
+ : /^review-round-r(\d+)\.yaml$/i.exec(name);
36
39
  if (!m) continue;
37
40
  const roundIndex = consolidated ? 1 : Number(m[1]);
38
41
  if (roundIndex > last_round_index) last_round_index = roundIndex;
@@ -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`, `PlanDecompositionBrief`, `PlanHypothesisBrief`, `PlanHypothesisEval`, `PlanAdversaryBrief`)
16
+ - planning (`PlanPacket`, `PlanPlanningContext`, `PlanDecompositionBrief`, `PlanHypothesisBrief`, `PlanHypothesisEval`, `PlanAdversaryBrief`, legacy `PlanScoutFindings`)
17
17
  - execution telemetry (`RunTrace`, `HarnessRunRecord`)
18
18
  - PostHog harness events (`HarnessPostHogEvent`)
19
19
  - observation bus (`HarnessObservation`)
@@ -75,6 +75,17 @@
75
75
  },
76
76
  "turn_override_run_id": {
77
77
  "type": ["string", "null"]
78
+ },
79
+ "steer_approved": {
80
+ "type": "boolean"
81
+ },
82
+ "steer_attempt": {
83
+ "type": "integer",
84
+ "minimum": 0
85
+ },
86
+ "steer_max_attempts": {
87
+ "type": "integer",
88
+ "minimum": 1
78
89
  }
79
90
  }
80
91
  }
@@ -14,7 +14,7 @@
14
14
  "agent": {
15
15
  "type": "string",
16
16
  "minLength": 1,
17
- "description": "Target subagent id, e.g. harness/planning/scout-graphify"
17
+ "description": "Target subagent id, e.g. harness/running/executor"
18
18
  },
19
19
  "mode": {
20
20
  "type": "string",
@@ -23,6 +23,7 @@
23
23
  "revise",
24
24
  "plan_review",
25
25
  "execute",
26
+ "repair",
26
27
  "benchmark",
27
28
  "verdict",
28
29
  "adversary",
@@ -61,6 +62,19 @@
61
62
  "handoff_summary": {
62
63
  "type": "string",
63
64
  "description": "Prior phase bullet summary for chained spawns (harness-auto)"
65
+ },
66
+ "critical_path_work_item_ids": {
67
+ "type": "array",
68
+ "items": { "type": "string", "minLength": 1 },
69
+ "description": "Limiting-step work item ids from execution_plan.schedule_metadata (execute phase)"
70
+ },
71
+ "repair_brief_path": {
72
+ "type": "string",
73
+ "description": "Path to repair-brief.yaml (steer / repair mode)"
74
+ },
75
+ "executor_strategy": {
76
+ "type": "string",
77
+ "enum": ["single_pass", "per_lake", "per_work_item"]
64
78
  }
65
79
  }
66
80
  }
@@ -36,9 +36,41 @@
36
36
  "items": { "$ref": "#/$defs/risk" }
37
37
  },
38
38
  "schedule_metadata": { "$ref": "#/$defs/schedule_metadata" },
39
- "dag_validation": { "$ref": "#/$defs/dag_validation" }
39
+ "dag_validation": { "$ref": "#/$defs/dag_validation" },
40
+ "lakes": {
41
+ "type": "array",
42
+ "items": { "$ref": "#/$defs/lake" }
43
+ },
44
+ "executor_strategy": {
45
+ "type": "string",
46
+ "enum": ["single_pass", "per_lake", "per_work_item"]
47
+ },
48
+ "critical_path_lake_ids": {
49
+ "type": "array",
50
+ "items": { "type": "string", "minLength": 1 }
51
+ }
40
52
  },
41
53
  "$defs": {
54
+ "lake": {
55
+ "type": "object",
56
+ "additionalProperties": false,
57
+ "required": ["lake_id", "title", "outcome", "done_criteria"],
58
+ "properties": {
59
+ "lake_id": { "type": "string", "minLength": 1 },
60
+ "title": { "type": "string", "minLength": 1 },
61
+ "outcome": { "type": "string", "minLength": 1 },
62
+ "done_criteria": { "type": "string", "minLength": 1 },
63
+ "context_bundle_path": { "type": "string", "minLength": 1 },
64
+ "files": {
65
+ "type": "array",
66
+ "items": { "type": "string", "minLength": 1 }
67
+ },
68
+ "out_of_scope": {
69
+ "type": "array",
70
+ "items": { "type": "string", "minLength": 1 }
71
+ }
72
+ }
73
+ },
42
74
  "phase": {
43
75
  "type": "object",
44
76
  "additionalProperties": false,
@@ -107,6 +139,12 @@
107
139
  "type": "array",
108
140
  "minItems": 1,
109
141
  "items": { "type": "string", "minLength": 1 }
142
+ },
143
+ "lake_id": { "type": "string", "minLength": 1 },
144
+ "context_bundle_path": { "type": "string", "minLength": 1 },
145
+ "context_refs": {
146
+ "type": "array",
147
+ "items": { "type": "string", "minLength": 1 }
110
148
  }
111
149
  }
112
150
  },
@@ -94,6 +94,10 @@
94
94
  },
95
95
  "execution_plan": {
96
96
  "$ref": "plan-execution-plan.schema.json"
97
+ },
98
+ "executor_strategy": {
99
+ "type": "string",
100
+ "enum": ["single_pass", "per_lake", "per_work_item"]
97
101
  }
98
102
  }
99
103
  }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ultimate-pi.local/.pi/harness/specs/plan-phase-status.schema.json",
4
+ "title": "PlanPhaseStatus",
5
+ "description": "Orchestrator-recorded plan phase outcome before baseline approval.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["schema_version", "plan_status"],
9
+ "properties": {
10
+ "schema_version": { "type": "string", "const": "1.0.0" },
11
+ "plan_status": {
12
+ "type": "string",
13
+ "enum": ["ready", "partial", "needs_clarification"]
14
+ },
15
+ "notes": { "type": "string" }
16
+ }
17
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ultimate-pi.local/.pi/harness/specs/plan-phase-waiver.schema.json",
4
+ "title": "PlanPhaseWaiver",
5
+ "description": "Explicit human waiver for partial scouts or plan-phase blockers before approve_plan.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["schema_version", "waived"],
9
+ "properties": {
10
+ "schema_version": { "type": "string", "const": "1.0.0" },
11
+ "waived": {
12
+ "type": "array",
13
+ "minItems": 1,
14
+ "items": {
15
+ "type": "object",
16
+ "additionalProperties": false,
17
+ "required": ["reason", "rationale"],
18
+ "properties": {
19
+ "reason": { "type": "string", "minLength": 1 },
20
+ "rationale": { "type": "string", "minLength": 1 }
21
+ }
22
+ }
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ultimate-pi.local/.pi/harness/specs/plan-planning-context.schema.json",
4
+ "title": "PlanPlanningContext",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": ["schema_version", "status", "summary", "coverage"],
8
+ "properties": {
9
+ "schema_version": { "type": "string", "const": "1.0.0" },
10
+ "status": {
11
+ "type": "string",
12
+ "enum": ["ok", "partial", "failed", "error"]
13
+ },
14
+ "task_ref": { "type": "string" },
15
+ "summary": { "type": "string", "minLength": 1 },
16
+ "coverage": {
17
+ "type": "object",
18
+ "required": ["architecture", "structure"],
19
+ "properties": {
20
+ "architecture": { "$ref": "#/$defs/coverageLane" },
21
+ "structure": { "$ref": "#/$defs/coverageLane" },
22
+ "semantic": { "$ref": "#/$defs/coverageLane" }
23
+ },
24
+ "additionalProperties": true
25
+ },
26
+ "findings": { "type": "array" },
27
+ "key_paths": { "type": "array", "items": { "type": "string" } },
28
+ "evidence_refs": { "type": "array" },
29
+ "open_questions": { "type": "array" }
30
+ },
31
+ "$defs": {
32
+ "coverageLane": {
33
+ "type": "object",
34
+ "required": ["status"],
35
+ "properties": {
36
+ "status": {
37
+ "type": "string",
38
+ "enum": ["ok", "partial", "skipped", "failed", "error"]
39
+ },
40
+ "tools_used": {
41
+ "type": "array",
42
+ "items": { "type": "string" }
43
+ },
44
+ "summary": { "type": "string" },
45
+ "key_paths": { "type": "array", "items": { "type": "string" } }
46
+ },
47
+ "additionalProperties": true
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ultimate-pi.local/.pi/harness/specs/repair-brief.schema.json",
4
+ "title": "RepairBrief",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema_version",
9
+ "run_id",
10
+ "steer_attempt",
11
+ "remediation_class",
12
+ "source_artifacts",
13
+ "fix_directives"
14
+ ],
15
+ "properties": {
16
+ "schema_version": { "type": "string", "const": "1.0.0" },
17
+ "run_id": { "type": "string", "minLength": 1 },
18
+ "steer_attempt": { "type": "integer", "minimum": 1 },
19
+ "remediation_class": {
20
+ "type": "string",
21
+ "enum": ["implementation_gap", "plan_gap", "rollback", "inconclusive"]
22
+ },
23
+ "source_artifacts": {
24
+ "type": "object",
25
+ "additionalProperties": { "type": "string" }
26
+ },
27
+ "failed_acceptance_check_ids": {
28
+ "type": "array",
29
+ "items": { "type": "string", "minLength": 1 }
30
+ },
31
+ "priority_lake_ids": {
32
+ "type": "array",
33
+ "items": { "type": "string", "minLength": 1 }
34
+ },
35
+ "fix_directives": {
36
+ "type": "array",
37
+ "minItems": 1,
38
+ "items": { "type": "string", "minLength": 1 }
39
+ },
40
+ "constraints": {
41
+ "type": "array",
42
+ "items": { "type": "string", "minLength": 1 }
43
+ }
44
+ }
45
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ultimate-pi.local/.pi/harness/specs/review-outcome.schema.json",
4
+ "title": "ReviewOutcome",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema_version",
9
+ "run_id",
10
+ "status",
11
+ "remediation_class",
12
+ "recommended_next"
13
+ ],
14
+ "properties": {
15
+ "schema_version": { "type": "string", "const": "1.0.0" },
16
+ "run_id": { "type": "string", "minLength": 1 },
17
+ "status": {
18
+ "type": "string",
19
+ "enum": ["pass", "fail", "inconclusive"]
20
+ },
21
+ "remediation_class": {
22
+ "type": "string",
23
+ "enum": [
24
+ "pass",
25
+ "implementation_gap",
26
+ "plan_gap",
27
+ "rollback",
28
+ "inconclusive"
29
+ ]
30
+ },
31
+ "recommended_next": { "type": "string", "minLength": 1 },
32
+ "failed_acceptance_check_ids": {
33
+ "type": "array",
34
+ "items": { "type": "string", "minLength": 1 }
35
+ },
36
+ "steer_attempt": { "type": "integer", "minimum": 0 },
37
+ "review_tier": {
38
+ "type": "string",
39
+ "enum": ["full", "lite"]
40
+ },
41
+ "source_artifacts": {
42
+ "type": "object",
43
+ "additionalProperties": { "type": "string" }
44
+ }
45
+ }
46
+ }
@@ -0,0 +1,80 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ultimate-pi.local/.pi/harness/specs/sentrux-manifest-proposal.schema.json",
4
+ "title": "SentruxManifestProposal",
5
+ "description": "Graphify-grounded proposal to evolve architecture.manifest.json (intent layer). Chair applies after approval.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schema_version",
10
+ "change_class",
11
+ "summary",
12
+ "evidence",
13
+ "manifest_patch",
14
+ "adr_required",
15
+ "human_required"
16
+ ],
17
+ "properties": {
18
+ "schema_version": {
19
+ "type": "string",
20
+ "const": "1.0.0"
21
+ },
22
+ "change_class": {
23
+ "type": "string",
24
+ "enum": [
25
+ "none",
26
+ "tune_constraint",
27
+ "add_boundary",
28
+ "add_layer",
29
+ "split_layer"
30
+ ]
31
+ },
32
+ "summary": {
33
+ "type": "string",
34
+ "minLength": 1
35
+ },
36
+ "evidence": {
37
+ "type": "array",
38
+ "items": {
39
+ "type": "object",
40
+ "additionalProperties": false,
41
+ "required": ["source", "ref", "summary"],
42
+ "properties": {
43
+ "source": {
44
+ "type": "string",
45
+ "enum": ["graphify", "sg", "sentrux", "plan", "manifest"]
46
+ },
47
+ "ref": {
48
+ "type": "string",
49
+ "minLength": 1
50
+ },
51
+ "summary": {
52
+ "type": "string",
53
+ "minLength": 1
54
+ }
55
+ }
56
+ }
57
+ },
58
+ "manifest_patch": {
59
+ "type": "object",
60
+ "description": "JSON Merge Patch (RFC 7396) ops against architecture.manifest.json",
61
+ "additionalProperties": true
62
+ },
63
+ "adr_required": {
64
+ "type": "boolean"
65
+ },
66
+ "adr_draft": {
67
+ "type": "string"
68
+ },
69
+ "human_required": {
70
+ "type": "boolean"
71
+ },
72
+ "open_questions": {
73
+ "type": "array",
74
+ "items": {
75
+ "type": "string",
76
+ "minLength": 1
77
+ }
78
+ }
79
+ }
80
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ultimate-pi.local/.pi/harness/specs/sentrux-signal.schema.json",
4
+ "title": "SentruxSignal",
5
+ "description": "Per-run Sentrux CLI observation for evaluator and harness-verify promotion.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schema_version",
10
+ "run_id",
11
+ "check_pass",
12
+ "gate_status",
13
+ "recorded_at"
14
+ ],
15
+ "properties": {
16
+ "schema_version": {
17
+ "type": "string",
18
+ "const": "1.0.0"
19
+ },
20
+ "run_id": {
21
+ "type": "string",
22
+ "minLength": 1
23
+ },
24
+ "check_pass": {
25
+ "type": "boolean"
26
+ },
27
+ "gate_status": {
28
+ "type": "string",
29
+ "enum": ["pass", "degraded", "skipped", "not_installed"]
30
+ },
31
+ "quality_signal_summary": {
32
+ "type": "string"
33
+ },
34
+ "recorded_at": {
35
+ "type": "string",
36
+ "format": "date-time"
37
+ },
38
+ "phase": {
39
+ "type": "string",
40
+ "enum": ["execute", "evaluate", "review"]
41
+ }
42
+ }
43
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ultimate-pi.local/.pi/harness/specs/steer-state.schema.json",
4
+ "title": "SteerState",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schema_version", "run_id", "attempt", "max_attempts", "active"],
8
+ "properties": {
9
+ "schema_version": { "type": "string", "const": "1.0.0" },
10
+ "run_id": { "type": "string", "minLength": 1 },
11
+ "attempt": { "type": "integer", "minimum": 0 },
12
+ "max_attempts": { "type": "integer", "minimum": 1 },
13
+ "active": { "type": "boolean" },
14
+ "steer_approved": { "type": "boolean" },
15
+ "last_review_tier": {
16
+ "type": "string",
17
+ "enum": ["full", "lite"]
18
+ }
19
+ }
20
+ }