Skip to content

Add local agent profile examples#49

Closed
Waishnav wants to merge 1 commit into
mainfrom
add-local-agent-profile-examples
Closed

Add local agent profile examples#49
Waishnav wants to merge 1 commit into
mainfrom
add-local-agent-profile-examples

Conversation

@Waishnav

@Waishnav Waishnav commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • add copyable local agent profile examples under examples/agents
  • document the draft agent profile schema
  • include examples in published package files

Validation

  • npm run typecheck
  • npm run test
  • npm pack --dry-run

Summary by CodeRabbit

  • Documentation
    • Added a schema guide for DevSpace agent profiles, including required fields, workspace settings, action strategies, placeholders, and safety rules.
    • Added setup notes for local agent profile examples, including where to copy them and how to customize them.
  • New Features
    • Added several ready-to-use agent profile examples for different workflows, including implementation, exploration, and review use cases.
  • Chores
    • Included the examples directory in the published package contents.
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a new documentation page defining a draft DevSpace agent profile schema, a README explaining example agent templates, seven example agent profile markdown files (claude-implementer, codex-worker, codex-explorer, copilot-reviewer, cursor-agent-worker, opencode-explorer, pi-reviewer) covering read-only and write-capable configurations, and a package.json update adding "examples" to the published files list.

Changes

Agent Profile Schema and Examples

Layer / File(s) Summary
Schema documentation
docs/agent-profile-schema.md
Defines the agent profile draft format: Markdown + YAML front matter structure, required top-level fields, capability flags, workspace configuration, action lifecycle strategies, placeholder tokens, and safety fields.
Examples README
examples/agents/README.md
Documents that example files are starter templates, where to install them locally, and links to the schema doc.
Write-capable worker agents
examples/agents/claude-implementer.md, examples/agents/codex-worker.md, examples/agents/cursor-agent-worker.md
Define implementation-worker agent profiles with read/write/shell/background capabilities, start/followup/read/cancel/diff action wiring, safety gates requiring diff review and tests/explanation, usage guidance, and prompt/report templates.
Read-only review/exploration agents
examples/agents/codex-explorer.md, examples/agents/copilot-reviewer.md, examples/agents/opencode-explorer.md, examples/agents/pi-reviewer.md
Define read-only agent profiles with background/resume capabilities, action wiring without write/shell, safety gates requiring explicit intent and review before output, usage guidance, and prompt/report templates.
Package files list
package.json
Adds examples directory to the npm files array for publishing.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

A rabbit hops through YAML fields so neat,
Eight new agents, each profile complete.
Read-only sniffers, write-bold workers too,
Schema docs lighting the path for you.
🥕 Hop, commit, and publish — examples now in view!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding local agent profile examples.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-local-agent-profile-examples

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@examples/agents/pi-reviewer.md`:
- Around line 22-27: The Pi resume example is using the wrong flag for session
restoration, so update the follow-up command in pi-reviewer.md to use the
session-handling option expected by Pi. Keep the existing `pi` command structure
and `-p` placement, but change the resume-related argument from `--session-id`
to `--session` in the example that demonstrates resuming a prior session, using
the surrounding `command:` / `args:` block to locate it.

In `@package.json`:
- Line 16: The package metadata currently ships examples/ but not the schema
document referenced by examples/agents/README.md, so update the files list in
package.json to include docs/agent-profile-schema.md or move that markdown under
the shipped examples tree. Make the change in the package.json files array so
package consumers receive the schema doc alongside the examples and the link
from the README remains valid.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5cffe337-4b5a-441f-8372-662af78ae94d

📥 Commits

Reviewing files that changed from the base of the PR and between 323d862 and f764f89.

📒 Files selected for processing (10)
  • docs/agent-profile-schema.md
  • examples/agents/README.md
  • examples/agents/claude-implementer.md
  • examples/agents/codex-explorer.md
  • examples/agents/codex-worker.md
  • examples/agents/copilot-reviewer.md
  • examples/agents/cursor-agent-worker.md
  • examples/agents/opencode-explorer.md
  • examples/agents/pi-reviewer.md
  • package.json
Comment on lines +22 to +27
command: pi
args:
- -p
- --mode
- json
- "<prompt>"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
pi --help

Repository: Waishnav/devspace

Length of output: 195


🏁 Script executed:

#!/bin/bash
set -euo pipefail

git ls-files | rg '(^|/)examples/agents/pi-reviewer\.md$|(^|/)pi-reviewer\.md$|(^|/)README\.md$|(^|/)docs/|(^|/)examples/agents/'
printf '\n--- file outline ---\n'
ast-grep outline examples/agents/pi-reviewer.md --view expanded || true
printf '\n--- relevant lines ---\n'
cat -n examples/agents/pi-reviewer.md | sed -n '1,120p'
printf '\n--- search for pi CLI usage ---\n'
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/.git/**' '\bpi\b|--session-id|--mode|-p\b' .

Repository: Waishnav/devspace

Length of output: 21513


🌐 Web query:

"@earendil-works/pi-coding-agent pi cli -p --mode json --session-id"

💡 Result:

The command @earendil-works/pi-coding-agent (commonly referred to as "pi") is a minimal terminal-based AI coding agent [1][2]. The specific command structure you requested, pi -p --mode json --session-id, involves a slight syntax error regarding the --session-id flag [3][4][5]. Based on official documentation, the correct flag for targeting a specific session is --session <path|id> [4][5][6]. Here is a breakdown of the valid components: 1. pi: The command to run the coding agent [2][3]. 2. -p (or --print): This flag runs the agent in non-interactive mode, where it prints the response and exits [3][4][5]. It is typically followed by your prompt string [7]. 3. --mode json: This sets the output format to stream events as JSON lines, which is useful for programmatic integration or scripts [1][3][7]. 4. --session <path|id>: This flag is used to resume or fork a specific session file or partial UUID [4][5][6]. A corrected version of your command would look like this: pi -p "your prompt here" --mode json --session For complete details on session management, JSON event structures, and other available flags, you can refer to the official documentation at pi.dev [1][8].

Citations:


🌐 Web query:

"pi cli --help prompt session-id mode json"

💡 Result:

The Pi coding agent CLI does not have a direct --session-id flag for providing a session ID [1][2][3][4]. Instead, session management is handled through the --session flag, which accepts a path to a session JSONL file or a partial UUID to identify and resume a specific session [1][5][6][7]. Key details regarding your query: - Session Selection: Use --session <path|id> to target a specific session [1][3][8][7]. - JSON Mode: Enable machine-readable output by passing --mode json [1][3][9]. When running in this mode, Pi outputs events as newline-delimited JSON objects [1][9]. The first event emitted is a session header, which includes the session ID (e.g., {"type":"session", "id":"uuid",...}) [6][9][10]. - Prompting: You can pass your prompt as a positional argument [11][4][9]. If you are using --mode json, it is common to also use --print (-p) if you want to perform a one-shot task and exit immediately [1][6][3][8]. Example command usage: pi --session --mode json "Your prompt here" To manage sessions interactively, you can use the /session command within an active session to display the current session ID, file path, and other metadata [1][5][11][4]. If you require a specific session ID for external orchestration, the recommended practice is to parse the session header emitted in JSON mode or use the session management features available in the Pi SDK [6][9][10].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- copilot-reviewer ---'
cat -n examples/agents/copilot-reviewer.md | sed -n '1,120p'
printf '\n%s\n' '--- claude-implementer ---'
cat -n examples/agents/claude-implementer.md | sed -n '1,120p'
printf '\n%s\n' '--- opencode-explorer ---'
cat -n examples/agents/opencode-explorer.md | sed -n '1,120p'
printf '\n%s\n' '--- cursor-agent-worker ---'
cat -n examples/agents/cursor-agent-worker.md | sed -n '1,120p'

Repository: Waishnav/devspace

Length of output: 8038


Use --session for Pi resume, not --session-id. (examples/agents/pi-reviewer.md:33-40) -p can stay before the prompt; the followup command is the broken part, because Pi uses --session <path|id> for resuming sessions.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@examples/agents/pi-reviewer.md` around lines 22 - 27, The Pi resume example
is using the wrong flag for session restoration, so update the follow-up command
in pi-reviewer.md to use the session-handling option expected by Pi. Keep the
existing `pi` command structure and `-p` placement, but change the
resume-related argument from `--session-id` to `--session` in the example that
demonstrates resuming a prior session, using the surrounding `command:` /
`args:` block to locate it.
Comment thread package.json
"files": [
"dist",
"docs",
"examples",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Publish the schema doc alongside the examples.

examples/agents/README.md links to docs/agent-profile-schema.md, but this files list only ships examples/. Package consumers will get a dead link unless the schema doc is also published or moved under the shipped tree.

Suggested fix
 "files": [
+  "docs/agent-profile-schema.md",
   "examples"
 ]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"examples",
"files": [
"docs/agent-profile-schema.md",
"examples"
]
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` at line 16, The package metadata currently ships examples/ but
not the schema document referenced by examples/agents/README.md, so update the
files list in package.json to include docs/agent-profile-schema.md or move that
markdown under the shipped examples tree. Make the change in the package.json
files array so package consumers receive the schema doc alongside the examples
and the link from the README remains valid.
@Waishnav

Copy link
Copy Markdown
Owner Author

Closing this PR for now per maintainer request.

@Waishnav Waishnav closed this Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant