feat(lsp): add directory support to lsp_diagnostics via extension param

- Add isDirectoryPath helper to lsp-client-wrapper.ts
- Create directory-diagnostics.ts with aggregateDiagnosticsForDirectory
- Update diagnostics-tool.ts with extension parameter for directory paths
- Update Atlas agent prompts to use extension param for directory diagnostics
- Add unit tests for isDirectoryPath and aggregateDiagnosticsForDirectory

Fixes #2362
This commit is contained in:
acamq
2026-03-07 13:05:58 -07:00
parent fd9642a6ab
commit 7379e10dd6
9 changed files with 268 additions and 31 deletions
+3 -3
View File
@@ -184,7 +184,7 @@ task(
After EVERY delegation, complete ALL of these steps — no shortcuts:
#### A. Automated Verification
1. \`lsp_diagnostics(filePath=".")\` → ZERO errors at project level
1. 'lsp_diagnostics(filePath=".", extension=".ts")' → ZERO errors at project level (for directory paths, extension parameter is required)
2. \`bun run build\` or \`bun run typecheck\` → exit code 0
3. \`bun test\` → ALL tests pass
@@ -346,7 +346,7 @@ You are the QA gate. Subagents lie. Verify EVERYTHING.
**After each delegation — BOTH automated AND manual verification are MANDATORY:**
1. \`lsp_diagnostics\` at PROJECT level → ZERO errors
1. 'lsp_diagnostics(filePath=".", extension=".ts")' at PROJECT level → ZERO errors (for directory paths, extension parameter is required)
2. Run build command → exit 0
3. Run test suite → ALL pass
4. **\`Read\` EVERY changed file line by line** → logic matches requirements
@@ -390,7 +390,7 @@ You are the QA gate. Subagents lie. Verify EVERYTHING.
- Trust subagent claims without verification
- Use run_in_background=true for task execution
- Send prompts under 30 lines
- Skip project-level lsp_diagnostics after delegation
- Skip project-level lsp_diagnostics after delegation (use 'filePath=".", extension=".ts"' for TypeScript projects)
- Batch multiple tasks in one delegation
- Start fresh session for failures/follow-ups - use \`resume\` instead
+1 -1
View File
@@ -361,7 +361,7 @@ Subagents CLAIM "done" when:
- Trust subagent claims without verification
- Use run_in_background=true for task execution
- Send prompts under 30 lines
- Skip project-level lsp_diagnostics
- Skip project-level lsp_diagnostics (use 'filePath=".", extension=".ts"' for TypeScript projects)
- Batch multiple tasks in one delegation
- Start fresh session for failures (use session_id)
+2 -2
View File
@@ -55,7 +55,7 @@ Implementation tasks are the means. Final Wave approval is the goal.
- Verification (use Bash for tests/build)
- Parallelize independent tool calls when possible.
- After ANY delegation, verify with your own tool calls:
1. \`lsp_diagnostics\` at project level
1. 'lsp_diagnostics(filePath=".", extension=".ts")' at project level (for directory paths, extension parameter is required)
2. \`Bash\` for build/test commands
3. \`Read\` for changed files
</tool_usage_rules>
@@ -364,7 +364,7 @@ Your job is to CATCH THEM. Assume every claim is false until YOU personally veri
- Trust subagent claims without verification
- Use run_in_background=true for task execution
- Send prompts under 30 lines
- Skip project-level lsp_diagnostics
- Skip project-level lsp_diagnostics (use 'filePath=".", extension=".ts"' for TypeScript projects)
- Batch multiple tasks in one delegation
- Start fresh session for failures (use session_id)