universal-dev-standards 5.4.0 → 5.6.0

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 (138) hide show
  1. package/bundled/ai/options/testing/integration-testing.ai.yaml +2 -2
  2. package/bundled/ai/options/testing/unit-testing.ai.yaml +2 -2
  3. package/bundled/ai/standards/adversarial-test.ai.yaml +277 -0
  4. package/bundled/ai/standards/audit-trail.ai.yaml +113 -0
  5. package/bundled/ai/standards/browser-compatibility-standards.ai.yaml +63 -0
  6. package/bundled/ai/standards/chaos-injection-tests.ai.yaml +91 -0
  7. package/bundled/ai/standards/container-image-standards.ai.yaml +88 -0
  8. package/bundled/ai/standards/container-security.ai.yaml +331 -0
  9. package/bundled/ai/standards/contract-testing-standards.ai.yaml +62 -0
  10. package/bundled/ai/standards/cost-budget-test.ai.yaml +96 -0
  11. package/bundled/ai/standards/cross-flow-regression.ai.yaml +61 -0
  12. package/bundled/ai/standards/data-contract.ai.yaml +110 -0
  13. package/bundled/ai/standards/data-migration-testing.ai.yaml +96 -0
  14. package/bundled/ai/standards/data-pipeline.ai.yaml +113 -0
  15. package/bundled/ai/standards/disaster-recovery-drill.ai.yaml +89 -0
  16. package/bundled/ai/standards/flaky-test-management.ai.yaml +89 -0
  17. package/bundled/ai/standards/flow-based-testing.ai.yaml +240 -0
  18. package/bundled/ai/standards/full-coverage-testing.ai.yaml +192 -0
  19. package/bundled/ai/standards/iac-design-principles.ai.yaml +83 -0
  20. package/bundled/ai/standards/incident-response.ai.yaml +107 -0
  21. package/bundled/ai/standards/license-compliance.ai.yaml +106 -0
  22. package/bundled/ai/standards/llm-output-validation.ai.yaml +269 -0
  23. package/bundled/ai/standards/mock-boundary.ai.yaml +250 -0
  24. package/bundled/ai/standards/mutation-testing.ai.yaml +192 -0
  25. package/bundled/ai/standards/pii-classification.ai.yaml +109 -0
  26. package/bundled/ai/standards/policy-as-code-testing.ai.yaml +227 -0
  27. package/bundled/ai/standards/prd-standards.ai.yaml +88 -0
  28. package/bundled/ai/standards/product-metrics-standards.ai.yaml +111 -0
  29. package/bundled/ai/standards/prompt-regression.ai.yaml +94 -0
  30. package/bundled/ai/standards/property-based-testing.ai.yaml +105 -0
  31. package/bundled/ai/standards/release-quality-manifest.ai.yaml +135 -0
  32. package/bundled/ai/standards/release-readiness-gate.ai.yaml +77 -0
  33. package/bundled/ai/standards/replay-test.ai.yaml +111 -0
  34. package/bundled/ai/standards/runbook.ai.yaml +104 -0
  35. package/bundled/ai/standards/sast-advanced.ai.yaml +135 -0
  36. package/bundled/ai/standards/schema-evolution.ai.yaml +111 -0
  37. package/bundled/ai/standards/secret-management-standards.ai.yaml +105 -0
  38. package/bundled/ai/standards/secure-op.ai.yaml +365 -0
  39. package/bundled/ai/standards/security-testing.ai.yaml +171 -0
  40. package/bundled/ai/standards/server-ops-security.ai.yaml +274 -0
  41. package/bundled/ai/standards/slo-sli.ai.yaml +97 -0
  42. package/bundled/ai/standards/smoke-test.ai.yaml +87 -0
  43. package/bundled/ai/standards/supply-chain-attestation.ai.yaml +109 -0
  44. package/bundled/ai/standards/test-completeness-dimensions.ai.yaml +52 -5
  45. package/bundled/ai/standards/testing.ai.yaml +20 -13
  46. package/bundled/ai/standards/user-story-mapping.ai.yaml +108 -0
  47. package/bundled/core/accessibility-standards.md +58 -0
  48. package/bundled/core/adversarial-test.md +212 -0
  49. package/bundled/core/branch-completion.md +4 -0
  50. package/bundled/core/browser-compatibility-standards.md +220 -0
  51. package/bundled/core/chaos-injection-tests.md +116 -0
  52. package/bundled/core/checkin-standards.md +1 -0
  53. package/bundled/core/container-security.md +521 -0
  54. package/bundled/core/contract-testing-standards.md +182 -0
  55. package/bundled/core/cost-budget-test.md +69 -0
  56. package/bundled/core/cross-flow-regression.md +190 -0
  57. package/bundled/core/data-migration-testing.md +110 -0
  58. package/bundled/core/disaster-recovery-drill.md +73 -0
  59. package/bundled/core/flaky-test-management.md +73 -0
  60. package/bundled/core/flow-based-testing.md +275 -0
  61. package/bundled/core/full-coverage-testing.md +183 -0
  62. package/bundled/core/llm-output-validation.md +178 -0
  63. package/bundled/core/mock-boundary.md +100 -0
  64. package/bundled/core/mutation-testing.md +97 -0
  65. package/bundled/core/performance-standards.md +65 -0
  66. package/bundled/core/policy-as-code-testing.md +188 -0
  67. package/bundled/core/prompt-regression.md +72 -0
  68. package/bundled/core/property-based-testing.md +73 -0
  69. package/bundled/core/release-quality-manifest.md +193 -0
  70. package/bundled/core/release-readiness-gate.md +184 -0
  71. package/bundled/core/replay-test.md +86 -0
  72. package/bundled/core/sast-advanced.md +300 -0
  73. package/bundled/core/secure-op.md +314 -0
  74. package/bundled/core/security-testing.md +87 -0
  75. package/bundled/core/server-ops-security.md +493 -0
  76. package/bundled/core/smoke-test.md +65 -0
  77. package/bundled/core/supply-chain-attestation.md +117 -0
  78. package/bundled/locales/zh-CN/CHANGELOG.md +3 -3
  79. package/bundled/locales/zh-CN/README.md +1 -1
  80. package/bundled/locales/zh-CN/skills/ai-instruction-standards/SKILL.md +5 -5
  81. package/bundled/locales/zh-TW/CHANGELOG.md +3 -3
  82. package/bundled/locales/zh-TW/README.md +1 -1
  83. package/bundled/locales/zh-TW/core/browser-compatibility-standards.md +11 -0
  84. package/bundled/locales/zh-TW/core/contract-testing-standards.md +11 -0
  85. package/bundled/locales/zh-TW/core/cross-flow-regression.md +11 -0
  86. package/bundled/locales/zh-TW/core/release-readiness-gate.md +11 -0
  87. package/bundled/locales/zh-TW/skills/ai-instruction-standards/SKILL.md +183 -79
  88. package/bundled/skills/README.md +4 -3
  89. package/bundled/skills/SKILL_NAMING.md +94 -0
  90. package/bundled/skills/ai-instruction-standards/SKILL.md +181 -88
  91. package/bundled/skills/atdd-assistant/SKILL.md +8 -0
  92. package/bundled/skills/bdd-assistant/SKILL.md +7 -0
  93. package/bundled/skills/checkin-assistant/SKILL.md +8 -0
  94. package/bundled/skills/code-review-assistant/SKILL.md +7 -0
  95. package/bundled/skills/journey-test-assistant/SKILL.md +203 -0
  96. package/bundled/skills/orchestrate/SKILL.md +167 -0
  97. package/bundled/skills/plan/SKILL.md +234 -0
  98. package/bundled/skills/pr-automation-assistant/SKILL.md +8 -0
  99. package/bundled/skills/push/SKILL.md +49 -2
  100. package/bundled/skills/{process-automation → skill-builder}/SKILL.md +1 -1
  101. package/bundled/skills/{forward-derivation → spec-derivation}/SKILL.md +1 -1
  102. package/bundled/skills/spec-driven-dev/SKILL.md +7 -0
  103. package/bundled/skills/sweep/SKILL.md +145 -0
  104. package/bundled/skills/tdd-assistant/SKILL.md +7 -0
  105. package/package.json +6 -6
  106. package/src/commands/check.js +43 -0
  107. package/src/commands/flow.js +8 -0
  108. package/src/commands/init.js +2 -1
  109. package/src/commands/start.js +14 -0
  110. package/src/commands/sweep.js +8 -0
  111. package/src/commands/update.js +10 -0
  112. package/src/commands/workflow.js +8 -0
  113. package/standards-registry.json +483 -5
  114. package/bundled/locales/zh-CN/skills/ac-coverage-assistant/SKILL.md +0 -190
  115. package/bundled/locales/zh-CN/skills/forward-derivation/SKILL.md +0 -71
  116. package/bundled/locales/zh-CN/skills/forward-derivation/guide.md +0 -130
  117. package/bundled/locales/zh-CN/skills/methodology-system/SKILL.md +0 -88
  118. package/bundled/locales/zh-CN/skills/methodology-system/create-methodology.md +0 -350
  119. package/bundled/locales/zh-CN/skills/methodology-system/guide.md +0 -131
  120. package/bundled/locales/zh-CN/skills/methodology-system/runtime.md +0 -279
  121. package/bundled/locales/zh-CN/skills/process-automation/SKILL.md +0 -143
  122. package/bundled/locales/zh-TW/skills/ac-coverage-assistant/SKILL.md +0 -195
  123. package/bundled/locales/zh-TW/skills/deploy-assistant/SKILL.md +0 -178
  124. package/bundled/locales/zh-TW/skills/forward-derivation/SKILL.md +0 -69
  125. package/bundled/locales/zh-TW/skills/forward-derivation/guide.md +0 -415
  126. package/bundled/locales/zh-TW/skills/methodology-system/SKILL.md +0 -86
  127. package/bundled/locales/zh-TW/skills/methodology-system/create-methodology.md +0 -350
  128. package/bundled/locales/zh-TW/skills/methodology-system/guide.md +0 -131
  129. package/bundled/locales/zh-TW/skills/methodology-system/runtime.md +0 -279
  130. package/bundled/locales/zh-TW/skills/process-automation/SKILL.md +0 -144
  131. /package/bundled/skills/{ac-coverage-assistant → ac-coverage}/SKILL.md +0 -0
  132. /package/bundled/skills/{methodology-system → dev-methodology}/SKILL.md +0 -0
  133. /package/bundled/skills/{methodology-system → dev-methodology}/create-methodology.md +0 -0
  134. /package/bundled/skills/{methodology-system → dev-methodology}/guide.md +0 -0
  135. /package/bundled/skills/{methodology-system → dev-methodology}/integrated-flow.md +0 -0
  136. /package/bundled/skills/{methodology-system → dev-methodology}/prerequisite-check.md +0 -0
  137. /package/bundled/skills/{methodology-system → dev-methodology}/runtime.md +0 -0
  138. /package/bundled/skills/{forward-derivation → spec-derivation}/guide.md +0 -0
@@ -0,0 +1,192 @@
1
+ # Full Coverage Testing Standards - AI Optimized
2
+ # XSPEC-178: Replaces pyramid threshold model with behavior-completeness paradigm
3
+ # Source: core/full-coverage-testing.md
4
+
5
+ standard:
6
+ id: full-coverage-testing
7
+ name: Full Coverage Testing Standards
8
+ description: Behavior-completeness full coverage paradigm replacing pyramid thresholds. Enforces anti-fake-test rules, STUB marker protocol, ratchet CI, and @ac traceability.
9
+
10
+ meta:
11
+ version: "1.0.0"
12
+ updated: "2026-05-06"
13
+ source: core/full-coverage-testing.md
14
+ replaces: "testing pyramid thresholds (UT≥80%/IT≥70%/E2E happy-path-only)"
15
+ xspec: "XSPEC-178"
16
+ description: AI-era full coverage paradigm — cost of writing tests equals cost of writing code, so there is no reason to set lower thresholds for any test layer.
17
+
18
+ rationale: |
19
+ Traditional pyramid thresholds (UT≥80%, IT≥70%) assumed tests were expensive to write.
20
+ AI code generation eliminates this cost differential — code and tests are produced at the
21
+ same speed. Therefore: maximize coverage everywhere, with behavior-completeness as the
22
+ measure, not a percentage floor.
23
+
24
+ coverage_model:
25
+ type: behavior_completeness
26
+ description: Every public function must have tests for all three behavioral paths
27
+ required_paths:
28
+ - id: happy_path
29
+ description: Normal input produces correct output
30
+ example: "calculateDiscount(100, 0.1) → 90"
31
+ - id: edge_case
32
+ description: Boundary values do not cause unexpected errors
33
+ example: "calculateDiscount(0, 1.0) → 0 without throwing"
34
+ - id: error_path
35
+ description: Invalid input raises clear error or returns error state
36
+ example: "calculateDiscount(-1, 2.0) → throws ArgumentError"
37
+
38
+ ratchet_policy:
39
+ enabled: true
40
+ description: Coverage can only increase, never decrease. PR that regresses coverage is blocked.
41
+ mechanism:
42
+ - Store baseline in .coverage-baseline.json on main branch
43
+ - Every PR compares current coverage against baseline
44
+ - Regression = PR blocked, not merged
45
+ - Improvement = new baseline set on merge
46
+ note: No fixed floor threshold. The current coverage IS the threshold.
47
+
48
+ rules:
49
+ # ── Behavior completeness ──────────────────────────────────────
50
+ - id: three-path-coverage
51
+ trigger: writing tests for any public function
52
+ instruction: |
53
+ Write at least three tests per public function:
54
+ 1. happy_path — normal inputs, expected output
55
+ 2. edge_case — boundary values (zero, max, empty, null)
56
+ 3. error_path — invalid inputs trigger explicit error or error state
57
+ priority: required
58
+
59
+ - id: ac-traceability
60
+ trigger: writing any test
61
+ instruction: |
62
+ Tag each test with the Acceptance Criteria it covers using JSDoc @ac tag.
63
+ Format: /** @ac AC-ID */ above the test function.
64
+ If no AC maps to this test, use: /** @ac UNTRACED */
65
+ priority: recommended
66
+ example: |
67
+ /**
68
+ * @ac AC-US03-2
69
+ */
70
+ it('should block PR when coverage regresses', () => { ... })
71
+
72
+ # ── Anti-fake test rules ───────────────────────────────────────
73
+ - id: no-tautology-assertions
74
+ trigger: writing any test assertion
75
+ instruction: |
76
+ FORBIDDEN: Tautology assertions that always pass regardless of behavior.
77
+ These add false coverage without verifying anything.
78
+ priority: required
79
+ forbidden_patterns:
80
+ - "expect(true).toBe(true)"
81
+ - "expect(false).toBe(false)"
82
+ - "expect(result).toBeDefined() // without specific value"
83
+ - "expect(result).not.toBeNull() // without specific value"
84
+ required_instead: "expect(result).toBe(<specific expected value>)"
85
+
86
+ - id: no-mock-business-logic
87
+ trigger: deciding what to mock
88
+ instruction: |
89
+ FORBIDDEN: Mocking core business logic or your own service functions.
90
+ Mocking your own code means the business logic is never actually executed.
91
+ priority: required
92
+ allowed_to_mock:
93
+ - External HTTP APIs (payment gateways, OAuth providers)
94
+ - Hardware interfaces (sensors, GPIO, Docker daemon)
95
+ - Third-party SDKs with no test mode
96
+ - File system (use tmpdir, not mock)
97
+ forbidden_to_mock:
98
+ - Core business calculation functions
99
+ - Your own service layer methods
100
+ - Database queries (use in-memory SQLite instead)
101
+ - Your own utility functions
102
+
103
+ - id: mock-must-have-reason
104
+ trigger: writing any mock/stub/spy
105
+ instruction: |
106
+ Every jest.mock(), vi.mock(), jest.spyOn(), or sinon.stub() must be preceded
107
+ by a comment explaining WHY this dependency must be mocked.
108
+ Format: // MOCK: <reason — what external dependency and why it cannot be real>
109
+ priority: required
110
+ example: |
111
+ // MOCK: External Stripe payment API — no sandbox available in CI
112
+ jest.mock('./payment-gateway', () => ({ charge: jest.fn().mockResolvedValue({ id: 'ch_test' }) }))
113
+
114
+ # ── STUB marker protocol ───────────────────────────────────────
115
+ - id: stub-marker-required
116
+ trigger: writing any temporary/placeholder implementation
117
+ instruction: |
118
+ ALL temporary implementations, placeholder functions, and fake returns
119
+ MUST be marked with the standard STUB marker.
120
+ Format: // WARNING: STUB — Remove before UAT
121
+ This marker is scanned by pre-push hooks and deploy.sh.
122
+ STUB markers block pushes to main and deployments to UAT/production.
123
+ priority: required
124
+ example: |
125
+ // WARNING: STUB — Remove before UAT
126
+ async function validatePayment(card: Card): Promise<boolean> {
127
+ return true; // Always approve — replace with real Stripe call
128
+ }
129
+
130
+ - id: coverage-exempt-format
131
+ trigger: dealing with genuinely untestable external dependencies
132
+ instruction: |
133
+ If a dependency truly cannot be tested (hardware, live external API with no sandbox),
134
+ declare an explicit exemption with a mandatory reason.
135
+ Format: // COVERAGE_EXEMPT: <specific reason why real test is impossible>
136
+ This exemption is respected by STUB scanners and will not trigger blocking.
137
+ The reason MUST be non-empty and specific.
138
+ priority: required
139
+ example: |
140
+ // COVERAGE_EXEMPT: Hardware temperature sensor — no simulation available in CI
141
+ async function readTemperature(): Promise<number> {
142
+ return hardwareSensor.read();
143
+ }
144
+
145
+ - id: no-silent-stub
146
+ trigger: reviewing code before commit
147
+ instruction: |
148
+ Stubbed/placeholder code without // WARNING: STUB is a violation.
149
+ Common patterns to watch for: functions that always return hardcoded values,
150
+ empty function bodies that should have logic, TODO comments without STUB marker.
151
+ These will eventually reach production undetected.
152
+ priority: required
153
+
154
+ deployment_gates:
155
+ pre_push_to_main:
156
+ action: block
157
+ trigger: "// WARNING: STUB" marker found in src/
158
+ message: "[STUB-BLOCK] STUB markers detected. Push to main rejected."
159
+ deploy_to_uat:
160
+ action: block
161
+ trigger: "// WARNING: STUB" marker found in src/
162
+ message: "[DEPLOY-BLOCK] STUB markers detected. UAT deployment aborted."
163
+ deploy_to_production:
164
+ action: block
165
+ trigger: "// WARNING: STUB" marker found in src/
166
+ message: "[CRITICAL] Production deployment with STUB markers is strictly prohibited."
167
+ deploy_to_staging:
168
+ action: warn
169
+ trigger: "// WARNING: STUB" marker found in src/
170
+ message: "[STUB-WARN] Deploying with STUB markers to staging. NOT permitted in UAT/production."
171
+ feature_branch_push:
172
+ action: warn
173
+ trigger: "// WARNING: STUB" marker found in src/
174
+ message: "[STUB-WARN] STUB markers found. Must remove before merging to main."
175
+
176
+ migration_from_pyramid:
177
+ deprecated:
178
+ - "UT ≥ 80% coverage threshold"
179
+ - "IT ≥ 70% coverage threshold"
180
+ - "E2E happy-path-only requirement"
181
+ replaced_by:
182
+ - "Behavior-completeness: happy/edge/error per public function"
183
+ - "Ratchet CI: coverage can only increase"
184
+ - "Anti-fake rules: no tautology, no business-logic mocks"
185
+ - "STUB protocol: deployment gates on all environments"
186
+
187
+ physical_spec:
188
+ type: custom_script
189
+ validator:
190
+ command: >
191
+ test -f scripts/check-stubs.sh && test -f scripts/check-anti-fake-tests.sh
192
+ rule: "xspec178_enforcement_scripts_present"
@@ -0,0 +1,83 @@
1
+ # IaC Design Principles - AI Optimized
2
+ # Source: XSPEC-065 Wave 4 IaC Pack
3
+
4
+ id: iac-design-principles
5
+ title: Infrastructure as Code Design Principles
6
+ version: "1.0.0"
7
+ status: Active
8
+ tags: [iac, infrastructure, terraform, pulumi, cloudformation, immutable-infrastructure]
9
+ summary: |
10
+ Defines the four foundational principles for Infrastructure as Code (IaC)
11
+ authoring: reproducible, immutable, idempotent, and versioned. Covers state
12
+ management requirements including remote state with locking, drift detection
13
+ categories, and CI/CD integration. Designed to ensure infrastructure changes
14
+ are traceable, reversible, and safe to apply repeatedly without unintended
15
+ side effects.
16
+
17
+ requirements:
18
+ - id: REQ-001
19
+ title: IaC Four Principles
20
+ description: |
21
+ All infrastructure definitions MUST adhere to four foundational principles:
22
+ (1) Reproducible — given the same inputs and state, applying IaC produces
23
+ identical infrastructure. (2) Immutable — infrastructure changes are
24
+ applied by replacing resources, not mutating them in-place; blue/green or
25
+ rolling replacement patterns are preferred over in-place mutations.
26
+ (3) Idempotent — applying the same IaC configuration multiple times
27
+ produces the same result without error or unintended side effects.
28
+ (4) Versioned — all IaC definitions are stored in version control with
29
+ meaningful commit messages; no infrastructure change is made outside the
30
+ VCS workflow.
31
+ level: MUST
32
+ examples:
33
+ - "Terraform modules pinned to specific provider versions for reproducibility"
34
+ - "EC2 instance replacement via launch template version bump, not in-place AMI update"
35
+ - "`terraform apply` is safe to re-run; no manual pre-checks needed for idempotency"
36
+ - "All Pulumi programs committed to git; no ad-hoc CLI changes accepted"
37
+
38
+ - id: REQ-002
39
+ title: State Management
40
+ description: |
41
+ IaC state MUST be stored in a remote backend with locking enabled to
42
+ prevent concurrent modifications. Local state files MUST NOT be committed
43
+ to version control or used in CI/CD pipelines. Recommended backends:
44
+ Terraform Cloud / S3+DynamoDB (Terraform), Pulumi Service / S3 (Pulumi),
45
+ CloudFormation native stack state. State access MUST be restricted to
46
+ authorized principals via IAM or equivalent. State encryption at rest
47
+ is REQUIRED.
48
+ level: MUST
49
+ examples:
50
+ - "Terraform S3 backend with DynamoDB lock table; `.terraform/` in .gitignore"
51
+ - "Pulumi state stored in Pulumi Cloud with team access controls"
52
+ - "CI pipeline uses OIDC to assume role with state bucket access; no static credentials"
53
+ - "State file encrypted using AWS KMS customer-managed key"
54
+
55
+ - id: REQ-003
56
+ title: Drift Detection
57
+ description: |
58
+ Teams MUST run `plan` (or equivalent) in CI on every pull request to
59
+ detect configuration drift. Drift outcomes MUST be classified into one
60
+ of three categories and handled accordingly: (1) rollback-to-code —
61
+ actual infra deviates from code due to manual change; revert actual to
62
+ match code on next apply. (2) update-code-from-actual — actual reflects
63
+ intentional change not yet codified; update IaC to match, then apply.
64
+ (3) manual-reconcile — drift requires human judgment (e.g., data volume
65
+ changes); escalate to infra owner with documented decision. Drift reports
66
+ SHOULD be published to a team channel on a scheduled cadence (e.g., daily).
67
+ level: MUST
68
+ examples:
69
+ - "CI runs `terraform plan` on PR; plan output posted as PR comment"
70
+ - "Security group rule added via console → classified rollback-to-code; removed on next apply"
71
+ - "RDS storage autoscaled → classified update-code-from-actual; IaC updated to new size"
72
+ - "Daily drift scan via scheduled CI job; report posted to #infra-alerts Slack channel"
73
+
74
+ anti_patterns:
75
+ - "Committing local state files (terraform.tfstate) to version control"
76
+ - "Applying mutable in-place changes (e.g., sed-patching running VMs) instead of replacing resources"
77
+ - "Making manual console changes without updating the corresponding IaC definition"
78
+ - "Using no remote locking, allowing concurrent applies that corrupt state"
79
+ - "Pinning to `latest` provider or module versions, breaking reproducibility"
80
+
81
+ related_standards:
82
+ - containerization-standards
83
+ - secret-management-standards
@@ -0,0 +1,107 @@
1
+ # Incident Response Standards - AI Optimized
2
+ # Source: XSPEC-063 Wave 3 SRE Pack
3
+
4
+ id: incident-response
5
+ title: Incident Response Standards
6
+ version: "1.0.0"
7
+ status: Active
8
+ tags: [sre, incident, oncall, postmortem, severity]
9
+ summary: |
10
+ Defines the end-to-end incident response lifecycle: severity classification,
11
+ response time SLAs, roles and responsibilities, communication protocols,
12
+ escalation paths, and blameless postmortem requirements. Designed to reduce
13
+ MTTR, ensure consistent stakeholder communication during incidents, and
14
+ drive systemic reliability improvements through structured postmortems.
15
+
16
+ requirements:
17
+ - id: REQ-001
18
+ title: Severity Classification
19
+ description: |
20
+ Every incident MUST be classified at declaration using a 4-level
21
+ severity scale. SEV-1 (Critical): complete service outage or data
22
+ breach affecting all users, response within 15 minutes, C-suite
23
+ notification. SEV-2 (High): major feature unavailable or significant
24
+ performance degradation >25% users, response within 30 minutes.
25
+ SEV-3 (Medium): minor feature unavailable or degradation <25% users,
26
+ response within 4 hours. SEV-4 (Low): cosmetic issue or very minor
27
+ impact, response within 24 hours.
28
+ level: MUST
29
+ examples:
30
+ - "SEV-1: Payment processing completely down → IC declared, bridge opened in <5min"
31
+ - "SEV-2: Checkout latency >10s for 30% of users → on-call paged, IC assigned"
32
+ - "SEV-3: Search autocomplete broken → ticket created, fix in next sprint"
33
+
34
+ - id: REQ-002
35
+ title: Incident Commander Role
36
+ description: |
37
+ Every SEV-1 and SEV-2 incident MUST have a designated Incident
38
+ Commander (IC) assigned within 10 minutes of declaration. The IC is
39
+ responsible for: coordinating the response bridge, assigning roles
40
+ (scribe, comms lead, technical leads), driving timeline, making
41
+ go/no-go decisions on fixes, and initiating postmortem. The IC does
42
+ NOT directly troubleshoot — their sole focus is coordination.
43
+ level: MUST
44
+ examples:
45
+ - "IC assignment: 'I'm taking IC for this SEV-2, @alice please scribe, @bob comms'"
46
+ - "IC checklist: bridge open, roles assigned, status page updated, stakeholders notified"
47
+ - "IC does not debug code; delegates to technical leads who report findings"
48
+
49
+ - id: REQ-003
50
+ title: Stakeholder Communication Protocol
51
+ description: |
52
+ During SEV-1/SEV-2 incidents, stakeholder updates MUST be sent on a
53
+ defined cadence: initial notification within 15 minutes of declaration,
54
+ updates every 30 minutes until resolution, immediate update on any
55
+ severity change or major development. Updates MUST include: current
56
+ status, known impact, what is being done, next update time. Status
57
+ page MUST be updated simultaneously with internal communications.
58
+ level: MUST
59
+ examples:
60
+ - "T+15min: 'We are investigating elevated error rates on checkout. ~500 users affected. Next update in 30min.'"
61
+ - "T+45min: 'Root cause identified as database connection pool exhaustion. Fix in progress. Next update in 30min.'"
62
+ - "Resolution: 'Service restored at 14:32 UTC. Postmortem scheduled for 2026-05-02.'"
63
+
64
+ - id: REQ-004
65
+ title: Blameless Postmortem Requirements
66
+ description: |
67
+ Every SEV-1 incident MUST have a blameless postmortem completed within
68
+ 5 business days. SEV-2 incidents MUST have a postmortem within 10
69
+ business days. Postmortems MUST be blameless — focusing on systemic
70
+ causes, not individual mistakes. Required sections: timeline, impact,
71
+ root cause (5 Whys), contributing factors, action items with owners
72
+ and due dates, lessons learned. Action items MUST be tracked to
73
+ completion.
74
+ level: MUST
75
+ examples:
76
+ - "Timeline: 14:00 Alert fired → 14:05 IC assigned → 14:23 RCA found → 14:32 resolved"
77
+ - "Root cause: 5 Whys tracing alert → connection pool exhaustion → missing timeout config → no review gate"
78
+ - "Action item: INFRA-2341 Add connection pool monitoring, owner: @dave, due: 2026-05-15"
79
+
80
+ - id: REQ-005
81
+ title: On-Call Rotation and Handoff
82
+ description: |
83
+ Every production service MUST have a documented on-call rotation with
84
+ at least 2 engineers. Rotation schedules MUST be published at least
85
+ 2 weeks in advance. On-call handoff MUST include a written summary of:
86
+ active incidents, recent incidents still under investigation,
87
+ known flaky alerts, upcoming planned maintenance, and any service
88
+ health concerns. Handoff MUST be acknowledged by incoming on-call.
89
+ level: MUST
90
+ examples:
91
+ - "Handoff doc: 3 active flaky alerts (JIRA links), 1 ongoing SEV-3, maintenance window Friday 02:00 UTC"
92
+ - "Rotation: 1-week shifts, 2 primary + 1 secondary, published monthly in PagerDuty"
93
+ - "Handoff acknowledgment: incoming engineer replies 'Handoff received, I have the pager'"
94
+
95
+ - id: REQ-006
96
+ title: Incident Retrospective Metrics
97
+ description: |
98
+ Teams SHOULD track and review incident metrics monthly: MTTD (Mean
99
+ Time To Detect), MTTR (Mean Time To Resolve), incident frequency by
100
+ severity, repeat incidents (same root cause within 90 days), and
101
+ postmortem action item completion rate. These metrics SHOULD be
102
+ reviewed in monthly reliability reviews with engineering leadership.
103
+ level: SHOULD
104
+ examples:
105
+ - "Monthly metrics: MTTD 8min, MTTR 42min, 3 SEV-2s, 0 SEV-1s, 0 repeat incidents"
106
+ - "Repeat incident flag: same DB timeout root cause in March and April → escalate to reliability sprint"
107
+ - "Action item completion rate: 85% of previous month's items closed on time"
@@ -0,0 +1,106 @@
1
+ # License Compliance Standards - AI Optimized
2
+ # Source: XSPEC-066 Wave 3 Compliance Pack
3
+
4
+ id: license-compliance
5
+ title: License Compliance Standards
6
+ version: "1.0.0"
7
+ status: Active
8
+ tags: [compliance, licensing, open-source, legal, supply-chain]
9
+ summary: |
10
+ Defines how teams identify, track, and manage open-source and third-party
11
+ software licenses throughout the software development lifecycle. Covers
12
+ license classification (permissive vs. copyleft), prohibited licenses,
13
+ SBOM generation, license scanning in CI/CD, and remediation processes
14
+ for license violations. Designed to prevent legal exposure from
15
+ incompatible license combinations and ensure supply-chain transparency.
16
+
17
+ requirements:
18
+ - id: REQ-001
19
+ title: License Classification and Allowlist
20
+ description: |
21
+ Every project MUST maintain a documented license policy classifying
22
+ licenses into three tiers. APPROVED: MIT, Apache 2.0, BSD-2-Clause,
23
+ BSD-3-Clause, ISC, CC0 — can be used without review. REVIEW-REQUIRED:
24
+ LGPL-2.1, LGPL-3.0, MPL-2.0, CDDL — requires legal/architecture
25
+ review before adoption. PROHIBITED: GPL-2.0 (without exception),
26
+ GPL-3.0, AGPL-3.0, SSPL, Commons Clause additions — MUST NOT be
27
+ included in proprietary or commercial products.
28
+ level: MUST
29
+ examples:
30
+ - "MIT dependency lodash → auto-approved, no review needed"
31
+ - "LGPL-3.0 dependency → open GitHub issue tagged 'license-review' before merging"
32
+ - "GPL-3.0 dependency found in PR → PR blocked by CI until dependency replaced"
33
+
34
+ - id: REQ-002
35
+ title: Automated License Scanning in CI
36
+ description: |
37
+ Every repository MUST run automated license scanning on every pull
38
+ request and on a daily scheduled basis. The scan MUST fail the build
39
+ if any PROHIBITED license is detected in direct or transitive
40
+ dependencies. REVIEW-REQUIRED licenses MUST generate a warning that
41
+ blocks merge until manually approved and documented. Scan results
42
+ MUST be stored as build artifacts for 1 year.
43
+ level: MUST
44
+ examples:
45
+ - "CI step: `npx license-checker --onlyAllow 'MIT;Apache-2.0;BSD-2-Clause;BSD-3-Clause;ISC'`"
46
+ - "Daily scheduled scan via GitHub Actions: runs license-checker across all repos"
47
+ - "Build artifact: license-report-2026-04-30.json retained for 1 year"
48
+
49
+ - id: REQ-003
50
+ title: Software Bill of Materials (SBOM) Generation
51
+ description: |
52
+ Every production release MUST include a Software Bill of Materials
53
+ (SBOM) in SPDX 2.3 or CycloneDX 1.5 format. The SBOM MUST list all
54
+ direct and transitive dependencies with: package name, version,
55
+ license identifier (SPDX), and supplier. SBOMs MUST be generated
56
+ automatically as part of the release pipeline and stored alongside
57
+ release artifacts.
58
+ level: MUST
59
+ examples:
60
+ - "SBOM generated via: `syft . -o spdx-json > sbom-v1.2.0.spdx.json`"
61
+ - "SBOM uploaded to release: GitHub Release v1.2.0 includes sbom-v1.2.0.spdx.json"
62
+ - "SBOM SPDX entry: {name: 'lodash', version: '4.17.21', licenseConcluded: 'MIT'}"
63
+
64
+ - id: REQ-004
65
+ title: License Attribution and Notices
66
+ description: |
67
+ Products distributed to external users MUST include a NOTICES or
68
+ LICENSE-THIRD-PARTY file listing all open-source components and their
69
+ license texts. This file MUST be auto-generated from the SBOM data.
70
+ For web applications, attribution MUST be accessible via a dedicated
71
+ page or endpoint (e.g., /licenses or /legal/notices).
72
+ level: MUST
73
+ examples:
74
+ - "NOTICES file auto-generated: `npx generate-license-file --input package.json --output NOTICES`"
75
+ - "Web app: GET /legal/notices returns HTML page with all dependency licenses"
76
+ - "Mobile app: 'Open Source Licenses' screen in Settings menu"
77
+
78
+ - id: REQ-005
79
+ title: License Violation Remediation Process
80
+ description: |
81
+ When a license violation is detected, teams MUST follow the remediation
82
+ process: (1) immediately block merge/release if PROHIBITED license;
83
+ (2) create a tracking issue within 1 business day; (3) remediate
84
+ within 5 business days for PROHIBITED, 30 days for REVIEW-REQUIRED;
85
+ (4) document decision and alternative chosen; (5) update SBOM and
86
+ re-scan to verify clean. Unresolved violations MUST be reported to
87
+ the engineering lead monthly.
88
+ level: MUST
89
+ examples:
90
+ - "Violation: transitive dep uses GPL-3.0 → PR blocked, issue COMP-112 created same day"
91
+ - "Remediation: replaced dep with MIT-licensed alternative within 3 days"
92
+ - "Monthly report: 0 open violations as of 2026-04-30"
93
+
94
+ - id: REQ-006
95
+ title: License Review for New Technology Adoption
96
+ description: |
97
+ Before adopting any new framework, library, or tool, engineers SHOULD
98
+ verify its license tier as part of the technology evaluation. License
99
+ status SHOULD be documented in the relevant ADR or technical spike
100
+ document. For REVIEW-REQUIRED licenses, architecture review board
101
+ approval MUST be obtained before adoption.
102
+ level: SHOULD
103
+ examples:
104
+ - "ADR-042 notes: 'Library X uses Apache 2.0 — approved tier, no legal review needed'"
105
+ - "ADR-043 notes: 'Library Y uses LGPL-3.0 — review-required, legal approved 2026-03-10'"
106
+ - "Technology radar entry includes license classification for each evaluated tool"