Skip to content

docs(global-rules): make canonical worktree path <repo-name>/<worktree-name>#13

Open
andrei-hasna wants to merge 1 commit into
mainfrom
fix/worktree-path-convention
Open

docs(global-rules): make canonical worktree path <repo-name>/<worktree-name>#13
andrei-hasna wants to merge 1 commit into
mainfrom
fix/worktree-path-convention

Conversation

@andrei-hasna

Copy link
Copy Markdown
Contributor

What

Rule 8 (CODE AND LANDING RULES) and its mirrored entries in the global-agent prompt (line 150) and the Antigravity overlay (line 329) documented only the worktree root $HOME/.hasna/repos/worktrees. That under-specification let agents place worktrees flat (.../worktrees/<name>) or under a <station-id> segment (.../worktrees/station01/<repo>/<name>).

This change spells out the canonical two-segment path:
$HOME/.hasna/repos/worktrees/<repo-name>/<worktree-name>
(e.g. .../worktrees/codewith/pr307-attestation), explicitly forbids the station-id and flat variants, and tells agents to run repos scan after a manual git worktree add.

Why

Read-only drift audit on station01 (2026-07-20): of 362 worktree markers under ~/.hasna/repos/worktrees, only 91 followed <repo>/<worktree>; 40 were flat and ~201 were station-prefixed. The rule text was the root cause of the ambiguity.

Source-of-truth alignment

  • Knowledge convention k_mrj32xhu_efxkxl ("Git worktree location convention") already specifies <repo-name>/<worktree-name> and was reaffirmed 2026-07-20 (station-id layout retired).
  • @hasna/repos enforcement gap (no worktree-create/validate command) tracked as open-repos task 10a0f26e.

Verification

  • bun test src/index.test.ts -> 38 pass / 0 fail (assertions at lines 871-872 still hold; change is string-literal-only).
  • Staged-diff secrets scan: clean.

Rollout note (needs maintainer)

This is a fleet-wide agent-rule change. After merge it must be published (@hasna/identities) and rolled out via instructions/configs so all machines re-render CLAUDE.md/AGENTS.md. A [POLICY] announcements heads-up should precede that rollout. Do not auto-merge without that coordination.

…e-name>

Rule 8 (and the mirrored global-prompt and Antigravity-overlay entries)
documented only the worktree ROOT $HOME/.hasna/repos/worktrees, so agents
placed worktrees flat or under a <station-id> segment. Spell out the
canonical two-segment path $HOME/.hasna/repos/worktrees/<repo-name>/<worktree-name>,
forbid the station-id and flat variants, and point to 'repos scan'.

Matches knowledge convention k_mrj32xhu_efxkxl (reaffirmed 2026-07-20 after
a station01 drift audit: 40 flat + ~201 station-prefixed of 362 worktrees).
The @hasna/repos enforcement gap is tracked as open-repos task 10a0f26e.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant