Problem
The culmination of any vajra analysis session is a report. Currently this requires building an HTML template externally, running multiple vajra commands to collect data, and rendering with WeasyPrint. The report generation pipeline is ~500 lines of Python.
Evidence
The Effect-TS deep analysis report required:
- 50+ vajra command invocations
- A 500-line Python script to build HTML
- Manual CSS design for tables, bars, callouts
- WeasyPrint rendering
- Iterative layout fixes for page breaks
Proposal
New command: vajra report
vajra report data.json --title "Effect-TS Deep Analysis" \
--sections "inspect,stats,anomalies,drift,essence" \
--format pdf \
--output report.pdf
Architecture:
- Data collection: Run specified analysis commands internally
- Template engine: Built-in HTML/CSS templates (the design system from our report)
- PDF rendering: Either bundle WeasyPrint via PyO3, or output HTML for external rendering
- Customization:
--template custom.html for user templates, --logo logo.svg
Built-in sections:
- Executive summary (auto-generated from scorecard)
- Statistical overview (from
stats)
- Anomaly report (from
anomalies)
- Drift analysis (from
drift if two inputs)
- Methodology (auto-generated — algorithms used, data sources)
Design Principle Alignment
- Composable: Uses existing commands internally — report is a compositor, not a new analysis.
- Deterministic: Same data → same report. PDF byte-identical with same template.
- Fast: Runs all analysis once, templates are static, no external API calls.
Complexity
High. New crate (vajra-report), HTML/CSS template system, PDF dependency management. Could be a separate binary or feature-gated.
Problem
The culmination of any vajra analysis session is a report. Currently this requires building an HTML template externally, running multiple vajra commands to collect data, and rendering with WeasyPrint. The report generation pipeline is ~500 lines of Python.
Evidence
The Effect-TS deep analysis report required:
Proposal
New command:
vajra reportArchitecture:
--template custom.htmlfor user templates,--logo logo.svgBuilt-in sections:
stats)anomalies)driftif two inputs)Design Principle Alignment
Complexity
High. New crate (
vajra-report), HTML/CSS template system, PDF dependency management. Could be a separate binary or feature-gated.