zob-harness 0.1.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 (356) hide show
  1. package/.pi/adapters/registry.json +103 -0
  2. package/.pi/agents/architecture-cartographer.md +53 -0
  3. package/.pi/agents/chief-vision.md +39 -0
  4. package/.pi/agents/clarifier.md +58 -0
  5. package/.pi/agents/context-steward.md +52 -0
  6. package/.pi/agents/doc-steward.md +34 -0
  7. package/.pi/agents/explore.md +49 -0
  8. package/.pi/agents/factory.md +41 -0
  9. package/.pi/agents/implementer.md +44 -0
  10. package/.pi/agents/librarian.md +32 -0
  11. package/.pi/agents/oracle-merge.md +50 -0
  12. package/.pi/agents/oracle.md +55 -0
  13. package/.pi/agents/pattern-miner.md +53 -0
  14. package/.pi/agents/planner.md +39 -0
  15. package/.pi/agents/project-dna-golden-evaluator.md +32 -0
  16. package/.pi/agents/project-dna-ontology-steward.md +30 -0
  17. package/.pi/agents/project-dna-oracle.md +56 -0
  18. package/.pi/agents/project-dna-orchestrator.md +60 -0
  19. package/.pi/agents/project-dna-query-steward.md +38 -0
  20. package/.pi/agents/project-dna-safety-preflight.md +54 -0
  21. package/.pi/agents/project-dna-test-linker.md +27 -0
  22. package/.pi/agents/qa.md +38 -0
  23. package/.pi/agents/refactor-cartographer.md +28 -0
  24. package/.pi/agents/refactor-mover.md +31 -0
  25. package/.pi/agents/refactor-oracle.md +49 -0
  26. package/.pi/agents/repo-scout.md +60 -0
  27. package/.pi/agents/sample-architect.md +48 -0
  28. package/.pi/agents/specifier.md +57 -0
  29. package/.pi/agents/symbol-range-curator.md +41 -0
  30. package/.pi/agents/synthesis.md +52 -0
  31. package/.pi/agents/temp-agent-creator.md +35 -0
  32. package/.pi/autonomy-policy.json +67 -0
  33. package/.pi/budget-policy.json +54 -0
  34. package/.pi/capabilities/zob-public-runtime-capabilities.json +1700 -0
  35. package/.pi/chains/explore-plan-oracle.json +78 -0
  36. package/.pi/chains/explore-spec-clarify-plan-oracle.json +64 -0
  37. package/.pi/chains/explore-spec-plan-oracle.json +53 -0
  38. package/.pi/chains/spec-clarify-plan-oracle.json +53 -0
  39. package/.pi/chains/spec-factory-oracle.json +42 -0
  40. package/.pi/chains/spec-plan-oracle.json +42 -0
  41. package/.pi/compute-profiles/defaults.json +19 -0
  42. package/.pi/compute-profiles/overrides.json +13 -0
  43. package/.pi/compute-profiles/risk-rules.json +16 -0
  44. package/.pi/daemon-policy.json +80 -0
  45. package/.pi/damage-control-rules.json +45 -0
  46. package/.pi/extensions/zob-child-safety/index.ts +212 -0
  47. package/.pi/extensions/zob-harness/AGENTS.md +28 -0
  48. package/.pi/extensions/zob-harness/index.ts +391 -0
  49. package/.pi/extensions/zob-harness/src/AGENTS.md +25 -0
  50. package/.pi/extensions/zob-harness/src/agents.ts +82 -0
  51. package/.pi/extensions/zob-harness/src/autonomous-runtime.ts +2912 -0
  52. package/.pi/extensions/zob-harness/src/autonomy-readiness.ts +778 -0
  53. package/.pi/extensions/zob-harness/src/budget-policy.ts +308 -0
  54. package/.pi/extensions/zob-harness/src/capabilities.ts +249 -0
  55. package/.pi/extensions/zob-harness/src/child-runner.ts +249 -0
  56. package/.pi/extensions/zob-harness/src/chronicle.ts +262 -0
  57. package/.pi/extensions/zob-harness/src/compute-profile.ts +602 -0
  58. package/.pi/extensions/zob-harness/src/compute-workflow-shape.ts +168 -0
  59. package/.pi/extensions/zob-harness/src/coms-v2/AGENTS.md +16 -0
  60. package/.pi/extensions/zob-harness/src/coms-v2/envelope.ts +121 -0
  61. package/.pi/extensions/zob-harness/src/coms-v2/identity.ts +53 -0
  62. package/.pi/extensions/zob-harness/src/coms-v2/ledger-bridge.ts +67 -0
  63. package/.pi/extensions/zob-harness/src/coms-v2/local-transport.ts +147 -0
  64. package/.pi/extensions/zob-harness/src/coms-v2/pending-replies.ts +80 -0
  65. package/.pi/extensions/zob-harness/src/coms-v2/policy.ts +125 -0
  66. package/.pi/extensions/zob-harness/src/coms-v2/presence.ts +55 -0
  67. package/.pi/extensions/zob-harness/src/coms-v2/registry.ts +113 -0
  68. package/.pi/extensions/zob-harness/src/coms-v2/response-capture.ts +50 -0
  69. package/.pi/extensions/zob-harness/src/coms-v2/transcript-capture.ts +164 -0
  70. package/.pi/extensions/zob-harness/src/coms-v2/types.ts +149 -0
  71. package/.pi/extensions/zob-harness/src/coms-v2/zpeer-profile.ts +140 -0
  72. package/.pi/extensions/zob-harness/src/coms-v2/zpeer.ts +452 -0
  73. package/.pi/extensions/zob-harness/src/constants.ts +108 -0
  74. package/.pi/extensions/zob-harness/src/context-gbrain.ts +465 -0
  75. package/.pi/extensions/zob-harness/src/daemon-policy.ts +223 -0
  76. package/.pi/extensions/zob-harness/src/daemon-readiness.ts +134 -0
  77. package/.pi/extensions/zob-harness/src/daemon-runtime.ts +393 -0
  78. package/.pi/extensions/zob-harness/src/factory/AGENTS.md +24 -0
  79. package/.pi/extensions/zob-harness/src/factory/agentic-plan.ts +65 -0
  80. package/.pi/extensions/zob-harness/src/factory/quarantine.ts +319 -0
  81. package/.pi/extensions/zob-harness/src/factory/run.ts +520 -0
  82. package/.pi/extensions/zob-harness/src/factory/validation.ts +454 -0
  83. package/.pi/extensions/zob-harness/src/factory-selector.ts +318 -0
  84. package/.pi/extensions/zob-harness/src/full-autonomy-test.ts +226 -0
  85. package/.pi/extensions/zob-harness/src/git-ops.ts +868 -0
  86. package/.pi/extensions/zob-harness/src/goal-room.ts +178 -0
  87. package/.pi/extensions/zob-harness/src/goal-runtime.ts +1569 -0
  88. package/.pi/extensions/zob-harness/src/goal-todo-imports.ts +111 -0
  89. package/.pi/extensions/zob-harness/src/goal-todo-types.ts +231 -0
  90. package/.pi/extensions/zob-harness/src/goal-todos.ts +1410 -0
  91. package/.pi/extensions/zob-harness/src/goal.ts +152 -0
  92. package/.pi/extensions/zob-harness/src/governed-requests.ts +436 -0
  93. package/.pi/extensions/zob-harness/src/interactive-autonomy.ts +595 -0
  94. package/.pi/extensions/zob-harness/src/launch-apply.ts +313 -0
  95. package/.pi/extensions/zob-harness/src/merge-queue.ts +290 -0
  96. package/.pi/extensions/zob-harness/src/mission-control.ts +573 -0
  97. package/.pi/extensions/zob-harness/src/model-availability.ts +52 -0
  98. package/.pi/extensions/zob-harness/src/model-routing.ts +429 -0
  99. package/.pi/extensions/zob-harness/src/orchestration/AGENTS.md +23 -0
  100. package/.pi/extensions/zob-harness/src/orchestration/adaptive-delegation.ts +547 -0
  101. package/.pi/extensions/zob-harness/src/orchestration/adaptive-workflow.ts +585 -0
  102. package/.pi/extensions/zob-harness/src/orchestration/lead-plan.ts +192 -0
  103. package/.pi/extensions/zob-harness/src/orchestration/plan.ts +168 -0
  104. package/.pi/extensions/zob-harness/src/orchestration/room.ts +346 -0
  105. package/.pi/extensions/zob-harness/src/orchestration/run.ts +134 -0
  106. package/.pi/extensions/zob-harness/src/orchestration/supervised-readonly.ts +1147 -0
  107. package/.pi/extensions/zob-harness/src/orchestration/widget-readers.ts +132 -0
  108. package/.pi/extensions/zob-harness/src/output-contracts.ts +656 -0
  109. package/.pi/extensions/zob-harness/src/project-dna.ts +533 -0
  110. package/.pi/extensions/zob-harness/src/promotion/AGENTS.md +24 -0
  111. package/.pi/extensions/zob-harness/src/promotion/candidate.ts +336 -0
  112. package/.pi/extensions/zob-harness/src/promotion/coms.ts +127 -0
  113. package/.pi/extensions/zob-harness/src/promotion/documentation.ts +142 -0
  114. package/.pi/extensions/zob-harness/src/promotion/factory.ts +107 -0
  115. package/.pi/extensions/zob-harness/src/promotion/ledger.ts +2 -0
  116. package/.pi/extensions/zob-harness/src/promotion/temp-agent.ts +151 -0
  117. package/.pi/extensions/zob-harness/src/promotion/types.ts +149 -0
  118. package/.pi/extensions/zob-harness/src/promotion/validate.ts +6 -0
  119. package/.pi/extensions/zob-harness/src/promotion/write-lane.ts +162 -0
  120. package/.pi/extensions/zob-harness/src/prompt-packs.ts +239 -0
  121. package/.pi/extensions/zob-harness/src/queue.ts +386 -0
  122. package/.pi/extensions/zob-harness/src/rules.ts +225 -0
  123. package/.pi/extensions/zob-harness/src/runtime/AGENTS.md +26 -0
  124. package/.pi/extensions/zob-harness/src/runtime/adaptive-zmode.ts +116 -0
  125. package/.pi/extensions/zob-harness/src/runtime/auto-compaction.ts +715 -0
  126. package/.pi/extensions/zob-harness/src/runtime/commands.ts +1315 -0
  127. package/.pi/extensions/zob-harness/src/runtime/compaction-policy.ts +516 -0
  128. package/.pi/extensions/zob-harness/src/runtime/delegation-click-markers.ts +141 -0
  129. package/.pi/extensions/zob-harness/src/runtime/delegation-feed.ts +415 -0
  130. package/.pi/extensions/zob-harness/src/runtime/delegation-markdown.ts +97 -0
  131. package/.pi/extensions/zob-harness/src/runtime/delegation-monitor.ts +553 -0
  132. package/.pi/extensions/zob-harness/src/runtime/delegation-mouse.ts +205 -0
  133. package/.pi/extensions/zob-harness/src/runtime/delegation-overlay.ts +434 -0
  134. package/.pi/extensions/zob-harness/src/runtime/events.ts +736 -0
  135. package/.pi/extensions/zob-harness/src/runtime/goal-todo-overlay.ts +214 -0
  136. package/.pi/extensions/zob-harness/src/runtime/mode-intent.ts +144 -0
  137. package/.pi/extensions/zob-harness/src/runtime/plan-capture.ts +270 -0
  138. package/.pi/extensions/zob-harness/src/runtime/state.ts +403 -0
  139. package/.pi/extensions/zob-harness/src/runtime/tools-autonomous.ts +117 -0
  140. package/.pi/extensions/zob-harness/src/runtime/tools-compute.ts +136 -0
  141. package/.pi/extensions/zob-harness/src/runtime/tools-coms.ts +365 -0
  142. package/.pi/extensions/zob-harness/src/runtime/tools-context.ts +70 -0
  143. package/.pi/extensions/zob-harness/src/runtime/tools-delegation.ts +1854 -0
  144. package/.pi/extensions/zob-harness/src/runtime/tools-factory.ts +810 -0
  145. package/.pi/extensions/zob-harness/src/runtime/tools-goal-room.ts +46 -0
  146. package/.pi/extensions/zob-harness/src/runtime/tools-governed-requests.ts +38 -0
  147. package/.pi/extensions/zob-harness/src/runtime/tools-merge-queue.ts +61 -0
  148. package/.pi/extensions/zob-harness/src/runtime/tools-mission-control.ts +77 -0
  149. package/.pi/extensions/zob-harness/src/runtime/tools-orchestration.ts +106 -0
  150. package/.pi/extensions/zob-harness/src/runtime/tools-project-dna.ts +123 -0
  151. package/.pi/extensions/zob-harness/src/runtime/tools-worker-pool.ts +93 -0
  152. package/.pi/extensions/zob-harness/src/runtime/tools-workspace-claims.ts +62 -0
  153. package/.pi/extensions/zob-harness/src/runtime/tools-zcommit.ts +147 -0
  154. package/.pi/extensions/zob-harness/src/runtime/widget.ts +353 -0
  155. package/.pi/extensions/zob-harness/src/runtime/zobHarness.ts +60 -0
  156. package/.pi/extensions/zob-harness/src/safety.ts +338 -0
  157. package/.pi/extensions/zob-harness/src/sandbox.ts +1508 -0
  158. package/.pi/extensions/zob-harness/src/schemas-project-dna.ts +47 -0
  159. package/.pi/extensions/zob-harness/src/schemas.ts +695 -0
  160. package/.pi/extensions/zob-harness/src/telemetry.ts +373 -0
  161. package/.pi/extensions/zob-harness/src/topology/AGENTS.md +22 -0
  162. package/.pi/extensions/zob-harness/src/topology/chains.ts +236 -0
  163. package/.pi/extensions/zob-harness/src/topology/coms.ts +211 -0
  164. package/.pi/extensions/zob-harness/src/topology/orchestration-profiles.ts +204 -0
  165. package/.pi/extensions/zob-harness/src/topology/teams.ts +113 -0
  166. package/.pi/extensions/zob-harness/src/types/core.ts +47 -0
  167. package/.pi/extensions/zob-harness/src/types.ts +939 -0
  168. package/.pi/extensions/zob-harness/src/utils/AGENTS.md +22 -0
  169. package/.pi/extensions/zob-harness/src/utils/formatting.ts +34 -0
  170. package/.pi/extensions/zob-harness/src/utils/hashing.ts +11 -0
  171. package/.pi/extensions/zob-harness/src/utils/json.ts +28 -0
  172. package/.pi/extensions/zob-harness/src/utils/paths.ts +54 -0
  173. package/.pi/extensions/zob-harness/src/utils/records.ts +25 -0
  174. package/.pi/extensions/zob-harness/src/utils/resources.ts +38 -0
  175. package/.pi/extensions/zob-harness/src/worker-pool.ts +672 -0
  176. package/.pi/extensions/zob-harness/src/workspace-claims.ts +297 -0
  177. package/.pi/extensions/zob-switch/index.ts +180 -0
  178. package/.pi/factories/budget-preflight-dry-run/batch-manifest.json +59 -0
  179. package/.pi/factories/budget-preflight-dry-run/factory.json +94 -0
  180. package/.pi/factories/budget-preflight-dry-run/pilot-manifest.json +50 -0
  181. package/.pi/factories/budget-preflight-dry-run/smoke-manifest.json +43 -0
  182. package/.pi/factories/code-review-matrix/batch-manifest.json +61 -0
  183. package/.pi/factories/code-review-matrix/factory.json +163 -0
  184. package/.pi/factories/code-review-matrix/pilot-manifest.json +41 -0
  185. package/.pi/factories/code-review-matrix/smoke-manifest.json +35 -0
  186. package/.pi/factories/factory-forge/batch-manifest.json +56 -0
  187. package/.pi/factories/factory-forge/factory.json +84 -0
  188. package/.pi/factories/factory-forge/pilot-manifest.json +32 -0
  189. package/.pi/factories/factory-forge/smoke-manifest.json +19 -0
  190. package/.pi/factories/opencode-pattern-canonizer/batch-manifest.json +54 -0
  191. package/.pi/factories/opencode-pattern-canonizer/factory.json +86 -0
  192. package/.pi/factories/opencode-pattern-canonizer/pilot-manifest.json +39 -0
  193. package/.pi/factories/opencode-pattern-canonizer/smoke-manifest.json +26 -0
  194. package/.pi/factories/project-dna/README.md +182 -0
  195. package/.pi/factories/project-dna/batch-manifest.json +37 -0
  196. package/.pi/factories/project-dna/example-project-dna-manifest-v2.json +80 -0
  197. package/.pi/factories/project-dna/example-project-dna-manifest.json +58 -0
  198. package/.pi/factories/project-dna/factory.json +131 -0
  199. package/.pi/factories/project-dna/golden-cases-smoke.json +62 -0
  200. package/.pi/factories/project-dna/pi-agentic-ontology.json +88 -0
  201. package/.pi/factories/project-dna/pilot-manifest.json +32 -0
  202. package/.pi/factories/project-dna/schemas/benchmark-suite.schema.json +27 -0
  203. package/.pi/factories/project-dna/schemas/code-knowledge-graph.schema.json +97 -0
  204. package/.pi/factories/project-dna/schemas/context-pack.schema.json +43 -0
  205. package/.pi/factories/project-dna/schemas/golden-case.schema.json +36 -0
  206. package/.pi/factories/project-dna/schemas/manifest-v2.schema.json +128 -0
  207. package/.pi/factories/project-dna/schemas/manifest.schema.json +77 -0
  208. package/.pi/factories/project-dna/schemas/ontology.schema.json +45 -0
  209. package/.pi/factories/project-dna/schemas/project-fingerprint.schema.json +28 -0
  210. package/.pi/factories/project-dna/schemas/query-steward-report.schema.json +52 -0
  211. package/.pi/factories/project-dna/smoke-manifest.json +27 -0
  212. package/.pi/factories/roadmap-smoke-lots/batch-manifest.json +49 -0
  213. package/.pi/factories/roadmap-smoke-lots/factory.json +89 -0
  214. package/.pi/factories/roadmap-smoke-lots/pilot-manifest.json +50 -0
  215. package/.pi/factories/roadmap-smoke-lots/smoke-manifest.json +35 -0
  216. package/.pi/git-policy.json +120 -0
  217. package/.pi/mission-control/zob_coms_transport.json +64 -0
  218. package/.pi/model-catalog.example.json +345 -0
  219. package/.pi/model-economy.example.json +196 -0
  220. package/.pi/model-routing.json +86 -0
  221. package/.pi/orchestrations/adaptive-chief-vision.json +193 -0
  222. package/.pi/orchestrations/ceo-feature-build.json +182 -0
  223. package/.pi/orchestrations/readonly-dynamic-smoke.json +75 -0
  224. package/.pi/output-contracts/agent-event.v1.json +19 -0
  225. package/.pi/output-contracts/base.v1.json +24 -0
  226. package/.pi/output-contracts/brain-lookup.v1.json +21 -0
  227. package/.pi/output-contracts/clarification.v1.json +21 -0
  228. package/.pi/output-contracts/context-pack.v1.json +20 -0
  229. package/.pi/output-contracts/context-request.v1.json +21 -0
  230. package/.pi/output-contracts/context-steward.v1.json +19 -0
  231. package/.pi/output-contracts/context-writeback-proposal.v1.json +18 -0
  232. package/.pi/output-contracts/delegation-request.v1.json +21 -0
  233. package/.pi/output-contracts/explore.v1.json +52 -0
  234. package/.pi/output-contracts/factory.v1.json +48 -0
  235. package/.pi/output-contracts/guidance-steward.v1.json +18 -0
  236. package/.pi/output-contracts/implement.v1.json +40 -0
  237. package/.pi/output-contracts/launch-authorization.v1.json +21 -0
  238. package/.pi/output-contracts/lead-plan.v1.json +22 -0
  239. package/.pi/output-contracts/mission-readiness.v1.json +20 -0
  240. package/.pi/output-contracts/oracle-merge.v1.json +44 -0
  241. package/.pi/output-contracts/oracle-request.v1.json +20 -0
  242. package/.pi/output-contracts/oracle.v1.json +44 -0
  243. package/.pi/output-contracts/orchestration-profile.v1.json +22 -0
  244. package/.pi/output-contracts/plan.v1.json +48 -0
  245. package/.pi/output-contracts/prompt-pack.v1.json +20 -0
  246. package/.pi/output-contracts/qa.v1.json +40 -0
  247. package/.pi/output-contracts/research.v1.json +36 -0
  248. package/.pi/output-contracts/spec.v1.json +22 -0
  249. package/.pi/output-contracts/synthesis.v1.json +44 -0
  250. package/.pi/output-contracts/temp-agent-card.v1.json +23 -0
  251. package/.pi/output-contracts/todo-child-result.v1.json +20 -0
  252. package/.pi/output-contracts/todo-child-result.v2.json +22 -0
  253. package/.pi/output-contracts/todo-claim-validation.v1.json +22 -0
  254. package/.pi/output-contracts/todo-split-request.v1.json +20 -0
  255. package/.pi/prompts/adaptive-workflow.md +63 -0
  256. package/.pi/prompts/autonomous-runtime.md +15 -0
  257. package/.pi/prompts/benchmark-contender.md +15 -0
  258. package/.pi/prompts/benchmark-judge.md +19 -0
  259. package/.pi/prompts/clarify-spec.md +20 -0
  260. package/.pi/prompts/compute-plan.md +36 -0
  261. package/.pi/prompts/compute-preview.md +42 -0
  262. package/.pi/prompts/contract.md +29 -0
  263. package/.pi/prompts/explore.md +13 -0
  264. package/.pi/prompts/factory-run.md +36 -0
  265. package/.pi/prompts/factory.md +20 -0
  266. package/.pi/prompts/implement.md +27 -0
  267. package/.pi/prompts/model-catalog.md +68 -0
  268. package/.pi/prompts/model-economy.md +64 -0
  269. package/.pi/prompts/oracle-merge.md +18 -0
  270. package/.pi/prompts/oracle.md +13 -0
  271. package/.pi/prompts/orchestrator.md +48 -0
  272. package/.pi/prompts/parallel-review.md +21 -0
  273. package/.pi/prompts/plan.md +21 -0
  274. package/.pi/prompts/project-dna.md +90 -0
  275. package/.pi/prompts/refactor-oracle.md +23 -0
  276. package/.pi/prompts/refactor-slice.md +24 -0
  277. package/.pi/prompts/research.md +20 -0
  278. package/.pi/prompts/spec.md +19 -0
  279. package/.pi/prompts/synthesis.md +18 -0
  280. package/.pi/rules/always.md +38 -0
  281. package/.pi/rules/docs.md +32 -0
  282. package/.pi/rules/factory.md +44 -0
  283. package/.pi/rules/oracle.md +34 -0
  284. package/.pi/rules/orchestration.md +44 -0
  285. package/.pi/rules/project.md +34 -0
  286. package/.pi/rules/prompts.md +43 -0
  287. package/.pi/rules/runtime.md +43 -0
  288. package/.pi/rules/sandbox.md +43 -0
  289. package/.pi/settings.json +28 -0
  290. package/.pi/skills/zob-agentic-access/SKILL.md +20 -0
  291. package/.pi/skills/zob-autonomous-runtime/SKILL.md +41 -0
  292. package/.pi/skills/zob-commit/SKILL.md +79 -0
  293. package/.pi/skills/zob-compaction-policy/SKILL.md +92 -0
  294. package/.pi/skills/zob-compute-profile/SKILL.md +108 -0
  295. package/.pi/skills/zob-coms-safety/SKILL.md +54 -0
  296. package/.pi/skills/zob-coms-v2-live/SKILL.md +47 -0
  297. package/.pi/skills/zob-delegation-routing/SKILL.md +82 -0
  298. package/.pi/skills/zob-factory/SKILL.md +28 -0
  299. package/.pi/skills/zob-goal-todo-tree/SKILL.md +279 -0
  300. package/.pi/skills/zob-harness/SKILL.md +68 -0
  301. package/.pi/skills/zob-mission-control-coms/SKILL.md +39 -0
  302. package/.pi/skills/zob-oracle/SKILL.md +21 -0
  303. package/.pi/skills/zob-owner-pool-drill-writer/SKILL.md +244 -0
  304. package/.pi/skills/zob-owner-pool-launcher/SKILL.md +261 -0
  305. package/.pi/skills/zob-project-dna/SKILL.md +275 -0
  306. package/.pi/skills/zob-sandbox/SKILL.md +29 -0
  307. package/.pi/skills/zob-spec/SKILL.md +25 -0
  308. package/.pi/skills/zob-split-refactor/SKILL.md +39 -0
  309. package/.pi/skills/zob-tool-router/SKILL.md +104 -0
  310. package/.pi/teams/zob-core.json +122 -0
  311. package/AGENTS.md +89 -0
  312. package/CONTRIBUTING.md +56 -0
  313. package/LICENSE +21 -0
  314. package/README.md +360 -0
  315. package/SECURITY.md +35 -0
  316. package/SOURCE_INDEX.md +46 -0
  317. package/package.json +135 -0
  318. package/scripts/README.md +57 -0
  319. package/scripts/autonomy/mission-readiness-secret-smoke.mjs +90 -0
  320. package/scripts/compute-profile/plan-workflow.mjs +85 -0
  321. package/scripts/compute-profile/preview.mjs +242 -0
  322. package/scripts/compute-profile/regression-smoke.mjs +38 -0
  323. package/scripts/compute-profile/summarize.mjs +72 -0
  324. package/scripts/compute-profile/validate-policy.mjs +50 -0
  325. package/scripts/compute-profile/validate-preview.mjs +95 -0
  326. package/scripts/compute-profile/validate-workflow.mjs +58 -0
  327. package/scripts/git-ops/commit-policy-smoke.mjs +221 -0
  328. package/scripts/goal-todo/child-goal-ref-smoke.mjs +252 -0
  329. package/scripts/harness-switch/static-smoke.mjs +43 -0
  330. package/scripts/model-catalog/validate-economy.mjs +223 -0
  331. package/scripts/model-catalog/validate.mjs +199 -0
  332. package/scripts/package-surface/validate-script-refs.mjs +190 -0
  333. package/scripts/path-policy/validate-smoke.mjs +103 -0
  334. package/scripts/project-dna/bench-smoke.mjs +217 -0
  335. package/scripts/project-dna/build-capsules.mjs +207 -0
  336. package/scripts/project-dna/build-sample-spec.mjs +140 -0
  337. package/scripts/project-dna/emit-golden-cases.mjs +75 -0
  338. package/scripts/project-dna/emit-ontology.mjs +75 -0
  339. package/scripts/project-dna/generate-sample.mjs +302 -0
  340. package/scripts/project-dna/oracle-review-smoke.mjs +157 -0
  341. package/scripts/project-dna/plan-workflow.mjs +289 -0
  342. package/scripts/project-dna/query-context.mjs +276 -0
  343. package/scripts/project-dna/query-steward.mjs +149 -0
  344. package/scripts/project-dna/scan.mjs +553 -0
  345. package/scripts/project-dna/validate-5of5.mjs +159 -0
  346. package/scripts/project-dna/validate-golden-cases.mjs +78 -0
  347. package/scripts/project-dna/validate-ontology.mjs +97 -0
  348. package/scripts/project-dna/validate-sample-project.mjs +105 -0
  349. package/scripts/project-dna/validate-scaffold.mjs +383 -0
  350. package/scripts/project-dna/validate-scan-artifacts.mjs +187 -0
  351. package/scripts/project-dna/validate-workflow.mjs +166 -0
  352. package/scripts/start-pi.sh +4 -0
  353. package/scripts/worker-pool/static-smoke.mjs +54 -0
  354. package/scripts/zpeer-local-e2e-smoke.mjs +395 -0
  355. package/scripts/zpeer-static-smoke.mjs +129 -0
  356. package/tsconfig.json +12 -0
@@ -0,0 +1,261 @@
1
+ ---
2
+ name: zob-owner-pool-launcher
3
+ description: Use when the owner gives a plain-language intention and wants the assistant to actively launch and operate a supervised ZOB parallel owner micro-worker pool workflow instead of only generating a prompt.
4
+ ---
5
+ # ZOB Owner Pool Launcher Skill
6
+
7
+ ## Purpose
8
+
9
+ Use this skill when the owner writes a natural-language request such as:
10
+
11
+ ```text
12
+ /skill:zob-owner-pool-launcher <user intent>
13
+ ```
14
+
15
+ The assistant must turn the owner intent into one bounded supervised owner micro-worker pool run, then operate the workflow using existing ZOB coordination and delegation surfaces. This is an operational launcher, not a prompt generator.
16
+
17
+ The launcher may use the prompt-writing logic from `zob-owner-pool-drill-writer` as a formatting aid, but it must actively classify scope, size the pool, create/inspect Goal TODOs when appropriate, create/read worker-pool metadata, dispatch actual workers parent-owned through `delegate_task`/`delegate_agent`, monitor runs, synthesize evidence, validate, and request oracle review when needed.
18
+
19
+ ## Non-negotiable invariants
20
+
21
+ - One bounded slice only. If the intent is broad, narrow it or ask the owner to choose the first slice.
22
+ - Parent-owned dispatch only. Worker-pool metadata does not launch workers.
23
+ - No child-spawns-child. Children may propose splits or owner requests; only the parent applies them.
24
+ - Goal Room is the canonical coordination record for assignments, owner requests, decisions, blockers, and evidence refs.
25
+ - ZPeer/live chat is transient only. Summarize any decision-affecting live clarification as typed Goal Room metadata.
26
+ - No hidden worker-to-worker free chat.
27
+ - Persist no raw bodies in coordination metadata, ledgers, Mission Control artifacts, compute artifacts, or worker-pool records. Use hashes, refs, summaries, and paths.
28
+ - Enforce read-across/write-by-owner: workers may read cited sibling outputs, but only the named owner writes its owned paths.
29
+ - Non-owner changes require a parent-visible `OWNER_CHANGE_REQUEST.v1` or governed request and a parent/owner decision. Approval is not apply/merge.
30
+ - Do not let children directly mutate parent TODOs or mark parent goals complete. Children return evidence/claims; the parent accepts or rejects after review.
31
+ - Reports-only is the default mode.
32
+ - Source-write-gated work requires explicit paths, sandbox/workspace claims, merge queue, rollback metadata, validation, and oracle/human gates. Never auto-apply.
33
+ - Never commit, push, tag, stage, force push, or alter git state from this skill.
34
+ - Never read/write secrets or forbidden paths such as `.env`, keys, `~/.ssh`, `~/.aws`, `node_modules`, `dist`, `build`, or `.git`.
35
+ - Never run destructive commands unless the owner gives explicit approval outside this skill's default workflow.
36
+ - Never count stale/offline peers, append-only logs, or non-live refs as required delivery success.
37
+ - Do not imply fully autonomous production writes, unlimited spawning, or always-on background daemons.
38
+
39
+ ## Intake from the owner prompt
40
+
41
+ Use the user's plain prompt directly. Do not require a preformatted contract unless safety-critical details are missing.
42
+
43
+ Extract:
44
+
45
+ 1. `OBJECTIVE`: one sentence.
46
+ 2. `SCOPE`: the smallest bounded slice that can produce evidence.
47
+ 3. `MODE`: `reports-only` by default, or `source-write-gated` only when explicitly requested.
48
+ 4. `READ_PATHS`: explicit source/context paths; ask if absent and required for safety.
49
+ 5. `OWNED_PATHS`: per-worker output or sandbox paths; must be repo-relative and non-overlapping for writes.
50
+ 6. `FORBIDDEN_PATHS`: include secrets, generated/vendor/build paths, and owner-specified denies.
51
+ 7. `VALIDATION`: narrow commands or evidence checks.
52
+ 8. `OWNER_DECISIONS_NEEDED`: missing paths, scale approval, source-write permission, merge/apply decisions.
53
+
54
+ Ask a clarification question instead of launching when the request lacks safety boundaries for source writes, requires secrets/destructive actions, is too broad for one slice, or would require hidden chat, child direct dispatch, direct TODO mutation, auto-apply, or unbounded worker count.
55
+
56
+ ## Scale and compute policy
57
+
58
+ Choose the smallest useful pool. Worker counts are caps, not targets.
59
+
60
+ | Workers | Use when | Gates |
61
+ | --- | --- | --- |
62
+ | 2 | Simple compare/review, mapper + oracle/planner | Default for small reports-only tasks |
63
+ | 3 | Normal owner pool: mapper, implementer/planner, oracle | Default for most bounded tasks |
64
+ | 5 | Multiple independent lanes or owned paths plus synthesis/oracle | Requires clear decomposition and non-overlapping write grants |
65
+ | 10 | High-complexity, high-profile workflow with separable lanes | Requires explicit owner consent, compute/budget gates, TODO split, validation/oracle plan |
66
+ | 20 | Exceptional max-scale supervised drill | Requires explicit human approval, strict compute/budget gates, oracle plan, and should normally be plan-only or read-only/report-only |
67
+
68
+ Rules:
69
+
70
+ - Default to 2-5 workers.
71
+ - Do not silently select 10 or 20.
72
+ - Use compute preview/resolve when the owner requests auto/high/xhigh/max scale or when 10/20 workers are considered.
73
+ - `max` or 20-worker scale is approval-gated and never bypasses safety, path, sandbox, budget, validation, or oracle gates.
74
+ - If planned work exceeds caps, split into a smaller first run and return a follow-up proposal.
75
+
76
+ ## Safe modes
77
+
78
+ ### Reports-only default
79
+
80
+ Use for exploration, audits, plans, specs, proposals, prompt/workflow design, and oracle review.
81
+
82
+ - Workers write only report/proposal artifacts under explicit output paths.
83
+ - Source paths are read-only.
84
+ - Validation may be structural checks, targeted commands, or evidence review.
85
+ - Final output includes exact next owner decisions.
86
+
87
+ ### Source-write-gated
88
+
89
+ Use only when the owner explicitly asks for code/source changes and provides or approves exact paths.
90
+
91
+ Required gates:
92
+
93
+ 1. Explicit allowed read/write paths and forbidden paths.
94
+ 2. Workspace claim/lease metadata for intended owned write paths.
95
+ 3. Sandbox/temp/quarantine workspace for worker edits; no direct main-workspace apply.
96
+ 4. Merge queue or diff-candidate metadata owned by the parent.
97
+ 5. Changed paths, diff hash, rollback notes, and validation logs.
98
+ 6. Oracle review for risky or merge-ready changes.
99
+ 7. Human/owner approval before any apply. Approval only makes a candidate eligible; it does not auto-apply.
100
+
101
+ If any gate is missing, downgrade to reports-only or stop with a blocker.
102
+
103
+ ## Operational runbook
104
+
105
+ ### 1. Load consistency context
106
+
107
+ When launching a pool, apply these skills as relevant:
108
+
109
+ - `zob-harness` for harness/orchestrator rules.
110
+ - `zob-delegation-routing` before child dispatch.
111
+ - `zob-goal-todo-tree` when using active goals/TODO-linked work.
112
+ - `zob-compute-profile` when auto/high/xhigh/max or 10/20 worker scale is considered.
113
+ - `zob-coms-safety` for Goal Room, governed requests, no raw-body persistence, and stale/live safety.
114
+ - `zob-sandbox` for source-write-gated work.
115
+
116
+ ### 2. Scope lock
117
+
118
+ Restate the six-part contract for the pool:
119
+
120
+ ```text
121
+ 1. TASK: [bounded objective]
122
+ 2. EXPECTED OUTCOME: [observable deliverable/evidence]
123
+ 3. REQUIRED TOOLS: [allowed tools only]
124
+ 4. MUST DO: [positive constraints, paths, validation, parent-owned coordination]
125
+ 5. MUST NOT DO: [hard stops, forbidden paths, no auto-apply/no commits]
126
+ 6. CONTEXT: [original owner prompt, assumptions, mode, worker count, TODO/goal refs]
127
+ ```
128
+
129
+ If the scope or write boundaries are unsafe, stop and ask the owner for the missing decision.
130
+
131
+ ### 3. Goal/TODO setup
132
+
133
+ - If an active goal exists and the work is multi-step, inspect current TODOs first.
134
+ - In `auto` goal mode, create a bounded TODO plan for long/delegated work; in `manual` mode, ask before creating TODOs.
135
+ - Split before parallel writable work: no same-leaf parallel write workers.
136
+ - Use fresh canonical TODO IDs from `get_goal_todos` when linking children; if only a visible path is known, pass `child_goal.todo_path` and let the parent runtime resolve it.
137
+ - Children must return claims; the parent accepts/rejects only after evidence and, when needed, oracle review.
138
+
139
+ ### 4. Worker-pool metadata
140
+
141
+ Create/read worker-pool metadata with existing ZOB worker-pool tools when available.
142
+
143
+ Metadata must be body-free and include:
144
+
145
+ - pool id / goal id / TODO refs;
146
+ - worker roles;
147
+ - owned paths and read paths;
148
+ - output paths;
149
+ - write mode;
150
+ - validation commands;
151
+ - owner request/decision refs;
152
+ - evidence refs/hashes;
153
+ - no-ship blockers.
154
+
155
+ Remember: worker-pool metadata is coordination only and does not dispatch children, mutate TODOs, or apply changes.
156
+
157
+ ### 5. Worker role templates
158
+
159
+ Prefer 3 workers unless the scale policy justifies otherwise:
160
+
161
+ - Mapper: inventory paths, evidence, dependencies, risks, and missing inputs.
162
+ - Planner/Implementer: produce the report, proposal, sandbox diff candidate, or owned slice output.
163
+ - Oracle/QA: review evidence, validation, safety, no-ship status, and completion readiness.
164
+
165
+ For 5 workers, split into independent lanes such as mapper, lane A, lane B, synthesis, oracle.
166
+
167
+ For 10/20 workers, require a named lane map, each with a bounded owner, explicit allowed paths, expected output, validation evidence, and no child dispatch.
168
+
169
+ ### 6. Parent-owned dispatch
170
+
171
+ Dispatch actual work only through parent-owned `delegate_task` or `delegate_agent`.
172
+
173
+ Before first delegation, use the delegation catalog/routing flow when agent choice or output contract is uncertain. Normally omit child `output_contract`, `required_tools`, and `model` unless a narrower verified choice is required.
174
+
175
+ Each child contract must include:
176
+
177
+ - original owner ask when write/edit tools are available;
178
+ - exact `allowed_paths` and `forbidden_paths`;
179
+ - owned/write paths and read-across refs;
180
+ - TODO linkage when applicable;
181
+ - `run_in_background=true` only for active-session background runs that the parent will monitor;
182
+ - explicit statement: no child-spawns-child, no parent TODO mutation, no commits, no auto-apply.
183
+
184
+ ### 7. Runtime monitoring loop
185
+
186
+ While background runs are active:
187
+
188
+ 1. Poll/await bounded runs; do not assume daemon persistence.
189
+ 2. Inspect run status and outputs.
190
+ 3. Extract `OWNER_CHANGE_REQUEST.v1`, `TODO_SPLIT_REQUEST.v1`, or governed request blocks from child outputs with `zob_governed_request_extract` when available.
191
+ 4. Record owner decisions through Goal Room/worker-pool owner decision tools when available.
192
+ 5. Accept, reject, split, defer, or escalate requests parent-owned only.
193
+ 6. Accept/reject TODO claims only after output contract, evidence, validation, and oracle gates pass.
194
+ 7. Treat stale/offline/timeout/missing evidence as blockers, not success.
195
+ 8. Maintain a body-free metadata audit with refs/hashes, not raw child bodies.
196
+
197
+ If the owner sends an in-flight change request, pause affected lanes, record the request, decide whether to narrow, split, cancel, or relaunch, and update Goal Room metadata before continuing.
198
+
199
+ ### 8. Synthesis and validation
200
+
201
+ After child outputs return:
202
+
203
+ - Synthesize worker findings into one parent-owned result.
204
+ - Run the narrowest useful validation commands first.
205
+ - Escalate validation only with a reason.
206
+ - Request oracle review for source-write-gated outputs, risky claims, high/xhigh/max scale, merge readiness, or completion/no-ship decisions.
207
+ - Do not propose root goal completion until TODO completion gates are satisfied and oracle `PASS/no_ship=false` is available when required.
208
+
209
+ ### 9. Completion report
210
+
211
+ Return a concise final result with:
212
+
213
+ ```text
214
+ gap_verdict: SUFFICIENT or GAP, with exact evidence
215
+ worker_count: selected count and why
216
+ worker_outputs: paths/refs and one-line summaries
217
+ owner_requests: decisions made or pending
218
+ validation_commands: exact commands run, or not run with reason
219
+ results: exact outcomes
220
+ metadata_audit: pool id, goal/TODO refs, workers, owned paths, read paths, output paths, evidence refs/hashes, no raw bodies
221
+ no_ship: true/false with reason
222
+ risks/blockers: unresolved risks
223
+ compliance: parent-owned dispatch, Goal Room canonical, ZPeer transient, read-across/write-by-owner, no child-spawns-child, no auto-apply, no commits, no secrets
224
+ ```
225
+
226
+ ## Refusal and stop conditions
227
+
228
+ Refuse or stop when:
229
+
230
+ - The owner asks for secrets, credential harvesting, destructive commands, broad unbounded writes, commits, pushes, tags, or force operations.
231
+ - Source-write is requested without explicit paths or without sandbox/oracle/human gates.
232
+ - The owner requests hidden worker-to-worker chat, child direct dispatch, direct TODO mutation, automatic merge/apply, or unlimited agents.
233
+ - Required live/local delivery is absent, stale, or offline and the workflow depends on it.
234
+ - Persisted metadata would require raw prompt/output/body/diff/patch content.
235
+ - Worker count 10/20 is requested without the required owner approval and budget/compute gates.
236
+
237
+ ## Minimal French usage
238
+
239
+ ```text
240
+ /skill:zob-owner-pool-launcher Analyse ce workflow et lance un petit pool de workers pour me sortir un plan clair, sans modifier le code.
241
+ ```
242
+
243
+ ```text
244
+ /skill:zob-owner-pool-launcher Je veux 3 workers: un qui mappe les fichiers, un qui prépare une proposition, un oracle qui vérifie. Reports-only.
245
+ ```
246
+
247
+ ```text
248
+ /skill:zob-owner-pool-launcher Prépare une correction sandboxée sur ces chemins précis, avec validation et oracle, mais n'applique rien sans mon accord.
249
+ ```
250
+
251
+ Tu peux aussi écrire naturellement:
252
+
253
+ ```text
254
+ Lance un pool supervisé pour auditer cette partie, choisis 2 à 5 workers selon le besoin, et reviens avec les preuves.
255
+ ```
256
+
257
+ For 10 or 20 workers, the owner must say it explicitly and accept the compute/budget/safety gates, for example:
258
+
259
+ ```text
260
+ /skill:zob-owner-pool-launcher Je veux envisager 10 workers pour cette analyse reports-only; demande-moi les validations nécessaires avant de lancer.
261
+ ```
@@ -0,0 +1,275 @@
1
+ ---
2
+ name: zob-project-dna
3
+ description: "Use when turning a trusted reference project folder into ProjectDNA: a code-first knowledge graph, neutral sample-project plan, pointer capsules, and bounded cited context packs for future ZOB agents."
4
+ ---
5
+ # ZOB ProjectDNA Skill
6
+
7
+ ## Purpose
8
+
9
+ ProjectDNA makes a real project usable as code-first context without treating docs as truth. It is agents-first: ZOB agents own scope, capture goals, safety gates, validation, oracle review, and promotion proposals; deterministic scripts are tools that produce evidence for agents to inspect and cite.
10
+
11
+ The intended flow is:
12
+
13
+ ```text
14
+ trusted reference project folder
15
+ → read-only safe scan
16
+ → deterministic code/architecture facts
17
+ → Developer DNA synthesis with citations
18
+ → neutral sample project in quarantine/sandbox
19
+ → pointer capsules and code knowledge graph
20
+ → bounded context packs for future agents
21
+ ```
22
+
23
+ The real project code remains the source of truth. The generated sample, graph, and capsules are navigation layers only.
24
+
25
+ ## When to use
26
+
27
+ Use this skill when the user asks to:
28
+
29
+ - learn from a project folder they like;
30
+ - create a reusable code knowledge graph from a reference app;
31
+ - generate a neutral sample project that preserves architecture/style;
32
+ - add project-code retrieval inspired by prior wiki/retrieval V2 work;
33
+ - speed up future coding with cited project examples;
34
+ - query “how do we do X in my style?” across reference projects.
35
+
36
+ ## Required starting inputs
37
+
38
+ Before any scan or generation, collect or confirm:
39
+
40
+ 1. `source_project_path`: absolute or repo-local path explicitly approved by the user.
41
+ 2. `source_id`: safe id for the reference project, e.g. `my-reference-app`.
42
+ 3. `allowed_paths`: bounded paths the scanner may inspect.
43
+ 4. `forbidden_patterns`: at minimum `.env`, `.env.*`, keys, credentials, `node_modules`, `dist`, `build`, coverage, `.git`.
44
+ 5. `sample_domain`: neutral domain for the generated sample, e.g. `task-tracker`.
45
+ 6. `validation_profile`: install/lint/typecheck/test/build commands or a stated “plan-only” mode.
46
+ 7. `compute_profile`: `auto`, `low`, `medium`, `high`, `xhigh`, or `max`; default `auto`.
47
+ 8. `compute_caps`: optional hard caps for agents, depth, parallelism, duration, context, budget, and oracle.
48
+ 9. `capture_mode`: execution posture: `plan_only`, `read_only_scan`, `sandbox_sample_generation`, or `runtime_query_existing_artifacts`.
49
+ 10. `semantic_capture_mode`: knowledge posture: `full_capture`, `architecture_only`, `targeted_capture`, `sample_first`, or `context_only`.
50
+ 11. `capture_goal`: concrete pattern/question to capture, e.g. architecture, queues, tests, config, or service boundaries.
51
+ 12. `user_note`: optional operator intent/style note; guidance only, never citation evidence.
52
+ 13. `promotion_policy`: normally `proposal_only` until oracle and human approval.
53
+
54
+ If any of these are missing for a real project scan, ask for clarification or produce a plan-only manifest instead of scanning.
55
+
56
+ ## Native ZOB surfaces
57
+
58
+ - Plan doc: `docs/ZOB_PROJECT_DNA_CODE_KNOWLEDGE_GRAPH_PLAN.md`
59
+ - Factory scaffold: `.pi/factories/project-dna/factory.json`
60
+ - Prompt template: `.pi/prompts/project-dna.md`
61
+ - Scaffold validator: `npm run validate:project-dna`
62
+ - Compute preview smoke: `npm run preview:compute-profile:project-dna-smoke`
63
+ - Compute preview validator: `npm run validate:compute-profile:project-dna-smoke`
64
+ - Read-only scanner smoke: `npm run smoke:project-dna-scan`
65
+ - Scan artifact validator: `npm run validate:project-dna-scan:smoke`
66
+ - Pointer capsule builder smoke: `npm run build:project-dna-capsules:smoke`
67
+ - Neutral sample-spec smoke: `npm run build:project-dna-sample-spec:smoke`
68
+ - Quarantine sample generation smoke: `npm run generate:project-dna-sample:smoke`
69
+ - Quarantine sample validation smoke: `npm run validate:project-dna-sample:smoke`
70
+ - Metadata-only agentic workflow planner smoke: `npm run plan:project-dna-workflow:smoke`
71
+ - Agentic workflow plan validator: `npm run validate:project-dna-workflow:smoke`
72
+ - Metadata-only context query smoke: `npm run query:project-dna:smoke`
73
+ - Runtime readiness/plan/query tools: `zob_project_dna_readiness`, `zob_project_dna_plan_workflow`, `zob_project_dna_query`
74
+ - Runtime P5 proposal-only tools: `zob_project_dna_federated_query`, `zob_project_dna_writeback_proposal`
75
+ - Slash/operator surface: `/project-dna`
76
+ - Deterministic retrieval/sample benchmark: `npm run bench:project-dna:smoke`
77
+ - Structural oracle smoke review: `npm run oracle:project-dna:smoke`
78
+ - Context foundation: existing `zob_context_*` tools for scope/citation/writeback gates.
79
+
80
+ Current status: ProjectDNA is scaffolded as a safe skill/factory workflow and now includes deterministic read-only scanner, compute-profile preview scripts, validated smoke artifacts, native runtime readiness/query/federated-query tools, `/project-dna`, and hash-only proposal writeback. **No external knowledge backend import**, sync, embed, or write is performed by default, and no autonomous external-project scanning happens without parent-owned allowed paths. Scripts are deterministic tools for agents; they are not a replacement for parent-owned scope, safety, validation, oracle, and promotion decisions.
81
+
82
+ ## 5/5 agents-first contract
83
+
84
+ A ProjectDNA result is 5/5 only when agents, not scripts, own scope and acceptance:
85
+
86
+ 1. Safety Preflight confirms approved paths, forbidden patterns, source read-only posture, quarantine/report outputs, and proposal-only promotion.
87
+ 2. Repo Scout and deterministic scanner produce cited facts; scanner scripts are microscopes, not the control plane.
88
+ 3. Ontology Steward maps facts into controlled pattern concepts such as `project_dna.agentic_control_plane`, `project_dna.query_steward_rewrite`, and `project_dna.sample_quarantine_pi_like`.
89
+ 4. Query Steward rewrites transient user questions into controlled intent/golden-case expectations without persisting raw query text.
90
+ 5. Pattern Miner, Symbol Range Curator, and Test Linker connect source patterns to precise ranges, tests, examples, docs, and gaps.
91
+ 6. Sample Architect creates only neutral Pi-like quarantine samples with extension/tool/agent/skill/test shape and `source_files_copied=false`.
92
+ 7. Golden Evaluator runs golden cases; every case must return expected citations/files/patterns and no-write safety flags.
93
+ 8. ProjectDNA Oracle can PASS only when ontology, golden cases, query steward report, benchmark, sample validation, and source-safe gates are present.
94
+
95
+ 5/5 does **not** mean durable promotion. It remains reports-local/proposal-only until separate oracle and human approval.
96
+
97
+ ## Safe workflow
98
+
99
+ ### 1. Intake and scope
100
+
101
+ Produce an explicit scope block:
102
+
103
+ ```text
104
+ source_project_path: ...
105
+ source_id: ...
106
+ allowed_paths: ...
107
+ forbidden_patterns: ...
108
+ sample_domain: ...
109
+ execution_mode: plan_only | read_only_scan | sandbox_sample_generation
110
+ capture_mode: plan_only | read_only_scan | sandbox_sample_generation | runtime_query_existing_artifacts
111
+ semantic_capture_mode: full_capture | architecture_only | targeted_capture | sample_first | context_only
112
+ capture_goal: bounded pattern/question to capture
113
+ user_note: optional operator guidance, not evidence
114
+ compute_profile: auto | low | medium | high | xhigh | max
115
+ compute_caps: optional hard caps
116
+ promotion_policy: proposal_only
117
+ ```
118
+
119
+ ### 2. Preflight
120
+
121
+ Must verify:
122
+
123
+ - user-approved path is bounded;
124
+ - source project is not modified;
125
+ - forbidden paths are excluded;
126
+ - output path is a run directory or sandbox/quarantine;
127
+ - no external knowledge-backend import, sync, embed, or write is implied unless explicitly approved.
128
+
129
+ ### 3. Compute preview before scan when profile is auto
130
+
131
+ For `compute_profile=auto`, write or inspect metadata-only compute artifacts before choosing workflow depth:
132
+
133
+ ```text
134
+ compute-preview.json
135
+ compute-profile-resolution.json
136
+ ```
137
+
138
+ ProjectDNA profile mapping:
139
+
140
+ ```text
141
+ auto → metadata-only preview/resolve, then apply the resolved low/medium/high/xhigh/max row
142
+ low → scan + scan validation
143
+ medium → scan + validation + capsules + sample spec + one query
144
+ high → medium + quarantine sample + sample validation + benchmark + oracle
145
+ xhigh → high + specialist lanes + richer query suite + adversarial review
146
+ max → xhigh + multi-reference/symbol/callgraph/promotion packet gates, with strict human/budget/oracle approval
147
+ ```
148
+
149
+ Compute profile must not bypass ProjectDNA safety: source projects remain read-only, external knowledge-backend writes remain disabled, quarantine/proposal-only outputs remain enforced, and child dispatch stays parent-owned.
150
+
151
+ ### 3a. Capture mode policy
152
+
153
+ Use `capture_mode` to pick posture before any tool/script run:
154
+
155
+ - `plan_only`: produce a manifest/plan from approved docs, `capture_goal`, and `user_note`; do not scan source code.
156
+ - `read_only_scan`: inspect only explicit `allowed_paths`, with forbidden patterns skipped and cited.
157
+ - `sandbox_sample_generation`: use existing facts/specs to write only under approved quarantine/sandbox paths.
158
+ - `runtime_query_existing_artifacts`: return bounded cited context from existing scan artifacts; do not start a new external-project scan.
159
+
160
+ Use `semantic_capture_mode` to pick knowledge depth:
161
+
162
+ - `full_capture`: small/medium repo, reusable reference across major domains.
163
+ - `architecture_only`: large repo or user asks to preserve architecture/scaffold only.
164
+ - `targeted_capture`: mine only named domains/features from `capture_goal` or `user_note`.
165
+ - `sample_first`: prioritize a neutral working sample from cited architecture facts.
166
+ - `context_only`: return bounded pointers/context packs without sample generation.
167
+
168
+ `capture_goal` drives which artifacts/capsules/query cases are in scope. `user_note` may explain intent, constraints, or style preferences, but it is never a citation and must not override scanner facts. For huge repos, default to `architecture_only` or `targeted_capture` unless the user explicitly approves deeper compute.
169
+
170
+ ### 4. Deterministic scan first
171
+
172
+ Scanner facts should precede LLM synthesis:
173
+
174
+ ```text
175
+ project-fingerprint.json
176
+ dependency-map.json
177
+ file-map.json
178
+ symbol-map.json
179
+ import-graph.json
180
+ route-map.json
181
+ queue-map.json
182
+ config-map.json
183
+ test-map.json
184
+ architecture-map.json
185
+ ```
186
+
187
+ Each fact must cite safe repo-relative or source-relative paths and line ranges when available.
188
+
189
+ ### 5. Developer DNA synthesis
190
+
191
+ LLM/Ollama may summarize patterns, but only from deterministic facts and citations.
192
+
193
+ Allowed synthesis outputs:
194
+
195
+ ```text
196
+ developer-dna.json
197
+ code-knowledge-graph.json
198
+ capsules/*.md
199
+ context-pack-smoke.json
200
+ ```
201
+
202
+ Forbidden synthesis behavior:
203
+
204
+ - invent architecture not supported by scan facts;
205
+ - answer from generic framework docs instead of project evidence;
206
+ - store raw proprietary bodies unnecessarily;
207
+ - copy product-specific logic into the sample.
208
+
209
+ ### 6. Sample generation
210
+
211
+ Generate only in quarantine/sandbox first:
212
+
213
+ ```text
214
+ reports/factory-runs/<run_id>/quarantine/project-dna-sample/
215
+ ```
216
+
217
+ Promote only if:
218
+
219
+ - validation commands pass;
220
+ - similarity/leakage checks pass;
221
+ - citations are valid;
222
+ - oracle returns PASS/no_ship=false;
223
+ - human approval is present if writing to durable knowledge/sample locations.
224
+
225
+ ### 7. Runtime context packs
226
+
227
+ When another ZOB task needs project style context, the Context Steward should return a bounded context pack with:
228
+
229
+ - answer summary;
230
+ - files to read first;
231
+ - source citations;
232
+ - sample citations if available;
233
+ - observed rules;
234
+ - explicit gaps;
235
+ - token budget;
236
+ - no raw secrets or full-project dumps.
237
+
238
+ ## No-ship rules
239
+
240
+ Block or stop if any occur:
241
+
242
+ - `.env`, key, credential, SSH/AWS/cloud secret, or private raw data is read or included;
243
+ - source project is modified;
244
+ - output writes outside the approved run/sandbox/quarantine path;
245
+ - external knowledge-backend import/sync/embed/write is attempted without explicit approval;
246
+ - sample project fails build/test/typecheck where required;
247
+ - generated sample copies product logic too closely;
248
+ - citations or line ranges are missing/invalid;
249
+ - context pack loads the entire project rather than bounded cited excerpts;
250
+ - oracle reports `no_ship=true`.
251
+
252
+ ## Delegation contract template
253
+
254
+ Use this six-part contract for ProjectDNA child work:
255
+
256
+ ```text
257
+ 1. TASK: [scan/synthesize/validate one bounded ProjectDNA artifact]
258
+ 2. EXPECTED OUTCOME: [specific artifact or verdict with citations]
259
+ 3. REQUIRED TOOLS: read, grep, find, ls only unless sandbox/write is explicitly approved
260
+ 4. MUST DO: cite files/line ranges; obey allowed_paths; report skipped forbidden paths
261
+ 5. MUST NOT DO: no secrets; no source writes; no external knowledge-backend import/sync/embed/write; no broad corpus load
262
+ 6. CONTEXT: source_id, allowed_paths, forbidden_patterns, target artifact, downstream validator/oracle use
263
+ ```
264
+
265
+ ## Final response shape
266
+
267
+ End ProjectDNA work with:
268
+
269
+ ```text
270
+ <result>what was created or validated</result>
271
+ <evidence>file paths, run ids, validation commands</evidence>
272
+ <risks_blockers>remaining gaps/no-ship risks</risks_blockers>
273
+ <compliance>read-only/source-safe/quarantine/proposal-only statement</compliance>
274
+ <deliverable_delivered>yes|no</deliverable_delivered>
275
+ ```
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: zob-sandbox
3
+ description: Use when enabling write-capable agents/factories safely through temp workspaces, diff gates, rollback metadata, and oracle review.
4
+ ---
5
+ # ZOB Sandbox Skill
6
+
7
+ ## Write safety ladder
8
+
9
+ 1. Claim intended workspace paths with metadata-only leases before parallel write work.
10
+ 2. Work in temp copy/worktree.
11
+ 3. Enforce allowed/forbidden paths.
12
+ 4. Run minimal validation.
13
+ 5. Produce diff hash and changed paths.
14
+ 6. Oracle reviews diff.
15
+ 7. Apply only after policy/human approval.
16
+ 8. Preserve rollback metadata.
17
+
18
+ ## Non-negotiables
19
+
20
+ - No direct autonomous writes to main workspace.
21
+ - No auto-apply by default.
22
+ - No generated/vendor/secrets paths.
23
+ - Workspace claims/leases are conflict-detection metadata only; they do not grant write permission, apply changes, or bypass parent/oracle gates.
24
+ - In parallel owner pools, a lease/claim identifies the intended owner paths. Plans must keep `write_paths` within `owned_paths`; a worker's own active listed write claim may cover its write intent, while other overlapping active claims remain conflicts. Other workers may read across cited refs but must not edit those paths.
25
+ - Read-across is read-only and does not grant write permission; if read-across overlaps write paths, require a hash-only justification and keep write-by-owner unchanged.
26
+ - Cross-owner edits require a typed owner request with path, reason, risk, evidence, and validation plan; owner requests must name an assignment owner and requested paths must be covered by that owner's owned/write paths when a pool plan exists. Parent/owner decisions are metadata only and never auto-apply.
27
+ - Merge queue candidates/decisions are parent-owned metadata only; approvals mean manual-apply eligible, never auto-applied.
28
+ - Missing isolated validation, diff hash, conflict check, rollback metadata, or oracle/human approval for risky merges is no-ship.
29
+ - Rollback metadata required before scaling writes.
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: zob-spec
3
+ description: Use when turning product, feature, or factory ideas into testable ZOB specs and clarification gates before planning.
4
+ ---
5
+ # ZOB Spec Skill
6
+
7
+ ## When to use
8
+
9
+ Use for:
10
+ - Product/feature-first asks.
11
+ - Ambiguous requirements needing acceptance criteria.
12
+ - Factory ideas that need a stable input/output contract.
13
+ - Any request where planning would be unsafe without a spec.
14
+
15
+ ## Workflow
16
+
17
+ 1. Run `specifier` with `output_contract: spec.v1`.
18
+ 2. If acceptance criteria are missing, contradictory, or not testable, run `clarifier` with `output_contract: clarification.v1`.
19
+ 3. Do not proceed to planning when `clarity_score < 70` or `verdict: BLOCKED`.
20
+ 4. Preserve original user ask and list assumptions.
21
+
22
+ ## Safety
23
+
24
+ - Read-only only: `read`, `grep`, `find`, `ls`.
25
+ - No implementation, writes, browser/cloud actions, or secrets.
@@ -0,0 +1,39 @@
1
+ ---
2
+ name: zob-split-refactor
3
+ description: Use when splitting a monolithic ZOB/Pi TypeScript extension into modules without behavior changes. Enforces split-only moves, export compatibility, local AGENTS.md context, and smoke validation.
4
+ ---
5
+ # ZOB Split Refactor
6
+
7
+ ## Use when
8
+
9
+ - Splitting `.pi/extensions/zob-harness/index.ts` or another monolithic ZOB/Pi TypeScript extension.
10
+ - Moving one bounded block into a sidecar module.
11
+ - Verifying exports/imports/circularity after a split-only slice.
12
+
13
+ ## Rules
14
+
15
+ - Move code; do not rewrite logic.
16
+ - Preserve public exports from `index.ts`.
17
+ - Keep the Pi entrypoint and `default export` stable until an explicit final barrel switch is approved.
18
+ - Use NodeNext relative imports with `.js` suffix, e.g. `./utils/paths.js`.
19
+ - Never import `index.ts` from `src/**`.
20
+ - Do not rename tools, commands, event handlers, sentinels, artifacts, schemas, prompt strings, error messages, or output contract ids.
21
+ - Do not change array order, defaults, validations, sync/async behavior, `Date.now()`, `new Date()`, or `Math.random()` semantics.
22
+ - Read the nearest `AGENTS.md` before editing a folder.
23
+
24
+ ## Slice workflow
25
+
26
+ 1. Read `docs/ZOB_HARNESS_INDEX_REFACTOR_PLAYBOOK.md` once for the phase.
27
+ 2. Read the local `AGENTS.md` for the target folder.
28
+ 3. Read only the relevant `index.ts` range and already-extracted modules.
29
+ 4. Move a bounded block with minimal import/export changes.
30
+ 5. Validate with `npm run check -- --pretty false`.
31
+ 6. For domain/runtime slices, also run `npm run smoke:harness`.
32
+ 7. Ask a read-only oracle to check equivalence before continuing.
33
+
34
+ ## Stop conditions
35
+
36
+ - A slice requires importing from `src/**` back into `index.ts` without approval.
37
+ - A `src/**` file would import from `index.ts`.
38
+ - Typecheck failure requires behavior changes instead of import/export fixes.
39
+ - Any public export, registration, sentinel, artifact path, schema description, or error string would change.