Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
feat: let /claim skip or trim review for trivial diffs; accept space-form --review-with
[._.]/ Adam Eivyde0252a91af6
diff --git a/.claude/commands/claim.md b/.claude/commands/claim.mdindex e0cbc24269..18374f52ce 100644--- a/.claude/commands/claim.md+++ b/.claude/commands/claim.md@@ -1,6 +1,6 @@---description: Claim the next unclaimed PLAN.md item by its [slug] ID, do the work in an isolated worktree, ship a PR, and clean up.-argument-hint: "[<slug>] [--review-with=<copilot|codex|gemini|claude>] [--no-review]"+argument-hint: "[<slug>] [--review-with=<copilot|codex|gemini|claude>[,…]] [--no-review]"---# Claim — Pick the next PLAN.md item and ship it@@ -9,10 +9,10 @@ Claim the next unclaimed `- [ ]` item from PLAN.md via the slug-ID system, work**How the claim works.** Every PLAN.md checkbox carries a `[<slug>]` ID (see [lib/slashdo/lib/plan-id-format.md](../../lib/slashdo/lib/plan-id-format.md)). A slug is "in flight" when it appears as a `/`-separated segment in any local or remote branch (`git branch -a`) or any open PR head ref (`gh pr list --state open`). This command picks the first `- [ ]` whose slug is NOT in flight and creates a `claim/<slug>` branch — that branch name becomes the claim, visible to every other agent and human running this command.-**Arguments.** Parse `$ARGUMENTS` by splitting on whitespace — tokens starting with `--` are flags, the first remaining token is the slug. Either order works (`auth-bug --review-with=codex` and `--review-with=codex auth-bug` are equivalent).+**Arguments.** Parse `$ARGUMENTS` by splitting on whitespace — tokens starting with `--` are flags, the first remaining non-flag token is the slug. A flag that takes a value accepts **either** form: glued with `=` (`--review-with=codex`) **or** as the next whitespace-separated token (`--review-with codex`) — in the space form, consume the following token as the flag's value (and don't mistake it for the slug). Order is free: `auth-bug --review-with=codex`, `--review-with codex auth-bug`, and `--review-with=codex auth-bug` are all equivalent.- **`<slug>`** — claim THAT specific item instead of auto-picking. Useful for cherry-picking out-of-order work. The slug must already exist in PLAN.md as a `- [ ]` line; this command never assigns new IDs (that's `/do:replan`'s job).-- **`--review-with=<copilot|codex|gemini|claude>`** — pick which reviewer runs the post-PR review loop in Phase 6. **No default — when omitted, the agent decides in Phase 6 whether the diff warrants an external review at all** (a 3-line value swap doesn't; a multi-file feature change does). Pass this flag explicitly to force a review regardless of the agent's judgment. `copilot` drives the GitHub Copilot review-and-fix loop via `/do:pr`; `codex`/`gemini`/`claude` skip Copilot and run an iterative CLI-based review against the PR diff. Record the parsed value as `REVIEWER` (or `auto` when omitted) and reference it in Phase 6.+- **`--review-with=<reviewer>[,<reviewer>…]`** — name which reviewer(s) run the post-PR review loop in Phase 6, where each `<reviewer>` is `copilot|codex|gemini|claude`. Comma-separate to request several (e.g. `--review-with=claude,codex` runs both review loops and converges when all agree). This flag expresses a **preference, not an absolute mandate**: it says "if a review runs, use these reviewer(s)" and leans strongly toward actually reviewing — but the agent may still skip `/simplify` and/or trim the external pass (down to a single reviewer, or skip it entirely) when the diff is *genuinely trivial* (a literal value swap, a typo/comment fix, a PLAN-only edit, a doc-only revert). Always state any skip/trim and why. **No default — when omitted, the agent decides from scratch in Phase 6 whether the diff warrants `/simplify` and/or an external review at all** (a 3-line value swap doesn't; a multi-file feature change does). `copilot` drives the GitHub Copilot review-and-fix loop via `/do:pr`; `codex`/`gemini`/`claude` skip Copilot and run an iterative CLI-based review against the PR diff. Record the parsed value as `REVIEWER` (a list of reviewer names; or `auto` when omitted) and reference it in Phase 6.- **`--no-review`** — explicit opt-out from BOTH `/simplify` and the external review pass. Use when you want the agent to just ship without deliberation (e.g. a doc-only revert). Mutually exclusive with `--review-with`.## Phase 1: Pick@@ -126,36 +126,38 @@ git commit -m "docs([<slug>]): remove from PLAN.md and log to changelog"| Mode | Trigger | What runs ||---|---|---|-| **A. Forced** | `--review-with=<reviewer>` was passed | `/simplify` + the named reviewer's loop (6.2a or 6.2b) — no judgment, the user opted in |+| **A. Requested** | `--review-with=<reviewer[,…]>` was passed | **Default:** `/simplify` + each named reviewer's loop (6.2a or 6.2b). The user asked for review, so the bar to skip is HIGH — keep both layers UNLESS the diff is *genuinely trivial* (the heuristic's clearest "skip" cases), in which case you may drop `/simplify` and/or trim the reviewer list (prefer cutting many reviewers down to one over skipping review entirely). State any skip/trim + why. || **B. Forced skip** | `--no-review` was passed | Neither `/simplify` nor an external reviewer runs; only the local-review gate inside `/do:pr` (or a manual `/do:review` if opening the PR by hand) — useful for trivial reverts, doc-only changes || **C. Judgment** | Neither flag passed (the common case) | The agent judges whether the diff merits each layer. **`/simplify` and the external review pass are independent decisions** — answer each on its own merits |-**Heuristic for mode C — when to skip:**+**Heuristic — when to skip a layer (modes A and C):**| Layer | Skip when | Run when ||---|---|---|| **`/simplify`** | Diff is a literal value swap (e.g. `"0"` → `"1"`), a single-line typo/comment fix, a PLAN-only edit, or any change with no new code paths / abstractions / helpers — there's nothing for the reuse/quality/efficiency agents to find | New code (functions, classes, components), new abstractions, refactors that move logic between files, multi-file feature work, anything where reuse opportunities or efficiency concerns plausibly exist || **External reviewer** | Same as above PLUS the local-review gate (Tier 1+4 checklist in Phase 6.2) is clean AND the change is mechanically obvious (e.g. matches a published reference or follows an in-repo pattern verbatim) | New logic, security-adjacent code, schema/contract changes, route/handler additions, cross-file changes, anything where a second perspective on the *design* (not just the implementation) is worth a round-trip |-When in mode C, **state the call before acting**: "Diff is N lines across M files, all in <area>; skipping `/simplify` (no new code paths) and external review (matches published reference)." or "Diff adds a new schema + route handler; running `/simplify` and requesting copilot review." This makes the judgment visible to the user so they can override.+**The bar differs by mode.** In **mode C** the default is *judgment* — skip freely whenever the "skip when" column applies. In **mode A** the user explicitly asked for review, so the default is *run*: only invoke the "skip when" column for the genuinely-trivial cases, and when a diff is light-but-not-trivial prefer trimming several requested reviewers to one (rather than skipping the external pass altogether).-When in mode C with `/simplify` deferred but external review wanted, run `/simplify` first anyway — it's the cheaper of the two and may surface fixes that change what the reviewer sees.+**State the call before acting** (both modes): "Diff is N lines across M files, all in <area>; skipping `/simplify` (no new code paths) and external review (matches published reference)." or "User requested claude,codex but the diff is a one-line value swap — running just claude, skipping `/simplify`." This makes the judgment visible to the user so they can override.-1. **`/simplify`** — run iff mode A, or mode C and the heuristic says yes. Fix findings in the same diff (per the `feedback_simplify_after_significant_work` memory). Do this BEFORE opening the PR, not retroactively.+When `/simplify` is deferred but an external review will run, run `/simplify` first anyway — it's the cheaper of the two and may surface fixes that change what the reviewer sees.-2. **Open the PR and run the review loop.** Pick the branch by `REVIEWER` (the parsed value from `--review-with`, or `auto` when not passed):+1. **`/simplify`** — run by default in mode A, and in mode C when the heuristic says yes; skip only when the heuristic's "skip when" column applies (in mode A, only its genuinely-trivial cases). Fix findings in the same diff (per the `feedback_simplify_after_significant_work` memory). Do this BEFORE opening the PR, not retroactively.- ### 6.2a — `REVIEWER=copilot` OR (`REVIEWER=auto` AND heuristic says review)+2. **Open the PR and run the review loop.** First apply any mode-A trim from the heuristic above (e.g. drop a multi-reviewer request to a single reviewer, or skip entirely, for a genuinely-trivial diff) — state the trim. Then dispatch each reviewer left in `REVIEWER` to its branch below: `copilot` → 6.2a; any of `codex`/`gemini`/`claude` → 6.2b; `auto` (no flag) resolves to 6.2a or 6.2c by the heuristic. **If `REVIEWER` lists several, run each its own branch and merge only once they ALL converge** (the 6.2b loop generalizes to running every requested CLI reviewer each iteration).++ ### 6.2a — `REVIEWER` includes `copilot`, OR (`REVIEWER=auto` AND heuristic says review)Run **`/do:pr --review-with=copilot`**. It runs `/do:review` as a local-review gate AND drives the Copilot review-and-fix loop. Do NOT run `/do:review` separately first — `/do:pr` does it. Trust the loop. When `/do:pr` reports the PR is clean (zero unresolved Copilot comments, or you've judged the remaining findings to be nitpicks not worth another round), the PR is ready to merge.- ### 6.2c — `REVIEWER=auto` AND heuristic says skip, OR `--no-review`+ ### 6.2c — `REVIEWER` is empty after a trivial-diff trim, OR (`REVIEWER=auto` AND heuristic says skip), OR `--no-review`- Skip the external review pass. Still run the local-review gate yourself by invoking **`/do:pr`** with NO `--review-with` flag — that runs the Tier 1+4 checklist against the diff (the spec calls this gate "REQUIRED" and it always fires) without requesting Copilot or any CLI reviewer. State the skip rationale ("3-line value swap, matches phosphene's published matrix, no external review") in the merge commit body so the audit trail is honest.+ Skip the external review pass. Still run the local-review gate yourself by invoking **`/do:pr`** with NO `--review-with` flag — that runs the Tier 1+4 checklist against the diff (the spec calls this gate "REQUIRED" and it always fires) without requesting Copilot or any CLI reviewer. State the skip rationale ("3-line value swap, matches phosphene's published matrix, no external review"; or "user requested claude,codex but the diff is a one-line value swap — trimmed to no external review") in the merge commit body so the audit trail is honest.- ### 6.2b — `REVIEWER` is `codex`, `gemini`, or `claude`+ ### 6.2b — `REVIEWER` includes one or more of `codex`, `gemini`, `claude`- Skip `/do:pr` entirely (it bakes in the Copilot loop). Open the PR manually, then drive an iterative CLI-based review using the chosen reviewer.+ Skip `/do:pr` entirely (it bakes in the Copilot loop). Open the PR manually, then drive an iterative CLI-based review using the chosen reviewer(s). When several CLI reviewers are requested, run each one per iteration (in parallel for the initial pass) and treat the loop as converged only when **all** of them return CLEAN.1. **Local review gate** — `/simplify` (step 1) already covered the reuse/quality/efficiency pass. Run `/do:review` here for the full code-review checklist before pushing. Fix anything it finds in the same diff.2. **Push and open the PR:**@@ -166,13 +168,13 @@ When in mode C with `/simplify` deferred but external review wanted, run `/simpl--body "<PR body>"```Capture the PR number as `PR_NUM`.- 3. **Pick the CLI invocation for `REVIEWER`:**- | `REVIEWER` | Command |+ 3. **Pick the CLI invocation per requested reviewer** (run each one when several are requested):+ | reviewer | Command ||---|---|| `codex` | `codex exec -` (prompt + diff via stdin) || `gemini` | `gemini -p "$PROMPT"` (diff via stdin) || `claude` | `claude -p - ` (prompt + diff via stdin) |- 4. **Review-and-fix loop — converge to mutual agreement, no iteration cap.** Loop until BOTH the main agent and the review CLI agree the PR is ready to merge. The agent (you) decides when the review is producing real value vs. nit-grade churn; the review CLI decides when nothing actionable remains. Each iteration:+ 4. **Review-and-fix loop — converge to mutual agreement, no iteration cap.** Loop until the main agent AND every requested review CLI agree the PR is ready to merge. The agent (you) decides when the review is producing real value vs. nit-grade churn; each review CLI decides when nothing actionable remains for it. With multiple reviewers, gather all of their findings each iteration, dedup, and converge only when they are all CLEAN. Each iteration:```bash# 1. Capture the latest diffgh pr diff "${PR_NUM}" > /tmp/claim-${SLUG}-pr.diff