Skip to content

Commit d34919b

Browse files
authored
fix(review): settle when temp directories need the scratch-root preamble (EveryInc#1840)
1 parent 142dbab commit d34919b

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

‎docs/solutions/skill-design/portable-agent-skill-authoring.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,10 @@ Distinguish three path cases:
278278

279279
Diagnose before rewriting a path. Trace the skill-to-launcher, shell-to-launcher, and engine-to-resource boundaries. An engine may already locate sibling resources through its own source path. A pattern that looks suspicious is not a defect until the failure is reproduced or a necessary failing path is identified.
280280

281+
### Temp directories
282+
283+
Choose by whether anything must rediscover the directory without being handed its path. A later invocation that resumes state, attaches to a live session, or polls a job it did not start needs a known root, so create that directory under the scratch-root preamble copied from a shipped skill. A directory whose absolute path is passed to everything that uses it, including a worker the run starts and later polls, may be a unique `mktemp -d "${TMPDIR:-/tmp}/<name>-XXXXXX"`: it is created private (0700) and atomically, so the scratch root adds no privacy. Never use a fixed name or a name from an optional tool such as `openssl`; two runs then share a path, or a missing tool collapses every run onto one.
284+
281285
## Make authority proportional to risk
282286

283287
Most read-only, single-shot, non-delegating skills need no authorization apparatus. Skip it.

‎skills/CODING_STANDARDS.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ A case a stated condition already covers is not a finding; answer it with the co
4646
- The default branch and remote are stated as conditions ("the default branch on its tracking remote; unknown means create a branch"), never as literal `main`, `master`, or `origin` and never as an enumerated list of fallback commands.
4747
- In a runnable template, a placeholder filled from branch, PR, or remote metadata is double-quoted, and positional git refs follow `--`.
4848

49+
## Temp directories
50+
51+
The authoring statement is "Temp directories" in `docs/solutions/skill-design/portable-agent-skill-authoring.md`; review checks:
52+
53+
- A directory that something must rediscover without being handed its path (a later invocation that resumes state, attaches to a live session, or polls a job it did not start) is created under the scratch-root preamble copied from a shipped skill. Only a known root makes it findable.
54+
- A directory whose absolute path is passed to everything that uses it, including a worker the run starts and later polls, may be a unique `mktemp -d "${TMPDIR:-/tmp}/<name>-XXXXXX"`. It is created private (0700) and atomically, so moving it under the scratch root adds no privacy. Asking for that move is not a finding.
55+
- No skill creates a temp directory with a fixed name or a name from an optional tool such as `openssl`. Two runs then share a path, or a missing tool collapses every run onto one.
56+
4957
## Edits that move or shrink text
5058

5159
- On a relocation, condensation, or size pass, every guard, scope word, quantifier, and safety cue in the old text has an equivalent in the new text. Shortened rules drift into absolutes that forbid paths the original allowed. See `docs/solutions/skill-design/size-driven-skill-restructure.md`.

0 commit comments

Comments
 (0)