diff --git a/.agents/skills/poteto-mode/playbooks/worktree-cleanup.md b/.agents/skills/poteto-mode/playbooks/worktree-cleanup.md index 9bc56f5..4ff4e99 100644 --- a/.agents/skills/poteto-mode/playbooks/worktree-cleanup.md +++ b/.agents/skills/poteto-mode/playbooks/worktree-cleanup.md @@ -1,6 +1,6 @@ ### Worktree and simulator cleanup -1. Snapshot and audit. Record `df -h /`, then run `scripts/worktree-audit.sh [-b ] [repo-path]` (principle-build-the-lever). Without `-b` it checks `MERGED` against `origin/HEAD`, so pass `-b origin/` when PRs target another branch. It reads paths from `git worktree list`, never hand-typed, since a hand-typed `myrepo-worktrees/x` misses one that lives at `.codex/worktrees/myrepo/x` (principle-encode-lessons-in-structure). It classifies each worktree by size, age, merge state, uncommitted work, PR state, and the newest chat that touched it, then suggests a bucket. The transcript scan is slow, so background it. +1. Snapshot and audit. Record `df -h /`, then run `scripts/worktree-audit.sh [-b ] [repo-path]` (principle-build-the-lever). Without `-b` it checks `MERGED` against `origin/HEAD`, so pass `-b origin/` when PRs target another branch. It reads paths from `git worktree list`, never hand-typed, since a hand-typed `myrepo-worktrees/x` misses one that lives in the directory `git worktree list` shows (principle-encode-lessons-in-structure). It classifies each worktree by size, age, merge state, uncommitted work, PR state, and the newest chat that touched it, then suggests a bucket. The transcript scan is slow, so background it. 2. The bucket is advice, not permission. The pinned and active chats are the real artifact (principle-prove-it-works). Get that set from the user or sidebar and cross-check every candidate. The lever has marked `safe` a worktree the user had pinned, so the pinned set wins. 3. Verify usage before deleting. For every `verify-recent-chat` row, or anything you doubt, fan subagents out to read the transcripts and report whether the chat is pinned or ongoing and which worktrees it touches (principle-guard-the-context-window, transcripts are bulk). A pinned chat spawns arena and repro trees into sibling worktrees via background subagents, and those are in use even when their names never hit the sidebar. Pick each subagent's reasoning level and fast or standard speed for the job, per the Subagents section. 4. Pause on irreversible loss. `wip:N` is N tracked uncommitted edits. Show the diff and get a decision first, since removing a clean worktree is recoverable from its branch but uncommitted work is gone. `scratch:N` is untracked throwaway, safe to drop, but name the files. Per Autonomy, clean and merged and not-in-use proceeds. `wip` and in-use pause. diff --git a/.agents/skills/reflect/references/divergent-reviewer.md b/.agents/skills/reflect/references/divergent-reviewer.md index 8214f1a..fe8af9c 100644 --- a/.agents/skills/reflect/references/divergent-reviewer.md +++ b/.agents/skills/reflect/references/divergent-reviewer.md @@ -18,7 +18,7 @@ Scan for: ## Scope to skills and tools the session actually used -Route findings only to skills, tools, or MCPs this transcript used. A skill counts as used when the transcript shows a `Read` of its `SKILL.md` (under `.agents/skills/`, `~/.agents/skills/`, or `~/.codex/plugins/`), a `Task` prompt naming its path, or a tool call (Shell, Grep, MCP, etc.) matching its documented commands. Speculative routings to skills the parent never opened do not count. +Route findings only to skills, tools, or MCPs this transcript used. A skill counts as used when the transcript shows a `Read` of its `SKILL.md` (under `.agents/skills/`, `~/.agents/skills/`, or `${CODEX_HOME:-~/.codex}/plugins/cache/`), a `Task` prompt naming its path, or a tool call (Shell, Grep, MCP, etc.) matching its documented commands. Speculative routings to skills the parent never opened do not count. Two finding shapes are valid: - The parent invoked the skill and you found a real gap in its body. Route to the skill's relevant section. diff --git a/.agents/skills/reflect/references/judgment-reviewer.md b/.agents/skills/reflect/references/judgment-reviewer.md index 6b169ad..00b5858 100644 --- a/.agents/skills/reflect/references/judgment-reviewer.md +++ b/.agents/skills/reflect/references/judgment-reviewer.md @@ -17,7 +17,7 @@ Scan for: ## Scope to skills and tools the session actually used -Route findings only to skills, tools, or MCPs this transcript used. A skill counts as used when the transcript shows a `Read` of its `SKILL.md` (under `.agents/skills/`, `~/.agents/skills/`, or `~/.codex/plugins/`), a `Task` prompt naming its path, or a tool call (Shell, Grep, MCP, etc.) matching its documented commands. Speculative routings to skills the parent never opened do not count. +Route findings only to skills, tools, or MCPs this transcript used. A skill counts as used when the transcript shows a `Read` of its `SKILL.md` (under `.agents/skills/`, `~/.agents/skills/`, or `${CODEX_HOME:-~/.codex}/plugins/cache/`), a `Task` prompt naming its path, or a tool call (Shell, Grep, MCP, etc.) matching its documented commands. Speculative routings to skills the parent never opened do not count. Two finding shapes are valid: - The parent invoked the skill and you found a real gap in its body. Route to the skill's relevant section. diff --git a/.agents/skills/reflect/references/tooling-reviewer.md b/.agents/skills/reflect/references/tooling-reviewer.md index 9d014da..a4fd30d 100644 --- a/.agents/skills/reflect/references/tooling-reviewer.md +++ b/.agents/skills/reflect/references/tooling-reviewer.md @@ -28,7 +28,7 @@ Scan for: ## Scope to skills and tools the session actually used -Route findings only to skills, tools, or MCPs this transcript used. A skill counts as used when the transcript shows a `Read` of its `SKILL.md` (under `.agents/skills/`, `~/.agents/skills/`, or `~/.codex/plugins/`), a `Task` prompt naming its path, or a tool call (Shell, Grep, MCP, etc.) matching its documented commands. Speculative routings to skills the parent never opened do not count. +Route findings only to skills, tools, or MCPs this transcript used. A skill counts as used when the transcript shows a `Read` of its `SKILL.md` (under `.agents/skills/`, `~/.agents/skills/`, or `${CODEX_HOME:-~/.codex}/plugins/cache/`), a `Task` prompt naming its path, or a tool call (Shell, Grep, MCP, etc.) matching its documented commands. Speculative routings to skills the parent never opened do not count. Two finding shapes are valid: - The parent invoked the skill and you found a real gap in its body. Route to the skill's relevant section.