Skip to content

feat(#132): add local-first analytics for workflow insights - #142

Merged
admarble merged 1 commit into
mainfrom
feature/132-add-local-first-analytics-for-workflow-insights
Jan 21, 2026
Merged

admarble merged 1 commit into
mainfrom
feature/132-add-local-first-analytics-for-workflow-insights

Conversation

@admarble

Copy link
Copy Markdown
Contributor

Summary

  • Add privacy-focused local metrics collection for workflow runs
  • Extend sequant stats to display analytics with insights
  • Create new metrics schema with Zod validation and atomic file writes

Changes

  • metrics-schema.ts: Zod schemas for privacy-focused metrics (no PII, no file paths)
  • metrics-writer.ts: Atomic writes using temp file + rename pattern
  • run.ts: Integrate metrics recording after workflow completion
  • stats.ts: Add analytics display with insights generation
  • docs/analytics.md: Comprehensive documentation

Privacy Principles

  • All data stays local (no telemetry)
  • No file paths, code content, issue titles, or error messages
  • Only aggregate metrics (issue numbers, files changed, lines added)

Test plan

  • Unit tests for metrics-schema.ts (19 tests)
  • Unit tests for metrics-writer.ts (21 tests)
  • Existing stats.test.ts updated for new behavior
  • npm test passes (487 tests)
  • npm run build passes

Closes #132

🤖 Generated with Claude Code

- Add metrics-schema.ts with Zod validation for privacy-focused metrics
- Add metrics-writer.ts with atomic writes (temp file + rename)
- Integrate metrics collection into run command
- Extend stats command to display local analytics with insights
- Add comprehensive unit tests for metrics functionality
- Add docs/analytics.md documentation

Privacy principles:
- All data stays local (no telemetry)
- No file paths, code content, or error messages
- Only aggregate metrics (files changed, lines added, etc.)

Closes #132

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@admarble
admarble merged commit d61c0bf into main Jan 21, 2026
@admarble
admarble deleted the feature/132-add-local-first-analytics-for-workflow-insights branch January 21, 2026 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add local-first analytics for workflow insights

1 participant