feat(discovery): implement provider-aware discovery and config sync alignment - #353
Conversation
PR Review: Claude SDK Discovery and Atomic Config SyncOverall AssessmentThis is a substantial PR (7,338 additions, 724 deletions across 49 files) that introduces a provider-aware discovery contract system. The design is well-documented with a comprehensive spec/RFC, and the implementation follows the proposed architecture closely. ✅ StrengthsArchitecture & Design
Security
Test Coverage
|
…ignment Add research document and technical design spec (RFC) for the provider-aware discovery contract and atomic config sync alignment. Update CLAUDE.md with accurate global config path documentation for OpenCode (XDG_CONFIG_HOME) and Copilot (platform-aware). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Assistant-model: Claude Opus 4.6
Remove src/AGENTS.md and src/CLAUDE.md which duplicated root-level configuration documentation. Bump @anthropic-ai/claude-agent-sdk from ^0.2.66 to ^0.2.68. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Assistant-model: Claude Opus 4.6
Add a provider-aware discovery contract that explicitly defines what each SDK (Claude, OpenCode, Copilot) can discover, how Atomic prepares runtime configuration, and what the UI surfaces as runtime-compatible. New provider discovery system: - provider-discovery-contract: defines per-provider discovery capabilities - provider-discovery-plan: builds provider-specific discovery plans - provider-discovery-cache: session-level caching for discovery results - discovery-events: structured observability for discovery operations - copilot-paths: platform-aware Copilot config path resolution - path-root-guard: safety checks for config path traversal Updated config utilities (claude-config, opencode-config, mcp-config, copilot-manual, copy, atomic-global-config) to accept and propagate discovery plans for deterministic path resolution. Updated UI commands (agent-commands, skill-commands) with discovery plan integration, definition integrity validation, and platform-aware config-home root scanning. Updated SDK clients (copilot, opencode) to use discovery plans for skill directory resolution and runtime config preparation. Updated chat command with startup discovery plan lifecycle management including cache initialization and cleanup. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Assistant-model: Claude Opus 4.6
2d40f5a to
a4984dd
Compare
PR Review: Provider-Aware Discovery and Config Sync AlignmentOverall, this is a well-designed PR that introduces a robust provider discovery system. The architecture is clean and the implementation is thorough. Here's my detailed feedback: ✅ Code Quality and Best PracticesStrengths:
Issues to Address:
|
) * docs: add research and spec for provider discovery and config sync alignment Add research document and technical design spec (RFC) for the provider-aware discovery contract and atomic config sync alignment. Update CLAUDE.md with accurate global config path documentation for OpenCode (XDG_CONFIG_HOME) and Copilot (platform-aware). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Assistant-model: Claude Opus 4.6 * chore: remove stale src config docs and bump claude-agent-sdk Remove src/AGENTS.md and src/CLAUDE.md which duplicated root-level configuration documentation. Bump @anthropic-ai/claude-agent-sdk from ^0.2.66 to ^0.2.68. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Assistant-model: Claude Opus 4.6 * feat: implement provider-aware discovery and config sync alignment Add a provider-aware discovery contract that explicitly defines what each SDK (Claude, OpenCode, Copilot) can discover, how Atomic prepares runtime configuration, and what the UI surfaces as runtime-compatible. New provider discovery system: - provider-discovery-contract: defines per-provider discovery capabilities - provider-discovery-plan: builds provider-specific discovery plans - provider-discovery-cache: session-level caching for discovery results - discovery-events: structured observability for discovery operations - copilot-paths: platform-aware Copilot config path resolution - path-root-guard: safety checks for config path traversal Updated config utilities (claude-config, opencode-config, mcp-config, copilot-manual, copy, atomic-global-config) to accept and propagate discovery plans for deterministic path resolution. Updated UI commands (agent-commands, skill-commands) with discovery plan integration, definition integrity validation, and platform-aware config-home root scanning. Updated SDK clients (copilot, opencode) to use discovery plans for skill directory resolution and runtime config preparation. Updated chat command with startup discovery plan lifecycle management including cache initialization and cleanup. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Assistant-model: Claude Opus 4.6 --------- Co-authored-by: lavaman131 <dev@example.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
) * docs: add research and spec for provider discovery and config sync alignment Add research document and technical design spec (RFC) for the provider-aware discovery contract and atomic config sync alignment. Update CLAUDE.md with accurate global config path documentation for OpenCode (XDG_CONFIG_HOME) and Copilot (platform-aware). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Assistant-model: Claude Opus 4.6 * chore: remove stale src config docs and bump claude-agent-sdk Remove src/AGENTS.md and src/CLAUDE.md which duplicated root-level configuration documentation. Bump @anthropic-ai/claude-agent-sdk from ^0.2.66 to ^0.2.68. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Assistant-model: Claude Opus 4.6 * feat: implement provider-aware discovery and config sync alignment Add a provider-aware discovery contract that explicitly defines what each SDK (Claude, OpenCode, Copilot) can discover, how Atomic prepares runtime configuration, and what the UI surfaces as runtime-compatible. New provider discovery system: - provider-discovery-contract: defines per-provider discovery capabilities - provider-discovery-plan: builds provider-specific discovery plans - provider-discovery-cache: session-level caching for discovery results - discovery-events: structured observability for discovery operations - copilot-paths: platform-aware Copilot config path resolution - path-root-guard: safety checks for config path traversal Updated config utilities (claude-config, opencode-config, mcp-config, copilot-manual, copy, atomic-global-config) to accept and propagate discovery plans for deterministic path resolution. Updated UI commands (agent-commands, skill-commands) with discovery plan integration, definition integrity validation, and platform-aware config-home root scanning. Updated SDK clients (copilot, opencode) to use discovery plans for skill directory resolution and runtime config preparation. Updated chat command with startup discovery plan lifecycle management including cache initialization and cleanup. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Assistant-model: Claude Opus 4.6 --------- Co-authored-by: lavaman131 <dev@example.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary
Implements a provider-aware discovery contract that explicitly defines what each SDK (Claude, OpenCode, Copilot) can discover, how Atomic prepares runtime configuration, and what the UI surfaces as runtime-compatible. This resolves user-visible inconsistencies where skills/agents appear available in UI but are not aligned with provider-native discovery behavior.
Problem Solved: Previously, Atomic had a discovery split where global templates synced to ~/.atomic, UI discovered from broad paths, and provider runtimes used different discovery mechanisms. This caused confusion where skills/agents appeared in the UI but weren't actually available at runtime, especially for Claude sessions.
Key Changes
New Provider Discovery System
Updated Config Utilities
All config utilities enhanced to accept and propagate discovery plans: claude-config, opencode-config, mcp-config, copilot-manual, copy, atomic-global-config
UI Command Improvements
SDK Client Updates
Claude, OpenCode, and Copilot clients updated to use discovery plans for runtime config preparation
Chat Command Enhancements
Documentation & Dependencies
Implementation Highlights
Precedence Resolution (deterministic last-write-wins):
Platform-Aware Path Resolution:
Compatibility Modes:
Runtime Binding Strategies:
Impact
User Experience:
Developer Experience:
Technical Benefits:
Testing
Comprehensive test coverage (2000+ lines of new/enhanced tests):
Core Discovery Tests (100% coverage):
Integration Tests (Enhanced):
Breaking Changes
None. This is an additive change that improves existing behavior without removing functionality.
Migration Notes
No migration required. The discovery system is backward-compatible and automatically applies to all sessions.
What Changes for Users:
What Stays the Same:
Related Issues
Fixes user-reported issues where:
Review Focus Areas: