Skip to content

Commit 83319ba

Browse files
authored
docs(agents): dedupe root AGENTS.md and move workflow detail into owning skills (#124027)
* docs(agents): dedupe root AGENTS.md and move workflow detail into owning skills Root AGENTS.md loads into every session; ~9.5KB of it duplicated content already owned by skills (crabbox, openclaw-testing, release-openclaw-*, openclaw-pr-maintainer, openclaw-changelog-update) or restated the same invariant in multiple sections. Skills absorb the root-only operational details first (Testbox/Crabbox mechanics, backport default target, fork-code landing variant), then root keeps hard policy and routing only. Also fixes skill drift found during the audit: positional testbox status id, missing remote-unavailable local-fallback policy, delegated-flag reject list, and aligns the early performance dispatch fail_on_regression flag with the Full Release Validation profile gate (true stable / false beta). * docs(agents): derive fail_on_regression from release profile in dispatch example
1 parent 3f7c852 commit 83319ba

7 files changed

Lines changed: 81 additions & 88 deletions

File tree

‎.agents/skills/crabbox/SKILL.md‎

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ Source trust before test size.
2727
- Untrusted contributor/fork: secretless fork CI or sanitized direct AWS.
2828
- Never untrusted code on credential-hydrated Testbox.
2929
- Never run untrusted repo wrapper/config locally.
30-
- No speculative warmup. Acquire when first heavy command ready. Reuse id. Stop.
30+
- No speculative warmup. Acquire when first heavy command ready. Reuse id. Stop
31+
before handoff. Local proof fanning out/expensive: stop local, go remote.
32+
- Remote backend unavailable (broker/DNS/network/lease): trusted-source proof
33+
falls back to local — including heavy suites/gates — instead of blocking.
34+
Note fallback + reason in the proof summary. Untrusted source never falls
35+
back to local.
3136

3237
Need direct AWS semantics? Pass `--provider aws`. Need normal trusted OpenClaw
3338
heavy proof? Pass `--provider blacksmith-testbox`.
@@ -101,16 +106,30 @@ blacksmith testbox stop --id <tbx_id>
101106

102107
Rules:
103108

109+
- Warm from the task checkout; ownership is checkout-path scoped.
104110
- One lease, one active command. No sync/reclaim during run.
105111
- Sync current checkout every run. `--no-sync` only unchanged intentional rerun.
106-
- `--reclaim` only deliberate checkout-path ownership transfer.
112+
- `--reclaim` only deliberate checkout-path ownership transfer. It does not
113+
retarget the remote checkout — never cross repos.
114+
- Sparse-sync temp checkout may claim a kept Testbox; repo-path reuse needs
115+
`--reclaim`.
107116
- Base/head change: stop. Rewarm. No stale-lease override.
117+
- Warmup must print a lease id. Silent success is unusable — verify before
118+
reuse, else fall back to one-shot `run`.
119+
- Wrapper lease reuse requires its local SSH key; missing after
120+
restart/handoff: warm fresh.
121+
- Direct lease: `blacksmith testbox run`. Crabbox wrapper reuse needs a
122+
wrapper-created lease.
108123
- Raw SHA unreliable for `warmup --ref`; use branch/tag.
109124
- `blacksmith testbox list` hides states. Use `list --all` or
110125
`status --id <tbx_id>`.
111126
- Testbox status/stop: `--id`. No status `--json`.
112-
- Delegated provider rejects `--fresh-pr`, `--full-resync`, `--script*`,
113-
`--env-helper`, capture/download flags.
127+
- Delegated provider rejects `--fresh-pr`, `--stop-after`, `--full-resync`,
128+
`--script*`, `--env-helper`, capture/download flags. Sync current checkout;
129+
workflow owns lifecycle.
130+
- Compound commands: `bash -lc`, never `sh -lc`. Job env uses Bash `declare`.
131+
- Testbox owns Chromium; never pass Crabbox `--browser` to
132+
`provider=blacksmith-testbox`.
114133

115134
Autoreview parallel tests:
116135

@@ -248,7 +267,8 @@ history. No safe injection path? Report live auth blocked. No fake-key upgrade t
248267

249268
## Real E2E
250269

251-
“Test in Crabbox” means user path, not merely remote unit tests.
270+
“Test in Crabbox” means user path, not merely remote unit tests. No
271+
harness/bypass/shortcut unless explicitly asked.
252272

253273
1. Reproduce entrypoint when feasible.
254274
2. Patch. Narrow local test.
@@ -344,7 +364,14 @@ blacksmith testbox status --id <tbx_id>
344364
- Cleanup unclear: list exact provider. Stop only owned ids.
345365
- Wrapper broken, Blacksmith healthy: direct Blacksmith only to isolate wrapper.
346366

347-
Crabbox stop wrapper: no `--timing-json`.
367+
Run semantics:
368+
369+
- Final timing JSON = proof complete. Portal sync hanging after it: interrupt
370+
the wrapper only.
371+
- Wrapper stop has no `--timing-json`:
372+
`node scripts/crabbox-wrapper.mjs stop --provider <provider> --id <id>`.
373+
- Dirty-sync generator proof: compare hashes before/after; `git diff` includes
374+
the synced patch.
348375

349376
## Boundary
350377

‎.agents/skills/openclaw-changelog-update/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ every human `Thanks @...` attribution.
176176
untyped title is not automatically editorial
177177
- do not add GHSA references, advisory IDs, or security advisory slugs to
178178
changelog entries or GitHub release-note text unless explicitly requested
179-
- never thank bots, `@claude`, `@openclaw`, `@clawsweeper`, or `@steipete`
179+
- never thank bots, `@claude`, `@codex`, `@openclaw`, `@clawsweeper`, or `@steipete`
180180
- do not use GitHub's release contributor count as the source of truth; the
181181
changelog must carry the complete human credit set itself
182182
7. Sorting preference:

‎.agents/skills/openclaw-pr-maintainer/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ gh search issues --repo openclaw/openclaw --match title,body --limit 50 \
355355
- If bot review conversations exist on your PR, address them and resolve them yourself once fixed.
356356
- Leave a review conversation unresolved only when reviewer or maintainer judgment is still needed.
357357
- Before landing any PR with non-trivial code changes, run fresh `$autoreview` until no accepted/actionable findings remain; prior CI, ClawSweeper, or manual review is not a substitute. Skip only for truly trivial/docs-only changes or when the user explicitly opts out.
358-
- When an agent is landing or merging a PR targeting `main`, use only the repo-native `scripts/pr` wrapper: run `scripts/pr review-init <PR>`, follow its emitted checkout/guard guidance, initialize and complete review artifacts with `scripts/pr review-artifacts-init <PR>`, validate them with `scripts/pr review-validate-artifacts <PR>`, then run `OPENCLAW_TESTBOX=1 scripts/pr prepare-run <PR>` and `scripts/pr merge-run <PR>`. The Testbox flag is mandatory for agents: it verifies hosted CI/Testbox on the current head or reuses a patch-identical pre-rebase run green within 24 hours instead of running full `pnpm` gates locally. Do not rebase only because `main` advanced; behind-main drift is advisory unless strict drift is explicitly enabled, while GitHub still blocks conflicts.
358+
- When an agent is landing or merging a PR targeting `main`, use only the repo-native `scripts/pr` wrapper: run `scripts/pr review-init <PR>`, follow its emitted checkout/guard guidance, initialize and complete review artifacts with `scripts/pr review-artifacts-init <PR>`, validate them with `scripts/pr review-validate-artifacts <PR>`, then run `OPENCLAW_TESTBOX=1 scripts/pr prepare-run <PR>` and `scripts/pr merge-run <PR>`. The Testbox flag is mandatory for agents: it verifies hosted CI/Testbox on the current head or reuses a patch-identical pre-rebase run green within 24 hours instead of running full `pnpm` gates locally. `prepare-run` fails fast; invoke only after exact-head CI is complete and green, and do not idle on `auto-response` or `check-docs`. For owner-approved reviewed fork code without hosted Testbox, use `OPENCLAW_PR_GATES_REMOTE=testbox` instead. Do not rebase only because `main` advanced; behind-main drift is advisory unless strict drift is explicitly enabled, while GitHub still blocks conflicts.
359359
- Use standard Git commands and stage only the files intended for each commit.
360360
- Keep commit messages concise and action-oriented.
361361
- Group related changes; avoid bundling unrelated refactors.

‎.agents/skills/openclaw-testing/SKILL.md‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,15 @@ sync the current checkout on every run, and stop it before handoff.
158158
secretless fork CI. Do not select `hydrate-github` or a credential-hydrated
159159
Testbox workflow.
160160
- Do not infer "no Testbox is running" from plain `blacksmith testbox list`.
161-
Use `blacksmith testbox list --all` or `blacksmith testbox status <tbx_id>`
162-
before reporting cloud state.
161+
Use `blacksmith testbox list --all` or `blacksmith testbox status --id
162+
<tbx_id>` (id is not positional) before reporting cloud state.
163163
- Reuse only an id/slug created in this operator session unless explicitly
164164
coordinating with another lane. If Testbox queues, fails capacity, or cannot
165-
allocate, report the blocker or switch to direct AWS Crabbox only when that
166-
still proves the requested surface.
165+
allocate, switch to direct AWS Crabbox when that still proves the requested
166+
surface. If the whole remote backend is unavailable (broker/DNS/network/
167+
lease), trusted-source proof falls back to local execution — including heavy
168+
suites and gates — instead of blocking; note the fallback and reason in the
169+
proof summary. Untrusted source never falls back to local.
167170
- Reuse does not mean stale source: omit `--no-sync` so every run uploads the
168171
current checkout. Use `--no-sync` only to rerun an unchanged, already-synced
169172
tree intentionally.
@@ -177,7 +180,6 @@ remains bounded. If it fans out or becomes expensive, acquire a remote backend.
177180
pnpm changed:lanes --json
178181
pnpm check:changed # local small plan or delegated heavy plan; no Vitest
179182
pnpm test:changed # cheap smart changed Vitest targets
180-
pnpm verify # full check, then full Vitest
181183
OPENCLAW_TEST_CHANGED_BROAD=1 pnpm test:changed
182184
pnpm test <path-or-filter> -- --reporter=verbose
183185
OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test <path-or-filter>

‎.agents/skills/release-openclaw-ci/SKILL.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ Start product performance evidence as early as the Code SHA exists, in
127127
parallel with other release work:
128128

129129
```bash
130+
# Full Release Validation profile gate: true for stable, false for beta.
131+
fail_on_regression=true
130132
gh workflow run openclaw-performance.yml \
131133
--repo openclaw/openclaw \
132134
--ref main \
@@ -135,7 +137,7 @@ gh workflow run openclaw-performance.yml \
135137
-f repeat=3 \
136138
-f deep_profile=false \
137139
-f live_openai_candidate=false \
138-
-f fail_on_regression=true
140+
-f fail_on_regression="$fail_on_regression"
139141
```
140142

141143
- Do not wait for full release validation to start this early perf signal.

‎.agents/skills/release-openclaw-maintainer/SKILL.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ a workflow fix that the existing parent run cannot consume.
4242
approval for its categorized set before mutating the release branch. This
4343
audit is required for discovery; it does not authorize optional backports on
4444
an already-frozen candidate.
45+
- Backports are optional and operator-selected. When a backport is requested
46+
without a target, use the newest open `release/` branch.
4547
- Versions use `YYYY.M.PATCH`, where `PATCH` is the sequential release-train number within the month, not the calendar day.
4648
- Choose a new beta train from stable and beta releases only. Alpha-only tags do not consume or advance the beta/stable patch number. Continue the highest existing unpublished/published beta train with the next `beta.N` when appropriate; otherwise increment the highest stable/beta patch by one and start at `beta.1`.
4749
- Example: after stable `2026.6.5`, the next new beta train is `2026.6.6-beta.1`, even if automated alpha-only tags such as `2026.6.10-alpha.1` exist.
@@ -1020,9 +1022,9 @@ node --import tsx scripts/openclaw-npm-postpublish-verify.ts <published-version>
10201022
under the active release scope lock. Freeze the result as the Code SHA.
10211023
7. Immediately dispatch Actions > `OpenClaw Performance` from the pinned
10221024
trusted workflow source with `target_ref=<code-sha>`, `profile=release`,
1023-
`repeat=3`, deep profiling
1024-
off, live OpenAI off, and regression failure off. Let it run in parallel
1025-
with Code SHA validation.
1025+
`repeat=3`, deep profiling off, live OpenAI off, and `fail_on_regression`
1026+
matching Full Release Validation's profile gate: `true` for stable,
1027+
`false` for beta. Let it run in parallel with Code SHA validation.
10261028
8. Run the deterministic source preflight, then Full Release Validation against
10271029
the exact Code SHA with
10281030
`node scripts/full-release-validation-at-sha.mjs --sha <code-sha> --target-ref release/YYYY.M.PATCH`.

0 commit comments

Comments
 (0)