diff --git a/harness/pstack/claude-code/skills/recall/SKILL.md b/harness/pstack/claude-code/skills/recall/SKILL.md index 960a04784f..322a2f1f1f 100644 --- a/harness/pstack/claude-code/skills/recall/SKILL.md +++ b/harness/pstack/claude-code/skills/recall/SKILL.md @@ -1,37 +1,44 @@ --- name: recall -description: "Reconstruct your recent working context from your own chat history, live state, and the shared record (user reports, prior fixes, incidents), then hand back a tight current-state brief. Use for 'recall my work on X', 'catch me up', 'what have I been working on', 'where did I leave off', before starting or resuming work." +description: "Reconstruct recent working context from available chat transcripts, live state, and the shared record, then return a tight current-state brief with confidence labels and safe citations. Works in any agent runtime. Use for 'recall my work on X', 'catch me up', 'what have I been working on', 'where did I leave off', before starting or resuming work." disable-model-invocation: true --- # Recall -In Claude Code, read [the Claude Code adapter](../../docs/harness/claude-code.md) once per session before you follow this skill. It maps the Cursor names in pstack skills to Claude Code. - -**Before you start or resume work, you rebuild the user's recent working context and hand back a tight capsule of where things stand now and what to do next.** +**Before you start or resume work, rebuild the user's recent working context and hand back a tight capsule of where things stand now and what to do next.** 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 lives in 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. +This skill is standalone. Use the tools of the current agent runtime. Do not require a vendor path, a model name, a connector, a slash command, or another skill. If a capability is missing, use the closest available equivalent and say so once in the brief. + +Your context lives in two written records and one live check. Your chat history holds what you did and decided. The shared record holds what 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 production. The shared record lives in 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 do not reconstruct it from transcripts alone. The live check tells you which claims still hold. -Transcripts live at `~/.cursor/projects//agent-transcripts//.jsonl`, 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. +Find transcripts from the current runtime instead of assuming a vendor layout. Use the transcript path named by the runtime or its docs. If none is named, find the runtime's session or project storage without globbing across all user projects. Resolve the active workspace first. Read only folders whose slug or metadata points to that workspace. Do not glob across unrelated project folders. Do not read another project's transcripts without being asked. If no transcript store is reachable, say "No transcript store available" and continue with the shared record and live state. -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". -3. Fan out across your chat history. Spawn parallel subagents on a fast, cheap model, each taking a slice of the corpus. Tell every subagent to order candidates by real modification time (`ls -t`) and never by UUID name, grep the topic first and then read only the matching chats and only their relevant regions, and skip the current chat plus obvious noise (subagent, eval, and test chats). Each returns the same schema, one block per chat: topic, the user's goal, decisions, open threads, struggles and corrections, and artifacts (PRs, tickets, branches), each citing the chat UUID. For one or two chats, skip the fan-out and search directly. The raw transcripts stay in the subagents. The main thread gets only their findings. Pick each subagent's reasoning level for the job, per the Subagents section of the **poteto-mode** skill. -4. Sweep the shared record whenever the topic names a feature, file, subsystem, area, or bug. This is the default, not a judgment call, and "my work on X" does not exempt it. Spawn one investigator subagent per source, in agent mode because readonly strips MCP access, and ask each "what's the current state, what's been tried and didn't hold, and what are users still reporting". Run them in parallel with the chat-history mining. Null results are findings. Skip an unavailable MCP and say so. Fold what comes back into the brief. Skip this step only for pure activity recall with no named target ("what did I do this week"), where your own history and live state are the entire answer. -5. Verify against live state. Take the PRs, branches, and tickets that the mining and the sweep surfaced and check them with `git` and `gh`. When the answer hinges on what an agent actually did (the tools it ran, files it read, errors it hit), read the full transcript, not just a trimmed local copy. -6. Write the brief to the contract below. Group by thread. Stay on the named topic. +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 a full state capsule with paths, branch, and change, use it and skip the mining. +2. Lock the scope before searching. Pin the window, the topic if named, the workspace, and the sources available here. "Recent" is a real range, default the last 7 days. The workspace is the active one by default. State the scope back. Never quietly turn "all" into "recent N". +3. Mine chat history. Use parallel workers if the runtime provides them. Otherwise work sequentially in the main thread. If model choice exists, use a fast, cheap model for these workers. Otherwise use the current model. Tell each worker to order candidates by filesystem modification time, for example `ls -t` on Unix, and never by UUID or name. Grep the topic first, then read only matching chats and only their relevant regions. Skip the current chat plus obvious noise such as automated, eval, and test chats. Each worker returns the same schema, one block per chat: topic, the user's goal, decisions, open threads, struggles and corrections, artifacts such as PRs, tickets, and branches, each citing the chat UUID or local session id. For one or two chats, skip the fan-out and search directly. Raw transcripts stay with the workers. The main thread gets only their findings. +4. Sweep the shared record whenever the topic names a feature, file, subsystem, area, or bug. This is the default, not a judgment call, and "my work on X" does not exempt it. Spawn one investigator per available source in a mode that keeps connector access. Ask each "what's the current state, what's been tried and didn't hold, and what are users still reporting". Run them in parallel with the chat mining when the runtime allows it. If a source has no connector, skip it and record it as unavailable. A null result means no evidence found in that source at that time. It does not prove the event never happened. Skip this step only for pure activity recall with no named target, such as "what did I do this week", where your own history and live state are the entire answer. +5. Verify against live state. Take the PRs, branches, tickets, and incidents that mining and sweep surfaced. Check them with `git` and the forge CLI or API available here, such as `gh` when present. Never invent a PR number or ticket id. When the answer hinges on what an agent actually did, including the tools it ran, files it read, and errors it hit, read the full transcript, not a trimmed copy. +6. Reconcile conflicts and assign confidence before writing. Build a short claim list. For each claim, record the sources, the newest dated evidence, and one label: `confirmed`, `likely`, `disputed`, or `unknown`. `confirmed` means live state or a primary source states it now. `likely` means dated records agree and no live check contradicts them. `disputed` means sources disagree. `unknown` means no evidence was found or the needed source was unavailable. Never turn `unknown` into "none". Break ties in this order: live state, a dated primary source, the newest dated record, then chat recollection. A revert, reopen, or still-firing error outranks an older merge or fix. If the tie-break cannot settle it, mark `disputed` and write the disagreement in one line. Do not silently pick a winner. +7. Write the brief to the contract below. Group by thread. Stay on the named topic. Diagnose, do not only list symptoms. When evidence supports a symptom but not a cause, say "cause not established" and name the check that would establish it. ## Output contract -Lead with the capsule, then the thread status, then the problems, then the next move. Deeper detail goes below or gets cut. +Lead with the capsule, then the thread status, then the problems, then the next move. Put coverage last only when a source was unavailable or a step was skipped. Deeper detail goes below or gets cut. + +- **Capsule.** At most 5 bullets. What this work is and where it stands overall. End each bullet with `(confidence: