Skip to content
Open
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
8 changes: 4 additions & 4 deletions docs/development/task-backlog.md
Original file line number Diff line number Diff line change
Expand Up @@ -554,10 +554,10 @@ Status markers:

**Tasks:**

- [ ] Add one code reviewer agent.
- [ ] Add one review workflow with Start, Agent, Human Approval, and End.
- [ ] Document how to run the demo locally.
- [ ] Commit with message `docs: add basic agent workspace example`.
- [x] Add one code reviewer agent.
- [x] Add one review workflow with Start, Agent, Human Approval, and End.
- [x] Document how to run the demo locally.
- [x] Commit with message `docs: add basic agent workspace example`.

**Acceptance Criteria:**

Expand Down
36 changes: 36 additions & 0 deletions examples/basic-agent-workspace/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Basic Agent Workspace

This example shows a small local-first AgentDeck workspace with one reviewer agent and one review workflow. It is meant to be inspected directly from the repository before a user creates their own workspace.

## Contents

- `agents/reviewer.json`: a read-only code reviewer agent.
- `workflows/review-flow.json`: a review workflow with Start, Agent, Human Approval, and End nodes.

## Local Inspection

From the repository root:

```bash
cat examples/basic-agent-workspace/agents/reviewer.json
cat examples/basic-agent-workspace/workflows/review-flow.json
```

To check the example while developing:

```bash
pnpm lint
pnpm format
pnpm typecheck
pnpm test
pnpm build
```

## Demo Flow

1. A user asks for a review of the current diff.
2. The `reviewer` agent reads repository context and summarizes risks.
3. The workflow pauses for a maintainer approval decision before any follow-up action.
4. The run ends after the approval step records the decision.

The reviewer agent intentionally defaults to read-only permissions. It can inspect code and produce review notes, but it cannot write files, install dependencies, run arbitrary commands, commit, or push.
19 changes: 19 additions & 0 deletions examples/basic-agent-workspace/agents/reviewer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"id": "reviewer",
"name": "Code Reviewer",
"description": "Reviews local code changes for regressions, security risks, and missing tests.",
"prompt": "Review the current diff. Prioritize correctness, security-sensitive behavior, missing tests, and changes that could break existing workflows. Keep findings concise and reference files or workflow nodes when possible.",
"model": "gpt-5",
"tools": ["repo.read", "git.diff", "workflow.inspect"],
"permissions": {
"read": true,
"write": false,
"install": false,
"arbitraryCommands": false,
"commit": false,
"push": false
},
"memoryScope": "workspace",
"runtimePreference": "codex",
"workspaceRoot": "/absolute/path/to/your/project"
}
61 changes: 61 additions & 0 deletions examples/basic-agent-workspace/workflows/review-flow.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"id": "review-flow",
"name": "Review Flow",
"version": 1,
"status": "draft",
"variables": {
"reviewScope": "current diff",
"approvalRole": "maintainer"
},
"permissions": {
"read": true,
"write": false,
"install": false,
"arbitraryCommands": false,
"commit": false,
"push": false
},
"nodes": [
{
"id": "start",
"type": "start",
"label": "Start"
},
{
"id": "agent-review",
"type": "agent",
"label": "Review current diff",
"agentId": "reviewer"
},
{
"id": "human-approval",
"type": "humanApproval",
"label": "Maintainer approval",
"approverRole": "maintainer"
},
{
"id": "end",
"type": "end",
"label": "End"
}
],
"edges": [
{
"id": "edge-start-review",
"from": "start",
"to": "agent-review"
},
{
"id": "edge-review-approval",
"from": "agent-review",
"to": "human-approval"
},
{
"id": "edge-approval-end",
"from": "human-approval",
"to": "end"
}
],
"createdAt": "2026-05-29T00:00:00.000Z",
"updatedAt": "2026-05-29T00:00:00.000Z"
}