Add one-shot monthly audit report command (report monthly)
Eats in the ai-audit-report-template as a module. The template is the mutable skin: describeTemplate() infers per-section data demands from ##/### headings (keyword rules), so editing/renaming/reordering sections does not require touching collect or render code. - src/domains/seal/reports/: describe (heading to demand), collect (performance/ risk blocks/template groups, fetched only for declared demands), render (fills tables by section+column signature, rewrites narrative by structure not line number), monthly (orchestrator returning content + per-section completeness + notes). - report-templates/: the template body, assets, example, and downstream validate.py/render.py (not bundled; next.validate/render in the result point at them). - Capability sealReportMonthlyGet (read-only, allow-listed) + CLI "seal-use report monthly --month <YYYY-MM>" + help + KNOWN_FLAGS month + read-only report:monthly. - SKILL.md: routing row + a section stating the two hard rules: the template is swappable, and metrics with no upstream source keep template sample values with a warning note instead of fabricated numbers. Template-path resolution branches on isCompiledBinary() (dev: module-relative to repo root; compiled: cwd), matching how rules lint --file resolves paths, since templates are not embedded. Verified: bun test 633 pass (6 new reports tests), tsc clean, oxlint 0 warnings. Live smoke: 2026-08 report for a real corp fills real accuracy/counts/distribution and marks human-accuracy + mismatch-classification + section-6 sample rows with gap notes.
This commit is contained in:
1 parent
a37cac2679
commit
2ee15bb0d6
21 files changed
+2281
-1
No files matched your search
@@ -78,6 +78,7 @@ const READ_ONLY_COMMANDS: Record<string, string[]> = {
|
||||
// `analyze` is deliberately absent: it POSTs and starts an analysis server-side, so it is a
|
||||
// mutation despite reading like a query. See SEAL_MUTATING_CAPABILITIES.
|
||||
analytics: ["insight", "risks", "performance", "export"],
|
||||
report: ["monthly"],
|
||||
source: ["config"],
|
||||
skill: ["dump", "status"],
|
||||
doctor: ["", "guide", "paths", "tenant", "auth"],
|
||||
|
||||
Reference in new issue
Block a user