@yemi33/minions 0.1.2222 → 0.1.2223
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/engine/pr-action.js +10 -3
- package/package.json +1 -1
- package/prompts/cc-system.md +1 -1
package/engine/pr-action.js
CHANGED
|
@@ -155,7 +155,7 @@ function buildCreatePrFollowups({ project, branch, contextOnly = false } = {}) {
|
|
|
155
155
|
if (!proj) return [];
|
|
156
156
|
const br = branch && String(branch).trim() ? String(branch).trim() : '';
|
|
157
157
|
const branchClause = br
|
|
158
|
-
? `on the
|
|
158
|
+
? `(the working tree is on branch ${br}; if ${br} is the project's default/main branch, create a new well-named branch off it and commit there rather than committing to ${br} directly)`
|
|
159
159
|
: 'on a new well-named branch off the project main branch';
|
|
160
160
|
const linkBody = contextOnly
|
|
161
161
|
? `{"url":"<new PR url>","project":"${proj}","contextOnly":true}`
|
|
@@ -163,11 +163,18 @@ function buildCreatePrFollowups({ project, branch, contextOnly = false } = {}) {
|
|
|
163
163
|
const trackNote = contextOnly
|
|
164
164
|
? 'so it is tracked but not auto-reviewed'
|
|
165
165
|
: 'so the engine auto-manages it (review -> fix -> re-review -> auto-merge)';
|
|
166
|
+
// The original branch CC must return to once the PR is open, so the new PR
|
|
167
|
+
// branch is never left checked out in the shared operator working tree.
|
|
168
|
+
const restoreClause = br
|
|
169
|
+
? `switch the working tree back to the ORIGINAL branch (${br})`
|
|
170
|
+
: 'switch the working tree back to the original branch it started on';
|
|
166
171
|
const message =
|
|
167
172
|
`Create a PR from the local changes you just made in the ${proj} project. ` +
|
|
168
|
-
|
|
173
|
+
(br ? `Remember the working tree's current branch (${br}) as the ORIGINAL branch to return to when done. ` : '') +
|
|
174
|
+
`Steps: (1) in that project's working tree, stage and commit the modified files with a clear conventional-commit message ${branchClause}; ` +
|
|
169
175
|
`(2) push the branch; (3) open a PR against the project's main branch using the right CLI for the repo host (gh for GitHub, az repos for ADO); ` +
|
|
170
|
-
`(4) link it to the tracker by calling POST /api/pull-requests/link with ${linkBody} ${trackNote}
|
|
176
|
+
`(4) link it to the tracker by calling POST /api/pull-requests/link with ${linkBody} ${trackNote}; ` +
|
|
177
|
+
`(5) finally, ${restoreClause} — do not leave the new PR branch checked out. ` +
|
|
171
178
|
`Then show me the PR URL.`;
|
|
172
179
|
return [{ kind: CREATE_PR_FOLLOWUP.kind, label: CREATE_PR_FOLLOWUP.label, project: proj, branch: br || null, message }];
|
|
173
180
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2223",
|
|
4
4
|
"description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
|
|
5
5
|
"bin": {
|
|
6
6
|
"minions": "bin/minions.js"
|
package/prompts/cc-system.md
CHANGED
|
@@ -96,7 +96,7 @@ curl -s -X POST http://localhost:{{dashboard_port}}/api/pr-action/offer-create-p
|
|
|
96
96
|
-H 'Content-Type: application/json' -H 'X-CC-Turn-Id: {{cc_turn_id}}' \
|
|
97
97
|
-d '{"project":"<project name>"}'
|
|
98
98
|
```
|
|
99
|
-
This checks the project's working tree (`git status --porcelain`) and, when there are uncommitted changes, returns a **`[Create PR]`** follow-up chip to the user (same chip mechanism as the `pr-action` `[Comment]`/`[Fix once]`/`[Track for auto-fix]` chips). When the user clicks it, you'll receive a turn instructing you to commit → push → open the PR → link it to the tracker. Pass `"contextOnly":true` if the PR should be tracked-but-not-auto-reviewed; omit it to have the engine auto-manage the PR (review → fix → re-review → auto-merge). If `hasChanges` is `false`, there's nothing to PR — skip the offer. Don't commit/push on your own initiative; surface the chip and let the user decide.
|
|
99
|
+
This checks the project's working tree (`git status --porcelain`) and, when there are uncommitted changes, returns a **`[Create PR]`** follow-up chip to the user (same chip mechanism as the `pr-action` `[Comment]`/`[Fix once]`/`[Track for auto-fix]` chips). When the user clicks it, you'll receive a turn instructing you to commit → push → open the PR → link it to the tracker → switch the working tree back to the original branch (never leave the new PR branch checked out in the shared operator tree). Pass `"contextOnly":true` if the PR should be tracked-but-not-auto-reviewed; omit it to have the engine auto-manage the PR (review → fix → re-review → auto-merge). If `hasChanges` is `false`, there's nothing to PR — skip the offer. Don't commit/push on your own initiative; surface the chip and let the user decide.
|
|
100
100
|
|
|
101
101
|
## When to dispatch vs answer inline
|
|
102
102
|
|