Skip to content

feat: multi-client distribution + thread sync fix#5

Merged
nTEG-dev merged 3 commits intomainfrom
feature/multi-client-distribution
Feb 18, 2026
Merged

feat: multi-client distribution + thread sync fix#5
nTEG-dev merged 3 commits intomainfrom
feature/multi-client-distribution

Conversation

@nTEG-dev
Copy link
Member

Summary

  • Multi-client support: init wizard for VS Code, Windsurf, and generic editors with template files
  • Server-side enforcement layer for universal compliance across all clients
  • Auto-detect agent and session for scar usage tracking (removes manual burden)
  • Scar framing guidance ("what we now know" not "what I did wrong") in create_learning tool
  • Fix stale local-only threads inflating count on session_start (OD-726)

Key Changes

Multi-client distribution (bin/init-wizard.js, templates)

  • Init wizard detects editor and generates appropriate config (.copilot-instructions.md, .windsurfrules, etc.)
  • README updated with multi-client setup instructions

Enforcement layer (src/services/enforcement.ts)

  • Server-side tool call validation for recall gates, session lifecycle
  • 270-line test suite covering all enforcement scenarios

Thread sync fix (src/tools/session-start.ts)

  • When Supabase is authoritative, only preserve local-only threads < 24h old with valid ID
  • Drops stale resolved/archived threads that were mistakenly kept as "local-only"
  • Fixes 27-vs-19 thread count discrepancy (OD-726)

Test plan

  • Verify npm run build succeeds
  • Run npm test — enforcement tests pass
  • session_start with stale threads.json shows correct count (no inflation)
  • Init wizard generates correct templates for each editor type

🤖 Generated with Claude Code

Claude and others added 3 commits February 17, 2026 16:01
… 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>
@nTEG-dev nTEG-dev merged commit 2ce2009 into main Feb 18, 2026
8 checks passed
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