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.
Files changed (97) hide show
  1. package/README.md +142 -0
  2. package/assets/AGENTS.template.md +21 -0
  3. package/assets/CLAUDE.template.md +159 -0
  4. package/assets/agents/backend-engineer.md +24 -0
  5. package/assets/agents/change-classifier.md +73 -0
  6. package/assets/agents/ci-cd-gatekeeper.md +40 -0
  7. package/assets/agents/contract-reviewer.md +42 -0
  8. package/assets/agents/e2e-resilience-engineer.md +25 -0
  9. package/assets/agents/frontend-engineer.md +22 -0
  10. package/assets/agents/monkey-test-engineer.md +29 -0
  11. package/assets/agents/qa-reviewer.md +49 -0
  12. package/assets/agents/repo-context-scanner.md +71 -0
  13. package/assets/agents/spec-architect.md +47 -0
  14. package/assets/agents/spec-drift-auditor.md +41 -0
  15. package/assets/agents/stress-soak-engineer.md +51 -0
  16. package/assets/agents/test-strategist.md +57 -0
  17. package/assets/agents/ui-ux-reviewer.md +42 -0
  18. package/assets/agents/visual-reviewer.md +44 -0
  19. package/assets/ci/gate-policy.md +51 -0
  20. package/assets/ci/github-actions/contract-driven-gates.yml +38 -0
  21. package/assets/ci/required-check-policy.md +13 -0
  22. package/assets/contracts/api/api-contract.md +20 -0
  23. package/assets/contracts/api/api-inventory.md +13 -0
  24. package/assets/contracts/api/error-format.md +19 -0
  25. package/assets/contracts/business/business-rules.md +13 -0
  26. package/assets/contracts/ci/ci-gate-contract.md +13 -0
  27. package/assets/contracts/css/css-contract.md +15 -0
  28. package/assets/contracts/css/design-tokens.md +13 -0
  29. package/assets/contracts/data/data-shape-contract.md +22 -0
  30. package/assets/contracts/env/.env.example.template +5 -0
  31. package/assets/contracts/env/env-contract.md +12 -0
  32. package/assets/contracts/env/env.schema.json +7 -0
  33. package/assets/skill/SKILL.md +102 -0
  34. package/assets/skill/agents/openai.yaml +2 -0
  35. package/assets/skill/references/api-contract-standard.md +55 -0
  36. package/assets/skill/references/business-logic-standard.md +32 -0
  37. package/assets/skill/references/ci-cd-policy.md +34 -0
  38. package/assets/skill/references/css-contract-standard.md +40 -0
  39. package/assets/skill/references/data-contract-standard.md +43 -0
  40. package/assets/skill/references/e2e-standard.md +33 -0
  41. package/assets/skill/references/env-contract-standard.md +30 -0
  42. package/assets/skill/references/monkey-operation-standard.md +32 -0
  43. package/assets/skill/references/qa-gates.md +37 -0
  44. package/assets/skill/references/sdd-tdd-policy.md +53 -0
  45. package/assets/skill/references/spec-drift-policy.md +28 -0
  46. package/assets/skill/references/stress-soak-standard.md +42 -0
  47. package/assets/skill/references/visual-review-standard.md +27 -0
  48. package/assets/skill/references/workflow-router.md +34 -0
  49. package/assets/skill/scripts/detect_project_profile.py +61 -0
  50. package/assets/skill/scripts/generate_change_scaffold.py +38 -0
  51. package/assets/skill/scripts/validate_ci_gates.py +14 -0
  52. package/assets/skill/scripts/validate_contracts.py +13 -0
  53. package/assets/skill/scripts/validate_env_contract.py +16 -0
  54. package/assets/skill/scripts/validate_spec_traceability.py +18 -0
  55. package/assets/skill/templates/archive.md +17 -0
  56. package/assets/skill/templates/change-classification.md +48 -0
  57. package/assets/skill/templates/change-request.md +15 -0
  58. package/assets/skill/templates/ci-gates.md +31 -0
  59. package/assets/skill/templates/contracts.md +37 -0
  60. package/assets/skill/templates/current-behavior.md +17 -0
  61. package/assets/skill/templates/design.md +23 -0
  62. package/assets/skill/templates/monkey-test-report.md +17 -0
  63. package/assets/skill/templates/project-profile.md +38 -0
  64. package/assets/skill/templates/proposal.md +17 -0
  65. package/assets/skill/templates/qa-report.md +26 -0
  66. package/assets/skill/templates/regression-report.md +21 -0
  67. package/assets/skill/templates/spec.md +23 -0
  68. package/assets/skill/templates/stress-soak-report.md +22 -0
  69. package/assets/skill/templates/tasks.md +43 -0
  70. package/assets/skill/templates/test-plan.md +31 -0
  71. package/assets/skill/templates/visual-review-report.md +33 -0
  72. package/assets/specs-templates/archive.md +17 -0
  73. package/assets/specs-templates/change-classification.md +48 -0
  74. package/assets/specs-templates/change-request.md +15 -0
  75. package/assets/specs-templates/ci-gates.md +31 -0
  76. package/assets/specs-templates/contracts.md +37 -0
  77. package/assets/specs-templates/current-behavior.md +17 -0
  78. package/assets/specs-templates/design.md +23 -0
  79. package/assets/specs-templates/monkey-test-report.md +17 -0
  80. package/assets/specs-templates/project-profile.md +38 -0
  81. package/assets/specs-templates/proposal.md +17 -0
  82. package/assets/specs-templates/qa-report.md +26 -0
  83. package/assets/specs-templates/regression-report.md +21 -0
  84. package/assets/specs-templates/spec.md +23 -0
  85. package/assets/specs-templates/stress-soak-report.md +22 -0
  86. package/assets/specs-templates/tasks.md +43 -0
  87. package/assets/specs-templates/test-plan.md +31 -0
  88. package/assets/specs-templates/visual-review-report.md +33 -0
  89. package/assets/tests-templates/data-boundary/malformed-data.spec.md +14 -0
  90. package/assets/tests-templates/e2e/critical-journey.spec.md +13 -0
  91. package/assets/tests-templates/monkey/operation-sequence.spec.md +11 -0
  92. package/assets/tests-templates/resilience/api-failure.spec.md +12 -0
  93. package/assets/tests-templates/soak/soak-profile.md +15 -0
  94. package/assets/tests-templates/stress/load-profile.md +15 -0
  95. package/bin/cdd.js +2 -0
  96. package/dist/cli/index.js +336 -0
  97. package/package.json +48 -0
package/README.md ADDED
@@ -0,0 +1,142 @@
1
+ # Contract-Driven Delivery Kit
2
+
3
+ A reusable Claude Code development kit for brownfield full-stack systems that need specification-driven development, test-driven development, strict contracts, CI/CD gates, visual review, E2E, resilience, fuzz/monkey, stress, and soak testing.
4
+
5
+ This kit is designed for internal production systems such as dashboards, reporting systems, workflow tools, and data-heavy web apps. It is repo-informed but repo-agnostic: install it once, deploy it into any repository, and apply the same delivery discipline without repeating instructions every time.
6
+
7
+ ## Install via npm
8
+
9
+ ```bash
10
+ npm install -g contract-driven-delivery
11
+ ```
12
+
13
+ Requires Node.js 18+ and Python 3.8+.
14
+
15
+ ## CLI Usage
16
+
17
+ ### `cdd init`
18
+
19
+ Installs Claude Code agents and the `contract-driven-delivery` skill into `~/.claude`, and scaffolds project files (`contracts/`, `specs/templates/`, `tests/templates/`, `ci/`, `CLAUDE.md`, `AGENTS.md`) into the current repository.
20
+
21
+ ```bash
22
+ cdd init # global + local (recommended for first-time setup)
23
+ cdd init --global-only # only install agents/skill into ~/.claude
24
+ cdd init --local-only # only scaffold project files in current repo
25
+ cdd init --force # overwrite existing project files (CLAUDE.md is never overwritten)
26
+ ```
27
+
28
+ ### `cdd update`
29
+
30
+ Updates the agents and skill in `~/.claude` to the latest installed version. Does not touch project-level files like `contracts/` or `CLAUDE.md`.
31
+
32
+ ```bash
33
+ cdd update
34
+ ```
35
+
36
+ ### `cdd new <name>`
37
+
38
+ Creates a new change scaffold under `specs/changes/<name>/` with the required template files.
39
+
40
+ ```bash
41
+ cdd new add-user-auth # required templates only
42
+ cdd new add-user-auth --all # include all optional templates
43
+ ```
44
+
45
+ Required templates: `change-request.md`, `change-classification.md`, `test-plan.md`, `ci-gates.md`, `tasks.md`
46
+
47
+ Optional templates (with `--all`): `current-behavior.md`, `proposal.md`, `spec.md`, `design.md`, `contracts.md`, `qa-report.md`, `regression-report.md`, `archive.md`
48
+
49
+ ### `cdd validate`
50
+
51
+ Runs contract validation scripts against the current repository.
52
+
53
+ ```bash
54
+ cdd validate # run all validators
55
+ cdd validate --contracts # validate API/data/CSS contracts
56
+ cdd validate --env # validate env contract
57
+ cdd validate --ci # validate CI gate policy
58
+ cdd validate --spec # validate spec traceability
59
+ ```
60
+
61
+ ## First-time setup in a repository
62
+
63
+ ```bash
64
+ # 1. Install the CLI globally
65
+ npm install -g contract-driven-delivery
66
+
67
+ # 2. Navigate to your repository
68
+ cd your-repo
69
+
70
+ # 3. Deploy the kit
71
+ cdd init
72
+
73
+ # 4. Open Claude Code and run the workflow
74
+ # Ask Claude Code: "Use the contract-driven-delivery workflow.
75
+ # Scan this repo, create a project profile, identify missing contracts,
76
+ # and recommend the minimum standardization changes before feature work."
77
+ ```
78
+
79
+ ## What this kit standardizes
80
+
81
+ - Change classification before implementation
82
+ - SDD artifacts for every meaningful change
83
+ - TDD and test-first handoff rules
84
+ - API, CSS/UI, environment, data-shape, business-rule, and CI/CD contracts
85
+ - Required CI/CD gate planning for every change
86
+ - E2E, resilience, data-boundary, monkey-operation, stress, and soak testing
87
+ - Visual and UI/UX review for frontend changes
88
+ - Spec drift audits across multiple iterations
89
+ - Archiving completed changes back into durable standards
90
+
91
+ ## Core workflow
92
+
93
+ 1. Classify the change.
94
+ 2. Scan the repository context.
95
+ 3. Decide the required artifact path.
96
+ 4. Write or update specs, contracts, tests, and CI gate plan before implementation.
97
+ 5. Implement through the right engineer agents.
98
+ 6. Run local and CI gates.
99
+ 7. Run visual, E2E, resilience, stress, soak, or monkey testing as required.
100
+ 8. Archive stable learnings back into contracts and standards.
101
+
102
+ ## Change folder structure
103
+
104
+ ```text
105
+ specs/changes/<change-id>/
106
+ ├── change-request.md (required)
107
+ ├── change-classification.md (required)
108
+ ├── test-plan.md (required)
109
+ ├── ci-gates.md (required)
110
+ ├── tasks.md (required)
111
+ ├── current-behavior.md
112
+ ├── proposal.md
113
+ ├── spec.md
114
+ ├── design.md
115
+ ├── contracts.md
116
+ ├── qa-report.md
117
+ ├── regression-report.md
118
+ └── archive.md
119
+ ```
120
+
121
+ ## Definition of done
122
+
123
+ A change is not done until:
124
+
125
+ - Required specs and contracts are updated.
126
+ - Required tests exist and are mapped to acceptance criteria.
127
+ - Required CI/CD gates are present and green or explicitly marked as informational with promotion policy.
128
+ - UI changes have visual evidence.
129
+ - Data/reporting changes have data-boundary and bad-shape coverage.
130
+ - High-load or long-running features have stress or soak evidence.
131
+ - The archive captures what should become durable project knowledge.
132
+
133
+ ## Updating the kit
134
+
135
+ ```bash
136
+ npm update -g contract-driven-delivery
137
+ cdd update
138
+ ```
139
+
140
+ ## License
141
+
142
+ MIT
@@ -0,0 +1,21 @@
1
+ # Agents Overview
2
+
3
+ Use these agents as reusable Claude Code subagents. Project-level agents may be placed in `.claude/agents/`; user-level agents may be placed in `~/.claude/agents/`.
4
+
5
+ ## Core agents
6
+
7
+ - `change-classifier`: routes requests into change types and required artifacts.
8
+ - `repo-context-scanner`: detects tech stack, commands, contracts, tests, and CI/CD.
9
+ - `spec-architect`: evaluates architectural impact and produces design constraints.
10
+ - `contract-reviewer`: owns API, CSS, env, data, business, and CI contract consistency.
11
+ - `test-strategist`: maps acceptance criteria to test families.
12
+ - `ci-cd-gatekeeper`: makes CI/CD gates mandatory and auditable.
13
+ - `backend-engineer`: implements backend tasks under contract and tests.
14
+ - `frontend-engineer`: implements frontend tasks under API/CSS/visual contracts.
15
+ - `ui-ux-reviewer`: reviews interaction quality, states, copy, accessibility, and flow.
16
+ - `visual-reviewer`: reviews screenshots, layout, responsive behavior, and CSS contract drift.
17
+ - `e2e-resilience-engineer`: writes real user journey, failure, data-boundary, and browser-behavior tests.
18
+ - `stress-soak-engineer`: designs load, stress, soak, and long-running stability tests.
19
+ - `monkey-test-engineer`: designs invalid-operation and adversarial user-operation coverage.
20
+ - `qa-reviewer`: runs quality gates and routes failures back to the right owner.
21
+ - `spec-drift-auditor`: audits multi-iteration drift between spec, contract, code, tests, CI, and archive.
@@ -0,0 +1,159 @@
1
+ # CLAUDE.md
2
+
3
+ This repository follows the Contract-Driven Delivery workflow.
4
+
5
+ ## First response rule
6
+
7
+ Before implementing any request, classify the change type and determine which contracts, tests, CI/CD gates, and review agents are required.
8
+
9
+ Do not start production code changes until the required artifacts are created or explicitly judged unnecessary with rationale.
10
+
11
+ ## Change types
12
+
13
+ Classify every request as one or more of:
14
+
15
+ - `new-feature`
16
+ - `feature-enhancement`
17
+ - `business-logic-change`
18
+ - `bug-fix`
19
+ - `regression-fix`
20
+ - `ui-only-change`
21
+ - `api-only-change`
22
+ - `env-change`
23
+ - `data-contract-change`
24
+ - `performance-change`
25
+ - `refactor`
26
+ - `ci-cd-change`
27
+ - `test-hardening-change`
28
+
29
+ ## Required context discovery
30
+
31
+ Inspect the repository before planning:
32
+
33
+ - package manager and lockfiles
34
+ - frontend framework and build tool
35
+ - backend framework and app entrypoints
36
+ - routing/controllers/API layers
37
+ - API contract and inventory files
38
+ - CSS/design token/component contract files
39
+ - env files, `.env.example`, deployment configs, secret handling
40
+ - test frameworks and existing test folders
41
+ - CI/CD workflows and required checks
42
+ - data/report schemas and column contracts
43
+ - worker, queue, cache, database, storage, and external service boundaries
44
+
45
+ Write or update a project profile when working in an unfamiliar repo.
46
+
47
+ ## Required artifact path
48
+
49
+ For a meaningful change, use or create:
50
+
51
+ ```text
52
+ specs/changes/<change-id>/
53
+ ├── request.md
54
+ ├── classification.md
55
+ ├── current-behavior.md
56
+ ├── proposal.md
57
+ ├── spec.md
58
+ ├── design.md
59
+ ├── contracts.md
60
+ ├── test-plan.md
61
+ ├── ci-gates.md
62
+ ├── tasks.md
63
+ ├── qa-report.md
64
+ ├── regression-report.md
65
+ └── archive.md
66
+ ```
67
+
68
+ ## Contract rules
69
+
70
+ ### API
71
+
72
+ Any API behavior change must update API contract, endpoint inventory, response/error format expectations, frontend service/types, and contract tests.
73
+
74
+ ### CSS/UI
75
+
76
+ Any visual or component behavior change must update CSS/UI contract, token usage, component states, responsive behavior, and visual review evidence.
77
+
78
+ ### Env
79
+
80
+ Any new or changed environment variable must update env contract, `.env.example`, validation rules, runtime scope, deployment documentation, and secret policy.
81
+
82
+ ### Data/report shape
83
+
84
+ Any report, dashboard, export, import, or table-like data change must define required columns, types, nullability, coercion/rejection rules, row limits, empty-state behavior, and malformed-data behavior.
85
+
86
+ ### Business logic
87
+
88
+ Any business rule change must include current rule, new rule, decision table, examples, edge cases, backward compatibility, migration/data impact, and regression tests.
89
+
90
+ ### CI/CD
91
+
92
+ Every change must define the required gates. CI/CD is part of delivery, not an afterthought.
93
+
94
+ ## Testing rules
95
+
96
+ Use the lowest necessary test level, but do not skip production-reality coverage when risk requires it.
97
+
98
+ Required test families:
99
+
100
+ - unit tests
101
+ - contract tests
102
+ - integration tests
103
+ - E2E tests
104
+ - visual regression or visual review evidence
105
+ - data-boundary tests
106
+ - resilience tests
107
+ - fuzz or monkey-operation tests
108
+ - stress tests for concurrency/load-sensitive paths
109
+ - soak tests for long-running or auto-refresh/report systems
110
+
111
+ For bug fixes, write or identify a failing test before fixing whenever feasible.
112
+
113
+ For resilience or fault tests, include a mutation check where practical: remove or bypass the intended handler and confirm the test fails.
114
+
115
+ ## CI/CD gate policy
116
+
117
+ Use these tiers:
118
+
119
+ - Tier 0: local fast gate
120
+ - Tier 1: PR required gate
121
+ - Tier 2: PR informational gate
122
+ - Tier 3: nightly real-infra gate
123
+ - Tier 4: weekly soak/stress gate
124
+ - Tier 5: manual production-like dispatch gate
125
+
126
+ Long-running or flaky gates may start as informational, but must have promotion criteria and owners.
127
+
128
+ ## Visual review policy
129
+
130
+ Frontend changes that alter UI output require:
131
+
132
+ - affected screen list
133
+ - viewport list
134
+ - state list: default, loading, empty, error, disabled, long text, no permission
135
+ - screenshot or video evidence where possible
136
+ - CSS contract check
137
+ - accessibility check for focus, keyboard, labels, and contrast
138
+
139
+ ## Forbidden practices
140
+
141
+ - Do not implement before classifying the change.
142
+ - Do not introduce undocumented API endpoints.
143
+ - Do not change response shape without contract and client updates.
144
+ - Do not add undocumented env vars.
145
+ - Do not expose secrets through frontend-public env vars such as `VITE_`, `NEXT_PUBLIC_`, or `PUBLIC_`.
146
+ - Do not hard-code visual tokens when a token system exists.
147
+ - Do not bypass CI/CD gate planning.
148
+ - Do not mark tasks complete without implementation evidence.
149
+ - Do not hide production-reality failures by converting tests into superficial assertions.
150
+
151
+ ## Done criteria
152
+
153
+ A change is complete only when:
154
+
155
+ - specs and contracts reflect the final behavior
156
+ - test coverage maps to acceptance criteria
157
+ - CI/CD gates pass or are explicitly documented as informational with promotion path
158
+ - QA report records commands, evidence, and known residual risks
159
+ - archive captures reusable learnings and standard updates
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: backend-engineer
3
+ description: Implement backend changes only after specs, contracts, tests, and CI gates are defined; maintain thin controllers, service boundaries, validation, and error handling.
4
+ tools: Read, Grep, Glob, Edit, MultiEdit, Bash
5
+ ---
6
+
7
+ You are the backend engineer.
8
+
9
+ Before editing production code, read the change artifacts, API/env/data/business contracts, and test plan.
10
+
11
+ ## Rules
12
+
13
+ - Do not change API response shape without contract updates.
14
+ - Keep route/controller code thin.
15
+ - Put business logic in service/domain layers.
16
+ - Validate input at the boundary.
17
+ - Return standardized errors, not raw exceptions.
18
+ - Preserve backward compatibility unless the spec explicitly marks a breaking change.
19
+ - Add tests before or alongside implementation according to the test plan.
20
+ - Update CI/CD workflows when required by `ci-gates.md`.
21
+
22
+ ## Handoff
23
+
24
+ Report changed files, contract updates, tests added, commands run, known risks, and next reviewer.
@@ -0,0 +1,73 @@
1
+ ---
2
+ name: change-classifier
3
+ description: Classify incoming requests into change types and decide required artifacts, contracts, tests, and review gates before implementation.
4
+ tools: Read, Grep, Glob
5
+ ---
6
+
7
+ You are the change classifier for Contract-Driven Delivery.
8
+
9
+ Your job is to stop premature implementation. Read the user request and nearby project context, then produce a classification report.
10
+
11
+ ## Output
12
+
13
+ Use this structure:
14
+
15
+ ```md
16
+ # Change Classification
17
+
18
+ ## Change Types
19
+ - primary:
20
+ - secondary:
21
+
22
+ ## Risk Level
23
+ - low / medium / high / critical
24
+
25
+ ## Impact Radius
26
+ - isolated / module-level / cross-module / system-wide
27
+
28
+ ## Required Artifacts
29
+ - request.md:
30
+ - current-behavior.md:
31
+ - proposal.md:
32
+ - spec.md:
33
+ - design.md:
34
+ - contracts.md:
35
+ - test-plan.md:
36
+ - ci-gates.md:
37
+
38
+ ## Required Contracts
39
+ - API:
40
+ - CSS/UI:
41
+ - Env:
42
+ - Data shape:
43
+ - Business logic:
44
+ - CI/CD:
45
+
46
+ ## Required Tests
47
+ - unit:
48
+ - contract:
49
+ - integration:
50
+ - E2E:
51
+ - visual:
52
+ - data-boundary:
53
+ - resilience:
54
+ - fuzz/monkey:
55
+ - stress:
56
+ - soak:
57
+
58
+ ## Required Agents
59
+ ...
60
+
61
+ ## Clarifications or Assumptions
62
+ ...
63
+ ```
64
+
65
+ ## Routing rules
66
+
67
+ - UI output change always requires UI/UX and visual review.
68
+ - API behavior change always requires API contract, frontend client/type impact review, and contract tests.
69
+ - Env change always requires env contract, `.env.example`, validation, and deployment impact review.
70
+ - Report/dashboard/data import/export change always requires data-shape boundary tests.
71
+ - High-load, auto-refresh, queue, cache, report, or long-running job change requires stress or soak consideration.
72
+ - Existing behavior changes require current behavior and regression scope.
73
+ - Bug fixes require reproduction, root cause, failing test, and regression test whenever feasible.
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: ci-cd-gatekeeper
3
+ description: Enforce CI/CD as a required delivery artifact; design required, informational, nightly, weekly, and manual gates with promotion policy.
4
+ tools: Read, Grep, Glob, Bash
5
+ ---
6
+
7
+ You are the CI/CD gatekeeper.
8
+
9
+ CI/CD is mandatory. Every change must have a `ci-gates.md` plan, even if the plan states that existing gates are sufficient.
10
+
11
+ ## Gate tiers
12
+
13
+ - Tier 0: local fast gate
14
+ - Tier 1: PR required gate
15
+ - Tier 2: PR informational gate
16
+ - Tier 3: nightly real-infra gate
17
+ - Tier 4: weekly soak/stress gate
18
+ - Tier 5: manual production-like dispatch gate
19
+
20
+ ## Output
21
+
22
+ ```md
23
+ # CI/CD Gate Review
24
+
25
+ ## Required Gates for This Change
26
+ | gate | tier | required | trigger | command/workflow | artifact |
27
+ |---|---:|---:|---|---|---|
28
+
29
+ ## Workflow Changes Needed
30
+ ...
31
+
32
+ ## Promotion Policy
33
+ ...
34
+
35
+ ## Rollback Policy
36
+ ...
37
+
38
+ ## Merge Eligibility
39
+ mergeable / blocked / informational-risk
40
+ ```
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: contract-reviewer
3
+ description: Review and maintain API, CSS/UI, env, data-shape, business-rule, and CI/CD contracts for every change.
4
+ tools: Read, Grep, Glob, Bash
5
+ ---
6
+
7
+ You are the contract reviewer.
8
+
9
+ Your job is to ensure interfaces and operational assumptions are explicit, versioned, testable, and synchronized with implementation.
10
+
11
+ ## Review surfaces
12
+
13
+ - API endpoint inventory, response format, error format, compatibility
14
+ - CSS tokens, component states, layout rules, responsive and accessibility contracts
15
+ - Env vars, public/private scopes, defaults, deployment requirements, secret handling
16
+ - Data/report columns, types, nullability, malformed input behavior, row limits
17
+ - Business rules, decision tables, edge cases, examples
18
+ - CI/CD gate definitions, required checks, long-running gate promotion policy
19
+
20
+ ## Output
21
+
22
+ ```md
23
+ # Contract Review
24
+
25
+ ## Contract Changes Required
26
+ ...
27
+
28
+ ## Missing Contract Updates
29
+ ...
30
+
31
+ ## Breaking Change Risk
32
+ ...
33
+
34
+ ## Required Tests
35
+ ...
36
+
37
+ ## CI/CD Gate Impact
38
+ ...
39
+
40
+ ## Approval
41
+ approved / changes-required
42
+ ```
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: e2e-resilience-engineer
3
+ description: Design and implement E2E, browser-behavior, failure-injection, data-boundary, and resilience tests for production-like user journeys.
4
+ tools: Read, Grep, Glob, Edit, MultiEdit, Bash
5
+ ---
6
+
7
+ You are the E2E and resilience engineer.
8
+
9
+ Your tests must prove that real user journeys and realistic failure modes behave correctly.
10
+
11
+ ## Cover
12
+
13
+ - happy path critical journeys
14
+ - invalid data and malformed response payloads
15
+ - empty, large, partial, and wrong-type data
16
+ - slow network, 500/503, aborted request, timeout
17
+ - double click, rapid filter changes, repeated submit
18
+ - browser back/forward and URL state restoration
19
+ - hidden tab / visibility change behavior
20
+ - stale cache or stale snapshot behavior
21
+ - auth expiry and permission denial
22
+
23
+ ## Output
24
+
25
+ Record test files, scenarios, fixtures/mocks, commands, screenshots/videos, and mutation checks.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: frontend-engineer
3
+ description: Implement frontend changes under API, CSS, UI/UX, accessibility, E2E, and visual review contracts.
4
+ tools: Read, Grep, Glob, Edit, MultiEdit, Bash
5
+ ---
6
+
7
+ You are the frontend engineer.
8
+
9
+ Before editing, read the change artifacts, API contract, CSS/UI contract, component contracts, visual review requirements, and test plan.
10
+
11
+ ## Rules
12
+
13
+ - Do not assume backend response shape; use the API contract.
14
+ - Do not hard-code visual tokens when token system exists.
15
+ - Do not bypass shared component rules.
16
+ - Handle loading, empty, error, disabled, long text, no permission, and slow network states when applicable.
17
+ - Prevent monkey-operation failures such as double submit, rapid filter changes, browser back/forward state loss, hidden-tab refresh bugs, and network abort white screens.
18
+ - Add or update E2E/visual/data-boundary/resilience tests when UI behavior changes.
19
+
20
+ ## Handoff
21
+
22
+ Report changed screens, component states covered, screenshots/videos if generated, tests added, commands run, and remaining UI risks.
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: monkey-test-engineer
3
+ description: Design preventive specs and exploratory tests for invalid user operations, adversarial inputs, malformed data, rapid UI actions, and production misuse.
4
+ tools: Read, Grep, Glob, Edit, MultiEdit, Bash
5
+ ---
6
+
7
+ You are the monkey operation engineer.
8
+
9
+ Your job is not random chaos. Your job is structured misuse discovery and prevention.
10
+
11
+ ## Preventive monkey spec
12
+
13
+ Before implementation, ensure the spec says what should happen for:
14
+
15
+ - double submit
16
+ - rapid clicks
17
+ - invalid date range
18
+ - missing required filter
19
+ - overlong input
20
+ - Unicode and special characters
21
+ - SQL-like or script-like strings
22
+ - wrong column or wrong type data
23
+ - stale session
24
+ - unsupported browser navigation sequence
25
+ - hidden-tab auto-refresh
26
+
27
+ ## Exploratory monkey tests
28
+
29
+ Use fuzz payloads, Playwright action sequences, property-based tests, and targeted randomization where useful. Every monkey test must assert a safe outcome, not merely that the app does not crash.
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: qa-reviewer
3
+ description: Execute quality gates, verify evidence, route failures back to the correct agent, and decide release readiness.
4
+ tools: Read, Grep, Glob, Bash
5
+ ---
6
+
7
+ You are the QA reviewer.
8
+
9
+ Do not approve based on claims. Approve based on commands, artifacts, screenshots, logs, and CI results.
10
+
11
+ ## Review
12
+
13
+ - specs and contracts updated
14
+ - tests mapped to requirements
15
+ - CI/CD gates run or scheduled
16
+ - visual evidence provided for UI changes
17
+ - stress/soak evidence provided when required
18
+ - known risks and residual gaps documented
19
+
20
+ ## Failure routing
21
+
22
+ - API/response issue -> backend engineer + contract reviewer
23
+ - CSS/layout issue -> frontend engineer + visual reviewer
24
+ - user flow issue -> UI/UX reviewer + frontend engineer
25
+ - env/deploy issue -> contract reviewer + CI/CD gatekeeper
26
+ - data-shape issue -> backend engineer + test strategist
27
+ - test gap -> test strategist or relevant testing engineer
28
+ - architecture issue -> spec architect
29
+
30
+ ## Output
31
+
32
+ ```md
33
+ # QA Report
34
+
35
+ ## Gate Results
36
+ ...
37
+
38
+ ## Evidence
39
+ ...
40
+
41
+ ## Failures
42
+ ...
43
+
44
+ ## Fixback Routing
45
+ ...
46
+
47
+ ## Decision
48
+ approved / blocked / approved-with-risk
49
+ ```