@metasession.co/devaudit-cli 0.1.41 → 0.1.43
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/files/_common/1-plan-requirement.md +4 -2
- package/sdlc/files/_common/3-compile-evidence.md +14 -0
- package/sdlc/files/_common/Implementation_Plan_TEMPLATE.md +30 -9
- package/sdlc/files/_common/skills/adr-author/SKILL.md +266 -0
- package/sdlc/files/_common/skills/requirements-aligner/SKILL.md +192 -0
- package/sdlc/files/_common/skills/sdlc-implementer/SKILL.md +15 -9
- package/sdlc/files/ci/compliance-evidence.yml.template +12 -0
- package/sdlc/files/sdlc-config.example.json +22 -0
|
@@ -160,9 +160,11 @@ Reached only on the **tracked** route from Phase 0 (the issue is already fetched
|
|
|
160
160
|
For HIGH/CRITICAL also include: threat model (against STRIDE categories applicable to the touched surfaces), four-eyes attestation slot, rollback plan — the template has slots for all of these.
|
|
161
161
|
|
|
162
162
|
**Don't delete sections** — mark with `N/A — <reason>` if a clause genuinely doesn't apply (e.g. UI-only change with no personal-data scope). Empty stubs commit-then-upload as placeholder evidence and break the audit trail.
|
|
163
|
-
6. **
|
|
164
|
-
7. **
|
|
165
|
-
8. **
|
|
163
|
+
6. **Invoke `requirements-aligner` to populate the SRS-ID column on the AC table.** The plan's "Acceptance criteria" table carries an SRS-ID column per AC; `requirements-aligner` fuzzy-matches each AC against `docs/SRS.md` and proposes new `REQ-AREA-NNN` stubs, flags stale items, or annotates `@srs-deferred`. Don't author the SRS-ID column inline — call via the standard Claude Code Skill mechanism (`Skill(name: "requirements-aligner", …)`). Block plan APPROVAL until every AC has a resolved SRS-ID per the skill's Phase 1 contract (configurable via `sdlc-config.json:requirements_aligner.block_on_stage_1`; ramp-up mode default-on for legacy projects).
|
|
164
|
+
7. **Invoke `adr-author` to decide ADR-worthiness + draft the ADR if needed.** The plan's "Architecture decisions" section is no longer authored inline as bullets — `adr-author` applies its decision tree (new third-party dependency / new database/cache/queue / new external service / pattern change spanning >3 files / HIGH-CRITICAL risk class / file-path signals from `sdlc-config.json:adr_author.file_paths_signal_architecture`), allocates the next `ADR-NNN`, drafts a Context/Decision/Consequences/Alternatives/Status stub at `docs/ADR/ADR-NNN-<slug>.md`, and injects either *"Produced ADR-NNN: <title>"* or *"No ADR needed — <rationale>"* into the plan's section. Call via the standard Claude Code Skill mechanism (`Skill(name: "adr-author", …)`). Configurable via `sdlc-config.json:adr_author.block_on_stage_1`; advisory by default in v1.
|
|
165
|
+
8. **Update `compliance/RTM.md`** with the new entry: REQ-XXX, title, risk class, linked issue, linked test cases (placeholder).
|
|
166
|
+
9. **Post plan summary as an issue comment.** Format: TL;DR; Risk class + signals; Acceptance criteria (with SRS-IDs); Architectural decisions (ADR-NNN reference or no-ADR rationale); Technical approach (one paragraph); Dependencies; Test scope.
|
|
167
|
+
10. **Checkpoint** — pause for human approval **iff** risk class is HIGH or CRITICAL. LOW and MEDIUM pass through to Phase 2 automatically. The checkpoint can be forced on for all classes via the `--require-plan-approval` flag (or `DEVAUDIT_REQUIRE_PLAN_APPROVAL=1` env var) for orgs that want it always-on.
|
|
166
168
|
|
|
167
169
|
### Phase 2 — Implement and test (SDLC stage 2)
|
|
168
170
|
|
|
@@ -193,12 +195,16 @@ Reached only on the **tracked** route from Phase 0 (the issue is already fetched
|
|
|
193
195
|
|
|
194
196
|
### Phase 3 — Compile evidence (SDLC stage 3)
|
|
195
197
|
|
|
196
|
-
1. **
|
|
198
|
+
1. **Invoke `requirements-aligner` to drop the per-REQ SRS-alignment artefact.** The skill's Phase 2 produces `compliance/evidence/REQ-XXX/srs-alignment.md` — the per-REQ trace from each AC to its SRS item, with an operator sign-off block. The artefact uploads with `evidence_type=srs_alignment` (visible in Documents tab + audit-pack export; v1 orphan-by-design per META-COMPLY framework-registry-auditor). Call via the standard Skill mechanism; don't inline the alignment logic.
|
|
199
|
+
2. **Invoke `adr-author` to drop the per-REQ architecture-decision artefact.** The skill's Phase 2 produces `compliance/evidence/REQ-XXX/architecture-decision.md` — either *"Produced ADR-NNN: <title>"* with the file pointer, or *"No ADR needed — <rationale>"*. Operator sign-off block at the bottom. The artefact uploads with `evidence_type=architecture_decision`; clause attribution per the META-COMPLY framework-registry-auditor review. Call via the standard Skill mechanism.
|
|
200
|
+
3. **Re-run the full test pack** with artefact capture:
|
|
197
201
|
- `npm run test:e2e -- --reporter=html` (produces `playwright-report/`)
|
|
198
202
|
- `npx vitest run --coverage` (produces `coverage/`)
|
|
199
|
-
|
|
203
|
+
4. **Organise artefacts** under `compliance/evidence/REQ-XXX/` with date-prefixed naming:
|
|
200
204
|
```
|
|
201
205
|
compliance/evidence/REQ-XXX/
|
|
206
|
+
├── srs-alignment.md ← produced in step 1 by requirements-aligner
|
|
207
|
+
├── architecture-decision.md ← produced in step 2 by adr-author
|
|
202
208
|
├── YYYY-MM-DD_e2e-results.json
|
|
203
209
|
├── YYYY-MM-DD_playwright-report/
|
|
204
210
|
├── YYYY-MM-DD_traces/ ← per-test trace.zip + error-context.md
|
|
@@ -207,7 +213,7 @@ Reached only on the **tracked** route from Phase 0 (the issue is already fetched
|
|
|
207
213
|
```
|
|
208
214
|
|
|
209
215
|
Copy Playwright's `test-results/` folder verbatim into `YYYY-MM-DD_traces/` so trace-by-test-name is available for audit without walking the HTML report's hash-name index. For HIGH/CRITICAL releases the traces are part of the audit trail — *"what state was the page in when test X failed and was overridden?"* answers in one `ls` instead of an HTML-report walk.
|
|
210
|
-
|
|
216
|
+
5. **Upload each artefact to the portal**:
|
|
211
217
|
```bash
|
|
212
218
|
devaudit push <project-slug> REQ-XXX <evidence-type> <file> \
|
|
213
219
|
--release "v$(date +%Y.%m.%d)" --create-release-if-missing \
|
|
@@ -215,9 +221,9 @@ Reached only on the **tracked** route from Phase 0 (the issue is already fetched
|
|
|
215
221
|
--git-sha "$(git rev-parse HEAD)" \
|
|
216
222
|
--branch "$(git rev-parse --abbrev-ref HEAD)"
|
|
217
223
|
```
|
|
218
|
-
Evidence types: `screenshot`, `e2e_result`, `test_report`, `audit_log`, `compliance_document`, `manual_upload
|
|
219
|
-
|
|
220
|
-
|
|
224
|
+
Evidence types: `screenshot`, `e2e_result`, `test_report`, `audit_log`, `compliance_document`, `manual_upload`, `srs_alignment` (from step 1), `architecture_decision` (from step 2).
|
|
225
|
+
6. **Verify uploads landed.** `gh api` or `curl` against `https://devaudit.metasession.co/projects/<slug>/requirements/REQ-XXX/evidence` should show every artefact.
|
|
226
|
+
7. **Update `compliance/RTM.md`** with portal links for each evidence row.
|
|
221
227
|
|
|
222
228
|
### Phase 4 — Submit for UAT review (SDLC stage 4)
|
|
223
229
|
|
|
@@ -34,6 +34,18 @@ jobs:
|
|
|
34
34
|
upload-compliance-evidence:
|
|
35
35
|
name: Upload Compliance Evidence
|
|
36
36
|
runs-on: {{RUNNER}}
|
|
37
|
+
# Permissions are needed because the "Auto-generate housekeeping stubs"
|
|
38
|
+
# step pushes a new branch + opens a PR via `gh pr create` when the
|
|
39
|
+
# current push triggers a housekeeping release (vYYYY.MM.DD) that
|
|
40
|
+
# doesn't yet have its stub release-ticket on disk. Without these
|
|
41
|
+
# the github-actions[bot] token gets HTTP 403 on the push + on the PR
|
|
42
|
+
# create, and the auto-housekeeping path silently leaves a red badge
|
|
43
|
+
# on every docs-only / chore push. DEVAUDIT_USER_TOKEN remains optional
|
|
44
|
+
# for orgs with restricted Actions permissions — but is no longer
|
|
45
|
+
# required for the default-config flow. See DevAudit-Installer#122.
|
|
46
|
+
permissions:
|
|
47
|
+
contents: write # push the auto-PR branch
|
|
48
|
+
pull-requests: write # gh pr create
|
|
37
49
|
env:
|
|
38
50
|
DEVAUDIT_BASE_URL_VAR: ${{ vars.DEVAUDIT_BASE_URL }}
|
|
39
51
|
DEVAUDIT_API_KEY: ${{ secrets.DEVAUDIT_API_KEY }}
|
|
@@ -84,5 +84,27 @@
|
|
|
84
84
|
"production_review": {
|
|
85
85
|
"enabled": true,
|
|
86
86
|
"terminal_status": "prod_review"
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
"_comment_requirements_aligner": "requirements-aligner skill toggles (DevAudit-Installer#119, v0.1.42+). Controls when the skill blocks vs advises. block_on_stage_1=false (default) means the skill advises on AC-to-SRS mapping at plan APPROVAL but doesn't block; flip to true once docs/SRS.md is populated enough for the check to be reliably surfacing real drift (not false-positives on sparse SoT). block_on_stage_3=true means the per-REQ srs-alignment.md artefact is required before Stage 3 completes — the per-REQ evidence is the hard gate. auto_file_followup_issue=false means the skill never opens GitHub issues automatically; if gaps are detected and operator defers, operator files follow-up manually. ramp_up_runs=5 means the first 5 invocations on a project are audit-only regardless of block_on_stage_1, so legacy projects with sparse SRS get time to populate before blocking enforces.",
|
|
90
|
+
"requirements_aligner": {
|
|
91
|
+
"enabled": true,
|
|
92
|
+
"block_on_stage_1": false,
|
|
93
|
+
"block_on_stage_3": true,
|
|
94
|
+
"auto_file_followup_issue": false,
|
|
95
|
+
"ramp_up_runs": 5
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
"_comment_adr_author": "adr-author skill toggles (DevAudit-Installer#120, v0.1.43+). The skill applies a decision tree at Stage 1 plan APPROVAL to judge ADR-worthiness, drafts docs/ADR/ADR-NNN-<slug>.md when warranted, and drops compliance/evidence/REQ-XXX/architecture-decision.md at Stage 3. block_on_stage_1=false (default) means advisory-with-strong-recommend in v1; flip to true once the project's calibrated on the heuristic. block_on_stage_3=true means the per-REQ architecture-decision.md artefact is the hard gate. file_paths_signal_architecture lists path prefixes that should trigger an ADR-worthy verdict when touched — defaults cover lib/services/, lib/repositories/, prisma/schema.prisma, infra/; add project-specific load-bearing paths.",
|
|
99
|
+
"adr_author": {
|
|
100
|
+
"enabled": true,
|
|
101
|
+
"block_on_stage_1": false,
|
|
102
|
+
"block_on_stage_3": true,
|
|
103
|
+
"file_paths_signal_architecture": [
|
|
104
|
+
"lib/services/",
|
|
105
|
+
"lib/repositories/",
|
|
106
|
+
"prisma/schema.prisma",
|
|
107
|
+
"infra/"
|
|
108
|
+
]
|
|
87
109
|
}
|
|
88
110
|
}
|