Skip to content

Commit 1ddf66f

Browse files
Add origin Autopilot verification contract.
Why: Codex Autopilot yml-era runtimes load target verification only from origin-default-branch autopilot.yml. Missing that file parks PR runs as waiting_external_prereq / external_prereq.missing and is not skip. Changed: - add root autopilot.yml with verify.command npm test - protect autopilot.yml, .agents/**, WORKFLOW.md, and package manifests - give harness-contract exclusive ownership of autopilot.yml - cover scripts/check_managed_skill_ownership.sh on that same manifest - document the origin Autopilot gate in spec/agents.md, spec/build-and-test.md, and spec/project-structure.md Verification: - npm --prefix agent-harness run preflight -- --paths-file changed-paths.txt pass - npm run agent:verify -- --profile spec-only pass - public-front-door 18/18 pass - managed-skill-ownership pass Affected: - autopilot.yml - .agents/manifests/harness-contract.yaml - spec/agents.md - spec/build-and-test.md - spec/project-structure.md Refs: - Autopilot target-contract origin yml Session: - task-sessions/autopilot-yml-origin-contract
1 parent fa01d9e commit 1ddf66f

5 files changed

Lines changed: 48 additions & 3 deletions

File tree

.agents/manifests/harness-contract.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ globs:
55
- AGENTS.md
66
- CLAUDE.md
77
- WORKFLOW.md
8+
- autopilot.yml
89
- package-lock.json
910
- package.json
1011
- scripts/agent_detached_status.cjs
1112
- scripts/bootstrap_agent_harness.sh
13+
- scripts/check_managed_skill_ownership.sh
1214
- scripts/validate.sh
1315
owner: harness-maintainer
1416
required_skills:
@@ -27,10 +29,12 @@ allowed_paths:
2729
- AGENTS.md
2830
- CLAUDE.md
2931
- WORKFLOW.md
32+
- autopilot.yml
3033
- package-lock.json
3134
- package.json
3235
- scripts/agent_detached_status.cjs
3336
- scripts/bootstrap_agent_harness.sh
37+
- scripts/check_managed_skill_ownership.sh
3438
- scripts/validate.sh
3539
- spec/**
3640
forbidden_paths:

autopilot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 1
2+
verify:
3+
command: npm test
4+
contract:
5+
protectedPaths:
6+
- .agents/**
7+
- WORKFLOW.md
8+
- autopilot.yml
9+
- package-lock.json
10+
- package.json

spec/agents.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Agents
2-
Related: `spec/README.md`, `spec/harness-integration.md`, `spec/build-and-test.md`, `spec/project-structure.md`, `WORKFLOW.md`, `.agents/manifests/specs.yaml`, `.agents/manifests/harness-contract.yaml`, `.agents/manifests/agent-harness-runtime.yaml`, `.agents/manifests/broker-runtime.yaml`, `.agents/manifests/implementation-foundation.yaml`, `.agents/verify/implementation.yaml`, `.agents/verify/spec-only.yaml`
2+
Related: `spec/README.md`, `spec/harness-integration.md`, `spec/build-and-test.md`, `spec/project-structure.md`, `WORKFLOW.md`, `autopilot.yml`, `.agents/manifests/specs.yaml`, `.agents/manifests/harness-contract.yaml`, `.agents/manifests/agent-harness-runtime.yaml`, `.agents/manifests/broker-runtime.yaml`, `.agents/manifests/implementation-foundation.yaml`, `.agents/verify/implementation.yaml`, `.agents/verify/spec-only.yaml`
33

44
## Purpose
55

@@ -13,7 +13,7 @@ Maintainers and agent runs still use `agent:context` / `agent:verify` /
1313

1414
## Current routing
1515

16-
- `harness-contract` exclusively owns `WORKFLOW.md`, `.agents/`, agent
16+
- `harness-contract` exclusively owns `WORKFLOW.md`, `autopilot.yml`, `.agents/`, agent
1717
instructions, the canonical validator, and harness setup files
1818
- `agent-harness-runtime` exclusively owns executable `agent-harness/` source,
1919
tests, and package metadata, so harness code changes run executable checks
@@ -47,6 +47,28 @@ project skill roots. Project-local skills remain source-owned in this repository
4747
- App workflow changes should route through the resolved skills above instead of ad hoc shell chains or undocumented local commands.
4848
- When the app needs desktop-only behavior that SwiftUI cannot express cleanly, document the exact gap first and keep the implementation covered by `swiftui-pro` and `xcode-build`.
4949

50+
## Autopilot origin contract
51+
Related: `autopilot.yml`, `WORKFLOW.md`, `spec/build-and-test.md`, `spec/project-structure.md`, `.agents/manifests/harness-contract.yaml`
52+
53+
Codex Autopilot loads target verification only from repository-root `autopilot.yml` on the origin default branch. It does not read `.agents` or `WORKFLOW.md` as the Autopilot gate. Local Symphony/agent runs still use `WORKFLOW.md` `validation.command` (`./scripts/validate.sh`) and `.agents`.
54+
55+
In scope: origin Autopilot verification command, protected verifier paths, and `harness-contract` ownership of `autopilot.yml`. Out of scope: replacing `agent:complete`, GitHub CI, or `scripts/validate.sh`; authorizing Autopilot-labeled product PR merges.
56+
57+
- `version` is integer `1`, not float `1.0`.
58+
- `verify.command` is `npm test`.
59+
- `contract.protectedPaths` includes `autopilot.yml`, `.agents/**`, `WORKFLOW.md`, `package.json`, and `package-lock.json`.
60+
- The `harness-contract` manifest is the single primary owner of `autopilot.yml`.
61+
- `autopilot.yaml` is invalid. Do not add a sibling alias.
62+
63+
| ID | Requirement | Verifier |
64+
|----|-------------|----------|
65+
| SB-AP-001 | Origin default branch contains regular-file `autopilot.yml` | Autopilot origin inspect `ready_on_origin`; `verify:spec-only` |
66+
| SB-AP-002 | `verify.command` is `npm test` | `autopilot.yml` contents; `verify:spec-only` |
67+
| SB-AP-003 | Worker edits under `.agents/**` and `WORKFLOW.md` are Autopilot protected paths | `autopilot.yml` `protectedPaths` |
68+
| SB-AP-004 | `autopilot.yml` has exactly one primary manifest (`harness-contract`) | `npm run agent:preflight -- --paths-file` / config-contract |
69+
70+
Missing origin `autopilot.yml` → Autopilot `waiting_external_prereq` / `external_prereq.missing`. Uncovered or overlapping `autopilot.yml` → spec-only / config-contract fail.
71+
5072
## Verification model
5173

5274
Use `npm run agent:verify -- --profile <profile-id> --paths <files> --session-dir <dir>` for deterministic checks.

spec/build-and-test.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ A first extracted implementation slice now exists:
7070

7171
The current deterministic verification contract includes implementation tests plus spec integrity.
7272

73+
Codex Autopilot is a separate origin-default-branch gate. It runs only the
74+
command in `autopilot.yml` (`npm test`). Autopilot does not read `.agents` or
75+
`WORKFLOW.md` as its contract. Missing origin `autopilot.yml` is not skip.
76+
Local full-repo validation remains `./scripts/validate.sh`. GitHub-hosted CI
77+
stays the split Ubuntu/macOS jobs and still does not run `test:app` or
78+
`verify:public-surface`.
79+
7380
Generated agent harness commands:
7481

7582
<!-- agent-harness-commands:start -->

spec/project-structure.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Project Structure
2-
Related: `spec/README.md`, `spec/global-simulator-broker.md`, `references/README.md`
2+
Related: `spec/README.md`, `spec/global-simulator-broker.md`, `references/README.md`, `autopilot.yml`
33

44
## Top-level layout
55

@@ -8,6 +8,8 @@ Related: `spec/README.md`, `spec/global-simulator-broker.md`, `references/README
88
- `.codex/environments/` — Codex environment bootstrap and Run actions
99
- `WORKFLOW.md` — public-safe repo-owned Symphony execution, validation,
1010
protected-path, and handoff contract
11+
- `autopilot.yml` — Codex Autopilot origin verification contract; Autopilot
12+
does not read `.agents` or `WORKFLOW.md` as that gate
1113
- `CHANGELOG.md` — published version history for tagged releases
1214
- `.github/workflows/` — public Node test CI and tag-driven CLI release
1315
- `Formula/` — Homebrew CLI formula for the tagged Alpha tarball. Source of

0 commit comments

Comments
 (0)