@bradtaylorsf/alpha-loop 1.8.0 → 1.9.0
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/dist/cli.js +4 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/init.js +6 -5
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/plan.d.ts +1 -0
- package/dist/commands/plan.js +298 -195
- package/dist/commands/plan.js.map +1 -1
- package/dist/commands/resume.js +6 -5
- package/dist/commands/resume.js.map +1 -1
- package/dist/commands/roadmap.js +2 -3
- package/dist/commands/roadmap.js.map +1 -1
- package/dist/commands/run.d.ts +2 -0
- package/dist/commands/run.js +33 -2
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/triage.js +12 -16
- package/dist/commands/triage.js.map +1 -1
- package/dist/commands/vision.js +4 -3
- package/dist/commands/vision.js.map +1 -1
- package/dist/lib/github.d.ts +16 -3
- package/dist/lib/github.js +151 -75
- package/dist/lib/github.js.map +1 -1
- package/dist/lib/learning.d.ts +13 -1
- package/dist/lib/learning.js +90 -17
- package/dist/lib/learning.js.map +1 -1
- package/dist/lib/logger.d.ts +1 -0
- package/dist/lib/logger.js +2 -0
- package/dist/lib/logger.js.map +1 -1
- package/dist/lib/pipeline.js +116 -44
- package/dist/lib/pipeline.js.map +1 -1
- package/dist/lib/planning.d.ts +5 -0
- package/dist/lib/planning.js +14 -0
- package/dist/lib/planning.js.map +1 -1
- package/dist/lib/prompts.d.ts +5 -0
- package/dist/lib/prompts.js +18 -5
- package/dist/lib/prompts.js.map +1 -1
- package/dist/lib/rate-limit.d.ts +55 -0
- package/dist/lib/rate-limit.js +188 -0
- package/dist/lib/rate-limit.js.map +1 -0
- package/dist/lib/session.js +2 -1
- package/dist/lib/session.js.map +1 -1
- package/dist/lib/validation.d.ts +69 -0
- package/dist/lib/validation.js +280 -0
- package/dist/lib/validation.js.map +1 -0
- package/dist/lib/worktree.d.ts +16 -0
- package/dist/lib/worktree.js +99 -31
- package/dist/lib/worktree.js.map +1 -1
- package/package.json +1 -1
- package/templates/agents/reviewer.md +7 -0
package/dist/lib/worktree.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export type WorktreeResult = {
|
|
2
2
|
path: string;
|
|
3
3
|
branch: string;
|
|
4
|
+
/** True if the worktree was recovered from a previous session instead of created fresh. */
|
|
5
|
+
resumed: boolean;
|
|
4
6
|
};
|
|
5
7
|
export type SetupWorktreeOptions = {
|
|
6
8
|
issueNum: number;
|
|
@@ -16,15 +18,29 @@ export type CleanupWorktreeOptions = {
|
|
|
16
18
|
issueNum: number;
|
|
17
19
|
projectDir: string;
|
|
18
20
|
autoCleanup?: boolean;
|
|
21
|
+
preserveIfCommits?: boolean;
|
|
19
22
|
dryRun?: boolean;
|
|
20
23
|
};
|
|
21
24
|
/**
|
|
22
25
|
* Create an isolated git worktree for processing an issue.
|
|
23
26
|
* When autoMerge is enabled and a session branch exists,
|
|
24
27
|
* branches from session branch so changes stack across issues.
|
|
28
|
+
*
|
|
29
|
+
* Handles three resume scenarios:
|
|
30
|
+
* 1. Worktree directory + branch exist → reuse as-is (resume previous work)
|
|
31
|
+
* 2. Branch exists but directory was removed → recreate worktree from existing branch
|
|
32
|
+
* 3. Neither exists → create fresh worktree and branch
|
|
25
33
|
*/
|
|
26
34
|
export declare function setupWorktree(options: SetupWorktreeOptions): Promise<WorktreeResult>;
|
|
35
|
+
/**
|
|
36
|
+
* Check if a worktree branch has commits ahead of its fork point.
|
|
37
|
+
* Uses git's merge-base to find where the branch diverged from any known remote branch.
|
|
38
|
+
* Returns the count of commits that would be lost if the worktree were removed.
|
|
39
|
+
*/
|
|
40
|
+
export declare function worktreeHasCommits(worktreePath: string): number;
|
|
27
41
|
/**
|
|
28
42
|
* Remove a worktree. Keeps the branch (needed for PR).
|
|
43
|
+
* When preserveIfCommits is true and the worktree has commits, skip cleanup
|
|
44
|
+
* so the user can recover the work with `alpha-loop resume`.
|
|
29
45
|
*/
|
|
30
46
|
export declare function cleanupWorktree(options: CleanupWorktreeOptions): Promise<void>;
|
package/dist/lib/worktree.js
CHANGED
|
@@ -10,6 +10,11 @@ const ENV_FILES = ['.env', '.env.local', '.env.development', '.env.development.l
|
|
|
10
10
|
* Create an isolated git worktree for processing an issue.
|
|
11
11
|
* When autoMerge is enabled and a session branch exists,
|
|
12
12
|
* branches from session branch so changes stack across issues.
|
|
13
|
+
*
|
|
14
|
+
* Handles three resume scenarios:
|
|
15
|
+
* 1. Worktree directory + branch exist → reuse as-is (resume previous work)
|
|
16
|
+
* 2. Branch exists but directory was removed → recreate worktree from existing branch
|
|
17
|
+
* 3. Neither exists → create fresh worktree and branch
|
|
13
18
|
*/
|
|
14
19
|
export async function setupWorktree(options) {
|
|
15
20
|
const { issueNum, projectDir, baseBranch, sessionBranch, autoMerge, skipInstall, setupCommand, dryRun } = options;
|
|
@@ -20,41 +25,75 @@ export async function setupWorktree(options) {
|
|
|
20
25
|
log.info(`Creating worktree at ${worktreePath} (branch: ${branch})`);
|
|
21
26
|
if (dryRun) {
|
|
22
27
|
log.dry(`Would create worktree: ${worktreePath}`);
|
|
23
|
-
return { path: worktreePath, branch };
|
|
28
|
+
return { path: worktreePath, branch, resumed: false };
|
|
24
29
|
}
|
|
25
|
-
|
|
30
|
+
let resumed = false;
|
|
31
|
+
// --- Case 1: Worktree directory exists — check if we can reuse it ---
|
|
26
32
|
if (existsSync(worktreePath)) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const localCheck = exec(`git rev-parse --verify "${sessionBranch}"`, { cwd: projectDir });
|
|
39
|
-
if (remoteCheck.exitCode === 0 || localCheck.exitCode === 0) {
|
|
40
|
-
fromBranch = sessionBranch;
|
|
33
|
+
const branchCheck = exec('git rev-parse --abbrev-ref HEAD', { cwd: worktreePath });
|
|
34
|
+
if (branchCheck.exitCode === 0 && branchCheck.stdout.trim() === branch) {
|
|
35
|
+
const commitCount = worktreeHasCommits(worktreePath);
|
|
36
|
+
log.info(`Reusing existing worktree at ${worktreePath} (${commitCount} commit(s) from previous session)`);
|
|
37
|
+
resumed = true;
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
// Worktree exists but on wrong branch or broken — remove and recreate
|
|
41
|
+
log.warn(`Worktree at ${worktreePath} is on wrong branch, removing...`);
|
|
42
|
+
exec(`git worktree remove "${worktreePath}" --force`, { cwd: projectDir });
|
|
43
|
+
exec('git worktree prune', { cwd: projectDir });
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
|
-
//
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
// --- Case 2: No worktree dir but branch exists (e.g., dir was rm -rf'd but branch persists) ---
|
|
47
|
+
if (!resumed && !existsSync(worktreePath)) {
|
|
48
|
+
// Prune first so git doesn't think the branch is still checked out in a deleted worktree
|
|
49
|
+
exec('git worktree prune', { cwd: projectDir });
|
|
50
|
+
const localBranchCheck = exec(`git rev-parse --verify "${branch}"`, { cwd: projectDir });
|
|
51
|
+
if (localBranchCheck.exitCode === 0) {
|
|
52
|
+
log.info(`Found existing branch ${branch}, recreating worktree from it (resuming previous work)`);
|
|
53
|
+
const reuseResult = exec(`git worktree add "${worktreePath}" "${branch}"`, { cwd: projectDir });
|
|
54
|
+
if (reuseResult.exitCode === 0) {
|
|
55
|
+
const commitCount = worktreeHasCommits(worktreePath);
|
|
56
|
+
log.info(`Resumed worktree with ${commitCount} commit(s)`);
|
|
57
|
+
resumed = true;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
// Can't reuse — force-delete branch and fall through to fresh creation
|
|
61
|
+
log.warn(`Could not reuse branch ${branch}: ${reuseResult.stderr}`);
|
|
62
|
+
exec(`git branch -D "${branch}"`, { cwd: projectDir });
|
|
63
|
+
exec('git worktree prune', { cwd: projectDir });
|
|
64
|
+
}
|
|
52
65
|
}
|
|
53
|
-
log.info(`Created worktree from local ${fromBranch}`);
|
|
54
66
|
}
|
|
55
|
-
|
|
56
|
-
|
|
67
|
+
// --- Case 3: Fresh creation (no existing worktree or branch) ---
|
|
68
|
+
if (!resumed) {
|
|
69
|
+
// Delete remote branch from previous failed runs
|
|
70
|
+
exec(`git push origin --delete "${branch}"`, { cwd: projectDir });
|
|
71
|
+
// Determine source branch: use session branch when auto-merging and it exists
|
|
72
|
+
let fromBranch = baseBranch;
|
|
73
|
+
if (autoMerge && sessionBranch && sessionBranch !== baseBranch) {
|
|
74
|
+
const remoteCheck = exec(`git rev-parse --verify "origin/${sessionBranch}"`, { cwd: projectDir });
|
|
75
|
+
const localCheck = exec(`git rev-parse --verify "${sessionBranch}"`, { cwd: projectDir });
|
|
76
|
+
if (remoteCheck.exitCode === 0 || localCheck.exitCode === 0) {
|
|
77
|
+
fromBranch = sessionBranch;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
// Fetch latest
|
|
81
|
+
exec('git fetch origin', { cwd: projectDir });
|
|
82
|
+
// Create worktree from the appropriate branch (try origin/ first, fall back to local)
|
|
83
|
+
log.info(`Branching worktree from: ${fromBranch}`);
|
|
84
|
+
const remoteResult = exec(`git worktree add "${worktreePath}" -b "${branch}" "origin/${fromBranch}"`, { cwd: projectDir });
|
|
85
|
+
if (remoteResult.exitCode !== 0) {
|
|
86
|
+
const localResult = exec(`git worktree add "${worktreePath}" -b "${branch}" "${fromBranch}"`, { cwd: projectDir });
|
|
87
|
+
if (localResult.exitCode !== 0) {
|
|
88
|
+
throw new Error(`Failed to create worktree from ${fromBranch}: ${localResult.stderr}`);
|
|
89
|
+
}
|
|
90
|
+
log.info(`Created worktree from local ${fromBranch}`);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
log.info(`Created worktree from origin/${fromBranch}`);
|
|
94
|
+
}
|
|
57
95
|
}
|
|
96
|
+
// --- Post-creation setup (runs for both fresh and resumed worktrees) ---
|
|
58
97
|
// Symlink env files from main repo to worktree (gitignored files don't exist in worktrees)
|
|
59
98
|
for (const envFile of ENV_FILES) {
|
|
60
99
|
const src = join(projectDir, envFile);
|
|
@@ -93,14 +132,35 @@ export async function setupWorktree(options) {
|
|
|
93
132
|
log.warn(`Setup command failed (exit ${setupResult.exitCode}), continuing anyway...`);
|
|
94
133
|
}
|
|
95
134
|
}
|
|
96
|
-
log.info(`Worktree ready at ${worktreePath}`);
|
|
97
|
-
return { path: worktreePath, branch };
|
|
135
|
+
log.info(`Worktree ready at ${worktreePath}${resumed ? ' (resumed)' : ''}`);
|
|
136
|
+
return { path: worktreePath, branch, resumed };
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Check if a worktree branch has commits ahead of its fork point.
|
|
140
|
+
* Uses git's merge-base to find where the branch diverged from any known remote branch.
|
|
141
|
+
* Returns the count of commits that would be lost if the worktree were removed.
|
|
142
|
+
*/
|
|
143
|
+
export function worktreeHasCommits(worktreePath) {
|
|
144
|
+
if (!existsSync(worktreePath))
|
|
145
|
+
return 0;
|
|
146
|
+
// Find the fork point: where this branch diverged from its nearest remote ancestor
|
|
147
|
+
const forkPoint = exec('git merge-base --fork-point HEAD @{upstream} 2>/dev/null', { cwd: worktreePath });
|
|
148
|
+
const base = forkPoint.exitCode === 0 && forkPoint.stdout.trim()
|
|
149
|
+
? forkPoint.stdout.trim()
|
|
150
|
+
// Fallback: find merge-base with origin/HEAD or origin/main
|
|
151
|
+
: exec('git merge-base HEAD origin/HEAD 2>/dev/null || git merge-base HEAD origin/main 2>/dev/null', { cwd: worktreePath }).stdout.trim();
|
|
152
|
+
if (!base)
|
|
153
|
+
return 0;
|
|
154
|
+
const result = exec(`git rev-list --count "${base}..HEAD"`, { cwd: worktreePath });
|
|
155
|
+
return parseInt(result.stdout.trim(), 10) || 0;
|
|
98
156
|
}
|
|
99
157
|
/**
|
|
100
158
|
* Remove a worktree. Keeps the branch (needed for PR).
|
|
159
|
+
* When preserveIfCommits is true and the worktree has commits, skip cleanup
|
|
160
|
+
* so the user can recover the work with `alpha-loop resume`.
|
|
101
161
|
*/
|
|
102
162
|
export async function cleanupWorktree(options) {
|
|
103
|
-
const { issueNum, projectDir, autoCleanup = true, dryRun } = options;
|
|
163
|
+
const { issueNum, projectDir, autoCleanup = true, preserveIfCommits = false, dryRun } = options;
|
|
104
164
|
const worktreePath = resolve(projectDir, '.worktrees', `issue-${issueNum}`);
|
|
105
165
|
if (!autoCleanup) {
|
|
106
166
|
log.info('Skipping worktree cleanup (autoCleanup=false)');
|
|
@@ -110,6 +170,14 @@ export async function cleanupWorktree(options) {
|
|
|
110
170
|
log.dry(`Would clean up worktree: ${worktreePath}`);
|
|
111
171
|
return;
|
|
112
172
|
}
|
|
173
|
+
if (preserveIfCommits && existsSync(worktreePath)) {
|
|
174
|
+
const commitCount = worktreeHasCommits(worktreePath);
|
|
175
|
+
if (commitCount > 0) {
|
|
176
|
+
log.warn(`Preserving worktree with ${commitCount} commit(s) at: ${worktreePath}`);
|
|
177
|
+
log.warn('Recover with: alpha-loop resume');
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
113
181
|
if (existsSync(worktreePath)) {
|
|
114
182
|
log.info(`Removing worktree: ${worktreePath}`);
|
|
115
183
|
const result = exec(`git worktree remove "${worktreePath}" --force`, { cwd: projectDir });
|
package/dist/lib/worktree.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worktree.js","sourceRoot":"","sources":["../../src/lib/worktree.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACpI,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAA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AC;IAE3C,iDAAiD;IACjD,IAAI,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QACxB,0EAA0E;QAC1E,IAAI,CAAC;YACH,YAAY,CAAC,OAAO,CAAC,CAAC;YACtB,6EAA6E;YAC7E,MAAM,OAAO,GAAG,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAC/C,IAAI,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAC;gBAAE,OAAO;YACrD,kEAAkE;YAClE,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;YACvD,aAAa,CAAC,WAAW,EAAE,wBAAwB,QAAQ,IAAI,CAAC,CAAC;YACjE,GAAG,CAAC,IAAI,CAAC,4BAA4B,QAAQ,kBAAkB,CAAC,CAAC;YACjE,OAAO;QACT,CAAC;QAAC,MAAM,CAAC;YACP,uCAAuC;YACvC,MAAM,OAAO,GAAG,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC;YACrD,IAAI,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAC;gBAAE,OAAO;YACrD,cAAc,CAAC,OAAO,EAAE,0BAA0B,QAAQ,IAAI,CAAC,CAAC;YAChE,GAAG,CAAC,IAAI,CAAC,8BAA8B,QAAQ,UAAU,CAAC,CAAC;YAC3D,OAAO;QACT,CAAC;IACH,CAAC;IAED,6DAA6D;IAC7D,aAAa,CAAC,OAAO,EAAE,wBAAwB,QAAQ,IAAI,CAAC,CAAC;IAC7D,GAAG,CAAC,IAAI,CAAC,0CAA0C,QAAQ,EAAE,CAAC,CAAC;AACjE,CAAC"}
|
package/package.json
CHANGED
|
@@ -28,8 +28,15 @@ You review code changes for a completed GitHub issue. You have full edit permiss
|
|
|
28
28
|
- TypeScript `any` types
|
|
29
29
|
- Console.log left in code
|
|
30
30
|
- Code that doesn't match project conventions
|
|
31
|
+
- **Silent failure detection**: parameters defaulting to `undefined` with optional chaining or `if (x != null)` guards that hide missing dependency injection
|
|
32
|
+
- **Dependency chain verification**: for every service/dependency new code uses, verify it's instantiated AND passed to the consumer
|
|
31
33
|
- **Stale documentation**: if CLI commands, config options, or directory structure changed, update README.md and CLAUDE.md in the same commit
|
|
32
34
|
|
|
35
|
+
## Review Process Additions
|
|
36
|
+
|
|
37
|
+
- **End-to-end flow tracing**: for critical data flows, trace creation → persistence → retrieval → display
|
|
38
|
+
- **Boot test**: verify the application entry point starts without import errors before reporting review results
|
|
39
|
+
|
|
33
40
|
## What to Report (Not Fix)
|
|
34
41
|
|
|
35
42
|
- Architectural suggestions that would require significant refactoring
|