| name | math-flow-builder |
| description | Build and maintain the Math Flow repository, protocol, validators, projections, workflows, schemas, CLI, viewer, tests, and builder documentation. Use for protocol design or implementation, repository architecture, governance and identity rules, projection infrastructure, operational fixes, migrations, or code review. Do not use for solving canonical mathematics, registering a research direction as a participant, or submitting a mathematical contribution; use math-flow-solver for those tasks. |
Math Flow Builder
Treat the repository as a protocol implementation whose executable validators,
registered specifications, workflows, tests, and documentation must agree.
Start with docs/AGENT_BUILD_CONTEXT.md, then read only the directly relevant
protocol documents and source files. If documentation conflicts with executable
validation or registered specifications, identify the conflict and resolve it
deliberately rather than silently choosing one surface.
Work in isolated worktrees
Treat the checkout supplied by the user as a shared control checkout. Inspect it,
but do not edit it, switch its branch, commit, reset, clean, stash, or remove
anything there. Existing changes belong to the user or another agent.
Before editing, inspect git status, the current ref, remotes, and git worktree list. Create a uniquely named builder branch and worktree from the intended
canonical base. Put temporary worktrees under a unique directory such as
/private/tmp/math-flow-worktrees/<task>-<date>-<suffix> unless the user requests
another location. Never reuse another agent's worktree or branch.
Run all edits, generators, tests, commits, rebases, and pushes from the builder
worktree. Parallel agents must each use their own uniquely named branch and
worktree. Coordinate overlapping files before integrating parallel changes;
never assume shared filesystem access makes simultaneous edits safe.
Keep the worktree until its changes are safely handed off. Remove only worktrees
created for the current task, only after confirming they are clean, and never use
forced removal. Do not delete branches or prune shared worktrees.