Learn-skills.dev gov_setup
Install or upgrade governance files into the current OpenClaw workspace.
install
source · Clone the upstream repo
git clone https://github.com/NeverSight/learn-skills.dev
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/NeverSight/learn-skills.dev "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/skills-md/adamchanadam/openclaw-workspace-governance/gov_setup" ~/.claude/skills/neversight-learn-skills-dev-gov-setup && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/NeverSight/learn-skills.dev "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/data/skills-md/adamchanadam/openclaw-workspace-governance/gov_setup" ~/.openclaw/skills/neversight-learn-skills-dev-gov-setup && rm -rf "$T"
manifest:
data/skills-md/adamchanadam/openclaw-workspace-governance/gov_setup/SKILL.mdsource content
/gov_setup
Purpose
Deploy this plugin's governance files into the current workspace at
prompts/governance/.
check mode is a read-only diagnostic for first-time setup and upgrade readiness.
In all modes, verify OpenClaw plugin trust allowlist alignment (plugins.allow) for this plugin.
Inputs
- Optional mode:
(default command-level one-click chain)quick
,install
,upgradecheck- alias:
(same asauto
)quick
Mode precedence (hard)
- Explicit operator intent takes precedence:
MUST execute upgrade workflow./gov_setup upgrade
MUST execute install workflow./gov_setup install
is diagnostics only./gov_setup check
- Never downgrade explicit
/install
intoupgrade
.check - Never return
for explicitSKIPPED (No-op upgrade)
.upgrade
/quick
must run full chain in-order:auto
-> (check
/install
/upgrade
) ->skip
->migrateaudit- if any stage fails, stop at that stage and return deterministic next-step remediation.
Deterministic runner (hard)
decisions must be driven by:gov_setupnode {plugin_root}/tools/gov_setup_sync.mjs <mode>
- The runner output is authoritative:
- do not replace it with heuristic "no-op" reasoning
- if runner returns
, reportPASS
(neverPASS
)SKIPPED - if runner returns
, reportBLOCKED
and stopBLOCKED
- For
, runner execution is mandatory even when a previousupgrade
returnedcheck
.READY - Runner also reconciles legacy workspace shadow skills (
) by moving them into workspace archive backup before continuing.<workspace-root>/skills/gov_*
Brain Docs routing (hard)
When the request touches Brain Docs (
USER.md, IDENTITY.md, TOOLS.md, SOUL.md, MEMORY.md, HEARTBEAT.md, memory/*.md):
- Read-only ask -> Mode B (verified answer): read the exact target files before answering.
- Any write/update request -> Mode C: full governance lifecycle is mandatory.
- If the same request also includes OpenClaw system claims, apply Mode B2 verification (
+ releases when version-sensitive).docs.openclaw.ai - If the request is specifically about auditing/hardening Brain Docs behavior wording, route to
(single entry; preview by default).gov_brain_audit
Required behavior
- Resolve plugin root from this skill directory:
plugin_root = {baseDir}/../..
- Resolve workspace root as the current OpenClaw workspace directory.
- Do not assume
as a fixed path.~/.openclaw/workspace
- Do not assume
- Resolve platform config path candidates (read-only probe):
- Linux/macOS:
~/.openclaw/openclaw.json - Windows:
%USERPROFILE%\\.openclaw\\openclaw.json - Use the one that exists; if both exist, use the runtime-active one and report both paths.
- Linux/macOS:
- In all modes, evaluate plugin allowlist status from
:openclaw.json
:ALLOW_OK
is an array and containsplugins.allowopenclaw-workspace-governance
:ALLOW_NOT_SET
key missing or not an arrayplugins.allow
:ALLOW_EMPTY
is an empty arrayplugins.allow
: array exists but missingALLOW_MISSING_GOVopenclaw-workspace-governance- Preserve existing trusted ids; never suggest replacing allowlist with only one id.
- Mandatory compatibility SOP check (every run):
- Evaluate whether governance is compatible with official OpenClaw daily flows and governance lifecycle flows:
- official flow families:
system-channel operations (including plugin-added/future commands and chainedopenclaw ...
segments)openclaw
- official flow families:
- governance lifecycle:
,gov_help
,gov_setup quick/check/install/upgrade
,gov_migrate
,gov_audit
,gov_openclaw_json
,gov_brain_auditgov_uninstall quick/check/uninstall - Decision rules:
- default outcome is
for these flows (no generic false block),ALLOW/ROUTE - if prerequisite fails (for example allowlist misalignment), return governance policy warning with explicit copy-paste unblock commands.
- default outcome is
- For any allowlist remediation, keep existing trusted ids and append missing required id(s); never replace with governance id only.
- Evaluate whether governance is compatible with official OpenClaw daily flows and governance lifecycle flows:
- If mode is
orinstall
andupgrade
:allow_status != ALLOW_OK- do not hard-block governance workspace deployment
- continue install/upgrade (best-effort) and mark
allowlist_alignment_required=true - append immediate remediation commands (
->/gov_openclaw_json
) before migration/audit next steps/gov_setup check - wording must clearly state this is a governance warning (not system error)
- Execute deterministic runner by mode:
->checknode {plugin_root}/tools/gov_setup_sync.mjs check
->installnode {plugin_root}/tools/gov_setup_sync.mjs install
->upgradenode {plugin_root}/tools/gov_setup_sync.mjs upgrade
/quick
-> orchestrated deterministic chain:auto- setup check runner
- setup install/upgrade runner when required by check result
- migrate runner
- audit runner
- If mode is
:check- Use runner JSON as source of truth for:
(status
/NOT_INSTALLED
/PARTIAL
)READYallow_statusallowlist_alignment_requiredfile_sync_summaryshadow_reconcile_requirednext_action
- If runner reports
or non-emptyshadow_reconcile_required=true
, treat status as upgrade-required (workspace_gov_skill_dirs_detected
) and instruct operator to run explicitPARTIAL
./gov_setup upgrade
- Use runner JSON as source of truth for:
- After install or upgrade:
- Print next steps:
- Run
, then/gov_migrate
(migration will reconcile missing governance/gov_audit
baseline files deterministically)_control
- Run
- Explicit
must still run even ifupgrade
previously returnedcheck
.READY - Idempotent upgrade is valid; report
from runner output.PASS (already up-to-date)
- Print next steps:
- If operator asks OpenClaw system questions (commands/config/paths) during setup:
- Verify against local skill docs and official docs
before answering.https://docs.openclaw.ai - For latest/version-sensitive claims, also verify official releases
.https://github.com/openclaw/openclaw/releases - If verification cannot be completed, report uncertainty and required next check; do not infer.
- If operator asks date/time-sensitive setup questions:
- Verify runtime current time context (session status) before answering.
- Platform config patching policy during setup:
- do not patch inside
gov_setup - route to
gov_openclaw_json - copy-paste unblock intent:
Please update openclaw.json so plugins.allow keeps existing trusted ids and includes openclaw-workspace-governance, then validate and back up before apply.
Output requirements
- Report source root, target root, deterministic runner command/result, and backup path if created.
- If any required source file is missing, stop and report missing paths.
- Include
(exact paths) andFILES_READ
(exact paths, orTARGET_FILES_TO_CHANGE
for read-onlynone
).check - If required evidence fields are missing, output
instead of completion.BLOCKED (missing read/change evidence) - Use this output order for UX consistency:
STATUSWHYNEXT STEP (Operator)COMMAND TO COPY
- Always include a final
section with:NEXT STEP (Operator)- one primary command
- one fallback
command/skill ...
- In
mode, include:check
(status
/NOT_INSTALLED
/PARTIAL
)READY
(allow_status
/ALLOW_OK
/ALLOW_NOT_SET
/ALLOW_EMPTY
)ALLOW_MISSING_GOV
(allowlist_alignment_required
/true
)false
(compat_sop_status
/ALLOW_OR_ROUTE
)POLICY_BLOCK_WITH_REMEDIATION
(official flows + governance lifecycle coverage summary)compat_sop_scope
(resolved path used for check)platform_config_pathnext_action
(counts forfile_sync_summary
/MISSING
/OUT_OF_SYNC
)IN_SYNC
(shadow_reconcile_required
/true
)false
(if any)workspace_gov_skill_dirs_detected- file lists in code blocks (one path per line) to avoid UI table-wrap ambiguity.
- if
, appendallow_status!=ALLOW_OK
command block first:Align Allowlist/gov_openclaw_json- fallback:
/skill gov_openclaw_json - then rerun:
(fallback:/gov_setup check
)/skill gov_setup check
- if
andallow_status=ALLOW_OK
, appendshadow_reconcile_required=true
command block first:Shadow Reconcile/gov_setup upgrade- fallback:
/skill gov_setup upgrade
- if
andallow_status=ALLOW_OK
, append astatus=NOT_INSTALLED
command block:Quick Start/gov_setup install- fallback:
/skill gov_setup install
- if
andallow_status=ALLOW_OK
, append:status=PARTIAL/gov_setup upgrade- fallback:
/skill gov_setup upgrade
- if
andallow_status=ALLOW_OK
, append:status=READY
then/gov_migrate/gov_audit- fallback:
then/skill gov_migrate/skill gov_audit
- append version visibility commands for operator-side check:
- installed:
openclaw plugins info openclaw-workspace-governance - latest:
npm view @adamchanadam/openclaw-workspace-governance version
- installed:
- In explicit
/install
mode:upgrade
must be eitherSTATUS
orPASS
.BLOCKED- Do not output
for explicit write-mode setup commands.SKIPPED - Include
from runner output when present.workspace_gov_skill_dirs_reconciled