feat: prime SSOT tasks 8-12 — init upgrade, recipe cleanup, symlink safety, staleness detection (#2139)#2600
Merged
steveyegge merged 10 commits intosteveyegge:mainfrom Mar 16, 2026
Merged
Conversation
Add new section to DOLT-BACKEND.md covering: - Embedded vs central server comparison table - Why 'brew services start dolt' silently ignores config - Step-by-step custom LaunchAgent setup with plist - Environment variables to point beads at central server - Service management (stop/restart/logs) Also fix default port from 3306 to 3307 in the server configuration table to match DefaultSQLPort in code. Closes steveyegge#2323 Amp-Thread-ID: https://ampcode.com/threads/T-019ced53-6c5c-71de-8092-b834c879a68a Co-authored-by: Amp <amp@ampcode.com>
…efix-aware parser (steveyegge#2139) Implement the foundational pieces for making bd prime the single source of truth for agent instructions: Task 1 - Shared render API (internal/templates/agents/render.go): - Profile type with Full and Minimal constants - RenderSection(profile) generates sections with marker metadata - ParseMarker() extracts profile/hash from begin markers - CurrentHash(profile) for staleness detection - 8-char SHA-256 hash for deterministic freshness Task 2 - Template splitting: - New beads-section-minimal.md for hook-enabled agents (Claude, Gemini) - Minimal profile: pointer to bd prime + quick reference + landing protocol - Existing beads-section.md preserved as full profile body Task 3 - Parser refactor (cmd/bd/setup/agents.go): - Prefix-based marker matching via containsBeadsMarker/findBeginMarker - Legacy markers (no metadata) detected and upgradable - New markers: <!-- BEGIN BEADS INTEGRATION profile:full hash:a1b2c3d4 --> - agentsIntegration gains profile field (defaults to full) - updateBeadsSectionWithProfile for profile-aware updates - createNewAgentsFileWithProfile for new file creation Backward compatible: EmbeddedBeadsSection/EmbeddedDefault still work. Legacy markers are auto-upgraded on next bd setup run. Amp-Thread-ID: https://ampcode.com/threads/T-019ced5e-0acd-7158-93ad-0695c6d02580 Co-authored-by: Amp <amp@ampcode.com>
…#2139, task 4) Set profile: agents.ProfileFull explicitly on codex, factory, mux (all three layers), and opencode integrations. This makes the profile intent clear and prepares for adding minimal-profile integrations. Amp-Thread-ID: https://ampcode.com/threads/T-019ced5e-0acd-7158-93ad-0695c6d02580 Co-authored-by: Amp <amp@ampcode.com>
…eyegge#2139, tasks 5-6) When running 'bd setup claude --project' or 'bd setup gemini --project', after installing hooks in settings.json, also install a minimal-profile beads section in AGENTS.md. This provides a quick reference pointer to 'bd prime' for the full workflow, while hooks handle the heavy lifting. On removal, the beads section is cleaned up from AGENTS.md as well. The minimal profile contains: quick reference commands, pointer to bd prime, and the landing-the-plane session close protocol — without the full issue types, priorities, and sync details that hook-enabled agents get dynamically from bd prime. Amp-Thread-ID: https://ampcode.com/threads/T-019ced5e-0acd-7158-93ad-0695c6d02580 Co-authored-by: Amp <amp@ampcode.com>
, task 7) Update init_agent.go to use agents.RenderSection(ProfileFull) instead of agents.EmbeddedBeadsSection() when appending beads sections to existing AGENTS.md files. This ensures new installs get the versioned marker format with profile and hash metadata. Amp-Thread-ID: https://ampcode.com/threads/T-019ced5e-0acd-7158-93ad-0695c6d02580 Co-authored-by: Amp <amp@ampcode.com>
…afety, staleness detection (steveyegge#2139) Task 8: bd init now upgrades legacy beads sections to versioned format instead of silently skipping them. New files created via EmbeddedDefault() also get versioned markers. Task 9: Replace stale bd sync references with bd dolt push in recipes template. Add bd prime SSOT messaging. Task 10: installAgents resolves symlinks via ResolveForWrite before reading content. Profile precedence: if file already has full profile and minimal is requested, full is preserved to avoid information loss. Task 11: Added tests for staleness detection, profile extraction, profile precedence, symlink safety, and legacy-to-new migration. checkAgents now reports stale/current/missing status. Task 12: Updated SETUP.md with prime SSOT, profiles, and profile precedence documentation. Updated CLI_REFERENCE.md with --check behavior and Gemini integration description. Amp-Thread-ID: https://ampcode.com/threads/T-019ced7a-0c86-708d-930c-ee35d00eda8d Co-authored-by: Amp <amp@ampcode.com>
Update agents.md.tmpl to match canonical beads-section.md content: - 'Version-controlled: Built on Dolt with cell-level merge' → 'Git-friendly: Dolt-powered version control with native sync' - JSONL-based sync description → Dolt push/pull sync model - Legacy markers → versioned markers (profile:full hash:d4f96305) This ensures EmbeddedDefault() output has a beads section body identical to beads-section.md, so upgradeBeadsSection() in bd init is a no-op for freshly created files. Ref: steveyegge#2139 Amp-Thread-ID: https://ampcode.com/threads/T-019ced8e-4a10-7404-b1f6-83cc78d1996c Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ced8f-f8dc-76ca-b8b1-7650879f3633 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ced8f-f8dc-76ca-b8b1-7650879f3633 Co-authored-by: Amp <amp@ampcode.com>
Collaborator
Author
|
hey steve, apologies for mix-and-match of half committing direct to main and half in this PR. the cats were enthusiastic this morning : -) |
Amp-Thread-ID: https://ampcode.com/threads/T-019cf2bd-bf1b-7269-abd8-ec65edb98bd5 Co-authored-by: Amp <amp@ampcode.com>
steveyegge
added a commit
that referenced
this pull request
Mar 15, 2026
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.
Summary
Completes the remaining tasks (8-12) for the prime SSOT feature (#2139). Tasks 1-7 were already merged to main.
Task 8:
bd initupgrade for legacy beads sectionsbd initnow upgrades legacy beads sections to versioned format (profile+hash markers) instead of silently skipping. New files fromEmbeddedDefault()also get versioned markers viaupgradeBeadsSection().Task 9: Recipe template cleanup
Replaced stale
bd syncreferences withbd dolt pushin recipes template. Addedbd primeSSOT messaging.Task 10: Symlink safety & profile precedence
installAgentsresolves symlinks viautils.ResolveForWritebefore reading. Profile precedence: full preserved over minimal when both target same file.checkAgentsnow reports current/stale/missing witherrBeadsSectionStale.Task 11: Test coverage
9 new tests covering
existingBeadsProfile, staleness detection, profile preservation, symlink safety, and legacy-to-new migration.Task 12: Documentation
Updated
docs/SETUP.mdwith prime SSOT section, profiles table, and profile precedence. Updateddocs/CLI_REFERENCE.mdwith--checkbehavior and Gemini description.Closes #2139