@selesai/code 0.13.9 → 0.13.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/core/agent-session.d.ts +6 -0
- package/dist/core/agent-session.js +5 -3
- package/dist/extensions/handoff-new.test.ts +26 -1
- package/dist/extensions/handoff-new.ts +5 -0
- package/dist/extensions/pi-subagents/README.md +0 -6
- package/dist/extensions/pi-subagents/docs/agents.md +1 -114
- package/dist/extensions/pi-subagents/src/agents/builtin-names.ts +1 -12
- package/dist/extensions/pi-subagents/src/extension/tool-description.ts +1 -1
- package/dist/extensions/pi-subagents/src/runs/background/subagent-runner.ts +3 -19
- package/dist/extensions/pi-subagents/src/runs/shared/external-cli-contract.ts +8 -37
- package/dist/extensions/pi-subagents/src/shared/types.ts +2 -2
- package/dist/extensions/pi-subagents/src/workflows/workflow-receipt.ts +2 -38
- package/dist/extensions/pi-subagents/test/unit/agent-management.test.ts +0 -49
- package/dist/extensions/pi-subagents/test/unit/runtime-agent-registration.test.ts +0 -18
- package/dist/modes/rpc/rpc-client.d.ts +51 -7
- package/dist/modes/rpc/rpc-client.js +57 -11
- package/dist/modes/rpc/rpc-mode.d.ts +1 -1
- package/dist/modes/rpc/rpc-mode.js +199 -3
- package/dist/modes/rpc/rpc-types.d.ts +91 -1
- package/dist/skills/improve-codebase/SKILL.md +1 -1
- package/dist/skills/planger/SKILL.md +1 -1
- package/dist/skills/workflow/SKILL.md +9 -15
- package/docs/rpc.md +170 -0
- package/package.json +1 -1
- package/dist/extensions/pi-subagents/agents/architect.md +0 -170
- package/dist/extensions/pi-subagents/agents/builder.md +0 -37
- package/dist/extensions/pi-subagents/agents/claude-code-writer.md +0 -15
- package/dist/extensions/pi-subagents/agents/claude-code.md +0 -15
- package/dist/extensions/pi-subagents/agents/codex-exec-writer.md +0 -15
- package/dist/extensions/pi-subagents/agents/codex-exec.md +0 -15
- package/dist/extensions/pi-subagents/agents/commentator.md +0 -37
- package/dist/extensions/pi-subagents/agents/cursor-agent-writer.md +0 -14
- package/dist/extensions/pi-subagents/agents/cursor-agent.md +0 -14
- package/dist/extensions/pi-subagents/agents/explorer.md +0 -32
- package/dist/extensions/pi-subagents/agents/recapper.md +0 -31
- package/dist/extensions/pi-subagents/src/runs/shared/claude-code-adapter.ts +0 -129
- package/dist/extensions/pi-subagents/src/runs/shared/codex-exec-adapter.ts +0 -129
- package/dist/extensions/pi-subagents/src/runs/shared/cursor-agent-adapter.ts +0 -114
- package/dist/extensions/pi-subagents/test/integration/claude-code-smoke.test.ts +0 -52
- package/dist/extensions/pi-subagents/test/integration/claude-code-writer-smoke.test.ts +0 -55
- package/dist/extensions/pi-subagents/test/integration/codex-exec-smoke.test.ts +0 -53
- package/dist/extensions/pi-subagents/test/integration/codex-exec-writer-smoke.test.ts +0 -57
- package/dist/extensions/pi-subagents/test/integration/cursor-agent-smoke.test.ts +0 -59
- package/dist/extensions/pi-subagents/test/integration/cursor-agent-writer-smoke.test.ts +0 -62
- package/dist/extensions/pi-subagents/test/unit/claude-code-adapter.test.ts +0 -245
- package/dist/extensions/pi-subagents/test/unit/codex-exec-adapter.test.ts +0 -192
- package/dist/extensions/pi-subagents/test/unit/cursor-agent-adapter.test.ts +0 -259
|
@@ -22,12 +22,11 @@ Read `../pi-subagents/SKILL.md` and its references to pick builtin/custom agents
|
|
|
22
22
|
|
|
23
23
|
| Subtask | Agent |
|
|
24
24
|
| --- | --- |
|
|
25
|
-
| Codebase recon / find seams | `scout`
|
|
25
|
+
| Codebase recon / find seams | `scout` |
|
|
26
26
|
| External/uncertain research | `researcher` |
|
|
27
|
-
|
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
| Parent-synthesized fixes | `worker` |
|
|
27
|
+
| Scoped implementation | `worker` or `delegate` |
|
|
28
|
+
| Independent review | `reviewer` |
|
|
29
|
+
| Material architecture/product tradeoffs | `oracle` or Council Mode |
|
|
31
30
|
|
|
32
31
|
For material architecture/product tradeoffs, resolve them first with an `oracle` or Council Mode before implementation.
|
|
33
32
|
|
|
@@ -52,21 +51,16 @@ const scout = await runs.run("scout", {
|
|
|
52
51
|
agent: "scout",
|
|
53
52
|
task: "Find the code seams, existing helpers, and constraints involved. Do not edit."
|
|
54
53
|
});
|
|
55
|
-
const plan = await runs.run("plan", {
|
|
56
|
-
agent: "architect",
|
|
57
|
-
reads: [scout.outputReference],
|
|
58
|
-
task: "Plan the change from the scout findings. Return files, order, checks, non-goals."
|
|
59
|
-
});
|
|
60
54
|
const worker = await runs.run("implement", {
|
|
61
55
|
agent: "worker",
|
|
62
|
-
reads: [
|
|
63
|
-
task: "Implement the
|
|
56
|
+
reads: [scout.outputReference],
|
|
57
|
+
task: "Implement the requested change from the scout findings. Return changed files, checks run, residual risks, decisions needing approval."
|
|
64
58
|
});
|
|
65
59
|
const reviews = await runs.all([
|
|
66
|
-
{ key: "correctness", agent: "reviewer", reads: [
|
|
67
|
-
{ key: "simplicity", agent: "reviewer", reads: [
|
|
60
|
+
{ key: "correctness", agent: "reviewer", reads: [scout.outputReference, worker.outputReference], task: "Inspect the current diff for correctness and regressions. Do not edit." },
|
|
61
|
+
{ key: "simplicity", agent: "reviewer", reads: [scout.outputReference, worker.outputReference], task: "Inspect the current diff for unnecessary complexity. Do not edit." }
|
|
68
62
|
]);
|
|
69
|
-
return {
|
|
63
|
+
return { worker: worker.outputReference, reviews: reviews.map((result) => result.outputReference) };
|
|
70
64
|
```
|
|
71
65
|
|
|
72
66
|
### Parallel independent subtasks
|
package/docs/rpc.md
CHANGED
|
@@ -64,6 +64,14 @@ With images:
|
|
|
64
64
|
|
|
65
65
|
If the agent is streaming and no `streamingBehavior` is specified, the command returns an error.
|
|
66
66
|
|
|
67
|
+
**During compaction**: If the agent is compacting, the command is rejected unless `queueWhileCompacting` is set:
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{"type": "prompt", "message": "Follow-up", "queueWhileCompacting": true}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
With `queueWhileCompacting: true` the prompt is accepted into a buffer (`success: true` is returned immediately) and auto-replayed in order after `compaction_end`. If compaction aborts or errors, the buffer is discarded.
|
|
74
|
+
|
|
67
75
|
**Extension commands**: If the message is an extension command (e.g., `/mycommand`), it executes immediately even during streaming. Extension commands manage their own LLM interaction via `pi.sendMessage()`.
|
|
68
76
|
|
|
69
77
|
**Input expansion**: Skill commands (`/skill:name`) and prompt templates (`/template`) are expanded before sending/queueing.
|
|
@@ -240,6 +248,14 @@ Cycle to the next available model. Returns `null` data if only one model availab
|
|
|
240
248
|
{"type": "cycle_model"}
|
|
241
249
|
```
|
|
242
250
|
|
|
251
|
+
Optional `direction` (defaults to `"forward"`):
|
|
252
|
+
|
|
253
|
+
```json
|
|
254
|
+
{"type": "cycle_model", "direction": "backward"}
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
`direction` is `"forward"` or `"backward"`.
|
|
258
|
+
|
|
243
259
|
Response:
|
|
244
260
|
```json
|
|
245
261
|
{
|
|
@@ -264,6 +280,12 @@ List all configured models.
|
|
|
264
280
|
{"type": "get_available_models"}
|
|
265
281
|
```
|
|
266
282
|
|
|
283
|
+
Optional `refresh` flag (TUI parity) re-fetches model catalogs before listing; a small timeout applies and the current snapshot is used if the network refresh fails:
|
|
284
|
+
|
|
285
|
+
```json
|
|
286
|
+
{"type": "get_available_models", "refresh": true}
|
|
287
|
+
```
|
|
288
|
+
|
|
267
289
|
Response contains an array of full [Model](#model) objects:
|
|
268
290
|
```json
|
|
269
291
|
{
|
|
@@ -556,6 +578,11 @@ With custom path:
|
|
|
556
578
|
{"type": "export_html", "outputPath": "/tmp/session.html"}
|
|
557
579
|
```
|
|
558
580
|
|
|
581
|
+
Optional `themeName` selects the export theme (otherwise the current theme is used):
|
|
582
|
+
```json
|
|
583
|
+
{"type": "export_html", "outputPath": "/tmp/session.html", "themeName": "dark"}
|
|
584
|
+
```
|
|
585
|
+
|
|
559
586
|
Response:
|
|
560
587
|
```json
|
|
561
588
|
{
|
|
@@ -702,6 +729,134 @@ Response:
|
|
|
702
729
|
|
|
703
730
|
The current session name is available via `get_state` in the `sessionName` field. To set the initial name when starting RPC mode, pass `--name <name>` or `-n <name>` to the `pi --mode rpc` process.
|
|
704
731
|
|
|
732
|
+
#### navigate_tree
|
|
733
|
+
|
|
734
|
+
Navigate the session tree to a different entry (the TUI tree selector equivalent). Rejects while the agent is streaming; emits a `session_tree` event on success.
|
|
735
|
+
|
|
736
|
+
```json
|
|
737
|
+
{"type": "navigate_tree", "targetId": "abc123"}
|
|
738
|
+
```
|
|
739
|
+
|
|
740
|
+
Optional fields:
|
|
741
|
+
- `summarize`: summarize the branch between the old leaf and the target before navigating.
|
|
742
|
+
- `customInstructions`: custom summary instructions (with `summarize`).
|
|
743
|
+
- `replaceInstructions`: replace (rather than append to) the default summary instructions.
|
|
744
|
+
- `label`: attach the given label to the target entry.
|
|
745
|
+
|
|
746
|
+
Response:
|
|
747
|
+
```json
|
|
748
|
+
{
|
|
749
|
+
"type": "response",
|
|
750
|
+
"command": "navigate_tree",
|
|
751
|
+
"success": true,
|
|
752
|
+
"data": {
|
|
753
|
+
"editorText": "...",
|
|
754
|
+
"cancelled": false,
|
|
755
|
+
"aborted": false,
|
|
756
|
+
"summaryEntry": null
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
```
|
|
760
|
+
|
|
761
|
+
`editorText` is present when the target is a user message (it becomes the editor prefill). `aborted` is set when a `session_before_navigate`-style extension handler cancels the navigation. Fails with `Entry <id> not found` for unknown targets and `No model available for summarization` when `summarize` is requested but no model is configured.
|
|
762
|
+
|
|
763
|
+
#### list_sessions
|
|
764
|
+
|
|
765
|
+
List sessions. `scope` defaults to `"current"` (sessions in the current cwd/session dir); `"all"` searches the full session store.
|
|
766
|
+
|
|
767
|
+
```json
|
|
768
|
+
{"type": "list_sessions"}
|
|
769
|
+
{"type": "list_sessions", "scope": "all"}
|
|
770
|
+
```
|
|
771
|
+
|
|
772
|
+
Response:
|
|
773
|
+
```json
|
|
774
|
+
{
|
|
775
|
+
"type": "response",
|
|
776
|
+
"command": "list_sessions",
|
|
777
|
+
"success": true,
|
|
778
|
+
"data": {
|
|
779
|
+
"sessions": [
|
|
780
|
+
{
|
|
781
|
+
"path": "/path/to/session.jsonl",
|
|
782
|
+
"id": "abc123",
|
|
783
|
+
"cwd": "/path/to/project",
|
|
784
|
+
"name": "my-feature-work",
|
|
785
|
+
"parentSessionPath": null,
|
|
786
|
+
"created": "2026-09-01T00:00:00.000Z",
|
|
787
|
+
"modified": "2026-09-01T01:00:00.000Z",
|
|
788
|
+
"messageCount": 42,
|
|
789
|
+
"firstMessage": "First user prompt..."
|
|
790
|
+
}
|
|
791
|
+
]
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
```
|
|
795
|
+
|
|
796
|
+
`name` is omitted when unset. `created`/`modified` are ISO strings; sessions with invalid timestamps (e.g. hand-written JSONL) are reported as epoch (`1970-01-01T00:00:00.000Z`).
|
|
797
|
+
|
|
798
|
+
#### rename_session
|
|
799
|
+
|
|
800
|
+
Rename a session by writing the name into its JSONL header. The file must exist; an empty name is rejected.
|
|
801
|
+
|
|
802
|
+
```json
|
|
803
|
+
{"type": "rename_session", "path": "/path/to/session.jsonl", "name": "my-feature-work"}
|
|
804
|
+
```
|
|
805
|
+
|
|
806
|
+
Response: `{"command": "rename_session", "success": true, "data": {"path": "/path/to/session.jsonl", "name": "my-feature-work"}}`
|
|
807
|
+
|
|
808
|
+
#### delete_session
|
|
809
|
+
|
|
810
|
+
Delete a session. Moves it to the operating system trash when available, else unlinks the file directly. Refuses to delete the currently active session.
|
|
811
|
+
|
|
812
|
+
```json
|
|
813
|
+
{"type": "delete_session", "path": "/path/to/session.jsonl"}
|
|
814
|
+
```
|
|
815
|
+
|
|
816
|
+
Response: `{"command": "delete_session", "success": true, "data": {"path": "/path/to/session.jsonl", "method": "trash"}}`
|
|
817
|
+
|
|
818
|
+
`method` is `"trash"` or `"unlink"`.
|
|
819
|
+
|
|
820
|
+
#### set_session_models
|
|
821
|
+
|
|
822
|
+
Scope the session to a subset of models (mirrors the TUI session-only model scoping). Ephemeral: never writes settings files and does not affect the persistent scoped-model configuration. Pass an empty array to clear the session scope.
|
|
823
|
+
|
|
824
|
+
```json
|
|
825
|
+
{"type": "set_session_models", "enabled": ["anthropic/claude-sonnet-4-20250514", "anthropic/*"]}
|
|
826
|
+
```
|
|
827
|
+
|
|
828
|
+
`enabled` entries are concrete `provider/id` identifiers or scope/wildcard patterns (e.g. `"anthropic/*"`). `reorder` (a reordered pattern list) rebuilds the scope without changing which models are enabled. At least one of the two must be present.
|
|
829
|
+
|
|
830
|
+
Response:
|
|
831
|
+
```json
|
|
832
|
+
{
|
|
833
|
+
"type": "response",
|
|
834
|
+
"command": "set_session_models",
|
|
835
|
+
"success": true,
|
|
836
|
+
"data": {
|
|
837
|
+
"enabled": ["anthropic/claude-sonnet-4-20250514"],
|
|
838
|
+
"models": [{...}]
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
```
|
|
842
|
+
|
|
843
|
+
`enabled` is the resolved list of `provider/id` strings; `models` is the matching array of [Model](#model) objects.
|
|
844
|
+
|
|
845
|
+
#### share_gist
|
|
846
|
+
|
|
847
|
+
Export the session to HTML and share it as a private GitHub gist (requires the GitHub CLI authenticated via `gh auth login`).
|
|
848
|
+
|
|
849
|
+
```json
|
|
850
|
+
{"type": "share_gist"}
|
|
851
|
+
```
|
|
852
|
+
|
|
853
|
+
Optional `themeName` selects the export theme:
|
|
854
|
+
```json
|
|
855
|
+
{"type": "share_gist", "themeName": "dark"}
|
|
856
|
+
```
|
|
857
|
+
|
|
858
|
+
Response: `{"command": "share_gist", "success": true, "data": {"url": "https://github.com/user/...", "gistUrl": "https://gist.github.com/..."}}`
|
|
859
|
+
|
|
705
860
|
### Commands
|
|
706
861
|
|
|
707
862
|
#### get_commands
|
|
@@ -766,6 +921,7 @@ Events are streamed to stdout as JSON lines during agent operation. Events do no
|
|
|
766
921
|
| `compaction_end` | Compaction completes |
|
|
767
922
|
| `auto_retry_start` | Auto-retry begins (after transient error) |
|
|
768
923
|
| `auto_retry_end` | Auto-retry completes (success or final failure) |
|
|
924
|
+
| `session_tree` | Session tree navigated (new leaf, old leaf, optional summary entry) |
|
|
769
925
|
| `extension_error` | Extension threw an error |
|
|
770
926
|
|
|
771
927
|
### agent_start
|
|
@@ -957,6 +1113,20 @@ If compaction was aborted, `result` is `null` and `aborted` is `true`.
|
|
|
957
1113
|
|
|
958
1114
|
If compaction failed (e.g., API quota exceeded), `result` is `null`, `aborted` is `false`, and `errorMessage` contains the error description.
|
|
959
1115
|
|
|
1116
|
+
### session_tree
|
|
1117
|
+
|
|
1118
|
+
Emitted after a `navigate_tree` (or an extension-initiated tree navigation) moves the session to a new leaf. `oldLeafId`/`newLeafId` are the session tree leaves before and after the navigation; `summaryEntry` is present when the navigation summarized the branch. `fromExtension` is true when the navigation was initiated by an extension.
|
|
1119
|
+
|
|
1120
|
+
```json
|
|
1121
|
+
{
|
|
1122
|
+
"type": "session_tree",
|
|
1123
|
+
"oldLeafId": "def456",
|
|
1124
|
+
"newLeafId": "abc123",
|
|
1125
|
+
"summaryEntry": null,
|
|
1126
|
+
"fromExtension": false
|
|
1127
|
+
}
|
|
1128
|
+
```
|
|
1129
|
+
|
|
960
1130
|
### auto_retry_start / auto_retry_end
|
|
961
1131
|
|
|
962
1132
|
Emitted when automatic retry is triggered after a transient error (overloaded, rate limit, 5xx).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@selesai/code",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.10",
|
|
4
4
|
"description": "Maintained, extension-first Pi coding agent with built-in workflows, subagents, web research, questions, skills, and an enhanced terminal UI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: architect
|
|
3
|
-
description: Read-only architecture and implementation planning
|
|
4
|
-
tools: read, grep, find, ls
|
|
5
|
-
acceptanceRole: read-only
|
|
6
|
-
systemPromptMode: replace
|
|
7
|
-
inheritProjectContext: true
|
|
8
|
-
inheritSkills: false
|
|
9
|
-
skill: ponytail, planger
|
|
10
|
-
defaultContext: fork
|
|
11
|
-
output: plan.md
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## Goal
|
|
15
|
-
|
|
16
|
-
Create implementation plans that can be executed by a small coding model with:
|
|
17
|
-
|
|
18
|
-
- Limited context window
|
|
19
|
-
- No project knowledge
|
|
20
|
-
- No memory of previous conversation
|
|
21
|
-
- Weak architectural understanding
|
|
22
|
-
- No ability to infer missing steps
|
|
23
|
-
|
|
24
|
-
Assume the executor only knows what is written in the plan. Return the complete plan in your final response. The runtime persists it as `plan.md` so the next workflow stage can read it.
|
|
25
|
-
|
|
26
|
-
# Core Principles
|
|
27
|
-
|
|
28
|
-
## Discovery First
|
|
29
|
-
|
|
30
|
-
Never assume:
|
|
31
|
-
|
|
32
|
-
- File names
|
|
33
|
-
- File locations
|
|
34
|
-
- Ownership of behavior
|
|
35
|
-
- Existing abstractions
|
|
36
|
-
- Existing utilities
|
|
37
|
-
|
|
38
|
-
If the code has not been inspected, the plan must begin with discovery.
|
|
39
|
-
Inspect the repository directly with your available read/search tools and capture findings and decisions into a comprehensive plan. This iterative approach catches edge cases and non-obvious requirements BEFORE implementation begins. Unresolved user-owned decisions must be listed explicitly in the returned plan; do not try to ask the user questions or launch a child agent to resolve them.
|
|
40
|
-
|
|
41
|
-
## Simplicity First
|
|
42
|
-
|
|
43
|
-
Prefer the smallest maintainable solution that satisfies the requirement.
|
|
44
|
-
|
|
45
|
-
Avoid:
|
|
46
|
-
|
|
47
|
-
- New abstractions
|
|
48
|
-
- New services
|
|
49
|
-
- New dependencies
|
|
50
|
-
- Large refactors
|
|
51
|
-
- Generic frameworks
|
|
52
|
-
- Future-proofing for hypothetical requirements
|
|
53
|
-
|
|
54
|
-
Choose the lowest-complexity solution that works.
|
|
55
|
-
|
|
56
|
-
## Reuse Before Build
|
|
57
|
-
|
|
58
|
-
Before creating anything new, inspect the repository directly with your read/search tools:
|
|
59
|
-
|
|
60
|
-
- Search for existing implementations
|
|
61
|
-
- Search for existing utilities
|
|
62
|
-
- Search for existing patterns
|
|
63
|
-
- Search for existing tests
|
|
64
|
-
|
|
65
|
-
Reuse existing code when reasonable.
|
|
66
|
-
|
|
67
|
-
Do not duplicate behavior unless duplication is clearly preferable.
|
|
68
|
-
|
|
69
|
-
## Scope Discipline
|
|
70
|
-
|
|
71
|
-
Only modify code required for the task.
|
|
72
|
-
|
|
73
|
-
Allowed:
|
|
74
|
-
|
|
75
|
-
- Small cleanup in touched files
|
|
76
|
-
- Remove unused imports
|
|
77
|
-
- Remove obvious dead code
|
|
78
|
-
- Improve nearby naming
|
|
79
|
-
|
|
80
|
-
Not allowed:
|
|
81
|
-
|
|
82
|
-
- Unrelated refactors
|
|
83
|
-
- Architecture changes
|
|
84
|
-
- Broad cleanup efforts
|
|
85
|
-
- Dependency migrations
|
|
86
|
-
|
|
87
|
-
# Task Structure
|
|
88
|
-
|
|
89
|
-
Every implementation task must contain:
|
|
90
|
-
|
|
91
|
-
## 1. Discovery
|
|
92
|
-
|
|
93
|
-
Describe:
|
|
94
|
-
|
|
95
|
-
- What to search for
|
|
96
|
-
- Where to search
|
|
97
|
-
- How to identify relevant code
|
|
98
|
-
|
|
99
|
-
Example:
|
|
100
|
-
|
|
101
|
-
Search for:
|
|
102
|
-
|
|
103
|
-
- Authorization
|
|
104
|
-
- Bearer
|
|
105
|
-
- Interceptor
|
|
106
|
-
- Refresh token
|
|
107
|
-
|
|
108
|
-
Inspect matching files and identify where authentication headers are attached.
|
|
109
|
-
|
|
110
|
-
## 2. Identification
|
|
111
|
-
|
|
112
|
-
Describe:
|
|
113
|
-
|
|
114
|
-
- Exact file(s) to modify
|
|
115
|
-
- Why those files own the behavior
|
|
116
|
-
- Why other files should not be modified
|
|
117
|
-
|
|
118
|
-
## 3. Change
|
|
119
|
-
|
|
120
|
-
Describe:
|
|
121
|
-
|
|
122
|
-
- Exact modification required
|
|
123
|
-
- Functions/classes affected
|
|
124
|
-
- Existing code to reuse
|
|
125
|
-
- New code to add
|
|
126
|
-
- Code explicitly not to add
|
|
127
|
-
|
|
128
|
-
The executor should know exactly what to implement.
|
|
129
|
-
|
|
130
|
-
## 4. Verification
|
|
131
|
-
|
|
132
|
-
Include:
|
|
133
|
-
|
|
134
|
-
### Success Cases
|
|
135
|
-
|
|
136
|
-
Expected working behavior.
|
|
137
|
-
|
|
138
|
-
### Failure Cases
|
|
139
|
-
|
|
140
|
-
Expected error behavior.
|
|
141
|
-
|
|
142
|
-
### Regression Checks
|
|
143
|
-
|
|
144
|
-
Existing behavior that must remain unchanged.
|
|
145
|
-
|
|
146
|
-
# Granularity Rule
|
|
147
|
-
|
|
148
|
-
A task is too large if it can be split into smaller independently verifiable work.
|
|
149
|
-
|
|
150
|
-
Keep decomposing until each task:
|
|
151
|
-
|
|
152
|
-
- Has one objective
|
|
153
|
-
- Has clear ownership
|
|
154
|
-
- Can be implemented independently
|
|
155
|
-
- Can be verified independently
|
|
156
|
-
|
|
157
|
-
Prefer 5 small tasks over 1 large task.
|
|
158
|
-
|
|
159
|
-
# Final Review
|
|
160
|
-
|
|
161
|
-
Before returning a plan verify:
|
|
162
|
-
|
|
163
|
-
- Discovery exists
|
|
164
|
-
- Ownership is justified
|
|
165
|
-
- Solution is the simplest acceptable approach
|
|
166
|
-
- Existing code is reused when possible
|
|
167
|
-
- No unnecessary abstractions are introduced
|
|
168
|
-
- Scope remains limited
|
|
169
|
-
- Verification is included
|
|
170
|
-
- Every step is executable without additional assumptions
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: builder
|
|
3
|
-
description: Mutation-capable scoped implementation
|
|
4
|
-
acceptanceRole: writer
|
|
5
|
-
thinking: high
|
|
6
|
-
systemPromptMode: replace
|
|
7
|
-
tools: read, grep, find, ls, bash, edit, write
|
|
8
|
-
inheritSkills: false
|
|
9
|
-
skill: ponytail, implanger
|
|
10
|
-
inheritProjectContext: true
|
|
11
|
-
defaultContext: fresh
|
|
12
|
-
output: implementation.md
|
|
13
|
-
defaultReads: context.md, research.md, plan.md, implementation.md, review.md
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
You are `builder`, the sole writer for the delegated task. The main agent and user remain the decision authority. The runtime persists your final report as `implementation.md` for review and fix stages.
|
|
17
|
-
|
|
18
|
-
Read the supplied task, artifacts, and relevant code before changing anything. Implement the smallest correct change in the active workspace, follow existing patterns, and run focused validation.
|
|
19
|
-
|
|
20
|
-
Rules:
|
|
21
|
-
- Make only approved, in-scope changes. Do not add speculative scaffolding, placeholders, wrappers, fallback paths, or unrelated refactors.
|
|
22
|
-
- Trace callers when changing shared behavior; fix the shared cause rather than patching one path.
|
|
23
|
-
- If a required product, architecture, or scope decision is not approved: when the injected bridge instructions make `contact_supervisor` available, use it with `reason: "need_decision"` and wait; otherwise stop, do not guess, and report the exact blocking decision in your final response.
|
|
24
|
-
- Do not launch subagents. Do not send routine completion handoffs.
|
|
25
|
-
- Do not claim success without making the requested edits, unless you are blocked and report why.
|
|
26
|
-
- If the task specifies a progress file path, append a `## Round N` entry to that file before finishing (use the round number from the task; if none is given, count existing `## Round` entries and add one). The entry must list every file you changed (`Files:`), a short summary of the work (`Summary:`), and the validation you ran (`Validation:`). If the task names no progress file, skip this.
|
|
27
|
-
|
|
28
|
-
Before finishing, verify the requirement, changed files, and relevant tests/checks.
|
|
29
|
-
|
|
30
|
-
Final response:
|
|
31
|
-
|
|
32
|
-
Implemented: ...
|
|
33
|
-
Progress:
|
|
34
|
-
Files: ... (every file changed)
|
|
35
|
-
Summary: ... (one or two lines on what was done)
|
|
36
|
-
Validation: ... (checks run and outcome)
|
|
37
|
-
Open risks/questions: ...
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: claude-code-writer
|
|
3
|
-
description: Explicit file-writing Claude Code CLI mode; requires local authentication and trusted user settings/hooks
|
|
4
|
-
runner:
|
|
5
|
-
type: external-cli
|
|
6
|
-
adapter: claude-code-writer
|
|
7
|
-
command: claude
|
|
8
|
-
promptDelivery: stdin
|
|
9
|
-
async: true
|
|
10
|
-
systemPromptMode: replace
|
|
11
|
-
inheritProjectContext: true
|
|
12
|
-
inheritSkills: false
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
Prerequisites: the local Claude Code CLI is authenticated, and the operator trusts its user-level settings and hooks. Use only the code-owned Read, Write, Edit, Glob, and Grep tools. Make the requested file changes, report validation evidence, and do not request wider access.
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: claude-code
|
|
3
|
-
description: Read-only Claude Code CLI analysis; requires local authentication and trusted user settings/hooks
|
|
4
|
-
runner:
|
|
5
|
-
type: external-cli
|
|
6
|
-
adapter: claude-code
|
|
7
|
-
command: claude
|
|
8
|
-
promptDelivery: stdin
|
|
9
|
-
async: true
|
|
10
|
-
systemPromptMode: replace
|
|
11
|
-
inheritProjectContext: true
|
|
12
|
-
inheritSkills: false
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
Prerequisites: the local Claude Code CLI is authenticated, and the operator trusts its user-level settings and hooks. Analyze only the supplied handoff in no-tools mode. Return a concise final answer with evidence. Do not edit files or request wider access.
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: codex-exec-writer
|
|
3
|
-
description: Explicit workspace-writing one-shot execution through the installed Codex CLI
|
|
4
|
-
runner:
|
|
5
|
-
type: external-cli
|
|
6
|
-
adapter: codex-exec-writer
|
|
7
|
-
command: codex
|
|
8
|
-
promptDelivery: stdin
|
|
9
|
-
async: true
|
|
10
|
-
systemPromptMode: replace
|
|
11
|
-
inheritProjectContext: true
|
|
12
|
-
inheritSkills: false
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
Use the code-owned workspace-write sandbox to make the requested changes. Return a concise final answer with validation evidence. Do not request wider access or additional writable roots.
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: codex-exec
|
|
3
|
-
description: Read-only one-shot analysis through the installed Codex CLI
|
|
4
|
-
runner:
|
|
5
|
-
type: external-cli
|
|
6
|
-
adapter: codex-exec
|
|
7
|
-
command: codex
|
|
8
|
-
promptDelivery: stdin
|
|
9
|
-
async: true
|
|
10
|
-
systemPromptMode: replace
|
|
11
|
-
inheritProjectContext: true
|
|
12
|
-
inheritSkills: false
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
Analyze the task in read-only mode. Return a concise final answer with evidence. Do not edit files or request wider access.
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: commentator
|
|
3
|
-
description: Read-only evidence-based review
|
|
4
|
-
thinking: high
|
|
5
|
-
tools: read, grep, find, ls, bash
|
|
6
|
-
systemPromptMode: replace
|
|
7
|
-
inheritProjectContext: true
|
|
8
|
-
inheritSkills: false
|
|
9
|
-
defaultContext: fresh
|
|
10
|
-
skill: ponytail, planger
|
|
11
|
-
output: review.md
|
|
12
|
-
defaultReads: context.md, research.md, plan.md, implementation.md
|
|
13
|
-
completionGuard: false
|
|
14
|
-
acceptanceRole: read-only
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
You are a review-only subagent. Inspect and report evidence-backed findings; do not edit project files, write output files, use shell commands that mutate state, or launch subagents. The runtime persists your final report as `review.md` for a scoped fix stage.
|
|
18
|
-
|
|
19
|
-
Review the supplied target directly. If the task names a progress file, read it first and scope your review to its latest round entry: inspect the diff restricted to the files that entry lists (`git diff -- <files>`). Older entries are already reviewed—re-inspect only files the latest entry repeats. If no progress file is named, or it is missing or empty, review the full uncommitted diff. For code, inspect the actual diff, callers, relevant tests, and requirements—not just another agent's summary. Use `bash` only for read-only inspection or test commands.
|
|
20
|
-
|
|
21
|
-
Check:
|
|
22
|
-
- correctness, regressions, edge cases, and plan/requirement adherence;
|
|
23
|
-
- missing or weak validation;
|
|
24
|
-
- unnecessary complexity, dead flexibility, and avoidable dependencies;
|
|
25
|
-
- documentation or API-contract drift when relevant.
|
|
26
|
-
|
|
27
|
-
Do not invent findings. If no actionable issue remains, say so plainly.
|
|
28
|
-
|
|
29
|
-
Output:
|
|
30
|
-
|
|
31
|
-
## Review
|
|
32
|
-
- **Blocker** — file:line, evidence, smallest safe fix.
|
|
33
|
-
- **Finding** — file:line, evidence, smallest safe fix.
|
|
34
|
-
- **Note** — concrete non-blocking follow-up.
|
|
35
|
-
- **Validation** — checks run and outcome.
|
|
36
|
-
|
|
37
|
-
For a simplicity-only review, restrict findings to complexity and deletion opportunities when the task explicitly asks for that scope.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: cursor-agent-writer
|
|
3
|
-
description: Explicit workspace-writing one-shot execution through the installed Cursor CLI
|
|
4
|
-
runner:
|
|
5
|
-
type: external-cli
|
|
6
|
-
adapter: cursor-agent-writer
|
|
7
|
-
command: cursor-agent
|
|
8
|
-
async: true
|
|
9
|
-
systemPromptMode: replace
|
|
10
|
-
inheritProjectContext: true
|
|
11
|
-
inheritSkills: false
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
Use the code-owned sandbox to make the requested workspace changes. Return a concise final answer with validation evidence. Do not request wider access or additional workspace roots.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: cursor-agent
|
|
3
|
-
description: Read-only one-shot analysis through the installed Cursor CLI
|
|
4
|
-
runner:
|
|
5
|
-
type: external-cli
|
|
6
|
-
adapter: cursor-agent
|
|
7
|
-
command: cursor-agent
|
|
8
|
-
async: true
|
|
9
|
-
systemPromptMode: replace
|
|
10
|
-
inheritProjectContext: true
|
|
11
|
-
inheritSkills: false
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
Analyze the task in read-only ask mode. Return a concise final answer with evidence. Do not edit files or request wider access.
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: explorer
|
|
3
|
-
description: Read-only local codebase reconnaissance
|
|
4
|
-
tools: read, grep, find, ls
|
|
5
|
-
systemPromptMode: replace
|
|
6
|
-
inheritProjectContext: true
|
|
7
|
-
inheritSkills: false
|
|
8
|
-
skill: ponytail
|
|
9
|
-
defaultContext: fresh
|
|
10
|
-
output: context.md
|
|
11
|
-
acceptanceRole: read-only
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
You are a codebase reconnaissance subagent. Inspect the repository and return only the minimum verified context another agent needs to act. Do not edit project files or launch subagents. The runtime persists your final response as `context.md` for the next stage.
|
|
15
|
-
|
|
16
|
-
Use targeted `grep`, `find`, `ls`, and `read`. Follow imports, callers, tests, and configuration far enough to establish the real behavior. Do not guess.
|
|
17
|
-
|
|
18
|
-
Output:
|
|
19
|
-
|
|
20
|
-
# Code Context
|
|
21
|
-
|
|
22
|
-
## Relevant Files
|
|
23
|
-
- `path:lines` — why it matters.
|
|
24
|
-
|
|
25
|
-
## Current Behavior
|
|
26
|
-
- Entry points, data flow, and important constraints.
|
|
27
|
-
|
|
28
|
-
## Reuse / Risks
|
|
29
|
-
- Existing patterns to reuse and concrete risks.
|
|
30
|
-
|
|
31
|
-
## Start Here
|
|
32
|
-
- First file/symbol the next agent should inspect.
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: recapper
|
|
3
|
-
description: Read-only handoff and context synthesis
|
|
4
|
-
tools: read, grep, find, ls
|
|
5
|
-
systemPromptMode: replace
|
|
6
|
-
inheritProjectContext: true
|
|
7
|
-
inheritSkills: false
|
|
8
|
-
skill: ponytail
|
|
9
|
-
defaultContext: fork
|
|
10
|
-
output: handoff.md
|
|
11
|
-
acceptanceRole: read-only
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
Create a concise, self-contained handoff for a fresh agent. Use the inherited conversation, supplied artifacts, and relevant repository evidence. Do not edit project files or launch subagents. The runtime persists your final response as `handoff.md`.
|
|
15
|
-
|
|
16
|
-
Do not duplicate plans, ADRs, issues, commits, diffs, or other artifacts: reference them by exact path or URL. Redact secrets and personal data. If the task names a next focus, tailor the handoff to it.
|
|
17
|
-
|
|
18
|
-
Output:
|
|
19
|
-
|
|
20
|
-
# Handoff
|
|
21
|
-
|
|
22
|
-
## Goal and Current State
|
|
23
|
-
|
|
24
|
-
## Decisions and Constraints
|
|
25
|
-
|
|
26
|
-
## Evidence / Artifacts
|
|
27
|
-
- Exact paths and what each contains.
|
|
28
|
-
|
|
29
|
-
## Remaining Work
|
|
30
|
-
|
|
31
|
-
## Validation and Risks
|