@idea1/cli 1.7.1 → 1.7.3

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 (62) hide show
  1. package/README.md +77 -16
  2. package/dist/cli/parser.d.ts.map +1 -1
  3. package/dist/cli/parser.js +3 -2
  4. package/dist/cli/parser.js.map +1 -1
  5. package/dist/commands/approve-pr.js +1 -1
  6. package/dist/commands/approve-pr.js.map +1 -1
  7. package/dist/commands/help.d.ts.map +1 -1
  8. package/dist/commands/help.js +35 -4
  9. package/dist/commands/help.js.map +1 -1
  10. package/dist/commands/index.d.ts +2 -1
  11. package/dist/commands/index.d.ts.map +1 -1
  12. package/dist/commands/index.js +3 -1
  13. package/dist/commands/index.js.map +1 -1
  14. package/dist/commands/integrate.d.ts +13 -0
  15. package/dist/commands/integrate.d.ts.map +1 -0
  16. package/dist/commands/integrate.js +128 -0
  17. package/dist/commands/integrate.js.map +1 -0
  18. package/dist/commands/ready-for-approval.js +1 -1
  19. package/dist/commands/ready-for-approval.js.map +1 -1
  20. package/dist/commands/release.d.ts +7 -0
  21. package/dist/commands/release.d.ts.map +1 -1
  22. package/dist/commands/release.js +32 -188
  23. package/dist/commands/release.js.map +1 -1
  24. package/dist/lib/claude-options.d.ts +10 -0
  25. package/dist/lib/claude-options.d.ts.map +1 -1
  26. package/dist/lib/claude-options.js +36 -1
  27. package/dist/lib/claude-options.js.map +1 -1
  28. package/dist/lib/shell.d.ts +8 -0
  29. package/dist/lib/shell.d.ts.map +1 -1
  30. package/dist/lib/shell.js +6 -3
  31. package/dist/lib/shell.js.map +1 -1
  32. package/dist/services/claude.d.ts +2 -2
  33. package/dist/services/claude.d.ts.map +1 -1
  34. package/dist/services/claude.js +2 -3
  35. package/dist/services/claude.js.map +1 -1
  36. package/dist/services/github.d.ts +69 -28
  37. package/dist/services/github.d.ts.map +1 -1
  38. package/dist/services/github.js +148 -74
  39. package/dist/services/github.js.map +1 -1
  40. package/dist/services/release-flow.d.ts +83 -0
  41. package/dist/services/release-flow.d.ts.map +1 -0
  42. package/dist/services/release-flow.js +338 -0
  43. package/dist/services/release-flow.js.map +1 -0
  44. package/dist/services/setup.js +2 -2
  45. package/dist/services/workflow-handlers/agent-implementation.d.ts.map +1 -1
  46. package/dist/services/workflow-handlers/agent-implementation.js +5 -4
  47. package/dist/services/workflow-handlers/agent-implementation.js.map +1 -1
  48. package/dist/services/workflow-handlers/approve-pr.d.ts +6 -3
  49. package/dist/services/workflow-handlers/approve-pr.d.ts.map +1 -1
  50. package/dist/services/workflow-handlers/approve-pr.js +24 -64
  51. package/dist/services/workflow-handlers/approve-pr.js.map +1 -1
  52. package/dist/services/workflow-handlers/ready-for-approval.d.ts +5 -3
  53. package/dist/services/workflow-handlers/ready-for-approval.d.ts.map +1 -1
  54. package/dist/services/workflow-handlers/ready-for-approval.js +10 -11
  55. package/dist/services/workflow-handlers/ready-for-approval.js.map +1 -1
  56. package/dist/services/worktree.d.ts +2 -0
  57. package/dist/services/worktree.d.ts.map +1 -1
  58. package/dist/services/worktree.js +4 -4
  59. package/dist/services/worktree.js.map +1 -1
  60. package/dist/version.d.ts +1 -1
  61. package/dist/version.js +1 -1
  62. package/package.json +3 -2
@@ -0,0 +1,338 @@
1
+ import { logger } from '../lib/logger.js';
2
+ import { exec, execOrThrow } from '../lib/shell.js';
3
+ import { promptConfirm, promptInput } from '../lib/prompt.js';
4
+ import * as git from './git.js';
5
+ import * as github from './github.js';
6
+ export const RELEASE_KIND = { commandName: 'idea1 release', label: 'Release' };
7
+ export const INTEGRATION_KIND = { commandName: 'idea1 integrate', label: 'Integration' };
8
+ /**
9
+ * The `--pr-mode` option both commands share. `create` is the default: the PR is opened and the
10
+ * approver merges it in GitHub once the required checks are green - that merge is the approval of
11
+ * record, exactly as in `merge` mode, where the CLI waits for the checks and merges here.
12
+ */
13
+ export const PR_MODE_OPTION = {
14
+ longName: 'pr-mode',
15
+ shortName: 'pr',
16
+ description: 'What to do once the PR exists',
17
+ defaultValue: 'create',
18
+ promptWhenDefaultExists: true,
19
+ choices: [
20
+ { label: 'create - Create the PR and open it in the browser; merge it there once the required checks pass', value: 'create' },
21
+ { label: 'merge - Wait for every required check with gh, then merge here', value: 'merge' }
22
+ ]
23
+ };
24
+ /** The first line of the comment that records an admin override; the evidence script keys on it. */
25
+ export const OVERRIDE_COMMENT_MARKER = '**Change-management exception: merged with admin override.**';
26
+ /**
27
+ * The local checkout must be the source branch, clean, fully pushed and level with origin, so the
28
+ * PR carries exactly what the person running the command is looking at.
29
+ */
30
+ export async function validateSourceBranch(sourceBranch) {
31
+ logger.step('Validating current branch...');
32
+ const currentBranch = await git.getCurrentBranch();
33
+ if (currentBranch !== sourceBranch) {
34
+ throw new Error(`You must be on the '${sourceBranch}' branch to run this command.\n` +
35
+ `Current branch: ${currentBranch}`);
36
+ }
37
+ logger.success(`On ${sourceBranch} branch`);
38
+ logger.newline();
39
+ logger.step('Checking for uncommitted changes...');
40
+ const status = await exec('git', ['status', '--porcelain']);
41
+ if (status.stdout.trim()) {
42
+ throw new Error('You have uncommitted changes. Please commit or stash them first.\n\n' + status.stdout);
43
+ }
44
+ logger.success('No uncommitted changes');
45
+ logger.newline();
46
+ logger.step('Fetching latest from remote...');
47
+ await git.fetchLatest();
48
+ logger.newline();
49
+ logger.step('Checking for unpushed commits...');
50
+ const unpushed = await exec('git', ['log', '@{u}..HEAD', '--oneline']);
51
+ if (unpushed.exitCode === 0 && unpushed.stdout.trim()) {
52
+ throw new Error('You have local commits that haven\'t been pushed. Please push first.\n\n' +
53
+ 'Unpushed commits:\n' + unpushed.stdout);
54
+ }
55
+ logger.success('No unpushed commits');
56
+ logger.newline();
57
+ logger.step('Checking if local branch is up to date with remote...');
58
+ const localCommit = (await execOrThrow('git', ['rev-parse', 'HEAD'])).trim();
59
+ const remoteCommit = (await execOrThrow('git', ['rev-parse', '@{u}'])).trim();
60
+ if (localCommit !== remoteCommit) {
61
+ throw new Error('Your local branch is behind the remote. Please pull the latest changes.\n\n' +
62
+ `Local: ${localCommit}\n` +
63
+ `Remote: ${remoteCommit}`);
64
+ }
65
+ logger.success('Local branch matches remote');
66
+ logger.newline();
67
+ }
68
+ /**
69
+ * The commits that landed on the source branch since the target last caught up, first-parent
70
+ * only: one merge commit per merge-commit PR, one squash commit per squash PR, the rebased commits
71
+ * of a rebase PR, and anything pushed straight to the branch.
72
+ */
73
+ async function listFirstParentCommits(sourceBranch, targetBranch) {
74
+ const result = await exec('git', [
75
+ 'log', '--first-parent',
76
+ '--pretty=%H%x1f%an%x1f%s',
77
+ `origin/${targetBranch}..origin/${sourceBranch}`
78
+ ]);
79
+ if (result.exitCode !== 0) {
80
+ throw new Error(`Could not list commits between origin/${targetBranch} and origin/${sourceBranch}: ${result.stderr}`);
81
+ }
82
+ return result.stdout
83
+ .split('\n')
84
+ .filter(line => line.trim().length > 0)
85
+ .map(line => {
86
+ const [sha, author, subject] = line.split('\x1f');
87
+ return { sha, author, subject };
88
+ });
89
+ }
90
+ /**
91
+ * Escape a value going into a markdown table cell. Backslashes go first, or escaping the pipe
92
+ * would produce an escaped backslash followed by a live pipe that breaks the row.
93
+ */
94
+ function escapeTableCell(value) {
95
+ return value.replace(/\\/g, '\\\\').replace(/\|/g, '\\|');
96
+ }
97
+ /**
98
+ * The PR body, written as the approval record for everything the PR carries.
99
+ *
100
+ * SOC2 change management asks who approved a change and when. Each change on the source branch
101
+ * was already approved by its assignee, who merged its PR into that branch. Listing those merges
102
+ * here makes this PR self-contained evidence: the whole chain is readable from the one PR an
103
+ * auditor lands on. Commits are attributed to PRs through GitHub's own association, so squash and
104
+ * rebase merges are covered, and a commit with no PR is shown rather than silently dropped.
105
+ */
106
+ export async function buildApprovalChainBody(sourceBranch, targetBranch, kind) {
107
+ const commits = await listFirstParentCommits(sourceBranch, targetBranch);
108
+ if (commits.length === 0) {
109
+ throw new Error(`Nothing to ${kind.label.toLowerCase()}: origin/${targetBranch} already contains everything on origin/${sourceBranch}.`);
110
+ }
111
+ logger.step(`Attributing ${commits.length} commit(s) on ${sourceBranch} to their pull requests...`);
112
+ const prNumbers = new Set();
113
+ const directCommits = [];
114
+ for (const commit of commits) {
115
+ const prs = (await github.getPullRequestsForCommit(commit.sha))
116
+ .filter(pr => pr.merged && pr.baseBranch === sourceBranch);
117
+ if (prs.length === 0) {
118
+ directCommits.push(commit);
119
+ continue;
120
+ }
121
+ for (const pr of prs) {
122
+ prNumbers.add(pr.number);
123
+ }
124
+ }
125
+ if (prNumbers.size === 0) {
126
+ throw new Error(`Refusing to open the ${kind.label.toLowerCase()} PR: none of the ${commits.length} commit(s) on origin/${sourceBranch} ` +
127
+ `beyond origin/${targetBranch} came through a merged pull request into ${sourceBranch}. Every change must be ` +
128
+ 'approved on its own PR first (change-management-policy.md clause 2).');
129
+ }
130
+ const records = new Map((await github.listMergedPrsInto(sourceBranch)).map(record => [record.number, record]));
131
+ const sortedNumbers = [...prNumbers].sort((a, b) => a - b);
132
+ const lines = [
133
+ `${kind.label} from \`${sourceBranch}\` into \`${targetBranch}\`, created by \`${kind.commandName}\`.`,
134
+ '',
135
+ '## Approval chain',
136
+ '',
137
+ 'Every pull request below was approved by its assignee, who merged it into',
138
+ `\`${sourceBranch}\` (change-management-policy.md clause 2, stage 1). This PR is the next gate:`,
139
+ 'no further review is required, it must pass the required CI/CD checks, and the merge of this',
140
+ 'PR is its approval - performed by its assignee.',
141
+ '',
142
+ '| PR | Title | Author | Merged (UTC) | Approved by |',
143
+ '|---|---|---|---|---|'
144
+ ];
145
+ let selfApproved = 0;
146
+ for (const number of sortedNumbers) {
147
+ const record = records.get(number);
148
+ if (!record) {
149
+ lines.push(`| #${number} | _could not be read from GitHub - verify manually_ | - | - | - |`);
150
+ continue;
151
+ }
152
+ if (record.mergedBy === record.author) {
153
+ selfApproved += 1;
154
+ }
155
+ lines.push(`| #${record.number} | ${escapeTableCell(record.title)} | @${record.author} | ${record.mergedAt} | @${record.mergedBy} |`);
156
+ }
157
+ if (selfApproved > 0) {
158
+ lines.push('');
159
+ lines.push(`> **${selfApproved} of ${sortedNumbers.length} contained PR(s) were approved by their own author.** ` +
160
+ 'That is the narrow case change-management-policy.md clause 4 discloses at this headcount ' +
161
+ 'rather than papers over. It is counted here so the disclosure stays honest, and reviewed at ' +
162
+ 'the quarterly review.');
163
+ }
164
+ if (directCommits.length > 0) {
165
+ lines.push('');
166
+ lines.push('## Direct commits (no pull request)');
167
+ lines.push('');
168
+ lines.push(`The commits below reached \`${sourceBranch}\` without a pull request. The only expected entry`);
169
+ lines.push('is the version bump made by the `pre-release` hook when a release is cut; anything else is an');
170
+ lines.push('exception under change-management-policy.md clause 2, to be explained at the quarterly review.');
171
+ lines.push('');
172
+ lines.push('| Commit | Author | Subject |');
173
+ lines.push('|---|---|---|');
174
+ for (const commit of directCommits) {
175
+ lines.push(`| ${commit.sha.slice(0, 9)} | ${escapeTableCell(commit.author)} | ${escapeTableCell(commit.subject)} |`);
176
+ }
177
+ }
178
+ return lines.join('\n');
179
+ }
180
+ /**
181
+ * Open the PR with its approval-chain body and its approver as assignee. Returns the PR URL.
182
+ */
183
+ export async function createGatedPr(options) {
184
+ await github.ensureGitHubCli();
185
+ const body = await buildApprovalChainBody(options.sourceBranch, options.targetBranch, options.kind);
186
+ logger.step(`Creating pull request (assigned to @${options.assignee})...`);
187
+ const prUrl = await github.createPr({
188
+ sourceBranch: options.sourceBranch,
189
+ targetBranch: options.targetBranch,
190
+ title: options.title,
191
+ body,
192
+ assignee: options.assignee
193
+ });
194
+ logger.success(`PR created: ${prUrl}`);
195
+ return prUrl;
196
+ }
197
+ /**
198
+ * The PR's assignee is its approver of record, and GitHub records whoever merges as `merged_by`.
199
+ * The two must be the same person for the record to name the right approver: no assignee means
200
+ * no approver, and a different merger is an exception the evidence report calls out - so it
201
+ * takes an explicit, eyes-open confirmation.
202
+ */
203
+ export async function confirmApproverIdentity(branchName) {
204
+ const assignees = await github.getPrAssignees(branchName);
205
+ if (assignees.length === 0) {
206
+ throw new Error('This PR has no assignee, so it has no approver of record. Assign one first - the assignee is who ' +
207
+ 'approves the change by merging it (change-management-policy.md clause 2). For a work-item PR run ' +
208
+ 'idea1 ready-for-approval --assignee <login>; otherwise set the assignee on the PR in GitHub.');
209
+ }
210
+ const login = await github.getCurrentLogin();
211
+ const names = assignees.map(assignee => `@${assignee}`).join(', ');
212
+ if (assignees.includes(login)) {
213
+ logger.info(`Assigned to ${names} - you are the approver of record`);
214
+ return;
215
+ }
216
+ logger.newline();
217
+ logger.warning(`This PR is assigned to ${names}, but you are @${login}.`);
218
+ logger.warning('The merge record will name YOU as the approver, not the assignee, and the evidence');
219
+ logger.warning('report lists that merge as an exception (change-management-policy.md clause 2).');
220
+ logger.newline();
221
+ const proceed = await promptConfirm(`Merge anyway as @${login}, knowing ${names} is the named approver and is not the one approving?`, { default: false });
222
+ if (!proceed) {
223
+ throw new Error(`Merge cancelled: reassign the PR to @${login}, or have ${names} run the merge.`);
224
+ }
225
+ }
226
+ function buildOverrideComment(kind, reason, checkSummary) {
227
+ return [
228
+ OVERRIDE_COMMENT_MARKER,
229
+ '',
230
+ 'The required CI/CD checks did not pass before this PR was merged, and the merge used admin',
231
+ 'privileges to bypass branch protection.',
232
+ '',
233
+ `Reason given: ${reason}`,
234
+ '',
235
+ 'Check status at the time of the override:',
236
+ '',
237
+ '```',
238
+ checkSummary || '(no check summary available)',
239
+ '```',
240
+ '',
241
+ `Recorded automatically by \`${kind.commandName}\` for the quarterly review`,
242
+ '(change-management-policy.md clause 3).'
243
+ ].join('\n');
244
+ }
245
+ /**
246
+ * Merge the PR once the required checks pass. Checks that fail, never start or never finish stop
247
+ * the merge. The one sanctioned admin override remains: it needs an explicit confirmation, a
248
+ * stated reason, and the exception must be recorded as a comment on the PR *before* the merge -
249
+ * if the comment cannot be posted, nothing is merged.
250
+ */
251
+ export async function mergeWithCheckGate(branchName, kind) {
252
+ const checks = await github.waitForPrChecks(branchName);
253
+ if (checks.passed) {
254
+ const result = await github.mergePr(branchName);
255
+ if (!result.success) {
256
+ throw new Error(`Failed to merge PR: ${result.error}`);
257
+ }
258
+ return;
259
+ }
260
+ logger.newline();
261
+ logger.warning('The required checks on this PR did not pass.');
262
+ logger.dim(checks.summary);
263
+ logger.newline();
264
+ const override = await promptConfirm('Override the failing/incomplete checks and merge with admin privileges? (recorded as an exception)', { default: false });
265
+ if (!override) {
266
+ throw new Error('Merge cancelled: required checks did not pass.');
267
+ }
268
+ const reason = (await promptInput('Reason for the override (required - recorded on the PR):', {
269
+ validate: input => input.trim() ? true : 'A reason is required for an admin override'
270
+ })).trim();
271
+ logger.step('Recording the exception on the PR...');
272
+ await github.addPrComment(branchName, buildOverrideComment(kind, reason, checks.summary));
273
+ const result = await github.mergePrWithAdminOverride(branchName);
274
+ if (!result.success) {
275
+ throw new Error(`Failed to merge PR with admin override: ${result.error}`);
276
+ }
277
+ logger.success('Exception recorded on the PR');
278
+ }
279
+ /**
280
+ * Open URL in browser (cross-platform)
281
+ */
282
+ async function openUrlInBrowser(url) {
283
+ for (const command of ['open', 'xdg-open', 'start']) {
284
+ const result = await exec(command, [url]);
285
+ if (result.exitCode === 0) {
286
+ return;
287
+ }
288
+ }
289
+ logger.warning('Could not automatically open browser. Please open the following URL manually:');
290
+ logger.info(url);
291
+ }
292
+ async function openGitHubActions() {
293
+ logger.step('Opening GitHub Actions...');
294
+ const result = await exec('gh', ['repo', 'view', '--json', 'url', '-q', '.url']);
295
+ if (result.exitCode !== 0) {
296
+ logger.warning('Could not get repository URL');
297
+ return;
298
+ }
299
+ const actionsUrl = `${result.stdout.trim()}/actions`;
300
+ logger.info(`Opening: ${actionsUrl}`);
301
+ await openUrlInBrowser(actionsUrl);
302
+ }
303
+ /**
304
+ * Finish the sequence in the chosen mode. Either way the merge is the approval of record: in
305
+ * `create` mode the approver performs it in GitHub once the checks are green; in `merge` mode the
306
+ * CLI waits for the checks and performs it here, as the approver.
307
+ */
308
+ export async function runPrMode(options) {
309
+ const { mode, sourceBranch, targetBranch, prUrl, kind } = options;
310
+ const noun = `${kind.label.toLowerCase()} PR`;
311
+ if (mode === 'create') {
312
+ logger.step('Opening PR in browser...');
313
+ await exec('gh', ['pr', 'view', sourceBranch, '--web']);
314
+ logger.newline();
315
+ logger.success('================================================');
316
+ logger.success(`${kind.label} PR created and opened in browser`);
317
+ logger.success('================================================');
318
+ logger.hint(`Merge it in GitHub once the required checks pass - that merge is the ${kind.label.toLowerCase()} approval of record.`);
319
+ return;
320
+ }
321
+ await confirmApproverIdentity(sourceBranch);
322
+ const confirmMerge = await promptConfirm(`Merge ${noun} (${sourceBranch} -> ${targetBranch}) once the required checks pass?`, { default: true });
323
+ if (!confirmMerge) {
324
+ logger.info(`Merge cancelled. The ${noun} is created and can be merged from GitHub instead.`);
325
+ logger.hint(`PR: ${prUrl}`);
326
+ return;
327
+ }
328
+ await mergeWithCheckGate(sourceBranch, kind);
329
+ logger.newline();
330
+ if (options.openActionsAfterMerge) {
331
+ await openGitHubActions();
332
+ logger.newline();
333
+ }
334
+ logger.success('========================================');
335
+ logger.success(`${kind.label} merge to ${targetBranch} complete!`);
336
+ logger.success('========================================');
337
+ }
338
+ //# sourceMappingURL=release-flow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"release-flow.js","sourceRoot":"","sources":["../../src/services/release-flow.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAkBtC,MAAM,CAAC,MAAM,YAAY,GAAgB,EAAE,WAAW,EAAE,eAAe,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;AAC5F,MAAM,CAAC,MAAM,gBAAgB,GAAgB,EAAE,WAAW,EAAE,iBAAiB,EAAE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AM,aAAa,CACtC,SAAS,IAAI,KAAK,YAAY,OAAO,YAAY,kCAAkC,EACnF,EAAE,OAAO,EAAE,IAAI,EAAE,CAClB,CAAC;IACF,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,MAAM,CAAC,IAAI,CAAC,wBAAwB,IAAI,oDAAoD,CAAC,CAAC;QAC9F,MAAM,CAAC,IAAI,CAAC,OAAO,KAAK,EAAE,CAAC,CAAC;QAC5B,OAAO;IACT,CAAC;IAED,MAAM,kBAAkB,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;IAC7C,MAAM,CAAC,OAAO,EAAE,CAAC;IAEjB,IAAI,OAAO,CAAC,qBAAqB,EAAE,CAAC;QAClC,MAAM,iBAAiB,EAAE,CAAC;QAC1B,MAAM,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,0CAA0C,CAAC,CAAC;IAC3D,MAAM,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,aAAa,YAAY,YAAY,CAAC,CAAC;IACnE,MAAM,CAAC,OAAO,CAAC,0CAA0C,CAAC,CAAC;AAC7D,CAAC"}
@@ -52,7 +52,7 @@ Hooks are shell scripts that run at specific points in the workflow. All hooks a
52
52
  | Hook | When it runs |
53
53
  |------|--------------|
54
54
  | \`setup-worktree\` | After creating a new git worktree |
55
- | \`pre-release\` | During \`idea1 release\`, before PR creation |
55
+ | \`pre-release\` | During \`idea1 release\`, before the release PR is opened - for release-time automation such as version bumps. The PR, its check gate and its merge belong to the CLI |
56
56
 
57
57
  **Simple hook:**
58
58
  \`\`\`json
@@ -68,7 +68,7 @@ Hooks are shell scripts that run at specific points in the workflow. All hooks a
68
68
  {
69
69
  "hooks": {
70
70
  "pre-release": {
71
- "command": "scripts/release.sh",
71
+ "command": "scripts/version-bump.sh",
72
72
  "inputs": [
73
73
  {
74
74
  "name": "version-type",
@@ -1 +1 @@
1
- {"version":3,"file":"agent-implementation.d.ts","sourceRoot":"","sources":["../../../src/services/workflow-handlers/agent-implementation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAQjE;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,EAAE,oBA4BxC,CAAC"}
1
+ {"version":3,"file":"agent-implementation.d.ts","sourceRoot":"","sources":["../../../src/services/workflow-handlers/agent-implementation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAQjE;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,EAAE,oBA6BxC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { WorkflowStates } from '../../lib/workflow-states.js';
2
2
  import { isolationModeOption, resolveIsolationMode } from '../../lib/isolation.js';
3
- import { claudeEntryPointOption, claudeSessionOptions, resolveClaudeSessionOptions } from '../../lib/claude-options.js';
3
+ import { claudeEntryPointOption, claudeEntryPointPromptOptions, claudeSessionOptions, resolveClaudeSessionOptions } from '../../lib/claude-options.js';
4
4
  import * as git from '../git.js';
5
5
  import * as worktree from '../worktree.js';
6
6
  import { requireBranch, requireWorkingPath } from '../workflow-engine.js';
@@ -12,7 +12,7 @@ import { requireBranch, requireWorkingPath } from '../workflow-engine.js';
12
12
  */
13
13
  export const agentImplementationHandler = {
14
14
  state: WorkflowStates.AgentImplementation,
15
- options: [isolationModeOption, ...claudeSessionOptions(true), claudeEntryPointOption],
15
+ options: [isolationModeOption, ...claudeSessionOptions(true), claudeEntryPointOption, ...claudeEntryPointPromptOptions],
16
16
  async prepare(context) {
17
17
  const branchName = requireBranch(context);
18
18
  const isolationMode = resolveIsolationMode(context.options);
@@ -24,13 +24,14 @@ export const agentImplementationHandler = {
24
24
  },
25
25
  async complete(context) {
26
26
  const workingPath = requireWorkingPath(context, 'run the implementation session');
27
- const { permissionMode, model, effort, claudeEntryPointMode } = resolveClaudeSessionOptions(context.options);
27
+ const { permissionMode, model, effort, claudeEntryPointMode, entryPointPrompt } = resolveClaudeSessionOptions(context.options);
28
28
  await worktree.launchClaudeForBranch(workingPath, {
29
29
  projectItemUrl: context.projectItemUrl,
30
30
  permissionMode,
31
31
  model,
32
32
  effort,
33
- claudeEntryPointMode
33
+ claudeEntryPointMode,
34
+ entryPointPrompt
34
35
  });
35
36
  }
36
37
  };
@@ -1 +1 @@
1
- {"version":3,"file":"agent-implementation.js","sourceRoot":"","sources":["../../../src/services/workflow-handlers/agent-implementation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnF,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AACxH,OAAO,KAAK,GAAG,MAAM,WAAW,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE1E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAyB;IAC9D,KAAK,EAAE,cAAc,CAAC,mBAAmB;IACzC,OAAO,EAAE,CAAC,mBAAmB,EAAE,GAAG,oBAAoB,CAAC,IAAI,CAAC,EAAE,sBAAsB,CAAC;IAErF,KAAK,CAAC,OAAO,CAAC,OAAO;QACnB,MAAM,UAAU,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;QAC1C,MAAM,aAAa,GAAG,oBAAoB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAE5D,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,QAAQ,CAAC,uBAAuB,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;QAC1F,OAAO,CAAC,WAAW,GAAG,WAAW,CAAC;QAElC,IAAI,CAAC,MAAM,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,WAAW,EAAE,CAAC;YACrD,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,OAAO;QACpB,MAAM,WAAW,GAAG,kBAAkB,CAAC,OAAO,EAAE,gCAAgC,CAAC,CAAC;QAClF,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,EAAE,oBAAoB,EAAE,GAAG,2BAA2B,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAE7G,MAAM,QAAQ,CAAC,qBAAqB,CAAC,WAAW,EAAE;YAChD,cAAc,EAAE,OAAO,CAAC,cAAc;YACtC,cAAc;YACd,KAAK;YACL,MAAM;YACN,oBAAoB;SACrB,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
1
+ {"version":3,"file":"agent-implementation.js","sourceRoot":"","sources":["../../../src/services/workflow-handlers/agent-implementation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnF,OAAO,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AACvJ,OAAO,KAAK,GAAG,MAAM,WAAW,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE1E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAyB;IAC9D,KAAK,EAAE,cAAc,CAAC,mBAAmB;IACzC,OAAO,EAAE,CAAC,mBAAmB,EAAE,GAAG,oBAAoB,CAAC,IAAI,CAAC,EAAE,sBAAsB,EAAE,GAAG,6BAA6B,CAAC;IAEvH,KAAK,CAAC,OAAO,CAAC,OAAO;QACnB,MAAM,UAAU,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;QAC1C,MAAM,aAAa,GAAG,oBAAoB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAE5D,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,QAAQ,CAAC,uBAAuB,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;QAC1F,OAAO,CAAC,WAAW,GAAG,WAAW,CAAC;QAElC,IAAI,CAAC,MAAM,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,WAAW,EAAE,CAAC;YACrD,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,OAAO;QACpB,MAAM,WAAW,GAAG,kBAAkB,CAAC,OAAO,EAAE,gCAAgC,CAAC,CAAC;QAClF,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,GAAG,2BAA2B,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAE/H,MAAM,QAAQ,CAAC,qBAAqB,CAAC,WAAW,EAAE;YAChD,cAAc,EAAE,OAAO,CAAC,cAAc;YACtC,cAAc;YACd,KAAK;YACL,MAAM;YACN,oBAAoB;YACpB,gBAAgB;SACjB,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
@@ -1,8 +1,11 @@
1
1
  import type { WorkflowStateHandler } from '../../types/index.js';
2
2
  /**
3
- * Entering "Approved and Merged": approve the PR when the user is a requested
4
- * reviewer, drop the branch's metadata file so it does not leak into the target
5
- * branch, and merge. Afterwards the branch and any worktree are cleaned up.
3
+ * Entering "Approved and Merged": merge the PR. The merge IS the approval - it is performed by
4
+ * the PR's assignee, and GitHub records it as `merged_by` with a timestamp and merge commit
5
+ * (change-management-policy.md clause 2, stage 1). The merge waits for the required CI/CD checks
6
+ * and there is no override at this stage: a red or unfinished suite stops it. Before merging, the
7
+ * branch's metadata file is dropped so it does not leak into the target branch; afterwards the
8
+ * branch and any worktree are cleaned up.
6
9
  */
7
10
  export declare const approvePrHandler: WorkflowStateHandler;
8
11
  //# sourceMappingURL=approve-pr.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"approve-pr.d.ts","sourceRoot":"","sources":["../../../src/services/workflow-handlers/approve-pr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AASjE;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,oBA+F9B,CAAC"}
1
+ {"version":3,"file":"approve-pr.d.ts","sourceRoot":"","sources":["../../../src/services/workflow-handlers/approve-pr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAUjE;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,EAAE,oBAsF9B,CAAC"}
@@ -3,27 +3,21 @@ import { promptConfirm } from '../../lib/prompt.js';
3
3
  import { WorkflowStates } from '../../lib/workflow-states.js';
4
4
  import * as git from '../git.js';
5
5
  import * as github from '../github.js';
6
+ import { confirmApproverIdentity } from '../release-flow.js';
6
7
  import { removeCurrentWorktree, resolveBaseBranch } from '../worktree.js';
7
8
  import { requireBranch } from '../workflow-engine.js';
8
9
  /**
9
- * Entering "Approved and Merged": approve the PR when the user is a requested
10
- * reviewer, drop the branch's metadata file so it does not leak into the target
11
- * branch, and merge. Afterwards the branch and any worktree are cleaned up.
10
+ * Entering "Approved and Merged": merge the PR. The merge IS the approval - it is performed by
11
+ * the PR's assignee, and GitHub records it as `merged_by` with a timestamp and merge commit
12
+ * (change-management-policy.md clause 2, stage 1). The merge waits for the required CI/CD checks
13
+ * and there is no override at this stage: a red or unfinished suite stops it. Before merging, the
14
+ * branch's metadata file is dropped so it does not leak into the target branch; afterwards the
15
+ * branch and any worktree are cleaned up.
12
16
  */
13
17
  export const approvePrHandler = {
14
18
  state: WorkflowStates.ApprovedAndMerged,
15
- options: [
16
- {
17
- longName: 'comment',
18
- shortName: 'c',
19
- description: 'Custom approval comment',
20
- defaultValue: '',
21
- promptWhenDefaultExists: false
22
- }
23
- ],
24
19
  async prepare(context) {
25
20
  const branchName = requireBranch(context);
26
- const comment = context.options['comment'] || 'Approved via idea1 CLI workflow';
27
21
  if (context.workingPath) {
28
22
  await git.ensureBranchUpToDate();
29
23
  }
@@ -34,23 +28,24 @@ export const approvePrHandler = {
34
28
  logger.info(`PR #${prInfo.number} found`);
35
29
  // Re-entering this state after the item was moved back: the merge already happened.
36
30
  if (prInfo.state.toUpperCase() === 'MERGED') {
37
- logger.dim(`PR #${prInfo.number} is already merged; skipping approval and merge.`);
31
+ logger.dim(`PR #${prInfo.number} is already merged; nothing to approve.`);
38
32
  context.branchRetired = true;
39
33
  return;
40
34
  }
41
- await approveIfRequestedReviewer(branchName, comment);
42
- // Remove the branch metadata file before merging so it does not leak into the target branch
35
+ await confirmApproverIdentity(branchName);
36
+ // Remove the branch metadata file before merging so it does not leak into the target branch.
37
+ // This push re-runs the CI/CD suite on the PR, and the merge below waits for that run.
43
38
  if (context.workingPath) {
44
39
  await git.removeBranchMetadataAndPush(branchName);
45
40
  }
46
41
  else {
47
42
  await git.removeBranchMetadataDetached(branchName);
48
43
  }
49
- const confirmMerge = await promptConfirm(`Merge PR #${prInfo.number} (${branchName} -> ${context.baseBranch})?`, { default: true });
44
+ const confirmMerge = await promptConfirm(`Approve PR #${prInfo.number} by merging it (${branchName} -> ${context.baseBranch})?`, { default: true });
50
45
  if (!confirmMerge) {
51
46
  throw new Error('Merge cancelled by user');
52
47
  }
53
- await mergeWithProtectionFallback(branchName);
48
+ await mergeAfterChecksPass(branchName);
54
49
  context.branchRetired = true;
55
50
  },
56
51
  async complete(context) {
@@ -91,56 +86,21 @@ export const approvePrHandler = {
91
86
  }
92
87
  }
93
88
  };
94
- async function approveIfRequestedReviewer(branchName, comment) {
95
- const approvalStatus = await github.getUserApprovalStatus(branchName);
96
- if (!approvalStatus) {
97
- logger.dim('Could not determine approval status, skipping approval');
98
- return;
99
- }
100
- if (approvalStatus.hasAlreadyApproved) {
101
- logger.dim('You have already approved this PR');
102
- return;
103
- }
104
- if (!approvalStatus.isRequestedReviewer) {
105
- logger.dim('You are not a requested reviewer on this PR');
106
- return;
107
- }
108
- const approved = await github.approvePr(branchName, comment);
109
- if (!approved) {
110
- logger.warning('Failed to approve PR, continuing with merge...');
111
- }
112
- }
113
89
  /**
114
- * Merge the PR; when branch protections block it, offer an admin override.
115
- * `gh pr merge` emits a variety of messages depending on the rule that blocked
116
- * the merge, and suggests `--admin` when admin privileges can resolve it.
90
+ * Merge only once the required checks pass. Stage 1 has no admin override
91
+ * (change-management-policy.md clause 3): the only way past a failing suite is to fix it.
117
92
  */
118
- async function mergeWithProtectionFallback(branchName) {
119
- const mergeResult = await github.mergePr(branchName);
120
- if (mergeResult.success) {
121
- return;
93
+ async function mergeAfterChecksPass(branchName) {
94
+ const checks = await github.waitForPrChecks(branchName);
95
+ if (!checks.passed) {
96
+ throw new Error('Required checks did not pass, so the PR was not merged. There is no override at this stage ' +
97
+ '(change-management-policy.md clause 3) - fix the build and run idea1 approve-pr again.\n\n' +
98
+ checks.summary);
122
99
  }
123
- const errorText = mergeResult.error?.toLowerCase() ?? '';
124
- const isBranchProtectionError = errorText.includes('branch protection') ||
125
- errorText.includes('required status check') ||
126
- errorText.includes('required review') ||
127
- errorText.includes('pull request review is required') ||
128
- errorText.includes('base branch policy') ||
129
- errorText.includes('policy prohibits the merge') ||
130
- errorText.includes('--admin');
131
- if (!isBranchProtectionError) {
100
+ const mergeResult = await github.mergePr(branchName);
101
+ if (!mergeResult.success) {
132
102
  throw new Error(`Failed to merge PR: ${mergeResult.error}`);
133
103
  }
134
- logger.warning('Merge failed due to branch protections');
135
- logger.dim(mergeResult.error ?? '');
136
- const override = await promptConfirm('Would you like to override branch protections with admin privileges?', { default: false });
137
- if (!override) {
138
- throw new Error('Merge cancelled by user');
139
- }
140
- const adminMergeResult = await github.mergePrWithAdminOverride(branchName);
141
- if (!adminMergeResult.success) {
142
- throw new Error(`Failed to merge PR with admin override: ${adminMergeResult.error}`);
143
- }
144
104
  }
145
105
  async function deleteBranchQuietly(branchName) {
146
106
  try {
@@ -155,7 +115,7 @@ function printCompletion(baseBranch, projectItemUrl) {
155
115
  logger.newline();
156
116
  logger.success('Workflow complete!');
157
117
  logger.newline();
158
- logger.hint(`PR merged into ${baseBranch}`);
118
+ logger.hint(`PR merged into ${baseBranch} - the merge is the recorded approval`);
159
119
  logger.hint(`Project item: ${projectItemUrl}`);
160
120
  }
161
121
  //# sourceMappingURL=approve-pr.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"approve-pr.js","sourceRoot":"","sources":["../../../src/services/workflow-handlers/approve-pr.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,GAAG,MAAM,WAAW,CAAC;AACjC,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAyB;IACpD,KAAK,EAAE,cAAc,CAAC,iBAAiB;IACvC,OAAO,EAAE;QACP;YACE,QAAQ,EAAE,SAAS;YACnB,SAAS,EAAE,GAAG;YACd,WAAW,EAAE,yBAAyB;YACtC,YAAY,EAAE,EAAE;YAChB,uBAAuB,EAAE,KAAK;SAC/B;KACF;IAED,KAAK,CAAC,OAAO,CAAC,OAAO;QACnB,MAAM,UAAU,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;QAC1C,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,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EAAE,CAAC,CAAC;AACjD,CAAC"}
@@ -1,8 +1,10 @@
1
1
  import type { WorkflowStateHandler } from '../../types/index.js';
2
2
  /**
3
- * Entering "Needs Approval for Release": the PR is complete and gets its
4
- * reviewers and assignee. Afterwards the worktree is removed when
5
- * `removeWorktreeAtState` says so (this state is the default).
3
+ * Entering "Needs Approval for Release": the PR is complete and gets its assignee - the person
4
+ * who will approve it by merging it with `idea1 approve-pr`. The assignee is required: without
5
+ * one the PR has no approver of record (change-management-policy.md clause 2). Reviewers are
6
+ * optional and record nothing. Afterwards the worktree is removed when `removeWorktreeAtState`
7
+ * says so (this state is the default).
6
8
  */
7
9
  export declare const readyForApprovalHandler: WorkflowStateHandler;
8
10
  //# sourceMappingURL=ready-for-approval.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ready-for-approval.d.ts","sourceRoot":"","sources":["../../../src/services/workflow-handlers/ready-for-approval.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAQjE;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,oBAsDrC,CAAC"}
1
+ {"version":3,"file":"ready-for-approval.d.ts","sourceRoot":"","sources":["../../../src/services/workflow-handlers/ready-for-approval.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAQjE;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,EAAE,oBAkDrC,CAAC"}