Repository navigation
feat(marius-mode): resolve PR or MR per forge - #9
Conversation
Opening a PR detects Origin, GitHub, or GitLab from the repository and uses that forge's noun and CLI. The forge rules move into references/forge.md so playbooks link one source. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 35d1cc1e2c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Check these in order and stop at the first match. | ||
|
|
||
| 1. **Origin.** `command -v origin` succeeds and Origin can resolve the repository. | ||
| 2. **GitHub.** The host of `git remote get-url origin` is `github.com`, or `gh repo view` succeeds for a GitHub Enterprise host. |
There was a problem hiding this comment.
Check the origin host before probing GitHub
When a GitLab-origin checkout also has an authenticated GitHub remote, such as a mirror, this step runs before the explicit GitLab check and gh repo view can succeed against that secondary remote, causing the resolver to select GitHub and open a PR in the mirror instead of an MR at the origin. I confirmed with gh 2.96.0 that a temporary repository with a GitLab origin and github.com/cli/cli as mirror made gh repo view query cli/cli; its help describes the no-argument form as displaying the repository for the current directory, not specifically origin. Classify the known origin host before using the generic CLI probe, or bind the probe to that host.
Useful? React with 👍 / 👎.
Why
Opening a PR assumed GitHub. On GitLab the playbook named the wrong CLI and the wrong noun. It now resolves the forge from the repository and uses that forge's noun (PR or MR) and CLI (
origin,gh, orglab).Scope
skills/marius-mode/references/forge.md: detection order (Origin, GitHub, GitLab, else ask), noun table, and create, retarget, mark-ready, and view commands per forge.playbooks/opening-a-pr.md: Forge, Size and stacks, and Readiness link the reference instead of naminggh. The squash-commit rule now covers merge commits too.playbooks/multi-phase-plan.md: the PR mechanics checklist points at the reference by<skills>/path, since the skeleton is copied out of the repo.babysit.md,shipping.md,autopilot-stack.md,watch-pr, andworktree-audit.shstill assume GitHub. A follow-up PR covers them.Blast Radius
Only agents that open a PR through marius-mode. GitHub and Origin behavior is unchanged. An unrecognized remote now asks the user instead of defaulting to
gh.Verification
node scripts/check.mjs: ok (45 skills).node --test scripts/*.test.mjs: 14 pass, 0 fail.glabflags checked against the GitLab CLI docs formr createandmr update. Not run live, sinceglabis not installed here.🤖 Generated with Claude Code