diff --git a/AGENTS.md b/AGENTS.md index b27ec65..981df9e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -13,8 +13,10 @@ Applies to entire `pi-subagents` package in this repo root. ## Key files -- `index.ts` — extension entrypoint; registers tool, provider override, and runner selection. -- `src/process-runner.ts` — default background child-process launcher. +- `index.ts` — extension entrypoint; registers tools, provider override, background registry, and runner selection. +- `src/background-tool.ts` — background_agent tool that launches detached process-backed runs and returns handle metadata. +- `src/background-status-tool.ts` — background_agent_status tool that queries counts and runs. +- `src/process-runner.ts` — default background child-process launcher and detached-launch helper. - `src/tmux-runner.ts` — tmux-backed launcher. - `src/tmux.ts` — tmux helper functions only. Keep tmux requirements/comments here or other tmux-specific files. - `src/config.ts` — runner config loading and validation. diff --git a/prompts/implement-and-review.md b/prompts/implement-and-review.md index 478d88d..471d2a2 100644 --- a/prompts/implement-and-review.md +++ b/prompts/implement-and-review.md @@ -1,10 +1,8 @@ --- -description: Implement, review, then revise using generic subagents +description: Implement, review, then revise using preset-driven subagents --- -Use the `subagent` tool in chain mode: - -1. Run a generic subagent to implement: $@ -2. Run a generic subagent to review `{previous}` and identify issues -3. Run a generic subagent to revise the implementation using `{previous}` +Run `subagent` to implement the requested change using an implementation preset. +Then run `subagent` to review the implementation and identify issues. +Finally run `subagent` to revise the implementation using the review output. User request: $@ diff --git a/prompts/implement.md b/prompts/implement.md index 115aa43..125b227 100644 --- a/prompts/implement.md +++ b/prompts/implement.md @@ -1,10 +1,8 @@ --- -description: Inspect, plan, and implement using generic subagents +description: Inspect, plan, and implement using preset-driven subagents --- -Use the `subagent` tool in chain mode: - -1. Run a generic subagent to inspect the codebase for: $@ -2. Run a generic subagent to turn `{previous}` into a concrete implementation plan for: $@ -3. Run a generic subagent to implement the approved plan using `{previous}` +Run `subagent` to inspect and gather context using an appropriate preset. +Then run `subagent` to produce a concrete implementation plan from that context. +Finally run `subagent` to implement the approved plan. User request: $@ diff --git a/prompts/scout-and-plan.md b/prompts/scout-and-plan.md index e6f3533..8f933d4 100644 --- a/prompts/scout-and-plan.md +++ b/prompts/scout-and-plan.md @@ -1,9 +1,7 @@ --- -description: Inspect the codebase, then produce a plan using generic subagents +description: Inspect the codebase, then produce a plan using preset-driven subagents --- -Use the `subagent` tool in chain mode: - -1. Run a generic subagent to inspect the codebase for: $@ -2. Run a generic subagent to turn `{previous}` into a concrete implementation plan for: $@ +Run `subagent` to inspect the codebase with an appropriate preset. +Then run `subagent` again with a planning preset, using the first result as context. User request: $@ diff --git a/src/package-manifest.test.ts b/src/package-manifest.test.ts index d966b5e..066ea54 100644 --- a/src/package-manifest.test.ts +++ b/src/package-manifest.test.ts @@ -50,7 +50,6 @@ test("README documents local install, git install, and tmux PATH requirement", ( assert.match(readme, /pi install https:\/\/gitea\.rwiesner\.com\/pi\/pi-subagents/); assert.match(readme, /generic subagent/i); assert.doesNotMatch(readme, /specialized built-in roles/i); - assert.doesNotMatch(readme, /markdown agent discovery/i); assert.match(readme, /tmux.*PATH/i); }); diff --git a/src/prompts.test.ts b/src/prompts.test.ts index d913b33..87de2d7 100644 --- a/src/prompts.test.ts +++ b/src/prompts.test.ts @@ -16,6 +16,6 @@ test("package.json exposes the extension and workflow prompt templates", () => { const content = readFileSync(join(packageRoot, "prompts", name), "utf8"); assert.match(content, /^---\ndescription:/m); assert.match(content, /subagent/); - assert.doesNotMatch(content, /\b(?:scout|planner|reviewer|worker)\b/); + assert.doesNotMatch(content, /chain mode/i); } });