Repository navigation
feat: find the repos of a folder and the mentions between them - #10
Merged
Merged
Conversation
… build --scan, discover --links), links: in relai.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The product goal is to drive several linked repositories from one central place, for teams. Until now nothing found them: the index needed a hand-written list,
provides/consumeswere typed by hand, and a repository that never ranrelai initwas invisible. This is the Relai side of discovery (OpenSpec changediscover-linked-repos). The team-server side isRELAI-TEAM-9os, not in this PR.relai index build --scan <folder>: finds the git repos of a folder (symbolic links to repos included, each repo once), indexes them, and names those that still needrelai init.relai discover --links <folder>: the mentions between those repos. Strong evidence = the other repo's remote URL or a relative path to it; weak = its name as a word (names under 4 letters are only searched through strong evidence). Counts and up to three file paths per link, never content. Generated files are ignored.--proposeprints alinks:block perrelai.yamlto check and paste;--promptprints instructions for an agent to verify each mention against the files, show the engineer a table, and write only after they agree;--jsonfor tools.relai.yamlgets an optionallinks:(ids of the repos this one works with), read by the index and shown byrelai workspace.A mention is evidence, not a verdict. The tool never writes a file and never declares a link; the agent and the engineer do.
Found while building it
On the owner's own folder the first version found 9 of 16 repos: five projects are symbolic links into
projets/and the scan ignored them. Fixed (and tested). Run on that folder it now finds the real deployment links (the infra repo's manifests pointing at the application repos) as strong evidence, and ordinary mentions as weak.Verified
go vet,go test -race ./...; tests on a synthetic cluster (strong vs weak, generated files ignored, short names, symlinks, a repo reached twice, broken links, evidence is paths only,--proposewrites nothing); real run on a 16-repo folder in about 1 s.Not done / for review
--promptyet.links:is not yet used byrelai findor the team server.weakThreshold(5 files) in--proposeis a guess.