Metagit Development Guide#
Upon making changes run the following to validate everything before submitting a PR
task format lint:fix test
MCP Development Notes#
- Use
metagit mcp serveto start the MCP stdio runtime. - Use
--root <path>to test workspace gating against a specific folder. - Use
--status-oncefor quick diagnostics without starting the message loop. - MCP gating states:
inactive_missing_configwhen.metagit.ymlis not presentinactive_invalid_configwhen.metagit.ymlfails validationactivewhen.metagit.ymlloads successfully
Provider Source Sync#
Use source sync to discover repositories from GitHub/GitLab and plan/apply workspace updates:
- Discover-only:
metagit project source sync --provider github --org <org> --mode discover - Additive apply:
metagit project source sync --provider github --org <org> --mode additive --apply - Reconcile apply:
metagit project source sync --provider gitlab --group <group> --mode reconcile --apply --yes
Semantic Release Tags#
release-please runs on merges to main and uses conventional commit prefixes to prepare/version releases.
- It opens/updates a release PR with computed next version + changelog.
-
When that PR is merged, it creates the semantic tag (
vX.Y.Z) and GitHub release. -
fix:-> patch release (X.Y.Z+1) default for most updates feat:-> minor release (X.Y+1.0)type(scope)!:orBREAKING CHANGE:-> major release (X+1.0.0)
Commit Prefix Guidance#
Use patch semantics first (fix:) unless schema/config compatibility is intentionally broken.
- Use
fix:for normal maintenance and safe behavior changes. - Use
feat:only for additive, backward-compatible functionality. - Use
!/BREAKING CHANGEwhen changing.metagit.ymlor app config schema in a non-backward-compatible way.