ultimate-pi 0.18.0 → 0.19.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 (314) hide show
  1. package/.agents/skills/harness-debate-plan/SKILL.md +1 -1
  2. package/.agents/skills/harness-decisions/SKILL.md +2 -3
  3. package/.agents/skills/harness-governor/SKILL.md +6 -5
  4. package/.agents/skills/harness-orchestration/SKILL.md +4 -4
  5. package/.agents/skills/harness-review/SKILL.md +7 -7
  6. package/.agents/skills/harness-sentrux-setup/SKILL.md +4 -3
  7. package/.agents/skills/harness-steer/SKILL.md +1 -1
  8. package/.agents/skills/sentrux/SKILL.md +9 -9
  9. package/.pi/PACKAGING.md +4 -4
  10. package/.pi/SYSTEM.md +54 -120
  11. package/.pi/agents/harness/incident-recorder.md +0 -1
  12. package/.pi/agents/harness/planning/decompose.md +1 -3
  13. package/.pi/agents/harness/planning/execution-plan-author.md +0 -2
  14. package/.pi/agents/harness/planning/hypothesis-validator.md +0 -2
  15. package/.pi/agents/harness/planning/hypothesis.md +0 -2
  16. package/.pi/agents/harness/planning/implementation-researcher.md +0 -2
  17. package/.pi/agents/harness/planning/plan-adversary.md +0 -2
  18. package/.pi/agents/harness/planning/plan-evaluator.md +1 -3
  19. package/.pi/agents/harness/planning/planning-context.md +0 -2
  20. package/.pi/agents/harness/planning/review-integrator.md +0 -2
  21. package/.pi/agents/harness/planning/sprint-contract-auditor.md +0 -2
  22. package/.pi/agents/harness/planning/stack-researcher.md +0 -2
  23. package/.pi/agents/harness/{adversary.md → reviewing/adversary.md} +0 -2
  24. package/.pi/agents/harness/{evaluator.md → reviewing/evaluator.md} +0 -2
  25. package/.pi/agents/harness/{tie-breaker.md → reviewing/tie-breaker.md} +0 -2
  26. package/.pi/agents/harness/{executor.md → running/executor.md} +0 -2
  27. package/.pi/agents/harness/sentrux-bootstrap.md +0 -1
  28. package/.pi/agents/harness/sentrux-steward.md +0 -2
  29. package/.pi/agents/harness/trace-librarian.md +0 -1
  30. package/.pi/extensions/00-harness-project-control.ts +133 -0
  31. package/.pi/extensions/00-posthog-network-bootstrap.ts +1 -1
  32. package/.pi/extensions/agt-kill-switch.ts +57 -0
  33. package/.pi/extensions/agt-prompt-guard.ts +32 -0
  34. package/.pi/extensions/budget-guard.ts +2 -0
  35. package/.pi/extensions/custom-footer.ts +46 -145
  36. package/.pi/extensions/custom-header.ts +1 -1
  37. package/.pi/extensions/custom-system-prompt.ts +1 -1
  38. package/.pi/extensions/debate-orchestrator.ts +7 -5
  39. package/.pi/extensions/harness-ask-user.ts +8 -8
  40. package/.pi/extensions/harness-debate-tools.ts +27 -43
  41. package/.pi/extensions/harness-lens.ts +94 -0
  42. package/.pi/extensions/harness-live-widget.ts +33 -2
  43. package/.pi/extensions/harness-plan-approval.ts +12 -12
  44. package/.pi/extensions/harness-run-context.ts +1214 -852
  45. package/.pi/extensions/harness-subagent-governance.ts +8 -0
  46. package/.pi/extensions/harness-subagent-submit.ts +36 -164
  47. package/.pi/extensions/harness-subagents.ts +4 -4
  48. package/.pi/extensions/harness-telemetry.ts +3 -1
  49. package/.pi/extensions/harness-web-tools.ts +3 -3
  50. package/.pi/extensions/observation-bus.ts +2 -0
  51. package/.pi/extensions/policy-gate.ts +27 -5
  52. package/.pi/extensions/review-integrity.ts +91 -10
  53. package/.pi/extensions/sentrux-rules-sync.ts +3 -1
  54. package/.pi/extensions/subagent-governance.ts +92 -0
  55. package/.pi/extensions/test-diff-integrity.ts +1 -0
  56. package/.pi/extensions/trace-recorder.ts +3 -1
  57. package/.pi/extensions/{ultimate-pi-vcc.ts → vcc-compaction.ts} +1 -1
  58. package/.pi/harness/README.md +6 -2
  59. package/.pi/harness/agents.manifest.json +38 -49
  60. package/.pi/harness/agents.policy.yaml +275 -0
  61. package/.pi/harness/corpus/graphify-kb-updater.config.json +55 -0
  62. package/.pi/harness/docs/adrs/0006-sentrux-dual-layer.md +2 -1
  63. package/.pi/harness/docs/adrs/0030-inhouse-vcc-compaction.md +1 -1
  64. package/.pi/harness/docs/adrs/0035-plan-phase-review-gate.md +1 -1
  65. package/.pi/harness/docs/adrs/0044-harness-steer-loop.md +3 -2
  66. package/.pi/harness/docs/adrs/0045-harness-lens-minimal-contract.md +49 -0
  67. package/.pi/harness/docs/adrs/0045-phase-scoped-agent-directories.md +33 -0
  68. package/.pi/harness/docs/adrs/0046-agt-policy-engine.md +51 -0
  69. package/.pi/harness/docs/adrs/0047-agt-layered-security.md +39 -0
  70. package/.pi/harness/docs/adrs/0048-tool-call-hook-order.md +25 -0
  71. package/.pi/harness/docs/adrs/0049-agents-policy-manifest.md +36 -0
  72. package/.pi/harness/docs/adrs/README.md +6 -0
  73. package/.pi/harness/docs/graphify-kb-updater-runbook.md +11 -5
  74. package/.pi/harness/docs/practice-map.md +2 -2
  75. package/.pi/harness/evolution/README.md +1 -2
  76. package/.pi/harness/examples/agents.policy.project.yaml +19 -0
  77. package/.pi/harness/examples/policies/custom-deny-bash.yaml +9 -0
  78. package/.pi/harness/policies/bash-denylists.yaml +5 -0
  79. package/.pi/harness/policies/defaults.yaml +51 -0
  80. package/.pi/harness/policies/orchestrator.yaml +18 -0
  81. package/.pi/harness/policies/phases.yaml +10 -0
  82. package/.pi/harness/policies/roles.yaml +5 -0
  83. package/.pi/harness/policies/web-guard.yaml +5 -0
  84. package/.pi/harness/policies/workflow-sequences.yaml +9 -0
  85. package/.pi/harness/sentrux/architecture.manifest.json +26 -4
  86. package/.pi/harness/specs/harness-spawn-context.schema.json +1 -1
  87. package/.pi/harness/specs/observation.schema.json +2 -1
  88. package/.pi/lib/agents-policy.d.mts +70 -0
  89. package/.pi/lib/agents-policy.mjs +325 -0
  90. package/.pi/lib/agents-policy.ts +19 -0
  91. package/.pi/lib/agt/audit-run-sink.ts +52 -0
  92. package/.pi/lib/agt/build-evaluation-context.ts +285 -0
  93. package/.pi/lib/agt/config.ts +28 -0
  94. package/.pi/lib/agt/delegation.ts +69 -0
  95. package/.pi/lib/agt/evaluate-policy.ts +56 -0
  96. package/.pi/lib/agt/identity-registry.ts +41 -0
  97. package/.pi/lib/agt/index.ts +55 -0
  98. package/.pi/lib/agt/kill-switch-state.ts +11 -0
  99. package/.pi/lib/agt/legacy-evaluate.ts +101 -0
  100. package/.pi/lib/agt/policy-engine.ts +154 -0
  101. package/.pi/lib/agt/rings.ts +21 -0
  102. package/.pi/lib/agt/sre-hooks.ts +45 -0
  103. package/.pi/lib/agt/trust-run-store.ts +26 -0
  104. package/.pi/lib/agt/workflow-history.ts +29 -0
  105. package/.pi/lib/agt-governance-active.ts +14 -0
  106. package/.pi/lib/agt-tool-guard.ts +78 -0
  107. package/.pi/lib/ask-user/dialog.ts +314 -0
  108. package/.pi/{extensions/lib → lib}/debate-bus-core.ts +10 -10
  109. package/.pi/{extensions/lib → lib}/debate-bus-state.ts +1 -1
  110. package/.pi/{extensions/lib → lib}/extension-load-guard.ts +21 -0
  111. package/.pi/lib/harness-agt-tool-guard.ts +5 -0
  112. package/.pi/{extensions/lib → lib}/harness-artifact-gate.ts +6 -16
  113. package/.pi/lib/harness-debate-core-deps.ts +14 -0
  114. package/.pi/lib/harness-debate-workflow-deps.ts +43 -0
  115. package/.pi/lib/harness-lens/.gitattributes +1 -0
  116. package/.pi/lib/harness-lens/clients/edit-autopatch.ts +88 -0
  117. package/.pi/lib/harness-lens/clients/file-kinds.ts +380 -0
  118. package/.pi/lib/harness-lens/clients/file-time.ts +215 -0
  119. package/.pi/lib/harness-lens/clients/file-utils.ts +484 -0
  120. package/.pi/lib/harness-lens/clients/format-service.ts +276 -0
  121. package/.pi/lib/harness-lens/clients/formatters.ts +1000 -0
  122. package/.pi/lib/harness-lens/clients/git-guard.ts +31 -0
  123. package/.pi/lib/harness-lens/clients/indent-retarget.ts +90 -0
  124. package/.pi/lib/harness-lens/clients/installer/index.ts +2368 -0
  125. package/.pi/lib/harness-lens/clients/latency-logger.ts +80 -0
  126. package/.pi/lib/harness-lens/clients/lens-config.ts +43 -0
  127. package/.pi/lib/harness-lens/clients/lens-events.ts +164 -0
  128. package/.pi/lib/harness-lens/clients/lsp/aggregation.ts +91 -0
  129. package/.pi/lib/harness-lens/clients/lsp/client.ts +1466 -0
  130. package/.pi/lib/harness-lens/clients/lsp/config.ts +216 -0
  131. package/.pi/lib/harness-lens/clients/lsp/edits.ts +297 -0
  132. package/.pi/lib/harness-lens/clients/lsp/index.ts +1355 -0
  133. package/.pi/lib/harness-lens/clients/lsp/interactive-install.ts +424 -0
  134. package/.pi/lib/harness-lens/clients/lsp/language.ts +223 -0
  135. package/.pi/lib/harness-lens/clients/lsp/launch.ts +939 -0
  136. package/.pi/lib/harness-lens/clients/lsp/lsp-index.ts +11 -0
  137. package/.pi/lib/harness-lens/clients/lsp/path-utils.ts +12 -0
  138. package/.pi/lib/harness-lens/clients/lsp/server-strategies.ts +81 -0
  139. package/.pi/lib/harness-lens/clients/lsp/server.ts +1971 -0
  140. package/.pi/lib/harness-lens/clients/path-utils.ts +182 -0
  141. package/.pi/lib/harness-lens/clients/pipeline.ts +360 -0
  142. package/.pi/lib/harness-lens/clients/project-profile.ts +117 -0
  143. package/.pi/lib/harness-lens/clients/runtime-agent-end.ts +112 -0
  144. package/.pi/lib/harness-lens/clients/runtime-config.ts +33 -0
  145. package/.pi/lib/harness-lens/clients/runtime-coordinator.ts +186 -0
  146. package/.pi/lib/harness-lens/clients/runtime-tool-result.ts +171 -0
  147. package/.pi/lib/harness-lens/clients/safe-spawn.ts +339 -0
  148. package/.pi/lib/harness-lens/clients/secrets-scanner.ts +214 -0
  149. package/.pi/lib/harness-lens/clients/tool-policy.ts +2072 -0
  150. package/.pi/lib/harness-lens/clients/types.ts +59 -0
  151. package/.pi/lib/harness-lens/clients/widget-state.ts +283 -0
  152. package/.pi/lib/harness-lens/index.ts +532 -0
  153. package/.pi/lib/harness-lens/tools/lsp-diagnostics.ts +706 -0
  154. package/.pi/lib/harness-lens/tools/lsp-navigation.ts +1246 -0
  155. package/.pi/{extensions/lib → lib}/harness-posthog.ts +3 -0
  156. package/.pi/lib/harness-project-config.ts +91 -0
  157. package/.pi/lib/harness-run-context-responses.ts +9 -0
  158. package/.pi/lib/harness-run-context.ts +1 -3
  159. package/.pi/{extensions/lib/spawn-policy.ts → lib/harness-spawn-policy.ts} +4 -3
  160. package/.pi/{extensions/lib → lib}/harness-spawn-topology.ts +5 -28
  161. package/.pi/lib/harness-subagent-auth.ts +51 -0
  162. package/.pi/{extensions/lib → lib}/harness-subagent-precheck.ts +13 -10
  163. package/.pi/{extensions/lib → lib}/harness-subagent-submit-pipeline.ts +3 -3
  164. package/.pi/lib/harness-subagent-submit-register.ts +163 -0
  165. package/.pi/{extensions/lib → lib}/harness-subagent-submit-registry.ts +1 -55
  166. package/.pi/{extensions/lib → lib}/harness-subagents-bridge.ts +53 -14
  167. package/.pi/{extensions/lib → lib}/harness-subprocess-bootstrap.ts +1 -1
  168. package/.pi/lib/harness-ui-state.ts +27 -12
  169. package/.pi/{extensions/lib → lib}/plan-approval/create-plan.ts +2 -2
  170. package/.pi/{extensions/lib → lib}/plan-approval/format-plan.ts +2 -2
  171. package/.pi/{extensions/lib → lib}/plan-approval/plan-review.ts +162 -201
  172. package/.pi/{extensions/lib → lib}/plan-approval/render.ts +1 -1
  173. package/.pi/{extensions/lib → lib}/plan-approval/resolve-disk.ts +2 -2
  174. package/.pi/{extensions/lib → lib}/plan-approval/types.ts +1 -1
  175. package/.pi/{extensions/lib → lib}/plan-approval/validate.ts +3 -3
  176. package/.pi/{extensions/lib → lib}/plan-approval-readiness.ts +3 -52
  177. package/.pi/{extensions/lib → lib}/plan-debate-envelope.ts +1 -1
  178. package/.pi/{extensions/lib → lib}/plan-debate-gate.ts +1 -1
  179. package/.pi/{extensions/lib → lib}/plan-debate-lane.ts +1 -4
  180. package/.pi/{extensions/lib → lib}/plan-messenger.ts +1 -1
  181. package/.pi/prompts/harness-auto.md +2 -2
  182. package/.pi/prompts/harness-plan.md +4 -6
  183. package/.pi/prompts/harness-review.md +9 -9
  184. package/.pi/prompts/harness-run.md +7 -7
  185. package/.pi/prompts/harness-setup.md +42 -68
  186. package/.pi/prompts/harness-steer.md +2 -2
  187. package/.pi/scripts/README.md +3 -5
  188. package/.pi/scripts/generate-agents-policy-yaml.mjs +148 -0
  189. package/.pi/scripts/graphify-kb-updater.mjs +48 -8
  190. package/.pi/scripts/harness-agents-manifest.mjs +61 -4
  191. package/.pi/scripts/harness-agt-doctor.ts +36 -0
  192. package/.pi/scripts/harness-cli-verify.sh +9 -2
  193. package/.pi/scripts/harness-project-toggle.mjs +129 -0
  194. package/.pi/scripts/harness-sentrux-cli.mjs +142 -0
  195. package/.pi/scripts/harness-verify.mjs +113 -39
  196. package/.pi/scripts/harness-web-policy-guard.mjs +2 -2
  197. package/.pi/scripts/validate-plan-dag.mjs +65 -74
  198. package/.pi/scripts/vendor-pi-vcc-settings.stub.ts +2 -2
  199. package/.pi/scripts/vendor-sync-pi-vcc.sh +1 -1
  200. package/.pi/skills/architecture/broker-domain/SKILL.md +65 -0
  201. package/.pi/skills/architecture/cqrs/SKILL.md +63 -0
  202. package/.pi/skills/architecture/event-driven/SKILL.md +60 -0
  203. package/.pi/skills/architecture/hexagonal-ports-adapters/SKILL.md +66 -0
  204. package/.pi/skills/architecture/layered/SKILL.md +68 -0
  205. package/.pi/skills/architecture/microkernel/SKILL.md +62 -0
  206. package/.pi/skills/architecture/microservices/SKILL.md +64 -0
  207. package/.pi/skills/architecture/modular-monolith/SKILL.md +65 -0
  208. package/.pi/skills/architecture/orchestration-driven-soa/SKILL.md +61 -0
  209. package/.pi/skills/architecture/pipeline/SKILL.md +63 -0
  210. package/.pi/skills/architecture/service-based/SKILL.md +64 -0
  211. package/.pi/skills/architecture/service-mesh/SKILL.md +60 -0
  212. package/.pi/skills/architecture/space-based/SKILL.md +60 -0
  213. package/.pi/skills/ast-grep/SKILL.md +40 -321
  214. package/.pi/skills/delivery/debugging-discipline/SKILL.md +36 -0
  215. package/.pi/skills/delivery/documentation-update/SKILL.md +33 -0
  216. package/.pi/skills/delivery/requirements-to-implementation/SKILL.md +34 -0
  217. package/.pi/skills/delivery/risk-based-verification/SKILL.md +43 -0
  218. package/.pi/skills/delivery/tradeoff-analysis/SKILL.md +34 -0
  219. package/.pi/skills/engineering/api-contract-design/SKILL.md +38 -0
  220. package/.pi/skills/engineering/cohesion-coupling/SKILL.md +43 -0
  221. package/.pi/skills/engineering/complexity-control/SKILL.md +31 -0
  222. package/.pi/skills/engineering/defensive-programming/SKILL.md +38 -0
  223. package/.pi/skills/engineering/dependency-management/SKILL.md +29 -0
  224. package/.pi/skills/engineering/domain-modeling/SKILL.md +32 -0
  225. package/.pi/skills/engineering/error-handling/SKILL.md +37 -0
  226. package/.pi/skills/engineering/legacy-code-seams/SKILL.md +35 -0
  227. package/.pi/skills/engineering/naming-and-intent/SKILL.md +29 -0
  228. package/.pi/skills/engineering/refactoring-safe-evolution/SKILL.md +35 -0
  229. package/.pi/skills/engineering/routine-function-design/SKILL.md +34 -0
  230. package/.pi/skills/engineering/small-change-discipline/SKILL.md +35 -0
  231. package/.pi/skills/lsp-navigation/SKILL.md +89 -0
  232. package/.pi/skills/quality/code-review-self-check/SKILL.md +35 -0
  233. package/.pi/skills/quality/privacy-data-handling/SKILL.md +26 -0
  234. package/.pi/skills/quality/security-review/SKILL.md +34 -0
  235. package/.pi/skills/quality/test-strategy/SKILL.md +33 -0
  236. package/.pi/skills/quality/testability-design/SKILL.md +33 -0
  237. package/.pi/skills/systems/concurrency-safety/SKILL.md +32 -0
  238. package/.pi/skills/systems/data-modeling-migrations/SKILL.md +31 -0
  239. package/.pi/skills/systems/observability-instrumentation/SKILL.md +32 -0
  240. package/.pi/skills/systems/performance-measurement/SKILL.md +35 -0
  241. package/.pi/skills/systems/reliability-design/SKILL.md +32 -0
  242. package/.sentrux/rules.toml +20 -4
  243. package/AGENTS.md +5 -0
  244. package/CHANGELOG.md +26 -0
  245. package/README.md +85 -58
  246. package/THIRD_PARTY_NOTICES.md +12 -21
  247. package/package.json +15 -7
  248. package/vendor/pi-subagents/src/agents.ts +45 -1
  249. package/vendor/pi-subagents/src/subagents.ts +866 -811
  250. package/vendor/pi-vcc/src/core/brief.ts +68 -99
  251. package/vendor/pi-vcc/src/core/settings.ts +2 -2
  252. package/.agents/skills/caveman/SKILL.md +0 -67
  253. package/.pi/agents/harness/meta-optimizer.md +0 -36
  254. package/.pi/agents/harness/planning/scout-graphify.md +0 -39
  255. package/.pi/agents/harness/planning/scout-semantic.md +0 -41
  256. package/.pi/agents/harness/planning/scout-structure.md +0 -37
  257. package/.pi/extensions/lib/ask-user/dialog.ts +0 -260
  258. package/.pi/extensions/lib/harness-subagent-auth.ts +0 -209
  259. package/.pi/extensions/lib/harness-subagent-policy.ts +0 -236
  260. package/.pi/extensions/pi-model-router-harness.ts +0 -42
  261. package/.pi/harness/evolution/meta-optimizer.mjs +0 -99
  262. package/.pi/harness/specs/router-tuning-proposal.schema.json +0 -114
  263. package/.pi/model-router.example.json +0 -36
  264. package/.pi/prompts/harness-critic.md +0 -10
  265. package/.pi/prompts/harness-eval.md +0 -10
  266. package/.pi/prompts/harness-router-tune.md +0 -52
  267. package/.pi/scripts/harness-generate-model-router.mjs +0 -327
  268. package/.pi/scripts/harness-model-router-routing.test.mjs +0 -97
  269. package/.pi/scripts/harness-sync-model-router.mjs +0 -97
  270. package/.pi/scripts/vendor-sync-pi-model-router.sh +0 -47
  271. package/vendor/pi-model-router/.prettierignore +0 -4
  272. package/vendor/pi-model-router/.prettierrc +0 -5
  273. package/vendor/pi-model-router/AGENTS.md +0 -39
  274. package/vendor/pi-model-router/LICENSE +0 -21
  275. package/vendor/pi-model-router/README.md +0 -99
  276. package/vendor/pi-model-router/UPSTREAM_PIN.md +0 -10
  277. package/vendor/pi-model-router/docs/ARCHITECTURE.md +0 -54
  278. package/vendor/pi-model-router/extensions/commands.ts +0 -720
  279. package/vendor/pi-model-router/extensions/config.ts +0 -348
  280. package/vendor/pi-model-router/extensions/constants.ts +0 -1
  281. package/vendor/pi-model-router/extensions/index.ts +0 -478
  282. package/vendor/pi-model-router/extensions/provider.ts +0 -580
  283. package/vendor/pi-model-router/extensions/routing.ts +0 -564
  284. package/vendor/pi-model-router/extensions/state.ts +0 -52
  285. package/vendor/pi-model-router/extensions/types.ts +0 -95
  286. package/vendor/pi-model-router/extensions/ui.ts +0 -144
  287. package/vendor/pi-model-router/model-router.example.json +0 -48
  288. package/vendor/pi-model-router/package.json +0 -48
  289. package/vendor/pi-model-router/tsconfig.json +0 -16
  290. /package/.pi/{prompts → harness/docs}/planning-rubrics.md +0 -0
  291. /package/.pi/{extensions/lib → lib}/ask-user/fallback.ts +0 -0
  292. /package/.pi/{extensions/lib → lib}/ask-user/render.ts +0 -0
  293. /package/.pi/{extensions/lib → lib}/ask-user/schema.ts +0 -0
  294. /package/.pi/{extensions/lib → lib}/ask-user/types.ts +0 -0
  295. /package/.pi/{extensions/lib → lib}/ask-user/validate-core.mjs +0 -0
  296. /package/.pi/{extensions/lib → lib}/ask-user/validate.ts +0 -0
  297. /package/.pi/{extensions/lib → lib}/harness-cocoindex-refresh.ts +0 -0
  298. /package/.pi/{extensions/lib → lib}/harness-paths.ts +0 -0
  299. /package/.pi/{extensions/lib → lib}/harness-spawn-budget.ts +0 -0
  300. /package/.pi/{extensions/lib → lib}/harness-vcc-settings.ts +0 -0
  301. /package/.pi/{extensions/lib → lib}/harness-web/run-cli.ts +0 -0
  302. /package/.pi/{extensions/lib → lib}/plan-approval/dialog.ts +0 -0
  303. /package/.pi/{extensions/lib → lib}/plan-approval/schema.ts +0 -0
  304. /package/.pi/{extensions/lib → lib}/plan-debate-eligibility.ts +0 -0
  305. /package/.pi/{extensions/lib → lib}/plan-debate-focus.ts +0 -0
  306. /package/.pi/{extensions/lib → lib}/plan-debate-id.ts +0 -0
  307. /package/.pi/{extensions/lib → lib}/plan-debate-lanes.ts +0 -0
  308. /package/.pi/{extensions/lib → lib}/plan-debate-round-status.ts +0 -0
  309. /package/.pi/{extensions/lib → lib}/plan-debate-write-guard.ts +0 -0
  310. /package/.pi/{extensions/lib → lib}/plan-review-gate.ts +0 -0
  311. /package/.pi/{extensions/lib → lib}/plan-review-integrator-rules.ts +0 -0
  312. /package/.pi/{extensions/lib → lib}/plan-scope-guard.ts +0 -0
  313. /package/.pi/{extensions/lib → lib}/posthog-client.ts +0 -0
  314. /package/.pi/{extensions/lib → lib}/posthog-node.d.ts +0 -0
@@ -13,6 +13,7 @@
13
13
  import { appendFile, mkdir } from "node:fs/promises";
14
14
  import { join } from "node:path";
15
15
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
16
+ import { isHarnessProjectEnabled } from "../lib/harness-project-config.js";
16
17
 
17
18
  const INCIDENTS_DIR = join(process.cwd(), ".pi", "harness", "incidents");
18
19
  const INCIDENT_FILE = join(INCIDENTS_DIR, "test-diff-integrity.jsonl");
@@ -10,6 +10,8 @@
10
10
  import { appendFile, mkdir, readFile, writeFile } from "node:fs/promises";
11
11
  import { join } from "node:path";
12
12
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
13
+ import { captureHarnessEvent } from "../lib/harness-posthog.js";
14
+ import { isHarnessProjectEnabled } from "../lib/harness-project-config.js";
13
15
  import {
14
16
  getLatestRunContext,
15
17
  getRunIdFromSession,
@@ -19,7 +21,6 @@ import {
19
21
  phaseTraceFileName,
20
22
  saveRunContextToDisk,
21
23
  } from "../lib/harness-run-context.js";
22
- import { captureHarnessEvent } from "./lib/harness-posthog.js";
23
24
 
24
25
  interface ToolSpan {
25
26
  tool_call_id: string;
@@ -182,6 +183,7 @@ function resolveRunIdForAgentStart(
182
183
  }
183
184
 
184
185
  export default function traceRecorder(pi: ExtensionAPI) {
186
+ if (!isHarnessProjectEnabled()) return;
185
187
  let activeRun: ActiveRun | null = null;
186
188
  let lastUserPrompt = "";
187
189
 
@@ -11,7 +11,7 @@
11
11
 
12
12
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
13
13
  import registerVcc from "../../vendor/pi-vcc/index.js";
14
- import { claimExtensionLoad } from "./lib/extension-load-guard.js";
14
+ import { claimExtensionLoad } from "../lib/extension-load-guard.js";
15
15
 
16
16
  // @ts-expect-error pi extensions run as ESM
17
17
  const MODULE_URL = import.meta.url;
@@ -8,7 +8,7 @@ Phase 1–2 scaffold for the Pi harness runtime surfaces.
8
8
  - `debates/` - debate round artifacts and consensus packets.
9
9
  - `docs/adrs/` - team-shared Architectural Decision Records ([index](docs/adrs/README.md)).
10
10
  - `evals/smoke/` - deterministic fixtures (no CI LLM).
11
- - `evolution/` - self-healing rules + meta-optimizer (JSONL-first).
11
+ - `evolution/` - self-healing rules and chaos drills (JSONL-first).
12
12
  - `corpus/` - ingest notes for graphify/raw sources.
13
13
  - `sentrux/` - `architecture.manifest.json` source for `.sentrux/rules.toml` ([ADR 0009](docs/adrs/0009-sentrux-rules-lifecycle.md)).
14
14
 
@@ -31,7 +31,11 @@ manifest (`package.json`).
31
31
 
32
32
  - `harness-run-context.ts` - active run + plan injection; short commands without run/plan args
33
33
  - `harness-live-widget.ts` - footer status (current/next phase + plain-language status hint; no run id in UI)
34
- - `policy-gate.ts` - phase state machine + plan-before-mutate enforcement
34
+ - `policy-gate.ts` - phase state machine; tool allow/deny via AGT `PolicyEngine` (YAML under `.pi/harness/policies/`, see [ADR 0046](docs/adrs/0046-agt-policy-engine.md))
35
+ - `subagent-governance.ts` (alias `harness-subagent-governance.ts`) - subprocess AGT + `submit_*` for all subagents
36
+ - **Agent tool SSOT:** `.pi/harness/agents.policy.yaml` (package) and optional `<project>/.pi/agents.policy.yaml` — not agent `.md` frontmatter ([ADR 0049](docs/adrs/0049-agents-policy-manifest.md))
37
+ - **Project AGT rules:** `<project>/.pi/policies/*.yaml` merged after package policies
38
+ - `agt-prompt-guard.ts` / `agt-kill-switch.ts` - PromptDefense + kill switch ([ADR 0047](docs/adrs/0047-agt-layered-security.md))
35
39
  - `budget-guard.ts` - hard-stop token budget checks + budget exhausted artifacts
36
40
  - `trace-recorder.ts` - append-only run traces + HarnessRunRecord + compact index
37
41
  - `harness-telemetry.ts` - PostHog `harness_*` domain events (dual layer with `@posthog/pi`)
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "schema_version": "1.0.0",
3
3
  "package": "ultimate-pi",
4
- "package_version": "0.17.0",
5
- "generated_at": "2026-05-23T10:14:51.637Z",
4
+ "package_version": "0.18.1",
5
+ "generated_at": "2026-05-24T19:33:40.491Z",
6
+ "policy_sha256": "4c1cf8f0377e70bbcd34eecc26a2e02717fea950af3898ef03ebbab9260dfd17",
6
7
  "agents": {
7
8
  "pi-pi/agent-expert": {
8
9
  "path": ".pi/agents/pi-pi/agent-expert.md",
@@ -44,97 +45,85 @@
44
45
  "path": ".pi/agents/pi-pi/tui-expert.md",
45
46
  "sha256": "a619b2ee3d3d94fe599abb61db0904f90d30335ec426851c3f1efdf2e5ce5390"
46
47
  },
47
- "harness/adversary": {
48
- "path": ".pi/agents/harness/adversary.md",
49
- "sha256": "697ee7c784e8eb30ce96f4f16e9bb5f9cdcaae76a4a7083ace2fe4272e6d732f"
50
- },
51
- "harness/evaluator": {
52
- "path": ".pi/agents/harness/evaluator.md",
53
- "sha256": "587ae14d6e91fd8af2b2842f568b9a1fa0b1d84fa6e18b4bc21c0ba2a9e62218"
54
- },
55
- "harness/executor": {
56
- "path": ".pi/agents/harness/executor.md",
57
- "sha256": "e222a5c54c74329cdcfa92918d9191fa603d8945b81ca94484db258cda012783"
58
- },
59
48
  "harness/incident-recorder": {
60
49
  "path": ".pi/agents/harness/incident-recorder.md",
61
- "sha256": "d42fa45de1a2fe3842d075c6f319315266588942e314f1b650caabac39bdc29a"
62
- },
63
- "harness/meta-optimizer": {
64
- "path": ".pi/agents/harness/meta-optimizer.md",
65
- "sha256": "cbaab35367126796b7136389a02ab41b4fd1fe7098cf83be562d7b7493ccc297"
50
+ "sha256": "4efbdb9482b1038e2bd08cae9898aed9ef983903107ddab6c84d51436d5d3296"
66
51
  },
67
52
  "harness/sentrux-bootstrap": {
68
53
  "path": ".pi/agents/harness/sentrux-bootstrap.md",
69
- "sha256": "3a0b43b94386a7c541b8a806a37524a5e53f1c8049270db7a420680df5799eeb"
54
+ "sha256": "6132e83b400b6bc381841a09205eda00a2349ec127368f9d164631d73faadd1a"
70
55
  },
71
56
  "harness/sentrux-steward": {
72
57
  "path": ".pi/agents/harness/sentrux-steward.md",
73
- "sha256": "0e63175d817adc0d65876f5c24fb54e4882081caf939ff9c658afee51fc6889c"
74
- },
75
- "harness/tie-breaker": {
76
- "path": ".pi/agents/harness/tie-breaker.md",
77
- "sha256": "1c54c1c3274291dea1ea8826563a7ad4fe1d9c4302984e907bfcd22cfc4f5eba"
58
+ "sha256": "d806cbf2c2e211c6b4c95e35893bc250c8a0fab6fae92190766eab16cd091d51"
78
59
  },
79
60
  "harness/trace-librarian": {
80
61
  "path": ".pi/agents/harness/trace-librarian.md",
81
- "sha256": "336b3f3f6141cef8750ab18d29bbe454caf26973830a86afe099d9e4ad8b0abe"
62
+ "sha256": "083ce6a3508bab2f5bc57e8ab13256c55fff58e0eac95cb6542bdd47fd02de65"
63
+ },
64
+ "harness/running/executor": {
65
+ "path": ".pi/agents/harness/running/executor.md",
66
+ "sha256": "219c9307567acc95a9c1b1340f899fac860406fb2c2e84f51b4a8c3ba3a0e2ec"
67
+ },
68
+ "harness/reviewing/adversary": {
69
+ "path": ".pi/agents/harness/reviewing/adversary.md",
70
+ "sha256": "01ae05b38943c1d1fea373701dc060cc3a3f5125f2a03af468a6a1a877f1c83c"
71
+ },
72
+ "harness/reviewing/evaluator": {
73
+ "path": ".pi/agents/harness/reviewing/evaluator.md",
74
+ "sha256": "5d6d34654d5c223e5549de9b7b0277b4e28745b2409545ecf3034bd0789c3fa3"
75
+ },
76
+ "harness/reviewing/tie-breaker": {
77
+ "path": ".pi/agents/harness/reviewing/tie-breaker.md",
78
+ "sha256": "80312a10772fde4bccc294a4ba7c470bf46d3054207393d2af42af277e5edad6"
82
79
  },
83
80
  "harness/planning/decompose": {
84
81
  "path": ".pi/agents/harness/planning/decompose.md",
85
- "sha256": "c9dd890d45cf4548e28d03aedb86d5fc4ed81022e920ad0005faf404994c6e96"
82
+ "sha256": "944c7221b7bf8e15cd8cf324c3d5ae135c643c6387d8f611cf9128f9ea922963"
86
83
  },
87
84
  "harness/planning/execution-plan-author": {
88
85
  "path": ".pi/agents/harness/planning/execution-plan-author.md",
89
- "sha256": "55ece0f1ee14abd17fe7b3e478b548240f637eacbfc2a34758e98d3878dc82fd"
86
+ "sha256": "3b83edca1eb393941e04213c5cabe0e4b180e52df59169ba24904341a369ead5"
90
87
  },
91
88
  "harness/planning/hypothesis-validator": {
92
89
  "path": ".pi/agents/harness/planning/hypothesis-validator.md",
93
- "sha256": "20411e5d734b14b05ae11153133089e044f46784e5b4741712f608665bbf4376"
90
+ "sha256": "ee68aa5c04b903320116cfa21cea8f130199fd21e1fd1a8a747830bf53920fdb"
94
91
  },
95
92
  "harness/planning/hypothesis": {
96
93
  "path": ".pi/agents/harness/planning/hypothesis.md",
97
- "sha256": "bbb91ac0de39c9de4bf388f0cf926151b6b6a7771d2a0d01d1009a1860daef77"
94
+ "sha256": "c974f5381aa562589942e8d52b48bdace6663e10caed6bf5f2fb9ce11d84b0bc"
98
95
  },
99
96
  "harness/planning/implementation-researcher": {
100
97
  "path": ".pi/agents/harness/planning/implementation-researcher.md",
101
- "sha256": "d1bbaaf1e67ad98350319f973062f01a25ca70874c99cb335c99bec866da1f6d"
98
+ "sha256": "8664ad35c63adcc3a6c52b84360d5e8217f9f581b0a9f23b565187a8f7c7bf22"
102
99
  },
103
100
  "harness/planning/plan-adversary": {
104
101
  "path": ".pi/agents/harness/planning/plan-adversary.md",
105
- "sha256": "d9a953c0f8f900dc9a95816ada401955dafade7bf5907406cbe3bf3ba760c469"
102
+ "sha256": "305cfa6cd0d4e6493a2dad2f01d8cb0b0dddc06df11f871746f6da7124c9d16b"
106
103
  },
107
104
  "harness/planning/plan-evaluator": {
108
105
  "path": ".pi/agents/harness/planning/plan-evaluator.md",
109
- "sha256": "825f296c487d6aeacad5d320e155a3f23d0db6dea822fccc99a1305941a43da2"
106
+ "sha256": "1a6f465f4d400bcf32b9e82a1032ae789354f264af31c8d358b2a0dde7df81bf"
107
+ },
108
+ "harness/planning/plan-synthesizer": {
109
+ "path": ".pi/agents/harness/planning/plan-synthesizer.md",
110
+ "sha256": "5bc3ec109179790c196df1328d362c1485cd5ff9295c31c3de93c050330295da"
110
111
  },
111
112
  "harness/planning/planning-context": {
112
113
  "path": ".pi/agents/harness/planning/planning-context.md",
113
- "sha256": "96a51d1f2daafc9eaa8869a06ede9d04fc9e19076d58a81041e346e4c81c8b08"
114
+ "sha256": "4427e3c50fe0970a753df458ee41fde93b8c9d4ee7034c7541df7a97e978b17e"
114
115
  },
115
116
  "harness/planning/review-integrator": {
116
117
  "path": ".pi/agents/harness/planning/review-integrator.md",
117
- "sha256": "bba385463ca8833654cd0dc80f666344332293fe86d7420d2c36755a3f9e743a"
118
- },
119
- "harness/planning/scout-graphify": {
120
- "path": ".pi/agents/harness/planning/scout-graphify.md",
121
- "sha256": "edc117245476859d3bea93d6e1247cf9f580719bb3aabb91d885cc196c102f68"
122
- },
123
- "harness/planning/scout-semantic": {
124
- "path": ".pi/agents/harness/planning/scout-semantic.md",
125
- "sha256": "060ad9251068c68cc20418a45a5a5747b708895b946c8153d9e5034b28c59ad5"
126
- },
127
- "harness/planning/scout-structure": {
128
- "path": ".pi/agents/harness/planning/scout-structure.md",
129
- "sha256": "111d055b82f0e1dde4cddc61d53474d8ad650dba2fd988061fd40fa638ed8bc7"
118
+ "sha256": "3f60c41768cad24150718b4a415b9636b0df6892195986a90fc77e2d0a6be537"
130
119
  },
131
120
  "harness/planning/sprint-contract-auditor": {
132
121
  "path": ".pi/agents/harness/planning/sprint-contract-auditor.md",
133
- "sha256": "2321298529f70d03798d23346231c4c43ad4b7490a43f291430ca65b3ef93757"
122
+ "sha256": "402c585168c5510b5f22837d2fb157726b928fa59108a8580437ac6ac08d04f5"
134
123
  },
135
124
  "harness/planning/stack-researcher": {
136
125
  "path": ".pi/agents/harness/planning/stack-researcher.md",
137
- "sha256": "ce546ef3aca19da7f334f07cef8f510b79068bffeb7f276c428f3e6236bbe96b"
126
+ "sha256": "641bcd714df327579ff28db04aeabf5d7ee5f36e333e5ae6971967c591863ca4"
138
127
  }
139
128
  }
140
129
  }
@@ -0,0 +1,275 @@
1
+ # Generated/maintained SSOT for harness agent tools (see ADR 0049).
2
+ # Regenerate hints: node .pi/scripts/generate-agents-policy-yaml.mjs
3
+
4
+ apiVersion: harness.toolkit/v1
5
+ kinds:
6
+ planner:
7
+ tools:
8
+ - read
9
+ - grep
10
+ - find
11
+ - ls
12
+ - ctx_read
13
+ - ctx_search
14
+ - ctx_execute
15
+ - ctx_batch_execute
16
+ - ctx_tree
17
+ extensions: false
18
+ read_only: true
19
+ executor:
20
+ tools:
21
+ - read
22
+ - write
23
+ - edit
24
+ - bash
25
+ - grep
26
+ - find
27
+ - ls
28
+ extensions: true
29
+ read_only: false
30
+ evaluator:
31
+ tools:
32
+ - read
33
+ - grep
34
+ - find
35
+ - ls
36
+ - ctx_read
37
+ - ctx_search
38
+ - ctx_execute
39
+ - ctx_batch_execute
40
+ - ctx_tree
41
+ extensions: false
42
+ read_only: true
43
+ adversary:
44
+ tools:
45
+ - read
46
+ - grep
47
+ - find
48
+ - ls
49
+ - ctx_read
50
+ - ctx_search
51
+ - ctx_execute
52
+ - ctx_batch_execute
53
+ - ctx_tree
54
+ extensions: false
55
+ read_only: true
56
+ tie_breaker:
57
+ tools:
58
+ - read
59
+ - grep
60
+ - find
61
+ - ls
62
+ - ctx_read
63
+ - ctx_search
64
+ - ctx_execute
65
+ - ctx_batch_execute
66
+ - ctx_tree
67
+ extensions: false
68
+ read_only: true
69
+ trace:
70
+ tools:
71
+ - read
72
+ - grep
73
+ - find
74
+ - ls
75
+ - ctx_read
76
+ - ctx_search
77
+ - ctx_execute
78
+ - ctx_batch_execute
79
+ - ctx_tree
80
+ extensions: false
81
+ read_only: true
82
+ incident:
83
+ tools:
84
+ - read
85
+ - grep
86
+ - find
87
+ - ls
88
+ - ctx_read
89
+ - ctx_search
90
+ - ctx_execute
91
+ - ctx_batch_execute
92
+ - ctx_tree
93
+ extensions: false
94
+ read_only: true
95
+ other:
96
+ tools:
97
+ - read
98
+ - grep
99
+ - find
100
+ - ls
101
+ - ctx_read
102
+ - ctx_search
103
+ - ctx_execute
104
+ - ctx_tree
105
+ extensions: false
106
+ read_only: true
107
+ agents:
108
+ harness/incident-recorder:
109
+ kind: incident
110
+ tools_add:
111
+ - submit_human_required
112
+ extensions: false
113
+ max_turns: 15
114
+ thinking: medium
115
+ submit_tool: submit_human_required
116
+ harness/sentrux-bootstrap:
117
+ kind: planner
118
+ tools_add:
119
+ - bash
120
+ extensions: true
121
+ max_turns: 12
122
+ thinking: low
123
+ harness/sentrux-steward:
124
+ kind: planner
125
+ tools_add:
126
+ - bash
127
+ - submit_sentrux_manifest_proposal
128
+ extensions: false
129
+ max_turns: 16
130
+ thinking: high
131
+ submit_tool: submit_sentrux_manifest_proposal
132
+ harness/trace-librarian:
133
+ kind: trace
134
+ tools_add:
135
+ - submit_human_required
136
+ extensions: false
137
+ max_turns: 20
138
+ thinking: medium
139
+ submit_tool: submit_human_required
140
+ harness/running/executor:
141
+ kind: executor
142
+ tools_add:
143
+ - submit_executor_handoff
144
+ extensions: true
145
+ max_turns: 20
146
+ thinking: medium
147
+ submit_tool: submit_executor_handoff
148
+ harness/reviewing/adversary:
149
+ kind: adversary
150
+ tools_add:
151
+ - submit_adversary_report
152
+ extensions: false
153
+ max_turns: 20
154
+ thinking: high
155
+ submit_tool: submit_adversary_report
156
+ harness/reviewing/evaluator:
157
+ kind: evaluator
158
+ tools_add:
159
+ - submit_eval_verdict
160
+ extensions: false
161
+ max_turns: 20
162
+ thinking: high
163
+ submit_tool: submit_eval_verdict
164
+ harness/reviewing/tie-breaker:
165
+ kind: tie_breaker
166
+ tools_add:
167
+ - submit_human_required
168
+ extensions: false
169
+ max_turns: 15
170
+ thinking: high
171
+ submit_tool: submit_human_required
172
+ harness/planning/decompose:
173
+ kind: planner
174
+ tools_add:
175
+ - bash
176
+ - submit_decomposition_brief
177
+ - submit_human_required
178
+ extensions: false
179
+ max_turns: 12
180
+ thinking: medium
181
+ harness/planning/execution-plan-author:
182
+ kind: planner
183
+ tools_add:
184
+ - submit_execution_plan_brief
185
+ extensions: false
186
+ max_turns: 18
187
+ thinking: high
188
+ submit_tool: submit_execution_plan_brief
189
+ harness/planning/hypothesis-validator:
190
+ kind: planner
191
+ tools_add:
192
+ - submit_hypothesis_validation
193
+ extensions: false
194
+ max_turns: 10
195
+ thinking: medium
196
+ submit_tool: submit_hypothesis_validation
197
+ harness/planning/hypothesis:
198
+ kind: planner
199
+ tools_add:
200
+ - bash
201
+ - submit_hypothesis_brief
202
+ extensions: false
203
+ max_turns: 14
204
+ thinking: medium
205
+ submit_tool: submit_hypothesis_brief
206
+ harness/planning/implementation-researcher:
207
+ kind: planner
208
+ tools_add:
209
+ - bash
210
+ - web_search
211
+ - web_fetch
212
+ - submit_implementation_research
213
+ extensions: false
214
+ max_turns: 14
215
+ thinking: medium
216
+ submit_tool: submit_implementation_research
217
+ harness/planning/plan-adversary:
218
+ kind: planner
219
+ tools_add:
220
+ - submit_adversary_brief
221
+ extensions: false
222
+ max_turns: 14
223
+ thinking: medium
224
+ submit_tool: submit_adversary_brief
225
+ harness/planning/plan-evaluator:
226
+ kind: planner
227
+ tools_add:
228
+ - submit_validation_turn
229
+ extensions: false
230
+ max_turns: 14
231
+ thinking: medium
232
+ submit_tool: submit_validation_turn
233
+ harness/planning/plan-synthesizer:
234
+ kind: planner
235
+ tools_add:
236
+ - submit_decomposition_brief
237
+ - submit_hypothesis_brief
238
+ - submit_execution_plan_brief
239
+ extensions: false
240
+ harness/planning/planning-context:
241
+ kind: planner
242
+ tools_add:
243
+ - bash
244
+ - submit_planning_context
245
+ extensions: false
246
+ max_turns: 12
247
+ thinking: low
248
+ submit_tool: submit_planning_context
249
+ harness/planning/review-integrator:
250
+ kind: planner
251
+ tools_add:
252
+ - submit_review_round_draft
253
+ extensions: false
254
+ max_turns: 12
255
+ thinking: medium
256
+ submit_tool: submit_review_round_draft
257
+ harness/planning/sprint-contract-auditor:
258
+ kind: planner
259
+ tools_add:
260
+ - submit_sprint_audit
261
+ extensions: false
262
+ max_turns: 12
263
+ thinking: medium
264
+ submit_tool: submit_sprint_audit
265
+ harness/planning/stack-researcher:
266
+ kind: planner
267
+ tools_add:
268
+ - bash
269
+ - web_search
270
+ - web_fetch
271
+ - submit_stack_brief
272
+ extensions: false
273
+ max_turns: 16
274
+ thinking: medium
275
+ submit_tool: submit_stack_brief
@@ -13,6 +13,16 @@
13
13
  "risk_class": "medium",
14
14
  "default_policy": "stage_until_rights_review"
15
15
  },
16
+ "repo": {
17
+ "category": "public_repository_metadata",
18
+ "risk_class": "low_to_medium",
19
+ "default_policy": "allowlist_auto_promote_when_approved"
20
+ },
21
+ "release": {
22
+ "category": "public_repository_release_metadata",
23
+ "risk_class": "low_to_medium",
24
+ "default_policy": "allowlist_auto_promote_when_approved"
25
+ },
16
26
  "book": {
17
27
  "category": "book_or_longform_local_file",
18
28
  "risk_class": "high",
@@ -111,12 +121,57 @@
111
121
  "approved_by": "manual-review-required",
112
122
  "approved_at": "manual-review-required",
113
123
  "allowed_source_classes": ["paper"]
124
+ },
125
+ {
126
+ "domain": "github.com",
127
+ "approved": true,
128
+ "approved_by": "repo-policy",
129
+ "approved_at": "2026-05-23",
130
+ "allowed_source_classes": ["repo", "release"]
114
131
  }
115
132
  ],
116
133
  "article_queries": [
117
134
  "agentic engineering harness engineering AI coding agents",
118
135
  "AI coding harness evaluation orchestration context engineering"
119
136
  ],
137
+ "repo_sources": [
138
+ {
139
+ "title": "Graphify project repository metadata watch",
140
+ "url": "https://github.com/AI-App/Graphify",
141
+ "approved": false,
142
+ "rights_access": {
143
+ "license": "repository metadata only; source license requires review",
144
+ "access": "public repository metadata",
145
+ "approved_by": "manual-review-required",
146
+ "approved_at": "manual-review-required"
147
+ },
148
+ "provenance": {
149
+ "origin": "curated_repo_watchlist",
150
+ "locator": "https://github.com/AI-App/Graphify",
151
+ "notes": "Metadata candidate only until manually approved."
152
+ },
153
+ "competitor_labels": ["context_engineering"]
154
+ }
155
+ ],
156
+ "release_feeds": [
157
+ {
158
+ "title": "OpenAI agents SDK release metadata watch",
159
+ "url": "https://github.com/openai/openai-agents-python/releases",
160
+ "approved": false,
161
+ "rights_access": {
162
+ "license": "release metadata only; linked artifacts require review",
163
+ "access": "public release metadata",
164
+ "approved_by": "manual-review-required",
165
+ "approved_at": "manual-review-required"
166
+ },
167
+ "provenance": {
168
+ "origin": "curated_release_watchlist",
169
+ "locator": "https://github.com/openai/openai-agents-python/releases",
170
+ "notes": "Release metadata candidate only until manually approved."
171
+ },
172
+ "competitor_labels": ["agentic_harnesses"]
173
+ }
174
+ ],
120
175
  "paper_feeds": [
121
176
  {
122
177
  "title": "arXiv software engineering agents search feed",
@@ -10,7 +10,7 @@ Evaluator trust requires both programmatic gates (policy, budget, integrity) and
10
10
  ## Decision
11
11
 
12
12
  1. **Rules file:** `.sentrux/rules.toml` synced from manifest — see [ADR 0009](0009-sentrux-rules-lifecycle.md).
13
- 2. **Run observation:** `/harness-run` writes `artifacts/sentrux-signal.yaml` and appends session custom entry `harness-sentrux-signal` after `sentrux check` + `sentrux gate` (baseline from `sentrux gate --save` before execute).
13
+ 2. **Run observation:** `/harness-run` writes `artifacts/sentrux-signal.yaml` and appends session custom entry `harness-sentrux-signal` after root-resolved Sentrux `check` + `gate` via `harness-sentrux-cli.mjs` (baseline from `gate --save` before execute). Raw `sentrux check .` / `gate .` must not be used from `.pi/harness/runs/*` because Sentrux resolves `.sentrux/rules.toml` against the path argument.
14
14
  3. **Verify gate:** `harness-verify.mjs` with `HARNESS_SENTRUX_REQUIRED=true` prefers `$HARNESS_RUN_DIR/artifacts/sentrux-signal.yaml`; falls back to `.pi/harness/evals/smoke/sentrux-stub.json` only when no run signal exists (CI smoke / pre-run verify).
15
15
  4. **Evaluator:** `harness/evaluator` in `benchmark` mode reads `sentrux-signal.yaml` and `benchmark-log.yaml` — metrics are inputs, not executor optimization targets.
16
16
  5. Observations flow through `observation-bus.ts` as `HarnessObservation` envelopes when wired.
@@ -30,3 +30,4 @@ Evaluator trust requires both programmatic gates (policy, budget, integrity) and
30
30
 
31
31
  - `.pi/harness/specs/observation.schema.json`
32
32
  - `.pi/scripts/harness-verify.mjs`
33
+ - `.pi/scripts/harness-sentrux-cli.mjs`
@@ -10,7 +10,7 @@ ultimate-pi depended on the npm package `@sting8k/pi-vcc` for deterministic, vie
10
10
 
11
11
  ## Decision
12
12
 
13
- 1. Vendor [sting8k/pi-vcc](https://github.com/sting8k/pi-vcc) under `vendor/pi-vcc/` (refresh via `npm run vendor:sync-vcc`), following the same pattern as `vendor/pi-model-router`.
13
+ 1. Vendor [sting8k/pi-vcc](https://github.com/sting8k/pi-vcc) under `vendor/pi-vcc/` (refresh via `npm run vendor:sync-vcc`), following the pinned-vendor pattern documented in `THIRD_PARTY_NOTICES.md`.
14
14
  2. Load compaction through [`.pi/extensions/ultimate-pi-vcc.ts`](../../../extensions/ultimate-pi-vcc.ts).
15
15
  3. Remove `@sting8k/pi-vcc` from `package.json` dependencies and from `.pi/settings*.json` `packages` arrays.
16
16
  4. **Configuration is env-only** — no JSON config files (`PI_VCC_CONFIG_PATH` and `.pi/pi-vcc-config.json` are not used).
@@ -32,4 +32,4 @@ Early implementation treated debate as a fixed four-round checklist with single
32
32
 
33
33
  - [ADR-0033](0033-parent-orchestrated-planning.md), [ADR-0034](0034-darwin-plan-research-pipeline.md)
34
34
  - `raw/decisions/adr-020.md`, `raw/modules/structured-planning.md`
35
- - `.pi/prompts/planning-rubrics.md`, `.pi/prompts/harness-plan.md` Phase 5
35
+ - `.pi/harness/docs/planning-rubrics.md`, `.pi/prompts/harness-plan.md` Phase 5
@@ -12,8 +12,9 @@ After `/harness-run`, failed benchmarks or blocked execution previously routed u
12
12
  1. **Always review** — `/harness-run` ends with `next_command: /harness-review` (including `blocked` / partial work). Remove benchmark fail-fast skip of verdict/adversary (ADR 0039 amended).
13
13
  2. **Review artifacts** — Parent writes `artifacts/review-outcome.yaml` and `artifacts/repair-brief.yaml` (path pointers, not pasted bodies).
14
14
  3. **Remediation routing** — `review-outcome.remediation_class`: `implementation_gap` → `/harness-steer`; `plan_gap` → `/harness-plan` revise with `repair_brief_path`; `pass` → policy status. **Review outcome wins** over executor `scope_drift` when they disagree; tie → `plan_gap`.
15
- 4. **`/harness-steer`**Thin orchestrator: read briefs, set policy **phase `execute`**, spawn `harness/executor` with `mode: repair`, then `/harness-review` again.
16
- 5. **Caps**`HARNESS_STEER_MAX_ATTEMPTS` (default 3). **Tiered review:** full review on initial run + steer 1; steers 2+ use lite (benchmark + verdict) unless prior `block_merge` or user forces full.
15
+ 4. **Plan-gap revise reset** When review returns `plan_gap` and the next `/harness-plan` runs in revise mode, archive stale plan-phase debate state and generated planning artifacts under `artifacts/revisions/<timestamp>/` before the planner starts. Preserve review repair artifacts in place so the new planning round starts clean while retaining audit history.
16
+ 5. **`/harness-steer`**Thin orchestrator: read briefs, set policy **phase `execute`**, spawn `harness/executor` with `mode: repair`, then `/harness-review` again.
17
+ 6. **Caps** — `HARNESS_STEER_MAX_ATTEMPTS` (default 3). **Tiered review:** full review on initial run + steer 1; steers 2+ use lite (benchmark + verdict) unless prior `block_merge` or user forces full.
17
18
  6. **Sentrux** — Refresh baseline or compare new violations only after steer mutations (avoid false degraded on every attempt).
18
19
  7. **Evaluate-phase writes** — Orchestrator may write review/steer YAML under run `artifacts/` in `evaluate`/`adversary` phase (allowlisted files).
19
20
 
@@ -0,0 +1,49 @@
1
+ # ADR 0045: Harness-lens minimal contract
2
+
3
+ ## Status
4
+
5
+ Accepted — 2026-05-24
6
+
7
+ ## Context
8
+
9
+ ultimate-pi previously shipped a trimmed fork of pi-lens with bundled YAML rules, ast-grep pi tools, and JS/TS-centric session scans. That overlapped Sentrux (architecture gate), shell `sg` (structural search), and graphify/ccc (recon). Target projects can be any stack (Go, Python, Rust, polyglot monorepos).
10
+
11
+ ## Decision
12
+
13
+ Replace the fork with a **harness-native** extension at `.pi/extensions/lib/harness-lens/`:
14
+
15
+ | Concern | Owner |
16
+ |---------|--------|
17
+ | Recon | graphify, ccc |
18
+ | Structural search | shell `sg` only |
19
+ | Architecture gate | Sentrux |
20
+ | Edit autopatch, secrets block, deferred format, LSP | harness-lens |
21
+
22
+ ### Runtime contract
23
+
24
+ - **Edit autopatch** — indentation-only oldText correction on `tool_call` (edit).
25
+ - **Secrets** — regex scanner blocks writes with credentials (stack-agnostic).
26
+ - **Deferred format** — queue on `tool_result`, run at `agent_end` (default). `--immediate-format` and `--no-autoformat` unchanged.
27
+ - **Formatters** — PATH binaries only when the **target project** declares config (`biome.json`, `ruff` in `pyproject.toml`, `.prettierrc`, `go.mod` + gofmt, `Cargo.toml` + rustfmt, etc.). No bundled biome/ruff config in lens; no lazy gem/rustup installs.
28
+ - **LSP** — `lsp_diagnostics`, `lsp_navigation`; auto-touch on read/write/edit; installer catalog is **LSP servers only** (no shadow-install of biome/ruff/sg).
29
+ - **Session bootstrap** — `project-profile.ts` detects FileKinds from tree + markers; pre-install at most 2–3 LSP defaults for detected kinds only.
30
+
31
+ ### External projects
32
+
33
+ - **Detect, don't assume** — no JS/TS export guard, no default biome for Go-only repos.
34
+ - **Harness setup tools ≠ lens stack** — `/harness-setup` may install global `sg` and optional `biome` on the machine; lens does not require them for unrelated stacks.
35
+ - **Graceful degradation** — missing LSP or formatter on PATH → skip with debug log.
36
+
37
+ ### Flags
38
+
39
+ `--no-lens`, `--no-lsp`, `--no-autoformat`, `--immediate-format`, `--lens-guard` (interactive commit block when blockers present).
40
+
41
+ ### Removed
42
+
43
+ - Bundled `rules/` YAML corpus, ast-grep pi tools, upstream `UPSTREAM_PIN.md` sync, duplicate export guard, AgentBehaviorClient, rules-scanner injection, cosmetic todo/go/rust scans.
44
+
45
+ ## Consequences
46
+
47
+ - Smaller npm payload and one quality story per concern.
48
+ - Agents on external repos get stack-appropriate LSP/format behavior without harness JS defaults.
49
+ - `harness-verify.mjs` asserts no `lib/lens`, no bundled rules, no `ast_grep_search` in index.