@every-env/compound-plugin 0.1.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 (226) hide show
  1. package/.claude-plugin/marketplace.json +37 -0
  2. package/.github/workflows/deploy-docs.yml +39 -0
  3. package/AGENTS.md +48 -0
  4. package/CLAUDE.md +380 -0
  5. package/LICENSE +21 -0
  6. package/README.md +65 -0
  7. package/bun.lock +30 -0
  8. package/docs/css/docs.css +675 -0
  9. package/docs/css/style.css +2886 -0
  10. package/docs/index.html +1046 -0
  11. package/docs/js/main.js +225 -0
  12. package/docs/pages/agents.html +649 -0
  13. package/docs/pages/changelog.html +495 -0
  14. package/docs/pages/commands.html +523 -0
  15. package/docs/pages/getting-started.html +582 -0
  16. package/docs/pages/mcp-servers.html +409 -0
  17. package/docs/pages/skills.html +611 -0
  18. package/docs/solutions/plugin-versioning-requirements.md +77 -0
  19. package/docs/specs/claude-code.md +67 -0
  20. package/docs/specs/codex.md +59 -0
  21. package/docs/specs/opencode.md +57 -0
  22. package/package.json +26 -0
  23. package/plans/grow-your-own-garden-plugin-architecture.md +102 -0
  24. package/plans/landing-page-launchkit-refresh.md +279 -0
  25. package/plugins/coding-tutor/.claude-plugin/plugin.json +9 -0
  26. package/plugins/coding-tutor/README.md +37 -0
  27. package/plugins/coding-tutor/commands/quiz-me.md +1 -0
  28. package/plugins/coding-tutor/commands/sync-tutorials.md +25 -0
  29. package/plugins/coding-tutor/commands/teach-me.md +1 -0
  30. package/plugins/coding-tutor/skills/coding-tutor/SKILL.md +214 -0
  31. package/plugins/coding-tutor/skills/coding-tutor/scripts/create_tutorial.py +207 -0
  32. package/plugins/coding-tutor/skills/coding-tutor/scripts/index_tutorials.py +193 -0
  33. package/plugins/coding-tutor/skills/coding-tutor/scripts/quiz_priority.py +190 -0
  34. package/plugins/coding-tutor/skills/coding-tutor/scripts/setup_tutorials.py +118 -0
  35. package/plugins/compound-engineering/.claude-plugin/plugin.json +33 -0
  36. package/plugins/compound-engineering/CHANGELOG.md +393 -0
  37. package/plugins/compound-engineering/CLAUDE.md +90 -0
  38. package/plugins/compound-engineering/LICENSE +21 -0
  39. package/plugins/compound-engineering/README.md +219 -0
  40. package/plugins/compound-engineering/agents/design/design-implementation-reviewer.md +94 -0
  41. package/plugins/compound-engineering/agents/design/design-iterator.md +197 -0
  42. package/plugins/compound-engineering/agents/design/figma-design-sync.md +172 -0
  43. package/plugins/compound-engineering/agents/docs/ankane-readme-writer.md +50 -0
  44. package/plugins/compound-engineering/agents/research/best-practices-researcher.md +100 -0
  45. package/plugins/compound-engineering/agents/research/framework-docs-researcher.md +83 -0
  46. package/plugins/compound-engineering/agents/research/git-history-analyzer.md +42 -0
  47. package/plugins/compound-engineering/agents/research/repo-research-analyst.md +113 -0
  48. package/plugins/compound-engineering/agents/review/agent-native-reviewer.md +246 -0
  49. package/plugins/compound-engineering/agents/review/architecture-strategist.md +52 -0
  50. package/plugins/compound-engineering/agents/review/code-simplicity-reviewer.md +85 -0
  51. package/plugins/compound-engineering/agents/review/data-integrity-guardian.md +70 -0
  52. package/plugins/compound-engineering/agents/review/data-migration-expert.md +97 -0
  53. package/plugins/compound-engineering/agents/review/deployment-verification-agent.md +159 -0
  54. package/plugins/compound-engineering/agents/review/dhh-rails-reviewer.md +45 -0
  55. package/plugins/compound-engineering/agents/review/julik-frontend-races-reviewer.md +222 -0
  56. package/plugins/compound-engineering/agents/review/kieran-python-reviewer.md +104 -0
  57. package/plugins/compound-engineering/agents/review/kieran-rails-reviewer.md +86 -0
  58. package/plugins/compound-engineering/agents/review/kieran-typescript-reviewer.md +95 -0
  59. package/plugins/compound-engineering/agents/review/pattern-recognition-specialist.md +57 -0
  60. package/plugins/compound-engineering/agents/review/performance-oracle.md +110 -0
  61. package/plugins/compound-engineering/agents/review/security-sentinel.md +93 -0
  62. package/plugins/compound-engineering/agents/workflow/bug-reproduction-validator.md +67 -0
  63. package/plugins/compound-engineering/agents/workflow/every-style-editor.md +64 -0
  64. package/plugins/compound-engineering/agents/workflow/lint.md +16 -0
  65. package/plugins/compound-engineering/agents/workflow/pr-comment-resolver.md +69 -0
  66. package/plugins/compound-engineering/agents/workflow/spec-flow-analyzer.md +113 -0
  67. package/plugins/compound-engineering/commands/agent-native-audit.md +277 -0
  68. package/plugins/compound-engineering/commands/changelog.md +137 -0
  69. package/plugins/compound-engineering/commands/create-agent-skill.md +8 -0
  70. package/plugins/compound-engineering/commands/deepen-plan.md +546 -0
  71. package/plugins/compound-engineering/commands/deploy-docs.md +112 -0
  72. package/plugins/compound-engineering/commands/feature-video.md +342 -0
  73. package/plugins/compound-engineering/commands/generate_command.md +162 -0
  74. package/plugins/compound-engineering/commands/heal-skill.md +142 -0
  75. package/plugins/compound-engineering/commands/lfg.md +19 -0
  76. package/plugins/compound-engineering/commands/plan_review.md +7 -0
  77. package/plugins/compound-engineering/commands/release-docs.md +211 -0
  78. package/plugins/compound-engineering/commands/report-bug.md +150 -0
  79. package/plugins/compound-engineering/commands/reproduce-bug.md +99 -0
  80. package/plugins/compound-engineering/commands/resolve_parallel.md +34 -0
  81. package/plugins/compound-engineering/commands/resolve_pr_parallel.md +49 -0
  82. package/plugins/compound-engineering/commands/resolve_todo_parallel.md +35 -0
  83. package/plugins/compound-engineering/commands/test-browser.md +339 -0
  84. package/plugins/compound-engineering/commands/triage.md +310 -0
  85. package/plugins/compound-engineering/commands/workflows/compound.md +202 -0
  86. package/plugins/compound-engineering/commands/workflows/plan.md +466 -0
  87. package/plugins/compound-engineering/commands/workflows/review.md +514 -0
  88. package/plugins/compound-engineering/commands/workflows/work.md +363 -0
  89. package/plugins/compound-engineering/commands/xcode-test.md +331 -0
  90. package/plugins/compound-engineering/skills/agent-browser/SKILL.md +223 -0
  91. package/plugins/compound-engineering/skills/agent-native-architecture/SKILL.md +435 -0
  92. package/plugins/compound-engineering/skills/agent-native-architecture/references/action-parity-discipline.md +409 -0
  93. package/plugins/compound-engineering/skills/agent-native-architecture/references/agent-execution-patterns.md +467 -0
  94. package/plugins/compound-engineering/skills/agent-native-architecture/references/agent-native-testing.md +582 -0
  95. package/plugins/compound-engineering/skills/agent-native-architecture/references/architecture-patterns.md +478 -0
  96. package/plugins/compound-engineering/skills/agent-native-architecture/references/dynamic-context-injection.md +338 -0
  97. package/plugins/compound-engineering/skills/agent-native-architecture/references/files-universal-interface.md +301 -0
  98. package/plugins/compound-engineering/skills/agent-native-architecture/references/from-primitives-to-domain-tools.md +359 -0
  99. package/plugins/compound-engineering/skills/agent-native-architecture/references/mcp-tool-design.md +506 -0
  100. package/plugins/compound-engineering/skills/agent-native-architecture/references/mobile-patterns.md +871 -0
  101. package/plugins/compound-engineering/skills/agent-native-architecture/references/product-implications.md +443 -0
  102. package/plugins/compound-engineering/skills/agent-native-architecture/references/refactoring-to-prompt-native.md +317 -0
  103. package/plugins/compound-engineering/skills/agent-native-architecture/references/self-modification.md +269 -0
  104. package/plugins/compound-engineering/skills/agent-native-architecture/references/shared-workspace-architecture.md +680 -0
  105. package/plugins/compound-engineering/skills/agent-native-architecture/references/system-prompt-design.md +250 -0
  106. package/plugins/compound-engineering/skills/andrew-kane-gem-writer/SKILL.md +184 -0
  107. package/plugins/compound-engineering/skills/andrew-kane-gem-writer/references/database-adapters.md +231 -0
  108. package/plugins/compound-engineering/skills/andrew-kane-gem-writer/references/module-organization.md +121 -0
  109. package/plugins/compound-engineering/skills/andrew-kane-gem-writer/references/rails-integration.md +183 -0
  110. package/plugins/compound-engineering/skills/andrew-kane-gem-writer/references/resources.md +119 -0
  111. package/plugins/compound-engineering/skills/andrew-kane-gem-writer/references/testing-patterns.md +261 -0
  112. package/plugins/compound-engineering/skills/compound-docs/SKILL.md +510 -0
  113. package/plugins/compound-engineering/skills/compound-docs/assets/critical-pattern-template.md +34 -0
  114. package/plugins/compound-engineering/skills/compound-docs/assets/resolution-template.md +93 -0
  115. package/plugins/compound-engineering/skills/compound-docs/references/yaml-schema.md +65 -0
  116. package/plugins/compound-engineering/skills/compound-docs/schema.yaml +176 -0
  117. package/plugins/compound-engineering/skills/create-agent-skills/SKILL.md +299 -0
  118. package/plugins/compound-engineering/skills/create-agent-skills/references/api-security.md +226 -0
  119. package/plugins/compound-engineering/skills/create-agent-skills/references/be-clear-and-direct.md +531 -0
  120. package/plugins/compound-engineering/skills/create-agent-skills/references/best-practices.md +404 -0
  121. package/plugins/compound-engineering/skills/create-agent-skills/references/common-patterns.md +595 -0
  122. package/plugins/compound-engineering/skills/create-agent-skills/references/core-principles.md +437 -0
  123. package/plugins/compound-engineering/skills/create-agent-skills/references/executable-code.md +175 -0
  124. package/plugins/compound-engineering/skills/create-agent-skills/references/iteration-and-testing.md +474 -0
  125. package/plugins/compound-engineering/skills/create-agent-skills/references/official-spec.md +185 -0
  126. package/plugins/compound-engineering/skills/create-agent-skills/references/recommended-structure.md +168 -0
  127. package/plugins/compound-engineering/skills/create-agent-skills/references/skill-structure.md +372 -0
  128. package/plugins/compound-engineering/skills/create-agent-skills/references/using-scripts.md +113 -0
  129. package/plugins/compound-engineering/skills/create-agent-skills/references/using-templates.md +112 -0
  130. package/plugins/compound-engineering/skills/create-agent-skills/references/workflows-and-validation.md +510 -0
  131. package/plugins/compound-engineering/skills/create-agent-skills/templates/router-skill.md +73 -0
  132. package/plugins/compound-engineering/skills/create-agent-skills/templates/simple-skill.md +33 -0
  133. package/plugins/compound-engineering/skills/create-agent-skills/workflows/add-reference.md +96 -0
  134. package/plugins/compound-engineering/skills/create-agent-skills/workflows/add-script.md +93 -0
  135. package/plugins/compound-engineering/skills/create-agent-skills/workflows/add-template.md +74 -0
  136. package/plugins/compound-engineering/skills/create-agent-skills/workflows/add-workflow.md +120 -0
  137. package/plugins/compound-engineering/skills/create-agent-skills/workflows/audit-skill.md +138 -0
  138. package/plugins/compound-engineering/skills/create-agent-skills/workflows/create-domain-expertise-skill.md +605 -0
  139. package/plugins/compound-engineering/skills/create-agent-skills/workflows/create-new-skill.md +191 -0
  140. package/plugins/compound-engineering/skills/create-agent-skills/workflows/get-guidance.md +121 -0
  141. package/plugins/compound-engineering/skills/create-agent-skills/workflows/upgrade-to-router.md +161 -0
  142. package/plugins/compound-engineering/skills/create-agent-skills/workflows/verify-skill.md +204 -0
  143. package/plugins/compound-engineering/skills/dhh-rails-style/SKILL.md +185 -0
  144. package/plugins/compound-engineering/skills/dhh-rails-style/references/architecture.md +653 -0
  145. package/plugins/compound-engineering/skills/dhh-rails-style/references/controllers.md +303 -0
  146. package/plugins/compound-engineering/skills/dhh-rails-style/references/frontend.md +510 -0
  147. package/plugins/compound-engineering/skills/dhh-rails-style/references/gems.md +266 -0
  148. package/plugins/compound-engineering/skills/dhh-rails-style/references/models.md +359 -0
  149. package/plugins/compound-engineering/skills/dhh-rails-style/references/testing.md +338 -0
  150. package/plugins/compound-engineering/skills/dspy-ruby/SKILL.md +594 -0
  151. package/plugins/compound-engineering/skills/dspy-ruby/assets/config-template.rb +359 -0
  152. package/plugins/compound-engineering/skills/dspy-ruby/assets/module-template.rb +326 -0
  153. package/plugins/compound-engineering/skills/dspy-ruby/assets/signature-template.rb +143 -0
  154. package/plugins/compound-engineering/skills/dspy-ruby/references/core-concepts.md +265 -0
  155. package/plugins/compound-engineering/skills/dspy-ruby/references/optimization.md +623 -0
  156. package/plugins/compound-engineering/skills/dspy-ruby/references/providers.md +338 -0
  157. package/plugins/compound-engineering/skills/every-style-editor/SKILL.md +134 -0
  158. package/plugins/compound-engineering/skills/every-style-editor/references/EVERY_WRITE_STYLE.md +529 -0
  159. package/plugins/compound-engineering/skills/file-todos/SKILL.md +251 -0
  160. package/plugins/compound-engineering/skills/file-todos/assets/todo-template.md +155 -0
  161. package/plugins/compound-engineering/skills/frontend-design/SKILL.md +42 -0
  162. package/plugins/compound-engineering/skills/gemini-imagegen/SKILL.md +237 -0
  163. package/plugins/compound-engineering/skills/gemini-imagegen/requirements.txt +2 -0
  164. package/plugins/compound-engineering/skills/gemini-imagegen/scripts/compose_images.py +157 -0
  165. package/plugins/compound-engineering/skills/gemini-imagegen/scripts/edit_image.py +144 -0
  166. package/plugins/compound-engineering/skills/gemini-imagegen/scripts/gemini_images.py +263 -0
  167. package/plugins/compound-engineering/skills/gemini-imagegen/scripts/generate_image.py +133 -0
  168. package/plugins/compound-engineering/skills/gemini-imagegen/scripts/multi_turn_chat.py +216 -0
  169. package/plugins/compound-engineering/skills/git-worktree/SKILL.md +302 -0
  170. package/plugins/compound-engineering/skills/git-worktree/scripts/worktree-manager.sh +345 -0
  171. package/plugins/compound-engineering/skills/rclone/SKILL.md +150 -0
  172. package/plugins/compound-engineering/skills/rclone/scripts/check_setup.sh +60 -0
  173. package/plugins/compound-engineering/skills/skill-creator/SKILL.md +209 -0
  174. package/plugins/compound-engineering/skills/skill-creator/scripts/init_skill.py +303 -0
  175. package/plugins/compound-engineering/skills/skill-creator/scripts/package_skill.py +110 -0
  176. package/plugins/compound-engineering/skills/skill-creator/scripts/quick_validate.py +65 -0
  177. package/src/commands/convert.ts +156 -0
  178. package/src/commands/install.ts +221 -0
  179. package/src/commands/list.ts +37 -0
  180. package/src/converters/claude-to-codex.ts +124 -0
  181. package/src/converters/claude-to-opencode.ts +392 -0
  182. package/src/index.ts +20 -0
  183. package/src/parsers/claude.ts +248 -0
  184. package/src/targets/codex.ts +91 -0
  185. package/src/targets/index.ts +29 -0
  186. package/src/targets/opencode.ts +48 -0
  187. package/src/types/claude.ts +88 -0
  188. package/src/types/codex.ts +23 -0
  189. package/src/types/opencode.ts +54 -0
  190. package/src/utils/codex-agents.ts +64 -0
  191. package/src/utils/files.ts +64 -0
  192. package/src/utils/frontmatter.ts +65 -0
  193. package/tests/claude-parser.test.ts +89 -0
  194. package/tests/cli.test.ts +289 -0
  195. package/tests/codex-agents.test.ts +62 -0
  196. package/tests/codex-converter.test.ts +121 -0
  197. package/tests/codex-writer.test.ts +76 -0
  198. package/tests/converter.test.ts +171 -0
  199. package/tests/fixtures/custom-paths/.claude-plugin/plugin.json +8 -0
  200. package/tests/fixtures/custom-paths/agents/default-agent.md +5 -0
  201. package/tests/fixtures/custom-paths/commands/default-command.md +5 -0
  202. package/tests/fixtures/custom-paths/custom-agents/custom-agent.md +5 -0
  203. package/tests/fixtures/custom-paths/custom-commands/custom-command.md +5 -0
  204. package/tests/fixtures/custom-paths/custom-hooks/hooks.json +7 -0
  205. package/tests/fixtures/custom-paths/custom-skills/custom-skill/SKILL.md +5 -0
  206. package/tests/fixtures/custom-paths/hooks/hooks.json +7 -0
  207. package/tests/fixtures/custom-paths/skills/default-skill/SKILL.md +5 -0
  208. package/tests/fixtures/invalid-command-path/.claude-plugin/plugin.json +5 -0
  209. package/tests/fixtures/invalid-hooks-path/.claude-plugin/plugin.json +5 -0
  210. package/tests/fixtures/invalid-mcp-path/.claude-plugin/plugin.json +5 -0
  211. package/tests/fixtures/mcp-file/.claude-plugin/plugin.json +5 -0
  212. package/tests/fixtures/mcp-file/.mcp.json +6 -0
  213. package/tests/fixtures/sample-plugin/.claude-plugin/plugin.json +30 -0
  214. package/tests/fixtures/sample-plugin/agents/agent-one.md +10 -0
  215. package/tests/fixtures/sample-plugin/agents/security-reviewer.md +7 -0
  216. package/tests/fixtures/sample-plugin/commands/command-one.md +7 -0
  217. package/tests/fixtures/sample-plugin/commands/model-command.md +8 -0
  218. package/tests/fixtures/sample-plugin/commands/nested/command-two.md +9 -0
  219. package/tests/fixtures/sample-plugin/commands/pattern-command.md +7 -0
  220. package/tests/fixtures/sample-plugin/commands/skill-command.md +7 -0
  221. package/tests/fixtures/sample-plugin/commands/todo-command.md +7 -0
  222. package/tests/fixtures/sample-plugin/hooks/hooks.json +156 -0
  223. package/tests/fixtures/sample-plugin/skills/skill-one/SKILL.md +6 -0
  224. package/tests/frontmatter.test.ts +20 -0
  225. package/tests/opencode-writer.test.ts +62 -0
  226. package/tsconfig.json +14 -0
@@ -0,0 +1,339 @@
1
+ ---
2
+ name: test-browser
3
+ description: Run browser tests on pages affected by current PR or branch
4
+ argument-hint: "[PR number, branch name, or 'current' for current branch]"
5
+ ---
6
+
7
+ # Browser Test Command
8
+
9
+ <command_purpose>Run end-to-end browser tests on pages affected by a PR or branch changes using agent-browser CLI.</command_purpose>
10
+
11
+ ## CRITICAL: Use agent-browser CLI Only
12
+
13
+ **DO NOT use Chrome MCP tools (mcp__claude-in-chrome__*).**
14
+
15
+ This command uses the `agent-browser` CLI exclusively. The agent-browser CLI is a Bash-based tool from Vercel that runs headless Chromium. It is NOT the same as Chrome browser automation via MCP.
16
+
17
+ If you find yourself calling `mcp__claude-in-chrome__*` tools, STOP. Use `agent-browser` Bash commands instead.
18
+
19
+ ## Introduction
20
+
21
+ <role>QA Engineer specializing in browser-based end-to-end testing</role>
22
+
23
+ This command tests affected pages in a real browser, catching issues that unit tests miss:
24
+ - JavaScript integration bugs
25
+ - CSS/layout regressions
26
+ - User workflow breakages
27
+ - Console errors
28
+
29
+ ## Prerequisites
30
+
31
+ <requirements>
32
+ - Local development server running (e.g., `bin/dev`, `rails server`, `npm run dev`)
33
+ - agent-browser CLI installed (see Setup below)
34
+ - Git repository with changes to test
35
+ </requirements>
36
+
37
+ ## Setup
38
+
39
+ **Check installation:**
40
+ ```bash
41
+ command -v agent-browser >/dev/null 2>&1 && echo "Installed" || echo "NOT INSTALLED"
42
+ ```
43
+
44
+ **Install if needed:**
45
+ ```bash
46
+ npm install -g agent-browser
47
+ agent-browser install # Downloads Chromium (~160MB)
48
+ ```
49
+
50
+ See the `agent-browser` skill for detailed usage.
51
+
52
+ ## Main Tasks
53
+
54
+ ### 0. Verify agent-browser Installation
55
+
56
+ Before starting ANY browser testing, verify agent-browser is installed:
57
+
58
+ ```bash
59
+ command -v agent-browser >/dev/null 2>&1 && echo "Ready" || (echo "Installing..." && npm install -g agent-browser && agent-browser install)
60
+ ```
61
+
62
+ If installation fails, inform the user and stop.
63
+
64
+ ### 1. Ask Browser Mode
65
+
66
+ <ask_browser_mode>
67
+
68
+ Before starting tests, ask user if they want to watch the browser:
69
+
70
+ Use AskUserQuestion with:
71
+ - Question: "Do you want to watch the browser tests run?"
72
+ - Options:
73
+ 1. **Headed (watch)** - Opens visible browser window so you can see tests run
74
+ 2. **Headless (faster)** - Runs in background, faster but invisible
75
+
76
+ Store the choice and use `--headed` flag when user selects "Headed".
77
+
78
+ </ask_browser_mode>
79
+
80
+ ### 2. Determine Test Scope
81
+
82
+ <test_target> $ARGUMENTS </test_target>
83
+
84
+ <determine_scope>
85
+
86
+ **If PR number provided:**
87
+ ```bash
88
+ gh pr view [number] --json files -q '.files[].path'
89
+ ```
90
+
91
+ **If 'current' or empty:**
92
+ ```bash
93
+ git diff --name-only main...HEAD
94
+ ```
95
+
96
+ **If branch name provided:**
97
+ ```bash
98
+ git diff --name-only main...[branch]
99
+ ```
100
+
101
+ </determine_scope>
102
+
103
+ ### 3. Map Files to Routes
104
+
105
+ <file_to_route_mapping>
106
+
107
+ Map changed files to testable routes:
108
+
109
+ | File Pattern | Route(s) |
110
+ |-------------|----------|
111
+ | `app/views/users/*` | `/users`, `/users/:id`, `/users/new` |
112
+ | `app/controllers/settings_controller.rb` | `/settings` |
113
+ | `app/javascript/controllers/*_controller.js` | Pages using that Stimulus controller |
114
+ | `app/components/*_component.rb` | Pages rendering that component |
115
+ | `app/views/layouts/*` | All pages (test homepage at minimum) |
116
+ | `app/assets/stylesheets/*` | Visual regression on key pages |
117
+ | `app/helpers/*_helper.rb` | Pages using that helper |
118
+ | `src/app/*` (Next.js) | Corresponding routes |
119
+ | `src/components/*` | Pages using those components |
120
+
121
+ Build a list of URLs to test based on the mapping.
122
+
123
+ </file_to_route_mapping>
124
+
125
+ ### 4. Verify Server is Running
126
+
127
+ <check_server>
128
+
129
+ Before testing, verify the local server is accessible:
130
+
131
+ ```bash
132
+ agent-browser open http://localhost:3000
133
+ agent-browser snapshot -i
134
+ ```
135
+
136
+ If server is not running, inform user:
137
+ ```markdown
138
+ **Server not running**
139
+
140
+ Please start your development server:
141
+ - Rails: `bin/dev` or `rails server`
142
+ - Node/Next.js: `npm run dev`
143
+
144
+ Then run `/test-browser` again.
145
+ ```
146
+
147
+ </check_server>
148
+
149
+ ### 5. Test Each Affected Page
150
+
151
+ <test_pages>
152
+
153
+ For each affected route, use agent-browser CLI commands (NOT Chrome MCP):
154
+
155
+ **Step 1: Navigate and capture snapshot**
156
+ ```bash
157
+ agent-browser open "http://localhost:3000/[route]"
158
+ agent-browser snapshot -i
159
+ ```
160
+
161
+ **Step 2: For headed mode (visual debugging)**
162
+ ```bash
163
+ agent-browser --headed open "http://localhost:3000/[route]"
164
+ agent-browser --headed snapshot -i
165
+ ```
166
+
167
+ **Step 3: Verify key elements**
168
+ - Use `agent-browser snapshot -i` to get interactive elements with refs
169
+ - Page title/heading present
170
+ - Primary content rendered
171
+ - No error messages visible
172
+ - Forms have expected fields
173
+
174
+ **Step 4: Test critical interactions**
175
+ ```bash
176
+ agent-browser click @e1 # Use ref from snapshot
177
+ agent-browser snapshot -i
178
+ ```
179
+
180
+ **Step 5: Take screenshots**
181
+ ```bash
182
+ agent-browser screenshot page-name.png
183
+ agent-browser screenshot --full page-name-full.png # Full page
184
+ ```
185
+
186
+ </test_pages>
187
+
188
+ ### 6. Human Verification (When Required)
189
+
190
+ <human_verification>
191
+
192
+ Pause for human input when testing touches:
193
+
194
+ | Flow Type | What to Ask |
195
+ |-----------|-------------|
196
+ | OAuth | "Please sign in with [provider] and confirm it works" |
197
+ | Email | "Check your inbox for the test email and confirm receipt" |
198
+ | Payments | "Complete a test purchase in sandbox mode" |
199
+ | SMS | "Verify you received the SMS code" |
200
+ | External APIs | "Confirm the [service] integration is working" |
201
+
202
+ Use AskUserQuestion:
203
+ ```markdown
204
+ **Human Verification Needed**
205
+
206
+ This test touches the [flow type]. Please:
207
+ 1. [Action to take]
208
+ 2. [What to verify]
209
+
210
+ Did it work correctly?
211
+ 1. Yes - continue testing
212
+ 2. No - describe the issue
213
+ ```
214
+
215
+ </human_verification>
216
+
217
+ ### 7. Handle Failures
218
+
219
+ <failure_handling>
220
+
221
+ When a test fails:
222
+
223
+ 1. **Document the failure:**
224
+ - Screenshot the error state: `agent-browser screenshot error.png`
225
+ - Note the exact reproduction steps
226
+
227
+ 2. **Ask user how to proceed:**
228
+ ```markdown
229
+ **Test Failed: [route]**
230
+
231
+ Issue: [description]
232
+ Console errors: [if any]
233
+
234
+ How to proceed?
235
+ 1. Fix now - I'll help debug and fix
236
+ 2. Create todo - Add to todos/ for later
237
+ 3. Skip - Continue testing other pages
238
+ ```
239
+
240
+ 3. **If "Fix now":**
241
+ - Investigate the issue
242
+ - Propose a fix
243
+ - Apply fix
244
+ - Re-run the failing test
245
+
246
+ 4. **If "Create todo":**
247
+ - Create `{id}-pending-p1-browser-test-{description}.md`
248
+ - Continue testing
249
+
250
+ 5. **If "Skip":**
251
+ - Log as skipped
252
+ - Continue testing
253
+
254
+ </failure_handling>
255
+
256
+ ### 8. Test Summary
257
+
258
+ <test_summary>
259
+
260
+ After all tests complete, present summary:
261
+
262
+ ```markdown
263
+ ## Browser Test Results
264
+
265
+ **Test Scope:** PR #[number] / [branch name]
266
+ **Server:** http://localhost:3000
267
+
268
+ ### Pages Tested: [count]
269
+
270
+ | Route | Status | Notes |
271
+ |-------|--------|-------|
272
+ | `/users` | Pass | |
273
+ | `/settings` | Pass | |
274
+ | `/dashboard` | Fail | Console error: [msg] |
275
+ | `/checkout` | Skip | Requires payment credentials |
276
+
277
+ ### Console Errors: [count]
278
+ - [List any errors found]
279
+
280
+ ### Human Verifications: [count]
281
+ - OAuth flow: Confirmed
282
+ - Email delivery: Confirmed
283
+
284
+ ### Failures: [count]
285
+ - `/dashboard` - [issue description]
286
+
287
+ ### Created Todos: [count]
288
+ - `005-pending-p1-browser-test-dashboard-error.md`
289
+
290
+ ### Result: [PASS / FAIL / PARTIAL]
291
+ ```
292
+
293
+ </test_summary>
294
+
295
+ ## Quick Usage Examples
296
+
297
+ ```bash
298
+ # Test current branch changes
299
+ /test-browser
300
+
301
+ # Test specific PR
302
+ /test-browser 847
303
+
304
+ # Test specific branch
305
+ /test-browser feature/new-dashboard
306
+ ```
307
+
308
+ ## agent-browser CLI Reference
309
+
310
+ **ALWAYS use these Bash commands. NEVER use mcp__claude-in-chrome__* tools.**
311
+
312
+ ```bash
313
+ # Navigation
314
+ agent-browser open <url> # Navigate to URL
315
+ agent-browser back # Go back
316
+ agent-browser close # Close browser
317
+
318
+ # Snapshots (get element refs)
319
+ agent-browser snapshot -i # Interactive elements with refs (@e1, @e2, etc.)
320
+ agent-browser snapshot -i --json # JSON output
321
+
322
+ # Interactions (use refs from snapshot)
323
+ agent-browser click @e1 # Click element
324
+ agent-browser fill @e1 "text" # Fill input
325
+ agent-browser type @e1 "text" # Type without clearing
326
+ agent-browser press Enter # Press key
327
+
328
+ # Screenshots
329
+ agent-browser screenshot out.png # Viewport screenshot
330
+ agent-browser screenshot --full out.png # Full page screenshot
331
+
332
+ # Headed mode (visible browser)
333
+ agent-browser --headed open <url> # Open with visible browser
334
+ agent-browser --headed click @e1 # Click in visible browser
335
+
336
+ # Wait
337
+ agent-browser wait @e1 # Wait for element
338
+ agent-browser wait 2000 # Wait milliseconds
339
+ ```
@@ -0,0 +1,310 @@
1
+ ---
2
+ name: triage
3
+ description: Triage and categorize findings for the CLI todo system
4
+ argument-hint: "[findings list or source type]"
5
+ ---
6
+
7
+ - First set the /model to Haiku
8
+ - Then read all pending todos in the todos/ directory
9
+
10
+ Present all findings, decisions, or issues here one by one for triage. The goal is to go through each item and decide whether to add it to the CLI todo system.
11
+
12
+ **IMPORTANT: DO NOT CODE ANYTHING DURING TRIAGE!**
13
+
14
+ This command is for:
15
+
16
+ - Triaging code review findings
17
+ - Processing security audit results
18
+ - Reviewing performance analysis
19
+ - Handling any other categorized findings that need tracking
20
+
21
+ ## Workflow
22
+
23
+ ### Step 1: Present Each Finding
24
+
25
+ For each finding, present in this format:
26
+
27
+ ```
28
+ ---
29
+ Issue #X: [Brief Title]
30
+
31
+ Severity: 🔴 P1 (CRITICAL) / 🟡 P2 (IMPORTANT) / 🔵 P3 (NICE-TO-HAVE)
32
+
33
+ Category: [Security/Performance/Architecture/Bug/Feature/etc.]
34
+
35
+ Description:
36
+ [Detailed explanation of the issue or improvement]
37
+
38
+ Location: [file_path:line_number]
39
+
40
+ Problem Scenario:
41
+ [Step by step what's wrong or could happen]
42
+
43
+ Proposed Solution:
44
+ [How to fix it]
45
+
46
+ Estimated Effort: [Small (< 2 hours) / Medium (2-8 hours) / Large (> 8 hours)]
47
+
48
+ ---
49
+ Do you want to add this to the todo list?
50
+ 1. yes - create todo file
51
+ 2. next - skip this item
52
+ 3. custom - modify before creating
53
+ ```
54
+
55
+ ### Step 2: Handle User Decision
56
+
57
+ **When user says "yes":**
58
+
59
+ 1. **Update existing todo file** (if it exists) or **Create new filename:**
60
+
61
+ If todo already exists (from code review):
62
+
63
+ - Rename file from `{id}-pending-{priority}-{desc}.md` → `{id}-ready-{priority}-{desc}.md`
64
+ - Update YAML frontmatter: `status: pending` → `status: ready`
65
+ - Keep issue_id, priority, and description unchanged
66
+
67
+ If creating new todo:
68
+
69
+ ```
70
+ {next_id}-ready-{priority}-{brief-description}.md
71
+ ```
72
+
73
+ Priority mapping:
74
+
75
+ - 🔴 P1 (CRITICAL) → `p1`
76
+ - 🟡 P2 (IMPORTANT) → `p2`
77
+ - 🔵 P3 (NICE-TO-HAVE) → `p3`
78
+
79
+ Example: `042-ready-p1-transaction-boundaries.md`
80
+
81
+ 2. **Update YAML frontmatter:**
82
+
83
+ ```yaml
84
+ ---
85
+ status: ready # IMPORTANT: Change from "pending" to "ready"
86
+ priority: p1 # or p2, p3 based on severity
87
+ issue_id: "042"
88
+ tags: [category, relevant-tags]
89
+ dependencies: []
90
+ ---
91
+ ```
92
+
93
+ 3. **Populate or update the file:**
94
+
95
+ ```yaml
96
+ # [Issue Title]
97
+
98
+ ## Problem Statement
99
+ [Description from finding]
100
+
101
+ ## Findings
102
+ - [Key discoveries]
103
+ - Location: [file_path:line_number]
104
+ - [Scenario details]
105
+
106
+ ## Proposed Solutions
107
+
108
+ ### Option 1: [Primary solution]
109
+ - **Pros**: [Benefits]
110
+ - **Cons**: [Drawbacks if any]
111
+ - **Effort**: [Small/Medium/Large]
112
+ - **Risk**: [Low/Medium/High]
113
+
114
+ ## Recommended Action
115
+ [Filled during triage - specific action plan]
116
+
117
+ ## Technical Details
118
+ - **Affected Files**: [List files]
119
+ - **Related Components**: [Components affected]
120
+ - **Database Changes**: [Yes/No - describe if yes]
121
+
122
+ ## Resources
123
+ - Original finding: [Source of this issue]
124
+ - Related issues: [If any]
125
+
126
+ ## Acceptance Criteria
127
+ - [ ] [Specific success criteria]
128
+ - [ ] Tests pass
129
+ - [ ] Code reviewed
130
+
131
+ ## Work Log
132
+
133
+ ### {date} - Approved for Work
134
+ **By:** Claude Triage System
135
+ **Actions:**
136
+ - Issue approved during triage session
137
+ - Status changed from pending → ready
138
+ - Ready to be picked up and worked on
139
+
140
+ **Learnings:**
141
+ - [Context and insights]
142
+
143
+ ## Notes
144
+ Source: Triage session on {date}
145
+ ```
146
+
147
+ 4. **Confirm approval:** "✅ Approved: `{new_filename}` (Issue #{issue_id}) - Status: **ready** → Ready to work on"
148
+
149
+ **When user says "next":**
150
+
151
+ - **Delete the todo file** - Remove it from todos/ directory since it's not relevant
152
+ - Skip to the next item
153
+ - Track skipped items for summary
154
+
155
+ **When user says "custom":**
156
+
157
+ - Ask what to modify (priority, description, details)
158
+ - Update the information
159
+ - Present revised version
160
+ - Ask again: yes/next/custom
161
+
162
+ ### Step 3: Continue Until All Processed
163
+
164
+ - Process all items one by one
165
+ - Track using TodoWrite for visibility
166
+ - Don't wait for approval between items - keep moving
167
+
168
+ ### Step 4: Final Summary
169
+
170
+ After all items processed:
171
+
172
+ ````markdown
173
+ ## Triage Complete
174
+
175
+ **Total Items:** [X] **Todos Approved (ready):** [Y] **Skipped:** [Z]
176
+
177
+ ### Approved Todos (Ready for Work):
178
+
179
+ - `042-ready-p1-transaction-boundaries.md` - Transaction boundary issue
180
+ - `043-ready-p2-cache-optimization.md` - Cache performance improvement ...
181
+
182
+ ### Skipped Items (Deleted):
183
+
184
+ - Item #5: [reason] - Removed from todos/
185
+ - Item #12: [reason] - Removed from todos/
186
+
187
+ ### Summary of Changes Made:
188
+
189
+ During triage, the following status updates occurred:
190
+
191
+ - **Pending → Ready:** Filenames and frontmatter updated to reflect approved status
192
+ - **Deleted:** Todo files for skipped findings removed from todos/ directory
193
+ - Each approved file now has `status: ready` in YAML frontmatter
194
+
195
+ ### Next Steps:
196
+
197
+ 1. View approved todos ready for work:
198
+ ```bash
199
+ ls todos/*-ready-*.md
200
+ ```
201
+ ````
202
+
203
+ 2. Start work on approved items:
204
+
205
+ ```bash
206
+ /resolve_todo_parallel # Work on multiple approved items efficiently
207
+ ```
208
+
209
+ 3. Or pick individual items to work on
210
+
211
+ 4. As you work, update todo status:
212
+ - Ready → In Progress (in your local context as you work)
213
+ - In Progress → Complete (rename file: ready → complete, update frontmatter)
214
+
215
+ ```
216
+
217
+ ## Example Response Format
218
+
219
+ ```
220
+
221
+ ---
222
+
223
+ Issue #5: Missing Transaction Boundaries for Multi-Step Operations
224
+
225
+ Severity: 🔴 P1 (CRITICAL)
226
+
227
+ Category: Data Integrity / Security
228
+
229
+ Description: The google_oauth2_connected callback in GoogleOauthCallbacks concern performs multiple database operations without transaction protection. If any step fails midway, the database is left in an inconsistent state.
230
+
231
+ Location: app/controllers/concerns/google_oauth_callbacks.rb:13-50
232
+
233
+ Problem Scenario:
234
+
235
+ 1. User.update succeeds (email changed)
236
+ 2. Account.save! fails (validation error)
237
+ 3. Result: User has changed email but no associated Account
238
+ 4. Next login attempt fails completely
239
+
240
+ Operations Without Transaction:
241
+
242
+ - User confirmation (line 13)
243
+ - Waitlist removal (line 14)
244
+ - User profile update (line 21-23)
245
+ - Account creation (line 28-37)
246
+ - Avatar attachment (line 39-45)
247
+ - Journey creation (line 47)
248
+
249
+ Proposed Solution: Wrap all operations in ApplicationRecord.transaction do ... end block
250
+
251
+ Estimated Effort: Small (30 minutes)
252
+
253
+ ---
254
+
255
+ Do you want to add this to the todo list?
256
+
257
+ 1. yes - create todo file
258
+ 2. next - skip this item
259
+ 3. custom - modify before creating
260
+
261
+ ```
262
+
263
+ ## Important Implementation Details
264
+
265
+ ### Status Transitions During Triage
266
+
267
+ **When "yes" is selected:**
268
+ 1. Rename file: `{id}-pending-{priority}-{desc}.md` → `{id}-ready-{priority}-{desc}.md`
269
+ 2. Update YAML frontmatter: `status: pending` → `status: ready`
270
+ 3. Update Work Log with triage approval entry
271
+ 4. Confirm: "✅ Approved: `{filename}` (Issue #{issue_id}) - Status: **ready**"
272
+
273
+ **When "next" is selected:**
274
+ 1. Delete the todo file from todos/ directory
275
+ 2. Skip to next item
276
+ 3. No file remains in the system
277
+
278
+ ### Progress Tracking
279
+
280
+ Every time you present a todo as a header, include:
281
+ - **Progress:** X/Y completed (e.g., "3/10 completed")
282
+ - **Estimated time remaining:** Based on how quickly you're progressing
283
+ - **Pacing:** Monitor time per finding and adjust estimate accordingly
284
+
285
+ Example:
286
+ ```
287
+
288
+ Progress: 3/10 completed | Estimated time: ~2 minutes remaining
289
+
290
+ ```
291
+
292
+ ### Do Not Code During Triage
293
+
294
+ - ✅ Present findings
295
+ - ✅ Make yes/next/custom decisions
296
+ - ✅ Update todo files (rename, frontmatter, work log)
297
+ - ❌ Do NOT implement fixes or write code
298
+ - ❌ Do NOT add detailed implementation details
299
+ - ❌ That's for /resolve_todo_parallel phase
300
+ ```
301
+
302
+ When done give these options
303
+
304
+ ```markdown
305
+ What would you like to do next?
306
+
307
+ 1. run /resolve_todo_parallel to resolve the todos
308
+ 2. commit the todos
309
+ 3. nothing, go chill
310
+ ```