Skip to content

prime: point the remember-a-fact hint at the real cairn remember command#34

Merged
quad341 merged 2 commits into
mainfrom
deploy/crn-ilu8-gate
Jul 22, 2026
Merged

prime: point the remember-a-fact hint at the real cairn remember command#34
quad341 merged 2 commits into
mainfrom
deploy/crn-ilu8-gate

Conversation

@quad341

@quad341 quad341 commented Jul 22, 2026

Copy link
Copy Markdown
Owner

What changed

cairn prime's footer told agents to "hand-author a +++-fenced markdown
entry" when they learn something worth keeping — leftover text from before
cairn remember existed. It now points agents at the real command:

Capture what you learn: cairn remember <body> writes a new entry (private
tier commits directly; shared tiers route through review — see cairn remember --help and DESIGN.md §6-§7).

Why built this way

cairn remember shipped and does exactly what the old footer told agents to
do by hand — write a scoped, frontmattered entry, with private-tier entries
committing straight through and shared-tier entries routed through review.
Leaving the old instructions in place would send agents down the manual path
for something the CLI already automates.

The tier-routing framing in the new sentence is a direct paraphrase of
DESIGN.md §7 ("friction ∝ blast radius" — agent/… commits straight to
main, rig/…/global/… route through review), not a new claim.

What to look at

  • internal/cairn/prime.go — the footer string itself, immediately after
    the (untouched) scopeMismatchWarnings diagnostic block.
  • internal/cairn/prime_test.goTestPrime now asserts the new text is
    present; TestPrimeDoesNotClaimRememberMissing is a new regression test
    asserting the old "no remember command yet" language is gone for good.

Test plan

  • go test ./internal/cairn/... -run 'TestPrime' -v — all green.
  • Full suite (go build, go vet, gofmt -l, go test -race,
    golangci-lint run) clean on this commit in an isolated worktree.
  • Mutation check: reverting just the footer text (keeping the new
    assertions) makes both TestPrime and TestPrimeDoesNotClaimRememberMissing
    fail with the expected messages — confirms the tests actually pin the new
    text down rather than passing vacuously.

quad341 and others added 2 commits July 22, 2026 15:42
prime's footer hardcoded "no `remember` command yet" and told every agent to
hand-author `+++`-fenced markdown entries directly. That was correct when it
was written (commit 33f1fc1), but commit 571515d added the remember scaffold
without updating prime.go, and the crn-419.x stack has since made remember a
fully working write path (private tier commits directly, shared tiers route
through branch+review) -- not just a scaffold. So prime denied a command that
cairn --help lists and that actually works, while telling agents to bypass it
via manual file authorship instead.

Point the footer at `cairn remember` and defer flag specifics to
`cairn remember --help` rather than re-hardcoding them here -- this is the
same failure mode that caused the bug (a hand-maintained claim about the CLI
surface going stale the moment the surface changed), so the fix shouldn't
reintroduce another version of it.

Reconciled against PR #23/crn-rbjm (merged to main at 703f58e), which added
the scopeMismatchWarnings diagnostic block immediately before this same
footer b.WriteString call without touching the footer text itself. The two
changes are orthogonal (diagnostic-warnings addition vs. stale-text
correction) and combine cleanly: the warnings block is carried over
unchanged, and the footer-text fix is re-applied unchanged on top of it.
Supersedes the prime.go/prime_test.go content of feature/crn-6az.2 @ ad7f6f0
(reviewed+passed in crn-o6j7, but never landed -- deploy hit a real conflict
against the merged PR #23, routed to builder as crn-3b85).

TestPrime's "hand-author" assertion is updated to check for "cairn remember"
instead. New TestPrimeDoesNotClaimRememberMissing directly covers the bug's
own complaint: prime must not claim remember doesn't exist. Mutation-
verified: reverting the footer text alone (keeping the updated assertions)
makes both tests fail exactly as expected.

Did not touch DESIGN.md's CLI (v0) list (also missing remember) or the
gc-management pack fragment cairn-usage.md.tmpl (also stale, tells agents
remember is "coming soon" -- a different repo, injected fleet-wide into every
agent's context). Both out of this bead's stated scope (prime.go only).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Bead: crn-ilu8. All 7 criteria PASS, independently re-verified in an
isolated worktree (build/vet/gofmt/lint/test-race clean, mutation-tested).
Zero divergence from main.
@quad341
quad341 merged commit 8ada0d4 into main Jul 22, 2026
2 checks passed
@quad341
quad341 deleted the deploy/crn-ilu8-gate branch July 22, 2026 23:22
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