Skip to content

feat(cli,core): dev refs CLI, callee normalization, token efficiency docs#28

Merged
prosdev merged 4 commits into
mainfrom
feat/refs-cli-and-callee-normalization
Apr 1, 2026
Merged

feat(cli,core): dev refs CLI, callee normalization, token efficiency docs#28
prosdev merged 4 commits into
mainfrom
feat/refs-cli-and-callee-normalization

Conversation

@prosdev

@prosdev prosdev commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • New dev refs <name> CLI command — find callers/callees from the terminal with --direction, --depends-on, --json
  • Normalize callee file paths in TypeScript scanner: dist/src/, .d.ts.ts, absolute → relative. Fixes hot paths showing build output instead of source files.
  • Fix indexer passing empty exclude array (was bypassing scanner default exclusions)
  • Add token efficiency framing to CLAUDE.md and all 7 agents with MCP tools — "MCP tools return pre-ranked snippets, saving ~3,000-5,000 tokens per query vs Grep → Read cycles"

Test plan

  • 1 new test: callee path normalization (no absolute paths, no dist/, no .d.ts in callees)
  • Full suite: 1704 passed, 39 skipped
  • Manual: dev refs "isTestFile" shows callers + callees
  • Manual: dev map hot paths show packages/logger/src/types.ts not dist/types.d.ts
  • Lint + typecheck clean

🤖 Generated with Claude Code

prosdev and others added 4 commits April 1, 2026 01:26
- New `dev refs <name>` command: callees, callers, --depends-on, --json
- Normalize callee file paths: dist/ → src/, .d.ts → .ts, absolute → relative
- Fix indexer passing empty exclude array (was bypassing scanner defaults)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add dev refs to CLI commands section with usage examples
- Document graph caching (dependency-graph.json) in MCP tools section
- Update dev_refs description to mention dependsOn parameter
- Update agent prompts (bug-investigator, plan-reviewer, research-planner,
  quick-scout) to reference dependsOn for dependency chain tracing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Validate --direction with Commander .choices() (rejects invalid values)
- Use cached dependency graph for --depends-on (loadOrBuildGraph)
- Pass excludePatterns/languages from config (parity with search command)
- Use replaceAll for dist/ normalization (handles nested paths)
- Note indexer.close() not needed in catch (process.exit cleans up)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@prosdev prosdev force-pushed the feat/refs-cli-and-callee-normalization branch from 1d2a1fe to f118cb6 Compare April 1, 2026 10:15
@prosdev prosdev merged commit e7ea247 into main Apr 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant