Install
openclaw skills install working-tree-governorGovern dirty git working trees by classifying runtime noise vs real source changes, defaulting to selective staging, verifying staged scope, and asking the o...
openclaw skills install working-tree-governorUse when a repo is dirty and you need to commit safely without dragging runtime noise, logs, cache, state files, or generated artifacts into history.
This skill exists for the common Hermes failure mode where git status becomes unreadable because code, tests, logs, runtime state, forensics, cached binaries, and generated outputs are all mixed together.
The goal is not cleanliness theater. The goal is to preserve signal and produce small, reviewable commits.
Load this skill when any of these are true:
git status --short shows mixed code plus logs/state/cache/output noiseTreat these as high-risk triggers:
Never use git add . in this situation.
Never default to stash for this situation.
Default to selective staging.
If confidence is low, ask the operator before commit.
Start read-only.
Run:
git status --short
git diff --name-only
git diff --cached --name-only
git rev-parse HEAD
git log -1 --format='%H %ad %s' --date=iso
Optional when useful:
git diff --stat
git diff -- <path>
Then bucket every changed path.
Examples:
src/**/*.pytests/**/*.pyDefault action:
include_now
Examples:
docs/***.mdDefault action:
usually needs_operator_decision unless clearly part of the requested commit
Examples:
shared/risk/*.jsonshared/reports/strategy_pnl.jsonshared/risk/open_positions.jsonhermes_state.jsonDefault action:
preserve_but_exclude
Examples:
results/**Default action:
preserve_but_exclude
Examples:
*.log*.jsonlstreamer.log*Default action:
ignore_for_now or preserve_but_exclude
Examples:
__pycache__/*.pyc.metaapi/*.binDefault action:
ignore_for_now
Examples:
shared/forensics/***.bak-*Default action:
preserve_but_exclude
Anything not confidently classifiable.
Default action:
needs_operator_decision
Exclude by default when path matches patterns like:
**/__pycache__/****/*.pycshared/hermes-acp/*.logshared/hermes-acp/*_log.jsonlshared/reports/*.jsonlshared/risk/*.jsonresults/*.jsonmemory/**/*.mdsrc/.metaapi/*.binshared/forensics/***.bakInclude by default when path matches patterns like:
src/**/*.pytests/**/*.pytests/fixtures/**Do not exclude real code just because it lives beside noisy runtime files.
For example, shared/hermes-acp/*.py may be real source code and must be inspected, not auto-excluded.
Report:
Use the user’s requested commit intent to infer the include set. Examples:
shared/hermes-acp/execution_truth*.py, matching tests, matching fixturessrc/hermes/streamer.py plus targeted testsDo not include unrelated source changes automatically just because they are code.
Stage only the inferred relevant files. Never stage all dirty files.
Use:
git add <explicit paths>
Always run:
git diff --cached --name-only
git diff --cached --stat
git status --short
Verify explicitly:
If suspicious files appear, unstage them or stop.
Prefer these prefixes:
feat:fix:refactor:test:docs:chore:If the user’s message lacks a valid prefix, suggest a corrected version before commit.
Do not auto-commit if any of these are true:
In those cases, ask a short scope question and wait.
After commit, run:
git show --stat --oneline HEAD
git diff --cached --name-only
git status --short
Report:
Small tree, mostly one category, no runtime-critical dirt. Proceed normally but still summarize buckets.
Mixed categories, some core code dirty, risky action coming. Recommend selective baseline before continuing.
Large mixed tree, core runtime dirty, noise obscures real work. Switch to hygiene-first mode before more feature work.
Huge mixed tree plus stale HEAD plus runtime-critical dirt plus pending restart/deploy. Strongly recommend immediate selective preservation before any risky next step.
Example:
shared/hermes-acp/execution_truth_slice.py
This is real code. Inspect it. Do not auto-exclude it because of the directory.Example:
tests/fixtures/execution_truth_streamer_2026_04_10_sample.log
This is a committed test fixture, not runtime noise.Example:
src/hermes/streamer.py
These require stricter operator confirmation before commit.If bad paths are already staged, verify and unstage before commit instead of proceeding.
If confidence is not high, do not commit. Show:
The fail-safe is simple: when uncertain, ask before commit.
When using this skill, report in this order:
The skill is successful when Hermes consistently does this: