@metasession.co/devaudit-cli 0.1.38 → 0.1.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/sdlc/SKILLS.md +5 -4
- package/sdlc/ai-rules/INSTRUCTIONS-SDLC.md +1 -1
- package/sdlc/files/_common/governance/ai-disclosure.md.template +4 -4
- package/sdlc/files/_common/governance/dpia.md.template +4 -4
- package/sdlc/files/_common/governance/ropa.md.template +4 -4
- package/sdlc/files/_common/skills/e2e-test-engineer/SKILL.md +38 -1
- package/sdlc/files/_common/skills/e2e-test-engineer/references/evidence-shot-core.ts +31 -0
- package/sdlc/files/_common/skills/e2e-test-engineer/references/evidence.ts +15 -5
- package/sdlc/files/_common/skills/governance-doc-author/SKILL.md +15 -10
- package/sdlc/files/ci/compliance-evidence.yml.template +11 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metasession.co/devaudit-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.40",
|
|
4
4
|
"description": "DevAudit CLI — installs, syncs, and operates the Metasession SDLC across consumer projects.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@clack/prompts": "^0.8.2",
|
|
36
|
-
"@metasession.co/devaudit-plugin-sdk": "^0.1.
|
|
36
|
+
"@metasession.co/devaudit-plugin-sdk": "^0.1.40",
|
|
37
37
|
"commander": "^12.1.0",
|
|
38
38
|
"consola": "^3.2.3",
|
|
39
39
|
"env-paths": "^3.0.0",
|
package/sdlc/SKILLS.md
CHANGED
|
@@ -93,10 +93,11 @@ node scripts/validate-adapter.cjs sdlc/files/_common/skills/<name>/SKILL.md
|
|
|
93
93
|
|
|
94
94
|
## Skills currently shipped
|
|
95
95
|
|
|
96
|
-
| Skill
|
|
97
|
-
|
|
|
98
|
-
| `e2e-test-engineer`
|
|
99
|
-
| `sdlc-implementer`
|
|
96
|
+
| Skill | Location | Triggers (paraphrased) | Additional emissions |
|
|
97
|
+
| ----------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
|
|
98
|
+
| `e2e-test-engineer` | `_common/skills/` | "add e2e tests", "bootstrap an e2e suite", "update the test pack", "are any tests obsolete", "run e2e tests and file issues" | `e2e/helpers/evidence.ts` + `evidence-shot-core.ts` (node-stack consumers) |
|
|
99
|
+
| `sdlc-implementer` | `_common/skills/` | "implement issue #N under the SDLC", "run the SDLC for issue #N", "automate REQ-XXX from issue to release", "resume REQ-XXX" | — (orchestrator; invokes `e2e-test-engineer` + `governance-doc-author`) |
|
|
100
|
+
| `governance-doc-author` | `_common/skills/` | "create / refresh the RoPA", "write a DPIA", "update the AI disclosure", "set up the periodic review schedule", "GDPR.Art-30 is MISSING on the matrix" (v0.1.37+) | `references/incident-classification.md` (shared with `e2e-test-engineer`) |
|
|
100
101
|
|
|
101
102
|
`sdlc-implementer` is the **default entry point for a tracked change** — an **orchestration skill** that drives Claude Code's native tools (`gh`, shell, `devaudit` CLI, portal API) through the full 5-stage flow against a single GitHub issue, pausing only at the UAT-review gate (and at the plan checkpoint for HIGH/CRITICAL risk). It is synced into every consumer (`.claude/skills/sdlc-implementer/`) by `devaudit update`. It replaces an earlier roadmap of five atomic skills (`risk-classifier`, `commit-message-author`, `compliance-evidence-author`, `sast-triager`, `release-ticket-author`) that were deprioritised — Claude Code's innate capabilities already cover what those atomic skills wrapped; the value-add is end-to-end orchestration with framework-compliant pauses, not five discoverable helpers a human still has to compose.
|
|
102
103
|
|
|
@@ -58,7 +58,7 @@ Read `SDLC/1-plan-requirement.md` for full details. Summary:
|
|
|
58
58
|
2. Get next REQ ID: `grep -oP 'REQ-\d+' compliance/RTM.md | sort -t- -k2 -n | tail -1`
|
|
59
59
|
3. Classify risk (use issue labels as input): LOW (internal, no auth) / MEDIUM (PII, user-facing, APIs) / HIGH (security, payments, RBAC). AI involvement raises risk by one level.
|
|
60
60
|
4. Add to `compliance/RTM.md` Part B: `| REQ-XXX | #NNN | [RISK] | compliance/evidence/REQ-XXX/ | DRAFT | -- | -- |`
|
|
61
|
-
5. **MEDIUM/HIGH risk:** Create `compliance/evidence/REQ-XXX/implementation-plan.md` —
|
|
61
|
+
5. **MEDIUM/HIGH risk:** Create `compliance/evidence/REQ-XXX/implementation-plan.md` from `SDLC/Implementation_Plan_TEMPLATE.md` (synced from the framework in v0.1.37+). The template's shape is load-bearing — it carries the `## Framework attribution` section that closes **ISO 29119 §3.4** (test plan), **ISO 27001 A.8.25** (secure SDLC), **GDPR Art. 25** (data protection by design), and **EU AI Act Art. 11** (technical documentation). Don't delete sections — mark with `N/A — <reason>` if a clause genuinely doesn't apply. **WAIT CHECKPOINT:** Present the plan to the developer. Do NOT proceed until approved.
|
|
62
62
|
6. Create `compliance/evidence/REQ-XXX/test-scope.md` with acceptance criteria (derived from the implementation plan for MEDIUM/HIGH).
|
|
63
63
|
7. **WAIT CHECKPOINT:** Present the test scope to the developer. Do NOT proceed until confirmed.
|
|
64
64
|
8. Create `compliance/evidence/REQ-XXX/test-plan.md` — map acceptance criteria to specific tests, list tests to add/update/remove. Distinguish unit tests (TDD, before implementation) from E2E tests (after implementation).
|
|
@@ -22,10 +22,10 @@ risk_class: "REPLACE — minimal | limited | high | unacceptable"
|
|
|
22
22
|
|
|
23
23
|
## Uploading this artefact
|
|
24
24
|
|
|
25
|
-
- **File path:** `compliance/governance/ai-disclosure.md`
|
|
26
|
-
- **Upload trigger:**
|
|
27
|
-
- **Verify after
|
|
28
|
-
- **Refresh cadence:** every 180 days, or whenever an AI tool / model / prompt-class is added or materially changed. Source data: git `Co-Authored-By: Claude` trailers + CI usage logs + per-REQ implementation-plan §5.
|
|
25
|
+
- **File path:** `compliance/governance/ai-disclosure.md` (kept in-repo for review; CI does NOT upload it).
|
|
26
|
+
- **Upload trigger:** manual via the portal Upload Evidence form at `/projects/<slug>/upload` — select evidence type `ai_disclosure`. Tier-2 governance docs are operator-uploaded only since DevAudit-Installer v0.1.39 — the previous CI auto-upload was treating placeholder content as canonical evidence. The matrix MISSING row for `EUAIA.Art-13` renders an `Upload ai-disclosure.md →` deep-link that pre-fills the form for you.
|
|
27
|
+
- **Verify after upload:** open `/projects/<slug>/compliance`. The **EU AI Act Art. 13** clause should flip MISSING → COVERED immediately.
|
|
28
|
+
- **Refresh cadence:** every 180 days, or whenever an AI tool / model / prompt-class is added or materially changed. The portal renders an inline `Expires YYYY-MM-DD` on the clause (amber within 30 days, red once stale). Source data for each refresh: git `Co-Authored-By: Claude` trailers + CI usage logs + per-REQ implementation-plan §5.
|
|
29
29
|
|
|
30
30
|
## Framework checklist — EU AI Act Art. 13
|
|
31
31
|
|
|
@@ -22,10 +22,10 @@ risk_level: "REPLACE — low | medium | high"
|
|
|
22
22
|
|
|
23
23
|
## Uploading this artefact
|
|
24
24
|
|
|
25
|
-
- **File path:** `compliance/governance/dpia.md` (or `dpia-<reqid>.md` for a per-REQ DPIA tied to a HIGH-risk requirement)
|
|
26
|
-
- **Upload trigger:**
|
|
27
|
-
- **Verify after
|
|
28
|
-
- **Refresh cadence:** annually (365 days), or sooner whenever the assessed processing materially changes (new data category, new recipient, new automated-decision path).
|
|
25
|
+
- **File path:** `compliance/governance/dpia.md` (or `dpia-<reqid>.md` for a per-REQ DPIA tied to a HIGH-risk requirement). Kept in-repo for review; CI does NOT upload it.
|
|
26
|
+
- **Upload trigger:** manual via the portal Upload Evidence form at `/projects/<slug>/upload` — select evidence type `dpia`. Tier-2 governance docs are operator-uploaded only since DevAudit-Installer v0.1.39 — the previous CI auto-upload was treating placeholder content as canonical evidence. The matrix MISSING row for `GDPR.Art-35` renders an `Upload dpia.md →` deep-link that pre-fills the form for you.
|
|
27
|
+
- **Verify after upload:** open `/projects/<slug>/compliance`. The **GDPR Art. 35** clause should flip MISSING → COVERED immediately.
|
|
28
|
+
- **Refresh cadence:** annually (365 days), or sooner whenever the assessed processing materially changes (new data category, new recipient, new automated-decision path). The portal renders an inline `Expires YYYY-MM-DD` on the clause (amber within 30 days, red once stale).
|
|
29
29
|
|
|
30
30
|
## Framework checklist — GDPR Art. 35
|
|
31
31
|
|
|
@@ -20,10 +20,10 @@ processing_activities: []
|
|
|
20
20
|
|
|
21
21
|
## Uploading this artefact
|
|
22
22
|
|
|
23
|
-
- **File path:** `compliance/governance/ropa.md`
|
|
24
|
-
- **Upload trigger:**
|
|
25
|
-
- **Verify after
|
|
26
|
-
- **Refresh cadence:** annually (365 days). The portal
|
|
23
|
+
- **File path:** `compliance/governance/ropa.md` (kept in-repo for review; CI does NOT upload it).
|
|
24
|
+
- **Upload trigger:** manual via the portal Upload Evidence form at `/projects/<slug>/upload` — select evidence type `ropa`. Tier-2 governance docs are operator-uploaded only since DevAudit-Installer v0.1.39 — the previous CI auto-upload was treating placeholder content as canonical evidence. The matrix MISSING row for `GDPR.Art-30` renders an `Upload ropa.md →` deep-link that pre-fills the form for you.
|
|
25
|
+
- **Verify after upload:** open `/projects/<slug>/compliance` on the DevAudit portal. The **GDPR Art. 30** clause should flip MISSING → COVERED immediately.
|
|
26
|
+
- **Refresh cadence:** annually (365 days). The portal renders an inline `Expires YYYY-MM-DD` on the clause (amber within 30 days, red once stale).
|
|
27
27
|
|
|
28
28
|
## Framework checklist — GDPR Art. 30
|
|
29
29
|
|
|
@@ -327,7 +327,7 @@ test('AC1: edit dialog opens with fields pre-filled', async ({ page }) => {
|
|
|
327
327
|
- Call `evidenceShot` **immediately after** the AC-proving assertion, before navigating, closing dialogs, or any further interaction.
|
|
328
328
|
- AC number is a separate argument (`ac: number`) — the helper composes the filename `REQ-XXX-AC<n>-<slug>.png`. The slug describes what the screenshot proves (`edit-dialog-prefilled`), NOT the AC number.
|
|
329
329
|
- Slug is kebab-case lowercase (`[a-z0-9-]+`). Capitalised slugs, underscores, or spaces throw.
|
|
330
|
-
- One screenshot per AC
|
|
330
|
+
- One **canonical** screenshot per AC; additional stage screenshots are tier-gated — see *Screenshot density per spec role* below.
|
|
331
331
|
- Failure forensics stays untouched (`screenshot: 'only-on-failure'` + `trace: 'on-first-retry'`).
|
|
332
332
|
|
|
333
333
|
The helper is shipped automatically into `e2e/helpers/evidence.ts` by the SDLC sync (node-stack consumers). Output lands at `compliance/evidence/<REQ-ID>/screenshots/REQ-XXX-AC<n>-<slug>.png` — commit these PNGs as part of the evidence pack so reviewers can corroborate the test-plan AC mapping.
|
|
@@ -336,6 +336,43 @@ The helper also writes a sidecar `<filename>.meta.json` containing the AC mappin
|
|
|
336
336
|
|
|
337
337
|
The canonical helper source lives at `references/evidence.ts` in this skill.
|
|
338
338
|
|
|
339
|
+
### Screenshot density per spec role
|
|
340
|
+
|
|
341
|
+
The number of `evidenceShot` calls per spec should scale to the spec's role:
|
|
342
|
+
|
|
343
|
+
- **While the spec is a feature artefact** (newly authored on the branch, before merge to develop): capture multiple stages — every meaningful transition or state the AC documents. The dense evidence is what reviewers use to verify the AC was met end-to-end during the feature cycle.
|
|
344
|
+
- **Once the spec joins the regression pack** (post-merge, `git diff --diff-filter=A` no longer matches it): capture only the canonical "this still works" anchor per AC. Re-running the dense journey on every regression cycle is noise and inflates CI artefact storage with little signal.
|
|
345
|
+
|
|
346
|
+
The `EvidenceShotOrigin` signal (`'feature' | 'regression'`) auto-detects from `E2E_NEW_SPECS`. Mark stage screenshots with `{ tier: 'feature' }`; the helper auto-suppresses them on regression runs. The canonical anchor uses the default tier (`'always'`).
|
|
347
|
+
|
|
348
|
+
```ts
|
|
349
|
+
test('AC7: stock dial completes the transition', async ({ page }) => {
|
|
350
|
+
// Stage screenshots — fire while the spec is a feature artefact;
|
|
351
|
+
// auto-suppress once it graduates into the regression pack.
|
|
352
|
+
await openStockDial(page, item.id);
|
|
353
|
+
await evidenceShot(page, 'REQ-066', 7, 'dial-open', { tier: 'feature' });
|
|
354
|
+
await advanceDial(page);
|
|
355
|
+
await evidenceShot(page, 'REQ-066', 7, 'in-progress', { tier: 'feature' });
|
|
356
|
+
|
|
357
|
+
// Canonical anchor — always fires (default tier: 'always').
|
|
358
|
+
// This is the artefact every future regression run re-captures as
|
|
359
|
+
// proof the AC still holds.
|
|
360
|
+
await expect(dial.getByRole('status')).toHaveText('Completed');
|
|
361
|
+
await evidenceShot(page, 'REQ-066', 7, 'completed');
|
|
362
|
+
});
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
A reasonable default per AC:
|
|
366
|
+
|
|
367
|
+
- 1× canonical "completed / final state" shot (tier `'always'`).
|
|
368
|
+
- 1–3× stage shots covering the meaningful intermediate transitions (tier `'feature'`).
|
|
369
|
+
|
|
370
|
+
When to deviate:
|
|
371
|
+
|
|
372
|
+
- **Single-shot ACs** (one assertion that's its own proof — e.g. *"the form submits and returns to the list"*) need only the canonical anchor. Don't manufacture stages just to hit the 1–3 band.
|
|
373
|
+
- **Long flows** (>3 meaningful transitions) keep all stages tier `'feature'`. The post-merge regression run still has the canonical anchor to corroborate the AC; the dense journey is on the feature PR for reviewers and in the audit-pack download for that release forever.
|
|
374
|
+
- **Reviewer pushback that evidence feels thin** (single-shot per AC across a HIGH-risk REQ) almost always means tier `'feature'` stages are missing — add them on the feature branch where they actually fire, not after.
|
|
375
|
+
|
|
339
376
|
---
|
|
340
377
|
|
|
341
378
|
## Principles
|
|
@@ -7,6 +7,23 @@
|
|
|
7
7
|
|
|
8
8
|
export type EvidenceShotOrigin = 'feature' | 'regression';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Capture density tier. Lets spec authors mark intermediate-state
|
|
12
|
+
* screenshots that only matter while the spec is being authored on a
|
|
13
|
+
* feature branch — once the spec joins the regression pack, those
|
|
14
|
+
* become noise and inflate CI artefact storage.
|
|
15
|
+
*
|
|
16
|
+
* - `'always'` (default) — capture on every run. Use for the canonical
|
|
17
|
+
* "this still works" anchor per AC; the artefact reviewers rely on
|
|
18
|
+
* to corroborate the test-plan mapping across every release.
|
|
19
|
+
* - `'feature'` — capture only when the spec's origin is `feature`
|
|
20
|
+
* (i.e. the spec was added on the current branch per
|
|
21
|
+
* `E2E_NEW_SPECS`). Auto-suppressed once the spec graduates into
|
|
22
|
+
* the regression pack. Use for stage screenshots covering meaningful
|
|
23
|
+
* intermediate transitions reviewers want during the feature cycle.
|
|
24
|
+
*/
|
|
25
|
+
export type EvidenceShotTier = 'always' | 'feature';
|
|
26
|
+
|
|
10
27
|
export interface EvidenceShotSidecar {
|
|
11
28
|
readonly origin: EvidenceShotOrigin;
|
|
12
29
|
readonly reqId: string;
|
|
@@ -16,6 +33,20 @@ export interface EvidenceShotSidecar {
|
|
|
16
33
|
readonly capturedAt: string;
|
|
17
34
|
}
|
|
18
35
|
|
|
36
|
+
/**
|
|
37
|
+
* Pure decision: should the capture be suppressed?
|
|
38
|
+
*
|
|
39
|
+
* The only suppression case is `tier='feature'` × `origin='regression'`
|
|
40
|
+
* — a stage screenshot whose spec has graduated into the regression
|
|
41
|
+
* pack. Every other (tier, origin) combination captures.
|
|
42
|
+
*/
|
|
43
|
+
export function shouldSuppressEvidenceShot(
|
|
44
|
+
tier: EvidenceShotTier,
|
|
45
|
+
origin: EvidenceShotOrigin,
|
|
46
|
+
): boolean {
|
|
47
|
+
return tier === 'feature' && origin === 'regression';
|
|
48
|
+
}
|
|
49
|
+
|
|
19
50
|
const REQ_ID_RE = /^REQ-[A-Z0-9-]+$/;
|
|
20
51
|
const SLUG_RE = /^[a-z0-9-]+$/;
|
|
21
52
|
|
|
@@ -4,12 +4,14 @@ import { test, type Page } from '@playwright/test';
|
|
|
4
4
|
import {
|
|
5
5
|
autoDetectEvidenceShotOrigin,
|
|
6
6
|
composeScreenshotFilename,
|
|
7
|
+
shouldSuppressEvidenceShot,
|
|
7
8
|
validateEvidenceShotInputs,
|
|
8
9
|
type EvidenceShotOrigin,
|
|
9
10
|
type EvidenceShotSidecar,
|
|
11
|
+
type EvidenceShotTier,
|
|
10
12
|
} from './evidence-shot-core';
|
|
11
13
|
|
|
12
|
-
export type { EvidenceShotOrigin };
|
|
14
|
+
export type { EvidenceShotOrigin, EvidenceShotTier };
|
|
13
15
|
|
|
14
16
|
export interface EvidenceShotOptions {
|
|
15
17
|
/** Capture the full page rather than the viewport. Default: true. */
|
|
@@ -21,6 +23,14 @@ export interface EvidenceShotOptions {
|
|
|
21
23
|
* the calling spec's file appears in that list, else `regression`.
|
|
22
24
|
*/
|
|
23
25
|
readonly origin?: EvidenceShotOrigin;
|
|
26
|
+
/**
|
|
27
|
+
* Capture density tier. Default: `'always'`. Set to `'feature'` for
|
|
28
|
+
* intermediate-state screenshots that should only fire while the
|
|
29
|
+
* spec is on a feature branch — they auto-suppress once the spec
|
|
30
|
+
* graduates into the regression pack. See the SKILL.md "Screenshot
|
|
31
|
+
* density per spec role" section for the density policy.
|
|
32
|
+
*/
|
|
33
|
+
readonly tier?: EvidenceShotTier;
|
|
24
34
|
}
|
|
25
35
|
|
|
26
36
|
/**
|
|
@@ -59,15 +69,15 @@ export async function evidenceShot(
|
|
|
59
69
|
opts: EvidenceShotOptions = {},
|
|
60
70
|
): Promise<void> {
|
|
61
71
|
validateEvidenceShotInputs(reqId, ac, slug);
|
|
72
|
+
const tier: EvidenceShotTier = opts.tier ?? 'always';
|
|
73
|
+
const specFile = resolveSpecFile();
|
|
74
|
+
const origin = opts.origin ?? autoDetectEvidenceShotOrigin(specFile, process.env.E2E_NEW_SPECS);
|
|
75
|
+
if (shouldSuppressEvidenceShot(tier, origin)) return;
|
|
62
76
|
const fileName = composeScreenshotFilename(reqId, ac, slug);
|
|
63
77
|
const dir = path.join(process.cwd(), 'compliance/evidence', reqId, 'screenshots');
|
|
64
78
|
const pngPath = path.join(dir, fileName);
|
|
65
79
|
const sidecarPath = `${pngPath}.meta.json`;
|
|
66
|
-
|
|
67
80
|
await page.screenshot({ path: pngPath, fullPage: opts.fullPage ?? true });
|
|
68
|
-
|
|
69
|
-
const specFile = resolveSpecFile();
|
|
70
|
-
const origin = opts.origin ?? autoDetectEvidenceShotOrigin(specFile, process.env.E2E_NEW_SPECS);
|
|
71
81
|
const sidecar: EvidenceShotSidecar = {
|
|
72
82
|
origin,
|
|
73
83
|
reqId,
|
|
@@ -7,13 +7,13 @@ description: Author or refresh one of the project's governance documents — RoP
|
|
|
7
7
|
|
|
8
8
|
Author or refresh a single governance document so it correctly closes the framework clauses it's meant to satisfy. Five document classes covered:
|
|
9
9
|
|
|
10
|
-
| Document | File | Closes |
|
|
11
|
-
|
|
12
|
-
| **RoPA** | `compliance/governance/ropa.md` | `GDPR.Art-30` |
|
|
13
|
-
| **DPIA** | `compliance/governance/dpia.md` (or `dpia-<reqid>.md`) | `GDPR.Art-35` |
|
|
14
|
-
| **AI Use Disclosure** | `compliance/governance/ai-disclosure.md` | `EUAIA.Art-13` |
|
|
15
|
-
| **Periodic Security Review Schedule** | `SDLC/Periodic_Security_Review_Schedule.md`
|
|
16
|
-
| **Incident Report (project-level template)** | `compliance/governance/incident-report.md` | `ISO29119.3.5.4` baseline; conditionals via [[incident-classification]] |
|
|
10
|
+
| Document | Tier | File | Upload path | Closes |
|
|
11
|
+
|---|---|---|---|---|
|
|
12
|
+
| **RoPA** | 2 | `compliance/governance/ropa.md` | **Portal Upload form** (type `ropa`) — CI does NOT auto-upload since v0.1.39 | `GDPR.Art-30` |
|
|
13
|
+
| **DPIA** | 2 | `compliance/governance/dpia.md` (or `dpia-<reqid>.md`) | **Portal Upload form** (type `dpia`) — CI does NOT auto-upload since v0.1.39 | `GDPR.Art-35` |
|
|
14
|
+
| **AI Use Disclosure** | 2 | `compliance/governance/ai-disclosure.md` | **Portal Upload form** (type `ai_disclosure`) — CI does NOT auto-upload since v0.1.39 | `EUAIA.Art-13` |
|
|
15
|
+
| **Periodic Security Review Schedule** | 2 | `SDLC/Periodic_Security_Review_Schedule.md` | **Portal Upload form** (type `compliance_document`) | `ISO27001.A.12.1` schedule expectation (quarterly runs close it via `periodic_review` evidence — see Phase 6) |
|
|
16
|
+
| **Incident Report (project-level template)** | 3 | `compliance/governance/incident-report.md` | **CI auto-upload** via `compliance-evidence.yml` | `ISO29119.3.5.4` baseline; conditionals via [[incident-classification]] |
|
|
17
17
|
|
|
18
18
|
Each doc has a starter template under `sdlc/files/_common/governance/*.md.template` (installed on demand via `devaudit bootstrap-governance` since v0.1.36). This skill does NOT regenerate the template — it walks the operator through *filling it in* against the project's actual state.
|
|
19
19
|
|
|
@@ -23,7 +23,7 @@ Each doc has a starter template under `sdlc/files/_common/governance/*.md.templa
|
|
|
23
23
|
- Authoring or refreshing one (or more) of the five governance docs above.
|
|
24
24
|
- Gathering source data from the codebase / CI runs / git history.
|
|
25
25
|
- Confirming framework attribution before commit.
|
|
26
|
-
- Driving the commit + push → CI auto
|
|
26
|
+
- Driving the commit + push → portal upload (manual for Tier 1/2, CI auto for Tier 3) → portal verification loop.
|
|
27
27
|
|
|
28
28
|
**Out of scope**
|
|
29
29
|
- Incident response itself — that path is the `e2e-test-engineer` skill's defect-filing flow plus `incident-export.yml` on issue close.
|
|
@@ -104,10 +104,15 @@ If any required section is still stub, **do not commit**. Surface the gap in the
|
|
|
104
104
|
|
|
105
105
|
### Phase 5 — Commit + verify
|
|
106
106
|
|
|
107
|
+
Tier 1/2 docs (RoPA, DPIA, AI Disclosure, Periodic Security Review Schedule) and Tier 3 per-event docs (Incident Report template) take different upload paths since DevAudit-Installer v0.1.39. The skill must drive the right one based on which doc Phase 0 routed to.
|
|
108
|
+
|
|
107
109
|
1. Show the operator the diff. Confirm before committing (per the **Confirm before destructive or public actions** principle).
|
|
108
110
|
2. Commit with a conventional-commit message: `compliance(governance): refresh <doc> for <reason>` — e.g. `compliance(governance): refresh ropa.md — annual review 2026-Q2`.
|
|
109
|
-
3. Push to the current working branch.
|
|
110
|
-
4.
|
|
111
|
+
3. Push to the current working branch.
|
|
112
|
+
4. Drive upload based on doc class:
|
|
113
|
+
- **Tier 1/2 (RoPA, DPIA, AI Disclosure, Periodic Security Review Schedule)** — CI does NOT upload these. Direct the operator to the portal Upload Evidence form at `/projects/<slug>/upload`. Surface the exact evidence type to select (`ropa` / `dpia` / `ai_disclosure` / `compliance_document` respectively) and remind them: "the matrix MISSING row for the corresponding clause renders an `Upload <filename> →` deep-link that pre-fills the form."
|
|
114
|
+
- **Tier 3 (Incident Report template, plus per-event `periodic-review.md` and `incident-report-<n>.md`)** — CI auto-uploads via `compliance-evidence.yml`. Surface: "next `git push` to `develop` → `compliance-evidence.yml` auto-uploads as `<evidence_type>`, closing `<framework_clause>` within ~2 minutes."
|
|
115
|
+
5. Suggest the operator open `/projects/<slug>/compliance` on the portal post-upload to verify the clause flipped MISSING → COVERED. For docs with freshness windows (365d for RoPA / DPIA / Test_Policy / Test_Strategy / AGENT / INSTRUCTIONS; 180d for AI Disclosure) the matrix renders an inline `Expires YYYY-MM-DD` label — confirm it reads the expected date for the upload.
|
|
111
116
|
|
|
112
117
|
### Phase 6 — Special case: the Periodic Review Schedule vs the quarterly review itself
|
|
113
118
|
|
|
@@ -156,13 +156,17 @@ jobs:
|
|
|
156
156
|
|| echo "Warning: Failed to upload test-summary-report.md"
|
|
157
157
|
fi
|
|
158
158
|
|
|
159
|
-
#
|
|
160
|
-
#
|
|
161
|
-
#
|
|
162
|
-
#
|
|
163
|
-
#
|
|
164
|
-
#
|
|
165
|
-
#
|
|
159
|
+
# Tier 3 per-event governance docs (devaudit#370 Phase 3a, narrowed
|
|
160
|
+
# in v0.1.39). Only periodic-review and incident-report are CI-uploaded
|
|
161
|
+
# — both are auto-generated by other workflows (periodic-review by the
|
|
162
|
+
# quarterly cron, incident-report by the incident-export workflow).
|
|
163
|
+
#
|
|
164
|
+
# Tier 1/2 governance docs (Test_Policy, AGENT, INSTRUCTIONS,
|
|
165
|
+
# Test_Strategy, Test_Architecture, Periodic_Security_Review_Schedule,
|
|
166
|
+
# ROPA, DPIA, AI Disclosure) are operator-uploaded via the portal
|
|
167
|
+
# Upload Evidence form. CI auto-upload was removed because placeholder
|
|
168
|
+
# starter content was landing as canonical evidence; the portal form
|
|
169
|
+
# ensures the operator reviews each refresh before it counts.
|
|
166
170
|
upload_governance() {
|
|
167
171
|
local FILE="$1" TYPE="$2"
|
|
168
172
|
if [ ! -f "$FILE" ]; then return 0; fi
|
|
@@ -175,12 +179,6 @@ jobs:
|
|
|
175
179
|
}
|
|
176
180
|
# Recognise governance docs at top-level OR under compliance/governance/
|
|
177
181
|
# (operator's choice — both layouts are common).
|
|
178
|
-
upload_governance compliance/ropa.md ropa
|
|
179
|
-
upload_governance compliance/governance/ropa.md ropa
|
|
180
|
-
upload_governance compliance/dpia.md dpia
|
|
181
|
-
upload_governance compliance/governance/dpia.md dpia
|
|
182
|
-
upload_governance compliance/ai-disclosure.md ai_disclosure
|
|
183
|
-
upload_governance compliance/governance/ai-disclosure.md ai_disclosure
|
|
184
182
|
upload_governance compliance/periodic-review.md periodic_review
|
|
185
183
|
upload_governance compliance/governance/periodic-review.md periodic_review
|
|
186
184
|
upload_governance compliance/incident-report.md incident_report
|