Skip to content

Commit 9da629e

Browse files
authored
Merge pull request #39 from PyAutoLabs/feature/ship-gate
docs: autonomous-ship gate — audited four-leg definition
2 parents 303e2ca + 87ce1a5 commit 9da629e

3 files changed

Lines changed: 41 additions & 17 deletions

File tree

AUTONOMY.md

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Where the dev workflow stops for a human today:
3030
|------------|--------|--------------|------------------|
3131
| Plan approval | write plan to the issue, proceed | write plan to the issue, proceed | present + wait |
3232
| Ship PR sign-off | proceed through the autonomous-ship gate; end at PR-open | park (`awaiting-input`), question to the issue, continue elsewhere | present + wait |
33-
| Heart YELLOW | park — human checkpoint at **every** level | park | present + wait |
33+
| Heart YELLOW | park, unless the reason set was human-acknowledged at launch (see the autonomous-ship gate) | same as `safe` | present + wait |
3434
| Heart RED | stop, report | stop, report | stop, report |
3535
| Merge / close | human, always | human, always | human, always |
3636
| Version ask | n/a — release is always `human-required` | n/a | ask |
@@ -69,19 +69,36 @@ evidence.
6969

7070
## The autonomous-ship gate
7171

72-
An unattended ship (checkpoint 2 at `safe`) requires **all four**, no
73-
substitutions:
74-
75-
1. worktree pytest on the affected repos (full suite),
76-
2. the curated smoke-test subset,
77-
3. review-faculty verdict **CLEAN**,
78-
4. Heart **GREEN**.
79-
80-
The gate's audit and precise composition are `PyAutoMind/feature/autonomy/`
81-
task 3; the review faculty is task 2. **Until both land, no run ships
82-
unattended**`--auto` ends at ship sign-off regardless of level. A failed
83-
gate downgrades the run to a human checkpoint: state written to the issue,
84-
nothing force-shipped.
72+
An unattended ship (checkpoint 2 at `safe`) requires **all four legs**, no
73+
substitutions. Audited 2026-07-08 (issue #38); each leg carries an
74+
applicability rule so "n/a" is a stated fact, never an assumption:
75+
76+
1. **Tests** — worktree pytest (full suite, `-x`) on every **shipped** repo,
77+
*plus* every downstream library repo when the diff touches public API
78+
(review-surface `python-source` flag with Removed/Renamed/Changed-Signature
79+
entries). The audit found the shipped-repos-only contract papers over
80+
downstream breakage with human PR review — an autonomous run doesn't have
81+
that reviewer, so it runs the dependents' suites too. Repos with no test
82+
dir (organism/doc repos): leg is n/a, stated in the PR body.
83+
2. **Smoke** — the curated `smoke_tests.txt` subsets (Heart's `smoke_test`
84+
skill, all six workspaces by default) run with the task worktree's
85+
`activate.sh` sourced, so they exercise the branch. Applies where the
86+
changed repo has a downstream script surface; organism/doc-only changes:
87+
n/a, stated in the PR body. Never grow the curated lists to make this leg
88+
feel stronger.
89+
3. **Review** — review-faculty verdict **CLEAN**
90+
(`agents/faculties/review/AGENTS.md`). FINDINGS → resolve and re-review, or
91+
park to a human checkpoint; BLOCKED → park.
92+
4. **Heart** — verdict **GREEN**, or **YELLOW whose reason set is contained
93+
in the set the human acknowledged at launch**. Heart observes organism
94+
state, not the branch (the audit confirmed its legs never see feature
95+
branches), and chronic staleness reasons would otherwise dead-end all
96+
autonomy. The acknowledgement binds to the *exact reason list* at launch,
97+
for that launch only — any new reason, or RED, parks the run. Never
98+
ambient, never carried across sessions.
99+
100+
A failed leg downgrades the run to a human checkpoint: state written to the
101+
issue, nothing force-shipped, never modify code to make a leg pass.
85102

86103
## Calibration log
87104

@@ -103,7 +120,9 @@ calibration, not by optimism.
103120
- **Autonomous runs end at PR-open**, with the PR body carrying the plan, the
104121
review verdict, test/smoke counts, and a validation checklist.
105122
- **Never modify code to make tests or smoke tests pass.**
106-
- **Heart YELLOW/RED is never acknowledged autonomously.**
123+
- **Heart YELLOW/RED is never acknowledged autonomously.** A launch-time
124+
human acknowledgement of a named reason set is a human acknowledgement — it
125+
binds to that exact set, for that launch, and never extends to new reasons.
107126
- **Never rewrite history** (`AGENTS.md` rules apply verbatim to autonomous
108127
runs).
109128
- The `Autonomy:` header is a model's own estimate. The caps, the explicit

skills/ship_library/ship_library.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ as an ad-hoc step the skill re-judges. **GREEN** → proceed to step 4.
5555
**YELLOW** → surface warnings, proceed only on explicit user acknowledgement.
5656
**RED** → stop and report; do not ship. If `pyauto-brain`/`pyauto-heart` are
5757
unavailable, run the per-repo `pytest <test_dir>/ -x` inside the worktree as the
58-
gate and treat any failure as RED (WORKFLOW.md).
58+
gate and treat any failure as RED (WORKFLOW.md). Under `--auto`, this step is
59+
the four-leg **autonomous-ship gate** — tests (+ downstream dependents on
60+
public-API changes), smoke, review-faculty CLEAN, Heart — per
61+
`AUTONOMY.md` "The autonomous-ship gate"; do not restate it here.
5962

6063
### 4. Execute the ship (feature-dev)
6164

skills/ship_workspace/ship_workspace.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ pyauto-heart readiness --json # GREEN / YELLOW / RED
5252
Workspace **smoke tests** are part of Heart's verdict. **GREEN** → execute.
5353
**YELLOW** → proceed only on explicit acknowledgement. **RED** → stop. If the
5454
organism CLIs are unavailable, run `/smoke_test` (with `activate.sh` sourced) as
55-
the gate and treat any failure as RED.
55+
the gate and treat any failure as RED. Under `--auto`, this step is the
56+
four-leg **autonomous-ship gate** (`AUTONOMY.md` "The autonomous-ship gate");
57+
do not restate it here.
5658

5759
### 4. Execute the ship (feature-dev)
5860

0 commit comments

Comments
 (0)