@metasession.co/devaudit-cli 0.3.11 → 0.3.13

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 (68) hide show
  1. package/dist/index.js +94 -6
  2. package/dist/index.js.map +1 -1
  3. package/package.json +2 -2
  4. package/scripts/upload-evidence.sh +55 -1
  5. package/sdlc/ai-rules/SDLC_RULES.md +27 -7
  6. package/sdlc/files/_common/0-project-setup.md +13 -7
  7. package/sdlc/files/_common/Periodic_Security_Review_Schedule.md +5 -5
  8. package/sdlc/files/_common/README_TEMPLATE.md +8 -8
  9. package/sdlc/files/_common/Test_Architecture.md +15 -15
  10. package/sdlc/files/_common/Test_Plan_TEMPLATE.md +13 -13
  11. package/sdlc/files/_common/Test_Policy.md +2 -2
  12. package/sdlc/files/_common/Test_Strategy.md +10 -10
  13. package/sdlc/files/_common/governance/ai-disclosure.md.template +3 -3
  14. package/sdlc/files/_common/governance/dpia.md.template +3 -3
  15. package/sdlc/files/_common/governance/incident-report.md.template +3 -3
  16. package/sdlc/files/_common/governance/nil-incident-report.md.template +1 -1
  17. package/sdlc/files/_common/governance/periodic-review.md.template +3 -3
  18. package/sdlc/files/_common/governance/risk-register.md.template +1 -1
  19. package/sdlc/files/_common/governance/ropa.md.template +2 -2
  20. package/sdlc/files/_common/joining-an-existing-project.md +4 -4
  21. package/sdlc/files/_common/scripts/check-host-deployment.sh +107 -0
  22. package/sdlc/files/_common/scripts/check-host-deployment.test.sh +119 -0
  23. package/sdlc/files/_common/scripts/check-release-pr-scope.sh +95 -0
  24. package/sdlc/files/_common/scripts/check-release-pr-scope.test.sh +137 -0
  25. package/sdlc/files/_common/scripts/close-out-release.sh +175 -54
  26. package/sdlc/files/_common/scripts/close-out-release.test.sh +90 -0
  27. package/sdlc/files/_common/scripts/extract-release-metadata.sh +65 -0
  28. package/sdlc/files/_common/scripts/extract-release-metadata.test.sh +38 -0
  29. package/sdlc/files/_common/scripts/generate-bundled-changes.sh +307 -58
  30. package/sdlc/files/_common/scripts/generate-bundled-changes.test.sh +128 -78
  31. package/sdlc/files/_common/scripts/generate-housekeeping-release-ticket.sh +18 -9
  32. package/sdlc/files/_common/scripts/generate-housekeeping-release-ticket.test.sh +66 -0
  33. package/sdlc/files/_common/scripts/generate-security-summary.sh +14 -5
  34. package/sdlc/files/_common/scripts/generate-security-summary.test.sh +57 -0
  35. package/sdlc/files/_common/scripts/prepare-release-pr.sh +44 -4
  36. package/sdlc/files/_common/scripts/render-test-cycles.sh +227 -0
  37. package/sdlc/files/_common/scripts/render-test-cycles.test.sh +107 -0
  38. package/sdlc/files/_common/scripts/report-test-cycle.sh +344 -0
  39. package/sdlc/files/_common/scripts/submit-bundle-manifest.sh +100 -0
  40. package/sdlc/files/_common/scripts/submit-bundle-manifest.test.sh +138 -0
  41. package/sdlc/files/_common/scripts/upload-evidence.sh +55 -1
  42. package/sdlc/files/_common/scripts/upload-evidence.test.sh +119 -0
  43. package/sdlc/files/_common/scripts/validate-compliance-artifacts.sh +169 -2
  44. package/sdlc/files/_common/scripts/validate-compliance-artifacts.test.sh +169 -0
  45. package/sdlc/files/_common/scripts/validate-test-summary.test.sh +4 -4
  46. package/sdlc/files/_common/skills/adr-author/SKILL.md +2 -2
  47. package/sdlc/files/_common/skills/e2e-test-engineer/SKILL.md +2 -2
  48. package/sdlc/files/_common/skills/e2e-test-engineer/references/bootstrap.md +5 -5
  49. package/sdlc/files/_common/skills/governance-doc-author/references/incident-classification.md +1 -1
  50. package/sdlc/files/_common/skills/requirements-aligner/SKILL.md +4 -4
  51. package/sdlc/files/_common/skills/sdlc-implementer/SKILL.md +57 -3
  52. package/sdlc/files/_common/skills/sdlc-implementer/references/change-request-loop.md +1 -1
  53. package/sdlc/files/_common/skills/sdlc-implementer/references/compliance-constraints.md +7 -14
  54. package/sdlc/files/ci/check-release-approval.yml.template +18 -28
  55. package/sdlc/files/ci/ci.yml.template +95 -35
  56. package/sdlc/files/ci/close-out-release.yml.template +7 -4
  57. package/sdlc/files/ci/compliance-evidence.yml.template +234 -49
  58. package/sdlc/files/ci/feature-e2e.yml.template +84 -1
  59. package/sdlc/files/ci/post-deploy-prod.yml.template +59 -4
  60. package/sdlc/files/ci/python/ci.yml.template +60 -12
  61. package/sdlc/files/ci/quality-gates-provenance.yml.template +123 -28
  62. package/sdlc/package.json +1 -1
  63. package/sdlc/src/bin/devaudit-sdlc.js +44 -2
  64. package/sdlc/src/blueprints/1-plan-requirement.raw.md +6 -1
  65. package/sdlc/src/blueprints/2-implement-and-test.raw.md +1 -1
  66. package/sdlc/src/blueprints/3-compile-evidence.raw.md +102 -20
  67. package/sdlc/src/blueprints/4-submit-for-review.raw.md +3 -3
  68. package/sdlc/src/blueprints/5-deploy-main.raw.md +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metasession.co/devaudit-cli",
3
- "version": "0.3.11",
3
+ "version": "0.3.13",
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.3.11",
36
+ "@metasession.co/devaudit-plugin-sdk": "^0.3.13",
37
37
  "ajv": "^8.20.0",
38
38
  "commander": "^12.1.0",
39
39
  "consola": "^3.2.3",
@@ -47,6 +47,14 @@
47
47
  # portal group evidence by test cycle per
48
48
  # ISO/IEC/IEEE 29119-3. Optional — older
49
49
  # portals ignore the field (no error).
50
+ # --evidence-scope <scope> Evidence ownership scope: release | stage |
51
+ # cycle | approval. Forwarded as
52
+ # `evidenceScope`; optional and ignored by
53
+ # older portals.
54
+ # --test-cycle-record-id <id> First-class portal cycle UUID. Requires
55
+ # `--evidence-scope cycle`. Forwarded as
56
+ # `testCycleRecordId`; preserved alongside
57
+ # legacy `--test-cycle` during dual-write.
50
58
  #
51
59
  # Required environment variables:
52
60
  # DEVAUDIT_BASE_URL e.g. https://meta-comply-production.up.railway.app
@@ -98,6 +106,10 @@ CHANGE_TYPE=""
98
106
  GATE_STATUS=""
99
107
  SDLC_STAGE=""
100
108
  TEST_CYCLE=""
109
+ EVIDENCE_SCOPE=""
110
+ TEST_CYCLE_RECORD_ID=""
111
+ SENTINEL_CONTENT=""
112
+ COMMIT_TIMESTAMP=""
101
113
  # Repeatable `--meta-key key=value` accumulator. Each pair gets merged
102
114
  # into the metadata JSON sent to the portal. Used by the screenshot
103
115
  # upload loop to pass `origin=feature|regression` from the per-PNG
@@ -125,6 +137,8 @@ while [ "$#" -gt 0 ]; do
125
137
  --gate-status) GATE_STATUS="$2"; shift 2 ;;
126
138
  --sdlc-stage) SDLC_STAGE="$2"; shift 2 ;;
127
139
  --test-cycle) TEST_CYCLE="$2"; shift 2 ;;
140
+ --evidence-scope) EVIDENCE_SCOPE="$2"; shift 2 ;;
141
+ --test-cycle-record-id) TEST_CYCLE_RECORD_ID="$2"; shift 2 ;;
128
142
  # --meta-key key=value (repeatable). Merged into the metadata JSON
129
143
  # before posting. Validates the `key=value` shape; rejects bare
130
144
  # keys without `=`.
@@ -152,6 +166,14 @@ if [ -n "$SDLC_STAGE" ] && ! [[ "$SDLC_STAGE" =~ ^[1-5]$ ]]; then
152
166
  echo "Error: --sdlc-stage must be an integer 1-5 (got: $SDLC_STAGE)"
153
167
  exit 1
154
168
  fi
169
+ if [ -n "$EVIDENCE_SCOPE" ] && ! [[ "$EVIDENCE_SCOPE" =~ ^(release|stage|cycle|approval)$ ]]; then
170
+ echo "Error: --evidence-scope must be one of: release, stage, cycle, approval"
171
+ exit 1
172
+ fi
173
+ if [ -n "$TEST_CYCLE_RECORD_ID" ] && [ "$EVIDENCE_SCOPE" != "cycle" ]; then
174
+ echo "Error: --test-cycle-record-id requires --evidence-scope cycle"
175
+ exit 1
176
+ fi
155
177
 
156
178
  if [ -z "${DEVAUDIT_BASE_URL:-}" ]; then
157
179
  echo "Error: DEVAUDIT_BASE_URL environment variable is required"
@@ -202,6 +224,28 @@ probe_base_url_drift() {
202
224
  }
203
225
  probe_base_url_drift
204
226
 
227
+ is_tracked_change_type() {
228
+ case "${1:-}" in
229
+ feat|fix|refactor|perf|compliance|revert) return 0 ;;
230
+ *) return 1 ;;
231
+ esac
232
+ }
233
+
234
+ resolve_sentinel_context() {
235
+ if ! is_tracked_change_type "$CHANGE_TYPE"; then
236
+ return 0
237
+ fi
238
+ if [ -f ".sdlc-implementer-invoked" ]; then
239
+ SENTINEL_CONTENT=$(cat .sdlc-implementer-invoked)
240
+ fi
241
+ local git_target="HEAD"
242
+ if [ -n "$GIT_SHA" ]; then
243
+ git_target="$GIT_SHA"
244
+ fi
245
+ COMMIT_TIMESTAMP=$(git show -s --format=%cI "$git_target" 2>/dev/null || true)
246
+ }
247
+ resolve_sentinel_context
248
+
205
249
  # --- Build metadata JSON ---
206
250
  # Assemble entries first; only emit `{ ... }` if at least one field is
207
251
  # set. Each entry is a `"key":"value"` JSON pair with the value
@@ -213,6 +257,7 @@ META_ENTRIES=()
213
257
  [ -n "$GIT_SHA" ] && META_ENTRIES+=("\"gitSha\":\"$(json_escape "$GIT_SHA")\"")
214
258
  [ -n "$CI_RUN_ID" ] && META_ENTRIES+=("\"ciRunId\":\"$(json_escape "$CI_RUN_ID")\"")
215
259
  [ -n "$BRANCH" ] && META_ENTRIES+=("\"branch\":\"$(json_escape "$BRANCH")\"")
260
+ [ -n "$COMMIT_TIMESTAMP" ] && META_ENTRIES+=("\"commitTimestamp\":\"$(json_escape "$COMMIT_TIMESTAMP")\"")
216
261
  for KV in "${META_KEYS[@]}"; do
217
262
  KEY="${KV%%=*}"
218
263
  VAL="${KV#*=}"
@@ -337,8 +382,13 @@ upload_presigned() {
337
382
  \"evidenceCategory\": \"${EVIDENCE_CATEGORY}\",
338
383
  \"releaseTitle\": \"${RELEASE_TITLE}\",
339
384
  \"releaseSummary\": \"${RELEASE_SUMMARY}\",
385
+ \"changeType\": \"${CHANGE_TYPE}\",
340
386
  \"sdlcStage\": \"${SDLC_STAGE}\",
341
- \"testCycleId\": \"${TEST_CYCLE}\"
387
+ \"testCycleId\": \"${TEST_CYCLE}\",
388
+ \"evidenceScope\": \"${EVIDENCE_SCOPE}\",
389
+ \"testCycleRecordId\": \"${TEST_CYCLE_RECORD_ID}\",
390
+ \"sentinelContent\": $(jq -Rn --arg v "$SENTINEL_CONTENT" '$v'),
391
+ \"commitTimestamp\": \"${COMMIT_TIMESTAMP}\"
342
392
  }") || curl_exit=$?
343
393
  curl_exit=${curl_exit:-0}
344
394
  if [ "$curl_exit" -eq 0 ] && [ "$http_code" -ge 200 ] && [ "$http_code" -lt 300 ]; then
@@ -503,6 +553,10 @@ for FILE in "${FILES[@]}"; do
503
553
  [ -n "$GATE_STATUS" ] && CURL_ARGS+=(-F "gateStatus=${GATE_STATUS}")
504
554
  [ -n "$SDLC_STAGE" ] && CURL_ARGS+=(-F "sdlcStage=${SDLC_STAGE}")
505
555
  [ -n "$TEST_CYCLE" ] && CURL_ARGS+=(-F "testCycleId=${TEST_CYCLE}")
556
+ [ -n "$EVIDENCE_SCOPE" ] && CURL_ARGS+=(-F "evidenceScope=${EVIDENCE_SCOPE}")
557
+ [ -n "$TEST_CYCLE_RECORD_ID" ] && CURL_ARGS+=(-F "testCycleRecordId=${TEST_CYCLE_RECORD_ID}")
558
+ [ -n "$SENTINEL_CONTENT" ] && CURL_ARGS+=(-F "sentinelContent=${SENTINEL_CONTENT}")
559
+ [ -n "$COMMIT_TIMESTAMP" ] && CURL_ARGS+=(-F "commitTimestamp=${COMMIT_TIMESTAMP}")
506
560
 
507
561
  ATTEMPT=1
508
562
  BACKOFF=$INITIAL_BACKOFF_SECONDS
@@ -412,6 +412,16 @@ When the user says implementation is done, or when all acceptance criteria from
412
412
 
413
413
  After gates pass, create `compliance/evidence/REQ-XXX/test-execution-summary.md` documenting gate results, test changes, and coverage against the test plan. Include links to evidence locations in DevAudit.
414
414
 
415
+ If `compliance/pending-releases/BUNDLED-CHANGES-REQ-XXX.md` exists, add a `## Bundled Release Context` section to `test-execution-summary.md` with this minimum structure:
416
+ - `**Core tracked release:**`
417
+ - `**Absorbed predecessor releases:**`
418
+ - `**Absorbed non-release work:**`
419
+ - `**Why bundled here:**`
420
+ - `**Evidence impact:**`
421
+ - `**Reviewer impact:**`
422
+ - `**Security / risk impact:**`
423
+ - `**Reference:**`
424
+
415
425
  Tell the user: **"All gates passed. Let me generate the test execution summary."**
416
426
 
417
427
  ### Step 2: Upload binary/JSON evidence to DevAudit
@@ -457,6 +467,8 @@ Dependency audit: 0 vulnerabilities
457
467
  Evidence uploaded to DevAudit project: [PROJECT_SLUG]
458
468
  ```
459
469
 
470
+ If `BUNDLED-CHANGES-REQ-XXX.md` exists, add the same structured bundled-release fields to `security-summary.md` and to `ai-use-note.md` (when present), and add `## Bundled Changes` or `## Absorbed Predecessor Releases` to the release ticket with the same minimum fields. The GitHub PR body is supporting context, not the primary audit record.
471
+
460
472
  Verify these also exist in git:
461
473
  - `compliance/evidence/REQ-XXX/test-scope.md` (from planning)
462
474
  - `compliance/evidence/REQ-XXX/implementation-plan.md` (MEDIUM/HIGH risk — from implementation plan step)
@@ -484,9 +496,9 @@ When creating the PR, include:
484
496
  - A **"Test Changes"** section listing test files added/modified, what they cover, and what's NOT covered
485
497
  - A **"Where to Find Test Results"** section pointing reviewers to: CI status icons on commits, automated E2E comment, DevAudit portal link, and compliance evidence files in the PR
486
498
 
487
- ### Step 6: Commit compliance markdown only (do NOT push yet)
499
+ ### Step 6: Commit compliance markdown and push immediately
488
500
 
489
- Commit locally but **do not push**. UAT verification runs against the prior deployment. We batch all compliance + UAT commits into a single push after Step 7 to avoid duplicate CI runs.
501
+ Commit the compliance markdown and **push immediately**. The compliance-only push is cheap, and it is the authoritative trigger for the Compliance Evidence Upload workflow. Pushing now surfaces destination/configuration failures before you waste time on later review steps.
490
502
 
491
503
  ```bash
492
504
  # ONLY commit markdown — binary/JSON evidence is in DevAudit
@@ -508,7 +520,15 @@ Co-Authored-By: [AI tool tag]"
508
520
 
509
521
  **NEVER `git add` JSON, TXT, HTML, PNG, or JPG evidence files. They belong in DevAudit.**
510
522
 
511
- ### Step 7: WAIT CHECKPOINT UAT Verification (if UAT configured)
523
+ ### Step 7: Wait for the Compliance Evidence Upload workflow
524
+
525
+ ```bash
526
+ gh run watch --workflow "Compliance Evidence Upload"
527
+ ```
528
+
529
+ If it fails, fix the upload/configuration problem before proceeding. The portal's Test Reports gate stays red until the authoritative `develop` upload lands, even if `test-execution-summary.md` already exists on a feature branch.
530
+
531
+ ### Step 8: WAIT CHECKPOINT — UAT Verification (if UAT configured)
512
532
 
513
533
  If the project has a UAT environment that auto-deploys from `develop`, verify the change works on UAT before creating a PR.
514
534
 
@@ -547,17 +567,17 @@ Co-Authored-By: [AI tool tag]"
547
567
 
548
568
  **If UAT fails:** Fix on `develop`, re-run local gates, push, and repeat. Do NOT create a PR until UAT is green.
549
569
 
550
- ### Step 8: Push all compliance commits
570
+ ### Step 9: Push any UAT-result follow-up commit
551
571
 
552
- Push all batched commits (evidence + UAT results) in a single push. This triggers one CI run instead of multiple.
572
+ If Step 8 added a UAT verification note to `security-summary.md`, push that follow-up commit now.
553
573
 
554
574
  ```bash
555
575
  git push origin develop
556
576
  ```
557
577
 
558
- Tell the user: **"UAT verification passed. Compliance commits pushed. Next step: create a PR from develop to main."**
578
+ Tell the user: **"UAT verification passed. Compliance evidence is on the portal. Next step: create a PR from develop to main."**
559
579
 
560
- ### Step 9: Verify release exists in DevAudit
580
+ ### Step 10: Verify release exists in DevAudit
561
581
 
562
582
  CI auto-creates releases when uploading evidence (using `--create-release-if-missing`). After pushing, verify the release appears in DevAudit:
563
583
 
@@ -22,11 +22,11 @@ This guide configures a new project so that the five pipeline workflows can run
22
22
 
23
23
  ## Fast path (recommended): `devaudit install`
24
24
 
25
- The DevAudit CLI (`@metasession.co/devaudit-cli`) automates almost all of this guide. It writes `sdlc-config.json`, creates the DevAudit project, issues an API key, sets the GitHub secrets and variables, installs the hook framework, configures branch protection, and syncs the framework templates (CI workflows, hooks, scripts) in roughly 30 seconds.
25
+ The DevAudit CLI (`@metasession.co/devaudit-cli`) automates almost all of this guide. It writes `sdlc-config.json`, creates the DevAudit project, issues an API key, sets the GitHub secrets and variables, installs the hook framework, configures branch protection, and syncs the framework templates (CI workflows, hooks, scripts). The command starts in seconds; the full operator onboarding flow usually takes about 5-10 minutes.
26
26
 
27
27
  ```bash
28
28
  npm install -g @metasession.co/devaudit-cli # requires Node >= 22
29
- devaudit auth login # paste your PAT (issued at https://devaudit.metasession.co/settings/tokens)
29
+ devaudit auth login # paste your PAT (issued at https://devaudit.ai/settings/tokens)
30
30
  devaudit install ../path/to/this-project
31
31
  ```
32
32
 
@@ -108,12 +108,12 @@ cat > compliance/RTM.md << 'EOF'
108
108
  ## Part A: Baseline Requirements
109
109
 
110
110
  | ID | Requirement | Source | Status |
111
- |---|---|---|---|
111
+ | --- | --- | --- | --- |
112
112
 
113
113
  ## Part B: Change Request Traceability
114
114
 
115
- | REQ-ID | Issue | Risk | Evidence | Status | Approver | Date |
116
- |---|---|---|---|---|---|---|
115
+ | REQ-ID | Issue | Risk | Evidence | Status | PR | Reviewer | AI-tool |
116
+ | -------- | ------- | ------ | ---------- | -------- | ----- | ---------- | --------- |
117
117
  EOF
118
118
 
119
119
  # Commit
@@ -122,6 +122,12 @@ git commit -m "compliance: initialize compliance directory structure"
122
122
  git push origin develop
123
123
  ```
124
124
 
125
+ If any RTM or release-evidence table cell needs literal pipe characters, escape
126
+ them as `\|` rather than writing bare `|`. Typical cases are regexes
127
+ (`stop\|unsubscribe\|opt-out`) and enum examples
128
+ (`open\|in_progress\|closed`). Bare pipes inside a markdown table cell are read
129
+ as extra columns and trigger false-positive MD056/MD060 lint errors.
130
+
125
131
  ---
126
132
 
127
133
  ## Step 4: CI Pipeline Configuration
@@ -131,7 +137,7 @@ This is the **independent verification gate**. Tests run locally during developm
131
137
  ### What CI Must Run
132
138
 
133
139
  | Pipeline | Trigger | Jobs | Purpose |
134
- |---|---|---|---|
140
+ | --- | --- | --- | --- |
135
141
  | CI | Push to `develop` | TypeScript + SAST + dependency audit + E2E + build | Quality gates + independent verification |
136
142
  | Deploy | Merge to `main` | Auto-deploy to hosting platform | Production release |
137
143
 
@@ -389,7 +395,7 @@ If any step fails, fix the configuration before starting real work.
389
395
  ## Setup Checklist
390
396
 
391
397
  | Step | Status |
392
- |---|---|
398
+ | --- | --- |
393
399
  | Repository created | [ ] |
394
400
  | `develop` branch created | [ ] |
395
401
  | Production environment configured (auto-deploy from `main`) | [ ] |
@@ -21,7 +21,7 @@ This schedule applies to all Metasession products and client engagements. Projec
21
21
  ## Schedule Overview
22
22
 
23
23
  | Activity | Frequency | Owner | Evidence Location |
24
- |---|---|---|---|
24
+ | --- | --- | --- | --- |
25
25
  | Full codebase SAST review | Quarterly | QA / Security Lead | `compliance/evidence/periodic/sast-quarterly/` |
26
26
  | Dependency deep audit | Quarterly | QA / Security Lead | `compliance/evidence/periodic/dependency-audit/` |
27
27
  | Access control review | Quarterly | QA / Security Lead | `compliance/evidence/periodic/access-control/` |
@@ -103,7 +103,7 @@ This schedule applies to all Metasession products and client engagements. Projec
103
103
  **Remediation SLAs:**
104
104
 
105
105
  | Severity | Deadline |
106
- |---|---|
106
+ | --- | --- |
107
107
  | Critical | 7 days |
108
108
  | High | 30 days |
109
109
  | Medium | 90 days |
@@ -133,7 +133,7 @@ RTO and RPO targets are defined per project in their Test Plans.
133
133
  ## Unscheduled Triggers
134
134
 
135
135
  | Event | Triggered Activity |
136
- |---|---|
136
+ | --- | --- |
137
137
  | Security incident or breach | Full SAST + pen test + access control review |
138
138
  | Critical CVE in direct dependency | Immediate audit + patch |
139
139
  | Significant architecture change | Access control review + SAST |
@@ -146,7 +146,7 @@ RTO and RPO targets are defined per project in their Test Plans.
146
146
  ## Compliance Framework Mapping
147
147
 
148
148
  | Framework | Control | Covered By |
149
- |---|---|---|
149
+ | --- | --- | --- |
150
150
  | SOC 2 (CC7.1) | System monitoring | Quarterly SAST + audit log review |
151
151
  | SOC 2 (CC6.1) | Logical access | Quarterly access control review |
152
152
  | SOC 2 (CC8.1) | Change management | Per-feature pipeline + quarterly reviews |
@@ -160,7 +160,7 @@ RTO and RPO targets are defined per project in their Test Plans.
160
160
  ## Document Control
161
161
 
162
162
  | Version | Date | Author | Changes |
163
- |---|---|---|---|
163
+ | --- | --- | --- | --- |
164
164
  | 1.0 | March 2026 | Engineering Leadership | Initial schedule |
165
165
  | 1.1 | March 2026 | Engineering Leadership | Updated document references for clean boundary split |
166
166
 
@@ -9,7 +9,7 @@
9
9
  ### Tier 1 — Universal (Metasession-wide)
10
10
 
11
11
  | Document | Owns |
12
- |----------|------|
12
+ | ---------- | ------ |
13
13
  | **Test Policy** | Why we test, commitments, AI governance, roles, accountability |
14
14
  | **Test Strategy** | How we approach testing — methodology, risk classification, security, AI protocol |
15
15
  | **Test Architecture** | What we build with — tools, patterns, code standards, CI config |
@@ -18,7 +18,7 @@
18
18
  ### Tier 2 — Project-Specific
19
19
 
20
20
  | Document | Purpose |
21
- |----------|---------|
21
+ | ---------- | --------- |
22
22
  | **Project Setup** | One-time: repository, CI, compliance configuration |
23
23
  | **Test Plan** | Environment, test suites, exit criteria, AI config, evidence |
24
24
  | **Workflows 0-5** | Operational pipeline procedures |
@@ -43,7 +43,7 @@
43
43
  ## Quick Reference
44
44
 
45
45
  | Scenario | Workflows |
46
- |----------|-----------|
46
+ | ---------- | ----------- |
47
47
  | New project setup | 0 (once) |
48
48
  | New feature (tracked) | 1 → 2 → 3 → 4 → (CI + review) → 5 |
49
49
  | Bug fix / docs / config | 2 → 4 → (CI + review) → 5 |
@@ -51,7 +51,7 @@
51
51
  ## Mandatory Gates
52
52
 
53
53
  | Gate | Local | CI (PR) | Threshold |
54
- |------|-------|---------|-----------|
54
+ | ------ | ------- | --------- | ----------- |
55
55
  | TypeScript | Yes | Yes | 0 errors |
56
56
  | SAST | Yes | Yes | 0 high/critical |
57
57
  | Dependencies | Yes | Yes | 0 high/critical |
@@ -61,7 +61,7 @@
61
61
  ## Risk Levels
62
62
 
63
63
  | Level | Extra Requirements |
64
- |-------|-------------------|
64
+ | ------- | ------------------- |
65
65
  | Low | Standard gates |
66
66
  | Medium | + access control + audit log testing |
67
67
  | High | + pen test consideration + independent review |
@@ -71,7 +71,7 @@ AI in Medium/High categories raises risk one level.
71
71
  ## CI/CD
72
72
 
73
73
  | Trigger | What Runs |
74
- |---------|-----------|
74
+ | --------- | ----------- |
75
75
  | Push to `develop` | TypeScript + build |
76
76
  | PR to `main` | TypeScript + SAST + deps + E2E (unauthenticated) |
77
77
  | Merge to `main` | Auto-deploy |
@@ -289,7 +289,7 @@ DevAudit is the centralised compliance evidence portal for all Metasession proje
289
289
  Evidence artifacts are uploaded to DevAudit instead of being committed to git.
290
290
 
291
291
  | Before (git-based) | After (DevAudit) |
292
- |---------------------|---------------------|
292
+ | --------------------- | --------------------- |
293
293
  | `cp e2e-results.json compliance/evidence/REQ-XXX/` | CLI script or CI uploads to DevAudit |
294
294
  | `git add compliance/evidence/REQ-XXX/` | Binary artifacts excluded via `.gitignore` |
295
295
  | Evidence only visible to repo collaborators | Evidence visible to anyone with an access grant |
@@ -428,7 +428,7 @@ For one-off reviews, generate a time-limited share link instead of creating an a
428
428
  Add these to your GitHub repository (Settings → Secrets and variables → Actions):
429
429
 
430
430
  | Setting | Tab | Value | Source |
431
- |--------|-----|-------|--------|
431
+ | -------- | ----- | ------- | -------- |
432
432
  | `DEVAUDIT_BASE_URL` | Variables | The deployed DevAudit URL, e.g. `https://devaudit.metasession.co` | The hosting team |
433
433
  | `DEVAUDIT_API_KEY` | Secrets | Project-scoped API key (`mc_…`) with `uploader` role | DevAudit → Project Settings → API Keys → New key |
434
434
 
@@ -54,7 +54,7 @@ These standards apply to all Metasession products, client engagements, and inter
54
54
  ### Unit Layer (Foundation)
55
55
 
56
56
  | Attribute | Standard |
57
- |---|---|
57
+ | --- | --- |
58
58
  | Coverage | Minimum 70% for critical modules |
59
59
  | Speed | Suite completes in < 30 seconds |
60
60
  | Scope | Individual functions, methods, components in isolation |
@@ -63,7 +63,7 @@ These standards apply to all Metasession products, client engagements, and inter
63
63
  ### Integration Layer (Middle)
64
64
 
65
65
  | Attribute | Standard |
66
- |---|---|
66
+ | --- | --- |
67
67
  | Coverage | Minimum 80% of integration points |
68
68
  | Scope | Component interactions, service integrations, API contracts |
69
69
  | Data | In-memory databases or MSW for API mocking |
@@ -71,7 +71,7 @@ These standards apply to all Metasession products, client engagements, and inter
71
71
  ### E2E Layer (Top)
72
72
 
73
73
  | Attribute | Standard |
74
- |---|---|
74
+ | --- | --- |
75
75
  | Coverage | 100% of critical user paths |
76
76
  | Scope | Complete user journeys from UI to database |
77
77
  | Browser support | Chromium, Firefox, WebKit |
@@ -80,7 +80,7 @@ These standards apply to all Metasession products, client engagements, and inter
80
80
  ### Additional Layers
81
81
 
82
82
  | Layer | Standard |
83
- |---|---|
83
+ | --- | --- |
84
84
  | Security | SAST, SCA, DAST (see Section 3) |
85
85
  | Performance | Load and stress testing before major releases |
86
86
  | Accessibility | WCAG 2.1 AA for public-facing features |
@@ -93,7 +93,7 @@ These standards apply to all Metasession products, client engagements, and inter
93
93
  ### Test Frameworks
94
94
 
95
95
  | Purpose | Tool | Notes |
96
- |---|---|---|
96
+ | --- | --- | --- |
97
97
  | Unit testing (TS/JS) | Jest or Vitest | Project chooses one |
98
98
  | Unit testing (Python) | pytest | |
99
99
  | Component testing | React Testing Library | |
@@ -105,7 +105,7 @@ These standards apply to all Metasession products, client engagements, and inter
105
105
  ### Test Management
106
106
 
107
107
  | Purpose | Tool |
108
- |---|---|
108
+ | --- | --- |
109
109
  | Test case management | Qase |
110
110
  | CI/CD | GitHub Actions |
111
111
  | Reporting | Playwright HTML Reporter, JUnit XML |
@@ -113,7 +113,7 @@ These standards apply to all Metasession products, client engagements, and inter
113
113
  ### Security Testing
114
114
 
115
115
  | Purpose | Tool | When |
116
- |---|---|---|
116
+ | --- | --- | --- |
117
117
  | SAST (static analysis) | Semgrep and/or SonarQube | Every commit |
118
118
  | SCA (dependency scanning) | Snyk | Every commit |
119
119
  | Dependency updates | Dependabot | Continuous |
@@ -123,14 +123,14 @@ These standards apply to all Metasession products, client engagements, and inter
123
123
  ### Performance Testing
124
124
 
125
125
  | Purpose | Tool |
126
- |---|---|
126
+ | --- | --- |
127
127
  | Load testing | Artillery |
128
128
  | Web performance | Lighthouse |
129
129
 
130
130
  ### Development Tooling
131
131
 
132
132
  | Purpose | Tool |
133
- |---|---|
133
+ | --- | --- |
134
134
  | Git hooks | Husky |
135
135
  | Commit linting | commitlint (Conventional Commits) |
136
136
  | Code linting | ESLint |
@@ -200,7 +200,7 @@ Products must implement:
200
200
  ### Strategy by Test Level
201
201
 
202
202
  | Test Level | Data Strategy | Rationale |
203
- |---|---|---|
203
+ | --- | --- | --- |
204
204
  | Unit | Mocked data | Fast, predictable |
205
205
  | Integration | In-memory DB or MSW | Isolated, controlled |
206
206
  | E2E (local) | Test database (Docker) | Real behavior, containerized |
@@ -230,7 +230,7 @@ Products must implement:
230
230
  All products implement these stages in order:
231
231
 
232
232
  | Stage | Purpose | Exit Criteria |
233
- |---|---|---|
233
+ | --- | --- | --- |
234
234
  | 1. Lint | ESLint + Prettier validation | 0 errors |
235
235
  | 2. Type Check | Strict compilation | 0 errors |
236
236
  | 3. Unit Tests | Component-level testing with coverage | Meets coverage target |
@@ -290,7 +290,7 @@ npm pkg set scripts.prepare="husky"
290
290
  ## 8. Artifact Storage
291
291
 
292
292
  | Artifact | Storage | Retention |
293
- |---|---|---|
293
+ | --- | --- | --- |
294
294
  | Test results (HTML) | GitHub Actions artifacts | 90 days |
295
295
  | Screenshots | GitHub Actions artifacts | 90 days |
296
296
  | Videos | GitHub Actions artifacts | 90 days |
@@ -315,7 +315,7 @@ npm pkg set scripts.prepare="husky"
315
315
  ### Naming Conventions
316
316
 
317
317
  | File Type | Pattern | Example |
318
- |---|---|---|
318
+ | --- | --- | --- |
319
319
  | Unit tests | `*.test.ts`, `*.test.tsx` | `auth.test.ts` |
320
320
  | Integration tests | `*.integration.test.ts` | `api.integration.test.ts` |
321
321
  | E2E tests | `*.spec.ts` | `login.spec.ts` |
@@ -410,7 +410,7 @@ module.exports = {
410
410
  ## 11. Coverage & Quality Thresholds
411
411
 
412
412
  | Metric | Target |
413
- |---|---|
413
+ | --- | --- |
414
414
  | Unit test coverage (critical modules) | 70% minimum |
415
415
  | Integration point coverage | 80% minimum |
416
416
  | Critical user path E2E coverage | 100% |
@@ -448,7 +448,7 @@ Each product creates a product-specific Test Plan that:
448
448
  ## Document Control
449
449
 
450
450
  | Version | Date | Author | Changes |
451
- |---|---|---|---|
451
+ | --- | --- | --- | --- |
452
452
  | 1.0 | January 2026 | QA Team | Initial creation |
453
453
  | 2.0 | March 2026 | QA Team | Clean boundary split — removed compliance/governance content (now in Policy), removed methodology content (now in Strategy). Architecture now owns tools, patterns, code standards, CI config only. Added security tooling table. |
454
454
 
@@ -21,7 +21,7 @@ For tools, patterns, and code standards: Test Architecture.
21
21
  ## Project Overview
22
22
 
23
23
  | Attribute | Value |
24
- |---|---|
24
+ | --- | --- |
25
25
  | Application | [PROJECT NAME — brief description] |
26
26
  | Stack | [e.g., TypeScript, Next.js, MongoDB, Socket.IO] |
27
27
  | Hosting | [e.g., Railway, Vercel, AWS] (auto-deploy from `main`) |
@@ -48,7 +48,7 @@ Develop-main with develop branch (per Test Strategy branching patterns):
48
48
  ### E2E Tests (Playwright)
49
49
 
50
50
  | Attribute | Value |
51
- |---|---|
51
+ | --- | --- |
52
52
  | Framework | Playwright (per Test Architecture standard) |
53
53
  | Test count | [TOTAL] tests across [N] projects |
54
54
  | Unauthenticated (CI) | [COUNT] (run in CI on PR to main) |
@@ -59,7 +59,7 @@ Develop-main with develop branch (per Test Strategy branching patterns):
59
59
  ### Unit Tests
60
60
 
61
61
  | Attribute | Value |
62
- |---|---|
62
+ | --- | --- |
63
63
  | Framework | [Jest / Vitest] |
64
64
  | Coverage target | 70% for critical modules |
65
65
  | Run command | [e.g., npx vitest run] |
@@ -73,7 +73,7 @@ npx tsc --noEmit # 0 errors required
73
73
  ### SAST Scanning
74
74
 
75
75
  | Attribute | Value |
76
- |---|---|
76
+ | --- | --- |
77
77
  | Tool | Semgrep (per Test Architecture) |
78
78
  | Config | auto |
79
79
  | Scan scope | [e.g., src/] |
@@ -103,7 +103,7 @@ npm audit --audit-level=high
103
103
  ### Exit (Before PR)
104
104
 
105
105
  | Gate | Local | CI (PR) | Threshold |
106
- |---|---|---|---|
106
+ | --- | --- | --- | --- |
107
107
  | TypeScript | Yes | Yes | 0 errors |
108
108
  | SAST (high/critical) | Yes | Yes | 0 findings |
109
109
  | Dependencies (high/critical) | Yes | Yes | 0 vulnerabilities |
@@ -114,7 +114,7 @@ npm audit --audit-level=high
114
114
  Additional for Medium/High risk (per Test Strategy risk matrix):
115
115
 
116
116
  | Gate | Threshold |
117
- |---|---|
117
+ | --- | --- |
118
118
  | Access control tests | RBAC endpoints return correct 401/403 |
119
119
  | Audit log tests | Auditable actions produce log entries |
120
120
 
@@ -125,7 +125,7 @@ Additional for Medium/High risk (per Test Strategy risk matrix):
125
125
  ### Pipeline Configuration
126
126
 
127
127
  | Trigger | What Runs | Independent Evidence |
128
- |---|---|---|
128
+ | --- | --- | --- |
129
129
  | Push to `develop` | TypeScript check + build | Compilation clean |
130
130
  | PR to `main` | TypeScript + SAST + dependency audit + E2E (unauthenticated) | All gates independently verified by GitHub |
131
131
  | Merge to `main` | Auto-deploy to hosting platform | Deployment triggered |
@@ -159,13 +159,13 @@ Both required. Local proves comprehensive testing. CI proves it independently.
159
159
  Per Test Policy AI governance:
160
160
 
161
161
  | Tool | Permitted Use |
162
- |---|---|
162
+ | --- | --- |
163
163
  | [e.g., Claude (Anthropic) — Opus 4.6, Sonnet 4.6] | [e.g., Code generation, test generation, documentation, review] |
164
164
 
165
165
  Documentation requirements (per Test Strategy AI methodology):
166
166
 
167
167
  | Risk | Commit | Evidence | Prompts |
168
- |---|---|---|---|
168
+ | --- | --- | --- | --- |
169
169
  | Low | `Co-Authored-By` tag | Not required | Not required |
170
170
  | Medium | Same | Summary in evidence dir | Summary |
171
171
  | High | Same | Detailed record | Detailed |
@@ -224,7 +224,7 @@ compliance/
224
224
  Every tracked requirement gets a `test-scope.md` created during the PLAN stage **before implementation**. Scope scales with risk:
225
225
 
226
226
  | Risk | Content |
227
- |---|---|
227
+ | --- | --- |
228
228
  | Low | Standard gates + acceptance criteria. A few lines. |
229
229
  | Medium | Above + targeted testing (access control, audit logging, dependency review), validation approach. Half a page. |
230
230
  | High | Above + security testing detail, independent review plan, pen test consideration, business validation, AI detail. One page. |
@@ -258,7 +258,7 @@ curl -s [PRODUCTION_URL]/[NONEXISTENT_ENDPOINT]
258
258
  ## Disaster Recovery
259
259
 
260
260
  | Metric | Target |
261
- |---|---|
261
+ | --- | --- |
262
262
  | RTO | [e.g., 4 hours] |
263
263
  | RPO | [e.g., 24 hours] |
264
264
 
@@ -292,7 +292,7 @@ Annual pen test scope: [PRODUCTION_URL], API endpoints, auth mechanism, [databas
292
292
  ## Workflow Files
293
293
 
294
294
  | # | File | Purpose |
295
- |---|---|---|
295
+ | --- | --- | --- |
296
296
  | 0 | `0-project-setup.md` | One-time: repository, CI, compliance setup |
297
297
  | 1 | `1-plan-requirement.md` | Create REQ, classify risk, generate test scope |
298
298
  | 2 | `2-implement-and-test.md` | Code, commit, run all local gates |
@@ -305,7 +305,7 @@ Annual pen test scope: [PRODUCTION_URL], API endpoints, auth mechanism, [databas
305
305
  ## Document Control
306
306
 
307
307
  | Version | Date | Author | Changes |
308
- |---|---|---|---|
308
+ | --- | --- | --- | --- |
309
309
  | 1.0 | [DATE] | [AUTHOR] | Initial plan |
310
310
 
311
311
  **Parent Documents:** Test Policy, Test Strategy, Test Architecture, Periodic Security Review Schedule (in devaudit/sdlc/files/)
@@ -114,7 +114,7 @@ AI-generated code presents risks distinct from human-authored code:
114
114
  ### Permitted AI Tools
115
115
 
116
116
  | Tool | Permitted Use | Restrictions |
117
- |---|---|---|
117
+ | --- | --- | --- |
118
118
  | Claude (Anthropic) | Code generation, test generation, documentation, review assistance | No deployment without human review |
119
119
  | GitHub Copilot | Inline code suggestions | Same review requirements as any AI-generated code |
120
120
 
@@ -275,7 +275,7 @@ Project Test Plans (per product)
275
275
  ## Document Control
276
276
 
277
277
  | Version | Date | Author | Changes |
278
- |---|---|---|---|
278
+ | --- | --- | --- | --- |
279
279
  | 1.0 | January 2026 | Engineering Leadership | Initial creation |
280
280
  | 2.0 | March 2026 | Engineering Leadership | Added AI governance, security commitments |
281
281
  | 3.0 | March 2026 | Engineering Leadership | Clean boundary split — removed content now owned by Test Strategy (methodology) and Test Architecture (tooling) |