/home/techb158/cosmic.abdallabala.com/docs
NameSizeModeActions
00-design-study.md36780666editdlrm
01-uml-class-diagram.puml118690666editdlrm
02-use-case-diagram.puml37630666editdlrm
03-sequence-diagrams.puml97320666editdlrm
04-database-entity-model.mmd70510666editdlrm
05-database-schema.sql133720666editdlrm
06-diagram-preview.html50210666editdlrm
07-design-checklist.md32560666editdlrm
08-step-2-storage-layer.md53250666editdlrm
09-step-3-risk-crud-ui.md33800666editdlrm
10-step-4-mitigation-workflow.md39960666editdlrm
11-step-5-deployment-gate-workflow.md22920666editdlrm
12-step-6-multi-pm-integration.md37700666editdlrm
13-step-6-1-microsoft-planner-integration.md23350666editdlrm
14-step-7-reporting-export.md41580666editdlrm
15-step-7-1-oauth-live-connectors.md45450666editdlrm
16-step-8-user-roles-access-control.md32970666editdlrm
17-step-9-production-deployment-security.md42280666editdlrm
18-step-10-final-academic-submission.md31990666editdlrm
19-final-report-draft.md68140666editdlrm
20-instructor-submission-checklist.md36390666editdlrm
21-demo-script.md39480666editdlrm
22-traceability-matrix.md48470666editdlrm
23-testing-evidence.md29610666editdlrm
24-evaluation-rubric-mapping.md29100666editdlrm
25-final-deployment-runbook.md32140666editdlrm
26-known-limitations-and-future-work.md26320666editdlrm
27-final-qa-checklist.md28930666editdlrm
28-demo-rehearsal-script.md36180666editdlrm
29-submission-freeze-report.md27690666editdlrm
30-final-known-issues.md18760666editdlrm
dashboard-spec.md36910666editdlrm
Edit: /home/techb158/cosmic.abdallabala.com/docs/14-step-7-reporting-export.md (4158B)
# Step 7: Reporting and Export Module ## Purpose The reporting module converts the COSMIC AI-Risk Dashboard evidence into instructor-ready and reviewer-ready exports. This step is an implementation extension. The source project defines the need for a measurable AI risk framework, software prototype, REST API, indicators, risk analysis engine, and project-management integration. The reporting module packages that evidence so it can be submitted, reviewed, audited, or printed. ## Source-derived concepts used | Source concept | Reporting implementation | |---|---| | Quantified AI project risk | Executive report and risk register export | | Organizational, technical, and human dimensions | Governance triangle section in the report | | ISO-style indicators | Indicator report with measurand, unit, threshold, and interpretation | | Software prototype and REST API | Report endpoints under `/api/projects/{projectId}/reports` | | Project-management integration | Integration report for Trello, Jira, Asana, and Microsoft Planner | | Validation and transfer | Printable HTML report and machine-readable JSON evidence package | ## Reports implemented | Report | Endpoint | Format | |---|---|---| | Executive report | `/api/projects/{projectId}/reports/executive` | JSON | | Printable executive report | `/api/projects/{projectId}/reports/executive.html` | HTML | | Full evidence package | `/api/projects/{projectId}/reports/full` | JSON | | Downloadable full evidence package | `/api/projects/{projectId}/reports/full.json` | JSON file | | Risk register | `/api/projects/{projectId}/reports/risk-register` | JSON | | Risk register export | `/api/projects/{projectId}/reports/risk-register.csv` | CSV | | Mitigation report | `/api/projects/{projectId}/reports/mitigations` | JSON | | Mitigation export | `/api/projects/{projectId}/reports/mitigations.csv` | CSV | | Deployment gate report | `/api/projects/{projectId}/reports/gate` | JSON | | Indicator report | `/api/projects/{projectId}/reports/indicators` | JSON | | Integration report | `/api/projects/{projectId}/reports/integrations` | JSON | | Audit trail report | `/api/projects/{projectId}/reports/audit` | JSON | ## UI changes The dashboard now includes a Reports tab with these actions: 1. Open executive HTML report. 2. Download full JSON evidence package. 3. Download risk register CSV. 4. Download mitigations CSV. 5. Download gate report JSON. 6. Download audit report JSON. The header Export report JSON button now uses the full reporting package when the API is available. ## Report package coverage The full evidence package includes: 1. Executive summary. 2. Governance triangle scores. 3. Lifecycle readiness map. 4. Risk register. 5. Mitigation workflow data. 6. Deployment gate criteria and decisions. 7. Indicator catalog. 8. Project-management integration mappings. 9. Audit trail. ## Acceptance criteria | Check | Expected result | |---|---| | Executive JSON | Includes summary, dimensions, lifecycle, top risks, gate, indicators, and integration summary | | Executive HTML | Opens as a printable report and can be saved as PDF from the browser | | Risk CSV | Contains all project risks with normalized and residual scores | | Mitigation CSV | Contains all mitigation actions with linked risks and evidence counts | | Gate report | Includes current gate and persisted gate history | | Audit report | Includes governance workflow audit events | | Tests | `npm test` passes | ## Implementation files | File | Role | |---|---| | `src/services/reportingService.js` | Builds JSON, CSV, and HTML reports | | `server.js` | Serves report endpoints | | `public/index.html` | Adds Reports page | | `public/app.js` | Adds report rendering and export actions | | `public/styles.css` | Adds report action layout | | `tests/reporting-workflow.test.js` | Validates report service output | ## Production note The executive HTML report is the dependency-light PDF path for the prototype. In production, the same HTML could be rendered to PDF by a server-side HTML-to-PDF service. The prototype avoids that dependency so the application remains runnable with native Node.js only.