[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M758PB9RDWZ1P2VRVG8SAY82":3,"skill-same:01M758PB9RDWZ1P2VRVG8SAY82":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":48,"ownerHtmlUrl":49,"ownerBlogUrl":6,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M758PB9RDWZ1P2VRVG8SAY82","soul-refinement",null,"Daily SOUL.md refinement process — mine sessions for lessons, apply corrections, codify principles. Optional per-agent Bible insight integration for daily Scripture reading.","lukemcqueen\u002Fsteadfaste-fleet","lukemcqueen","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F405240?v=4","01M757MHPAGRXTJAT46SKZP98R","Luke McQueen","01M757MHPZ573KP8DT9GB8SBQ7",4,"MIT","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fhermes-agent\u002Fsoul-refinement\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: soul-refinement\ndescription: \"Daily SOUL.md refinement process — mine sessions for lessons, apply corrections, codify principles. Optional per-agent Bible insight integration for daily Scripture reading.\"\nversion: 1.0.0\nauthor: Steadfaste Fleet\nlicense: MIT\nplatforms: [macos, linux]\nmetadata:\n  hermes:\n    tags: [soul, identity, refinement, daily, bible, lessons]\n    related_skills: [soul-authoring, memory-architecture, hermes-agent-skill-authoring, cron-engineering]\n---\n\n# Soul Refinement — Daily Identity Update\n\n## What This Is\n\nA daily process that refines an agent's SOUL.md by mining the day's sessions for corrections and insights, plus optional daily Bible reading. The result is a living identity document that gets sharper over time.\n\nAgents who use this process grow alongside their operator — applying lessons from both daily work and Scripture.\n\n## Two Channels\n\n### Channel A — Bible Insight (cron: 1am daily, Python script)\n\nHandled by `agent-daily-bible-reading.py` (no_agent cron script). It:\n1. Generates a short behavioral statement (verse + one-line commitment) for SOUL.md\n2. Saves the full analysis (archaeology, language, Jewish perspective) to `~\u002Fbrain\u002F\u003Cagent>\u002Fbible\u002F\u003Cbook>.md`\n3. Updates the brain index\n\n**Output format for SOUL.md (short form only):**\n```markdown\n### {Book} — *\"{Key verse}\"* ({Ref})\n\nI will [one-line behavioral commitment for a system operator].\n\n\u003C!-- Added {YYYY-MM-DD} -->\n```\n\n**Full analysis** goes to `~\u002Fbrain\u002F\u003Cagent>\u002Fbible\u002F\u003Cbook>.md` — not SOUL.md.\n\n### Channel B — Session Mining (recommended cron: 23:00 daily)\n\nReviews the sessions since the last run for user corrections and distills lessons into principle updates. **The window is a bounded lookback from RUN TIME, never a calendar date** — see Pitfalls.\n\n**Setup (do once):**\n```bash\nhermes cron create --name \"local-daily-soul-refinement\" \\\n  --schedule \"14 23 * * *\" \\\n  --skill \"soul-refinement\" \\\n  --prompt \"Load the soul-refinement skill. Mine the last 24 hours of sessions (run-time window, not the calendar date) for user corrections and lessons. Distill into principle or skill patches. Report the window and its row counts; stay silent only if the window is non-empty and nothing changed.\"\n```\n\nThe fleet's live per-host job runs `14 23 * * *` (`docs\u002Fcron-schedules.md`); any evening\nslot works, but a late dispatch can land after midnight — so the window must never be derived\nfrom the date.\n\n## Decision Rules\n\n| Situation | Action |\n|-----------|--------|\n| User corrected a specific behavior | Check existing principle. If covered: strengthen. If gap: add principle. |\n| Correction already landed by a same-day cycle | Verify before writing. The window's corrections are often codified within hours — grep the repo for the correction's own artifact (and read the day's commits) before proposing a principle. Measured 2026-10-20: 3 of the window's 4 corrections already had committed same-day fixes, so a fresh principle for them would have duplicated landed work. Measured again 2026-10-22: **4 of the 4 operator rows in the window already had same-day landed fixes** (the human-exemption guard + its evidence; the skills-loader repair + a doctor FAIL gate + the `skill-curation` loader rules), so the pass's entire deliverable was a refinement of this skill's own mining recipe — not a principle. Measured a third time 2026-10-23: **all 4 prose corrections already had same-day committed fixes** (reviewer sibling-target `c9169092`; orchestrator-only review→completed `5ae8645d`; repo cleanup `ca9de57f`; Cloudflare vendored `36460672`). Expect that outcome on a busy day and report it as a result, not as \"nothing to refine\". |\n| Corrections all already landed | **Then land the fleet-hygiene work the day's own activity re-broke.** A busy day closes many cycles and each one can re-strand a deployed skill. Run `check-skill-drift-parity.py`; if it FAILs, that is the pass's deliverable — reconcile, deploy, push (measured 2026-10-23: 5 re-stranded, parity FAIL → PASS). **A parity PASS is NOT the deploy being current — run the doctor's own check too, because the two measure opposite directions.** Parity reports the STRANDED direction (content that exists only deployed) and reads PASS while the doctor's `Skill drift` line FAILs on the repo-ahead direction: a lesson committed to the repo that no deploy has yet propagated, so the fleet has not received it either. Measured 2026-10-24: parity `--check` rc=0 with 0 stranded \u002F 0 absent beside `⚠️ Skill drift: devops\u002Ffleet-commands` — the day's 22:38 commit added an envelope-allowlist lesson the fleet had not received. The fix for THAT direction is a deploy (`fleet-dogfood.sh --force`), never `reconcile-stranded-skills.py`, which only ever moves deployed→repo; after the deploy the doctor reads `386 skills in sync` and no per-skill line remains. Read the doctor's per-check line before concluding the tree is clean. |\n| User taught a workflow discovery | Save as a skill, not in SOUL.md. |\n| I made a mistake | Trace root cause. Only principle failures go in SOUL.md. |\n| Deeper understanding discovered | Add nuance to relevant section. |\n| Bible insight for the day | Append to Scripture Insights section. |\n\n## Read Tracking (Agent Inbox)\n\nThe Agent Inbox already tracks read\u002Funread per message via `status:` frontmatter field.\n\n- `status: unread` — message has not been processed\n- `status: read` — message has been processed\n\nWhen your inbox polling script processes a message:\n1. Call `GET \u002Fread\u002F{filename}` to mark it as read\n2. Next poll with `?unread_only=true` will skip it\n\nEach message has a unique ID (its filename, e.g. `20260613163202-luke`). This serves as a session marker — you can track which messages have been acknowledged by saving seen IDs to a local state file.\n\n## Principles for Good Refinements\n\n- **Be concise.** A refinement is 1-4 sentences.\n- **Be precise.** Name the specific behavior, not a general virtue.\n- **Be actionable.** Must be verifiable in practice.\n- **Don't bloat.** One-off edge cases → memory or lesson, not SOUL.md.\n- **Mark additions.** Prefix new entries with `\u003C!-- Added YYYY-MM-DD -->`.\n\n## Template Curation — Consolidation & Size Budget (learned 2026-08-03)\n\nThe template (`docs\u002Ftemplates\u002FSOUL.md`) and deployed `~\u002F.hermes\u002FSOUL.md` had a\n**size budget enforced by the doctor** (`check_soul_sync`) until 2026-11-04, when\nthe SOUL-decoupling removed it (SOUL.md is now Hermes-owned, not fleet-synced):\n**previously WARN >15K, FAIL >20K.** Keep SOUL lean for loading — growing past\n~20K bloats what every session loads — but nothing fleet-side fails on it now.\n\n### Canonical structure: 12 principles\n\nPrinciples accumulate from user corrections. When the count drifts toward\n20-30+, **consolidate by theme** back to the canonical 12 (2026-08-03: 34 → 12):\n\n1. Loop Governance — Mandatory Pre-Work Sequence (MCP-Enforced)\n2. Inbox Message Decision Framework (+ audit trail)\n3. Verify Before Declare — Real Work, Real Output\n4. Be Proactive — Fix, Test, Document\n5. Own Every Issue — Fix First, Prove Second\n6. Always Do the Right Way — Canonical Paths\n7. Be Concise — Every Word Earns Its Place\n8. Protect the System — Security, Privacy, Stability\n9. Design for the Full Deployment Matrix\n10. Test Small Before Scaling\n11. Agent Cron Management\n12. Not Done Until Tested — End-to-End Verification\n\n### Consolidation rules\n\n- **Merge by theme, preserve every guardrail.** Each merged principle carries\n  the actionable content of all its source principles (provenance dates inline).\n- **Marker preservation is good practice (no longer enforced).** The doctor's\n  `_extract_soul_markers` (removed 2026-11-04) used to extract bolded phrases\n  (`- **What I did**`, `- **Proactive**`, etc.) and require template ↔ deployed\n  parity. Even without enforcement, keep the audit-trail markers (\"What I did\",\n  \"How I verified\", \"How the user learns about it\", \"Where it's logged\") as\n  **bold list items** so they stay consistent across the fleet template.\n- **Scripture stays at ONE anchor entry.** The daily-bible cron needs the LAST\n  `### Book —` entry to know the next book. Keep exactly one (e.g. Colossians);\n  archive older entries (full content lives in `~\u002Fbrain\u002F\u003Cagent>\u002Fbible\u002F`).\n- **Do NOT raise the doctor thresholds** to accommodate a bloated template —\n  the content must fit the budget, not the budget stretch to the content.\n- **Keep the template under 20K** (ideally ≤16K so a fresh deploy lands at WARN,\n  not FAIL).\n\n### Sync after curation\n\nSince the 2026-11-04 SOUL-decoupling, `soul-merge.py`\u002F`soul-sync-all.sh` are\nremoved — the fleet no longer auto-syncs `~\u002F.hermes\u002FSOUL.md`. To land a change:\n\n1. Patch the template `docs\u002Ftemplates\u002FSOUL.md` (the shared reference) AND the\n   deployed `~\u002F.hermes\u002FSOUL.md` — they are independent copies now; there is no\n   sync step that pushes one to the other\n2. Rebuild deployed `~\u002F.hermes\u002FSOUL.md` from template + agent-specific sections\n   (Identity \u002F Core Mission \u002F Core Traits \u002F Final Directive) as needed\n3. Verify `agents-doc-audit.py` mandatory sections still pass\n4. Commit template + skill together; broadcast via `agents-doc-broadcast.py`\n   (SOUL is identity — the broadcast tells other agents to review, it no\n   longer propagates content)\n\n- **Passing a PATH where the reviewed material must be CONTENT is not a review — it is the same\n  unverified-claim CLASS the reviewer exists to catch** (observed 2026-10-14, cycle 12624).\n  `adversarial-review.py --material` takes the material itself; a path is reviewed as the literal\n  string, the reviewer correctly refuses to judge substance, and a CLEAN verdict on a path proves\n  nothing. Rules, all measured the same day: (1) build the material from the artifact's CONTENTS\n  (or `git diff --cached`) and paste it inline — a pointer to a file or a commit SHA is never\n  material. (2) Do NOT put worker questions or directives in the material — \"answer Q1-Q3\",\n  \"report as JSON\" are filed as `injection` findings and the questions are NOT answered; state the\n  proposal as a checkable claim instead. (3) Quote existing text by COPY-PASTE, never from memory:\n  a \"from:\" line reading \"never delete or weaken enforcement\" against a file reading \"never weaken\n  enforcement\" was filed `fabrication` — the strongest severity — for a memory-drift typo. Run\n  `sed -n '\u003Ca>,\u003Cb>p' \u003Cfile>` first, then diff against those bytes. Expect 3+ rounds; each refusal\n  explains itself in its `recommendation` field.\n- **A standing rule must land as a GATE, and the repo template is now gated** (observed 2026-10-14,\n  cycle 12624). When the operator says \"put in ENFORCEMENT against this move\", the deliverable is a\n  machine-enforced control that fires without the agent's cooperation (a doctor FAIL or pre-push\n  block) — a skill note, a memory entry, or the agent's own diligence is not a control. Live\n  exemplar: `ops\u002Fscripts\u002Fquality\u002Freview-provenance-check.py` + `check_review_provenance`, where an\n  undeclared review artifact FAILs the doctor and blocks every push on the host. For the identity\n  document the writer gate has TIGHTENED since the 2026-10-07 probe: writing\n  `docs\u002Ftemplates\u002FSOUL.md` from a cron is REFUSED — \"write to protected agent-instruction file(s)\n  (SOUL.md) requires approval but no interactive user or gateway is present to approve it\" — while\n  the DEPLOYED `~\u002F.hermes\u002FSOUL.md` remains ungated\n  (`_protected_instruction_reason(deployed,'cron')` -> `None`; the template path -> `SOUL.md`).\n  So an unattended cron CANNOT amend the canonical template: it may update its OWN deployed copy\n  (still requiring operator approval by policy), and it must SUBMIT the exact proposed template\n  wording for approval. Do not route around the refusal — a fresh cycle's lock is NOT authorization.\n  (Correction to the \"observed 2026-10-07\" note above: that probe's success was real but scoped to\n  the DEPLOYED path — it does not mean the cron can write the template.)\n- **The cron commit gate now blocks on a reflexion check; editing the pre-commit hook is the wrong\n  repair** (observed 2026-10-14, cycle 12624). `git commit` from a cron is refused with \"Reflexion\n  check not completed — NOT-LOADED reflexion-check (session \u003Cid>)\": load the skill with\n  `skill_view(name='reflexion-check')`, answer its questions, then commit. Do NOT edit\n  `ops\u002Fscripts\u002Fpre-commit-score` — that path and `ops\u002Fscripts\u002Fpre-push-pull` are both in\n  `ops\u002Fscripts\u002Flib\u002Falways-review-paths.txt`, so touching them converts a one-line convenience into\n  an always-review change. Note `git commit -F -m \u003Cmsg> -- \u003Cpathspec>` still fires the gate.\n\n## Pitfalls\n\n- **A long lookback OVERLAPS the previous run's window, so the same correction is re-reviewed.**\n  Read the previous pass's own reported window (the previous soul-refine cron session's final\n  report) and start from its END, not from `now - 30 h`; otherwise the overlap re-derives\n  corrections that were already codified and the overlap looks like fresh work. Measured\n  2026-10-21: the 10-20 pass ended at `23:17` while a 30 h window began at `17:18`, so one of\n  that day's corrections (doctor-warning dispositions) sat inside both windows.\n- **Resolve the previous pass's END mechanically, and classify the window by `sessions.source`**\n  (measured 2026-10-22). Query it, don't recall it:\n  `SELECT id,title,started_at,last_activity_at,ended_at FROM sessions WHERE title LIKE\n  '%soul-refinement%' ORDER BY COALESCE(last_activity_at,started_at) DESC LIMIT 3` — the newest row\n  that is not THIS run is the previous pass, and its `last_activity_at` is the start bound\n  (`last_activity_at` 23:25:02 vs `ended_at` 23:25:53, 51 s apart; a `now - 24 h` start at 23:15:45\n  reached 9 minutes BACK into the previous window). Classify with `sessions.source` in one column\n  rather than by an id prefix — that day's 31 sessions split `cron` 24 \u002F `subagent` 5 \u002F `telegram` 2 —\n  because **a `subagent` session stores its dispatching prompt as `role='user'` exactly like cron\n  does**, and the note below names only cron: those 5 fan-out rows would otherwise read as operator\n  prose and inflate the \"corrections\" count before you read a single sentence. Read only the human\n  transports, keep `active=1`, and note `time.strptime` rejects GNU `date`'s `'%F %T'`\n  (`ValueError: 'F' is a bad directive`) — the format is `'%Y-%m-%d %H:%M:%S'`.\n- **Verify the skill file you patched is REPO-SOURCED, not stranded in the deployed tree.**\n  Content written only to `~\u002F.steadfaste-fleet\u002Fskills\u002F...` is invisible to the fleet: the deploy's\n  drift guardrail refuses to overwrite it, so it never reaches the repo or any peer. Run\n  `python3 ops\u002Fscripts\u002Fmanage\u002Fcheck-skill-drift-parity.py` after every skill patch, and if your\n  path is under `Stranded in place:` land it into the repo source in the same cycle (measured\n  2026-10-21: the day's verbosity lesson lived deployed-only; landing it moved the detector\n  18 → 17 stranded and took the path out of the list).\n- **Parity can regress WITHIN the same day it was fixed — a recovery commit is not a permanent\n  state** (measured 2026-10-23). `ca9de57f` landed a full recovery at 18:18 (`0 stranded, 0 absent`),\n  yet the 23:15 pass measured **5 stranded** again: `devops\u002Ffleet-bus`, `devops\u002Fshared-repo-push-gates`,\n  `devops\u002Fshell-scripting`, `skill-vetting`, `software-development\u002Fchange-checklist`. Each was a lesson\n  written to the deployed tree by a later cycle that same day — the drift guardrail then refused to\n  overwrite it, so the fleet never received it. Never inherit yesterday's PASS: re-measure every pass.\n  Reconcile with the tool's own modes — `reconcile-stranded-skills.py` (report first, then `--apply`\n  for the pure-superset class) — and treat a `REVIEW`\u002F`DROP` line as a CLAIM to check, not a fact:\n  all three of `ca9de57f`'s drop lines were false positives (deployed side reflowed and extended), and\n  the 10-23 `change-checklist` DROP was the same shape, so merge that one addition by hand instead of\n  believing the tool. Then regenerate the parity evidence artifact, commit by PATHSpec, deploy, and push.\n- **`fleet-update.sh` is NOT at the repo root — it lives at `ops\u002Fscripts\u002Ffleet-update.sh`**\n  (`bash fleet-update.sh` gives `rc=127, No such file or directory`, which reads like a broken\n  deploy). Run `bash ops\u002Fscripts\u002Ffleet-update.sh` from the repo root; `rc=0` is the pass signal.\n\n- **Cron sessions writing SOUL.md — verify the gate for the EXACT path; do not\n  assume it.** Hermes core has a protected-instruction gate\n  (`_check_protected_instruction_write`,\n  `tools\u002Ffile_tools_write_guards.py`) with `soul.md` in\n  `_PROTECTED_INSTRUCTION_BASENAMES`. BUT the same module returns early for any\n  path under the Hermes home (`_hermes_exempt_homes()`, lines ~236-238) *before*\n  the basename test — so a write to the DEPLOYED `~\u002F.hermes\u002FSOUL.md` is NOT\n  gated, while a write to the repo template `docs\u002Ftemplates\u002FSOUL.md` (not under\n  the home) IS. Verified 2026-10-07 on esther\u002FHermes v0.21.5: a probe patch to\n  `~\u002F.hermes\u002FSOUL.md` from a cron SUCCEEDED; calling\n  `_protected_instruction_reason('\u002Fhome\u002F\u003Cuser>\u002F.hermes\u002FSOUL.md', 'cron')`\n  returned `None` while `_protected_instruction_config()` returned `(True, [])`.\n  Probe the actual target path with the above call before claiming the gate\n  blocks (or protects) you. Regardless of the gate, an identity change still\n  needs operator approval by policy — the cron's job is DETECTION: report the\n  corrections found so the operator codifies them in an interactive session.\n  Never bypass a gate that DOES fire via terminal\u002Fexecute_code.\n- **The pass's FIRST call dies on the enforcer's third block shape, and it is not a lock problem**\n  (measured 2026-10-25). With no governed repo yet resolved, every write-class-classified call is\n  refused — including a bare `date` and this pass's own `python3 \u003Cmining-script>` — with *\"No\n  governed repo could be resolved for this call\"*. That is its OWN message, not the gate-2 lock\n  rule, and acquiring a lock is not the remedy: resolving a **repo** is. It cost this pass two\n  calls retrying the same shape from `~` before `workdir=` was passed, and the deployed-copy\n  location never helps (`~\u002F.steadfaste-fleet` has no `.git`). The remedy is ORDER: run `begin_change`\n  first (step 2 of the sequence this pass runs anyway) and the identical shape then returns rc=0\n  from any cwd. So when a mining call is refused, do not reword it and do not go hunting for a\n  lock — open the cycle, then re-issue it unchanged.\n- **Don't append the same lesson twice.** If a principle already covers the gap, strengthen it rather than adding another.\n- **Don't treat skills as identity.** Workflow discoveries go in SKILL.md, not SOUL.md.\n- **Bible insights must be genuine.** Don't force-fit a lesson. If the day's book has nothing obvious for the agent's role, say so honestly.\n- **Resolve the mining window from RUN TIME, never from the calendar date** (observed 2026-10-18). This job's dispatch can slip past midnight: on esther `hermes cron list` recorded the `14 23 * * *` slot dispatching at `00:03` (49 min late), and `~\u002F.hermes\u002Fcron\u002Fusage_audit.jsonl` holds two earlier after-midnight runs (`00:03` and `00:26`) among its 63 logged runs. A literal reading of \"today's sessions\" at 00:03 is a three-minute-old day: the pass finds nothing, reports `[SILENT]`, and the PREVIOUS day's corrections are lost with no signal — a zero-row window and a genuinely quiet day look identical in the output. So compute a bounded lookback ending at NOW (the last ~30 h, as an epoch-float bound — `timestamp` is a float, not ISO), print the resolved window and the row counts it returned, and never report \"nothing to refine\" for a window you have not first shown to be non-empty.\n- **The window's counts DRIFT between the pass and any later re-run, so an evidence artifact must FREEZE the bounds it documents** (measured 2026-10-24). The window is resolved from RUN TIME, so a generator re-run twenty minutes later derives different bounds — the 24 h bound advances with the clock — and then prints different counts for the same pass: the pass itself resolved 23:26:13 → 23:16:37 holding 15 sessions \u002F 16 rows, while the identical script re-run at 23:29 printed 23:29:06 → 23:29:06 over 24.00 h with 15 sessions and 16 rows. A transcript that recomputes them contradicts the cycle note it exists to support, which is the shape a reviewer files as fabrication. Freeze BOTH bounds as generator defaults (env-overridable), say in the artifact that they are frozen and why, and reconcile the two counts EXPLICITLY when they differ: a ROW is selected by its own `timestamp` and a SESSION by `COALESCE(last_activity_at,started_at)`, so they are different sets by construction — a row can belong to a session whose bound sits outside the window (a telegram carrier session, or THIS run, whose own prompt predates the frozen end). Size the end bound exactly, too: a probe that used `\u003C= NOW + 60` swept this run's own session in and reported one session too many, a figure that then had to be withdrawn.\n- **`role='user'` is NOT the operator: most rows in a window are not corrections** (measured 2026-10-20). A 24 h window on esther returned 46 `active=1` user rows across 29 sessions, but only 4 were human sessions — the other 25 were cron sessions, and a cron session stores its OWN task prompt as `role='user'`, so every cron run contributes a row that reads like operator input. Of the 21 rows inside the 4 human sessions, 8 still carried a machine marker (internal background-process notifications, gateway-origin wrappers, a pasted cron delivery) and only 13 were prose to read. Classify BEFORE reading: split `cron_*` sessions from the rest, then drop rows opening with a machine marker (`[IMPORTANT: The user has invoked`, `[IMPORTANT: You are running as a scheduled cron job`, `[IMPORTANT: Background process`, `[INTERNAL NOTIFICATION`, `[Cron delivery:`, `Gateway message origin`), and read only what is left. Treating raw user rows as corrections over-reports by roughly 3.5x and buries the operator's real message; keep `active=1` too (46 of 52 rows here — the 6 dropped are compaction artifacts, not a quiet day).\n- **Implement the marker rule as `startswith` on the LSTRIPPED content — a substring test\n  silently deletes real operator prose** (measured 2026-10-27, and it cost this pass the day's\n  only still-open-looking request). A `marker in content[:200]` test dropped *\"Time to fix the\n  mycortex nightly dream for all agents. Ex: Cronjob Response: …\"* — an operator request that\n  merely QUOTES a peer's report — so the pass read 5 prose rows instead of 6 and never opened\n  the item. The rule above says \"drop rows OPENING with a machine marker\": implement that rule,\n  not a stricter approximation of it. Use ONE shared classifier for the mining pass and any\n  evidence generator — two implementations printed 5-vs-6 prose rows for the same frozen window,\n  i.e. the artifact contradicted the pass it documents, which is the shape a reviewer files as\n  fabrication. When a regenerated count differs from the pass's, reconcile it EXPLICITLY before\n  shipping: this pass's session delta (28 → 27) was solely THIS run's own session leaving the\n  frozen end bound as its `last_activity_at` advanced, while the row count held at 38 because a\n  ROW is bound by its own `timestamp` — a prose delta (5 → 6) is never drift, it is a defect\n  to fix or a defect to report.\n- **Landing a REVIEW-class stranded skill: `cp` the deployed file, but check for the deploy's\n  SOURCE banner first.** The parity tool ignores the 3-line banner by design, so a\n  banner-carrying deployed copy copied straight over the repo source would inject it into the\n  fleet's source. Confirm with `diff -u` that the only hunks are content and the headers match\n  byte-for-byte (measured 2026-10-27: all 3 were banner-free, so the copy was content-only).\n  Read the FULL diff before copying, and count the drops: that pass's REVIEW lines claimed\n  14\u002F1\u002F4 dropped lines and every one was present — rewritten — in the deployed text, the\n  7th consecutive pass where a REVIEW\u002FDROP line was a false positive of the same\n  \"deployed side reflowed and extended\" shape.\n- **Silence is better than forced growth.** If no corrections or lessons exist for a given day, produce nothing.\n- **Watchdog scripts must update their state\u002Ftimestamp file BEFORE checking for work**, to avoid stale state readings.\n- **Mining large sessions via session_search:** the scroll shape ignores `role_filter` (discovery-only), and windows >100KB spill to `~\u002F.hermes\u002Fcache\u002Fspillover\u002F*.txt` — extract user messages from the spilled JSON with one terminal `python3` pass instead of re-requesting. `execute_code` is blocked in cron mode; terminal under a governance lock is the path (observed 2026-09-28). (observed 2026-09-29) Skip discovery of the store itself: the real sessions store is `~\u002F.hermes\u002Fstate.db` (1GB WAL) — `~\u002F.hermes\u002Fstate\u002Fsessions.db` is a 0-byte stub, and there is no `sqlite3` CLI on esther. One read-only pass: `python3` heredoc with `sqlite3.connect('file:…state.db?mode=ro', uri=True)` + `PRAGMA query_only=1`, select `role='user' AND active=1` rows for the day's session ids, dump JSON to scratch, then triage previews. (Gate behavior: in a cron session an active lock sufficed — no skills gate; the 7-always-skills gate was observed in an interactive session, 2026-09-29.) (observed 2026-10-09) `timestamp` is a **Unix epoch float**, not ISO — an ISO `>=` bound silently returns 0 rows; compute the day's midnight as a float. **Derive that bound with `time.mktime(time.strptime(...))` or `time.time()`, never by arithmetic on a remembered epoch:** a hand-derived bound during the 2026-10-18 run landed ~13 h early and returned 0 rows — and 0 rows is exactly what a quiet day looks like through this window, so the mistake is silent. If the count comes back 0, re-derive the bound and print it before concluding anything about the day.\n- **PII guard trips on the day's own session IDs** (observed 2026-10-09). The shared-surface `write_file` guard rejects the report as a \"phone number\" when it contains Hermes session IDs (`\u003C8digits>_\u003C6digits>_\u003Chex>`) or 10-digit gateway chat\u002Fuser ids — long digit runs match its phone heuristic. Write the report with session references generalized (\"the lock session\", \"the drift session\"); the evidence lives in the DB, not the report. Also generalize nginx\u002FIP filenames if they embed numbers. Redact at the GENERATOR, never in the committed copy: mask runs of 7 or more digits (`re.sub(r'\\d{7,}', ...)`) and collapse `\u002Fhome\u002F\u003Cuser>` and `\u002FUsers\u002F\u003Cuser>` to `~`, so the artifact's own command line stays reproducible instead of being hand-patched into disagreeing with the text above it.\n- **A concurrent session's commit can sweep YOUR staged files, and its message can claim YOUR fix.** Observed 2026-10-13: a peer session's plain `git commit` captured the loop-gov edits staged by this cycle and committed them under its own message; separately, a peer committed `fix(review): refuse a degenerate reviewer response` whose own message said \"NO TEST SHIPPED\", and re-measuring the committed file showed the guard was **not present at all** — the crash was still live. Two lessons: (1) commit by PATHSpec every time (`git commit -F \u003Cmsg> -- \u003Cyour paths...>`) and assert the staged set first, or a peer's staged work rides into your commit; (2) when the day's session history contains a commit claiming a code fix, RE-MEASURE the claim against the committed file before believing it — the \"unverified-claim\" pattern is exactly a commit message asserting a result whose producing artifact was never written. A claimed-but-absent fix is worse than an open bug: the record says otherwise, so nobody looks again.\n- **`repo_path` on a cron session's lock can be empty, and then NOTHING can mint a review receipt.** Observed 2026-10-13: the soul-refine cron cycle's lock carried `repo_path=''`, so every close logged `review receipt NOT written: lock has no repo identity` and the pre-push always-review gate refused the push with no way to satisfy it. Cause is by DESIGN, not a bug: `_session_repo_path()` returns `None` for a Hermes caller that has an injected `session_id` but no injected repo (\"never guessed for a Hermes caller\"). The documented escape hatch is `FLEET_SESSION_REPO=\u003Crepo path>` in the environment the MCP server reads — a non-Hermes harness sets it. Practical recovery in a cron: open a FRESH `begin_change` for the push (a later lock in the same session may resolve `repo_path` from cwd), close it to mint the receipt, then push. Check `repo_path` with `check_lock()` BEFORE relying on a receipt ever appearing.\n- **`git stash`\u002F`stash pop` silently un-stages your work.** Observed 2026-10-13: `git stash -q -u` then `git stash pop -q` used to compare a baseline left only ONE of four files staged. After any stash round-trip, re-run `git add -- \u003Cpaths>` and assert `git diff --cached --name-only` shows exactly your set before committing.\n- **The recurring reviewer finding is \"unverified-claim\": commit the artifact, don't narrate it** (observed 2026-10-09 — 102 `unverified-claim` mentions in one day). When a worker note asserts a result (\"13 cases all pass\", \"dogfood passed\", \"the wrapper is host-local by design\"), the self-adversarial reviewer refuses the close unless the producing artifact is **committed and re-executable** (test file + run output transcript, the automation's definition, the operator's authorization transcript). Classify findings by `technique` for the day with one `python3` regex pass over tool rows — the dominant technique IS the day's lesson.\n\n## Template: Initial SOUL.md Structure\n\nIf you don't have a SOUL.md yet, create one at `~\u002F.hermes\u002FSOUL.md` with this structure:\n\n```markdown\n# SOUL.md — {Agent Name}\n\n## Identity\n\nBrief description of who you are and your role.\n\n## Core Mission\n\nWhat you exist to do.\n\n## Behavioral Principles\n\n### 1. {First Principle}\n{Description}\n\n### 2. {Second Principle}\n{Description}\n\n## Scripture Insights\n\n\u003C!-- Entries appended here by daily cron -->\n```\n\nThen run the setup commands above to start the daily refinement cycle.\n","# Soul Refinement — Daily Identity Update\n\n## What This Is\n\nA daily process that refines an agent's SOUL.md by mining the day's sessions for corrections and insights, plus optional daily Bible reading. The result is a living identity document that gets sharper over time.\n\nAgents who use this process grow alongside their operator — applying lessons from both daily work and Scripture.\n\n## Two Channels\n\n### Channel A — Bible Insight (cron: 1am daily, Python script)\n\nHandled by `agent-daily-bible-reading.py` (no_agent cron script). It:\n1. Generates a short behavioral statement (verse + one-line commitment) for SOUL.md\n2. Saves the full analysis (archaeology, language, Jewish perspective) to `~\u002Fbrain\u002F\u003Cagent>\u002Fbible\u002F\u003Cbook>.md`\n3. Updates the brain index\n\n**Output format for SOUL.md (short form only):**\n```markdown\n### {Book} — *\"{Key verse}\"* ({Ref})\n\nI will [one-line behavioral commitment for a system operator].\n\n\u003C!-- Added {YYYY-MM-DD} -->\n```\n\n**Full analysis** goes to `~\u002Fbrain\u002F\u003Cagent>\u002Fbible\u002F\u003Cbook>.md` — not SOUL.md.\n\n### Channel B — Session Mining (recommended cron: 23:00 daily)\n\nReviews the sessions since the last run for user corrections and distills lessons into principle updates. **The window is a bounded lookback from RUN TIME, never a calendar date** — see Pitfalls.\n\n**Setup (do once):**\n```bash\nhermes cron create --name \"local-daily-soul-refinement\" \\\n  --schedule \"14 23 * * *\" \\\n  --skill \"soul-refinement\" \\\n  --prompt \"Load the soul-refinement skill. Mine the last 24 hours of sessions (run-time window, not the calendar date) for user corrections and lessons. Distill into principle or skill patches. Report the window and its row counts; stay silent only if the window is non-empty and nothing changed.\"\n```\n\nThe fleet's live per-host job runs `14 23 * * *` (`docs\u002Fcron-schedules.md`); any evening\nslot works, but a late dispatch can land after midnight — so the window must never be derived\nfrom the date.\n\n## Decision Rules\n\n| Situation | Action |\n|-----------|--------|\n| User corrected a specific behavior | Check existing principle. If covered: strengthen. If gap: add principle. |\n| Correction already landed by a same-day cycle | Verify before writing. The window's corrections are often codified within hours — grep the repo for the correction's own artifact (and read the day's commits) before proposing a principle. Measured 2026-10-20: 3 of the window's 4 corrections already had committed same-day fixes, so a fresh principle for them would have duplicated landed work. Measured again 2026-10-22: **4 of the 4 operator rows in the window already had same-day landed fixes** (the human-exemption guard + its evidence; the skills-loader repair + a doctor FAIL gate + the `skill-curation` loader rules), so the pass's entire deliverable was a refinement of this skill's own mining recipe — not a principle. Measured a third time 2026-10-23: **all 4 prose corrections already had same-day committed fixes** (reviewer sibling-target `c9169092`; orchestrator-only review→completed `5ae8645d`; repo cleanup `ca9de57f`; Cloudflare vendored `36460672`). Expect that outcome on a busy day and report it as a result, not as \"nothing to refine\". |\n| Corrections all already landed | **Then land the fleet-hygiene work the day's own activity re-broke.** A busy day closes many cycles and each one can re-strand a deployed skill. Run `check-skill-drift-parity.py`; if it FAILs, that is the pass's deliverable — reconcile, deploy, push (measured 2026-10-23: 5 re-stranded, parity FAIL → PASS). **A parity PASS is NOT the deploy being current — run the doctor's own check too, because the two measure opposite directions.** Parity reports the STRANDED direction (content that exists only deployed) and reads PASS while the doctor's `Skill drift` line FAILs on the repo-ahead direction: a lesson committed to the repo that no deploy has yet propagated, so the fleet has not received it either. Measured 2026-10-24: parity `--check` rc=0 with 0 stranded \u002F 0 absent beside `⚠️ Skill drift: devops\u002Ffleet-commands` — the day's 22:38 commit added an envelope-allowlist lesson the fleet had not received. The fix for THAT direction is a deploy (`fleet-dogfood.sh --force`), never `reconcile-stranded-skills.py`, which only ever moves deployed→repo; after the deploy the doctor reads `386 skills in sync` and no per-skill line remains. Read the doctor's per-check line before concluding the tree is clean. |\n| User taught a workflow discovery | Save as a skill, not in SOUL.md. |\n| I made a mistake | Trace root cause. Only principle failures go in SOUL.md. |\n| Deeper understanding discovered | Add nuance to relevant section. |\n| Bible insight for the day | Append to Scripture Insights section. |\n\n## Read Tracking (Agent Inbox)\n\nThe Agent Inbox already tracks read\u002Funread per message via `status:` frontmatter field.\n\n- `status: unread` — message has not been processed\n- `status: read` — message has been processed\n\nWhen your inbox polling script processes a message:\n1. Call `GET \u002Fread\u002F{filename}` to mark it as read\n2. Next poll with `?unread_only=true` will skip it\n\nEach message has a unique ID (its filename, e.g. `20260613163202-luke`). This serves as a session marker — you can track which messages have been acknowledged by saving seen IDs to a local state file.\n\n## Principles for Good Refinements\n\n- **Be concise.** A refinement is 1-4 sentences.\n- **Be precise.** Name the specific behavior, not a general virtue.\n- **Be actionable.** Must be verifiable in practice.\n- **Don't bloat.** One-off edge cases → memory or lesson, not SOUL.md.\n- **Mark additions.** Prefix new entries with `\u003C!-- Added YYYY-MM-DD -->`.\n\n## Template Curation — Consolidation & Size Budget (learned 2026-08-03)\n\nThe template (`docs\u002Ftemplates\u002FSOUL.md`) and deployed `~\u002F.hermes\u002FSOUL.md` had a\n**size budget enforced by the doctor** (`check_soul_sync`) until 2026-11-04, when\nthe SOUL-decoupling removed it (SOUL.md is now Hermes-owned, not fleet-synced):\n**previously WARN >15K, FAIL >20K.** Keep SOUL lean for loading — growing past\n~20K bloats what every session loads — but nothing fleet-side fails on it now.\n\n### Canonical structure: 12 principles\n\nPrinciples accumulate from user corrections. When the count drifts toward\n20-30+, **consolidate by theme** back to the canonical 12 (2026-08-03: 34 → 12):\n\n1. Loop Governance — Mandatory Pre-Work Sequence (MCP-Enforced)\n2. Inbox Message Decision Framework (+ audit trail)\n3. Verify Before Declare — Real Work, Real Output\n4. Be Proactive — Fix, Test, Document\n5. Own Every Issue — Fix First, Prove Second\n6. Always Do the Right Way — Canonical Paths\n7. Be Concise — Every Word Earns Its Place\n8. Protect the System — Security, Privacy, Stability\n9. Design for the Full Deployment Matrix\n10. Test Small Before Scaling\n11. Agent Cron Management\n12. Not Done Until Tested — End-to-End Verification\n\n### Consolidation rules\n\n- **Merge by theme, preserve every guardrail.** Each merged principle carries\n  the actionable content of all its source principles (provenance dates inline).\n- **Marker preservation is good practice (no longer enforced).** The doctor's\n  `_extract_soul_markers` (removed 2026-11-04) used to extract bolded phrases\n  (`- **What I did**`, `- **Proactive**`, etc.) and require template ↔ deployed\n  parity. Even without enforcement, keep the audit-trail markers (\"What I did\",\n  \"How I verified\", \"How the user learns about it\", \"Where it's logged\") as\n  **bold list items** so they stay consistent across the fleet template.\n- **Scripture stays at ONE anchor entry.** The daily-bible cron needs the LAST\n  `### Book —` entry to know the next book. Keep exactly one (e.g. Colossians);\n  archive older entries (full content lives in `~\u002Fbrain\u002F\u003Cagent>\u002Fbible\u002F`).\n- **Do NOT raise the doctor thresholds** to accommodate a bloated template —\n  the content must fit the budget, not the budget stretch to the content.\n- **Keep the template under 20K** (ideally ≤16K so a fresh deploy lands at WARN,\n  not FAIL).\n\n### Sync after curation\n\nSince the 2026-11-04 SOUL-decoupling, `soul-merge.py`\u002F`soul-sync-all.sh` are\nremoved — the fleet no longer auto-syncs `~\u002F.hermes\u002FSOUL.md`. To land a change:\n\n1. Patch the template `docs\u002Ftemplates\u002FSOUL.md` (the shared reference) AND the\n   deployed `~\u002F.hermes\u002FSOUL.md` — they are independent copies now; there is no\n   sync step that pushes one to the other\n2. Rebuild deployed `~\u002F.hermes\u002FSOUL.md` from template + agent-specific sections\n   (Identity \u002F Core Mission \u002F Core Traits \u002F Final Directive) as needed\n3. Verify `agents-doc-audit.py` mandatory sections still pass\n4. Commit template + skill together; broadcast via `agents-doc-broadcast.py`\n   (SOUL is identity — the broadcast tells other agents to review, it no\n   longer propagates content)\n\n- **Passing a PATH where the reviewed material must be CONTENT is not a review — it is the same\n  unverified-claim CLASS the reviewer exists to catch** (observed 2026-10-14, cycle 12624).\n  `adversarial-review.py --material` takes the material itself; a path is reviewed as the literal\n  string, the reviewer correctly refuses to judge substance, and a CLEAN verdict on a path proves\n  nothing. Rules, all measured the same day: (1) build the material from the artifact's CONTENTS\n  (or `git diff --cached`) and paste it inline — a pointer to a file or a commit SHA is never\n  material. (2) Do NOT put worker questions or directives in the material — \"answer Q1-Q3\",\n  \"report as JSON\" are filed as `injection` findings and the questions are NOT answered; state the\n  proposal as a checkable claim instead. (3) Quote existing text by COPY-PASTE, never from memory:\n  a \"from:\" line reading \"never delete or weaken enforcement\" against a file reading \"never weaken\n  enforcement\" was filed `fabrication` — the strongest severity — for a memory-drift typo. Run\n  `sed -n '\u003Ca>,\u003Cb>p' \u003Cfile>` first, then diff against those bytes. Expect 3+ rounds; each refusal\n  explains itself in its `recommendation` field.\n- **A standing rule must land as a GATE, and the repo template is now gated** (observed 2026-10-14,\n  cycle 12624). When the operator says \"put in ENFORCEMENT against this move\", the deliverable is a\n  machine-enforced control that fires without the agent's cooperation (a doctor FAIL or pre-push\n  block) — a skill note, a memory entry, or the agent's own diligence is not a control. Live\n  exemplar: `ops\u002Fscripts\u002Fquality\u002Freview-provenance-check.py` + `check_review_provenance`, where an\n  undeclared review artifact FAILs the doctor and blocks every push on the host. For the identity\n  document the writer gate has TIGHTENED since the 2026-10-07 probe: writing\n  `docs\u002Ftemplates\u002FSOUL.md` from a cron is REFUSED — \"write to protected agent-instruction file(s)\n  (SOUL.md) requires approval but no interactive user or gateway is present to approve it\" — while\n  the DEPLOYED `~\u002F.hermes\u002FSOUL.md` remains ungated\n  (`_protected_instruction_reason(deployed,'cron')` -> `None`; the template path -> `SOUL.md`).\n  So an unattended cron CANNOT amend the canonical template: it may update its OWN deployed copy\n  (still requiring operator approval by policy), and it must SUBMIT the exact proposed template\n  wording for approval. Do not route around the refusal — a fresh cycle's lock is NOT authorization.\n  (Correction to the \"observed 2026-10-07\" note above: that probe's success was real but scoped to\n  the DEPLOYED path — it does not mean the cron can write the template.)\n- **The cron commit gate now blocks on a reflexion check; editing the pre-commit hook is the wrong\n  repair** (observed 2026-10-14, cycle 12624). `git commit` from a cron is refused with \"Reflexion\n  check not completed — NOT-LOADED reflexion-check (session \u003Cid>)\": load the skill with\n  `skill_view(name='reflexion-check')`, answer its questions, then commit. Do NOT edit\n  `ops\u002Fscripts\u002Fpre-commit-score` — that path and `ops\u002Fscripts\u002Fpre-push-pull` are both in\n  `ops\u002Fscripts\u002Flib\u002Falways-review-paths.txt`, so touching them converts a one-line convenience into\n  an always-review change. Note `git commit -F -m \u003Cmsg> -- \u003Cpathspec>` still fires the gate.\n\n## Pitfalls\n\n- **A long lookback OVERLAPS the previous run's window, so the same correction is re-reviewed.**\n  Read the previous pass's own reported window (the previous soul-refine cron session's final\n  report) and start from its END, not from `now - 30 h`; otherwise the overlap re-derives\n  corrections that were already codified and the overlap looks like fresh work. Measured\n  2026-10-21: the 10-20 pass ended at `23:17` while a 30 h window began at `17:18`, so one of\n  that day's corrections (doctor-warning dispositions) sat inside both windows.\n- **Resolve the previous pass's END mechanically, and classify the window by `sessions.source`**\n  (measured 2026-10-22). Query it, don't recall it:\n  `SELECT id,title,started_at,last_activity_at,ended_at FROM sessions WHERE title LIKE\n  '%soul-refinement%' ORDER BY COALESCE(last_activity_at,started_at) DESC LIMIT 3` — the newest row\n  that is not THIS run is the previous pass, and its `last_activity_at` is the start bound\n  (`last_activity_at` 23:25:02 vs `ended_at` 23:25:53, 51 s apart; a `now - 24 h` start at 23:15:45\n  reached 9 minutes BACK into the previous window). Classify with `sessions.source` in one column\n  rather than by an id prefix — that day's 31 sessions split `cron` 24 \u002F `subagent` 5 \u002F `telegram` 2 —\n  because **a `subagent` session stores its dispatching prompt as `role='user'` exactly like cron\n  does**, and the note below names only cron: those 5 fan-out rows would otherwise read as operator\n  prose and inflate the \"corrections\" count before you read a single sentence. Read only the human\n  transports, keep `active=1`, and note `time.strptime` rejects GNU `date`'s `'%F %T'`\n  (`ValueError: 'F' is a bad directive`) — the format is `'%Y-%m-%d %H:%M:%S'`.\n- **Verify the skill file you patched is REPO-SOURCED, not stranded in the deployed tree.**\n  Content written only to `~\u002F.steadfaste-fleet\u002Fskills\u002F...` is invisible to the fleet: the deploy's\n  drift guardrail refuses to overwrite it, so it never reaches the repo or any peer. Run\n  `python3 ops\u002Fscripts\u002Fmanage\u002Fcheck-skill-drift-parity.py` after every skill patch, and if your\n  path is under `Stranded in place:` land it into the repo source in the same cycle (measured\n  2026-10-21: the day's verbosity lesson lived deployed-only; landing it moved the detector\n  18 → 17 stranded and took the path out of the list).\n- **Parity can regress WITHIN the same day it was fixed — a recovery commit is not a permanent\n  state** (measured 2026-10-23). `ca9de57f` landed a full recovery at 18:18 (`0 stranded, 0 absent`),\n  yet the 23:15 pass measured **5 stranded** again: `devops\u002Ffleet-bus`, `devops\u002Fshared-repo-push-gates`,\n  `devops\u002Fshell-scripting`, `skill-vetting`, `software-development\u002Fchange-checklist`. Each was a lesson\n  written to the deployed tree by a later cycle that same day — the drift guardrail then refused to\n  overwrite it, so the fleet never received it. Never inherit yesterday's PASS: re-measure every pass.\n  Reconcile with the tool's own modes — `reconcile-stranded-skills.py` (report first, then `--apply`\n  for the pure-superset class) — and treat a `REVIEW`\u002F`DROP` line as a CLAIM to check, not a fact:\n  all three of `ca9de57f`'s drop lines were false positives (deployed side reflowed and extended), and\n  the 10-23 `change-checklist` DROP was the same shape, so merge that one addition by hand instead of\n  believing the tool. Then regenerate the parity evidence artifact, commit by PATHSpec, deploy, and push.\n- **`fleet-update.sh` is NOT at the repo root — it lives at `ops\u002Fscripts\u002Ffleet-update.sh`**\n  (`bash fleet-update.sh` gives `rc=127, No such file or directory`, which reads like a broken\n  deploy). Run `bash ops\u002Fscripts\u002Ffleet-update.sh` from the repo root; `rc=0` is the pass signal.\n\n- **Cron sessions writing SOUL.md — verify the gate for the EXACT path; do not\n  assume it.** Hermes core has a protected-instruction gate\n  (`_check_protected_instruction_write`,\n  `tools\u002Ffile_tools_write_guards.py`) with `soul.md` in\n  `_PROTECTED_INSTRUCTION_BASENAMES`. BUT the same module returns early for any\n  path under the Hermes home (`_hermes_exempt_homes()`, lines ~236-238) *before*\n  the basename test — so a write to the DEPLOYED `~\u002F.hermes\u002FSOUL.md` is NOT\n  gated, while a write to the repo template `docs\u002Ftemplates\u002FSOUL.md` (not under\n  the home) IS. Verified 2026-10-07 on esther\u002FHermes v0.21.5: a probe patch to\n  `~\u002F.hermes\u002FSOUL.md` from a cron SUCCEEDED; calling\n  `_protected_instruction_reason('\u002Fhome\u002F\u003Cuser>\u002F.hermes\u002FSOUL.md', 'cron')`\n  returned `None` while `_protected_instruction_config()` returned `(True, [])`.\n  Probe the actual target path with the above call before claiming the gate\n  blocks (or protects) you. Regardless of the gate, an identity change still\n  needs operator approval by policy — the cron's job is DETECTION: report the\n  corrections found so the operator codifies them in an interactive session.\n  Never bypass a gate that DOES fire via terminal\u002Fexecute_code.\n- **The pass's FIRST call dies on the enforcer's third block shape, and it is not a lock problem**\n  (measured 2026-10-25). With no governed repo yet resolved, every write-class-classified call is\n  refused — including a bare `date` and this pass's own `python3 \u003Cmining-script>` — with *\"No\n  governed repo could be resolved for this call\"*. That is its OWN message, not the gate-2 lock\n  rule, and acquiring a lock is not the remedy: resolving a **repo** is. It cost this pass two\n  calls retrying the same shape from `~` before `workdir=` was passed, and the deployed-copy\n  location never helps (`~\u002F.steadfaste-fleet` has no `.git`). The remedy is ORDER: run `begin_change`\n  first (step 2 of the sequence this pass runs anyway) and the identical shape then returns rc=0\n  from any cwd. So when a mining call is refused, do not reword it and do not go hunting for a\n  lock — open the cycle, then re-issue it unchanged.\n- **Don't append the same lesson twice.** If a principle already covers the gap, strengthen it rather than adding another.\n- **Don't treat skills as identity.** Workflow discoveries go in SKILL.md, not SOUL.md.\n- **Bible insights must be genuine.** Don't force-fit a lesson. If the day's book has nothing obvious for the agent's role, say so honestly.\n- **Resolve the mining window from RUN TIME, never from the calendar date** (observed 2026-10-18). This job's dispatch can slip past midnight: on esther `hermes cron list` recorded the `14 23 * * *` slot dispatching at `00:03` (49 min late), and `~\u002F.hermes\u002Fcron\u002Fusage_audit.jsonl` holds two earlier after-midnight runs (`00:03` and `00:26`) among its 63 logged runs. A literal reading of \"today's sessions\" at 00:03 is a three-minute-old day: the pass finds nothing, reports `[SILENT]`, and the PREVIOUS day's corrections are lost with no signal — a zero-row window and a genuinely quiet day look identical in the output. So compute a bounded lookback ending at NOW (the last ~30 h, as an epoch-float bound — `timestamp` is a float, not ISO), print the resolved window and the row counts it returned, and never report \"nothing to refine\" for a window you have not first shown to be non-empty.\n- **The window's counts DRIFT between the pass and any later re-run, so an evidence artifact must FREEZE the bounds it documents** (measured 2026-10-24). The window is resolved from RUN TIME, so a generator re-run twenty minutes later derives different bounds — the 24 h bound advances with the clock — and then prints different counts for the same pass: the pass itself resolved 23:26:13 → 23:16:37 holding 15 sessions \u002F 16 rows, while the identical script re-run at 23:29 printed 23:29:06 → 23:29:06 over 24.00 h with 15 sessions and 16 rows. A transcript that recomputes them contradicts the cycle note it exists to support, which is the shape a reviewer files as fabrication. Freeze BOTH bounds as generator defaults (env-overridable), say in the artifact that they are frozen and why, and reconcile the two counts EXPLICITLY when they differ: a ROW is selected by its own `timestamp` and a SESSION by `COALESCE(last_activity_at,started_at)`, so they are different sets by construction — a row can belong to a session whose bound sits outside the window (a telegram carrier session, or THIS run, whose own prompt predates the frozen end). Size the end bound exactly, too: a probe that used `\u003C= NOW + 60` swept this run's own session in and reported one session too many, a figure that then had to be withdrawn.\n- **`role='user'` is NOT the operator: most rows in a window are not corrections** (measured 2026-10-20). A 24 h window on esther returned 46 `active=1` user rows across 29 sessions, but only 4 were human sessions — the other 25 were cron sessions, and a cron session stores its OWN task prompt as `role='user'`, so every cron run contributes a row that reads like operator input. Of the 21 rows inside the 4 human sessions, 8 still carried a machine marker (internal background-process notifications, gateway-origin wrappers, a pasted cron delivery) and only 13 were prose to read. Classify BEFORE reading: split `cron_*` sessions from the rest, then drop rows opening with a machine marker (`[IMPORTANT: The user has invoked`, `[IMPORTANT: You are running as a scheduled cron job`, `[IMPORTANT: Background process`, `[INTERNAL NOTIFICATION`, `[Cron delivery:`, `Gateway message origin`), and read only what is left. Treating raw user rows as corrections over-reports by roughly 3.5x and buries the operator's real message; keep `active=1` too (46 of 52 rows here — the 6 dropped are compaction artifacts, not a quiet day).\n- **Implement the marker rule as `startswith` on the LSTRIPPED content — a substring test\n  silently deletes real operator prose** (measured 2026-10-27, and it cost this pass the day's\n  only still-open-looking request). A `marker in content[:200]` test dropped *\"Time to fix the\n  mycortex nightly dream for all agents. Ex: Cronjob Response: …\"* — an operator request that\n  merely QUOTES a peer's report — so the pass read 5 prose rows instead of 6 and never opened\n  the item. The rule above says \"drop rows OPENING with a machine marker\": implement that rule,\n  not a stricter approximation of it. Use ONE shared classifier for the mining pass and any\n  evidence generator — two implementations printed 5-vs-6 prose rows for the same frozen window,\n  i.e. the artifact contradicted the pass it documents, which is the shape a reviewer files as\n  fabrication. When a regenerated count differs from the pass's, reconcile it EXPLICITLY before\n  shipping: this pass's session delta (28 → 27) was solely THIS run's own session leaving the\n  frozen end bound as its `last_activity_at` advanced, while the row count held at 38 because a\n  ROW is bound by its own `timestamp` — a prose delta (5 → 6) is never drift, it is a defect\n  to fix or a defect to report.\n- **Landing a REVIEW-class stranded skill: `cp` the deployed file, but check for the deploy's\n  SOURCE banner first.** The parity tool ignores the 3-line banner by design, so a\n  banner-carrying deployed copy copied straight over the repo source would inject it into the\n  fleet's source. Confirm with `diff -u` that the only hunks are content and the headers match\n  byte-for-byte (measured 2026-10-27: all 3 were banner-free, so the copy was content-only).\n  Read the FULL diff before copying, and count the drops: that pass's REVIEW lines claimed\n  14\u002F1\u002F4 dropped lines and every one was present — rewritten — in the deployed text, the\n  7th consecutive pass where a REVIEW\u002FDROP line was a false positive of the same\n  \"deployed side reflowed and extended\" shape.\n- **Silence is better than forced growth.** If no corrections or lessons exist for a given day, produce nothing.\n- **Watchdog scripts must update their state\u002Ftimestamp file BEFORE checking for work**, to avoid stale state readings.\n- **Mining large sessions via session_search:** the scroll shape ignores `role_filter` (discovery-only), and windows >100KB spill to `~\u002F.hermes\u002Fcache\u002Fspillover\u002F*.txt` — extract user messages from the spilled JSON with one terminal `python3` pass instead of re-requesting. `execute_code` is blocked in cron mode; terminal under a governance lock is the path (observed 2026-09-28). (observed 2026-09-29) Skip discovery of the store itself: the real sessions store is `~\u002F.hermes\u002Fstate.db` (1GB WAL) — `~\u002F.hermes\u002Fstate\u002Fsessions.db` is a 0-byte stub, and there is no `sqlite3` CLI on esther. One read-only pass: `python3` heredoc with `sqlite3.connect('file:…state.db?mode=ro', uri=True)` + `PRAGMA query_only=1`, select `role='user' AND active=1` rows for the day's session ids, dump JSON to scratch, then triage previews. (Gate behavior: in a cron session an active lock sufficed — no skills gate; the 7-always-skills gate was observed in an interactive session, 2026-09-29.) (observed 2026-10-09) `timestamp` is a **Unix epoch float**, not ISO — an ISO `>=` bound silently returns 0 rows; compute the day's midnight as a float. **Derive that bound with `time.mktime(time.strptime(...))` or `time.time()`, never by arithmetic on a remembered epoch:** a hand-derived bound during the 2026-10-18 run landed ~13 h early and returned 0 rows — and 0 rows is exactly what a quiet day looks like through this window, so the mistake is silent. If the count comes back 0, re-derive the bound and print it before concluding anything about the day.\n- **PII guard trips on the day's own session IDs** (observed 2026-10-09). The shared-surface `write_file` guard rejects the report as a \"phone number\" when it contains Hermes session IDs (`\u003C8digits>_\u003C6digits>_\u003Chex>`) or 10-digit gateway chat\u002Fuser ids — long digit runs match its phone heuristic. Write the report with session references generalized (\"the lock session\", \"the drift session\"); the evidence lives in the DB, not the report. Also generalize nginx\u002FIP filenames if they embed numbers. Redact at the GENERATOR, never in the committed copy: mask runs of 7 or more digits (`re.sub(r'\\d{7,}', ...)`) and collapse `\u002Fhome\u002F\u003Cuser>` and `\u002FUsers\u002F\u003Cuser>` to `~`, so the artifact's own command line stays reproducible instead of being hand-patched into disagreeing with the text above it.\n- **A concurrent session's commit can sweep YOUR staged files, and its message can claim YOUR fix.** Observed 2026-10-13: a peer session's plain `git commit` captured the loop-gov edits staged by this cycle and committed them under its own message; separately, a peer committed `fix(review): refuse a degenerate reviewer response` whose own message said \"NO TEST SHIPPED\", and re-measuring the committed file showed the guard was **not present at all** — the crash was still live. Two lessons: (1) commit by PATHSpec every time (`git commit -F \u003Cmsg> -- \u003Cyour paths...>`) and assert the staged set first, or a peer's staged work rides into your commit; (2) when the day's session history contains a commit claiming a code fix, RE-MEASURE the claim against the committed file before believing it — the \"unverified-claim\" pattern is exactly a commit message asserting a result whose producing artifact was never written. A claimed-but-absent fix is worse than an open bug: the record says otherwise, so nobody looks again.\n- **`repo_path` on a cron session's lock can be empty, and then NOTHING can mint a review receipt.** Observed 2026-10-13: the soul-refine cron cycle's lock carried `repo_path=''`, so every close logged `review receipt NOT written: lock has no repo identity` and the pre-push always-review gate refused the push with no way to satisfy it. Cause is by DESIGN, not a bug: `_session_repo_path()` returns `None` for a Hermes caller that has an injected `session_id` but no injected repo (\"never guessed for a Hermes caller\"). The documented escape hatch is `FLEET_SESSION_REPO=\u003Crepo path>` in the environment the MCP server reads — a non-Hermes harness sets it. Practical recovery in a cron: open a FRESH `begin_change` for the push (a later lock in the same session may resolve `repo_path` from cwd), close it to mint the receipt, then push. Check `repo_path` with `check_lock()` BEFORE relying on a receipt ever appearing.\n- **`git stash`\u002F`stash pop` silently un-stages your work.** Observed 2026-10-13: `git stash -q -u` then `git stash pop -q` used to compare a baseline left only ONE of four files staged. After any stash round-trip, re-run `git add -- \u003Cpaths>` and assert `git diff --cached --name-only` shows exactly your set before committing.\n- **The recurring reviewer finding is \"unverified-claim\": commit the artifact, don't narrate it** (observed 2026-10-09 — 102 `unverified-claim` mentions in one day). When a worker note asserts a result (\"13 cases all pass\", \"dogfood passed\", \"the wrapper is host-local by design\"), the self-adversarial reviewer refuses the close unless the producing artifact is **committed and re-executable** (test file + run output transcript, the automation's definition, the operator's authorization transcript). Classify findings by `technique` for the day with one `python3` regex pass over tool rows — the dominant technique IS the day's lesson.\n\n## Template: Initial SOUL.md Structure\n\nIf you don't have a SOUL.md yet, create one at `~\u002F.hermes\u002FSOUL.md` with this structure:\n\n```markdown\n# SOUL.md — {Agent Name}\n\n## Identity\n\nBrief description of who you are and your role.\n\n## Core Mission\n\nWhat you exist to do.\n\n## Behavioral Principles\n\n### 1. {First Principle}\n{Description}\n\n### 2. {Second Principle}\n{Description}\n\n## Scripture Insights\n\n\u003C!-- Entries appended here by daily cron -->\n```\n\nThen run the setup commands above to start the daily refinement cycle.\n",{"name":5,"author":24,"license":15,"version":25,"metadata":26,"platforms":40,"description":7},"Steadfaste Fleet","1.0.0",{"hermes":27},{"tags":28,"related_skills":35},[29,30,31,32,33,34],"soul","identity","refinement","daily","bible","lessons",[36,37,38,39],"soul-authoring","memory-architecture","hermes-agent-skill-authoring","cron-engineering",[41,42],"macos","linux","main","9dc0e92c5fa81d4db5292b205716e8ea0c00d10e","skills\u002Fhermes-agent\u002Fsoul-refinement",1,"https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet","steadfaste.com","https:\u002F\u002Fgithub.com\u002Flukemcqueen","AI Architect | Building Hermes Cortex: governed multi-agent AI for autonomous software engineering | Enterprise Tech Consultant","2026-11-14 22:33:34",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add lukemcqueen\u002Fsteadfaste-fleet --skill soul-refinement",{"tool":58,"command":59},"bunx","bunx skills add lukemcqueen\u002Fsteadfaste-fleet --skill soul-refinement",{"tool":61,"command":62},"pnpm","pnpm dlx skills add lukemcqueen\u002Fsteadfaste-fleet --skill soul-refinement","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fhermes-agent\u002Fsoul-refinement\u002FSKILL.md",true,[],[67,75,82,89,96,103],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":74},"01M7DXY4G8NSVB59K8B6S2AQNP","macbook-linux-maintenance","Legacy MacBook Linux fixes: GPU wedge, reboot hang, thermal.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fmacbook-linux-maintenance\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":74},"01M7DXXYJCXFJ3TGB84ZQ8KFE6","governance-regression-triage","Triage a host's governance issues: what changed.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fgovernance-regression-triage\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":74},"01M7DXXSAP1G8FDRJAMXQGBBMK","enforcement-immutability","Use when enforcement files lose their immutable flag.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fenforcement-immutability\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":74},"01M78SSDQVRYX64Y16X32TC0NS","steadfaste-fleet-repo-deploy","Use when committing to the steadfaste-fleet repo.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fsteadfaste-fleet-repo-deploy\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":74},"01M78SS928F3R2RJAYVW4E30CE","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.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fsteadfaste-fleet-maintenance\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":74},"01M78SP1CHW0T0BWE5ZT6JBPX8","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.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Ffleet-preflight\u002FSKILL.md",[],[]]