agileflow 2.30.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 (133) hide show
  1. package/package.json +61 -0
  2. package/src/core/agents/accessibility.md +445 -0
  3. package/src/core/agents/adr-writer.md +215 -0
  4. package/src/core/agents/analytics.md +523 -0
  5. package/src/core/agents/api.md +484 -0
  6. package/src/core/agents/ci.md +452 -0
  7. package/src/core/agents/compliance.md +401 -0
  8. package/src/core/agents/context7.md +164 -0
  9. package/src/core/agents/database.md +377 -0
  10. package/src/core/agents/datamigration.md +565 -0
  11. package/src/core/agents/design.md +400 -0
  12. package/src/core/agents/devops.md +576 -0
  13. package/src/core/agents/documentation.md +229 -0
  14. package/src/core/agents/epic-planner.md +277 -0
  15. package/src/core/agents/integrations.md +459 -0
  16. package/src/core/agents/mentor.md +375 -0
  17. package/src/core/agents/mobile.md +391 -0
  18. package/src/core/agents/monitoring.md +430 -0
  19. package/src/core/agents/performance.md +390 -0
  20. package/src/core/agents/product.md +311 -0
  21. package/src/core/agents/qa.md +647 -0
  22. package/src/core/agents/readme-updater.md +325 -0
  23. package/src/core/agents/refactor.md +432 -0
  24. package/src/core/agents/research.md +250 -0
  25. package/src/core/agents/security.md +379 -0
  26. package/src/core/agents/testing.md +397 -0
  27. package/src/core/agents/ui.md +999 -0
  28. package/src/core/commands/adr.md +32 -0
  29. package/src/core/commands/agent.md +23 -0
  30. package/src/core/commands/assign.md +34 -0
  31. package/src/core/commands/auto.md +364 -0
  32. package/src/core/commands/babysit.md +1357 -0
  33. package/src/core/commands/baseline.md +520 -0
  34. package/src/core/commands/blockers.md +343 -0
  35. package/src/core/commands/board.md +241 -0
  36. package/src/core/commands/changelog.md +321 -0
  37. package/src/core/commands/ci.md +36 -0
  38. package/src/core/commands/compress.md +270 -0
  39. package/src/core/commands/context.md +222 -0
  40. package/src/core/commands/debt.md +268 -0
  41. package/src/core/commands/deploy.md +544 -0
  42. package/src/core/commands/deps.md +560 -0
  43. package/src/core/commands/diagnose.md +227 -0
  44. package/src/core/commands/docs.md +166 -0
  45. package/src/core/commands/epic.md +40 -0
  46. package/src/core/commands/feedback.md +307 -0
  47. package/src/core/commands/handoff.md +33 -0
  48. package/src/core/commands/help.md +90 -0
  49. package/src/core/commands/impact.md +204 -0
  50. package/src/core/commands/metrics.md +530 -0
  51. package/src/core/commands/packages.md +369 -0
  52. package/src/core/commands/pr.md +35 -0
  53. package/src/core/commands/readme-sync.md +168 -0
  54. package/src/core/commands/research.md +30 -0
  55. package/src/core/commands/resume.md +475 -0
  56. package/src/core/commands/retro.md +538 -0
  57. package/src/core/commands/review.md +364 -0
  58. package/src/core/commands/session-init.md +532 -0
  59. package/src/core/commands/setup.md +708 -0
  60. package/src/core/commands/sprint.md +490 -0
  61. package/src/core/commands/status.md +38 -0
  62. package/src/core/commands/story-validate.md +242 -0
  63. package/src/core/commands/story.md +38 -0
  64. package/src/core/commands/template.md +458 -0
  65. package/src/core/commands/tests.md +359 -0
  66. package/src/core/commands/update.md +407 -0
  67. package/src/core/commands/velocity.md +369 -0
  68. package/src/core/commands/verify.md +283 -0
  69. package/src/core/skills/acceptance-criteria-generator/SKILL.md +46 -0
  70. package/src/core/skills/adr-template/SKILL.md +62 -0
  71. package/src/core/skills/agileflow-acceptance-criteria/SKILL.md +156 -0
  72. package/src/core/skills/agileflow-adr/SKILL.md +147 -0
  73. package/src/core/skills/agileflow-adr/examples/database-choice-example.md +122 -0
  74. package/src/core/skills/agileflow-adr/templates/adr-template.md +69 -0
  75. package/src/core/skills/agileflow-commit-messages/SKILL.md +130 -0
  76. package/src/core/skills/agileflow-commit-messages/reference/bad-examples.md +168 -0
  77. package/src/core/skills/agileflow-commit-messages/reference/good-examples.md +120 -0
  78. package/src/core/skills/agileflow-commit-messages/scripts/check-attribution.sh +15 -0
  79. package/src/core/skills/agileflow-epic-planner/SKILL.md +184 -0
  80. package/src/core/skills/agileflow-retro-facilitator/SKILL.md +281 -0
  81. package/src/core/skills/agileflow-sprint-planner/SKILL.md +212 -0
  82. package/src/core/skills/agileflow-story-writer/SKILL.md +163 -0
  83. package/src/core/skills/agileflow-story-writer/examples/good-story-example.md +63 -0
  84. package/src/core/skills/agileflow-story-writer/templates/story-template.md +44 -0
  85. package/src/core/skills/agileflow-tech-debt/SKILL.md +215 -0
  86. package/src/core/skills/api-documentation-generator/SKILL.md +65 -0
  87. package/src/core/skills/changelog-entry/SKILL.md +55 -0
  88. package/src/core/skills/commit-message-formatter/SKILL.md +50 -0
  89. package/src/core/skills/deployment-guide-generator/SKILL.md +84 -0
  90. package/src/core/skills/diagram-generator/SKILL.md +65 -0
  91. package/src/core/skills/error-handler-template/SKILL.md +78 -0
  92. package/src/core/skills/migration-checklist/SKILL.md +82 -0
  93. package/src/core/skills/pr-description/SKILL.md +65 -0
  94. package/src/core/skills/sql-schema-generator/SKILL.md +69 -0
  95. package/src/core/skills/story-skeleton/SKILL.md +34 -0
  96. package/src/core/skills/test-case-generator/SKILL.md +63 -0
  97. package/src/core/skills/type-definitions/SKILL.md +65 -0
  98. package/src/core/skills/validation-schema-generator/SKILL.md +64 -0
  99. package/src/core/templates/README-template.md +16 -0
  100. package/src/core/templates/adr-template.md +28 -0
  101. package/src/core/templates/agent-profile-template.md +51 -0
  102. package/src/core/templates/agileflow-metadata.json +41 -0
  103. package/src/core/templates/ci-workflow.yml +74 -0
  104. package/src/core/templates/claude-settings.advanced.example.json +71 -0
  105. package/src/core/templates/claude-settings.example.json +26 -0
  106. package/src/core/templates/comms-note-template.md +24 -0
  107. package/src/core/templates/environment.json +18 -0
  108. package/src/core/templates/epic-template.md +27 -0
  109. package/src/core/templates/init.sh +76 -0
  110. package/src/core/templates/research-template.md +44 -0
  111. package/src/core/templates/resume-session.sh +121 -0
  112. package/src/core/templates/session-state.json +20 -0
  113. package/src/core/templates/skill-template.md +75 -0
  114. package/src/core/templates/story-template.md +88 -0
  115. package/src/core/templates/validate-tokens.sh +88 -0
  116. package/src/core/templates/worktree-create.sh +111 -0
  117. package/src/core/templates/worktrees-guide.md +235 -0
  118. package/tools/agileflow-npx.js +40 -0
  119. package/tools/cli/agileflow-cli.js +70 -0
  120. package/tools/cli/commands/doctor.js +243 -0
  121. package/tools/cli/commands/install.js +82 -0
  122. package/tools/cli/commands/status.js +121 -0
  123. package/tools/cli/commands/uninstall.js +110 -0
  124. package/tools/cli/commands/update.js +99 -0
  125. package/tools/cli/installers/core/installer.js +296 -0
  126. package/tools/cli/installers/ide/_base-ide.js +133 -0
  127. package/tools/cli/installers/ide/claude-code.js +174 -0
  128. package/tools/cli/installers/ide/cursor.js +189 -0
  129. package/tools/cli/installers/ide/manager.js +197 -0
  130. package/tools/cli/installers/ide/windsurf.js +192 -0
  131. package/tools/cli/lib/ui.js +203 -0
  132. package/tools/cli/lib/version-checker.js +95 -0
  133. package/tools/postinstall.js +141 -0
@@ -0,0 +1,359 @@
1
+ ---
2
+ description: Set up automated testing infrastructure
3
+ allowed-tools: Bash, Read, Edit, Write, Glob, Grep
4
+ ---
5
+
6
+ # setup-tests
7
+
8
+ Automatically set up testing infrastructure for projects without existing tests.
9
+
10
+ ## Prompt
11
+
12
+ ROLE: Test Infrastructure Bootstrapper
13
+
14
+ TODO LIST TRACKING
15
+ **CRITICAL**: Immediately create a todo list using TodoWrite tool to track test infrastructure setup:
16
+ ```
17
+ 1. Detect language/runtime and framework
18
+ 2. Check existing test setup
19
+ 3. Install testing framework dependencies
20
+ 4. Create test configuration files
21
+ 5. Create example tests (unit, integration, E2E if requested)
22
+ 6. Create test directory structure
23
+ 7. Add test scripts to package.json/equivalent
24
+ 8. Integrate with CI workflow
25
+ 9. Create docs/02-practices/testing.md documentation
26
+ 10. Run tests to verify setup
27
+ ```
28
+
29
+ Mark each step complete as you finish it. This ensures comprehensive test infrastructure setup.
30
+
31
+ OBJECTIVE
32
+ Detect project type and set up appropriate testing framework with example tests and CI integration.
33
+
34
+ INPUTS (optional)
35
+ - FRAMEWORK=auto|jest|mocha|pytest|rspec|go-test|cargo-test (default: auto-detect)
36
+ - COVERAGE=yes|no (default: yes)
37
+ - E2E=yes|no (default: no, ask if needed)
38
+
39
+ PROJECT DETECTION
40
+
41
+ 1. Detect language/runtime:
42
+ - Node.js: package.json
43
+ - Python: requirements.txt, pyproject.toml
44
+ - Ruby: Gemfile
45
+ - Go: go.mod
46
+ - Rust: Cargo.toml
47
+ - Java: pom.xml, build.gradle
48
+ - .NET: *.csproj
49
+
50
+ 2. Detect framework (if applicable):
51
+ - React, Vue, Angular (npm deps)
52
+ - Django, Flask, FastAPI (Python imports)
53
+ - Rails, Sinatra (Gemfile)
54
+
55
+ 3. Check existing test setup:
56
+ - Test directories: test/, tests/, __tests__/, spec/
57
+ - Test config: jest.config.js, pytest.ini, .rspec
58
+ - CI config: .github/workflows/*test*
59
+
60
+ SETUP ACTIONS
61
+
62
+ ### For Node.js (Jest)
63
+ ```bash
64
+ npm install --save-dev jest @types/jest ts-jest
65
+ # If TypeScript: npm install --save-dev @types/jest ts-jest
66
+ # If React: npm install --save-dev @testing-library/react @testing-library/jest-dom
67
+ ```
68
+
69
+ Create jest.config.js:
70
+ ```javascript
71
+ module.exports = {
72
+ preset: 'ts-jest',
73
+ testEnvironment: 'node',
74
+ coverageDirectory: 'coverage',
75
+ collectCoverageFrom: [
76
+ 'src/**/*.{js,ts}',
77
+ '!src/**/*.d.ts',
78
+ '!src/**/*.spec.ts'
79
+ ],
80
+ coverageThreshold: {
81
+ global: {
82
+ branches: 70,
83
+ functions: 70,
84
+ lines: 70,
85
+ statements: 70
86
+ }
87
+ }
88
+ };
89
+ ```
90
+
91
+ ### For Python (pytest)
92
+ ```bash
93
+ pip install pytest pytest-cov pytest-mock
94
+ ```
95
+
96
+ Create pytest.ini:
97
+ ```ini
98
+ [pytest]
99
+ testpaths = tests
100
+ python_files = test_*.py *_test.py
101
+ python_classes = Test*
102
+ python_functions = test_*
103
+ addopts = --cov=src --cov-report=html --cov-report=term
104
+ ```
105
+
106
+ ### For Ruby (RSpec)
107
+ ```ruby
108
+ # Add to Gemfile
109
+ group :test do
110
+ gem 'rspec'
111
+ gem 'rspec-rails' # if Rails
112
+ gem 'factory_bot'
113
+ gem 'simplecov'
114
+ end
115
+ ```
116
+
117
+ ```bash
118
+ bundle install
119
+ rspec --init
120
+ ```
121
+
122
+ CREATE EXAMPLE TESTS
123
+
124
+ ### Unit Test Example (Node.js/Jest)
125
+ ```typescript
126
+ // tests/unit/example.test.ts
127
+ describe('Example Test Suite', () => {
128
+ it('should pass this example test', () => {
129
+ expect(true).toBe(true);
130
+ });
131
+
132
+ it('should test basic math', () => {
133
+ expect(2 + 2).toBe(4);
134
+ });
135
+ });
136
+ ```
137
+
138
+ ### Component Test Example (React)
139
+ ```typescript
140
+ // tests/components/Button.test.tsx
141
+ import { render, screen, fireEvent } from '@testing-library/react';
142
+ import Button from '@/components/Button';
143
+
144
+ describe('Button Component', () => {
145
+ it('renders with text', () => {
146
+ render(<Button>Click Me</Button>);
147
+ expect(screen.getByText('Click Me')).toBeInTheDocument();
148
+ });
149
+
150
+ it('calls onClick when clicked', () => {
151
+ const handleClick = jest.fn();
152
+ render(<Button onClick={handleClick}>Click</Button>);
153
+ fireEvent.click(screen.getByText('Click'));
154
+ expect(handleClick).toHaveBeenCalledTimes(1);
155
+ });
156
+ });
157
+ ```
158
+
159
+ ### API Test Example (Integration)
160
+ ```typescript
161
+ // tests/integration/api.test.ts
162
+ import request from 'supertest';
163
+ import app from '@/app';
164
+
165
+ describe('API Integration Tests', () => {
166
+ it('GET / should return 200', async () => {
167
+ const response = await request(app).get('/');
168
+ expect(response.status).toBe(200);
169
+ });
170
+
171
+ it('POST /api/users should create user', async () => {
172
+ const response = await request(app)
173
+ .post('/api/users')
174
+ .send({ name: 'Test User', email: 'test@example.com' });
175
+ expect(response.status).toBe(201);
176
+ expect(response.body).toHaveProperty('id');
177
+ });
178
+ });
179
+ ```
180
+
181
+ DIRECTORY STRUCTURE
182
+
183
+ Create:
184
+ ```
185
+ tests/
186
+ ├── unit/ # Unit tests (isolated functions/classes)
187
+ ├── integration/ # Integration tests (multiple components)
188
+ ├── e2e/ # End-to-end tests (full user flows) [if E2E=yes]
189
+ ├── fixtures/ # Test data
190
+ └── helpers/ # Test utilities
191
+ ```
192
+
193
+ E2E SETUP (if E2E=yes)
194
+
195
+ ### Playwright (recommended)
196
+ ```bash
197
+ npm install --save-dev @playwright/test
198
+ npx playwright install
199
+ ```
200
+
201
+ Create playwright.config.ts and example E2E test:
202
+ ```typescript
203
+ // tests/e2e/login.spec.ts
204
+ import { test, expect } from '@playwright/test';
205
+
206
+ test('user can log in', async ({ page }) => {
207
+ await page.goto('http://localhost:3000/login');
208
+ await page.fill('input[name="email"]', 'test@example.com');
209
+ await page.fill('input[name="password"]', 'password123');
210
+ await page.click('button[type="submit"]');
211
+ await expect(page).toHaveURL('http://localhost:3000/dashboard');
212
+ });
213
+ ```
214
+
215
+ CI INTEGRATION
216
+
217
+ Add to .github/workflows/ci.yml (or create):
218
+ ```yaml
219
+ test:
220
+ runs-on: ubuntu-latest
221
+ steps:
222
+ - uses: actions/checkout@v4
223
+
224
+ - name: Setup Node
225
+ uses: actions/setup-node@v4
226
+ with:
227
+ node-version: '20'
228
+ cache: 'npm'
229
+
230
+ - name: Install dependencies
231
+ run: npm ci
232
+
233
+ - name: Run tests
234
+ run: npm test -- --coverage
235
+
236
+ - name: Upload coverage
237
+ uses: codecov/codecov-action@v3
238
+ with:
239
+ files: ./coverage/lcov.info
240
+ ```
241
+
242
+ NPM SCRIPTS
243
+
244
+ Add to package.json:
245
+ ```json
246
+ {
247
+ "scripts": {
248
+ "test": "jest",
249
+ "test:watch": "jest --watch",
250
+ "test:coverage": "jest --coverage",
251
+ "test:unit": "jest tests/unit",
252
+ "test:integration": "jest tests/integration",
253
+ "test:e2e": "playwright test"
254
+ }
255
+ }
256
+ ```
257
+
258
+ DOCUMENTATION
259
+
260
+ Create docs/02-practices/testing.md:
261
+ ```markdown
262
+ # Testing Guide
263
+
264
+ ## Running Tests
265
+
266
+ \`\`\`bash
267
+ npm test # Run all tests
268
+ npm run test:watch # Watch mode
269
+ npm run test:coverage # With coverage report
270
+ npm run test:unit # Unit tests only
271
+ \`\`\`
272
+
273
+ ## Writing Tests
274
+
275
+ ### Unit Tests
276
+ - Test individual functions/classes in isolation
277
+ - Mock external dependencies
278
+ - Fast (<10ms per test)
279
+
280
+ ### Integration Tests
281
+ - Test multiple components together
282
+ - Use real dependencies when possible
283
+ - Medium speed (<100ms per test)
284
+
285
+ ### E2E Tests
286
+ - Test full user flows
287
+ - Run against real app
288
+ - Slow (seconds per test)
289
+
290
+ ## Coverage Requirements
291
+ - Minimum 70% coverage (enforced in CI)
292
+ - New code should be 90%+ covered
293
+ - Critical paths require 100% coverage
294
+
295
+ ## Best Practices
296
+ - Use descriptive test names (Given/When/Then)
297
+ - One assertion per test when possible
298
+ - Avoid test interdependence
299
+ - Use factories/fixtures for test data
300
+ ```
301
+
302
+ WORKFLOW
303
+
304
+ 1. Detect project type and existing setup
305
+ 2. Show proposed setup plan (diff-first):
306
+ ```
307
+ Will install:
308
+ - jest, @types/jest, ts-jest
309
+ - @testing-library/react, @testing-library/jest-dom
310
+
311
+ Will create:
312
+ - jest.config.js
313
+ - tests/unit/example.test.ts
314
+ - tests/integration/api.test.ts
315
+ - docs/02-practices/testing.md
316
+
317
+ Will update:
318
+ - package.json (add test scripts)
319
+ - .github/workflows/ci.yml (add test job)
320
+ ```
321
+
322
+ 3. Ask: "Proceed with test setup? (YES/NO)"
323
+
324
+ 4. If YES:
325
+ - Run installations
326
+ - Create config files
327
+ - Create example tests
328
+ - Update CI
329
+ - Run tests to verify setup
330
+
331
+ 5. Show results:
332
+ ```
333
+ ✅ Testing framework installed
334
+ ✅ Example tests created
335
+ ✅ CI integration added
336
+
337
+ Try running: npm test
338
+ ```
339
+
340
+ INTEGRATION
341
+
342
+ - Create story: "US-XXXX: Set up testing infrastructure"
343
+ - Update docs/02-practices/testing.md
344
+ - Suggest setting required checks in GitHub
345
+
346
+ RULES
347
+ - Preview all changes (diff-first, YES/NO)
348
+ - Run test suite after setup to verify
349
+ - Create working examples, not just config
350
+ - Document how to run and write tests
351
+ - Integrate with CI immediately
352
+ - Set reasonable coverage thresholds (not 100%)
353
+
354
+ OUTPUT
355
+ - Setup summary
356
+ - Test framework configuration
357
+ - Example tests (unit + integration + E2E if requested)
358
+ - CI integration
359
+ - Testing documentation