chief-clancy 0.6.0 → 0.7.1

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 (181) hide show
  1. package/README.md +3 -2
  2. package/dist/bundle/clancy-afk.js +6 -2
  3. package/dist/bundle/clancy-once.js +49 -48
  4. package/dist/installer/hook-installer/hook-installer.d.ts +2 -0
  5. package/dist/installer/hook-installer/hook-installer.d.ts.map +1 -1
  6. package/dist/installer/hook-installer/hook-installer.js +36 -1
  7. package/dist/installer/hook-installer/hook-installer.js.map +1 -1
  8. package/dist/installer/install.js +8 -0
  9. package/dist/installer/install.js.map +1 -1
  10. package/hooks/clancy-branch-guard.js +129 -0
  11. package/hooks/clancy-context-monitor.js +134 -46
  12. package/hooks/clancy-post-compact.js +53 -0
  13. package/hooks/package.json +3 -0
  14. package/package.json +7 -3
  15. package/src/agents/verification-gate.md +128 -0
  16. package/src/roles/setup/workflows/init.md +45 -0
  17. package/src/roles/setup/workflows/scaffold.md +30 -0
  18. package/src/roles/setup/workflows/settings.md +56 -0
  19. package/src/templates/.env.example.github +19 -1
  20. package/src/templates/.env.example.jira +25 -1
  21. package/src/templates/.env.example.linear +19 -1
  22. package/dist/schemas/bitbucket-pr.d.ts +0 -137
  23. package/dist/schemas/bitbucket-pr.d.ts.map +0 -1
  24. package/dist/schemas/bitbucket-pr.js +0 -75
  25. package/dist/schemas/bitbucket-pr.js.map +0 -1
  26. package/dist/schemas/env.d.ts +0 -150
  27. package/dist/schemas/env.d.ts.map +0 -1
  28. package/dist/schemas/env.js +0 -63
  29. package/dist/schemas/env.js.map +0 -1
  30. package/dist/schemas/github-issues.d.ts +0 -105
  31. package/dist/schemas/github-issues.d.ts.map +0 -1
  32. package/dist/schemas/github-issues.js +0 -54
  33. package/dist/schemas/github-issues.js.map +0 -1
  34. package/dist/schemas/gitlab-mr.d.ts +0 -73
  35. package/dist/schemas/gitlab-mr.d.ts.map +0 -1
  36. package/dist/schemas/gitlab-mr.js +0 -33
  37. package/dist/schemas/gitlab-mr.js.map +0 -1
  38. package/dist/schemas/jira.d.ts +0 -59
  39. package/dist/schemas/jira.d.ts.map +0 -1
  40. package/dist/schemas/jira.js +0 -56
  41. package/dist/schemas/jira.js.map +0 -1
  42. package/dist/schemas/linear.d.ts +0 -108
  43. package/dist/schemas/linear.d.ts.map +0 -1
  44. package/dist/schemas/linear.js +0 -84
  45. package/dist/schemas/linear.js.map +0 -1
  46. package/dist/scripts/afk/afk.d.ts +0 -21
  47. package/dist/scripts/afk/afk.d.ts.map +0 -1
  48. package/dist/scripts/afk/afk.js +0 -118
  49. package/dist/scripts/afk/afk.js.map +0 -1
  50. package/dist/scripts/board/github/github.d.ts +0 -104
  51. package/dist/scripts/board/github/github.d.ts.map +0 -1
  52. package/dist/scripts/board/github/github.js +0 -291
  53. package/dist/scripts/board/github/github.js.map +0 -1
  54. package/dist/scripts/board/jira/jira.d.ts +0 -139
  55. package/dist/scripts/board/jira/jira.d.ts.map +0 -1
  56. package/dist/scripts/board/jira/jira.js +0 -378
  57. package/dist/scripts/board/jira/jira.js.map +0 -1
  58. package/dist/scripts/board/linear/linear.d.ts +0 -129
  59. package/dist/scripts/board/linear/linear.d.ts.map +0 -1
  60. package/dist/scripts/board/linear/linear.js +0 -393
  61. package/dist/scripts/board/linear/linear.js.map +0 -1
  62. package/dist/scripts/once/board-ops/board-ops.d.ts +0 -26
  63. package/dist/scripts/once/board-ops/board-ops.d.ts.map +0 -1
  64. package/dist/scripts/once/board-ops/board-ops.js +0 -113
  65. package/dist/scripts/once/board-ops/board-ops.js.map +0 -1
  66. package/dist/scripts/once/deliver/deliver.d.ts +0 -37
  67. package/dist/scripts/once/deliver/deliver.d.ts.map +0 -1
  68. package/dist/scripts/once/deliver/deliver.js +0 -236
  69. package/dist/scripts/once/deliver/deliver.js.map +0 -1
  70. package/dist/scripts/once/fetch-ticket/fetch-ticket.d.ts +0 -22
  71. package/dist/scripts/once/fetch-ticket/fetch-ticket.d.ts.map +0 -1
  72. package/dist/scripts/once/fetch-ticket/fetch-ticket.js +0 -123
  73. package/dist/scripts/once/fetch-ticket/fetch-ticket.js.map +0 -1
  74. package/dist/scripts/once/git-token/git-token.d.ts +0 -13
  75. package/dist/scripts/once/git-token/git-token.d.ts.map +0 -1
  76. package/dist/scripts/once/git-token/git-token.js +0 -30
  77. package/dist/scripts/once/git-token/git-token.js.map +0 -1
  78. package/dist/scripts/once/once.d.ts +0 -12
  79. package/dist/scripts/once/once.d.ts.map +0 -1
  80. package/dist/scripts/once/once.js +0 -356
  81. package/dist/scripts/once/once.js.map +0 -1
  82. package/dist/scripts/once/pr-creation/pr-creation.d.ts +0 -11
  83. package/dist/scripts/once/pr-creation/pr-creation.d.ts.map +0 -1
  84. package/dist/scripts/once/pr-creation/pr-creation.js +0 -50
  85. package/dist/scripts/once/pr-creation/pr-creation.js.map +0 -1
  86. package/dist/scripts/once/rework/rework.d.ts +0 -32
  87. package/dist/scripts/once/rework/rework.d.ts.map +0 -1
  88. package/dist/scripts/once/rework/rework.js +0 -208
  89. package/dist/scripts/once/rework/rework.js.map +0 -1
  90. package/dist/scripts/once/types/types.d.ts +0 -13
  91. package/dist/scripts/once/types/types.d.ts.map +0 -1
  92. package/dist/scripts/once/types/types.js +0 -2
  93. package/dist/scripts/once/types/types.js.map +0 -1
  94. package/dist/scripts/shared/branch/branch.d.ts +0 -50
  95. package/dist/scripts/shared/branch/branch.d.ts.map +0 -1
  96. package/dist/scripts/shared/branch/branch.js +0 -61
  97. package/dist/scripts/shared/branch/branch.js.map +0 -1
  98. package/dist/scripts/shared/claude-cli/claude-cli.d.ts +0 -31
  99. package/dist/scripts/shared/claude-cli/claude-cli.d.ts.map +0 -1
  100. package/dist/scripts/shared/claude-cli/claude-cli.js +0 -60
  101. package/dist/scripts/shared/claude-cli/claude-cli.js.map +0 -1
  102. package/dist/scripts/shared/env-schema/env-schema.d.ts +0 -27
  103. package/dist/scripts/shared/env-schema/env-schema.d.ts.map +0 -1
  104. package/dist/scripts/shared/env-schema/env-schema.js +0 -47
  105. package/dist/scripts/shared/env-schema/env-schema.js.map +0 -1
  106. package/dist/scripts/shared/feasibility/feasibility.d.ts +0 -30
  107. package/dist/scripts/shared/feasibility/feasibility.d.ts.map +0 -1
  108. package/dist/scripts/shared/feasibility/feasibility.js +0 -68
  109. package/dist/scripts/shared/feasibility/feasibility.js.map +0 -1
  110. package/dist/scripts/shared/format/format.d.ts +0 -11
  111. package/dist/scripts/shared/format/format.d.ts.map +0 -1
  112. package/dist/scripts/shared/format/format.js +0 -18
  113. package/dist/scripts/shared/format/format.js.map +0 -1
  114. package/dist/scripts/shared/git-ops/git-ops.d.ts +0 -90
  115. package/dist/scripts/shared/git-ops/git-ops.d.ts.map +0 -1
  116. package/dist/scripts/shared/git-ops/git-ops.js +0 -190
  117. package/dist/scripts/shared/git-ops/git-ops.js.map +0 -1
  118. package/dist/scripts/shared/http/http.d.ts +0 -54
  119. package/dist/scripts/shared/http/http.d.ts.map +0 -1
  120. package/dist/scripts/shared/http/http.js +0 -76
  121. package/dist/scripts/shared/http/http.js.map +0 -1
  122. package/dist/scripts/shared/notify/notify.d.ts +0 -46
  123. package/dist/scripts/shared/notify/notify.d.ts.map +0 -1
  124. package/dist/scripts/shared/notify/notify.js +0 -88
  125. package/dist/scripts/shared/notify/notify.js.map +0 -1
  126. package/dist/scripts/shared/preflight/preflight.d.ts +0 -40
  127. package/dist/scripts/shared/preflight/preflight.d.ts.map +0 -1
  128. package/dist/scripts/shared/preflight/preflight.js +0 -96
  129. package/dist/scripts/shared/preflight/preflight.js.map +0 -1
  130. package/dist/scripts/shared/progress/progress.d.ts +0 -75
  131. package/dist/scripts/shared/progress/progress.d.ts.map +0 -1
  132. package/dist/scripts/shared/progress/progress.js +0 -210
  133. package/dist/scripts/shared/progress/progress.js.map +0 -1
  134. package/dist/scripts/shared/prompt/prompt.d.ts +0 -58
  135. package/dist/scripts/shared/prompt/prompt.d.ts.map +0 -1
  136. package/dist/scripts/shared/prompt/prompt.js +0 -123
  137. package/dist/scripts/shared/prompt/prompt.js.map +0 -1
  138. package/dist/scripts/shared/pull-request/bitbucket/bitbucket.d.ts +0 -82
  139. package/dist/scripts/shared/pull-request/bitbucket/bitbucket.d.ts.map +0 -1
  140. package/dist/scripts/shared/pull-request/bitbucket/bitbucket.js +0 -301
  141. package/dist/scripts/shared/pull-request/bitbucket/bitbucket.js.map +0 -1
  142. package/dist/scripts/shared/pull-request/github/github.d.ts +0 -72
  143. package/dist/scripts/shared/pull-request/github/github.d.ts.map +0 -1
  144. package/dist/scripts/shared/pull-request/github/github.js +0 -226
  145. package/dist/scripts/shared/pull-request/github/github.js.map +0 -1
  146. package/dist/scripts/shared/pull-request/gitlab/gitlab.d.ts +0 -74
  147. package/dist/scripts/shared/pull-request/gitlab/gitlab.d.ts.map +0 -1
  148. package/dist/scripts/shared/pull-request/gitlab/gitlab.js +0 -220
  149. package/dist/scripts/shared/pull-request/gitlab/gitlab.js.map +0 -1
  150. package/dist/scripts/shared/pull-request/post-pr/post-pr.d.ts +0 -31
  151. package/dist/scripts/shared/pull-request/post-pr/post-pr.d.ts.map +0 -1
  152. package/dist/scripts/shared/pull-request/post-pr/post-pr.js +0 -61
  153. package/dist/scripts/shared/pull-request/post-pr/post-pr.js.map +0 -1
  154. package/dist/scripts/shared/pull-request/pr-body/pr-body.d.ts +0 -40
  155. package/dist/scripts/shared/pull-request/pr-body/pr-body.d.ts.map +0 -1
  156. package/dist/scripts/shared/pull-request/pr-body/pr-body.js +0 -84
  157. package/dist/scripts/shared/pull-request/pr-body/pr-body.js.map +0 -1
  158. package/dist/scripts/shared/pull-request/rework-comment/rework-comment.d.ts +0 -23
  159. package/dist/scripts/shared/pull-request/rework-comment/rework-comment.d.ts.map +0 -1
  160. package/dist/scripts/shared/pull-request/rework-comment/rework-comment.js +0 -30
  161. package/dist/scripts/shared/pull-request/rework-comment/rework-comment.js.map +0 -1
  162. package/dist/scripts/shared/remote/remote.d.ts +0 -41
  163. package/dist/scripts/shared/remote/remote.d.ts.map +0 -1
  164. package/dist/scripts/shared/remote/remote.js +0 -227
  165. package/dist/scripts/shared/remote/remote.js.map +0 -1
  166. package/dist/types/board.d.ts +0 -13
  167. package/dist/types/board.d.ts.map +0 -1
  168. package/dist/types/board.js +0 -5
  169. package/dist/types/board.js.map +0 -1
  170. package/dist/types/index.d.ts +0 -4
  171. package/dist/types/index.d.ts.map +0 -1
  172. package/dist/types/index.js +0 -2
  173. package/dist/types/index.js.map +0 -1
  174. package/dist/types/remote.d.ts +0 -55
  175. package/dist/types/remote.d.ts.map +0 -1
  176. package/dist/types/remote.js +0 -5
  177. package/dist/types/remote.js.map +0 -1
  178. package/dist/utils/parse-json/parse-json.d.ts +0 -20
  179. package/dist/utils/parse-json/parse-json.d.ts.map +0 -1
  180. package/dist/utils/parse-json/parse-json.js +0 -27
  181. package/dist/utils/parse-json/parse-json.js.map +0 -1
@@ -1,356 +0,0 @@
1
- /**
2
- * Unified once orchestrator — replaces all three `clancy-once-*.sh` scripts.
3
- *
4
- * Full lifecycle: preflight → detect board → [epic completion check] →
5
- * fetch ticket → compute branches → [dry-run gate] → feasibility check →
6
- * create branch → transition In Progress → invoke Claude → push + PR →
7
- * log → notify.
8
- *
9
- * All errors exit with code 0 (not 1). This is intentional — the AFK runner
10
- * detects stop conditions by parsing stdout, not exit codes.
11
- */
12
- import { resolve } from 'node:path';
13
- import { fileURLToPath } from 'node:url';
14
- import { computeTargetBranch, computeTicketBranch, } from '../../scripts/shared/branch/branch.js';
15
- import { invokeClaudeSession } from '../../scripts/shared/claude-cli/claude-cli.js';
16
- import { detectBoard } from '../../scripts/shared/env-schema/env-schema.js';
17
- import { checkFeasibility } from '../../scripts/shared/feasibility/feasibility.js';
18
- import { formatDuration } from '../../scripts/shared/format/format.js';
19
- import { checkout, currentBranch, diffAgainstBranch, ensureBranch, fetchRemoteBranch, } from '../../scripts/shared/git-ops/git-ops.js';
20
- import { sendNotification } from '../../scripts/shared/notify/notify.js';
21
- import { runPreflight } from '../../scripts/shared/preflight/preflight.js';
22
- import { appendProgress, countReworkCycles, findEntriesWithStatus, } from '../../scripts/shared/progress/progress.js';
23
- import { buildPrompt, buildReworkPrompt, } from '../../scripts/shared/prompt/prompt.js';
24
- import { bold, dim, green, red, yellow } from '../../utils/ansi/ansi.js';
25
- import { fetchEpicChildrenStatus, pingBoard, sharedEnv, transitionToStatus, validateInputs, } from './board-ops/board-ops.js';
26
- import { deliverEpicToBase, deliverViaPullRequest, ensureEpicBranch, } from './deliver/deliver.js';
27
- import { fetchTicket } from './fetch-ticket/fetch-ticket.js';
28
- import { fetchReworkFromPrReview, postReworkActions } from './rework/rework.js';
29
- // ─── Main orchestrator ───────────────────────────────────────────────────────
30
- /**
31
- * Run the once orchestrator — full ticket lifecycle.
32
- *
33
- * @param argv - Process arguments (supports `--dry-run` flag).
34
- *
35
- * @example
36
- * ```ts
37
- * await run(process.argv);
38
- * ```
39
- */
40
- export async function run(argv) {
41
- const dryRun = argv.includes('--dry-run');
42
- const skipFeasibility = argv.includes('--skip-feasibility');
43
- const startTime = Date.now();
44
- console.log(dim('┌──────────────────────────────────────┐'));
45
- console.log(dim('│') + bold(' 🤖 Clancy — once mode ') + dim('│'));
46
- console.log(dim('│') + dim(' "Let\'s roll." ') + dim('│'));
47
- console.log(dim('└──────────────────────────────────────┘'));
48
- console.log('');
49
- let originalBranch;
50
- try {
51
- // 1. Preflight
52
- const preflight = runPreflight(process.cwd());
53
- if (!preflight.ok) {
54
- console.log(preflight.error);
55
- return;
56
- }
57
- if (preflight.warning) {
58
- console.log(preflight.warning);
59
- }
60
- // 2. Detect board
61
- const boardResult = detectBoard(preflight.env);
62
- if (typeof boardResult === 'string') {
63
- console.log(boardResult);
64
- return;
65
- }
66
- const config = boardResult;
67
- // 3. Validate board-specific inputs
68
- const validationError = validateInputs(config);
69
- if (validationError) {
70
- console.log(validationError);
71
- return;
72
- }
73
- // 4. Ping board
74
- const ping = await pingBoard(config);
75
- if (!ping.ok) {
76
- console.log(ping.error);
77
- return;
78
- }
79
- console.log(green('✅ Preflight passed'));
80
- // 4a. Epic completion check — scan for epics whose children are all done
81
- // This runs at the START of each iteration to catch epics where child PRs
82
- // were merged since the last run. The check cannot run after child delivery
83
- // because the just-delivered child is still "In Review", not "Done".
84
- // Best-effort — errors are swallowed so the run continues.
85
- try {
86
- const prEntries = findEntriesWithStatus(process.cwd(), 'PR_CREATED');
87
- const reworkEntries = findEntriesWithStatus(process.cwd(), 'REWORK');
88
- const pushedEntries = findEntriesWithStatus(process.cwd(), 'PUSHED');
89
- const allEntries = [...prEntries, ...reworkEntries, ...pushedEntries];
90
- // Skip epics that already have an EPIC_PR_CREATED entry
91
- const epicDone = new Set(findEntriesWithStatus(process.cwd(), 'EPIC_PR_CREATED').map((e) => e.key));
92
- const parentKeys = new Set(allEntries
93
- .map((e) => e.parent)
94
- .filter((p) => Boolean(p))
95
- .filter((p) => !epicDone.has(p)));
96
- const baseBranch = config.env.CLANCY_BASE_BRANCH ?? 'main';
97
- for (const parentKey of parentKeys) {
98
- const status = await fetchEpicChildrenStatus(config, parentKey);
99
- if (status && status.incomplete === 0 && status.total > 0) {
100
- const epicBranch = computeTargetBranch(config.provider, baseBranch, parentKey);
101
- const epicOk = await deliverEpicToBase(config, parentKey, parentKey, // title fallback — see WARNING #4 in review
102
- epicBranch, baseBranch);
103
- if (epicOk) {
104
- console.log(green(` ✓ Epic ${parentKey} complete — PR created`));
105
- }
106
- else {
107
- console.log(yellow(`⚠ Epic PR creation failed for ${parentKey}. Create manually:\n` +
108
- ` git push origin ${epicBranch}\n` +
109
- ` Then create a PR targeting ${baseBranch}`));
110
- }
111
- }
112
- }
113
- }
114
- catch {
115
- // Best-effort — epic completion check failure shouldn't block the run
116
- }
117
- // 5. Check rework — PR-based detection, then fresh ticket
118
- let isRework = false;
119
- let prFeedback;
120
- let reworkPrNumber;
121
- let reworkDiscussionIds;
122
- let reworkReviewers;
123
- let ticket;
124
- // PR-based rework (automatic, no config needed)
125
- try {
126
- const prRework = await fetchReworkFromPrReview(config);
127
- if (prRework) {
128
- isRework = true;
129
- ticket = prRework.ticket;
130
- prFeedback = prRework.feedback;
131
- reworkPrNumber = prRework.prNumber;
132
- reworkDiscussionIds = prRework.discussionIds;
133
- reworkReviewers = prRework.reviewers;
134
- console.log(yellow(` ↻ PR rework: [${ticket.key}] ${ticket.title}`));
135
- }
136
- }
137
- catch {
138
- // Best-effort — fall through to fresh ticket
139
- }
140
- if (!ticket) {
141
- // Fresh ticket
142
- ticket = await fetchTicket(config);
143
- }
144
- if (!ticket) {
145
- console.log(dim('No tickets found. All done!'));
146
- return;
147
- }
148
- // 5a. Max rework guard
149
- if (isRework) {
150
- const parsed = parseInt(sharedEnv(config).CLANCY_MAX_REWORK ?? '3', 10);
151
- const maxRework = Number.isFinite(parsed) && parsed > 0 ? parsed : 3;
152
- const cycles = countReworkCycles(process.cwd(), ticket.key);
153
- if (cycles >= maxRework) {
154
- console.log(yellow(`⚠ ${ticket.key} has reached max rework cycles (${maxRework}) — needs human intervention`));
155
- appendProgress(process.cwd(), ticket.key, ticket.title, 'SKIPPED');
156
- return;
157
- }
158
- }
159
- // 6. Compute branches
160
- const baseBranch = config.env.CLANCY_BASE_BRANCH ?? 'main';
161
- const parent = ticket.parentInfo !== 'none' ? ticket.parentInfo : undefined;
162
- const ticketBranch = computeTicketBranch(config.provider, ticket.key);
163
- const targetBranch = computeTargetBranch(config.provider, baseBranch, parent);
164
- // 7. Dry-run gate
165
- if (dryRun) {
166
- const parentLabel = config.provider === 'github' ? 'Milestone' : 'Epic';
167
- console.log('');
168
- console.log(yellow('── Dry Run ──────────────────────────────────────'));
169
- console.log(` Ticket: ${bold(`[${ticket.key}]`)} ${ticket.title}`);
170
- if (isRework) {
171
- console.log(` Mode: Rework`);
172
- }
173
- console.log(` ${parentLabel}:${' '.repeat(14 - parentLabel.length)}${ticket.parentInfo}`);
174
- if (config.provider !== 'github') {
175
- console.log(` Blockers: ${ticket.blockers}`);
176
- }
177
- console.log(` Target branch: ${ticketBranch} → ${targetBranch}`);
178
- if (ticket.description) {
179
- console.log(` Description: ${ticket.description}`);
180
- }
181
- console.log(yellow('─────────────────────────────────────────────────'));
182
- console.log(dim(' No changes made. Remove --dry-run to run for real.'));
183
- return;
184
- }
185
- // 8. Print ticket info
186
- const parentLabel = config.provider === 'github' ? 'Milestone' : 'Epic';
187
- console.log('');
188
- console.log(`🎫 ${bold(`[${ticket.key}]`)} ${ticket.title}`);
189
- console.log(dim(` ${parentLabel}: ${ticket.parentInfo} | Branch: ${ticketBranch} → ${targetBranch}`));
190
- if (config.provider !== 'github' && ticket.blockers !== 'None') {
191
- console.log(yellow(` Blockers: ${ticket.blockers}`));
192
- }
193
- console.log('');
194
- // 9. Feasibility check (skipped for rework tickets and --skip-feasibility)
195
- if (!isRework && !skipFeasibility) {
196
- console.log(dim(' Checking feasibility...'));
197
- const feasibility = checkFeasibility({
198
- key: ticket.key,
199
- title: ticket.title,
200
- description: ticket.description,
201
- }, config.env.CLANCY_MODEL);
202
- if (!feasibility.feasible) {
203
- const reason = feasibility.reason ?? 'not implementable as code changes';
204
- console.log(yellow(`⏭️ Ticket skipped [${ticket.key}]: ${reason}`));
205
- appendProgress(process.cwd(), ticket.key, ticket.title, 'SKIPPED');
206
- return;
207
- }
208
- console.log(green(' ✓ Feasibility check passed'));
209
- }
210
- console.log('');
211
- // 10. Git: set up branches
212
- originalBranch = currentBranch();
213
- const hasParent = ticket.parentInfo !== 'none';
214
- // Single-child skip: if epic has exactly 1 child and this is it,
215
- // skip the epic branch and deliver directly to base.
216
- let skipEpicBranch = false;
217
- if (hasParent && !isRework) {
218
- const childrenStatus = await fetchEpicChildrenStatus(config, ticket.parentInfo, ticket.linearIssueId);
219
- if (childrenStatus && childrenStatus.total === 1) {
220
- skipEpicBranch = true;
221
- }
222
- }
223
- // Effective target: epic branch (parented) or base branch (standalone/single-child)
224
- const effectiveTarget = hasParent && !skipEpicBranch ? targetBranch : baseBranch;
225
- if (isRework) {
226
- // PR-flow rework: try to fetch the existing feature branch from remote
227
- if (hasParent && !skipEpicBranch) {
228
- // Ensure epic branch exists for rework targeting it
229
- const epicReady = ensureEpicBranch(targetBranch, baseBranch);
230
- if (!epicReady) {
231
- if (originalBranch)
232
- checkout(originalBranch);
233
- return;
234
- }
235
- }
236
- else {
237
- ensureBranch(effectiveTarget, baseBranch);
238
- }
239
- const fetched = fetchRemoteBranch(ticketBranch);
240
- if (fetched) {
241
- checkout(ticketBranch);
242
- }
243
- else {
244
- checkout(effectiveTarget);
245
- checkout(ticketBranch, true);
246
- }
247
- }
248
- else if (hasParent && !skipEpicBranch) {
249
- // Epic branch flow: ensure epic branch, create feature from it
250
- const epicReady = ensureEpicBranch(targetBranch, baseBranch);
251
- if (!epicReady) {
252
- if (originalBranch)
253
- checkout(originalBranch);
254
- return;
255
- }
256
- checkout(targetBranch);
257
- checkout(ticketBranch, true);
258
- }
259
- else {
260
- // Standalone or single-child: branch from base
261
- ensureBranch(baseBranch, baseBranch);
262
- checkout(baseBranch);
263
- checkout(ticketBranch, true);
264
- }
265
- // 11. Transition to In Progress (best-effort)
266
- const statusInProgress = config.env.CLANCY_STATUS_IN_PROGRESS;
267
- if (statusInProgress) {
268
- await transitionToStatus(config, ticket, statusInProgress);
269
- }
270
- // 12. Build prompt and invoke Claude
271
- let prompt;
272
- const tdd = config.env.CLANCY_TDD === 'true';
273
- if (isRework) {
274
- prompt = buildReworkPrompt({
275
- key: ticket.key,
276
- title: ticket.title,
277
- description: ticket.description,
278
- provider: config.provider,
279
- feedbackComments: prFeedback ?? [],
280
- previousContext: diffAgainstBranch(targetBranch),
281
- tdd,
282
- });
283
- }
284
- else {
285
- prompt = buildPrompt({
286
- provider: config.provider,
287
- key: ticket.key,
288
- title: ticket.title,
289
- description: ticket.description,
290
- parentInfo: ticket.parentInfo,
291
- blockers: config.provider !== 'github' ? ticket.blockers : undefined,
292
- tdd,
293
- });
294
- }
295
- const claudeOk = invokeClaudeSession(prompt, config.env.CLANCY_MODEL);
296
- if (!claudeOk) {
297
- console.log(yellow('⚠ Claude session exited with an error. Skipping merge.'));
298
- return;
299
- }
300
- // 13. Deliver — all paths use PR flow (targeting epic branch or base branch)
301
- const parentKey = hasParent && !skipEpicBranch ? ticket.parentInfo : undefined;
302
- if (isRework) {
303
- // PR-flow rework: push to existing branch, PR updates automatically
304
- const delivered = await deliverViaPullRequest(config, ticket, ticketBranch, effectiveTarget, startTime, true, parentKey);
305
- if (!delivered) {
306
- appendProgress(process.cwd(), ticket.key, ticket.title, 'PUSH_FAILED', undefined, parentKey);
307
- return;
308
- }
309
- // Log single REWORK entry (skipLog prevents deliverViaPullRequest from double-logging)
310
- appendProgress(process.cwd(), ticket.key, ticket.title, 'REWORK', reworkPrNumber, parentKey);
311
- // Post-rework actions (all best-effort)
312
- if (reworkPrNumber != null) {
313
- await postReworkActions(config, reworkPrNumber, prFeedback ?? [], reworkDiscussionIds, reworkReviewers);
314
- }
315
- }
316
- else {
317
- // Fresh ticket: deliver via PR (to epic branch or base branch)
318
- const delivered = await deliverViaPullRequest(config, ticket, ticketBranch, effectiveTarget, startTime, false, parentKey);
319
- if (!delivered)
320
- return;
321
- }
322
- const elapsed = formatDuration(Date.now() - startTime);
323
- console.log('');
324
- console.log(green(`🏁 ${ticket.key} complete`) + dim(` (${elapsed})`));
325
- console.log(dim(' "Bake \'em away, toys."'));
326
- // 14. Send notification (best-effort)
327
- const webhook = config.env.CLANCY_NOTIFY_WEBHOOK;
328
- if (webhook) {
329
- await sendNotification(webhook, `✓ Clancy completed [${ticket.key}] ${ticket.title}`);
330
- }
331
- }
332
- catch (error) {
333
- // Unexpected errors — print and exit cleanly (exit 0 for AFK loop compat)
334
- const msg = error instanceof Error ? error.message : String(error);
335
- const elapsed = formatDuration(Date.now() - startTime);
336
- console.error('');
337
- console.error(red(`❌ Clancy stopped`) + dim(` (${elapsed})`));
338
- console.error(red(` ${msg}`));
339
- console.error(dim(' "I\'d rather let Herman go."'));
340
- // Best-effort: restore the branch the user was on before Clancy started
341
- if (originalBranch) {
342
- try {
343
- checkout(originalBranch);
344
- }
345
- catch {
346
- // Ignore — branch restore is best-effort
347
- }
348
- }
349
- }
350
- }
351
- // Main guard — self-execute when run directly (e.g. node .clancy/clancy-once.js)
352
- if (process.argv[1] &&
353
- fileURLToPath(import.meta.url) === resolve(process.argv[1])) {
354
- run(process.argv);
355
- }
356
- //# sourceMappingURL=once.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"once.js","sourceRoot":"","sources":["../../../src/scripts/once/once.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EACL,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EACL,QAAQ,EACR,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,GAClB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,WAAW,EACX,iBAAiB,GAClB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAErE,OAAO,EACL,uBAAuB,EACvB,SAAS,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C,kBAAkB,CAAC,GAAG,GAAG,CAAC,KAAK,OAAO,GAAG,CAAC,CAAC,CAAC;QAC9D,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC;QAChC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC,CAAC;QAErD,wEAAwE;QACxE,IAAI,cAAc,EAAE,CAAC;YACnB,IAAI,CAAC;gBACH,QAAQ,CAAC,cAAc,CAAC,CAAC;YAC3B,CAAC;YAAC,MAAM,CAAC;gBACP,yCAAyC;YAC3C,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC;AAED,iFAAiF;AACjF,IACE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACf,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAC3D,CAAC;IACD,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AACpB,CAAC"}
@@ -1,11 +0,0 @@
1
- import type { BoardConfig } from '../../../scripts/shared/env-schema/env-schema.js';
2
- import type { PrCreationResult, RemoteInfo } from '../../../types/index.js';
3
- /**
4
- * Attempt to create a PR/MR on the detected remote platform.
5
- */
6
- export declare function attemptPrCreation(config: BoardConfig, remote: RemoteInfo, ticketBranch: string, targetBranch: string, title: string, body: string): Promise<PrCreationResult | undefined>;
7
- /**
8
- * Build a manual PR/MR URL for the user to click.
9
- */
10
- export declare function buildManualPrUrl(remote: RemoteInfo, ticketBranch: string, targetBranch: string): string | undefined;
11
- //# sourceMappingURL=pr-creation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pr-creation.d.ts","sourceRoot":"","sources":["../../../../src/scripts/once/pr-creation/pr-creation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAQ7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAKrE;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,UAAU,EAClB,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAyDvC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,UAAU,EAClB,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,GACnB,MAAM,GAAG,SAAS,CAiBpB"}
@@ -1,50 +0,0 @@
1
- import { createPullRequest as createBitbucketPr, createServerPullRequest as createBitbucketServerPr, } from '../../../scripts/shared/pull-request/bitbucket/bitbucket.js';
2
- import { createPullRequest as createGitHubPr } from '../../../scripts/shared/pull-request/github/github.js';
3
- import { createMergeRequest as createGitLabMr } from '../../../scripts/shared/pull-request/gitlab/gitlab.js';
4
- import { buildApiBaseUrl } from '../../../scripts/shared/remote/remote.js';
5
- import { sharedEnv } from '../board-ops/board-ops.js';
6
- import { resolveGitToken } from '../git-token/git-token.js';
7
- /**
8
- * Attempt to create a PR/MR on the detected remote platform.
9
- */
10
- export async function attemptPrCreation(config, remote, ticketBranch, targetBranch, title, body) {
11
- const creds = resolveGitToken(config, remote);
12
- if (!creds)
13
- return undefined;
14
- const apiBase = buildApiBaseUrl(remote, sharedEnv(config).CLANCY_GIT_API_URL);
15
- if (!apiBase)
16
- return undefined;
17
- switch (remote.host) {
18
- case 'github':
19
- return createGitHubPr(creds.token, `${remote.owner}/${remote.repo}`, ticketBranch, targetBranch, title, body, apiBase);
20
- case 'gitlab':
21
- return createGitLabMr(creds.token, apiBase, remote.projectPath, ticketBranch, targetBranch, title, body);
22
- case 'bitbucket':
23
- return createBitbucketPr(creds.username, creds.token, remote.workspace, remote.repoSlug, ticketBranch, targetBranch, title, body);
24
- case 'bitbucket-server':
25
- return createBitbucketServerPr(creds.token, apiBase, remote.projectKey, remote.repoSlug, ticketBranch, targetBranch, title, body);
26
- default:
27
- return undefined;
28
- }
29
- }
30
- /**
31
- * Build a manual PR/MR URL for the user to click.
32
- */
33
- export function buildManualPrUrl(remote, ticketBranch, targetBranch) {
34
- const encodedTicket = encodeURIComponent(ticketBranch);
35
- const encodedTarget = encodeURIComponent(targetBranch);
36
- if (remote.host === 'github') {
37
- return `https://${remote.hostname}/${remote.owner}/${remote.repo}/compare/${encodedTarget}...${encodedTicket}`;
38
- }
39
- if (remote.host === 'gitlab') {
40
- return `https://${remote.hostname}/${remote.projectPath}/-/merge_requests/new?merge_request[source_branch]=${encodedTicket}&merge_request[target_branch]=${encodedTarget}`;
41
- }
42
- if (remote.host === 'bitbucket') {
43
- return `https://${remote.hostname}/${remote.workspace}/${remote.repoSlug}/pull-requests/new?source=${encodedTicket}&dest=${encodedTarget}`;
44
- }
45
- if (remote.host === 'bitbucket-server') {
46
- return `https://${remote.hostname}/projects/${remote.projectKey}/repos/${remote.repoSlug}/pull-requests?create&sourceBranch=refs/heads/${encodedTicket}&targetBranch=refs/heads/${encodedTarget}`;
47
- }
48
- return undefined;
49
- }
50
- //# sourceMappingURL=pr-creation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pr-creation.js","sourceRoot":"","sources":["../../../../src/scripts/once/pr-creation/pr-creation.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,IAAI,iBAAiB,EACtC,uBAAuB,IAAI,uBAAuB,GACnD,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAE,iBAAiB,IAAI,cAAc,EAAE,MAAM,gDAAgD,CAAC;AACrG,OAAO,EAAE,kBAAkB,IAAI,cAAc,EAAE,MAAM,gDAAgD,CAAC;AACtG,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAGpE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE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,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAC9B,MAAkB,EAClB,YAAoB,EACpB,YAAoB;IAEpB,MAAM,aAAa,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC;IACvD,MAAM,aAAa,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC;IAEvD,IAAI,MAAM,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,OAAO,WAAW,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,IAAI,YAAY,aAAa,MAAM,aAAa,EAAE,CAAC;IACjH,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,OAAO,WAAW,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,WAAW,sDAAsD,aAAa,iCAAiC,aAAa,EAAE,CAAC;IAC7K,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;QAChC,OAAO,WAAW,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,QAAQ,6BAA6B,aAAa,SAAS,aAAa,EAAE,CAAC;IAC7I,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,KAAK,kBAAkB,EAAE,CAAC;QACvC,OAAO,WAAW,MAAM,CAAC,QAAQ,aAAa,MAAM,CAAC,UAAU,UAAU,MAAM,CAAC,QAAQ,iDAAiD,aAAa,4BAA4B,aAAa,EAAE,CAAC;IACpM,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -1,32 +0,0 @@
1
- import type { BoardConfig } from '../../../scripts/shared/env-schema/env-schema.js';
2
- import type { FetchedTicket } from '../types/types.js';
3
- /**
4
- * Check open PRs for review feedback requesting changes.
5
- *
6
- * Scans progress.txt for tickets with status PR_CREATED, then checks
7
- * the corresponding PR's review state on the detected remote platform.
8
- * If a reviewer has requested changes, returns the ticket and feedback.
9
- *
10
- * This is best-effort — errors are swallowed so the orchestrator
11
- * can fall through to fresh ticket fetch.
12
- */
13
- export declare function fetchReworkFromPrReview(config: BoardConfig): Promise<{
14
- ticket: FetchedTicket;
15
- feedback: string[];
16
- prNumber: number;
17
- discussionIds?: string[];
18
- reviewers: string[];
19
- } | undefined>;
20
- /**
21
- * Build a rework comment to post on the PR after pushing fixes.
22
- *
23
- * Prefixed with `[clancy]` (not `Rework:`) so it does NOT trigger
24
- * rework detection on the next cycle.
25
- */
26
- export declare function buildReworkComment(feedback: string[]): string;
27
- /**
28
- * Perform post-rework actions: comment on PR, re-request review (GitHub),
29
- * resolve threads (GitLab). All best-effort — failures warn but don't block.
30
- */
31
- export declare function postReworkActions(config: BoardConfig, prNumber: number, feedback: string[], discussionIds?: string[], reviewers?: string[]): Promise<void>;
32
- //# sourceMappingURL=rework.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rework.d.ts","sourceRoot":"","sources":["../../../../src/scripts/once/rework/rework.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AA8B7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAIvD;;;;;;;;;GASG;AACH,wBAAsB,uBAAuB,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CACvE;IACE,MAAM,EAAE,aAAa,CAAC;IACtB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,GACD,SAAS,CACZ,CA8KA;AAID;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAW7D;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAAE,EAClB,aAAa,CAAC,EAAE,MAAM,EAAE,EACxB,SAAS,CAAC,EAAE,MAAM,EAAE,GACnB,OAAO,CAAC,IAAI,CAAC,CAiHf"}