Skip to content

fix(skills): give the stow sweep and the ceiling wakes their missing next steps - #62

Merged
Freudator86 merged 4 commits into
mainfrom
fm/fm-context-ceiling-300k
Aug 3, 2026
Merged

fix(skills): give the stow sweep and the ceiling wakes their missing next steps#62
Freudator86 merged 4 commits into
mainfrom
fm/fm-context-ceiling-300k

Conversation

@Freudator86

Copy link
Copy Markdown
Owner

Intent

Implement the captain's 2026-08-02 decision to hold firstmate's session context to a 300k ceiling using the fleet's existing stow-then-clear instrument (NOT compaction - compaction is explicitly forbidden here and must never be added, enabled, configured, or recommended).

History matters for reading this branch, because it has two commits that partly undo each other and that is deliberate, not an accident:

Commit 1 (29609e4) was written against a base that is now 43 commits stale. At that time no reset mechanism existed, so it stated the ceiling in three places: a shared line in the rendered supervision block (bin/fm-supervision-instructions.sh), a heartbeat checklist item in AGENTS.md section 8, and a full cadence section in the stow skill as the one owner. Work was then blocked: the captain correctly pointed out that firstmate cannot clear its own context, so an instruction to run /stow then /clear was one the model was structurally unable to follow - an instruction that cannot execute and cannot visibly fail. That commit was made purely to preserve the work before rebasing, on explicit instruction, and is intentionally kept in history rather than squashed away.

Commit 2 (8d05a1b) reconciles that work against the mechanism that landed in the meantime (docs/context-reset.md, bin/fm-context-lib.sh, bin/fm-context-reset.sh, bin/fm-stow-receipt.sh, and the watcher's context_ceiling_surface). Most of commit 1 is deliberately REMOVED there as superseded, not because it was wrong to write but because the landed mechanism now owns it and a second copy would drift. Specifically: the supervision-block lines are gone (bin/fm-supervision-instructions.sh and docs/supervision-protocols/ are now byte-identical to origin/main), and the AGENTS.md heartbeat item is gone because section 8 item 3 already states it better - item 3 names the receipt and reset commands, which my heartbeat line omitted. A conflict in docs/architecture.md was resolved wholly in favour of the landed text because my paragraph ended with 'no hook or daemon measures it', which the watcher had just made false.

The net change against origin/main is therefore only 79 lines in four files, and is exactly the two gaps that survived that reconciliation:

  1. .agents/skills/stow/SKILL.md - the /stow skill said nothing about now being a load-bearing step inside an automated, verified reset. It is the only step in an otherwise all-code path that requires judgement. The new section states what belongs to the sweep rather than to the mechanism: the receipt attests to the sweep and cannot verify it (so a thin sweep yields a structurally valid but substantively false receipt), captain input between sweep and receipt correctly invalidates it (so the two belong in one turn), and a cleared conversation stays resumable so a missed finding is misplaced rather than lost - which is a safety net, not licence to sweep thinly. The mechanism itself is pointed at docs/context-reset.md rather than restated, under the repo's one-owner rule. The frontmatter description trigger was updated to name the context-ceiling wake as a second caller.

  2. AGENTS.md section 8 item 3 - it described every context-ceiling wake as one 'whose payload carries its own next step'. That is true of the reset and ask branches, whose payloads name exact commands, but NOT of the unenforced and blocked branches, whose payloads carry a diagnosis with no command (for example 'the ceiling is unenforced until that is repaired'). A model meeting those two branches had nothing to act on. One added line says to repair the named condition or say plainly that it stands unrepaired.

Deliberate choices a reviewer should not flag as mistakes:

  • No hook, daemon, or measuring machinery is added. That variant was explicitly considered and rejected by the captain, and the watcher already does the measuring.
  • The ceiling value 300k is deliberately NOT restated in the supervision block or protocol files. A block rendered once at session start cannot know a threshold crossed hours later, and a second copy would let the model stop reading the wake that actually measures it. One test asserts this absence on purpose.
  • Four tests were rewritten rather than added: my originals asserted 'no hook, no daemon' and a heartbeat item that are no longer true. tests/fm-supervision-instructions.test.sh now asserts the ceiling is ABSENT from every rendered harness block, which is an intentional inversion of what commit 1 asserted.
  • Repo conventions followed per the firstmate-coding-guidelines skill: one sentence per line in tracked Markdown, plain dashes and no em dashes, colocated tests extending existing runners rather than new ones, and no agent co-author.

Verification already run locally: bin/fm-test-run.sh --changed passed 31 tests with 0 failures, including tests/fm-context-reset.test.sh (54 assertions covering the landed mechanism), tests/fm-instruction-owners.test.sh, and tests/fm-captain-translation-contract.test.sh. shellcheck -x is clean on both touched test files; no non-test script is modified.

Constraint from the captain: stop at the pull request, do not merge.

What Changed

  • .agents/skills/stow/SKILL.md gains a "When the context ceiling calls this sweep" section and a frontmatter trigger that now fires on a context-ceiling wake (and on a compaction the harness performs anyway, which is explicitly not the instrument that holds the ceiling). The section states only what belongs to the sweep - the receipt attests to it but cannot verify it, captain input after the receipt correctly invalidates it so both belong in one turn, and a cleared conversation stays resumable as a safety net rather than licence to sweep thinly - and points at docs/context-reset.md as the owner of the mechanism itself.
  • AGENTS.md section 8 item 3 previously described every context-ceiling wake as carrying its own next step, which holds for the reset and ask branches but not for the unenforced and blocked branches; an added line says to repair the named condition or state plainly that it stands unrepaired. docs/architecture.md now describes all three wake branches, and docs/context-reset.md names the stow skill as owner of the sweep's obligations.
  • tests/fm-stow-contract.test.sh adds three cases covering the new section, the dispatch trigger, and the AGENTS.md line; tests/fm-supervision-instructions.test.sh adds a case asserting the ceiling is deliberately absent from every rendered harness block and from docs/supervision-protocols/*.md, with a glob-expansion guard (added during review) so that absence check cannot pass vacuously. No non-test script is modified.

Risk Assessment

✅ Low: The follow-up commit resolves all three prior findings using existing repo conventions and touches nothing executable, leaving a well-bounded 86-line documentation and test change whose every factual claim is verified against the landed mechanism in bin/fm-context-lib.sh, bin/fm-stow-receipt.sh, and bin/fm-context-reset.sh.

Testing

Ran the repo's changed-file selection (31 tests, 0 failures) plus the two touched test files and the three doc-contract/mechanism suites named in the intent, then demonstrated the change at the surface a firstmate model actually meets: I drove the real context_ceiling_surface to emit all four context-ceiling wake payloads, showing that the blocked and unenforced branches end in a condition with no command and that the new AGENTS.md line is what now tells the model to repair it or report it unrepaired, and captured the /stow skill's new sweep section and updated trigger alongside proof that no rendered supervision block or protocol snippet carries a second copy of the 300k value. I added one focused assertion on the skill's frontmatter dispatch trigger, which no test had guarded, and mutation-checked that it fails when that line is reverted. There is no UI surface to screenshot: the change is agent-instruction Markdown and shell tests, so the reviewer-visible artifacts are CLI transcripts of the wake payloads and rendered instruction text. Worktree is clean apart from that intentional test addition.

Evidence: Real context-ceiling wake payloads (all four branches) vs the new AGENTS.md guidance

=== context-ceiling wake payloads a firstmate session actually receives === source: bin/fm-watch.sh context_ceiling_surface -> bin/fm-context-lib.sh fm_context_ceiling_reason --- branch: reset (payload names its own next step) --- check: context-ceiling: 900000 tokens is over the 300000 ceiling, the fleet is quiet and the captain is not present - run /stow now, then in the SAME turn run: <root>/bin/fm-stow-receipt.sh && <root>/bin/fm-context-reset.sh --- branch: ask (payload names its own next step) --- check: context-ceiling: 900000 tokens is over the 300000 ceiling and the fleet is quiet, but the captain has been active - ASK the captain before resetting; never reset autonomously during a live conversation --- branch: blocked (payload names a CONDITION, no command) --- check: context-ceiling: 900000 tokens is over the 300000 ceiling, but a reset cannot run safely: the session-start hook in <home>/.claude/settings.json no longer runs fm-sessionstart-nudge.sh on a clear --- branch: unenforced (payload names a CONDITION, no command) --- check: context-ceiling: a firstmate session is running here but its context cannot be measured (no session transcript recorded at <state>/.primary-transcript); the 300000 ceiling is unenforced until that is repaired === what AGENTS.md section 8 item 3 now tells the model for each branch === 3. For check:, act on the named poll result, including merges, Bridge inbox traffic, X-mode events, certsync health, and a context-ceiling wake whose payload carries its own next step: either run /stow and then, in that same turn, the receipt and reset commands it names, or ask the captain first because a reset must never happen during a live conversation. A ceiling wake that instead reports the ceiling unenforced, or a reset blocked, names a condition rather than a next step: repair the named condition, or say plainly that it stands unrepaired, because a ceiling nobody can measure is one nobody is holding.

=== context-ceiling wake payloads a firstmate session actually receives ===
source: bin/fm-watch.sh context_ceiling_surface -> bin/fm-context-lib.sh fm_context_ceiling_reason

--- branch: reset (payload names its own next step) ---
check: context-ceiling: 900000 tokens is over the 300000 ceiling, the fleet is quiet and the 
captain is not present - run /stow now, then in the SAME turn run: 
/home/coditan/.no-mistakes/worktrees/6e487fc7bf03/01KZ4MQ74MBNX5N7ZMBB8K2QRQ/bin/fm-stow-receipt
.sh && 
/home/coditan/.no-mistakes/worktrees/6e487fc7bf03/01KZ4MQ74MBNX5N7ZMBB8K2QRQ/bin/fm-context-rese
t.sh

--- branch: ask (payload names its own next step) ---
check: context-ceiling: 900000 tokens is over the 300000 ceiling and the fleet is quiet, but 
the captain has been active - ASK the captain before resetting; never reset autonomously during 
a live conversation

--- branch: blocked (payload names a CONDITION, no command) ---
check: context-ceiling: 900000 tokens is over the 300000 ceiling, but a reset cannot run 
safely: the session-start hook in 
/home/coditan/.cache/no-mistakes-tmp/fm-ceiling-evidence.gNLEun/case3/.claude/settings.json no 
longer runs fm-sessionstart-nudge.sh on a clear

--- branch: unenforced (payload names a CONDITION, no command) ---
check: context-ceiling: a firstmate session is running here but its context cannot be measured 
(no session transcript recorded at 
/home/coditan/.cache/no-mistakes-tmp/fm-ceiling-evidence.gNLEun/case4/state/.primary-transcript)
; the 300000 ceiling is unenforced until that is repaired

=== what AGENTS.md section 8 item 3 now tells the model for each branch ===

3. For `check:`, act on the named poll result, including merges, Bridge inbox traffic, X-mode 
events, certsync health, and a context-ceiling wake whose payload carries its own next step: 
either run `/stow` and then, in that same turn, the receipt and reset commands it names, or ask 
the captain first because a reset must never happen during a live conversation.
   A ceiling wake that instead reports the ceiling unenforced, or a reset blocked, names a 
condition rather than a next step: repair the named condition, or say plainly that it stands 
unrepaired, because a ceiling nobody can measure is one nobody is holding.
Evidence: Deliberate absence: no rendered supervision block or protocol snippet restates the ceiling

=== deliberate absence: no rendered supervision block carries a second copy of the ceiling === claude block: 31 lines | grep -c "300k"=0 | grep -c "Context ceiling"=0 codex block: 30 lines | grep -c "300k"=0 | grep -c "Context ceiling"=0 grok block: 51 lines | grep -c "300k"=0 | grep -c "Context ceiling"=0 opencode block: 31 lines | grep -c "300k"=0 | grep -c "Context ceiling"=0 pi block: 40 lines | grep -c "300k"=0 | grep -c "Context ceiling"=0 not-real block: 21 lines | grep -c "300k"=0 | grep -c "Context ceiling"=0 per-harness protocol snippets under docs/supervision-protocols/: all six files grep -c "300k"=0 and the files commit 1 touched are byte-identical to origin/main: (empty diff = identical)

=== deliberate absence: no rendered supervision block carries a second copy of the ceiling ===
claude    block:   31 lines | grep -c "300k"=0 | grep -c "Context ceiling"=0
codex     block:   30 lines | grep -c "300k"=0 | grep -c "Context ceiling"=0
grok      block:   51 lines | grep -c "300k"=0 | grep -c "Context ceiling"=0
opencode  block:   31 lines | grep -c "300k"=0 | grep -c "Context ceiling"=0
pi        block:   40 lines | grep -c "300k"=0 | grep -c "Context ceiling"=0
not-real  block:   21 lines | grep -c "300k"=0 | grep -c "Context ceiling"=0

per-harness protocol snippets under docs/supervision-protocols/:
  docs/supervision-protocols/claude.md                 grep -c "300k"=0
  docs/supervision-protocols/codex.md                  grep -c "300k"=0
  docs/supervision-protocols/grok.md                   grep -c "300k"=0
  docs/supervision-protocols/opencode.md               grep -c "300k"=0
  docs/supervision-protocols/pi.md                     grep -c "300k"=0
  docs/supervision-protocols/unknown.md                grep -c "300k"=0

and the files commit 1 touched are byte-identical to origin/main:
  (empty diff above = identical)
Evidence: /stow skill surface: frontmatter trigger, new sweep section, compaction ruled out

--- forbidden-instrument check: compaction is never offered as the ceiling instrument --- 3:description: ... before a compaction the harness is about to perform anyway (file ahead of one; a compaction is never the instrument that holds the context ceiling), and on a context-ceiling wake that asks for this sweep before the receipt and reset commands it names. 32:The instrument here is stow-then-clear, never compaction: durable knowledge goes to disk and the next session rebuilds from it ... 33:Nothing in this skill adds, enables, or recommends compaction as a way to hold the ceiling. changed non-doc/test files in this branch (must be none): (no lines = only Markdown and tests changed)

=== /stow SKILL.md as the model reads it (the sweep side of the reset) ===

--- frontmatter trigger (skill discovery surface) ---
---
name: stow
description: Sweep the current session for uncaptured durable knowledge and file it to disk 
before a context reset. Use when the captain invokes /stow (e.g. "/stow", "stow what you've 
learned"), before a session reset, before a context reset, before a compaction the harness is 
about to perform anyway (file ahead of one; a compaction is never the instrument that holds the 
context ceiling), and on a context-ceiling wake that asks for this sweep before the receipt and 
reset commands it names.
user-invocable: true
metadata:
  internal: true
---

<!-- maintainers: this is the firstmate-internal skill. The public, installer-facing 
counterpart lives at skills/stow/SKILL.md - deliberately a separate file with no shared code or 
environment branching. Keep them independent. -->


--- new section body ---
## When the context ceiling calls this sweep

The captain invokes `/stow` whenever they like, and that is still the ordinary case.
The other caller is the context ceiling: the watcher measures the primary session against it 
and, when the session is over that ceiling and the fleet is quiet, queues a wake whose payload 
says to run this sweep and then, in the same turn, the receipt and reset commands it names.
`docs/context-reset.md` owns that mechanism, its refusals, and the evidence behind them; this 
section owns only what changes about the sweep when it is that caller, because the sweep is the 
one step the mechanism cannot perform for itself.

- **The receipt attests to this sweep; nothing verifies it.**
  Whether a semantic sweep caught every durable fact cannot be checked mechanically, which is 
exactly why this step needs judgement and the rest of the path is plain code.
  A thin sweep still produces a structurally valid receipt, and the reset that follows is 
honest only to the degree this sweep was.
- **Leave no gap between the sweep and its receipt.**
  Anything the captain says after the receipt is written invalidates it, correctly, because the 
sweep cannot have covered it.
  Run the sweep and its receipt in the one turn the wake asks for, rather than pausing to 
report progress in between and re-earning the refusal.
- **A clear is not a destruction, and that is the safety net, not the plan.**
  The cleared conversation stays on disk and remains resumable, so a finding this sweep misses 
is misplaced rather than lost.
  Sweep as though it were lost.

The instrument here is stow-then-clear, never compaction: durable knowledge goes to disk and 
the next session rebuilds from it, which is what `AGENTS.md` section 5 already makes 
authoritative over conversation memory.
Nothing in this skill adds, enables, or recommends compaction as a way to hold the ceiling.


--- forbidden-instrument check: compaction is never offered as the ceiling instrument ---
3:description: Sweep the current session for uncaptured durable knowledge and file it to disk 
before a context reset. Use when the captain invokes /stow (e.g. "/stow", "stow what you've 
learned"), before a session reset, before a context reset, before a compaction the harness is 
about to perform anyway (file ahead of one; a compaction is never the instrument that holds the 
context ceiling), and on a context-ceiling wake that asks for this sweep before the receipt and 
reset commands it names.
32:The instrument here is stow-then-clear, never compaction: durable knowledge goes to disk and 
the next session rebuilds from it, which is what `AGENTS.md` section 5 already makes 
authoritative over conversation memory.
33:Nothing in this skill adds, enables, or recommends compaction as a way to hold the ceiling.

changed non-doc/test files in this branch (must be none):
  (no lines above = only Markdown and tests changed)
Evidence: Evidence harness used to emit the four real wake payloads
#!/usr/bin/env bash
# Evidence harness (not a repo file): print the four real context-ceiling wake
# payloads a firstmate session receives, straight from bin/fm-context-lib.sh via
# the watcher's own context_ceiling_surface, so the AGENTS.md section 8 item 3
# guidance can be checked against the text a model actually meets.
set -u

# REPO points at the worktree under test.
. "$REPO/tests/lib.sh"

fm_test_tmproot TMP_ROOT fm-ceiling-evidence

iso_now() { date -u +%Y-%m-%dT%H:%M:%S.000Z; }
iso_ago() { date -u -d "@$(( $(date +%s) - $1 ))" +%Y-%m-%dT%H:%M:%S.000Z; }

write_transcript() {  # <path> <tokens> <human-ts-or-empty>
  local path=$1 tokens=$2 human=$3
  {
    printf '{"type":"user","isMeta":true,"message":{"role":"user","content":"session-start nudge"},"timestamp":"2020-01-01T00:00:00.000Z"}\n'
    printf '{"type":"user","origin":{"kind":"task-notification"},"promptSource":"system","message":{"role":"user","content":"wake: queued"},"timestamp":"%s"}\n' "$(iso_now)"
    [ -n "$human" ] && printf '{"type":"user","origin":{"kind":"human"},"promptSource":"typed","message":{"role":"user","content":"captain says something"},"timestamp":"%s"}\n' "$human"
    printf '{"type":"assistant","message":{"usage":{"input_tokens":%s,"cache_creation_input_tokens":0,"cache_read_input_tokens":0}}}\n' "$tokens"
  } > "$path"
}

write_settings() {  # <home> <command-suffix>
  mkdir -p "$1/.claude"
  cat > "$1/.claude/settings.json" <<EOF
{ "hooks": { "SessionStart": [ { "matcher": "startup|resume|clear",
  "hooks": [{ "type": "command", "command": "\\"\$CLAUDE_PROJECT_DIR\\"/bin/$2" }] } ] } }
EOF
}

install_fake_tmux() {
  cat > "$1/tmux" <<'SH'
#!/usr/bin/env bash
printf '%s\n' "$*" >> "${FM_FAKE_TMUX_LOG:-/dev/null}"
case "${1:-}" in
  display-message) case "$*" in *cursor_y*) printf '5\n';; *session_name*) printf 'fmtest:0.0\n';; *pane_id*) printf '%%9\n';; *) printf '\n';; esac ;;
  capture-pane) printf '  esc to interrupt\n' ;;
esac
exit 0
SH
  chmod +x "$1/tmux"
}

CASE_N=0
make_case() {  # <tokens> <human-ts>
  CASE_N=$((CASE_N + 1))
  HOME_DIR="$TMP_ROOT/case$CASE_N"; STATE_DIR="$HOME_DIR/state"
  FAKEBIN=$(fm_fakebin "$HOME_DIR"); TRANSCRIPT="$HOME_DIR/transcript.jsonl"
  mkdir -p "$STATE_DIR"; install_fake_tmux "$FAKEBIN"
  write_settings "$HOME_DIR" 'fm-sessionstart-nudge.sh'
  write_transcript "$TRANSCRIPT" "$1" "$2"
  printf '%s\n' "$$" > "$STATE_DIR/.lock"
  cat > "$STATE_DIR/.primary-transcript" <<EOF
status=ok
harness_pid=$$
session_id=sess-$CASE_N
transcript_path=$TRANSCRIPT
recorded_at=$(date +%s)
EOF
  fm_test_record_supervision_healthy "$HOME_DIR" "$STATE_DIR"
}

surface() {
  env -u FM_ROOT_OVERRIDE FM_HOME="$HOME_DIR" FM_STATE_OVERRIDE="$STATE_DIR" \
    PATH="$FAKEBIN:$PATH" bash -c '
      set -u
      . "$1" >/dev/null 2>&1
      context_ceiling_surface
      printf "\n"
    ' fm-ceiling-evidence "$ROOT/bin/fm-watch.sh"
}

show() {  # <label> <payload>
  printf '\n--- branch: %s ---\n' "$1"
  printf '%s\n' "$2" | fold -s -w 96
}

printf '=== context-ceiling wake payloads a firstmate session actually receives ===\n'
printf 'source: bin/fm-watch.sh context_ceiling_surface -> bin/fm-context-lib.sh fm_context_ceiling_reason\n'

# 1. reset: over ceiling, fleet quiet, captain long gone, re-entry hook intact.
make_case 900000 "$(iso_ago 86400)"
show "reset (payload names its own next step)" "$(surface)"

# 2. ask: same, but the captain has been active.
make_case 900000 "$(iso_now)"
show "ask (payload names its own next step)" "$(surface)"

# 3. blocked: over ceiling and quiet, but the re-entry hook is gone.
make_case 900000 "$(iso_ago 86400)"
write_settings "$HOME_DIR" 'some-other-hook.sh'
show "blocked (payload names a CONDITION, no command)" "$(surface)"

# 4. unenforced: a session is running here but its context cannot be measured.
make_case 900000 "$(iso_ago 86400)"
rm -f "$STATE_DIR/.primary-transcript"
show "unenforced (payload names a CONDITION, no command)" "$(surface)"

printf '\n=== what AGENTS.md section 8 item 3 now tells the model for each branch ===\n\n'
sed -n '/^3\. For `check:`/,/^4\. For `heartbeat:`/p' "$ROOT/AGENTS.md" | sed '$d' | fold -s -w 96

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 3 issues found → auto-fixed ✅
  • ⚠️ tests/fm-supervision-instructions.test.sh:246 - The per-snippet loop for snippet in &#34;$ROOT&#34;/docs/supervision-protocols/*.md has no guard that the glob expanded. If that directory is renamed, moved, or emptied, bash leaves the pattern literal, assert_no_grep runs grep -F -- &#39;300k&#39; &#39;&lt;literal-glob-path&gt;&#39;, grep exits 2 on the missing file, and ! grep therefore succeeds - so the test reports the ceiling-absence invariant as held while checking nothing (it only leaks a 'No such file' line on stderr, which the runner does not fail on). This is the same silent-staleness failure mode tests/lib.sh's own helper comments call out. Add a presence guard inside the loop (e.g. assert_present &#34;$snippet&#34; &#34;...&#34;, already used in tests/fm-instruction-owners.test.sh) or fail when the expansion is the literal pattern.
  • ℹ️ .agents/skills/stow/SKILL.md:19 - "the watcher measures the primary session against it and, when the session is over and the fleet is quiet, queues a wake" - "the session is over" parses first as "the session has ended", which is the opposite of the condition (over the ceiling) and is a state in which no sweep could run. In a model-facing instruction file this ambiguity is load-bearing; "when the session is over that ceiling and the fleet is quiet" removes it without changing intent.
  • ℹ️ .agents/skills/stow/SKILL.md:3 - The frontmatter trigger changed from "before a session reset or context compaction" to "before a session or context reset", so the compaction moment is no longer a documented trigger for the sweep. The intent says the description "was updated to name the context-ceiling wake as a second caller" and forbids adding, enabling, configuring, or recommending compaction - naming compaction as a moment to stow BEFORE is none of those, and harnesses still auto-compact independently of fleet policy (.agents/skills/stuck-crewmate-recovery/SKILL.md:47 states this, and nothing in the repo disables auto-compact). Confirm the trigger removal is intended rather than collateral to the ceiling-caller edit; if not, the clause can be restored alongside the new caller.

🔧 Fix: guard snippet glob; restore compaction trigger; clarify ceiling wording
✅ Re-checked - no issues remain.

✅ **Test** - passed

✅ No issues found.

  • bash tests/fm-stow-contract.test.sh
  • bash tests/fm-supervision-instructions.test.sh
  • bash tests/fm-context-reset.test.sh
  • bash tests/fm-instruction-owners.test.sh
  • bash tests/fm-captain-translation-contract.test.sh
  • bin/fm-test-run.sh --changed (31 tests, 0 failures, 1 gate-skip)
  • Manual end-to-end: sourced bin/fm-watch.sh and called context_ceiling_surface against four fixture homes to print the real reset / ask / blocked / unenforced wake payloads next to AGENTS.md section 8 item 3
  • Manual: rendered bin/fm-supervision-instructions.sh --harness &lt;claude|codex|grok|opencode|pi|not-real&gt; and grepped every block plus docs/supervision-protocols/*.md for 300k and Context ceiling (0 hits), and confirmed git diff origin/main...HEAD -- bin/fm-supervision-instructions.sh docs/supervision-protocols/ is empty
  • Added and mutation-checked test_stow_skill_trigger_names_the_context_ceiling_caller in tests/fm-stow-contract.test.sh: reverting the SKILL.md frontmatter description to origin/main's makes it fail, restoring makes it pass
⚠️ **Document** - 1 info
  • ℹ️ .agents/skills/stow/SKILL.md:21 - The three bullets in the new "When the context ceiling calls this sweep" section are near-restatements of facts docs/context-reset.md already owns: the receipt is an attestation not a proof (context-reset.md:57-59), captain input after the receipt invalidates it (context-reset.md:67), and a cleared conversation stays resumable (context-reset.md:70-72). I left them as authored because the user intent states this framing is deliberate - the skill is meant to carry the sweep-side judgement the mechanism cannot perform for itself, and it does point at docs/context-reset.md as the mechanism owner rather than restating the loop or the refusals. Flagging it only as a drift risk: if either copy is later revised, the two will disagree about what the receipt proves. A follow-up could reduce the bullets to their sweep-side imperative alone (sweep in one turn with the receipt, sweep as though the conversation were lost) and let the rationale live solely in the owner doc.
✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Coditan-XO added 4 commits August 3, 2026 20:15
…ision surface

Records the captain's 2026-08-02 decision: past 300k of context, stow durable
knowledge and clear at the next quiet boundary, rebuilding from durable records
rather than compacting the transcript.

The stow skill owns the cadence in full; the rendered supervision block and the
heartbeat item carry only the trigger, so there is no second copy of the rule
and no per-harness duplicate. No hook, daemon, or transcript probe is added -
that variant was explicitly rejected.

Committed on a base that predates docs/context-reset.md; reconciliation against
the current default branch follows.
…ed mechanism

The reset mechanism landed while this branch was blocked, so most of the
original change is superseded and is removed here rather than kept as a second
copy: the supervision block no longer restates a threshold the watcher measures,
and the heartbeat item no longer duplicates section 8 item 3.

Two gaps remain, and this is what stays:

The stow skill said nothing about being a step inside a verified reset. It now
states what belongs to the sweep rather than to the mechanism - that the receipt
attests to the sweep and cannot verify it, that captain input between sweep and
receipt correctly voids it, and that a resumable clear is a safety net rather
than a licence to sweep thinly - and points the mechanism itself at
docs/context-reset.md.

Section 8 item 3 described every context-ceiling wake as carrying its own next
step. The reset and ask branches do; the unenforced and blocked branches carry a
diagnosis instead, so a model meeting those had nothing to act on. It now says
to repair the named condition or report it as unrepaired.
@Freudator86
Freudator86 merged commit 74f7ec5 into main Aug 3, 2026
10 checks passed
@Freudator86
Freudator86 deleted the fm/fm-context-ceiling-300k branch August 3, 2026 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant