zob-harness 0.2.0 → 0.3.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/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 +3 -3
- 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 +3 -3
- package/.pi/extensions/zob-harness/src/{mission-control.ts → domains/coms/mission-control.ts} +8 -8
- 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 +49 -27
- 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 +52 -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 +25 -8
- 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 +145 -0
- package/.pi/skills/zob-split-refactor/SKILL.md +1 -1
- package/.pi/skills/zob-zagent-creator/SKILL.md +256 -12
- 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/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/agentic-spec-run.json +42 -0
- package/.pi/zteams/agentic-spec-run.tmux.sh +134 -0
- package/SOURCE_INDEX.md +1 -1
- package/package.json +9 -1
- 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 +6 -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,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,145 @@
|
|
|
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:
|
|
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
|
+
```
|
|
19
|
+
|
|
20
|
+
## Entry points
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm run spec-run -- init --mission "..." --source docs/ --source data/export.csv --name billing-redesign
|
|
24
|
+
npm run spec-run:auto-pilot -- --mission-file specs/mission.md --source docs/ --source mockups/
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Run artifacts are written under:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
reports/agentic-spec-runs/<run_id>/
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Team roles
|
|
34
|
+
|
|
35
|
+
- `spec-chief` — sole human interlocutor, run coordinator, blocker owner.
|
|
36
|
+
- `source-intake-steward` — inventories sources, sensitivity, freshness, contradictions.
|
|
37
|
+
- `data-profile-analyst` — profiles CSV/XLS/structured data and writes dictionaries.
|
|
38
|
+
- `domain-modeler` — extracts entities, states, rules, glossary, assumptions.
|
|
39
|
+
- `ux-flow-analyst` — maps mockups/screens/user journeys and UI state matrix.
|
|
40
|
+
- `spec-writer` — writes mission spec, requirements, slices, contracts.
|
|
41
|
+
- `bdd-writer` — writes acceptance criteria and Gherkin/data-driven examples.
|
|
42
|
+
- `planner-handoff-writer` — produces workgraph, implementation tasks, agent prompts.
|
|
43
|
+
- `spec-oracle` — validates traceability, open questions, safety, and no-ship.
|
|
44
|
+
|
|
45
|
+
## Required artifacts
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
run-manifest.json
|
|
49
|
+
source-register.json/source-register.md
|
|
50
|
+
questions.jsonl/questions.md
|
|
51
|
+
answers.jsonl/answers.md
|
|
52
|
+
analysis/data-profile.json
|
|
53
|
+
analysis/data-dictionary.md
|
|
54
|
+
analysis/domain-model.md
|
|
55
|
+
analysis/business-rules.md
|
|
56
|
+
analysis/ux-flows.md
|
|
57
|
+
spec/mission-spec.md
|
|
58
|
+
spec/functional-requirements.md
|
|
59
|
+
spec/non-functional-requirements.md
|
|
60
|
+
validation/acceptance-criteria.md
|
|
61
|
+
validation/bdd-scenarios.feature.md
|
|
62
|
+
validation/traceability-matrix.json
|
|
63
|
+
validation/traceability-matrix.md
|
|
64
|
+
handoff/workgraph.md
|
|
65
|
+
handoff/implementation-tasks.md
|
|
66
|
+
oracle/final-oracle-review.json
|
|
67
|
+
final-report.json
|
|
68
|
+
status.json
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Traceability rule
|
|
72
|
+
|
|
73
|
+
Every requirement must map to at least one of:
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
source_ref | owner_answer | explicit_assumption | decision_ref
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The traceability matrix must connect:
|
|
80
|
+
|
|
81
|
+
```text
|
|
82
|
+
source_ref -> extracted_fact/answer/assumption -> requirement -> acceptance_criteria -> task -> oracle_check
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
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.
|
|
86
|
+
|
|
87
|
+
## Human question loop
|
|
88
|
+
|
|
89
|
+
`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.
|
|
90
|
+
|
|
91
|
+
Question shape:
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"schema": "agentic-spec.question.v1",
|
|
96
|
+
"question_id": "Q-001",
|
|
97
|
+
"status": "open",
|
|
98
|
+
"blocking": true,
|
|
99
|
+
"origin_agent": "domain-modeler",
|
|
100
|
+
"concerns": ["REQ-014", "AC-022"],
|
|
101
|
+
"source_refs": ["SRC-003"],
|
|
102
|
+
"question": "Which billing rule wins?",
|
|
103
|
+
"options": [{ "id": "A", "label": "Invoice date wins" }],
|
|
104
|
+
"recommended_option": "A"
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
If a blocking question is open, auto-pilot must return `blocked/no_ship=true` and point to `questions.md`. It must not invent answers.
|
|
109
|
+
|
|
110
|
+
Answers may be recorded with:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
npm run spec-run -- answer <run_id> Q-001 --text "..." --answered-by owner
|
|
114
|
+
npm run spec-run -- resume <run_id>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## No-ship blockers
|
|
118
|
+
|
|
119
|
+
- secret-like paths or sensitive raw data are read/persisted without explicit approval;
|
|
120
|
+
- source content is treated as `safe_to_copy` instead of citation/context evidence;
|
|
121
|
+
- any requirement lacks source/answer/assumption/decision support;
|
|
122
|
+
- acceptance criteria are not mapped to requirements;
|
|
123
|
+
- implementation tasks are not mapped to acceptance criteria;
|
|
124
|
+
- blocking questions remain open;
|
|
125
|
+
- contradictions are hidden or collapsed without decision;
|
|
126
|
+
- ZPeer transient messages are treated as durable evidence without artifact refs;
|
|
127
|
+
- auto-pilot closes tmux on timeout, WARN, FAIL, or `no_ship=true`;
|
|
128
|
+
- final oracle is missing or does not PASS with `no_ship=false`.
|
|
129
|
+
|
|
130
|
+
## V1 vs V2
|
|
131
|
+
|
|
132
|
+
V1 uses `.pi/skills`, `.pi/factories`, `.pi/zagents`, `.pi/zteams`, and `scripts/spec-run.mjs`.
|
|
133
|
+
|
|
134
|
+
V2 may add a runtime `/spec-run` extension command only after the script/team/factory workflow is stable and validated.
|
|
135
|
+
|
|
136
|
+
## Validation
|
|
137
|
+
|
|
138
|
+
Minimum parent validation for scaffold changes:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
npm run check
|
|
142
|
+
node scripts/spec-run.mjs --help
|
|
143
|
+
node scripts/spec-run.mjs init --name smoke --mission "smoke spec" --source README.md
|
|
144
|
+
node scripts/spec-run.mjs validate <run_id>
|
|
145
|
+
```
|
|
@@ -23,7 +23,7 @@ description: Use when splitting a monolithic ZOB/Pi TypeScript extension into mo
|
|
|
23
23
|
|
|
24
24
|
## Slice workflow
|
|
25
25
|
|
|
26
|
-
1. Read `docs/
|
|
26
|
+
1. Read `docs/ZOB_HARNESS_ARCHITECTURE.md` once for the phase.
|
|
27
27
|
2. Read the local `AGENTS.md` for the target folder.
|
|
28
28
|
3. Read only the relevant `index.ts` range and already-extracted modules.
|
|
29
29
|
4. Move a bounded block with minimal import/export changes.
|
|
@@ -22,11 +22,12 @@ Example owner asks:
|
|
|
22
22
|
|
|
23
23
|
The assistant should:
|
|
24
24
|
|
|
25
|
-
1. Parse the owner’s natural-language team/agent description into candidate ZAgent roles, ZTeam membership, rooms, authority, allowed tools, allowed paths, forbidden paths, and verification expectations.
|
|
25
|
+
1. Parse the owner’s natural-language team/agent description into candidate ZAgent roles, ZTeam membership, rooms, authority, allowed tools, allowed paths, forbidden paths, default ZOB mode, and verification expectations.
|
|
26
26
|
2. Analyze the current repo and any owner-provided reference context before writing, staying within allowed paths and avoiding secrets.
|
|
27
|
-
3.
|
|
28
|
-
4.
|
|
29
|
-
5.
|
|
27
|
+
3. If the owner mentions model choice, cost, “moins cher”, speed, quality, reasoning, context length, oracle/security strength, or any concrete model/provider, read the project-local model catalog before choosing: prefer `.pi/model-catalog.json` when present, otherwise use `.pi/model-catalog.example.json` as a fallback; also read `.pi/model-routing.json` for valid model classes.
|
|
28
|
+
4. Write only project-local artifacts: `.pi/zagents/*.json`, `.pi/zagents/prompts/*.md`, `.pi/zteams/*.json`, and, only when the owner explicitly requests `tmux`, `.pi/zteams/*.tmux.sh`.
|
|
29
|
+
5. Report the generated files, model choices, model-catalog evidence, tmux bundle details when applicable, and the manual launch instructions; do not automatically spawn processes.
|
|
30
|
+
6. Tell the user to inspect `/zteam launch-plan <team-id>` and launch each full Pi session manually with `ZOB_ZAGENT_ID=<id> pi` or, when a ZAgent manifest sets `model`, the launch-plan-provided `ZOB_ZAGENT_ID=<id> pi --model <model>` command. If a manifest sets `defaultMode`, that launched ZAgent session applies the mode on startup. When a tmux launcher was generated, tell the user it is a manual convenience wrapper around those commands, not proof that agents were launched.
|
|
30
31
|
|
|
31
32
|
## Output locations
|
|
32
33
|
|
|
@@ -35,8 +36,236 @@ Generated definitions must stay project-local and are not harness-global:
|
|
|
35
36
|
- ZAgent definitions: `.pi/zagents/*.json`
|
|
36
37
|
- ZAgent prompts: `.pi/zagents/prompts/*.md`
|
|
37
38
|
- ZTeam definitions: `.pi/zteams/*.json`
|
|
39
|
+
- Optional tmux launchers, only when explicitly requested: `.pi/zteams/*.tmux.sh`
|
|
38
40
|
|
|
39
|
-
Never write generated ZAgent or
|
|
41
|
+
Never write generated ZAgent, ZTeam, prompt, or tmux launcher artifacts outside those directories unless the owner explicitly provides a different project-local allowed path.
|
|
42
|
+
|
|
43
|
+
## Optional tmux launcher mode
|
|
44
|
+
|
|
45
|
+
When the owner starts or qualifies the natural-language request with `tmux`, generate a project-local tmux launcher script alongside the generated ZTeam manifests. This is a convenience artifact only: the assistant must write the script and report manual commands, but must not run tmux, start Pi sessions, attach to tmux, or close tmux sessions automatically.
|
|
46
|
+
|
|
47
|
+
Accepted owner request patterns include:
|
|
48
|
+
|
|
49
|
+
- `/skill:zob-zagent-creator tmux ...`
|
|
50
|
+
- `/skill:zob-zagent-creator tmux team ...`
|
|
51
|
+
- `/skill:zob-zagent-creator tmux connected ...`
|
|
52
|
+
- `/skill:zob-zagent-creator tmux all ...`
|
|
53
|
+
|
|
54
|
+
Tmux scope rules:
|
|
55
|
+
|
|
56
|
+
- `tmux team`: include only the primary generated ZTeam's direct members.
|
|
57
|
+
- `tmux connected`: include the primary ZTeam plus every generated or existing ZTeam connected through shared ZAgent membership. This is the default when the owner says only `tmux`, especially when the request describes bridge agents, multiple teams, or agents that belong to more than one team.
|
|
58
|
+
- `tmux all`: include every ZTeam generated for the owner's request.
|
|
59
|
+
|
|
60
|
+
A tmux launcher represents a **bundle** of teams and unique agents, not necessarily a single team. Use a safe bundle id such as `<team-id>` for simple teams or `<mission-id>-bundle` for multi-team connected graphs. Also record the intended owner entry point in the primary ZTeam manifest as `metadata.entryAgent` (and optionally `metadata.entryRoom`) when absent; choose the lead/orchestrator agent if one exists, otherwise the first unique agent. Write the launcher to:
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
.pi/zteams/<bundle-id>.tmux.sh
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The launcher must create one tmux session for the bundle and one tmux window per unique ZAgent id:
|
|
67
|
+
|
|
68
|
+
```text
|
|
69
|
+
session: zob-<bundle-id>
|
|
70
|
+
window: <zagent-id-1>
|
|
71
|
+
window: <shared-bridge-zagent-id>
|
|
72
|
+
window: <zagent-id-2>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Deduplicate agents by `zagentId` only. Do not launch the same bridge/shared ZAgent once per team. A shared ZAgent should be launched once with `ZOB_ZAGENT_ID=<id> pi`; the runtime can resolve its rooms and team memberships from the ZAgent and ZTeam manifests.
|
|
76
|
+
|
|
77
|
+
The script must support these manual subcommands:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
./.pi/zteams/<bundle-id>.tmux.sh start [agent] # create the tmux session if absent, then attach entryAgent or named agent
|
|
81
|
+
./.pi/zteams/<bundle-id>.tmux.sh attach [agent] # attach to entryAgent or named agent in an existing session
|
|
82
|
+
./.pi/zteams/<bundle-id>.tmux.sh window <agent> # alias for attach <agent>
|
|
83
|
+
./.pi/zteams/<bundle-id>.tmux.sh list # list entryAgent and available agent windows
|
|
84
|
+
./.pi/zteams/<bundle-id>.tmux.sh status # list bundle windows/session status
|
|
85
|
+
./.pi/zteams/<bundle-id>.tmux.sh close # close only this bundle's tmux session
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Script safety requirements:
|
|
89
|
+
|
|
90
|
+
- Use `#!/usr/bin/env bash` and `set -euo pipefail`.
|
|
91
|
+
- Check `command -v tmux` before any tmux operation.
|
|
92
|
+
- Use a safe session name like `zob-<bundle-id>` and safe tmux window names derived from validated ZAgent ids.
|
|
93
|
+
- Choose an entry agent for the bundle. Prefer `team.metadata.entryAgent` when present; otherwise use the first unique ZAgent in the launcher.
|
|
94
|
+
- If `start` sees that the session already exists, attach to the entry agent or requested agent instead of creating duplicate Pi processes.
|
|
95
|
+
- `start [agent]`, `attach [agent]`, and `window <agent>` must validate the target against the launcher `AGENTS` list before passing it to tmux.
|
|
96
|
+
- `close` may call only `tmux kill-session -t "$SESSION_NAME"`; do not use `killall`, broad process kills, destructive shell commands, or global cleanup.
|
|
97
|
+
- Quote shell values safely. Do not inject raw natural-language text into shell commands.
|
|
98
|
+
- Only include `--model <model>` when the model value passes the same safe pattern expected by `/zteam launch-plan`; otherwise omit it and report the omission.
|
|
99
|
+
- Keep the script local-only and manual; it must not perform network setup, credential access, commits, pushes, or background daemon installation.
|
|
100
|
+
|
|
101
|
+
Recommended launcher shape:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
#!/usr/bin/env bash
|
|
105
|
+
set -euo pipefail
|
|
106
|
+
|
|
107
|
+
SESSION_NAME="zob-<bundle-id>"
|
|
108
|
+
ENTRY_AGENT="planner" # prefer team.metadata.entryAgent; fallback AGENTS[0]
|
|
109
|
+
AGENTS=("planner" "bridge-agent" "oracle")
|
|
110
|
+
MODELS=("" "" "openrouter/example/model")
|
|
111
|
+
|
|
112
|
+
require_tmux() {
|
|
113
|
+
command -v tmux >/dev/null 2>&1 || { echo "tmux is required"; exit 1; }
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
session_exists() {
|
|
117
|
+
tmux has-session -t "$SESSION_NAME" 2>/dev/null
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
safe_window_name() {
|
|
121
|
+
printf '%s' "$1" | tr -c 'A-Za-z0-9_-' '-'
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
is_known_agent() {
|
|
125
|
+
local candidate="${1:-}"
|
|
126
|
+
local agent
|
|
127
|
+
for agent in "${AGENTS[@]}"; do
|
|
128
|
+
if [ "$agent" = "$candidate" ]; then return 0; fi
|
|
129
|
+
done
|
|
130
|
+
return 1
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
resolve_target_agent() {
|
|
134
|
+
local requested="${1:-$ENTRY_AGENT}"
|
|
135
|
+
if ! is_known_agent "$requested"; then
|
|
136
|
+
echo "Unknown agent/window: $requested" >&2
|
|
137
|
+
echo "Known agents:" >&2
|
|
138
|
+
printf ' %s\n' "${AGENTS[@]}" >&2
|
|
139
|
+
exit 2
|
|
140
|
+
fi
|
|
141
|
+
printf '%s' "$requested"
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
attach_to_agent() {
|
|
145
|
+
require_tmux
|
|
146
|
+
local target="$(resolve_target_agent "${1:-$ENTRY_AGENT}")"
|
|
147
|
+
local window="$(safe_window_name "$target")"
|
|
148
|
+
if ! session_exists; then
|
|
149
|
+
echo "session not running: $SESSION_NAME" >&2
|
|
150
|
+
echo "Run: $0 start $target" >&2
|
|
151
|
+
exit 1
|
|
152
|
+
fi
|
|
153
|
+
tmux select-window -t "$SESSION_NAME:$window"
|
|
154
|
+
tmux attach -t "$SESSION_NAME:$window"
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
start_session() {
|
|
158
|
+
require_tmux
|
|
159
|
+
local target="$(resolve_target_agent "${1:-$ENTRY_AGENT}")"
|
|
160
|
+
local target_window="$(safe_window_name "$target")"
|
|
161
|
+
if session_exists; then
|
|
162
|
+
attach_to_agent "$target"
|
|
163
|
+
exit 0
|
|
164
|
+
fi
|
|
165
|
+
local first="${AGENTS[0]}"
|
|
166
|
+
local first_window="$(safe_window_name "$first")"
|
|
167
|
+
tmux new-session -d -s "$SESSION_NAME" -n "$first_window"
|
|
168
|
+
for i in "${!AGENTS[@]}"; do
|
|
169
|
+
agent="${AGENTS[$i]}"
|
|
170
|
+
model="${MODELS[$i]}"
|
|
171
|
+
window="$(safe_window_name "$agent")"
|
|
172
|
+
if [ "$i" -ne 0 ]; then tmux new-window -t "$SESSION_NAME" -n "$window"; fi
|
|
173
|
+
if [ -n "$model" ]; then
|
|
174
|
+
tmux send-keys -t "$SESSION_NAME:$window" "ZOB_ZAGENT_ID=$agent pi --model $model" C-m
|
|
175
|
+
else
|
|
176
|
+
tmux send-keys -t "$SESSION_NAME:$window" "ZOB_ZAGENT_ID=$agent pi" C-m
|
|
177
|
+
fi
|
|
178
|
+
done
|
|
179
|
+
tmux select-window -t "$SESSION_NAME:$target_window"
|
|
180
|
+
tmux attach -t "$SESSION_NAME:$target_window"
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
list_agents() {
|
|
184
|
+
printf 'entry: %s\n' "$ENTRY_AGENT"
|
|
185
|
+
printf 'agents:\n'
|
|
186
|
+
printf ' %s\n' "${AGENTS[@]}"
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
case "${1:-start}" in
|
|
190
|
+
start) start_session "${2:-$ENTRY_AGENT}" ;;
|
|
191
|
+
attach) attach_to_agent "${2:-$ENTRY_AGENT}" ;;
|
|
192
|
+
window) attach_to_agent "${2:-$ENTRY_AGENT}" ;;
|
|
193
|
+
list) list_agents ;;
|
|
194
|
+
status) require_tmux; tmux list-windows -t "$SESSION_NAME" ;;
|
|
195
|
+
close) require_tmux; tmux kill-session -t "$SESSION_NAME" ;;
|
|
196
|
+
*) echo "Usage: $0 start [agent]|attach [agent]|window <agent>|list|status|close"; exit 2 ;;
|
|
197
|
+
esac
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
When reporting a generated tmux launcher, include the bundle id, session name, scope (`team`, `connected`, or `all`), teams included, unique ZAgents included, shared/bridge ZAgents deduplicated, entry agent/window, whether `metadata.entryAgent` was written/found, and the manual `start [agent]`, `attach [agent]`, `window <agent>`, `list`, `status`, and `close` commands.
|
|
201
|
+
|
|
202
|
+
## Model catalog selection
|
|
203
|
+
|
|
204
|
+
When the natural-language ask includes model, provider, budget, cheap/expensive, “moins cher”, speed, quality, reasoning, long context, oracle, reviewer, security, or fallback preferences, treat model choice as part of the ZAgent design.
|
|
205
|
+
|
|
206
|
+
Required read order:
|
|
207
|
+
|
|
208
|
+
1. `.pi/model-catalog.json` if it exists; otherwise `.pi/model-catalog.example.json` as the bounded fallback catalog.
|
|
209
|
+
2. `.pi/model-routing.json` for valid model classes: `cheap_scout`, `balanced_worker`, `strong_reasoning`, `strong_oracle`, `high_context`.
|
|
210
|
+
|
|
211
|
+
Selection rules:
|
|
212
|
+
|
|
213
|
+
- Map each ZAgent role to a model class before selecting a concrete model. Typical mapping: scout/research -> `cheap_scout`; implementer/worker -> `balanced_worker`; planner/architect -> `strong_reasoning`; oracle/final reviewer/security -> `strong_oracle`; large-context synthesis -> `high_context`.
|
|
214
|
+
- Use catalog fields to justify the choice: `classDefaults`, `agentPreferences`, `models[*].classes`, `status`, `resolutionStatus`, `costTier`, `qualityTier`, `contextWindow`, `bestFor`, `avoidFor`, and `notes`.
|
|
215
|
+
- If the owner asks for cheaper models, prefer `free`/`low`/`medium` cost tiers only when the chosen model is not listed in `avoidFor` for that role and does not downgrade oracle/security work.
|
|
216
|
+
- Do not make a cheap, experimental, disabled, or unverified model the only `strong_oracle`/security default unless the owner explicitly approves that downgrade for this ZAgent.
|
|
217
|
+
- If a model is unverified or the catalog is missing and only the example fallback was available, include that caveat in the final report and in manifest metadata.
|
|
218
|
+
- Never invent model IDs, credentials, provider setup, or exact availability. Store user-provided vague names only as unverified candidates if the owner asked to preserve them.
|
|
219
|
+
- Keep `.pi/model-routing.json` advisory: do not enable `liveRoutingEnabled`, `modelRouterUsed`, `routingApplied`, `childDispatchAllowed`, global routing, or daemon behavior.
|
|
220
|
+
|
|
221
|
+
ZAgent manifest model shape:
|
|
222
|
+
|
|
223
|
+
```json
|
|
224
|
+
{
|
|
225
|
+
"model": "openrouter/moonshotai/kimi-k2.6:free",
|
|
226
|
+
"metadata": {
|
|
227
|
+
"modelSelection": {
|
|
228
|
+
"source": ".pi/model-catalog.json",
|
|
229
|
+
"class": "cheap_scout",
|
|
230
|
+
"reason": "Owner asked for a cheaper scout model; catalog marks it free/low-risk for repo_search and not for oracle/security.",
|
|
231
|
+
"resolutionStatus": "unverified",
|
|
232
|
+
"caveats": ["Do not use for final oracle/security review."]
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
`/zteam launch-plan <team-id>` prints `--model <manifest.model>` for safe model patterns. If no model is set, Pi uses its default model.
|
|
239
|
+
|
|
240
|
+
## Default ZOB mode selection
|
|
241
|
+
|
|
242
|
+
When creating each ZAgent, set `defaultMode` to the smallest ZOB posture that matches the role. This chooses the initial session mode only; it does not grant extra authority, bypass approval gates, or change allowed paths/tools.
|
|
243
|
+
|
|
244
|
+
Typical mapping:
|
|
245
|
+
|
|
246
|
+
- repository scout, context finder, read-only researcher -> `explore`
|
|
247
|
+
- planner, architect, spec writer, strategy/coordination planner -> `plan`
|
|
248
|
+
- implementer, patch author, bounded builder -> `implement`
|
|
249
|
+
- reviewer, verifier, no-ship checker, final safety/security judge -> `oracle`
|
|
250
|
+
- repeatable workflow/factory designer or runner -> `factory`
|
|
251
|
+
- chief/lead/coordinator managing TODOs, delegation, workgraphs, owner protocols -> `orchestrator`
|
|
252
|
+
- base Pi/direct unrestricted operator mode -> `vanilla` only when the owner explicitly asks for vanilla/base Pi behavior; never choose `vanilla` by default.
|
|
253
|
+
|
|
254
|
+
ZAgent manifest mode shape:
|
|
255
|
+
|
|
256
|
+
```json
|
|
257
|
+
{
|
|
258
|
+
"defaultMode": "explore",
|
|
259
|
+
"metadata": {
|
|
260
|
+
"modeSelection": {
|
|
261
|
+
"reason": "Read-only repository scout; no writes expected.",
|
|
262
|
+
"authorityNote": "defaultMode sets initial ZOB posture only and does not expand permissions."
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
`/zteam launch-plan <team-id>` prints `defaultMode=<mode>` in the command comment. When launched with `ZOB_ZAGENT_ID=<id> pi`, the runtime applies that mode during session startup.
|
|
40
269
|
|
|
41
270
|
## Safe workflow
|
|
42
271
|
|
|
@@ -47,15 +276,22 @@ Never write generated ZAgent or ZTeam artifacts outside those directories unless
|
|
|
47
276
|
5. Include clear human-owner control points for launch, escalation, writes, external access, and completion claims.
|
|
48
277
|
6. Validate the artifact structurally before claiming it is ready.
|
|
49
278
|
7. Provide manual launch guidance only: use `/zteam launch-plan <team-id>` to review the plan, then start sessions with `ZOB_ZAGENT_ID=<id> pi`; do not spawn sessions automatically.
|
|
50
|
-
8. If
|
|
279
|
+
8. If `tmux` is requested, generate only the launcher script and manual commands; do not execute `tmux`, `pi`, `attach`, `close`, or any process-spawning command.
|
|
280
|
+
9. If runtime, live coms, Mission Control, or ZPeer behavior is involved, load the relevant ZOB coms/runtime skills before editing.
|
|
281
|
+
10. If a ZAgent manifest includes `model`, verify it is a safe Pi `--model` pattern and cite the catalog source used for the choice.
|
|
282
|
+
11. If a ZAgent manifest includes `defaultMode`, verify it is one of `explore`, `plan`, `implement`, `oracle`, `factory`, `orchestrator`, or explicitly requested `vanilla`.
|
|
283
|
+
12. If a tmux launcher includes multiple teams, verify shared/bridge ZAgents are deduplicated by `zagentId` before writing the script.
|
|
51
284
|
|
|
52
285
|
## MUST DO
|
|
53
286
|
|
|
54
287
|
- Accept natural-language descriptions of the desired team/agents and convert them into bounded project-local artifacts.
|
|
55
|
-
- Use `.pi/zagents/*.json`, `.pi/zagents/prompts/*.md`, and `.pi/zteams/*.json` for outputs.
|
|
288
|
+
- Use `.pi/zagents/*.json`, `.pi/zagents/prompts/*.md`, and `.pi/zteams/*.json` for normal outputs; use `.pi/zteams/*.tmux.sh` only for explicitly requested tmux launchers.
|
|
56
289
|
- State that each ZAgent is a full Pi session tied to ZPeer/live coordination, not a delegated subagent.
|
|
57
|
-
- Define purpose, scope, allowed tools, allowed paths, forbidden paths, owner approval gates, verification requirements, and expected final report format.
|
|
290
|
+
- Define purpose, scope, allowed tools, allowed paths, forbidden paths, owner approval gates, verification requirements, default ZOB mode, and expected final report format.
|
|
291
|
+
- Set a justified per-ZAgent `defaultMode` from the role, using the smallest sufficient ZOB posture.
|
|
292
|
+
- When the ask mentions model choice or cost/quality tradeoffs, read the model catalog/routing files and record a justified per-ZAgent `model` plus metadata instead of guessing.
|
|
58
293
|
- Keep definitions minimal, auditable, and project-local.
|
|
294
|
+
- When generating tmux launchers, treat multi-team requests as bundles, deduplicate shared agents by `zagentId`, and document included teams, unique agents, and bridge/shared agents.
|
|
59
295
|
- Preserve existing runtime code and safety policy unless the owner explicitly asks for a separate implementation task.
|
|
60
296
|
- Ask for clarification when authority, launch conditions, write permissions, or external access are ambiguous.
|
|
61
297
|
|
|
@@ -64,8 +300,11 @@ Never write generated ZAgent or ZTeam artifacts outside those directories unless
|
|
|
64
300
|
- Do not edit runtime code while creating a ZAgent definition.
|
|
65
301
|
- Do not add a scaffold slash command or require one for natural-language ZAgent/ZTeam creation.
|
|
66
302
|
- Do not create, launch, or spawn actual ZAgent sessions unless explicitly requested as a separate task.
|
|
67
|
-
- Do not create manifests or
|
|
303
|
+
- Do not create manifests, prompts, or tmux launchers outside `.pi/zagents/`, `.pi/zagents/prompts/`, or `.pi/zteams/`.
|
|
68
304
|
- Do not grant broad filesystem, network, browser, secret, commit, push, or destructive-command authority by default.
|
|
305
|
+
- Do not generate tmux launchers that duplicate shared ZAgents per team, use `killall`, broad process kills, install daemons, access credentials, or perform global cleanup.
|
|
306
|
+
- Do not enable live/global model routing or store provider credentials/API keys while selecting ZAgent models.
|
|
307
|
+
- Do not choose `vanilla` as a default mode unless the owner explicitly requested vanilla/base Pi/direct unrestricted behavior.
|
|
69
308
|
- Do not treat ZAgent creation as delivery success for live communication or mission execution.
|
|
70
309
|
- Do not commit, push, tag, or modify git state unless the owner explicitly requests governed commit behavior.
|
|
71
310
|
|
|
@@ -73,13 +312,18 @@ Never write generated ZAgent or ZTeam artifacts outside those directories unless
|
|
|
73
312
|
|
|
74
313
|
Before reporting completion, verify:
|
|
75
314
|
|
|
76
|
-
- [ ] The owner’s natural-language ask was mapped to explicit ZAgent roles, team membership, scope, and verification expectations.
|
|
77
|
-
- [ ] File path is under `.pi/zagents/`, `.pi/zagents/prompts/`, or `.pi/zteams
|
|
315
|
+
- [ ] The owner’s natural-language ask was mapped to explicit ZAgent roles, team membership, scope, default ZOB modes, and verification expectations.
|
|
316
|
+
- [ ] File path is under `.pi/zagents/`, `.pi/zagents/prompts/`, or `.pi/zteams/`; tmux launchers, when requested, use `.pi/zteams/*.tmux.sh`.
|
|
78
317
|
- [ ] The artifact names the ZAgent or ZTeam and its bounded mission.
|
|
79
318
|
- [ ] It says ZAgents are full Pi sessions tied to ZPeer/live coordination, not delegate subagents.
|
|
80
319
|
- [ ] Allowed tools and allowed paths are explicit and minimal.
|
|
81
320
|
- [ ] Forbidden paths include secrets and generated/vendor/build areas where applicable.
|
|
82
321
|
- [ ] Human-owner approval gates are explicit for launch, writes, external access, commits, and escalation.
|
|
83
|
-
- [ ]
|
|
322
|
+
- [ ] If model preferences/cost/quality were mentioned, the chosen `model` values cite `.pi/model-catalog.json` or `.pi/model-catalog.example.json`, map to valid `.pi/model-routing.json` classes, and avoid oracle/security downgrade.
|
|
323
|
+
- [ ] Each `defaultMode` is valid, role-appropriate, and not `vanilla` unless explicitly requested.
|
|
324
|
+
- [ ] Manual launch instructions mention `/zteam launch-plan <team-id>` and `ZOB_ZAGENT_ID=<id> pi` / `ZOB_ZAGENT_ID=<id> pi --model <model>`, with no automatic process spawn.
|
|
325
|
+
- [ ] If tmux was requested, the primary ZTeam has `metadata.entryAgent` or the report states the fallback first agent.
|
|
326
|
+
- [ ] If tmux was requested, the report lists bundle id, session name, scope, teams included, unique agents, shared/bridge agents, entry agent/window, and manual `start [agent]`/`attach [agent]`/`window <agent>`/`list`/`status`/`close` commands.
|
|
327
|
+
- [ ] If tmux was requested, shared/bridge ZAgents are deduplicated by `zagentId`, and the script uses only bounded tmux operations for the bundle session.
|
|
84
328
|
- [ ] Verification commands or review steps are listed.
|
|
85
329
|
- [ ] No runtime code, live ledgers, sessions, or coms files were modified as part of definition creation.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "zob.zagent.v1",
|
|
3
|
+
"id": "bdd-writer",
|
|
4
|
+
"team": "agentic-spec-run",
|
|
5
|
+
"role": "acceptance-bdd",
|
|
6
|
+
"alias": "bdd_writer",
|
|
7
|
+
"description": "Writes acceptance criteria, BDD/Gherkin scenarios, examples, and edge-case criteria mapped to requirements.",
|
|
8
|
+
"promptRef": ".pi/zagents/prompts/agentic-spec-run-role.md",
|
|
9
|
+
"defaultMode": "implement",
|
|
10
|
+
"defaultRoom": "validation",
|
|
11
|
+
"activeRoom": "validation",
|
|
12
|
+
"rooms": [{ "id": "spec-control", "alias": "bdd_writer", "role": "member", "active": true }, { "id": "validation", "alias": "bdd_writer", "role": "acceptance", "active": true }],
|
|
13
|
+
"allowedTools": ["read", "bash", "write", "zpeer_ask"],
|
|
14
|
+
"allowedPaths": ["reports/agentic-spec-runs/"],
|
|
15
|
+
"forbiddenPaths": [".env", ".env.*", "node_modules/", "dist/", "build/", "coverage/", ".git/", ".pi/sessions/", ".pi/coms/"],
|
|
16
|
+
"communicationPolicy": { "zpeerContact": true, "allowedRooms": ["spec-control", "validation"], "parentVisible": true, "hiddenPeerChat": false },
|
|
17
|
+
"localOnly": true,
|
|
18
|
+
"networkEnabled": false,
|
|
19
|
+
"bodyStored": false
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "zob.zagent.v1",
|
|
3
|
+
"id": "data-profile-analyst",
|
|
4
|
+
"team": "agentic-spec-run",
|
|
5
|
+
"role": "data-analysis",
|
|
6
|
+
"alias": "data_profile",
|
|
7
|
+
"description": "Profiles structured data sources and writes data-profile/data-dictionary artifacts with cited caveats.",
|
|
8
|
+
"promptRef": ".pi/zagents/prompts/agentic-spec-run-role.md",
|
|
9
|
+
"defaultMode": "explore",
|
|
10
|
+
"defaultRoom": "data",
|
|
11
|
+
"activeRoom": "data",
|
|
12
|
+
"rooms": [{ "id": "spec-control", "alias": "data_profile", "role": "member", "active": true }, { "id": "data", "alias": "data_profile", "role": "analyst", "active": true }],
|
|
13
|
+
"allowedTools": ["read", "bash", "write", "zpeer_ask"],
|
|
14
|
+
"allowedPaths": ["reports/agentic-spec-runs/"],
|
|
15
|
+
"forbiddenPaths": [".env", ".env.*", "node_modules/", "dist/", "build/", "coverage/", ".git/", ".pi/sessions/", ".pi/coms/"],
|
|
16
|
+
"communicationPolicy": { "zpeerContact": true, "allowedRooms": ["spec-control", "data"], "parentVisible": true, "hiddenPeerChat": false },
|
|
17
|
+
"localOnly": true,
|
|
18
|
+
"networkEnabled": false,
|
|
19
|
+
"bodyStored": false
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "zob.zagent.v1",
|
|
3
|
+
"id": "domain-modeler",
|
|
4
|
+
"team": "agentic-spec-run",
|
|
5
|
+
"role": "domain-modeling",
|
|
6
|
+
"alias": "domain_modeler",
|
|
7
|
+
"description": "Builds domain model, glossary, entities, states, business rules, assumptions, and contradictions from cited evidence.",
|
|
8
|
+
"promptRef": ".pi/zagents/prompts/agentic-spec-run-role.md",
|
|
9
|
+
"defaultMode": "explore",
|
|
10
|
+
"defaultRoom": "domain",
|
|
11
|
+
"activeRoom": "domain",
|
|
12
|
+
"rooms": [{ "id": "spec-control", "alias": "domain_modeler", "role": "member", "active": true }, { "id": "domain", "alias": "domain_modeler", "role": "modeler", "active": true }],
|
|
13
|
+
"allowedTools": ["read", "bash", "write", "zpeer_ask"],
|
|
14
|
+
"allowedPaths": ["reports/agentic-spec-runs/"],
|
|
15
|
+
"forbiddenPaths": [".env", ".env.*", "node_modules/", "dist/", "build/", "coverage/", ".git/", ".pi/sessions/", ".pi/coms/"],
|
|
16
|
+
"communicationPolicy": { "zpeerContact": true, "allowedRooms": ["spec-control", "domain"], "parentVisible": true, "hiddenPeerChat": false },
|
|
17
|
+
"localOnly": true,
|
|
18
|
+
"networkEnabled": false,
|
|
19
|
+
"bodyStored": false
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "zob.zagent.v1",
|
|
3
|
+
"id": "planner-handoff-writer",
|
|
4
|
+
"team": "agentic-spec-run",
|
|
5
|
+
"role": "implementation-handoff",
|
|
6
|
+
"alias": "handoff_writer",
|
|
7
|
+
"description": "Turns accepted requirements and criteria into implementation workgraph, tasks, validation plan, and agent handoff prompts.",
|
|
8
|
+
"promptRef": ".pi/zagents/prompts/agentic-spec-run-role.md",
|
|
9
|
+
"defaultMode": "plan",
|
|
10
|
+
"defaultRoom": "handoff",
|
|
11
|
+
"activeRoom": "handoff",
|
|
12
|
+
"rooms": [{ "id": "spec-control", "alias": "handoff_writer", "role": "member", "active": true }, { "id": "handoff", "alias": "handoff_writer", "role": "planner", "active": true }],
|
|
13
|
+
"allowedTools": ["read", "bash", "write", "zpeer_ask"],
|
|
14
|
+
"allowedPaths": ["reports/agentic-spec-runs/"],
|
|
15
|
+
"forbiddenPaths": [".env", ".env.*", "node_modules/", "dist/", "build/", "coverage/", ".git/", ".pi/sessions/", ".pi/coms/"],
|
|
16
|
+
"communicationPolicy": { "zpeerContact": true, "allowedRooms": ["spec-control", "handoff"], "parentVisible": true, "hiddenPeerChat": false },
|
|
17
|
+
"localOnly": true,
|
|
18
|
+
"networkEnabled": false,
|
|
19
|
+
"bodyStored": false
|
|
20
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Agentic Spec Team Run Role
|
|
2
|
+
|
|
3
|
+
You are running inside a run-scoped Agentic Spec Team ZAgent session.
|
|
4
|
+
|
|
5
|
+
Environment:
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
AGENTIC_SPEC_RUN_ID=<run_id>
|
|
9
|
+
ZOB_ZAGENT_ID=<your-role-id>
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Run directory:
|
|
13
|
+
|
|
14
|
+
```text
|
|
15
|
+
reports/agentic-spec-runs/<run_id>/
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Universal rules
|
|
19
|
+
|
|
20
|
+
- Use Goal Room/ZPeer only for parent-visible coordination; durable bodies remain artifact refs/hash-only.
|
|
21
|
+
- Do not read secrets or `.env` files.
|
|
22
|
+
- Do not mutate source paths; write only approved run artifacts under `reports/agentic-spec-runs/<run_id>/` unless the owner explicitly expands scope.
|
|
23
|
+
- Treat source docs/data/mockups as evidence, assumptions, questions, or decisions — not automatic truth.
|
|
24
|
+
- Maintain traceability: source/answer/assumption -> requirement -> acceptance criteria -> task -> oracle check.
|
|
25
|
+
- Blocking human questions go through `spec-chief` only.
|
|
26
|
+
- Completion requires `spec-oracle` PASS and `no_ship=false`.
|
|
27
|
+
|
|
28
|
+
## Role focus
|
|
29
|
+
|
|
30
|
+
Read your manifest description and role. If you are not `spec-chief`, send blockers and human questions to `spec-chief` rather than asking the owner directly.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "zob.zagent.v1",
|
|
3
|
+
"id": "source-intake-steward",
|
|
4
|
+
"team": "agentic-spec-run",
|
|
5
|
+
"role": "source-intake",
|
|
6
|
+
"alias": "source_intake",
|
|
7
|
+
"description": "Inventories run sources, sensitivity, freshness, owners, contradictions, and source quality for Agentic Spec Team runs.",
|
|
8
|
+
"promptRef": ".pi/zagents/prompts/agentic-spec-run-role.md",
|
|
9
|
+
"defaultMode": "explore",
|
|
10
|
+
"defaultRoom": "intake",
|
|
11
|
+
"activeRoom": "intake",
|
|
12
|
+
"rooms": [{ "id": "spec-control", "alias": "source_intake", "role": "member", "active": true }, { "id": "intake", "alias": "source_intake", "role": "steward", "active": true }],
|
|
13
|
+
"allowedTools": ["read", "bash", "write", "zpeer_ask"],
|
|
14
|
+
"allowedPaths": ["reports/agentic-spec-runs/"],
|
|
15
|
+
"forbiddenPaths": [".env", ".env.*", "node_modules/", "dist/", "build/", "coverage/", ".git/", ".pi/sessions/", ".pi/coms/"],
|
|
16
|
+
"communicationPolicy": { "zpeerContact": true, "allowedRooms": ["spec-control", "intake"], "parentVisible": true, "hiddenPeerChat": false },
|
|
17
|
+
"localOnly": true,
|
|
18
|
+
"networkEnabled": false,
|
|
19
|
+
"bodyStored": false
|
|
20
|
+
}
|