agileflow 2.78.0 → 2.79.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 +6 -6
- package/package.json +1 -1
- package/scripts/agileflow-welcome.js +31 -84
- package/scripts/auto-self-improve.js +23 -45
- package/scripts/check-update.js +35 -42
- package/scripts/damage-control/bash-tool-damage-control.js +257 -0
- package/scripts/damage-control/edit-tool-damage-control.js +279 -0
- package/scripts/damage-control/patterns.yaml +227 -0
- package/scripts/damage-control/write-tool-damage-control.js +274 -0
- package/scripts/obtain-context.js +22 -3
- package/scripts/ralph-loop.js +191 -63
- package/scripts/screenshot-verifier.js +213 -0
- package/scripts/session-manager.js +12 -33
- package/src/core/agents/configuration-damage-control.md +248 -0
- package/src/core/commands/babysit.md +30 -2
- package/src/core/commands/setup/visual-e2e.md +462 -0
- package/src/core/skills/_learnings/code-review.yaml +118 -0
- package/src/core/skills/_learnings/story-writer.yaml +71 -0
- package/tools/cli/installers/ide/claude-code.js +127 -0
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Set up Visual E2E testing infrastructure with Playwright and screenshot verification
|
|
3
|
+
argument-hint: (no arguments)
|
|
4
|
+
compact_context:
|
|
5
|
+
priority: high
|
|
6
|
+
preserve_rules:
|
|
7
|
+
- "Install Playwright with npx playwright install --with-deps chromium"
|
|
8
|
+
- "Create playwright.config.ts with webServer config for auto-starting dev server"
|
|
9
|
+
- "Create tests/e2e/ directory with example test that takes screenshots"
|
|
10
|
+
- "Create screenshots/ directory for visual verification workflow"
|
|
11
|
+
- "Add test:e2e script to package.json"
|
|
12
|
+
- "All screenshots must be visually reviewed and renamed with 'verified-' prefix"
|
|
13
|
+
- "Use TodoWrite to track all 8 setup steps"
|
|
14
|
+
- "Run example test after setup to verify it works"
|
|
15
|
+
state_fields:
|
|
16
|
+
- playwright_installed
|
|
17
|
+
- config_created
|
|
18
|
+
- example_test_created
|
|
19
|
+
- screenshots_dir_created
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# setup-visual-e2e
|
|
23
|
+
|
|
24
|
+
Set up Visual E2E testing infrastructure with Playwright and screenshot verification workflow for reliable UI development.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## STEP 0: Gather Context
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
node .agileflow/scripts/obtain-context.js visual-e2e
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
<!-- COMPACT_SUMMARY_START -->
|
|
37
|
+
|
|
38
|
+
## COMPACT SUMMARY - /agileflow:setup:visual-e2e IS ACTIVE
|
|
39
|
+
|
|
40
|
+
**CRITICAL**: You are setting up Visual E2E infrastructure. All 8 steps must complete for working setup.
|
|
41
|
+
|
|
42
|
+
**ROLE**: Visual E2E Infrastructure Bootstrapper - Install Playwright, create config, create example tests with screenshots
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
### RULE #1: ALWAYS USE TodoWrite FOR 8 STEPS
|
|
47
|
+
|
|
48
|
+
Track all steps explicitly:
|
|
49
|
+
```
|
|
50
|
+
1. Check project has package.json
|
|
51
|
+
2. Install Playwright and dependencies
|
|
52
|
+
3. Create playwright.config.ts with webServer
|
|
53
|
+
4. Create tests/e2e/ directory structure
|
|
54
|
+
5. Create screenshots/ directory
|
|
55
|
+
6. Create example e2e test with screenshot capture
|
|
56
|
+
7. Add test:e2e script to package.json
|
|
57
|
+
8. Run example test to verify setup
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Mark each step complete. This ensures comprehensive setup.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
### RULE #2: SCREENSHOT VERIFICATION WORKFLOW
|
|
65
|
+
|
|
66
|
+
**The key insight**: Tests passing doesn't mean UI looks correct.
|
|
67
|
+
|
|
68
|
+
The Visual Mode workflow:
|
|
69
|
+
1. E2E tests capture screenshots during test runs
|
|
70
|
+
2. Claude reviews each screenshot visually
|
|
71
|
+
3. Claude renames verified screenshots with `verified-` prefix
|
|
72
|
+
4. `screenshot-verifier.js` confirms all screenshots are verified
|
|
73
|
+
5. Ralph Loop requires 2+ iterations in Visual Mode
|
|
74
|
+
|
|
75
|
+
**NEVER** declare UI work complete without visually reviewing screenshots.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
### RULE #3: PLAYWRIGHT CONFIG WITH WEBSERVER
|
|
80
|
+
|
|
81
|
+
Always configure webServer to auto-start dev server:
|
|
82
|
+
|
|
83
|
+
```typescript
|
|
84
|
+
// playwright.config.ts
|
|
85
|
+
export default defineConfig({
|
|
86
|
+
webServer: {
|
|
87
|
+
command: 'npm run dev',
|
|
88
|
+
url: 'http://localhost:3000',
|
|
89
|
+
reuseExistingServer: !process.env.CI,
|
|
90
|
+
timeout: 120000,
|
|
91
|
+
},
|
|
92
|
+
use: {
|
|
93
|
+
baseURL: 'http://localhost:3000',
|
|
94
|
+
screenshot: 'on', // Capture on every test
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
### RULE #4: EXAMPLE TEST WITH SCREENSHOTS
|
|
102
|
+
|
|
103
|
+
Create working example that captures screenshots:
|
|
104
|
+
|
|
105
|
+
```typescript
|
|
106
|
+
// tests/e2e/visual-example.spec.ts
|
|
107
|
+
import { test, expect } from '@playwright/test';
|
|
108
|
+
|
|
109
|
+
test('homepage visual check', async ({ page }) => {
|
|
110
|
+
await page.goto('/');
|
|
111
|
+
|
|
112
|
+
// Capture screenshot for visual verification
|
|
113
|
+
await page.screenshot({
|
|
114
|
+
path: 'screenshots/homepage.png',
|
|
115
|
+
fullPage: true
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
// Basic assertions
|
|
119
|
+
await expect(page).toHaveTitle(/./);
|
|
120
|
+
});
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
### ANTI-PATTERNS (DON'T DO THESE)
|
|
126
|
+
|
|
127
|
+
- Create config without example test
|
|
128
|
+
- Skip screenshots directory creation
|
|
129
|
+
- Forget webServer config (user has to manually start dev server)
|
|
130
|
+
- Skip running tests after setup
|
|
131
|
+
- Declare UI work done without reviewing screenshots
|
|
132
|
+
|
|
133
|
+
### DO THESE INSTEAD
|
|
134
|
+
|
|
135
|
+
- Create config AND working example test with screenshots
|
|
136
|
+
- Create screenshots/ directory in project root
|
|
137
|
+
- Configure webServer to auto-start dev server
|
|
138
|
+
- Run test after setup to verify and generate initial screenshot
|
|
139
|
+
- Review all screenshots visually before completing UI work
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
### WORKFLOW PHASES
|
|
144
|
+
|
|
145
|
+
**Phase 1: Detection (Step 1)**
|
|
146
|
+
- Check package.json exists
|
|
147
|
+
- Detect dev server command (npm run dev, yarn dev, etc.)
|
|
148
|
+
- Check if Playwright already installed
|
|
149
|
+
|
|
150
|
+
**Phase 2: Installation (Step 2)**
|
|
151
|
+
- Install @playwright/test
|
|
152
|
+
- Install browser with npx playwright install --with-deps chromium
|
|
153
|
+
|
|
154
|
+
**Phase 3: Configuration (Steps 3-5)**
|
|
155
|
+
- Create playwright.config.ts
|
|
156
|
+
- Create tests/e2e/ directory
|
|
157
|
+
- Create screenshots/ directory
|
|
158
|
+
- Add screenshots/ to .gitignore (optional - depends on workflow)
|
|
159
|
+
|
|
160
|
+
**Phase 4: Examples (Step 6)**
|
|
161
|
+
- Create example e2e test with screenshot capture
|
|
162
|
+
- Test should pass immediately
|
|
163
|
+
|
|
164
|
+
**Phase 5: Scripts (Step 7)**
|
|
165
|
+
- Add test:e2e script to package.json
|
|
166
|
+
|
|
167
|
+
**Phase 6: Verification (Step 8)**
|
|
168
|
+
- Run example test
|
|
169
|
+
- Show generated screenshot path
|
|
170
|
+
- Remind about verification workflow
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
### KEY FILES TO REMEMBER
|
|
175
|
+
|
|
176
|
+
| File | Purpose |
|
|
177
|
+
|------|---------|
|
|
178
|
+
| `playwright.config.ts` | Playwright configuration with webServer |
|
|
179
|
+
| `tests/e2e/visual-example.spec.ts` | Example test with screenshots |
|
|
180
|
+
| `screenshots/` | Directory for test screenshots |
|
|
181
|
+
| `scripts/screenshot-verifier.js` | Verify all screenshots have verified- prefix |
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
### REMEMBER AFTER COMPACTION
|
|
186
|
+
|
|
187
|
+
- `/agileflow:setup:visual-e2e` IS ACTIVE - bootstrap Visual E2E infrastructure
|
|
188
|
+
- Install Playwright with browser dependencies
|
|
189
|
+
- Configure webServer to auto-start dev server
|
|
190
|
+
- Create example test that captures screenshots
|
|
191
|
+
- Create screenshots/ directory
|
|
192
|
+
- Run test after setup to verify
|
|
193
|
+
- Use TodoWrite to track 8 steps
|
|
194
|
+
- Visual Mode = review screenshots + verified- prefix
|
|
195
|
+
|
|
196
|
+
<!-- COMPACT_SUMMARY_END -->
|
|
197
|
+
|
|
198
|
+
## Prompt
|
|
199
|
+
|
|
200
|
+
ROLE: Visual E2E Infrastructure Bootstrapper
|
|
201
|
+
|
|
202
|
+
INPUTS
|
|
203
|
+
DEV_CMD=<command> Dev server command (default: npm run dev)
|
|
204
|
+
PORT=<number> Dev server port (default: 3000)
|
|
205
|
+
BROWSER=chromium Browser to install (default: chromium)
|
|
206
|
+
|
|
207
|
+
ACTIONS
|
|
208
|
+
1) Check project has package.json
|
|
209
|
+
2) Install Playwright and browser dependencies
|
|
210
|
+
3) Create playwright.config.ts with webServer
|
|
211
|
+
4) Create tests/e2e/ directory structure
|
|
212
|
+
5) Create screenshots/ directory
|
|
213
|
+
6) Create example e2e test with screenshot capture
|
|
214
|
+
7) Add test:e2e script to package.json
|
|
215
|
+
8) Run example test to verify setup
|
|
216
|
+
|
|
217
|
+
TODO LIST TRACKING
|
|
218
|
+
**CRITICAL**: Immediately create a todo list using TodoWrite tool to track Visual E2E setup:
|
|
219
|
+
```
|
|
220
|
+
1. Check project has package.json
|
|
221
|
+
2. Install Playwright and browser dependencies
|
|
222
|
+
3. Create playwright.config.ts with webServer
|
|
223
|
+
4. Create tests/e2e/ directory structure
|
|
224
|
+
5. Create screenshots/ directory
|
|
225
|
+
6. Create example e2e test with screenshot capture
|
|
226
|
+
7. Add test:e2e script to package.json
|
|
227
|
+
8. Run example test to verify setup
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
Mark each step complete as you finish it.
|
|
231
|
+
|
|
232
|
+
OBJECTIVE
|
|
233
|
+
Set up Visual E2E testing infrastructure with Playwright and screenshot verification workflow.
|
|
234
|
+
|
|
235
|
+
WHY VISUAL E2E?
|
|
236
|
+
|
|
237
|
+
The problem: **Tests pass but UI is broken.**
|
|
238
|
+
|
|
239
|
+
Functional tests verify behavior but not visual appearance. A button can "work" but be:
|
|
240
|
+
- Wrong color
|
|
241
|
+
- Wrong position
|
|
242
|
+
- Overlapping other elements
|
|
243
|
+
- Missing entirely (replaced by error state)
|
|
244
|
+
|
|
245
|
+
Visual E2E with screenshot verification catches these issues.
|
|
246
|
+
|
|
247
|
+
PLAYWRIGHT CONFIG
|
|
248
|
+
|
|
249
|
+
Create playwright.config.ts:
|
|
250
|
+
```typescript
|
|
251
|
+
import { defineConfig, devices } from '@playwright/test';
|
|
252
|
+
|
|
253
|
+
export default defineConfig({
|
|
254
|
+
testDir: './tests/e2e',
|
|
255
|
+
|
|
256
|
+
// Run tests in parallel
|
|
257
|
+
fullyParallel: true,
|
|
258
|
+
|
|
259
|
+
// Fail the build on CI if you accidentally left test.only
|
|
260
|
+
forbidOnly: !!process.env.CI,
|
|
261
|
+
|
|
262
|
+
// Retry on CI only
|
|
263
|
+
retries: process.env.CI ? 2 : 0,
|
|
264
|
+
|
|
265
|
+
// Opt out of parallel tests on CI
|
|
266
|
+
workers: process.env.CI ? 1 : undefined,
|
|
267
|
+
|
|
268
|
+
// Reporter
|
|
269
|
+
reporter: 'html',
|
|
270
|
+
|
|
271
|
+
use: {
|
|
272
|
+
// Base URL for navigation
|
|
273
|
+
baseURL: 'http://localhost:3000',
|
|
274
|
+
|
|
275
|
+
// Capture screenshot on every test
|
|
276
|
+
screenshot: 'on',
|
|
277
|
+
|
|
278
|
+
// Collect trace on failure
|
|
279
|
+
trace: 'on-first-retry',
|
|
280
|
+
},
|
|
281
|
+
|
|
282
|
+
// Configure webServer to auto-start dev server
|
|
283
|
+
webServer: {
|
|
284
|
+
command: 'npm run dev',
|
|
285
|
+
url: 'http://localhost:3000',
|
|
286
|
+
reuseExistingServer: !process.env.CI,
|
|
287
|
+
timeout: 120000,
|
|
288
|
+
},
|
|
289
|
+
|
|
290
|
+
projects: [
|
|
291
|
+
{
|
|
292
|
+
name: 'chromium',
|
|
293
|
+
use: { ...devices['Desktop Chrome'] },
|
|
294
|
+
},
|
|
295
|
+
],
|
|
296
|
+
});
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
EXAMPLE E2E TEST
|
|
300
|
+
|
|
301
|
+
Create tests/e2e/visual-example.spec.ts:
|
|
302
|
+
```typescript
|
|
303
|
+
import { test, expect } from '@playwright/test';
|
|
304
|
+
|
|
305
|
+
test.describe('Visual Verification Examples', () => {
|
|
306
|
+
test('homepage loads correctly', async ({ page }) => {
|
|
307
|
+
await page.goto('/');
|
|
308
|
+
|
|
309
|
+
// Capture full-page screenshot for visual verification
|
|
310
|
+
await page.screenshot({
|
|
311
|
+
path: 'screenshots/homepage-full.png',
|
|
312
|
+
fullPage: true,
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
// Basic assertions
|
|
316
|
+
await expect(page).toHaveTitle(/./);
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
test('component renders correctly', async ({ page }) => {
|
|
320
|
+
await page.goto('/');
|
|
321
|
+
|
|
322
|
+
// Capture specific element screenshot
|
|
323
|
+
const header = page.locator('header').first();
|
|
324
|
+
if (await header.isVisible()) {
|
|
325
|
+
await header.screenshot({
|
|
326
|
+
path: 'screenshots/header-component.png',
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
// Verify element is visible
|
|
331
|
+
await expect(header).toBeVisible();
|
|
332
|
+
});
|
|
333
|
+
});
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
DIRECTORY STRUCTURE
|
|
337
|
+
|
|
338
|
+
Create:
|
|
339
|
+
```
|
|
340
|
+
tests/
|
|
341
|
+
└── e2e/
|
|
342
|
+
├── visual-example.spec.ts # Example test with screenshots
|
|
343
|
+
└── fixtures/ # Test data if needed
|
|
344
|
+
|
|
345
|
+
screenshots/ # Screenshot output directory
|
|
346
|
+
├── homepage-full.png # After test runs
|
|
347
|
+
└── verified-homepage-full.png # After Claude reviews
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
NPM SCRIPTS
|
|
351
|
+
|
|
352
|
+
Add to package.json:
|
|
353
|
+
```json
|
|
354
|
+
{
|
|
355
|
+
"scripts": {
|
|
356
|
+
"test:e2e": "playwright test",
|
|
357
|
+
"test:e2e:ui": "playwright test --ui",
|
|
358
|
+
"test:e2e:headed": "playwright test --headed"
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
INSTALLATION
|
|
364
|
+
|
|
365
|
+
```bash
|
|
366
|
+
# Install Playwright
|
|
367
|
+
npm install --save-dev @playwright/test
|
|
368
|
+
|
|
369
|
+
# Install browser (chromium is smallest)
|
|
370
|
+
npx playwright install --with-deps chromium
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
VISUAL VERIFICATION WORKFLOW
|
|
374
|
+
|
|
375
|
+
After running tests:
|
|
376
|
+
|
|
377
|
+
1. **Review screenshots**: Claude reads each screenshot in screenshots/
|
|
378
|
+
2. **Verify visually**: Check that UI looks correct
|
|
379
|
+
3. **Rename verified**: `mv screenshots/homepage.png screenshots/verified-homepage.png`
|
|
380
|
+
4. **Run verifier**: `node scripts/screenshot-verifier.js --path ./screenshots`
|
|
381
|
+
|
|
382
|
+
This ensures Claude actually looked at each screenshot before declaring completion.
|
|
383
|
+
|
|
384
|
+
INTEGRATION WITH RALPH LOOP
|
|
385
|
+
|
|
386
|
+
When using Visual Mode in Ralph Loop:
|
|
387
|
+
```bash
|
|
388
|
+
# Initialize loop with Visual Mode
|
|
389
|
+
node scripts/ralph-loop.js --init --epic=EP-XXXX --visual
|
|
390
|
+
|
|
391
|
+
# Loop checks:
|
|
392
|
+
# 1. npm test passes
|
|
393
|
+
# 2. All screenshots have verified- prefix
|
|
394
|
+
# 3. Minimum 2 iterations completed
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
Visual Mode prevents premature completion promises for UI work.
|
|
398
|
+
|
|
399
|
+
WORKFLOW
|
|
400
|
+
|
|
401
|
+
1. Check for package.json
|
|
402
|
+
2. Show proposed setup plan:
|
|
403
|
+
```
|
|
404
|
+
Will install:
|
|
405
|
+
- @playwright/test
|
|
406
|
+
- chromium browser (~300MB)
|
|
407
|
+
|
|
408
|
+
Will create:
|
|
409
|
+
- playwright.config.ts (with webServer config)
|
|
410
|
+
- tests/e2e/visual-example.spec.ts
|
|
411
|
+
- screenshots/ directory
|
|
412
|
+
|
|
413
|
+
Will update:
|
|
414
|
+
- package.json (add test:e2e scripts)
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
3. Ask: "Proceed with Visual E2E setup? (YES/NO)"
|
|
418
|
+
|
|
419
|
+
4. If YES:
|
|
420
|
+
- Run installations
|
|
421
|
+
- Create config files
|
|
422
|
+
- Create example test
|
|
423
|
+
- Run test to verify setup
|
|
424
|
+
|
|
425
|
+
5. Show results:
|
|
426
|
+
```
|
|
427
|
+
Visual E2E Setup Complete
|
|
428
|
+
|
|
429
|
+
Installed:
|
|
430
|
+
- @playwright/test
|
|
431
|
+
- chromium browser
|
|
432
|
+
|
|
433
|
+
Created:
|
|
434
|
+
- playwright.config.ts
|
|
435
|
+
- tests/e2e/visual-example.spec.ts
|
|
436
|
+
- screenshots/
|
|
437
|
+
|
|
438
|
+
Try running:
|
|
439
|
+
- npm run test:e2e # Run tests
|
|
440
|
+
- npm run test:e2e:headed # Watch tests run
|
|
441
|
+
|
|
442
|
+
Visual Mode workflow:
|
|
443
|
+
1. Run tests: npm run test:e2e
|
|
444
|
+
2. Review screenshots in screenshots/
|
|
445
|
+
3. Rename verified: mv file.png verified-file.png
|
|
446
|
+
4. Verify all: node scripts/screenshot-verifier.js
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
RULES
|
|
450
|
+
- Preview all changes (diff-first, YES/NO)
|
|
451
|
+
- Run test after setup to verify and generate screenshots
|
|
452
|
+
- Configure webServer to auto-start dev server
|
|
453
|
+
- Create working example test with screenshot capture
|
|
454
|
+
- Use chromium only (smallest browser, ~300MB)
|
|
455
|
+
- Remind about verification workflow after setup
|
|
456
|
+
|
|
457
|
+
OUTPUT
|
|
458
|
+
- Setup summary
|
|
459
|
+
- Playwright configuration with webServer
|
|
460
|
+
- Example E2E test with screenshot capture
|
|
461
|
+
- Screenshots directory
|
|
462
|
+
- Instructions for Visual Mode workflow
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Learnings for agileflow-code-review skill
|
|
2
|
+
# This file accumulates user preferences for code review criteria.
|
|
3
|
+
|
|
4
|
+
skill: code-review
|
|
5
|
+
version: 1
|
|
6
|
+
last_updated: 2026-01-09T00:00:00.000Z
|
|
7
|
+
|
|
8
|
+
# =============================================================================
|
|
9
|
+
# PREFERENCES
|
|
10
|
+
# =============================================================================
|
|
11
|
+
preferences:
|
|
12
|
+
# Initial preferences from project conventions
|
|
13
|
+
- signal: "Project code review standards"
|
|
14
|
+
learning: "Use 6-category analysis with severity-based prioritization"
|
|
15
|
+
confidence: high
|
|
16
|
+
captured: 2026-01-09T00:00:00.000Z
|
|
17
|
+
|
|
18
|
+
# =============================================================================
|
|
19
|
+
# CONVENTIONS
|
|
20
|
+
# =============================================================================
|
|
21
|
+
conventions:
|
|
22
|
+
- "Be constructive, not critical - frame feedback helpfully"
|
|
23
|
+
- "Always show BAD and GOOD code examples"
|
|
24
|
+
- "Include Positive Observations section"
|
|
25
|
+
- "Calculate code quality score (0-100)"
|
|
26
|
+
- "Never auto-fix without explicit approval"
|
|
27
|
+
- "Save report to docs/08-project/code-reviews/"
|
|
28
|
+
|
|
29
|
+
# =============================================================================
|
|
30
|
+
# ANTI-PATTERNS
|
|
31
|
+
# =============================================================================
|
|
32
|
+
anti_patterns:
|
|
33
|
+
- "Don't use harsh language or blame developers"
|
|
34
|
+
- "Don't only show bad examples - show fixes too"
|
|
35
|
+
- "Don't auto-commit fixes without approval"
|
|
36
|
+
- "Don't treat MEDIUM issues as CRITICAL"
|
|
37
|
+
- "Don't skip the Positive Observations section"
|
|
38
|
+
|
|
39
|
+
# =============================================================================
|
|
40
|
+
# SEVERITY_THRESHOLDS
|
|
41
|
+
# =============================================================================
|
|
42
|
+
# Custom severity mappings learned from user feedback
|
|
43
|
+
severity_thresholds:
|
|
44
|
+
# Default thresholds (can be overridden by learnings)
|
|
45
|
+
cyclomatic_complexity:
|
|
46
|
+
acceptable: 10
|
|
47
|
+
warning: 15
|
|
48
|
+
critical: 20
|
|
49
|
+
|
|
50
|
+
function_length:
|
|
51
|
+
acceptable: 50
|
|
52
|
+
warning: 100
|
|
53
|
+
critical: 150
|
|
54
|
+
|
|
55
|
+
file_length:
|
|
56
|
+
acceptable: 500
|
|
57
|
+
warning: 1000
|
|
58
|
+
critical: 1500
|
|
59
|
+
|
|
60
|
+
test_coverage:
|
|
61
|
+
acceptable: 80
|
|
62
|
+
warning: 60
|
|
63
|
+
critical: 40
|
|
64
|
+
|
|
65
|
+
# =============================================================================
|
|
66
|
+
# CUSTOM_RULES
|
|
67
|
+
# =============================================================================
|
|
68
|
+
# Project-specific rules learned from corrections
|
|
69
|
+
custom_rules:
|
|
70
|
+
# Example: rules that would be learned from corrections
|
|
71
|
+
# - pattern: "console.log"
|
|
72
|
+
# severity: "HIGH"
|
|
73
|
+
# reason: "No console.log in production code"
|
|
74
|
+
# confidence: high
|
|
75
|
+
# captured: 2026-01-09T00:00:00.000Z
|
|
76
|
+
|
|
77
|
+
# =============================================================================
|
|
78
|
+
# FOCUS_AREAS
|
|
79
|
+
# =============================================================================
|
|
80
|
+
# Weighted focus areas (higher = more important)
|
|
81
|
+
focus_areas:
|
|
82
|
+
security: 1.5
|
|
83
|
+
performance: 1.2
|
|
84
|
+
code_quality: 1.0
|
|
85
|
+
best_practices: 1.0
|
|
86
|
+
testing: 1.2
|
|
87
|
+
documentation: 0.8
|
|
88
|
+
|
|
89
|
+
# =============================================================================
|
|
90
|
+
# CONTEXT
|
|
91
|
+
# =============================================================================
|
|
92
|
+
context:
|
|
93
|
+
report_location: docs/08-project/code-reviews/
|
|
94
|
+
score_threshold_block: 60
|
|
95
|
+
score_threshold_warn: 80
|
|
96
|
+
|
|
97
|
+
# =============================================================================
|
|
98
|
+
# EXAMPLES
|
|
99
|
+
# =============================================================================
|
|
100
|
+
examples:
|
|
101
|
+
good_feedback:
|
|
102
|
+
- "This could be improved by using parameterized queries to prevent SQL injection"
|
|
103
|
+
- "Consider extracting this into a helper function for reusability"
|
|
104
|
+
- "Good use of TypeScript strict mode"
|
|
105
|
+
|
|
106
|
+
bad_feedback:
|
|
107
|
+
- "This code is terrible"
|
|
108
|
+
- "Wrong"
|
|
109
|
+
- "Fix this"
|
|
110
|
+
|
|
111
|
+
# =============================================================================
|
|
112
|
+
# METADATA
|
|
113
|
+
# =============================================================================
|
|
114
|
+
metadata:
|
|
115
|
+
corrections_count: 0
|
|
116
|
+
approvals_count: 0
|
|
117
|
+
created: 2026-01-09T00:00:00.000Z
|
|
118
|
+
sessions: []
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Learnings for agileflow-story-writer skill
|
|
2
|
+
# This file accumulates user preferences for user story formatting.
|
|
3
|
+
|
|
4
|
+
skill: story-writer
|
|
5
|
+
version: 1
|
|
6
|
+
last_updated: 2026-01-09T00:00:00.000Z
|
|
7
|
+
|
|
8
|
+
# =============================================================================
|
|
9
|
+
# PREFERENCES
|
|
10
|
+
# =============================================================================
|
|
11
|
+
preferences:
|
|
12
|
+
# Initial preferences from project conventions
|
|
13
|
+
- signal: "Project uses AgileFlow story template"
|
|
14
|
+
learning: "Use standard AgileFlow user story format with frontmatter"
|
|
15
|
+
confidence: high
|
|
16
|
+
captured: 2026-01-09T00:00:00.000Z
|
|
17
|
+
|
|
18
|
+
# =============================================================================
|
|
19
|
+
# CONVENTIONS
|
|
20
|
+
# =============================================================================
|
|
21
|
+
conventions:
|
|
22
|
+
- "Use 'As a [role], I want [action], So that [benefit]' format"
|
|
23
|
+
- "Include 2-5 acceptance criteria with Given/When/Then"
|
|
24
|
+
- "Use P0/P1/P2/P3 priority levels"
|
|
25
|
+
- "Use Fibonacci estimation (1,2,3,5,8,13)"
|
|
26
|
+
- "Assign owner based on work type (AG-UI, AG-API, AG-CI, AG-DEVOPS)"
|
|
27
|
+
- "Include Technical Notes section for implementation guidance"
|
|
28
|
+
- "Include Definition of Done checklist"
|
|
29
|
+
- "File naming: US-####-descriptive-name.md"
|
|
30
|
+
|
|
31
|
+
# =============================================================================
|
|
32
|
+
# ANTI-PATTERNS
|
|
33
|
+
# =============================================================================
|
|
34
|
+
anti_patterns:
|
|
35
|
+
- "Don't create stories > 13 points (split into multiple)"
|
|
36
|
+
- "Don't skip acceptance criteria"
|
|
37
|
+
- "Don't use vague descriptions ('implement feature')"
|
|
38
|
+
- "Don't forget to update status.json"
|
|
39
|
+
- "Don't skip the diff-first/YES-NO pattern"
|
|
40
|
+
|
|
41
|
+
# =============================================================================
|
|
42
|
+
# CONTEXT
|
|
43
|
+
# =============================================================================
|
|
44
|
+
context:
|
|
45
|
+
story_location: docs/06-stories/
|
|
46
|
+
status_file: docs/09-agents/status.json
|
|
47
|
+
test_stub_location: docs/07-testing/test-cases/
|
|
48
|
+
index_file: docs/06-stories/README.md
|
|
49
|
+
|
|
50
|
+
# =============================================================================
|
|
51
|
+
# EXAMPLES
|
|
52
|
+
# =============================================================================
|
|
53
|
+
examples:
|
|
54
|
+
good:
|
|
55
|
+
- "US-0042: User Login Form (clear, specific, testable)"
|
|
56
|
+
- "US-0015: Add pagination to user list (scoped, estimable)"
|
|
57
|
+
- "US-0023: Database connection pooling (technical, well-defined)"
|
|
58
|
+
|
|
59
|
+
bad:
|
|
60
|
+
- "US-0099: Implement stuff (vague)"
|
|
61
|
+
- "US-0100: Fix all bugs (not specific)"
|
|
62
|
+
- "US-0101: Make it work better (no acceptance criteria)"
|
|
63
|
+
|
|
64
|
+
# =============================================================================
|
|
65
|
+
# METADATA
|
|
66
|
+
# =============================================================================
|
|
67
|
+
metadata:
|
|
68
|
+
corrections_count: 0
|
|
69
|
+
approvals_count: 0
|
|
70
|
+
created: 2026-01-09T00:00:00.000Z
|
|
71
|
+
sessions: []
|