docs: add background agent files to AGENTS.md; update prompts; add background_agent tool and tests; detached launcher in process-runner; status counts
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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: $@
|
||||
|
||||
@@ -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: $@
|
||||
|
||||
@@ -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: $@
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user