feat: add export_timeline tool for markdown reports (closes #5) - #258
feat: add export_timeline tool for markdown reports (closes #5)#258TerminalGravity wants to merge 4 commits into
Conversation
Shows 4 concrete scenarios: vague prompt clarification, multi-step scoping, correction pattern matching, and cross-service awareness. Each example includes the prompt, triage classification, and the actual output users can expect.
The README and examples/README.md referenced examples/.preflight/ but the actual config files didn't exist. Added: - config.yml — profile, related projects, thresholds, embeddings - triage.yml — keyword rules and strictness settings - contracts/api.yml — manual contract definition examples All files are heavily commented so users can copy them into their project root and customize without needing to reference the docs.
Adds a new MCP tool that generates structured markdown reports from timeline data. Supports three formats: - summary: stats and activity breakdown by type - detailed: full daily breakdown with event-level detail - weekly: week-over-week trend visualization Includes optional save_to parameter for writing reports to disk. 6 tests covering all formats and edge cases.
TerminalGravity
left a comment
There was a problem hiding this comment.
Reviewed — looks good. Three export formats cover the main use cases well, relative date parsing is a nice touch. Minor thought: might want to validate the save_to path to prevent writes outside the project root. Could see a json format being useful for CI integrations later. Tests are solid.
- Add 'json' format option for CI/machine-readable export - Validate save_to resolves within project root (prevents path traversal) - Add 3 new tests: JSON output, field inclusion, path escape rejection
|
Addressed review feedback:
|
TerminalGravity
left a comment
There was a problem hiding this comment.
Reviewed — this closes #5 nicely. The export tool is well-structured. A few minor notes:
computeStats— ifeventsis empty,firstEvent/lastEventare empty strings andformatSummarySectionwill.slice(0,10)on them, producing ugly output. Maybe short-circuit with 'No events found'.content.slice(0, 200)truncation doesn't add an ellipsis — could confuse on long entries cut mid-word.- The README walkthrough additions are excellent — way more approachable for new users.
None are blockers. Ready to merge.
TerminalGravity
left a comment
There was a problem hiding this comment.
Nice feature — three report formats cover the main use cases well. Relative date parsing is a good UX touch. Thoughts:
- Worth documenting
save_topath resolution (relative to cwd vs project root?) - Visual bar charts in weekly format are great for terminal output
- 6 tests cover happy paths — timezone edge cases could be a follow-up
Overlapping files with #265 on examples dir — coordinate merge order. LGTM.
What
New
export_timelineMCP tool that generates structured markdown reports from timeline data.Formats
Features
7days,2weeks, etc.)save_toparameter to write reports to diskTests
6 tests covering all formats, type breakdowns, empty states, and no-project edge case.
Closes #5