Agent guide v6 - warn against lane-glob moves
A real agent incident (2026-07-29): moving cards with mv <lane>/* swept the lane's own index.md along with the card folders, overwriting the destination lane's identity file and leaving the source lane index-less (the Implementation board briefly lost its lane titles; restored from its auto-commit history). Both guide generations taught the correct named-folder form but never said why it is load-bearing. v6 adds the one-folder-at-a-time bullet to Moving and reordering: a lane folder holds its own index.md beside its cards, so a glob sweeps the identity file with them. Boards heal to v6 on their next open per the first-line marker rule. The guide tests now derive their expected marker and current/newer versions from AgentGuide.version instead of a hardcoded literal, so the next bump cannot silently break them. 1669 green on both schemes. Claude-Session: https://claude.ai/code/session_01SR4XGjmBE16ZUYWpfFHXwY
This commit is contained in:
@@ -44,8 +44,11 @@ enum AgentGuide {
|
||||
|
||||
/// The guide the app ships. **v4 was the pathfinder's**, and real boards carry it; v5 is the
|
||||
/// rewrite's guide (lanes, `.trash/`, `attachments/`, `modified-by`, the `CLAUDE.user.md`
|
||||
/// pointer) and supersedes it on the next open.
|
||||
static let version = 5
|
||||
/// pointer) and supersedes it on the next open. v6 adds the one-folder-at-a-time move warning:
|
||||
/// a real agent incident (2026-07-29) showed `mv <lane>/*` sweeping the lane's own `index.md`
|
||||
/// along with the cards and destroying the destination lane's identity — the guide now says
|
||||
/// *why* the named-folder form is load-bearing, not just what to type.
|
||||
static let version = 6
|
||||
|
||||
// MARK: - The version marker
|
||||
|
||||
@@ -327,6 +330,10 @@ enum AgentGuide {
|
||||
- Move to another lane: `mv <laneA>/<card-uuid> <laneB>/` — the folder move
|
||||
IS the move. Then set the card's `order` to place it among the
|
||||
destination's cards, update `modified`, and re-stamp `modified-by`.
|
||||
- Move folders **one at a time, by name** — never `mv <laneA>/* <laneB>/`.
|
||||
A lane folder holds its own `index.md` beside its cards, so a glob
|
||||
sweeps the lane's identity file along with them and overwrites the
|
||||
destination lane's.
|
||||
- Reorder within a lane: rewrite only that card's `order`.
|
||||
|
||||
## Editing and deleting
|
||||
|
||||
Reference in New Issue
Block a user