Summary
Expand clauck's observability and telemetry infrastructure to track utility-level costs and invocation history, and enhance clauck report to intelligently separate and durably record different signal types (cost metrics, novel user stories, failure patterns, configuration drift) rather than just routing everything to GitHub issues.
Motivation
Clauck itself (interpreter and executor sessions) consumes API costs similar to jobs, but there's no way to track or aggregate those costs. Additionally, users need a central view of:
- All historical commands invoked (with full original text)
- Cost per invocation method (
work, doctor, add --when, etc.)
- Aggregate cost, failure rates, and average per-run metrics
More critically, as users interact with clauck, there are valuable signals beyond GitHub-issue-worthy bugs: novel user stories, unexpected interaction patterns, configuration quirks, and the delta between a user's mental model of how clauck should work and how it actually works. These signals are essential for prioritizing features and improvements, but currently get lost because clauck report is oriented toward GitHub issues.
Acceptance Criteria
Phase 1: Utility Costs & History
Phase 2: Durably-Recorded User Stories & Signals
Phase 3: Intent Delta Analysis
Phase 4: Signal Routing & Durability
Design Notes
- Cost tracking should capture: API model, tokens (prompt + completion), cost per invocation, grouped by utility type and invocation method.
- History should include enough context to replay user intent: full command, start time, duration, exit code, output summary.
- User stories folder should use a consistent schema (front-matter + narrative) and be indexed for trend analysis.
- Intent delta analysis should acknowledge uncertainty: true user intent is unknowable, intent matrix is hidden, delta vector is estimated.
- Priority: imperfect-and-immediate-recording over perfect-and-delayed. Opt-in sharing, not opt-in recording.
Related Issues
Summary
Expand clauck's observability and telemetry infrastructure to track utility-level costs and invocation history, and enhance
clauck reportto intelligently separate and durably record different signal types (cost metrics, novel user stories, failure patterns, configuration drift) rather than just routing everything to GitHub issues.Motivation
Clauck itself (interpreter and executor sessions) consumes API costs similar to jobs, but there's no way to track or aggregate those costs. Additionally, users need a central view of:
work,doctor,add --when, etc.)More critically, as users interact with clauck, there are valuable signals beyond GitHub-issue-worthy bugs: novel user stories, unexpected interaction patterns, configuration quirks, and the delta between a user's mental model of how clauck should work and how it actually works. These signals are essential for prioritizing features and improvements, but currently get lost because
clauck reportis oriented toward GitHub issues.Acceptance Criteria
Phase 1: Utility Costs & History
clauck costexpanded to include utility-level aggregates (interpreter/executor session costs) alongside job costswork,doctor,add,list, etc.clauck historyshows chronological list of all utility invocations with full command textPhase 2: Durably-Recorded User Stories & Signals
stories/folder in repo to durably record discovered user stories and usage patternsclauck reportenhanced to intelligently separate signal types (GitHub-issue-worthy bugs, novel user stories, failure patterns, configuration insights) and route to appropriate durability layersPhase 3: Intent Delta Analysis
clauck report(or a new subcommand) can run a post-session analysis exploring user's local clauck state, history, and intentPhase 4: Signal Routing & Durability
clauck reportintelligently routes signals to appropriate sinks:stories/: novel user stories, usage patternsDesign Notes
Related Issues
clauck reportfeature (interactive GitHub issue reporter)clauck reportinteractive intent-mining (Phase 2)clauck reportpost-submit scheduled jobclauck cost(job-level cost aggregation — this extends to utilities)