agentic-engineering-harness 0.4.16 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/README.md +159 -189
  2. package/dist/agents/config.js +2 -0
  3. package/dist/agents/config.js.map +1 -1
  4. package/dist/agents/outputContracts.d.ts +1 -0
  5. package/dist/agents/outputContracts.js +12 -0
  6. package/dist/agents/outputContracts.js.map +1 -1
  7. package/dist/agents/parallelism.d.ts +1 -0
  8. package/dist/agents/parallelism.js +101 -14
  9. package/dist/agents/parallelism.js.map +1 -1
  10. package/dist/agents/structuredOutput.js +16 -4
  11. package/dist/agents/structuredOutput.js.map +1 -1
  12. package/dist/agents/waveExecutor.d.ts +41 -0
  13. package/dist/agents/waveExecutor.js +208 -0
  14. package/dist/agents/waveExecutor.js.map +1 -0
  15. package/dist/audit/intent.d.ts +20 -0
  16. package/dist/audit/intent.js +42 -0
  17. package/dist/audit/intent.js.map +1 -0
  18. package/dist/audit/run.d.ts +46 -0
  19. package/dist/audit/run.js +147 -0
  20. package/dist/audit/run.js.map +1 -0
  21. package/dist/cli.js +1 -1
  22. package/dist/cli.js.map +1 -1
  23. package/dist/core/config.js +28 -7
  24. package/dist/core/config.js.map +1 -1
  25. package/dist/core/controlPlane.d.ts +30 -0
  26. package/dist/core/controlPlane.js +131 -0
  27. package/dist/core/controlPlane.js.map +1 -0
  28. package/dist/core/init.js +13 -5
  29. package/dist/core/init.js.map +1 -1
  30. package/dist/core/run.d.ts +21 -0
  31. package/dist/core/run.js +104 -41
  32. package/dist/core/run.js.map +1 -1
  33. package/dist/core/types.d.ts +103 -1
  34. package/dist/distributed/queue.d.ts +11 -0
  35. package/dist/distributed/queue.js +140 -0
  36. package/dist/distributed/queue.js.map +1 -0
  37. package/dist/distributed/types.d.ts +34 -0
  38. package/dist/distributed/types.js +2 -0
  39. package/dist/distributed/types.js.map +1 -0
  40. package/dist/distributed/worker.d.ts +21 -0
  41. package/dist/distributed/worker.js +111 -0
  42. package/dist/distributed/worker.js.map +1 -0
  43. package/dist/entry.js +219 -46
  44. package/dist/entry.js.map +1 -1
  45. package/dist/evals/runner.js +2 -2
  46. package/dist/evals/runner.js.map +1 -1
  47. package/dist/evals/statistics.d.ts +38 -0
  48. package/dist/evals/statistics.js +88 -0
  49. package/dist/evals/statistics.js.map +1 -0
  50. package/dist/evidence/graph.d.ts +48 -0
  51. package/dist/evidence/graph.js +94 -0
  52. package/dist/evidence/graph.js.map +1 -0
  53. package/dist/issues/intake.d.ts +1 -1
  54. package/dist/mcp/benchmark.d.ts +24 -0
  55. package/dist/mcp/benchmark.js +82 -0
  56. package/dist/mcp/benchmark.js.map +1 -0
  57. package/dist/paseo/capabilities.d.ts +24 -0
  58. package/dist/paseo/capabilities.js +104 -0
  59. package/dist/paseo/capabilities.js.map +1 -0
  60. package/dist/paseo/context.d.ts +45 -0
  61. package/dist/paseo/context.js +153 -0
  62. package/dist/paseo/context.js.map +1 -0
  63. package/dist/paseo/start.d.ts +55 -0
  64. package/dist/paseo/start.js +138 -0
  65. package/dist/paseo/start.js.map +1 -0
  66. package/dist/policy/bundles.d.ts +27 -0
  67. package/dist/policy/bundles.js +129 -0
  68. package/dist/policy/bundles.js.map +1 -0
  69. package/dist/security/sandbox.d.ts +12 -0
  70. package/dist/security/sandbox.js +64 -0
  71. package/dist/security/sandbox.js.map +1 -0
  72. package/dist/spec/openspec.d.ts +28 -0
  73. package/dist/spec/openspec.js +179 -0
  74. package/dist/spec/openspec.js.map +1 -0
  75. package/dist/toolchain/resolve.js +54 -90
  76. package/dist/toolchain/resolve.js.map +1 -1
  77. package/dist/utils/process.d.ts +1 -0
  78. package/dist/utils/process.js +6 -1
  79. package/dist/utils/process.js.map +1 -1
  80. package/dist/validators/graphify.js +28 -6
  81. package/dist/validators/graphify.js.map +1 -1
  82. package/dist/workers/agentPrompt.d.ts +6 -1
  83. package/dist/workers/agentPrompt.js +118 -34
  84. package/dist/workers/agentPrompt.js.map +1 -1
  85. package/dist/workers/paseo.js +53 -19
  86. package/dist/workers/paseo.js.map +1 -1
  87. package/dist/workers/podman.js +30 -8
  88. package/dist/workers/podman.js.map +1 -1
  89. package/docs/PASEO.md +56 -4
  90. package/docs/V0.5.1.md +129 -0
  91. package/docs/V0.5.2.md +180 -0
  92. package/docs/V0.5.md +116 -0
  93. package/docs/V0.6.md +148 -0
  94. package/package.json +3 -3
  95. package/presets/agents/orchestration.jsonc +37 -0
  96. package/schemas/project.schema.json +38 -8
  97. package/skills/engineering-workflow/SKILL.md +113 -81
  98. package/skills/openspec-authoring/SKILL.md +26 -0
  99. package/skills/paseo-orchestration/SKILL.md +38 -0
  100. package/templates/AGENTS.md +40 -15
  101. package/templates/agents.source.jsonc +1 -1
  102. package/templates/openspec-config.yaml +24 -0
  103. package/templates/project.yaml +79 -1
  104. package/templates/toolchain.yaml +19 -2
package/docs/V0.5.1.md ADDED
@@ -0,0 +1,129 @@
1
+ # v0.5.1 — Zero-friction Paseo entrypoint
2
+
3
+ v0.5.1 makes `aeh start` the interactive product entrypoint for a Harness-enabled repository. After startup, the user can work from Paseo by writing normal engineering requests; repository-changing prompts are automatically routed through the Harness instead of requiring the user to invoke triage, QUICK, SPEC, SDD, TaskContracts, workers, validators or reviewers manually.
4
+
5
+ ## Start
6
+
7
+ With AEH installed in the project:
8
+
9
+ ```bash
10
+ aeh start
11
+ ```
12
+
13
+ Equivalent package-manager invocations include:
14
+
15
+ ```bash
16
+ npx aeh start
17
+ npm exec aeh -- start
18
+ ```
19
+
20
+ `npm aeh start` is not the canonical npm bin syntax. Use `npm exec aeh -- start` when invoking the locally installed package through npm.
21
+
22
+ By default `aeh start`:
23
+
24
+ 1. loads `.harness/project.yaml` and the resolved agent topology;
25
+ 2. selects the configured interactive lead, normally `lead`/Codex;
26
+ 3. verifies that Paseo and the lead runtime are available;
27
+ 4. reconciles managed toolchain dependencies automatically when they are missing;
28
+ 5. starts `paseo daemon start --web-ui` only when the daemon is not already running;
29
+ 6. creates a persistent Paseo session for the project or reuses the compatible prior session;
30
+ 7. bootstraps that lead with the `engineering-workflow` invariant;
31
+ 8. waits until initialization reaches `AEH READY` before reporting the session ready.
32
+
33
+ State is machine-local and gitignored under:
34
+
35
+ ```text
36
+ .harness/paseo/lead-session.json
37
+ .harness/paseo/lead-bootstrap.md
38
+ ```
39
+
40
+ The command deliberately does not rewrite the user's global `~/.paseo/config.json`.
41
+
42
+ ## Prompt semantics
43
+
44
+ Once the generated lead is open in Paseo, a normal prompt such as:
45
+
46
+ ```text
47
+ Add rate limiting to the public authentication endpoints and cover it with tests.
48
+ ```
49
+
50
+ is interpreted as:
51
+
52
+ ```text
53
+ natural-language prompt
54
+ ↓
55
+ repository inspection
56
+ ↓
57
+ automatic triage evidence
58
+ ↓
59
+ QUICK or SPEC
60
+ ↓
61
+ QuickContract or SDD/TaskContract
62
+ ↓
63
+ seal
64
+ ↓
65
+ Harness execution
66
+ ↓
67
+ planner DAG / worker waves
68
+ ↓
69
+ deterministic validators + evidence
70
+ ↓
71
+ review quality convergence
72
+ ↓
73
+ lead semantic acceptance
74
+ ↓
75
+ configured deterministic delivery
76
+ ```
77
+
78
+ The parent Paseo lead must not implement a repository-changing prompt directly as a shortcut around this pipeline.
79
+
80
+ Read-only questions may be answered directly when they do not mutate repository state. Existing GitHub issue requests enter the issue-driven path automatically. If a task initially appears QUICK but implementation reveals architecture, security, schema, public API, cross-module or otherwise unsafe scope, the lead escalates it to SPEC rather than widening the QuickContract.
81
+
82
+ ## Session reuse
83
+
84
+ `aeh start` reuses `.harness/paseo/lead-session.json` when the previous session still exists and its bootstrap version, project root, selected lead, provider, model and title remain compatible.
85
+
86
+ Create a clean lead explicitly with:
87
+
88
+ ```bash
89
+ aeh start --new
90
+ ```
91
+
92
+ Other startup controls:
93
+
94
+ ```bash
95
+ aeh start --no-web-ui
96
+ aeh start --no-setup
97
+ aeh start --lead lead
98
+ aeh start --title "AEH Lead"
99
+ aeh start /path/to/repository
100
+ ```
101
+
102
+ `--no-setup` disables automatic toolchain reconciliation. If Paseo or the selected lead runtime is unavailable in that mode, startup fails instead of silently falling back to a different agent/runtime.
103
+
104
+ ## Configuration
105
+
106
+ New projects receive:
107
+
108
+ ```yaml
109
+ orchestration:
110
+ provider: paseo
111
+ interactive:
112
+ autoSetup: true
113
+ webUi: true
114
+ leadAgent: lead
115
+ reuseSession: true
116
+ stateDir: .harness/paseo
117
+ title: AEH Lead
118
+ ```
119
+
120
+ The lead is resolved from the active topology; the start implementation does not hard-code Codex. Projects can therefore replace the logical lead while preserving the same Harness entry semantics.
121
+
122
+ ## Defense in depth
123
+
124
+ The automatic path is enforced at two conversational layers:
125
+
126
+ - the persistent `aeh start` bootstrap makes the rule part of the Paseo lead conversation;
127
+ - generated `AGENTS.md` independently states that repository-changing conversational prompts must enter `engineering-workflow`.
128
+
129
+ The deterministic Harness remains the acceptance authority. Paseo and the lead decide how to interpret and route the prompt, but do not replace sealing, scope enforcement, validators, evidence, review convergence or final acceptance gates.
package/docs/V0.5.2.md ADDED
@@ -0,0 +1,180 @@
1
+ # v0.5.2 — Harness-governed engineering audits
2
+
3
+ v0.5.2 closes the read-only escape that existed in v0.5.1. A request no longer bypasses AEH merely because it does not mutate files. The interactive entrypoint now distinguishes a purely informational question from a read-only engineering operation.
4
+
5
+ ## Intent model
6
+
7
+ Every conversational request is classified at the top level as:
8
+
9
+ ```text
10
+ prompt
11
+ |
12
+ v
13
+ engineering intent
14
+ |-- INFORMATIONAL -> direct answer, no mutation
15
+ |-- AUDIT -> Harness read-only audit pipeline
16
+ `-- CHANGE -> deterministic QUICK | SPEC triage
17
+ ```
18
+
19
+ `AUDIT` is deliberately not a subtype of QUICK. A repository-wide review is valid audit scope even though it would be invalid QUICK scope, and it does not need artificial SDD artifacts merely to run a code review.
20
+
21
+ Examples:
22
+
23
+ ```text
24
+ "What does src/core/run.ts do?"
25
+ -> INFORMATIONAL
26
+
27
+ "review the repo and validate the code for improvements"
28
+ -> AUDIT
29
+
30
+ "find bugs and security risks"
31
+ -> AUDIT
32
+
33
+ "review this module and fix every bug you find"
34
+ -> CHANGE -> QUICK | SPEC
35
+ ```
36
+
37
+ The public classifier is:
38
+
39
+ ```bash
40
+ aeh intent "review the repo and validate the code for improvements"
41
+ ```
42
+
43
+ ## Audit workflow
44
+
45
+ Run an audit explicitly with:
46
+
47
+ ```bash
48
+ aeh audit "review the repo and validate the code for improvements"
49
+ ```
50
+
51
+ Optional hints include repeated `--file`, `--domain`, `--reviewer` and `--risk low|medium|high` values.
52
+
53
+ The pipeline is:
54
+
55
+ ```text
56
+ AUDIT request
57
+ |
58
+ v
59
+ worktree checkpoint
60
+ |
61
+ v
62
+ transient TaskContract + SHA-256 seal
63
+ |
64
+ v
65
+ hard-frozen control plane
66
+ |
67
+ v
68
+ configured deterministic validators
69
+ |
70
+ v
71
+ failure classification
72
+ |
73
+ v
74
+ read-only reviewer wave
75
+ |
76
+ v
77
+ finding normalization + deduplication
78
+ |
79
+ v
80
+ severity counts + DebtScore + Quality Gate evaluation
81
+ |
82
+ v
83
+ AuditReport
84
+ ```
85
+
86
+ Reviewer sessions are clamped to `write=deny`, `gitWrite=deny` and `delegate=deny`. The worktree is also checkpointed before the audit and rolled back afterward, so an accidental tracked mutation by a reviewer or tool does not survive. Any dirty paths that existed before the audit are restored to their exact prior contents.
87
+
88
+ The transient contract and seal make the audit compatible with the same direct, Paseo and supported Podman execution boundaries used elsewhere in AEH.
89
+
90
+ ## Deterministic failures are evidence
91
+
92
+ The lead must not silently reinterpret a failing validator as harmless environment noise. Audit reports classify failed checks when possible as:
93
+
94
+ ```text
95
+ ASSERTION_FAILURE
96
+ ENVIRONMENT_FAILURE
97
+ SANDBOX_DENIAL
98
+ MISSING_DEPENDENCY
99
+ TOOL_FAILURE
100
+ ```
101
+
102
+ For example:
103
+
104
+ ```text
105
+ spawnSync git EPERM: operation not permitted
106
+ -> SANDBOX_DENIAL
107
+ ```
108
+
109
+ That classification does not pretend the affected test passed. The audit remains `DEGRADED` and `productionSafe=false` when a deterministic failure prevents establishing correctness.
110
+
111
+ ## AuditReport
112
+
113
+ Reports are machine-readable local artifacts:
114
+
115
+ ```text
116
+ .harness/audits/<auditId>.json
117
+ .harness/audits/latest.json
118
+ ```
119
+
120
+ An AuditReport contains:
121
+
122
+ - frozen controller SHA;
123
+ - audited commit/base ref and pre-existing dirty paths;
124
+ - deterministic checks plus failure classes;
125
+ - reviewer sessions;
126
+ - normalized/deduplicated findings;
127
+ - severity counts;
128
+ - integer DebtPoints and displayed DebtScore;
129
+ - Final Quality Gate evaluation;
130
+ - conservative `productionSafe` status;
131
+ - any paths restored by the read-only rollback boundary.
132
+
133
+ Audit artifacts are generated state and are gitignored by `aeh init`.
134
+
135
+ ## Audit to remediation
136
+
137
+ AUDIT itself does not edit files or auto-remediate. If the user later says:
138
+
139
+ ```text
140
+ fix these
141
+ fix all findings
142
+ implement the audit recommendations
143
+ ```
144
+
145
+ the persistent lead reads `.harness/audits/latest.json` and the referenced report, reuses the normalized findings as evidence for a new `CHANGE`, and performs normal deterministic change triage.
146
+
147
+ ```text
148
+ AuditReport
149
+ |
150
+ v
151
+ new CHANGE request
152
+ |
153
+ v
154
+ QUICK | SPEC
155
+ |
156
+ v
157
+ sealed implementation workflow
158
+ ```
159
+
160
+ The audit result does not override safety policy. Security, architecture, schema, public API, cross-module or otherwise unsafe findings still force SPEC when normal change triage requires it.
161
+
162
+ ## Paseo behavior
163
+
164
+ `aeh start` now writes bootstrap version 2. Existing v0.5.1 lead sessions are intentionally incompatible and are recreated/replaced on the next start so the old broad read-only bypass cannot persist.
165
+
166
+ The standing interactive invariant is now:
167
+
168
+ > Every engineering operation must enter through the Harness, whether read-only or mutating. Only purely informational questions may bypass AEH.
169
+
170
+ Consequently this prompt:
171
+
172
+ ```text
173
+ review the repo and validate the code for improvements
174
+ ```
175
+
176
+ must route to `aeh audit`; the lead must not answer that it skipped AEH because the work is read-only.
177
+
178
+ ## Control-plane freeze
179
+
180
+ Self-hosted AEH snapshots now explicitly include `src/audit` and `src/paseo` in the controller trust boundary. Audit policy and the interactive routing code therefore cannot modify themselves and take effect inside the same active audit/run; changes govern only a later invocation after validation.
package/docs/V0.5.md ADDED
@@ -0,0 +1,116 @@
1
+ # v0.5 — Architecture Close, Scale and Organization Governance
2
+
3
+ v0.5 closes the original single-host architecture and adds the first scale/governance layer. The deterministic Harness remains the only acceptance authority: planner/reviewer/remote-worker output is evidence or proposed change, never an acceptance decision.
4
+
5
+ ## v0.4.17 — Control-Plane Snapshot & Hard Freeze
6
+
7
+ Every run materializes `.harness/controller/<task>/files` plus a manifest containing per-file SHA-256, a composite SHA-256, AEH version and controller Git SHA when available. The snapshot includes project config, agent topology, generated topology, toolchain source/lock, policy directories, schemas and skills. When AEH modifies itself, controller source modules are frozen as well.
8
+
9
+ Agent skill text is loaded from the snapshot. OPA reads policies through the frozen policy root. If live controller files change during the run, the run records controller drift but continues to use the old snapshot. The changed controller becomes eligible only on the next run.
10
+
11
+ ## v0.4.18 — Executable Multi-Worker Planner Waves
12
+
13
+ SPEC tasks with planning enabled are decomposed by the configured planner into a typed task DAG. The plan is rejected unless task IDs/dependencies/agents/scopes are valid and every TaskContract requirement is assigned to at least one implementation task.
14
+
15
+ Each local delegation executes in its own detached Git worktree. Accepted earlier-wave patches are materialized first, the frozen task/controller context is copied, and a baseline commit is created. The worker returns a binary patch. Within each wave the coordinator checks every patch before applying any patch, then applies all accepted patches and runs a deterministic barrier. Only a PASS barrier unlocks the next wave.
16
+
17
+ Graphify is conservative scheduling evidence: scope overlap, shared structural nodes, communities, graph distance and high-centrality nodes can serialize tasks. Graphify cannot override the explicit dependency DAG or redefine desired architecture.
18
+
19
+ ## v0.4.19 — Requirement Evidence Graph
20
+
21
+ `.harness/evidence/<task>.json` records nodes for requirements, planner tasks, changed files, deterministic checks, review findings, agent sessions, commit and pull request. Requirement coverage requires both:
22
+
23
+ 1. a task assigned to the requirement that produced a concrete changed file; and
24
+ 2. PASS results for all validators declared by the requirement.
25
+
26
+ When `evidence.requireComplete=true`, incomplete coverage is a deterministic failure and enters the normal autonomous remediation/escalation lifecycle.
27
+
28
+ ## v0.4.20 — Worker Sandbox Hardening
29
+
30
+ Podman remains optional globally but can be required by policy or task risk. Supported OpenCode sandbox runs default to a read-only container root, rootless user namespace, `cap-drop=ALL`, no-new-privileges, PID limits, ephemeral HOME and tmpfs. Network is denied when project policy or the logical agent denies network. CPU/RAM/tmpfs and immutable image digests are configurable. Only explicitly allowlisted environment/credential variables cross the boundary; SSH agents, host sockets and credentials are not projected implicitly.
31
+
32
+ Both the logical-agent prompt path and the legacy Podman worker executor use the hardened policy.
33
+
34
+ ## Scale and organization governance
35
+
36
+ ### Distributed workers
37
+
38
+ The distributed protocol has filesystem and HTTP queue transports. Jobs are leased with expiry/reclaim semantics. A remote worker clones the frozen base ref, materializes accepted prior-wave patches, executes one delegated task and returns a binary patch plus session metadata. The coordinator rechecks scope and patch applicability and runs all deterministic barriers.
39
+
40
+ Remote workers are deliberately **untrusted patch producers**. They do not become validation or normative authorities. Git credentials remain on worker nodes and are not serialized into jobs.
41
+
42
+ Commands:
43
+
44
+ ```bash
45
+ aeh worker serve . --port 8787 --host 0.0.0.0
46
+ aeh worker run . --worker-id node-01
47
+ ```
48
+
49
+ For remote HTTP workers set `distributed.provider: http`, `distributed.endpoint` and optionally `distributed.tokenEnv` on worker/coordinator configs as appropriate.
50
+
51
+ ### Organization policy bundles
52
+
53
+ Organization bundles contain `bundle.json`, file hashes, optional inheritance and policy directories. Sources may be local or remote and can pin the manifest SHA-256. Optional Cosign blob verification can require a configured public key and signature. Resolved bundles are cached under `.harness/policy-bundles` and frozen into the active controller snapshot before execution.
54
+
55
+ ```bash
56
+ aeh policy sync
57
+ ```
58
+
59
+ ### Statistical eval dashboards
60
+
61
+ Repeated evals compute pass-rate Wilson intervals plus mean/median/standard deviation/confidence intervals for score, duration, tokens, cost, repairs and human interventions.
62
+
63
+ ```bash
64
+ aeh eval repeat EVAL-001 --variant balanced --runs 10
65
+ aeh eval dashboard EVAL-001
66
+ ```
67
+
68
+ ### Native structured runtime adapters and resume
69
+
70
+ The agent contract layer exposes JSON Schemas in addition to Zod schemas. Runtimes that support native output schemas receive them; Zod remains the final parser/validator. Codex and OpenCode direct sessions expose resume/session primitives, while Paseo sessions resume through `send/wait/logs`. Ephemeral Podman sessions intentionally do not pretend they can resume host sessions without an explicit persisted session volume.
71
+
72
+ ### MCP benchmark and packs
73
+
74
+ The MCP benchmark records a baseline serialized-config token estimate, local/remote reachability latency, permission-surface heuristic and stale-data risk. This is intentionally not yet a claim about exact runtime tool-schema tokens; runtime-native introspection is the next benchmark refinement.
75
+
76
+ ```bash
77
+ aeh mcp benchmark
78
+ ```
79
+
80
+ Default named packs remain least-privilege: research, browser and GitHub read-only are enabled as catalog groupings; observability stays opt-in.
81
+
82
+ ## Default execution flow
83
+
84
+ ```text
85
+ Intent / GitHub Issue
86
+ ↓
87
+ Toolchain doctor/setup
88
+ ↓
89
+ QUICK or SPEC
90
+ ↓
91
+ Seal normative task inputs
92
+ ↓
93
+ Resolve org policies + topology
94
+ ↓
95
+ Freeze control plane
96
+ ↓
97
+ Planner DAG
98
+ ↓
99
+ Isolated local/remote worker waves
100
+ ↓
101
+ Deterministic barriers
102
+ ↓
103
+ Requirement evidence gate
104
+ ↓
105
+ Reviewer quality convergence
106
+ ↓
107
+ Regression rollback / model escalation / replan as needed
108
+ ↓
109
+ Final quality gate + lead acceptance
110
+ ↓
111
+ Deterministic delivery
112
+ ↓
113
+ Final evidence graph + controller drift record
114
+ ```
115
+
116
+ The user remains human-on-exception: product decisions, contradictory normative requirements and genuinely unavailable external resources are escalation states; implementation defects, review debt, worker failures and strategy churn remain autonomous recovery concerns.
package/docs/V0.6.md ADDED
@@ -0,0 +1,148 @@
1
+ # v0.6 — Orchestration & Context Architecture
2
+
3
+ v0.6 changes the interactive model from a persistent lead that personally performs setup, discovery and specification authoring into a thin semantic orchestrator backed by bounded agents and durable Harness state.
4
+
5
+ ## Thin lead
6
+
7
+ The interactive lead owns user intent, high-level routing, true ambiguity and final semantic acceptance. It delegates operational work:
8
+
9
+ ```text
10
+ User
11
+ |
12
+ v
13
+ AEH Lead
14
+ |-- explorer repository discovery
15
+ |-- environment-manager doctor/setup/Paseo recovery
16
+ |-- planner decomposition + triage evidence
17
+ |-- spec-manager OpenSpec authoring
18
+ `-- AEH implementation/validation/review/delivery
19
+ ```
20
+
21
+ The lead should receive compact structured outcomes instead of retaining raw shell logs, full source files or long environment-repair transcripts.
22
+
23
+ ## Paseo-native orchestration first
24
+
25
+ When the current Paseo agent exposes its orchestration tools, the lead prefers `create_agent`, `send_agent_prompt`, `get_agent_status`, `get_agent_activity` and lifecycle controls, and uses `/paseo-handoff` for responsibility transfer. `/paseo-committee` and `/paseo-advisor` may provide advisory reasoning but never override deterministic AEH gates.
26
+
27
+ AEH still contains a CLI-based Paseo adapter because an external Node control-plane process cannot invoke tools local to the conversational agent. That adapter is now a compatibility fallback rather than the lead's normal orchestration mechanism.
28
+
29
+ The fallback negotiates the installed Paseo surface at runtime with `paseo --version` and help output. It does not assume `--quiet`, JSON output or daemon JSON support. This specifically avoids the failure mode where an older Paseo such as 0.3.1 rejects a flag expected by a newer CLI.
30
+
31
+ Recoverable daemon states such as stale PID, unreachable daemon or connection refused are stopped/restarted and verified before lead/worker launch.
32
+
33
+ ## Fresh lead sessions
34
+
35
+ `aeh start` now creates a fresh lead by default:
36
+
37
+ ```bash
38
+ aeh start
39
+ ```
40
+
41
+ Explicit reuse is:
42
+
43
+ ```bash
44
+ aeh start --resume
45
+ ```
46
+
47
+ This prevents a new invocation from inheriting stale conversational assumptions, obsolete bootstrap instructions or unnecessary historical context. Durable Git/TaskContract/seal/run/audit/delivery state remains reusable even when the conversation is fresh.
48
+
49
+ ## Context pressure and automatic lead rotation
50
+
51
+ Default policy:
52
+
53
+ ```text
54
+ <70% normal
55
+ 70-80% PRESSURE: stop exploratory work and increase delegation
56
+ >=80% HANDOFF_REQUIRED: write handoff and rotate to a fresh lead
57
+ >=90% HARD_HANDOFF: no further engineering work in the old lead
58
+ ```
59
+
60
+ The public check is:
61
+
62
+ ```bash
63
+ aeh context guard --agent "$PASEO_AGENT_ID"
64
+ ```
65
+
66
+ When Paseo exposes a usable context ratio and the guard runs inside a managed Paseo lead, AEH writes:
67
+
68
+ ```text
69
+ .harness/paseo/handoffs/lead-<timestamp>.json
70
+ ```
71
+
72
+ and automatically creates a fresh lead. The artifact records prior/new lead IDs, context usage, branch, latest run/audit/delivery references, and an optional semantic brief. The fresh lead is bootstrapped from this deterministic artifact and its referenced sealed state. Normal compaction-and-continue is not the preferred path once the handoff threshold is crossed.
73
+
74
+ If the installed Paseo version does not expose a stable context ratio, AEH returns `UNKNOWN`; it does not fabricate token usage. Fresh-on-start and delegation-first behavior still reduce accumulation.
75
+
76
+ ## OpenSpec as SPEC authoring backend
77
+
78
+ For non-QUICK changes, the lead no longer writes proposal/spec/design/tasks itself. `spec-manager` owns SPEC authoring with OpenSpec.
79
+
80
+ ```text
81
+ CHANGE
82
+ |
83
+ v
84
+ SPEC
85
+ |
86
+ v
87
+ spec-manager
88
+ |
89
+ |-- aeh spec prepare
90
+ |-- openspec status / instructions
91
+ |-- proposal/specs/design/tasks
92
+ |-- openspec validate --strict
93
+ `-- aeh spec compile
94
+ |
95
+ v
96
+ AEH proposal/spec/design/tasks/Gherkin
97
+ + TaskContract
98
+ + stable requirement IDs
99
+ + validator traceability
100
+ |
101
+ v
102
+ seal
103
+ ```
104
+
105
+ Commands:
106
+
107
+ ```bash
108
+ aeh spec prepare READABILITY-001 --title "Improve readability"
109
+ aeh spec compile READABILITY-001 --title "Improve readability"
110
+ aeh sdd validate READABILITY-001
111
+ aeh seal READABILITY-001
112
+ aeh run READABILITY-001
113
+ ```
114
+
115
+ OpenSpec is an **authoring source before freeze**. The compiled native AEH SDD/TaskContract and seal remain normative during implementation. OpenSpec apply commands do not replace AEH's worker, validation, review-convergence or delivery lifecycle.
116
+
117
+ The compiler records `authoring.provider=openspec`, change name and SHA-256 provenance. It maps OpenSpec `### Requirement:` / `#### Scenario:` content into stable AEH requirement IDs and Gherkin acceptance. Refactor/tooling changes without a delta spec receive an explicit behavior-preservation requirement.
118
+
119
+ A requirement validator may not be invented. AEH uses configured deterministic validators first, otherwise derives a project test/typecheck/build command from known project metadata. If it cannot establish executable requirement evidence, SPEC compilation fails instead of emitting a phantom validator.
120
+
121
+ ## Built-in orchestration preset
122
+
123
+ New projects extend:
124
+
125
+ ```jsonc
126
+ {
127
+ "extends": ["aeh:orchestration"]
128
+ }
129
+ ```
130
+
131
+ This extends `aeh:default`, makes lead/planner delegation-first, and adds:
132
+
133
+ - `environment-manager`;
134
+ - `spec-manager`.
135
+
136
+ OpenSpec is included in the declarative toolchain and automatically selected when `sdd.authoring.provider: openspec` is active.
137
+
138
+ ## Trust boundary
139
+
140
+ The authority order remains unchanged:
141
+
142
+ 1. user intent / true product decisions;
143
+ 2. sealed compiled AEH SDD + TaskContract;
144
+ 3. deterministic validators/evidence;
145
+ 4. quality/review gates;
146
+ 5. LLM summaries and advisory tools.
147
+
148
+ Paseo skills improve communication and lifecycle control; they do not become gate authority. OpenSpec improves specification authoring; it does not become mutable execution truth after the AEH seal.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "agentic-engineering-harness",
3
- "version": "0.4.16",
4
- "description": "OSS-first engineering harness for deterministic, spec-driven and issue-driven multi-agent software delivery.",
3
+ "version": "0.6.0",
4
+ "description": "OSS-first engineering harness for deterministic, spec-driven, issue-driven, audit-governed and orchestration-first multi-agent software delivery.",
5
5
  "type": "module",
6
6
  "bin": { "engineering-harness": "./dist/entry.js", "aeh": "./dist/entry.js" },
7
7
  "files": ["dist", "templates", "presets", "policies", "schemas", "skills", "docs"],
@@ -14,5 +14,5 @@
14
14
  "bugs": { "url": "https://github.com/JamesMorales04/agentic-engineering-harness/issues" },
15
15
  "publishConfig": { "access": "public" },
16
16
  "license": "Apache-2.0",
17
- "keywords": ["ai-agents", "codex", "opencode", "paseo", "sdd", "github-issues", "issue-driven-development", "quick-contract", "gherkin", "agent-routing", "agent-presets", "mcp", "github-delivery", "worktrees", "multi-model", "quality-convergence", "toolchain", "mise", "bootstrap", "human-on-exception", "deterministic-validation", "engineering-harness", "slsa", "opentelemetry"]
17
+ "keywords": ["ai-agents", "codex", "opencode", "paseo", "openspec", "sdd", "audit", "code-review", "github-issues", "issue-driven-development", "quick-contract", "gherkin", "agent-routing", "agent-presets", "orchestration", "context-handoff", "mcp", "github-delivery", "worktrees", "multi-model", "multi-worker", "distributed-workers", "quality-convergence", "evidence-graph", "policy-bundles", "sandbox", "toolchain", "mise", "bootstrap", "human-on-exception", "deterministic-validation", "engineering-harness", "slsa", "opentelemetry"]
18
18
  }
@@ -0,0 +1,37 @@
1
+ {
2
+ "version": 1,
3
+ "extends": ["aeh:default"],
4
+ "agents": {
5
+ "lead": {
6
+ "description": "Own user intent, semantic decisions, exception handling and final acceptance. Operate as a thin orchestrator: delegate repository discovery, environment repair, specification authoring, planning, implementation and review. Prefer Paseo native/MCP orchestration tools and handoff skills over direct shell orchestration. Do not author SDD/OpenSpec artifacts or debug tooling interactively when a specialist can own that bounded operation.",
7
+ "skills": ["engineering-workflow", "lead-engineer", "paseo-orchestration", "verification-planning", "worktree-lifecycle"],
8
+ "permissions": { "read": "allow", "write": "deny", "shell": "allow", "network": "ask", "delegate": "allow", "review": "allow", "validate": "deny", "gitWrite": "deny" }
9
+ },
10
+ "planner": {
11
+ "description": "Produce a read-only delegation DAG and triage evidence. Use explorer/Graphify evidence supplied to you; do not implement, author specifications, repair the environment, or run broad validation. Return bounded scope, dependencies, risks, reviewers and validators to the lead/Harness.",
12
+ "permissions": { "read": "allow", "write": "deny", "shell": "deny", "network": "deny", "delegate": "allow", "review": "allow", "validate": "deny", "gitWrite": "deny" }
13
+ },
14
+ "environment-manager": {
15
+ "role": "coordinator",
16
+ "domains": ["environment", "toolchain", "paseo", "build-system"],
17
+ "description": "Own deterministic environment readiness and recovery delegated by the lead. Run AEH setup/doctor/agents checks, diagnose package-manager and Paseo daemon/provider failures, and return a compact structured outcome. Never implement product code or change normative requirements.",
18
+ "execution": { "model": "@workhorse" },
19
+ "skills": ["paseo-orchestration", "recovery-classifier"],
20
+ "permissions": { "read": "allow", "write": "deny", "shell": "allow", "network": "ask", "delegate": "deny", "review": "deny", "validate": "allow", "gitWrite": "deny" },
21
+ "outputContract": "recovery"
22
+ },
23
+ "spec-manager": {
24
+ "role": "planner",
25
+ "domains": ["requirements", "specification", "sdd", "openspec"],
26
+ "description": "Own SPEC authoring only. Use OpenSpec to create/iterate proposal, delta specs, design and tasks from the user's intent plus repository/planner evidence. Validate OpenSpec strictly, then compile it through AEH into traceable TaskContract/Gherkin artifacts. Do not implement code, run broad validation, perform GitHub delivery or redefine user intent silently.",
27
+ "execution": { "model": "@brain" },
28
+ "skills": ["openspec-authoring", "acceptance-traceability", "verification-planning"],
29
+ "permissions": { "read": "allow", "write": "allow", "shell": "allow", "network": "deny", "delegate": "allow", "review": "deny", "validate": "deny", "gitWrite": "deny" },
30
+ "outputContract": "planner"
31
+ }
32
+ },
33
+ "routing": [
34
+ { "id": "environment-readiness", "priority": 100, "when": { "intent": ["environment", "toolchain", "recover-environment"] }, "use": "environment-manager" },
35
+ { "id": "spec-authoring", "priority": 100, "when": { "intent": ["spec-authoring", "openspec"] }, "use": "spec-manager" }
36
+ ]
37
+ }