- Check
/agents/active/- see who's working - Create your file:
/agents/active/{agent-id}-{timestamp}.md - Follow 7 phases: START → PLAN → RESERVE → IMPLEMENT → TEST → CLEANUP → HANDOFF
RESERVED- File is claimed, don't touchIN_PROGRESS- Currently being modifiedCOMPLETE- Finished modifyingRELEASED- Available for others
# Check active agents
ls agents/active/
# See what files are reserved
grep -r "RESERVED\|IN_PROGRESS" agents/active/
# Check for conflicts before starting
grep -r "path/to/myfile.ts" agents/active/ls agents/active/- Check active sessions- Look for file conflicts in active sessions
- Create your session file first
- Reserve files before touching them
# Agent Session Record
## Metadata
- **Agent**: [YOUR_AGENT_NAME]
- **Session Start**: [TIMESTAMP]
- **Status**: STARTING
- **Goal**: [WHAT_YOU_WANT_TO_DO]
## Planning Phase
- **Problem Analysis**: [WHAT_NEEDS_TO_BE_DONE]
- **Approach**: [HOW_YOU_PLAN_TO_SOLVE_IT]
- **Estimated Duration**: [TIME_ESTIMATE]
## File Reservations
- `path/to/file.ts` - RESERVED
## Implementation Log
- [TIME] Started work...
## Results
[TO_BE_FILLED]STARTING → PLANNING → RESERVED → IMPLEMENTING → TESTING → COMPLETE
- Reserved files: Release within 1 hour
- In-progress work: Complete within 2 hours
- Long tasks: Break into smaller chunks
Only if agent inactive >2 hours:
- Create entry in
/agents/conflicts/ - Explain override reason
- Proceed carefully
- Identity:
export AGENT="Your Name"(orAGENT_NAME) - Reserve:
AGENT=Codex tools/agent-lock.sh reserve path/to/file --ttl 3600 - Check:
AGENT=Claude tools/agent-lock.sh check path/to/file(nonzero if blocked) - Release:
AGENT=Codex tools/agent-lock.sh release path/to/file - List locks:
tools/agent-lock.sh list - Prune expired:
tools/agent-prune-locks.sh - Session status:
agents/status.sh set-status agents/active/<session>.md IMPLEMENTING - Append log:
agents/status.sh log agents/active/<session>.md "Short note" - Pre-commit guard:
./tools/install-git-hook.sh(blocks commits touching locked files)
- Force release:
tools/agent-lock.sh force-release <file> --by "Your Name" --reason "why" - Force reserve:
tools/agent-lock.sh force-reserve <file> --by "Your Name" --reason "why" [--ttl 3600] [--status RESERVED] - Bypass commit block:
AGENT_OVERRIDE=1 OVERRIDE_REASON="why" git commit -m "..."(logged toagents/conflicts/overrides-YYYY-MM-DD.md)