universal-dev-standards 5.3.2 → 5.5.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.
- package/bundled/ai/standards/adversarial-test.ai.yaml +277 -0
- package/bundled/ai/standards/agent-communication-protocol.ai.yaml +32 -166
- package/bundled/ai/standards/agent-dispatch.ai.yaml +32 -58
- package/bundled/ai/standards/audit-trail.ai.yaml +113 -0
- package/bundled/ai/standards/branch-completion.ai.yaml +34 -70
- package/bundled/ai/standards/change-batching-standards.ai.yaml +31 -180
- package/bundled/ai/standards/chaos-injection-tests.ai.yaml +91 -0
- package/bundled/ai/standards/container-image-standards.ai.yaml +88 -0
- package/bundled/ai/standards/container-security.ai.yaml +331 -0
- package/bundled/ai/standards/cost-budget-test.ai.yaml +96 -0
- package/bundled/ai/standards/data-contract.ai.yaml +110 -0
- package/bundled/ai/standards/data-migration-testing.ai.yaml +96 -0
- package/bundled/ai/standards/data-pipeline.ai.yaml +113 -0
- package/bundled/ai/standards/disaster-recovery-drill.ai.yaml +89 -0
- package/bundled/ai/standards/execution-history.ai.yaml +30 -288
- package/bundled/ai/standards/flaky-test-management.ai.yaml +89 -0
- package/bundled/ai/standards/flow-based-testing.ai.yaml +240 -0
- package/bundled/ai/standards/iac-design-principles.ai.yaml +83 -0
- package/bundled/ai/standards/incident-response.ai.yaml +107 -0
- package/bundled/ai/standards/license-compliance.ai.yaml +106 -0
- package/bundled/ai/standards/llm-output-validation.ai.yaml +269 -0
- package/bundled/ai/standards/mock-boundary.ai.yaml +250 -0
- package/bundled/ai/standards/mutation-testing.ai.yaml +192 -0
- package/bundled/ai/standards/pii-classification.ai.yaml +109 -0
- package/bundled/ai/standards/pipeline-integration-standards.ai.yaml +28 -169
- package/bundled/ai/standards/policy-as-code-testing.ai.yaml +227 -0
- package/bundled/ai/standards/prd-standards.ai.yaml +88 -0
- package/bundled/ai/standards/product-metrics-standards.ai.yaml +111 -0
- package/bundled/ai/standards/prompt-regression.ai.yaml +94 -0
- package/bundled/ai/standards/property-based-testing.ai.yaml +105 -0
- package/bundled/ai/standards/release-quality-manifest.ai.yaml +135 -0
- package/bundled/ai/standards/replay-test.ai.yaml +111 -0
- package/bundled/ai/standards/runbook.ai.yaml +104 -0
- package/bundled/ai/standards/sast-advanced.ai.yaml +135 -0
- package/bundled/ai/standards/schema-evolution.ai.yaml +111 -0
- package/bundled/ai/standards/secret-management-standards.ai.yaml +105 -0
- package/bundled/ai/standards/secure-op.ai.yaml +365 -0
- package/bundled/ai/standards/security-testing.ai.yaml +171 -0
- package/bundled/ai/standards/server-ops-security.ai.yaml +274 -0
- package/bundled/ai/standards/slo-sli.ai.yaml +97 -0
- package/bundled/ai/standards/smoke-test.ai.yaml +87 -0
- package/bundled/ai/standards/supply-chain-attestation.ai.yaml +109 -0
- package/bundled/ai/standards/test-completeness-dimensions.ai.yaml +52 -5
- package/bundled/ai/standards/user-story-mapping.ai.yaml +108 -0
- package/bundled/ai/standards/workflow-enforcement.ai.yaml +34 -240
- package/bundled/ai/standards/workflow-state-protocol.ai.yaml +31 -107
- package/bundled/core/adversarial-test.md +212 -0
- package/bundled/core/chaos-injection-tests.md +116 -0
- package/bundled/core/container-security.md +521 -0
- package/bundled/core/cost-budget-test.md +69 -0
- package/bundled/core/data-migration-testing.md +110 -0
- package/bundled/core/disaster-recovery-drill.md +73 -0
- package/bundled/core/flaky-test-management.md +73 -0
- package/bundled/core/flow-based-testing.md +142 -0
- package/bundled/core/llm-output-validation.md +178 -0
- package/bundled/core/mock-boundary.md +100 -0
- package/bundled/core/mutation-testing.md +97 -0
- package/bundled/core/policy-as-code-testing.md +188 -0
- package/bundled/core/prompt-regression.md +72 -0
- package/bundled/core/property-based-testing.md +73 -0
- package/bundled/core/release-quality-manifest.md +147 -0
- package/bundled/core/replay-test.md +86 -0
- package/bundled/core/sast-advanced.md +300 -0
- package/bundled/core/secure-op.md +314 -0
- package/bundled/core/security-testing.md +87 -0
- package/bundled/core/server-ops-security.md +493 -0
- package/bundled/core/smoke-test.md +65 -0
- package/bundled/core/supply-chain-attestation.md +117 -0
- package/bundled/locales/zh-CN/CHANGELOG.md +3 -3
- package/bundled/locales/zh-CN/README.md +1 -1
- package/bundled/locales/zh-CN/skills/ai-instruction-standards/SKILL.md +5 -5
- package/bundled/locales/zh-TW/CHANGELOG.md +3 -3
- package/bundled/locales/zh-TW/README.md +1 -1
- package/bundled/locales/zh-TW/skills/ai-instruction-standards/SKILL.md +183 -79
- package/bundled/skills/README.md +4 -3
- package/bundled/skills/SKILL_NAMING.md +94 -0
- package/bundled/skills/ai-instruction-standards/SKILL.md +181 -88
- package/bundled/skills/atdd-assistant/SKILL.md +8 -0
- package/bundled/skills/bdd-assistant/SKILL.md +7 -0
- package/bundled/skills/checkin-assistant/SKILL.md +8 -0
- package/bundled/skills/code-review-assistant/SKILL.md +7 -0
- package/bundled/skills/journey-test-assistant/SKILL.md +203 -0
- package/bundled/skills/orchestrate/SKILL.md +167 -0
- package/bundled/skills/plan/SKILL.md +234 -0
- package/bundled/skills/pr-automation-assistant/SKILL.md +8 -0
- package/bundled/skills/push/SKILL.md +49 -2
- package/bundled/skills/{process-automation → skill-builder}/SKILL.md +1 -1
- package/bundled/skills/{forward-derivation → spec-derivation}/SKILL.md +1 -1
- package/bundled/skills/spec-driven-dev/SKILL.md +7 -0
- package/bundled/skills/sweep/SKILL.md +145 -0
- package/bundled/skills/tdd-assistant/SKILL.md +7 -0
- package/package.json +1 -1
- package/src/commands/flow.js +8 -0
- package/src/commands/start.js +14 -0
- package/src/commands/sweep.js +8 -0
- package/src/commands/workflow.js +8 -0
- package/standards-registry.json +474 -12
- package/bundled/locales/zh-CN/skills/ac-coverage-assistant/SKILL.md +0 -190
- package/bundled/locales/zh-CN/skills/forward-derivation/SKILL.md +0 -71
- package/bundled/locales/zh-CN/skills/forward-derivation/guide.md +0 -130
- package/bundled/locales/zh-CN/skills/methodology-system/SKILL.md +0 -88
- package/bundled/locales/zh-CN/skills/methodology-system/create-methodology.md +0 -350
- package/bundled/locales/zh-CN/skills/methodology-system/guide.md +0 -131
- package/bundled/locales/zh-CN/skills/methodology-system/runtime.md +0 -279
- package/bundled/locales/zh-CN/skills/process-automation/SKILL.md +0 -143
- package/bundled/locales/zh-TW/skills/ac-coverage-assistant/SKILL.md +0 -195
- package/bundled/locales/zh-TW/skills/deploy-assistant/SKILL.md +0 -178
- package/bundled/locales/zh-TW/skills/forward-derivation/SKILL.md +0 -69
- package/bundled/locales/zh-TW/skills/forward-derivation/guide.md +0 -415
- package/bundled/locales/zh-TW/skills/methodology-system/SKILL.md +0 -86
- package/bundled/locales/zh-TW/skills/methodology-system/create-methodology.md +0 -350
- package/bundled/locales/zh-TW/skills/methodology-system/guide.md +0 -131
- package/bundled/locales/zh-TW/skills/methodology-system/runtime.md +0 -279
- package/bundled/locales/zh-TW/skills/process-automation/SKILL.md +0 -144
- /package/bundled/skills/{ac-coverage-assistant → ac-coverage}/SKILL.md +0 -0
- /package/bundled/skills/{methodology-system → dev-methodology}/SKILL.md +0 -0
- /package/bundled/skills/{methodology-system → dev-methodology}/create-methodology.md +0 -0
- /package/bundled/skills/{methodology-system → dev-methodology}/guide.md +0 -0
- /package/bundled/skills/{methodology-system → dev-methodology}/integrated-flow.md +0 -0
- /package/bundled/skills/{methodology-system → dev-methodology}/prerequisite-check.md +0 -0
- /package/bundled/skills/{methodology-system → dev-methodology}/runtime.md +0 -0
- /package/bundled/skills/{forward-derivation → spec-derivation}/guide.md +0 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Audit Trail Standards - AI Optimized
|
|
2
|
+
# Source: XSPEC-066 Wave 3 Compliance Pack
|
|
3
|
+
|
|
4
|
+
id: audit-trail
|
|
5
|
+
title: Audit Trail Standards
|
|
6
|
+
version: "1.0.0"
|
|
7
|
+
status: Active
|
|
8
|
+
tags: [compliance, audit, logging, security, governance, traceability]
|
|
9
|
+
summary: |
|
|
10
|
+
Defines the requirements for creating, storing, and managing immutable
|
|
11
|
+
audit trails across systems handling sensitive data, financial transactions,
|
|
12
|
+
access control changes, and compliance-relevant operations. Covers mandatory
|
|
13
|
+
event types, audit record schema, tamper-evidence requirements, retention
|
|
14
|
+
periods, query and export capabilities, and integration with SIEM systems.
|
|
15
|
+
Designed to satisfy SOC 2, ISO 27001, GDPR, and financial regulatory
|
|
16
|
+
requirements.
|
|
17
|
+
|
|
18
|
+
requirements:
|
|
19
|
+
- id: REQ-001
|
|
20
|
+
title: Mandatory Auditable Event Types
|
|
21
|
+
description: |
|
|
22
|
+
Systems MUST capture audit records for the following event categories
|
|
23
|
+
without exception: (1) Authentication events — login success/failure,
|
|
24
|
+
logout, MFA events, password changes; (2) Authorization events — access
|
|
25
|
+
granted/denied, privilege escalation, role changes; (3) Data access —
|
|
26
|
+
read/write/delete of TIER-1 and TIER-2 PII, bulk data exports;
|
|
27
|
+
(4) Configuration changes — system settings, security policy changes,
|
|
28
|
+
user/role management; (5) Financial transactions — payment processing,
|
|
29
|
+
refunds, balance changes; (6) Compliance-relevant actions — consent
|
|
30
|
+
changes, data erasure requests, legal holds.
|
|
31
|
+
level: MUST
|
|
32
|
+
examples:
|
|
33
|
+
- "Auth event: {type: 'LOGIN_FAILURE', user_id: 'u123', ip: '1.2.3.4', timestamp: '...'}"
|
|
34
|
+
- "Data access: {type: 'PII_READ', user_id: 'admin1', record_id: 'customer:456', fields: ['ssn']}"
|
|
35
|
+
- "Config change: {type: 'ROLE_GRANTED', admin_id: 'u789', target_user: 'u123', role: 'payments-admin'}"
|
|
36
|
+
|
|
37
|
+
- id: REQ-002
|
|
38
|
+
title: Audit Record Schema
|
|
39
|
+
description: |
|
|
40
|
+
Every audit record MUST contain the following mandatory fields:
|
|
41
|
+
event_id (UUID v4), event_type (enumerated string), timestamp (ISO 8601
|
|
42
|
+
UTC with milliseconds), actor_id (user or service account), actor_ip
|
|
43
|
+
(for user actions), resource_type, resource_id, action, outcome
|
|
44
|
+
(success/failure), and environment (production/staging). SHOULD also
|
|
45
|
+
include: session_id, request_id for correlation, before/after state
|
|
46
|
+
for mutations, and geographic region.
|
|
47
|
+
level: MUST
|
|
48
|
+
examples:
|
|
49
|
+
- "{event_id: 'a1b2c3d4-...', event_type: 'USER_LOGIN', timestamp: '2026-04-30T14:23:01.456Z', actor_id: 'u123', actor_ip: '1.2.3.4', outcome: 'success'}"
|
|
50
|
+
- "Mutation record includes: before_state: {role: 'viewer'}, after_state: {role: 'admin'}"
|
|
51
|
+
- "Service account action: actor_id: 'svc:payment-processor', actor_ip: omitted (internal)"
|
|
52
|
+
|
|
53
|
+
- id: REQ-003
|
|
54
|
+
title: Immutability and Tamper Evidence
|
|
55
|
+
description: |
|
|
56
|
+
Audit logs MUST be written to an append-only store that prevents
|
|
57
|
+
modification or deletion by application-level principals. Audit
|
|
58
|
+
records MUST include a cryptographic hash of the previous record
|
|
59
|
+
(chaining) to detect tampering. Write access to the audit log store
|
|
60
|
+
MUST be restricted to the audit service only — no engineer or
|
|
61
|
+
application service should have direct write access. Log integrity
|
|
62
|
+
MUST be verifiable on demand.
|
|
63
|
+
level: MUST
|
|
64
|
+
examples:
|
|
65
|
+
- "Audit log stored in append-only S3 with Object Lock (WORM) enabled"
|
|
66
|
+
- "Each record includes: prev_hash: SHA-256 of previous record's canonical JSON"
|
|
67
|
+
- "Integrity check: `audit-tool verify --from 2026-04-01 --to 2026-04-30` returns 'Chain intact'"
|
|
68
|
+
|
|
69
|
+
- id: REQ-004
|
|
70
|
+
title: Audit Log Retention Periods
|
|
71
|
+
description: |
|
|
72
|
+
Audit logs MUST be retained according to the following minimums by
|
|
73
|
+
category: authentication/authorization events — 1 year hot, 6 years
|
|
74
|
+
cold (SOC 2 / ISO 27001); financial transaction events — 7 years
|
|
75
|
+
(financial regulations); PII access events — 3 years; configuration
|
|
76
|
+
changes — 3 years; all other audit events — 1 year. Deletion of
|
|
77
|
+
audit records before their retention period expires is PROHIBITED.
|
|
78
|
+
Logs approaching expiry MUST be automatically archived to cold storage.
|
|
79
|
+
level: MUST
|
|
80
|
+
examples:
|
|
81
|
+
- "Auth logs: S3 lifecycle rule → Standard 1 year → Glacier 5 years additional → delete"
|
|
82
|
+
- "Financial events: Glacier Deep Archive after 1 year, retained 7 years total"
|
|
83
|
+
- "Automated alert: 'Audit log retention policy violation detected in logs/auth/2019/'"
|
|
84
|
+
|
|
85
|
+
- id: REQ-005
|
|
86
|
+
title: Audit Log Query and Export Capability
|
|
87
|
+
description: |
|
|
88
|
+
The audit system MUST provide query capabilities supporting: filter by
|
|
89
|
+
event_type, actor_id, resource_id, time range, and outcome. Query
|
|
90
|
+
results MUST be exportable in JSON and CSV formats. Queries returning
|
|
91
|
+
PII MUST themselves be logged as audit events. Audit data MUST be
|
|
92
|
+
accessible to authorized compliance and security teams within 4 hours
|
|
93
|
+
of a data request, and to regulators within 24 hours.
|
|
94
|
+
level: MUST
|
|
95
|
+
examples:
|
|
96
|
+
- "Query: GET /audit?actor_id=u123&from=2026-04-01&to=2026-04-30&event_type=PII_READ"
|
|
97
|
+
- "Export: POST /audit/export {format: 'csv', query: {...}} → download link in 5 minutes"
|
|
98
|
+
- "Query-of-query logged: {type: 'AUDIT_QUERY', queried_by: 'compliance-team', params: {...}}"
|
|
99
|
+
|
|
100
|
+
- id: REQ-006
|
|
101
|
+
title: SIEM Integration and Alerting
|
|
102
|
+
description: |
|
|
103
|
+
Audit logs SHOULD be forwarded in real-time to a SIEM (Security
|
|
104
|
+
Information and Event Management) system. SIEM SHOULD have automated
|
|
105
|
+
detection rules for: brute-force login patterns (>5 failures in 5min),
|
|
106
|
+
privilege escalation outside business hours, bulk PII exports (>1000
|
|
107
|
+
records in 1 hour), and access from new geographic regions. Alerts
|
|
108
|
+
SHOULD trigger on-call notification for high-severity detections.
|
|
109
|
+
level: SHOULD
|
|
110
|
+
examples:
|
|
111
|
+
- "Splunk/Elastic forwarding: audit events streamed via Kafka to SIEM in <30 seconds"
|
|
112
|
+
- "Detection rule: 5+ login failures same user in 5min → PagerDuty P2 alert"
|
|
113
|
+
- "Geo-anomaly: login from new country after 30+ days of consistent region → security review"
|
|
@@ -1,82 +1,46 @@
|
|
|
1
|
-
# Branch Completion Workflow -
|
|
2
|
-
#
|
|
3
|
-
#
|
|
1
|
+
# Branch Completion Workflow - DEPRECATED STUB
|
|
2
|
+
# This file has been migrated to DevAP per DEC-049 (UDS/DevAP responsibility split).
|
|
3
|
+
# Canonical location: dev-autopilot/standards/flow/branch-completion.ai.yaml
|
|
4
|
+
# Migration: XSPEC-086 Phase 2 (2026-04-27)
|
|
5
|
+
#
|
|
6
|
+
# Human-readable standard: core/branch-completion.md (remains in UDS)
|
|
7
|
+
# Deprecation schedule: UDS 5.4.0 deprecated → UDS 6.0.0 removed
|
|
4
8
|
|
|
5
9
|
standard:
|
|
6
10
|
id: branch-completion
|
|
7
|
-
name: Branch Completion Workflow
|
|
8
|
-
description: 分支完成工作流標準
|
|
9
|
-
|
|
10
11
|
meta:
|
|
11
|
-
version: "1.0.
|
|
12
|
-
updated: "2026-
|
|
12
|
+
version: "1.0.1"
|
|
13
|
+
updated: "2026-04-27"
|
|
14
|
+
deprecated: true
|
|
15
|
+
deprecated_since: "5.4.0"
|
|
16
|
+
removal_version: "6.0.0"
|
|
17
|
+
canonical_owner: devap
|
|
18
|
+
canonical_path: "dev-autopilot/standards/flow/branch-completion.ai.yaml"
|
|
13
19
|
source: core/branch-completion.md
|
|
14
|
-
description:
|
|
15
|
-
|
|
20
|
+
description: >
|
|
21
|
+
DEPRECATED: This standard has moved to DevAP (flow orchestration layer).
|
|
22
|
+
Install DevAP and load standards/flow/branch-completion.ai.yaml instead.
|
|
16
23
|
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
rules:
|
|
25
|
+
- id: deprecation-notice
|
|
26
|
+
trigger: any branch completion operation
|
|
27
|
+
instruction: >
|
|
28
|
+
This standard (branch-completion.ai.yaml) has been migrated to DevAP.
|
|
29
|
+
For the canonical executable definition, load:
|
|
30
|
+
dev-autopilot/standards/flow/branch-completion.ai.yaml
|
|
22
31
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
- "lint 通過"
|
|
26
|
-
- "type check 通過"
|
|
27
|
-
- "無未提交的變更"
|
|
32
|
+
The human-readable standard remains at:
|
|
33
|
+
universal-dev-standards/core/branch-completion.md
|
|
28
34
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
description: "合併到目標分支"
|
|
32
|
-
steps:
|
|
33
|
-
- "git checkout <target>"
|
|
34
|
-
- "git merge --no-ff <branch>"
|
|
35
|
-
- "刪除分支"
|
|
36
|
-
- "清理 worktree(若有)"
|
|
37
|
-
- id: create_pr
|
|
38
|
-
description: "建立 Pull Request"
|
|
39
|
-
steps:
|
|
40
|
-
- "推送分支到 remote"
|
|
41
|
-
- "建立 PR(含描述與測試計畫)"
|
|
42
|
-
- "等待審查"
|
|
43
|
-
- id: keep_as_is
|
|
44
|
-
description: "保持現狀不動"
|
|
45
|
-
steps:
|
|
46
|
-
- "記錄分支狀態"
|
|
47
|
-
- "提醒使用者稍後處理"
|
|
48
|
-
- id: discard
|
|
49
|
-
description: "丟棄所有變更"
|
|
50
|
-
steps:
|
|
51
|
-
- "要求使用者明確確認(輸入分支名稱)"
|
|
52
|
-
- "刪除分支(git branch -D)"
|
|
53
|
-
- "清理 worktree(若有)"
|
|
35
|
+
To install DevAP: npm install -g @devap/cli
|
|
36
|
+
priority: required
|
|
54
37
|
|
|
55
|
-
rules:
|
|
56
|
-
- id: BC-001
|
|
57
|
-
trigger: "使用者選擇 discard"
|
|
58
|
-
action: "要求輸入分支名稱確認,防止誤刪"
|
|
59
|
-
priority: critical
|
|
60
|
-
- id: BC-002
|
|
61
|
-
trigger: "分支有 worktree"
|
|
62
|
-
action: "完成後自動清理 worktree"
|
|
63
|
-
priority: high
|
|
64
38
|
- id: BC-003
|
|
65
39
|
trigger: "前置條件未滿足"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
trigger: "分支閒置超過 14 天"
|
|
70
|
-
action: "通知使用者完成或丟棄"
|
|
71
|
-
priority: medium
|
|
40
|
+
instruction: >
|
|
41
|
+
DEPRECATED — load dev-autopilot/standards/flow/branch-completion.ai.yaml
|
|
42
|
+
for the current executable branch completion flow.
|
|
72
43
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
type: ai_review
|
|
77
|
-
rule: "檢查分支完成是否遵循前置條件檢查和四選項流程"
|
|
78
|
-
checks:
|
|
79
|
-
- "完成前是否通過所有前置條件(測試、lint、type check)"
|
|
80
|
-
- "是否提供完成選項供使用者選擇"
|
|
81
|
-
- "Discard 操作是否要求明確確認"
|
|
82
|
-
- "關聯的 worktree 是否被清理"
|
|
44
|
+
Minimal fallback: Block branch completion when prerequisites (tests, lint,
|
|
45
|
+
type check, no uncommitted changes) are not met.
|
|
46
|
+
priority: high
|
|
@@ -1,195 +1,46 @@
|
|
|
1
|
-
# Change Batching Standards -
|
|
2
|
-
#
|
|
1
|
+
# Change Batching Standards - DEPRECATED STUB
|
|
2
|
+
# This file has been migrated to DevAP per DEC-049 (UDS/DevAP responsibility split).
|
|
3
|
+
# Canonical location: dev-autopilot/standards/flow/change-batching-standards.ai.yaml
|
|
4
|
+
# Migration: XSPEC-086 Phase 2 (2026-04-27)
|
|
5
|
+
#
|
|
6
|
+
# Human-readable standard: core/change-batching-standards.md (remains in UDS)
|
|
7
|
+
# Deprecation schedule: UDS 5.4.0 deprecated → UDS 6.0.0 removed
|
|
3
8
|
|
|
4
9
|
standard:
|
|
5
10
|
id: change-batching-standards
|
|
6
|
-
name: Change Batching Standards
|
|
7
|
-
description: Pending changes state machine, threshold strategies, and atomicity guarantees for batch commits
|
|
8
|
-
|
|
9
11
|
meta:
|
|
10
|
-
version: "1.0.
|
|
11
|
-
updated: "2026-
|
|
12
|
+
version: "1.0.1"
|
|
13
|
+
updated: "2026-04-27"
|
|
14
|
+
deprecated: true
|
|
15
|
+
deprecated_since: "5.4.0"
|
|
16
|
+
removal_version: "6.0.0"
|
|
17
|
+
canonical_owner: devap
|
|
18
|
+
canonical_path: "dev-autopilot/standards/flow/change-batching-standards.ai.yaml"
|
|
12
19
|
source: core/change-batching-standards.md
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- "Continuous Delivery (Jez Humble) — Small batch sizes"
|
|
17
|
-
- "Lean Software Development — Batch size optimization"
|
|
18
|
-
|
|
19
|
-
state_machine:
|
|
20
|
-
description: Pending changes lifecycle
|
|
21
|
-
states:
|
|
22
|
-
- state: PENDING
|
|
23
|
-
description: Change recorded, waiting for threshold
|
|
24
|
-
- state: READY
|
|
25
|
-
description: Threshold met, batch prepared for merge
|
|
26
|
-
- state: MERGED
|
|
27
|
-
description: Batch successfully committed
|
|
28
|
-
- state: FAILED
|
|
29
|
-
description: Merge attempt failed
|
|
30
|
-
- state: ARCHIVED
|
|
31
|
-
description: Post-commit record for audit
|
|
32
|
-
|
|
33
|
-
transitions:
|
|
34
|
-
- from: PENDING
|
|
35
|
-
to: PENDING
|
|
36
|
-
trigger: New change added
|
|
37
|
-
action: Increment counters, re-evaluate thresholds
|
|
38
|
-
- from: PENDING
|
|
39
|
-
to: READY
|
|
40
|
-
trigger: Threshold met
|
|
41
|
-
action: Prepare merge batch, run pre-merge validation
|
|
42
|
-
- from: READY
|
|
43
|
-
to: MERGED
|
|
44
|
-
trigger: Merge succeeds
|
|
45
|
-
action: Create commit, clear batch, archive
|
|
46
|
-
- from: READY
|
|
47
|
-
to: FAILED
|
|
48
|
-
trigger: Merge fails
|
|
49
|
-
action: Log failure, preserve changes
|
|
50
|
-
- from: FAILED
|
|
51
|
-
to: PENDING
|
|
52
|
-
trigger: Reset
|
|
53
|
-
action: Re-queue changes, clear failure state
|
|
54
|
-
- from: MERGED
|
|
55
|
-
to: ARCHIVED
|
|
56
|
-
trigger: Post-commit
|
|
57
|
-
action: Record batch metadata for audit
|
|
58
|
-
|
|
59
|
-
threshold_strategies:
|
|
60
|
-
strategies:
|
|
61
|
-
- name: count
|
|
62
|
-
parameter: maxChanges
|
|
63
|
-
default: 5
|
|
64
|
-
description: Merge after N individual changes accumulated
|
|
65
|
-
|
|
66
|
-
- name: score
|
|
67
|
-
parameter: maxScore
|
|
68
|
-
default: 10
|
|
69
|
-
description: Merge when cumulative change score >= M
|
|
70
|
-
|
|
71
|
-
- name: time
|
|
72
|
-
parameter: maxAge
|
|
73
|
-
default: "30m"
|
|
74
|
-
description: Merge when oldest pending change exceeds TTL
|
|
75
|
-
|
|
76
|
-
- name: manual
|
|
77
|
-
parameter: null
|
|
78
|
-
default: null
|
|
79
|
-
description: Merge only on explicit user request
|
|
80
|
-
|
|
81
|
-
change_scoring:
|
|
82
|
-
- type: trivial
|
|
83
|
-
score: 1
|
|
84
|
-
example: Typo fix, whitespace, comment update
|
|
85
|
-
- type: minor
|
|
86
|
-
score: 2
|
|
87
|
-
example: Single function change, variable rename
|
|
88
|
-
- type: standard
|
|
89
|
-
score: 3
|
|
90
|
-
example: New function, modified logic flow
|
|
91
|
-
- type: complex
|
|
92
|
-
score: 5
|
|
93
|
-
example: Multi-file change, API modification
|
|
94
|
-
- type: critical
|
|
95
|
-
score: 8
|
|
96
|
-
example: Schema change, breaking change
|
|
97
|
-
|
|
98
|
-
composite_rule: "Multiple thresholds combine with OR logic (first met triggers merge)"
|
|
99
|
-
|
|
100
|
-
merge_rules:
|
|
101
|
-
priority_order:
|
|
102
|
-
- Same-spec affinity — changes referencing same SPEC-ID merge first
|
|
103
|
-
- Same-file grouping — changes to same files merge together
|
|
104
|
-
- Dependency order — changes with dependencies merge in order
|
|
105
|
-
- Chronological — within same priority, merge by creation time
|
|
106
|
-
|
|
107
|
-
conflict_resolution:
|
|
108
|
-
- type: Same line, same file
|
|
109
|
-
strategy: Latest change wins
|
|
110
|
-
fallback: Manual resolution
|
|
111
|
-
- type: Overlapping functions
|
|
112
|
-
strategy: Semantic merge if possible
|
|
113
|
-
fallback: Manual resolution
|
|
114
|
-
- type: Dependency conflict
|
|
115
|
-
strategy: Resolve dependency first
|
|
116
|
-
fallback: Reject batch, split
|
|
117
|
-
|
|
118
|
-
pre_merge_validation:
|
|
119
|
-
- check: All tests pass
|
|
120
|
-
required: true
|
|
121
|
-
- check: No lint errors
|
|
122
|
-
required: true
|
|
123
|
-
- check: No conflicts
|
|
124
|
-
required: true
|
|
125
|
-
- check: AC coverage maintained
|
|
126
|
-
required: false
|
|
127
|
-
note: Recommended
|
|
128
|
-
|
|
129
|
-
atomicity:
|
|
130
|
-
principle: All-or-nothing
|
|
131
|
-
rules:
|
|
132
|
-
- Single commit — each merged batch produces exactly one commit
|
|
133
|
-
- No partial merge — any change failure rejects entire batch
|
|
134
|
-
- Rollback support — failed merges restore all changes to PENDING
|
|
135
|
-
- Isolation — batch merge does not affect changes outside batch
|
|
136
|
-
|
|
137
|
-
rollback:
|
|
138
|
-
on_failure:
|
|
139
|
-
- Log failure with batch details
|
|
140
|
-
- Return all changes to PENDING state
|
|
141
|
-
- Diagnose failing change(s)
|
|
142
|
-
- Options — fix and retry, remove failing change, split batch
|
|
143
|
-
|
|
144
|
-
triggers:
|
|
145
|
-
- trigger: Test failure
|
|
146
|
-
action: Reject entire batch
|
|
147
|
-
automatic: true
|
|
148
|
-
- trigger: Lint error
|
|
149
|
-
action: Reject entire batch
|
|
150
|
-
automatic: true
|
|
151
|
-
- trigger: Merge conflict
|
|
152
|
-
action: Reject and notify
|
|
153
|
-
automatic: true
|
|
154
|
-
- trigger: Build failure
|
|
155
|
-
action: Reject entire batch
|
|
156
|
-
automatic: true
|
|
157
|
-
- trigger: Manual rejection
|
|
158
|
-
action: Return to PENDING
|
|
159
|
-
automatic: false
|
|
20
|
+
description: >
|
|
21
|
+
DEPRECATED: This standard has moved to DevAP (flow orchestration layer).
|
|
22
|
+
Install DevAP and load standards/flow/change-batching-standards.ai.yaml instead.
|
|
160
23
|
|
|
161
24
|
rules:
|
|
162
|
-
- id:
|
|
163
|
-
trigger:
|
|
164
|
-
instruction:
|
|
165
|
-
|
|
25
|
+
- id: deprecation-notice
|
|
26
|
+
trigger: any batch change operation
|
|
27
|
+
instruction: >
|
|
28
|
+
This standard (change-batching-standards.ai.yaml) has been migrated to DevAP.
|
|
29
|
+
For the canonical executable definition, load:
|
|
30
|
+
dev-autopilot/standards/flow/change-batching-standards.ai.yaml
|
|
166
31
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
instruction: Group changes by specification or feature for cohesive commits
|
|
170
|
-
priority: recommended
|
|
32
|
+
The human-readable standard remains at:
|
|
33
|
+
universal-dev-standards/core/change-batching-standards.md
|
|
171
34
|
|
|
172
|
-
|
|
173
|
-
trigger: batch reaches READY state
|
|
174
|
-
instruction: Run full validation (tests, lint, conflicts) before merging
|
|
35
|
+
To install DevAP: npm install -g @devap/cli
|
|
175
36
|
priority: required
|
|
176
37
|
|
|
177
38
|
- id: atomic-commits
|
|
178
39
|
trigger: merging a batch
|
|
179
|
-
instruction:
|
|
180
|
-
|
|
40
|
+
instruction: >
|
|
41
|
+
DEPRECATED — load dev-autopilot/standards/flow/change-batching-standards.ai.yaml
|
|
42
|
+
for the current executable batch orchestration rules.
|
|
181
43
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
instruction: Return all changes to PENDING state; never lose changes
|
|
44
|
+
Minimal fallback: Enforce all-or-nothing batch merging — either all changes
|
|
45
|
+
commit or none do.
|
|
185
46
|
priority: required
|
|
186
|
-
|
|
187
|
-
- id: log-batch-decisions
|
|
188
|
-
trigger: any batch state transition
|
|
189
|
-
instruction: Log batch decisions (threshold met, merge result) for auditability
|
|
190
|
-
priority: recommended
|
|
191
|
-
|
|
192
|
-
related_standards:
|
|
193
|
-
- checkin-standards.md
|
|
194
|
-
- pipeline-integration-standards.md
|
|
195
|
-
- commit-message-guide.md
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Chaos Injection Test Standards - AI Optimized
|
|
2
|
+
# Source: core/chaos-injection-tests.md
|
|
3
|
+
|
|
4
|
+
id: chaos-injection-tests
|
|
5
|
+
meta:
|
|
6
|
+
version: "1.0.0"
|
|
7
|
+
updated: "2026-05-05"
|
|
8
|
+
source: core/chaos-injection-tests.md
|
|
9
|
+
description: Executable chaos injection tests for AI agent systems — DB disconnect, LLM timeout, policy engine failure
|
|
10
|
+
|
|
11
|
+
requirements:
|
|
12
|
+
REQ-1:
|
|
13
|
+
id: REQ-CIT-001
|
|
14
|
+
title: Dependency Failure Isolation Test
|
|
15
|
+
rule: >
|
|
16
|
+
Each external dependency (database, LLM API, policy engine, queue) MUST have at
|
|
17
|
+
least one chaos test that simulates its complete unavailability and verifies the
|
|
18
|
+
system fails gracefully (returns a well-defined error, does not panic, does not
|
|
19
|
+
corrupt state).
|
|
20
|
+
rationale: >
|
|
21
|
+
AI agent systems have more external dependencies than traditional software;
|
|
22
|
+
a single dependency failure should not cascade to full system failure.
|
|
23
|
+
|
|
24
|
+
REQ-2:
|
|
25
|
+
id: REQ-CIT-002
|
|
26
|
+
title: LLM Timeout and Rate-Limit Chaos Test
|
|
27
|
+
rule: >
|
|
28
|
+
The LLM client MUST be tested under simulated timeout (response after deadline)
|
|
29
|
+
and rate-limit (429 status) conditions. The system MUST: surface a typed error,
|
|
30
|
+
respect retry-with-backoff policy, and not hang indefinitely.
|
|
31
|
+
rationale: >
|
|
32
|
+
LLM APIs are the highest-latency and most rate-limited dependency in AI systems;
|
|
33
|
+
timeout handling is safety-critical for any real-time pipeline.
|
|
34
|
+
|
|
35
|
+
REQ-3:
|
|
36
|
+
id: REQ-CIT-003
|
|
37
|
+
title: Policy Engine Fail-Closed Test
|
|
38
|
+
rule: >
|
|
39
|
+
When the policy engine (e.g., OPA sidecar) is unavailable, the system MUST
|
|
40
|
+
default to DENY (fail-closed), not to ALLOW (fail-open). A chaos test MUST
|
|
41
|
+
simulate policy engine unavailability and assert DENY behavior.
|
|
42
|
+
rationale: >
|
|
43
|
+
Fail-open on policy engine failure is a security vulnerability; the chaos test
|
|
44
|
+
makes this invariant machine-verifiable.
|
|
45
|
+
|
|
46
|
+
REQ-4:
|
|
47
|
+
id: REQ-CIT-004
|
|
48
|
+
title: Database Disconnect Recovery Test
|
|
49
|
+
rule: >
|
|
50
|
+
The system MUST be tested under database disconnect mid-operation. The test MUST
|
|
51
|
+
verify: transaction is rolled back (no partial write), connection pool recovers
|
|
52
|
+
within N seconds, and subsequent operations succeed after reconnect.
|
|
53
|
+
rationale: >
|
|
54
|
+
Database disconnects happen during maintenance windows and network partitions;
|
|
55
|
+
partial writes without rollback are the primary source of data corruption.
|
|
56
|
+
|
|
57
|
+
REQ-5:
|
|
58
|
+
id: REQ-CIT-005
|
|
59
|
+
title: Blast Radius Containment Test
|
|
60
|
+
rule: >
|
|
61
|
+
Chaos tests MUST verify that a failure in one agent or subsystem does not
|
|
62
|
+
propagate to unrelated agents. Inter-agent failure isolation MUST be tested
|
|
63
|
+
via simulated agent crash mid-pipeline.
|
|
64
|
+
rationale: >
|
|
65
|
+
In multi-agent pipelines, unchecked error propagation is the primary cause of
|
|
66
|
+
full pipeline failure when only one component fails.
|
|
67
|
+
|
|
68
|
+
injection_patterns:
|
|
69
|
+
lm_timeout:
|
|
70
|
+
technique: "Mock LLM client to delay response beyond timeout deadline"
|
|
71
|
+
assertions: ["Error type is TimeoutError", "Retry count equals policy", "No deadlock"]
|
|
72
|
+
db_disconnect:
|
|
73
|
+
technique: "Close DB connection mid-transaction via test hook or jest.spyOn"
|
|
74
|
+
assertions: ["Transaction rolled back", "No partial rows written", "Pool reconnects"]
|
|
75
|
+
policy_engine_down:
|
|
76
|
+
technique: "Mock OPA HTTP client to return connection refused (ECONNREFUSED)"
|
|
77
|
+
assertions: ["Decision is DENY", "Error is logged at WARN+", "No state mutation"]
|
|
78
|
+
rate_limit:
|
|
79
|
+
technique: "Mock LLM client to return 429 with Retry-After header"
|
|
80
|
+
assertions: ["Backoff respects Retry-After", "Final error surfaces to caller"]
|
|
81
|
+
|
|
82
|
+
safety_rules:
|
|
83
|
+
- "Never run chaos tests against production or shared staging databases"
|
|
84
|
+
- "Chaos tests MUST clean up injected faults in afterEach/finally blocks"
|
|
85
|
+
- "Tag chaos tests with a dedicated suite marker to exclude from fast unit test runs"
|
|
86
|
+
|
|
87
|
+
related_standards:
|
|
88
|
+
- chaos-engineering-standards
|
|
89
|
+
- testing
|
|
90
|
+
- security-standards
|
|
91
|
+
- secure-op
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Container Image Standards - AI Optimized
|
|
2
|
+
# Source: XSPEC-065 Wave 4 IaC Pack
|
|
3
|
+
|
|
4
|
+
id: container-image-standards
|
|
5
|
+
title: Container Image Build and Security Standards
|
|
6
|
+
version: "1.0.0"
|
|
7
|
+
status: Active
|
|
8
|
+
tags: [container, docker, dockerfile, sbom, security, supply-chain]
|
|
9
|
+
summary: |
|
|
10
|
+
Defines security and compliance requirements for container image build
|
|
11
|
+
pipelines. Covers five Dockerfile authoring principles (multi-stage builds,
|
|
12
|
+
non-root execution, minimal base images, secret-free build args, SBOM
|
|
13
|
+
metadata), SBOM generation and embedding using syft or trivy, and image
|
|
14
|
+
scanning policies that block Critical/High CVEs. Complements the existing
|
|
15
|
+
containerization-standards (layer ordering and tagging) by focusing on
|
|
16
|
+
supply-chain security and compliance attestation.
|
|
17
|
+
|
|
18
|
+
requirements:
|
|
19
|
+
- id: REQ-001
|
|
20
|
+
title: Dockerfile Five Principles
|
|
21
|
+
description: |
|
|
22
|
+
Every production Dockerfile MUST follow five principles:
|
|
23
|
+
(1) Multi-stage build — use separate builder and runtime stages to
|
|
24
|
+
minimize final image size and attack surface.
|
|
25
|
+
(2) Non-root final user — the runtime stage MUST set a non-root USER
|
|
26
|
+
(UID ≥ 1000); running as root in production containers is prohibited.
|
|
27
|
+
(3) Distroless or Alpine base — use distroless (gcr.io/distroless) or
|
|
28
|
+
Alpine-based images as the final stage to minimize CVE exposure; avoid
|
|
29
|
+
full Debian/Ubuntu unless justified and documented.
|
|
30
|
+
(4) No hardcoded secrets — build ARGs and ENV variables MUST NOT contain
|
|
31
|
+
secrets; secrets are injected at runtime via volume mounts or secret
|
|
32
|
+
managers.
|
|
33
|
+
(5) SBOM metadata label — the final image MUST include an OCI label
|
|
34
|
+
`org.opencontainers.image.source` and a build-time label
|
|
35
|
+
`org.opencontainers.image.revision` containing the git commit SHA.
|
|
36
|
+
level: MUST
|
|
37
|
+
examples:
|
|
38
|
+
- "FROM node:20-alpine AS builder ... FROM gcr.io/distroless/nodejs20 AS runtime"
|
|
39
|
+
- "RUN addgroup -S app && adduser -S app -G app ... USER app"
|
|
40
|
+
- "LABEL org.opencontainers.image.revision=$GIT_SHA"
|
|
41
|
+
- "Secrets passed via `--mount=type=secret` in BuildKit, not ENV"
|
|
42
|
+
|
|
43
|
+
- id: REQ-002
|
|
44
|
+
title: SBOM Embedding
|
|
45
|
+
description: |
|
|
46
|
+
Every production container image MUST have a Software Bill of Materials
|
|
47
|
+
(SBOM) generated during the CI build step. SBOM MUST be generated using
|
|
48
|
+
syft or trivy in CycloneDX or SPDX format. The SBOM MUST be either:
|
|
49
|
+
(a) embedded as an OCI image annotation (preferred for OCI-compliant
|
|
50
|
+
registries), or (b) attached as a cosign attestation to the image digest.
|
|
51
|
+
SBOM artifacts MUST be stored alongside the image in the container
|
|
52
|
+
registry and retained for at least 12 months for compliance audits.
|
|
53
|
+
level: MUST
|
|
54
|
+
examples:
|
|
55
|
+
- "`syft packages docker:myapp:latest -o spdx-json > sbom.spdx.json`"
|
|
56
|
+
- "`cosign attest --type spdx --predicate sbom.spdx.json myregistry/myapp@sha256:...`"
|
|
57
|
+
- "SBOM attached to image in ECR; lifecycle policy retains for 365 days"
|
|
58
|
+
- "OCI annotation `org.opencontainers.image.sbom` pointing to SBOM digest"
|
|
59
|
+
|
|
60
|
+
- id: REQ-003
|
|
61
|
+
title: Image Scanning
|
|
62
|
+
description: |
|
|
63
|
+
All container images MUST be scanned for known CVEs before being pushed
|
|
64
|
+
to a production registry. Scanning MUST be integrated into the CI pipeline
|
|
65
|
+
using trivy, grype, or equivalent. Severity policy: Critical and High CVEs
|
|
66
|
+
MUST block the build and prevent image promotion to production; Medium CVEs
|
|
67
|
+
MUST generate a warning and create a tracked ticket; Low and Negligible CVEs
|
|
68
|
+
are informational only. Base image updates MUST be triggered automatically
|
|
69
|
+
when upstream images receive CVE patches (e.g., via Dependabot or Renovate
|
|
70
|
+
for Dockerfile base image pins).
|
|
71
|
+
level: MUST
|
|
72
|
+
examples:
|
|
73
|
+
- "`trivy image --exit-code 1 --severity CRITICAL,HIGH myapp:latest`"
|
|
74
|
+
- "CI step fails with exit code 1 on Critical CVE; build blocked from promotion"
|
|
75
|
+
- "Medium CVE detected → Jira ticket auto-created with CVE ID and affected package"
|
|
76
|
+
- "Renovate configured to auto-PR Dockerfile base image updates weekly"
|
|
77
|
+
|
|
78
|
+
anti_patterns:
|
|
79
|
+
- "Using `latest` tag for base images in production Dockerfiles (non-reproducible builds)"
|
|
80
|
+
- "Running container processes as root (UID 0) in the final runtime stage"
|
|
81
|
+
- "Embedding secrets in Docker build ARGs or ENV variables that persist in image layers"
|
|
82
|
+
- "Skipping SBOM generation to save CI time, losing supply-chain traceability"
|
|
83
|
+
- "Pushing images to production without CVE scanning results"
|
|
84
|
+
|
|
85
|
+
related_standards:
|
|
86
|
+
- containerization-standards
|
|
87
|
+
- secret-management-standards
|
|
88
|
+
- iac-design-principles
|