Make generated briefs forge-aware (github/gitlab) - #2519
Open
tieptoi wants to merge 4 commits into
Open
Conversation
added 4 commits
August 17, 2026 16:55
fm-brief.sh scaffolds hardcoded gh-axi/PR wording, so every dispatch to a GitLab-hosted project needs hand-replaced glab and merge-request vocabulary. - Add --forge <github|gitlab>, the explicit mechanism for crewmate ship and scout scaffolds; secondmate charters are forge-neutral and refuse it. - Best-effort auto-detection from the clone origin at $FM_HOME/projects/<repo-name> when the flag is absent: github.com chooses github, any host containing gitlab chooses gitlab, anything else (missing clone, self-hosted host without gitlab in its name) scaffolds forge-neutral wording - your forge CLI, PR/MR - and warns loudly at scaffold time. - The flag wins over detection; an invalid value is refused loudly. Extend tests/fm-brief.test.sh: explicit github/gitlab vocabulary for ship, no-mistakes, and scout scaffolds; auto-detection fixtures for github.com, gitlab.example.com, unrecognized self-hosted hosts, and missing clones.
…DE in forge detection
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.
Problem
bin/fm-brief.shscaffolds hardcoded GitHub wording in every generated brief: Rules say "Use gh-axi for GitHub operations", Definition-of-done says "open PR with gh-axi". Every dispatch to a GitLab-hosted project needs hand-replacedglaband merge-request vocabulary — a recurring per-dispatch tax and a defect source for every GitLab-based fleet.Design
--forge <github|gitlab>— explicit mechanism for crewmate ship and scout scaffolds; invalid values and the internalautosentinel are refused loudly. Secondmate charter scaffolds are forge-neutral and refuse the flag.$FM_HOME/projects/<repo-name>(honoring the documentedFM_PROJECTS_OVERRIDElocation):github.comorigin → github; any host containinggitlab→ gitlab; anything else (missing clone, self-hosted host withoutgitlabin the name, non-git placeholder directory) → forge-neutral wording and a loud scaffold-time warning.gh-axiand PR; gitlab usesglaband merge request/MR; neutral uses vague "your forge CLI" and PR/MR wording — in Rules, Setup, Definition-of-done, and the no-mistakes Direct-PR pipeline instructions.gitlab(e.g.noc-git.orion.co.com) — a deliberate follow-up, out of scope here.Companion classifier fix (
bin/fm-crew-state.sh)Firstmate's CI-ready reconciliation classifier matched only
*PR*"checks green"*. A gitlab-flavored no-mistakes wrapper appendsdone: MR <url> checks green, which never registered as CI-ready. Widened to also match theMRspelling so gitlab-dispatched tasks complete end-to-end.Tests
tests/fm-brief.test.sh: explicit github/gitlab vocabulary assertions for ship, no-mistakes, and scout scaffolds; auto-detection fixtures for github.com, gitlab.example.com, unrecognized self-hosted hosts, missing clones, and non-git placeholder directories;--forge autosentinel refusal; refusal rows moved to the correct test table.Verified: 22/22 tests pass (also under stock macOS Bash 3.2),
bin/fm-lint.shclean, no-mistakes review/test/document/lint steps all green locally.