/home/techb158/balavpn.abdallabala.com/docs
Edit: /home/techb158/balavpn.abdallabala.com/docs/11-step-5-deployment-gate-workflow.md (2292B)
# Step 5: Deployment Gate Workflow Controls
## Purpose
Step 5 turns the deployment gate from a calculated dashboard result into a governance workflow.
The calculated gate status remains based on measurable criteria. The governance reviewer can now record a separate decision, add criterion notes, link evidence, and preserve an audit trail.
## Source alignment
The source framework requires measurable AI risk analysis, ISO-style indicators, a software prototype, REST API support, and project-management integration. This step is an implementation extension that operationalizes deployment control.
## Added workflow capabilities
| Capability | Description |
|---|---|
| Gate history | Every gate evaluation is persisted as a snapshot. |
| Reviewer decision | Reviewer can record Approved, Rejected, Accepted, or Needs changes. |
| Criterion notes | Each gate criterion can store reviewer status and comments. |
| Evidence traceability | Each criterion can link a URL or internal evidence reference. |
| Audit trail | Gate evaluations, decisions, and criterion updates are recorded as audit events. |
| UI workflow | The deployment gate page now includes summary cards, decision form, criteria controls, history, and audit log. |
## API endpoints
| Method | Endpoint | Purpose |
|---|---|---|
| POST | `/api/projects/{projectId}/gate/evaluate` | Calculate and persist a gate snapshot. |
| GET | `/api/projects/{projectId}/gate/history` | List persisted gate evaluations. |
| GET | `/api/gates/{gateId}` | Read one persisted gate with criteria and decisions. |
| POST | `/api/gates/{gateId}/decisions` | Record reviewer decision. |
| PATCH | `/api/gate-criteria/{criterionId}` | Update reviewer status, note, and evidence reference. |
| GET | `/api/projects/{projectId}/audit` | List audit events. |
## Acceptance criteria
| Check | Expected result |
|---|---|
| Persist gate | Gate evaluation creates a gate snapshot with criteria. |
| Review decision | Reviewer decision is saved and visible in gate history. |
| Criterion evidence | Criterion notes and evidence reference are saved. |
| Audit | Gate decision and criterion update produce audit events. |
| UI | Deployment gate page shows cards, criteria controls, history, and audit trail. |
| Tests | Full test suite passes. |