cortex-agents 4.0.3 → 4.0.4
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/.opencode/agents/architect.md +26 -19
- package/.opencode/agents/implement.md +11 -13
- package/README.md +4 -5
- package/dist/tools/plan.d.ts +4 -6
- package/dist/tools/plan.d.ts.map +1 -1
- package/dist/tools/plan.js +31 -79
- package/package.json +1 -1
|
@@ -22,6 +22,7 @@ tools:
|
|
|
22
22
|
session_save: true
|
|
23
23
|
session_list: true
|
|
24
24
|
branch_status: true
|
|
25
|
+
branch_create: true
|
|
25
26
|
docs_list: true
|
|
26
27
|
github_status: true
|
|
27
28
|
github_issues: true
|
|
@@ -110,39 +111,44 @@ Use `plan_save` with:
|
|
|
110
111
|
- Full plan content including mermaid diagrams
|
|
111
112
|
- Task list
|
|
112
113
|
|
|
113
|
-
### Step 4.5: Commit Plan
|
|
114
|
+
### Step 4.5: Commit Plan (MANDATORY)
|
|
114
115
|
|
|
115
|
-
**After saving the plan**, commit
|
|
116
|
+
**After saving the plan**, commit the `.cortex/` artifacts on the current branch:
|
|
116
117
|
|
|
117
118
|
1. Call `plan_commit` with the plan filename from Step 4
|
|
118
119
|
2. This automatically:
|
|
119
|
-
-
|
|
120
|
-
-
|
|
120
|
+
- Computes a suggested branch name (`feature/`, `bugfix/`, `refactor/`, or `docs/` prefix based on plan type)
|
|
121
|
+
- Writes the suggested branch into the plan frontmatter as `branch: feature/xyz`
|
|
121
122
|
- Stages all `.cortex/` artifacts
|
|
122
123
|
- Commits with `chore(plan): {title}`
|
|
123
|
-
3.
|
|
124
|
-
4. Report the branch name to the user
|
|
124
|
+
3. **No branch is created** — the plan is committed on the current branch. Branch creation happens during handoff.
|
|
125
|
+
4. Report the suggested branch name to the user
|
|
125
126
|
|
|
126
|
-
**If plan_commit fails** (e.g.,
|
|
127
|
+
**If plan_commit fails** (e.g., nothing to stage), inform the user.
|
|
127
128
|
|
|
128
129
|
### Step 5: Handoff to Implementation
|
|
129
|
-
**After committing the plan**, offer the user options to proceed
|
|
130
|
+
**After committing the plan**, offer the user options to proceed. Note the **suggested branch** from plan_commit output.
|
|
130
131
|
|
|
131
|
-
"Plan committed
|
|
132
|
+
"Plan committed. Suggested branch: `{suggestedBranch}`. How would you like to proceed?"
|
|
132
133
|
|
|
133
|
-
1. **Create a worktree (Recommended)** — Create an isolated worktree
|
|
134
|
-
2. **
|
|
134
|
+
1. **Create a worktree (Recommended)** — Create an isolated worktree with the suggested branch, then switch to Implement
|
|
135
|
+
2. **Continue in this session** — Create the branch here, then switch to Implement agent
|
|
135
136
|
3. **Stay in Architect mode** — Continue planning or refine the plan
|
|
136
137
|
|
|
137
|
-
If the user chooses "Create a worktree"
|
|
138
|
-
- Use `worktree_create` with `
|
|
138
|
+
If the user chooses **"Create a worktree"**:
|
|
139
|
+
- Use `worktree_create` with `name` derived from the suggested branch slug and `type` from the plan type
|
|
139
140
|
- Report the worktree path so the user can navigate to it
|
|
140
141
|
- Suggest: "Navigate to the worktree and run OpenCode with the Implement agent to begin implementation"
|
|
141
142
|
|
|
143
|
+
If the user chooses **"Continue in this session"**:
|
|
144
|
+
- Use `branch_create` with the suggested branch name (type and name from the plan)
|
|
145
|
+
- This creates and switches to the new branch
|
|
146
|
+
- Then switch to the Implement agent
|
|
147
|
+
|
|
142
148
|
### Step 6: Provide Handoff Context
|
|
143
149
|
If user chooses to switch agents, provide:
|
|
144
150
|
- Plan file location
|
|
145
|
-
- **
|
|
151
|
+
- **Branch name** (the one just created during handoff)
|
|
146
152
|
- Key tasks to implement first
|
|
147
153
|
- Critical decisions to follow
|
|
148
154
|
|
|
@@ -156,7 +162,7 @@ If user chooses to switch agents, provide:
|
|
|
156
162
|
- Think about scalability, maintainability, and performance
|
|
157
163
|
- Never write or modify code files — only analyze and advise
|
|
158
164
|
- Always save plans for future reference
|
|
159
|
-
- Always commit plans
|
|
165
|
+
- Always commit plans via plan_commit for persistence
|
|
160
166
|
|
|
161
167
|
## Skill Loading (load based on plan topic)
|
|
162
168
|
|
|
@@ -264,8 +270,8 @@ sequenceDiagram
|
|
|
264
270
|
## Suggested Branch Name
|
|
265
271
|
`feature/[descriptive-name]` or `refactor/[descriptive-name]`
|
|
266
272
|
|
|
267
|
-
> **Note**:
|
|
268
|
-
> The branch
|
|
273
|
+
> **Note**: `plan_commit` writes a suggested branch name into the plan frontmatter as `branch: feature/xyz`.
|
|
274
|
+
> The actual branch is created during the handoff step (Step 5), not during plan_commit.
|
|
269
275
|
```
|
|
270
276
|
|
|
271
277
|
---
|
|
@@ -300,7 +306,7 @@ sequenceDiagram
|
|
|
300
306
|
- You CANNOT launch implementation sub-agents (@testing, @audit, @devops, @refactor, @docs-writer)
|
|
301
307
|
- You can only read, search, and analyze
|
|
302
308
|
- You CAN save plans to .cortex/plans/
|
|
303
|
-
- You CAN commit plans
|
|
309
|
+
- You CAN commit plans via `plan_commit` (stages + commits .cortex/ on the current branch, no branch creation)
|
|
304
310
|
- Always ask clarifying questions when requirements are unclear
|
|
305
311
|
|
|
306
312
|
## Tool Usage
|
|
@@ -310,9 +316,10 @@ sequenceDiagram
|
|
|
310
316
|
- `plan_save` - Save implementation plan
|
|
311
317
|
- `plan_list` - List existing plans
|
|
312
318
|
- `plan_load` - Load a saved plan
|
|
313
|
-
- `plan_commit` -
|
|
319
|
+
- `plan_commit` - Commit .cortex/ artifacts on current branch, write suggested branch to frontmatter
|
|
314
320
|
- `session_save` - Save session summary
|
|
315
321
|
- `branch_status` - Check current git state
|
|
322
|
+
- `branch_create` - Create a new branch (used during handoff to implementation)
|
|
316
323
|
- `github_status` - Check GitHub CLI availability, auth, and detect projects
|
|
317
324
|
- `github_issues` - List/filter GitHub issues for work item selection
|
|
318
325
|
- `github_projects` - List GitHub Project boards and their work items
|
|
@@ -86,26 +86,26 @@ If `./opencode.json` does not have agent model configuration, offer to configure
|
|
|
86
86
|
Run `plan_list` to see if there's a relevant plan for this work.
|
|
87
87
|
If a plan exists, load it with `plan_load`.
|
|
88
88
|
|
|
89
|
-
**
|
|
89
|
+
**Suggested branch detection:** If the loaded plan has a `branch` field in its frontmatter (set by `plan_commit`), this is the **suggested branch name** for implementation. The branch may or may not exist yet — `plan_commit` only writes the suggestion, it does not create the branch.
|
|
90
90
|
|
|
91
91
|
### Step 4: Ask User About Branch Strategy
|
|
92
92
|
|
|
93
|
-
**If
|
|
93
|
+
**If you are already on the suggested branch (it was created during architect handoff):**
|
|
94
94
|
Skip the branch creation prompt entirely — you're already set up. Inform the user:
|
|
95
95
|
"You're on the plan branch `{branch}`. Ready to implement."
|
|
96
96
|
|
|
97
|
-
**If the plan has a `branch` field BUT you
|
|
98
|
-
Offer to
|
|
97
|
+
**If the plan has a `branch` field BUT the branch doesn't exist yet or you're on a different branch:**
|
|
98
|
+
Offer to create it:
|
|
99
99
|
|
|
100
|
-
"The plan
|
|
100
|
+
"The plan suggests branch `{branch}`. How would you like to proceed?"
|
|
101
101
|
|
|
102
102
|
Options:
|
|
103
|
-
1. **Create a worktree
|
|
104
|
-
2. **
|
|
105
|
-
3. **Create a
|
|
103
|
+
1. **Create a worktree (Recommended)** — Isolated copy with the suggested branch name
|
|
104
|
+
2. **Create the branch here** — Create and switch to `{branch}` in this repo
|
|
105
|
+
3. **Create a different branch** — Use a custom branch name
|
|
106
106
|
4. **Continue here** — Only if you're certain (not recommended on protected branches)
|
|
107
107
|
|
|
108
|
-
**If no plan
|
|
108
|
+
**If no plan exists AND on a protected branch:**
|
|
109
109
|
Use the original prompt:
|
|
110
110
|
|
|
111
111
|
"I'm ready to implement changes. How would you like to proceed?"
|
|
@@ -116,10 +116,8 @@ Options:
|
|
|
116
116
|
3. **Continue here** - Only if you're certain (not recommended on protected branches)
|
|
117
117
|
|
|
118
118
|
### Step 5: Execute Based on Response
|
|
119
|
-
- **Worktree
|
|
120
|
-
- **
|
|
121
|
-
- **Switch to plan branch**: Use `branch_switch` with the plan branch name
|
|
122
|
-
- **Branch**: Use `branch_create` with appropriate type (feature/bugfix/refactor)
|
|
119
|
+
- **Worktree**: Use `worktree_create` with appropriate type and name. Report the worktree path. Continue working in the current session.
|
|
120
|
+
- **Create branch**: Use `branch_create` with the suggested branch name (or custom name)
|
|
123
121
|
- **Continue**: Proceed with caution, warn user about risks
|
|
124
122
|
|
|
125
123
|
### Step 6: REPL Implementation Loop
|
package/README.md
CHANGED
|
@@ -91,9 +91,8 @@ User Request
|
|
|
91
91
|
You: "Add user authentication"
|
|
92
92
|
|
|
93
93
|
Architect Agent reads codebase, creates plan with mermaid diagrams
|
|
94
|
-
saves to .cortex/plans/ commits plan
|
|
95
|
-
"Plan committed.
|
|
96
|
-
Implement?"
|
|
94
|
+
saves to .cortex/plans/ commits plan on current branch
|
|
95
|
+
"Plan committed. Proceed?" offers worktree, branch, or stay
|
|
97
96
|
|
|
98
97
|
Implement Agent loads plan, checks git status
|
|
99
98
|
repl_init → parses tasks + ACs iterates task-by-task with build+test
|
|
@@ -123,7 +122,7 @@ Handle complex, multi-step work. Use your best model.
|
|
|
123
122
|
|
|
124
123
|
| Agent | Role | Key Capabilities |
|
|
125
124
|
|-------|------|-----------------|
|
|
126
|
-
| **architect** | Read-only analysis & planning | Plans with mermaid diagrams, acceptance criteria, NFR analysis. Commits plans to
|
|
125
|
+
| **architect** | Read-only analysis & planning | Plans with mermaid diagrams, acceptance criteria, NFR analysis. Commits plans and defers branch creation to handoff. Delegates read-only analysis to `@security`, `@coder`, `@perf`. |
|
|
127
126
|
| **implement** | Full-access development | Skill-aware implementation, REPL loop with ACs, two-phase quality gate, parallel sub-agent orchestration, task finalizer. |
|
|
128
127
|
| **fix** | Quick turnaround bug fixes | Rapid diagnosis, scope-based quality gate, optional REPL loop. Delegates deep debugging to `@debug`. |
|
|
129
128
|
|
|
@@ -175,7 +174,7 @@ Implement Agent detects: package.json has React + Express + Prisma
|
|
|
175
174
|
|
|
176
175
|
**Planning & Sessions**
|
|
177
176
|
- `plan_save` / `plan_load` / `plan_list` / `plan_delete`
|
|
178
|
-
- `plan_commit` — Commit plan
|
|
177
|
+
- `plan_commit` — Commit plan artifacts on current branch (branch creation deferred to handoff)
|
|
179
178
|
- `session_save` / `session_list` / `session_load`
|
|
180
179
|
- `cortex_init` / `cortex_status` / `cortex_configure`
|
|
181
180
|
|
package/dist/tools/plan.d.ts
CHANGED
|
@@ -63,20 +63,18 @@ export declare const delete_: {
|
|
|
63
63
|
* Factory function that creates the plan_commit tool with access
|
|
64
64
|
* to the OpenCode client for toast notifications.
|
|
65
65
|
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
66
|
+
* Stages .cortex/ artifacts and commits them on the current branch.
|
|
67
|
+
* Writes a suggested branch name into the plan frontmatter for handoff.
|
|
68
|
+
* Branch creation is deferred to the handoff step (worktree_create,
|
|
69
|
+
* branch_create, or "continue in this session").
|
|
68
70
|
*/
|
|
69
71
|
export declare function createCommit(client: Client): {
|
|
70
72
|
description: string;
|
|
71
73
|
args: {
|
|
72
74
|
planFilename: import("zod").ZodString;
|
|
73
|
-
branchType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
74
|
-
branchName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
75
75
|
};
|
|
76
76
|
execute(args: {
|
|
77
77
|
planFilename: string;
|
|
78
|
-
branchType?: string | undefined;
|
|
79
|
-
branchName?: string | undefined;
|
|
80
78
|
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
81
79
|
};
|
|
82
80
|
export { delete_ as delete };
|
package/dist/tools/plan.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/tools/plan.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAgBvD,KAAK,MAAM,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;AA2BpC,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;CAgEf,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;CAkEf,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;;;;CA6Bf,CAAC;AAEH,eAAO,MAAM,OAAO;;;;;;;;CAwBlB,CAAC;AAEH
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/tools/plan.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAgBvD,KAAK,MAAM,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;AA2BpC,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;CAgEf,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;CAkEf,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;;;;CA6Bf,CAAC;AAEH,eAAO,MAAM,OAAO;;;;;;;;CAwBlB,CAAC;AAEH;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM;;;;;;;;EAoK1C;AAGD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,CAAC"}
|
package/dist/tools/plan.js
CHANGED
|
@@ -195,28 +195,23 @@ export const delete_ = tool({
|
|
|
195
195
|
* Factory function that creates the plan_commit tool with access
|
|
196
196
|
* to the OpenCode client for toast notifications.
|
|
197
197
|
*
|
|
198
|
-
*
|
|
199
|
-
*
|
|
198
|
+
* Stages .cortex/ artifacts and commits them on the current branch.
|
|
199
|
+
* Writes a suggested branch name into the plan frontmatter for handoff.
|
|
200
|
+
* Branch creation is deferred to the handoff step (worktree_create,
|
|
201
|
+
* branch_create, or "continue in this session").
|
|
200
202
|
*/
|
|
201
203
|
export function createCommit(client) {
|
|
202
204
|
return tool({
|
|
203
|
-
description: "
|
|
204
|
-
"
|
|
205
|
+
description: "Stage and commit .cortex/ plan artifacts on the current branch. " +
|
|
206
|
+
"Writes a suggested branch name into frontmatter for handoff. " +
|
|
207
|
+
"Does NOT create or switch branches.",
|
|
205
208
|
args: {
|
|
206
209
|
planFilename: tool.schema
|
|
207
210
|
.string()
|
|
208
211
|
.describe("Plan filename from .cortex/plans/ (e.g., '2026-02-26-feature-auth.md')"),
|
|
209
|
-
branchType: tool.schema
|
|
210
|
-
.string()
|
|
211
|
-
.optional()
|
|
212
|
-
.describe("Override branch prefix (default: derived from plan type)"),
|
|
213
|
-
branchName: tool.schema
|
|
214
|
-
.string()
|
|
215
|
-
.optional()
|
|
216
|
-
.describe("Override branch slug (default: derived from plan title)"),
|
|
217
212
|
},
|
|
218
213
|
async execute(args, context) {
|
|
219
|
-
const { planFilename
|
|
214
|
+
const { planFilename } = args;
|
|
220
215
|
const cwd = context.worktree;
|
|
221
216
|
// ── 1. Validate: git repo ─────────────────────────────────
|
|
222
217
|
try {
|
|
@@ -247,71 +242,32 @@ Expected YAML frontmatter with title and type fields.`;
|
|
|
247
242
|
}
|
|
248
243
|
const planTitle = fm.title || "untitled";
|
|
249
244
|
const planType = fm.type || "feature";
|
|
250
|
-
// ── 3.
|
|
245
|
+
// ── 3. Compute suggested branch name (stored for handoff) ──
|
|
251
246
|
const VALID_PREFIXES = Object.values(TYPE_TO_PREFIX);
|
|
252
|
-
const rawPrefix =
|
|
247
|
+
const rawPrefix = TYPE_TO_PREFIX[planType] || "feature";
|
|
253
248
|
const prefix = VALID_PREFIXES.includes(rawPrefix) ? rawPrefix : "feature";
|
|
254
|
-
|
|
255
|
-
const
|
|
256
|
-
|
|
257
|
-
|
|
249
|
+
const slug = slugify(planTitle);
|
|
250
|
+
const suggestedBranch = `${prefix}/${slug}`;
|
|
251
|
+
// Write suggested branch into frontmatter so handoff knows what to create
|
|
252
|
+
planContent = upsertFrontmatterField(planContent, "branch", suggestedBranch);
|
|
253
|
+
fs.writeFileSync(filepath, planContent);
|
|
254
|
+
// ── 4. Get current branch for reporting ────────────────────
|
|
258
255
|
let currentBranch = "";
|
|
259
256
|
try {
|
|
260
257
|
const { stdout } = await git(cwd, "branch", "--show-current");
|
|
261
258
|
currentBranch = stdout.trim();
|
|
262
259
|
}
|
|
263
260
|
catch {
|
|
264
|
-
currentBranch = "";
|
|
265
|
-
}
|
|
266
|
-
const isOnProtected = PROTECTED_BRANCHES.includes(currentBranch);
|
|
267
|
-
let branchCreated = false;
|
|
268
|
-
// ── 5. Create or switch to branch ─────────────────────────
|
|
269
|
-
if (isOnProtected || !currentBranch) {
|
|
270
|
-
// Try to create the branch
|
|
271
|
-
try {
|
|
272
|
-
await git(cwd, "checkout", "-b", fullBranchName);
|
|
273
|
-
branchCreated = true;
|
|
274
|
-
}
|
|
275
|
-
catch {
|
|
276
|
-
// Branch may already exist — try switching to it
|
|
277
|
-
try {
|
|
278
|
-
await git(cwd, "checkout", fullBranchName);
|
|
279
|
-
}
|
|
280
|
-
catch (switchErr) {
|
|
281
|
-
try {
|
|
282
|
-
await client.tui.showToast({
|
|
283
|
-
body: {
|
|
284
|
-
title: `Plan Commit: ${planFilename}`,
|
|
285
|
-
message: `Failed to create/switch branch: ${switchErr.message || switchErr}`,
|
|
286
|
-
variant: "error",
|
|
287
|
-
duration: 8000,
|
|
288
|
-
},
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
|
-
catch {
|
|
292
|
-
// Toast failure is non-fatal
|
|
293
|
-
}
|
|
294
|
-
return `✗ Error creating branch '${fullBranchName}': ${switchErr.message || switchErr}
|
|
295
|
-
|
|
296
|
-
You may have uncommitted changes. Commit or stash them first.`;
|
|
297
|
-
}
|
|
298
|
-
}
|
|
261
|
+
currentBranch = "(detached)";
|
|
299
262
|
}
|
|
300
|
-
//
|
|
301
|
-
// ── 6. Update plan frontmatter with branch ────────────────
|
|
302
|
-
// If we created/switched to a new branch → use that name
|
|
303
|
-
// If already on a non-protected branch → use whatever we're on
|
|
304
|
-
const targetBranch = (isOnProtected || branchCreated) ? fullBranchName : currentBranch;
|
|
305
|
-
planContent = upsertFrontmatterField(planContent, "branch", targetBranch);
|
|
306
|
-
fs.writeFileSync(filepath, planContent);
|
|
307
|
-
// ── 7. Stage .cortex/ directory ───────────────────────────
|
|
263
|
+
// ── 5. Stage .cortex/ directory ───────────────────────────
|
|
308
264
|
try {
|
|
309
265
|
await git(cwd, "add", path.join(cwd, CORTEX_DIR));
|
|
310
266
|
}
|
|
311
267
|
catch (stageErr) {
|
|
312
268
|
return `✗ Error staging .cortex/ directory: ${stageErr.message || stageErr}`;
|
|
313
269
|
}
|
|
314
|
-
// ──
|
|
270
|
+
// ── 6. Commit ─────────────────────────────────────────────
|
|
315
271
|
const commitMsg = `chore(plan): ${planTitle}`;
|
|
316
272
|
let commitHash = "";
|
|
317
273
|
try {
|
|
@@ -333,7 +289,7 @@ You may have uncommitted changes. Commit or stash them first.`;
|
|
|
333
289
|
try {
|
|
334
290
|
await client.tui.showToast({
|
|
335
291
|
body: {
|
|
336
|
-
title: `Plan: ${
|
|
292
|
+
title: `Plan: ${planFilename}`,
|
|
337
293
|
message: "Already committed — no new changes",
|
|
338
294
|
variant: "info",
|
|
339
295
|
duration: 4000,
|
|
@@ -343,14 +299,14 @@ You may have uncommitted changes. Commit or stash them first.`;
|
|
|
343
299
|
catch {
|
|
344
300
|
// Toast failure is non-fatal
|
|
345
301
|
}
|
|
346
|
-
return `✓ Plan already committed
|
|
302
|
+
return `✓ Plan already committed
|
|
347
303
|
|
|
348
|
-
|
|
349
|
-
Commit: ${commitHash}
|
|
304
|
+
On: ${currentBranch} (no new changes)
|
|
305
|
+
Commit: ${commitHash}
|
|
350
306
|
Plan: ${planFilename}
|
|
307
|
+
Suggested branch: ${suggestedBranch}
|
|
351
308
|
|
|
352
|
-
|
|
353
|
-
Use worktree_create or switch to the Implement agent.`;
|
|
309
|
+
Ready for handoff — branch will be created when you proceed to implementation.`;
|
|
354
310
|
}
|
|
355
311
|
await git(cwd, "commit", "-m", commitMsg);
|
|
356
312
|
const { stdout: hashOut } = await git(cwd, "rev-parse", "--short", "HEAD");
|
|
@@ -372,12 +328,12 @@ Use worktree_create or switch to the Implement agent.`;
|
|
|
372
328
|
}
|
|
373
329
|
return `✗ Error committing: ${commitErr.message || commitErr}`;
|
|
374
330
|
}
|
|
375
|
-
// ──
|
|
331
|
+
// ── 7. Success notification ───────────────────────────────
|
|
376
332
|
try {
|
|
377
333
|
await client.tui.showToast({
|
|
378
334
|
body: {
|
|
379
335
|
title: `Plan Committed`,
|
|
380
|
-
message: `${
|
|
336
|
+
message: `${currentBranch} — ${commitHash}`,
|
|
381
337
|
variant: "success",
|
|
382
338
|
duration: 5000,
|
|
383
339
|
},
|
|
@@ -386,18 +342,14 @@ Use worktree_create or switch to the Implement agent.`;
|
|
|
386
342
|
catch {
|
|
387
343
|
// Toast failure is non-fatal
|
|
388
344
|
}
|
|
389
|
-
return `✓ Plan committed
|
|
345
|
+
return `✓ Plan committed
|
|
390
346
|
|
|
391
|
-
|
|
347
|
+
On: ${currentBranch}
|
|
392
348
|
Commit: ${commitHash} — ${commitMsg}
|
|
393
349
|
Plan: ${planFilename}
|
|
350
|
+
Suggested branch: ${suggestedBranch}
|
|
394
351
|
|
|
395
|
-
The
|
|
396
|
-
Main branch is clean.
|
|
397
|
-
|
|
398
|
-
Next steps:
|
|
399
|
-
• Switch to Implement agent to begin coding
|
|
400
|
-
• Or use worktree_create to work in an isolated copy`;
|
|
352
|
+
The .cortex/ artifacts are committed. Branch creation happens during handoff.`;
|
|
401
353
|
},
|
|
402
354
|
});
|
|
403
355
|
}
|
package/package.json
CHANGED