/home/techb158/trello.abdallabala.com
Edit: /home/techb158/trello.abdallabala.com/README.md (2936B)
# COSMIC AI-Risk Management Trello Power-Up
Custom Trello Power-Up prototype for applying the COSMIC AI-Risk methodology inside Trello boards.
## Current milestone
Version `0.2.0` is ready for local validation and Trello registration.
It now includes:
- Runtime `/config.js` injection for the Trello API key and public API base URL.
- Trello REST API initialization on the connector page and iframe pages.
- Board button, card button, card badges, card-detail badges, settings, and card back section.
- COSMIC risk scoring API.
- Saved card-level assessments.
- Board summary API.
- Mitigation checklist creation through Trello REST authorization.
- Unit tests for the risk engine.
- Smoke test for the local API.
## Methodology implemented
The prototype operationalizes these COSMIC AI-Risk concepts:
- AI lifecycle phases.
- AI project typology.
- Organizational, technical, and human governance dimensions.
- Strategic and organizational, technical, and legal and ethical risk categories.
- Risk scoring using probability, impact, detection difficulty, and mitigation completeness.
- Deployment gate status using risk status, approval state, mitigation completeness, model performance, data readiness, ethical review, and legal review.
The scoring formula is an implementation proposal for the prototype. It should be calibrated during empirical validation.
## Install
```bash
npm install
cp .env.example .env
npm run dev
```
Open:
```text
http://localhost:3000/index.html
```
## Validate locally
Run static checks and unit tests:
```bash
npm run lint
npm test
```
In one terminal, start the server:
```bash
npm start
```
In a second terminal, run the API smoke test:
```bash
npm run smoke
```
Expected smoke-test result:
```text
health: { ok: true, service: 'cosmic-ai-risk-trello-powerup', version: '0.2.0' }
score: 21 medium gate-blocked
saved assessment:
board summary: { cardCount: 1, averageScore: 21, deploymentBlocked: 1 }
```
## Trello setup
See `docs/trello-admin-setup.md`.
## API sample
Score an assessment without saving it:
```bash
curl -X POST http://localhost:3000/api/risks/score \
-H "Content-Type: application/json" \
--data @samples/risk-assessment.json
```
Save a card assessment:
```bash
curl -X POST http://localhost:3000/api/boards/demo-board/cards/demo-card/assessments \
-H "Content-Type: application/json" \
--data @samples/risk-assessment.json
```
Read a board summary:
```bash
curl http://localhost:3000/api/boards/demo-board/summary
```
## Important production work still required
- Add persistent storage such as PostgreSQL.
- Add authentication for the COSMIC backend API.
- Add audit logs for governance approvals.
- Calibrate score thresholds with validation data.
- Add Trello label synchronization for risk status.
- Add custom field synchronization if the board uses Trello Custom Fields.
- Add organization-level role and access controls.