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
@@ -53,6 +53,7 @@ export const KNOWN_AREAS = new Set([
|
||||
"rules",
|
||||
"approval-runs",
|
||||
"analytics",
|
||||
"report",
|
||||
"simulation",
|
||||
"deploy",
|
||||
"preference",
|
||||
@@ -386,6 +387,11 @@ async function dispatch(argv: string[], runtime: CliRuntime) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (area === "report") {
|
||||
await (await import("./commands/report.js")).handleReportCommand(action, client, corp, args);
|
||||
return;
|
||||
}
|
||||
|
||||
if (area === "simulation") {
|
||||
await (await import("./commands/simulation.js")).handleSimulationCommand(action, maybeName, client, corp, args);
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user