/home/techb158/cosmic-risk.abdallabala.com/docs
NameSizeModeActions
00-design-study.md36780644editdlrm
01-uml-class-diagram.puml118690644editdlrm
02-use-case-diagram.puml37630644editdlrm
03-sequence-diagrams.puml97320644editdlrm
04-database-entity-model.mmd70510644editdlrm
05-database-schema.sql133720644editdlrm
06-diagram-preview.html50210644editdlrm
07-design-checklist.md32560644editdlrm
08-step-2-storage-layer.md53250644editdlrm
09-step-3-risk-crud-ui.md33800644editdlrm
10-step-4-mitigation-workflow.md39960644editdlrm
11-step-5-deployment-gate-workflow.md22920644editdlrm
12-step-6-multi-pm-integration.md37700644editdlrm
13-step-6-1-microsoft-planner-integration.md23350644editdlrm
14-step-7-reporting-export.md41580644editdlrm
15-step-7-1-oauth-live-connectors.md45450644editdlrm
16-step-8-user-roles-access-control.md32970644editdlrm
17-step-9-production-deployment-security.md42280644editdlrm
18-step-10-final-academic-submission.md31990644editdlrm
19-final-report-draft.md68140644editdlrm
20-instructor-submission-checklist.md36390644editdlrm
21-demo-script.md39480644editdlrm
22-traceability-matrix.md48470644editdlrm
23-testing-evidence.md29610644editdlrm
24-evaluation-rubric-mapping.md29100644editdlrm
25-final-deployment-runbook.md32140644editdlrm
26-known-limitations-and-future-work.md26320644editdlrm
27-final-qa-checklist.md28930644editdlrm
28-demo-rehearsal-script.md36180644editdlrm
29-submission-freeze-report.md27690644editdlrm
30-final-known-issues.md18760644editdlrm
31-saas-rebuild-implementation.md25730644editdlrm
application-documentation.md275150644editdlrm
conversation-log.md185030644editdlrm
dashboard-spec.md36910644editdlrm
database-guide.md378260644editdlrm
development-summary.md70700644editdlrm
github-architecture.svg62880644editdlrm
integration-pull-push-plan.md73840644editdlrm
Edit: /home/techb158/cosmic-risk.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.