agentic-engineering-harness 0.4.16

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 (280) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +273 -0
  3. package/dist/agents/audit.d.ts +12 -0
  4. package/dist/agents/audit.js +14 -0
  5. package/dist/agents/audit.js.map +1 -0
  6. package/dist/agents/compiler.d.ts +8 -0
  7. package/dist/agents/compiler.js +103 -0
  8. package/dist/agents/compiler.js.map +1 -0
  9. package/dist/agents/config.d.ts +6 -0
  10. package/dist/agents/config.js +161 -0
  11. package/dist/agents/config.js.map +1 -0
  12. package/dist/agents/escalation.d.ts +9 -0
  13. package/dist/agents/escalation.js +75 -0
  14. package/dist/agents/escalation.js.map +1 -0
  15. package/dist/agents/exceptionDetection.d.ts +24 -0
  16. package/dist/agents/exceptionDetection.js +42 -0
  17. package/dist/agents/exceptionDetection.js.map +1 -0
  18. package/dist/agents/findings.d.ts +14 -0
  19. package/dist/agents/findings.js +40 -0
  20. package/dist/agents/findings.js.map +1 -0
  21. package/dist/agents/gitCheckpoint.d.ts +6 -0
  22. package/dist/agents/gitCheckpoint.js +61 -0
  23. package/dist/agents/gitCheckpoint.js.map +1 -0
  24. package/dist/agents/jsonc.d.ts +1 -0
  25. package/dist/agents/jsonc.js +42 -0
  26. package/dist/agents/jsonc.js.map +1 -0
  27. package/dist/agents/outputContracts.d.ts +161 -0
  28. package/dist/agents/outputContracts.js +16 -0
  29. package/dist/agents/outputContracts.js.map +1 -0
  30. package/dist/agents/parallelism.d.ts +14 -0
  31. package/dist/agents/parallelism.js +54 -0
  32. package/dist/agents/parallelism.js.map +1 -0
  33. package/dist/agents/permissions.d.ts +5 -0
  34. package/dist/agents/permissions.js +30 -0
  35. package/dist/agents/permissions.js.map +1 -0
  36. package/dist/agents/qualityConvergence.d.ts +44 -0
  37. package/dist/agents/qualityConvergence.js +77 -0
  38. package/dist/agents/qualityConvergence.js.map +1 -0
  39. package/dist/agents/recovery.d.ts +13 -0
  40. package/dist/agents/recovery.js +35 -0
  41. package/dist/agents/recovery.js.map +1 -0
  42. package/dist/agents/reviewLifecycle.d.ts +30 -0
  43. package/dist/agents/reviewLifecycle.js +233 -0
  44. package/dist/agents/reviewLifecycle.js.map +1 -0
  45. package/dist/agents/routing.d.ts +9 -0
  46. package/dist/agents/routing.js +37 -0
  47. package/dist/agents/routing.js.map +1 -0
  48. package/dist/agents/structuredOutput.d.ts +1 -0
  49. package/dist/agents/structuredOutput.js +54 -0
  50. package/dist/agents/structuredOutput.js.map +1 -0
  51. package/dist/agents/types.d.ts +207 -0
  52. package/dist/agents/types.js +2 -0
  53. package/dist/agents/types.js.map +1 -0
  54. package/dist/cli.d.ts +2 -0
  55. package/dist/cli.js +221 -0
  56. package/dist/cli.js.map +1 -0
  57. package/dist/core/config.d.ts +3 -0
  58. package/dist/core/config.js +59 -0
  59. package/dist/core/config.js.map +1 -0
  60. package/dist/core/doctor.d.ts +8 -0
  61. package/dist/core/doctor.js +59 -0
  62. package/dist/core/doctor.js.map +1 -0
  63. package/dist/core/git.d.ts +8 -0
  64. package/dist/core/git.js +47 -0
  65. package/dist/core/git.js.map +1 -0
  66. package/dist/core/init.d.ts +1 -0
  67. package/dist/core/init.js +52 -0
  68. package/dist/core/init.js.map +1 -0
  69. package/dist/core/quick.d.ts +20 -0
  70. package/dist/core/quick.js +49 -0
  71. package/dist/core/quick.js.map +1 -0
  72. package/dist/core/repair.d.ts +8 -0
  73. package/dist/core/repair.js +7 -0
  74. package/dist/core/repair.js.map +1 -0
  75. package/dist/core/run.d.ts +38 -0
  76. package/dist/core/run.js +165 -0
  77. package/dist/core/run.js.map +1 -0
  78. package/dist/core/sdd.d.ts +10 -0
  79. package/dist/core/sdd.js +88 -0
  80. package/dist/core/sdd.js.map +1 -0
  81. package/dist/core/seal.d.ts +3 -0
  82. package/dist/core/seal.js +74 -0
  83. package/dist/core/seal.js.map +1 -0
  84. package/dist/core/triage.d.ts +22 -0
  85. package/dist/core/triage.js +38 -0
  86. package/dist/core/triage.js.map +1 -0
  87. package/dist/core/types.d.ts +354 -0
  88. package/dist/core/types.js +2 -0
  89. package/dist/core/types.js.map +1 -0
  90. package/dist/core/verify.d.ts +6 -0
  91. package/dist/core/verify.js +51 -0
  92. package/dist/core/verify.js.map +1 -0
  93. package/dist/delivery/finalize.d.ts +17 -0
  94. package/dist/delivery/finalize.js +71 -0
  95. package/dist/delivery/finalize.js.map +1 -0
  96. package/dist/delivery/handoff.d.ts +39 -0
  97. package/dist/delivery/handoff.js +250 -0
  98. package/dist/delivery/handoff.js.map +1 -0
  99. package/dist/entry.d.ts +2 -0
  100. package/dist/entry.js +112 -0
  101. package/dist/entry.js.map +1 -0
  102. package/dist/evals/runner.d.ts +4 -0
  103. package/dist/evals/runner.js +112 -0
  104. package/dist/evals/runner.js.map +1 -0
  105. package/dist/evals/scoring.d.ts +3 -0
  106. package/dist/evals/scoring.js +41 -0
  107. package/dist/evals/scoring.js.map +1 -0
  108. package/dist/evals/types.d.ts +46 -0
  109. package/dist/evals/types.js +2 -0
  110. package/dist/evals/types.js.map +1 -0
  111. package/dist/issues/intake.d.ts +114 -0
  112. package/dist/issues/intake.js +213 -0
  113. package/dist/issues/intake.js.map +1 -0
  114. package/dist/memory/benchmark.d.ts +33 -0
  115. package/dist/memory/benchmark.js +69 -0
  116. package/dist/memory/benchmark.js.map +1 -0
  117. package/dist/metrics/runMetrics.d.ts +9 -0
  118. package/dist/metrics/runMetrics.js +34 -0
  119. package/dist/metrics/runMetrics.js.map +1 -0
  120. package/dist/metrics/usage.d.ts +3 -0
  121. package/dist/metrics/usage.js +53 -0
  122. package/dist/metrics/usage.js.map +1 -0
  123. package/dist/provenance/generate.d.ts +30 -0
  124. package/dist/provenance/generate.js +96 -0
  125. package/dist/provenance/generate.js.map +1 -0
  126. package/dist/providers/engram.d.ts +8 -0
  127. package/dist/providers/engram.js +14 -0
  128. package/dist/providers/engram.js.map +1 -0
  129. package/dist/providers/graphify.d.ts +9 -0
  130. package/dist/providers/graphify.js +28 -0
  131. package/dist/providers/graphify.js.map +1 -0
  132. package/dist/providers/paseo.d.ts +8 -0
  133. package/dist/providers/paseo.js +14 -0
  134. package/dist/providers/paseo.js.map +1 -0
  135. package/dist/providers/types.d.ts +41 -0
  136. package/dist/providers/types.js +2 -0
  137. package/dist/providers/types.js.map +1 -0
  138. package/dist/telemetry/events.d.ts +2 -0
  139. package/dist/telemetry/events.js +29 -0
  140. package/dist/telemetry/events.js.map +1 -0
  141. package/dist/telemetry/otlp.d.ts +3 -0
  142. package/dist/telemetry/otlp.js +57 -0
  143. package/dist/telemetry/otlp.js.map +1 -0
  144. package/dist/toolchain/config.d.ts +10 -0
  145. package/dist/toolchain/config.js +54 -0
  146. package/dist/toolchain/config.js.map +1 -0
  147. package/dist/toolchain/doctor.d.ts +8 -0
  148. package/dist/toolchain/doctor.js +56 -0
  149. package/dist/toolchain/doctor.js.map +1 -0
  150. package/dist/toolchain/mise.d.ts +10 -0
  151. package/dist/toolchain/mise.js +61 -0
  152. package/dist/toolchain/mise.js.map +1 -0
  153. package/dist/toolchain/resolve.d.ts +8 -0
  154. package/dist/toolchain/resolve.js +159 -0
  155. package/dist/toolchain/resolve.js.map +1 -0
  156. package/dist/toolchain/setup.d.ts +7 -0
  157. package/dist/toolchain/setup.js +141 -0
  158. package/dist/toolchain/setup.js.map +1 -0
  159. package/dist/toolchain/types.d.ts +95 -0
  160. package/dist/toolchain/types.js +2 -0
  161. package/dist/toolchain/types.js.map +1 -0
  162. package/dist/utils/process.d.ts +15 -0
  163. package/dist/utils/process.js +94 -0
  164. package/dist/utils/process.js.map +1 -0
  165. package/dist/validators/commands.d.ts +2 -0
  166. package/dist/validators/commands.js +28 -0
  167. package/dist/validators/commands.js.map +1 -0
  168. package/dist/validators/constraints.d.ts +6 -0
  169. package/dist/validators/constraints.js +30 -0
  170. package/dist/validators/constraints.js.map +1 -0
  171. package/dist/validators/diffScope.d.ts +2 -0
  172. package/dist/validators/diffScope.js +36 -0
  173. package/dist/validators/diffScope.js.map +1 -0
  174. package/dist/validators/evidence.d.ts +6 -0
  175. package/dist/validators/evidence.js +8 -0
  176. package/dist/validators/evidence.js.map +1 -0
  177. package/dist/validators/external.d.ts +3 -0
  178. package/dist/validators/external.js +22 -0
  179. package/dist/validators/external.js.map +1 -0
  180. package/dist/validators/gherkin.d.ts +3 -0
  181. package/dist/validators/gherkin.js +59 -0
  182. package/dist/validators/gherkin.js.map +1 -0
  183. package/dist/validators/graphify.d.ts +4 -0
  184. package/dist/validators/graphify.js +108 -0
  185. package/dist/validators/graphify.js.map +1 -0
  186. package/dist/validators/opa.d.ts +3 -0
  187. package/dist/validators/opa.js +43 -0
  188. package/dist/validators/opa.js.map +1 -0
  189. package/dist/validators/openapi.d.ts +25 -0
  190. package/dist/validators/openapi.js +98 -0
  191. package/dist/validators/openapi.js.map +1 -0
  192. package/dist/validators/registry.d.ts +2 -0
  193. package/dist/validators/registry.js +36 -0
  194. package/dist/validators/registry.js.map +1 -0
  195. package/dist/validators/toolCommand.d.ts +5 -0
  196. package/dist/validators/toolCommand.js +33 -0
  197. package/dist/validators/toolCommand.js.map +1 -0
  198. package/dist/validators/types.d.ts +13 -0
  199. package/dist/validators/types.js +2 -0
  200. package/dist/validators/types.js.map +1 -0
  201. package/dist/workers/agentPrompt.d.ts +3 -0
  202. package/dist/workers/agentPrompt.js +84 -0
  203. package/dist/workers/agentPrompt.js.map +1 -0
  204. package/dist/workers/direct.d.ts +13 -0
  205. package/dist/workers/direct.js +30 -0
  206. package/dist/workers/direct.js.map +1 -0
  207. package/dist/workers/factory.d.ts +4 -0
  208. package/dist/workers/factory.js +10 -0
  209. package/dist/workers/factory.js.map +1 -0
  210. package/dist/workers/paseo.d.ts +14 -0
  211. package/dist/workers/paseo.js +29 -0
  212. package/dist/workers/paseo.js.map +1 -0
  213. package/dist/workers/podman.d.ts +13 -0
  214. package/dist/workers/podman.js +22 -0
  215. package/dist/workers/podman.js.map +1 -0
  216. package/dist/workers/prompt.d.ts +4 -0
  217. package/dist/workers/prompt.js +4 -0
  218. package/dist/workers/prompt.js.map +1 -0
  219. package/dist/workers/types.d.ts +11 -0
  220. package/dist/workers/types.js +2 -0
  221. package/dist/workers/types.js.map +1 -0
  222. package/docs/ARCHITECTURE.md +47 -0
  223. package/docs/EVALS.md +28 -0
  224. package/docs/MEMORY.md +28 -0
  225. package/docs/OBSERVABILITY.md +18 -0
  226. package/docs/OSS_STACK.md +27 -0
  227. package/docs/PASEO.md +9 -0
  228. package/docs/PUBLISHING.md +110 -0
  229. package/docs/SDD.md +35 -0
  230. package/docs/SECURITY.md +21 -0
  231. package/docs/V0.2.md +42 -0
  232. package/docs/V0.3.md +40 -0
  233. package/docs/V0.4.11.md +30 -0
  234. package/docs/V0.4.12.md +88 -0
  235. package/docs/V0.4.13.md +203 -0
  236. package/docs/V0.4.14.md +209 -0
  237. package/docs/V0.4.15.md +365 -0
  238. package/docs/V0.4.16.md +229 -0
  239. package/docs/V0.4.md +28 -0
  240. package/docs/VALIDATION.md +23 -0
  241. package/package.json +18 -0
  242. package/policies/core/dependency-policy.rego +12 -0
  243. package/policies/core/schema-policy.rego +12 -0
  244. package/policies/core/trust-boundary.rego +17 -0
  245. package/presets/agents/default.jsonc +80 -0
  246. package/presets/docker.yaml +4 -0
  247. package/presets/dotnet.yaml +12 -0
  248. package/presets/expo.yaml +6 -0
  249. package/presets/generic.yaml +3 -0
  250. package/presets/nextjs.yaml +8 -0
  251. package/presets/node.yaml +6 -0
  252. package/presets/pnpm.yaml +6 -0
  253. package/presets/postgres.yaml +4 -0
  254. package/schemas/agent-output-planner.schema.json +1 -0
  255. package/schemas/agent-topology.schema.json +37 -0
  256. package/schemas/project.schema.json +36 -0
  257. package/schemas/quick-contract.schema.json +17 -0
  258. package/schemas/task-contract.schema.json +18 -0
  259. package/schemas/toolchain.schema.json +70 -0
  260. package/schemas/validation-report.schema.json +15 -0
  261. package/skills/acceptance-traceability/SKILL.md +13 -0
  262. package/skills/deterministic-validation/SKILL.md +15 -0
  263. package/skills/engineering-workflow/SKILL.md +108 -0
  264. package/skills/finding-dedup/SKILL.md +12 -0
  265. package/skills/github-delivery-lifecycle/SKILL.md +16 -0
  266. package/skills/implementation-worker/SKILL.md +17 -0
  267. package/skills/lead-engineer/SKILL.md +30 -0
  268. package/skills/memory-hygiene/SKILL.md +22 -0
  269. package/skills/prompt-drift-audit/SKILL.md +10 -0
  270. package/skills/recovery-classifier/SKILL.md +13 -0
  271. package/skills/routing-normalizer/SKILL.md +17 -0
  272. package/skills/sdd/SKILL.md +21 -0
  273. package/skills/simplify/SKILL.md +16 -0
  274. package/skills/verification-planning/SKILL.md +17 -0
  275. package/skills/worktree-lifecycle/SKILL.md +18 -0
  276. package/templates/AGENTS.md +37 -0
  277. package/templates/agents.source.jsonc +39 -0
  278. package/templates/otel-collector.yaml +21 -0
  279. package/templates/project.yaml +196 -0
  280. package/templates/toolchain.yaml +127 -0
@@ -0,0 +1,47 @@
1
+ # Architecture
2
+
3
+ ## Goal
4
+
5
+ Provide a reusable control layer between LLM coding agents and the source repository so software quality depends on explicit contracts and executable evidence rather than model self-confidence.
6
+
7
+ ## Layers
8
+
9
+ ### 1. Agent control plane
10
+
11
+ Paseo is the reference adapter. It owns process/session/worktree/mobile control, not product semantics.
12
+
13
+ ### 2. Semantic authority
14
+
15
+ A lead agent (reference: Codex) owns requirement interpretation, architecture, SDD and review.
16
+
17
+ ### 3. Implementation workers
18
+
19
+ Workers (reference: OpenCode + cost-efficient model) implement frozen, scoped tasks. They have no authority to redefine acceptance.
20
+
21
+ ### 4. Normative truth
22
+
23
+ Git-versioned specs, ADRs, TaskContracts and executable acceptance criteria define intended behavior.
24
+
25
+ ### 5. Structural truth
26
+
27
+ Graphify is the first code-intelligence adapter. Extracted graph relationships may support deterministic gates; inferred/ambiguous relationships should default to warnings until explicitly promoted.
28
+
29
+ ### 6. Historical memory
30
+
31
+ Engram is the first memory adapter. The interface is deliberately replaceable by Cognee/Graphiti or another backend.
32
+
33
+ ### 7. Gate authority
34
+
35
+ The deterministic harness evaluates build/type/lint/tests, scope, immutable files, API/schema policies, architecture, security and other machine-verifiable constraints.
36
+
37
+ ### 8. Policy
38
+
39
+ OPA/Rego centralizes reusable allow/deny decisions instead of spreading policy across shell scripts.
40
+
41
+ ### 9. Isolation
42
+
43
+ Worker execution should evolve toward an ephemeral rootless Podman sandbox with only the intended workspace writable, validation artifacts read-only, no SSH/private credentials and restricted network access.
44
+
45
+ ### 10. Measurement
46
+
47
+ Every task should emit machine-readable reports and telemetry. Historical tasks become eval cases to measure harness improvements objectively.
package/docs/EVALS.md ADDED
@@ -0,0 +1,28 @@
1
+ # Engineering Evals
2
+
3
+ The harness itself must be evaluated.
4
+
5
+ Each historical task can become a frozen eval case containing:
6
+
7
+ ```text
8
+ evals/corpus/EVAL-001/
9
+ ├── metadata.yaml
10
+ ├── task.md
11
+ ├── base-commit.txt
12
+ ├── expected-invariants.yaml
13
+ └── frozen-tests/
14
+ ```
15
+
16
+ Compare harness/model/config variants on identical base commits and tasks.
17
+
18
+ Primary metrics:
19
+
20
+ - deterministic task success;
21
+ - first-pass pass rate;
22
+ - repair count;
23
+ - human intervention rate;
24
+ - scope/architecture/security violation rate;
25
+ - lead-model and worker-model usage;
26
+ - elapsed time.
27
+
28
+ Production bugs should be converted into permanent regression/eval cases when practical.
package/docs/MEMORY.md ADDED
@@ -0,0 +1,28 @@
1
+ # Memory Model
2
+
3
+ ## Rule
4
+
5
+ Memory informs; it does not authorize.
6
+
7
+ The provider abstraction starts with Engram but must remain replaceable.
8
+
9
+ ## Store
10
+
11
+ - architectural decisions and rationale;
12
+ - important discoveries/gotchas;
13
+ - bugs and root causes;
14
+ - conventions;
15
+ - post-change implementation summaries;
16
+ - links back to authoritative Git artifacts.
17
+
18
+ ## Do not use memory as source of truth for
19
+
20
+ - current requirements;
21
+ - current API/schema;
22
+ - current acceptance criteria;
23
+ - current migration state;
24
+ - anything contradicted by the checked-out repository.
25
+
26
+ ## Future backend evaluation
27
+
28
+ Compare Engram, Cognee and Graphiti using the engineering eval corpus. Measure retrieval precision, stale-memory rate, latency, operational complexity and effect on first-pass validation success.
@@ -0,0 +1,18 @@
1
+ # Observability
2
+
3
+ The harness writes local NDJSON lifecycle events under `.harness/telemetry/` and creates OpenTelemetry spans through the OTel API.
4
+
5
+ Recommended task metrics:
6
+
7
+ - deterministic success rate;
8
+ - first-pass success rate;
9
+ - repair attempts;
10
+ - human interventions;
11
+ - scope and architecture violations;
12
+ - lead/worker token consumption (when available from provider telemetry);
13
+ - wall-clock duration;
14
+ - validation duration;
15
+ - memory retrieval/usefulness;
16
+ - cost when available.
17
+
18
+ A later collector/exporter integration can forward OTel data to any compatible open-source or hosted backend without changing core logic.
@@ -0,0 +1,27 @@
1
+ # OSS-first Technology Map
2
+
3
+ The default policy is **zero mandatory SaaS and zero mandatory commercial-license dependency for private repositories**.
4
+
5
+ Reference components:
6
+
7
+ | Concern | Default | Role |
8
+ |---|---|---|
9
+ | Agent runtime | Paseo | Cross-provider process/session/mobile control |
10
+ | Lead agent | Codex | Requirements, architecture, planning, review |
11
+ | Worker | OpenCode | Routine implementation using the configured workhorse model |
12
+ | Persistent memory | Engram | Advisory historical memory; adapter is replaceable |
13
+ | Code topology | Graphify | Structural graph and future architecture/blast-radius gates |
14
+ | Specification | SDD + Git | Versioned normative intent |
15
+ | Acceptance | Gherkin + Reqnroll | Executable business behavior for .NET consumers |
16
+ | Policy | OPA/Rego | Centralized allow/deny decisions |
17
+ | Static/security analysis | Opengrep | OSS rules/dataflow checks |
18
+ | Vulnerability/SBOM | Trivy | Dependency, secret, IaC and SBOM scanning |
19
+ | Integration dependencies | Testcontainers | Real ephemeral databases/services in tests |
20
+ | Web E2E | Playwright | Deterministic browser acceptance and traces |
21
+ | Consumer contracts | Pact/OpenAPI checks | API compatibility |
22
+ | Worker isolation | Podman rootless | Ephemeral least-privilege execution |
23
+ | Telemetry | OpenTelemetry | Portable traces/metrics/log semantics |
24
+ | Provenance | Cosign + in-toto | Artifact signing and attestations |
25
+ | Harness quality | Engineering eval corpus | Reproducible comparison of system variants |
26
+
27
+ Do not add a mandatory SaaS because it is convenient. Any hosted integration must be optional behind an interface and have a documented local/OSS path.
package/docs/PASEO.md ADDED
@@ -0,0 +1,9 @@
1
+ # Paseo Integration
2
+
3
+ Paseo is the default orchestration control plane because an existing lead agent can spawn an OpenCode subagent in the same workspace and keep controlling it remotely.
4
+
5
+ The executor uses the scriptable flow `paseo run --background --quiet`, `paseo wait`, `paseo logs`, and `paseo send` for repairs. When the lead itself is a Paseo agent, Paseo supplies parent/workspace defaults automatically.
6
+
7
+ The lead remains responsible for architecture and final semantic review. Paseo is an execution/control primitive, not the source of engineering truth.
8
+
9
+ For a directly container-isolated worker, configure `orchestration.provider: podman`. This trades Paseo child-session visibility for stronger process isolation. Advanced setups can instead configure a Paseo custom provider binary/wrapper around a containerized OpenCode CLI.
@@ -0,0 +1,110 @@
1
+ # Publishing Agentic Engineering Harness to npm
2
+
3
+ The package name is `agentic-engineering-harness` and the public CLI commands are `aeh` and `engineering-harness`.
4
+
5
+ The repository is prepared for npm Trusted Publishing through GitHub Actions OIDC. No long-lived npm publish token is stored in the repository workflow.
6
+
7
+ ## Preflight
8
+
9
+ Before any publication:
10
+
11
+ ```bash
12
+ npm run release:check
13
+ ```
14
+
15
+ This must pass typecheck, tests, build and `npm pack --dry-run`.
16
+
17
+ Check whether the desired package name already exists:
18
+
19
+ ```bash
20
+ npm view agentic-engineering-harness version
21
+ ```
22
+
23
+ An npm `E404` means the name is not currently published. If another owner controls the name, choose a scoped package name before publishing rather than changing package identity after adoption.
24
+
25
+ ## One-time first publication
26
+
27
+ npm Trusted Publisher configuration requires an npm package to exist first. The first release therefore needs one deliberate maintainer-authenticated publish.
28
+
29
+ From a clean checkout of the exact release commit:
30
+
31
+ ```bash
32
+ npm login
33
+ npm run release:check
34
+ npm publish --access public
35
+ ```
36
+
37
+ Complete the npm account's required 2FA/interactive authentication. Do not create a persistent automation token solely for this bootstrap.
38
+
39
+ After the first package exists, open the package settings on npmjs.com and configure a Trusted Publisher with:
40
+
41
+ ```text
42
+ Provider: GitHub Actions
43
+ Organization/user: JamesMorales04
44
+ Repository: agentic-engineering-harness
45
+ Workflow filename: publish.yml
46
+ Allowed action: npm publish
47
+ ```
48
+
49
+ The workflow file lives at `.github/workflows/publish.yml`; npm expects only the filename in the Trusted Publisher configuration.
50
+
51
+ For the strongest steady-state posture, after the OIDC flow has been proven once, disallow traditional publish tokens for the package and retain 2FA on the maintainer account.
52
+
53
+ ## Steady-state release
54
+
55
+ 1. Change `package.json` to the intended semantic version.
56
+ 2. Ensure the CLI dispatcher reports the same version.
57
+ 3. Merge only after CI `release:check` passes.
58
+ 4. Create/publish a GitHub Release tagged exactly:
59
+
60
+ ```text
61
+ v<package.json version>
62
+ ```
63
+
64
+ For example:
65
+
66
+ ```text
67
+ v0.4.16
68
+ ```
69
+
70
+ 5. The `publish-npm` workflow will:
71
+ - check out the release commit;
72
+ - use Node 24 on a GitHub-hosted runner;
73
+ - verify that the release tag exactly matches `package.json`;
74
+ - run `npm run release:check` again;
75
+ - execute `npm publish` using npm Trusted Publishing/OIDC.
76
+
77
+ If the tag/version check fails, no publish is attempted.
78
+
79
+ ## What enters the npm tarball
80
+
81
+ The `files` allowlist in `package.json` publishes only:
82
+
83
+ ```text
84
+ dist/
85
+ templates/
86
+ presets/
87
+ policies/
88
+ schemas/
89
+ skills/
90
+ docs/
91
+ ```
92
+
93
+ plus npm-required package metadata such as `package.json`, README and LICENSE.
94
+
95
+ This is why CI runs `npm pack --dry-run`: bootstrap templates, default agents, skills and toolchain schemas are runtime assets for `aeh init`, not merely repository documentation.
96
+
97
+ ## Consumer installation
98
+
99
+ Normal projects should pin AEH as a development dependency:
100
+
101
+ ```bash
102
+ npm install --save-dev agentic-engineering-harness
103
+ npm exec aeh -- init --setup
104
+ ```
105
+
106
+ AEH should not be imported into the product runtime merely to use the engineering workflow.
107
+
108
+ ## Failure policy
109
+
110
+ Publication is a delivery operation, not an engineering-quality gate. A registry/OIDC/permission failure must not cause the source commit to be rewritten or force-pushed. Fix the external publishing configuration and re-run/recreate the release process as appropriate while preserving the already-validated source commit.
package/docs/SDD.md ADDED
@@ -0,0 +1,35 @@
1
+ # SDD Operating Model
2
+
3
+ A change is incomplete until the following chain is coherent:
4
+
5
+ ```text
6
+ Explore → Proposal → Spec → Design → Acceptance → Tasks → Frozen Contract → Apply → Verify → Archive
7
+ ```
8
+
9
+ ## Gherkin boundary
10
+
11
+ Use Gherkin for **observable business behavior**, not implementation details.
12
+
13
+ Good:
14
+
15
+ ```gherkin
16
+ Rule: Staff cannot access another tenant's medical records
17
+
18
+ Scenario: Veterinarian requests a pet from another organization
19
+ Given Alice is a veterinarian in organization A
20
+ And Luna belongs to organization B
21
+ When Alice requests Luna's medical record
22
+ Then access is denied
23
+ ```
24
+
25
+ Bad:
26
+
27
+ ```gherkin
28
+ Scenario: Repository calls DbContext once
29
+ ```
30
+
31
+ Architecture/unit tests belong elsewhere.
32
+
33
+ ## Phase gates
34
+
35
+ A future version of the harness should validate requirement IDs across phases so later artifacts cannot silently add/remove requirements without an explicit decision.
@@ -0,0 +1,21 @@
1
+ # Security and Isolation
2
+
3
+ A Git worktree is not a security sandbox.
4
+
5
+ The target model is an ephemeral rootless container per worker:
6
+
7
+ - repository workspace writable;
8
+ - frozen contracts/acceptance validators read-only;
9
+ - no host SSH keys;
10
+ - no production credentials;
11
+ - network denied or allow-listed where possible;
12
+ - CPU/RAM/time limits;
13
+ - extract resulting diff, then destroy sandbox.
14
+
15
+ Recommended OSS tools:
16
+
17
+ - Podman rootless for worker isolation;
18
+ - Opengrep for deterministic pattern/dataflow checks;
19
+ - Trivy for vulnerabilities, secrets, IaC and SBOM scanning;
20
+ - OPA for policy-as-code;
21
+ - Cosign/in-toto for later provenance/attestations.
package/docs/V0.2.md ADDED
@@ -0,0 +1,42 @@
1
+ # v0.2 Operating Model
2
+
3
+ v0.2 turns the foundation into an executable engineering control loop.
4
+
5
+ ```text
6
+ Human / lead agent
7
+ -> SDD artifacts
8
+ -> traceability validation
9
+ -> frozen TaskContract + SHA-256 seal
10
+ -> Graphify before snapshot (when available)
11
+ -> worker executor
12
+ - Paseo -> OpenCode (default control-plane mode)
13
+ - Podman -> OpenCode (direct sandbox mode)
14
+ -> deterministic validation registry
15
+ -> structured repair packet on failure
16
+ -> bounded repair attempts
17
+ -> final ValidationReport + run artifact
18
+ ```
19
+
20
+ `aeh run TASK-ID` executes that flow. Architecture/requirements remain owned by the lead agent; workers only implement the frozen contract.
21
+
22
+ ## Traceability
23
+
24
+ A requirement is valid only when its canonical ID appears in `proposal.md`, `spec.md` as an `### ID` heading, `design.md`, `acceptance.feature` as `@ID`, `tasks.yaml`, the TaskContract and at least one known validator reference.
25
+
26
+ ## Executable acceptance
27
+
28
+ `adapter: gherkin` discovers a `.csproj` referencing Reqnroll and runs `dotnet test` filtered by the task tag. Non-.NET systems can provide `command:` explicitly.
29
+
30
+ ## Worker execution
31
+
32
+ Paseo mode preserves mobile/remote visibility and cross-provider orchestration. Direct Podman mode provides a stronger process boundary but is intentionally a separate execution mode; the harness does not claim Paseo itself is a container security boundary.
33
+
34
+ Paseo also supports custom provider binaries, so advanced users can point a Paseo provider at their own wrapper/container strategy outside the harness.
35
+
36
+ ## Repairs
37
+
38
+ Each failed deterministic check becomes a machine-readable repair packet. The worker receives only failing evidence and is asked for the smallest correction. The loop terminates after the configured budget.
39
+
40
+ ## Hard gates
41
+
42
+ Built-ins: Graphify, Opengrep, Trivy, Playwright, OpenAPI, Pact/custom command and Gherkin. Graphify refresh is not fabricated by the harness: the harness consumes `graphify-out/graph.json`, refreshed through Graphify's skill or a project-specific command.
package/docs/V0.3.md ADDED
@@ -0,0 +1,40 @@
1
+ # v0.3 — Measurement and Provenance
2
+
3
+ v0.3 turns the harness from an execution gate into a measurable engineering platform.
4
+
5
+ ## Engineering evals
6
+
7
+ An eval case lives at `evals/corpus/<case>/eval.yaml` and names a frozen `baseRef`, a task, optional fixture/setup, variants and deterministic expectations. `aeh eval run` creates a detached worktree, applies the fixture, runs the chosen variant, reads the harness run/report artifacts, scores the outcome, and destroys the worktree.
8
+
9
+ The score rewards deterministic success, first-pass success, low repair count, zero human intervention and bounded cost. `aeh eval compare` ranks historical results for the same case.
10
+
11
+ ## Runtime metrics
12
+
13
+ Every `aeh run` now records first-pass success, repair count, human interventions, wall-clock duration and any token/cost fields discoverable from structured worker output. Human interventions are explicit events recorded with `aeh intervention` so they cannot be hidden inside model prose.
14
+
15
+ ## OpenTelemetry
16
+
17
+ Local NDJSON remains the audit trail. Set `telemetry.exporter: otlp-http-json` and an endpoint (or standard `OTEL_EXPORTER_OTLP_ENDPOINT` / `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT`) to send trace-shaped events to an OTLP collector. `aeh init` installs `.harness/otel-collector.yaml` as a minimal OSS collector configuration.
18
+
19
+ ## Memory benchmark
20
+
21
+ `aeh memory-benchmark` runs the same YAML retrieval cases against every configured command provider. This intentionally does not make Engram, Cognee, Graphiti, or any memory store authoritative. Providers compete on recall, stale-answer contamination and latency.
22
+
23
+ ## Test quality
24
+
25
+ `mutation` and `property` are first-class validator adapters. Their commands are explicit because the correct implementation depends on the consumer stack (for example Stryker.NET vs StrykerJS or FsCheck vs fast-check).
26
+
27
+ ## Provenance
28
+
29
+ `aeh provenance generate --artifact <file>` creates:
30
+
31
+ - a SLSA v1 provenance predicate;
32
+ - an in-toto Statement v1 with the artifact SHA-256 as subject;
33
+ - an optional CycloneDX SBOM via Trivy;
34
+ - an optional Sigstore bundle via `cosign sign-blob` when `--sign` is requested.
35
+
36
+ The predicate links the artifact to the Git commit and, when a task ID is supplied, hashes of the run and validation reports.
37
+
38
+ ## Release hardening
39
+
40
+ The release workflow reruns the complete harness check and `npm pack --dry-run`. Publishing requires either a published GitHub Release or explicit manual dispatch plus `NPM_TOKEN`, and uses npm provenance.
@@ -0,0 +1,30 @@
1
+ # v0.4.9–v0.4.11 — Quick Workflow and Review Lifecycle
2
+
3
+ ## v0.4.9 — QuickContract and deterministic triage
4
+
5
+ `aeh triage` accepts evidence collected by the lead (request, explicit file scope, domains, risk and escalation flags). QUICK is allowed only for bounded low-risk work with no architecture/security/auth/schema/migration/public-API/dependency escalation signal. Everything else is SPEC.
6
+
7
+ A QuickContract is stored in the normal contracts directory with `mode: quick`, explicit acceptance statements, scope and immutable constraints (`breakingApiChanges=false`, `newDependencies=false`, `schemaChanges=false`). It is SHA-256 sealed like a normal TaskContract but does not require SDD artifacts.
8
+
9
+ Commands:
10
+
11
+ ```bash
12
+ aeh triage "Change button padding" --file src/Button.tsx --domain frontend --risk low
13
+ aeh quick new QUICK-001 --title "Adjust button padding" --request "Change button padding" --scope src/Button.tsx --acceptance "Button uses 16px padding" --domain frontend
14
+ aeh quick validate QUICK-001
15
+ aeh run QUICK-001
16
+ ```
17
+
18
+ ## v0.4.10 — Automatic review lifecycle
19
+
20
+ After deterministic validation passes for a SPEC task, the Harness executes routed reviewer agents concurrently. Reviewers must emit a typed `AEH_RESULT_JSON` payload. Findings are normalized and deduplicated. Configured blocking severities trigger bounded remediation followed by deterministic revalidation and another review round.
21
+
22
+ When reviewer blockers are cleared, an orchestrator/lead performs final semantic acceptance and must return a valid orchestrator output with `finalizationSafe=true` and no unresolved items.
23
+
24
+ Default policy skips agent reviewers and lead acceptance for QUICK changes to keep small changes inexpensive. Projects can enable them with `workflow.reviews.reviewQuick` and `leadAcceptanceQuick`.
25
+
26
+ ## v0.4.11 — Engineering workflow skill
27
+
28
+ `engineering-workflow` is installed by `aeh init` and attached to the default lead agent. It teaches a Codex lead—especially one started from Paseo mobile—to inspect the repo, gather triage evidence, obey QUICK/SPEC classification, create the correct contract/spec, invoke `aeh run`, remain the parent owner and surface only meaningful failures/approvals/final acceptance.
29
+
30
+ The skill also defines self-modification safety: control-plane changes produced during a run do not govern that same run; the new controller/topology becomes active on a later validated run.
@@ -0,0 +1,88 @@
1
+ # v0.4.12 — Autonomous Quality Convergence
2
+
3
+ v0.4.12 replaces the bounded reviewer-remediation loop with an autonomous quality convergence engine. Review remediation no longer succeeds or fails because a fixed number of rounds has elapsed. It continues until the Final Quality Gate passes or a genuine human-on-exception condition is discovered.
4
+
5
+ ## Final Quality Gate
6
+
7
+ The default policy uses integer DebtPoints so the configured ratios are exact:
8
+
9
+ | Severity | DebtPoints | DebtScore equivalent | Final maximum |
10
+ | --- | ---: | ---: | ---: |
11
+ | critical | 300 | 100 | 0 |
12
+ | high | 75 | 25 | 0 |
13
+ | medium | 24 | 8 | 0 |
14
+ | low | 3 | 1 | 3 |
15
+ | note | 1 | 1/3 | governed by aggregate score |
16
+
17
+ Three notes equal one low exactly. `DebtScore = DebtPoints / 3`. The default final gate requires `critical=0`, `high=0`, `medium=0`, `low<=3`, and `DebtPoints<=9` (`DebtScore<=3`). Thus nine notes can pass, ten notes cannot, and three lows plus one note cannot pass.
18
+
19
+ ## Convergence states
20
+
21
+ Each reviewer round is normalized and deduplicated, then fingerprinted and compared with accepted prior states. The engine records `INITIAL`, `IMPROVING`, `STABLE`, `STAGNATING`, `REGRESSING`, `CYCLING`, or `CONVERGED`, plus resolved, persistent, and introduced finding fingerprints.
22
+
23
+ No remediation-round maximum is used by this engine. Legacy `maxRemediationRounds` configuration is accepted for compatibility but ignored.
24
+
25
+ ## Regression rollback
26
+
27
+ Immediately before a remediation the Harness snapshots the current modified paths. If the remediation breaks deterministic validation or increases review debt, only paths affected by that remediation are restored to the checkpoint. The implementation state that existed before the rejected remediation remains intact. The Harness never uses a blanket `git reset --hard` or `git clean` for this rollback.
28
+
29
+ ## Automatic escalation
30
+
31
+ The default escalation ladder is:
32
+
33
+ 1. `normal` — current implementation worker / workhorse.
34
+ 2. `quality` — focused `quality-implementer` / workhorse.
35
+ 3. `senior` — `senior-implementer` / `@brain`.
36
+ 4. `diagnosis` — read-only `oracle` / `@brain`.
37
+ 5. `replan` — read-only `planner` / `@brain`, producing an advisory implementation plan without changing the sealed contract.
38
+
39
+ Critical findings can enter at the senior stage immediately. Improving quality de-escalates toward cheaper workers; stagnation, regression, and cycles escalate. After replanning, remediation resumes at the stronger implementation tier. Projects can replace stage agent names and model aliases in `project.yaml`.
40
+
41
+ ## Autonomous replanning
42
+
43
+ Replanning is implementation-only. The TaskContract, SDD artifacts and executable acceptance remain sealed normative truth. The planner receives the current quality state and normalized findings and emits the normal structured planner output. The result is persisted under the findings directory and supplied to subsequent remediation agents as advisory strategy.
44
+
45
+ ## Exception detection and human-on-exception
46
+
47
+ Review findings can explicitly classify exceptional conditions. The Harness also recognizes canonical exception categories. Routine implementation defects and `SYSTEM_FAILURE` remain autonomous. Human intervention is reserved for:
48
+
49
+ - `SPEC_CONTRADICTION` — authoritative requirements cannot simultaneously be satisfied.
50
+ - `REQUIRES_PRODUCT_DECISION` — the repository and sealed artifacts do not contain the required product/business decision.
51
+ - `BLOCKED_EXTERNAL` — required credentials, account permissions, secrets, or external resources are unavailable.
52
+
53
+ Run records persist `finalState`, `humanRequired`, remediation count, final DebtScore/DebtPoints, severity counts, convergence state and reviewer/diagnostic session count.
54
+
55
+ ## Default configuration
56
+
57
+ ```yaml
58
+ workflow:
59
+ reviews:
60
+ quality:
61
+ severityPoints:
62
+ critical: 300
63
+ high: 75
64
+ medium: 24
65
+ low: 3
66
+ note: 1
67
+ convergence:
68
+ minimumDebtPointImprovement: 3
69
+ stagnationWindow: 2
70
+ cycleDetection: true
71
+ regressionDetection: true
72
+ finalQualityGate:
73
+ maxBySeverity:
74
+ critical: 0
75
+ high: 0
76
+ medium: 0
77
+ low: 3
78
+ maxDebtPoints: 9
79
+ escalation:
80
+ criticalStartStage: 2
81
+ replanResumeStage: 2
82
+ stages:
83
+ - { name: normal, action: remediate }
84
+ - { name: quality, action: remediate, agent: quality-implementer }
85
+ - { name: senior, action: remediate, agent: senior-implementer, model: "@brain" }
86
+ - { name: diagnosis, action: diagnose, agent: oracle, model: "@brain" }
87
+ - { name: replan, action: replan, agent: planner, model: "@brain" }
88
+ ```