Scaffold the remontoire agent workflow (AGENTS.md, STATUS/PLAN files, worker agents, config, optional CI) into the current repo. Use when the user asks to set up or initialise the workflow in a repository.
2 stars
0 votes
0 copies
0 views
Added December 3, 2026
ai-agentspythongojavashellbashnodegitapi
Works with
claude code
cursor
terminal
cli
api
Security analysis
A92/100
mediumInstalls packages at runtime which could introduce malicious dependencies
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Workflow Init?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/davidsrn-workflow-init)
---
name: workflow-init
description: Scaffold the remontoire agent workflow (AGENTS.md, STATUS/PLAN files, worker agents, config, optional CI) into the current repo. Use when the user asks to set up or initialise the workflow in a repository.
argument-hint: "[auto]"
---
# workflow-init
Discover what the repo already answers, ask only the rest, then scaffold the repo with `rmt init`. Never overwrite an existing file. If `rmt` is not on PATH in the current tool shell (such as a plugin-only install on Antigravity, Codex, Cursor or Copilot CLI), invoke `node "<plugin-root>/bin/rmt"` (`../../bin/rmt` relative to this `SKILL.md`) for `rmt init` and `rmt doctor`.
## Asking
Use the host's structured question tool when it has one (`AskUserQuestion` in Claude Code): up to 4 questions per call, the default or discovered value first and marked `(Recommended)`, each option with a one-line description. Free text is always available through "Other". If the host has no such tool, ask in plain text, batching the same groups and stating the default for each. Never make the user type a value that can be offered as an option.
## Auto mode
Auto mode runs when the arguments contain `auto` (for example `/workflow-init auto`), or when the user asks for no questions or the recommended defaults (the only trigger on hosts without `argument-hint`, such as Antigravity). Do not ask anything: run discovery, take each question's recommended or discovered value, and print one summary at the end. Without `auto`, ignore this section.
- Answers: every question with a default or recommendation takes it. `statusLine` follows its rule: `set` or `wrap` only when `rmtOnPath` is true, otherwise `skip` and a manual step. `project` uses the discovered value; only when nothing is discovered, the repository folder name.
- Fallbacks where there is no recommendation: `agyHigh` is the current session model when `agy models` lists it, else `inherit`; `agyLow` is `inherit`; `workerModel` and `lowModel` are the `plannerModel` value when no model list is in context.
- Not a git repository: `git init -b main`, no remote, so `mode` is `local`. Missing base branch on a repository with commits: `git branch <base>`.
- Conflicts (including `.claude/settings.json`): never edit or overwrite an existing file. Leave each one untouched and list it with `git diff --no-index <file> <rendered>` or the `rmt init` conflict list. Duplicates are listed, not removed.
- Commit: always, staging only what init wrote. A repository created in this run commits only init's files. `pr` and `gitflow` with existing commits commit on `chore/remontoire-init`, never on the protected base, because the guard hook blocks it.
- Never push, add a remote or run `rmt land`; put them in the manual steps.
- Finish with `rmt doctor`; report any `FAIL` line in the summary instead of fixing it interactively.
- Summary: every value chosen with its source (`discovered`, `recommended` or `fallback`), files created, conflicts left untouched, the commit SHA, the manual steps and the `rmt doctor` output.
## Not a git repository
If `git rev-parse --is-inside-work-tree` fails, ask before anything else: initialise a local repository (`git init -b main`, recommended), initialise one and add a remote (ask for the URL, then `git remote add origin <url>`), or stop. In auto mode do not ask: run `git init -b main` with no remote. The repository has no commits until the final commit step, so discovery treats it as new: base is `main`, and mode is `local` without a remote or `pr` with one.
## Discovery (before asking anything)
Read the repo and fill in what it answers; note the source of each value.
- `project`: `description` in `package.json`, `pyproject.toml` or `Cargo.toml`, else the first sentence of the README.
- `testCommand`: first look for a wrapper the project documents: scripts such as `scripts/*test*` or a gradle-quiet style wrapper, and commands named in the README, CONTRIBUTING, `docs/AGENT_CONTEXT.md`, `CLAUDE.md` or `AGENTS.md`; prefer a documented wrapper over the raw build command. Then `npm test` when `package.json` has a real `scripts.test`; else a `test` target in a Makefile, `pytest` for a Python project, `cargo test`, `go test ./...`. Offer `echo ok` as a placeholder when nothing is found.
- `stack`: `node` (`package.json`), `python` (`pyproject.toml`, `requirements.txt`), `java` (`build.gradle*`, `pom.xml`) or `none`. Used for the CI toolchain setup.
- `hosts`: always `claude` and `antigravity`, plus `codex` if `.codex/` exists, `cursor` if `.cursor/` exists, `copilot` if `.github/copilot-instructions.md` exists.
- `base` and `mode`: `git remote` and `git branch -a`. A `develop` or `dev` branch is a gitflow signal: with a remote it means `gitflow` with that branch as base; without a remote it means `local` with that branch as base, and when `main` also exists `protected` is `[<base>, "main"]`. Otherwise a remote means `pr` with the default branch as base, and no remote means `local` with the current branch as base.
- `ci`: `true` when the remote is on GitHub or `.github/` exists, else `false`.
- Claude models (`hosts` includes `claude`): never use a hardcoded list. Take the available models from your own context (the model family your environment lists) and offer them in alias form (`fable`, `opus`, ...) so agent files track new releases. The recommended `plannerModel` is `model` from `.claude/settings.json`, else `~/.claude/settings.json`, else the current session model; the recommended `workerModel` is the next model below it, and `lowModel` the smallest. When the list is not in your context (for example, running in Antigravity), recommend only `plannerModel` from `model` in settings and ask `workerModel` and `lowModel` with no recommendation. Never infer a ranking from `modelSettings`, effort levels or names.
- `statusLineExisting`: `statusLine.command` from `.claude/settings.json`, else `~/.claude/settings.json` (`hosts` includes `claude`). Empty when neither sets one.
- `rmtOnPath` (`hosts` includes `claude`): whether `rmt` resolves outside the plugin's Bash tool PATH, since Claude Code may run the status line without the plugin `bin/` on PATH. True when `npm ls -g remontoire` lists it (an `npm link` or global install); `command -v rmt` (or `where rmt` on Windows) alone is not enough inside the Bash tool, which has the plugin `bin/` on PATH.
- Antigravity models (`hosts` includes `antigravity`): run `agy models` and use its IDs; never use a hardcoded list and do not rank them.
## Questions
1. `project`: one-line description of the project.
2. `hosts`: multi-pick of `claude`, `antigravity`, `codex`, `cursor`, `copilot`. Default is the discovered list.
3. `testCommand`: the command that runs the tests or build (used in AGENTS.md gates and CI).
4. `mode`: `pr`, `local` or `gitflow`. Default `pr`.
5. `base`: base branch. Default `main`.
6. `merge`: `human` or `auto`. Default `human`. With `auto` a delegated reviewer posts PASS/FAIL on the PR and the main session merges on PASS plus green checks.
7. `coordination`: do several sessions run in parallel in this repo (include the Coordination section)? Default `false`.
8. `multiRepo`: share device locks and allow `--all` broadcasts with other opted-in repos on this machine? Default `false`. Can be switched later with `rmt coord multirepo on|off`.
9. `plannerModel`, `workerModel`, `lowModel` (`hosts` includes `claude`): Claude models for planning and review, implementation, and low-effort tasks. Recommended values come from discovery.
10. `agyHigh`, `agyMedium`, `agyLow` (`hosts` includes `antigravity`): Antigravity model IDs for the high, medium and low effort tiers. `agyMedium` recommends `inherit` (the session model); `agyHigh` and `agyLow` have no recommendation.
11. `reReviewer`: add a low-cost re-reviewer for small fix re-reviews? Default `false`.
12. `stack` and `preTest` (only when `ci` is true): `stack` is discovered (`node`, `python`, `java` or `none`) and is confirmed, not asked from scratch. `preTest` is an optional command CI runs before the tests (code generation, asset builds); recommend none and omit the key when there is none.
13. `ci`: write `.github/workflows/ci.yml` running the test command on pull requests? Default `true`.
14. `docsOnProtected`: allow docs-only commits directly on the protected branch (always true for `local` mode)? Default `false`.
15. `sessionUsd`: per-session spend limit in USD under API billing, an estimate from Claude Code's list prices (`0` = off). Recommended `5`.
16. `sessionPct`: per-session limit as a percent of the 5h window for subscription use, an estimate (account-wide; `0` = no budget). Recommended `0`.
17. `statusLine` (`hosts` includes `claude`, only when `sessionUsd` > 0): `set` (show `rmt statusline`), `wrap` (keep the existing status line and add the estimate; recommended when `statusLineExisting` is set), or `skip`. Recommended `set` when none exists. A `statusLine` already in the project `.claude/settings.json` is never replaced.
## Flow
1. Run discovery.
2. Confirm the discovered values (`project`, `hosts`, `testCommand`, `mode`, `base`, `ci`) in two calls of at most 4 questions: one question per value with the discovered value as the recommended option. If `project` was not discovered, ask it as plain text first. Skip a question only when it has a single sensible answer, and list it in the summary instead. In auto mode skip this step and use the discovered values.
3. Ask the policy questions (`merge`, `coordination`, `multiRepo`, `docsOnProtected`, `reReviewer`) in two calls of at most 4 questions, defaults recommended. In auto mode skip this step and use the defaults (`multiRepo` is `false`).
4. Ask the budget questions (`sessionUsd`, `sessionPct` and, when `sessionUsd` > 0 and `hosts` includes `claude`, `statusLine`) in one call, recommended values first. Offer `set` and `wrap` for `statusLine` only when `rmtOnPath` is true; otherwise write `"statusLine":"skip"` and list the status line in the manual steps. In auto mode skip this step and use the recommended values.
5. Ask the Claude model questions in one call, then the Antigravity ones in another, skipping the host that is not in `hosts`. For Antigravity, print the full `agy models` list first, offer IDs whose effort suffix matches the tier (`*-high` for `agyHigh`, `*-medium` after `inherit` for `agyMedium`, `*-low` for `agyLow`), plus the current session model for `agyHigh` only, with no recommended option for `agyHigh` and `agyLow`, and accept any listed ID through "Other"; reject an ID that is not in the list. In auto mode skip this step: use the recommended models and the Auto mode fallbacks.
6. If the repository has commits and `base` does not exist locally or on the remote, ask whether to create it from the current branch (`git branch <base>`); if yes, create it before `rmt init`. If no, list it in the manual steps. In auto mode create it without asking.
## Steps
1. Write the answers as JSON to the scratchpad, for example:
`{"project":"...","hosts":["claude","antigravity"],"testCommand":"...","mode":"pr","base":"main","merge":"human","coordination":false,"multiRepo":false,"plannerModel":"opus","workerModel":"sonnet","lowModel":"haiku","agyHigh":"<id>","agyMedium":"inherit","agyLow":"<id>","reReviewer":false,"ci":true,"stack":"node","preTest":"","docsOnProtected":false,"sessionUsd":5,"sessionPct":0,"statusLine":"set","statusLineExisting":""}`
Omit `preTest` when there is none and `stack` when `ci` is false. `rmt init` reports an existing `STATUS_ARCHIVE.md` outside `docs/` and records its path in `state.archive`; add `"archive":"<path>"` only to override. Omit `statusLine` and `statusLineExisting` when `hosts` lacks `claude`. Omit the model keys for a host that is not selected. Add `"protected":[...]` only when discovery set it; otherwise `rmt init` derives it from `mode` and `base`.
2. Run `rmt init <file>` from the repo root. Show the user the create list, the conflicts, any settings merge and the `Duplicates of plugin pieces` list.
3. Duplicates and conflicts. Duplicates: list each one (`.claude/commands/broadcast.md`, `.claude/commands/welcome.md`, hook entries in `.claude/settings.json` whose script matches a plugin hook) and ask the user per item whether to remove it, since the plugin ships the same piece. Removing a hook edits only that hook entry in `.claude/settings.json`. In auto mode only list them in the summary.
Conflicts, integration mode: run `rmt init <file> --render <scratch dir>` to write each conflicting file's rendered template into the scratch directory (same relative paths) without touching the repo. For each file show the diff against the existing one and propose a merged version that keeps the project-specific rules and adds the rmt sections and command swaps (repo scripts replaced by their rmt equivalents). Apply a merged version only after the user approves it. In auto mode skip the questions and the edits: leave each conflict untouched and list it in the summary.
Rerun case: when `rmt init` prints `Already initialised (<config path> found).`, the repo was initialised before. Show the user the files it would create (missing ones) and the `Drift from current templates` list: existing template files whose content differs from what the current templates render with these answers. Run `rmt init <file> --render <scratch dir>` to render the drifted files, then offer the integration flow above per drifted file (diff, proposed merge, apply only after approval). Existing files are never listed as conflicts in this case and `--apply` only creates the missing ones. When it prints `Config keys missing from <config path>`, offer to add each with `rmt config set <key> <value>` (the value `rmt init` would write; for `state.archive` the archive path the repo uses). In auto mode only list the drift and the missing keys in the summary.
4. Run `rmt init <file> --apply`. When it prints `Git hook: foreign <path>: add this line: <line>`, a commit-msg hook the repo already had was left untouched: show the user the line and offer to add it to that hook. In auto mode only list it in the summary.
5. Commit the scaffold. Ask first (commit recommended, or leave uncommitted). Stage only what init wrote: the create list, `.remontoire.json`, `.gitignore`, `.claude/settings.json` when merged, and conflict files edited by hand; never `git add -A`, except for the first commit of a repository created in this run, where you show `git status` and ask whether to include the existing files (in auto mode skip this question and commit only init's files). The message is `chore: add remontoire workflow`.
- `local` mode, or a repository with no commits: commit on the current branch.
- `pr` or `gitflow` with existing commits: the guard blocks this commit on the protected base, so create `chore/remontoire-init` from `base`, commit there, and offer `rmt land` (push and open the PR).
- A remote added in this run: after the first commit, ask whether to push (`git push -u origin <base>`, recommended). Never push without asking.
- In auto mode, overriding the questions and offers above: do not ask; commit as above (only what init wrote, `chore/remontoire-init` for `pr` and `gitflow` with commits), never push and do not run `rmt land`; add `git push` and `rmt land` to the manual steps.
6. Print the manual steps:
- Enable branch protection for the base branch on GitHub. With `merge` set to `auto` it must not require approving reviews.
- Run `gh auth login` if `gh` is not authenticated.
- If using Claude Code, install the superpowers plugin if `claude plugin list` does not show it.
- If using Antigravity and `rmt` is not on PATH, run `npm install -g remontoire` (or `npm install -g github:davidsrn/remontoire`, or `npm link` from a remontoire git checkout, not from the installed plugin copy, which a reinstall replaces) so `rmt` is on your shell PATH for terminals and git `commit-msg` hooks.
- If using Codex, Cursor or Copilot CLI and `rmt` is not on PATH, run `npm install -g remontoire` (or `npm install -g github:davidsrn/remontoire`, or `npm link` from a checkout).
- If using Claude Code with `sessionUsd` > 0 and `rmtOnPath` was false: install `rmt` globally (`npm install -g remontoire`, `npm install -g github:davidsrn/remontoire`, or `npm link` in a remontoire checkout) so the status line can find `rmt`, then re-run `/workflow-init` or set `statusLine` to `{"type":"command","command":"rmt statusline"}` in `.claude/settings.json` by hand. Until then `rmt doctor` reports the budget as unmeasured.
7. Run `rmt doctor` and show the user its output. Fix any `FAIL` line before finishing. In auto mode report `FAIL` lines in the summary instead.