/**
 * Claude Code tool adapter.
 *
 * Claude Code consumes the framework via:
 *   - `.claude/skills/<skill>/SKILL.md`           (skills, per-item symlinks)
 *   - `.claude/agents/<agent>.md`                 (subagents, bulk symlink)
 *   - `.claude/commands/<command>.md`             (slash commands, bulk symlink)
 *   - `.claude/workflows/<workflow>.js`           (dynamic workflows, per-item symlinks)
 *   - `.claude/settings.json`                     (hooks, ide config)
 *   - `AGENTS.md`                                 (root coordination protocol)
 *
 * All paths are relative to the consumer repo root.
 */
class ClaudeAdapter {
  constructor(cwd = process.cwd()) {
    this.cwd = cwd;
  }

  get name() { return 'claude'; }
  get label() { return 'Claude Code'; }

  /** Where this tool reads skill bundles from. */
  skillsDir() { return '.claude/skills'; }

  /** Where this tool reads subagent definitions from (null if unsupported). */
  agentsDir() { return '.claude/agents'; }

  /** Where this tool reads slash commands from (null if unsupported). */
  commandsDir() { return '.claude/commands'; }

  /** Where this tool reads dynamic workflow scripts from (null if unsupported). */
  workflowsDir() { return '.claude/workflows'; }

  /** Whether this tool consumes subagent definitions (`.claude/agents/`). */
  supportsSubagents() { return true; }

  /** Whether this tool consumes Claude-style slash commands. */
  supportsSlashCommands() { return true; }

  /** Whether this tool consumes the Claude PreToolUse hook system. */
  supportsHooks() { return true; }

  /**
   * Autodetection signal. We assume Claude is always intended (it's the
   * framework's primary target). The opt-out is via `tools.enabled` in
   * baldart.config.yml.
   */
  static detect(/* cwd */) { return true; }
}

module.exports = ClaudeAdapter;
