@metasession.co/devaudit-cli 0.1.69 → 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 (28) 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
  28. package/sdlc/.claude/settings.local.json +0 -11
@@ -244,7 +244,7 @@ jobs:
244
244
  run: |
245
245
  chmod +x scripts/upload-evidence.sh 2>/dev/null || true
246
246
  bash scripts/upload-evidence.sh \
247
- {{PROJECT_SLUG}} _compliance-docs compliance_document README.md \
247
+ {{PROJECT_SLUG}} _compliance-docs release_registration README.md \
248
248
  --release ${{ steps.version.outputs.version }} --create-release-if-missing \
249
249
  --environment uat --category planning \
250
250
  --git-sha ${{ github.sha }} --branch ${{ github.ref_name }} || true
@@ -360,6 +360,7 @@ jobs:
360
360
  FLAGS="--git-sha ${{ github.sha }} --ci-run-id ${{ github.run_id }} --branch ${{ github.ref_name }}"
361
361
  FLAGS="${FLAGS} --release ${{ needs.register-release.outputs.version }} --create-release-if-missing"
362
362
  FLAGS="${FLAGS} --environment uat"
363
+ FLAGS="${FLAGS} --test-cycle ${{ github.run_id }}"
363
364
 
364
365
  UPLOAD_FAILURES=0
365
366
  upload() {
@@ -392,7 +393,7 @@ jobs:
392
393
  STATUS_DEPAUDIT=$(gate_status "$(jq -r '.dependency_audit // "skipped"' "$OUTCOMES_FILE")")
393
394
  STATUS_TESTS=$(gate_status "$(jq -r '.tests // "skipped"' "$OUTCOMES_FILE")")
394
395
  upload gate-outcomes.json \
395
- {{PROJECT_SLUG}} _compliance-docs compliance_document "$OUTCOMES_FILE" \
396
+ {{PROJECT_SLUG}} _compliance-docs gate_outcome "$OUTCOMES_FILE" \
396
397
  --category ci_pipeline ${FLAGS}
397
398
  fi
398
399
 
@@ -414,33 +415,45 @@ jobs:
414
415
  --category security_scan --gate-status "$STATUS_DEPAUDIT" ${FLAGS}
415
416
  fi
416
417
 
417
- # pytest junit.xml is the Python equivalent of e2e-results.json — same `e2e_result` evidence type
418
+ # pytest junit.xml is the Python equivalent of e2e-results.json —
419
+ # same `e2e_result` evidence type, `e2e_result` category (NOT
420
+ # `ci_pipeline` — category collision fix, DevAudit-Installer#207).
418
421
  if [ -f {{WORKING_DIR_PREFIX}}ci-evidence/junit.xml ]; then
419
422
  upload junit.xml \
420
423
  {{PROJECT_SLUG}} _compliance-docs e2e_result {{WORKING_DIR_PREFIX}}ci-evidence/junit.xml \
421
- --category ci_pipeline --gate-status "$STATUS_TESTS" ${FLAGS}
424
+ --category e2e_result --gate-status "$STATUS_TESTS" ${FLAGS}
422
425
  fi
423
426
 
427
+ # Project-level Test Summary Report — intentional compliance_document
428
+ # use (baseline, NOT per-release test evidence). Matches the node
429
+ # template. DevAudit-Installer#205.
424
430
  if [ -f "compliance/test-summary-report.md" ]; then
425
431
  upload test-summary-report.md \
426
432
  {{PROJECT_SLUG}} _compliance-docs compliance_document compliance/test-summary-report.md \
427
- --category test_report ${FLAGS}
433
+ --category planning ${FLAGS}
428
434
  fi
429
435
 
430
- for DOC in compliance/RTM.md compliance/test-plan.md compliance/test-cases.md; do
431
- if [ -f "$DOC" ]; then
432
- upload "$(basename "$DOC")" \
433
- {{PROJECT_SLUG}} _compliance-docs compliance_document "$DOC" \
434
- --category planning ${FLAGS}
435
- fi
436
- done
436
+ # Project-level planning docs with specific evidence_type so the
437
+ # portal's framework-coverage predicates attribute them correctly
438
+ # (DevAudit-Installer#205).
439
+ upload_project_doc() {
440
+ local DOC="$1" EVTYPE="$2"
441
+ if [ ! -f "$DOC" ]; then return 0; fi
442
+ upload "$(basename "$DOC")" \
443
+ {{PROJECT_SLUG}} _compliance-docs "$EVTYPE" "$DOC" \
444
+ --category planning ${FLAGS}
445
+ }
446
+ upload_project_doc compliance/RTM.md rtm
447
+ upload_project_doc compliance/test-plan.md test_plan
448
+ upload_project_doc compliance/test-cases.md test_cases
437
449
 
450
+ # Release tickets — evidence_type=release_ticket (DevAudit-Installer#207).
438
451
  for DIR in compliance/pending-releases; do
439
452
  if [ -d "$DIR" ]; then
440
453
  for TICKET in "$DIR"/*.md; do
441
454
  [ -f "$TICKET" ] || continue
442
455
  upload "$(basename "$TICKET")" \
443
- {{PROJECT_SLUG}} _compliance-docs compliance_document "$TICKET" \
456
+ {{PROJECT_SLUG}} _compliance-docs release_ticket "$TICKET" \
444
457
  --category release_artifact ${FLAGS}
445
458
  done
446
459
  fi
@@ -467,9 +480,40 @@ jobs:
467
480
  fi
468
481
  for ARTIFACT in "$REQ_DIR"*.md; do
469
482
  [ -f "$ARTIFACT" ] || continue
470
- upload "${REQ_ID}/$(basename "$ARTIFACT")" \
471
- {{PROJECT_SLUG}} "${REQ_ID}" compliance_document "$ARTIFACT" \
472
- --category planning ${FLAGS}
483
+ # Per-REQ basename → (evidence_type, evidence_category) routing.
484
+ # Explicit cases for every SDLC-expected artifact; unrecognized
485
+ # filenames are skipped with a warning (DevAudit-Installer#205).
486
+ BASENAME=$(basename "$ARTIFACT")
487
+ case "$BASENAME" in
488
+ test-execution-summary.md|test-summary-report.md)
489
+ EVTYPE=test_report; EVCAT=test_report ;;
490
+ srs-alignment.md)
491
+ EVTYPE=srs_alignment; EVCAT=planning ;;
492
+ architecture-decision.md)
493
+ EVTYPE=architecture_decision; EVCAT=planning ;;
494
+ risk-assessment.md)
495
+ EVTYPE=risk_assessment; EVCAT=planning ;;
496
+ test-scope.md)
497
+ EVTYPE=test_scope; EVCAT=planning ;;
498
+ test-plan.md)
499
+ EVTYPE=test_plan; EVCAT=planning ;;
500
+ implementation-plan.md)
501
+ EVTYPE=implementation_plan; EVCAT=planning ;;
502
+ security-summary.md)
503
+ EVTYPE=security_summary; EVCAT=security ;;
504
+ ai-use-note.md)
505
+ EVTYPE=ai_use_note; EVCAT=ai_governance ;;
506
+ ai-prompts.md)
507
+ EVTYPE=ai_prompt_log; EVCAT=ai_governance ;;
508
+ ai-agent-handoff.md)
509
+ EVTYPE=ai_agent_handoff; EVCAT=ai_governance ;;
510
+ *)
511
+ echo "::warning::Unrecognized artifact ${REQ_ID}/${BASENAME} — skipping upload. Add explicit routing in ci.yml if this is a new evidence type. (DevAudit-Installer#205)"
512
+ continue ;;
513
+ esac
514
+ upload "${REQ_ID}/${BASENAME}" \
515
+ {{PROJECT_SLUG}} "${REQ_ID}" "$EVTYPE" "$ARTIFACT" \
516
+ --category "$EVCAT" ${FLAGS}
473
517
  done
474
518
  done
475
519
  fi
@@ -6,7 +6,7 @@
6
6
  "node_version": 20,
7
7
  "runner": "self-hosted",
8
8
 
9
- "_comment_branches": "Branch model the sdlc-implementer skill follows. integration_branch = where implementation PRs land and ci.yml uploads gate evidence on push (develop-first default). release_branch = the protected production branch the integration branch is promoted to via the UAT-approved release PR. Trunk-only projects set both to \"main\".",
9
+ "_comment_branches": "Branch model the sdlc-implementer skill follows. integration_branch = where implementation PRs land and ci.yml uploads gate evidence on push. release_branch = the protected production branch the integration branch is promoted to via the UAT-approved release PR.",
10
10
  "integration_branch": "develop",
11
11
  "release_branch": "main",
12
12
 
@@ -1,11 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(git init:*)",
5
- "Bash(git add:*)",
6
- "Bash(git branch:*)",
7
- "Bash(git commit:*)",
8
- "Bash(gh repo:*)"
9
- ]
10
- }
11
- }