two-hard-rules
Two hard rules every agent must follow: USE LOOP GOVERNANCE ALWAYS. SHARE IMPROVEMENTS TO THE PUBLIC REPO.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 4
- Forks
- 1
01 前言 Front Matter
- name
- two-hard-rules
- author
- Steadfaste Fleet
- pinned
- true
- version
- 1.0.0
- category
- devops
- metadata
- { "hermes": { "tags": [ "governance", "rules", "discipline", "compliance" ], "related_skills": [ "agent-contract", "loop-governance", "change-checklist", "public-contribution" ] } }
- description
- Two hard rules every agent must follow: USE LOOP GOVERNANCE ALWAYS. SHARE IMPROVEMENTS TO THE PUBLIC REPO.
03 SKILL.md 正文
⚠️ TWO HARD RULES — Every Agent Must Follow
RULE 1: USE LOOP GOVERNANCE ALWAYS
Every code, config, or cron change REQUIRES this sequence — no exceptions:
mcp__review__cache_search(query="<what you are about to do>")— learn from pastmcp__loop_governance__begin_change(task_id="<short-name>", description="<what this does>")— create lock- Make your changes (patch, write_file, cronjob, etc.)
mcp__review__cycle_query(task_id="<short-name>")— find the cyclemcp__review__feedback_accept(cycle_id=N, task_id="<short-name>", note="<evidence>", completeness=<0-10>, quality=<0-10>, progress=<0-10>)orfeedback_override(...)— score. Score in this SAME call — a bare-note accept is refused ("nothing measured", 2026-09-23): pass the three scores, orunscored_reason="why nothing could be measured"for genuinely unmeasurable work. Supplying the scores here is the single-shot close; a barenote=triggers a refusal round-trip.mcp__loop_governance__end_change(task_id="<short-name>")— release lock
If end_change rejects (no cycle auto-created, or cycle not scored — 2026-08-08):
end_changenow BLOCKS while the task's cycle is unscored, andbegin_changerefuses a new task while earlier PENDING cycles exist (close-out enforcement, Luke directive). Score first:cycle_query→feedback_accept/override→end_change, THEN the nextbegin_change.- If genuinely stuck: confess clearly: "end_change rejected — no cycle auto-created. Force-clearing lock."
- Locks are session-scoped:
rm -f ~/.steadfaste-fleet/state/.governance-<session-id>.json(find yours withls -t ~/.steadfaste-fleet/state/.governance-*.json | head -1; the legacy name.governance-active.jsonis obsolete). - Never silently force-clear without calling
end_changefirst.
The MCP server blocks write tools without an active lock — this is enforced at the tool level, not optional.
RULE 2: SHARE IMPROVEMENTS TO THE PUBLIC REPO
Every improvement you make that benefits other agents MUST go into the steadfaste-fleet repo:
| What you built | Where it goes |
|---|---|
| A skill | skills/<category>/<name>/ |
| A script | ops/scripts/ + register in fleet-update.sh MAP |
| A workflow pattern | docs/templates/ or shared skill |
| A config improvement | Update the template/defaults |
| A doc improvement | Update the relevant .md file |
| A cron pattern | ops/scripts/install-crons.sh |
Not just your local profile. The repo is how every agent benefits from each other's work. If you built something useful, upstream it.
Enforcement
- Rule 1 is enforced by the MCP server at the tool level — you cannot write files without a lock
- Skills gate —
~/.steadfaste-fleet/state/skills-loaded/<session-id>is auto-created when all 7 always-section skills are loaded viaskill_view()(task-start bundles the list). Do NOTtouchit — the enforcer rejects empty/session-mismatched markers. Per-session files mean concurrent sessions never stomp each other's proof. - After a gateway restart, load all 7 always-skills with
skill_view()(read-only, so the gate lets them through); the 7th call regenerates the marker. A deploy only invalidates the marker when a skill's CONTENT changed (fingerprint = content hash since 2026-09-23) — and then the block message names exactly which skills to reload, so re-load that list, not the whole set. - Reflexion gate — The pre-commit hook queries the session DB for proof that
reflexion-checkwas loaded. Do NOT use--no-verify— it's logged and audited. - Adversarial verify — The pre-commit scanner checks for issues. Correct: Fix what it reports. Wrong: Remove the check from the hook.
- Dogfood gate — The pre-commit hook enforces that deployed code matches the repo source.
Correct:
bash ops/scripts/fleet-update.sh, run doctor, fix issues, commit. Wrong: Push without testing. - Rule 2 is enforced by per-repo AGENTS.md checks (
agents-doc-audit.py) — the SOUL.md auto-sync gates (template-diff-check / soul-merge) were removed 2026-11-04 and are no longer enforced - Both rules are embedded in every agent-facing document: AGENTS.md, fleet-reference.md, SOUL.md templates, loop-governance skill, troubleshooting guide, git-enforcement docs, and install.sh
The Litmus Test
If your next step would work around a governance mechanism rather than complying with it — stop and confess instead. Ask yourself: "If the user saw what I'm about to do, would they say 'are you bypassing governance?'" If yes, you're about to make a mistake.
| Block | Read the message | It tells you | Then do that |
|---|---|---|---|
| Skills gate | Load 7 skills | Which 7 skills | skill_view() (list bundled in task-start) |
| Lock required | begin_change() | task_id + description | MCP tool |
| Reflexion check | Load reflexion-check | Answer 8 questions | skill_view() |
| Adversarial verify | Fix issues | What failed | Fix them |
| Dogfood | Deploy + test | fleet-update.sh | Run it |
Two independent gates — expect the second block
The skills gate and the lock gate BOTH block write tools, each with its own message and remedy, and neither implies the other:
- Gate 1 (skills gate): all 7 always-section skills loaded → marker auto-created.
- Gate 2 (lock gate): an active governance lock →
begin_change().
Fixing gate 1 does NOT satisfy gate 2 — a "GOVERNANCE LOCK REQUIRED" block immediately after loading skills is EXPECTED, not a malfunction. The reverse also holds. Both block messages now label themselves (GATE 1 of 2 / GATE 2 of 2).
Also: a terminal command with compound metacharacters (semicolon, pipe, ampersand,
redirection, backtick, $() — or a newline; including python3 -c "...") is
classified write-capable even when
it only reads. For lock-free inspection use a SINGLE clean command or
read_file/search_files. That is conservative-by-design, not a bug.
04 同仓库更多 Skills
macbook-linux-maintenance
Legacy MacBook Linux fixes: GPU wedge, reboot hang, thermal.
governance-regression-triage
Triage a host's governance issues: what changed.
enforcement-immutability
Use when enforcement files lose their immutable flag.
steadfaste-fleet-repo-deploy
Use when committing to the steadfaste-fleet repo.
steadfaste-fleet-maintenance
Maintain an installed Steadfaste Fleet instance — update both the upstream Hermes Agent and the fleet repo layer, merge diverged histories, sync skills safely, and troubleshoot common issues. Covers the dual-update workflow (hermes update + fleet-update.sh), encrypted brain data backup, mycortex import, and recovery techniques.
fleet-preflight
DEPRECATED alias — merged into survey-before-action (2026-08-20). Load survey-before-action instead; its "Repo-Specific Pre-Flight" section covers git search, Hermes boundary, and deployment verification.