Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion .codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion .cursor-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
3 changes: 2 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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`.

Expand Down
5 changes: 5 additions & 0 deletions factory/claude/builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
```
Expand Down
14 changes: 11 additions & 3 deletions factory/claude/comment-janitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.

Expand All @@ -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.
Expand Down
10 changes: 6 additions & 4 deletions factory/claude/git-janitor-investigator.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.

Expand Down
45 changes: 29 additions & 16 deletions factory/claude/git-janitor.md
Original file line number Diff line number Diff line change
@@ -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 <script> --repo <worktree> [--default <branch>] [--update-main] [--dry-run]
```

It prints JSON. Read `status`:

- `done`: return `table`, and nothing else.
- `asks`: return `table`, then each entry of `questions` word for word, so the
caller can ask the user. Never answer a question yourself.
- `stopped`: return `stopped_at`, the cause, and `facts`. For an unmerged
branch at step 1, add what explains it: `gh pr view <number> --json
state,isDraft,mergeable,reviewDecision` and `gh pr checks <number>`. Retry a
failed fetch once. Otherwise stop there.

When `judgment` is not empty, return it word for word under "Needs a smarter
model". Do not decide it.

The script is the only thing that changes anything. Run no other command that
writes, and never commit, push, merge, or discard. Keep the answer short and
free of narration.

<!-- killall-agents -->
2 changes: 2 additions & 0 deletions factory/claude/grunt.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description: Agent started only by the orchestrator. Hands one small task to the
tools: Bash
model: haiku
effort: low
maxTurns: 5
omitClaudeMd: true
---

You relay one task. Pi, a cheaper local agent with its own model and tools, does the work; you do not.
Expand Down
Loading
Loading