Skip to content

feat: prompt caching for PLAN and REVIEW phases #64

@dougss

Description

@dougss

Summary

Use Anthropic prompt caching when invoking claude -p in PLAN and REVIEW phases. The system prompt + Nexus instructions are identical across runs — caching cuts input token costs by ~90%.

Current State

  • planPhase() and reviewPhase() call runClaudePipe() with static system prompts
  • claude -p supports --cache-prompt flag
  • No caching currently used

Plan

  1. Add --cache-prompt flag to runClaudePipe() in src/integrations/claude-p/claude-pipe.ts
  2. Pass from planPhase() and reviewPhase() in src/core/pipeline.ts
  3. Add cache_prompt: true config in providers.anthropic section
  4. Update src/config-schema.ts

Files

  • src/integrations/claude-p/claude-pipe.ts
  • src/core/pipeline.ts
  • config/config.yaml
  • src/config-schema.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Critical priorityenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions