Add --repos flag to `group auto-discover` so users can pass explicit
repo paths instead of scanning a directory:
gitnexus group auto-discover --repos /path/to/repo1 /path/to/repo2
Also removes unused buildPackageMap() and findSiblingDependencies()
functions, and cleans up redundant inline comments across extractors.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add `gitnexus group graph <name> <symbol>` command and `group_graph`
MCP tool that traverses CrossLinks to find how a symbol connects to
other repos in a group. Returns local context plus remote connections
with their contract metadata.
Searches all repos in the group when --repo is not specified. Supports
--depth (max 2) and --direction (upstream/downstream/both) options.
Includes 6 integration tests with mock GroupToolPort.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add `gitnexus group auto-discover [directory]` that scans a parent
directory for indexed repos, reads their package manifests, builds
package mappings, and creates a group with code-level dependency
detection enabled.
Also adds `group_discover` MCP tool for programmatic access and
`groupDiscover()` method on GroupService.
Includes 5 integration tests covering discovery, error handling,
and non-indexed directory filtering.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add CodeDepExtractor that detects when repo B imports symbols from
repo A's npm package. Wires into the existing group sync pipeline
using the already-declared `lib` contract type and `shared_libs`
detection flag.
New files:
- manifest-reader.ts: reads package.json for name + dependencies
- import-scanner.ts: scans source for ES/CJS imports matching sibling packages
- code-dep-extractor.ts: ContractExtractor producing lib::{pkg}::{symbol} contracts
Auto-discovers package mappings when config.packages is empty by reading
each repo's package.json name and checking cross-dependencies.
Includes 58 unit tests and 3 integration tests covering all extraction
paths, edge cases, and the full sync → match → CrossLink pipeline.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Wire extractors into the sync pipeline with service boundary detection.
GroupService provides high-level API for all group operations.
- Sync pipeline: orchestrates extraction (HTTP, gRPC, topics) with
service boundary assignment and exact matching
- GroupService: groupList, groupSync, groupContracts, groupQuery,
groupStatus (groupImpact deferred to cross-repo follow-up PR)
- CLI: group create/add/remove/list/sync/contracts/query/status
- MCP tools: group_list, group_sync, group_contracts, group_query,
group_status
- Monorepo fixture: 3 services (auth/orders/gateway) connected via
gRPC + Kafka + HTTP — all intra-repo cross-links discovered
- Documentation: CLI commands and MCP tools added to both READMEs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>