Skip to content

Latest commit

 

History

History
63 lines (43 loc) · 1.62 KB

File metadata and controls

63 lines (43 loc) · 1.62 KB

claude-code-sdk - Claude Code Instructions

Purpose: Agent instructions for working on the claude-code-sdk package.


🚨 CRITICAL: This Package Has Consumers 🚨

soul-codes-chat depends on claude-code-sdk. Changes here can break the main application.

MANDATORY Before Completing Work

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 --quick

This 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

When Cross-Repo Testing is MANDATORY

  • Any change to exported functions in src/
  • Any change to type definitions
  • Any breaking API changes
  • Before creating PRs
  • Before claiming work complete

RED FLAGS - You're Doing It Wrong If:

  • ❌ Only ran npm test in this repo (misses consumer tests)
  • ❌ Changed exported API without verifying consumers still work
  • ❌ Claimed work complete without running cross-repo tests

Package Overview

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


Testing

# Run this package's tests only
npm test

# Run cross-repo tests (REQUIRED for changes)
/workspace/scripts/run-all-tests.sh --quick