foreman
A Claude Code plugin for running a software project with one owner and many agent
sessions. It gives a project:
- Plans and tasks under fixed conventions. Each track of work has a plan file; each
task has a task file. Every session can start from these files alone.
- Parallel sessions. One coordinator session per track, one developer session per
task, a read-only reviewer pass per pull request, and a thin program session that
ties the tracks together.
- A control room. One private page for the owner, made from the files. It shows
what waits for the owner, the lanes and tasks, findings and records, and takes the
owner's decisions.
This file is the one place where the conventions are written. Skills and agents link
here instead of repeating them.
Install
On your machine
Add this repository as a plugin marketplace, then install the plugin. From a shell:
claude plugin marketplace add pdhoolia/foreman
claude plugin install foreman@foreman
Inside a Claude Code session, the same two steps are
/plugin marketplace add pdhoolia/foreman and /plugin install foreman@foreman.
From a local checkout instead: claude plugin marketplace add ./path/to/foreman, then
the same install line. To try it for one session without installing:
claude --plugin-dir ./path/to/foreman.
The skills are then named /foreman:<skill>, for example /foreman:pm-start.
For the team
Commit these two keys in the project's .claude/settings.json. Claude Code then offers
the plugin to everyone who opens the project and trusts the folder. ref pins the
marketplace to a branch or tag; the plugin has no release tag yet, so it is main.
{
"extraKnownMarketplaces": {
"foreman": {"source": {"source": "github", "repo": "pdhoolia/foreman", "ref": "main"}}
},
"enabledPlugins": {"foreman@foreman": true}
}
In a cloud session
A cloud session (Claude Code on the web) does not load a plugin that only the
repository's settings enable. Install it at user scope in the cloud environment's setup
script, which runs before the session starts. A setup script that fails stops the
session from starting, so each line ends with || true:
claude plugin marketplace add pdhoolia/foreman || true
claude plugin install foreman@foreman --scope user || true
Where the installed plugin lives
Inside a session, hooks and skills name the plugin's folder ${CLAUDE_PLUGIN_ROOT}.
Outside a session that variable is not set: the installed copy is at
~/.claude/plugins/cache/foreman/foreman/<version>/ (<version> is the version in
.claude-plugin/plugin.json, for example 0.1.0). The steps below call that folder
<plugin>.
Set up a project
-
Add foreman.json at the project's root (shape below).
-
Copy the templates you need from <plugin>/templates/: program.md and sdlc.md to
docs/, plan.md and task.md to docs/tracks/_templates/, record.md to
docs/inputs/_template/.
-
Write the first track plan at docs/tracks/<slug>/plan.md.
-
Make the first control room files. From the project's root, inside or outside a
session:
bash <plugin>/scripts/control-room-refresh.sh \
"$(git rev-parse --path-format=absolute --git-common-dir)/foreman/control-room" --all
--all is for the first publish only. Every later refresh merges into the published
page, so it first needs the published state.json saved as live-state.json in that
folder; without it the script stops with "save the published state.json ... first".
Saving it and publishing both use Claude's Artifact tool, so they happen inside a
session (the refresh skill does both). See "The control room".
The tools need python3, git and gh (signed in to the project's GitHub account).
They call GitHub's REST API through gh api (scripts/open-prs.sh), which works where
gh's GraphQL calls such as gh pr list are refused. Without gh, a refresh still runs
and warns that it has no pull request list.
The page's tests also use node when it is installed.
foreman.json
{
"title": "Pantry Notes Control Room",
"control_room_url": "<the control room's link, after the first publish>",
"checks": "scripts/local-checks.sh",
"jargon": ["upsert", "idempotent"],
"branch_prefixes": ["bot"],
"commit_authors": ["Alice <[email protected]>"],
"tracks": [
{"slug": "bench", "lanes": [
{"key": "A", "name": "search bench", "work": "score search ideas offline",
"where": "local", "model": "the model and effort this lane runs on"}
]}
],
"lanes": [
{"key": "PM", "name": "program", "work": "ties the tracks together"}
]
}