prime: point the remember-a-fact hint at the real cairn remember command#34
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
cairn prime's footer told agents to "hand-author a+++-fenced markdownentry" when they learn something worth keeping — leftover text from before
cairn rememberexisted. It now points agents at the real command:Why built this way
cairn remembershipped and does exactly what the old footer told agents todo 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 tomain,
rig/…/global/…route through review), not a new claim.What to look at
internal/cairn/prime.go— the footer string itself, immediately afterthe (untouched)
scopeMismatchWarningsdiagnostic block.internal/cairn/prime_test.go—TestPrimenow asserts the new text ispresent;
TestPrimeDoesNotClaimRememberMissingis a new regression testasserting the old "no remember command yet" language is gone for good.
Test plan
go test ./internal/cairn/... -run 'TestPrime' -v— all green.go build,go vet,gofmt -l,go test -race,golangci-lint run) clean on this commit in an isolated worktree.assertions) makes both
TestPrimeandTestPrimeDoesNotClaimRememberMissingfail with the expected messages — confirms the tests actually pin the new
text down rather than passing vacuously.