@metasession.co/devaudit-cli 0.1.68 → 0.1.70

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.
Files changed (27) hide show
  1. package/dist/index.js +11 -4
  2. package/dist/index.js.map +1 -1
  3. package/package.json +2 -2
  4. package/scripts/upload-evidence.sh +10 -1
  5. package/sdlc/CLAUDE.md +25 -2
  6. package/sdlc/SKILLS.md +1 -1
  7. package/sdlc/ai-rules/INSTRUCTIONS-SDLC.md +21 -5
  8. package/sdlc/files/_common/3-compile-evidence.md +63 -2
  9. package/sdlc/files/_common/4-submit-for-review.md +2 -1
  10. package/sdlc/files/_common/5-deploy-main.md +1 -0
  11. package/sdlc/files/_common/Test_Plan_TEMPLATE.md +1 -1
  12. package/sdlc/files/_common/Test_Strategy.md +1 -1
  13. package/sdlc/files/_common/governance/nil-incident-report.md.template +38 -0
  14. package/sdlc/files/_common/scripts/validate-compliance-artifacts.sh +13 -0
  15. package/sdlc/files/_common/skills/e2e-test-engineer/SKILL.md +12 -2
  16. package/sdlc/files/_common/skills/requirements-aligner/SKILL.md +6 -1
  17. package/sdlc/files/_common/skills/sdlc-implementer/SKILL.md +137 -25
  18. package/sdlc/files/_common/skills/sdlc-implementer/references/call-graph.md +1 -1
  19. package/sdlc/files/_common/skills/sdlc-implementer/references/change-request-loop.md +27 -2
  20. package/sdlc/files/ci/ci.yml.template +83 -13
  21. package/sdlc/files/ci/compliance-evidence.yml.template +353 -53
  22. package/sdlc/files/ci/feature-e2e.yml.template +3 -2
  23. package/sdlc/files/ci/incident-export.yml.template +306 -8
  24. package/sdlc/files/ci/label-retention.yml.template +144 -0
  25. package/sdlc/files/ci/post-deploy-prod.yml.template +80 -3
  26. package/sdlc/files/ci/python/ci.yml.template +60 -16
  27. package/sdlc/files/sdlc-config.example.json +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metasession.co/devaudit-cli",
3
- "version": "0.1.68",
3
+ "version": "0.1.70",
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.68",
36
+ "@metasession.co/devaudit-plugin-sdk": "^0.1.70",
37
37
  "ajv": "^8.20.0",
38
38
  "commander": "^12.1.0",
39
39
  "consola": "^3.2.3",
@@ -37,6 +37,11 @@
37
37
  # 4 submit-for-review, 5 deploy. Forwarded as
38
38
  # `sdlcStage`; unknown to older portals (ignored
39
39
  # server-side, no error).
40
+ # --test-cycle <id> Test cycle identifier (typically the CI run
41
+ # ID). Forwarded as `testCycleId`; lets the
42
+ # portal group evidence by test cycle per
43
+ # ISO/IEC/IEEE 29119-3. Optional — older
44
+ # portals ignore the field (no error).
40
45
  #
41
46
  # Required environment variables:
42
47
  # DEVAUDIT_BASE_URL e.g. https://meta-comply-production.up.railway.app
@@ -78,6 +83,7 @@ RELEASE_TITLE=""
78
83
  CHANGE_TYPE=""
79
84
  GATE_STATUS=""
80
85
  SDLC_STAGE=""
86
+ TEST_CYCLE=""
81
87
  # Repeatable `--meta-key key=value` accumulator. Each pair gets merged
82
88
  # into the metadata JSON sent to the portal. Used by the screenshot
83
89
  # upload loop to pass `origin=feature|regression` from the per-PNG
@@ -103,6 +109,7 @@ while [ "$#" -gt 0 ]; do
103
109
  # DevAudit-Installer#96.
104
110
  --gate-status) GATE_STATUS="$2"; shift 2 ;;
105
111
  --sdlc-stage) SDLC_STAGE="$2"; shift 2 ;;
112
+ --test-cycle) TEST_CYCLE="$2"; shift 2 ;;
106
113
  # --meta-key key=value (repeatable). Merged into the metadata JSON
107
114
  # before posting. Validates the `key=value` shape; rejects bare
108
115
  # keys without `=`.
@@ -313,7 +320,8 @@ upload_presigned() {
313
320
  \"releaseBranch\": \"${BRANCH}\",
314
321
  \"environment\": \"${ENVIRONMENT}\",
315
322
  \"evidenceCategory\": \"${EVIDENCE_CATEGORY}\",
316
- \"sdlcStage\": \"${SDLC_STAGE}\"
323
+ \"sdlcStage\": \"${SDLC_STAGE}\",
324
+ \"testCycleId\": \"${TEST_CYCLE}\"
317
325
  }") || curl_exit=$?
318
326
  curl_exit=${curl_exit:-0}
319
327
  if [ "$curl_exit" -eq 0 ] && [ "$http_code" -ge 200 ] && [ "$http_code" -lt 300 ]; then
@@ -464,6 +472,7 @@ for FILE in "${FILES[@]}"; do
464
472
  [ -n "$CHANGE_TYPE" ] && CURL_ARGS+=(-F "changeType=${CHANGE_TYPE}")
465
473
  [ -n "$GATE_STATUS" ] && CURL_ARGS+=(-F "gateStatus=${GATE_STATUS}")
466
474
  [ -n "$SDLC_STAGE" ] && CURL_ARGS+=(-F "sdlcStage=${SDLC_STAGE}")
475
+ [ -n "$TEST_CYCLE" ] && CURL_ARGS+=(-F "testCycleId=${TEST_CYCLE}")
467
476
 
468
477
  ATTEMPT=1
469
478
  BACKOFF=$INITIAL_BACKOFF_SECONDS
package/sdlc/CLAUDE.md CHANGED
@@ -25,7 +25,7 @@ Each project follows a **single owner-developer partnered with AI coding agents*
25
25
 
26
26
  - **Owner-developer** provides direction, judgment, and approval. They are accountable for the project.
27
27
  - **AI agent** (Claude Code, Windsurf, Cursor) acts as implementation partner, compliance enforcer, and reviewer. The SDLC process is enforced by the AI on every code change via drop-in rules (`sdlc/ai-rules/`).
28
- - **Branching is trunk-based** with a permanent `develop` branch no feature branches. Parallel work is handled by the AI within a single stream, not by multiple developers on separate branches.
28
+ - **Branching is GitFlow** with permanent `main` and `develop` branches plus `feature/*`, `fix/*`, and `hotfix/*` branches. See the Branching Strategy section below for details.
29
29
  - **PR reviews** are owner-reviewed with AI-assisted verification. CI provides independent, tamper-resistant evidence. The SDLC workflows and compliance gates replace traditional team ceremonies (standups, sprint planning).
30
30
  - **The AI is the second pair of eyes.** It asks which requirement a change is for, blocks implementation until planning is complete, enforces commit conventions, runs compliance gates, and guides evidence compilation.
31
31
 
@@ -47,10 +47,33 @@ All templates assume these gates: TypeScript (0 errors), SAST/Semgrep (0 high/cr
47
47
  - **Commit format:** Conventional Commits with `Co-Authored-By` tags for AI, `Ref: REQ-XXX` for tracked requirements
48
48
  - **Requirement IDs:** `REQ-XXX` format, tracked in `compliance/RTM.md`
49
49
  - **Status lifecycle:** DRAFT → IN PROGRESS → TESTED - PENDING SIGN-OFF → APPROVED - DEPLOYED
50
- - **Branching:** permanent `develop` branch, protected `main` (production), merge commits to preserve audit trail
50
+ - **Branching:** GitFlow — permanent `develop` branch, protected `main` (production), `feature/*` and `fix/*` from `develop`, `hotfix/*` from `main`, merge commits to preserve audit trail
51
51
  - **Evidence model:** local testing (comprehensive) + CI testing (independent verification, tamper-resistant)
52
52
  - **Placeholders:** Templates use `[BRACKETED_VALUES]` and `# UPDATE` markers for project-specific customization
53
53
 
54
+ ## Branching Strategy — GitFlow
55
+
56
+ This repository uses a **GitFlow** branching model. AI agents (Claude Code, Cursor, Windsurf, Gemini CLI) and human contributors must follow these rules.
57
+
58
+ ### Branch roles
59
+
60
+ | Branch | Purpose | Direct push? |
61
+ |---|---|---|
62
+ | `main` | Production — stable, tagged framework versions | **No** — PR only |
63
+ | `develop` | Integration — active work merges here | **No** — PR only |
64
+ | `feature/*` | New work — branched from `develop` | Yes (to the feature branch) |
65
+ | `fix/*` | Bug fixes — branched from `develop` | Yes (to the fix branch) |
66
+ | `hotfix/*` | Production hotfixes — branched from `main` | Yes (to the hotfix branch) |
67
+
68
+ ### AI agent rules
69
+
70
+ 1. **Never commit directly to `main` or `develop`.** Always use a `feature/`, `fix/`, or `hotfix/` branch.
71
+ 2. **Branch naming:** `feature/<issue#>-<short-slug>`, `fix/<issue#>-<short-slug>`, `hotfix/<issue#>-<short-slug>`.
72
+ 3. **Workflow:** branch from `develop` → implement → PR into `develop` → merge. Ship: PR `develop` → `main` → merge.
73
+ 4. **Conventional Commits** for all commit messages. Reference issue numbers in the body.
74
+ 5. **CI must pass on `develop`** before merging to `main`.
75
+ 6. **Merge commits** (not squash or rebase) to preserve the audit trail.
76
+
54
77
  ## When Editing These Templates
55
78
 
56
79
  - Maintain the separation between Tier 1 and Tier 2 — if content applies universally, it belongs in Tier 1; if project-specific, Tier 2.
package/sdlc/SKILLS.md CHANGED
@@ -96,7 +96,7 @@ node scripts/validate-adapter.cjs sdlc/files/_common/skills/<name>/SKILL.md
96
96
  | Skill | Location | Triggers (paraphrased) | Additional emissions |
97
97
  | ----------------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
98
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`, and the three SoT-alignment skills) |
99
+ | `sdlc-implementer` | `_common/skills/` | "implement issue #N", "fix issue #N", "do issue #N", "implement #N", "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`, and the three SoT-alignment skills) |
100
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`) |
101
101
  | `requirements-aligner` | `_common/skills/` | "align SRS for REQ-XXX", "what SRS items did this REQ need?", "is the SRS in sync with this branch?" (v0.1.42+). Auto-invoked by `sdlc-implementer` at Stage 1 plan-APPROVAL + Stage 3 evidence-pack. | Maintains `docs/SRS.md`; drops `compliance/evidence/REQ-XXX/srs-alignment.md` per cycle. |
102
102
  | `adr-author` | `_common/skills/` | "draft an ADR for REQ-XXX", "does this REQ need an ADR?", "is the architectural decision documented?" (v0.1.43+). Auto-invoked by `sdlc-implementer` at Stage 1 + Stage 3. | Maintains `docs/ADR/ADR-NNN-<slug>.md`; drops `compliance/evidence/REQ-XXX/architecture-decision.md` per cycle. Closes `ISO27001.A.8.25`. |
@@ -21,13 +21,29 @@ The default way to implement a tracked change is the **`sdlc-implementer`** skil
21
21
 
22
22
  **This is enforced, not just advised.** `feat` / `fix` / `refactor` / `perf` commits that cite no requirement (`[REQ-XXX]` in the subject or a `Ref: REQ-XXX` trailer) are **rejected** locally by the commit-msg hook (commitlint) and at PR CI by `validate-commits.sh` (which `--no-verify` cannot skip). So implementation work cannot reach `develop` without a requirement — which is also what keeps release labels correct (the version-deriver only falls back to a bare date for genuine housekeeping, never for real feature work). Housekeeping commit types remain exempt.
23
23
 
24
+ ### MANDATORY: `sdlc-implementer` prompt before implementation (devaudit-installer#199)
25
+
26
+ When the user requests implementation of an issue (e.g. "implement issue #N", "fix issue #N", "do issue #N", "implement #N"), you MUST prompt before writing any code:
27
+
28
+ > Implementing #N using sdlc-implementer, can I proceed?
29
+
30
+ Wait for the user's yes/no response. Do NOT begin implementation until they answer.
31
+
32
+ - **YES** → invoke the `sdlc-implementer` skill immediately. The skill drives Phase 0 (triage) through Phase 4 (PR + UAT review).
33
+ - **NO** → proceed with manual implementation outside the skill. The user has explicitly opted out; respect their choice and do not ask again for the same issue.
34
+
35
+ This prompt is **mandatory and structural** — it is not advisory. The `sdlc-implementer` is the default entry point; manual implementation is the explicit opt-out. Skipping the prompt and jumping straight into code is the same class of inertia-trap bug as #132 (e2e delegation bypass).
36
+
37
+ The only exception: if the user's request is clearly housekeeping ("bump a dep", "fix a typo", "update docs") and does not involve `feat`/`fix`/`refactor`/`perf` commit types, skip the prompt and proceed directly.
38
+
24
39
  ### Before ANY Code Change
25
40
 
26
- 1. Ask: "Which GitHub Issue is this for?" before writing code. Fetch it with `gh issue view NNN`.
27
- 2. If no issue exists: ask if one should be created. When creating via `gh issue create`, ALWAYS append the SDLC checklist to the body (see below).
28
- 3. If new requirement needed: read `SDLC/1-plan-requirement.md` and follow it BEFORE implementing.
29
- 4. If trivial (typo/formatting): proceed without requirement but use conventional commit format.
30
- 5. Verify `develop` branch: `git branch --show-current` never implement on `main`.
41
+ 1. If the user has NOT been prompted for `sdlc-implementer` and the change is not trivial housekeeping, stop and run the mandatory prompt above before continuing.
42
+ 2. Ask: "Which GitHub Issue is this for?" before writing code. Fetch it with `gh issue view NNN`.
43
+ 3. If no issue exists: ask if one should be created. When creating via `gh issue create`, ALWAYS append the SDLC checklist to the body (see below).
44
+ 4. If new requirement needed: read `SDLC/1-plan-requirement.md` and follow it BEFORE implementing.
45
+ 5. If trivial (typo/formatting): proceed without requirement but use conventional commit format.
46
+ 6. Verify `develop` branch: `git branch --show-current` — never implement on `main`.
31
47
 
32
48
  ### For ALL Code Changes (including bug fixes)
33
49
 
@@ -76,7 +76,7 @@ Housekeeping releases **skip** the per-requirement evidence (no REQ → no `comp
76
76
  | Release ticket | `compliance/pending-releases/RELEASE-TICKET-REQ-XXX.md` (Step 8) | `compliance/pending-releases/RELEASE-TICKET-<version>.md` (e.g. `RELEASE-TICKET-v2026.06.04.md`) | **Yes** — `generate-housekeeping-release-ticket.sh` runs after `derive-release-version.sh` and emits a stub the operator reviews + signs off |
77
77
  | Security summary | `compliance/evidence/REQ-XXX/security-summary.md` (Step 4) | `compliance/security-summary-<version>.md` at the compliance root (release-scoped, not REQ-scoped) | **Yes** — `generate-security-summary.sh` scrapes the SAST + dep-audit gate JSON and emits a stub with an operator sign-off block |
78
78
 
79
- **The portal evidence check is lenient on filename.** Any file whose name (case-insensitive) starts with `release-ticket` satisfies the release-ticket check, and any file named exactly `security-summary.md` satisfies the security-summary check. The version-suffixed conventions above are recommended for **searchability + audit trail** when a project has many housekeeping releases stacked up — they keep the artefacts distinct per release without needing folder scoping.
79
+ **Filename conventions are enforced.** Release tickets must match `RELEASE-TICKET-REQ-XXX.md` or `RELEASE-TICKET-vYYYY.MM.DD.md` exactly. Security summaries must be named `security-summary.md` exactly. The CI upload pipeline (`compliance-evidence.yml`) routes per-REQ artifacts by basename to specific `evidence_type` values unrecognized filenames are skipped with a warning (DevAudit-Installer#205). The `validate-compliance-artifacts.sh` PR-time check also warns on unrecognized filenames in `compliance/evidence/REQ-XXX/`. The version-suffixed conventions above are recommended for **searchability + audit trail** when a project has many housekeeping releases stacked up — they keep the artefacts distinct per release without needing folder scoping.
80
80
 
81
81
  **What housekeeping operators do, end to end:**
82
82
 
@@ -163,6 +163,14 @@ Records the design-time decisions before listing run results — what was tested
163
163
  | E2E Tests | PASS | [N]/[N] passed |
164
164
  | Build | PASS | Production build succeeded |
165
165
 
166
+ ## Test Cycles
167
+
168
+ | Cycle | CI Run | Gate Status | E2E Result | Coverage | Date |
169
+ |-------|--------|-------------|------------|----------|------|
170
+ | #1 | [run_id] | [PASS/FAIL] | [N/N] | [N%] | [YYYY-MM-DD] |
171
+
172
+ **Final assessment:** [All cycles passed / N cycles failed — see incidents]
173
+
166
174
  ## Test Changes in This Release
167
175
 
168
176
  **Added:**
@@ -258,6 +266,59 @@ EOF
258
266
 
259
267
  For Medium/High risk, add access control and audit log verification to the security summary.
260
268
 
269
+ ### Step 4b: Nil Incident Report (DevAudit-Installer#210 §8a)
270
+
271
+ After the test pack re-run passes, check whether any `incident`-labelled issues were closed during this REQ's lifecycle:
272
+
273
+ ```bash
274
+ gh issue list --label incident --state closed --search "REQ-XXX" --json number
275
+ ```
276
+
277
+ If **no** incidents were closed and the test pack re-run passes, generate a nil incident report — a per-release "no incidents" attestation that flips `ISO29119.3.5.4` to COVERED on the portal:
278
+
279
+ ```bash
280
+ cat > compliance/governance/nil-incident-report-<version>.md << 'EOF'
281
+ ---
282
+ incident_id: "NIL-<version>"
283
+ severity: "N/A"
284
+ detected_at: "<release date>"
285
+ resolved_at: "N/A"
286
+ status: "nil"
287
+ ---
288
+
289
+ # Nil Incident Report — <version>
290
+
291
+ ## Attestation
292
+
293
+ No incidents or defects were discovered during the test cycle for release `<version>`.
294
+
295
+ ## Scope
296
+
297
+ - **Release:** <version>
298
+ - **Test cycle:** <description>
299
+ - **Test cases executed:** <count>
300
+ - **Test cases passed:** <count>
301
+ - **Test cases failed:** 0
302
+ - **Defects filed:** 0
303
+ - **Incidents reported:** 0
304
+
305
+ ## Framework attribution
306
+
307
+ - [x] `ISO29119.3.5.4` (Test incident report — nil report for this release cycle)
308
+
309
+ ## Sign-off
310
+
311
+ | Role | Name | Date |
312
+ |---|---|---|
313
+ | Test lead | REPLACE — assign | REPLACE |
314
+ | Engineering lead | REPLACE — assign | REPLACE |
315
+ EOF
316
+ ```
317
+
318
+ Fill in the scope section with actual test counts. Leave the sign-off section with REPLACE markers — the operator fills it in. The nil report uploads as `incident_report` evidence via `compliance-evidence.yml`'s `upload_incident_report` function.
319
+
320
+ If incidents **were** closed during this REQ's lifecycle, skip nil report generation — the populated incident report(s) from `incident-export.yml` serve as the evidence.
321
+
261
322
  ### Step 5: Save AI Evidence (If Applicable)
262
323
 
263
324
  Verify `ai-use-note.md` and `ai-prompts.md` exist (if AI was used). If missing, create `ai-use-note.md` with YAML frontmatter (devaudit-installer#197):
@@ -340,7 +401,7 @@ If the AI tool changed mid-implementation (detected by the `prepare-commit-msg`
340
401
  - REQ release ticket: compliance/pending-releases/RELEASE-TICKET-REQ-XXX.md
341
402
  ```
342
403
 
343
- This file is uploaded as evidence with `evidence_type: compliance_document` and `evidence_category: ai_handoff` so the portal can query for it specifically.
404
+ This file is uploaded as evidence with `evidence_type: ai_agent_handoff` and `evidence_category: ai_governance` so the portal can query for it specifically (DevAudit-Installer#205).
344
405
 
345
406
  ### Step 6: Verify Test Scope and Implementation Plan
346
407
 
@@ -93,7 +93,7 @@ git diff origin/main..develop -- package.json | grep '^\+'
93
93
 
94
94
  ### Step 3: Create the PR
95
95
 
96
- > The `--base main --head develop` below is the develop-first default. The branches are project-configured in `sdlc-config.json` — `release_branch` (default `main`) and `integration_branch` (default `develop`); a trunk-only project sets both to `main` and opens the feature branch directly against `main`.
96
+ > The `--base main --head develop` below is the develop-first default. The branches are project-configured in `sdlc-config.json` — `release_branch` (default `main`) and `integration_branch` (default `develop`).
97
97
 
98
98
  **For tracked requirements:**
99
99
 
@@ -167,6 +167,7 @@ CI runs automatically on this PR. The following gates must pass before merge:
167
167
  - [ ] Implementation plan present and matches implementation (MEDIUM/HIGH risk)
168
168
  - [ ] Release ticket created
169
169
  - [ ] Test evidence saved
170
+ - [ ] Test execution summary includes Test Cycles section (all CI runs for this release listed)
170
171
  - [ ] Security evidence saved
171
172
  - [ ] AI use documented
172
173
 
@@ -207,6 +207,7 @@ git checkout develop
207
207
  1. **Hosting dashboard:** Redeploy previous version
208
208
  2. **Git:** `git checkout main && git revert HEAD --no-edit && git push origin main`
209
209
  3. **Document:** Add rollback entry to release ticket audit trail
210
+ 4. **Correlate with incident (DevAudit-Installer#210 §10a):** If the rollback was triggered by a post-deploy smoke failure, the `post-deploy-prod.yml` workflow files an incident issue with the `incident` label. Reference this incident in the rollback commit message (`Fixes #N` or a comment on the issue) so the incident report captures the containment action. This ensures `incident-export.yml` exports the full incident timeline including the rollback.
210
211
 
211
212
  ### Environment Summary
212
213
 
@@ -35,7 +35,7 @@ For tools, patterns, and code standards: Test Architecture.
35
35
 
36
36
  ## Branching Strategy
37
37
 
38
- Trunk-based with develop branch (per Test Strategy branching patterns):
38
+ Develop-main with develop branch (per Test Strategy branching patterns):
39
39
 
40
40
  - **`main`** — Production. Auto-deploys to hosting platform. PR approval + all checks required.
41
41
  - **`develop`** — Working branch. All implementation here. Permanent, never deleted.
@@ -256,7 +256,7 @@ Every requirement must be traceable through the complete chain: Requirement →
256
256
 
257
257
  ### Branching Strategy
258
258
 
259
- Projects may use trunk-based with integration branch or direct trunk-based flow. The specific pattern is defined in each project's Test Plan.
259
+ Projects use a develop-main branching model with a permanent integration branch (`develop`) and a protected release branch (`main`). The specific branch names are defined in each project's `sdlc-config.json`.
260
260
 
261
261
  **Universal requirements:**
262
262
 
@@ -0,0 +1,38 @@
1
+ ---
2
+ incident_id: "NIL-<version>"
3
+ severity: "N/A"
4
+ detected_at: "<release date>"
5
+ resolved_at: "N/A"
6
+ status: "nil"
7
+ ---
8
+
9
+ # Nil Incident Report — <version>
10
+
11
+ ## Attestation
12
+
13
+ No incidents or defects were discovered during the test cycle for release `<version>`.
14
+
15
+ ## Scope
16
+
17
+ - **Release:** <version>
18
+ - **Test cycle:** <description of test cycle — e.g. "E2E Regression run on <date>", "Phase 6 full suite + Phase 3 re-run">
19
+ - **Test cases executed:** <count>
20
+ - **Test cases passed:** <count>
21
+ - **Test cases failed:** 0
22
+ - **Defects filed:** 0
23
+ - **Incidents reported:** 0
24
+
25
+ ## Framework attribution
26
+
27
+ - [x] `ISO29119.3.5.4` (Test incident report — nil report for this release cycle)
28
+
29
+ ## Sign-off
30
+
31
+ | Role | Name | Date |
32
+ |---|---|---|
33
+ | Test lead | REPLACE — assign | REPLACE |
34
+ | Engineering lead | REPLACE — assign | REPLACE |
35
+
36
+ ---
37
+
38
+ _Source: Generated by `sdlc-implementer` Phase 3 when no `incident`-labelled issues were closed during this REQ's lifecycle and the test pack re-run passes. Upload as `incident_report` evidence to flip `ISO29119.3.5.4` to COVERED._
@@ -73,6 +73,19 @@ for REQ in $REQUIREMENTS; do
73
73
  fi
74
74
  echo " OK: Evidence directory exists"
75
75
 
76
+ # Check for unrecognized .md filenames in the evidence directory
77
+ # (DevAudit-Installer#205). The CI upload pipeline now skips unknown
78
+ # filenames with a warning — this check surfaces the issue at PR
79
+ # time so the operator can rename or add routing before merge.
80
+ KNOWN_ARTIFACTS="test-scope.md test-plan.md test-execution-summary.md test-summary-report.md implementation-plan.md srs-alignment.md architecture-decision.md risk-assessment.md security-summary.md ai-use-note.md ai-prompts.md ai-agent-handoff.md"
81
+ for ARTIFACT in compliance/evidence/$REQ/*.md; do
82
+ [ -f "$ARTIFACT" ] || continue
83
+ ARTIFACT_BASE=$(basename "$ARTIFACT")
84
+ if ! echo " $KNOWN_ARTIFACTS " | grep -q " $ARTIFACT_BASE "; then
85
+ echo " WARNING: Unrecognized artifact filename: compliance/evidence/$REQ/$ARTIFACT_BASE — CI upload will skip this file. Use a known filename or add routing in compliance-evidence.yml. (DevAudit-Installer#205)"
86
+ fi
87
+ done
88
+
76
89
  # Check test-scope.md exists
77
90
  if [ ! -f "compliance/evidence/$REQ/test-scope.md" ]; then
78
91
  echo " ERROR: Test scope missing: compliance/evidence/$REQ/test-scope.md"
@@ -265,7 +265,14 @@ Then bucket each failure:
265
265
  - **Visual diff — intended** — the snapshot changed because the change intentionally changed the UI. Update the baseline and surface it for user approval.
266
266
  - **Visual diff — unintended** — a snapshot changed somewhere the change shouldn't have affected. File it as a regression.
267
267
 
268
- **Then check for missed requirements.** For each numbered acceptance criterion from Phase 2, confirm at least one *passing* test covers it. An AC with no passing test — because no test was written, or because the test fails — is a missed requirement. File it.
268
+ **Then check for missed requirements.** For each numbered acceptance criterion from Phase 2, confirm at least one *passing* test covers it. **Classify each missed AC (devaudit-installer#212 Gap 4):**
269
+
270
+ - **AC not tested** (no test was written) — file a defect as today. The implementation may be correct but untested. This is a testing gap, not a requirements gap.
271
+ - **AC test fails** (test exists but fails) — file a defect as today. The implementation doesn't match the AC. This is a defect.
272
+ - **AC impossible to test** (the test can't be written because the AC is ambiguous, contradictory, or assumes behaviour the system doesn't have) — **do not file a defect**. Return a requirements gap report to `sdlc-implementer`: "AC<N> cannot be tested because <reason>. The AC itself may be wrong." `sdlc-implementer` triggers its [requirements gap flow](../sdlc-implementer/SKILL.md#requirements-gap-flow-devaudit-installer212).
273
+ - **Missing AC** (a scenario is necessary for the feature to work but no AC covers it) — **do not file a defect**. Return a requirements gap report: "Scenario <description> is necessary but not covered by any AC. A new AC may be needed." `sdlc-implementer` triggers its [requirements gap flow](../sdlc-implementer/SKILL.md#requirements-gap-flow-devaudit-installer212).
274
+
275
+ The classification is: "Is the AC correct but untested/buggy? → defect. Is the AC itself wrong/missing? → requirements gap."
269
276
 
270
277
  ### Phase 7 — Regression-pack handoff
271
278
 
@@ -338,7 +345,9 @@ This defect, once closed with the `incident` label, will be auto-exported as `in
338
345
  - [ ] `GDPR.Art-34` — data-subject notification required: <REPLACE — yes/no>
339
346
  - [ ] `EUAIA.Art-9 / Art-14 / Art-15` — AI failure: <REPLACE — yes/no, which article(s)>
340
347
 
341
- Once closed, the `incident-export.yml` workflow exports this issue's body to `compliance/governance/incident-report-<N>.md`, auto-files a PR with the GDPR triage + sign-off sections to fill in. Merge that PR → `compliance-evidence.yml` uploads as `incident_report`.
348
+ Once closed, the `incident-export.yml` workflow exports this issue's body to `compliance/governance/incident-report-<N>.md`. Routing depends on the Framework attribution ticks (DevAudit-Installer#200 Fix 1):
349
+ - **Path A (baseline-only — only `ISO29119.3.5.4` ticked):** direct-committed to `develop`, no PR. GDPR triage pre-filled as N/A. Next `compliance-evidence.yml` run uploads as `incident_report`.
350
+ - **Path B (any of SOC2/GDPR/EUAIA ticked):** auto-files a PR with the GDPR triage + sign-off sections to fill in. Merge that PR → `compliance-evidence.yml` uploads as `incident_report`.
342
351
  ```
343
352
 
344
353
  Pre-tick boxes you're confident about. Leave the operator-judgement ones (GDPR triage, AI-failure classification) for the operator to confirm in the export PR.
@@ -375,6 +384,7 @@ Wrap up with a summary the user can drop into the PR or ticket:
375
384
  - Tests deleted — count, with rationale.
376
385
  - Suite result — passing, failing, flaky.
377
386
  - Defects filed — count, with links.
387
+ - Requirements gap reports — count, with details (devaudit-installer#212 Gap 4). These are ACs classified as "impossible to test" or "missing AC" — returned to `sdlc-implementer` for the requirements gap flow, not filed as defects.
378
388
  - Missed requirements — count, with links.
379
389
 
380
390
  **Then feed the test-design record (devaudit#50).** The Stage 3 `test-execution-summary.md` (generated per `3-compile-evidence.md` Step 1a) carries a `## Test design` section at the top. Before Stage 3 finalises the file, populate that section with the design-time decisions this skill made, so the SDLC has a recorded trace that scope was *decided*, not implicit:
@@ -132,7 +132,12 @@ I have reviewed the AC-to-SRS-item traces above and confirm:
132
132
 
133
133
  **Step 2 — Tag for upload.** The CI's `compliance-evidence.yml` uploads this file as `evidence_type=srs_alignment` (added to META-COMPLY's `EVIDENCE_TYPE_REGISTRY` in the paired sub-PR). The framework-coverage matrix then closes `ISO29119.3.4` (Test Plan — requirements traceability) and `SOC2.CC2.1` (Communication of policies — when paired with INSTRUCTIONS.md) for this REQ.
134
134
 
135
- **Step 3 — Return to the running `sdlc-implementer` context.** The skill's job ends at the artefact + the operator sign-off. The orchestrator immediately continues with the rest of Stage 3 (security summary, evidence upload, release ticket) inline — no pause, no operator nudge needed. (Skills run in the same invocation context; control returns synchronously when this skill exits. See `sdlc-implementer/SKILL.md` § *Sub-skill return semantics*.)
135
+ **Step 3 — Return gap status to the running `sdlc-implementer` context (devaudit-installer#212 Gap 3).** In addition to producing the artefact, the skill returns a **gap status** to `sdlc-implementer`:
136
+
137
+ - `CLEAN` — all ACs trace to SRS items, no unresolved drift. The orchestrator continues with the rest of Stage 3.
138
+ - `GAPS_FOUND` — one or more ACs don't trace to SRS items, or drift is unresolved (no `@srs-deferred` annotation). Return the gap details (which ACs, what's missing). The orchestrator handles the gap per its [requirements gap flow](../sdlc-implementer/SKILL.md#requirements-gap-flow-devaudit-installer212): if `block_on_stage_3: true`, halt for the operator to resolve; if false, warn and continue.
139
+
140
+ The `block_on_stage_3` check verifies **artefact content** (no unresolved gaps without `@srs-deferred`), not just artefact existence. A `srs-alignment.md` with unresolved gaps and no `@srs-deferred` annotations fails the block. (Skills run in the same invocation context; control returns synchronously when this skill exits. See `sdlc-implementer/SKILL.md` § *Sub-skill return semantics*.)
136
141
 
137
142
  ### Phase 3 — Per-REQ ad-hoc audit
138
143