universal-dev-standards 5.10.0 → 5.12.1

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 (90) hide show
  1. package/bundled/ai/standards/acceptance-criteria-traceability.ai.yaml +10 -4
  2. package/bundled/ai/standards/full-coverage-testing.ai.yaml +8 -1
  3. package/bundled/ai/standards/license-compliance.ai.yaml +379 -10
  4. package/bundled/ai/standards/test-governance.ai.yaml +19 -0
  5. package/bundled/core/adversarial-test.md +3 -0
  6. package/bundled/core/behavior-snapshot.md +1 -1
  7. package/bundled/core/capability-declaration.md +3 -0
  8. package/bundled/core/cd-deployment-strategies.md +3 -0
  9. package/bundled/core/chaos-injection-tests.md +3 -0
  10. package/bundled/core/circuit-breaker.md +3 -0
  11. package/bundled/core/container-security.md +3 -0
  12. package/bundled/core/cost-budget-test.md +3 -0
  13. package/bundled/core/data-migration-testing.md +3 -0
  14. package/bundled/core/disaster-recovery-drill.md +3 -0
  15. package/bundled/core/dual-phase-output.md +3 -0
  16. package/bundled/core/failure-source-taxonomy.md +3 -0
  17. package/bundled/core/feature-manifest-standard.md +1 -1
  18. package/bundled/core/flaky-test-management.md +3 -0
  19. package/bundled/core/full-coverage-testing.md +3 -0
  20. package/bundled/core/health-check-standards.md +3 -0
  21. package/bundled/core/immutability-first.md +3 -0
  22. package/bundled/core/license-compliance.md +118 -0
  23. package/bundled/core/llm-output-validation.md +3 -0
  24. package/bundled/core/no-cicd-deployment.md +3 -0
  25. package/bundled/core/pipeline-security-gates.md +3 -0
  26. package/bundled/core/policy-as-code-testing.md +3 -0
  27. package/bundled/core/prompt-regression.md +3 -0
  28. package/bundled/core/property-based-testing.md +3 -0
  29. package/bundled/core/recovery-recipe-registry.md +3 -0
  30. package/bundled/core/release-quality-manifest.md +3 -0
  31. package/bundled/core/replay-test.md +3 -0
  32. package/bundled/core/retry-standards.md +3 -0
  33. package/bundled/core/rollback-standards.md +3 -0
  34. package/bundled/core/sast-advanced.md +1 -1
  35. package/bundled/core/secure-op.md +3 -0
  36. package/bundled/core/security-decision.md +3 -0
  37. package/bundled/core/server-ops-security.md +3 -0
  38. package/bundled/core/skill-standard-alignment-check.md +3 -0
  39. package/bundled/core/smoke-test.md +3 -0
  40. package/bundled/core/standard-admission-criteria.md +3 -0
  41. package/bundled/core/standard-lifecycle-management.md +3 -0
  42. package/bundled/core/supply-chain-attestation.md +3 -0
  43. package/bundled/core/timeout-standards.md +3 -0
  44. package/bundled/core/token-budget.md +3 -0
  45. package/bundled/locales/zh-CN/CHANGELOG.md +42 -3
  46. package/bundled/locales/zh-CN/CLAUDE.md +1 -1
  47. package/bundled/locales/zh-CN/README.md +3 -3
  48. package/bundled/locales/zh-CN/SECURITY.md +1 -2
  49. package/bundled/locales/zh-CN/docs/CHEATSHEET.md +127 -15
  50. package/bundled/locales/zh-CN/docs/FEATURE-REFERENCE.md +141 -25
  51. package/bundled/locales/zh-CN/skills/adr-assistant/SKILL.md +43 -0
  52. package/bundled/locales/zh-CN/skills/ai-collaboration-standards/SKILL.md +35 -0
  53. package/bundled/locales/zh-CN/skills/ai-friendly-architecture/SKILL.md +35 -0
  54. package/bundled/locales/zh-CN/skills/ai-instruction-standards/SKILL.md +35 -0
  55. package/bundled/locales/zh-CN/skills/contract-test-assistant/SKILL.md +24 -0
  56. package/bundled/locales/zh-CN/skills/documentation-guide/SKILL.md +37 -0
  57. package/bundled/locales/zh-CN/skills/error-code-guide/SKILL.md +33 -0
  58. package/bundled/locales/zh-CN/skills/git-workflow-guide/SKILL.md +34 -0
  59. package/bundled/locales/zh-CN/skills/logging-guide/SKILL.md +33 -0
  60. package/bundled/locales/zh-CN/skills/project-structure-guide/SKILL.md +19 -0
  61. package/bundled/locales/zh-CN/skills/retrospective-assistant/SKILL.md +38 -0
  62. package/bundled/locales/zh-CN/skills/testing-guide/SKILL.md +36 -0
  63. package/bundled/locales/zh-TW/CHANGELOG.md +49 -3
  64. package/bundled/locales/zh-TW/CLAUDE.md +1 -1
  65. package/bundled/locales/zh-TW/README.md +3 -3
  66. package/bundled/locales/zh-TW/SECURITY.md +1 -2
  67. package/bundled/locales/zh-TW/docs/CHEATSHEET.md +127 -15
  68. package/bundled/locales/zh-TW/docs/FEATURE-REFERENCE.md +141 -25
  69. package/bundled/locales/zh-TW/skills/adr-assistant/SKILL.md +43 -0
  70. package/bundled/locales/zh-TW/skills/ai-collaboration-standards/SKILL.md +35 -0
  71. package/bundled/locales/zh-TW/skills/ai-friendly-architecture/SKILL.md +35 -0
  72. package/bundled/locales/zh-TW/skills/ai-instruction-standards/SKILL.md +35 -0
  73. package/bundled/locales/zh-TW/skills/brainstorm-assistant/guide.md +661 -267
  74. package/bundled/locales/zh-TW/skills/contract-test-assistant/SKILL.md +24 -0
  75. package/bundled/locales/zh-TW/skills/documentation-guide/SKILL.md +37 -0
  76. package/bundled/locales/zh-TW/skills/error-code-guide/SKILL.md +33 -0
  77. package/bundled/locales/zh-TW/skills/git-workflow-guide/SKILL.md +34 -0
  78. package/bundled/locales/zh-TW/skills/logging-guide/SKILL.md +33 -0
  79. package/bundled/locales/zh-TW/skills/project-structure-guide/SKILL.md +19 -0
  80. package/bundled/locales/zh-TW/skills/retrospective-assistant/SKILL.md +38 -0
  81. package/bundled/locales/zh-TW/skills/testing-guide/SKILL.md +36 -0
  82. package/bundled/skills/README.md +4 -1
  83. package/bundled/skills/spec-driven-dev/SKILL.md +41 -0
  84. package/package.json +1 -1
  85. package/src/commands/update.js +35 -0
  86. package/src/config/ai-agent-paths.js +8 -0
  87. package/src/i18n/messages.js +3 -0
  88. package/src/utils/integration-generator.js +18 -2
  89. package/standards-registry.json +5 -4
  90. package/bundled/locales/zh-TW/docs/MIGRATION-V5.md +0 -79
@@ -61,11 +61,17 @@ standard:
61
61
 
62
62
  - status: not_implemented
63
63
  symbol: "🚫"
64
- definition: AC has no corresponding implementation (feature code does not exist)
64
+ definition: AC has no corresponding implementation or test verification (feature code or test body does not exist)
65
65
  criteria: |
66
- No business logic in src/ corresponds to this AC.
67
- Distinct from uncovered: uncovered = code exists but no test; not_implemented = code does not exist.
68
- Typical signals: throw NotImplementedException(), empty stub body, FEATURE_STUB: marker.
66
+ No business logic in src/ corresponds to this AC, OR the only test mapped
67
+ to this AC is an it.todo() placeholder (test body not implemented).
68
+ Distinct from uncovered: uncovered = code exists but test was forgotten;
69
+ not_implemented = explicitly marked as pending implementation.
70
+ Typical signals:
71
+ - throw NotImplementedException(), empty stub body, FEATURE_STUB: marker
72
+ - it.todo("AC-XXX: ...") — test slot reserved but verification not written
73
+ XSPEC-220: it.todo() tests map to not_implemented, NOT to uncovered.
74
+ Rationale: it.todo() is a deliberate placeholder, not an oversight.
69
75
  decision_tree: |
70
76
  Q1: Does the corresponding code exist in src/?
71
77
  No → not_implemented
@@ -75,13 +75,20 @@ standard:
75
75
  instruction: |
76
76
  FORBIDDEN: Tautology assertions that always pass regardless of behavior.
77
77
  These add false coverage without verifying anything.
78
+ AI SKELETON RULE (XSPEC-220): When generating unimplemented test skeletons,
79
+ use it.todo("AC-XXX: Given ... When ... Then ..."). Any it() callback whose
80
+ body contains only tautology assertions is an [ANTI-FAKE-001] violation,
81
+ regardless of whether the skeleton was generated by a human or an AI agent.
78
82
  priority: required
79
83
  forbidden_patterns:
80
84
  - "expect(true).toBe(true)"
81
85
  - "expect(false).toBe(false)"
82
86
  - "expect(result).toBeDefined() // without specific value"
83
87
  - "expect(result).not.toBeNull() // without specific value"
84
- required_instead: "expect(result).toBe(<specific expected value>)"
88
+ - "it('...', () => { expect(true).toBe(true) }) // AI-generated skeleton"
89
+ required_instead: |
90
+ Real assertion: expect(result).toBe(<specific expected value>)
91
+ Unimplemented skeleton: it.todo("AC-XXX: Given ... When ... Then ...")
85
92
 
86
93
  - id: no-mock-business-logic
87
94
  trigger: deciding what to mock
@@ -1,18 +1,102 @@
1
1
  # License Compliance Standards - AI Optimized
2
- # Source: XSPEC-066 Wave 3 Compliance Pack
2
+ # Sources:
3
+ # v1.0.0 — XSPEC-066 Wave 3 Compliance Pack (general OSS practices)
4
+ # v2.0.0 — XSPEC-193 §7.1 (AI-specific rules for AI-Generated Code)
5
+ # v2.1.0 — XSPEC-193 Phase 2 (ClearlyDefined API + AST PII + EmbeddingProvider + ASPEC-001)
3
6
 
4
7
  id: license-compliance
5
- title: License Compliance Standards
6
- version: "1.0.0"
8
+ title: License Compliance Standards for AI-Generated Code
9
+ version: "2.1.0"
7
10
  status: Active
8
- tags: [compliance, licensing, open-source, legal, supply-chain]
11
+ tags: [compliance, licensing, open-source, legal, supply-chain, ai-generated, eu-ai-act, sbom, pii, clearly-defined, ast-pii, embedding]
12
+ created: 2026-04-30
13
+ updated: 2026-05-16
14
+
15
+ agent_ref: ASPEC-001 # License Compliance Agent spec (XSPEC-205 format)
16
+
17
+ references:
18
+ - XSPEC-066 # v1.0.0 baseline - Wave 3 Compliance Pack
19
+ - XSPEC-193 # v2.0.0 + v2.1.0 AI-specific rules - VibeOps License Compliance Agent
20
+ - DEC-041 # EU AI Act compliance
21
+ - DEC-062 # Harness Engineering 2026 adoption
22
+ - DEC-063 # VibeOps legal & compliance strategy
23
+ - DEC-064 # Customer IP isolation (cache salt)
24
+ - XSPEC-189 # Telemetry Schema v2 (event types referenced below)
25
+ - ASPEC-001 # License Compliance Agent SPEC (XSPEC-205 §REQ-2 format)
26
+
9
27
  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.
28
+ Comprehensive license compliance for AI-augmented development.
29
+
30
+ Tier 1 (REQ-001~006) General OSS practices: license classification,
31
+ CI scanning, SBOM generation, attribution, violation remediation, and
32
+ technology adoption review. Applies to every project regardless of AI use.
33
+
34
+ Tier 2 (LC-001~009) — AI-specific rules: SPDX-first, independent evaluator,
35
+ evidence-based decisions, blocklist/allowlist/greylist enforcement, SBOM
36
+ required on every PR, PII pattern detection, copyright similarity check,
37
+ EU AI Act Article 50 transparency markers, and customer policy sovereignty.
38
+
39
+ Tier 2 is binding on AI Agents that produce code (VibeOps Generator Agent
40
+ and equivalents). Designed to prevent legal exposure from incompatible
41
+ license combinations, ensure supply-chain transparency, and satisfy
42
+ EU AI Act Article 50 obligations.
43
+
44
+ v2.1.0 enhancements (XSPEC-193 Phase 2, 2026-05-16):
45
+ - LC-001 now backed by ClearlyDefined API (confidence ≥ 0.95 when CD available)
46
+ - LC-007 PII detection upgraded with tree-sitter AST semantic context
47
+ - LC-006 copyright similarity upgraded with EmbeddingProvider strategy
48
+ (onnx-minilm / ollama-bge-m3 / jaccard fallback)
49
+
50
+ scope:
51
+ applies_to:
52
+ - AI-generated code (Generator Agent output)
53
+ - Dependency manifests (package.json / requirements.txt / go.mod / Cargo.toml / etc.)
54
+ - Open-source code snippet references and copy-paste
55
+ excludes:
56
+ - Internal-only tooling scripts with no external distribution (SBOM still recommended)
57
+ - Fully hand-written, non-AI-generated code (SBOM still recommended)
58
+
59
+ principles:
60
+ - id: P-1
61
+ name: SPDX First
62
+ description: |
63
+ All license identifiers MUST use SPDX standard IDs (https://spdx.org/licenses/).
64
+ Vague descriptions like "MIT-like" or "BSD-style" are prohibited. If no
65
+ SPDX match can be found, the Agent MUST escalate to a human rather than
66
+ guess.
67
+
68
+ - id: P-2
69
+ name: Independent Evaluator
70
+ description: |
71
+ The License Compliance Agent MUST use a model class different from the
72
+ code Generator Agent. This avoids Generator/Evaluator error correlation
73
+ and preserves review independence (DEC-062 H6).
74
+
75
+ - id: P-3
76
+ name: Evidence-Based Decision
77
+ description: |
78
+ Every block or review-required decision MUST carry traceable evidence:
79
+ SPDX ID lookup source, similarity score, comparison repo URL, etc.
80
+ Verdicts without evidence are prohibited.
81
+
82
+ - id: P-4
83
+ name: Transparency by Default
84
+ description: |
85
+ AI-generated output MUST carry a transparency marker per EU AI Act
86
+ Article 50. Marker removal requires explicit human action; an AI Agent
87
+ MAY NOT decide to remove markers autonomously.
88
+
89
+ - id: P-5
90
+ name: Customer Sovereignty
91
+ description: |
92
+ Customers MAY customize license policy within their accepted liability
93
+ scope, but MAY NOT bypass platform-floor limits set in the VibeOps
94
+ EULA §9. Overrides MUST be telemetered with justification.
95
+
96
+ # ─────────────────────────────────────────────────────────────
97
+ # Tier 1 — General OSS Compliance Practices (v1.0.0 baseline)
98
+ # Applies to every project regardless of AI use.
99
+ # ─────────────────────────────────────────────────────────────
16
100
 
17
101
  requirements:
18
102
  - id: REQ-001
@@ -104,3 +188,288 @@ requirements:
104
188
  - "ADR-042 notes: 'Library X uses Apache 2.0 — approved tier, no legal review needed'"
105
189
  - "ADR-043 notes: 'Library Y uses LGPL-3.0 — review-required, legal approved 2026-03-10'"
106
190
  - "Technology radar entry includes license classification for each evaluated tool"
191
+
192
+ # ─────────────────────────────────────────────────────────────
193
+ # Tier 2 — AI-Specific Rules (v2.0.0, XSPEC-193 §7.1)
194
+ # Binding on AI Agents that produce code.
195
+ # ─────────────────────────────────────────────────────────────
196
+
197
+ rules:
198
+ - id: LC-001
199
+ name: SPDX ID Lookup Required
200
+ severity: blocking
201
+ description: |
202
+ Every dependency license MUST be resolved to a SPDX standard ID
203
+ before any list comparison.
204
+
205
+ v2.1.0: Primary source is ClearlyDefined API (confidence ≥ 0.95 for
206
+ well-known packages). Falls back to SPDX database (confidence ≤ 0.8)
207
+ or package metadata heuristics. Requests are token-bucket-rate-limited
208
+ (10 req/s, burst 20) and cached with 24h TTL + DEC-064 client_salt
209
+ isolation. offline=true bypasses external calls entirely.
210
+ checks:
211
+ - "license_lookup() result must have non-null spdx_id"
212
+ - "If confidence < 0.7, escalate_to_human"
213
+ - "Free-text license fields from package metadata MUST NOT be used directly"
214
+ - "ClearlyDefined API: GET /definitions/{type}/{provider}/{namespace}/{name}/{revision}"
215
+ - "On 5xx: exponential backoff × 3 (200ms/1s/3s); on 429: batch fallback immediately"
216
+ - "Cache key = sha256(client_salt + ':' + purl) — DEC-064 isolation guaranteed"
217
+
218
+ - id: LC-002
219
+ name: Blocklist Auto-Block
220
+ severity: blocking
221
+ description: |
222
+ SPDX IDs on the Blocklist MUST trigger block_pr automatically. No
223
+ exception channel inside the platform (customer override layer may
224
+ remove items, but the override is logged via telemetry).
225
+ blocklist:
226
+ # Strong-copyleft (viral)
227
+ - GPL-2.0
228
+ - GPL-2.0-only
229
+ - GPL-2.0-or-later
230
+ - GPL-3.0
231
+ - GPL-3.0-only
232
+ - GPL-3.0-or-later
233
+ - AGPL-1.0
234
+ - AGPL-3.0
235
+ - AGPL-3.0-only
236
+ - AGPL-3.0-or-later
237
+ # Source-Available (non-OSS, commercially restrictive)
238
+ - SSPL-1.0
239
+ - Commons-Clause # Not a formal SPDX ID; treated as non-OSS
240
+ - BUSL-1.1
241
+ - BUSL-1.0
242
+ - Confluent-Community-License
243
+ - Elastic-License-2.0
244
+ checks:
245
+ - "license_blocklist_check() returns decision='block' → call block_pr() immediately"
246
+ - "block_pr() reason field is mandatory in form: '{pkg}@{version} uses {spdx_id}'"
247
+
248
+ - id: LC-003
249
+ name: Allowlist Auto-Approve
250
+ severity: informational
251
+ description: |
252
+ SPDX IDs on the Allowlist MUST be auto-approved, recorded in SBOM
253
+ without triggering review.
254
+ allowlist:
255
+ - MIT
256
+ - MIT-0
257
+ - BSD-2-Clause
258
+ - BSD-3-Clause
259
+ - BSD-3-Clause-Clear
260
+ - Apache-2.0
261
+ - ISC
262
+ - 0BSD
263
+ - CC0-1.0
264
+ - Unlicense
265
+ - Zlib
266
+ - WTFPL
267
+ - CC-BY-4.0 # Documentation only
268
+ - CC-BY-SA-4.0 # Documentation only
269
+ - Python-2.0 # PSF-specific
270
+
271
+ - id: LC-004
272
+ name: Greylist Human Review
273
+ severity: review_required
274
+ description: |
275
+ SPDX IDs on the Greylist enter the review queue. A human judges
276
+ whether the static/dynamic-linking model triggers copyleft contagion.
277
+ greylist:
278
+ - LGPL-2.1
279
+ - LGPL-2.1-only
280
+ - LGPL-2.1-or-later
281
+ - LGPL-3.0
282
+ - LGPL-3.0-only
283
+ - LGPL-3.0-or-later
284
+ - MPL-2.0
285
+ - EPL-1.0
286
+ - EPL-2.0
287
+ - CDDL-1.0
288
+ - CDDL-1.1
289
+ - GPL-Classpath-exception-2.0 # OpenJDK
290
+ review_guidance:
291
+ - "Determine static-link vs dynamic-link"
292
+ - "Determine whether the package is on the production path or only a dev/test dependency"
293
+ - "LGPL dynamic-link is generally safe; static-link requires legal sign-off"
294
+
295
+ - id: LC-005
296
+ name: SBOM Mandatory Generation
297
+ severity: blocking
298
+ description: |
299
+ Every dependency-list change or PR merge MUST regenerate the SBOM in
300
+ CycloneDX 1.5 or SPDX 2.3 format. SHA-256 hash of the SBOM file MUST
301
+ be recorded.
302
+ checks:
303
+ - "SBOM file passes the corresponding schema validation (CycloneDX XML/JSON schema)"
304
+ - "Every component in the SBOM has an SPDX license expression"
305
+ - "SBOM path: `{project_root}/sbom.cdx.json` (or `.spdx.json`)"
306
+
307
+ - id: LC-006
308
+ name: Copyright Similarity Threshold
309
+ severity: blocking
310
+ description: |
311
+ AI-generated code with embedding similarity ≥ 0.85 to a known
312
+ open-source repo MUST be inspected. If the source repo is on the
313
+ blocklist (GPL/AGPL), the PR MUST be blocked.
314
+
315
+ v2.1.0: EmbeddingProvider strategy (XSPEC-193 Phase 2):
316
+ - provider='onnx-minilm': local ONNX inference (all-MiniLM-L6-v2)
317
+ - provider='ollama-bge-m3': Ollama local API (bge-m3, localhost:11434)
318
+ - provider='jaccard' (default): Jaccard token similarity (Phase 1)
319
+ Known snippet index is per-customer (DEC-064 client_salt isolated).
320
+ External search is opt-in (enableExternalSearch=false by default).
321
+ checks:
322
+ - "overall_similarity >= 0.85 AND source_license in blocklist → block_pr"
323
+ - "overall_similarity >= 0.70 AND source_license in greylist → review"
324
+ - "overall_similarity >= 0.85 AND source_license in allowlist → record info event, do not block"
325
+ - "ONNX/Ollama unavailable → graceful fallback to Jaccard (no exception)"
326
+ - "snippet index build: buildSnippetIndex(snippets, provider) per-customer"
327
+ evidence_required:
328
+ - "source_repo URL"
329
+ - "source_license SPDX ID"
330
+ - "similarity score (4 decimal places)"
331
+ - "matched_section (first 5 lines of the snippet)"
332
+ - "embedding_provider used (for audit trail)"
333
+
334
+ - id: LC-007
335
+ name: PII Pattern Detection
336
+ severity: review_required
337
+ description: |
338
+ When AI-generated code contains a personal-data handling pattern,
339
+ issue a warning with a remediation hint. severity="critical" patterns
340
+ MUST escalate to human review.
341
+
342
+ v2.1.0: AST-enhanced detection via tree-sitter (XSPEC-193 Phase 2):
343
+ - Language support: TypeScript, JavaScript, Python
344
+ - AST context classification:
345
+ hardcoded_value → severity upgraded to critical
346
+ comment → severity downgraded to info
347
+ schema_field → ast_context='schema_field'
348
+ - Pragma support: // pii:ignore on same line suppresses finding
349
+ - tree-sitter unavailable → graceful fallback to regex (no exception)
350
+ - LLM assist: stub (enableLLMAssist=false default, Phase 3 integration)
351
+ - PIIPattern.confidence and PIIPattern.ast_context are new optional fields
352
+ pii_types:
353
+ critical:
354
+ - ssn # Social security number
355
+ - credit_card # Credit-card number
356
+ - biometric # Biometric identifiers
357
+ - health_record # Health records (HIPAA / Taiwan PDPA §6 special category)
358
+ warning:
359
+ - email
360
+ - phone
361
+ - id_number # National ID
362
+ - date_of_birth
363
+ - address
364
+ detection_strategy:
365
+ - "regex: field-name patterns (email, phone_number, ssn, credit_card_number, ...)"
366
+ - "ast: tree-sitter semantic context (hardcoded_value / comment / schema_field)"
367
+ - "llm_assist: ambiguous contexts (confidence threshold 0.8, Phase 3)"
368
+
369
+ - id: LC-008
370
+ name: EU AI Act Transparency Marker
371
+ severity: blocking
372
+ description: |
373
+ Every AI-generated source file MUST carry a transparency marker at
374
+ output time, per EU AI Act Article 50 (Limited-Risk transparency
375
+ obligation).
376
+ marker_format:
377
+ source_code: |
378
+ // AI-generated: VibeOps v{version} on {date}
379
+ // AI Generation Disclosure: Per EU AI Act Article 50.
380
+ // Modifications by humans should remove this notice.
381
+ markdown: |
382
+ ---
383
+ > AI Generation Disclosure: This content was AI-generated by VibeOps
384
+ > v{version} on {date}. Per EU AI Act Article 50.
385
+ json_yaml: |
386
+ _ai_generated: "VibeOps v{version} on {date} — EU AI Act Article 50"
387
+ checks:
388
+ - "Marker MUST be in the file header (source code) or metadata block (JSON/YAML)"
389
+ - "Marker removal requires the transparency_marker tool's explicit remove operation plus human confirmation"
390
+ - "When eu_ai_act_classifier() returns high_risk, additionally include a human_oversight statement"
391
+
392
+ - id: LC-009
393
+ name: Customer Policy Ceiling
394
+ severity: informational
395
+ description: |
396
+ Customers MAY adjust lists via ~/.vibeops/license-policy.yaml, but
397
+ adjustments MUST be telemetered (human_override_block event) and MUST
398
+ NOT modify the EULA §9 liability-allocation clause at the platform
399
+ layer.
400
+ checks:
401
+ - "If allowlist_add contains blocklist members, record a warning telemetry"
402
+ - "greylist_review: 'auto-allow' requires an extra telemetry tag customer_risk_accepted=true"
403
+ - "If the customer config schema validation fails, fall back to platform default policy"
404
+
405
+ # ─────────────────────────────────────────────────────────────
406
+ # Tool integration (XSPEC-193 §2, §3)
407
+ # ─────────────────────────────────────────────────────────────
408
+
409
+ tooling_integration:
410
+ description: |
411
+ Maps to the 10 tools defined in XSPEC-193 §2. Tool call order is fixed
412
+ to keep prompts cache-friendly under the DEC-064 cache-salt strategy.
413
+ tool_sequence:
414
+ 1: dependency_reader # Read dependency manifest
415
+ 2: license_lookup # SPDX lookup
416
+ 3: license_blocklist_check # Tier check
417
+ 4: sbom_generator # SBOM generation (LC-005)
418
+ 5: pii_pattern_detector # PII detection (LC-007)
419
+ 6: copyright_similarity_check # Copyright similarity (LC-006)
420
+ 7: eu_ai_act_classifier # EU AI Act risk classification
421
+ 8: transparency_marker # Transparency marker (LC-008)
422
+ 9: block_pr # Sole flow-interrupting authority
423
+ 10: suggest_alternative # Alternative package suggestion (XSPEC-193 §4.5)
424
+ 11: escalate_to_human # Fallback when automation cannot decide
425
+
426
+ # ─────────────────────────────────────────────────────────────
427
+ # Telemetry (DEC-066 / XSPEC-189 v2 envelope)
428
+ # ─────────────────────────────────────────────────────────────
429
+
430
+ telemetry:
431
+ required_events:
432
+ - license_compliance_result # Final result of each review
433
+ - block_pr # Block event detail
434
+ - license_lookup_failure # SPDX lookup failure (drives alternative-table updates)
435
+ - copyright_similarity_high # High-similarity warning
436
+ - eu_ai_act_classification # Classification distribution
437
+ - human_override_block # Human override of a block (requires reason)
438
+ envelope_reference: XSPEC-189 # Telemetry Schema v2 envelope
439
+ event_type: quality
440
+ event_subtype_examples:
441
+ - license_compliance_result # LC rule outcomes
442
+ - gate_pass / gate_fail # When License Compliance acts as a gate
443
+
444
+ # ─────────────────────────────────────────────────────────────
445
+ # Adoption guidance
446
+ # ─────────────────────────────────────────────────────────────
447
+
448
+ adoption_guidance:
449
+ uds_install_path: ai/standards/license-compliance.ai.yaml
450
+ vibeops_config_path: src/agents/license-compliance/rules.yaml
451
+ customer_config_path: ~/.vibeops/license-policy.yaml
452
+ notes:
453
+ - "v2.1.0 adds ClearlyDefined API integration, AST PII analysis, and EmbeddingProvider strategy. Requires VibeOps ≥ v1.6.0 (commit c44a4bf)."
454
+ - "v2.0.0 Tier 2 rules are Active for AI-augmented projects. Legal sign-off on the blocklist remains pending; treat the blocklist as authoritative-pending-review."
455
+ - "LGPL greylist decisions should consult legal counsel."
456
+ - "Alternative-package table (XSPEC-193 §4.5) is updated quarterly, driven by license_lookup_failure telemetry."
457
+ - "When this standard is consumed by VibeOps, the License Compliance Agent enforces every LC rule listed above. Other adopters MAY choose to enforce LC rules via CI alone (Tier 1 REQ-002 path)."
458
+
459
+ # ─────────────────────────────────────────────────────────────
460
+ # Compatibility note
461
+ # ─────────────────────────────────────────────────────────────
462
+
463
+ compatibility:
464
+ v1_to_v2: |
465
+ v1.0.0 REQ-001~006 are unchanged and remain authoritative for general
466
+ OSS practice. v2.0.0 adds Tier 2 LC-001~009 as a strict superset for
467
+ AI-augmented projects. A project that adopted v1.0.0 remains compliant;
468
+ AI-augmented projects MUST additionally enforce Tier 2.
469
+ v2_to_v2_1: |
470
+ v2.1.0 is a backward-compatible superset of v2.0.0. New features
471
+ (ClearlyDefined API, AST PII, EmbeddingProvider) are opt-in via
472
+ ComplianceAgentConfig. All existing LC-001~009 rules are unchanged.
473
+ PIIPattern gains optional fields (confidence, ast_context); existing
474
+ code that reads PIIPattern is unaffected.
475
+ Minimum runtime: Node.js 22 + VibeOps v1.6.0.
@@ -158,3 +158,22 @@ standard:
158
158
  evidence: >
159
159
  BUG-A08 post-mortem (2026-04-20): 22 tests existed in UDS but were never
160
160
  executed by any CI gate, passing silently and masking real failures.
161
+
162
+ - id: gate-wiring-required
163
+ trigger: adding any quality detection script to the repository
164
+ instruction: |
165
+ Quality detection scripts (anti-fake check, stub check, coverage ratchet,
166
+ tautology scanner) MUST appear in at least one CI workflow job AND at least
167
+ one local hook (pre-commit or pre-push). A script that exists in scripts/
168
+ but is never called by CI is equivalent to not existing and constitutes a
169
+ governance gap. Apply the same execution-continuity principle to detection
170
+ scripts as to test cases: existence ≠ execution.
171
+ Checklist when adding a detection script:
172
+ [ ] Script is called in .github/workflows/*.yml (at least one job)
173
+ [ ] Script is called in .husky/pre-commit or .husky/pre-push
174
+ [ ] CI step name references the XSPEC or standard that mandates it
175
+ priority: required
176
+ evidence: >
177
+ XSPEC-220 post-mortem (2026-05-19): check-anti-fake-tests.sh existed in
178
+ vibeops/scripts/ for months but was not called by pre-commit, allowing
179
+ tautology assertions to be committed undetected.
@@ -210,3 +210,6 @@ Layer 4: 稽核日誌(hash chain) — 確保不可篡改
210
210
  - ISO/IEC 42001:2023 — AI 管理系統
211
211
  - [UDS `secure-op.ai.yaml`](./secure-op.md) — AI Agent 安全操作六大支柱
212
212
  - [UDS `llm-output-validation.ai.yaml`](./llm-output-validation.md) — LLM 輸出驗證標準
213
+
214
+
215
+ **Scope**: universal
@@ -3,7 +3,7 @@
3
3
  > **Language**: English | 繁體中文
4
4
 
5
5
  **Applicability**: Migration and refactoring projects requiring behavioral parity verification
6
- **Scope**: universal (HTTP-based systems)
6
+ **Scope**: universal
7
7
 
8
8
  ---
9
9
 
@@ -57,3 +57,6 @@ const FAIL_CLOSED_DEFAULTS: CapabilityDeclaration = {
57
57
  - AI-optimized: [ai/standards/capability-declaration.ai.yaml](../ai/standards/capability-declaration.ai.yaml)
58
58
  - XSPEC-037: Cross-project specification
59
59
  - Borrowed from: [claude-code-book](https://github.com/lintsinghua/claude-code-book) Ch.3 `buildTool` Fail-Closed factory
60
+
61
+
62
+ **Scope**: universal
@@ -119,3 +119,6 @@ Q4: 基礎設施預算有限?
119
119
  - [rollback-standards.md](rollback-standards.md) — 回滾觸發條件矩陣
120
120
  - [no-cicd-deployment.md](no-cicd-deployment.md) — 無 CI/CD 部署策略
121
121
  - AI 格式:[../ai/standards/cd-deployment-strategies.ai.yaml](../ai/standards/cd-deployment-strategies.ai.yaml)
122
+
123
+
124
+ **Scope**: universal
@@ -114,3 +114,6 @@ it('pipeline continues when one agent throws', async () => {
114
114
  - `testing.ai.yaml` — general test structure
115
115
  - `secure-op.ai.yaml` — Fail-Closed principle for AI agents
116
116
  - `security-standards.ai.yaml` — security invariants
117
+
118
+
119
+ **Scope**: universal
@@ -56,3 +56,6 @@ interface CircuitBreaker {
56
56
  - AI-optimized: [ai/standards/circuit-breaker.ai.yaml](../ai/standards/circuit-breaker.ai.yaml)
57
57
  - XSPEC-036: Cross-project specification
58
58
  - Borrowed from: [claude-code-book](https://github.com/lintsinghua/claude-code-book) Ch.2 `MAX_CONSECUTIVE_AUTOCOMPACT_FAILURES`
59
+
60
+
61
+ **Scope**: universal
@@ -519,3 +519,6 @@ lsattr /var/log/ai-agent/audit # 驗證 a 屬性
519
519
  □ Audit log volume:append-only partition(非 emptyDir)
520
520
  □ Lockfile 固定(npm ci / pip --require-hashes / go mod verify)
521
521
  ```
522
+
523
+
524
+ **Scope**: universal
@@ -67,3 +67,6 @@ describe("PipelineBudgetConfig semantics", () => {
67
67
  - [Mutation Testing Standards](mutation-testing.md) — constants without test coverage survive mutations
68
68
  - [Testing Standards](testing.md) — overall test pyramid
69
69
  - [LLM Output Validation](llm-output-validation.md) — output-layer budget constraints
70
+
71
+
72
+ **Scope**: universal
@@ -108,3 +108,6 @@ Use `testcontainers` to spin up a fresh PostgreSQL container per test suite. The
108
108
  - `database-standards.ai.yaml` — schema design principles
109
109
  - `testing.ai.yaml` — general test structure and pyramid
110
110
  - `verification-evidence.ai.yaml` — audit evidence requirements
111
+
112
+
113
+ **Scope**: universal
@@ -71,3 +71,6 @@ See `docs/DR-RUNBOOK.md` for the full runbook template.
71
71
  - [Deployment Standards](deployment-standards.md) — deployment pipeline
72
72
  - [Chaos Engineering Standards](chaos-engineering-standards.md) — failure injection
73
73
  - [Verification Evidence Standards](verification-evidence.md) — drill records
74
+
75
+
76
+ **Scope**: universal
@@ -54,3 +54,6 @@ Applications may add fields inside `<summary>` but must not remove core fields:
54
54
  - AI-optimized: [ai/standards/dual-phase-output.ai.yaml](../ai/standards/dual-phase-output.ai.yaml)
55
55
  - XSPEC-035: Cross-project specification
56
56
  - Borrowed from: [claude-code-book](https://github.com/lintsinghua/claude-code-book) Ch.7 `formatCompactSummary`
57
+
58
+
59
+ **Scope**: universal
@@ -70,3 +70,6 @@ interface FailureDetail {
70
70
  - XSPEC-045: Cross-project specification
71
71
  - Depends on: Recovery Recipe Registry (XSPEC-046)
72
72
  - Borrowed from: [ultraworkers/claw-code](https://github.com/ultraworkers/claw-code) ROADMAP Phase 2 Failure Taxonomy
73
+
74
+
75
+ **Scope**: universal
@@ -3,7 +3,7 @@
3
3
  > **Language**: English | 繁體中文
4
4
 
5
5
  **Applicability**: Migration and refactoring projects where an existing system is being ported or restructured
6
- **Scope**: universal (language-agnostic manifest format)
6
+ **Scope**: universal
7
7
 
8
8
  ---
9
9
 
@@ -71,3 +71,6 @@ export default defineConfig({
71
71
 
72
72
  - [Testing Standards](testing.md) — overall test pyramid
73
73
  - [Test Governance Standards](test-governance.md) — CI policies
74
+
75
+
76
+ **Scope**: universal
@@ -181,3 +181,6 @@ The ratchet starts at your current coverage. From that point on, it can only inc
181
181
  - `integration-testing.ai.yaml` — Integration test patterns
182
182
  - `deployment-standards.ai.yaml` — Deploy gate requirements
183
183
  - XSPEC-178 — Full specification and implementation phases
184
+
185
+
186
+ **Scope**: universal
@@ -70,3 +70,6 @@
70
70
  - DEC-043: UDS 覆蓋完整性路線圖(驅動來源)
71
71
  - Related: `deployment-standards`, `circuit-breaker`, observability-standards (XSPEC-063 規劃中)
72
72
  - Industry: Kubernetes probes, Microsoft eShop health checks, Google SRE Book Ch.6
73
+
74
+
75
+ **Scope**: universal
@@ -103,3 +103,6 @@ interface PipelineMemoryEntry {
103
103
 
104
104
  - AI-optimized: [ai/standards/immutability-first.ai.yaml](../ai/standards/immutability-first.ai.yaml)
105
105
  - XSPEC-044: Cross-project specification
106
+
107
+
108
+ **Scope**: universal