feat(handoff): name the handoff file and report its path #39

Merged
jercik merged 1 commit from align/handoff into main 2026-08-06 10:50:21 +00:00
Owner

Without a filename convention or a reported path, the next session had to hunt for the doc.

Without a filename convention or a reported path, the next session had to hunt for the doc.
feat(handoff): name the handoff file and report its path
Some checks failed
Node tests / node:test (pull_request) Successful in 34s
commit-msg / commitlint (pull_request) Successful in 42s
PR Review / Prepare immutable review tools (pull_request_target) Successful in 1m42s
PR Review / forgejo-review-approach-smart-2 generator (pull_request_target) Failing after 2m11s
PR Review / forgejo-review-code-smart-2 generator (pull_request_target) Failing after 2m11s
PR Review / forgejo-review-approach-3 generator (pull_request_target) Failing after 2m47s
PR Review / forgejo-review-approach-smart-1 generator (pull_request_target) Successful in 3m23s
PR Review / forgejo-review-code-smart-1 generator (pull_request_target) Successful in 4m28s
PR Review / Dispatch and observe exact review writers (pull_request_target) Failing after 4m50s
7892ee294e
forgejo-actions left a comment

Approach review: Sound change. Naming the artifact and reporting its absolute path is the right fix for "the next session had to hunt for the doc", and it is done in the skill prose rather than by adding a script or supporting file — the minimal place for it. The description rewrite matches the routing shape the repo's own ai-facing-writing-style guide prescribes for a model-invoked skill (lead with what it does, then when to use it, then literal triggers), and the skill has no disable-model-invocation, so that expansion is the correct form here.

One alternative worth taking: skills/improve-codebase-architecture/SKILL.md already spells out this exact "write an artifact to the OS temp dir and tell the user the absolute path" instruction, and it resolves the directory in a way that also covers Windows and uses a timestamp so repeat runs do not collide. Reusing that wording keeps the two skills consistent and avoids narrowing this one to POSIX shells. Details in the inline comment.

Approach review by Claude Code Opus (opus)

**Approach review:** Sound change. Naming the artifact and reporting its absolute path is the right fix for "the next session had to hunt for the doc", and it is done in the skill prose rather than by adding a script or supporting file — the minimal place for it. The description rewrite matches the routing shape the repo's own `ai-facing-writing-style` guide prescribes for a model-invoked skill (lead with what it does, then when to use it, then literal triggers), and the skill has no `disable-model-invocation`, so that expansion is the correct form here. One alternative worth taking: `skills/improve-codebase-architecture/SKILL.md` already spells out this exact "write an artifact to the OS temp dir and tell the user the absolute path" instruction, and it resolves the directory in a way that also covers Windows and uses a timestamp so repeat runs do not collide. Reusing that wording keeps the two skills consistent and avoids narrowing this one to POSIX shells. Details in the inline comment. _Approach review by Claude Code Opus (opus)_ <!-- axrecipe-review:v1:eyJzY2hlbWFWZXJzaW9uIjoxLCJzdGF0ZSI6InB1Ymxpc2hlZCIsInJlcG9zaXRvcnkiOiJqNGstb3NzL2FnZW50LXNraWxscyIsIm51bWJlciI6IjM5IiwiaGVhZFNoYSI6Ijc4OTJlZTI5NGUxMTFjOGNlZWYyYTBjMDFkNDgzZjFhZTVmOGRlZWEiLCJzbG90IjoiZm9yZ2Vqby1yZXZpZXctYXBwcm9hY2gtc21hcnQtMSIsInNvdXJjZVdvcmtmbG93UnVuSWQiOiIxNzM4NiIsInNvdXJjZUdlbmVyYXRvckF0dGVtcHQiOiIxIiwicmVzdWx0SWQiOiJkMzI2MmM2Zi01MzRjLTQyYmUtODNiMi1mODVkODg0OGEyNWUifQ== -->
@ -5,3 +5,3 @@
---
Write a handoff document summarising the current conversation so a fresh agent can continue the work. Save to the temporary directory of the user's OS - not the current workspace.
Write a handoff document summarising the current conversation so a fresh agent can continue the work. Save it as `handoff-<topic-slug>-<YYYY-MM-DD>.md` under `${TMPDIR:-/tmp}` — not the current workspace — and end by reporting the written file's absolute path to the user.

This repeats an instruction the repo already standardises elsewhere, but in a narrower form. skills/improve-codebase-architecture/SKILL.md:49 says:

Resolve the temp dir from $TMPDIR, falling back to /tmp (or %TEMP% on Windows), and write to <tmpdir>/architecture-review-<timestamp>.html so each run gets a fresh file. Open it for the user … and tell them the absolute path.

Two things that phrasing gets that ${TMPDIR:-/tmp} does not:

  • Platform coverage. The pre-change text ("the temporary directory of the user's OS") was platform-agnostic; ${TMPDIR:-/tmp} is a POSIX shell expansion an agent on Windows cannot resolve. Naming %TEMP% as the sibling skill does keeps the new precision without losing that.
  • Collision. A date-only slug means a second handoff on the same topic the same day silently overwrites the first — exactly the artifact someone is most likely to still want. A timestamp (or a -2 suffix rule) gives each run a fresh file, which is why the sibling skill spells that reason out.

Adopting the existing wording verbatim also means the two skills stay aligned when the convention next changes.

This repeats an instruction the repo already standardises elsewhere, but in a narrower form. `skills/improve-codebase-architecture/SKILL.md:49` says: > Resolve the temp dir from `$TMPDIR`, falling back to `/tmp` (or `%TEMP%` on Windows), and write to `<tmpdir>/architecture-review-<timestamp>.html` so each run gets a fresh file. Open it for the user … and tell them the absolute path. Two things that phrasing gets that `${TMPDIR:-/tmp}` does not: - **Platform coverage.** The pre-change text ("the temporary directory of the user's OS") was platform-agnostic; `${TMPDIR:-/tmp}` is a POSIX shell expansion an agent on Windows cannot resolve. Naming `%TEMP%` as the sibling skill does keeps the new precision without losing that. - **Collision.** A date-only slug means a second handoff on the same topic the same day silently overwrites the first — exactly the artifact someone is most likely to still want. A timestamp (or a `-2` suffix rule) gives each run a fresh file, which is why the sibling skill spells that reason out. Adopting the existing wording verbatim also means the two skills stay aligned when the convention next changes.
Author
Owner

Declining per the deliberate shape of this change. The filename convention handoff-<topic-slug>-<YYYY-MM-DD>.md and the report-absolute-path instruction are the two agreed substantive additions here — the date-only name is the agreed convention: the topic slug carries the discrimination, and a same-day rerun on the same topic overwriting the earlier snapshot is fine, since the handoff captures the session's current state and the fresher document is the one the next agent should read. On ${TMPDIR:-/tmp}: deliberately terse and unexplained — the reading agent knows the idiom and maps the intent to its platform's temp directory. Borrowing the sibling skill's longer wording verbatim would inflate a skill that deliberately stays ~15 lines; cross-skill consistency is governed by the ai-facing-writing-style guide rather than by copying prose between skills.

<!-- gh-feedback:reply-to:42947 --> Declining per the deliberate shape of this change. The filename convention `handoff-<topic-slug>-<YYYY-MM-DD>.md` and the report-absolute-path instruction are the two agreed substantive additions here — the date-only name is the agreed convention: the topic slug carries the discrimination, and a same-day rerun on the same topic overwriting the earlier snapshot is fine, since the handoff captures the session's current state and the fresher document is the one the next agent should read. On `${TMPDIR:-/tmp}`: deliberately terse and unexplained — the reading agent knows the idiom and maps the intent to its platform's temp directory. Borrowing the sibling skill's longer wording verbatim would inflate a skill that deliberately stays ~15 lines; cross-skill consistency is governed by the ai-facing-writing-style guide rather than by copying prose between skills.
jercik marked this conversation as resolved
forgejo-actions left a comment

Summary: Found 1 medium issue.

Code review by Codex GPT-5.6 SOL (gpt-5.6-sol)

**Summary:** Found 1 medium issue. _Code review by Codex GPT-5.6 SOL (gpt-5.6-sol)_ <!-- axrecipe-review:v1:eyJzY2hlbWFWZXJzaW9uIjoxLCJzdGF0ZSI6InB1Ymxpc2hlZCIsInJlcG9zaXRvcnkiOiJqNGstb3NzL2FnZW50LXNraWxscyIsIm51bWJlciI6IjM5IiwiaGVhZFNoYSI6Ijc4OTJlZTI5NGUxMTFjOGNlZWYyYTBjMDFkNDgzZjFhZTVmOGRlZWEiLCJzbG90IjoiZm9yZ2Vqby1yZXZpZXctY29kZS1zbWFydC0xIiwic291cmNlV29ya2Zsb3dSdW5JZCI6IjE3Mzg2Iiwic291cmNlR2VuZXJhdG9yQXR0ZW1wdCI6IjEiLCJyZXN1bHRJZCI6IjJkODk5OGY4LTIwOTktNDdjMy1hYmFhLWM5NDg0MjM5NzA0NCJ9 -->
@ -5,3 +5,3 @@
---
Write a handoff document summarising the current conversation so a fresh agent can continue the work. Save to the temporary directory of the user's OS - not the current workspace.
Write a handoff document summarising the current conversation so a fresh agent can continue the work. Save it as `handoff-<topic-slug>-<YYYY-MM-DD>.md` under `${TMPDIR:-/tmp}` — not the current workspace — and end by reporting the written file's absolute path to the user.

🟡 Medium: ${TMPDIR:-/tmp} is POSIX-shell syntax, so a native Windows agent cannot resolve this instruction and /tmp need not exist; the handoff may fail to be written even though the previous wording worked across operating systems. Resolve the OS temporary directory explicitly (for example, $TMPDIR with /tmp fallback on POSIX and %TEMP%/$env:TEMP on Windows), then report the resulting absolute path.

🟡 **Medium:** `${TMPDIR:-/tmp}` is POSIX-shell syntax, so a native Windows agent cannot resolve this instruction and `/tmp` need not exist; the handoff may fail to be written even though the previous wording worked across operating systems. Resolve the OS temporary directory explicitly (for example, `$TMPDIR` with `/tmp` fallback on POSIX and `%TEMP%`/`$env:TEMP` on Windows), then report the resulting absolute path.
Author
Owner

Deliberate decision — declining. ${TMPDIR:-/tmp} is kept terse on purpose: the skill is interpreted by an agent, not executed verbatim by a shell, and the reading agent knows the idiom — it reads as "the OS temp directory, /tmp when TMPDIR is unset", so an agent on another platform maps that intent to its own temp location rather than failing on the expansion. Spelling out per-OS variants (%TEMP%/$env:TEMP) is exactly the inflation this skill deliberately avoids: it stays ~15 lines by design, and the two agreed substantive additions in this PR are the filename convention and the report-the-absolute-path instruction.

<!-- gh-feedback:reply-to:42966 --> Deliberate decision — declining. `${TMPDIR:-/tmp}` is kept terse on purpose: the skill is interpreted by an agent, not executed verbatim by a shell, and the reading agent knows the idiom — it reads as "the OS temp directory, `/tmp` when `TMPDIR` is unset", so an agent on another platform maps that intent to its own temp location rather than failing on the expansion. Spelling out per-OS variants (`%TEMP%`/`$env:TEMP`) is exactly the inflation this skill deliberately avoids: it stays ~15 lines by design, and the two agreed substantive additions in this PR are the filename convention and the report-the-absolute-path instruction.
jercik marked this conversation as resolved
forgejo-actions left a comment

Approach review: Naming the handoff and reporting its absolute path addresses the discoverability problem, but the date-only convention can overwrite an earlier handoff for the same topic on the same day. Keep the readable topic prefix while making each path unique.

Approach review by Codex GPT-5.6 SOL (gpt-5.6-sol)

**Approach review:** Naming the handoff and reporting its absolute path addresses the discoverability problem, but the date-only convention can overwrite an earlier handoff for the same topic on the same day. Keep the readable topic prefix while making each path unique. _Approach review by Codex GPT-5.6 SOL (gpt-5.6-sol)_ <!-- axrecipe-review:v1:eyJzY2hlbWFWZXJzaW9uIjoxLCJzdGF0ZSI6InB1Ymxpc2hlZCIsInJlcG9zaXRvcnkiOiJqNGstb3NzL2FnZW50LXNraWxscyIsIm51bWJlciI6IjM5IiwiaGVhZFNoYSI6Ijc4OTJlZTI5NGUxMTFjOGNlZWYyYTBjMDFkNDgzZjFhZTVmOGRlZWEiLCJzbG90IjoiZm9yZ2Vqby1yZXZpZXctYXBwcm9hY2gtc21hcnQtMSIsInNvdXJjZVdvcmtmbG93UnVuSWQiOiIxNzQzMyIsInNvdXJjZUdlbmVyYXRvckF0dGVtcHQiOiIxIiwicmVzdWx0SWQiOiI1MjUzZmEzOC1kMzMwLTRiOGItOGM0Zi04NGE3OWFlZTFjZTAifQ== -->
@ -5,3 +5,3 @@
---
Write a handoff document summarising the current conversation so a fresh agent can continue the work. Save to the temporary directory of the user's OS - not the current workspace.
Write a handoff document summarising the current conversation so a fresh agent can continue the work. Save it as `handoff-<topic-slug>-<YYYY-MM-DD>.md` under `${TMPDIR:-/tmp}` — not the current workspace — and end by reporting the written file's absolute path to the user.

A date-only name is deterministic, so a second handoff for the same topic on the same day can silently replace the first. Prefer a per-run unique name such as handoff-<topic-slug>-<YYYY-MM-DD-HHmmss>.md, or use mktemp with the readable topic prefix, while still reporting the resulting absolute path.

A date-only name is deterministic, so a second handoff for the same topic on the same day can silently replace the first. Prefer a per-run unique name such as `handoff-<topic-slug>-<YYYY-MM-DD-HHmmss>.md`, or use `mktemp` with the readable topic prefix, while still reporting the resulting absolute path.
Author
Owner

Declining — the date-only convention is the agreed substantive addition in this PR. The topic slug carries the discrimination between handoffs, and a same-day rerun on the same topic superseding the earlier snapshot is accepted by design: the handoff captures the session's current state, and the fresher document is the one the next session should read. A timestamp or mktemp suffix would trade the predictable, human-findable name for collision resistance the workflow does not need — and the skill already ends by reporting the exact absolute path, so the next session never has to guess the name.

<!-- gh-feedback:reply-to:43094 --> Declining — the date-only convention is the agreed substantive addition in this PR. The topic slug carries the discrimination between handoffs, and a same-day rerun on the same topic superseding the earlier snapshot is accepted by design: the handoff captures the session's current state, and the fresher document is the one the next session should read. A timestamp or `mktemp` suffix would trade the predictable, human-findable name for collision resistance the workflow does not need — and the skill already ends by reporting the exact absolute path, so the next session never has to guess the name.
jercik marked this conversation as resolved
forgejo-actions left a comment

Summary: Found 1 critical issue and 1 high issue in the new handoff path convention.

Code review by Codex GPT-5.6 SOL (gpt-5.6-sol)

**Summary:** Found 1 critical issue and 1 high issue in the new handoff path convention. _Code review by Codex GPT-5.6 SOL (gpt-5.6-sol)_ <!-- axrecipe-review:v1:eyJzY2hlbWFWZXJzaW9uIjoxLCJzdGF0ZSI6InB1Ymxpc2hlZCIsInJlcG9zaXRvcnkiOiJqNGstb3NzL2FnZW50LXNraWxscyIsIm51bWJlciI6IjM5IiwiaGVhZFNoYSI6Ijc4OTJlZTI5NGUxMTFjOGNlZWYyYTBjMDFkNDgzZjFhZTVmOGRlZWEiLCJzbG90IjoiZm9yZ2Vqby1yZXZpZXctY29kZS1zbWFydC0xIiwic291cmNlV29ya2Zsb3dSdW5JZCI6IjE3NDMzIiwic291cmNlR2VuZXJhdG9yQXR0ZW1wdCI6IjEiLCJyZXN1bHRJZCI6ImM0NjhhYjVkLTBjOGItNDdiYi1hY2I1LTYxN2E1NDJjMDJjMSJ9 -->
@ -5,3 +5,3 @@
---
Write a handoff document summarising the current conversation so a fresh agent can continue the work. Save to the temporary directory of the user's OS - not the current workspace.
Write a handoff document summarising the current conversation so a fresh agent can continue the work. Save it as `handoff-<topic-slug>-<YYYY-MM-DD>.md` under `${TMPDIR:-/tmp}` — not the current workspace — and end by reporting the written file's absolute path to the user.

🔴 Critical: This exact basename is reused for every handoff with the same slug on the same date. A second run therefore targets the existing document; common file writers can overwrite it and lose the earlier handoff, while a predictable name directly in shared /tmp also lets a pre-created symlink redirect the write. Allocate a unique private temp directory/file atomically (for example with mktemp -d) and place the conventional basename inside it, or require a collision-resistant suffix plus no-clobber creation.

🔴 **Critical:** This exact basename is reused for every handoff with the same slug on the same date. A second run therefore targets the existing document; common file writers can overwrite it and lose the earlier handoff, while a predictable name directly in shared `/tmp` also lets a pre-created symlink redirect the write. Allocate a unique private temp directory/file atomically (for example with `mktemp -d`) and place the conventional basename inside it, or require a collision-resistant suffix plus no-clobber creation.

🟠 High: ${TMPDIR:-/tmp} is POSIX-shell syntax and /tmp is not the normal Windows temp location, so a Windows/PowerShell agent cannot follow this instruction using $env:TEMP/%TEMP% and the write can fail or land outside the OS temp directory. Restore an OS-aware rule (as improve-codebase-architecture already does: $TMPDIR with /tmp fallback, or %TEMP% on Windows) and report the resolved absolute path.

🟠 **High:** `${TMPDIR:-/tmp}` is POSIX-shell syntax and `/tmp` is not the normal Windows temp location, so a Windows/PowerShell agent cannot follow this instruction using `$env:TEMP`/`%TEMP%` and the write can fail or land outside the OS temp directory. Restore an OS-aware rule (as `improve-codebase-architecture` already does: `$TMPDIR` with `/tmp` fallback, or `%TEMP%` on Windows) and report the resolved absolute path.
Author
Owner

Declining — handoff-<topic-slug>-<YYYY-MM-DD>.md is the agreed filename convention for this change, chosen deliberately: the next session must be able to find the document, so the name stays predictable and readable, and the skill ends by reporting the exact absolute path. Same-day overwrite on the same topic is accepted by design — the handoff is a snapshot of the session's current state, and the fresher one supersedes. On the symlink concern: this skill runs on single-user workstations where $TMPDIR resolves to a per-user private directory (macOS) — the shared-/tmp pre-created-symlink scenario assumes a hostile multi-user host this estate does not have. A mktemp -d random path would defeat the discoverability the convention exists to provide.

<!-- gh-feedback:reply-to:43104 --> Declining — `handoff-<topic-slug>-<YYYY-MM-DD>.md` is the agreed filename convention for this change, chosen deliberately: the next session must be able to find the document, so the name stays predictable and readable, and the skill ends by reporting the exact absolute path. Same-day overwrite on the same topic is accepted by design — the handoff is a snapshot of the session's current state, and the fresher one supersedes. On the symlink concern: this skill runs on single-user workstations where `$TMPDIR` resolves to a per-user private directory (macOS) — the shared-`/tmp` pre-created-symlink scenario assumes a hostile multi-user host this estate does not have. A `mktemp -d` random path would defeat the discoverability the convention exists to provide.
Author
Owner

Declining, same ruling as the sibling finding on this line: ${TMPDIR:-/tmp} is deliberately terse and unexplained. The skill is interpreted by an agent, not executed verbatim by a shell — the idiom reads as "the OS temp directory, /tmp when TMPDIR is unset", and an agent on another platform maps that intent to its own temp location. Restoring per-OS spellings would inflate a skill that deliberately stays ~15 lines; the two agreed substantive additions here are the filename convention and the report-the-absolute-path instruction.

<!-- gh-feedback:reply-to:43105 --> Declining, same ruling as the sibling finding on this line: `${TMPDIR:-/tmp}` is deliberately terse and unexplained. The skill is interpreted by an agent, not executed verbatim by a shell — the idiom reads as "the OS temp directory, `/tmp` when `TMPDIR` is unset", and an agent on another platform maps that intent to its own temp location. Restoring per-OS spellings would inflate a skill that deliberately stays ~15 lines; the two agreed substantive additions here are the filename convention and the report-the-absolute-path instruction.
jercik marked this conversation as resolved
jercik merged commit 6f9154e57d into main 2026-08-06 10:50:21 +00:00
jercik deleted branch align/handoff 2026-08-06 10:50:22 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
j4k-oss/agent-skills!39
No description provided.