Repository navigation
feat: let a home declare authoritative external memory tiers - #6608
kunchenguid merged 5 commits into
Conversation
|
| - `<!--t:NAME-->` - pending capture: a tier-owned entry that the declared memory tier `NAME` does not yet hold because no session that wrote or curated it could reach that tier; it follows any tier marker the entry already carries. | ||
| Stow never prunes, ages out, evicts, offloads, consolidates away, or moves to the cold archive an entry carrying it, whatever its tier clock says. | ||
| A later pass that can reach `NAME` captures the entry there under the tier's declared rule, then removes the marker, after which the entry is curated like any other. |
There was a problem hiding this comment.
Retired tiers strand pending entries If a home removes or renames a declared tier while entries still carry its
<!--t:NAME--> marker, the only documented way to clear the marker requires capturing to that old tier. Those entries remain in startup memory and cannot be pruned, offloaded, or evicted to meet the memory budget. Please define how stow reconciles pending markers when a tier declaration changes.
d44d452 to
f44e659
Compare
|
Speaking as Kun's firstmate: thank you @shaptonstahl for rebasing this rather than starting over. This is my first triage look at it. What I checked: the full diff at CI: "Behavior portable parallel 1" is red in Contract-class (my own verdict): new-default. With a declaration, the behavior is fully opt-in, which is nice. One line reaches every home, though: with no VISION (each rule):
Some gentle suggestions, your call:
If you push changes, please re-raise through |
AGENTS.md section 6 routed durable knowledge only to firstmate-local files, so a home whose captain keeps reasoning and facts in external stores had no tracked rule keeping those stores authoritative over the per-machine data/ cache. Add a generic home-declared Memory layering contract (schema in docs/configuration.md), make firstmate the capture path for workers whose harness cannot reach a declared tier, and teach the stow skill to route to declared tiers first and never prune a tier-owned entry without capturing it.
…-34. Finding ci-1 (Greptile): a tier-owned fact could be lost when its declared tier was unreachable from the session. - The invariant that was broken: until the declared tier holds a tier-owned fact, that fact must stay in a memory file loaded at startup. - Where it could be broken: the declared-tier guard, which said to archive the entry to the never-loaded cold tier; the routing step for new findings, which only mentioned the receipt; and the budget-eviction and offload eligibility rules. Fix, made only in .agents/skills/stow/SKILL.md: - **New marker.** Added `<!--t:NAME-->` to the existing compact marker list, so its meaning lives in one place. It marks a tier-owned entry that tier NAME does not hold yet. Stow never prunes, ages out, evicts, offloads, consolidates away, or archives an entry carrying it, whatever its tier clock says. A later pass that can reach NAME captures the entry there and removes the marker. - **Declared-tier guard.** "still archive rather than delete" now says to leave the entry in place with its pending-capture marker, and the receipt still names it. - **Routing step 2.** When the tier is unreachable, a new finding is written to the startup-loaded local file its class would otherwise use, or kept where it already lives, with the marker. It is still reported as an exception in the receipt. - **Budget eviction and offload eligibility.** Both now exclude entries pending capture, so the convergence pool is counted correctly. - **Receipt bullet.** Changed "finding or pruned entry" to entries left carrying the pending-capture marker, because those entries are no longer pruned. docs/configuration.md ("protects tier-owned entries from pruning") and AGENTS.md section 6 are still accurate, so I left them unchanged. No new file, queue, script, or digest section. One sentence per line, plain dashes. Verification: tests/fm-stow-cascade.test.sh, tests/fm-documentation-audiences.test.sh, and tests/fm-lint.test.sh all pass
…rkers Drop the stow receipt line reporting a missing Memory layering declaration (AGENTS.md section 6, the stow skill, docs/configuration.md) so a home with no declaration behaves exactly as before. Name pending-capture entries in the exempt floor wording, and say how stow retargets or clears a pending-capture marker whose tier was renamed or retired.
66f1227 to
901cb3c
Compare
|
Speaking as Kun's firstmate: this is merged. Thank you @shaptonstahl — really appreciate you taking the time on this. All three follow-ups from my last look are in. With no |
…, relaunch races) (#10) * fix: prevent concurrent secondmate relaunch races (#7154) * fix: serialize secondmate liveness relaunches across task set * no-mistakes(review): Remove relaunch wait override and test bounded contention * no-mistakes(document): Clarify secondmate relaunch locking and timeout documentation * chore: keep local Stele binding out of shared template * no-mistakes(document): Correct stale secondmate recovery timing comment * chore: exclude local Stele binding from relaunch fix * ci: retrigger CI after a timed-out test shard * no-mistakes(document): Correct secondmate recovery ordering documentation (cherry picked from commit 6407052) * fix: require explicit authority for Firstmate upstream contributions (#7172) * feat(bin): gate firstmate-upstream publication behind a declared home role Users who clone firstmate and run it as-is got a surprise: when their agent hit a firstmate bug, it could drive a pull request at upstream because nothing distinguished the maintainer's home from an ordinary user's. Every home now resolves to user/operator unless the gitignored config/firstmate-role grants a maintainer scope, or a single task carries the captain's recorded --upstream-consent on the brief, spawn, and promotion. fm-brief, fm-spawn, and fm-promote apply one fail-closed gate in bin/fm-role-lib.sh; the role is never inferred from gh identity, remotes, permissions, or CI, and secondmates honor only receipt-proven inherited grants so a child cannot grant itself. Session start reports the resolved role with no network call. Ordinary project delivery and the clone-and-run setup flow are unchanged. * no-mistakes(review): Harden firstmate role parsing, normalization, and inheritance * no-mistakes(review): Detect firstmate by lineage; drop consent fallback; fix claims * no-mistakes(document): Correct and consolidate Firstmate role documentation (cherry picked from commit 7df545b) * fix(pi): narrow before_agent_start events before reading prompt (#7248) * fix: narrow Pi before-agent prompt events * no-mistakes(review): Restore processing-run abort detection and type Pi test events (cherry picked from commit 8c9c67d) * feat: let a home declare authoritative external memory tiers (#6608) * docs: let a home declare authoritative external memory tiers AGENTS.md section 6 routed durable knowledge only to firstmate-local files, so a home whose captain keeps reasoning and facts in external stores had no tracked rule keeping those stores authoritative over the per-machine data/ cache. Add a generic home-declared Memory layering contract (schema in docs/configuration.md), make firstmate the capture path for workers whose harness cannot reach a declared tier, and teach the stow skill to route to declared tiers first and never prune a tier-owned entry without capturing it. * no-mistakes(review): Report missing memory-layering declaration and index tier docs * no-mistakes(document): Narrow memory-tier re-seed step to captain re-declaration * no-mistakes(ci): Environment: 2026-10-05, host wildrobot, Linux 7.0.0-34. Finding ci-1 (Greptile): a tier-owned fact could be lost when its declared tier was unreachable from the session. - The invariant that was broken: until the declared tier holds a tier-owned fact, that fact must stay in a memory file loaded at startup. - Where it could be broken: the declared-tier guard, which said to archive the entry to the never-loaded cold tier; the routing step for new findings, which only mentioned the receipt; and the budget-eviction and offload eligibility rules. Fix, made only in .agents/skills/stow/SKILL.md: - **New marker.** Added `<!--t:NAME-->` to the existing compact marker list, so its meaning lives in one place. It marks a tier-owned entry that tier NAME does not hold yet. Stow never prunes, ages out, evicts, offloads, consolidates away, or archives an entry carrying it, whatever its tier clock says. A later pass that can reach NAME captures the entry there and removes the marker. - **Declared-tier guard.** "still archive rather than delete" now says to leave the entry in place with its pending-capture marker, and the receipt still names it. - **Routing step 2.** When the tier is unreachable, a new finding is written to the startup-loaded local file its class would otherwise use, or kept where it already lives, with the marker. It is still reported as an exception in the receipt. - **Budget eviction and offload eligibility.** Both now exclude entries pending capture, so the convergence pool is counted correctly. - **Receipt bullet.** Changed "finding or pruned entry" to entries left carrying the pending-capture marker, because those entries are no longer pruned. docs/configuration.md ("protects tier-owned entries from pruning") and AGENTS.md section 6 are still accurate, so I left them unchanged. No new file, queue, script, or digest section. One sentence per line, plain dashes. Verification: tests/fm-stow-cascade.test.sh, tests/fm-documentation-audiences.test.sh, and tests/fm-lint.test.sh all pass * docs: keep undeclared memory-tier path silent and close stuck tier markers Drop the stow receipt line reporting a missing Memory layering declaration (AGENTS.md section 6, the stow skill, docs/configuration.md) so a home with no declaration behaves exactly as before. Name pending-capture entries in the exempt floor wording, and say how stow retargets or clears a pending-capture marker whose tier was renamed or retired. (cherry picked from commit 2911a3b) --------- Co-authored-by: Pedro Guimarães <[email protected]> Co-authored-by: Kun Chen <[email protected]> Co-authored-by: Ian Brown <[email protected]> Co-authored-by: Stephen Haptonstahl <[email protected]>
Intent
AGENTS.md routing: add the Palimpsest and OpenBrain routing to firstmate's instructions.
Context the ask refers to, from the filed work item: firstmate's shared
AGENTS.mdsection 6 ("Route durable knowledge to its most specific owner") lists only firstmate-local destinations (data/captain.md,data/captain-shared.md,data/learnings.md, a project'sAGENTS.md, firstmate's own tracked surface) and section 2 says those files hold knowledge "regardless of harness memory". Thestowskill likewise knows nothing about external memory stores. The captain's actual memory layering, decided 2026-08-31 and recorded in this home'sdata/captain.mdunder "Memory layering", is three tiers partitioned by scope of truth, never writing one fact to more than one tier:mcp__claude_ai_Palimpsest__*) holds reasoning continuity: decisions, hypotheses, speculation, corrections, self-knowledge. Permanent, append-only, cross-machine. Authoritative for why. Capture without asking, then report what was captured; corrections usesupersedes, never edit or delete.mcp__claude_ai_OpenBrain__*) holds retrievable facts: people, projects, references, resolved answers, tasks. Permanent, cross-machine. Authoritative for what.data/is a disposable per-machine operational cache, never a peer of tiers 1 or 2. A learning landing indata/learnings.mdnever excuses skipping Palimpsest.Consequence of the gap: the only thing keeping tiers 1 and 2 from being swallowed into the per-machine cache is one unversioned pointer file under the captain's harness memory directory, lost silently on a fresh clone, a secondmate home, or a local memory reset. A related standing risk: firstmate's non-Claude worker harnesses cannot reach these connectors at all, so firstmate itself is the sole capture path for their work.
Maintainer review follow-up: drop the missing-declaration receipt line so the undeclared path is silent; clarify the exempt floor wording; say how stow reconciles entries tagged with a renamed or retired tier.
What Changed
docs/configuration.mdgets a new "External memory tiers (Memory layering section)" section, and the index table now links to it. A home can declare outside stores, such as Palimpsest or OpenBrain MCP connectors, in aMemory layeringheading indata/captain.mdor in the primary home'sdata/captain-shared.md. Each tier lists its destination, the knowledge classes it owns, its correction rule, and its capture etiquette. A localdata/captain.mddeclaration takes precedence over the shared one. With no declaration, the localdata/files stay the only memory owners, and nothing is reported.AGENTS.md. Section 2 now carves out an exception to "regardless of harness memory" for knowledge classes a declared tier owns. Section 6 makes a declared tier authoritative for its classes, anddata/becomes only a per-machine cache for them. A local copy never excuses skipping capture to the tier, and corrections follow the tier's own rule. When a worker's harness can't reach a tier, firstmate captures the worker's findings from its report.data/learnings.mdis now limited to fleet-local facts that no declared tier owns.stowskill. The skill reads the declaration and checks which tiers the session can reach. It routes tier-owned findings to their tier first, and the sweep now includes reports from workers whose harnesses can't reach a tier.<!--t:NAME-->marker covers findings whose tier is unreachable. The finding stays in a startup-loaded local file. No prune, decay, eviction, offload, consolidation, or archive step may remove it until a later pass captures it to the tier. If the tier is renamed or retired, the marker is pointed at the tier that now owns that class, or dropped if no declared tier does.Reviewed, edited, or generated with deterministic and AI tools.
Risk Assessment
✅ Low: The change only edits instruction prose in docs and a skill, and it meets the intent's maintainer follow-ups. The undeclared path is now silent, the floor wording names the pinned and pending-capture floor, and renamed or retired tiers are reconciled. The one remaining gap is a rare duplicate-capture edge in a secondmate's read-only shared file.
Testing
I confirmed that the diff touches only instruction prose and docs, and that no bin/ code reads the new pending-capture marker. I ran the targeted stow-cascade and documentation-audience checks; both pass, including local doc-link resolution. The routing, silent undeclared path, pending-capture marker, and renamed/retired-tier reconciliation are interpreted by the LLM and have no deterministic product surface to drive live. Under the repo's test-quality rule, testing them belongs in a development-only model evaluation, not this gate. No UI is involved, so there are no visual artifacts.
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
🔧 **Rebase** - 1 issue found → auto-fixed ✅
.agents/skills/stow/SKILL.md- merge conflict rebasing onto origin/main🔧 Fix applied.
✅ Re-checked - no issues remain.
.agents/skills/stow/SKILL.md:29- The<!--t:NAME-->lifecycle tells "a later pass that can reach NAME" to capture the entry and then remove the marker. It does not cover a marked entry in a secondmate's read-onlydata/captain-shared.md. Step 2 (line 95-97) forbids that pass from removing the marker, so the marker stays. Concrete sequence: (1) The primary's harness cannot reach the tier, for example a non-Claude primary, so it writes a tier-owned shared preference intodata/captain-shared.mdwith<!--t:Palimpsest-->. (2) The primary's /stow cascades to secondmates (line 290). (3) Every secondmate whose harness can reach the tier captures the entry again on every cascade, because the marker never clears and the marker rule says "captures" rather than "confirm the tier holds it, else capture" (the declared-tier guard at line 118 does say confirm). The result is repeated duplicate appends into an append-only store until the primary can reach the tier itself. The scenario is rare. Smallest fix, within the existing ownership rules: in the marker rule, say the pass first confirms whether the tier already holds the fact. For a read-only shared entry, the pass may capture only after that confirmation and then routes the marker removal to the primary owner as an ownership exception.git diff --stat 8c9c67de..HEAD(only .agents/skills/stow/SKILL.md, AGENTS.md, docs/configuration.md changed)grep -rln '<!--pinned\|<!--t:' bin/ tests/(no executable consumer of the memory markers)bash tests/fm-stow-cascade.test.sh(pass)bash tests/fm-documentation-audiences.test.sh(pass, including local link resolution)✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.