@every-env/compound-plugin 2.34.5 → 2.34.7

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/CHANGELOG.md CHANGED
@@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  Release numbering now follows the repository `v*` tag line. Starting at `v2.34.0`, the root CLI package and this changelog stay on that shared version stream. Older entries below retain the previous `0.x` CLI numbering.
9
9
 
10
+ ## [2.34.7](https://github.com/EveryInc/compound-engineering-plugin/compare/v2.34.6...v2.34.7) (2026-03-10)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **test-browser:** detect dev server port from project config ([50cb89e](https://github.com/EveryInc/compound-engineering-plugin/commit/50cb89efde7cee7d6dcd42008e6060e1bec44fcc)), closes [#164](https://github.com/EveryInc/compound-engineering-plugin/issues/164)
16
+
17
+ ## [2.34.6](https://github.com/EveryInc/compound-engineering-plugin/compare/v2.34.5...v2.34.6) (2026-03-10)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **mcp:** add API key auth support for Context7 server ([c649cfc](https://github.com/EveryInc/compound-engineering-plugin/commit/c649cfc17f895b58babf737dfdec2f6cc391e40a)), closes [#153](https://github.com/EveryInc/compound-engineering-plugin/issues/153)
23
+
10
24
  ## [2.34.5](https://github.com/EveryInc/compound-engineering-plugin/compare/v2.34.4...v2.34.5) (2026-03-10)
11
25
 
12
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@every-env/compound-plugin",
3
- "version": "2.34.5",
3
+ "version": "2.34.7",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "bin": {
@@ -2,7 +2,10 @@
2
2
  "mcpServers": {
3
3
  "context7": {
4
4
  "type": "http",
5
- "url": "https://mcp.context7.com/mcp"
5
+ "url": "https://mcp.context7.com/mcp",
6
+ "headers": {
7
+ "x-api-key": "${CONTEXT7_API_KEY:-}"
8
+ }
6
9
  }
7
10
  }
8
11
  }
@@ -53,12 +53,11 @@ Agents are organized into categories for easier discovery.
53
53
  | `design-iterator` | Iteratively refine UI through systematic design iterations |
54
54
  | `figma-design-sync` | Synchronize web implementations with Figma designs |
55
55
 
56
- ### Workflow (5)
56
+ ### Workflow (4)
57
57
 
58
58
  | Agent | Description |
59
59
  |-------|-------------|
60
60
  | `bug-reproduction-validator` | Systematically reproduce and validate bug reports |
61
- | `every-style-editor` | Edit content to conform to Every's style guide |
62
61
  | `lint` | Run linting and code quality checks on Ruby and ERB files |
63
62
  | `pr-comment-resolver` | Address PR comments and implement fixes |
64
63
  | `spec-flow-analyzer` | Analyze user flows and identify gaps in specifications |
@@ -190,6 +189,8 @@ Supports 100+ frameworks including Rails, React, Next.js, Vue, Django, Laravel,
190
189
 
191
190
  MCP servers start automatically when the plugin is enabled.
192
191
 
192
+ **Authentication:** To avoid anonymous rate limits, set the `CONTEXT7_API_KEY` environment variable with your Context7 API key. The plugin passes this automatically via the `x-api-key` header. Without it, requests go unauthenticated and will quickly hit the anonymous quota limit.
193
+
193
194
  ## Browser Automation
194
195
 
195
196
  This plugin uses **agent-browser CLI** for browser automation tasks. Install it globally:
@@ -220,13 +221,16 @@ claude /plugin install compound-engineering
220
221
  "mcpServers": {
221
222
  "context7": {
222
223
  "type": "http",
223
- "url": "https://mcp.context7.com/mcp"
224
+ "url": "https://mcp.context7.com/mcp",
225
+ "headers": {
226
+ "x-api-key": "${CONTEXT7_API_KEY:-}"
227
+ }
224
228
  }
225
229
  }
226
230
  }
227
231
  ```
228
232
 
229
- Or add it globally in `~/.claude/settings.json` for all projects.
233
+ Set `CONTEXT7_API_KEY` in your environment to authenticate. Or add it globally in `~/.claude/settings.json` for all projects.
230
234
 
231
235
  ## Version History
232
236
 
@@ -21,7 +21,45 @@ Captures problem solutions while context is fresh, creating structured documenta
21
21
  /ce:compound [brief context] # Provide additional context hint
22
22
  ```
23
23
 
24
- ## Execution Strategy: Two-Phase Orchestration
24
+ ## Execution Strategy: Context-Aware Orchestration
25
+
26
+ ### Phase 0: Context Budget Check
27
+
28
+ <critical_requirement>
29
+ **Run this check BEFORE launching any subagents.**
30
+
31
+ The /compound command is token-heavy - it launches 5 parallel subagents that collectively consume ~10k tokens of context. Running near context limits risks compaction mid-compound, which degrades output quality significantly.
32
+ </critical_requirement>
33
+
34
+ Before proceeding, the orchestrator MUST:
35
+
36
+ 1. **Assess context usage**: Check how long the current conversation has been running. If there has been significant back-and-forth (many tool calls, large file reads, extensive debugging), context is likely constrained.
37
+
38
+ 2. **Warn the user**:
39
+ ```
40
+ ⚠️ Context Budget Check
41
+
42
+ /compound launches 5 parallel subagents (~10k tokens). Long conversations
43
+ risk compaction mid-compound, which degrades documentation quality.
44
+
45
+ Tip: For best results, run /compound early in a session - right after
46
+ verifying a fix, before continuing other work.
47
+ ```
48
+
49
+ 3. **Offer the user a choice**:
50
+ ```
51
+ How would you like to proceed?
52
+
53
+ 1. Full compound (5 parallel subagents, ~10k tokens) - best quality
54
+ 2. Compact-safe mode (single pass, ~2k tokens) - safe near context limits
55
+ ```
56
+
57
+ 4. **If the user picks option 1** (or confirms full mode): proceed to Phase 1 below.
58
+ 5. **If the user picks option 2** (or requests compact-safe): skip to the **Compact-Safe Mode** section below.
59
+
60
+ ---
61
+
62
+ ### Full Mode
25
63
 
26
64
  <critical_requirement>
27
65
  **Only ONE file gets written - the final documentation.**
@@ -99,6 +137,44 @@ Based on problem type, optionally invoke specialized agents to review the docume
99
137
 
100
138
  </parallel_tasks>
101
139
 
140
+ ---
141
+
142
+ ### Compact-Safe Mode
143
+
144
+ <critical_requirement>
145
+ **Single-pass alternative for context-constrained sessions.**
146
+
147
+ When context budget is tight, this mode skips parallel subagents entirely. The orchestrator performs all work in a single pass, producing a minimal but complete solution document.
148
+ </critical_requirement>
149
+
150
+ The orchestrator (main conversation) performs ALL of the following in one sequential pass:
151
+
152
+ 1. **Extract from conversation**: Identify the problem, root cause, and solution from conversation history
153
+ 2. **Classify**: Determine category and filename (same categories as full mode)
154
+ 3. **Write minimal doc**: Create `docs/solutions/[category]/[filename].md` with:
155
+ - YAML frontmatter (title, category, date, tags)
156
+ - Problem description (1-2 sentences)
157
+ - Root cause (1-2 sentences)
158
+ - Solution with key code snippets
159
+ - One prevention tip
160
+ 4. **Skip specialized agent reviews** (Phase 3) to conserve context
161
+
162
+ **Compact-safe output:**
163
+ ```
164
+ ✓ Documentation complete (compact-safe mode)
165
+
166
+ File created:
167
+ - docs/solutions/[category]/[filename].md
168
+
169
+ Note: This was created in compact-safe mode. For richer documentation
170
+ (cross-references, detailed prevention strategies, specialized reviews),
171
+ re-run /compound in a fresh session.
172
+ ```
173
+
174
+ **No subagents are launched. No parallel tasks. One file written.**
175
+
176
+ ---
177
+
102
178
  ## What It Captures
103
179
 
104
180
  - **Problem symptom**: Exact error messages, observable behavior
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: test-browser
3
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]"
4
+ argument-hint: "[PR number, branch name, 'current', or --port PORT]"
5
5
  ---
6
6
 
7
7
  # Browser Test Command
@@ -122,31 +122,82 @@ Build a list of URLs to test based on the mapping.
122
122
 
123
123
  </file_to_route_mapping>
124
124
 
125
- ### 4. Verify Server is Running
125
+ ### 4. Detect Dev Server Port
126
+
127
+ <detect_port>
128
+
129
+ Determine the dev server port using this priority order:
130
+
131
+ **Priority 1: Explicit argument**
132
+ If the user passed a port number (e.g., `/test-browser 5000` or `/test-browser --port 5000`), use that port directly.
133
+
134
+ **Priority 2: CLAUDE.md / project instructions**
135
+ ```bash
136
+ # Check CLAUDE.md for port references
137
+ grep -Eio '(port\s*[:=]\s*|localhost:)([0-9]{4,5})' CLAUDE.md 2>/dev/null | grep -Eo '[0-9]{4,5}' | head -1
138
+ ```
139
+
140
+ **Priority 3: package.json scripts**
141
+ ```bash
142
+ # Check dev/start scripts for --port flags
143
+ grep -Eo '\-\-port[= ]+[0-9]{4,5}' package.json 2>/dev/null | grep -Eo '[0-9]{4,5}' | head -1
144
+ ```
145
+
146
+ **Priority 4: Environment files**
147
+ ```bash
148
+ # Check .env, .env.local, .env.development for PORT=
149
+ grep -h '^PORT=' .env .env.local .env.development 2>/dev/null | tail -1 | cut -d= -f2
150
+ ```
151
+
152
+ **Priority 5: Default fallback**
153
+ If none of the above yields a port, default to `3000`.
154
+
155
+ Store the result in a `PORT` variable for use in all subsequent steps.
156
+
157
+ ```bash
158
+ # Combined detection (run this)
159
+ PORT="${EXPLICIT_PORT:-}"
160
+ if [ -z "$PORT" ]; then
161
+ PORT=$(grep -Eio '(port\s*[:=]\s*|localhost:)([0-9]{4,5})' CLAUDE.md 2>/dev/null | grep -Eo '[0-9]{4,5}' | head -1)
162
+ fi
163
+ if [ -z "$PORT" ]; then
164
+ PORT=$(grep -Eo '\-\-port[= ]+[0-9]{4,5}' package.json 2>/dev/null | grep -Eo '[0-9]{4,5}' | head -1)
165
+ fi
166
+ if [ -z "$PORT" ]; then
167
+ PORT=$(grep -h '^PORT=' .env .env.local .env.development 2>/dev/null | tail -1 | cut -d= -f2)
168
+ fi
169
+ PORT="${PORT:-3000}"
170
+ echo "Using dev server port: $PORT"
171
+ ```
172
+
173
+ </detect_port>
174
+
175
+ ### 5. Verify Server is Running
126
176
 
127
177
  <check_server>
128
178
 
129
- Before testing, verify the local server is accessible:
179
+ Before testing, verify the local server is accessible using the detected port:
130
180
 
131
181
  ```bash
132
- agent-browser open http://localhost:3000
182
+ agent-browser open http://localhost:${PORT}
133
183
  agent-browser snapshot -i
134
184
  ```
135
185
 
136
186
  If server is not running, inform user:
137
187
  ```markdown
138
- **Server not running**
188
+ **Server not running on port ${PORT}**
139
189
 
140
190
  Please start your development server:
141
191
  - Rails: `bin/dev` or `rails server`
142
192
  - Node/Next.js: `npm run dev`
193
+ - Custom port: `/test-browser --port <your-port>`
143
194
 
144
195
  Then run `/test-browser` again.
145
196
  ```
146
197
 
147
198
  </check_server>
148
199
 
149
- ### 5. Test Each Affected Page
200
+ ### 6. Test Each Affected Page
150
201
 
151
202
  <test_pages>
152
203
 
@@ -154,13 +205,13 @@ For each affected route, use agent-browser CLI commands (NOT Chrome MCP):
154
205
 
155
206
  **Step 1: Navigate and capture snapshot**
156
207
  ```bash
157
- agent-browser open "http://localhost:3000/[route]"
208
+ agent-browser open "http://localhost:${PORT}/[route]"
158
209
  agent-browser snapshot -i
159
210
  ```
160
211
 
161
212
  **Step 2: For headed mode (visual debugging)**
162
213
  ```bash
163
- agent-browser --headed open "http://localhost:3000/[route]"
214
+ agent-browser --headed open "http://localhost:${PORT}/[route]"
164
215
  agent-browser --headed snapshot -i
165
216
  ```
166
217
 
@@ -185,7 +236,7 @@ agent-browser screenshot --full page-name-full.png # Full page
185
236
 
186
237
  </test_pages>
187
238
 
188
- ### 6. Human Verification (When Required)
239
+ ### 7. Human Verification (When Required)
189
240
 
190
241
  <human_verification>
191
242
 
@@ -214,7 +265,7 @@ Did it work correctly?
214
265
 
215
266
  </human_verification>
216
267
 
217
- ### 7. Handle Failures
268
+ ### 8. Handle Failures
218
269
 
219
270
  <failure_handling>
220
271
 
@@ -253,7 +304,7 @@ When a test fails:
253
304
 
254
305
  </failure_handling>
255
306
 
256
- ### 8. Test Summary
307
+ ### 9. Test Summary
257
308
 
258
309
  <test_summary>
259
310
 
@@ -263,7 +314,7 @@ After all tests complete, present summary:
263
314
  ## Browser Test Results
264
315
 
265
316
  **Test Scope:** PR #[number] / [branch name]
266
- **Server:** http://localhost:3000
317
+ **Server:** http://localhost:${PORT}
267
318
 
268
319
  ### Pages Tested: [count]
269
320
 
@@ -295,7 +346,7 @@ After all tests complete, present summary:
295
346
  ## Quick Usage Examples
296
347
 
297
348
  ```bash
298
- # Test current branch changes
349
+ # Test current branch changes (auto-detects port)
299
350
  /test-browser
300
351
 
301
352
  # Test specific PR
@@ -303,6 +354,9 @@ After all tests complete, present summary:
303
354
 
304
355
  # Test specific branch
305
356
  /test-browser feature/new-dashboard
357
+
358
+ # Test on a specific port
359
+ /test-browser --port 5000
306
360
  ```
307
361
 
308
362
  ## agent-browser CLI Reference