Skip to content

feat: find the repos of a folder and the mentions between them - #10

Merged
ECG-Rudy-Glt merged 1 commit into
mainfrom
feat/discover-links
Nov 4, 2026
Merged

ECG-Rudy-Glt merged 1 commit into
mainfrom
feat/discover-links

Conversation

@ECG-Rudy-Glt

Copy link
Copy Markdown
Owner

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/consumes were typed by hand, and a repository that never ran relai init was invisible. This is the Relai side of discovery (OpenSpec change discover-linked-repos). The team-server side is RELAI-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 need relai 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.
  • --propose prints a links: block per relai.yaml to check and paste; --prompt prints instructions for an agent to verify each mention against the files, show the engineer a table, and write only after they agree; --json for tools.
  • relai.yaml gets an optional links: (ids of the repos this one works with), read by the index and shown by relai 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, --propose writes nothing); real run on a 16-repo folder in about 1 s.

Not done / for review

  • Precision of strong/weak is only checked on one real folder; no agent has followed --prompt yet.
  • Only repositories directly in the folder (no recursion). links: is not yet used by relai find or the team server.
  • The expected value of weakThreshold (5 files) in --propose is a guess.

… build --scan, discover --links), links: in relai.yaml
@ECG-Rudy-Glt
ECG-Rudy-Glt merged commit 2992c1a into main Nov 4, 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