worclaude 2.7.1 → 2.9.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 (83) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/README.md +72 -56
  3. package/package.json +1 -1
  4. package/src/commands/doc-lint.js +37 -0
  5. package/src/commands/doctor.js +145 -0
  6. package/src/commands/init.js +144 -44
  7. package/src/commands/observability.js +24 -0
  8. package/src/commands/regenerate-routing.js +70 -0
  9. package/src/commands/status.js +14 -0
  10. package/src/commands/upgrade.js +87 -1
  11. package/src/commands/worktrees.js +90 -0
  12. package/src/core/config.js +10 -1
  13. package/src/core/file-categorizer.js +16 -0
  14. package/src/core/merger.js +42 -20
  15. package/src/core/scaffolder.js +26 -0
  16. package/src/data/agents.js +14 -28
  17. package/src/data/optional-features.js +46 -0
  18. package/src/generators/agent-routing.js +189 -34
  19. package/src/index.js +37 -0
  20. package/src/prompts/agent-selection.js +11 -3
  21. package/src/utils/agent-frontmatter.js +109 -0
  22. package/src/utils/doc-lint.js +196 -0
  23. package/src/utils/observability.js +300 -0
  24. package/templates/agents/optional/backend/api-designer.md +7 -1
  25. package/templates/agents/optional/backend/auth-auditor.md +7 -1
  26. package/templates/agents/optional/backend/database-analyst.md +7 -1
  27. package/templates/agents/optional/data/data-pipeline-reviewer.md +7 -1
  28. package/templates/agents/optional/data/ml-experiment-tracker.md +7 -1
  29. package/templates/agents/optional/data/prompt-engineer.md +7 -1
  30. package/templates/agents/optional/devops/ci-fixer.md +7 -1
  31. package/templates/agents/optional/devops/dependency-manager.md +7 -1
  32. package/templates/agents/optional/devops/deploy-validator.md +7 -1
  33. package/templates/agents/optional/devops/docker-helper.md +7 -1
  34. package/templates/agents/optional/docs/changelog-generator.md +9 -1
  35. package/templates/agents/optional/docs/doc-writer.md +7 -1
  36. package/templates/agents/optional/frontend/style-enforcer.md +7 -1
  37. package/templates/agents/optional/frontend/ui-reviewer.md +7 -1
  38. package/templates/agents/optional/quality/bug-fixer.md +19 -1
  39. package/templates/agents/optional/quality/build-fixer.md +7 -1
  40. package/templates/agents/optional/quality/performance-auditor.md +8 -1
  41. package/templates/agents/optional/quality/refactorer.md +7 -1
  42. package/templates/agents/optional/quality/security-reviewer.md +7 -1
  43. package/templates/agents/universal/build-validator.md +7 -1
  44. package/templates/agents/universal/code-simplifier.md +8 -1
  45. package/templates/agents/universal/plan-reviewer.md +8 -1
  46. package/templates/agents/universal/test-writer.md +19 -1
  47. package/templates/agents/universal/upstream-watcher.md +8 -1
  48. package/templates/agents/universal/verify-app.md +45 -3
  49. package/templates/commands/build-fix.md +30 -11
  50. package/templates/commands/commit-push-pr.md +47 -24
  51. package/templates/commands/compact-safe.md +79 -7
  52. package/templates/commands/conflict-resolver.md +7 -3
  53. package/templates/commands/end.md +63 -17
  54. package/templates/commands/learn.md +72 -8
  55. package/templates/commands/observability.md +59 -0
  56. package/templates/commands/refactor-clean.md +44 -2
  57. package/templates/commands/review-changes.md +40 -11
  58. package/templates/commands/review-plan.md +83 -10
  59. package/templates/commands/start.md +61 -30
  60. package/templates/commands/sync.md +86 -6
  61. package/templates/commands/test-coverage.md +78 -12
  62. package/templates/commands/update-claude-md.md +96 -7
  63. package/templates/commands/verify.md +32 -8
  64. package/templates/core/claude-md.md +9 -0
  65. package/templates/hooks/correction-detect.cjs +1 -1
  66. package/templates/hooks/learn-capture.cjs +0 -2
  67. package/templates/hooks/obs-agent-events.cjs +55 -0
  68. package/templates/hooks/obs-command-invocations.cjs +53 -0
  69. package/templates/hooks/obs-skill-loads.cjs +54 -0
  70. package/templates/hooks/skill-hint.cjs +22 -2
  71. package/templates/scripts/start-drift.sh +29 -0
  72. package/templates/scripts/sync-release-scope.sh +17 -0
  73. package/templates/scripts/test-coverage-changed-files.sh +14 -0
  74. package/templates/settings/base.json +73 -0
  75. package/templates/skills/universal/claude-md-maintenance.md +50 -14
  76. package/templates/skills/universal/git-conventions.md +11 -1
  77. package/templates/skills/universal/memory-architecture.md +115 -0
  78. package/templates/skills/universal/subagent-usage.md +15 -2
  79. package/src/data/agent-registry.js +0 -365
  80. package/templates/agents/optional/quality/e2e-runner.md +0 -98
  81. package/templates/commands/status.md +0 -15
  82. package/templates/commands/techdebt.md +0 -18
  83. package/templates/commands/upstream-check.md +0 -85
@@ -67,14 +67,27 @@ coordination overhead grows.
67
67
  Some agents use `git worktree` to make changes without affecting your working tree:
68
68
 
69
69
  How it works:
70
- 1. Agent creates a worktree from your current branch
70
+ 1. Agent creates a worktree based on `origin/HEAD` (see gotcha below)
71
71
  2. Makes changes in the worktree (isolated from your files)
72
72
  3. Commits changes
73
73
  4. You merge or cherry-pick the results
74
74
 
75
- Agents with worktree isolation: code-simplifier, test-writer, verify-app, ci-fixer,
75
+ Agents with worktree isolation: code-simplifier, test-writer, verify-app,
76
76
  bug-fixer, refactorer, doc-writer.
77
77
 
78
+ ### Base-branch gotcha
79
+
80
+ Both `claude --worktree` and the Agent `isolation: "worktree"` option create the
81
+ worktree from `origin/HEAD`, **not** your current branch. If your working branch is
82
+ ahead of whatever `origin/HEAD` points to (typically `origin/main`), the worktree
83
+ will miss those commits.
84
+
85
+ Run `worclaude doctor` to diagnose. Fix locally with `git remote set-head origin
86
+ <your-branch>` (reversible via `--auto` or `main`). The bundled `bug-fixer`,
87
+ `verify-app`, and `test-writer` agents include a freshness preamble that resets
88
+ their worktree to match the parent's current branch automatically; other worktree
89
+ agents do not.
90
+
78
91
  Benefits:
79
92
  - Agent's changes don't conflict with your uncommitted work
80
93
  - You can review agent changes before merging
@@ -1,365 +0,0 @@
1
- /**
2
- * Agent routing metadata for every agent in the registry.
3
- * Used by the agent-routing generator to produce the routing skill file.
4
- * Separate from agents.js because this data is only consumed by the generator,
5
- * not by CLI prompts or display logic.
6
- */
7
- export const AGENT_REGISTRY = {
8
- // --- Universal agents ---
9
-
10
- 'plan-reviewer': {
11
- category: 'universal',
12
- model: 'Opus',
13
- isolation: 'none',
14
- pipelineStage: 'Stage 2: Review',
15
- triggerType: 'manual',
16
- triggerCommand: '/review-plan',
17
- whenToUse: 'Before executing any implementation prompt. Always.',
18
- whatItDoes:
19
- 'Reviews implementation plans as a senior staff engineer. Challenges assumptions, finds ambiguity, checks verification strategy, identifies missing edge cases.',
20
- expectBack: 'Refined plan with concerns addressed, or list of blocking questions.',
21
- situationLabel: 'Got an implementation prompt',
22
- },
23
- 'test-writer': {
24
- category: 'universal',
25
- model: 'Sonnet',
26
- isolation: 'worktree',
27
- pipelineStage: 'Stage 5: Verify',
28
- triggerType: 'automatic',
29
- triggerCommand: null,
30
- whenToUse: 'After completing implementation of any feature or module.',
31
- whatItDoes:
32
- 'Writes unit tests, integration tests, edge case tests. Covers happy path, error cases, boundary conditions.',
33
- expectBack: 'Test files committed to worktree branch. Merge when reviewed.',
34
- situationLabel: 'Finished implementing a feature',
35
- },
36
- 'code-simplifier': {
37
- category: 'universal',
38
- model: 'Sonnet',
39
- isolation: 'worktree',
40
- pipelineStage: 'Stage 4: Quality',
41
- triggerType: 'automatic',
42
- triggerCommand: '/simplify',
43
- whenToUse:
44
- 'After a feature is implemented and tests pass. Also when you notice growing complexity or duplication.',
45
- whatItDoes:
46
- 'Reviews code for duplication, unnecessary abstraction, missed reuse opportunities. Simplifies without changing behavior.',
47
- expectBack: 'Cleanup commits on worktree branch. Diff review before merge.',
48
- situationLabel: 'Notice code getting complex',
49
- },
50
- 'build-validator': {
51
- category: 'universal',
52
- model: 'Haiku',
53
- isolation: 'none',
54
- pipelineStage: 'Stage 5: Verify',
55
- triggerType: 'automatic',
56
- triggerCommand: null,
57
- whenToUse: 'Before every commit. After merging worktree branches.',
58
- whatItDoes:
59
- 'Quick validation — tests pass, build succeeds, lint clean. Fast and cheap (Haiku model).',
60
- expectBack: 'Pass/fail with specific errors if failed.',
61
- situationLabel: 'Are about to commit',
62
- },
63
- 'verify-app': {
64
- category: 'universal',
65
- model: 'Sonnet',
66
- isolation: 'worktree',
67
- pipelineStage: 'Stage 5: Verify',
68
- triggerType: 'manual',
69
- triggerCommand: '/verify',
70
- whenToUse: 'Before creating a PR. After major changes.',
71
- whatItDoes:
72
- 'Full end-to-end verification. Runs the app, tests all major flows, checks for regressions. More thorough than build-validator.',
73
- expectBack: 'Detailed verification report. Blocking issues listed.',
74
- situationLabel: 'Finished a task, ready for PR',
75
- },
76
- 'upstream-watcher': {
77
- category: 'universal',
78
- model: 'Sonnet',
79
- isolation: 'none',
80
- pipelineStage: 'Stage 1: Context',
81
- triggerType: 'manual',
82
- triggerCommand: '/upstream-check',
83
- whenToUse:
84
- 'At the start of a session to check for upstream Claude Code changes. After Claude Code updates. When behavior seems different from last session.',
85
- whatItDoes:
86
- "Fetches anthropic-watch feeds, cross-references upstream changes against the project's scaffolded agents/commands/hooks/skills, and produces an impact report.",
87
- expectBack:
88
- 'Impact report: which upstream changes affect this project, which are informational, and recommended actions.',
89
- situationLabel: 'Want to check for upstream Claude Code changes',
90
- },
91
-
92
- // --- Frontend agents (2) ---
93
-
94
- 'ui-reviewer': {
95
- category: 'frontend',
96
- model: 'Sonnet',
97
- isolation: 'none',
98
- triggerType: 'manual',
99
- triggerCommand: null,
100
- whenToUse:
101
- 'After implementing or modifying UI components. When adding new pages or layouts. During design system changes.',
102
- whatItDoes:
103
- 'Reviews UI components for consistency, accessibility, responsiveness. Checks component hierarchy and prop patterns.',
104
- expectBack: 'UI review report with specific issues and accessibility findings.',
105
- situationLabel: 'Implemented or changed UI components',
106
- },
107
- 'style-enforcer': {
108
- category: 'frontend',
109
- model: 'Haiku',
110
- isolation: 'none',
111
- triggerType: 'manual',
112
- triggerCommand: null,
113
- whenToUse: 'After CSS/styling changes. When new components are added. During theme updates.',
114
- whatItDoes:
115
- 'Ensures design system compliance, catches CSS/styling drift, validates consistent spacing/colors/typography.',
116
- expectBack: 'List of design system violations with fix suggestions.',
117
- situationLabel: 'Made styling or CSS changes',
118
- },
119
-
120
- // --- Backend agents (3) ---
121
-
122
- 'api-designer': {
123
- category: 'backend',
124
- model: 'Opus',
125
- isolation: 'none',
126
- triggerType: 'manual',
127
- triggerCommand: null,
128
- whenToUse:
129
- 'Designing new API endpoints. Changing existing API contracts. Adding new routes or modifying request/response shapes.',
130
- whatItDoes:
131
- 'Reviews API design for RESTful conventions, naming consistency, backward compatibility, request/response shape validation.',
132
- expectBack: 'Design review with specific recommendations.',
133
- situationLabel: 'Designed a new API endpoint',
134
- },
135
- 'database-analyst': {
136
- category: 'backend',
137
- model: 'Sonnet',
138
- isolation: 'none',
139
- triggerType: 'manual',
140
- triggerCommand: null,
141
- whenToUse: 'Writing migrations. Changing schemas. Complex queries. Data integrity concerns.',
142
- whatItDoes:
143
- 'Reviews schema design, migration safety, query performance, index usage, data integrity constraints.',
144
- expectBack: 'Analysis with specific concerns and recommendations.',
145
- situationLabel: 'Wrote a database migration or schema change',
146
- },
147
- 'auth-auditor': {
148
- category: 'backend',
149
- model: 'Opus',
150
- isolation: 'none',
151
- triggerType: 'manual',
152
- triggerCommand: null,
153
- whenToUse:
154
- 'Any change to authentication or authorization flow. New roles, permissions, token handling.',
155
- whatItDoes:
156
- 'Reviews auth flows for correctness, token lifecycle, permission checks, session management, OWASP compliance.',
157
- expectBack: 'Audit report with pass/fail per check.',
158
- situationLabel: 'Changed auth or authorization logic',
159
- },
160
-
161
- // --- DevOps agents (4) ---
162
-
163
- 'dependency-manager': {
164
- category: 'devops',
165
- model: 'Haiku',
166
- isolation: 'none',
167
- triggerType: 'manual',
168
- triggerCommand: null,
169
- whenToUse:
170
- 'After adding new packages. During regular maintenance. When security advisories are published.',
171
- whatItDoes:
172
- 'Audits, updates, and resolves dependency issues. Checks for security vulnerabilities in packages.',
173
- expectBack: 'Dependency audit report with update recommendations.',
174
- situationLabel: 'Added new dependencies or running maintenance',
175
- },
176
- 'ci-fixer': {
177
- category: 'devops',
178
- model: 'Sonnet',
179
- isolation: 'worktree',
180
- triggerType: 'manual',
181
- triggerCommand: null,
182
- whenToUse: 'CI pipeline fails. Build errors in GitHub Actions/CI. Flaky tests blocking merges.',
183
- whatItDoes: 'Reads CI logs, identifies root cause, implements fix in worktree isolation.',
184
- expectBack: 'Fix committed to worktree branch with CI passing.',
185
- situationLabel: 'CI pipeline is failing',
186
- },
187
- 'docker-helper': {
188
- category: 'devops',
189
- model: 'Sonnet',
190
- isolation: 'none',
191
- triggerType: 'manual',
192
- triggerCommand: null,
193
- whenToUse:
194
- 'Creating or modifying Dockerfiles. Compose file changes. Multi-stage build optimization. Container debugging.',
195
- whatItDoes:
196
- 'Manages containerization, Dockerfile optimization, compose file configuration, multi-stage builds.',
197
- expectBack: 'Optimized Docker configuration with size/performance improvements.',
198
- situationLabel: 'Working with Docker or containers',
199
- },
200
- 'deploy-validator': {
201
- category: 'devops',
202
- model: 'Sonnet',
203
- isolation: 'none',
204
- triggerType: 'manual',
205
- triggerCommand: null,
206
- whenToUse:
207
- 'Before deploying to staging or production. After infrastructure changes. New environment setup.',
208
- whatItDoes:
209
- 'Validates deployment readiness — environment configs, secrets management, health checks, rollback strategy.',
210
- expectBack: 'Deployment readiness checklist with pass/fail.',
211
- situationLabel: 'Preparing for deployment',
212
- },
213
-
214
- // --- Quality agents (6) ---
215
-
216
- 'bug-fixer': {
217
- category: 'quality',
218
- model: 'Sonnet',
219
- isolation: 'worktree',
220
- triggerType: 'manual',
221
- triggerCommand: null,
222
- whenToUse:
223
- "Bug reported. Test failing. Error in logs. Something broke but you don't want to derail current work.",
224
- whatItDoes:
225
- 'Investigates the bug in isolation. Reads logs, reproduces, finds root cause, implements fix, writes regression test.',
226
- expectBack: 'Fix committed to worktree branch with regression test.',
227
- situationLabel: 'Got a bug report mid-task',
228
- },
229
- 'security-reviewer': {
230
- category: 'quality',
231
- model: 'Opus',
232
- isolation: 'none',
233
- triggerType: 'manual',
234
- triggerCommand: null,
235
- whenToUse:
236
- 'Auth changes. User input handling. New API endpoints exposed to external users. Dependency updates.',
237
- whatItDoes:
238
- 'Scans for injection vulnerabilities, auth bypasses, data exposure, insecure defaults, dependency vulnerabilities.',
239
- expectBack: 'Security report with severity ratings.',
240
- situationLabel: 'Made security-sensitive changes',
241
- },
242
- 'performance-auditor': {
243
- category: 'quality',
244
- model: 'Sonnet',
245
- isolation: 'none',
246
- triggerType: 'manual',
247
- triggerCommand: null,
248
- whenToUse:
249
- 'Performance concern raised. Slow endpoint discovered. Before releasing to production. After major changes.',
250
- whatItDoes:
251
- 'Profiles code, identifies bottlenecks, checks database query efficiency, measures response times, suggests optimizations.',
252
- expectBack: 'Performance report with benchmarks and recommendations.',
253
- situationLabel: 'Suspect performance issues',
254
- },
255
- refactorer: {
256
- category: 'quality',
257
- model: 'Sonnet',
258
- isolation: 'worktree',
259
- triggerType: 'manual',
260
- triggerCommand: null,
261
- whenToUse:
262
- 'Large-scale renames. Architectural pattern changes. Library migrations. Moving code between modules.',
263
- whatItDoes:
264
- 'Handles large-scale refactoring in worktree isolation. Renames, architectural changes, pattern migrations with full test verification.',
265
- expectBack: 'Refactored code on worktree branch with all tests passing.',
266
- situationLabel: 'Need large-scale refactoring',
267
- },
268
- 'build-fixer': {
269
- category: 'quality',
270
- model: 'Sonnet',
271
- isolation: 'worktree',
272
- triggerType: 'manual',
273
- triggerCommand: null,
274
- whenToUse:
275
- 'Build is broken. Tests failing. Lint errors blocking commit. Type errors after a merge or dependency update.',
276
- whatItDoes:
277
- 'Reads error output, categorizes failures (build/test/lint/type), fixes in priority order, verifies each fix. Works in worktree isolation.',
278
- expectBack: 'All checks passing, with a summary of what was fixed and why.',
279
- situationLabel: 'Build or tests are broken',
280
- },
281
- 'e2e-runner': {
282
- category: 'quality',
283
- model: 'Sonnet',
284
- isolation: 'worktree',
285
- triggerType: 'manual',
286
- triggerCommand: null,
287
- whenToUse:
288
- 'After implementing user-facing features. Before releases. When unit tests pass but integration is suspect.',
289
- whatItDoes:
290
- 'Writes and runs end-to-end tests for critical user journeys. Detects E2E framework (Playwright/Cypress) or recommends setup. Tests web, API, or CLI flows.',
291
- expectBack: 'E2E test results with pass/fail per journey and reproduction steps for failures.',
292
- situationLabel: 'Need end-to-end testing of user flows',
293
- },
294
-
295
- // --- Documentation agents (2) ---
296
-
297
- 'doc-writer': {
298
- category: 'documentation',
299
- model: 'Sonnet',
300
- isolation: 'worktree',
301
- triggerType: 'manual',
302
- triggerCommand: null,
303
- whenToUse:
304
- 'After implementing new features. After API changes. When README is outdated. Before release.',
305
- whatItDoes:
306
- 'Updates documentation, README, API docs from code changes. Keeps docs in sync with implementation.',
307
- expectBack: 'Updated docs committed to worktree branch.',
308
- situationLabel: 'Need docs updated after implementation',
309
- },
310
- 'changelog-generator': {
311
- category: 'documentation',
312
- model: 'Haiku',
313
- isolation: 'none',
314
- triggerType: 'manual',
315
- triggerCommand: null,
316
- whenToUse:
317
- 'Before releasing a new version. After merging a batch of PRs. When preparing release notes.',
318
- whatItDoes:
319
- 'Generates changelogs from git history, PR descriptions, and commit messages. Formats for release notes.',
320
- expectBack: 'Formatted changelog entry for the release.',
321
- situationLabel: 'Preparing a release',
322
- },
323
-
324
- // --- Data / AI agents (3) ---
325
-
326
- 'data-pipeline-reviewer': {
327
- category: 'data',
328
- model: 'Sonnet',
329
- isolation: 'none',
330
- triggerType: 'manual',
331
- triggerCommand: null,
332
- whenToUse:
333
- 'New data pipeline created. ETL logic changed. Data transformation modified. Schema compatibility concerns.',
334
- whatItDoes:
335
- 'Reviews data flows, validates transformations, checks for data loss, validates schema compatibility.',
336
- expectBack: 'Pipeline review with data integrity concerns.',
337
- situationLabel: 'Created or changed a data pipeline',
338
- },
339
- 'ml-experiment-tracker': {
340
- category: 'data',
341
- model: 'Sonnet',
342
- isolation: 'none',
343
- triggerType: 'manual',
344
- triggerCommand: null,
345
- whenToUse:
346
- 'Running ML experiments. Comparing model performance. Hyperparameter tuning. Model selection.',
347
- whatItDoes:
348
- 'Tracks ML experiments, compares metrics across runs, documents hyperparameters and results.',
349
- expectBack: 'Experiment comparison report with recommendations.',
350
- situationLabel: 'Running or comparing ML experiments',
351
- },
352
- 'prompt-engineer': {
353
- category: 'data',
354
- model: 'Opus',
355
- isolation: 'none',
356
- triggerType: 'manual',
357
- triggerCommand: null,
358
- whenToUse:
359
- 'Writing LLM prompts. Optimizing prompt performance. Building prompt chains. Testing prompt variations.',
360
- whatItDoes:
361
- 'Reviews and optimizes LLM prompts and chains. Tests prompt variations, measures output quality.',
362
- expectBack: 'Optimized prompts with test results and quality comparison.',
363
- situationLabel: 'Writing or optimizing LLM prompts',
364
- },
365
- };
@@ -1,98 +0,0 @@
1
- ---
2
- name: e2e-runner
3
- description: "Writes and runs end-to-end tests"
4
- model: sonnet
5
- isolation: worktree
6
- background: true
7
- maxTurns: 50
8
- ---
9
-
10
- You are an end-to-end testing specialist. You write and run tests
11
- that exercise the application from the user's perspective — clicking
12
- buttons, filling forms, calling APIs, verifying responses. You work
13
- in a worktree to keep test artifacts isolated.
14
-
15
- ## When to Use
16
-
17
- - After implementing a new user-facing feature
18
- - Before a release to verify critical user journeys
19
- - After fixing a bug to prevent regression
20
- - When unit tests pass but you suspect integration issues
21
-
22
- ## Framework Detection
23
-
24
- Check the project for existing E2E setup:
25
- 1. Look for `playwright.config.*`, `cypress.config.*`, or `jest.config.*` with `testEnvironment: 'jsdom'`
26
- 2. Check `package.json` for `@playwright/test`, `cypress`, `puppeteer`, or `selenium-webdriver`
27
- 3. If no E2E framework exists, recommend Playwright and offer to set it up
28
-
29
- ## What You Test
30
-
31
- ### Critical User Journeys
32
- Identify the 3-5 most important user flows and test them end-to-end:
33
- - Authentication: sign up → log in → access protected resource → log out
34
- - Core action: the main thing users do (create post, submit order, run command)
35
- - Error recovery: what happens when things go wrong (invalid input, network error, timeout)
36
-
37
- ### For Web Applications
38
- - Page loads without errors (no console errors, no broken images)
39
- - Forms submit and validate correctly
40
- - Navigation works (links, back button, deep links)
41
- - Responsive behavior at key breakpoints (mobile, tablet, desktop)
42
- - Authentication state persists across page reloads
43
-
44
- ### For APIs
45
- - Endpoints return correct status codes and response shapes
46
- - Authentication and authorization work correctly
47
- - Rate limiting and error responses are proper
48
- - Pagination, filtering, and sorting work on collection endpoints
49
-
50
- ### For CLI Tools
51
- - Commands execute and return correct exit codes
52
- - Output matches expected format (stdout, stderr separation)
53
- - Flag combinations work correctly
54
- - Error messages are helpful for invalid input
55
- - File I/O operations create/modify expected files
56
-
57
- ## Test Structure
58
-
59
- Follow the Page Object Model for web tests:
60
-
61
- ```
62
- // pages/LoginPage.js
63
- class LoginPage {
64
- constructor(page) { this.page = page; }
65
- async login(email, password) {
66
- await this.page.fill('[data-testid="email"]', email);
67
- await this.page.fill('[data-testid="password"]', password);
68
- await this.page.click('[data-testid="submit"]');
69
- }
70
- }
71
-
72
- // tests/auth.spec.js
73
- test('user can log in with valid credentials', async ({ page }) => {
74
- const loginPage = new LoginPage(page);
75
- await page.goto('/login');
76
- await loginPage.login('user@example.com', 'password123');
77
- await expect(page).toHaveURL('/dashboard');
78
- });
79
- ```
80
-
81
- ## Report Format
82
-
83
- | # | Journey | Steps | Result | Duration |
84
- |---|---------|-------|--------|----------|
85
- | 1 | Sign up flow | 5 | PASS | 2.3s |
86
- | 2 | Create and edit post | 8 | PASS | 4.1s |
87
- | 3 | Search with filters | 4 | FAIL — no results shown | 1.8s |
88
- | 4 | Delete account | 3 | PASS | 1.2s |
89
-
90
- **Summary**: 3/4 journeys pass. Search filter test fails — the filter component doesn't trigger a re-fetch when the filter value changes.
91
-
92
- ## Rules
93
- - E2E tests should be independent — each test starts from a clean state
94
- - Use data-testid attributes for selectors, never CSS classes or element structure
95
- - Set reasonable timeouts — E2E tests are slow; don't set 1s timeouts for page loads
96
- - Clean up test data after each test (or use isolated test accounts)
97
- - Keep E2E tests focused on critical journeys — don't try to cover everything
98
- - If the application won't start, report that as a blocking issue before writing any tests
@@ -1,15 +0,0 @@
1
- ---
2
- description: "Report current session state — branch, recent changes, pending work"
3
- ---
4
-
5
- Report current session state:
6
- - Current task / what you're working on
7
- - Git branch and recent commits
8
- - Test status (last run results)
9
- - Context usage estimate
10
- - Any blockers or pending decisions
11
-
12
- ## Trigger Phrases
13
- - "what's the status"
14
- - "where am I"
15
- - "what am I working on"
@@ -1,18 +0,0 @@
1
- ---
2
- description: "Scan codebase for technical debt and report findings"
3
- ---
4
-
5
- Scan the codebase for technical debt:
6
- - Duplicated code
7
- - Dead code (unused functions, imports, variables)
8
- - TODO/FIXME/HACK comments
9
- - Overly complex functions
10
- - Missing tests for critical paths
11
- - Inconsistent patterns
12
-
13
- Report findings organized by severity. Fix quick wins directly.
14
-
15
- ## Trigger Phrases
16
- - "find tech debt"
17
- - "scan for issues"
18
- - "code quality scan"
@@ -1,85 +0,0 @@
1
- ---
2
- description: "On-demand check of Anthropic upstream feeds (Claude Code releases, SDK changelogs, blog, status)"
3
- ---
4
-
5
- Fetch the anthropic-watch feeds and report a concise summary of upstream changes.
6
- This is a stateless, on-demand status check — no caching, no persistence.
7
-
8
- Feed base URL: `https://sefaertunc.github.io/anthropic-watch/feeds/`
9
-
10
- ## 1. Fetch Run Report
11
-
12
- ```bash
13
- curl -s --max-time 10 https://sefaertunc.github.io/anthropic-watch/feeds/run-report.json
14
- ```
15
-
16
- If the fetch fails (non-zero exit, empty body, or non-JSON output), report:
17
-
18
- ```
19
- Could not reach anthropic-watch feeds.
20
- ```
21
-
22
- and stop.
23
-
24
- Otherwise, parse the JSON and extract:
25
-
26
- - `timestamp` — when the scraper last ran
27
- - `sources[]` — list of all 16 sources with `{key, name, category, status, newItemCount, error}`
28
-
29
- Count how many sources have `status: "ok"` vs errored sources. List each errored source
30
- with its error message.
31
-
32
- ## 2. Fetch All Items
33
-
34
- ```bash
35
- curl -s --max-time 10 https://sefaertunc.github.io/anthropic-watch/feeds/all.json
36
- ```
37
-
38
- Apply the same failure handling.
39
-
40
- Otherwise, parse and take the **10 most recent items** (they are already sorted
41
- newest-first). Group them by `sourceCategory` (`core` vs `extended`).
42
-
43
- For each item show:
44
-
45
- - Title
46
- - Source name (`sourceName`)
47
- - Date (relative like "2 days ago" when you can compute it, otherwise ISO date)
48
- - URL
49
-
50
- ## 3. Highlight Claude Code-Critical Items
51
-
52
- Any item whose `source` is one of:
53
-
54
- - `claude-code-releases`
55
- - `claude-code-changelog`
56
- - `npm-claude-code`
57
- - `agent-sdk-ts-changelog`
58
- - `agent-sdk-py-changelog`
59
-
60
- directly affects scaffolded worclaude infrastructure. Flag these with a `[CRITICAL]`
61
- prefix in the listing so the user notices them first.
62
-
63
- ## 4. Closing Summary
64
-
65
- End with a single line:
66
-
67
- ```
68
- X new items since {timestamp}. Y/16 sources healthy.
69
- ```
70
-
71
- Where X is the total item count across all sources (sum of `newItemCount` from the
72
- run report) and Y is the healthy-source count.
73
-
74
- ## Rules
75
-
76
- - Use only `curl` and shell builtins. Do not invoke `node` or `npm`.
77
- - Do not cache, persist, or diff against prior runs — this command is stateless.
78
- - Keep the output concise. This is a status check, not a research report.
79
- - If both feeds fail, stop after the first failure message.
80
-
81
- ## Trigger Phrases
82
- - "check upstream"
83
- - "what changed in claude code"
84
- - "any anthropic updates"
85
- - "upstream status"