agentic-engineering-harness 0.6.12 → 0.6.14
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/dist/agents/outputContracts.d.ts +44 -1
- package/dist/agents/outputContracts.js +12 -2
- package/dist/agents/outputContracts.js.map +1 -1
- package/dist/agents/reviewLifecycle.js +54 -14
- package/dist/agents/reviewLifecycle.js.map +1 -1
- package/dist/agents/waveExecutor.d.ts +2 -13
- package/dist/audit/run.d.ts +7 -0
- package/dist/audit/run.js +198 -32
- package/dist/audit/run.js.map +1 -1
- package/dist/core/run.js +103 -28
- package/dist/core/run.js.map +1 -1
- package/dist/main.js +118 -23
- package/dist/main.js.map +1 -1
- package/dist/operations/artifacts.d.ts +13 -0
- package/dist/operations/artifacts.js +45 -0
- package/dist/operations/artifacts.js.map +1 -0
- package/dist/operations/change.d.ts +11 -0
- package/dist/operations/change.js +144 -0
- package/dist/operations/change.js.map +1 -0
- package/dist/operations/completion.d.ts +4 -1
- package/dist/operations/completion.js +69 -89
- package/dist/operations/completion.js.map +1 -1
- package/dist/operations/controller.d.ts +8 -5
- package/dist/operations/controller.js +270 -131
- package/dist/operations/controller.js.map +1 -1
- package/dist/operations/executionContext.d.ts +15 -0
- package/dist/operations/executionContext.js +91 -0
- package/dist/operations/executionContext.js.map +1 -0
- package/dist/operations/interactive.js +6 -1
- package/dist/operations/interactive.js.map +1 -1
- package/dist/operations/leadBinding.d.ts +2 -0
- package/dist/operations/leadBinding.js +22 -0
- package/dist/operations/leadBinding.js.map +1 -0
- package/dist/operations/liveness.d.ts +35 -0
- package/dist/operations/liveness.js +308 -0
- package/dist/operations/liveness.js.map +1 -0
- package/dist/operations/mcp.js +72 -55
- package/dist/operations/mcp.js.map +1 -1
- package/dist/operations/monitorProcess.d.ts +8 -0
- package/dist/operations/monitorProcess.js +33 -0
- package/dist/operations/monitorProcess.js.map +1 -0
- package/dist/operations/portfolio.d.ts +35 -0
- package/dist/operations/portfolio.js +158 -0
- package/dist/operations/portfolio.js.map +1 -0
- package/dist/operations/state.d.ts +174 -17
- package/dist/operations/state.js +178 -163
- package/dist/operations/state.js.map +1 -1
- package/dist/operations/supervisor.d.ts +38 -0
- package/dist/operations/supervisor.js +195 -0
- package/dist/operations/supervisor.js.map +1 -0
- package/dist/paseo/launchSpec.d.ts +4 -0
- package/dist/paseo/launchSpec.js +32 -25
- package/dist/paseo/launchSpec.js.map +1 -1
- package/dist/paseo/sdk.d.ts +5 -0
- package/dist/paseo/sdk.js +35 -87
- package/dist/paseo/sdk.js.map +1 -1
- package/dist/paseo/start.d.ts +1 -1
- package/dist/paseo/start.js +46 -86
- package/dist/paseo/start.js.map +1 -1
- package/dist/workers/agentPrompt.d.ts +2 -0
- package/dist/workers/agentPrompt.js +157 -183
- package/dist/workers/agentPrompt.js.map +1 -1
- package/docs/OPERATION_SUPERVISION.md +198 -0
- package/package.json +1 -1
- package/presets/agents/orchestration.jsonc +14 -4
- package/skills/engineering-workflow/SKILL.md +149 -104
- package/templates/AGENTS.md +8 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# Durable operation supervision
|
|
2
|
+
|
|
3
|
+
AEH separates the user-facing conversation from operation-local semantic work and deterministic lifecycle authority.
|
|
4
|
+
|
|
5
|
+
## Responsibility hierarchy
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
User
|
|
9
|
+
|
|
|
10
|
+
AEH Lead user / portfolio plane
|
|
11
|
+
|
|
|
12
|
+
+-- Operation A Supervisor one semantic operation context
|
|
13
|
+
| +-- planner
|
|
14
|
+
| +-- implementers
|
|
15
|
+
| +-- reviewers
|
|
16
|
+
| `-- oracle / remediation
|
|
17
|
+
|
|
|
18
|
+
+-- Operation B Supervisor
|
|
19
|
+
| `-- ...
|
|
20
|
+
|
|
|
21
|
+
`-- Operation C Supervisor
|
|
22
|
+
|
|
23
|
+
Deterministic controller + OperationRecord run across the hierarchy.
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The lead owns user intent, priorities, cross-operation dependencies, true exception decisions and final user-facing acceptance. The lead should not multiplex every child-agent timeline.
|
|
27
|
+
|
|
28
|
+
The operation supervisor owns semantic coordination and consolidation for one operation. It may merge semantically duplicate findings, identify conflicts and request bounded follow-up, but it cannot overrule deterministic state, validation or normative artifacts.
|
|
29
|
+
|
|
30
|
+
The controller owns lifecycle, stage transitions, participant state, seals, validators, rollback, quality gates, delivery and terminalization. `OperationRecord` is the durable source of lifecycle truth.
|
|
31
|
+
|
|
32
|
+
## OperationRecord v2
|
|
33
|
+
|
|
34
|
+
Every detached operation has `.harness/operations/<id>.json` with:
|
|
35
|
+
|
|
36
|
+
- `revision` and `lastProgressAt`;
|
|
37
|
+
- `lead` binding/generation/acknowledged revision;
|
|
38
|
+
- supervisor generations (`ACTIVE`, `DRAINING`, `ARCHIVED`);
|
|
39
|
+
- stage state;
|
|
40
|
+
- bounded participants and parent supervisor generation;
|
|
41
|
+
- compact progress counts;
|
|
42
|
+
- wake/delivery metadata;
|
|
43
|
+
- final result pointers.
|
|
44
|
+
|
|
45
|
+
Large content is externalized:
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
.harness/operations/<id>/
|
|
49
|
+
events.ndjson
|
|
50
|
+
agents/*.json
|
|
51
|
+
consolidations/*.json
|
|
52
|
+
supervisors/*.json
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The three durable layers have different meanings:
|
|
56
|
+
|
|
57
|
+
- OperationRecord: current state snapshot.
|
|
58
|
+
- events.ndjson: how the operation reached that state.
|
|
59
|
+
- AuditReport/RunResult/agent/consolidation artifacts: evidence and final products.
|
|
60
|
+
|
|
61
|
+
Agent conversation history is not required to reconstruct an operation.
|
|
62
|
+
|
|
63
|
+
## Revision and acknowledgement
|
|
64
|
+
|
|
65
|
+
Meaningful durable progress increments `revision`. A lead wake being accepted by Paseo is not considered consumption of the result. The currently bound lead must read `aeh_operation_status`, which acknowledges that exact durable revision.
|
|
66
|
+
|
|
67
|
+
This distinction prevents the failure mode:
|
|
68
|
+
|
|
69
|
+
```text
|
|
70
|
+
operation terminal
|
|
71
|
+
-> prompt accepted by Paseo
|
|
72
|
+
-> lead turn/provider/UI fails before result is read
|
|
73
|
+
-> operation appears delivered forever
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The detached monitor continues until the terminal revision is acknowledged, and re-wakes the lead after the configured interval when necessary.
|
|
77
|
+
|
|
78
|
+
## Layered liveness
|
|
79
|
+
|
|
80
|
+
AEH deliberately does not depend on one messaging channel:
|
|
81
|
+
|
|
82
|
+
1. Paseo parent/child notifications are a fast lifecycle signal.
|
|
83
|
+
2. Terminal completion send uses bounded retry.
|
|
84
|
+
3. A detached non-LLM monitor observes durable state after the controller can exit.
|
|
85
|
+
|
|
86
|
+
The monitor wakes on:
|
|
87
|
+
|
|
88
|
+
- unseen meaningful progress after the quiet interval;
|
|
89
|
+
- blocked state;
|
|
90
|
+
- lack of durable progress beyond the stall threshold;
|
|
91
|
+
- terminal state not acknowledged by the current lead.
|
|
92
|
+
|
|
93
|
+
A stall targets the operation supervisor first. Missing/busy/unreachable supervisor recovery escalates to the lead.
|
|
94
|
+
|
|
95
|
+
Healthy non-terminal progress wakes are internal. They should not generate chat noise.
|
|
96
|
+
|
|
97
|
+
## Supervisor context generations
|
|
98
|
+
|
|
99
|
+
Supervisors are proactively replaced rather than compacted as their canonical Paseo context approaches the configured handoff threshold.
|
|
100
|
+
|
|
101
|
+
```text
|
|
102
|
+
generation N ACTIVE
|
|
103
|
+
-> durable supervisor checkpoint
|
|
104
|
+
-> generation N DRAINING
|
|
105
|
+
-> generation N+1 ACTIVE
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
No live child is reparented. Children already running under generation N remain there. New children use N+1. Once every child tied to N is terminal, AEH archives N. An archive failure remains visible instead of being represented as success.
|
|
109
|
+
|
|
110
|
+
The new generation recovers from OperationRecord + supervisor checkpoint + relevant artifacts, not transcript replay.
|
|
111
|
+
|
|
112
|
+
Lead rotation follows the same durability principle: active operations and completion targets are rebound to the new lead generation.
|
|
113
|
+
|
|
114
|
+
## Paseo parentage
|
|
115
|
+
|
|
116
|
+
For managed Paseo execution, AEH supplies the active supervisor as the top-level `parent` create option for bounded operation agents. The supervisor itself may be parented to the current lead.
|
|
117
|
+
|
|
118
|
+
Parentage is useful for UI hierarchy, lifecycle notification and operation-local ownership. It is not workflow authority. OperationRecord remains authoritative because parent relationships/runtime processes can be archived, replaced or lost independently of durable execution state.
|
|
119
|
+
|
|
120
|
+
## Workspace isolation and concurrent operations
|
|
121
|
+
|
|
122
|
+
A lead may own multiple concurrent operations. The compact project portfolio is stored at `.harness/operations/portfolio.json` and is available through `aeh_operation_portfolio` / `aeh operation portfolio`.
|
|
123
|
+
|
|
124
|
+
AUDIT is read-only and may use a local orchestration workspace.
|
|
125
|
+
|
|
126
|
+
RUN/CHANGE are mutating and must execute in an isolated worktree unless an explicit existing delivery workspace already owns isolation. AEH fails closed rather than running concurrent mutating operations against the same checkout.
|
|
127
|
+
|
|
128
|
+
Operations store both the repository control root and the isolated execution root. `AEH_CONTROL_ROOT` ensures every child updates the same durable OperationRecord even when executing from another worktree.
|
|
129
|
+
|
|
130
|
+
## Workflow mapping
|
|
131
|
+
|
|
132
|
+
### AUDIT
|
|
133
|
+
|
|
134
|
+
```text
|
|
135
|
+
Operation created
|
|
136
|
+
-> supervisor materialized
|
|
137
|
+
-> reviewers parented to supervisor
|
|
138
|
+
-> deterministic validation evidence
|
|
139
|
+
-> reviewer artifacts
|
|
140
|
+
-> supervisor semantic consolidation
|
|
141
|
+
-> exact source-finding provenance validation
|
|
142
|
+
-> deterministic dedupe / quality gate
|
|
143
|
+
-> AuditReport
|
|
144
|
+
-> terminal revision
|
|
145
|
+
-> lead acknowledgement
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### CHANGE / SPEC
|
|
149
|
+
|
|
150
|
+
CHANGE begins before discovery so explorer/planner/spec-manager cannot become orphan conversational branches.
|
|
151
|
+
|
|
152
|
+
```text
|
|
153
|
+
CHANGE Operation
|
|
154
|
+
-> discovery/planning evidence when required
|
|
155
|
+
-> deterministic QUICK/SPEC triage
|
|
156
|
+
-> QuickContract OR OpenSpec authoring + deterministic compile
|
|
157
|
+
-> seal
|
|
158
|
+
-> implementation
|
|
159
|
+
-> validation
|
|
160
|
+
-> review/remediation/oracle/replan
|
|
161
|
+
-> delivery
|
|
162
|
+
-> terminal state
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
SPEC manager authors OpenSpec inside the existing operation and must not start another AEH workflow. Deterministic AEH compilation/sealing remains normative.
|
|
166
|
+
|
|
167
|
+
### QUICK
|
|
168
|
+
|
|
169
|
+
A single-worker QUICK can remain cheap and deterministic. A supervisor is materialized lazily when reviewer fan-out, semantic consolidation, remediation/escalation or another operation-local coordination requirement appears.
|
|
170
|
+
|
|
171
|
+
### Prepared RUN
|
|
172
|
+
|
|
173
|
+
A prepared task enters the same supervised state machine. SPEC/complex RUN materializes supervision before planner waves. QUICK follows the lazy policy above.
|
|
174
|
+
|
|
175
|
+
## Managed-operation final acceptance
|
|
176
|
+
|
|
177
|
+
The review lifecycle must not create a hidden second orchestrator and treat it as the user-facing lead. After deterministic quality acceptance in a managed operation, terminal durable state returns to the actual lead bound in OperationRecord. That lead performs final user-facing semantic acceptance.
|
|
178
|
+
|
|
179
|
+
Synchronous compatibility execution outside a managed operation may retain the legacy orchestrator-acceptance path.
|
|
180
|
+
|
|
181
|
+
## Concurrency policy
|
|
182
|
+
|
|
183
|
+
Configuration may bound:
|
|
184
|
+
|
|
185
|
+
- active operations per lead/project;
|
|
186
|
+
- active agents project-wide;
|
|
187
|
+
- agents per operation;
|
|
188
|
+
- provider-specific concurrent agents.
|
|
189
|
+
|
|
190
|
+
Capacity exhaustion queues/rejects new work rather than sacrificing isolation or deterministic semantics.
|
|
191
|
+
|
|
192
|
+
## Failure containment
|
|
193
|
+
|
|
194
|
+
An operation supervisor failure affects one operation, not the entire lead portfolio. A supervisor can rotate without replacing the lead, and a lead can rotate without discarding active operations. Durable state therefore limits the blast radius of provider/model/context/runtime failure.
|
|
195
|
+
|
|
196
|
+
The design rule is:
|
|
197
|
+
|
|
198
|
+
> LLMs own semantics; deterministic state owns facts; no single agent or message is required to reconstruct or continue the workflow.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentic-engineering-harness",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.14",
|
|
4
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": {
|
|
@@ -8,18 +8,27 @@
|
|
|
8
8
|
},
|
|
9
9
|
"agents": {
|
|
10
10
|
"lead": {
|
|
11
|
-
"description": "Own user intent, semantic decisions, exception handling and final acceptance. Operate as a thin orchestrator:
|
|
11
|
+
"description": "Own user intent, semantic decisions, cross-operation priorities, exception handling and final acceptance. Operate as a thin portfolio orchestrator: create durable AEH operations and let each operation-supervisor coordinate its own planner/workers/reviewers. Do not personally multiplex child-agent timelines or author SDD/OpenSpec artifacts.",
|
|
12
12
|
"skills": ["engineering-workflow", "lead-engineer", "paseo-orchestration", "verification-planning", "worktree-lifecycle"],
|
|
13
13
|
"permissions": { "read": "allow", "write": "deny", "shell": "allow", "network": "ask", "delegate": "allow", "review": "allow", "validate": "deny", "gitWrite": "deny" }
|
|
14
14
|
},
|
|
15
|
+
"operation-supervisor": {
|
|
16
|
+
"role": "coordinator",
|
|
17
|
+
"domains": ["*"],
|
|
18
|
+
"description": "Own semantic coordination for exactly one durable AEH operation. Act as parent/coordinator for that operation's bounded agents, consolidate their structured artifacts, identify conflicts and missing evidence, and return compact operation summaries. Never override TaskContract/SDD/seals, deterministic participant completion, validators, quality gates, rollback, delivery state or OperationRecord lifecycle authority.",
|
|
19
|
+
"execution": { "model": "@brain" },
|
|
20
|
+
"skills": ["finding-dedup", "acceptance-traceability", "recovery-classifier", "verification-planning"],
|
|
21
|
+
"permissions": { "read": "allow", "write": "deny", "shell": "allow", "network": "deny", "delegate": "allow", "review": "allow", "validate": "deny", "gitWrite": "deny" },
|
|
22
|
+
"outputContract": "supervisor"
|
|
23
|
+
},
|
|
15
24
|
"planner": {
|
|
16
|
-
"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
|
|
25
|
+
"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 operation supervisor/Harness.",
|
|
17
26
|
"permissions": { "read": "allow", "write": "deny", "shell": "deny", "network": "deny", "delegate": "allow", "review": "allow", "validate": "deny", "gitWrite": "deny" }
|
|
18
27
|
},
|
|
19
28
|
"environment-manager": {
|
|
20
29
|
"role": "coordinator",
|
|
21
30
|
"domains": ["environment", "toolchain", "paseo", "build-system"],
|
|
22
|
-
"description": "Own deterministic environment readiness and recovery delegated by
|
|
31
|
+
"description": "Own deterministic environment readiness and recovery delegated by a lead or operation supervisor. 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.",
|
|
23
32
|
"execution": { "model": "@workhorse" },
|
|
24
33
|
"skills": ["paseo-orchestration", "recovery-classifier"],
|
|
25
34
|
"permissions": { "read": "allow", "write": "deny", "shell": "allow", "network": "ask", "delegate": "deny", "review": "deny", "validate": "allow", "gitWrite": "deny" },
|
|
@@ -28,7 +37,7 @@
|
|
|
28
37
|
"spec-manager": {
|
|
29
38
|
"role": "planner",
|
|
30
39
|
"domains": ["requirements", "specification", "sdd", "openspec"],
|
|
31
|
-
"description": "Own SPEC authoring
|
|
40
|
+
"description": "Own SPEC authoring inside an existing CHANGE operation. Use OpenSpec to create/iterate proposal, delta specs, design and tasks from user intent plus explorer/planner evidence. Validate OpenSpec strictly and leave compilation/sealing to deterministic AEH controller code. Do not start another AEH operation, implement product code, perform delivery or redefine user intent silently.",
|
|
32
41
|
"execution": { "model": "@brain" },
|
|
33
42
|
"skills": ["openspec-authoring", "acceptance-traceability", "verification-planning"],
|
|
34
43
|
"permissions": { "read": "allow", "write": "allow", "shell": "allow", "network": "deny", "delegate": "allow", "review": "deny", "validate": "deny", "gitWrite": "deny" },
|
|
@@ -36,6 +45,7 @@
|
|
|
36
45
|
}
|
|
37
46
|
},
|
|
38
47
|
"routing": [
|
|
48
|
+
{ "id": "operation-supervision", "priority": 120, "when": { "intent": ["operation-supervision"] }, "use": "operation-supervisor" },
|
|
39
49
|
{ "id": "environment-readiness", "priority": 100, "when": { "intent": ["environment", "toolchain", "recover-environment"] }, "use": "environment-manager" },
|
|
40
50
|
{ "id": "spec-authoring", "priority": 100, "when": { "intent": ["spec-authoring", "openspec"] }, "use": "spec-manager" }
|
|
41
51
|
]
|
|
@@ -1,178 +1,223 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: engineering-workflow
|
|
3
|
-
purpose: Turn natural-language engineering intent into
|
|
3
|
+
purpose: Turn natural-language engineering intent into durable supervised AEH operations while keeping the interactive lead thin and delegating operation-local work.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Engineering Workflow
|
|
7
7
|
|
|
8
|
-
You are the engineering lead entrypoint. The user may be operating from Paseo mobile and should not need to know AEH commands, internal modes, tools or agents.
|
|
8
|
+
You are the user-facing engineering lead entrypoint. The user may be operating from Paseo mobile and should not need to know AEH commands, internal modes, tools or agents.
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Three-level execution model
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
AEH separates semantic responsibility from deterministic authority:
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- true ambiguity/human-on-exception;
|
|
18
|
-
- final semantic acceptance.
|
|
14
|
+
1. **Lead / portfolio plane** — owns user intent, priorities between operations, cross-operation dependencies, genuine product/external decisions and final user-facing semantic acceptance.
|
|
15
|
+
2. **Operation Supervisor / operation plane** — owns semantic coordination for exactly one operation. It is the Paseo parent/coordinator for that operation's bounded agents, consolidates structured outputs, identifies conflicts/missing evidence and maintains compact operation-local context.
|
|
16
|
+
3. **Deterministic controller + OperationRecord** — owns lifecycle truth, revisions, stages, participant completion, TaskContract/SDD/seal authority, validation, rollback, quality gates, delivery and terminal state.
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
Bounded planner/implementer/reviewer/oracle/spec-manager agents own one task only.
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
- environment/toolchain/Paseo recovery -> `environment-manager`;
|
|
24
|
-
- non-trivial triage/decomposition -> `planner`;
|
|
25
|
-
- SPEC authoring -> `spec-manager` using OpenSpec;
|
|
26
|
-
- implementation/validation/review -> Harness-selected workers.
|
|
20
|
+
Never promote an LLM statement into lifecycle authority. A supervisor may say that children appear complete or that findings are duplicates, but AEH must verify participant state/provenance and deterministic gates from durable state/artifacts.
|
|
27
21
|
|
|
28
|
-
|
|
22
|
+
## Multi-operation lead
|
|
29
23
|
|
|
30
|
-
|
|
24
|
+
One managed lead may own several concurrent operations. Treat the lead as a portfolio manager, not a multiplexed child-agent controller.
|
|
31
25
|
|
|
32
|
-
|
|
26
|
+
- Use `aeh_operation_portfolio` for the compact operation-level view.
|
|
27
|
+
- Each mutating operation executes in an isolated operation/delivery worktree.
|
|
28
|
+
- Do not stream every child status into lead context.
|
|
29
|
+
- Operations may progress independently and at different priorities.
|
|
30
|
+
- Respect configured project/operation/provider concurrency limits; queued work is preferable to unsafe resource oversubscription.
|
|
33
31
|
|
|
34
|
-
|
|
32
|
+
A lead should normally think in terms such as `CHANGE-A=reviewing`, `AUDIT-B=terminal/unread`, `CHANGE-C=blocked`, not thirty individual worker timelines.
|
|
35
33
|
|
|
36
|
-
|
|
34
|
+
## Durable operation state
|
|
37
35
|
|
|
38
|
-
|
|
36
|
+
Every delegated workflow is represented by a durable OperationRecord under `.harness/operations/` before meaningful fan-out begins. OperationRecord is a mutable snapshot/state machine, not an LLM transcript.
|
|
39
37
|
|
|
40
|
-
|
|
38
|
+
Important concepts:
|
|
41
39
|
|
|
42
|
-
|
|
40
|
+
- `revision` increments on meaningful state transitions;
|
|
41
|
+
- `lastProgressAt` records durable progress;
|
|
42
|
+
- `lead.acknowledgedRevision` records the latest revision actually consumed by the bound lead;
|
|
43
|
+
- `supervision.generations` records supervisor ACTIVE/DRAINING/ARCHIVED generations;
|
|
44
|
+
- `stages` records discovery/planning/triage/spec/implementation/review/remediation/delivery state;
|
|
45
|
+
- `participants` records bounded-agent lifecycle and result artifact pointers;
|
|
46
|
+
- `notification` records wake attempts/delivery, separately from lead acknowledgement;
|
|
47
|
+
- large agent/consolidation/checkpoint payloads live under `.harness/operations/<id>/...`, not inline in the snapshot;
|
|
48
|
+
- `.harness/operations/<id>/events.ndjson` records how the snapshot evolved.
|
|
43
49
|
|
|
44
|
-
|
|
45
|
-
- sealed task execution: `aeh operation start run <taskId> ...`
|
|
50
|
+
OperationRecord answers **what is happening**. AuditReport/RunResult answers **what the operation produced**. Agent/consolidation artifacts preserve evidence. Never require conversational replay to reconstruct execution.
|
|
46
51
|
|
|
47
|
-
|
|
52
|
+
## Supervisor semantics
|
|
48
53
|
|
|
49
|
-
|
|
54
|
+
AUDIT and SPEC/complex CHANGE use an operation supervisor. QUICK may remain deterministic/single-worker until semantic fan-out, review or remediation makes a supervisor useful.
|
|
50
55
|
|
|
51
|
-
|
|
56
|
+
The supervisor:
|
|
52
57
|
|
|
53
|
-
|
|
58
|
+
- is a Paseo parent for new operation-local agents when Paseo transport is active;
|
|
59
|
+
- receives/reads child outputs and durable artifacts;
|
|
60
|
+
- performs semantic consolidation where useful;
|
|
61
|
+
- may request bounded clarification/follow-up within the same operation;
|
|
62
|
+
- may diagnose semantic conflict/missing evidence;
|
|
63
|
+
- must not mutate normative requirements or overrule deterministic failures;
|
|
64
|
+
- must not decide that a participant completed solely from prose;
|
|
65
|
+
- must not recursively enter another AEH operation.
|
|
54
66
|
|
|
55
|
-
|
|
67
|
+
For review consolidation, every raw finding ID must be accounted for. The supervisor may merge semantic duplicates but may not invent source evidence or silently drop raw findings; AEH validates provenance before quality calculations.
|
|
56
68
|
|
|
57
|
-
|
|
69
|
+
Paseo parent notifications are a fast lifecycle signal only. OperationRecord remains authoritative because parent notifications/runtime processes can fail or restart.
|
|
58
70
|
|
|
59
|
-
|
|
60
|
-
- 70–80%: pressure mode; stop exploratory shell work and increase delegation;
|
|
61
|
-
- >=80%: proactive handoff to a fresh lead;
|
|
62
|
-
- >=90%: mandatory handoff before additional engineering work.
|
|
71
|
+
## Supervisor context rotation
|
|
63
72
|
|
|
64
|
-
|
|
73
|
+
Do not use model compaction as the normal supervisor lifecycle. Read canonical Paseo context-window usage and proactively rotate the supervisor before exhaustion.
|
|
65
74
|
|
|
66
|
-
|
|
75
|
+
Rotation is generational:
|
|
67
76
|
|
|
68
|
-
|
|
77
|
+
```text
|
|
78
|
+
Supervisor generation N ACTIVE
|
|
79
|
+
-> checkpoint durable semantic state
|
|
80
|
+
-> DRAINING
|
|
81
|
+
Supervisor generation N+1 ACTIVE
|
|
82
|
+
```
|
|
69
83
|
|
|
70
|
-
|
|
84
|
+
Existing children remain attached to generation N until they finish. Do not reparent live children mid-turn. All new children attach to generation N+1. The new supervisor restores from OperationRecord + checkpoint + relevant artifacts, not transcript replay. Archive a draining supervisor only after all children associated with that generation are terminal; archive failures remain visible rather than being silently declared successful.
|
|
71
85
|
|
|
72
|
-
|
|
73
|
-
- `AUDIT`: read-only engineering review/validation/security/architecture/performance/quality/coverage/PR analysis. Must use the Harness audit path.
|
|
74
|
-
- `CHANGE`: implementation, fix, refactor, addition, removal, dependency/config update or other repository mutation. Must continue through deterministic QUICK/SPEC triage.
|
|
86
|
+
The lead follows the same proactive replacement philosophy. When a fresh lead is created, AEH rebinds active operations/completion targets to the new lead generation. Supervisors/controllers/watchdogs then target the new lead from durable state.
|
|
75
87
|
|
|
76
|
-
|
|
88
|
+
## Liveness and wake-up contract
|
|
77
89
|
|
|
78
|
-
|
|
90
|
+
The lead is allowed to become literal Paseo `idle`; idle does not mean the durable operation stopped. Do not keep a lead turn alive by polling.
|
|
79
91
|
|
|
80
|
-
|
|
92
|
+
AEH uses layered liveness:
|
|
81
93
|
|
|
82
|
-
|
|
94
|
+
1. native Paseo parent/child notifications when available — fast path;
|
|
95
|
+
2. direct terminal completion send with bounded retry — compatibility/fast path;
|
|
96
|
+
3. detached deterministic operation monitor — recovery/watchdog path.
|
|
83
97
|
|
|
84
|
-
|
|
85
|
-
2. environment-manager runs the bounded `aeh doctor`, `aeh setup`, `aeh agents check` and Paseo/toolchain recovery needed;
|
|
86
|
-
3. receive only its compact outcome and relevant failure classification;
|
|
87
|
-
4. retry the same sealed operation if readiness is restored;
|
|
88
|
-
5. surface `BLOCKED_EXTERNAL` only for a genuinely unavailable host prerequisite, credential or service after bounded recovery.
|
|
98
|
+
The detached monitor reads OperationRecord without consuming LLM tokens. It wakes only for meaningful unseen progress, blocks, stalls or terminal state. A stalled operation wakes the active supervisor first; inability to recover/inspect escalates to the lead.
|
|
89
99
|
|
|
90
|
-
|
|
100
|
+
**A prompt accepted by Paseo is not the same as the lead consuming the result.** The monitor remains alive after terminal wake delivery until the currently bound lead acknowledges the terminal OperationRecord revision. Use `aeh_operation_status` when a terminal/progress wake asks you to consume durable state; that tool acknowledges the revision for the bound lead.
|
|
91
101
|
|
|
92
|
-
|
|
102
|
+
If a healthy non-terminal progress wake arrives, inspect only what is necessary, do not create user-facing status noise, acknowledge durable state and return idle. If a block represents a true product/external decision, involve the user. If terminal, consume the report/result and complete the original request. Never launch a duplicate operation merely because a wake was missed.
|
|
93
103
|
|
|
94
|
-
|
|
95
|
-
2. AEH freezes the control plane and materializes the selected read-only reviewers as visible Paseo agents before deterministic validation begins. The agents remain idle until validator evidence is ready.
|
|
96
|
-
3. AEH runs deterministic validators, classifies failures, dispatches the materialized reviewers with that evidence, waits for the complete reviewer barrier, deduplicates findings and calculates quality debt.
|
|
97
|
-
4. The lead is allowed to finish its initiating conversational turn while step 3 continues. It must not infer that the AUDIT ended merely because its own turn ended or because some reviewers have replied.
|
|
98
|
-
5. Only after the controller reaches terminal operation state does it send `[AEH_OPERATION_COMPLETED]` back to the initiating lead. The lead then reads the persisted AuditReport and completes the original user-facing audit response.
|
|
99
|
-
6. Validator failures remain evidence; do not reinterpret them as PASS.
|
|
100
|
-
7. Persisted reports under `.harness/audits/` and `.harness/operations/` are durable input for later remediation and recovery.
|
|
101
|
-
8. AUDIT never implements fixes. A later "fix these" is a new CHANGE using the AuditReport as evidence.
|
|
104
|
+
## Persistent interactive entry
|
|
102
105
|
|
|
103
|
-
|
|
106
|
+
When the conversation was created by `aeh start`, its bootstrap is standing instruction. Every engineering operation is an engineering-workflow input; only a purely informational question may bypass AEH.
|
|
104
107
|
|
|
105
|
-
|
|
108
|
+
A normal `aeh start` creates a fresh lead. `aeh start --resume` explicitly reuses a compatible one. Active operations are rebound to the current compatible lead generation. Git, sealed artifacts, OperationRecords, reports, run state and delivery state are durable truth; old conversational context is not normative.
|
|
106
109
|
|
|
107
|
-
##
|
|
110
|
+
## Intent layer
|
|
108
111
|
|
|
109
|
-
|
|
110
|
-
2. For non-trivial work, delegate planning/triage evidence to `planner`. Planner remains read-only and does not run broad validation or author specs.
|
|
111
|
-
3. Feed those compact outputs to deterministic `aeh triage`.
|
|
112
|
-
4. Obey QUICK/SPEC without manual downgrade.
|
|
112
|
+
Classify every request as:
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
- `INFORMATIONAL`: explanation/lookup only, non-mutating.
|
|
115
|
+
- `AUDIT`: read-only engineering review/validation/security/architecture/performance/quality/coverage/PR analysis.
|
|
116
|
+
- `CHANGE`: implementation/fix/refactor/add/remove/dependency/config/schema/API or other repository mutation.
|
|
115
117
|
|
|
116
|
-
|
|
118
|
+
When not trivially informational, use AEH intent/triage evidence. Never bypass AEH for ad-hoc engineering assessment.
|
|
117
119
|
|
|
118
|
-
|
|
120
|
+
## AUDIT path
|
|
119
121
|
|
|
120
|
-
1.
|
|
121
|
-
2.
|
|
122
|
-
3.
|
|
123
|
-
4.
|
|
124
|
-
5.
|
|
122
|
+
1. Start `aeh_operation_start_audit` from the managed lead. The durable operation exists before reviewer fan-out.
|
|
123
|
+
2. AEH materializes an operation supervisor before audit reviewers.
|
|
124
|
+
3. Reviewers are bounded read-only children of that supervisor and emit structured artifacts.
|
|
125
|
+
4. Deterministic validators remain evidence and are not reinterpreted as PASS by the supervisor.
|
|
126
|
+
5. Supervisor consolidates raw reviewer findings semantically; AEH validates exact source-finding provenance before deterministic dedupe/quality/gates.
|
|
127
|
+
6. AuditReport is persisted only after full reviewer/consolidation barrier.
|
|
128
|
+
7. The detached liveness monitor wakes the lead on terminal state until the terminal revision is actually acknowledged.
|
|
129
|
+
8. Lead reads the existing AuditReport and answers the original user request. AUDIT never implements fixes; later remediation is a new CHANGE using the report as evidence.
|
|
125
130
|
|
|
126
|
-
##
|
|
131
|
+
## CHANGE path — operation starts before discovery
|
|
127
132
|
|
|
128
|
-
|
|
133
|
+
A non-informational mutating request should enter a durable `CHANGE` operation before explorer/planner/spec-manager fan-out. Do not run a conversational `explorer -> planner -> spec-manager -> finally RUN` chain outside durable operation state.
|
|
129
134
|
|
|
130
|
-
|
|
131
|
-
2. spec-manager runs `aeh spec prepare <taskId> --title "..."` and follows `openspec status` / `openspec instructions` to author proposal, specs, design and tasks.
|
|
132
|
-
3. spec-manager runs strict OpenSpec validation, then `aeh spec compile <taskId> --title "..." --change <change>`.
|
|
133
|
-
4. AEH deterministically compiles OpenSpec requirements/scenarios/tasks into native traceable SDD files, TaskContract and acceptance feature.
|
|
134
|
-
5. spec-manager runs `aeh sdd validate <taskId>` and returns only compact requirement IDs, change name and unresolved decisions.
|
|
135
|
-
6. The lead proceeds with normal seal/handoff, then starts `aeh operation start run <taskId>` when interactive. The compiled AEH artifacts and seal are normative during implementation; OpenSpec is authoring provenance before freeze.
|
|
136
|
-
7. Do not use OpenSpec apply commands to implement product code. AEH owns implementation, validation, review convergence and delivery.
|
|
135
|
+
The intended lineage is:
|
|
137
136
|
|
|
138
|
-
|
|
137
|
+
```text
|
|
138
|
+
CHANGE Operation
|
|
139
|
+
-> discovery (when needed)
|
|
140
|
+
-> planning/triage evidence (when needed)
|
|
141
|
+
-> deterministic QUICK/SPEC triage
|
|
142
|
+
-> QUICK contract OR OpenSpec authoring/compile
|
|
143
|
+
-> seal
|
|
144
|
+
-> implementation/planner waves
|
|
145
|
+
-> deterministic validation
|
|
146
|
+
-> review/remediation/oracle/replan
|
|
147
|
+
-> delivery
|
|
148
|
+
-> terminal result
|
|
149
|
+
```
|
|
139
150
|
|
|
140
|
-
|
|
151
|
+
All phases remain one operation lineage and one isolated mutating workspace unless an existing explicit delivery workspace takes precedence.
|
|
152
|
+
|
|
153
|
+
### QUICK
|
|
154
|
+
|
|
155
|
+
A clearly bounded QUICK with explicit files and observable acceptance can remain cheap: deterministic contract + one implementation worker + validation, without materializing an LLM supervisor merely for ceremony. If QUICK enters reviewer fan-out, remediation, escalation or other semantic coordination, materialize the operation supervisor lazily; all subsequent children attach to it.
|
|
141
156
|
|
|
142
|
-
|
|
157
|
+
If QUICK scope becomes architecture/auth/tenant/schema/public API/new dependency/cross-module/ambiguous/medium-high risk or otherwise violates QuickContract rules, escalate to SPEC rather than broadening it silently.
|
|
143
158
|
|
|
144
|
-
|
|
145
|
-
- `aeh operation status <id>` -> explicit diagnostic controller status/phase/result/error;
|
|
146
|
-
- `aeh paseo agents --operation <id>` -> manual inspection of real LLM participants and their roles/phases;
|
|
147
|
-
- `aeh operation wait <id>` -> synchronous non-interactive/recovery boundary only.
|
|
159
|
+
### SPEC / OpenSpec
|
|
148
160
|
|
|
149
|
-
|
|
161
|
+
SPEC authoring occurs inside the existing CHANGE operation.
|
|
150
162
|
|
|
151
|
-
|
|
163
|
+
- spec-manager owns OpenSpec authoring only;
|
|
164
|
+
- it uses OpenSpec status/instructions to create proposal/spec/design/tasks;
|
|
165
|
+
- it must not invoke nested `aeh spec`, `aeh run` or another operation;
|
|
166
|
+
- deterministic AEH validates/compiles OpenSpec to traceable TaskContract/Gherkin/SDD and seals it;
|
|
167
|
+
- compiled AEH artifacts plus seal become normative for implementation;
|
|
168
|
+
- OpenSpec remains authoring provenance before freeze;
|
|
169
|
+
- true unresolvable product decisions become `REQUIRES_PRODUCT_DECISION`, not guessed requirements.
|
|
152
170
|
|
|
153
|
-
|
|
171
|
+
## Prepared RUN / issue implementation
|
|
154
172
|
|
|
155
|
-
|
|
173
|
+
A pre-existing validated/sealed task may enter `aeh_operation_start_run`. RUN reuses an existing delivery workspace when present; otherwise mutating execution requires an isolated worktree.
|
|
156
174
|
|
|
157
|
-
|
|
175
|
+
SPEC/complex RUN materializes a supervisor before planner waves. Planner, implementer waves, reviewers, quality/senior remediation, diagnosis/oracle and replanning all belong to the same durable operation and supervisor lineage. Deterministic barriers, rollback, evidence and delivery remain controller-owned.
|
|
158
176
|
|
|
159
|
-
|
|
177
|
+
Do not create a hidden second conversational lead for final managed-operation acceptance. When deterministic quality state reaches acceptance, defer user-facing semantic acceptance to the actual bound interactive lead after terminal durable state. Synchronous non-managed compatibility paths may retain legacy orchestrator acceptance.
|
|
160
178
|
|
|
161
|
-
|
|
179
|
+
## Environment readiness and recovery
|
|
180
|
+
|
|
181
|
+
The lead should not perform long setup/toolchain debugging sequences. Environment/toolchain failures are bounded work for `environment-manager`, preferably inside the operation that encountered the failure. Environment recovery must not implement product code or redefine requirements. Surface `BLOCKED_EXTERNAL` only for genuinely unavailable prerequisites/credentials/services after bounded recovery.
|
|
162
182
|
|
|
163
183
|
## Human-on-exception
|
|
164
184
|
|
|
165
|
-
Request human input only for:
|
|
185
|
+
Request human input only for genuine exception boundaries such as:
|
|
166
186
|
|
|
167
187
|
- `SPEC_CONTRADICTION`;
|
|
168
188
|
- `REQUIRES_PRODUCT_DECISION`;
|
|
169
|
-
- `BLOCKED_EXTERNAL` after bounded
|
|
170
|
-
-
|
|
189
|
+
- `BLOCKED_EXTERNAL` after bounded recovery;
|
|
190
|
+
- issue drift requiring explicit intent acceptance after implementation state exists.
|
|
191
|
+
|
|
192
|
+
Ordinary implementation/review failures remain autonomous operation work.
|
|
193
|
+
|
|
194
|
+
## Context pressure
|
|
195
|
+
|
|
196
|
+
Do not wait for model compaction as normal context lifecycle. Use the canonical Paseo AgentSnapshot context-window fields and configured thresholds.
|
|
197
|
+
|
|
198
|
+
- normal below pressure threshold;
|
|
199
|
+
- pressure -> reduce exploratory work/increase delegation;
|
|
200
|
+
- handoff required -> durable checkpoint + replacement;
|
|
201
|
+
- hard handoff -> replace before additional engineering work.
|
|
202
|
+
|
|
203
|
+
Lead handoff carries user/portfolio decisions and OperationRecord references. Supervisor handoff carries operation-local checkpoint/artifact references. Children should remain bounded enough that long-lived compaction is normally unnecessary.
|
|
204
|
+
|
|
205
|
+
## Operation observation and recovery
|
|
206
|
+
|
|
207
|
+
Prefer operation-level surfaces:
|
|
208
|
+
|
|
209
|
+
- `aeh_operation_portfolio` — compact multi-operation lead view;
|
|
210
|
+
- `aeh_operation_status` — authoritative snapshot + lead revision acknowledgement;
|
|
211
|
+
- `aeh paseo agents --operation <id>` — explicit diagnostic view of concrete agents;
|
|
212
|
+
- `aeh operation wait` — synchronous compatibility/recovery only;
|
|
213
|
+
- `aeh operation cancel` — explicit cancellation.
|
|
214
|
+
|
|
215
|
+
Do not infer workflow completion from a reviewer looking idle in the UI. Do not infer liveness from a single callback. Use OperationRecord revisions, participant records, supervisor generation state and durable result artifacts.
|
|
171
216
|
|
|
172
217
|
## Self-modification
|
|
173
218
|
|
|
174
|
-
If
|
|
219
|
+
If AEH modifies its own topology/toolchain/skills/policies/validators/orchestration, an active operation remains governed by its frozen control-plane snapshot. New rules activate on later operations.
|
|
175
220
|
|
|
176
221
|
## User-facing communication
|
|
177
222
|
|
|
178
|
-
Keep status concise.
|
|
223
|
+
Keep status concise. Surface operation creation, meaningful mode/phase changes that require user awareness, real blockers, handoffs and final results. Do not narrate every child event or watchdog tick. The lead's context is for intent, priorities and decisions; operation supervisors own operation-local semantic detail; durable state owns facts.
|