Own local tooling, script wrappers, generated-artifact helper rules.
- Tests:
run-vitest.mjs; follow testing skill + test-authoring skill. - Lint/typecheck:
run-oxlint.mjs+run-tsgo.mjsown repo-local runtime behavior; use them in package scripts and CI steps. - Changed-file checks:
check-changed.mjsowns execution;changed-lanes.mjsowns classification. Never copy path-scope rules into hooks/CI snippets. - Knip ownership for standalone commands and dynamically loaded children: follow Before You PR.
- PR preparation:
pr/pr-libown source acquisition, correction reviews, gate bindings. Changing them: read PR preparation. - PR wrapper lifecycle:
pr/pr-libown supervision, locks, materialized dependencies. Changing/repairing them: read PR wrapper tooling. - GitHub transport:
pr-libowns observations + protected dispatch. Changing API/Octopool behavior: read PR GitHub transport. - Merge admission/recovery:
pr-libowns policy, retained outcomes, completion. Read merge admission, merge recovery, or prior-CI admin admission for that operation. - Remote proof:
crabbox-wrapper.mjsowns source capsules;.github/actions/prepare-testbox-shellowns shell/cwd. Changing them: read remote gate contracts. Operating boxes: use Crabbox skill. - Generated artifacts: align source generator, package script, verification command. Prefer
*:gen/*:checkpairs over undocumented one-offs.
- macOS-only Bash scripts:
#!/bin/bash, Bash 3.2-compatible syntax. Invoke directly or with/bin/bash, including fixtures. Add new entrypoints tonativeScriptsintest/scripts/build-and-run-mac.test.ts. - Portable Bash entrypoints using heredocs/here-strings (including sourced helpers): copy the Darwin Bash 5.3+ re-exec guard from
test/scripts/build-and-run-mac.test.tsbefore those operations (prevents heredoc pipe deadlocks) and add the file toportableScripts. stdin/sourced installers: request/bin/bashwhen replay impossible. - Tests: run through
scripts/run-vitest.mjsor rootpnpm test ...; barevitest ...starts local watch mode unlessrunor--runexplicit. - Changes to
scripts/lib/planners need the affected planner tests and the tooling test typecheck leaf:node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.test.root.tooling.json --incremental.pnpm tsgo:scriptsdoes not typecheck their test callers. - macOS CI workflow changes: run all
test/scripts/ci-workflow*.test.ts, including failure-collection cases inci-workflow-complete.test.ts, plusci-swift-cache-lifetime.test.tsandmacos-native-test-launch.test.ts; the workflow guards also exercise native runtime artifact packing and restoration. Validate workflows withscripts/check-workflows.mts. - Lint (one/few files): direct
node scripts/run-oxlint.mjs --tsconfig <matching config> <files...>, not shardedpnpm lint.
scripts/**TypeScript implementation files: erasable by Node without transformation;pnpm check:script-erasabilityenforces it.- Native Node execution: opt-in per entrypoint + import closure, only when runtime imports stay Node-resolvable. Keep
tsxfor closures depending on source runtime trees, frozen checkouts, package aliases, or tsconfig/path resolution.
- PR operations: follow maintainer workflow. Gate modes: landing. Default handoff:
merge-run --auto-merge. Pending admission ≠ successful proof/merge completion. - Landing subcommands require canonical/origin-main wrapper code. Never bypass wrapper trust, operation locks, exact-head review/gate bindings, live authority checks, or Octopool string rewrite protection; never select raw
ghto get landing through. - Before returning: join all PR-state-mutating children. Drained self-exited failures auto-release their operation lock; interrupted/uncertain locks stay held — verify no child tools remain before reported exact-OID
scripts/pr lock-recovercommand. Never delete lock refs manually. - Never edit
lifetime.sqliteor delete cache entries by hand; release retained holds only through the reviewedscripts/pr dependency-hold-releaseflow. - Preserve transition journals, preparation evidence, outcome refs, captures. Never clear/push
refs/openclaw/pr-merge-outcomes/<PR>, hand-edit receipts, or infer non-execution from failed command, elapsed time, absent process, or open PR. - Accepted/pending/uncertain writes: investigate through native recovery. Never blindly resubmit/switch transports. Existing land authority covers investigated same-scope recovery, not gate bypasses/new scope/method.
- Before comments/ownership-checked cleanup: confirm merge receipt. Completion comments: one attempt; reconcile uncertain comments by marker. Preserve worktrees/captures with unresolved outcome; never delete recreated branch by name.
- Fs-safe dependency trouble: follow on-demand vendoring instructions; vendor contents local, registry dependencies default.
- Trusted normal checkout missing dependencies:
pnpm install --frozen-lockfile, retry once before diagnosing code defect. - Formatting:
pnpm formatdefaults locally to the pinned Bun fork, with an oxfmt fallback;OPENCLAW_FORMAT_TOOL=oxfmtforces oxfmt. CI checks oxfmt/Bun parity. Generated-artifact gates retain oxfmt; see caller inventory. Typechecking: repositorytsgolanes. Scope:pnpm changed:lanes --json; targeted tests/checks. Avoiding worktree reconciliation:node scripts/run-vitest.mjswith ready dependencies.