contract-driven-delivery 1.0.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/README.md +142 -0
- package/assets/AGENTS.template.md +21 -0
- package/assets/CLAUDE.template.md +159 -0
- package/assets/agents/backend-engineer.md +24 -0
- package/assets/agents/change-classifier.md +73 -0
- package/assets/agents/ci-cd-gatekeeper.md +40 -0
- package/assets/agents/contract-reviewer.md +42 -0
- package/assets/agents/e2e-resilience-engineer.md +25 -0
- package/assets/agents/frontend-engineer.md +22 -0
- package/assets/agents/monkey-test-engineer.md +29 -0
- package/assets/agents/qa-reviewer.md +49 -0
- package/assets/agents/repo-context-scanner.md +71 -0
- package/assets/agents/spec-architect.md +47 -0
- package/assets/agents/spec-drift-auditor.md +41 -0
- package/assets/agents/stress-soak-engineer.md +51 -0
- package/assets/agents/test-strategist.md +57 -0
- package/assets/agents/ui-ux-reviewer.md +42 -0
- package/assets/agents/visual-reviewer.md +44 -0
- package/assets/ci/gate-policy.md +51 -0
- package/assets/ci/github-actions/contract-driven-gates.yml +38 -0
- package/assets/ci/required-check-policy.md +13 -0
- package/assets/contracts/api/api-contract.md +20 -0
- package/assets/contracts/api/api-inventory.md +13 -0
- package/assets/contracts/api/error-format.md +19 -0
- package/assets/contracts/business/business-rules.md +13 -0
- package/assets/contracts/ci/ci-gate-contract.md +13 -0
- package/assets/contracts/css/css-contract.md +15 -0
- package/assets/contracts/css/design-tokens.md +13 -0
- package/assets/contracts/data/data-shape-contract.md +22 -0
- package/assets/contracts/env/.env.example.template +5 -0
- package/assets/contracts/env/env-contract.md +12 -0
- package/assets/contracts/env/env.schema.json +7 -0
- package/assets/skill/SKILL.md +102 -0
- package/assets/skill/agents/openai.yaml +2 -0
- package/assets/skill/references/api-contract-standard.md +55 -0
- package/assets/skill/references/business-logic-standard.md +32 -0
- package/assets/skill/references/ci-cd-policy.md +34 -0
- package/assets/skill/references/css-contract-standard.md +40 -0
- package/assets/skill/references/data-contract-standard.md +43 -0
- package/assets/skill/references/e2e-standard.md +33 -0
- package/assets/skill/references/env-contract-standard.md +30 -0
- package/assets/skill/references/monkey-operation-standard.md +32 -0
- package/assets/skill/references/qa-gates.md +37 -0
- package/assets/skill/references/sdd-tdd-policy.md +53 -0
- package/assets/skill/references/spec-drift-policy.md +28 -0
- package/assets/skill/references/stress-soak-standard.md +42 -0
- package/assets/skill/references/visual-review-standard.md +27 -0
- package/assets/skill/references/workflow-router.md +34 -0
- package/assets/skill/scripts/detect_project_profile.py +61 -0
- package/assets/skill/scripts/generate_change_scaffold.py +38 -0
- package/assets/skill/scripts/validate_ci_gates.py +14 -0
- package/assets/skill/scripts/validate_contracts.py +13 -0
- package/assets/skill/scripts/validate_env_contract.py +16 -0
- package/assets/skill/scripts/validate_spec_traceability.py +18 -0
- package/assets/skill/templates/archive.md +17 -0
- package/assets/skill/templates/change-classification.md +48 -0
- package/assets/skill/templates/change-request.md +15 -0
- package/assets/skill/templates/ci-gates.md +31 -0
- package/assets/skill/templates/contracts.md +37 -0
- package/assets/skill/templates/current-behavior.md +17 -0
- package/assets/skill/templates/design.md +23 -0
- package/assets/skill/templates/monkey-test-report.md +17 -0
- package/assets/skill/templates/project-profile.md +38 -0
- package/assets/skill/templates/proposal.md +17 -0
- package/assets/skill/templates/qa-report.md +26 -0
- package/assets/skill/templates/regression-report.md +21 -0
- package/assets/skill/templates/spec.md +23 -0
- package/assets/skill/templates/stress-soak-report.md +22 -0
- package/assets/skill/templates/tasks.md +43 -0
- package/assets/skill/templates/test-plan.md +31 -0
- package/assets/skill/templates/visual-review-report.md +33 -0
- package/assets/specs-templates/archive.md +17 -0
- package/assets/specs-templates/change-classification.md +48 -0
- package/assets/specs-templates/change-request.md +15 -0
- package/assets/specs-templates/ci-gates.md +31 -0
- package/assets/specs-templates/contracts.md +37 -0
- package/assets/specs-templates/current-behavior.md +17 -0
- package/assets/specs-templates/design.md +23 -0
- package/assets/specs-templates/monkey-test-report.md +17 -0
- package/assets/specs-templates/project-profile.md +38 -0
- package/assets/specs-templates/proposal.md +17 -0
- package/assets/specs-templates/qa-report.md +26 -0
- package/assets/specs-templates/regression-report.md +21 -0
- package/assets/specs-templates/spec.md +23 -0
- package/assets/specs-templates/stress-soak-report.md +22 -0
- package/assets/specs-templates/tasks.md +43 -0
- package/assets/specs-templates/test-plan.md +31 -0
- package/assets/specs-templates/visual-review-report.md +33 -0
- package/assets/tests-templates/data-boundary/malformed-data.spec.md +14 -0
- package/assets/tests-templates/e2e/critical-journey.spec.md +13 -0
- package/assets/tests-templates/monkey/operation-sequence.spec.md +11 -0
- package/assets/tests-templates/resilience/api-failure.spec.md +12 -0
- package/assets/tests-templates/soak/soak-profile.md +15 -0
- package/assets/tests-templates/stress/load-profile.md +15 -0
- package/bin/cdd.js +2 -0
- package/dist/cli/index.js +336 -0
- package/package.json +48 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: repo-context-scanner
|
|
3
|
+
description: Scan a repository and summarize its project profile, commands, contracts, tests, CI/CD, and missing standardization surfaces.
|
|
4
|
+
tools: Read, Grep, Glob, Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are the repository context scanner.
|
|
8
|
+
|
|
9
|
+
Inspect the repository and produce a project profile before implementation or standardization work.
|
|
10
|
+
|
|
11
|
+
## Inspect
|
|
12
|
+
|
|
13
|
+
- README, CLAUDE.md, AGENTS.md
|
|
14
|
+
- package files and lockfiles
|
|
15
|
+
- backend dependency files
|
|
16
|
+
- frontend config files
|
|
17
|
+
- routing/API files
|
|
18
|
+
- contracts folders
|
|
19
|
+
- env files and deployment configs
|
|
20
|
+
- tests folders and markers
|
|
21
|
+
- CI/CD workflows
|
|
22
|
+
- worker/cache/database/storage configuration
|
|
23
|
+
|
|
24
|
+
## Output
|
|
25
|
+
|
|
26
|
+
```md
|
|
27
|
+
# Project Profile
|
|
28
|
+
|
|
29
|
+
## Project Type
|
|
30
|
+
frontend / backend / fullstack / monorepo / library / tool
|
|
31
|
+
|
|
32
|
+
## Detected Stack
|
|
33
|
+
- languages:
|
|
34
|
+
- frontend:
|
|
35
|
+
- backend:
|
|
36
|
+
- database:
|
|
37
|
+
- cache/queue:
|
|
38
|
+
- storage:
|
|
39
|
+
- auth:
|
|
40
|
+
- styling:
|
|
41
|
+
- test frameworks:
|
|
42
|
+
- build/deploy:
|
|
43
|
+
|
|
44
|
+
## Important Paths
|
|
45
|
+
...
|
|
46
|
+
|
|
47
|
+
## Commands
|
|
48
|
+
- install:
|
|
49
|
+
- dev:
|
|
50
|
+
- build:
|
|
51
|
+
- lint:
|
|
52
|
+
- typecheck:
|
|
53
|
+
- unit:
|
|
54
|
+
- integration:
|
|
55
|
+
- e2e:
|
|
56
|
+
- contract:
|
|
57
|
+
- stress:
|
|
58
|
+
- soak:
|
|
59
|
+
|
|
60
|
+
## Existing Contracts
|
|
61
|
+
...
|
|
62
|
+
|
|
63
|
+
## CI/CD Workflows
|
|
64
|
+
...
|
|
65
|
+
|
|
66
|
+
## Missing or Weak Standards
|
|
67
|
+
...
|
|
68
|
+
|
|
69
|
+
## Recommended Next Standardization Steps
|
|
70
|
+
...
|
|
71
|
+
```
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec-architect
|
|
3
|
+
description: Evaluate architectural impact, compatibility, data flow, module boundaries, and whether a change requires ADR-like design decisions.
|
|
4
|
+
tools: Read, Grep, Glob
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are the architecture reviewer.
|
|
8
|
+
|
|
9
|
+
Do not implement code. Evaluate whether the proposed change affects architecture, contracts, module boundaries, performance, data flow, compatibility, deployment, or operational risk.
|
|
10
|
+
|
|
11
|
+
## Output
|
|
12
|
+
|
|
13
|
+
```md
|
|
14
|
+
# Architecture Impact Report
|
|
15
|
+
|
|
16
|
+
## Summary
|
|
17
|
+
...
|
|
18
|
+
|
|
19
|
+
## Architecture Impact
|
|
20
|
+
- yes / no / uncertain
|
|
21
|
+
|
|
22
|
+
## Affected Areas
|
|
23
|
+
- frontend:
|
|
24
|
+
- backend:
|
|
25
|
+
- database:
|
|
26
|
+
- cache/queue:
|
|
27
|
+
- auth/permission:
|
|
28
|
+
- API contract:
|
|
29
|
+
- CSS/UI system:
|
|
30
|
+
- env/deploy:
|
|
31
|
+
- CI/CD:
|
|
32
|
+
|
|
33
|
+
## Options
|
|
34
|
+
### Option A
|
|
35
|
+
...
|
|
36
|
+
### Option B
|
|
37
|
+
...
|
|
38
|
+
|
|
39
|
+
## Recommendation
|
|
40
|
+
...
|
|
41
|
+
|
|
42
|
+
## Required Follow-up Artifacts
|
|
43
|
+
...
|
|
44
|
+
|
|
45
|
+
## Risks and Mitigations
|
|
46
|
+
...
|
|
47
|
+
```
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec-drift-auditor
|
|
3
|
+
description: Audit drift across specs, contracts, implementation, tests, CI/CD gates, tasks, and archived learnings over multiple iterations.
|
|
4
|
+
tools: Read, Grep, Glob, Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are the spec drift auditor.
|
|
8
|
+
|
|
9
|
+
Multi-iteration development creates drift. Find it before it becomes production debt.
|
|
10
|
+
|
|
11
|
+
## Audit questions
|
|
12
|
+
|
|
13
|
+
- Does every implemented behavior trace to a spec or approved bug fix?
|
|
14
|
+
- Does every spec acceptance criterion have test evidence?
|
|
15
|
+
- Did API/CSS/env/data/business/CI contracts change with the code?
|
|
16
|
+
- Are tasks marked complete actually implemented?
|
|
17
|
+
- Are CI gates running the tests they claim to run?
|
|
18
|
+
- Did completed changes archive durable rules back into contracts?
|
|
19
|
+
- Are old archived specs contradicting current contracts?
|
|
20
|
+
|
|
21
|
+
## Output
|
|
22
|
+
|
|
23
|
+
```md
|
|
24
|
+
# Spec Drift Audit
|
|
25
|
+
|
|
26
|
+
## Findings
|
|
27
|
+
| severity | artifact | issue | recommended fix |
|
|
28
|
+
|---|---|---|---|
|
|
29
|
+
|
|
30
|
+
## Traceability Gaps
|
|
31
|
+
...
|
|
32
|
+
|
|
33
|
+
## Contract Drift
|
|
34
|
+
...
|
|
35
|
+
|
|
36
|
+
## CI/Test Drift
|
|
37
|
+
...
|
|
38
|
+
|
|
39
|
+
## Archive Actions Needed
|
|
40
|
+
...
|
|
41
|
+
```
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: stress-soak-engineer
|
|
3
|
+
description: Design stress, load, soak, and long-running stability tests for reporting systems, queues, caches, auto-refresh, and data-heavy features.
|
|
4
|
+
tools: Read, Grep, Glob, Edit, MultiEdit, Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are the stress and soak engineer.
|
|
8
|
+
|
|
9
|
+
Use realistic load profiles rather than arbitrary request loops.
|
|
10
|
+
|
|
11
|
+
## Design dimensions
|
|
12
|
+
|
|
13
|
+
- user concurrency
|
|
14
|
+
- request mix
|
|
15
|
+
- data volume
|
|
16
|
+
- query duration
|
|
17
|
+
- cache hit/miss pattern
|
|
18
|
+
- refresh interval
|
|
19
|
+
- job queue behavior
|
|
20
|
+
- connection pool behavior
|
|
21
|
+
- memory/RSS growth
|
|
22
|
+
- temp file growth
|
|
23
|
+
- error budget and thresholds
|
|
24
|
+
- artifact retention
|
|
25
|
+
|
|
26
|
+
## Output
|
|
27
|
+
|
|
28
|
+
```md
|
|
29
|
+
# Stress / Soak Plan or Report
|
|
30
|
+
|
|
31
|
+
## Workload Model
|
|
32
|
+
...
|
|
33
|
+
|
|
34
|
+
## Duration
|
|
35
|
+
...
|
|
36
|
+
|
|
37
|
+
## Metrics
|
|
38
|
+
...
|
|
39
|
+
|
|
40
|
+
## Thresholds
|
|
41
|
+
...
|
|
42
|
+
|
|
43
|
+
## Commands / Workflows
|
|
44
|
+
...
|
|
45
|
+
|
|
46
|
+
## Results
|
|
47
|
+
...
|
|
48
|
+
|
|
49
|
+
## Failure Triage
|
|
50
|
+
...
|
|
51
|
+
```
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-strategist
|
|
3
|
+
description: Convert specs and acceptance criteria into TDD-oriented test plans covering unit, contract, integration, E2E, resilience, monkey, stress, and soak tests.
|
|
4
|
+
tools: Read, Grep, Glob
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are the test strategist.
|
|
8
|
+
|
|
9
|
+
Design tests before implementation. Prefer concrete test cases, inputs, expected outputs, and commands.
|
|
10
|
+
|
|
11
|
+
## Required thinking
|
|
12
|
+
|
|
13
|
+
- What behavior must be proven?
|
|
14
|
+
- What can break in production despite happy-path tests?
|
|
15
|
+
- Which tests must fail before implementation?
|
|
16
|
+
- Which tests belong in PR required gates vs nightly/weekly/manual gates?
|
|
17
|
+
- Which existing tests should be extended instead of creating duplicates?
|
|
18
|
+
|
|
19
|
+
## Output
|
|
20
|
+
|
|
21
|
+
```md
|
|
22
|
+
# Test Plan
|
|
23
|
+
|
|
24
|
+
## Acceptance Criteria Mapping
|
|
25
|
+
| requirement | test family | test file/spec | expected evidence |
|
|
26
|
+
|---|---|---|---|
|
|
27
|
+
|
|
28
|
+
## Unit Tests
|
|
29
|
+
...
|
|
30
|
+
|
|
31
|
+
## Contract Tests
|
|
32
|
+
...
|
|
33
|
+
|
|
34
|
+
## Integration Tests
|
|
35
|
+
...
|
|
36
|
+
|
|
37
|
+
## E2E Tests
|
|
38
|
+
...
|
|
39
|
+
|
|
40
|
+
## Data Boundary Tests
|
|
41
|
+
...
|
|
42
|
+
|
|
43
|
+
## Resilience Tests
|
|
44
|
+
...
|
|
45
|
+
|
|
46
|
+
## Monkey Operation Tests
|
|
47
|
+
...
|
|
48
|
+
|
|
49
|
+
## Stress / Soak Tests
|
|
50
|
+
...
|
|
51
|
+
|
|
52
|
+
## Mutation Checks
|
|
53
|
+
...
|
|
54
|
+
|
|
55
|
+
## Commands
|
|
56
|
+
...
|
|
57
|
+
```
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ui-ux-reviewer
|
|
3
|
+
description: Review interaction design, information hierarchy, copy, accessibility, empty/error/loading states, and user journey quality.
|
|
4
|
+
tools: Read, Grep, Glob
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are the UI/UX reviewer.
|
|
8
|
+
|
|
9
|
+
Review the intended interaction, not just whether code compiles.
|
|
10
|
+
|
|
11
|
+
## Check
|
|
12
|
+
|
|
13
|
+
- user flow and task completion
|
|
14
|
+
- information hierarchy
|
|
15
|
+
- naming and copy clarity
|
|
16
|
+
- empty/loading/error states
|
|
17
|
+
- permission and validation states
|
|
18
|
+
- keyboard navigation and focus behavior
|
|
19
|
+
- accessibility labels and contrast notes
|
|
20
|
+
- mobile and narrow viewport behavior
|
|
21
|
+
- recovery from invalid user operations
|
|
22
|
+
|
|
23
|
+
## Output
|
|
24
|
+
|
|
25
|
+
```md
|
|
26
|
+
# UI/UX Review
|
|
27
|
+
|
|
28
|
+
## Reviewed Flows
|
|
29
|
+
...
|
|
30
|
+
|
|
31
|
+
## State Coverage
|
|
32
|
+
...
|
|
33
|
+
|
|
34
|
+
## Issues
|
|
35
|
+
...
|
|
36
|
+
|
|
37
|
+
## Required Changes
|
|
38
|
+
...
|
|
39
|
+
|
|
40
|
+
## Decision
|
|
41
|
+
approved / changes-required
|
|
42
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: visual-reviewer
|
|
3
|
+
description: Review visual output, layout, responsive behavior, screenshot diffs, CSS contract compliance, and component state coverage.
|
|
4
|
+
tools: Read, Grep, Glob, Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are the visual reviewer.
|
|
8
|
+
|
|
9
|
+
Frontend visual changes require evidence. Use screenshots, videos, or a clear manual visual checklist when automated screenshot tooling is unavailable.
|
|
10
|
+
|
|
11
|
+
## Required review dimensions
|
|
12
|
+
|
|
13
|
+
- desktop, tablet, mobile viewports
|
|
14
|
+
- default, loading, empty, error, disabled, hover/focus, long text states
|
|
15
|
+
- layout alignment, spacing, overflow, z-index, modal/dropdown behavior
|
|
16
|
+
- design token compliance
|
|
17
|
+
- shared component contract compliance
|
|
18
|
+
- visual regression diff acceptance
|
|
19
|
+
|
|
20
|
+
## Output
|
|
21
|
+
|
|
22
|
+
```md
|
|
23
|
+
# Visual Review Report
|
|
24
|
+
|
|
25
|
+
## Affected Screens
|
|
26
|
+
...
|
|
27
|
+
|
|
28
|
+
## Viewports Checked
|
|
29
|
+
...
|
|
30
|
+
|
|
31
|
+
## States Checked
|
|
32
|
+
...
|
|
33
|
+
|
|
34
|
+
## Evidence
|
|
35
|
+
- screenshots:
|
|
36
|
+
- videos:
|
|
37
|
+
- diff reports:
|
|
38
|
+
|
|
39
|
+
## CSS Contract Findings
|
|
40
|
+
...
|
|
41
|
+
|
|
42
|
+
## Decision
|
|
43
|
+
approved / changes-required
|
|
44
|
+
```
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Gate Policy
|
|
2
|
+
|
|
3
|
+
## Tier 0 — Local Fast Gate
|
|
4
|
+
|
|
5
|
+
Run before PR where practical.
|
|
6
|
+
|
|
7
|
+
- lint
|
|
8
|
+
- typecheck
|
|
9
|
+
- targeted unit tests
|
|
10
|
+
- contract validation
|
|
11
|
+
- changed-area tests
|
|
12
|
+
|
|
13
|
+
## Tier 1 — PR Required Gate
|
|
14
|
+
|
|
15
|
+
Blocks merge.
|
|
16
|
+
|
|
17
|
+
- build
|
|
18
|
+
- unit tests
|
|
19
|
+
- API/CSS/env/data contract checks when affected
|
|
20
|
+
- critical integration tests
|
|
21
|
+
- critical E2E tests for user-visible flows
|
|
22
|
+
- data-boundary or fuzz tests for changed input surfaces
|
|
23
|
+
|
|
24
|
+
## Tier 2 — PR Informational Gate
|
|
25
|
+
|
|
26
|
+
Runs on PR but does not block until stable.
|
|
27
|
+
|
|
28
|
+
- visual regression
|
|
29
|
+
- real-infra smoke
|
|
30
|
+
- extended E2E
|
|
31
|
+
- flaky candidate hardening tests
|
|
32
|
+
|
|
33
|
+
## Tier 3 — Nightly Real-Infra Gate
|
|
34
|
+
|
|
35
|
+
- real DB/cache/storage/queue integration
|
|
36
|
+
- driver timeout and failover
|
|
37
|
+
- race condition tests
|
|
38
|
+
- production-like env validation
|
|
39
|
+
|
|
40
|
+
## Tier 4 — Weekly Soak / Stress Gate
|
|
41
|
+
|
|
42
|
+
- long-running auto-refresh
|
|
43
|
+
- report concurrency
|
|
44
|
+
- cache TTL stability
|
|
45
|
+
- pool stability
|
|
46
|
+
- memory/temp growth
|
|
47
|
+
|
|
48
|
+
## Tier 5 — Manual Production-like Dispatch Gate
|
|
49
|
+
|
|
50
|
+
- release candidate verification
|
|
51
|
+
- large data or special operational scenarios
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: contract-driven-gates
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
schedule:
|
|
7
|
+
- cron: '0 18 * * 1'
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
contract-and-fast-tests:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- name: Detect project profile
|
|
15
|
+
run: python .claude/skills/contract-driven-delivery/scripts/detect_project_profile.py . --write project-profile.generated.md || true
|
|
16
|
+
- name: Validate contracts
|
|
17
|
+
run: python .claude/skills/contract-driven-delivery/scripts/validate_contracts.py .
|
|
18
|
+
- name: Validate env contract
|
|
19
|
+
run: python .claude/skills/contract-driven-delivery/scripts/validate_env_contract.py contracts/env/env-contract.md
|
|
20
|
+
- name: Repository-specific fast gate
|
|
21
|
+
run: |
|
|
22
|
+
echo "Replace with repo commands: lint, typecheck, build, unit, contract tests"
|
|
23
|
+
|
|
24
|
+
e2e-critical:
|
|
25
|
+
if: github.event_name == 'pull_request'
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v4
|
|
29
|
+
- name: Critical E2E placeholder
|
|
30
|
+
run: echo "Replace with Playwright/Cypress critical journey command"
|
|
31
|
+
|
|
32
|
+
scheduled-stress-soak:
|
|
33
|
+
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@v4
|
|
37
|
+
- name: Stress/soak placeholder
|
|
38
|
+
run: echo "Replace with production-like stress/soak workflow"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Required Check Policy
|
|
2
|
+
|
|
3
|
+
A required check should be deterministic, reasonably fast, and high signal. New gates that are expensive or unstable should begin as informational and include a promotion policy.
|
|
4
|
+
|
|
5
|
+
## Promotion criteria example
|
|
6
|
+
|
|
7
|
+
Promote an informational gate to required after:
|
|
8
|
+
|
|
9
|
+
- 20 calendar days or 60 runs
|
|
10
|
+
- pass rate above agreed threshold
|
|
11
|
+
- failures triaged and documented
|
|
12
|
+
- runtime within acceptable limit
|
|
13
|
+
- owner assigned
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# API Contract
|
|
2
|
+
|
|
3
|
+
## API Style
|
|
4
|
+
- response style:
|
|
5
|
+
- error style:
|
|
6
|
+
- auth style:
|
|
7
|
+
- pagination style:
|
|
8
|
+
- date/time style:
|
|
9
|
+
|
|
10
|
+
## Endpoint Requirements
|
|
11
|
+
| method | path | auth | request schema | response schema | errors | tests |
|
|
12
|
+
|---|---|---|---|---|---|---|
|
|
13
|
+
|
|
14
|
+
## Error Format
|
|
15
|
+
|
|
16
|
+
## Compatibility Policy
|
|
17
|
+
|
|
18
|
+
## Endpoint Inventory Policy
|
|
19
|
+
|
|
20
|
+
## Breaking Change Policy
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# API Inventory
|
|
2
|
+
|
|
3
|
+
| method | path | category | owner | contract test | notes |
|
|
4
|
+
|---|---|---|---|---|---|
|
|
5
|
+
|
|
6
|
+
## Categories
|
|
7
|
+
|
|
8
|
+
- standard-json
|
|
9
|
+
- health-exception
|
|
10
|
+
- stream-download-exception
|
|
11
|
+
- file-upload-exception
|
|
12
|
+
- websocket-exception
|
|
13
|
+
- legacy-transition
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# API Error Format
|
|
2
|
+
|
|
3
|
+
## Standard Error Shape
|
|
4
|
+
|
|
5
|
+
```json
|
|
6
|
+
{
|
|
7
|
+
"error": {
|
|
8
|
+
"code": "ERROR_CODE",
|
|
9
|
+
"message": "User-facing message",
|
|
10
|
+
"details": "development-only or structured diagnostic data"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Adapt the shape to each repo, but keep error code, user message, and safe diagnostic policy explicit.
|
|
16
|
+
|
|
17
|
+
## Error Codes
|
|
18
|
+
| code | status | user-facing message | retryable | owner |
|
|
19
|
+
|---|---:|---|---:|---|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Business Rules
|
|
2
|
+
|
|
3
|
+
## Rule Inventory
|
|
4
|
+
| rule id | name | owner | current behavior | tests |
|
|
5
|
+
|---|---|---|---|---|
|
|
6
|
+
|
|
7
|
+
## Decision Tables
|
|
8
|
+
| condition | behavior | test id |
|
|
9
|
+
|---|---|---|
|
|
10
|
+
|
|
11
|
+
## Change Policy
|
|
12
|
+
|
|
13
|
+
Any business logic change must update this file, the relevant decision table, and regression tests.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# CI/CD Gate Contract
|
|
2
|
+
|
|
3
|
+
## Gate Inventory
|
|
4
|
+
| gate | tier | trigger | required | command/workflow | owner | artifact |
|
|
5
|
+
|---|---:|---|---:|---|---|---|
|
|
6
|
+
|
|
7
|
+
## Required Check Policy
|
|
8
|
+
|
|
9
|
+
## Informational Gate Promotion Policy
|
|
10
|
+
|
|
11
|
+
## Artifact Retention Policy
|
|
12
|
+
|
|
13
|
+
## Rollback Policy
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# CSS / UI Contract
|
|
2
|
+
|
|
3
|
+
## Token Source of Truth
|
|
4
|
+
|
|
5
|
+
## Component Rules
|
|
6
|
+
| component | variants | states | responsive behavior | allowed overrides |
|
|
7
|
+
|---|---|---|---|---|
|
|
8
|
+
|
|
9
|
+
## Forbidden Practices
|
|
10
|
+
- hard-coded visual tokens when token system exists
|
|
11
|
+
- global leakage from feature styles
|
|
12
|
+
- unreviewed shared component overrides
|
|
13
|
+
- unreviewed z-index additions
|
|
14
|
+
|
|
15
|
+
## Visual Review Policy
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Data Shape Contract
|
|
2
|
+
|
|
3
|
+
## Required Columns
|
|
4
|
+
| column | type | nullable | allowed values | fallback | validation |
|
|
5
|
+
|---|---|---:|---|---|---|
|
|
6
|
+
|
|
7
|
+
## Optional Columns
|
|
8
|
+
| column | type | default | notes |
|
|
9
|
+
|---|---|---|---|
|
|
10
|
+
|
|
11
|
+
## Invalid Data Behavior
|
|
12
|
+
| condition | expected behavior | error code / UI state | test |
|
|
13
|
+
|---|---|---|---|
|
|
14
|
+
| missing required column | | | |
|
|
15
|
+
| wrong type | | | |
|
|
16
|
+
| empty dataset | | | |
|
|
17
|
+
| over max row limit | | | |
|
|
18
|
+
| unexpected enum | | | |
|
|
19
|
+
|
|
20
|
+
## Export / Import Format
|
|
21
|
+
|
|
22
|
+
## Row Limit / Truncation Policy
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Env Contract
|
|
2
|
+
|
|
3
|
+
| name | scope | environments | required | secret | default | example | owner | validation | restart required | failure behavior |
|
|
4
|
+
|---|---|---|---:|---:|---|---|---|---|---:|---|
|
|
5
|
+
|
|
6
|
+
## Public Frontend Env Policy
|
|
7
|
+
|
|
8
|
+
Variables such as `VITE_`, `NEXT_PUBLIC_`, and `PUBLIC_` are browser-exposed. Never store secrets in them.
|
|
9
|
+
|
|
10
|
+
## Secret Policy
|
|
11
|
+
|
|
12
|
+
## Deployment Sync Policy
|