fix(skills): use absolute paths in start-sprint for worktree safety

The skill used bare relative paths like db/connectors/ticket which
fail when the shell CWD doesn't match the worktree root. Now requires
resolving REPO_ROOT via git rev-parse --show-toplevel first.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-11 22:11:34 +01:00
co-authored by Claude Opus 4.6
parent fcd16433c8
commit 39f85dfb3a
+24 -6
View File
@@ -14,6 +14,24 @@ allowed-tools: Bash, Read, Grep, Glob
Prepare a team branch for sprint work: sync with main, load the sprint
briefing, and present actionable next steps.
## Path resolution (CRITICAL)
This project uses **git worktrees**. Each team branch is a separate directory.
All file paths MUST be resolved from the worktree root, never guessed.
**First**, resolve the repo root and store it for all subsequent commands:
```bash
REPO_ROOT="$(git rev-parse --show-toplevel)"
```
Then use `$REPO_ROOT` as a prefix for every path in this skill:
- Ticket CLI: `"$REPO_ROOT/db/connectors/ticket"`
- Sprint briefings: `"$REPO_ROOT/docs/sprints/sprint-N/<team>.md"`
- Decision files: `"$REPO_ROOT/decisions/*.md"`
**Never use bare relative paths** like `db/connectors/ticket` — they break
when the shell's CWD doesn't match the worktree root.
## Workflow
### 1. Determine the team
@@ -38,7 +56,7 @@ If the merge has conflicts, report them and stop — do not force-resolve.
### 3. Find the active sprint
```bash
db/connectors/ticket sprint --active
"$REPO_ROOT/db/connectors/ticket" sprint --active
```
Extract the sprint ID and name from the JSON output. If no active sprint,
@@ -46,9 +64,9 @@ report that and stop.
### 4. Read the sprint briefing
Read `docs/sprints/sprint-N/<team>.md` where N is the sprint ID and team
matches the branch name. If the branch is `server` or `client`, use that
directly. For other branches, check if a matching briefing exists.
Read `$REPO_ROOT/docs/sprints/sprint-N/<team>.md` where N is the sprint ID
and team matches the branch name. If the branch is `server` or `client`, use
that directly. For other branches, check if a matching briefing exists.
Also check for a `joint.md` briefing — joint tasks involve both teams and
should be mentioned.
@@ -57,7 +75,7 @@ should be mentioned.
For each ticket listed in the briefing, run:
```bash
db/connectors/ticket show <id>
"$REPO_ROOT/db/connectors/ticket" show <id>
```
Identify which tickets are actionable now (no open blockers) vs blocked.
@@ -79,5 +97,5 @@ Output a summary:
Then mark the first actionable ticket as `in_progress`:
```bash
db/connectors/ticket status <id> in_progress
"$REPO_ROOT/db/connectors/ticket" status <id> in_progress
```