diff --git a/skills/automate-me/SKILL.md b/skills/automate-me/SKILL.md index 301e0b3..22134c4 100644 --- a/skills/automate-me/SKILL.md +++ b/skills/automate-me/SKILL.md @@ -26,7 +26,7 @@ Update mode changes the rest of the flow: ### 1. Mine their history -Locate the active workspace's transcripts before fanning out. The system prompt names the workspace's `$PI_SESSION_FILE`. Use only that path. Don't glob across `$PI_SESSION_FILE`. That crosses workspace boundaries and reads private chats from unrelated projects. +Locate the active workspace's transcripts before fanning out. The system prompt names the workspace's `$PI_SESSION_FILE`. Use only that path. Don't glob. Survey recent agent conversations within that scope for recurring patterns. Run multiple parallel subagents across slices of history (e.g. last 2-4 weeks, split into 3 slices so each has enough material). Each slice mining subagent reads transcripts from the workspace-scoped path the parent provides, looks for the signals below, and returns a short structured list of patterns it saw with evidence pointers. Default signals worth hunting: diff --git a/skills/poteto-mode/playbooks/eval.md b/skills/poteto-mode/playbooks/eval.md index c4efb32..9ba2c20 100644 --- a/skills/poteto-mode/playbooks/eval.md +++ b/skills/poteto-mode/playbooks/eval.md @@ -21,7 +21,7 @@ Evals test how a change affects agent behavior before promoting it: a new skill 3. **Author one organic prompt.** What a user would type. No leakage of what's being measured. 4. **Spawn N parallel candidates** on different models per the **arena** skill's Phase B. Each works in its own sanitized dir; same prompt to each. 5. **Spawn one blinded judge** on a different model family per the **arena** skill's Phase C. Judge sees outputs by sanitized label and the rubric, never a model name. -6. **Verify the chain from transcripts, not self-report.** Read each candidate's local transcript under the active session transcript named by `$PI_SESSION_FILE` (the system prompt names this path). Read only the path named by `$PI_SESSION_FILE`; that crosses workspace boundaries and reads private chats from unrelated projects. Look at which files each candidate actually opened. Citing a principle is not reading its leaf skill, and reading it is not applying it. Grade chain-following from the files it really read plus the shape of the code, never from the candidate's own claims. +6. **Verify the chain from transcripts, not self-report.** Read each candidate's local transcript at the path named by `$PI_SESSION_FILE`. The system prompt names this path. Look at which files each candidate actually opened. Citing a principle is not reading its leaf skill, and reading it is not applying it. Grade chain-following from the files it really read plus the shape of the code, never from the candidate's own claims. 7. **Read every candidate output yourself** end to end. Compare to the judge's verdict. Disagreement means a model is biased or the rubric is ambiguous. Synthesize. **Reply:** variant under test, rubric, per-candidate notes, judge's verdict, your synthesis, and a recommendation for whether to promote the variant. diff --git a/skills/poteto-mode/playbooks/session-pickup.md b/skills/poteto-mode/playbooks/session-pickup.md index 7279b8d..ee01598 100644 --- a/skills/poteto-mode/playbooks/session-pickup.md +++ b/skills/poteto-mode/playbooks/session-pickup.md @@ -4,7 +4,7 @@ A pickup is inheritance. The prior agent already paid the cost of reading the code, running the repros, making the design choices. Redoing loses the bias check and burns context. Resist the urge to re-derive; read. -1. Locate the prior trail. A local transcript under the active session transcript named by `$PI_SESSION_FILE` (the system prompt names the path; do not glob across `$PI_SESSION_FILE`, that crosses workspace boundaries and reads private chats from unrelated projects), a managed-worktree handoff, or a pushed branch. Read the metadata overview and last messages first, then scan back for the decision points. Parse a long transcript in a subagent and keep the reduced timeline in the main thread (the **principle-guard-the-context-window** skill). +1. Locate the prior trail. A local transcript at the path named by `$PI_SESSION_FILE`, a managed-worktree handoff, or a pushed branch. The system prompt names the transcript path. Read that path. Do not glob. Read the metadata overview and last messages first, then scan back for the decision points. Parse a long transcript in a subagent and keep the reduced timeline in the main thread (the **principle-guard-the-context-window** skill). 2. Reconstruct operational state. The branch and worktree, what already landed (`git log`, `git diff` against the base), the open todos, the decisions made. The prior trail is authoritative input. Resist the bias to re-derive it. 3. Diff done vs pending. Compare what shipped against what was planned, name the resume point, do not re-run the prior repro or redo completed work. A "let me verify from scratch" pass is the tell that you're treating the trail as untrustworthy when it's actually authoritative. 4. Route the remaining work to the matching playbook and pick the verdict: continue the execution, ship a finished recommendation, ratify or override a prior conclusion, or postmortem a failed run. The pickup playbook ends here; the routed playbook owns the rest. diff --git a/skills/pstack-reflect/SKILL.md b/skills/pstack-reflect/SKILL.md index f26db0d..a9732e5 100644 --- a/skills/pstack-reflect/SKILL.md +++ b/skills/pstack-reflect/SKILL.md @@ -22,15 +22,7 @@ Skip when the conversation is trivial, off-topic, or already covered by an exist ### 1. Locate the active transcript -The parent finds its own transcript file before fanning out. The system prompt names the active session transcript named by `$PI_SESSION_FILE`; use that path. Read only the path named by `$PI_SESSION_FILE`. That crosses workspace boundaries and reads private chats from unrelated projects. - -```bash -ls -t /*.jsonl /*/*.jsonl /*/subagents/*.jsonl 2>/dev/null | head -10 -``` - -Three transcript layouts: legacy flat (`.jsonl`), current nested (`/.jsonl`), and subagent (`/subagents/.jsonl`). - -For each candidate, read the first JSONL line and check that `message.content[0].text` contains the conversation's opening user prompt. Take the matching path. If no path resolves, write a tight digest of the session and pass that instead. +The parent finds its own transcript before fanning out. Read the path named by `$PI_SESSION_FILE`. The system prompt names that path. If the path does not resolve, write a tight digest of the session and pass that instead. ### 2. Spawn three reviewers in parallel diff --git a/skills/recall/SKILL.md b/skills/recall/SKILL.md index 338fc93..e4e100a 100644 --- a/skills/recall/SKILL.md +++ b/skills/recall/SKILL.md @@ -12,7 +12,7 @@ Keep it tight and on-topic. Read only what the in-scope threads need, then stop. Your context lives in two records. Your own chat history holds what you did and decided. The shared record holds everything that happened around the same code under other names: the symptoms users keep reporting, the fixes that shipped and got reverted, the errors still firing in prod. That second record is what the **why** skill searches, across source control, the issue tracker, chat and issue channels, long-form docs, and error tracking. A feature with a long bug tail keeps most of its story there, so don't reconstruct it from your transcripts alone. -Transcripts live at `$PI_SESSION_FILE`, where `` is the workspace path with the leading slash dropped and each "/" turned into "-" (so `/Users/you/proj` becomes `Users-you-proj`). Every line is one chat message. +Transcripts live at the path named by `$PI_SESSION_FILE`. Every line is one chat message. 1. Classify, then route. One specific prior chat to resume is the `session-pickup` playbook, not this. Turning habits into a durable skill is `automate-me`. A human-readable summary of your work is a different task. Recall loads working context across recent chats before you act. If the user already gave you a full state capsule (paths, branch, the change), use it and skip the mining. 2. Lock the scope before searching. Pin the window ("recent" is a real range, default the last 7 days), the topic if named, and the workspace (default the active one; never read another project's transcripts without being asked). State the scope back. Never quietly turn "all" into "recent N". diff --git a/test/resources/resources.test.mjs b/test/resources/resources.test.mjs index e2a9216..64277ea 100644 --- a/test/resources/resources.test.mjs +++ b/test/resources/resources.test.mjs @@ -123,6 +123,7 @@ test("active resources use Pi runtime contracts", async () => { ["Comment Sicko spawn", /agent: "Comment Sicko"/], ["doubled subagent", /subagent subagent/], ["create-skill", /create-skill/], + ["workspace-boundary leftover", /crosses workspace boundaries/], ]) { assert.doesNotMatch(corpus, pattern, `${token} remains in active resources`); }