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
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ npx poe-code@latest spawn codex "Review the auth module" --cwd github://owner/re
echo "Say hello" | npx poe-code@latest spawn codex
```

#### Review a GitHub pull request

```bash
npx poe-code@latest code-review install
npx poe-code@latest code-review run "https://github.com/owner/repo/pull/123"
npx poe-code@latest code-review commit "https://github.com/owner/repo/pull/123" --dry-run
```

#### Test a configured service

```bash
Expand Down Expand Up @@ -217,6 +225,23 @@ const { events, result: ghResult } = spawn("codex", {
console.log(result.stdout);
```

For plugin-first agent composition, import the public agent builder from the
`poe-code/agent` subpath:

```typescript
import { agent, openaiResponsesPlugin, systemPromptPlugin } from "poe-code/agent";

const run = await agent()
.model("gpt-5.5")
.use(openaiResponsesPlugin())
.use(systemPromptPlugin())
.run("Summarize the current repository", {
cwd: process.cwd()
});

console.log(run.output);
```

### `spawn(service, options)`

Runs a single prompt through a configured service CLI.
Expand Down
72 changes: 72 additions & 0 deletions docs/README_FULL.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
- [provider](#provider)
- [approvals](#approvals)
- [spawn](#spawn)
- [code-review](#code-review)
- [research](#research)
- [wrap](#wrap)
- [test](#test)
Expand All @@ -36,6 +37,7 @@
- [SDK Reference](#sdk-reference)
- [spawn()](#spawn-sdk)
- [spawn.pretty()](#spawnpretty)
- [Composable agent runtime](#composable-agent-runtime)
- [generate()](#generate-sdk)
- [generateImage()](#generateimage)
- [generateVideo()](#generatevideo)
Expand Down Expand Up @@ -448,6 +450,36 @@ poe-code spawn codex "Run lint and fix issues" --mode yolo --yes

---

### code-review

Run agent-assisted GitHub pull request reviews.

```bash
poe-code code-review <subcommand>
```

**Subcommands:**

| Subcommand | Description |
|------------|-------------|
| `install` | Install repo-local reviewer profiles and prompts. |
| `profiles` | List repo-local reviewer profiles. |
| `ingest <github-username>` | Build a runtime reviewer profile from GitHub review history. |
| `run <github-pr-url>` | Fetch a PR, run reviewer agents, and create a YAML draft. |
| `drafts <github-pr-url>` | Read the active YAML draft for a PR. |
| `commit <github-pr-url>` | Validate and publish the merged draft to GitHub; use `--dry-run` to preview. |
| `agent-mcp` | Run the stdio MCP server used by spawned review agents. |

**Examples:**

```bash
poe-code code-review install
poe-code code-review run "https://github.com/owner/repo/pull/123"
poe-code code-review commit "https://github.com/owner/repo/pull/123" --dry-run
```

---

### research

Research a codebase using a coding agent in read-only mode.
Expand Down Expand Up @@ -1153,6 +1185,31 @@ const result2 = await spawn.pretty("claude-code", {
});
```

### Composable agent runtime

The `poe-code/agent` subpath exposes the plugin-first agent builder and focused
runtime types for SDK users that want to compose providers, tools, MCP servers,
and hooks directly instead of spawning an external agent CLI.

```typescript
import { agent, openaiResponsesPlugin, systemPromptPlugin } from "poe-code/agent";

const result = await agent()
.model("gpt-5.5")
.use(openaiResponsesPlugin())
.use(systemPromptPlugin())
.run("Summarize the current repository", {
cwd: process.cwd()
});

console.log(result.output);
```

The builder supports `.model(...)`, `.use(...)`, `.tools(...)`, `.mcp(...)`,
`.acp(...)`, `.run(...)`, and `.stream(...)`. The subpath also exports
`openaiChatCompletionsPlugin`, `openaiResponsesPlugin`, and
`systemPromptPlugin`.

### generate() {#generate-sdk}

Generate text using the Poe API.
Expand Down Expand Up @@ -2617,6 +2674,7 @@ poe-code/
| `provider` | `list`, `login`, `logout` | Provider authentication management |
| `approvals` | `list`, `show`, `run` | Toolcraft human-in-loop approval queue |
| `spawn <agent> [prompt]` | — | Run agent with prompt |
| `code-review` | `install`, `profiles`, `ingest`, `run`, `drafts`, `commit`, `agent-mcp` | Agent-assisted GitHub pull request reviews |
| `research [prompt]` | — | Research codebase (read mode) |
| `wrap <agent>` | — | One-off isolated session |
| `test [agent]` | — | Health check |
Expand All @@ -2640,6 +2698,12 @@ export { generateImage } from "poe-code"; // Image generation
export { generateVideo } from "poe-code"; // Video generation
export { generateAudio } from "poe-code"; // Audio generation
export { getPoeApiKey } from "poe-code"; // API key resolution
export {
agent,
openaiChatCompletionsPlugin,
openaiResponsesPlugin,
systemPromptPlugin
} from "poe-code/agent"; // Composable agent runtime

// Types
export type { SpawnOptions } from "poe-code";
Expand All @@ -2648,6 +2712,14 @@ export type { GenerateOptions } from "poe-code";
export type { GenerateResult } from "poe-code";
export type { MediaGenerateOptions } from "poe-code";
export type { MediaGenerateResult } from "poe-code";
export type {
AgentBuilder,
AgentPlugin,
AgentRunOptions,
Provider,
RunResult,
Tool
} from "poe-code/agent";

// CLI (for programmatic CLI invocation)
export { main, isCliInvocation } from "poe-code";
Expand Down
10 changes: 6 additions & 4 deletions packages/github-workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The workflow triggers automatically on the configured event.

| Name | Trigger | Description |
| ---------------------------------- | --------------------- | ---------------------------------------------------------------------------------------- |
| `github-issue-opened` | Issue opened | Reads the issue, asks for missing details when needed, and implements actionable changes |
| `github-issue-opened` | Issue labeled `agent` | Reads the issue, asks for missing details when needed, and implements actionable changes |
| `github-issue-comment-created` | Issue comment created | Acts on prefixed issue comments, restricted to allowed roles |
| `github-pull-request-opened` | PR opened | Reviews the pull request |
| `github-pull-request-synchronized` | PR updated | Re-reviews the PR after new commits are pushed |
Expand All @@ -62,9 +62,11 @@ The built-in GitHub issue, issue-comment, pull-request, pull-request-comment, an
pull-request-synchronized automations allow `OWNER`, `MEMBER`, `COLLABORATOR`,
and `CONTRIBUTOR` author associations by default.

The built-in issue-opened automation always leaves a visible response. When the
issue lacks enough detail for a code change, it asks for the missing details and
leaves the issue open instead of closing it.
The built-in issue-opened automation runs when the `agent` label is added to an
issue. Opening an issue without that label, or adding any other label, does not
spawn an agent. When the automation runs, it always leaves a visible response.
When the issue lacks enough detail for a code change, it asks for the missing
details and leaves the issue open instead of closing it.

### List available automations

Expand Down
Loading