feat: multi-client distribution + thread sync fix#5
Merged
Conversation
… tool Tool descriptions and field hints now guide agents to frame scars as knowledge discoveries rather than self-criticism. Baseline measured: 34% explicit, 43% passive, 21% dead weight. Target: explicit ↑ 45%+, dead weight ↓ 10%. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
record_scar_usage and record_scar_usage_batch now fall back to detectAgent() and getCurrentSession() when caller omits agent/session_id. Reduces null entries in scar_usage table. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…horitative (OD-726) Local-only threads (in threads.json but not in Supabase active set) were being unconditionally preserved, assuming they were mid-session creates not yet synced. In reality, most were resolved/archived in Supabase — the NOT-IN query excluded them, making them indistinguishable from truly local threads. Now only preserves local-only threads that have a valid ID and were created within the last 24h. Stale ghosts are dropped with a log message. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
Key Changes
Multi-client distribution (
bin/init-wizard.js, templates).copilot-instructions.md,.windsurfrules, etc.)Enforcement layer (
src/services/enforcement.ts)Thread sync fix (
src/tools/session-start.ts)Test plan
npm run buildsucceedsnpm test— enforcement tests passsession_startwith stale threads.json shows correct count (no inflation)🤖 Generated with Claude Code