agentic-engineering-harness 0.5.1 → 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 (50) hide show
  1. package/README.md +157 -216
  2. package/dist/agents/config.js +2 -0
  3. package/dist/agents/config.js.map +1 -1
  4. package/dist/audit/intent.d.ts +20 -0
  5. package/dist/audit/intent.js +42 -0
  6. package/dist/audit/intent.js.map +1 -0
  7. package/dist/audit/run.d.ts +46 -0
  8. package/dist/audit/run.js +147 -0
  9. package/dist/audit/run.js.map +1 -0
  10. package/dist/cli.js +1 -1
  11. package/dist/core/config.js +6 -2
  12. package/dist/core/config.js.map +1 -1
  13. package/dist/core/controlPlane.js +1 -1
  14. package/dist/core/controlPlane.js.map +1 -1
  15. package/dist/core/init.js +3 -3
  16. package/dist/core/init.js.map +1 -1
  17. package/dist/core/types.d.ts +20 -0
  18. package/dist/entry.js +112 -3
  19. package/dist/entry.js.map +1 -1
  20. package/dist/issues/intake.d.ts +1 -1
  21. package/dist/paseo/capabilities.d.ts +24 -0
  22. package/dist/paseo/capabilities.js +104 -0
  23. package/dist/paseo/capabilities.js.map +1 -0
  24. package/dist/paseo/context.d.ts +45 -0
  25. package/dist/paseo/context.js +153 -0
  26. package/dist/paseo/context.js.map +1 -0
  27. package/dist/paseo/start.d.ts +10 -2
  28. package/dist/paseo/start.js +56 -73
  29. package/dist/paseo/start.js.map +1 -1
  30. package/dist/spec/openspec.d.ts +28 -0
  31. package/dist/spec/openspec.js +179 -0
  32. package/dist/spec/openspec.js.map +1 -0
  33. package/dist/toolchain/resolve.js +3 -0
  34. package/dist/toolchain/resolve.js.map +1 -1
  35. package/dist/workers/paseo.js +53 -19
  36. package/dist/workers/paseo.js.map +1 -1
  37. package/docs/PASEO.md +56 -4
  38. package/docs/V0.5.2.md +180 -0
  39. package/docs/V0.6.md +148 -0
  40. package/package.json +3 -3
  41. package/presets/agents/orchestration.jsonc +37 -0
  42. package/schemas/project.schema.json +13 -2
  43. package/skills/engineering-workflow/SKILL.md +110 -86
  44. package/skills/openspec-authoring/SKILL.md +26 -0
  45. package/skills/paseo-orchestration/SKILL.md +38 -0
  46. package/templates/AGENTS.md +36 -17
  47. package/templates/agents.source.jsonc +1 -1
  48. package/templates/openspec-config.yaml +24 -0
  49. package/templates/project.yaml +11 -2
  50. package/templates/toolchain.yaml +11 -1
@@ -1,116 +1,140 @@
1
1
  ---
2
2
  name: engineering-workflow
3
- purpose: Turn a natural-language engineering request or existing GitHub issue into the correct Harness workflow while keeping the lead agent as semantic owner.
3
+ purpose: Turn natural-language engineering intent into Harness-governed audit/change execution while keeping the interactive lead thin and delegating operational 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 Harness commands or manually provision engineering dependencies.
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.
9
+
10
+ ## Lead operating model
11
+
12
+ The lead is a semantic orchestrator, not an interactive CI runner. Own:
13
+
14
+ - the user's intent and explicit decisions;
15
+ - high-level workflow/risk choices;
16
+ - delegation and state transitions;
17
+ - true ambiguity/human-on-exception;
18
+ - final semantic acceptance.
19
+
20
+ Delegate everything else to the narrowest bounded role:
21
+
22
+ - repository discovery -> `explorer`;
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.
27
+
28
+ Use the `paseo-orchestration` skill. Prefer injected Paseo tools (`create_agent`, `send_agent_prompt`, `get_agent_status`, `get_agent_activity`, lifecycle tools) and `/paseo-handoff` over shell orchestration when available. AEH's Paseo CLI adapter is the compatibility fallback. Do not create hand-written `paseo run` loops from the lead.
9
29
 
10
30
  ## Persistent interactive entry
11
31
 
12
- When the current Paseo conversation was created by `aeh start`, its bootstrap is a standing instruction for the entire session. Every later user request that can mutate the repository is automatically an engineering-workflow input. The user must not need to say `aeh`, request triage, choose QUICK/SPEC, create an SDD, or name internal agents. Build the evidence and make those decisions through the Harness yourself.
13
-
14
- The bootstrap may provide an exact local AEH invocation instead of the literal `aeh` executable. Use that exact command whenever this skill shows `aeh`; it exists so an already-running Paseo daemon can invoke the same installed Harness even when its inherited PATH predates toolchain reconciliation.
15
-
16
- Read-only questions may be answered directly if they perform no repository mutation. Never use that exception to make an unsealed change. Do not bypass the Harness by implementing a mutating request directly in the parent Paseo lead.
17
-
18
- ## Entry protocol
19
-
20
- 1. Identify the repository root and read `AGENTS.md`, `.harness/project.yaml`, `.harness/agents.source.jsonc`, `.harness/toolchain.yaml` when present, relevant architecture docs and current Git state.
21
- 2. Establish environment readiness before delegation:
22
- - run `aeh doctor` when the project has already been initialized;
23
- - if doctor reports a reconciliable toolchain failure (missing/out-of-lock Codex, OpenCode, Paseo, Graphify, validator or managed project runtime), run `aeh setup` autonomously and then run `aeh doctor` again;
24
- - do not ask the user to install each managed dependency manually;
25
- - do not invoke sudo or silently install required host/system prerequisites. A truly unavailable host prerequisite or external credential becomes `BLOCKED_EXTERNAL`.
26
- 3. Run `aeh agents check` before delegation. If the topology remains invalid after normal generated-config reconciliation, report the deterministic failure.
27
- 4. If the user explicitly asks to implement an existing GitHub issue (`issue #123`, `#123`, or an issue URL), use the **Issue-driven path** below. Do not manually recreate the issue as a new SDD request first.
28
- 5. Otherwise inspect relevant code, Graphify structure when available, and advisory memory. Git/specs/tests remain authoritative.
29
- 6. Build triage evidence: bounded concrete file scope, affected domains, risk, and escalation flags.
30
- 7. Run `aeh triage "<request>" --file ... --domain ... --risk ...`.
31
- 8. Follow the Harness decision. Do not downgrade SPEC to QUICK manually.
32
-
33
- ## Toolchain policy
34
-
35
- Treat `.harness/toolchain.yaml` as desired engineering capability configuration and `.harness/toolchain.lock.json` as its resolved executable state.
36
-
37
- - `aeh setup --dry-run` is inspection only and must not mutate the repository/environment.
38
- - ordinary `aeh setup` reuses the existing lock and installs only missing/selected capabilities;
39
- - use `aeh setup --update-lock` only for an intentional toolchain upgrade, not as generic recovery;
40
- - project version authority such as `.node-version`, `.nvmrc`, .NET `global.json` and explicit project tool overrides must be respected;
41
- - `.harness/toolchain.state.json` and generated wrappers are machine-local and must not be treated as normative Git content;
42
- - do not run package-manager installs with unfrozen semantics when a lockfile/frozen mode is available;
43
- - use OCI validator alternatives only when configured/preferred and the container engine is available; absence of Podman should fall back to managed local tooling when the tool definition permits it.
44
-
45
- ## Issue-driven path
46
-
47
- For an existing GitHub issue, the issue is an **input source**, not mutable normative truth during execution.
48
-
49
- 1. Run `aeh issue inspect <number>` when you need to surface intake classification/evidence before execution.
50
- 2. Normally start the complete workflow with `aeh issue implement <number>` (equivalent entry: `aeh run --issue <number>`).
51
- 3. The Harness fetches the issue from the repository associated with the current project, freezes title/body into `.harness/issues/GH-<number>.json`, computes a SHA-256 content fingerprint, and rejects PR numbers masquerading as issues.
52
- 4. The Harness deterministically extracts labels, likely domains, concrete paths and acceptance statements. Non-trivial issues are normalized by the configured read-only planner against repository evidence. The planner may derive implementation details from the repository but must not invent product decisions.
53
- 5. The normalized intake is deterministically materialized as either:
54
- - a bounded QuickContract only when QUICK safety rules and concrete file scope are satisfied; or
55
- - a complete SDD/TaskContract with requirement IDs, design/tasks and acceptance traceability.
56
- 6. The generated TaskContract/SDD plus frozen issue snapshot are sealed. From this point they are normative for the run; later edits to the GitHub issue cannot silently change the active task.
57
- 7. The existing issue is seeded into the delivery record, so handoff must **reuse it**, never create a duplicate issue. If delivery is enabled, the Harness reuses/creates the issue-linked branch and Paseo worktree, materializes sealed context there, then runs the normal implementation/validation/review lifecycle.
58
- 8. Before every run of an issue-derived contract, the Harness re-fetches issue title/body and compares the content SHA. `ISSUE_DRIFT` blocks silent execution on changed requirements.
59
- 9. If `ISSUE_DRIFT` occurs before implementation, inspect the change and use `aeh issue import <number> --refresh` when the new issue text should become authoritative. If an active delivery workspace already exists, do not overwrite it casually; the Harness requires explicit `--force` for refresh.
60
- 10. After deterministic PASS, Final Quality Gate PASS and lead acceptance, deterministic Harness delivery may finalize the accepted issue branch when `delivery.github.finalizeOnAcceptance=true`: stage/commit the accepted work, push the exact issue branch without force, reuse an existing open PR or create a draft PR, and link it with `Closes #<issue>`.
61
- 11. Agents never receive `gitWrite` merely to perform this finalization. Commit/push/PR writes belong to the deterministic Harness control plane. A credential/push failure is `BLOCKED_EXTERNAL`; it must not be reported as successful delivery.
62
- 12. `SPEC_CONTRADICTION` and `REQUIRES_PRODUCT_DECISION` remain human-on-exception outcomes. Ordinary missing implementation detail should be resolved from repository evidence by planner/oracle rather than escalated to the user.
32
+ When the conversation was created by `aeh start`, its bootstrap is a standing instruction. Every engineering operation is automatically an engineering-workflow input, whether read-only or mutating. Only a purely informational question may bypass AEH.
63
33
 
64
- ## QUICK path
34
+ A normal `aeh start` creates a fresh lead. `aeh start --resume` is the explicit compatibility/recovery path for reusing a lead. Do not assume old conversational context is normative; Git, sealed artifacts, AuditReports, run state and delivery state are the durable sources.
65
35
 
66
- Use QUICK only when the Harness returns QUICK.
36
+ The bootstrap may provide an exact AEH invocation. Use it whenever this skill writes `aeh`.
67
37
 
68
- 1. Create a QuickContract with explicit **concrete** file scope and observable acceptance:
69
- `aeh quick new <id> --title "..." --request "..." --scope <paths...> --acceptance "..." --domain <domains...>`
70
- 2. Wildcard/repository-wide scope such as `**`, `src/**` or `src/*.ts` is not a bounded QUICK scope and must escalate to SPEC.
71
- 3. Run `aeh quick validate <id>`.
72
- 4. Run `aeh run <id>` with the desired profile.
73
- 5. Remain the lead; do not perform delegated implementation yourself unless recovery explicitly escalates to the lead.
74
- 6. Inspect the final deterministic report. Agent reviews are skipped for QUICK by default unless project policy enables them.
38
+ ## Context pressure before broad work
75
39
 
76
- ## SPEC path
40
+ Do not wait for model compaction as the normal context lifecycle.
77
41
 
78
- 1. Run `aeh sdd new <id> --title "..."`.
79
- 2. Complete proposal, spec, design, tasks and executable acceptance/Gherkin as appropriate.
80
- 3. Ensure stable requirement IDs and validator traceability.
81
- 4. Run `aeh sdd validate <id>`.
82
- 5. Run `aeh run <id>` with the appropriate profile.
83
- 6. The Harness owns delegation, deterministic validation, repair, quality convergence, reviewer waves, regression rollback, agent/model escalation, autonomous replanning and final lead acceptance.
42
+ - below 70%: normal operation;
43
+ - 70–80%: pressure mode; stop exploratory shell work and increase delegation;
44
+ - >=80%: proactive handoff to a fresh lead;
45
+ - >=90%: mandatory handoff before additional engineering work.
84
46
 
85
- ## Quality convergence
47
+ Use Paseo's current status/tool data when it exposes context usage, otherwise use `aeh context guard --agent "$PASEO_AGENT_ID"`. When AEH writes a `.harness/paseo/handoffs/*.json` artifact, use `/paseo-handoff` (preferred) or a fresh `create_agent`, point the new lead at that artifact and stop continuing the workflow in the old lead. Deterministic artifacts, not a prose replay of the whole chat, carry state across the handoff.
86
48
 
87
- Do not stop or ask the user because a remediation round count has been reached. Review remediation is governed by the Final Quality Gate, not a maximum number of rounds.
49
+ ## Intent layer
88
50
 
89
- Default quality weights use integer DebtPoints: critical=300, high=75, medium=24, low=3, note=1. Therefore three notes equal one low and DebtScore is DebtPoints/3. Final acceptance requires critical=0, high=0, medium=0, low<=3 and DebtScore<=3.
51
+ Classify every request as:
90
52
 
91
- When quality is improving, continue autonomously. When it stagnates, regresses or cycles, allow the Harness to change strategy, escalate from the workhorse to stronger agents/models, diagnose root cause and replan. A remediation that worsens deterministic validation or review debt is rolled back before the next strategy is attempted.
53
+ - `INFORMATIONAL`: explanation/lookup only. May be answered directly and must remain non-mutating.
54
+ - `AUDIT`: read-only engineering review/validation/security/architecture/performance/quality/coverage/PR analysis. Must use `aeh audit`.
55
+ - `CHANGE`: implementation, fix, refactor, addition, removal, dependency/config update or other repository mutation. Must continue through deterministic QUICK/SPEC triage.
92
56
 
93
- ## Human-on-exception
57
+ When not trivially informational, use `aeh intent` with compact evidence. Never use the informational exception for ad-hoc engineering assessment.
58
+
59
+ ## Environment readiness
60
+
61
+ `aeh start` owns initial managed-tool reconciliation. During a user turn, the lead must not personally perform long doctor/setup/npm/Paseo debugging sequences.
62
+
63
+ When readiness fails:
64
+
65
+ 1. delegate the failure plus exact deterministic message to `environment-manager`;
66
+ 2. environment-manager runs the bounded `aeh doctor`, `aeh setup`, `aeh agents check` and Paseo/toolchain recovery needed;
67
+ 3. receive only its compact outcome and relevant failure classification;
68
+ 4. retry the same sealed operation if readiness is restored;
69
+ 5. surface `BLOCKED_EXTERNAL` only for a genuinely unavailable host prerequisite, credential or service after bounded recovery.
70
+
71
+ Do not invoke sudo or silently install unmanaged host prerequisites.
72
+
73
+ ## AUDIT path
74
+
75
+ 1. Invoke `aeh audit "<request>"`, passing concrete file/domain/risk hints when useful. Repository-wide scope is valid.
76
+ 2. AEH freezes the control plane, runs deterministic validators, classifies failures, invokes read-only reviewers, deduplicates findings and calculates quality debt.
77
+ 3. Validator failures remain evidence; do not reinterpret them as PASS.
78
+ 4. Persisted reports under `.harness/audits/` are durable input for later remediation.
79
+ 5. AUDIT never implements fixes. A later "fix these" is a new CHANGE using the AuditReport as evidence.
94
80
 
95
- Human intervention is the final exception path, not a routine review step. Request a human decision only when the Harness identifies one of these states:
81
+ ## Issue-driven CHANGE path
96
82
 
97
- - `SPEC_CONTRADICTION`: authoritative requirements cannot all be satisfied.
98
- - `REQUIRES_PRODUCT_DECISION`: the repository/spec/issue cannot determine a required business/product choice.
99
- - `BLOCKED_EXTERNAL`: a required host prerequisite, credential, account permission, push permission or external resource is unavailable to the Harness/agents.
100
- - `ISSUE_DRIFT`: a frozen issue's title/body changed after intake and accepting that new intent requires an explicit refresh decision once implementation state exists.
83
+ For an existing GitHub issue, use `aeh issue implement <number>` (or `aeh run --issue <number>`). AEH freezes issue content, creates/reuses the issue-linked delivery state, derives QUICK/SPEC artifacts and guards issue drift. Do not create a duplicate issue or manually restate the issue into an independent spec.
101
84
 
102
- Missing managed toolchain components are not by themselves human exceptions: attempt `aeh setup` first. Implementation defects, review debt, regressions, cycles, invalid strategies and ordinary tool failures stay inside autonomous recovery/escalation whenever possible.
85
+ ## Non-issue CHANGE discovery and triage
103
86
 
104
- ## Triage escalation rules
87
+ 1. Delegate repository discovery to `explorer`. Request only relevant files/symbols/tests/boundaries and evidence.
88
+ 2. For non-trivial work, delegate planning/triage evidence to `planner`. Planner remains read-only and does not run broad validation or author specs.
89
+ 3. Feed those compact outputs to deterministic `aeh triage`.
90
+ 4. Obey QUICK/SPEC without manual downgrade.
105
91
 
106
- Treat architecture, authentication/authorization/security, tenant isolation, schema/migrations, public API compatibility, new dependencies, cross-module refactors, ambiguous requirements and medium/high risk as SPEC. A QuickContract must never be used to bypass these boundaries. QUICK scope must identify concrete files rather than broad wildcard patterns.
92
+ Architecture, auth/security, tenant isolation, schema/migrations, public API compatibility, new dependencies, cross-module refactors, ambiguous requirements and medium/high risk are SPEC. QUICK requires explicit concrete files; if scope grows into a disallowed condition, escalate instead of broadening it.
107
93
 
108
- If a QUICK implementation later reveals one of these conditions, stop the quick change and escalate to a new SPEC workflow rather than broadening the QuickContract.
94
+ ## QUICK path
95
+
96
+ For a CHANGE classified QUICK:
97
+
98
+ 1. Create a bounded QuickContract with explicit scope and observable acceptance.
99
+ 2. `aeh quick validate <id>`.
100
+ 3. `aeh run <id>`.
101
+ 4. Remain the parent lead; implementation and validation belong to AEH workers.
102
+
103
+ ## SPEC path — OpenSpec authoring
104
+
105
+ The lead must not write proposal/spec/design/tasks/Gherkin itself.
106
+
107
+ 1. Delegate SPEC ownership to `spec-manager` with user intent plus compact explorer/planner evidence.
108
+ 2. spec-manager runs `aeh spec prepare <taskId> --title "..."` and follows `openspec status` / `openspec instructions` to author proposal, specs, design and tasks.
109
+ 3. spec-manager runs strict OpenSpec validation, then `aeh spec compile <taskId> --title "..." --change <change>`.
110
+ 4. AEH deterministically compiles OpenSpec requirements/scenarios/tasks into native traceable SDD files, TaskContract and acceptance feature.
111
+ 5. spec-manager runs `aeh sdd validate <taskId>` and returns only compact requirement IDs, change name and unresolved decisions.
112
+ 6. The lead proceeds with normal seal/run/handoff. The compiled AEH artifacts and seal are normative during implementation; OpenSpec is authoring provenance before freeze.
113
+ 7. Do not use OpenSpec apply commands to implement product code. AEH owns implementation, validation, review convergence and delivery.
114
+
115
+ If OpenSpec cannot express a true product decision without guessing, return `REQUIRES_PRODUCT_DECISION`; otherwise author and validate autonomously.
116
+
117
+ ## Quality convergence and recovery
109
118
 
110
- ## Mobile/Paseo behavior
119
+ After a sealed run starts, do not reimplement Harness state machines in the lead. AEH owns planner waves, deterministic barriers, repair packets, reviewer waves, regression rollback, quality convergence, stronger-agent/model escalation, oracle diagnosis, replanning, evidence and delivery.
111
120
 
112
- When started as a Codex lead inside Paseo, remain the parent session. When that session was created by `aeh start`, treat every later repository-changing prompt as automatically invoking this skill; never ask the user to select the Harness workflow first. Use the Harness as the control layer and allow it to spawn routed OpenCode/Codex work through the configured transports. Before delegation, reconcile the toolchain autonomously when needed. For `implement issue #X`, prefer `aeh issue implement X`; that command owns intake, freeze, optional handoff/worktree, execution and configured accepted-delivery finalization. Surface only meaningful status, deterministic failures that cannot self-recover, permission requests, true human-on-exception states, final acceptance and resulting PR/delivery state to the user. Do not surface every remediation or provisioning step as a request for approval.
121
+ Default acceptance remains: critical/high/medium = 0, low <= 3, DebtScore <= 3. Do not stop because an arbitrary remediation count elapsed.
122
+
123
+ If execution reports an environment/tool failure, delegate it to `environment-manager`; if it reports an implementation/review failure, let AEH's recovery/convergence path own it. The lead only intervenes when the state machine reaches a true semantic/exception boundary.
124
+
125
+ ## Human-on-exception
126
+
127
+ Request human input only for:
128
+
129
+ - `SPEC_CONTRADICTION`;
130
+ - `REQUIRES_PRODUCT_DECISION`;
131
+ - `BLOCKED_EXTERNAL` after bounded delegated recovery;
132
+ - `ISSUE_DRIFT` when changed intent must be explicitly accepted after implementation state exists.
113
133
 
114
134
  ## Self-modification
115
135
 
116
- If the repository being modified is the Harness itself or the task changes `.harness/agents.source.jsonc`, `.harness/toolchain.yaml`, skills, policies, validators or orchestration rules, the run is governed by the controller/topology/toolchain state that existed at run start. New control-plane rules become active only on a subsequent run after validation/merge.
136
+ If the repository is AEH itself or the task changes topology, toolchain, skills, policies, validators or orchestration, the active run remains governed by the frozen controller from run start. New rules activate only on a later run.
137
+
138
+ ## User-facing communication
139
+
140
+ Keep status concise. Do not narrate every shell command or subagent read. Surface meaningful transitions such as `AUDIT`, `QUICK`, `SPEC`, spec validated, run started, deterministic blocker, quality convergence state, handoff, final acceptance/delivery. The lead's context is reserved for decisions, not operational transcripts.
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: openspec-authoring
3
+ purpose: Author SPEC changes with OpenSpec, then compile them into sealed AEH normative artifacts without making the lead write specifications.
4
+ ---
5
+
6
+ # OpenSpec authoring for AEH
7
+
8
+ You are the bounded SPEC authoring agent. Do not implement product code.
9
+
10
+ 1. Receive a task id, title, user intent, planner evidence, affected areas, risks and explicit product decisions from the lead.
11
+ 2. Run `aeh spec prepare <taskId> --title "..."`. This creates or reuses the corresponding OpenSpec change using the configured schema.
12
+ 3. Use OpenSpec's agent-compatible workflow rather than inventing an independent document format:
13
+ - `openspec status --change <change> --json`;
14
+ - `openspec instructions <artifact> --change <change> --json`;
15
+ - write only the artifact requested by those instructions;
16
+ - continue until the artifacts required for the approved change are complete.
17
+ 4. Decide the behavior-spec boundary explicitly:
18
+ - if observable behavior changes, create the required delta specs with `### Requirement:` and `#### Scenario:` sections;
19
+ - if the change is a pure refactor/tooling/docs/internal-readability change whose observable behavior must remain identical, do **not** invent a fake delta spec. Set `skip_specs: true` in the change's `.openspec.yaml` and make the preservation boundary explicit in proposal/design/tasks;
20
+ - if later discovery shows behavior actually changes, remove `skip_specs: true` and author the real delta specs. Never keep both the skip marker and behavioral deltas.
21
+ 5. Keep scope and requirements grounded in user intent and repository/planner evidence. Record assumptions. Do not silently make product decisions that require a human.
22
+ 6. Run `openspec validate <change> --strict --json` until valid. Treat structural warnings/errors as authoring failures, not implementation failures.
23
+ 7. Run `aeh spec compile <taskId> --title "..." --change <change>`. AEH deterministically maps OpenSpec requirements/scenarios/tasks into traceable native SDD files, TaskContract and acceptance artifacts. For a valid `skip_specs` refactor, AEH generates the explicit behavior-preservation requirement needed by its evidence model.
24
+ 8. Run `aeh sdd validate <taskId>`. Return only the compact result, requirement IDs, OpenSpec change name and any unresolved human decision.
25
+
26
+ OpenSpec is the authoring source before freeze. The compiled AEH TaskContract/SDD plus seal are normative during implementation. Do not use `/opsx:apply` to implement code; AEH owns implementation, validation, review convergence and delivery.
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: paseo-orchestration
3
+ purpose: Keep AEH leads thin by delegating through Paseo native/MCP tools and orchestration skills instead of ad-hoc shell control.
4
+ ---
5
+
6
+ # Paseo orchestration
7
+
8
+ Use this skill whenever an AEH lead, planner or coordinator delegates work through Paseo.
9
+
10
+ ## Preferred control surface
11
+
12
+ When Paseo tools are injected into the current agent, prefer them over shell commands:
13
+
14
+ - `create_agent` for a bounded subagent;
15
+ - `send_agent_prompt` for follow-up work;
16
+ - `get_agent_status` and `get_agent_activity` for compact observation;
17
+ - `cancel_agent` / `archive_agent` for lifecycle cleanup;
18
+ - `update_agent` / `set_agent_mode` for supported runtime changes.
19
+
20
+ Load `/paseo` when the exact current Paseo surface is needed. Use `/paseo-handoff` when responsibility, not merely a subtask, should move to a fresh agent. `/paseo-committee` and `/paseo-advisor` are analysis-only escalation tools and must not replace deterministic AEH gates.
21
+
22
+ The Harness CLI/daemon adapter remains a deterministic fallback when native tools are unavailable. Do not hand-write `paseo run` shell loops from the lead unless AEH explicitly reports that it is using the CLI fallback.
23
+
24
+ ## Lead discipline
25
+
26
+ The lead owns intent, high-level routing, true ambiguity and final semantic acceptance. Delegate:
27
+
28
+ - repository discovery -> `explorer`;
29
+ - environment/toolchain/daemon recovery -> `environment-manager`;
30
+ - non-trivial decomposition -> `planner`;
31
+ - SPEC authoring -> `spec-manager`;
32
+ - implementation/review -> Harness-selected workers/reviewers.
33
+
34
+ Return compact structured summaries to the lead. Do not paste raw logs or entire source files unless they contain evidence needed for a decision.
35
+
36
+ ## Context pressure
37
+
38
+ Before broad engineering work, inspect the current agent status if Paseo exposes context usage. At the configured handoff threshold, create a deterministic AEH handoff artifact and use `/paseo-handoff` (preferred) or `create_agent` to continue in a fresh lead. Do not compact and continue as the normal path when AEH has declared `HANDOFF_REQUIRED` or `HARD_HANDOFF`.
@@ -2,27 +2,45 @@
2
2
 
3
3
  ## Interactive entry
4
4
 
5
- When a user is interacting through Paseo or another conversational coding-agent UI, every natural-language request that could mutate this repository must enter through the `engineering-workflow` Harness path. The user does not need to mention AEH, QUICK, SPEC, SDD, TaskContracts or validators. Build triage evidence automatically, obey the deterministic QUICK/SPEC result and invoke the Harness rather than editing directly as a shortcut. Read-only questions may be answered directly when they do not mutate repository state.
5
+ When a user is interacting through Paseo or another conversational coding-agent UI, every engineering operation must enter through the `engineering-workflow` Harness path, whether read-only or mutating. The user does not need to mention AEH, AUDIT, QUICK, SPEC, OpenSpec, SDD, TaskContracts or validators.
6
6
 
7
- `aeh start` is the preferred Paseo entrypoint. It creates or reuses a persistent top-level Harness lead whose conversation is bootstrapped with this rule.
7
+ Classify requests as:
8
8
 
9
- ## Lead agent
9
+ - `INFORMATIONAL`: explanation or lookup only. These may be answered directly and must not mutate repository state.
10
+ - `AUDIT`: review, validation, bug discovery, architecture/security/performance/quality assessment, coverage analysis, PR/code review or similar read-only engineering work. These must run through the Harness audit pipeline.
11
+ - `CHANGE`: implementation, fixes, refactors, additions, removals, configuration or any repository mutation. These must continue through deterministic QUICK/SPEC triage and Harness execution.
10
12
 
11
- The lead agent owns requirements interpretation, architecture, SDD artifacts, decomposition, review and final semantic acceptance. Prefer Codex for this role.
13
+ Do not use the informational exception for an ad-hoc engineering review. `aeh start` is the preferred Paseo entrypoint. A normal start creates a fresh lead; `aeh start --resume` is explicit reuse.
12
14
 
13
- Before delegating implementation:
15
+ ## Lead agent — thin orchestrator
14
16
 
15
- 1. Inspect current repository state and relevant structural context.
16
- 2. Recover historical memory only as advisory context.
17
- 3. Produce/update proposal, specification, design and executable acceptance criteria.
18
- 4. Create a TaskContract with explicit scope, invariants and deterministic validators.
19
- 5. Freeze the TaskContract before implementation begins.
17
+ The lead owns user intent, high-level routing, true ambiguity and final semantic acceptance. It does **not** own routine repository exploration, environment repair, SDD authoring or implementation.
20
18
 
21
- After the worker finishes, inspect the actual diff and deterministic validation report. Never accept work solely from a worker summary.
19
+ Delegate by default:
20
+
21
+ - repository discovery -> `explorer`;
22
+ - toolchain/doctor/Paseo recovery -> `environment-manager`;
23
+ - non-trivial decomposition/triage evidence -> `planner`;
24
+ - SPEC authoring -> `spec-manager` using OpenSpec;
25
+ - implementation/validation/review -> Harness-selected workers.
26
+
27
+ Prefer Paseo's injected orchestration tools and `/paseo-handoff` over hand-written shell orchestration when available. Preserve the lead context for decisions rather than raw logs and source dumps.
28
+
29
+ For engineering work:
30
+
31
+ 1. Check context pressure before broad work. Around 70% stop exploratory work; at 80% hand off proactively to a fresh lead using the deterministic `.harness/paseo/handoffs/` artifact; at 90% handoff is mandatory rather than normal compaction-and-continue.
32
+ 2. Classify `INFORMATIONAL | AUDIT | CHANGE` through AEH when not trivially informational.
33
+ 3. AUDIT -> `aeh audit`.
34
+ 4. CHANGE -> delegate discovery/planning, then obey deterministic QUICK/SPEC.
35
+ 5. QUICK -> bounded QuickContract and AEH run.
36
+ 6. SPEC -> delegate to `spec-manager`; the lead must not write proposal/spec/design/tasks itself. OpenSpec is the authoring source, then `aeh spec compile` produces the traceable native AEH SDD/TaskContract used for sealing/execution.
37
+ 7. Environment/tool failures -> delegate bounded recovery to `environment-manager`; do not personally execute long npm/git/Paseo diagnostic sequences.
38
+
39
+ After workers finish, use actual deterministic reports/evidence and the final semantic gate. Never accept work solely from a worker summary.
22
40
 
23
41
  ## Worker agent
24
42
 
25
- The worker implements an assigned frozen task. Prefer OpenCode with the configured workhorse model.
43
+ The worker implements an assigned frozen task. Prefer the configured workhorse model.
26
44
 
27
45
  The worker must not:
28
46
 
@@ -32,12 +50,13 @@ The worker must not:
32
50
  - weaken acceptance criteria or validators to make a task pass;
33
51
  - introduce new dependencies, schema changes or breaking APIs unless the TaskContract permits them.
34
52
 
35
- If the plan conflicts with reality, report the blocker to the lead agent instead of silently redesigning the system.
53
+ If the plan conflicts with reality, report the blocker instead of silently redesigning the system.
36
54
 
37
55
  ## Source-of-truth order
38
56
 
39
57
  1. Current Git-versioned code and schemas.
40
- 2. Frozen TaskContract and current SDD artifacts.
41
- 3. ADRs and project policy.
42
- 4. Executable acceptance criteria.
43
- 5. Memory backend as historical/advisory context only.
58
+ 2. Frozen TaskContract and compiled AEH SDD artifacts for CHANGE work; persisted AuditReport for prior AUDIT evidence.
59
+ 3. OpenSpec source artifacts as pre-freeze authoring provenance.
60
+ 4. ADRs and project policy.
61
+ 5. Executable acceptance criteria and deterministic validator evidence.
62
+ 6. Memory backend as historical/advisory context only.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 1,
3
- "extends": ["aeh:default"],
3
+ "extends": ["aeh:orchestration"],
4
4
  "activeProfile": "balanced",
5
5
 
6
6
  // Override a built-in model alias once and every agent using it follows.
@@ -0,0 +1,24 @@
1
+ schema: spec-driven
2
+
3
+ context: |
4
+ This repository uses Agentic Engineering Harness (AEH) as the execution and validation control plane.
5
+ OpenSpec is the SPEC authoring source before freeze. After `aeh spec compile`, the compiled AEH SDD/TaskContract and SHA-256 seal are normative for implementation.
6
+ Keep requirements observable, preserve existing public behavior unless change is explicit, and ground design decisions in repository evidence supplied by the planner/explorer.
7
+ For pure refactors/tooling/docs/internal-readability changes with no observable behavior delta, declare `skip_specs: true` in the change `.openspec.yaml` instead of inventing a behavioral delta. If behavior changes, remove the marker and author real delta specs.
8
+
9
+ rules:
10
+ proposal:
11
+ - State the problem, desired outcome, scope and non-goals.
12
+ - Do not silently invent product decisions; record unresolved decisions explicitly.
13
+ - State explicitly whether externally observable behavior changes.
14
+ specs:
15
+ - Use explicit `### Requirement:` sections.
16
+ - Use `#### Scenario:` sections with GIVEN/WHEN/THEN bullets for observable behavior.
17
+ - Describe behavior, not implementation trivia.
18
+ - Do not create a spec delta for a pure no-behavior refactor; use the OpenSpec skip_specs marker instead.
19
+ design:
20
+ - Map the proposed approach to repository boundaries and risks.
21
+ - Call out API, schema, security and compatibility impact explicitly.
22
+ - For no-behavior refactors, document how behavior preservation will be proven deterministically.
23
+ tasks:
24
+ - Keep tasks bounded and dependency-aware so AEH can compile them into executable planner work.
@@ -98,9 +98,14 @@ orchestration:
98
98
  autoSetup: true
99
99
  webUi: true
100
100
  leadAgent: lead
101
- reuseSession: true
101
+ sessionPolicy: fresh-on-start
102
+ usePaseoTools: true
102
103
  stateDir: .harness/paseo
103
104
  title: AEH Lead
105
+ context:
106
+ pressureThreshold: 0.70
107
+ handoffThreshold: 0.80
108
+ hardHandoffThreshold: 0.90
104
109
 
105
110
  toolchain:
106
111
  configPath: .harness/toolchain.yaml
@@ -215,6 +220,10 @@ sdd:
215
220
  reportsDir: .harness/reports
216
221
  repairsDir: .harness/repairs
217
222
  runsDir: .harness/runs
223
+ authoring:
224
+ provider: openspec
225
+ schema: spec-driven
226
+ managerAgent: spec-manager
218
227
 
219
228
  validation:
220
229
  baseRef: main
@@ -262,4 +271,4 @@ evals:
262
271
 
263
272
  provenance:
264
273
  outputDir: .harness/provenance
265
- buildType: https://github.com/JamesMorales04/agentic-engineering-harness/v0.5
274
+ buildType: https://github.com/JamesMorales04/agentic-engineering-harness/v0.6
@@ -17,6 +17,9 @@ profiles:
17
17
  agents:
18
18
  extends: [core]
19
19
  tools: [codex, opencode, paseo]
20
+ spec:
21
+ extends: [core]
22
+ tools: [openspec]
20
23
  intelligence:
21
24
  extends: [core]
22
25
  tools: [uv, graphify]
@@ -24,7 +27,7 @@ profiles:
24
27
  extends: [core]
25
28
  tools: [opa, opengrep, trivy, cosign]
26
29
  full:
27
- extends: [agents, intelligence, validation]
30
+ extends: [agents, spec, intelligence, validation]
28
31
  tools: [podman, dotnet, bun]
29
32
 
30
33
  tools:
@@ -77,6 +80,13 @@ tools:
77
80
  version: latest
78
81
  activateWhen: [orchestration:paseo, delivery:paseo]
79
82
 
83
+ openspec:
84
+ kind: mise
85
+ command: openspec
86
+ source: "npm:@fission-ai/openspec"
87
+ version: latest
88
+ activateWhen: [spec-authoring:openspec]
89
+
80
90
  uv:
81
91
  kind: mise
82
92
  command: uv