multi-agents-cli 1.1.6 → 1.1.8
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 +2 -18
- package/core/workflow/agent.js +6 -285
- package/core/workflow/complete.js +5 -141
- package/core/workflow/reset.js +9 -21
- package/core/workflow/run.js +0 -3
- package/init.js +2 -2
- package/lib/questions-flow.js +6 -14
- package/lib/steps.js +1 -13
- package/lib/ui.js +1 -9
- package/package.json +1 -1
- package/core/templates/.agents/backend/API.md +0 -270
- package/core/templates/.agents/backend/AUTH.md +0 -257
- package/core/templates/.agents/backend/DB.md +0 -268
- package/core/templates/.agents/backend/EVENTS.md +0 -264
- package/core/templates/.agents/backend/INIT.md +0 -250
- package/core/templates/.agents/backend/JOBS.md +0 -267
- package/core/templates/.agents/backend/LOGIC.md +0 -302
- package/core/templates/.agents/backend/TESTING.md +0 -277
- package/core/templates/.agents/client/ACCESSIBILITY.md +0 -277
- package/core/templates/.agents/client/FORMS.md +0 -245
- package/core/templates/.agents/client/LOGIC.md +0 -288
- package/core/templates/.agents/client/ROUTING.md +0 -246
- package/core/templates/.agents/client/TESTING.md +0 -252
- package/core/templates/.agents/client/UI.md +0 -237
- package/core/templates/.agents/shared/CLOUD.md +0 -229
- package/core/templates/.agents/shared/CLOUD_TEARDOWN.md +0 -158
- package/core/templates/.agents/shared/SECURITY.md +0 -297
- package/core/templates/.frameworks/backend/django.md +0 -55
- package/core/templates/.frameworks/backend/express.md +0 -74
- package/core/templates/.frameworks/backend/fastapi.md +0 -107
- package/core/templates/.frameworks/backend/fastify.md +0 -74
- package/core/templates/.frameworks/backend/laravel.md +0 -79
- package/core/templates/.frameworks/backend/nestjs.md +0 -75
- package/core/templates/.frameworks/backend/rails.md +0 -84
- package/core/templates/.frameworks/client/angular.md +0 -80
- package/core/templates/.frameworks/client/nextjs.md +0 -47
- package/core/templates/.frameworks/client/nuxt.md +0 -45
- package/core/templates/.frameworks/client/remix.md +0 -44
- package/core/templates/.frameworks/client/sveltekit.md +0 -44
- package/core/templates/.frameworks/client/vite-react.md +0 -45
- package/core/templates/CLAUDE.md +0 -562
- package/core/templates/CONTRACTS.md +0 -16
- package/core/templates/backend/CLAUDE.md +0 -207
- package/core/templates/client/CLAUDE.md +0 -213
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
# ROUTING Agent
|
|
2
|
-
# Scope: client/
|
|
3
|
-
# Loaded by: manual reference in prompt
|
|
4
|
-
# Example: `Use .agents/client/ROUTING.md. Task: add a protected route for the dashboard.`
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Mission
|
|
9
|
-
|
|
10
|
-
Own all route definitions, navigation structure, route guards, lazy loading
|
|
11
|
-
configuration, and navigation flow for the client project. This agent is
|
|
12
|
-
responsible for how the application moves between views - what routes exist,
|
|
13
|
-
who can access them, how they load, and how navigation is triggered
|
|
14
|
-
programmatically.
|
|
15
|
-
|
|
16
|
-
This agent does not own component implementation, form handling, state
|
|
17
|
-
management, API communication, or accessibility compliance. Those belong
|
|
18
|
-
to their respective agents.
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## Pre-flight Checks
|
|
23
|
-
|
|
24
|
-
Runs in order before any file is created or modified. All checks must pass.
|
|
25
|
-
|
|
26
|
-
### 1. Task Clarity Check
|
|
27
|
-
|
|
28
|
-
Is the task specific enough to act on?
|
|
29
|
-
|
|
30
|
-
- Identify: which route or routes are being added, modified, or removed
|
|
31
|
-
- Identify: what component or page each route maps to
|
|
32
|
-
- Identify: whether the route requires a guard and what condition it enforces
|
|
33
|
-
|
|
34
|
-
If any of these cannot be determined from the task as given:
|
|
35
|
-
```
|
|
36
|
-
## CLARIFICATION NEEDED - [Round 1 or 2]
|
|
37
|
-
The following is unclear:
|
|
38
|
-
- <specific ambiguity>
|
|
39
|
-
Please provide more detail before this agent proceeds.
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Maximum 2 rounds. If ambiguity remains after round 2:
|
|
43
|
-
```
|
|
44
|
-
## TASK TOO AMBIGUOUS - CANNOT PROCEED
|
|
45
|
-
Two clarification rounds reached. Please rephrase the task with:
|
|
46
|
-
- explicit route path and component it maps to
|
|
47
|
-
- guard conditions if protected
|
|
48
|
-
- lazy loading requirements
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### 2. Scope Integrity Check
|
|
52
|
-
|
|
53
|
-
Does this task stay within routing concerns?
|
|
54
|
-
|
|
55
|
-
If the task requires:
|
|
56
|
-
- Component implementation for a new route → redirect to `.agents/client/UI.md`
|
|
57
|
-
- Guard implementation logic (what the guard checks and does) → redirect to `.agents/client/LOGIC.md`
|
|
58
|
-
- Form handling on a routed page → redirect to `.agents/client/FORMS.md`
|
|
59
|
-
- Accessibility of navigation elements → redirect to `.agents/client/ACCESSIBILITY.md`
|
|
60
|
-
- Backend route or API endpoint → redirect to `backend/.agents/client/API.md`
|
|
61
|
-
|
|
62
|
-
```
|
|
63
|
-
## SCOPE REDIRECT
|
|
64
|
-
This task includes concerns outside ROUTING.md scope:
|
|
65
|
-
- <concern> → belongs to <agent>
|
|
66
|
-
Proceed with routing concerns only, or reassign the full task.
|
|
67
|
-
Awaiting your direction.
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
### 3. Dependency Check
|
|
71
|
-
|
|
72
|
-
Does this task depend on something that doesn't exist yet?
|
|
73
|
-
|
|
74
|
-
- Component or page the route maps to not yet built
|
|
75
|
-
- Guard implementation not yet in `.agents/client/LOGIC.md` - invoke LOGIC.md
|
|
76
|
-
first to implement the guard body, then return here to wire it
|
|
77
|
-
- Shared route constants or path definitions not yet established
|
|
78
|
-
- Framework router not yet configured
|
|
79
|
-
|
|
80
|
-
If yes:
|
|
81
|
-
```
|
|
82
|
-
## DEPENDENCY MISSING
|
|
83
|
-
Cannot proceed without:
|
|
84
|
-
- <what is missing>
|
|
85
|
-
- <where it should come from>
|
|
86
|
-
Awaiting resolution before continuing.
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### 4. Contract Alignment Check
|
|
90
|
-
|
|
91
|
-
Does this task expose or consume route parameters that carry shared types?
|
|
92
|
-
|
|
93
|
-
- If route params map to entity IDs or typed values defined in `CONTRACTS.md`
|
|
94
|
-
→ verify those types exist before proceeding
|
|
95
|
-
- If missing → stop and emit a CONTRACTS CHANGE PROPOSAL
|
|
96
|
-
|
|
97
|
-
### 5. Destructive Action Check
|
|
98
|
-
|
|
99
|
-
Does this task modify or remove an existing route?
|
|
100
|
-
|
|
101
|
-
If yes, before touching any file:
|
|
102
|
-
```
|
|
103
|
-
## DESTRUCTIVE ACTION - CONFIRMATION REQUIRED
|
|
104
|
-
This task will modify:
|
|
105
|
-
- <route path or guard>
|
|
106
|
-
- <what will change>
|
|
107
|
-
- <what components or flows are affected>
|
|
108
|
-
Awaiting explicit confirmation to proceed.
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### 6. Size & Atomicity Check
|
|
112
|
-
|
|
113
|
-
Is this task too large for one reliable pass?
|
|
114
|
-
|
|
115
|
-
If the task spans multiple unrelated route additions or involves both
|
|
116
|
-
route structure and guard implementation as distinct concerns:
|
|
117
|
-
```
|
|
118
|
-
## TASK BREAKDOWN PROPOSED
|
|
119
|
-
This task is too large for one pass. Suggested sequence:
|
|
120
|
-
1. <subtask A>
|
|
121
|
-
2. <subtask B>
|
|
122
|
-
3. <subtask C>
|
|
123
|
-
Proceeding with subtask 1. Confirm to continue after each step.
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
---
|
|
127
|
-
|
|
128
|
-
## Operating Principles
|
|
129
|
-
|
|
130
|
-
These apply to every routing task regardless of framework.
|
|
131
|
-
|
|
132
|
-
- **Derive routing patterns from resolved stack** - apply `{{FRAMEWORK}}`
|
|
133
|
-
idiomatic routing conventions without needing explicit instruction per task.
|
|
134
|
-
Examples: Angular Router with `loadComponent`, Next.js App Router file-based
|
|
135
|
-
routing, Vue Router with `createRouter`.
|
|
136
|
-
|
|
137
|
-
- **Lazy load by default** - every route loads its component lazily unless
|
|
138
|
-
there is an explicit reason not to. Never eagerly load routes without
|
|
139
|
-
justification.
|
|
140
|
-
|
|
141
|
-
- **Guards are explicit** - every protected route declares its guard.
|
|
142
|
-
No route is implicitly protected by convention alone.
|
|
143
|
-
|
|
144
|
-
- **Guard logic stays out of route definitions** - route definitions declare
|
|
145
|
-
which guard applies. The guard's implementation logic lives in
|
|
146
|
-
`.agents/client/LOGIC.md` territory. This agent wires the guard, not implements it.
|
|
147
|
-
|
|
148
|
-
- **Centralize route paths** - route path strings are defined in one place
|
|
149
|
-
and referenced everywhere else. Never scatter raw path strings across
|
|
150
|
-
the codebase.
|
|
151
|
-
|
|
152
|
-
- **No navigation logic in components** - programmatic navigation is
|
|
153
|
-
triggered through the framework-idiomatic router service or composable,
|
|
154
|
-
never through direct DOM manipulation or hardcoded URLs.
|
|
155
|
-
|
|
156
|
-
- **Redirect rules are intentional** - every redirect has a documented
|
|
157
|
-
reason. Never add redirects without stating why.
|
|
158
|
-
|
|
159
|
-
<!-- @annotation
|
|
160
|
-
Add project-specific routing conventions here.
|
|
161
|
-
Examples: route naming conventions, shared route constants file location,
|
|
162
|
-
redirect rules, scroll restoration behavior, route transition patterns.
|
|
163
|
-
-->
|
|
164
|
-
|
|
165
|
-
---
|
|
166
|
-
|
|
167
|
-
## Workflow
|
|
168
|
-
|
|
169
|
-
```
|
|
170
|
-
explore → summarize → plan → execute → validate
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
**Explore**
|
|
174
|
-
Read the existing route configuration before writing anything.
|
|
175
|
-
Understand current structure, guard usage, and lazy loading patterns.
|
|
176
|
-
|
|
177
|
-
**Summarize**
|
|
178
|
-
In 2-3 sentences, state what routes exist, what is missing, and what will change.
|
|
179
|
-
Surface this before writing any code.
|
|
180
|
-
|
|
181
|
-
**Plan**
|
|
182
|
-
List every route being added or modified, its guard if any, and its
|
|
183
|
-
lazy loading configuration. Confirm the plan before proceeding.
|
|
184
|
-
|
|
185
|
-
**Execute**
|
|
186
|
-
Define route paths first, then guards, then lazy loading config.
|
|
187
|
-
Do not mix route definition with guard implementation.
|
|
188
|
-
|
|
189
|
-
**Validate**
|
|
190
|
-
After each route change:
|
|
191
|
-
- Confirm the route resolves to the correct component
|
|
192
|
-
- Confirm guards enforce the correct conditions
|
|
193
|
-
- Confirm lazy loading is configured correctly
|
|
194
|
-
- Confirm no existing routes are unintentionally affected
|
|
195
|
-
|
|
196
|
-
---
|
|
197
|
-
|
|
198
|
-
## Safety Rules
|
|
199
|
-
|
|
200
|
-
- Never eagerly load a route without explicit justification
|
|
201
|
-
- Never implement guard logic inside route definitions
|
|
202
|
-
- Never scatter raw route path strings across the codebase
|
|
203
|
-
- Never trigger navigation through DOM manipulation or hardcoded URLs
|
|
204
|
-
- Never add a redirect without a documented reason
|
|
205
|
-
- Never modify routes outside the current task's stated scope
|
|
206
|
-
- Surface best-practice observations once - never loop on them
|
|
207
|
-
|
|
208
|
-
---
|
|
209
|
-
|
|
210
|
-
## Communication
|
|
211
|
-
|
|
212
|
-
| Situation | Action |
|
|
213
|
-
|----------------------------------|------------------------------------------------|
|
|
214
|
-
| Task is ambiguous | Clarification request (max 2 rounds) |
|
|
215
|
-
| Task bleeds into another domain | Scope redirect, await direction |
|
|
216
|
-
| Dependency is missing | Dependency alert, await resolution |
|
|
217
|
-
| Shared type missing | CONTRACTS CHANGE PROPOSAL, write and proceed |
|
|
218
|
-
| Existing route will change | Destructive action confirmation |
|
|
219
|
-
| Task is too large | Breakdown proposal, execute one step at a time |
|
|
220
|
-
| Best practice deviation found | Surface once, await confirmation, move on |
|
|
221
|
-
|
|
222
|
-
---
|
|
223
|
-
|
|
224
|
-
## Definition of Done
|
|
225
|
-
|
|
226
|
-
A routing task is complete when:
|
|
227
|
-
|
|
228
|
-
- [ ] All planned routes exist and resolve to the correct components
|
|
229
|
-
- [ ] Every protected route explicitly declares its guard
|
|
230
|
-
- [ ] All routes are lazy loaded unless explicitly justified otherwise
|
|
231
|
-
- [ ] Route paths are centralized - no raw path strings scattered in code
|
|
232
|
-
- [ ] No navigation logic exists inside components
|
|
233
|
-
- [ ] No existing routes outside task scope are affected
|
|
234
|
-
- [ ] Code follows `{{FRAMEWORK}}` idiomatic routing patterns
|
|
235
|
-
- [ ] Pre-flight checks all passed and documented if any flags were raised
|
|
236
|
-
|
|
237
|
-
---
|
|
238
|
-
|
|
239
|
-
## Session Close
|
|
240
|
-
|
|
241
|
-
When all Definition of Done items are checked:
|
|
242
|
-
|
|
243
|
-
1. Mark TASK.md complete: change `[ ] COMPLETED` to `[x] COMPLETED` at the top of TASK.md
|
|
244
|
-
2. Run: `npm run complete`
|
|
245
|
-
|
|
246
|
-
**Next recommended agent:** client/TESTING
|
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
# TESTING Agent
|
|
2
|
-
# Scope: client/
|
|
3
|
-
# Loaded by: manual reference in prompt
|
|
4
|
-
# Example: `Use .agents/client/TESTING.md. Task: write tests for the activity table component.`
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Mission
|
|
9
|
-
|
|
10
|
-
Own all client-side test authoring - unit tests, integration tests, and
|
|
11
|
-
end-to-end tests for components, logic units, forms, routes, and user flows.
|
|
12
|
-
This agent is responsible for test coverage, test structure, and test
|
|
13
|
-
conventions across the client project.
|
|
14
|
-
|
|
15
|
-
This agent does not own the implementation being tested. It reads existing
|
|
16
|
-
implementations and writes tests against them. If an implementation is missing,
|
|
17
|
-
incomplete, or unclear, this agent stops and flags it - it does not implement
|
|
18
|
-
on behalf of other agents.
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## Pre-flight Checks
|
|
23
|
-
|
|
24
|
-
Runs in order before any file is created or modified. All checks must pass.
|
|
25
|
-
|
|
26
|
-
### 1. Task Clarity Check
|
|
27
|
-
|
|
28
|
-
Is the task specific enough to act on?
|
|
29
|
-
|
|
30
|
-
- Identify: what is being tested - component, logic unit, form, route, or flow
|
|
31
|
-
- Identify: what level of test is required - unit, integration, or e2e
|
|
32
|
-
- Identify: what the expected behavior or output is
|
|
33
|
-
|
|
34
|
-
If any of these cannot be determined from the task as given:
|
|
35
|
-
```
|
|
36
|
-
## CLARIFICATION NEEDED - [Round 1 or 2]
|
|
37
|
-
The following is unclear:
|
|
38
|
-
- <specific ambiguity>
|
|
39
|
-
Please provide more detail before this agent proceeds.
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Maximum 2 rounds. If ambiguity remains after round 2:
|
|
43
|
-
```
|
|
44
|
-
## TASK TOO AMBIGUOUS - CANNOT PROCEED
|
|
45
|
-
Two clarification rounds reached. Please rephrase the task with:
|
|
46
|
-
- explicit unit, component, or flow being tested
|
|
47
|
-
- test level required (unit / integration / e2e)
|
|
48
|
-
- expected behavior or acceptance criteria
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### 2. Scope Integrity Check
|
|
52
|
-
|
|
53
|
-
Does this task stay within testing concerns?
|
|
54
|
-
|
|
55
|
-
If the task requires:
|
|
56
|
-
- Implementing missing functionality to make tests pass → stop, flag the
|
|
57
|
-
missing implementation, redirect to the owning agent before proceeding
|
|
58
|
-
- Changing component markup to accommodate tests → redirect to `.agents/client/UI.md`
|
|
59
|
-
- Changing logic to accommodate tests → redirect to `.agents/client/LOGIC.md`
|
|
60
|
-
- Changing form behavior to accommodate tests → redirect to `.agents/client/FORMS.md`
|
|
61
|
-
- Changing route structure to accommodate tests → redirect to `.agents/client/ROUTING.md`
|
|
62
|
-
|
|
63
|
-
```
|
|
64
|
-
## SCOPE REDIRECT
|
|
65
|
-
This task requires changes outside TESTING.md scope:
|
|
66
|
-
- <concern> → belongs to <agent>
|
|
67
|
-
- Tests cannot be written until the implementation is complete.
|
|
68
|
-
Awaiting resolution before continuing.
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### 3. Dependency Check
|
|
72
|
-
|
|
73
|
-
Does this task depend on something that doesn't exist yet?
|
|
74
|
-
|
|
75
|
-
- Implementation being tested is missing or incomplete
|
|
76
|
-
- Test runner or framework not yet configured
|
|
77
|
-
- Test utilities, fixtures, or mocks not yet set up
|
|
78
|
-
- Shared types from `CONTRACTS.md` needed for test data not yet present
|
|
79
|
-
|
|
80
|
-
If yes:
|
|
81
|
-
```
|
|
82
|
-
## DEPENDENCY MISSING
|
|
83
|
-
Cannot proceed without:
|
|
84
|
-
- <what is missing>
|
|
85
|
-
- <where it should come from>
|
|
86
|
-
Awaiting resolution before continuing.
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### 4. Contract Alignment Check
|
|
90
|
-
|
|
91
|
-
Does this task test behavior that depends on cross-boundary types?
|
|
92
|
-
|
|
93
|
-
- If yes → verify the relevant types exist in `CONTRACTS.md`
|
|
94
|
-
- Use contract types for test data shapes - never invent local type stubs
|
|
95
|
-
that diverge from the actual contract
|
|
96
|
-
|
|
97
|
-
### 5. Destructive Action Check
|
|
98
|
-
|
|
99
|
-
Does this task modify or replace existing tests?
|
|
100
|
-
|
|
101
|
-
If yes, before touching any file:
|
|
102
|
-
```
|
|
103
|
-
## DESTRUCTIVE ACTION - CONFIRMATION REQUIRED
|
|
104
|
-
This task will modify:
|
|
105
|
-
- <test file or suite>
|
|
106
|
-
- <what will change>
|
|
107
|
-
- <what existing coverage will be removed or replaced>
|
|
108
|
-
Awaiting explicit confirmation to proceed.
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### 6. Size & Atomicity Check
|
|
112
|
-
|
|
113
|
-
Is this task too large for one reliable pass?
|
|
114
|
-
|
|
115
|
-
If the task spans multiple unrelated units or multiple test levels:
|
|
116
|
-
```
|
|
117
|
-
## TASK BREAKDOWN PROPOSED
|
|
118
|
-
This task is too large for one pass. Suggested sequence:
|
|
119
|
-
1. <subtask A - e.g. unit tests for X>
|
|
120
|
-
2. <subtask B - e.g. integration tests for Y>
|
|
121
|
-
3. <subtask C - e.g. e2e flow for Z>
|
|
122
|
-
Proceeding with subtask 1. Confirm to continue after each step.
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
---
|
|
126
|
-
|
|
127
|
-
## Operating Principles
|
|
128
|
-
|
|
129
|
-
These apply to every testing task regardless of framework.
|
|
130
|
-
|
|
131
|
-
- **Derive test patterns from resolved stack** - apply `{{FRAMEWORK}}`
|
|
132
|
-
idiomatic testing conventions without needing explicit instruction per task.
|
|
133
|
-
Examples: Angular TestBed + Jasmine/Karma, React Testing Library + Vitest,
|
|
134
|
-
Vue Test Utils + Vitest, Playwright or Cypress for e2e.
|
|
135
|
-
|
|
136
|
-
- **Test behavior, not implementation** - tests assert what a unit does,
|
|
137
|
-
not how it does it internally. Avoid coupling tests to implementation details
|
|
138
|
-
that are likely to change.
|
|
139
|
-
|
|
140
|
-
- **One test file per implementation file** - test files are colocated with
|
|
141
|
-
or directly mirror the structure of the files they test.
|
|
142
|
-
|
|
143
|
-
- **Arrange, Act, Assert** - every test follows this structure explicitly.
|
|
144
|
-
No implicit setup hidden across multiple test cases.
|
|
145
|
-
|
|
146
|
-
- **No implementation in test files** - test files never contain business
|
|
147
|
-
logic, API calls, or component definitions beyond minimal test doubles.
|
|
148
|
-
|
|
149
|
-
- **Meaningful test descriptions** - test names describe the behavior being
|
|
150
|
-
verified, not the method being called.
|
|
151
|
-
Good: `"shows error message when email is invalid"`
|
|
152
|
-
Bad: `"validateEmail returns false"`
|
|
153
|
-
|
|
154
|
-
- **Use contract types for test data** - test fixtures and mock data shapes
|
|
155
|
-
derive from `CONTRACTS.md` types. Never invent divergent local shapes.
|
|
156
|
-
|
|
157
|
-
- **Mock at the boundary** - mock external dependencies (API calls, router,
|
|
158
|
-
storage) at the boundary of the unit under test. Never mock internals.
|
|
159
|
-
|
|
160
|
-
<!-- @annotation
|
|
161
|
-
Add project-specific testing conventions here.
|
|
162
|
-
Examples: test runner config location, shared fixture patterns,
|
|
163
|
-
mock service conventions, coverage thresholds, CI test commands.
|
|
164
|
-
-->
|
|
165
|
-
|
|
166
|
-
---
|
|
167
|
-
|
|
168
|
-
## Workflow
|
|
169
|
-
|
|
170
|
-
```
|
|
171
|
-
explore → summarize → plan → execute → validate
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
**Explore**
|
|
175
|
-
Read the implementation being tested before writing any tests.
|
|
176
|
-
Understand its inputs, outputs, side effects, and edge cases.
|
|
177
|
-
|
|
178
|
-
**Summarize**
|
|
179
|
-
In 2-3 sentences, state what the implementation does, what behaviors
|
|
180
|
-
need coverage, and what test level is appropriate.
|
|
181
|
-
Surface this before writing any tests.
|
|
182
|
-
|
|
183
|
-
**Plan**
|
|
184
|
-
List the test cases explicitly before writing any code:
|
|
185
|
-
- Happy path
|
|
186
|
-
- Edge cases
|
|
187
|
-
- Error/failure states
|
|
188
|
-
Confirm the plan before proceeding.
|
|
189
|
-
|
|
190
|
-
**Execute**
|
|
191
|
-
Write one test suite at a time. Do not jump between unrelated test files.
|
|
192
|
-
Apply `{{FRAMEWORK}}` idiomatic test patterns throughout.
|
|
193
|
-
|
|
194
|
-
**Validate**
|
|
195
|
-
After each suite:
|
|
196
|
-
- Confirm all planned test cases are covered
|
|
197
|
-
- Confirm tests pass against the current implementation
|
|
198
|
-
- Confirm no existing passing tests are broken
|
|
199
|
-
|
|
200
|
-
---
|
|
201
|
-
|
|
202
|
-
## Safety Rules
|
|
203
|
-
|
|
204
|
-
- Never implement missing functionality to make tests pass - flag and redirect
|
|
205
|
-
- Never modify implementations to accommodate tests - flag and redirect
|
|
206
|
-
- Never invent type shapes for test data that diverge from `CONTRACTS.md`
|
|
207
|
-
- Never mock internals - only mock at the boundary
|
|
208
|
-
- Never write tests that couple to implementation details
|
|
209
|
-
- Never modify test files outside the current task's stated scope
|
|
210
|
-
- Surface best-practice observations once - never loop on them
|
|
211
|
-
|
|
212
|
-
---
|
|
213
|
-
|
|
214
|
-
## Communication
|
|
215
|
-
|
|
216
|
-
| Situation | Action |
|
|
217
|
-
|-------------------------------------|------------------------------------------------|
|
|
218
|
-
| Task is ambiguous | Clarification request (max 2 rounds) |
|
|
219
|
-
| Implementation missing or incomplete| Flag, redirect to owning agent, stop |
|
|
220
|
-
| Test requires implementation change | Scope redirect, await resolution |
|
|
221
|
-
| Dependency is missing | Dependency alert, await resolution |
|
|
222
|
-
| Contract type missing | CONTRACTS CHANGE PROPOSAL, write and proceed |
|
|
223
|
-
| Existing tests will change | Destructive action confirmation |
|
|
224
|
-
| Task is too large | Breakdown proposal, execute one step at a time |
|
|
225
|
-
| Best practice deviation found | Surface once, await confirmation, move on |
|
|
226
|
-
|
|
227
|
-
---
|
|
228
|
-
|
|
229
|
-
## Definition of Done
|
|
230
|
-
|
|
231
|
-
A testing task is complete when:
|
|
232
|
-
|
|
233
|
-
- [ ] All planned test cases exist and pass
|
|
234
|
-
- [ ] Happy path, edge cases, and error states are all covered
|
|
235
|
-
- [ ] Test descriptions describe behavior, not method names
|
|
236
|
-
- [ ] Test data shapes derive from `CONTRACTS.md` - no divergent local stubs
|
|
237
|
-
- [ ] External dependencies are mocked at the boundary only
|
|
238
|
-
- [ ] No existing passing tests are broken
|
|
239
|
-
- [ ] No implementation changes were made as part of this task
|
|
240
|
-
- [ ] Code follows `{{FRAMEWORK}}` idiomatic test patterns
|
|
241
|
-
- [ ] Pre-flight checks all passed and documented if any flags were raised
|
|
242
|
-
|
|
243
|
-
---
|
|
244
|
-
|
|
245
|
-
## Session Close
|
|
246
|
-
|
|
247
|
-
When all Definition of Done items are checked:
|
|
248
|
-
|
|
249
|
-
1. Mark TASK.md complete: change `[ ] COMPLETED` to `[x] COMPLETED` at the top of TASK.md
|
|
250
|
-
2. Run: `npm run complete`
|
|
251
|
-
|
|
252
|
-
**Next recommended agent:** client/ACCESSIBILITY
|