Skip to content

feat(skills): delegate investigate and build, and build in a worktree - #44

Merged
gborges0727 merged 1 commit into
mainfrom
feat/skills-delegate-to-subagent
Sep 17, 2026
Merged

gborges0727 merged 1 commit into
mainfrom
feat/skills-delegate-to-subagent

Conversation

@gborges0727

Copy link
Copy Markdown
Owner

Why

investigate and build addressed "you" and named no agent. The session that loaded one read "you" as itself and ran every step inline. research never had this problem, because it names opus-medium and lists what the brief carries.

build also mentioned worktrees only in "Many tickets". A single build ran in the user's checkout.

What changed

skills/investigate/SKILL.md

  • Three new sections at the top address the session that loads the skill.
    • "Who does it" says the session runs none of the phases. It sends a brief to opus-medium, or to sol-xhigh through codex-delegate when Codex is on.
    • "The brief" lists what the brief carries.
    • "When it returns" has the session rerun the reproducing command and run git status. The session then reports in chat and nowhere else.
  • A new "The method" heading says everything below it addresses the subagent.
  • The subagent cannot reach the user, so two phases changed.
    • Phase 3 ranks suspects from what the brief says changed recently.
    • "When no check can be built" sends back what the subagent tried and what it needs. The session asks the user, then sends the answer to the same subagent.

skills/build/SKILL.md

  • "Who runs the loop" splits the work by where the ask lives.
    • A spec file or an issue sends the test loop to one subagent.
    • A build discussed in the conversation stays in the session, because a brief would have to retell the discussion.
  • "Where the work happens" puts every build in a git worktree at ../<repo>-build-<slug> on branch build/<slug>.
    • Its first step removes leftover build worktrees whose work is committed on their branch.
    • It leaves a leftover that holds uncommitted work, and names it in the reply.
  • "Finish" commits on the branch, then removes the worktree.
    • Git refuses to remove a worktree that holds untracked files, and the skill copies files such as a .env into it.
    • The skill adds --force only after git status --porcelain shows nothing but the files it copied in.
  • A build that stops early keeps its worktree and reports the path with the command that discards it.
  • "Build and commit" now means merging build/<slug> into the branch the user was on. The skill still never pushes.
  • "Many tickets" makes the spec's worktree the same way and ends on "Finish".

Other files

  • The build and investigate rows in README.md describe the new behaviour.
  • The plugin version goes from 1.32.0 to 1.33.0 in both manifests.
  • The rev goes from 38 to 39 in README.md and scripts/cloud-bootstrap.sh.

Testing

No session has run either skill with the new wording yet. I tested the git behaviour that "Finish" depends on in a scratch repo. git worktree remove removed a worktree holding an ignored .env. It refused one holding an untracked file, and --force removed it.

Both skills addressed 'you' and named no agent, so the session that loaded
one ran every step itself.

investigate now opens with three sections for the loading session. It
writes a brief, sends it to opus-medium (or sol-xhigh when Codex is on),
reruns the reproducing command that comes back, and reports in chat. The
phases address the subagent, which cannot reach the user. It ranks suspects
from what the brief says changed recently, and it sends back what it needs
when no check can be built.

build sends the test loop to one subagent when the ask is a spec file or an
issue, and keeps it in the session when the ask is the conversation.

Every build now runs in a git worktree on a build/<slug> branch. The skill
first removes leftover build worktrees whose work is committed. At the end
it commits on the branch and removes the worktree, adding --force only when
the files it copied in are all that remain. A build that stops early keeps
its worktree and reports the path. 'Build and commit' now means merging the
branch.

Bumps the plugin to 1.33.0 and the rev to 39.
@gborges0727
gborges0727 merged commit 0477221 into main Sep 17, 2026
2 checks passed
@gborges0727
gborges0727 deleted the feat/skills-delegate-to-subagent branch September 17, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant