AGENTS.md
src/tools/diagnostics/AGENTS.mdAGENTS.md
Quality
77/100
Scores the file, not the repository.Length
369 words
15 headings · 6 code blocksRepository
38k
— · pushed 0 days agoLast changed
3 days ago
First indexed 3 days ago.1<!-- Parent: ../AGENTS.md -->2<!-- Generated: 2026-01-28 | Updated: 2026-01-28 -->34# diagnostics56Project-level diagnostics via TypeScript compiler (tsc) or LSP aggregation.78## Purpose910This directory provides project-wide type checking and error detection:11- **Primary**: `tsc --noEmit` for fast, comprehensive TypeScript checking12- **Fallback**: LSP iteration when tsc is unavailable13- Powers the `lsp_diagnostics_directory` tool1415## Key Files1617| File | Description |18|------|-------------|19| `index.ts` | Main entry - `runDirectoryDiagnostics()` with strategy selection |20| `tsc-runner.ts` | TypeScript compiler runner - parses `tsc --noEmit` output |21| `lsp-aggregator.ts` | LSP fallback - iterates files and collects diagnostics |2223## For AI Agents2425### Working In This Directory2627#### Strategy Selection2829```typescript30// Auto-select best strategy31const result = await runDirectoryDiagnostics(directory, 'auto');3233// Force specific strategy34const tscResult = await runDirectoryDiagnostics(directory, 'tsc');35const lspResult = await runDirectoryDiagnostics(directory, 'lsp');36```3738**Strategy logic:**39```typescript40if (strategy === 'auto') {41 useStrategy = hasTsconfig ? 'tsc' : 'lsp';42}43```4445#### TSC Runner4647Uses `tsc --noEmit --pretty false` for parseable output:48```typescript49// Output format: file(line,col): error TS1234: message50const regex = /^(.+)\((\d+),(\d+)\):\s+(error|warning)\s+(TS\d+):\s+(.+)$/gm;51```5253**Advantages:**54- Fast (single process)55- Comprehensive (full project type checking)56- Accurate (uses tsconfig.json)5758#### LSP Aggregator5960Fallback that iterates through files:61```typescript62for (const file of files) {63 const client = await lspClientManager.getClientForFile(file);64 await client.openDocument(file);65 await sleep(LSP_DIAGNOSTICS_WAIT_MS); // 300ms for server processing66 const diagnostics = client.getDiagnostics(file);67}68```6970**Use when:**71- No tsconfig.json72- Multi-language project73- Need per-file incremental checking7475### Common Patterns7677**Result format:**78```typescript79interface DirectoryDiagnosticResult {80 strategy: 'tsc' | 'lsp';81 success: boolean;82 errorCount: number;83 warningCount: number;84 diagnostics: string; // Formatted output85 summary: string; // Human-readable summary86}87```8889### Testing Requirements9091```bash92# Test with a TypeScript project93npm test -- --grep "diagnostics"94```9596## Dependencies9798### Internal99- `../lsp/` - LSP client for aggregation mode100101### External102| Package | Purpose |103|---------|---------|104| `child_process` | Running tsc |105| `fs`, `path` | File system operations |106107## Performance Comparison108109| Strategy | Speed | Accuracy | Requirements |110|----------|-------|----------|--------------|111| `tsc` | Fast (~1-5s) | High | tsconfig.json |112| `lsp` | Slow (~0.3s/file) | Medium | Language server installed |113114**Recommendation**: Always prefer `tsc` for TypeScript projects.115116<!-- MANUAL: -->117
Also in Yeachan-Heo/oh-my-claudecode
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| Yeachan-Heo/oh-my-claudecode.github/CLAUDE.md · 38k | CLAUDE.md | setupbuildstylegit+2 | 79/100 | 3 days ago | |
| Yeachan-Heo/oh-my-claudecodeAGENTS.md · 38k | AGENTS.md | setuplint-formatstyletypes+4 | 45/100 | 3 days ago | |
| Yeachan-Heo/oh-my-claudecodeskills/AGENTS.md · 38k | AGENTS.md | teststylearchdependencies+1 | 66/100 | 3 days ago | |
| Yeachan-Heo/oh-my-claudecodesrc/AGENTS.md · 38k | AGENTS.md | buildteststylearch+2 | 77/100 | 3 days ago | |
| Yeachan-Heo/oh-my-claudecodesrc/agents/AGENTS.md · 38k | AGENTS.md | teststylearchdependencies+1 | 66/100 | 3 days ago | |
| Yeachan-Heo/oh-my-claudecodesrc/features/AGENTS.md · 38k | AGENTS.md | teststylearchdependencies | 74/100 | 3 days ago | |
| Yeachan-Heo/oh-my-claudecodesrc/hooks/AGENTS.md · 38k | AGENTS.md | setupteststylearch+2 | 74/100 | 3 days ago | |
| Yeachan-Heo/oh-my-claudecodesrc/tools/AGENTS.md · 38k | AGENTS.md | setupteststylearch+1 | 86/100 | 3 days ago | |
| Yeachan-Heo/oh-my-claudecodesrc/tools/lsp/AGENTS.md · 38k | AGENTS.md | setupteststylearch+2 | 74/100 | 3 days ago | |
| Yeachan-Heo/oh-my-claudecodeCLAUDE.md · 38k | CLAUDE.md | setupbuildstylegit+1 | 65/100 | 3 days ago |
Diff against .github/CLAUDE.md Diff against AGENTS.md Diff against skills/AGENTS.md Diff against src/AGENTS.md Diff against src/agents/AGENTS.md Diff against src/features/AGENTS.md Diff against src/hooks/AGENTS.md Diff against src/tools/AGENTS.md Diff against src/tools/lsp/AGENTS.md Diff against CLAUDE.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 3 days ago | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | 3 days ago | |
| SkeneTechnologies/skene-cookbookAGENTS.md · 51 | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 2 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 199k | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| aaif-goose/gooseAGENTS.md · 52k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| trick77/agents-md-syncAGENTS.md · 2 | AGENTS.md | setupbuildteststyle+5 | 100/100 | 3 days ago | |
| code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 67k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 2 days ago |
