Commit Graph

1 Commits

Author SHA1 Message Date
LARS
b5d6aa89bb feat(auto-think): Automatic thinking level classification
Adds a new auto-think feature that automatically classifies incoming messages
and selects an appropriate thinking level using heuristics, without requiring
explicit /think directives.

Features:
- Heuristic-based classification (no API calls, <1ms latency)
- High complexity: debug, security, architecture, large code blocks
- Medium complexity: how-to, implementation, analysis, step-by-step
- Low complexity: simple lookups, definitions, translations
- Configurable floor/ceiling levels
- Custom pattern rules support
- User directives still override auto-classification

Config:
  agents:
    defaults:
      autoThink:
        enabled: true
        floor: 'off'
        ceiling: 'high'
        rules:
          - match: 'newsletter'
            level: 'medium'

Files changed:
- src/auto-reply/auto-think.ts: Classification logic
- src/auto-reply/auto-think.test.ts: Unit tests (25 tests)
- src/auto-reply/reply/get-reply-run.ts: Integration point
- src/config/zod-schema.agent-defaults.ts: Config schema
- src/config/types.agent-defaults.ts: TypeScript types
- docs/auto-think.md: Documentation
2026-01-28 03:47:01 +00:00