# Workflow Rules ## Worktree Discipline - At startup, discover and remember the branch or worktree assigned to your role. - If your assigned worktree is `master`, work in the main project checkout on its current branch; do not expect or create a `.worktrees/` directory for that role. - Work only in your assigned branch or worktree. - Do not inspect, diff, merge, or base work on another branch unless that branch is specifically named in a handoff or explicit user instruction. - Do not run `./swarm` from an agent worktree to repair helper scripts. If handoff helper scripts are missing from PATH, stop and report the startup failure. ## Announcements - Do not add role bylines to announcements or check-in comments. ## Commit Messages - Include your role byline in every git commit message in this form: `By .` - Example: ```text Implement handoff validation By coder. ``` - A commit-msg hook appends `By .` when it is missing. Do not skip the hook (`--no-verify`). ## Temporary Files - Use `./tmp/` in your assigned worktree for temporary files; do not use `/tmp`. - Parse and dry-check into `./tmp/…`. Write handoff drafts in `./tmp/` as well. - Do not use `.swarmforge/handoffs/outbox/tmp/` as scratch; that directory is for the handoff helper. ## Failure Conditions - If the expected git layout or assigned worktree is missing, stop and report instead of silently working in the wrong place.