zob-harness 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.pi/capabilities/zob-public-runtime-capabilities.json +4 -4
- package/.pi/extensions/zob-child-safety/AGENTS.md +12 -0
- package/.pi/extensions/zob-child-safety/index.ts +4 -105
- package/.pi/extensions/zob-child-safety/src/AGENTS.md +10 -0
- package/.pi/extensions/zob-child-safety/src/policy.ts +106 -0
- package/.pi/extensions/zob-harness/AGENTS.md +2 -0
- package/.pi/extensions/zob-harness/index.ts +94 -94
- package/.pi/extensions/zob-harness/src/AGENTS.md +4 -0
- package/.pi/extensions/zob-harness/src/core/AGENTS.md +24 -0
- package/.pi/extensions/zob-harness/src/{constants.ts → core/constants.ts} +10 -1
- package/.pi/extensions/zob-harness/src/core/utils/AGENTS.md +23 -0
- package/.pi/extensions/zob-harness/src/{utils → core/utils}/formatting.ts +1 -1
- package/.pi/extensions/zob-harness/src/{utils → core/utils}/records.ts +1 -1
- package/.pi/extensions/zob-harness/src/{utils → core/utils}/resources.ts +1 -1
- package/.pi/extensions/zob-harness/src/domains/AGENTS.md +23 -0
- package/.pi/extensions/zob-harness/src/domains/autonomy/AGENTS.md +21 -0
- package/.pi/extensions/zob-harness/src/{autonomous-runtime.ts → domains/autonomy/autonomous-runtime.ts} +22 -22
- package/.pi/extensions/zob-harness/src/{autonomy-readiness.ts → domains/autonomy/autonomy-readiness.ts} +18 -18
- package/.pi/extensions/zob-harness/src/{daemon-policy.ts → domains/autonomy/daemon-policy.ts} +6 -6
- package/.pi/extensions/zob-harness/src/{daemon-readiness.ts → domains/autonomy/daemon-readiness.ts} +7 -7
- package/.pi/extensions/zob-harness/src/{daemon-runtime.ts → domains/autonomy/daemon-runtime.ts} +2 -2
- package/.pi/extensions/zob-harness/src/{full-autonomy-test.ts → domains/autonomy/full-autonomy-test.ts} +4 -4
- package/.pi/extensions/zob-harness/src/{interactive-autonomy.ts → domains/autonomy/interactive-autonomy.ts} +2 -2
- package/.pi/extensions/zob-harness/src/{compute-profile.ts → domains/compute/compute-profile.ts} +3 -3
- package/.pi/extensions/zob-harness/src/{compute-workflow-shape.ts → domains/compute/compute-workflow-shape.ts} +3 -3
- package/.pi/extensions/zob-harness/src/domains/coms/AGENTS.md +21 -0
- package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/envelope.ts +2 -2
- package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/identity.ts +3 -3
- package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/ledger-bridge.ts +2 -2
- package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/local-transport.ts +1 -1
- package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/policy.ts +3 -3
- package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/presence.ts +1 -1
- package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/registry.ts +47 -4
- package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/response-capture.ts +1 -1
- package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/transcript-capture.ts +2 -2
- package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/zpeer-profile.ts +3 -3
- package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/zpeer.ts +35 -7
- package/.pi/extensions/zob-harness/src/{mission-control.ts → domains/coms/mission-control.ts} +12 -9
- package/.pi/extensions/zob-harness/src/{zagents.ts → domains/coms/zagents.ts} +86 -4
- package/.pi/extensions/zob-harness/src/domains/context/AGENTS.md +20 -0
- package/.pi/extensions/zob-harness/src/{context-gbrain.ts → domains/context/context-gbrain.ts} +4 -4
- package/.pi/extensions/zob-harness/src/domains/delegation/AGENTS.md +21 -0
- package/.pi/extensions/zob-harness/src/{agents.ts → domains/delegation/agents.ts} +2 -2
- package/.pi/extensions/zob-harness/src/{capabilities.ts → domains/delegation/capabilities.ts} +6 -6
- package/.pi/extensions/zob-harness/src/{child-runner.ts → domains/delegation/child-runner.ts} +8 -8
- package/.pi/extensions/zob-harness/src/{output-contracts.ts → domains/delegation/output-contracts.ts} +1 -1
- package/.pi/extensions/zob-harness/src/{prompt-packs.ts → domains/delegation/prompt-packs.ts} +4 -4
- package/.pi/extensions/zob-harness/src/domains/factory/AGENTS.md +21 -0
- package/.pi/extensions/zob-harness/src/{factory → domains/factory}/agentic-plan.ts +1 -1
- package/.pi/extensions/zob-harness/src/{factory-selector.ts → domains/factory/factory-selector.ts} +4 -4
- package/.pi/extensions/zob-harness/src/{factory → domains/factory}/quarantine.ts +5 -5
- package/.pi/extensions/zob-harness/src/{factory → domains/factory}/run.ts +5 -5
- package/.pi/extensions/zob-harness/src/{factory → domains/factory}/validation.ts +10 -10
- package/.pi/extensions/zob-harness/src/domains/git/AGENTS.md +20 -0
- package/.pi/extensions/zob-harness/src/{git-ops.ts → domains/git/git-ops.ts} +3 -3
- package/.pi/extensions/zob-harness/src/domains/goal/AGENTS.md +22 -0
- package/.pi/extensions/zob-harness/src/{goal-room.ts → domains/goal/goal-room.ts} +7 -7
- package/.pi/extensions/zob-harness/src/{goal-todo-imports.ts → domains/goal/goal-todo-imports.ts} +1 -1
- package/.pi/extensions/zob-harness/src/{goal-todo-types.ts → domains/goal/goal-todo-types.ts} +1 -1
- package/.pi/extensions/zob-harness/src/{goal-todos.ts → domains/goal/goal-todos.ts} +4 -4
- package/.pi/extensions/zob-harness/src/{goal.ts → domains/goal/goal.ts} +1 -1
- package/.pi/extensions/zob-harness/src/domains/governance/AGENTS.md +21 -0
- package/.pi/extensions/zob-harness/src/{budget-policy.ts → domains/governance/budget-policy.ts} +6 -6
- package/.pi/extensions/zob-harness/src/{governed-requests.ts → domains/governance/governed-requests.ts} +7 -7
- package/.pi/extensions/zob-harness/src/{launch-apply.ts → domains/governance/launch-apply.ts} +4 -4
- package/.pi/extensions/zob-harness/src/{merge-queue.ts → domains/governance/merge-queue.ts} +6 -6
- package/.pi/extensions/zob-harness/src/{rules.ts → domains/governance/rules.ts} +7 -7
- package/.pi/extensions/zob-harness/src/{safety.ts → domains/governance/safety.ts} +3 -3
- package/.pi/extensions/zob-harness/src/{sandbox.ts → domains/governance/sandbox.ts} +5 -5
- package/.pi/extensions/zob-harness/src/{worker-pool.ts → domains/governance/worker-pool.ts} +7 -7
- package/.pi/extensions/zob-harness/src/{workspace-claims.ts → domains/governance/workspace-claims.ts} +6 -6
- package/.pi/extensions/zob-harness/src/domains/models/AGENTS.md +20 -0
- package/.pi/extensions/zob-harness/src/{model-availability.ts → domains/models/model-availability.ts} +1 -1
- package/.pi/extensions/zob-harness/src/{model-routing.ts → domains/models/model-routing.ts} +6 -6
- package/.pi/extensions/zob-harness/src/domains/orchestration/AGENTS.md +21 -0
- package/.pi/extensions/zob-harness/src/{orchestration → domains/orchestration}/adaptive-delegation.ts +8 -8
- package/.pi/extensions/zob-harness/src/{orchestration → domains/orchestration}/adaptive-workflow.ts +4 -4
- package/.pi/extensions/zob-harness/src/{orchestration → domains/orchestration}/lead-plan.ts +5 -5
- package/.pi/extensions/zob-harness/src/{orchestration → domains/orchestration}/plan.ts +5 -5
- package/.pi/extensions/zob-harness/src/{orchestration → domains/orchestration}/room.ts +4 -4
- package/.pi/extensions/zob-harness/src/{orchestration → domains/orchestration}/run.ts +6 -6
- package/.pi/extensions/zob-harness/src/{orchestration → domains/orchestration}/supervised-readonly.ts +6 -6
- package/.pi/extensions/zob-harness/src/{orchestration → domains/orchestration}/widget-readers.ts +2 -2
- package/.pi/extensions/zob-harness/src/domains/project-dna/AGENTS.md +19 -0
- package/.pi/extensions/zob-harness/src/{project-dna.ts → domains/project-dna/project-dna.ts} +4 -4
- package/.pi/extensions/zob-harness/src/{promotion → domains/promotion}/candidate.ts +5 -5
- package/.pi/extensions/zob-harness/src/{promotion → domains/promotion}/coms.ts +3 -3
- package/.pi/extensions/zob-harness/src/{promotion → domains/promotion}/documentation.ts +4 -4
- package/.pi/extensions/zob-harness/src/{promotion → domains/promotion}/factory.ts +2 -2
- package/.pi/extensions/zob-harness/src/{promotion → domains/promotion}/temp-agent.ts +4 -4
- package/.pi/extensions/zob-harness/src/{promotion → domains/promotion}/write-lane.ts +3 -3
- package/.pi/extensions/zob-harness/src/domains/telemetry/AGENTS.md +19 -0
- package/.pi/extensions/zob-harness/src/{chronicle.ts → domains/telemetry/chronicle.ts} +3 -3
- package/.pi/extensions/zob-harness/src/{queue.ts → domains/telemetry/queue.ts} +7 -7
- package/.pi/extensions/zob-harness/src/{telemetry.ts → domains/telemetry/telemetry.ts} +4 -4
- package/.pi/extensions/zob-harness/src/{topology → domains/topology}/chains.ts +10 -10
- package/.pi/extensions/zob-harness/src/{topology → domains/topology}/coms.ts +3 -3
- package/.pi/extensions/zob-harness/src/{topology → domains/topology}/orchestration-profiles.ts +8 -8
- package/.pi/extensions/zob-harness/src/{topology → domains/topology}/teams.ts +8 -8
- package/.pi/extensions/zob-harness/src/runtime/adaptive-zmode.ts +2 -2
- package/.pi/extensions/zob-harness/src/runtime/auto-compaction.ts +2 -2
- package/.pi/extensions/zob-harness/src/runtime/commands.ts +51 -29
- package/.pi/extensions/zob-harness/src/runtime/compaction-policy.ts +2 -2
- package/.pi/extensions/zob-harness/src/runtime/delegation-feed.ts +1 -1
- package/.pi/extensions/zob-harness/src/runtime/delegation-monitor.ts +1 -1
- package/.pi/extensions/zob-harness/src/runtime/events.ts +53 -37
- package/.pi/extensions/zob-harness/src/{goal-runtime.ts → runtime/goal-runtime.ts} +9 -9
- package/.pi/extensions/zob-harness/src/runtime/goal-todo-overlay.ts +1 -1
- package/.pi/extensions/zob-harness/src/runtime/plan-capture.ts +2 -2
- package/.pi/extensions/zob-harness/src/runtime/state.ts +15 -13
- package/.pi/extensions/zob-harness/src/runtime/tools-autonomous.ts +2 -2
- package/.pi/extensions/zob-harness/src/runtime/tools-compute.ts +3 -3
- package/.pi/extensions/zob-harness/src/runtime/tools-coms.ts +15 -12
- package/.pi/extensions/zob-harness/src/runtime/tools-context.ts +2 -2
- package/.pi/extensions/zob-harness/src/runtime/tools-delegation.ts +13 -13
- package/.pi/extensions/zob-harness/src/runtime/tools-factory.ts +19 -19
- package/.pi/extensions/zob-harness/src/runtime/tools-goal-room.ts +3 -3
- package/.pi/extensions/zob-harness/src/runtime/tools-governed-requests.ts +3 -3
- package/.pi/extensions/zob-harness/src/runtime/tools-merge-queue.ts +3 -3
- package/.pi/extensions/zob-harness/src/runtime/tools-mission-control.ts +3 -3
- package/.pi/extensions/zob-harness/src/runtime/tools-orchestration.ts +9 -9
- package/.pi/extensions/zob-harness/src/runtime/tools-project-dna.ts +2 -2
- package/.pi/extensions/zob-harness/src/runtime/tools-worker-pool.ts +3 -3
- package/.pi/extensions/zob-harness/src/runtime/tools-workspace-claims.ts +3 -3
- package/.pi/extensions/zob-harness/src/runtime/tools-zcommit.ts +3 -3
- package/.pi/extensions/zob-harness/src/runtime/widget.ts +27 -10
- package/.pi/extensions/zob-harness/src/runtime/zobHarness.ts +1 -1
- package/.pi/extensions/zob-harness/src/types.ts +2 -2
- package/.pi/extensions/zob-switch/AGENTS.md +9 -0
- package/.pi/extensions/zob-switch/index.ts +9 -121
- package/.pi/extensions/zob-switch/src/AGENTS.md +8 -0
- package/.pi/extensions/zob-switch/src/autocomplete.ts +12 -0
- package/.pi/extensions/zob-switch/src/paths.ts +8 -0
- package/.pi/extensions/zob-switch/src/settings.ts +25 -0
- package/.pi/extensions/zob-switch/src/snapshot.ts +34 -0
- package/.pi/extensions/zob-switch/src/state.ts +57 -0
- package/.pi/factories/agentic-spec-team/README.md +35 -0
- package/.pi/factories/agentic-spec-team/batch-manifest.json +11 -0
- package/.pi/factories/agentic-spec-team/example-agentic-spec-manifest.json +19 -0
- package/.pi/factories/agentic-spec-team/factory.json +98 -0
- package/.pi/factories/agentic-spec-team/pilot-manifest.json +11 -0
- package/.pi/factories/agentic-spec-team/schemas/final-report.schema.json +15 -0
- package/.pi/factories/agentic-spec-team/schemas/manifest.schema.json +14 -0
- package/.pi/factories/agentic-spec-team/schemas/question.schema.json +18 -0
- package/.pi/factories/agentic-spec-team/schemas/source-register.schema.json +11 -0
- package/.pi/factories/agentic-spec-team/schemas/traceability.schema.json +11 -0
- package/.pi/factories/agentic-spec-team/smoke-manifest.json +11 -0
- package/.pi/skills/zob-agentic-spec-team/SKILL.md +148 -0
- package/.pi/skills/zob-coms-safety/SKILL.md +13 -0
- package/.pi/skills/zob-coms-v2-live/SKILL.md +11 -0
- package/.pi/skills/zob-factory/SKILL.md +21 -0
- package/.pi/skills/zob-harness/SKILL.md +14 -0
- package/.pi/skills/zob-split-refactor/SKILL.md +1 -1
- package/.pi/skills/zob-zagent-creator/SKILL.md +266 -12
- package/.pi/zagents/agent-factory-pacman-chief.json +22 -0
- package/.pi/zagents/agent-factory-pacman-engine-builder.json +21 -0
- package/.pi/zagents/agent-factory-pacman-frontend-builder.json +21 -0
- package/.pi/zagents/agent-factory-pacman-game-architect.json +21 -0
- package/.pi/zagents/agent-factory-pacman-game-designer.json +21 -0
- package/.pi/zagents/agent-factory-pacman-qa-oracle.json +21 -0
- package/.pi/zagents/bdd-writer.json +20 -0
- package/.pi/zagents/data-profile-analyst.json +20 -0
- package/.pi/zagents/domain-modeler.json +20 -0
- package/.pi/zagents/planner-handoff-writer.json +20 -0
- package/.pi/zagents/prompts/agent-factory-pacman-chief.md +53 -0
- package/.pi/zagents/prompts/agent-factory-pacman-engine-builder.md +41 -0
- package/.pi/zagents/prompts/agent-factory-pacman-frontend-builder.md +40 -0
- package/.pi/zagents/prompts/agent-factory-pacman-game-architect.md +41 -0
- package/.pi/zagents/prompts/agent-factory-pacman-game-designer.md +43 -0
- package/.pi/zagents/prompts/agent-factory-pacman-qa-oracle.md +51 -0
- package/.pi/zagents/prompts/agentic-spec-run-role.md +30 -0
- package/.pi/zagents/source-intake-steward.json +20 -0
- package/.pi/zagents/spec-chief.json +21 -0
- package/.pi/zagents/spec-oracle.json +20 -0
- package/.pi/zagents/spec-writer.json +20 -0
- package/.pi/zagents/ux-flow-analyst.json +20 -0
- package/.pi/zteams/agent-factory-pacman-multiplayer-runtime.mjs +384 -0
- package/.pi/zteams/agent-factory-pacman-multiplayer.json +42 -0
- package/.pi/zteams/agent-factory-pacman-multiplayer.tmux.sh +256 -0
- package/.pi/zteams/agentic-spec-run.json +42 -0
- package/.pi/zteams/agentic-spec-run.tmux.sh +134 -0
- package/.pi/zteams/templates/agent-factory-pacman-chief-kickoff.template.md +71 -0
- package/.pi/zteams/templates/agent-factory-pacman-worker-kickoff.template.md +59 -0
- package/README.md +183 -110
- package/SOURCE_INDEX.md +5 -1
- package/examples/agent-factory-mission-control/AGENTS.md +10 -0
- package/examples/agent-factory-mission-control/README.md +17 -0
- package/examples/agent-factory-mission-control/apps/api/AGENTS.md +3 -0
- package/examples/agent-factory-mission-control/apps/dashboard/AGENTS.md +3 -0
- package/examples/agent-factory-mission-control/mission.md +3 -0
- package/examples/agent-factory-mission-control/output-contract.md +3 -0
- package/examples/agent-factory-mission-control/packages/domain/AGENTS.md +3 -0
- package/examples/agent-factory-mission-control/packages/snapshot-reader/AGENTS.md +3 -0
- package/examples/agent-factory-pacman-multiplayer/AGENTS.md +27 -0
- package/examples/agent-factory-pacman-multiplayer/README.md +84 -0
- package/examples/agent-factory-pacman-multiplayer/mission.md +43 -0
- package/examples/agent-factory-pacman-multiplayer/output-contract.md +58 -0
- package/examples/agent-factory-tmux-comms/README.md +146 -0
- package/examples/agent-factory-tmux-comms/chief-kickoff.template.md +54 -0
- package/examples/agent-factory-tmux-comms/simple-agent-factory.team.json +92 -0
- package/examples/agent-factory-tmux-comms/simple-agent-factory.tmux.sh +248 -0
- package/examples/agent-factory-tmux-comms/worker-kickoff.template.md +43 -0
- package/package.json +17 -3
- package/scripts/README.md +1 -1
- package/scripts/agentic-spec-team/validate-bdd.mjs +13 -0
- package/scripts/agentic-spec-team/validate-final-report.mjs +14 -0
- package/scripts/agentic-spec-team/validate-manifest.mjs +14 -0
- package/scripts/agentic-spec-team/validate-oracle-ready.mjs +13 -0
- package/scripts/agentic-spec-team/validate-question-loop.mjs +15 -0
- package/scripts/agentic-spec-team/validate-run.mjs +11 -0
- package/scripts/agentic-spec-team/validate-source-register.mjs +17 -0
- package/scripts/agentic-spec-team/validate-traceability.mjs +20 -0
- package/scripts/agentic-spec-team/validate-workgraph.mjs +13 -0
- package/scripts/autonomy/mission-readiness-secret-smoke.mjs +5 -5
- package/scripts/git-ops/commit-policy-smoke.mjs +5 -4
- package/scripts/goal-todo/child-goal-ref-smoke.mjs +2 -2
- package/scripts/path-policy/validate-smoke.mjs +3 -3
- package/scripts/project-dna/AGENTS.md +39 -0
- package/scripts/project-dna/{validate-scaffold.mjs → validation/validate-scaffold.mjs} +7 -7
- package/scripts/spec-run.mjs +365 -0
- package/scripts/worker-pool/static-smoke.mjs +5 -5
- package/scripts/zagent-static-smoke.mjs +35 -6
- package/scripts/zpeer-local-e2e-smoke.mjs +12 -5
- package/scripts/zpeer-static-smoke.mjs +17 -17
- /package/.pi/extensions/zob-harness/src/{types → core/types}/core.ts +0 -0
- /package/.pi/extensions/zob-harness/src/{utils → core/utils}/hashing.ts +0 -0
- /package/.pi/extensions/zob-harness/src/{utils → core/utils}/json.ts +0 -0
- /package/.pi/extensions/zob-harness/src/{utils → core/utils}/paths.ts +0 -0
- /package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/AGENTS.md +0 -0
- /package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/pending-replies.ts +0 -0
- /package/.pi/extensions/zob-harness/src/{coms-v2 → domains/coms/coms-v2}/types.ts +0 -0
- /package/.pi/extensions/zob-harness/src/{promotion → domains/promotion}/ledger.ts +0 -0
- /package/.pi/extensions/zob-harness/src/{promotion → domains/promotion}/types.ts +0 -0
- /package/.pi/extensions/zob-harness/src/{promotion → domains/promotion}/validate.ts +0 -0
- /package/.pi/extensions/zob-harness/src/{schemas-project-dna.ts → runtime/schemas-project-dna.ts} +0 -0
- /package/.pi/extensions/zob-harness/src/{schemas.ts → runtime/schemas.ts} +0 -0
- /package/scripts/project-dna/{bench-smoke.mjs → benchmark/bench-smoke.mjs} +0 -0
- /package/scripts/project-dna/{build-capsules.mjs → capsules/build-capsules.mjs} +0 -0
- /package/scripts/project-dna/{emit-golden-cases.mjs → emit/emit-golden-cases.mjs} +0 -0
- /package/scripts/project-dna/{emit-ontology.mjs → emit/emit-ontology.mjs} +0 -0
- /package/scripts/project-dna/{oracle-review-smoke.mjs → oracle/oracle-review-smoke.mjs} +0 -0
- /package/scripts/project-dna/{query-context.mjs → query/query-context.mjs} +0 -0
- /package/scripts/project-dna/{query-steward.mjs → query/query-steward.mjs} +0 -0
- /package/scripts/project-dna/{build-sample-spec.mjs → sample/build-sample-spec.mjs} +0 -0
- /package/scripts/project-dna/{generate-sample.mjs → sample/generate-sample.mjs} +0 -0
- /package/scripts/project-dna/{validate-sample-project.mjs → sample/validate-sample-project.mjs} +0 -0
- /package/scripts/project-dna/{scan.mjs → scan/scan.mjs} +0 -0
- /package/scripts/project-dna/{validate-scan-artifacts.mjs → scan/validate-scan-artifacts.mjs} +0 -0
- /package/scripts/project-dna/{validate-5of5.mjs → validation/validate-5of5.mjs} +0 -0
- /package/scripts/project-dna/{validate-golden-cases.mjs → validation/validate-golden-cases.mjs} +0 -0
- /package/scripts/project-dna/{validate-ontology.mjs → validation/validate-ontology.mjs} +0 -0
- /package/scripts/project-dna/{plan-workflow.mjs → workflow/plan-workflow.mjs} +0 -0
- /package/scripts/project-dna/{validate-workflow.mjs → workflow/validate-workflow.mjs} +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { readFile, writeFile } from "node:fs/promises";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
|
|
4
|
+
import { SETTINGS_PATH } from "./paths.js";
|
|
5
|
+
|
|
6
|
+
export type JsonObject = Record<string, unknown>;
|
|
7
|
+
|
|
8
|
+
export function isObject(value: unknown): value is JsonObject {
|
|
9
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function asStringArray(value: unknown): string[] {
|
|
13
|
+
return Array.isArray(value) ? value.filter((entry): entry is string => typeof entry === "string") : [];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export async function readSettings(cwd: string): Promise<JsonObject> {
|
|
17
|
+
const raw = await readFile(join(cwd, SETTINGS_PATH), "utf8");
|
|
18
|
+
const parsed = JSON.parse(raw) as unknown;
|
|
19
|
+
if (!isObject(parsed)) throw new Error(`${SETTINGS_PATH} must contain a JSON object`);
|
|
20
|
+
return parsed;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export async function writeSettings(cwd: string, settings: JsonObject): Promise<void> {
|
|
24
|
+
await writeFile(join(cwd, SETTINGS_PATH), `${JSON.stringify(settings, null, 2)}\n`, "utf8");
|
|
25
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
4
|
+
|
|
5
|
+
import { SNAPSHOT_PATH } from "./paths.js";
|
|
6
|
+
import { isObject } from "./settings.js";
|
|
7
|
+
import type { JsonObject } from "./settings.js";
|
|
8
|
+
|
|
9
|
+
export type Snapshot = {
|
|
10
|
+
schema: "zob.harness-switch.settings-snapshot.v1";
|
|
11
|
+
savedAt: string;
|
|
12
|
+
settings: JsonObject;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export async function writeSnapshot(cwd: string, settings: JsonObject): Promise<void> {
|
|
16
|
+
const snapshot: Snapshot = {
|
|
17
|
+
schema: "zob.harness-switch.settings-snapshot.v1",
|
|
18
|
+
savedAt: new Date().toISOString(),
|
|
19
|
+
settings,
|
|
20
|
+
};
|
|
21
|
+
const snapshotPath = join(cwd, SNAPSHOT_PATH);
|
|
22
|
+
await mkdir(dirname(snapshotPath), { recursive: true });
|
|
23
|
+
await writeFile(snapshotPath, `${JSON.stringify(snapshot, null, 2)}\n`, "utf8");
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export async function readSnapshot(cwd: string): Promise<Snapshot | null> {
|
|
27
|
+
const snapshotPath = join(cwd, SNAPSHOT_PATH);
|
|
28
|
+
if (!existsSync(snapshotPath)) return null;
|
|
29
|
+
const parsed = JSON.parse(await readFile(snapshotPath, "utf8")) as unknown;
|
|
30
|
+
if (!isObject(parsed) || parsed.schema !== "zob.harness-switch.settings-snapshot.v1" || !isObject(parsed.settings)) {
|
|
31
|
+
throw new Error(`${SNAPSHOT_PATH} is not a valid ZOB switch snapshot`);
|
|
32
|
+
}
|
|
33
|
+
return parsed as Snapshot;
|
|
34
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { HARNESS_EXTENSION, SWITCH_EXTENSION, ZOB_PROMPTS, ZOB_SKILLS } from "./paths.js";
|
|
2
|
+
import { asStringArray } from "./settings.js";
|
|
3
|
+
import type { JsonObject } from "./settings.js";
|
|
4
|
+
|
|
5
|
+
function uniqueWithRequiredFirst(values: string[], requiredFirst: string[]): string[] {
|
|
6
|
+
const result: string[] = [];
|
|
7
|
+
for (const value of [...requiredFirst, ...values]) {
|
|
8
|
+
if (!result.includes(value)) result.push(value);
|
|
9
|
+
}
|
|
10
|
+
return result;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function withoutValues(values: string[], remove: string[]): string[] {
|
|
14
|
+
return values.filter((value) => !remove.includes(value));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function hasValue(settings: JsonObject, key: "extensions" | "prompts" | "skills", value: string): boolean {
|
|
18
|
+
return asStringArray(settings[key]).includes(value);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function buildOffSettings(current: JsonObject): JsonObject {
|
|
22
|
+
return {
|
|
23
|
+
...current,
|
|
24
|
+
extensions: uniqueWithRequiredFirst(withoutValues(asStringArray(current.extensions), [HARNESS_EXTENSION]), [SWITCH_EXTENSION]),
|
|
25
|
+
prompts: withoutValues(asStringArray(current.prompts), [ZOB_PROMPTS]),
|
|
26
|
+
skills: withoutValues(asStringArray(current.skills), [ZOB_SKILLS]),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function buildOnSettings(base: JsonObject, usedSnapshot: boolean): JsonObject {
|
|
31
|
+
return {
|
|
32
|
+
...base,
|
|
33
|
+
extensions: uniqueWithRequiredFirst(asStringArray(base.extensions), [SWITCH_EXTENSION, HARNESS_EXTENSION]),
|
|
34
|
+
prompts: usedSnapshot ? asStringArray(base.prompts) : uniqueWithRequiredFirst(asStringArray(base.prompts), [ZOB_PROMPTS]),
|
|
35
|
+
skills: usedSnapshot ? asStringArray(base.skills) : uniqueWithRequiredFirst(asStringArray(base.skills), [ZOB_SKILLS]),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function statusFor(settings: JsonObject, snapshotPresent: boolean): string {
|
|
40
|
+
const switchConfigured = hasValue(settings, "extensions", SWITCH_EXTENSION);
|
|
41
|
+
const harnessConfigured = hasValue(settings, "extensions", HARNESS_EXTENSION);
|
|
42
|
+
const promptsConfigured = hasValue(settings, "prompts", ZOB_PROMPTS);
|
|
43
|
+
const skillsConfigured = hasValue(settings, "skills", ZOB_SKILLS);
|
|
44
|
+
const state = switchConfigured && harnessConfigured && promptsConfigured && skillsConfigured
|
|
45
|
+
? "on"
|
|
46
|
+
: switchConfigured && !harnessConfigured && !promptsConfigured && !skillsConfigured
|
|
47
|
+
? "off"
|
|
48
|
+
: "partial";
|
|
49
|
+
return [
|
|
50
|
+
`ZOB Harness switch: ${state}`,
|
|
51
|
+
`switch extension: ${switchConfigured ? "configured" : "missing"}`,
|
|
52
|
+
`harness extension: ${harnessConfigured ? "configured" : "missing"}`,
|
|
53
|
+
`prompts: ${promptsConfigured ? "configured" : "missing"}`,
|
|
54
|
+
`skills: ${skillsConfigured ? "configured" : "missing"}`,
|
|
55
|
+
`snapshot: ${snapshotPresent ? "present" : "missing"}`,
|
|
56
|
+
].join("\n");
|
|
57
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Agentic Spec Team Factory
|
|
2
|
+
|
|
3
|
+
Status: **v1 scaffold**.
|
|
4
|
+
|
|
5
|
+
This factory describes the repeatable checkpoint backbone for the Agentic Spec Team workflow. The actual v1 launch surface is `scripts/spec-run.mjs` plus run-scoped ZTeam agents. The factory keeps the process evidence-first, human-question-gated, and oracle-reviewed.
|
|
6
|
+
|
|
7
|
+
## Safe entrypoints
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm run spec-run -- init --mission "..." --source docs/ --source data/export.csv
|
|
11
|
+
npm run spec-run:auto-pilot -- --mission-file specs/mission.md --source docs/ --source mockups/
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## What it does
|
|
15
|
+
|
|
16
|
+
- Defines map/reduce/validate stages for source intake, data/domain/UX analysis, spec synthesis, BDD, handoff, and oracle review.
|
|
17
|
+
- Requires traceability from source/answer/assumption to requirement, criteria, task, and oracle check.
|
|
18
|
+
- Treats raw sources as `citation_only` or `context_only` until explicitly approved otherwise.
|
|
19
|
+
- Blocks completion on open blocking questions.
|
|
20
|
+
- Requires final oracle PASS with `no_ship=false`.
|
|
21
|
+
|
|
22
|
+
## What it does not do in v1
|
|
23
|
+
|
|
24
|
+
- No runtime `/spec-run` extension command.
|
|
25
|
+
- No external durable write/import/sync.
|
|
26
|
+
- No automatic answer invention for business decisions.
|
|
27
|
+
- No closing tmux on timeout/WARN/FAIL/no_ship=true.
|
|
28
|
+
|
|
29
|
+
## Local validators
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
node scripts/spec-run.mjs validate <run_id>
|
|
33
|
+
node scripts/agentic-spec-team/validate-run.mjs <run_id>
|
|
34
|
+
node scripts/agentic-spec-team/validate-traceability.mjs <run_id>
|
|
35
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "zob.agentic-spec-manifest.v1",
|
|
3
|
+
"name": "billing-redesign",
|
|
4
|
+
"mission": "Produce a detailed, testable billing redesign implementation spec from approved docs, data exports, mockups, and owner notes.",
|
|
5
|
+
"sources": [
|
|
6
|
+
{ "path": "docs/billing-brief.md", "type": "doc", "policy": "citation_only" },
|
|
7
|
+
{ "path": "data/billing-export.csv", "type": "data", "policy": "citation_only" },
|
|
8
|
+
{ "path": "mockups/billing-flow/", "type": "mockups", "policy": "context_only" }
|
|
9
|
+
],
|
|
10
|
+
"human_question_policy": {
|
|
11
|
+
"interlocutor": "spec-chief",
|
|
12
|
+
"blocking_questions_stop_auto_pilot": true
|
|
13
|
+
},
|
|
14
|
+
"completion_gate": {
|
|
15
|
+
"traceability_required": true,
|
|
16
|
+
"oracle_required": true,
|
|
17
|
+
"no_ship_must_be_false": true
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agentic-spec-team",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Evidence-first ZOB workflow for producing detailed implementation specs from missions plus docs/data/mockups through a run-scoped agent team.",
|
|
5
|
+
"status": "v1-scaffold",
|
|
6
|
+
"autoPromotion": false,
|
|
7
|
+
"manualPromotionRequired": true,
|
|
8
|
+
"defaultMode": "smoke",
|
|
9
|
+
"agenticModel": {
|
|
10
|
+
"controlPlane": "spec-chief-led-zteam-plus-deterministic-cli",
|
|
11
|
+
"runtimeExtensionV1": false,
|
|
12
|
+
"humanInterlocutor": "spec-chief",
|
|
13
|
+
"traceabilityRequired": true,
|
|
14
|
+
"oracleRequired": true
|
|
15
|
+
},
|
|
16
|
+
"requiredStages": [
|
|
17
|
+
"manifest_loaded",
|
|
18
|
+
"source_registered",
|
|
19
|
+
"analysis_ready",
|
|
20
|
+
"clarification_closed",
|
|
21
|
+
"spec_synthesized",
|
|
22
|
+
"acceptance_ready",
|
|
23
|
+
"workgraph_ready",
|
|
24
|
+
"oracle_passed",
|
|
25
|
+
"sentinel"
|
|
26
|
+
],
|
|
27
|
+
"expectedArtifacts": [
|
|
28
|
+
"run-manifest.json",
|
|
29
|
+
"source-register.json",
|
|
30
|
+
"source-register.md",
|
|
31
|
+
"questions.md",
|
|
32
|
+
"answers.md",
|
|
33
|
+
"validation/traceability-matrix.json",
|
|
34
|
+
"validation/traceability-matrix.md",
|
|
35
|
+
"spec/mission-spec.md",
|
|
36
|
+
"validation/acceptance-criteria.md",
|
|
37
|
+
"handoff/workgraph.md",
|
|
38
|
+
"oracle/final-oracle-review.json",
|
|
39
|
+
"final-report.json",
|
|
40
|
+
"status.json"
|
|
41
|
+
],
|
|
42
|
+
"noShipBlockers": [
|
|
43
|
+
"secret-like source path or sensitive raw data persisted without approval",
|
|
44
|
+
"blocking human question open",
|
|
45
|
+
"requirement without source, answer, assumption, or decision support",
|
|
46
|
+
"acceptance criterion not mapped to requirement",
|
|
47
|
+
"task not mapped to acceptance criterion",
|
|
48
|
+
"contradiction hidden without decision",
|
|
49
|
+
"final oracle missing or no_ship=true",
|
|
50
|
+
"auto-pilot closes tmux on timeout/WARN/FAIL/no_ship=true"
|
|
51
|
+
],
|
|
52
|
+
"stages": [
|
|
53
|
+
{
|
|
54
|
+
"name": "source-intake",
|
|
55
|
+
"type": "map",
|
|
56
|
+
"agent": "explore",
|
|
57
|
+
"outputContract": "explore.v1",
|
|
58
|
+
"requiredTools": ["read", "grep", "find", "ls"],
|
|
59
|
+
"expectedOutcome": "Inventory approved sources, sensitivity, freshness, owners, contradictions, and open questions with citations.",
|
|
60
|
+
"mustDo": ["Use only explicit sources from run-manifest.json.", "Assign stable source IDs.", "Flag secret-like or sensitive sources.", "Write source quality gaps."],
|
|
61
|
+
"mustNotDo": ["No broad filesystem scan.", "No secrets.", "No source mutation.", "No external durable writes."],
|
|
62
|
+
"context": "Agentic Spec Team run {run.id}; source intake stage."
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "specialized-analysis",
|
|
66
|
+
"type": "map",
|
|
67
|
+
"agent": "explore",
|
|
68
|
+
"outputContract": "explore.v1",
|
|
69
|
+
"requiredTools": ["read", "grep", "find", "ls"],
|
|
70
|
+
"expectedOutcome": "Produce data/domain/UX analysis artifacts and candidate traceability rows.",
|
|
71
|
+
"mustDo": ["Cite source refs for each finding.", "Separate facts from assumptions.", "Propose questions to spec-chief when blocked."],
|
|
72
|
+
"mustNotDo": ["No invented business decisions.", "No direct human questions except through spec-chief.", "No edits outside the run directory."],
|
|
73
|
+
"context": "Agentic Spec Team run {run.id}; data/domain/UX analysis."
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "spec-synthesis",
|
|
77
|
+
"type": "reduce",
|
|
78
|
+
"agent": "specifier",
|
|
79
|
+
"outputContract": "spec.v1",
|
|
80
|
+
"requiredTools": ["read", "grep", "find", "ls"],
|
|
81
|
+
"expectedOutcome": "Synthesize mission spec, requirements, acceptance criteria, BDD, and workgraph from cited analysis artifacts.",
|
|
82
|
+
"mustDo": ["Every requirement must be traceable.", "List non-functional requirements and edge cases.", "Map implementation tasks to acceptance criteria."],
|
|
83
|
+
"mustNotDo": ["No unsupported requirements.", "No hidden contradictions.", "No open blocking questions."],
|
|
84
|
+
"context": "Agentic Spec Team run {run.id}; spec synthesis."
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "oracle-validation",
|
|
88
|
+
"type": "validate",
|
|
89
|
+
"agent": "oracle",
|
|
90
|
+
"outputContract": "oracle.v1",
|
|
91
|
+
"requiredTools": ["read", "grep", "find", "ls"],
|
|
92
|
+
"expectedOutcome": "Validate source-to-requirement-to-task traceability, question closure, sensitive data posture, and final no-ship status.",
|
|
93
|
+
"mustDo": ["Fail if traceability is incomplete.", "Fail if blocking questions remain open.", "Fail if final-report PASS/no_ship=false is unsupported."],
|
|
94
|
+
"mustNotDo": ["No patches.", "No commits.", "No external writes.", "No approval of unsupported specs."],
|
|
95
|
+
"context": "Agentic Spec Team run {run.id}; final oracle gate."
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "zob.agentic-spec.final-report.schema.v1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["schema", "run_id", "status", "no_ship", "verdict"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"schema": { "const": "agentic-spec.final-report.v1" },
|
|
8
|
+
"run_id": { "type": "string", "minLength": 1 },
|
|
9
|
+
"status": { "enum": ["pass", "blocked", "fail", "warn"] },
|
|
10
|
+
"verdict": { "enum": ["PASS", "WARN", "FAIL"] },
|
|
11
|
+
"no_ship": { "type": "boolean" },
|
|
12
|
+
"evidence_refs": { "type": "array", "items": { "type": "string" } },
|
|
13
|
+
"blocking_issues": { "type": "array", "items": { "type": "string" } }
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "zob.agentic-spec.manifest.schema.v1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["schema", "name", "mission", "sources", "completion_gate"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"schema": { "const": "zob.agentic-spec-manifest.v1" },
|
|
8
|
+
"name": { "type": "string", "minLength": 1 },
|
|
9
|
+
"mission": { "type": "string", "minLength": 1 },
|
|
10
|
+
"sources": { "type": "array", "minItems": 1, "items": { "type": "object", "required": ["path"], "properties": { "path": { "type": "string", "minLength": 1 }, "type": { "type": "string" }, "policy": { "enum": ["citation_only", "context_only", "safe_to_copy"] } } } },
|
|
11
|
+
"human_question_policy": { "type": "object" },
|
|
12
|
+
"completion_gate": { "type": "object" }
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "zob.agentic-spec.question.schema.v1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["schema", "question_id", "status", "blocking", "question"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"schema": { "const": "agentic-spec.question.v1" },
|
|
8
|
+
"question_id": { "type": "string", "pattern": "^Q-[0-9]{3,}$" },
|
|
9
|
+
"status": { "enum": ["open", "answered", "closed", "withdrawn"] },
|
|
10
|
+
"blocking": { "type": "boolean" },
|
|
11
|
+
"origin_agent": { "type": "string" },
|
|
12
|
+
"concerns": { "type": "array", "items": { "type": "string" } },
|
|
13
|
+
"source_refs": { "type": "array", "items": { "type": "string" } },
|
|
14
|
+
"question": { "type": "string", "minLength": 1 },
|
|
15
|
+
"options": { "type": "array" },
|
|
16
|
+
"recommended_option": { "type": ["string", "null"] }
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "zob.agentic-spec.source-register.schema.v1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["schema", "run_id", "sources"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"schema": { "const": "agentic-spec.source-register.v1" },
|
|
8
|
+
"run_id": { "type": "string", "minLength": 1 },
|
|
9
|
+
"sources": { "type": "array", "items": { "type": "object", "required": ["source_id", "path", "exists", "policy"], "properties": { "source_id": { "type": "string" }, "path": { "type": "string" }, "exists": { "type": "boolean" }, "kind": { "type": "string" }, "policy": { "type": "string" }, "sensitivity": { "type": "string" } } } }
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "zob.agentic-spec.traceability.schema.v1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["schema", "run_id", "rows"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"schema": { "const": "agentic-spec.traceability.v1" },
|
|
8
|
+
"run_id": { "type": "string", "minLength": 1 },
|
|
9
|
+
"rows": { "type": "array", "items": { "type": "object", "required": ["requirement_id", "support_ref", "acceptance_criteria_refs", "task_refs", "oracle_check_ref"], "properties": { "requirement_id": { "type": "string" }, "support_ref": { "type": "string" }, "acceptance_criteria_refs": { "type": "array", "items": { "type": "string" } }, "task_refs": { "type": "array", "items": { "type": "string" } }, "oracle_check_ref": { "type": "string" } } } }
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"factory": "agentic-spec-team",
|
|
3
|
+
"mode": "smoke",
|
|
4
|
+
"items": [
|
|
5
|
+
{
|
|
6
|
+
"id": "agentic-spec-skill-smoke",
|
|
7
|
+
"path": ".pi/skills/zob-agentic-spec-team/SKILL.md",
|
|
8
|
+
"mission": "Validate that the Agentic Spec Team scaffold describes a safe evidence-first spec workflow."
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: zob-agentic-spec-team
|
|
3
|
+
description: Use when launching, running, reviewing, or extending the Agentic Spec Team workflow that turns missions plus docs/data/mockups into evidence-first implementation specs.
|
|
4
|
+
---
|
|
5
|
+
# ZOB Agentic Spec Team Skill
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Use this skill to run a reusable ZOB-native spec production workflow. It ingests a mission plus explicit source paths, coordinates a run-scoped ZTeam, asks the human only through `spec-chief`, and produces a detailed, testable, traceable implementation spec.
|
|
10
|
+
|
|
11
|
+
V1 packaging is composite and deliberately **not** a runtime extension. It is a specialized Agent Factory pattern:
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
Skill = rules and operating contract
|
|
15
|
+
Factory = repeatable checkpoints, sentinels, validators
|
|
16
|
+
ZTeam/ZAgents = run-scoped human-facing team
|
|
17
|
+
CLI = scriptable entrypoint and tmux automation
|
|
18
|
+
Coms = parent-visible async asks, blockers, evidence refs, and oracle/no-ship routing
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Use the generic `examples/agent-factory-tmux-comms/` pattern for a smaller teaching version of the same shape.
|
|
22
|
+
|
|
23
|
+
## Entry points
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm run spec-run -- init --mission "..." --source docs/ --source data/export.csv --name billing-redesign
|
|
27
|
+
npm run spec-run:auto-pilot -- --mission-file specs/mission.md --source docs/ --source mockups/
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Run artifacts are written under:
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
reports/agentic-spec-runs/<run_id>/
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Team roles
|
|
37
|
+
|
|
38
|
+
- `spec-chief` — sole human interlocutor, run coordinator, blocker owner.
|
|
39
|
+
- `source-intake-steward` — inventories sources, sensitivity, freshness, contradictions.
|
|
40
|
+
- `data-profile-analyst` — profiles CSV/XLS/structured data and writes dictionaries.
|
|
41
|
+
- `domain-modeler` — extracts entities, states, rules, glossary, assumptions.
|
|
42
|
+
- `ux-flow-analyst` — maps mockups/screens/user journeys and UI state matrix.
|
|
43
|
+
- `spec-writer` — writes mission spec, requirements, slices, contracts.
|
|
44
|
+
- `bdd-writer` — writes acceptance criteria and Gherkin/data-driven examples.
|
|
45
|
+
- `planner-handoff-writer` — produces workgraph, implementation tasks, agent prompts.
|
|
46
|
+
- `spec-oracle` — validates traceability, open questions, safety, and no-ship.
|
|
47
|
+
|
|
48
|
+
## Required artifacts
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
run-manifest.json
|
|
52
|
+
source-register.json/source-register.md
|
|
53
|
+
questions.jsonl/questions.md
|
|
54
|
+
answers.jsonl/answers.md
|
|
55
|
+
analysis/data-profile.json
|
|
56
|
+
analysis/data-dictionary.md
|
|
57
|
+
analysis/domain-model.md
|
|
58
|
+
analysis/business-rules.md
|
|
59
|
+
analysis/ux-flows.md
|
|
60
|
+
spec/mission-spec.md
|
|
61
|
+
spec/functional-requirements.md
|
|
62
|
+
spec/non-functional-requirements.md
|
|
63
|
+
validation/acceptance-criteria.md
|
|
64
|
+
validation/bdd-scenarios.feature.md
|
|
65
|
+
validation/traceability-matrix.json
|
|
66
|
+
validation/traceability-matrix.md
|
|
67
|
+
handoff/workgraph.md
|
|
68
|
+
handoff/implementation-tasks.md
|
|
69
|
+
oracle/final-oracle-review.json
|
|
70
|
+
final-report.json
|
|
71
|
+
status.json
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Traceability rule
|
|
75
|
+
|
|
76
|
+
Every requirement must map to at least one of:
|
|
77
|
+
|
|
78
|
+
```text
|
|
79
|
+
source_ref | owner_answer | explicit_assumption | decision_ref
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
The traceability matrix must connect:
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
source_ref -> extracted_fact/answer/assumption -> requirement -> acceptance_criteria -> task -> oracle_check
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
No requirement may be accepted if it is unsupported or if the supporting source is known to be stale/contradictory without an explicit assumption or decision.
|
|
89
|
+
|
|
90
|
+
## Human question loop
|
|
91
|
+
|
|
92
|
+
`spec-chief` is the only role that asks the owner questions. Other agents propose questions to `spec-chief`; they do not directly ask the human unless explicitly instructed.
|
|
93
|
+
|
|
94
|
+
Question shape:
|
|
95
|
+
|
|
96
|
+
```json
|
|
97
|
+
{
|
|
98
|
+
"schema": "agentic-spec.question.v1",
|
|
99
|
+
"question_id": "Q-001",
|
|
100
|
+
"status": "open",
|
|
101
|
+
"blocking": true,
|
|
102
|
+
"origin_agent": "domain-modeler",
|
|
103
|
+
"concerns": ["REQ-014", "AC-022"],
|
|
104
|
+
"source_refs": ["SRC-003"],
|
|
105
|
+
"question": "Which billing rule wins?",
|
|
106
|
+
"options": [{ "id": "A", "label": "Invoice date wins" }],
|
|
107
|
+
"recommended_option": "A"
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
If a blocking question is open, auto-pilot must return `blocked/no_ship=true` and point to `questions.md`. It must not invent answers.
|
|
112
|
+
|
|
113
|
+
Answers may be recorded with:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
npm run spec-run -- answer <run_id> Q-001 --text "..." --answered-by owner
|
|
117
|
+
npm run spec-run -- resume <run_id>
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## No-ship blockers
|
|
121
|
+
|
|
122
|
+
- secret-like paths or sensitive raw data are read/persisted without explicit approval;
|
|
123
|
+
- source content is treated as `safe_to_copy` instead of citation/context evidence;
|
|
124
|
+
- any requirement lacks source/answer/assumption/decision support;
|
|
125
|
+
- acceptance criteria are not mapped to requirements;
|
|
126
|
+
- implementation tasks are not mapped to acceptance criteria;
|
|
127
|
+
- blocking questions remain open;
|
|
128
|
+
- contradictions are hidden or collapsed without decision;
|
|
129
|
+
- ZPeer transient messages are treated as durable evidence without artifact refs;
|
|
130
|
+
- auto-pilot closes tmux on timeout, WARN, FAIL, or `no_ship=true`;
|
|
131
|
+
- final oracle is missing or does not PASS with `no_ship=false`.
|
|
132
|
+
|
|
133
|
+
## V1 vs V2
|
|
134
|
+
|
|
135
|
+
V1 uses `.pi/skills`, `.pi/factories`, `.pi/zagents`, `.pi/zteams`, and `scripts/spec-run.mjs`.
|
|
136
|
+
|
|
137
|
+
V2 may add a runtime `/spec-run` extension command only after the script/team/factory workflow is stable and validated.
|
|
138
|
+
|
|
139
|
+
## Validation
|
|
140
|
+
|
|
141
|
+
Minimum parent validation for scaffold changes:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
npm run check
|
|
145
|
+
node scripts/spec-run.mjs --help
|
|
146
|
+
node scripts/spec-run.mjs init --name smoke --mission "smoke spec" --source README.md
|
|
147
|
+
node scripts/spec-run.mjs validate <run_id>
|
|
148
|
+
```
|
|
@@ -30,6 +30,17 @@ ZOB coms live transport may be transient, but ZOB audit must stay metadata-only.
|
|
|
30
30
|
- No silent fallback from required live delivery to append-only success.
|
|
31
31
|
- No token/secret logging.
|
|
32
32
|
|
|
33
|
+
## Tmux Agent Factory safety
|
|
34
|
+
|
|
35
|
+
For tmux-backed ZAgent teams:
|
|
36
|
+
|
|
37
|
+
- Tmux is a local launch/observation surface, not the durable source of truth.
|
|
38
|
+
- Startup kickoff files are allowed when they stay bounded and avoid secrets/raw private dumps; post-start pane paste is not reliable proof of delivery.
|
|
39
|
+
- Pane capture may be useful for live diagnosis, but do not persist captured prompt/output bodies into ledgers, reports, Mission Control, or skills.
|
|
40
|
+
- Supervisors/watchdogs must be bounded and local-only; they may detect stale windows or nudge a specific owed-response agent only with hash/body-free durable records.
|
|
41
|
+
- Team communication must remain parent-visible. Prefer one `control` room with lanes/tags/artifact sections unless a bounded owner-approved route exists.
|
|
42
|
+
- Completion still requires artifacts, validation evidence, and oracle/no-ship review when applicable; an active tmux session or chat reply is not completion evidence.
|
|
43
|
+
|
|
33
44
|
## Goal Room and owner-pool safety
|
|
34
45
|
|
|
35
46
|
For parallel owner micro-worker pools:
|
|
@@ -48,6 +59,8 @@ No-ship if:
|
|
|
48
59
|
- live send succeeds while receiver is absent/stale/offline;
|
|
49
60
|
- await treats timeout/stale/offline as success;
|
|
50
61
|
- hidden worker-to-worker free chat works outside a typed parent-visible Goal Room;
|
|
62
|
+
- tmux pane paste/capture is treated as reliable durable communication or completion evidence;
|
|
63
|
+
- a supervisor/watchdog nudges indefinitely, starts broad work, or stores raw pane bodies;
|
|
51
64
|
- a non-owner writes owned paths instead of sending an owner request;
|
|
52
65
|
- a worker applies or merges directly into the main workspace;
|
|
53
66
|
- network starts without explicit auth/locality policy;
|
|
@@ -35,6 +35,17 @@ Use this skill when:
|
|
|
35
35
|
- Do not bypass topology guards.
|
|
36
36
|
- Do not enable network transport without explicit auth/locality policy.
|
|
37
37
|
|
|
38
|
+
## Tmux/ZAgent communication pattern
|
|
39
|
+
|
|
40
|
+
For tmux-backed Agent Factory teams:
|
|
41
|
+
|
|
42
|
+
- Treat each tmux window as a local Pi/ZAgent session with its own identity and room membership.
|
|
43
|
+
- Use tmux only to start, attach, inspect status, or close the local session; do not use pane paste as the primary communication transport.
|
|
44
|
+
- Prefer startup files (`pi @chief-kickoff.md`, `pi @worker-kickoff.md`) for initial instructions so Pi receives one bounded message block.
|
|
45
|
+
- Use async ZPeer/Goal Room-style asks for normal coordination; do not block in polling loops after sending a non-blocking ask.
|
|
46
|
+
- Keep messages short and actionable with `CONTEXT`, `ASK`, `EVIDENCE`, `URGENCY`, and `BLOCKER` fields.
|
|
47
|
+
- When a reply affects scope, ownership, merge readiness, oracle status, or completion, mirror only body-free metadata/artifact refs into durable records.
|
|
48
|
+
|
|
38
49
|
## Expected pattern
|
|
39
50
|
|
|
40
51
|
```text
|
|
@@ -17,6 +17,19 @@ Use when the task is repeated, batchable, or should become a reusable system rat
|
|
|
17
17
|
5. Pilot: 10 items max with bounded concurrency.
|
|
18
18
|
6. Batch: only after pilot sentinel and oracle gate.
|
|
19
19
|
|
|
20
|
+
## Agent Factory shape
|
|
21
|
+
|
|
22
|
+
Some factories produce not only code or reports, but a supervised team workflow. Treat these as **Agent Factories**. A safe Agent Factory defines:
|
|
23
|
+
|
|
24
|
+
- ZAgent roles, prompts, default modes, and allowed authority;
|
|
25
|
+
- ZTeam topology, aliases, rooms, entry agent, and `parentVisible` communication policy;
|
|
26
|
+
- optional manual tmux launcher with start/attach/status/close only;
|
|
27
|
+
- startup kickoff templates or rendered kickoff files passed as `pi @kickoff.md`;
|
|
28
|
+
- run artifacts such as `run-manifest.json`, workgraph/status/iteration logs, readiness or kickoff-dispatch records;
|
|
29
|
+
- validation and oracle/no-ship gates before completion claims.
|
|
30
|
+
|
|
31
|
+
Do not treat launching a tmux team as factory success. Success comes from evidence artifacts, validators, and oracle review.
|
|
32
|
+
|
|
20
33
|
## Required artifacts
|
|
21
34
|
|
|
22
35
|
- `manifest.json`
|
|
@@ -26,3 +39,11 @@ Use when the task is repeated, batchable, or should become a reusable system rat
|
|
|
26
39
|
- `validation.json`
|
|
27
40
|
- phase sentinel (`SMOKE_PASSED.sentinel`, `PILOT_PASSED.sentinel`, or `BATCH_PASSED.sentinel`)
|
|
28
41
|
- `DONE.sentinel` only after validation passes
|
|
42
|
+
|
|
43
|
+
For Agent Factories, also prefer:
|
|
44
|
+
|
|
45
|
+
- team manifest or generated run-scoped team manifest
|
|
46
|
+
- kickoff templates or rendered startup kickoff files
|
|
47
|
+
- `autonomous-workgraph.md` / `autonomous-status.md` / `iteration-log.md`
|
|
48
|
+
- `kickoff-dispatch.json` or equivalent body-free startup proof
|
|
49
|
+
- communication protocol and no-ship policy
|
|
@@ -9,12 +9,26 @@ description: Use when working inside the ZOB Pi harness, designing agentic workf
|
|
|
9
9
|
Use this skill for any task involving:
|
|
10
10
|
- Pi extensions, prompt templates, skills, or agent definitions.
|
|
11
11
|
- Multi-agent delegation workflows.
|
|
12
|
+
- Agent Factory design: ZAgents, ZTeams, tmux launchers, kickoff files, visible coms, workgraphs, and oracle gates.
|
|
12
13
|
- Safety gates and damage-control policy.
|
|
13
14
|
- Software-factory design from repeated manual workflows.
|
|
14
15
|
- Runtime tool/command routing via `.pi/capabilities/zob-public-runtime-capabilities.json`.
|
|
15
16
|
|
|
16
17
|
For routing behavior, load `zob-tool-router` before non-trivial or tool-ambiguous work. For compaction/recovery behavior, load `zob-compaction-policy` before changing compaction hooks or resuming from a compacted long-running goal. For domain behavior, load the domain skill named by the registry instead of inlining details here: `zob-goal-todo-tree`, `zob-coms-v2-live`, `zob-coms-safety`, `zob-mission-control-coms`, `zob-autonomous-runtime`, `zob-factory`, `zob-sandbox`, `zob-oracle`, or `zob-spec` as applicable.
|
|
17
18
|
|
|
19
|
+
## Agent Factory posture
|
|
20
|
+
|
|
21
|
+
Treat ZOB as a governed Agent Factory when the owner wants persistent local agent roles rather than one transient assistant. An Agent Factory may include:
|
|
22
|
+
|
|
23
|
+
- ZAgent role definitions and prompts;
|
|
24
|
+
- ZTeam topology, rooms, aliases, entry agent, and communication policy;
|
|
25
|
+
- optional tmux launchers for manual local startup/attach/status/close;
|
|
26
|
+
- startup kickoff files passed as `pi @kickoff.md`, not post-start pane paste as the primary transport;
|
|
27
|
+
- run artifacts such as `run-manifest.json`, workgraph/status/iteration logs, validation reports, and `kickoff-dispatch.json`;
|
|
28
|
+
- oracle/no-ship gates before completion claims.
|
|
29
|
+
|
|
30
|
+
Communication is a core deliverable. Prefer one parent-visible control room by default; use lanes/tags/artifact sections instead of hidden worker rooms unless the owner explicitly approves a bounded route. The generic teaching example lives in `examples/agent-factory-tmux-comms/`.
|
|
31
|
+
|
|
18
32
|
## Operating model
|
|
19
33
|
|
|
20
34
|
1. Classify the task as one of: `explore`, `plan`, `implement`, `oracle`, `factory`, `orchestrator`.
|