Skip to content

Commit c407373

Browse files
authored
Add Aspire MCP integration and improve developer CLI parallel execution (#827)
### Summary & Motivation Enable Aspire MCP integration for Claude Code and enhance developer CLI tooling to improve development workflow efficiency. - Add Aspire MCP server configuration to `.mcp.json` and enable the MCP endpoint in AppHost launch settings, allowing Claude Code to interact with Aspire directly - Update AI agent instructions with comprehensive parallel execution guidance: build must run first, then slow operations (Aspire restart, backend format, backend inspect, end-to-end tests) must run in parallel Task agents, while fast operations (frontend format/inspect, backend test) can run sequentially - Add `waitForAspire` parameter to the end-to-end MCP tool, which retries server availability checks up to 10 times (50 seconds total) when Aspire is starting. This eliminates the need for manual sleep delays when running end-to-end tests in parallel with Aspire restart - Rename the MCP method from `E2E` to `EndToEnd` to produce a cleaner tool name (`mcp__developer-cli__end_to_end` over `mcp__developer-cli__e2_e`) - Convert `developer-cli/DeveloperCli.slnx.DotSettings` to a symlink pointing to the main `application/PlatformPlatform.slnx.DotSettings` to avoid duplication and ensure consistent code style settings - Remove redundant tool execution instructions from process workflow files, referencing the new global tool execution instructions instead ### Checklist - [x] I have added tests, or done manual regression tests - [x] I have updated the documentation, if necessary
2 parents de84c2a + 508bdfc commit c407373

File tree

30 files changed

+156
-291
lines changed

30 files changed

+156
-291
lines changed

.agent/rules/end-to-end-tests/end-to-end-tests.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ These rules outline the structure, patterns, and best practices for writing end-
99

1010
## Implementation
1111

12-
1. Use the **e2e MCP tool** to run end-to-end tests with these options:
12+
1. Use the **end-to-end MCP tool** to run end-to-end tests with these options:
1313
- Test filtering: smoke tests only, specific browser, search terms
1414
- Change scoping: last failed tests, only changed tests
1515
- Flaky test detection: repeat tests, retry on failure, stop on first failure
1616
- Performance: debug timing to see step execution times
17-
- **Note**: The **e2e MCP tool** always runs with quiet mode automatically
17+
- **Note**: The **end-to-end MCP tool** always runs with quiet mode automatically
1818

1919
2. Test Search and Filtering:
2020
- Search by test tags: smoke, comprehensive
2121
- Search by test content: find tests containing specific text
2222
- Search by filename: find specific test files
23-
- Multiple search terms: `e2e(searchTerms=["user", "management"])`
23+
- Multiple search terms: `end-to-end(searchTerms=["user", "management"])`
2424
- The tool automatically detects which self-contained systems contain matching tests and only runs those
2525

2626
3. Test-Driven Debugging Process:

.agent/workflows/process/implement-end-to-end-tests.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ Research the codebase to find similar E2E test implementations. Look for existin
127127

128128
**STEP 7**: Run tests and verify they pass
129129

130-
- Use **e2e MCP tool** to run your tests
131-
- Start with smoke tests: `e2e(smoke=true)`
132-
- Then run comprehensive tests with search terms: `e2e(searchTerms=["feature-name"])`
130+
- Use **end-to-end MCP tool** to run your tests
131+
- Start with smoke tests: `end-to-end(smoke=true)`
132+
- Then run comprehensive tests with search terms: `end-to-end(searchTerms=["feature-name"])`
133133
- All tests must pass before proceeding
134134
- If tests fail: Fix them and run again (don't proceed with failing tests)
135135

.agent/workflows/process/review-end-to-end-tests.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ You are reviewing: **{{{title}}}**
8383
- The tool starts .NET Aspire at https://localhost:9000
8484

8585
**Run E2E tests**:
86-
- Use **e2e MCP tool** to run tests: `e2e(searchTerms=["feature-name"])`
86+
- Use **end-to-end MCP tool** to run tests: `end-to-end(searchTerms=["feature-name"])`
8787
- **ALL tests MUST pass with ZERO failures to approve**
8888
- **Verify ZERO console errors** during test execution
8989
- **Verify ZERO network errors** (no unexpected 4xx/5xx responses)
@@ -180,7 +180,7 @@ Don't use `git add -A` or `git add .`
180180
- `[requirements]` — Requirements clarity, acceptance criteria, task description
181181
- `[code]` — Code patterns, rules, architecture guidance
182182

183-
Examples: `[system] e2e MCP tool reported test passed but it actually failed` or `[requirements] Feature requirements didn't specify mobile viewport testing`
183+
Examples: `[system] end-to-end MCP tool reported test passed but it actually failed` or `[requirements] Feature requirements didn't specify mobile viewport testing`
184184

185185
⚠️ Your session terminates IMMEDIATELY after calling CompleteWork.
186186

.agent/workflows/process/review-task.md

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ The [feature] plan was AI-generated by tech-lead in a few minutes after intervie
150150

151151
**Collaborate with your team**: For complex problems or design questions, engage in conversation with engineers or other reviewers. Better solutions often emerge from team collaboration.
152152

153-
**STEP 3**: Run validation tools in parallel (format, test, inspect)
153+
**STEP 3**: Run validation tools
154154

155155
**Zero tolerance for issues**:
156156
- We deploy to production after review - quality is non-negotiable.
@@ -164,18 +164,9 @@ The [feature] plan was AI-generated by tech-lead in a few minutes after intervie
164164

165165
**For backend-reviewer** (validates all self-contained systems to catch cross-self-contained-system breakage):
166166

167-
1. Run **build** first for all self-contained systems (backend AND frontend):
168-
- Use execute_command MCP tool: `command: "build"`.
169-
- DO NOT run in parallel.
167+
1. Run **build**, **format**, **test**, **inspect** following the global tool execution instructions.
170168

171-
2. Run **format**, **test**, **inspect** in parallel:
172-
- Call all three MCP tools in a single message:
173-
- `execute_command(command: "format", noBuild: true)`
174-
- `execute_command(command: "test", noBuild: true)`
175-
- `execute_command(command: "inspect", noBuild: true)`
176-
- All three run simultaneously and return together.
177-
178-
3. Handle validation results:
169+
2. Handle validation results:
179170
- **If NO parallel work notification in request**: REJECT if ANY failures found (zero tolerance).
180171
- **If parallel work notification present** (e.g., "⚠️ Parallel Work: Frontend-engineer..."):
181172
- REJECT if backend failures found (Core/, Api/, Tests/, Database/).
@@ -184,13 +175,9 @@ The [feature] plan was AI-generated by tech-lead in a few minutes after intervie
184175

185176
**For frontend-reviewer** (validates frontend only):
186177

187-
1. Run **build** for frontend: `execute_command(command: "build", frontend: true)`.
188-
189-
2. Run **format** for all self-contained systems: `execute_command(command: "format", frontend: true)`.
178+
1. Run **build**, **format**, **inspect** for frontend following the global tool execution instructions.
190179

191-
3. Run **inspect** for all self-contained systems: `execute_command(command: "inspect", frontend: true)`.
192-
193-
4. Handle validation results:
180+
2. Handle validation results:
194181
- **If NO parallel work notification in request**: REJECT if ANY failures found (zero tolerance).
195182
- **If parallel work notification present** (e.g., "⚠️ Parallel Work: Backend-engineer..."):
196183
- REJECT if frontend failures found (WebApp/).
@@ -199,11 +186,9 @@ The [feature] plan was AI-generated by tech-lead in a few minutes after intervie
199186

200187
**For qa-reviewer** (validates E2E tests):
201188

202-
1. Run **build** for frontend: `execute_command(command: "build", frontend: true)`.
203-
204-
2. Run **e2e** tests (run in background, monitor output).
189+
1. Run **build** for frontend, then run **end-to-end** tests following the global tool execution instructions.
205190

206-
3. REJECT if ANY failures found (zero tolerance).
191+
2. REJECT if ANY failures found (zero tolerance).
207192

208193
**If validation fails with errors unrelated to engineer's changes**:
209194
- Check `git log --oneline` for recent parallel engineer commits.

.claude/agentic-workflow/system-prompts/qa-engineer.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Push back on reviewer suggestions with evidence when you have more context about
4646

4747
You always follow your proven systematic workflow that ensures proper rule adherence and quality test implementation.
4848

49-
**Important**: You must run tests and verify they pass before completing. Use watch MCP tool to apply migrations, then e2e MCP tool to run tests. Never complete without passing tests.
49+
**Important**: You must run tests and verify they pass before completing. Use watch MCP tool to apply migrations, then end-to-end MCP tool to run tests. Never complete without passing tests.
5050

5151
⚠️ Problem reporting - report aggressively:
5252

.claude/agentic-workflow/system-prompts/qa-reviewer.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ You understand the review cycle and must complete a review every time you receiv
4242

4343
Never assume work is done just because you reviewed it before. Always re-evaluate the latest code and call CompleteWork.
4444

45-
**Important**: Never approve tests without running them. Use watch MCP tool to apply migrations, then e2e MCP tool to run tests. All tests must pass to approve. Reject if any sleep statements found.
45+
**Important**: Never approve tests without running them. Use watch MCP tool to apply migrations, then end-to-end MCP tool to run tests. All tests must pass to approve. Reject if any sleep statements found.
4646

4747
⚠️ Problem reporting - report aggressively:
4848

.claude/commands/process/implement-end-to-end-tests.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ Research the codebase to find similar E2E test implementations. Look for existin
132132

133133
**STEP 7**: Run tests and verify they pass
134134

135-
- Use **e2e MCP tool** to run your tests
136-
- Start with smoke tests: `e2e(smoke=true)`
137-
- Then run comprehensive tests with search terms: `e2e(searchTerms=["feature-name"])`
135+
- Use **end-to-end MCP tool** to run your tests
136+
- Start with smoke tests: `end-to-end(smoke=true)`
137+
- Then run comprehensive tests with search terms: `end-to-end(searchTerms=["feature-name"])`
138138
- All tests must pass before proceeding
139139
- If tests fail: Fix them and run again (don't proceed with failing tests)
140140

.claude/commands/process/review-end-to-end-tests.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ You are reviewing: **{{{title}}}**
8888
- The tool starts .NET Aspire at https://localhost:9000
8989

9090
**Run E2E tests**:
91-
- Use **e2e MCP tool** to run tests: `e2e(searchTerms=["feature-name"])`
91+
- Use **end-to-end MCP tool** to run tests: `end-to-end(searchTerms=["feature-name"])`
9292
- **ALL tests MUST pass with ZERO failures to approve**
9393
- **Verify ZERO console errors** during test execution
9494
- **Verify ZERO network errors** (no unexpected 4xx/5xx responses)
@@ -185,7 +185,7 @@ Don't use `git add -A` or `git add .`
185185
- `[requirements]` — Requirements clarity, acceptance criteria, task description
186186
- `[code]` — Code patterns, rules, architecture guidance
187187

188-
Examples: `[system] e2e MCP tool reported test passed but it actually failed` or `[requirements] Feature requirements didn't specify mobile viewport testing`
188+
Examples: `[system] end-to-end MCP tool reported test passed but it actually failed` or `[requirements] Feature requirements didn't specify mobile viewport testing`
189189

190190
⚠️ Your session terminates IMMEDIATELY after calling CompleteWork.
191191

.claude/commands/process/review-task.md

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ The [feature] plan was AI-generated by tech-lead in a few minutes after intervie
155155

156156
**Collaborate with your team**: For complex problems or design questions, engage in conversation with engineers or other reviewers. Better solutions often emerge from team collaboration.
157157

158-
**STEP 3**: Run validation tools in parallel (format, test, inspect)
158+
**STEP 3**: Run validation tools
159159

160160
**Zero tolerance for issues**:
161161
- We deploy to production after review - quality is non-negotiable.
@@ -169,18 +169,9 @@ The [feature] plan was AI-generated by tech-lead in a few minutes after intervie
169169

170170
**For backend-reviewer** (validates all self-contained systems to catch cross-self-contained-system breakage):
171171

172-
1. Run **build** first for all self-contained systems (backend AND frontend):
173-
- Use execute_command MCP tool: `command: "build"`.
174-
- DO NOT run in parallel.
172+
1. Run **build**, **format**, **test**, **inspect** following the global tool execution instructions.
175173

176-
2. Run **format**, **test**, **inspect** in parallel:
177-
- Call all three MCP tools in a single message:
178-
- `execute_command(command: "format", noBuild: true)`
179-
- `execute_command(command: "test", noBuild: true)`
180-
- `execute_command(command: "inspect", noBuild: true)`
181-
- All three run simultaneously and return together.
182-
183-
3. Handle validation results:
174+
2. Handle validation results:
184175
- **If NO parallel work notification in request**: REJECT if ANY failures found (zero tolerance).
185176
- **If parallel work notification present** (e.g., "⚠️ Parallel Work: Frontend-engineer..."):
186177
- REJECT if backend failures found (Core/, Api/, Tests/, Database/).
@@ -189,13 +180,9 @@ The [feature] plan was AI-generated by tech-lead in a few minutes after intervie
189180

190181
**For frontend-reviewer** (validates frontend only):
191182

192-
1. Run **build** for frontend: `execute_command(command: "build", frontend: true)`.
193-
194-
2. Run **format** for all self-contained systems: `execute_command(command: "format", frontend: true)`.
183+
1. Run **build**, **format**, **inspect** for frontend following the global tool execution instructions.
195184

196-
3. Run **inspect** for all self-contained systems: `execute_command(command: "inspect", frontend: true)`.
197-
198-
4. Handle validation results:
185+
2. Handle validation results:
199186
- **If NO parallel work notification in request**: REJECT if ANY failures found (zero tolerance).
200187
- **If parallel work notification present** (e.g., "⚠️ Parallel Work: Backend-engineer..."):
201188
- REJECT if frontend failures found (WebApp/).
@@ -204,11 +191,9 @@ The [feature] plan was AI-generated by tech-lead in a few minutes after intervie
204191

205192
**For qa-reviewer** (validates E2E tests):
206193

207-
1. Run **build** for frontend: `execute_command(command: "build", frontend: true)`.
208-
209-
2. Run **e2e** tests (run in background, monitor output).
194+
1. Run **build** for frontend, then run **end-to-end** tests following the global tool execution instructions.
210195

211-
3. REJECT if ANY failures found (zero tolerance).
196+
2. REJECT if ANY failures found (zero tolerance).
212197

213198
**If validation fails with errors unrelated to engineer's changes**:
214199
- Check `git log --oneline` for recent parallel engineer commits.

.claude/hooks/pre-tool-use-bash.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ case "$cmd" in
1818
*"npm run format"*) echo "❌ Use **format MCP tool** instead" >&2; exit 2 ;;
1919
*"npm test"*) echo "❌ Use **test MCP tool** instead" >&2; exit 2 ;;
2020
*"npm run build"*) echo "❌ Use **build MCP tool** instead" >&2; exit 2 ;;
21-
*"npx playwright test"*) echo "❌ Use **e2e MCP tool** instead" >&2; exit 2 ;;
21+
*"npx playwright test"*) echo "❌ Use **end-to-end MCP tool** instead" >&2; exit 2 ;;
2222
*"docker"*) echo "❌ Docker not allowed. Use **watch MCP tool** for Aspire/migrations" >&2; exit 2 ;;
2323
*) exit 0 ;;
2424
esac

0 commit comments

Comments
 (0)