@selesai/code 0.13.9 → 0.13.11

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.
Files changed (50) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/core/agent-session.d.ts +6 -0
  3. package/dist/core/agent-session.js +5 -3
  4. package/dist/extensions/handoff-new.test.ts +26 -1
  5. package/dist/extensions/handoff-new.ts +8 -0
  6. package/dist/extensions/herdr-agent-state.ts +310 -0
  7. package/dist/extensions/package.json +1 -0
  8. package/dist/extensions/pi-subagents/README.md +0 -6
  9. package/dist/extensions/pi-subagents/docs/agents.md +1 -114
  10. package/dist/extensions/pi-subagents/src/agents/builtin-names.ts +1 -12
  11. package/dist/extensions/pi-subagents/src/extension/tool-description.ts +1 -1
  12. package/dist/extensions/pi-subagents/src/runs/background/subagent-runner.ts +3 -19
  13. package/dist/extensions/pi-subagents/src/runs/shared/external-cli-contract.ts +8 -37
  14. package/dist/extensions/pi-subagents/src/shared/types.ts +2 -2
  15. package/dist/extensions/pi-subagents/src/workflows/workflow-receipt.ts +2 -38
  16. package/dist/extensions/pi-subagents/test/unit/agent-management.test.ts +0 -49
  17. package/dist/extensions/pi-subagents/test/unit/runtime-agent-registration.test.ts +0 -18
  18. package/dist/modes/rpc/rpc-client.d.ts +59 -7
  19. package/dist/modes/rpc/rpc-client.js +65 -11
  20. package/dist/modes/rpc/rpc-mode.d.ts +1 -1
  21. package/dist/modes/rpc/rpc-mode.js +280 -12
  22. package/dist/modes/rpc/rpc-types.d.ts +128 -1
  23. package/dist/skills/improve-codebase/SKILL.md +1 -1
  24. package/dist/skills/planger/SKILL.md +1 -1
  25. package/dist/skills/workflow/SKILL.md +9 -15
  26. package/docs/rpc.md +226 -2
  27. package/package.json +1 -1
  28. package/dist/extensions/pi-subagents/agents/architect.md +0 -170
  29. package/dist/extensions/pi-subagents/agents/builder.md +0 -37
  30. package/dist/extensions/pi-subagents/agents/claude-code-writer.md +0 -15
  31. package/dist/extensions/pi-subagents/agents/claude-code.md +0 -15
  32. package/dist/extensions/pi-subagents/agents/codex-exec-writer.md +0 -15
  33. package/dist/extensions/pi-subagents/agents/codex-exec.md +0 -15
  34. package/dist/extensions/pi-subagents/agents/commentator.md +0 -37
  35. package/dist/extensions/pi-subagents/agents/cursor-agent-writer.md +0 -14
  36. package/dist/extensions/pi-subagents/agents/cursor-agent.md +0 -14
  37. package/dist/extensions/pi-subagents/agents/explorer.md +0 -32
  38. package/dist/extensions/pi-subagents/agents/recapper.md +0 -31
  39. package/dist/extensions/pi-subagents/src/runs/shared/claude-code-adapter.ts +0 -129
  40. package/dist/extensions/pi-subagents/src/runs/shared/codex-exec-adapter.ts +0 -129
  41. package/dist/extensions/pi-subagents/src/runs/shared/cursor-agent-adapter.ts +0 -114
  42. package/dist/extensions/pi-subagents/test/integration/claude-code-smoke.test.ts +0 -52
  43. package/dist/extensions/pi-subagents/test/integration/claude-code-writer-smoke.test.ts +0 -55
  44. package/dist/extensions/pi-subagents/test/integration/codex-exec-smoke.test.ts +0 -53
  45. package/dist/extensions/pi-subagents/test/integration/codex-exec-writer-smoke.test.ts +0 -57
  46. package/dist/extensions/pi-subagents/test/integration/cursor-agent-smoke.test.ts +0 -59
  47. package/dist/extensions/pi-subagents/test/integration/cursor-agent-writer-smoke.test.ts +0 -62
  48. package/dist/extensions/pi-subagents/test/unit/claude-code-adapter.test.ts +0 -245
  49. package/dist/extensions/pi-subagents/test/unit/codex-exec-adapter.test.ts +0 -192
  50. package/dist/extensions/pi-subagents/test/unit/cursor-agent-adapter.test.ts +0 -259
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
@@ -742,6 +897,38 @@ Each command has:
742
897
 
743
898
  **Note**: Built-in TUI commands (`/settings`, `/hotkeys`, etc.) are included with `source: "builtin"` and `interactiveOnly: true`. They are display-only: they are handled only in interactive mode and would not execute if sent via `prompt`.
744
899
 
900
+ #### get_skills
901
+
902
+ Get the resolved skill catalog (one entry per discovered skill with its effective enablement) plus the raw `settings.skills` patterns for round-trip toggling. Enables the extension to mirror the TUI `/skills` toggle surface without reimplementing `isEnabledByOverrides` semantics.
903
+
904
+ ```json
905
+ {"type": "get_skills"}
906
+ ```
907
+
908
+ Response:
909
+ ```json
910
+ {
911
+ "type": "response",
912
+ "command": "get_skills",
913
+ "success": true,
914
+ "data": {
915
+ "skills": [
916
+ {"name": "fix-tests", "description": "Fix failing tests", "scope": "global", "pattern": "fix-tests", "enabled": true}
917
+ ],
918
+ "patterns": ["+fix-tests", "-legacy-skill"]
919
+ }
920
+ }
921
+ ```
922
+
923
+ Each skill entry has:
924
+ - `name`: Skill name (frontmatter `name`, falling back to the SKILL.md parent directory name)
925
+ - `description`: Frontmatter description (optional)
926
+ - `scope`: `"global"` (user-level) or `"project"` (project-level)
927
+ - `pattern`: Path relative to the skill base dir — the same pattern the TUI writes as `+pattern`/`-pattern` into `settings.skills`
928
+ - `enabled`: Resolved enablement per `isEnabledByOverrides` semantics (package-manager.ts)
929
+
930
+ `patterns` is the raw merged `global + project` `settings.skills` array. To toggle a skill, write `set_settings {scope, values:{skills:[...]}}` with `+pattern`/`-pattern` entries applied, then send `reload` (the TUI reloads after every toggle).
931
+
745
932
  ## Events
746
933
 
747
934
  Events are streamed to stdout as JSON lines during agent operation. Events do not generally include an `id` field; `bash_execution_update` includes the `id` of its originating `bash` command when one was provided.
@@ -766,6 +953,7 @@ Events are streamed to stdout as JSON lines during agent operation. Events do no
766
953
  | `compaction_end` | Compaction completes |
767
954
  | `auto_retry_start` | Auto-retry begins (after transient error) |
768
955
  | `auto_retry_end` | Auto-retry completes (success or final failure) |
956
+ | `session_tree` | Session tree navigated (new leaf, old leaf, optional summary entry) |
769
957
  | `extension_error` | Extension threw an error |
770
958
 
771
959
  ### agent_start
@@ -957,6 +1145,20 @@ If compaction was aborted, `result` is `null` and `aborted` is `true`.
957
1145
 
958
1146
  If compaction failed (e.g., API quota exceeded), `result` is `null`, `aborted` is `false`, and `errorMessage` contains the error description.
959
1147
 
1148
+ ### session_tree
1149
+
1150
+ 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.
1151
+
1152
+ ```json
1153
+ {
1154
+ "type": "session_tree",
1155
+ "oldLeafId": "def456",
1156
+ "newLeafId": "abc123",
1157
+ "summaryEntry": null,
1158
+ "fromExtension": false
1159
+ }
1160
+ ```
1161
+
960
1162
  ### auto_retry_start / auto_retry_end
961
1163
 
962
1164
  Emitted when automatic retry is triggered after a transient error (overloaded, rate limit, 5xx).
@@ -1009,13 +1211,13 @@ Extensions can request user interaction via `ctx.ui.select()`, `ctx.ui.confirm()
1009
1211
  There are two categories of extension UI methods:
1010
1212
 
1011
1213
  - **Dialog methods** (`select`, `multiselect`, `confirm`, `input`, `editor`): emit an `extension_ui_request` on stdout and block until the client sends back an `extension_ui_response` on stdin with the matching `id`.
1012
- - **Fire-and-forget methods** (`notify`, `setStatus`, `setWidget`, `setTitle`, `set_editor_text`): emit an `extension_ui_request` on stdout but do not expect a response. The client can display the information or ignore it.
1214
+ - **Fire-and-forget methods** (`notify`, `setStatus`, `setWidget`, `setTitle`, `set_editor_text`, `working`): emit an `extension_ui_request` on stdout but do not expect a response. The client can display the information or ignore it.
1013
1215
 
1014
1216
  If a dialog method includes a `timeout` field, the agent-side will auto-resolve with a default value when the timeout expires. The client does not need to track timeouts.
1015
1217
 
1016
1218
  Some `ExtensionUIContext` methods are not supported or degraded in RPC mode because they require direct TUI access:
1017
1219
  - `custom()` returns `undefined`
1018
- - `setWorkingMessage()`, `setWorkingIndicator()`, `setFooter()`, `setHeader()`, `setEditorComponent()`, `setToolsExpanded()` are no-ops
1220
+ - `setWorkingMessage()`, `setWorkingVisible()`, `setWorkingIndicator()` emit a `working` extension_ui_request (see below); `setFooter()`, `setHeader()`, `setEditorComponent()`, `setToolsExpanded()` are no-ops
1019
1221
  - `getEditorText()` returns `""`
1020
1222
  - `getToolsExpanded()` returns `false`
1021
1223
  - `pasteToEditor()` delegates to `setEditorText()` (no paste/collapse handling)
@@ -1187,6 +1389,28 @@ Set the text in the input editor. Fire-and-forget.
1187
1389
  }
1188
1390
  ```
1189
1391
 
1392
+ #### working
1393
+
1394
+ Control the streaming "working" loader row. Fire-and-forget; the host renders the loader. This mirrors the TUI's `setWorkingMessage()` / `setWorkingVisible()` / `setWorkingIndicator()` extension methods.
1395
+
1396
+ ```json
1397
+ {
1398
+ "type": "extension_ui_request",
1399
+ "id": "uuid-10",
1400
+ "method": "working",
1401
+ "message": "Analyzing repository...",
1402
+ "visible": true,
1403
+ "frames": ["⠋", "⠙", "⠹"],
1404
+ "intervalMs": 80
1405
+ }
1406
+ ```
1407
+
1408
+ Fields (all optional, applied as a patch):
1409
+ - `message`: phase text shown next to the loader. Omit to keep (or restore to default).
1410
+ - `visible`: show/hide the loader row.
1411
+ - `frames`: custom animation frames for the normal streaming loader. An empty array hides the indicator; omitting restores the default spinner. Compaction/retry loaders keep their built-in styling.
1412
+ - `intervalMs`: frame interval in milliseconds for animated indicators.
1413
+
1190
1414
  ### Extension UI Responses (stdin)
1191
1415
 
1192
1416
  Responses are sent for dialog methods only (`select`, `multiselect`, `confirm`, `input`, `editor`). The `id` must match the request.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@selesai/code",
3
- "version": "0.13.9",
3
+ "version": "0.13.11",
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.