Skip to content

docs(agents): dedupe root AGENTS.md and move workflow detail into owning skills - #124027

Merged
steipete merged 2 commits into
mainfrom
steipete/agents-md-cleanup-2ad2e4
Aug 15, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/agents-md-cleanup-2ad2e4

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Root AGENTS.md had grown to 75.6KB (~19k tokens) loaded into every agent session. A four-lane audit (skill-overlap comparisons against crabbox, openclaw-testing, release-openclaw-maintainer/-ci/-nightly, openclaw-pr-maintainer, openclaw-changelog-update, plus a whole-file internal-dedup scan) showed ~9.5KB was either verbatim-duplicated in the owning skill/doc or the same invariant restated in up to six places (doctor-owns-compat x6, SQLite-not-files x4, delete-old-path x4, close-with-proof x3).

Why This Change Was Made

Root's own charter: "Telegraph style. Root rules only. Skills own workflows; root owns hard policy and routing." This change enforces it: skills absorb the operational detail first, then root keeps policy + routing. Per constraint from the repo owner, no content moved to scoped AGENTS.md files (not loaded by Codex); only dedup, clarify, or move-to-skill.

  • Validation: sanitized-AWS-Crabbox procedure, lease policy, Testbox/Crabbox mechanics -> $crabbox (root-unique gotchas folded in first: warmup-must-print-lease-id, SSH-key-after-restart, --stop-after reject, bash -lc/declare, Chromium/--browser, sparse-sync reclaim, timing-JSON/portal-hang, dirty-sync hash proof, stop command form).
  • Security/Release: two-SHA flow, versioning, backports, scope lock detail -> already verbatim in $release-openclaw-maintainer/-nightly/-ci; orphan detail preserved in the skill (backport with no target -> newest open release/ branch). SecretRef paragraph compressed to a pointer at its authoritative home docs/gateway/secrets.md.
  • GitHub/PRs: scripts/pr landing pipeline compressed to the command spine + $openclaw-pr-maintainer pointer (skill absorbed the fork-code OPENCLAW_PR_GATES_REMOTE=testbox variant, fails-fast/exact-head-CI gate, no-idle on auto-response/check-docs); three close-with-proof bullets merged; image/video upload bullets merged.
  • ClawSweeper Review Policy: stays in root by design (hosted review workers read the target repo's root AGENTS.md; the skill is operator tooling only) but compressed ~15%.
  • Internal dedup: canonical-shapes/doctor, SQLite-file, delete-old-path, LOC, evidence-bar, and changelog clusters collapsed to one canonical statement each; approval-identity bullets moved next to their Execution Identity Audit family.
  • Drift fixes found by the audit: blacksmith testbox status --id (was shown positional in openclaw-testing), remote-unavailable local-fallback policy added to both skills, delegated-flag reject lists unified, pnpm verify removed from the local focused-proof list (heavy -> remote), @codex added to changelog forbidden handles (union of both lists). One deliberate policy alignment: the early OpenClaw Performance dispatch fail_on_regression now follows the Full Release Validation profile gate (true stable / false beta, per .github/workflows/full-release-validation.yml:947-949) — the two release skills previously contradicted each other (off vs true).

User Impact

None at runtime — agent/maintainer instruction files only. Every session gets ~2.3k tokens of context back; skill-routed workflows see the same or richer guidance at the point of use.

Evidence

  • Root: 75.6KB -> 66.3KB (-12%), 423 -> 382 lines; whole diff 80 insertions / 87 deletions across 7 markdown files.
  • Adversarial no-loss audit (independent agent, clause-by-clause over git diff): every deleted clause verified surviving in root, the named skill, or the cited doc; the three initially-lost clauses and two strictness drifts it found were restored before commit.
  • pnpm check:changed clean (docs-only lanes local: oxfmt format check, dup/coercion/dependency-pin/package-patch guards all pass); git diff --check clean.

…ing 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).
@clawsweeper

clawsweeper Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

To use Codex here, create a Codex account and connect to github.

@steipete
steipete marked this pull request as ready for review August 15, 2026 05:11
@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Aug 15, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 15, 2026
@clawsweeper

clawsweeper Bot commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed August 15, 2026, 1:28 AM ET / 05:28 UTC.

ClawSweeper review

What this changes

The PR reduces duplicated root agent guidance, moves workflow details into owning skills, and updates release and remote-proof instructions.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

This PR remains useful, but its prior P2 blocker is still present: the revised release command always sends a blocking regression gate even though beta is documented as advisory.

Priority: P2
Reviewed head: f1f4cc6a38bddf79e49dce5562f18565dd9f8d8a

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused source-proven release-instruction defect needs correction before merge.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored internal-guidance PR does not require external contributor runtime proof.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored internal-guidance PR does not require external contributor runtime proof.
Evidence reviewed 4 items PR instruction defect: The PR head documents a stable/beta split but unconditionally assigns true before dispatching the workflow.
Authoritative workflow behavior: Current main sets the gate true by default and explicitly changes it to false when RELEASE_PROFILE is beta before dispatching the same input.
Existing contract test: The workflow test requires the stable default, beta conditional, and forwarded variable together.
Findings 1 actionable finding [P2] Derive the beta regression gate
Security None None.

How this fits together

Root guidance routes specialized testing and release work into skills. The release skill’s performance command dispatches a workflow whose regression gate affects whether a stable or beta release is blocked.

flowchart LR
  Agent[Agent task] --> Root[Root guidance]
  Root --> Skills[Workflow skills]
  Skills --> Release[Release procedure]
  Release --> Dispatch[Performance workflow dispatch]
  Dispatch --> Gate[Regression gate]
  Gate --> Outcome[Release evidence]
Loading

Before merge

  • Derive the beta regression gate (P2) - This assignment is unconditional, so beta still dispatches a blocking performance run despite the preceding comment. Current Full Release Validation explicitly changes this value to false for beta; mirror that condition here before forwarding the input.
  • Resolve merge risk (P1) - A beta operator following the new command dispatches a blocking performance run, contrary to the documented advisory beta policy.
  • Resolve merge risk (P1) - The Blacksmith CLI was unavailable in this review environment, so the separately changed status --id syntax was not independently contract-checked.
  • Complete next step (P2) - A narrow mechanical repair can correct the remaining release-profile mismatch on this PR.

Findings

  • [P2] Derive the beta regression gate — .agents/skills/release-openclaw-ci/SKILL.md:131
Agent review details

Security

None.

PR surface

Docs -7. Total -7 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 7 81 88 -7
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 81 88 -7

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Derive the regression gate (recommended)
    Set the dispatch value from the stable or beta release profile so the skill matches Full Release Validation.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Update the performance dispatch example to pass false for beta and true for stable, matching the existing Full Release Validation profile condition.

Technical review

Best possible solution:

Make the release-skill example derive the regression flag from the selected release profile, matching the canonical workflow condition.

Do we have a high-confidence way to reproduce the issue?

Yes: the PR command always passes true, while current main’s authoritative workflow explicitly passes false for beta.

Is this the best way to solve the issue?

No: the intended policy is correct, but the example must branch on release profile to implement it.

Full review comments:

  • [P2] Derive the beta regression gate — .agents/skills/release-openclaw-ci/SKILL.md:131
    This assignment is unconditional, so beta still dispatches a blocking performance run despite the preceding comment. Current Full Release Validation explicitly changes this value to false for beta; mirror that condition here before forwarding the input.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 2e90d6731212.

Labels

Label justifications:

  • P2: The PR’s release instruction can turn a beta performance check from advisory into blocking.
  • merge-risk: 🚨 automation: The changed command controls an input to release workflow automation.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This maintainer-authored internal-guidance PR does not require external contributor runtime proof.

Evidence

Acceptance criteria:

  • [P1] git diff --check.
  • [P1] Compare .agents/skills/release-openclaw-ci/SKILL.md with .github/workflows/full-release-validation.yml and confirm stable=true and beta=false.

What I checked:

Likely related people:

  • Jason (Json): Authored the current main commit that introduced both the workflow’s beta gate and the adjacent release-skill guidance. (role: introduced current release-profile behavior; confidence: high; commits: e382fa7979a8; files: .github/workflows/full-release-validation.yml, .agents/skills/release-openclaw-ci/SKILL.md)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Derive fail_on_regression from the release profile and verify the command against Full Release Validation.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-15T05:17:26.679Z sha 759e6a2 :: needs changes before merge. :: [P2] Make the beta dispatch pass the documented gate

@steipete
steipete merged commit 83319ba into main Aug 15, 2026
53 checks passed
@steipete
steipete deleted the steipete/agents-md-cleanup-2ad2e4 branch August 15, 2026 05:34
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 16, 2026
…ing skills (openclaw#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant