ADR-0020: Configurable work item ID strategies for multi-person collaboration
Status: accepted | Date: 2026-01-26
References: RFC-0000
Context
The current work item ID format (WI-YYYY-MM-DD-NNN) uses local sequential numbering. The govctl work new command scans gov/work/ to find the max sequence number for today’s date, then increments by 1.
Problem: When multiple people work on parallel branches and both create work items on the same day, they get the same ID:
Alice: scans → max=002 → creates WI-2026-01-26-003
Bob: scans → max=002 → creates WI-2026-01-26-003 (collision!)
On merge, these IDs collide. This blocks multi-person teams from adopting govctl.
Options considered:
| Strategy | Format | Pros | Cons |
|---|---|---|---|
| Author namespace | WI-2026-01-26-alice-001 | Clear ownership, sequential per author | Requires config |
| Git identity hash | WI-2026-01-26-a7f3-001 | Auto from git email, no config | Less readable |
| Random suffix | WI-2026-01-26-a7f3 | Simple, no coordination | Non-sequential |
| Timestamp | WI-2026-01-26-143257 | Natural ordering | Clock skew issues |
| Merge-time renumber | Keep current | Minimal change | Breaks refs on rename |
govctl is primarily single-contributor but must support multi-person teams as external adopters.
Decision
Add opt-in ID strategies via gov/config.toml, keeping current behavior as default.
-
Default:
sequential(current behavior)- Format:
WI-YYYY-MM-DD-NNN - Solo projects keep simple, readable IDs
- No breaking change for existing users
- Format:
-
Opt-in:
author-hash(recommended for teams)- Format:
WI-YYYY-MM-DD-{hash4}-NNN {hash4}= first 4 chars ofsha256(git config user.email)- Example:
WI-2026-01-26-a7f3-001 - Each contributor gets their own sequence namespace
- Zero configuration (auto-derived from git identity)
- Format:
-
Opt-in:
random(simple uniqueness)- Format:
WI-YYYY-MM-DD-{rand4} {rand4}= 4 random hex chars (65,536 possibilities per day)- Example:
WI-2026-01-26-b2c9 - No sequence number, just unique suffix
- Format:
Configuration:
# gov/config.toml
[work_item]
id_strategy = "author-hash" # or "sequential" (default), "random"
Rationale:
- Backward compatible: default remains
sequential - Teams explicitly opt-in to collision-safe strategy
author-hashis recommended because it preserves sequential numbering within author namespace- Uses git identity (already required for commits) — zero additional config
Consequences
Positive:
- Multi-person teams can adopt govctl without ID collision risk
- Existing single-contributor projects unchanged
author-hashprovides both collision safety AND sequential ordering- Zero configuration for author-hash (uses git email)
Negative:
- New ID formats (
WI-...-a7f3-001) are less human-memorable - Cannot easily tell “who created this” without looking up the hash
- Projects must explicitly configure for team use
Implementation:
- Add
id_strategytoConfigstruct - Modify
src/cmd/new.rs::create_work_item()to dispatch based on strategy - Add validation that all work items follow configured strategy
- Update
gov/schema/SCHEMA.mdto document new formats
Migration for teams:
- Set
[work_item] id_strategy = "author-hash"ingov/config.toml - Existing work items retain their IDs (no renaming required)
- New work items use the new format