diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index e61ad1c..e189a4a 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "killall-agents", "description": "Killallgit agent catalog and per-project agents", - "version": "2.5.0", + "version": "2.6.0", "author": { "name": "archae0pteryx" }, diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index be8c263..7102ece 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "killall-agents", - "version": "2.5.0", + "version": "2.6.0", "description": "Killallgit agent catalog and per-project agents", "author": { "name": "archae0pteryx", diff --git a/.cursor-plugin/plugin.json b/.cursor-plugin/plugin.json index b2e51c0..dc7deb2 100644 --- a/.cursor-plugin/plugin.json +++ b/.cursor-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "killall-agents", "displayName": "Killall Agents", - "version": "2.5.0", + "version": "2.6.0", "description": "Killallgit agent catalog and per-project agents", "author": { "name": "archae0pteryx" diff --git a/AGENTS.md b/AGENTS.md index be17c09..6587c7b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -9,9 +9,10 @@ Run from the repository root: ```sh python3 scripts/build_agents.py --check python3 skills/agent-setup/scripts/test_install.py +python3 skills/wrap-up/scripts/test_wrap_up.py git diff --check ``` -`skills/follow-the-rules/` is an independent copy from [killall-skills](https://github.com/killallgit/killall-skills/tree/a016d77ff5f86821f0292a5a00dbf4600b0d8a15/skills/follow-the-rules); preserve its relative reference links. Keep agents out of a root `agents/` folder, which Claude Code loads on plugin install; they belong in `factory/` so only `agent-setup` installs them. The git-janitor agent still requires the separately installed `killall-skills:git-janitor` skill. +`skills/follow-the-rules/` is an independent copy from [killall-skills](https://github.com/killallgit/killall-skills/tree/a016d77ff5f86821f0292a5a00dbf4600b0d8a15/skills/follow-the-rules); preserve its relative reference links. Keep agents out of a root `agents/` folder, which Claude Code loads on plugin install; they belong in `factory/` so only `agent-setup` installs them. Pending grunt and setup TUI work is tracked in `tasks/todo.md`. diff --git a/README.md b/README.md index 12d26a9..b394b3d 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Skills CLI (setup and rules only): npx skills add killallgit/killall-agents ``` -Includes `agent-setup`, `orchestrate` and `follow-the-rules`. +Includes `agent-setup`, `orchestrate`, `wrap-up` and `follow-the-rules`. ## Project agents @@ -38,17 +38,17 @@ Run `/killall-agents:agent-setup` in Claude Code, or `$agent-setup` in Codex, in | `grunt` | Relays a task that fits 64K tokens to the local [Pi](https://github.com/earendil-works/pi) agent | Haiku / low | `gpt-6-luna` / low | | `builder` | Implements one lane in its own worktree | Sonnet / medium | `gpt-6.1-sol` / medium | | `reviewer` | Checks a lane's behavior and runs the gate independently | Sonnet / high | `gpt-6.1-sol` / high | -| `hall-monitor` | Checks a lane against `follow-the-rules` and the codebase's patterns; read-only | Sonnet / medium | `gpt-6.1-sol` / medium | +| `hall-monitor` | Quick check of a lane's changes against `follow-the-rules`; read-only | Sonnet / low | `gpt-6.1-sol` / low | Claude Code also gets three utility agents. They have no Codex or Cursor copy. | Agent | Purpose | | --- | --- | -| `git-janitor` | Runs the separately installed `killall-skills:git-janitor` skill in its own context. Mention `@agent-git-janitor` to invoke it directly | +| `git-janitor` | Haiku background runner for the [`wrap-up`](skills/wrap-up/SKILL.md) skill: runs its script and returns the table, or the one roadblock that needs you | | `git-janitor-investigator` | Collects read-only branch/worktree evidence for the janitor | | `comment-janitor` | Reviews changed comments for useful intent | -Installing the plugin adds no agents. Keep `killall-skills` installed to use `git-janitor`. +Installing the plugin adds no agents. Run the `wrap-up` skill after a PR lands: it confirms the work merged and nothing is stranded, updates the main checkout, grooms beads, prunes merged worktrees and branches, and asks only about what is left. Cursor agents inherit the session model. Ask the top-level session to use the [`orchestrate`](skills/orchestrate/SKILL.md) skill to run a spec. The skill is the project-manager loop: plan with the planner, run lanes with grunt and builders, check with reviewer and hall-monitor. Agents read the gate, branch and worktree rules from the project's own `AGENTS.md`. diff --git a/factory/claude/builder.md b/factory/claude/builder.md index d942c7f..e9d0b7c 100644 --- a/factory/claude/builder.md +++ b/factory/claude/builder.md @@ -19,6 +19,8 @@ Read files with `Read`, one call per file (use `offset` and `limit` for a slice) Satisfy the brief's acceptance checks, following the repository's instructions. Use the repository's own helpers and the style of the nearest sibling files before writing anything new. +Make the smallest diff that satisfies the checks. Every changed line exists because a check needs it: no refactor, rename, or reformat of code the lane does not need, and no handling for cases that cannot happen. When you see a problem outside the lane, leave it and list it under Noticed. When the brief is ambiguous, take the narrower reading and say so under Departures. + Before the gate, review your own diff against the rules, file by file: dead code, comments that restate code, a new helper that duplicates an existing one, a departure from how sibling files do the same thing. Fix what you find. Then break each production change and confirm its new test fails, and restore it. Use `timeout` on commands that may hang, and the repository's own interpreter instead of `uv run` for one-off checks. Read credentials from a file outside your worktree only when the brief says to, and report each use. Never push or open a pull request. Run the gate in the worktree. When it fails, fix the cause, or stop and report the failure. Commit on the lane's branch, staging files by name. @@ -42,6 +44,9 @@ Per production change, the test that failed when you broke it. ## Departures Where you left the plan or the repository's rules, and why. None, when there are none. +## Noticed +Problems outside the lane that you left alone. None, when there are none. + ## Not done Checks you could not run, and anything a person still has to verify. ``` diff --git a/factory/claude/comment-janitor.md b/factory/claude/comment-janitor.md index 7301527..69c40d1 100644 --- a/factory/claude/comment-janitor.md +++ b/factory/claude/comment-janitor.md @@ -9,11 +9,13 @@ description: > "audit my comments", "are these comments necessary", "clean up the comments", "too many comments", "do these comments earn their place", or asks whether a comment is worth keeping. -tools: Bash, Read, Edit +tools: Bash, Read, Grep, Edit +model: sonnet +effort: medium color: red --- -# commenator +# comment-janitor Judge comments, not code. Every comment is guilty until it proves it explains something the code cannot. @@ -40,7 +42,8 @@ A contiguous comment block is **one** comment, however many lines it spans; a blank or non-comment line ends the block; a marker-only line (`#`, `//`) does not. When the diff touches only part of a block, audit that span alone — never the untouched remainder. -Read the surrounding file when a verdict needs it. Git is read-only here: +Read the surrounding file when a verdict needs it, with `Read`, and search with +`Grep`; keep Bash for git. Git is read-only here: `diff`, `log`, `merge-base`, `show`, `status`. Never `commit`, `checkout`, `reset`, `stash`, `push`, or any other write command. @@ -51,6 +54,11 @@ Read the surrounding file when a verdict needs it. Git is read-only here: - Yes → **CUT**. The comment restates the code. - No → **KEEP**, if it names the specific thing that is hidden. +A KEEP must also be true. Check each claim the comment makes against the code: +the behavior it describes, the edge cases it promises, and the names, parameters +and return values it mentions. A comment the code contradicts is a **REWRITE** +to what the code does, or a **CUT** when nothing true remains. + ## Keep - Decodes a regex, bitmask, format string, or dense expression. diff --git a/factory/claude/git-janitor-investigator.md b/factory/claude/git-janitor-investigator.md index 26953fb..f44dc20 100644 --- a/factory/claude/git-janitor-investigator.md +++ b/factory/claude/git-janitor-investigator.md @@ -2,9 +2,11 @@ name: git-janitor-investigator description: > Read-only investigation of one local Git branch and its linked worktree for - git-janitor. Report unpublished commits, dirty changes, age, and PR history. + wrap-up. Report unpublished commits, dirty changes, age, and PR history. tools: Bash, Read, Grep, Glob model: haiku +maxTurns: 20 +omitClaudeMd: true --- # Git janitor investigator @@ -61,13 +63,13 @@ Apply in order: 1. Failed or conflicting evidence → `REVIEW`. 2. Branch tip reachable from default → `MERGED_CLEANUP` candidate. -3. Last commit older than 60 days → `OLD_DELETE` candidate, even if unmerged - or unpublished. Dirty working changes still require separate assessment. +3. Last commit older than 60 days → `STALE`. Age is evidence, not a reason to + delete. Dirty working changes still require separate assessment. 4. Work clearly landed or superseded → `SUPERSEDED_DELETE` candidate. 5. Active or unclear work → `KEEP_REVIEW`. A recommendation is evidence for the main agent, not an instruction to mutate. -An open PR is report context, not a veto on the user's 60-day local rule. +An open PR is report context. Classify dirty worktree content separately: a recent file can be valuable even when the branch's last commit is old. diff --git a/factory/claude/git-janitor.md b/factory/claude/git-janitor.md index f63f588..79ed6c4 100644 --- a/factory/claude/git-janitor.md +++ b/factory/claude/git-janitor.md @@ -1,24 +1,37 @@ --- name: git-janitor -description: > - Run the complete git-janitor cleanup in a separate agent context when asked - to use the janitor agent for local branches, worktrees, or unpublished work. -skills: - - killall-skills:git-janitor +description: Runs the wrap-up script for finished work and returns its table, or the one roadblock that needs the user or a smarter model. Started by the wrap-up skill, in the background. +tools: Bash, Read, Grep, Glob +model: haiku +effort: low +maxTurns: 20 +background: true --- -# Git janitor agent +# git-janitor -Carry out the delegated request using the preloaded `git-janitor` skill. If -its full instructions are absent, invoke `killall-skills:git-janitor` with -the delegated request through the Skill tool before inspecting or changing -Git. Use the repository and scope supplied in the delegation; otherwise use -the current repository and full local cleanup. Inspect every worktree, apply -the skill's local cleanup policy, and return the exact removal and retention -receipt to the caller. For an audit-only request, report findings without -changing Git state. +You run one script and relay its report. The brief gives the absolute path to +`wrap_up.py`, the session's worktree, and any flags. -You own the complete cleanup. `git-janitor-investigator` provides read-only -branch evidence when available; validate its findings before acting. +```bash +python3