universal-dev-standards 5.11.0 โ 5.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/ai/standards/acceptance-criteria-traceability.ai.yaml +10 -4
- package/bundled/ai/standards/deployment-standards.ai.yaml +50 -2
- package/bundled/ai/standards/full-coverage-testing.ai.yaml +8 -1
- package/bundled/ai/standards/license-compliance.ai.yaml +379 -10
- package/bundled/ai/standards/logging.ai.yaml +40 -3
- package/bundled/ai/standards/packaging-standards.ai.yaml +25 -2
- package/bundled/ai/standards/self-review-protocol.ai.yaml +144 -0
- package/bundled/ai/standards/test-governance.ai.yaml +19 -0
- package/bundled/core/deployment-standards.md +100 -2
- package/bundled/core/license-compliance.md +118 -0
- package/bundled/core/logging-standards.md +122 -2
- package/bundled/core/packaging-standards.md +72 -2
- package/bundled/core/self-review-protocol.md +160 -0
- package/bundled/locales/zh-CN/CHANGELOG.md +68 -3
- package/bundled/locales/zh-CN/README.md +2 -2
- package/bundled/locales/zh-CN/SECURITY.md +1 -1
- package/bundled/locales/zh-TW/CHANGELOG.md +68 -3
- package/bundled/locales/zh-TW/README.md +2 -2
- package/bundled/locales/zh-TW/SECURITY.md +1 -1
- package/bundled/locales/zh-TW/core/self-review-protocol.md +158 -0
- package/bundled/skills/README.md +3 -0
- package/bundled/skills/contract-test-assistant/SKILL.md +7 -0
- package/bundled/skills/deploy-assistant/SKILL.md +2 -0
- package/bundled/skills/logging-guide/SKILL.md +25 -2
- package/bundled/skills/migration-assistant/SKILL.md +104 -0
- package/bundled/skills/runbook-assistant/SKILL.md +8 -0
- package/package.json +2 -2
- package/standards-registry.json +17 -4
|
@@ -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
|
-
|
|
68
|
-
|
|
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
|
|
@@ -12,11 +12,14 @@ standard:
|
|
|
12
12
|
- "Automate build, test, deploy, and rollback"
|
|
13
13
|
|
|
14
14
|
meta:
|
|
15
|
-
version: "1.
|
|
16
|
-
updated: "2026-05-
|
|
15
|
+
version: "1.2.0"
|
|
16
|
+
updated: "2026-05-26"
|
|
17
17
|
source: core/deployment-standards.md
|
|
18
18
|
description: >
|
|
19
19
|
Safe deployment strategies, feature flags, rollback, environment parity, and DORA metrics.
|
|
20
|
+
v1.2.0: Added Defensive Deployment Ordering โ required extract-verify-then-delete sequence,
|
|
21
|
+
PowerShell + bash verify snippets, failure mode mapping, cross-link to packaging-standards
|
|
22
|
+
Archive Format Integrity (XSPEC-231 / closes issue #110).
|
|
20
23
|
v1.1.0: Added environment stratification responsibility matrix and stub server CI/CD
|
|
21
24
|
lifecycle rules (XSPEC-204).
|
|
22
25
|
|
|
@@ -230,6 +233,51 @@ stub_server_cicd_rules:
|
|
|
230
233
|
(a) fully testable in UAT via real service or Level 2 stub server, OR
|
|
231
234
|
(b) explicitly documented as PRD-smoke-only with a smoke test plan.
|
|
232
235
|
|
|
236
|
+
defensive_ordering:
|
|
237
|
+
scope: "destructive-update deploy patterns (stop โ swap โ start) common to Windows IIS, SystemD-managed services, and similar in-place replacement workflows."
|
|
238
|
+
forbidden_ordering: |
|
|
239
|
+
1. Stop service
|
|
240
|
+
2. Extract new package โ may silently no-op on format mismatch
|
|
241
|
+
3. Delete old install โ runs unconditionally โ destroys live install
|
|
242
|
+
4. Copy new install โ throws (source doesn't exist)
|
|
243
|
+
5. Start service โ cannot start (binaries gone)
|
|
244
|
+
required_ordering: |
|
|
245
|
+
1. Stop service
|
|
246
|
+
2. Extract new package โ staging area (NOT directly over live install)
|
|
247
|
+
3. โ
VERIFY staging area contains expected artifacts
|
|
248
|
+
โ if verification fails: abort, do NOT touch the live install
|
|
249
|
+
4. Backup live install (or earlier โ both is fine)
|
|
250
|
+
5. Delete old install (preserving logs / runtime data)
|
|
251
|
+
6. Copy new install from staging
|
|
252
|
+
7. Restore preserved configs
|
|
253
|
+
8. Start service
|
|
254
|
+
9. Sanity check (HTTP probe / health endpoint)
|
|
255
|
+
verify_step_3:
|
|
256
|
+
required: true
|
|
257
|
+
skip_allowed: false
|
|
258
|
+
minimum: "Test-Path / [ -f ... ] against at least one well-known file from the new package."
|
|
259
|
+
preferred: "Hash-check a manifest of expected files."
|
|
260
|
+
rules:
|
|
261
|
+
- id: extract-to-staging-not-live
|
|
262
|
+
requirement: "Step 2 MUST extract to a staging area separate from the live install path."
|
|
263
|
+
priority: required
|
|
264
|
+
- id: verify-before-destructive
|
|
265
|
+
requirement: "Step 3 MUST verify staging contents before any destructive step touches the live install. Failure MUST abort with live install untouched."
|
|
266
|
+
priority: required
|
|
267
|
+
- id: backup-required
|
|
268
|
+
requirement: "A backup of the live install MUST exist before step 5 (delete). Can be taken earlier."
|
|
269
|
+
priority: required
|
|
270
|
+
- id: preserve-runtime-data
|
|
271
|
+
requirement: "Step 5 MUST exclude logs and runtime data from deletion."
|
|
272
|
+
priority: required
|
|
273
|
+
failure_modes_addressed:
|
|
274
|
+
- wrong_format_archive: "Step 3 verify fails โ live install untouched"
|
|
275
|
+
- partial_extract: "Step 3 verify fails โ live install untouched"
|
|
276
|
+
- archive_root_changed: "Step 3 verify fails โ live install untouched"
|
|
277
|
+
- permission_denied_extract: "Step 3 verify fails โ live install untouched"
|
|
278
|
+
upstream_prevention: "Producer-side prevention via packaging-standards Archive Format Integrity. Both layers form defense-in-depth โ neither alone is sufficient."
|
|
279
|
+
failure_mode_reference: "PROD incident 2026-05-24: Expand-Archive silent no-op on tar-renamed-to-.zip + unconditional Remove-Item destroyed live install. ~3 minutes downtime. Step 3 verify would have aborted before destruction."
|
|
280
|
+
|
|
233
281
|
physical_spec:
|
|
234
282
|
type: custom_script
|
|
235
283
|
validator:
|
|
@@ -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
|
-
|
|
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
|
-
#
|
|
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
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
SBOM generation,
|
|
14
|
-
|
|
15
|
-
|
|
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.
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
id: logging
|
|
5
5
|
meta:
|
|
6
|
-
version: "1.
|
|
7
|
-
updated: "2026-
|
|
6
|
+
version: "1.3.0"
|
|
7
|
+
updated: "2026-05-26"
|
|
8
8
|
source: core/logging-standards.md
|
|
9
|
-
description: Logging levels, structured logging, and best practices
|
|
9
|
+
description: Logging levels, structured logging, file rotation policy, and best practices
|
|
10
10
|
|
|
11
11
|
log_levels:
|
|
12
12
|
ordered:
|
|
@@ -119,6 +119,43 @@ rules:
|
|
|
119
119
|
Correlate all three via trace_id/span_id
|
|
120
120
|
priority: recommended
|
|
121
121
|
|
|
122
|
+
- id: rotation-dual-trigger
|
|
123
|
+
trigger: configuring file-based log sink
|
|
124
|
+
instruction: |
|
|
125
|
+
File-based log sinks MUST set both rotation triggers:
|
|
126
|
+
1. Time-based: rollingInterval=Day (or equivalent)
|
|
127
|
+
2. Size-based: fileSizeLimitBytes explicit AND rollOnFileSizeLimit=true
|
|
128
|
+
Default size caps are hostile in production โ Serilog silently drops at 1 GB
|
|
129
|
+
if rollOnFileSizeLimit is left at default false; log4j / Winston / Python
|
|
130
|
+
RotatingFileHandler likewise drop or grow unbounded without explicit config.
|
|
131
|
+
Recommended starting value: fileSizeLimitBytes=104857600 (100 MB),
|
|
132
|
+
retainedFileCountLimit >= N*7 where N = max expected rolls per day.
|
|
133
|
+
priority: required
|
|
134
|
+
|
|
135
|
+
- id: rotation-ops-sop
|
|
136
|
+
trigger: log file size approaching cap
|
|
137
|
+
instruction: |
|
|
138
|
+
If a log file size reaches >= 90% of fileSizeLimitBytes at expected end-of-day,
|
|
139
|
+
INVESTIGATE the cause (noisy retry loop, unbounded debug logging, stack-trace
|
|
140
|
+
flood) BEFORE raising the cap. Raising the cap masks the noise problem.
|
|
141
|
+
priority: required
|
|
142
|
+
|
|
143
|
+
rotation_policy:
|
|
144
|
+
must_set_both:
|
|
145
|
+
time_based: rollingInterval=Day (or equivalent)
|
|
146
|
+
size_based:
|
|
147
|
+
fileSizeLimitBytes: explicit (100 MB recommended)
|
|
148
|
+
rollOnFileSizeLimit: true
|
|
149
|
+
hostile_defaults:
|
|
150
|
+
serilog: silently stops at 1 GB if rollOnFileSizeLimit=false
|
|
151
|
+
log4j: drops if no SizeBasedTriggeringPolicy
|
|
152
|
+
python_rotatingfilehandler: grows unbounded if maxBytes unset
|
|
153
|
+
winston: drops if maxSize unset
|
|
154
|
+
recommended:
|
|
155
|
+
fileSizeLimitBytes: 104857600
|
|
156
|
+
retainedFileCountLimit_formula: "N * 7 (N = max rolls/day)"
|
|
157
|
+
ops_sop: investigate noise root cause at >= 90% size before raising cap
|
|
158
|
+
|
|
122
159
|
quick_reference:
|
|
123
160
|
level_selection:
|
|
124
161
|
columns: [Question, Level]
|
|
@@ -12,8 +12,8 @@ standard:
|
|
|
12
12
|
- "Pipeline-integrated: packaging runs between Review and Deploy in the adoption-layer pipeline"
|
|
13
13
|
|
|
14
14
|
meta:
|
|
15
|
-
version: "1.
|
|
16
|
-
updated: "2026-
|
|
15
|
+
version: "1.1.0"
|
|
16
|
+
updated: "2026-05-26"
|
|
17
17
|
source: core/packaging-standards.md
|
|
18
18
|
|
|
19
19
|
principles:
|
|
@@ -135,6 +135,29 @@ recipe_selection_guide:
|
|
|
135
135
|
yes: windows-installer
|
|
136
136
|
no: custom-recipe-required
|
|
137
137
|
|
|
138
|
+
archive_format_integrity:
|
|
139
|
+
rules:
|
|
140
|
+
- id: real_format_matches_extension
|
|
141
|
+
requirement: "A .zip file MUST be a real ZIP archive (PKZip magic PK\\x03\\x04). A renamed POSIX tar with .zip extension is forbidden."
|
|
142
|
+
priority: required
|
|
143
|
+
- id: verify_before_publish
|
|
144
|
+
requirement: "Packaging step MUST verify the produced archive's real format before declaring success."
|
|
145
|
+
priority: required
|
|
146
|
+
verification_examples:
|
|
147
|
+
zip_python: "python -c \"import zipfile; zipfile.ZipFile('out.zip').namelist()\""
|
|
148
|
+
zip_unix: "file out.zip # expect 'Zip archive data', NOT 'POSIX tar archive'"
|
|
149
|
+
targz_unix: "tar -tzf out.tar.gz >/dev/null"
|
|
150
|
+
- id: windows_recipe_compliance
|
|
151
|
+
requirement: "On Windows, use PowerShell Compress-Archive or .NET ZipFile::CreateFromDirectory. Do NOT use git-bash 'tar -a -cf x.zip' โ the auto-extension flag produces a POSIX tar archive."
|
|
152
|
+
priority: required
|
|
153
|
+
do_use:
|
|
154
|
+
- "Compress-Archive -Path 'publish\\*' -DestinationPath 'dist\\patch.zip' -Force"
|
|
155
|
+
- "[System.IO.Compression.ZipFile]::CreateFromDirectory(...)"
|
|
156
|
+
do_not_use:
|
|
157
|
+
- "tar -a -cf x.zip ... # produces POSIX tar with .zip extension on Windows tar ports"
|
|
158
|
+
consumer_side_defense: "Producers cannot guarantee verification downstream. Deploy scripts MUST verify archive integrity before any destructive action โ see deployment-standards Defensive Deployment Ordering."
|
|
159
|
+
failure_mode_reference: "PROD incident 2026-05-24: tar-renamed-to-.zip + Expand-Archive silent no-op + unconditional Remove-Item destroyed live install. ~3 minutes downtime."
|
|
160
|
+
|
|
138
161
|
physical_spec:
|
|
139
162
|
type: custom_script
|
|
140
163
|
validator:
|