Skip to content

feat: migrate lib/repo-map from ast-grep to agent-analyzer#9

Merged
avifenesh merged 2 commits intomainfrom
feat/migrate-repo-map-to-agent-analyzer
Mar 22, 2026
Merged

feat: migrate lib/repo-map from ast-grep to agent-analyzer#9
avifenesh merged 2 commits intomainfrom
feat/migrate-repo-map-to-agent-analyzer

Conversation

@avifenesh
Copy link
Contributor

Summary

  • Remove 2717 lines of dead code: runner.js (1364), usage-analyzer.js (407), updater.js dead paths (462), queries/ (355), concurrency.js (29)
  • index.js: uses binary.runAnalyzerAsync(['repo-intel', 'init|update']) - no more ast-grep shell calls
  • installer.js: checks agent-analyzer availability (auto-downloads on first use)
  • converter.js: new file translating repo-intel.jsonrepo-map.json format for backward compat
  • updater.js: stripped to checkStaleness() + git helpers only (490 → 95 lines)
  • checkAstGrepInstalled() kept as compat alias for checkInstalled() - docs-patterns.js callers unaffected

When this merges, the agent-core sync will propagate to all consumer plugins (next-task, perf, audit-project, etc.), removing the dead ast-grep code from their lib/repo-map/ copies.

Test plan

  • node -e "require('./lib/repo-map')" passes
  • node -e "require('./lib')" passes
  • Verify agent-core sync propagates to next-task and perf after merge

Reconstructed from full commit history. Groups changes into 6 releases
(v0.0.1 through v0.4.0) covering the initial lib/ seed, CI/hooks setup,
agent-knowledge submodule, binary resolver, git collector, template fixes,
and the ANALYZER_MIN_VERSION v0.3.0 bump.
Remove 2717 lines of dead code (runner.js, queries/, concurrency.js,
usage-analyzer.js) that wrapped ast-grep. Replace with the agent-analyzer
path that auto-downloads the binary on first use.

- index.js: calls binary.runAnalyzerAsync(['repo-intel', init|update])
- installer.js: checks agent-analyzer availability, no ast-grep detection
- converter.js: translates repo-intel.json format to repo-map.json format
- updater.js: stripped to checkStaleness() + git helpers only (490 → 95 lines)
- Deleted: runner.js (1364 lines), queries/ (355 lines), concurrency.js (29 lines),
           usage-analyzer.js (407 lines)
- API compat: checkAstGrepInstalled() kept as alias for checkInstalled()
@gemini-code-assist
Copy link

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@avifenesh avifenesh merged commit c4fa0dd into main Mar 22, 2026
2 of 3 checks passed
@avifenesh avifenesh deleted the feat/migrate-repo-map-to-agent-analyzer branch March 22, 2026 21:34
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