Purpose: Agent instructions for working on the claude-code-sdk package.
soul-codes-chat depends on claude-code-sdk. Changes here can break the main application.
After making changes to this package, verify you haven't broken consumers:
# Run cross-repo tests (from any directory)
/workspace/scripts/run-all-tests.sh --quickThis runs tests across:
- claude-code-sdk (this package) - 121 tests
- tmux-core - 251 tests
- soul-codes-chat - 347 tests (the main consumer)
- telegram-bridge - 60 tests
- Any change to exported functions in
src/ - Any change to type definitions
- Any breaking API changes
- Before creating PRs
- Before claiming work complete
- ❌ Only ran
npm testin this repo (misses consumer tests) - ❌ Changed exported API without verifying consumers still work
- ❌ Claimed work complete without running cross-repo tests
claude-code-sdk provides Claude Code-specific operations:
- Status detection (processing state, hook status)
- Mode detection (plan mode, accept edits, etc.)
- Output filtering and message extraction
- Menu interaction (parse, select, navigate)
- Session interaction (send message, change model)
Main consumer: soul-codes-chat uses this via lib/agents/sdk-wrapper.ts
# Run this package's tests only
npm test
# Run cross-repo tests (REQUIRED for changes)
/workspace/scripts/run-all-tests.sh --quick