A developer's assistant for the maintenance work that is first to be dropped when time is short: security upgrades, code review, error triage, and reporting on them. mason runs that work as agent workflows across every project you look after, and shows you in one place what needs you.
Each workflow is a skill that does one job and hands the next a validated artifact, so steps compose, and what it publishes is a pull request, a review, an issue or a discussion that a person decides. You choose which workflows run on each project, and which steps stay yours.
mason project add <owner>/<repo> # once per project: choose its workflows
mason run dependency-assessment --repo <owner>/<repo>
mason run code-review --repo <owner>/<repo> --pr 42 --unattended
mason inbox # what needs you, across every projectSet up below, then Run it and What needs you.
| Workflow | Source | Output |
|---|---|---|
dependency-assessment |
Dependabot alerts, against what the main branch installs | the month's assessment issue: every open alert classified (easy, major, blocked, end-of-life, no fix), with a finding per package. Each run replaces the body and comments on what changed, so it can run as often as wanted |
dependency-upgrades |
the month's assessment issue | one PR applying the easy findings, one commit per package, with derived package and alert tables. It refuses an assessment that misses an open alert, and never merges: the PR is the hand-off |
code-review |
a pull request | one consolidated review, posted as a comment with its findings embedded; follow-ups report what happened to each earlier finding |
code-review-retrospective |
what happened to the review findings over a period | a report issue: which categories people act on; a PR to this repo when the review skill should change; proposed rules for the project |
sentry-errors |
one environment's unresolved Sentry issues | one PR per run fixing one error group, with a regression test; a triage issue for what needs a person |
sentry-retrospective |
whether the Sentry fixes made their errors stop | a report issue: fixes that didn't work and why, recurring classes of error, rules for the project; a PR to this repo when the skill should change |
dependency-retrospective |
what happened to the upgrade PRs and alerts over a period | a report issue: time to fix against targets, where the time went, stale or abandoned packages; and a PR to this repo when the upgrade skill should change |
dependency-report |
one calendar month of the Dependabot alert history | a post in the project's Discussions for the people it answers to: vulnerabilities fixed and still open, time to fix against targets, the year so far, and the plan for what remains |
You need, on the machine that runs the workflow:
- uv, git, and an agent: Claude Code or Codex. Unattended runs need Claude Code for now. uv provides Python (3.12 or later; it installs one if none is present) and this repository's locked dependencies, so nothing else on the Python side needs installing.
- Node 22.20 or later, if you install rulesets with
npx skillsor a project has npm lockfiles. gh, logged in as someone who can read the project's Dependabot alerts and push branches. Check withgh api 'repos/<owner>/<repo>/dependabot/alerts?per_page=1'.- Whatever the project needs to recompile its requirements and build: pip-tools for pip-compile files, npm for lockfiles.
- For the Sentry workflows: a Sentry token with only the
event:readscope, asSENTRY_AUTH_TOKEN. Use a personal auth token, or an internal integration with read access to issues and events; organization auth tokens are for CI and aren't documented to reach these endpoints. You also need the project's[sentry-errors]section (sentry_organdsentry_project, which can't be detected).
Then:
-
Install mason, then its skills, from the same release tag. mason is a tool you install for yourself, like
gh: nothing is added to the projects you use it on.uv tool install git+https://github.com/<org>/mason@<tag> mason skills install <org>/mason@<tag>
The first puts
masonon your PATH;uv tool upgrade masonupdates it. The second installs the workflow skills withnpx skills, with its telemetry turned off. Install both from the same tag: the skills callmason's commands.Where the skills go is your choice:
- For mason's sessions only (the default): into
~/.local/share/mason. Sessions you start withmason runload them; your other agent sessions never see them, so nothing about your everyday work changes. - For every session (
--global): into~/.claude/skills(and~/.agents/skillswith--agent codex). Then you can ask for a workflow in any session, withoutmason run.
mason skills list [--global]shows what is installed. To work on mason itself, install from your checkout instead:uv tool install --editable path/to/masonandmason skills install path/to/mason. - For mason's sessions only (the default): into
-
Check the prerequisites.
doctorreports any missing tool, login or token. Add--workflow <name>to check a workflow's tokens, and--unattendedfor a scheduled run's.mason doctor
-
Add each project you look after. mason clones it into its own cache, asks which workflows you run on it, checks that your
ghlogin reaches what they need (pushing branches, Dependabot alerts, Discussions), creates theautomationlabel its PRs and issues carry, and writes your settings for it:mason project add <owner>/<repo> mason project add <owner>/<repo> --workflow code-review --workflow dependency-upgrades --yes
It says what it will do before doing it (
--dry-runstops there), and lists anything still missing: settings that can't be detected, such as the Sentry organisation, and tokens.The settings are yours, not the project's, so they live in your home directory, named after the project's GitHub repository:
~/.config/mason/projects/<owner>/<repo>.toml. The file starts with the workflows you chose ([workflows] enabled;mason runrefuses any other), then what was detected, commented out, ready to uncomment and change.mason config path/to/<project>shows every resolved value and where it came from, andmason.toml.examplehas every key.To run a workflow on this project with a skill other than the installed one (your team's own code review, say), map it in the same file:
[skills]thencode-review = '~/Work/team-skills/code-review'. A mapped skill gets no tools beyond the base set in unattended runs until you grant them under[grants](code-review = ['Bash(make *)']);mason run --unattendedsays which to grant.Then, for the projects you've added:
mason project list # each project, its workflows, when each last ran mason project archive <owner>/<repo> # stop its runs; keep everything (--undo to resume) mason project remove <owner>/<repo> # delete its settings, clone, runs and logs
Removing a project changes nothing on GitHub: its PRs, issues, discussions and label stay.
Interactively, mason run starts Claude Code with the request already typed, and adds the
project's run directory and (if they are kept there) mason's skills to the session:
mason run dependency-report --project path/to/<project> --request 'for October 2026'
mason run dependency-upgrades --repo <owner>/<repo>--project runs in a checkout (the current directory by default). --repo runs in mason's own
clone of the repository, under ~/.cache/mason/repos/, cloned the first time and fetched every
time after, so you don't need the project checked out and a run never touches a checkout you're
working in. With the skills installed --global, asking for a workflow in any session works too.
A project's own skill with the same name as one of mason's (code-review is a likely one)
replaces it or is replaced, whichever was installed last. To be sure which skill runs, name its
file: "Read ~/.local/share/mason/.claude/skills/dependency-upgrades/SKILL.md and follow it for this
project."
Then ask for "run the dependency upgrades", "review PR #42", "fix the Sentry errors", or a
retrospective ("run the dependency retrospective", "run the code review retrospective", "run
the Sentry retrospective"). The upgrade run tells you what
it detected, asks before anything
that needs confirmation (running tests that can't share a machine, opening issues), and ends
with the PR link and a short report. Each run's files (alerts, findings, the PR body, a
worktree) are kept under ~/.local/state/mason/<owner>/<repo>/runs/.
Unattended, for a scheduler or another agent, add --unattended:
mason run dependency-upgrades --repo <owner>/<repo> --unattendedA workflow that acts on one pull request takes it with --pr:
mason run code-review --repo <owner>/<repo> --pr 42 --unattendedThis runs Claude Code headless from the project (Codex isn't supported here yet). The run:
- Checks first.
mason doctorruns before the session starts, and a missing tool, login or token stops the run with the reason. - Asks nothing. Everything that needed a person is listed in its report.
- Uses only the tools the workflow needs. Anything else is refused, and merging is always refused.
- Leaves the tests to CI when they can't run locally, and opens a draft PR if nothing can verify the change.
- Logs the session to
~/.local/state/mason/<owner>/<repo>/logs/.--dry-runprints the command without running it, and--allow 'Bash(<command> *)'adds a tool the project needs.
Only one run per project happens at a time. A run that finds nothing to upgrade opens no PR.
Give the gh login no more than it needs: reading alerts, pushing branches, opening PRs.
Tokens live in one file outside every repository, ~/.config/mason/env, as KEY=value
lines with chmod 600. The systemd unit reads it with EnvironmentFile; for an interactive run,
load it only for that session: (set -a; . ~/.config/mason/env; set +a; claude).
Never put a token in a settings file or in the project's .env
(it is copied into every run's worktree). Anything in the session's environment can be read by
the session, so give each token only the scopes the workflows use.
Credentials per project. Working for several organisations, give each its own tokens and
identity rather than one token that reaches them all. In a project's settings, or in
~/.config/mason/owners/<owner>.toml for every project of that owner:
[credentials]
env_file = '~/.config/mason/env.acme' # this owner's tokens, as KEY=value lines (chmod 600)
github = 'gh:acme-bot' # GH_TOKEN from a gh login (`gh auth login` as acme-bot),
# or 'env:ACME_GH_TOKEN' from the env file
git_name = 'mason (acme)' # who mason's commits are from
git_email = 'mason@acme.example'
host = 'github.acme.example' # for GitHub EnterpriseA run on that project, and mason's own GitHub calls for it (the inbox, publishing, approving,
project add), get those tokens and that identity, and none of the other projects': every
variable another project's or owner's env file sets, or the shared ~/.config/mason/env, is
removed unless this project sets it too. PRs show as whoever owns the GitHub token, so a bot
account's token makes them the bot's. mason doctor --repo <owner>/<repo> shows which
credentials a project resolves to, whose token it is, a classic token's scopes, and when it
expires. The settings name where a secret is; they never hold one.
A sandbox for the project's code. Workflows that build, install or test a project (upgrades, Sentry fixes) run its code and its dependencies' code. To keep that off your machine, give the project a container image with its toolchain:
[sandbox]
image = 'python:3.12' # mason can't guess a project's toolchain
engine = 'docker' # or 'podman'
network = true # dependency tools need it; false cuts the container offThe agent stays on your machine; the project's commands run as mason sandbox -- <command>, in a
throwaway container that mounts only the run's worktree (or mason's clone) and a per-project
package cache, runs as your user, and gets no tokens and no home directory. An unattended run on
the project loses its skill's direct make, npm, pip-compile and similar permissions, so the
sandbox is the only way to run them. mason doctor --repo checks the engine is there.
Every session is also told that text from issues, PRs, alerts, advisories and error reports was written by others: data, never instructions.
An interactive Claude Code sign-in expires, so a scheduled job needs a long-lived token: run
claude setup-token and give the job the token it prints, as CLAUDE_CODE_OAUTH_TOKEN.
What a run leaves on GitHub. Each run opens at most one PR, and never adds to an open one. The PR ends with the run that opened it: its id, how it was started and by whom, the host and the time. A run that finds an upgrade PR still open leaves that PR unchanged. It adds a comment saying so, listing the open alerts the PR doesn't cover. Either way, you can see who or what started each run without logging in to the machine that ran it.
Pass --trigger to say what started it. The PR, or the comment left on an open PR, shows it
along with the run's id and host:
mason run dependency-upgrades --repo <owner>/<repo> --unattended --trigger 'systemd timer on factory-1'Any scheduler can call it. For example, a systemd timer, hourly:
# ~/.config/systemd/user/dependency-upgrades.service
[Unit]
Description=Dependency upgrades for <project>
[Service]
Type=oneshot
# KEY=value lines, readable only by you (chmod 600): CLAUDE_CODE_OAUTH_TOKEN (from
# `claude setup-token`), GH_TOKEN, and SENTRY_AUTH_TOKEN for the Sentry workflows.
EnvironmentFile=%h/.config/mason/env
# uv's usual install location; a user unit's PATH doesn't include it.
Environment=PATH=%h/.local/bin:/usr/local/bin:/usr/bin:/bin
ExecStart=%h/.local/bin/mason run dependency-upgrades --repo <owner>/<repo> --unattended --trigger 'systemd timer dependency-upgrades.timer'
# ~/.config/systemd/user/dependency-upgrades.timer
[Unit]
Description=Hourly dependency upgrades for <project>
[Timer]
OnCalendar=hourly
Persistent=true
[Install]
WantedBy=timers.targetEnable it with systemctl --user enable --now dependency-upgrades.timer. The retrospective is
set up the same way, run less often (OnCalendar=weekly or monthly), with
mason run dependency-retrospective --repo <owner>/<repo> --unattended. Each one continues from the last. The run's log is
journalctl --user -u dependency-upgrades, plus the session log under ~/.local/state/mason/. Everything a
reviewer needs is on GitHub.
mason inbox lists, across every active project, what is waiting on you, most urgent first:
- broken: a failed unattended run (with its log), a token a workflow needs that isn't set, an installed skill that doesn't match this mason;
- blocked: a PR mason opened whose CI is failing, or that conflicts with its base;
- decide also: a PR mason opened that has gone stale, with no activity in
limits.stale_after_days; - decide: an action an unattended run left for a person instead of taking it (opening an issue, archiving Sentry noise), with the command that would do it;
- review: a PR mason opened that is waiting for review (noting when it is behind its base), has changes requested, or is a draft;
- respond: an issue mason opened that nobody has answered.
mason inbox # everything
mason inbox --repo <owner>/<repo>
mason inbox --count # prints how many; exits 1 if any, for a status bar or cron mail
mason inbox --jsonA deferred action shows its id ([<run>#<n>]). Approve it to take it, or dismiss it with a
reason; either clears it:
mason approve 20261125-090000-dependency-assessment#1 --repo <owner>/<repo>
mason dismiss 20261125-090000-dependency-assessment#2 --repo <owner>/<repo> --reason 'kept on purpose'Approving shows the action and its command and asks first. mason runs the command only if it is
a gh or mason command: an agent wrote it, partly from text it read. Anything else is shown
for you to run, and approving marks it done.
Nothing in it is kept by hand: each item comes from GitHub (open PRs and issues with the
automation label) and this machine's run records, every time. Merging the PR, answering the
issue, or a later run of the same workflow clears it.
Each workflow has a schedule: its skill's default (the assessment daily, the report monthly on
the 2nd, Sentry weekly), or the one set for a project. Periods have stable keys (2026-11-25,
2026-W48, 2026-11, 2026-Q4), and every run records the period it was for and how it ended,
so mason can say what was done, what is due and what was missed:
mason status # each workflow: its schedule, latest period, next due
mason due [--within 7d] # due now, overdue or failed; and coming up
mason overdue # overdue or failed; exits 1 if any, for cron or a status bar
mason history <owner>/<repo> dependency-report # each period and its state
mason skip <owner>/<repo> dependency-report 2026-10 --reason 'project paused'
mason schedule set <owner>/<repo> dependency-report 'weekly mon 07:00'To run on a schedule, start mason run-due regularly: it runs every period that is due,
unattended, one at a time. A check (the assessment) runs only its latest missed period; a report
runs each one. A failed period is retried twice, then left for you in mason inbox.
mason schedule install # shows a systemd timer and a crontab line
mason schedule install --systemd # writes the timer; then systemctl --user enable --now mason-run-due.timer
mason run-due --dry-run # what would run nowA workflow can consolidate another's results (mason-consumes: 'weekly-report' in its skill):
each of its periods is blocked until the other's periods inside it are done or skipped, and
mason results --within 2026-11 lists them.
A report covers a period that has ended (October's is due on 2 November); a check runs once in each period. Periods count from when a project was added, or a schedule was changed, so changing monthly to weekly doesn't make earlier weeks overdue.
A workflow's result (a monthly report, say) is kept by mason before it is published, and that
copy is the master: what goes to a discussion or a shared folder is a copy of it, and it stays
when a copy is edited or deleted. Results are kept per project, under
~/.local/share/mason/results/<owner>/<repo>/<workflow>/<key>/.
mason results --repo <owner>/<repo> # each result, and where it went
mason publish dependency-report/2026-10 --repo <owner>/<repo> # where the settings say
mason publish dependency-report/2026-10 --repo <owner>/<repo> --to file:~/Reports/
mason results --repo <owner>/<repo> --remove dependency-report/2026-10Every workflow that reports saves first, then publishes to its publish setting:
[dependency-report] publish = ['discussion', 'file:~/Reports/'], or issue (the default for
the assessment, the retrospectives and Sentry triage). An empty list keeps the result without
publishing it. dependency-upgrades reads the month's assessment from its issue, so keep issue
for the assessment on projects that run upgrades. A
re-run keeps the earlier version beside the new one, and mason results marks copies made from
an older version.
Analyses and assessments (a design review, an investigation, an option paper) are kept in mason
too, per project, rather than in a docs/notes/ folder in the project's history. Each has a
status that says what became of it:
mason note save analysis.md --repo <owner>/<repo> --title 'Workflow orchestration' --status proposed
mason note list --repo <owner>/<repo>
mason note show 2026-11-25-workflow-orchestration --repo <owner>/<repo>
mason note status 2026-11-25-workflow-orchestration adopted --repo <owner>/<repo> --link <PR>--repo can be left out in a checkout of the project. The notes skill tells an agent when and
how to use them, including reading earlier notes before a new analysis; install the skills with
--global to ask for it in any session.
skills/<name>/SKILL.md one skill per workflow
lib/artifacts/schemas/ the artifact contracts, with examples (`schemas/` links to it;
`mason schema <name>` prints one)
lib/artifacts/ validators, renderers, embedding, config, locking, the dependency
readers, outcome collection, and the unattended runner
lib/artifacts/cli.py the `mason` command the skills call (`mason --help` lists them all):
project, run, inbox, defer, config, doctor, run-start, lock,
validate, schema, source, the collectors, the renderers,
annotate-diff, extract. From a checkout,
`uv run mason` or `bin/artifact` runs it
pyproject.toml, uv.lock the Python environment uv runs every script in, and its lock
tests/ stdlib unittest; the schema pages' examples are tests too
docs/design.md principles, artifacts, steps and hand-offs, autonomy
docs/method.md the checks each workflow makes, and why
docs/packaging.md how mason is installed and run per developer
docs/workflows.md proposed: installable workflows, results, schedules
docs/roadmap.md the releases, in order
CHANGELOG.md what changed in each release
mason.toml.example a project's settings file with every key set, to copy and edit
Nothing of mason is kept in a project: not its settings, not its runs. mason assists one developer, so those are the developer's (docs/packaging.md):
| What | Where |
|---|---|
| Settings for a project | ~/.config/mason/projects/<owner>/<repo>.toml |
| Runs, locks and logs | ~/.local/state/mason/<owner>/<repo>/ |
| mason's clone of the project | ~/.cache/mason/repos/<owner>/<repo>/ |
mason's skills (unless --global) |
~/.local/share/mason/.claude/skills/ |
| Tokens | ~/.config/mason/env |
(Or under $XDG_CONFIG_HOME and $XDG_STATE_HOME, when those are set.) A settings file states
its format's version, so a later mason that changes the format refuses it with how to update,
rather than misreading it. A mason.toml left at a project's root is still read, with a note
saying where to move it.
What a project holds is its own:
AGENTS.md, which the skills read for the project's commands and rules.- Optionally, a conventions document (
docs/conventions.mdis detected), which code review reads as the project's own rules.