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.
- package/.pi/adapters/registry.json +103 -0
- package/.pi/agents/architecture-cartographer.md +53 -0
- package/.pi/agents/chief-vision.md +39 -0
- package/.pi/agents/clarifier.md +58 -0
- package/.pi/agents/context-steward.md +52 -0
- package/.pi/agents/doc-steward.md +34 -0
- package/.pi/agents/explore.md +49 -0
- package/.pi/agents/factory.md +41 -0
- package/.pi/agents/implementer.md +44 -0
- package/.pi/agents/librarian.md +32 -0
- package/.pi/agents/oracle-merge.md +50 -0
- package/.pi/agents/oracle.md +55 -0
- package/.pi/agents/pattern-miner.md +53 -0
- package/.pi/agents/planner.md +39 -0
- package/.pi/agents/project-dna-golden-evaluator.md +32 -0
- package/.pi/agents/project-dna-ontology-steward.md +30 -0
- package/.pi/agents/project-dna-oracle.md +56 -0
- package/.pi/agents/project-dna-orchestrator.md +60 -0
- package/.pi/agents/project-dna-query-steward.md +38 -0
- package/.pi/agents/project-dna-safety-preflight.md +54 -0
- package/.pi/agents/project-dna-test-linker.md +27 -0
- package/.pi/agents/qa.md +38 -0
- package/.pi/agents/refactor-cartographer.md +28 -0
- package/.pi/agents/refactor-mover.md +31 -0
- package/.pi/agents/refactor-oracle.md +49 -0
- package/.pi/agents/repo-scout.md +60 -0
- package/.pi/agents/sample-architect.md +48 -0
- package/.pi/agents/specifier.md +57 -0
- package/.pi/agents/symbol-range-curator.md +41 -0
- package/.pi/agents/synthesis.md +52 -0
- package/.pi/agents/temp-agent-creator.md +35 -0
- package/.pi/autonomy-policy.json +67 -0
- package/.pi/budget-policy.json +54 -0
- package/.pi/capabilities/zob-public-runtime-capabilities.json +1700 -0
- package/.pi/chains/explore-plan-oracle.json +78 -0
- package/.pi/chains/explore-spec-clarify-plan-oracle.json +64 -0
- package/.pi/chains/explore-spec-plan-oracle.json +53 -0
- package/.pi/chains/spec-clarify-plan-oracle.json +53 -0
- package/.pi/chains/spec-factory-oracle.json +42 -0
- package/.pi/chains/spec-plan-oracle.json +42 -0
- package/.pi/compute-profiles/defaults.json +19 -0
- package/.pi/compute-profiles/overrides.json +13 -0
- package/.pi/compute-profiles/risk-rules.json +16 -0
- package/.pi/daemon-policy.json +80 -0
- package/.pi/damage-control-rules.json +45 -0
- package/.pi/extensions/zob-child-safety/index.ts +212 -0
- package/.pi/extensions/zob-harness/AGENTS.md +28 -0
- package/.pi/extensions/zob-harness/index.ts +391 -0
- package/.pi/extensions/zob-harness/src/AGENTS.md +25 -0
- package/.pi/extensions/zob-harness/src/agents.ts +82 -0
- package/.pi/extensions/zob-harness/src/autonomous-runtime.ts +2912 -0
- package/.pi/extensions/zob-harness/src/autonomy-readiness.ts +778 -0
- package/.pi/extensions/zob-harness/src/budget-policy.ts +308 -0
- package/.pi/extensions/zob-harness/src/capabilities.ts +249 -0
- package/.pi/extensions/zob-harness/src/child-runner.ts +249 -0
- package/.pi/extensions/zob-harness/src/chronicle.ts +262 -0
- package/.pi/extensions/zob-harness/src/compute-profile.ts +602 -0
- package/.pi/extensions/zob-harness/src/compute-workflow-shape.ts +168 -0
- package/.pi/extensions/zob-harness/src/coms-v2/AGENTS.md +16 -0
- package/.pi/extensions/zob-harness/src/coms-v2/envelope.ts +121 -0
- package/.pi/extensions/zob-harness/src/coms-v2/identity.ts +53 -0
- package/.pi/extensions/zob-harness/src/coms-v2/ledger-bridge.ts +67 -0
- package/.pi/extensions/zob-harness/src/coms-v2/local-transport.ts +147 -0
- package/.pi/extensions/zob-harness/src/coms-v2/pending-replies.ts +80 -0
- package/.pi/extensions/zob-harness/src/coms-v2/policy.ts +125 -0
- package/.pi/extensions/zob-harness/src/coms-v2/presence.ts +55 -0
- package/.pi/extensions/zob-harness/src/coms-v2/registry.ts +113 -0
- package/.pi/extensions/zob-harness/src/coms-v2/response-capture.ts +50 -0
- package/.pi/extensions/zob-harness/src/coms-v2/transcript-capture.ts +164 -0
- package/.pi/extensions/zob-harness/src/coms-v2/types.ts +149 -0
- package/.pi/extensions/zob-harness/src/coms-v2/zpeer-profile.ts +140 -0
- package/.pi/extensions/zob-harness/src/coms-v2/zpeer.ts +452 -0
- package/.pi/extensions/zob-harness/src/constants.ts +108 -0
- package/.pi/extensions/zob-harness/src/context-gbrain.ts +465 -0
- package/.pi/extensions/zob-harness/src/daemon-policy.ts +223 -0
- package/.pi/extensions/zob-harness/src/daemon-readiness.ts +134 -0
- package/.pi/extensions/zob-harness/src/daemon-runtime.ts +393 -0
- package/.pi/extensions/zob-harness/src/factory/AGENTS.md +24 -0
- package/.pi/extensions/zob-harness/src/factory/agentic-plan.ts +65 -0
- package/.pi/extensions/zob-harness/src/factory/quarantine.ts +319 -0
- package/.pi/extensions/zob-harness/src/factory/run.ts +520 -0
- package/.pi/extensions/zob-harness/src/factory/validation.ts +454 -0
- package/.pi/extensions/zob-harness/src/factory-selector.ts +318 -0
- package/.pi/extensions/zob-harness/src/full-autonomy-test.ts +226 -0
- package/.pi/extensions/zob-harness/src/git-ops.ts +868 -0
- package/.pi/extensions/zob-harness/src/goal-room.ts +178 -0
- package/.pi/extensions/zob-harness/src/goal-runtime.ts +1569 -0
- package/.pi/extensions/zob-harness/src/goal-todo-imports.ts +111 -0
- package/.pi/extensions/zob-harness/src/goal-todo-types.ts +231 -0
- package/.pi/extensions/zob-harness/src/goal-todos.ts +1410 -0
- package/.pi/extensions/zob-harness/src/goal.ts +152 -0
- package/.pi/extensions/zob-harness/src/governed-requests.ts +436 -0
- package/.pi/extensions/zob-harness/src/interactive-autonomy.ts +595 -0
- package/.pi/extensions/zob-harness/src/launch-apply.ts +313 -0
- package/.pi/extensions/zob-harness/src/merge-queue.ts +290 -0
- package/.pi/extensions/zob-harness/src/mission-control.ts +573 -0
- package/.pi/extensions/zob-harness/src/model-availability.ts +52 -0
- package/.pi/extensions/zob-harness/src/model-routing.ts +429 -0
- package/.pi/extensions/zob-harness/src/orchestration/AGENTS.md +23 -0
- package/.pi/extensions/zob-harness/src/orchestration/adaptive-delegation.ts +547 -0
- package/.pi/extensions/zob-harness/src/orchestration/adaptive-workflow.ts +585 -0
- package/.pi/extensions/zob-harness/src/orchestration/lead-plan.ts +192 -0
- package/.pi/extensions/zob-harness/src/orchestration/plan.ts +168 -0
- package/.pi/extensions/zob-harness/src/orchestration/room.ts +346 -0
- package/.pi/extensions/zob-harness/src/orchestration/run.ts +134 -0
- package/.pi/extensions/zob-harness/src/orchestration/supervised-readonly.ts +1147 -0
- package/.pi/extensions/zob-harness/src/orchestration/widget-readers.ts +132 -0
- package/.pi/extensions/zob-harness/src/output-contracts.ts +656 -0
- package/.pi/extensions/zob-harness/src/project-dna.ts +533 -0
- package/.pi/extensions/zob-harness/src/promotion/AGENTS.md +24 -0
- package/.pi/extensions/zob-harness/src/promotion/candidate.ts +336 -0
- package/.pi/extensions/zob-harness/src/promotion/coms.ts +127 -0
- package/.pi/extensions/zob-harness/src/promotion/documentation.ts +142 -0
- package/.pi/extensions/zob-harness/src/promotion/factory.ts +107 -0
- package/.pi/extensions/zob-harness/src/promotion/ledger.ts +2 -0
- package/.pi/extensions/zob-harness/src/promotion/temp-agent.ts +151 -0
- package/.pi/extensions/zob-harness/src/promotion/types.ts +149 -0
- package/.pi/extensions/zob-harness/src/promotion/validate.ts +6 -0
- package/.pi/extensions/zob-harness/src/promotion/write-lane.ts +162 -0
- package/.pi/extensions/zob-harness/src/prompt-packs.ts +239 -0
- package/.pi/extensions/zob-harness/src/queue.ts +386 -0
- package/.pi/extensions/zob-harness/src/rules.ts +225 -0
- package/.pi/extensions/zob-harness/src/runtime/AGENTS.md +26 -0
- package/.pi/extensions/zob-harness/src/runtime/adaptive-zmode.ts +116 -0
- package/.pi/extensions/zob-harness/src/runtime/auto-compaction.ts +715 -0
- package/.pi/extensions/zob-harness/src/runtime/commands.ts +1315 -0
- package/.pi/extensions/zob-harness/src/runtime/compaction-policy.ts +516 -0
- package/.pi/extensions/zob-harness/src/runtime/delegation-click-markers.ts +141 -0
- package/.pi/extensions/zob-harness/src/runtime/delegation-feed.ts +415 -0
- package/.pi/extensions/zob-harness/src/runtime/delegation-markdown.ts +97 -0
- package/.pi/extensions/zob-harness/src/runtime/delegation-monitor.ts +553 -0
- package/.pi/extensions/zob-harness/src/runtime/delegation-mouse.ts +205 -0
- package/.pi/extensions/zob-harness/src/runtime/delegation-overlay.ts +434 -0
- package/.pi/extensions/zob-harness/src/runtime/events.ts +736 -0
- package/.pi/extensions/zob-harness/src/runtime/goal-todo-overlay.ts +214 -0
- package/.pi/extensions/zob-harness/src/runtime/mode-intent.ts +144 -0
- package/.pi/extensions/zob-harness/src/runtime/plan-capture.ts +270 -0
- package/.pi/extensions/zob-harness/src/runtime/state.ts +403 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-autonomous.ts +117 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-compute.ts +136 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-coms.ts +365 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-context.ts +70 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-delegation.ts +1854 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-factory.ts +810 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-goal-room.ts +46 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-governed-requests.ts +38 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-merge-queue.ts +61 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-mission-control.ts +77 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-orchestration.ts +106 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-project-dna.ts +123 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-worker-pool.ts +93 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-workspace-claims.ts +62 -0
- package/.pi/extensions/zob-harness/src/runtime/tools-zcommit.ts +147 -0
- package/.pi/extensions/zob-harness/src/runtime/widget.ts +353 -0
- package/.pi/extensions/zob-harness/src/runtime/zobHarness.ts +60 -0
- package/.pi/extensions/zob-harness/src/safety.ts +338 -0
- package/.pi/extensions/zob-harness/src/sandbox.ts +1508 -0
- package/.pi/extensions/zob-harness/src/schemas-project-dna.ts +47 -0
- package/.pi/extensions/zob-harness/src/schemas.ts +695 -0
- package/.pi/extensions/zob-harness/src/telemetry.ts +373 -0
- package/.pi/extensions/zob-harness/src/topology/AGENTS.md +22 -0
- package/.pi/extensions/zob-harness/src/topology/chains.ts +236 -0
- package/.pi/extensions/zob-harness/src/topology/coms.ts +211 -0
- package/.pi/extensions/zob-harness/src/topology/orchestration-profiles.ts +204 -0
- package/.pi/extensions/zob-harness/src/topology/teams.ts +113 -0
- package/.pi/extensions/zob-harness/src/types/core.ts +47 -0
- package/.pi/extensions/zob-harness/src/types.ts +939 -0
- package/.pi/extensions/zob-harness/src/utils/AGENTS.md +22 -0
- package/.pi/extensions/zob-harness/src/utils/formatting.ts +34 -0
- package/.pi/extensions/zob-harness/src/utils/hashing.ts +11 -0
- package/.pi/extensions/zob-harness/src/utils/json.ts +28 -0
- package/.pi/extensions/zob-harness/src/utils/paths.ts +54 -0
- package/.pi/extensions/zob-harness/src/utils/records.ts +25 -0
- package/.pi/extensions/zob-harness/src/utils/resources.ts +38 -0
- package/.pi/extensions/zob-harness/src/worker-pool.ts +672 -0
- package/.pi/extensions/zob-harness/src/workspace-claims.ts +297 -0
- package/.pi/extensions/zob-switch/index.ts +180 -0
- package/.pi/factories/budget-preflight-dry-run/batch-manifest.json +59 -0
- package/.pi/factories/budget-preflight-dry-run/factory.json +94 -0
- package/.pi/factories/budget-preflight-dry-run/pilot-manifest.json +50 -0
- package/.pi/factories/budget-preflight-dry-run/smoke-manifest.json +43 -0
- package/.pi/factories/code-review-matrix/batch-manifest.json +61 -0
- package/.pi/factories/code-review-matrix/factory.json +163 -0
- package/.pi/factories/code-review-matrix/pilot-manifest.json +41 -0
- package/.pi/factories/code-review-matrix/smoke-manifest.json +35 -0
- package/.pi/factories/factory-forge/batch-manifest.json +56 -0
- package/.pi/factories/factory-forge/factory.json +84 -0
- package/.pi/factories/factory-forge/pilot-manifest.json +32 -0
- package/.pi/factories/factory-forge/smoke-manifest.json +19 -0
- package/.pi/factories/opencode-pattern-canonizer/batch-manifest.json +54 -0
- package/.pi/factories/opencode-pattern-canonizer/factory.json +86 -0
- package/.pi/factories/opencode-pattern-canonizer/pilot-manifest.json +39 -0
- package/.pi/factories/opencode-pattern-canonizer/smoke-manifest.json +26 -0
- package/.pi/factories/project-dna/README.md +182 -0
- package/.pi/factories/project-dna/batch-manifest.json +37 -0
- package/.pi/factories/project-dna/example-project-dna-manifest-v2.json +80 -0
- package/.pi/factories/project-dna/example-project-dna-manifest.json +58 -0
- package/.pi/factories/project-dna/factory.json +131 -0
- package/.pi/factories/project-dna/golden-cases-smoke.json +62 -0
- package/.pi/factories/project-dna/pi-agentic-ontology.json +88 -0
- package/.pi/factories/project-dna/pilot-manifest.json +32 -0
- package/.pi/factories/project-dna/schemas/benchmark-suite.schema.json +27 -0
- package/.pi/factories/project-dna/schemas/code-knowledge-graph.schema.json +97 -0
- package/.pi/factories/project-dna/schemas/context-pack.schema.json +43 -0
- package/.pi/factories/project-dna/schemas/golden-case.schema.json +36 -0
- package/.pi/factories/project-dna/schemas/manifest-v2.schema.json +128 -0
- package/.pi/factories/project-dna/schemas/manifest.schema.json +77 -0
- package/.pi/factories/project-dna/schemas/ontology.schema.json +45 -0
- package/.pi/factories/project-dna/schemas/project-fingerprint.schema.json +28 -0
- package/.pi/factories/project-dna/schemas/query-steward-report.schema.json +52 -0
- package/.pi/factories/project-dna/smoke-manifest.json +27 -0
- package/.pi/factories/roadmap-smoke-lots/batch-manifest.json +49 -0
- package/.pi/factories/roadmap-smoke-lots/factory.json +89 -0
- package/.pi/factories/roadmap-smoke-lots/pilot-manifest.json +50 -0
- package/.pi/factories/roadmap-smoke-lots/smoke-manifest.json +35 -0
- package/.pi/git-policy.json +120 -0
- package/.pi/mission-control/zob_coms_transport.json +64 -0
- package/.pi/model-catalog.example.json +345 -0
- package/.pi/model-economy.example.json +196 -0
- package/.pi/model-routing.json +86 -0
- package/.pi/orchestrations/adaptive-chief-vision.json +193 -0
- package/.pi/orchestrations/ceo-feature-build.json +182 -0
- package/.pi/orchestrations/readonly-dynamic-smoke.json +75 -0
- package/.pi/output-contracts/agent-event.v1.json +19 -0
- package/.pi/output-contracts/base.v1.json +24 -0
- package/.pi/output-contracts/brain-lookup.v1.json +21 -0
- package/.pi/output-contracts/clarification.v1.json +21 -0
- package/.pi/output-contracts/context-pack.v1.json +20 -0
- package/.pi/output-contracts/context-request.v1.json +21 -0
- package/.pi/output-contracts/context-steward.v1.json +19 -0
- package/.pi/output-contracts/context-writeback-proposal.v1.json +18 -0
- package/.pi/output-contracts/delegation-request.v1.json +21 -0
- package/.pi/output-contracts/explore.v1.json +52 -0
- package/.pi/output-contracts/factory.v1.json +48 -0
- package/.pi/output-contracts/guidance-steward.v1.json +18 -0
- package/.pi/output-contracts/implement.v1.json +40 -0
- package/.pi/output-contracts/launch-authorization.v1.json +21 -0
- package/.pi/output-contracts/lead-plan.v1.json +22 -0
- package/.pi/output-contracts/mission-readiness.v1.json +20 -0
- package/.pi/output-contracts/oracle-merge.v1.json +44 -0
- package/.pi/output-contracts/oracle-request.v1.json +20 -0
- package/.pi/output-contracts/oracle.v1.json +44 -0
- package/.pi/output-contracts/orchestration-profile.v1.json +22 -0
- package/.pi/output-contracts/plan.v1.json +48 -0
- package/.pi/output-contracts/prompt-pack.v1.json +20 -0
- package/.pi/output-contracts/qa.v1.json +40 -0
- package/.pi/output-contracts/research.v1.json +36 -0
- package/.pi/output-contracts/spec.v1.json +22 -0
- package/.pi/output-contracts/synthesis.v1.json +44 -0
- package/.pi/output-contracts/temp-agent-card.v1.json +23 -0
- package/.pi/output-contracts/todo-child-result.v1.json +20 -0
- package/.pi/output-contracts/todo-child-result.v2.json +22 -0
- package/.pi/output-contracts/todo-claim-validation.v1.json +22 -0
- package/.pi/output-contracts/todo-split-request.v1.json +20 -0
- package/.pi/prompts/adaptive-workflow.md +63 -0
- package/.pi/prompts/autonomous-runtime.md +15 -0
- package/.pi/prompts/benchmark-contender.md +15 -0
- package/.pi/prompts/benchmark-judge.md +19 -0
- package/.pi/prompts/clarify-spec.md +20 -0
- package/.pi/prompts/compute-plan.md +36 -0
- package/.pi/prompts/compute-preview.md +42 -0
- package/.pi/prompts/contract.md +29 -0
- package/.pi/prompts/explore.md +13 -0
- package/.pi/prompts/factory-run.md +36 -0
- package/.pi/prompts/factory.md +20 -0
- package/.pi/prompts/implement.md +27 -0
- package/.pi/prompts/model-catalog.md +68 -0
- package/.pi/prompts/model-economy.md +64 -0
- package/.pi/prompts/oracle-merge.md +18 -0
- package/.pi/prompts/oracle.md +13 -0
- package/.pi/prompts/orchestrator.md +48 -0
- package/.pi/prompts/parallel-review.md +21 -0
- package/.pi/prompts/plan.md +21 -0
- package/.pi/prompts/project-dna.md +90 -0
- package/.pi/prompts/refactor-oracle.md +23 -0
- package/.pi/prompts/refactor-slice.md +24 -0
- package/.pi/prompts/research.md +20 -0
- package/.pi/prompts/spec.md +19 -0
- package/.pi/prompts/synthesis.md +18 -0
- package/.pi/rules/always.md +38 -0
- package/.pi/rules/docs.md +32 -0
- package/.pi/rules/factory.md +44 -0
- package/.pi/rules/oracle.md +34 -0
- package/.pi/rules/orchestration.md +44 -0
- package/.pi/rules/project.md +34 -0
- package/.pi/rules/prompts.md +43 -0
- package/.pi/rules/runtime.md +43 -0
- package/.pi/rules/sandbox.md +43 -0
- package/.pi/settings.json +28 -0
- package/.pi/skills/zob-agentic-access/SKILL.md +20 -0
- package/.pi/skills/zob-autonomous-runtime/SKILL.md +41 -0
- package/.pi/skills/zob-commit/SKILL.md +79 -0
- package/.pi/skills/zob-compaction-policy/SKILL.md +92 -0
- package/.pi/skills/zob-compute-profile/SKILL.md +108 -0
- package/.pi/skills/zob-coms-safety/SKILL.md +54 -0
- package/.pi/skills/zob-coms-v2-live/SKILL.md +47 -0
- package/.pi/skills/zob-delegation-routing/SKILL.md +82 -0
- package/.pi/skills/zob-factory/SKILL.md +28 -0
- package/.pi/skills/zob-goal-todo-tree/SKILL.md +279 -0
- package/.pi/skills/zob-harness/SKILL.md +68 -0
- package/.pi/skills/zob-mission-control-coms/SKILL.md +39 -0
- package/.pi/skills/zob-oracle/SKILL.md +21 -0
- package/.pi/skills/zob-owner-pool-drill-writer/SKILL.md +244 -0
- package/.pi/skills/zob-owner-pool-launcher/SKILL.md +261 -0
- package/.pi/skills/zob-project-dna/SKILL.md +275 -0
- package/.pi/skills/zob-sandbox/SKILL.md +29 -0
- package/.pi/skills/zob-spec/SKILL.md +25 -0
- package/.pi/skills/zob-split-refactor/SKILL.md +39 -0
- package/.pi/skills/zob-tool-router/SKILL.md +104 -0
- package/.pi/teams/zob-core.json +122 -0
- package/AGENTS.md +89 -0
- package/CONTRIBUTING.md +56 -0
- package/LICENSE +21 -0
- package/README.md +360 -0
- package/SECURITY.md +35 -0
- package/SOURCE_INDEX.md +46 -0
- package/package.json +135 -0
- package/scripts/README.md +57 -0
- package/scripts/autonomy/mission-readiness-secret-smoke.mjs +90 -0
- package/scripts/compute-profile/plan-workflow.mjs +85 -0
- package/scripts/compute-profile/preview.mjs +242 -0
- package/scripts/compute-profile/regression-smoke.mjs +38 -0
- package/scripts/compute-profile/summarize.mjs +72 -0
- package/scripts/compute-profile/validate-policy.mjs +50 -0
- package/scripts/compute-profile/validate-preview.mjs +95 -0
- package/scripts/compute-profile/validate-workflow.mjs +58 -0
- package/scripts/git-ops/commit-policy-smoke.mjs +221 -0
- package/scripts/goal-todo/child-goal-ref-smoke.mjs +252 -0
- package/scripts/harness-switch/static-smoke.mjs +43 -0
- package/scripts/model-catalog/validate-economy.mjs +223 -0
- package/scripts/model-catalog/validate.mjs +199 -0
- package/scripts/package-surface/validate-script-refs.mjs +190 -0
- package/scripts/path-policy/validate-smoke.mjs +103 -0
- package/scripts/project-dna/bench-smoke.mjs +217 -0
- package/scripts/project-dna/build-capsules.mjs +207 -0
- package/scripts/project-dna/build-sample-spec.mjs +140 -0
- package/scripts/project-dna/emit-golden-cases.mjs +75 -0
- package/scripts/project-dna/emit-ontology.mjs +75 -0
- package/scripts/project-dna/generate-sample.mjs +302 -0
- package/scripts/project-dna/oracle-review-smoke.mjs +157 -0
- package/scripts/project-dna/plan-workflow.mjs +289 -0
- package/scripts/project-dna/query-context.mjs +276 -0
- package/scripts/project-dna/query-steward.mjs +149 -0
- package/scripts/project-dna/scan.mjs +553 -0
- package/scripts/project-dna/validate-5of5.mjs +159 -0
- package/scripts/project-dna/validate-golden-cases.mjs +78 -0
- package/scripts/project-dna/validate-ontology.mjs +97 -0
- package/scripts/project-dna/validate-sample-project.mjs +105 -0
- package/scripts/project-dna/validate-scaffold.mjs +383 -0
- package/scripts/project-dna/validate-scan-artifacts.mjs +187 -0
- package/scripts/project-dna/validate-workflow.mjs +166 -0
- package/scripts/start-pi.sh +4 -0
- package/scripts/worker-pool/static-smoke.mjs +54 -0
- package/scripts/zpeer-local-e2e-smoke.mjs +395 -0
- package/scripts/zpeer-static-smoke.mjs +129 -0
- package/tsconfig.json +12 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "opencode-pattern-canonizer",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Convert OpenCode/meta-analysis batches into canonical workflow pattern, risk, instruction, and quality-gate artifacts.",
|
|
5
|
+
"defaultMode": "smoke",
|
|
6
|
+
"requiredStages": [
|
|
7
|
+
"manifest_loaded",
|
|
8
|
+
"agentic_plan_written",
|
|
9
|
+
"item_processed",
|
|
10
|
+
"patterns_canonicalized",
|
|
11
|
+
"risks_canonicalized",
|
|
12
|
+
"quality_gates_written",
|
|
13
|
+
"validation",
|
|
14
|
+
"sentinel"
|
|
15
|
+
],
|
|
16
|
+
"expectedArtifacts": [
|
|
17
|
+
"patterns.canonical.json",
|
|
18
|
+
"risks.canonical.json",
|
|
19
|
+
"workflow-rules.md",
|
|
20
|
+
"agent-instructions.md",
|
|
21
|
+
"quality-gates.json",
|
|
22
|
+
"dashboard-summary.md"
|
|
23
|
+
],
|
|
24
|
+
"stages": [
|
|
25
|
+
{
|
|
26
|
+
"name": "map-extract-patterns",
|
|
27
|
+
"type": "map",
|
|
28
|
+
"agent": "explore",
|
|
29
|
+
"outputContract": "explore.v1",
|
|
30
|
+
"requiredTools": ["read", "grep", "find", "ls"],
|
|
31
|
+
"expectedOutcome": "Extract workflow patterns, anti-patterns, evidence, and gaps from one input item.",
|
|
32
|
+
"promptTemplate": "Analyze factory item {item.id} at {item.path} for canonical ZOB workflow patterns. Return literal_request, actual_need, success_looks_like, files, answer, gaps, next_steps, evidence, risks/blockers, compliance, and deliverable_delivered.",
|
|
33
|
+
"mustDo": [
|
|
34
|
+
"Read the item path before conclusions.",
|
|
35
|
+
"Map freeform observations to canonical pattern/risk ids when possible.",
|
|
36
|
+
"Cite concrete evidence from the file."
|
|
37
|
+
],
|
|
38
|
+
"mustNotDo": [
|
|
39
|
+
"No edits.",
|
|
40
|
+
"No secrets.",
|
|
41
|
+
"No broad commands."
|
|
42
|
+
],
|
|
43
|
+
"context": "Factory {factory.name} run {run.id}; map stage for {item.id} at {item.path}. Outputs directory: {outputs.dir}."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "reduce-synthesize-taxonomy",
|
|
47
|
+
"type": "reduce",
|
|
48
|
+
"agent": "synthesis",
|
|
49
|
+
"outputContract": "synthesis.v1",
|
|
50
|
+
"requiredTools": ["read", "grep", "find", "ls"],
|
|
51
|
+
"expectedOutcome": "Merge mapped item outputs into consensus taxonomy, conflicts, missing evidence, and rerun tasks.",
|
|
52
|
+
"promptTemplate": "Synthesize map outputs for factory {factory.name} run {run.id}. Read outputs from {outputs.dir}. Produce consensus, conflicts, missing_evidence, recommended_next_action, tasks_to_rerun, evidence, risks/blockers, compliance, and deliverable_delivered.",
|
|
53
|
+
"mustDo": [
|
|
54
|
+
"Separate consensus from conflicts.",
|
|
55
|
+
"Identify missing evidence and rerun tasks.",
|
|
56
|
+
"Preserve canonical pattern/risk ids."
|
|
57
|
+
],
|
|
58
|
+
"mustNotDo": [
|
|
59
|
+
"No edits outside the run directory.",
|
|
60
|
+
"No invented evidence.",
|
|
61
|
+
"No secrets."
|
|
62
|
+
],
|
|
63
|
+
"context": "Factory {factory.name} reduce stage for run {run.id}."
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "validate-no-ship",
|
|
67
|
+
"type": "validate",
|
|
68
|
+
"agent": "oracle-merge",
|
|
69
|
+
"outputContract": "oracle-merge.v1",
|
|
70
|
+
"requiredTools": ["read", "grep", "find", "ls"],
|
|
71
|
+
"expectedOutcome": "Validate factory outputs and produce global PASS/FAIL/WARN with no_ship decision.",
|
|
72
|
+
"promptTemplate": "Validate factory {factory.name} run {run.id}. Check manifest, outputs, checkpoints, validation.json, final-report.md, and DONE.sentinel under {run.dir}. Return verdict, confidence, no_ship, blockers, notes, evidence, merged_lanes, risks/blockers, compliance, and deliverable_delivered.",
|
|
73
|
+
"mustDo": [
|
|
74
|
+
"Fail if sentinel or validation evidence is missing.",
|
|
75
|
+
"Warn if evidence is incomplete.",
|
|
76
|
+
"Cite exact artifact paths."
|
|
77
|
+
],
|
|
78
|
+
"mustNotDo": [
|
|
79
|
+
"No patches.",
|
|
80
|
+
"No commits.",
|
|
81
|
+
"No secrets."
|
|
82
|
+
],
|
|
83
|
+
"context": "Factory {factory.name} validation stage for run {run.id}."
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"factory": "opencode-pattern-canonizer",
|
|
3
|
+
"description": "Pilot manifest for deterministic factory_run validation across multiple safe local documentation inputs. Cap remains max 10 items in mode=pilot.",
|
|
4
|
+
"items": [
|
|
5
|
+
{
|
|
6
|
+
"id": "harness-plan-pilot",
|
|
7
|
+
"path": "docs/AGENTIC_HARNESS_IMPLEMENTATION_PLAN.md",
|
|
8
|
+
"metadata": { "source": "local-doc", "pilot": true }
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"id": "operating-model-pilot",
|
|
12
|
+
"path": "docs/OPERATING_MODEL.md",
|
|
13
|
+
"metadata": { "source": "local-doc", "pilot": true }
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"id": "roadmap-pilot",
|
|
17
|
+
"path": "docs/ROADMAP.md",
|
|
18
|
+
"metadata": { "source": "local-doc", "pilot": true }
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"id": "roadmap-lots-pilot",
|
|
22
|
+
"path": "docs/ROADMAP_FACTORY_LOTS.md",
|
|
23
|
+
"metadata": { "source": "local-doc", "pilot": true }
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "architecture-pilot",
|
|
27
|
+
"path": "docs/ARCHITECTURE.md",
|
|
28
|
+
"metadata": { "source": "local-doc", "pilot": true }
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"expectedArtifacts": [
|
|
32
|
+
"patterns.canonical.json",
|
|
33
|
+
"risks.canonical.json",
|
|
34
|
+
"workflow-rules.md",
|
|
35
|
+
"agent-instructions.md",
|
|
36
|
+
"quality-gates.json",
|
|
37
|
+
"dashboard-summary.md"
|
|
38
|
+
]
|
|
39
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"factory": "opencode-pattern-canonizer",
|
|
3
|
+
"description": "Smoke manifest for deterministic factory_run validation using the local harness plan as a safe input artifact.",
|
|
4
|
+
"items": [
|
|
5
|
+
{
|
|
6
|
+
"id": "harness-plan-smoke",
|
|
7
|
+
"path": "docs/AGENTIC_HARNESS_IMPLEMENTATION_PLAN.md",
|
|
8
|
+
"metadata": {
|
|
9
|
+
"source": "local-doc",
|
|
10
|
+
"expected_signals": [
|
|
11
|
+
"delegation.contract.structured",
|
|
12
|
+
"verification.evidence_required",
|
|
13
|
+
"factory.workflow.manifest_checkpoint"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"expectedArtifacts": [
|
|
19
|
+
"patterns.canonical.json",
|
|
20
|
+
"risks.canonical.json",
|
|
21
|
+
"workflow-rules.md",
|
|
22
|
+
"agent-instructions.md",
|
|
23
|
+
"quality-gates.json",
|
|
24
|
+
"dashboard-summary.md"
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
# ProjectDNA Factory
|
|
2
|
+
|
|
3
|
+
Status: **P0 scaffold**.
|
|
4
|
+
|
|
5
|
+
This factory implements the first safe surface for ProjectDNA: a code-first reference-project workflow that can be planned and validated before any real project scan, sample generation, or external knowledge-backend write. It is agents-first: agents own scope, capture goals, safety gates, validation, oracle, and promotion posture; deterministic scripts are tools that produce cited evidence.
|
|
6
|
+
|
|
7
|
+
## What this factory does now
|
|
8
|
+
|
|
9
|
+
- Registers a `project-dna` factory under `.pi/factories/project-dna/`.
|
|
10
|
+
- Defines map/reduce/validate stages for ProjectDNA planning and oracle review.
|
|
11
|
+
- Provides smoke/pilot/batch manifests that use repo-local docs/skill/prompt/factory artifacts as safe inputs.
|
|
12
|
+
- Produces factory-run evidence through the existing `factory_run` tool.
|
|
13
|
+
- Keeps promotion and writeback proposal-only.
|
|
14
|
+
- Frames npm scripts as deterministic tools used by agents, not as the primary control plane.
|
|
15
|
+
- Captures operator intent through `capture_mode`, `capture_goal`, and optional `user_note` metadata without treating notes as evidence.
|
|
16
|
+
|
|
17
|
+
## What this factory does not do yet
|
|
18
|
+
|
|
19
|
+
- It does not scan arbitrary external projects by default.
|
|
20
|
+
- It does not read `.env`, keys, credentials, generated/vendor folders, or private raw data.
|
|
21
|
+
- It does not generate a sample project outside quarantine/sandbox.
|
|
22
|
+
- It does not import/sync/embed/write into external knowledge backend.
|
|
23
|
+
- It does not claim ProjectDNA retrieval is production-ready.
|
|
24
|
+
|
|
25
|
+
## Safe smoke command
|
|
26
|
+
|
|
27
|
+
Use the harness tool or equivalent:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
factory_run(
|
|
31
|
+
factory="project-dna",
|
|
32
|
+
input_manifest=".pi/factories/project-dna/smoke-manifest.json",
|
|
33
|
+
mode="smoke",
|
|
34
|
+
execution="deterministic"
|
|
35
|
+
)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Local scaffold validator:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm run validate:project-dna
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Metadata-only compute profile preview for the safe ProjectDNA smoke target:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm run preview:compute-profile:project-dna-smoke
|
|
48
|
+
npm run validate:compute-profile:project-dna-smoke
|
|
49
|
+
npm run plan:compute-workflow:project-dna-smoke
|
|
50
|
+
npm run validate:compute-workflow:project-dna-smoke
|
|
51
|
+
npm run validate:compute-profile-policy
|
|
52
|
+
npm run smoke:compute-profile-regression
|
|
53
|
+
npm run snapshot:compute-profile:project-dna-smoke
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
These write `compute-preview.json`, `compute-profile-resolution.json`, and `compute-workflow-shape.json` under `reports/project-dna-scans/project-dna-factory-smoke/`; they do not dispatch children, read secrets, use network, modify source projects, or write to an external knowledge backend.
|
|
57
|
+
|
|
58
|
+
Read-only scanner smoke against this factory scaffold:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npm run smoke:project-dna-scan
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Equivalent manifest-driven scanner example:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
node scripts/project-dna/scan.mjs \
|
|
68
|
+
--manifest .pi/factories/project-dna/example-project-dna-manifest.json \
|
|
69
|
+
--out-dir reports/project-dna-scans/project-dna-manifest-smoke
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
These write only metadata artifacts under `reports/project-dna-scans/` and do not touch any external project or external knowledge backend corpus.
|
|
73
|
+
|
|
74
|
+
Validate scanner artifacts, source/read-only posture, and citation line ranges:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
npm run validate:project-dna-scan:smoke
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Build pointer capsules from the scanner smoke metadata:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
npm run build:project-dna-capsules:smoke
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
This reads scan artifacts only and writes capsules under `reports/project-dna-scans/project-dna-factory-smoke/capsules/`.
|
|
87
|
+
|
|
88
|
+
Build a neutral sample-project spec, without generating code:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npm run build:project-dna-sample-spec:smoke
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
This writes `reports/project-dna-scans/project-dna-factory-smoke/sample-spec.json` with `generation_status=spec_only_no_code_generated`.
|
|
95
|
+
|
|
96
|
+
Generate and validate a dependency-free neutral sample project in quarantine:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
npm run generate:project-dna-sample:smoke
|
|
100
|
+
npm run validate:project-dna-sample:smoke
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
This writes only under `reports/project-dna-scans/project-dna-factory-smoke/quarantine/sample-project/`; the validator runs local `node --check` and a dependency-free sample test.
|
|
104
|
+
|
|
105
|
+
Query ProjectDNA scan metadata for a bounded cited context pack:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
npm run query:project-dna:smoke
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
This writes `reports/project-dna-scans/project-dna-factory-smoke/query-result-smoke.json`; raw query text is hashed and not persisted.
|
|
112
|
+
|
|
113
|
+
Run 5/5 agents-first ontology, Query Steward, golden benchmark, and structural oracle smoke gates:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
npm run emit:project-dna-ontology:smoke
|
|
117
|
+
npm run validate:project-dna-ontology:smoke
|
|
118
|
+
npm run emit:project-dna-golden-cases:smoke
|
|
119
|
+
npm run validate:project-dna-golden-cases:smoke
|
|
120
|
+
npm run steward:project-dna-query:smoke
|
|
121
|
+
npm run bench:project-dna:smoke
|
|
122
|
+
npm run oracle:project-dna:smoke
|
|
123
|
+
npm run validate:project-dna-5of5:smoke
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
These write ontology/golden/query-steward/benchmark/oracle artifacts under `reports/project-dna-scans/project-dna-factory-smoke/`; the oracle review covers scaffold readiness only and keeps durable promotion disabled until human approval. Query Steward hashes the raw query and persists controlled intent metadata only.
|
|
127
|
+
|
|
128
|
+
## Capture and compute profile gates
|
|
129
|
+
|
|
130
|
+
ProjectDNA manifests may include optional `capture_mode`, `semantic_capture_mode`, `capture_goal`, `user_note`, `compute_profile`, and `compute_caps` fields.
|
|
131
|
+
|
|
132
|
+
Capture posture:
|
|
133
|
+
|
|
134
|
+
```text
|
|
135
|
+
plan_only → plan/manifest from approved inputs; no source scan
|
|
136
|
+
read_only_scan → scan only explicit allowed_paths; source remains read-only
|
|
137
|
+
sandbox_sample_generation → write only under approved quarantine/sandbox outputs
|
|
138
|
+
runtime_query_existing_artifacts → query existing scan artifacts only; no new external scan
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Semantic capture posture:
|
|
142
|
+
|
|
143
|
+
```text
|
|
144
|
+
full_capture → small/medium repo reusable across major domains
|
|
145
|
+
architecture_only → large repo or architecture/scaffold-only user note
|
|
146
|
+
targeted_capture → named domains/features from capture_goal or user_note
|
|
147
|
+
sample_first → prioritize neutral sample design from cited architecture facts
|
|
148
|
+
context_only → return bounded cited context packs; no sample generation
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
`capture_goal` bounds the pattern/question being captured. `user_note` records operator intent or constraints, but it is not source evidence and must not replace citations. For very large repos, default semantic posture should be `architecture_only` or `targeted_capture` unless the user approves deeper compute.
|
|
152
|
+
|
|
153
|
+
Profile stage mapping is:
|
|
154
|
+
|
|
155
|
+
```text
|
|
156
|
+
auto → metadata-only preview/resolve, then apply the resolved low/medium/high/xhigh/max row
|
|
157
|
+
low → scan + scan validation
|
|
158
|
+
medium → scan + validation + capsules + sample spec + one query
|
|
159
|
+
high → medium + quarantine sample + sample validation + benchmark + oracle
|
|
160
|
+
xhigh → high + specialist lanes + richer query suite + adversarial review
|
|
161
|
+
max → xhigh + approval-gated multi-reference/symbol/callgraph/promotion packet work
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Profile selection never bypasses secrets, sandbox, oracle, budget, quarantine/proposal-only output policy, external backend-write restrictions, or parent-owned dispatch gates.
|
|
165
|
+
|
|
166
|
+
## Promotion gates
|
|
167
|
+
|
|
168
|
+
Do not promote ProjectDNA artifacts to durable knowledge/sample locations unless all are true:
|
|
169
|
+
|
|
170
|
+
1. Scanner/sample implementation exists and ran in a sandbox/quarantine.
|
|
171
|
+
2. Validation commands passed.
|
|
172
|
+
3. Secret/leakage checks passed.
|
|
173
|
+
4. Citations and line ranges are valid.
|
|
174
|
+
5. Oracle returned `PASS` with `no_ship=false`.
|
|
175
|
+
6. Human approval is present for any durable writeback/promotion.
|
|
176
|
+
|
|
177
|
+
## Related files
|
|
178
|
+
|
|
179
|
+
- Plan: `docs/ZOB_PROJECT_DNA_CODE_KNOWLEDGE_GRAPH_PLAN.md`
|
|
180
|
+
- Skill: `.pi/skills/zob-project-dna/SKILL.md`
|
|
181
|
+
- Prompt: `.pi/prompts/project-dna.md`
|
|
182
|
+
- Schemas: `.pi/factories/project-dna/schemas/`
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"factory": "project-dna",
|
|
3
|
+
"description": "Batch manifest template for ProjectDNA. Keep plan_only until scanner/sample-generation implementation has smoke and pilot evidence.",
|
|
4
|
+
"items": [
|
|
5
|
+
{
|
|
6
|
+
"id": "project-dna-plan",
|
|
7
|
+
"path": "docs/ZOB_PROJECT_DNA_CODE_KNOWLEDGE_GRAPH_PLAN.md",
|
|
8
|
+
"metadata": { "source": "local-plan-doc" }
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"id": "project-dna-skill",
|
|
12
|
+
"path": ".pi/skills/zob-project-dna/SKILL.md",
|
|
13
|
+
"metadata": { "source": "skill" }
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"id": "project-dna-prompt",
|
|
17
|
+
"path": ".pi/prompts/project-dna.md",
|
|
18
|
+
"metadata": { "source": "prompt-template" }
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"id": "project-dna-factory",
|
|
22
|
+
"path": ".pi/factories/project-dna/factory.json",
|
|
23
|
+
"metadata": { "source": "factory-definition" }
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "project-dna-readme",
|
|
27
|
+
"path": ".pi/factories/project-dna/README.md",
|
|
28
|
+
"metadata": { "source": "factory-readme" }
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"expectedArtifacts": [
|
|
32
|
+
"project-dna-summary.json",
|
|
33
|
+
"project-dna-context-pack.json",
|
|
34
|
+
"project-dna-readiness.json",
|
|
35
|
+
"project-dna-capsules.md"
|
|
36
|
+
]
|
|
37
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "zob.project-dna-manifest.v2",
|
|
3
|
+
"run_id": "project-dna-factory-smoke",
|
|
4
|
+
"user_note": "Metadata-only high-profile 5/5 agentic smoke plan for the repo-local ProjectDNA factory scaffold.",
|
|
5
|
+
"capture_goal": {
|
|
6
|
+
"source_id": "project-dna-factory",
|
|
7
|
+
"objective": "Plan a safe ProjectDNA capture workflow for the factory scaffold without dispatching child agents or mutating source files.",
|
|
8
|
+
"bounded_context_only": true,
|
|
9
|
+
"citation_required": true,
|
|
10
|
+
"allowed_artifact_level": "metadata_only"
|
|
11
|
+
},
|
|
12
|
+
"requested_compute_profile": "high",
|
|
13
|
+
"compute_caps": {
|
|
14
|
+
"maxAgents": 12,
|
|
15
|
+
"maxDelegationDepth": 1,
|
|
16
|
+
"maxParallel": 2,
|
|
17
|
+
"maxIterations": 2,
|
|
18
|
+
"maxDurationMs": 300000,
|
|
19
|
+
"maxContextTokens": 8000,
|
|
20
|
+
"strictBudgetRequired": true,
|
|
21
|
+
"oracleRequired": true
|
|
22
|
+
},
|
|
23
|
+
"capture_mode_policy": {
|
|
24
|
+
"mode": "metadata_workflow",
|
|
25
|
+
"semantic_mode": "architecture_only",
|
|
26
|
+
"targeted_domains": ["architecture", "config", "tests"],
|
|
27
|
+
"large_repo_fallback": "architecture_only",
|
|
28
|
+
"metadata_only": true,
|
|
29
|
+
"parent_owned_dispatch": true,
|
|
30
|
+
"child_direct_dispatch_allowed": false,
|
|
31
|
+
"network_access_allowed": false,
|
|
32
|
+
"source_mutation_allowed": false,
|
|
33
|
+
"knowledge_backend_write_allowed": false,
|
|
34
|
+
"durable_promotion_allowed": false
|
|
35
|
+
},
|
|
36
|
+
"source_project": {
|
|
37
|
+
"source_id": "project-dna-factory",
|
|
38
|
+
"path": ".pi/factories/project-dna",
|
|
39
|
+
"description": "Safe repo-local ProjectDNA factory scaffold used for smoke planning."
|
|
40
|
+
},
|
|
41
|
+
"read_policy": {
|
|
42
|
+
"allowed_paths": [".pi/factories/project-dna"],
|
|
43
|
+
"forbidden_patterns": [
|
|
44
|
+
".env",
|
|
45
|
+
".env.*",
|
|
46
|
+
"*.pem",
|
|
47
|
+
"*.key",
|
|
48
|
+
"*.p12",
|
|
49
|
+
"*.pfx",
|
|
50
|
+
"id_rsa",
|
|
51
|
+
"id_ed25519",
|
|
52
|
+
"secrets",
|
|
53
|
+
"credentials",
|
|
54
|
+
"node_modules",
|
|
55
|
+
"dist",
|
|
56
|
+
"build",
|
|
57
|
+
"coverage",
|
|
58
|
+
".next",
|
|
59
|
+
".nuxt",
|
|
60
|
+
"out",
|
|
61
|
+
".git"
|
|
62
|
+
],
|
|
63
|
+
"forbid_secret_like_paths": true,
|
|
64
|
+
"max_file_bytes": 262144,
|
|
65
|
+
"external_project_scan_allowed": false
|
|
66
|
+
},
|
|
67
|
+
"sample_project": {
|
|
68
|
+
"name": "project-dna-factory-sample-plan",
|
|
69
|
+
"neutral_domain": "factory-scaffold",
|
|
70
|
+
"generation_policy": "plan_only",
|
|
71
|
+
"copy_policy": "no_copy_plan_only",
|
|
72
|
+
"quarantine_required": true
|
|
73
|
+
},
|
|
74
|
+
"promotion": {
|
|
75
|
+
"writeback_policy": "proposal_only",
|
|
76
|
+
"requires_oracle_pass": true,
|
|
77
|
+
"requires_human_approval": true,
|
|
78
|
+
"durable_promotion_allowed": false
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "zob.project-dna-manifest.v1",
|
|
3
|
+
"run_id": "project-dna-factory-example",
|
|
4
|
+
"compute_profile": "auto",
|
|
5
|
+
"compute_caps": {
|
|
6
|
+
"maxAgents": 10,
|
|
7
|
+
"maxDelegationDepth": 2,
|
|
8
|
+
"maxParallel": 4,
|
|
9
|
+
"maxDurationMs": 600000,
|
|
10
|
+
"maxContextTokens": 12000,
|
|
11
|
+
"strictBudgetRequired": true,
|
|
12
|
+
"oracleRequired": true
|
|
13
|
+
},
|
|
14
|
+
"source_project": {
|
|
15
|
+
"source_id": "project-dna-factory",
|
|
16
|
+
"path": ".pi/factories/project-dna",
|
|
17
|
+
"owner": "zob-harness",
|
|
18
|
+
"description": "Safe repo-local ProjectDNA factory scaffold used as a scanner example."
|
|
19
|
+
},
|
|
20
|
+
"sample_project": {
|
|
21
|
+
"name": "project-dna-factory-sample-plan",
|
|
22
|
+
"neutral_domain": "factory-scaffold",
|
|
23
|
+
"target_stack_policy": "plan_only",
|
|
24
|
+
"copy_policy": "no_copy_plan_only"
|
|
25
|
+
},
|
|
26
|
+
"read_policy": {
|
|
27
|
+
"allowed_paths": [".pi/factories/project-dna"],
|
|
28
|
+
"forbidden_patterns": [
|
|
29
|
+
".env",
|
|
30
|
+
".env.*",
|
|
31
|
+
"*.pem",
|
|
32
|
+
"*.key",
|
|
33
|
+
"*.p12",
|
|
34
|
+
"*.pfx",
|
|
35
|
+
"id_rsa",
|
|
36
|
+
"id_ed25519",
|
|
37
|
+
"secrets",
|
|
38
|
+
"credentials",
|
|
39
|
+
"node_modules",
|
|
40
|
+
"dist",
|
|
41
|
+
"build",
|
|
42
|
+
"coverage",
|
|
43
|
+
".next",
|
|
44
|
+
".nuxt",
|
|
45
|
+
"out",
|
|
46
|
+
".git"
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"validation": {
|
|
50
|
+
"commands": ["npm run validate:project-dna", "npm run smoke:project-dna-scan"],
|
|
51
|
+
"allow_command_substitution": false
|
|
52
|
+
},
|
|
53
|
+
"promotion": {
|
|
54
|
+
"requires_oracle_pass": true,
|
|
55
|
+
"requires_human_approval": true,
|
|
56
|
+
"writeback_policy": "proposal_only"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "project-dna",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "P0/P1 ProjectDNA agents-first workflow scaffold for code-first reference-project analysis, neutral sample planning, code knowledge graph capsules, bounded context-pack readiness, and 5/5 agentic golden-case evaluation. Deterministic scripts are tools for agents, not the primary control plane. The scaffold is safe by default: no source writes, no secrets, no external knowledge-backend import/sync/embed/write.",
|
|
5
|
+
"agenticModel": {
|
|
6
|
+
"controlPlane": "agents_first",
|
|
7
|
+
"scriptRole": "deterministic_tools_for_cited_evidence",
|
|
8
|
+
"defaultSafetyPosture": "read_only_source_quarantine_outputs_proposal_only_writeback",
|
|
9
|
+
"noAutonomousExternalProjectScanningByDefault": true,
|
|
10
|
+
"noBackendImportSyncEmbedWriteByDefault": true,
|
|
11
|
+
"fiveOfFiveRequires": [
|
|
12
|
+
"ontology_steward",
|
|
13
|
+
"query_steward",
|
|
14
|
+
"test_linker",
|
|
15
|
+
"golden_evaluator",
|
|
16
|
+
"oracle_pass_no_ship_false"
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"captureModes": {
|
|
20
|
+
"plan_only": "Plan or manifest from approved inputs; no source scan.",
|
|
21
|
+
"read_only_scan": "Scan only explicit allowed_paths while preserving read-only source posture.",
|
|
22
|
+
"sandbox_sample_generation": "Generate only under approved quarantine/sandbox outputs from existing facts/specs.",
|
|
23
|
+
"runtime_query_existing_artifacts": "Return bounded cited context from existing scan artifacts; no new external-project scan."
|
|
24
|
+
},
|
|
25
|
+
"captureInputs": {
|
|
26
|
+
"capture_goal": "Bounded pattern/question that drives scanner, capsule, and query priority.",
|
|
27
|
+
"user_note": "Optional operator intent or constraints; guidance only, never citation evidence."
|
|
28
|
+
},
|
|
29
|
+
"computeDepthPolicy": {
|
|
30
|
+
"auto": "Metadata-only preview/resolve, then apply the resolved low/medium/high/xhigh/max row.",
|
|
31
|
+
"low": "Scan + scan validation.",
|
|
32
|
+
"medium": "Scan + validation + capsules + sample spec + one bounded query.",
|
|
33
|
+
"high": "Medium + quarantine sample + sample validation + benchmark + oracle.",
|
|
34
|
+
"xhigh": "High + specialist lanes + richer query suite + adversarial review.",
|
|
35
|
+
"max": "Xhigh + multi-reference/symbol/callgraph/promotion packet gates with strict human/budget/oracle approval."
|
|
36
|
+
},
|
|
37
|
+
"status": "p0-scaffold",
|
|
38
|
+
"autoPromotion": false,
|
|
39
|
+
"manualPromotionRequired": true,
|
|
40
|
+
"defaultMode": "smoke",
|
|
41
|
+
"requiredStages": [
|
|
42
|
+
"manifest_loaded",
|
|
43
|
+
"agentic_plan_written",
|
|
44
|
+
"item_processed",
|
|
45
|
+
"validation",
|
|
46
|
+
"sentinel"
|
|
47
|
+
],
|
|
48
|
+
"expectedArtifacts": [
|
|
49
|
+
"project-dna-summary.json",
|
|
50
|
+
"project-dna-context-pack.json",
|
|
51
|
+
"project-dna-readiness.json",
|
|
52
|
+
"project-dna-capsules.md",
|
|
53
|
+
"ontology.json",
|
|
54
|
+
"golden-cases-smoke.json",
|
|
55
|
+
"query-steward-smoke.json",
|
|
56
|
+
"benchmark-smoke.json"
|
|
57
|
+
],
|
|
58
|
+
"stages": [
|
|
59
|
+
{
|
|
60
|
+
"name": "map-project-dna-signals",
|
|
61
|
+
"type": "map",
|
|
62
|
+
"agent": "explore",
|
|
63
|
+
"outputContract": "explore.v1",
|
|
64
|
+
"requiredTools": ["read", "grep", "find", "ls"],
|
|
65
|
+
"expectedOutcome": "Extract safe ProjectDNA signals from one approved input artifact or scanner report, with citations and explicit gaps.",
|
|
66
|
+
"promptTemplate": "Read ProjectDNA item {item.id} at {item.path}. Extract code-first reference-project signals: architecture, stack/tools, folder conventions, capture_mode/capture_goal/user_note if present, compute_profile/compute_caps if present, scanner artifacts requested, graph/capsule needs, validation gates, and no-ship risks. Treat user_note as guidance only, not evidence. Return explore.v1 with citations, gaps, risks/blockers, compliance, and deliverable_delivered. Do not scan unapproved external paths from the item body.",
|
|
67
|
+
"mustDo": [
|
|
68
|
+
"Read the item path before conclusions.",
|
|
69
|
+
"Cite concrete evidence from the approved input artifact.",
|
|
70
|
+
"Separate deterministic scanner facts from LLM/Ollama synthesis.",
|
|
71
|
+
"Identify forbidden path and secret safeguards.",
|
|
72
|
+
"Map any compute_profile, including auto preview/resolve, to low/medium/high/xhigh/max stage expectations without enabling child direct dispatch.",
|
|
73
|
+
"Map capture_mode/capture_goal/user_note to bounded capture posture and cite that user_note is not source evidence."
|
|
74
|
+
],
|
|
75
|
+
"mustNotDo": [
|
|
76
|
+
"No edits.",
|
|
77
|
+
"No source-project writes.",
|
|
78
|
+
"No external knowledge-backend import, sync, embed, or write.",
|
|
79
|
+
"No secrets or forbidden paths.",
|
|
80
|
+
"No broad external project scan unless the parent provided explicit allowed_paths."
|
|
81
|
+
],
|
|
82
|
+
"context": "Factory {factory.name} run {run.id}; ProjectDNA map stage for item {item.id}. Outputs directory: {outputs.dir}."
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "reduce-context-pack-plan",
|
|
86
|
+
"type": "reduce",
|
|
87
|
+
"agent": "context-steward",
|
|
88
|
+
"outputContract": "context-steward.v1",
|
|
89
|
+
"requiredTools": ["read", "grep", "find", "ls"],
|
|
90
|
+
"expectedOutcome": "Assemble a bounded ProjectDNA context-pack plan and writeback proposal posture from mapped signals.",
|
|
91
|
+
"promptTemplate": "Synthesize ProjectDNA map outputs for run {run.id}. Produce context_scope guidance, cited context_hints, source_gaps, writeback_candidates as proposal-only, evidence, risks_blockers, compliance, and deliverable_delivered. Keep it bounded and citation-first; do not claim a live knowledge import or sample promotion.",
|
|
92
|
+
"mustDo": [
|
|
93
|
+
"Require context_scope before future ProjectDNA lookup.",
|
|
94
|
+
"Keep context packs bounded and citation-required.",
|
|
95
|
+
"Mark writeback and promotion as proposal-only.",
|
|
96
|
+
"List missing scanner/sample/benchmark evidence explicitly."
|
|
97
|
+
],
|
|
98
|
+
"mustNotDo": [
|
|
99
|
+
"No external knowledge-backend write or corpus mutation.",
|
|
100
|
+
"No secrets.",
|
|
101
|
+
"No raw conversation history.",
|
|
102
|
+
"No source project mutation.",
|
|
103
|
+
"No invented citations."
|
|
104
|
+
],
|
|
105
|
+
"context": "Factory {factory.name} reduce stage for ProjectDNA run {run.id}."
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "validate-project-dna-gates",
|
|
109
|
+
"type": "validate",
|
|
110
|
+
"agent": "oracle-merge",
|
|
111
|
+
"outputContract": "oracle-merge.v1",
|
|
112
|
+
"requiredTools": ["read", "grep", "find", "ls"],
|
|
113
|
+
"expectedOutcome": "Validate ProjectDNA scaffold/run evidence, no-ship gates, sentinel posture, and proposal-only promotion.",
|
|
114
|
+
"promptTemplate": "Validate ProjectDNA run {run.id}. Check manifest, agentic-plan.json, outputs, validation.json, final-report.md, and sentinels under {run.dir}. Return oracle-merge.v1 sections: verdict, confidence, no_ship, blocking_issues, merged_lanes, evidence, risks/blockers, compliance, and deliverable_delivered. Fail if secrets, source writes, unapproved external knowledge-backend writes, invalid citations, missing validation, or premature promotion are observed.",
|
|
115
|
+
"mustDo": [
|
|
116
|
+
"Verify validation.json exists before accepting DONE.sentinel.",
|
|
117
|
+
"Verify promotion remains proposal-only unless explicit oracle/human gates exist.",
|
|
118
|
+
"Treat missing scanner/sample evidence as a gap, not as completed implementation.",
|
|
119
|
+
"Cite exact run-directory artifacts."
|
|
120
|
+
],
|
|
121
|
+
"mustNotDo": [
|
|
122
|
+
"No patches.",
|
|
123
|
+
"No commits.",
|
|
124
|
+
"No secrets.",
|
|
125
|
+
"No external knowledge-backend import, sync, embed, or write.",
|
|
126
|
+
"No sample promotion."
|
|
127
|
+
],
|
|
128
|
+
"context": "Factory {factory.name} validation stage for ProjectDNA run {run.id}."
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
}
|