Problem
Current locks are exclusive (write-only). If agent-1 claims validateToken, agent-2 can't even read it to understand the codebase. In practice, multiple agents may need to read a function for context while only one writes.
Proposal
Add read/write lock modes:
grit claim -a agent-1 -i "refactor" --mode write "src/auth.ts::login"
grit claim -a agent-2 -i "reading for context" --mode read "src/auth.ts::login"
- Multiple readers allowed simultaneously
- Writer blocks all other writers AND readers
- Reader doesn't block other readers
- Standard read-write lock semantics
Schema change
locks.mode column already exists (default 'write') but is unused.
Problem
Current locks are exclusive (write-only). If agent-1 claims
validateToken, agent-2 can't even read it to understand the codebase. In practice, multiple agents may need to read a function for context while only one writes.Proposal
Add read/write lock modes:
Schema change
locks.modecolumn already exists (default 'write') but is unused.