Document the worktree slug caveat for the postmortem default log dir #18

Closed
opened 2026-06-30 14:14:55 +02:00 by Brummel · 0 comments
Owner

postmortem.py resolves the default project log dir from cwd
(postmortem/scripts/postmortem.py:302-304, cwd.replace("/", "-")). A
session run inside a git worktree therefore resolves to a different slug
than the primary clone, and after exiting a worktree the default follows
the new cwd — so grading a worktree run from the primary clone silently
targets the wrong slug. postmortem/SKILL.md:78-81 documents only the cwd
default, with no worktree note.

The escape hatches already exist — --project-dir, --cwd, and --file
(which bypasses slug derivation entirely),
postmortem/scripts/postmortem.py:298-300,326-328 — they are just
undocumented for this case.

Acceptance:

  • postmortem/SKILL.md notes that the default log dir is cwd-derived
    and diverges under a worktree, and points at --project-dir /
    --file to grade a worktree run.
`postmortem.py` resolves the default project log dir from cwd (`postmortem/scripts/postmortem.py:302-304`, `cwd.replace("/", "-")`). A session run inside a git worktree therefore resolves to a different slug than the primary clone, and after exiting a worktree the default follows the new cwd — so grading a worktree run from the primary clone silently targets the wrong slug. `postmortem/SKILL.md:78-81` documents only the cwd default, with no worktree note. The escape hatches already exist — `--project-dir`, `--cwd`, and `--file` (which bypasses slug derivation entirely), `postmortem/scripts/postmortem.py:298-300,326-328` — they are just undocumented for this case. Acceptance: - [ ] `postmortem/SKILL.md` notes that the default log dir is cwd-derived and diverges under a worktree, and points at `--project-dir` / `--file` to grade a worktree run.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Brummel/Skills#18