@bradtaylorsf/alpha-loop 1.0.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/LICENSE +21 -0
- package/README.md +294 -0
- package/agents/implementer.md +30 -0
- package/agents/reviewer.md +29 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +57 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/auth.d.ts +1 -0
- package/dist/commands/auth.js +89 -0
- package/dist/commands/auth.js.map +1 -0
- package/dist/commands/history.d.ts +8 -0
- package/dist/commands/history.js +185 -0
- package/dist/commands/history.js.map +1 -0
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.js +241 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/run.d.ts +15 -0
- package/dist/commands/run.js +321 -0
- package/dist/commands/run.js.map +1 -0
- package/dist/commands/scan.d.ts +1 -0
- package/dist/commands/scan.js +50 -0
- package/dist/commands/scan.js.map +1 -0
- package/dist/commands/sync.d.ts +20 -0
- package/dist/commands/sync.js +149 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/commands/vision.d.ts +1 -0
- package/dist/commands/vision.js +194 -0
- package/dist/commands/vision.js.map +1 -0
- package/dist/engine/agents.d.ts +41 -0
- package/dist/engine/agents.js +90 -0
- package/dist/engine/agents.js.map +1 -0
- package/dist/engine/config.d.ts +71 -0
- package/dist/engine/config.js +73 -0
- package/dist/engine/config.js.map +1 -0
- package/dist/engine/prerequisites.d.ts +34 -0
- package/dist/engine/prerequisites.js +90 -0
- package/dist/engine/prerequisites.js.map +1 -0
- package/dist/lib/agent.d.ts +25 -0
- package/dist/lib/agent.js +97 -0
- package/dist/lib/agent.js.map +1 -0
- package/dist/lib/config.d.ts +35 -0
- package/dist/lib/config.js +179 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/context.d.ts +17 -0
- package/dist/lib/context.js +96 -0
- package/dist/lib/context.js.map +1 -0
- package/dist/lib/github.d.ts +61 -0
- package/dist/lib/github.js +313 -0
- package/dist/lib/github.js.map +1 -0
- package/dist/lib/learning.d.ts +43 -0
- package/dist/lib/learning.js +207 -0
- package/dist/lib/learning.js.map +1 -0
- package/dist/lib/logger.d.ts +9 -0
- package/dist/lib/logger.js +28 -0
- package/dist/lib/logger.js.map +1 -0
- package/dist/lib/pipeline.d.ts +18 -0
- package/dist/lib/pipeline.js +456 -0
- package/dist/lib/pipeline.js.map +1 -0
- package/dist/lib/preflight.d.ts +33 -0
- package/dist/lib/preflight.js +123 -0
- package/dist/lib/preflight.js.map +1 -0
- package/dist/lib/prerequisites.d.ts +12 -0
- package/dist/lib/prerequisites.js +54 -0
- package/dist/lib/prerequisites.js.map +1 -0
- package/dist/lib/prompts.d.ts +44 -0
- package/dist/lib/prompts.js +102 -0
- package/dist/lib/prompts.js.map +1 -0
- package/dist/lib/session.d.ts +28 -0
- package/dist/lib/session.js +173 -0
- package/dist/lib/session.js.map +1 -0
- package/dist/lib/shell.d.ts +32 -0
- package/dist/lib/shell.js +95 -0
- package/dist/lib/shell.js.map +1 -0
- package/dist/lib/testing.d.ts +10 -0
- package/dist/lib/testing.js +51 -0
- package/dist/lib/testing.js.map +1 -0
- package/dist/lib/verify.d.ts +18 -0
- package/dist/lib/verify.js +235 -0
- package/dist/lib/verify.js.map +1 -0
- package/dist/lib/vision.d.ts +9 -0
- package/dist/lib/vision.js +21 -0
- package/dist/lib/vision.js.map +1 -0
- package/dist/lib/worktree.d.ts +29 -0
- package/dist/lib/worktree.js +153 -0
- package/dist/lib/worktree.js.map +1 -0
- package/package.json +63 -0
- package/templates/agents/implementer.md +34 -0
- package/templates/agents/reviewer.md +48 -0
- package/templates/skills/code-review/SKILL.md +58 -0
- package/templates/skills/git-workflow/SKILL.md +53 -0
- package/templates/skills/implementation-planning/SKILL.md +64 -0
- package/templates/skills/security-analysis/SKILL.md +560 -0
- package/templates/skills/security-analysis/scripts/security-scanner.sh +227 -0
- package/templates/skills/test-robustness/SKILL.md +897 -0
- package/templates/skills/testing-patterns/SKILL.md +75 -0
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Run Command — the main loop: poll issues, process them, finalize session.
|
|
3
|
+
*/
|
|
4
|
+
import { join } from 'node:path';
|
|
5
|
+
import * as readline from 'node:readline';
|
|
6
|
+
import { log } from '../lib/logger.js';
|
|
7
|
+
import { exec } from '../lib/shell.js';
|
|
8
|
+
import { loadConfig } from '../lib/config.js';
|
|
9
|
+
import { pollIssues, listMilestones } from '../lib/github.js';
|
|
10
|
+
import { processIssue } from '../lib/pipeline.js';
|
|
11
|
+
import { createSession, finalizeSession } from '../lib/session.js';
|
|
12
|
+
import { cleanupWorktree } from '../lib/worktree.js';
|
|
13
|
+
import { generateSessionSummary } from '../lib/learning.js';
|
|
14
|
+
import { hasVision } from '../lib/vision.js';
|
|
15
|
+
import { contextNeedsRefresh } from '../lib/context.js';
|
|
16
|
+
import { runPreflight, runPortCheck } from '../lib/preflight.js';
|
|
17
|
+
import { syncAgentAssets } from './sync.js';
|
|
18
|
+
/**
|
|
19
|
+
* Check that required CLI tools are installed.
|
|
20
|
+
*/
|
|
21
|
+
function checkPrerequisites() {
|
|
22
|
+
const tools = [
|
|
23
|
+
{ name: 'gh', message: 'GitHub CLI not found. Install: https://cli.github.com/' },
|
|
24
|
+
{ name: 'git', message: 'git not found.' },
|
|
25
|
+
{ name: 'claude', message: 'Claude CLI not found. Install: npm install -g @anthropic-ai/claude-code' },
|
|
26
|
+
];
|
|
27
|
+
for (const tool of tools) {
|
|
28
|
+
const result = exec(`command -v "${tool.name}"`);
|
|
29
|
+
if (result.exitCode !== 0) {
|
|
30
|
+
log.error(tool.message);
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Print the startup banner showing all configuration.
|
|
37
|
+
*/
|
|
38
|
+
function printBanner(config, session) {
|
|
39
|
+
const BOLD = '\x1b[1m';
|
|
40
|
+
const CYAN = '\x1b[0;36m';
|
|
41
|
+
const NC = '\x1b[0m';
|
|
42
|
+
console.error('');
|
|
43
|
+
console.error(`${BOLD}${CYAN}=====================================${NC}`);
|
|
44
|
+
console.error(`${BOLD}${CYAN} Alpha Loop${NC}`);
|
|
45
|
+
console.error(`${BOLD}${CYAN}=====================================${NC}`);
|
|
46
|
+
console.error('');
|
|
47
|
+
console.error(` Repo: ${BOLD}${config.repo}${NC}`);
|
|
48
|
+
console.error(` Project: ${BOLD}#${config.project} (${config.repoOwner})${NC}`);
|
|
49
|
+
console.error(` Model: ${BOLD}${config.model}${NC}`);
|
|
50
|
+
console.error(` Review Model: ${BOLD}${config.reviewModel}${NC}`);
|
|
51
|
+
console.error(` Base Branch: ${BOLD}${config.baseBranch}${NC}`);
|
|
52
|
+
console.error(` Label: ${BOLD}${config.labelReady}${NC}`);
|
|
53
|
+
console.error(` Dry Run: ${BOLD}${config.dryRun}${NC}`);
|
|
54
|
+
console.error(` Skip Tests: ${BOLD}${config.skipTests}${NC}`);
|
|
55
|
+
console.error(` Skip Review: ${BOLD}${config.skipReview}${NC}`);
|
|
56
|
+
console.error(` Skip Learn: ${BOLD}${config.skipLearn}${NC}`);
|
|
57
|
+
console.error(` Verbose: ${BOLD}${config.verbose}${NC}`);
|
|
58
|
+
console.error(` Test Retries: ${BOLD}${config.maxTestRetries}${NC}`);
|
|
59
|
+
console.error(` Max Issues: ${BOLD}${config.maxIssues || 'unlimited'}${NC}`);
|
|
60
|
+
console.error(` Max Duration: ${BOLD}${config.maxSessionDuration ? config.maxSessionDuration + 's' : 'unlimited'}${NC}`);
|
|
61
|
+
console.error(` Auto Merge: ${BOLD}${config.autoMerge}${NC}`);
|
|
62
|
+
console.error(` Session: ${BOLD}${session.branch}${NC}`);
|
|
63
|
+
console.error('');
|
|
64
|
+
}
|
|
65
|
+
function askYesNo(prompt) {
|
|
66
|
+
return new Promise((resolve) => {
|
|
67
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
68
|
+
rl.question(prompt, (answer) => {
|
|
69
|
+
rl.close();
|
|
70
|
+
resolve(answer.toLowerCase() !== 'n');
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
function askChoice(prompt, max) {
|
|
75
|
+
return new Promise((resolve) => {
|
|
76
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
77
|
+
rl.question(prompt, (answer) => {
|
|
78
|
+
rl.close();
|
|
79
|
+
const num = parseInt(answer.trim(), 10);
|
|
80
|
+
if (isNaN(num) || num < 0 || num > max) {
|
|
81
|
+
resolve(-1); // invalid
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
resolve(num);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Show open milestones and let the user pick one, or choose "all in order".
|
|
91
|
+
* Returns the milestone title to filter by, or empty string for all issues.
|
|
92
|
+
*/
|
|
93
|
+
async function pickMilestone(repo) {
|
|
94
|
+
const milestones = listMilestones(repo);
|
|
95
|
+
if (milestones.length === 0) {
|
|
96
|
+
log.info('No open milestones found — processing all ready issues');
|
|
97
|
+
return '';
|
|
98
|
+
}
|
|
99
|
+
const BOLD = '\x1b[1m';
|
|
100
|
+
const DIM = '\x1b[2m';
|
|
101
|
+
const NC = '\x1b[0m';
|
|
102
|
+
console.error('');
|
|
103
|
+
console.error(`${BOLD} Open Milestones${NC}`);
|
|
104
|
+
console.error('');
|
|
105
|
+
console.error(` ${BOLD}0${NC} All issues (no milestone filter)`);
|
|
106
|
+
for (let i = 0; i < milestones.length; i++) {
|
|
107
|
+
const m = milestones[i];
|
|
108
|
+
const progress = m.openIssues + m.closedIssues > 0
|
|
109
|
+
? `${m.closedIssues}/${m.openIssues + m.closedIssues} done`
|
|
110
|
+
: 'empty';
|
|
111
|
+
const due = m.dueOn ? ` · due ${m.dueOn.split('T')[0]}` : '';
|
|
112
|
+
console.error(` ${BOLD}${i + 1}${NC} ${m.title} ${DIM}(${m.openIssues} open, ${progress}${due})${NC}`);
|
|
113
|
+
}
|
|
114
|
+
console.error('');
|
|
115
|
+
const choice = await askChoice(` Select milestone [0-${milestones.length}]: `, milestones.length);
|
|
116
|
+
if (choice <= 0) {
|
|
117
|
+
log.info('Processing all ready issues (no milestone filter)');
|
|
118
|
+
return '';
|
|
119
|
+
}
|
|
120
|
+
const selected = milestones[choice - 1];
|
|
121
|
+
log.success(`Milestone selected: ${selected.title} (${selected.openIssues} open issues)`);
|
|
122
|
+
return selected.title;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Run the main loop: poll for issues, process them, finalize session.
|
|
126
|
+
*/
|
|
127
|
+
export async function runCommand(options) {
|
|
128
|
+
// Build config from YAML + env + CLI flags
|
|
129
|
+
const overrides = {};
|
|
130
|
+
if (options.dryRun)
|
|
131
|
+
overrides.dryRun = true;
|
|
132
|
+
if (options.model)
|
|
133
|
+
overrides.model = options.model;
|
|
134
|
+
if (options.skipTests)
|
|
135
|
+
overrides.skipTests = true;
|
|
136
|
+
if (options.skipReview)
|
|
137
|
+
overrides.skipReview = true;
|
|
138
|
+
if (options.skipLearn)
|
|
139
|
+
overrides.skipLearn = true;
|
|
140
|
+
if (options.milestone)
|
|
141
|
+
overrides.milestone = options.milestone;
|
|
142
|
+
if (options.autoMerge)
|
|
143
|
+
overrides.autoMerge = true;
|
|
144
|
+
if (options.mergeTo)
|
|
145
|
+
overrides.mergeTo = options.mergeTo;
|
|
146
|
+
if (options.verbose)
|
|
147
|
+
overrides.verbose = true;
|
|
148
|
+
const config = loadConfig(overrides);
|
|
149
|
+
if (!config.repo) {
|
|
150
|
+
log.error('No repository configured. Run "alpha-loop init" or set repo in .alpha-loop.yaml');
|
|
151
|
+
process.exit(1);
|
|
152
|
+
}
|
|
153
|
+
// Create session
|
|
154
|
+
const session = createSession(config);
|
|
155
|
+
// Print startup banner
|
|
156
|
+
printBanner(config, session);
|
|
157
|
+
// Check prerequisites
|
|
158
|
+
checkPrerequisites();
|
|
159
|
+
// Track active worktree for cleanup on signal
|
|
160
|
+
let activeIssueNum = null;
|
|
161
|
+
// Handle Ctrl+C gracefully
|
|
162
|
+
const cleanup = async () => {
|
|
163
|
+
log.info('');
|
|
164
|
+
log.info('Shutting down...');
|
|
165
|
+
// Clean up active worktree if any
|
|
166
|
+
if (activeIssueNum !== null) {
|
|
167
|
+
log.info(`Cleaning up worktree for issue #${activeIssueNum}...`);
|
|
168
|
+
try {
|
|
169
|
+
await cleanupWorktree({
|
|
170
|
+
issueNum: activeIssueNum,
|
|
171
|
+
projectDir: process.cwd(),
|
|
172
|
+
autoCleanup: true,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
catch {
|
|
176
|
+
// Best effort cleanup
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
// Finalize session
|
|
180
|
+
try {
|
|
181
|
+
await finalizeSession(session, config);
|
|
182
|
+
}
|
|
183
|
+
catch (err) {
|
|
184
|
+
log.error(`Session finalization failed: ${err instanceof Error ? err.message : err}`);
|
|
185
|
+
}
|
|
186
|
+
const issueCount = session.results.length;
|
|
187
|
+
const successCount = session.results.filter((r) => r.status === 'success').length;
|
|
188
|
+
log.info(`Session complete: ${successCount}/${issueCount} issues succeeded`);
|
|
189
|
+
process.exit(0);
|
|
190
|
+
};
|
|
191
|
+
process.on('SIGINT', () => { void cleanup(); });
|
|
192
|
+
process.on('SIGTERM', () => { void cleanup(); });
|
|
193
|
+
// Sync agent assets (AGENTS.md → CLAUDE.md, skills/ → .agents/skills/ + .claude/skills/)
|
|
194
|
+
const syncResult = syncAgentAssets();
|
|
195
|
+
if (syncResult.synced) {
|
|
196
|
+
log.success('Agent assets synced before run');
|
|
197
|
+
}
|
|
198
|
+
// Milestone selection (interactive or from config/CLI flag)
|
|
199
|
+
let activeMilestone = config.milestone;
|
|
200
|
+
if (!activeMilestone && !config.dryRun && process.stdin.isTTY) {
|
|
201
|
+
activeMilestone = await pickMilestone(config.repo);
|
|
202
|
+
}
|
|
203
|
+
if (activeMilestone) {
|
|
204
|
+
log.info(`Filtering issues by milestone: ${activeMilestone}`);
|
|
205
|
+
}
|
|
206
|
+
// Pre-flight port check
|
|
207
|
+
if (config.port) {
|
|
208
|
+
log.step('Checking for port conflicts...');
|
|
209
|
+
runPortCheck(config.port);
|
|
210
|
+
}
|
|
211
|
+
// Pre-flight test validation
|
|
212
|
+
log.step('Running pre-flight test validation...');
|
|
213
|
+
const preflightResult = await runPreflight({
|
|
214
|
+
testCommand: config.testCommand,
|
|
215
|
+
skipPreflight: config.skipPreflight,
|
|
216
|
+
skipTests: config.skipTests,
|
|
217
|
+
dryRun: config.dryRun,
|
|
218
|
+
});
|
|
219
|
+
if (preflightResult.passed) {
|
|
220
|
+
if (!config.skipPreflight && !config.skipTests && !config.dryRun) {
|
|
221
|
+
log.success('Pre-flight tests passed');
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
else {
|
|
225
|
+
log.warn(`Pre-flight: ${preflightResult.preExistingFailures.length} pre-existing failure(s) will be ignored`);
|
|
226
|
+
for (const f of preflightResult.preExistingFailures) {
|
|
227
|
+
log.warn(` ${f}`);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
// Prompt for project vision if it doesn't exist (interactive only)
|
|
231
|
+
if (!hasVision() && process.stdin.isTTY) {
|
|
232
|
+
log.warn('No project vision found. The agent will make better decisions with one.');
|
|
233
|
+
const answer = await askYesNo('Set up project vision now? [Y/n]: ');
|
|
234
|
+
if (answer) {
|
|
235
|
+
const { visionCommand } = await import('./vision.js');
|
|
236
|
+
await visionCommand();
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
// Generate or refresh project context if needed
|
|
240
|
+
if (contextNeedsRefresh()) {
|
|
241
|
+
log.info('Project context is stale or missing. Generating...');
|
|
242
|
+
const { scanCommand } = await import('./scan.js');
|
|
243
|
+
scanCommand();
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
log.info('Project context is fresh');
|
|
247
|
+
}
|
|
248
|
+
// If vision or context were created/updated, commit them so worktrees get them
|
|
249
|
+
if (!config.dryRun) {
|
|
250
|
+
const statusResult = exec('git status --porcelain .alpha-loop/ AGENTS.md CLAUDE.md');
|
|
251
|
+
if (statusResult.stdout.trim()) {
|
|
252
|
+
log.info('New files generated — committing so worktrees include them...');
|
|
253
|
+
exec('git add .alpha-loop/ AGENTS.md CLAUDE.md 2>/dev/null || true');
|
|
254
|
+
const diffCheck = exec('git diff --cached --quiet');
|
|
255
|
+
if (diffCheck.exitCode !== 0) {
|
|
256
|
+
exec('git commit -m "chore: add project vision and context for alpha-loop"');
|
|
257
|
+
exec(`git push origin "${config.baseBranch}"`);
|
|
258
|
+
log.success('Vision and context committed to ' + config.baseBranch);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
// Fetch all matching issues
|
|
263
|
+
const milestoneMsg = activeMilestone ? ` in milestone '${activeMilestone}'` : '';
|
|
264
|
+
log.info(`Fetching issues${milestoneMsg}...`);
|
|
265
|
+
const issues = pollIssues(config.repo, config.labelReady, 100, {
|
|
266
|
+
project: config.project,
|
|
267
|
+
repoOwner: config.repoOwner,
|
|
268
|
+
milestone: activeMilestone || undefined,
|
|
269
|
+
});
|
|
270
|
+
if (issues.length === 0) {
|
|
271
|
+
log.info('No issues found. Nothing to do.');
|
|
272
|
+
}
|
|
273
|
+
else {
|
|
274
|
+
const issueLimit = config.maxIssues > 0 ? Math.min(issues.length, config.maxIssues) : issues.length;
|
|
275
|
+
const issuesToProcess = issues.slice(0, issueLimit);
|
|
276
|
+
if (config.maxIssues > 0 && issues.length > config.maxIssues) {
|
|
277
|
+
log.info(`Found ${issues.length} issue(s), processing first ${issueLimit} (max_issues=${config.maxIssues})`);
|
|
278
|
+
}
|
|
279
|
+
else {
|
|
280
|
+
log.info(`Found ${issuesToProcess.length} issue(s) to process`);
|
|
281
|
+
}
|
|
282
|
+
const sessionStartTime = Date.now();
|
|
283
|
+
for (const issue of issuesToProcess) {
|
|
284
|
+
// Check duration limit before each issue
|
|
285
|
+
if (config.maxSessionDuration > 0) {
|
|
286
|
+
const elapsed = Math.round((Date.now() - sessionStartTime) / 1000);
|
|
287
|
+
if (elapsed >= config.maxSessionDuration) {
|
|
288
|
+
log.info(`Stopping: max_session_duration reached (${elapsed}s / ${config.maxSessionDuration}s)`);
|
|
289
|
+
break;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
log.info('==========================================');
|
|
293
|
+
log.info(`Processing issue #${issue.number}: ${issue.title}`);
|
|
294
|
+
log.info('==========================================');
|
|
295
|
+
activeIssueNum = issue.number;
|
|
296
|
+
try {
|
|
297
|
+
const result = await processIssue(issue.number, issue.title, issue.body, config, session);
|
|
298
|
+
session.results.push(result);
|
|
299
|
+
}
|
|
300
|
+
catch (err) {
|
|
301
|
+
log.error(`Failed to process issue #${issue.number}: ${err}`);
|
|
302
|
+
}
|
|
303
|
+
activeIssueNum = null;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
// Generate session summary (aggregates learnings across all issues)
|
|
307
|
+
if (session.results.length > 0) {
|
|
308
|
+
const learningsDir = join(process.cwd(), '.alpha-loop', 'learnings');
|
|
309
|
+
await generateSessionSummary({
|
|
310
|
+
sessionName: session.name,
|
|
311
|
+
results: session.results,
|
|
312
|
+
learningsDir,
|
|
313
|
+
config,
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
// Finalize session
|
|
317
|
+
await finalizeSession(session, config);
|
|
318
|
+
const successCount = session.results.filter((r) => r.status === 'success').length;
|
|
319
|
+
log.info(`Session complete: ${successCount}/${session.results.length} issues succeeded`);
|
|
320
|
+
}
|
|
321
|
+
//# sourceMappingURL=run.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,IAAI,EAAE,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
+
export declare function scanCommand(): void;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as fs from 'node:fs';
|
|
2
|
+
import * as path from 'node:path';
|
|
3
|
+
import { exec } from '../lib/shell.js';
|
|
4
|
+
import { log } from '../lib/logger.js';
|
|
5
|
+
import { assertSafeShellArg, loadConfig } from '../lib/config.js';
|
|
6
|
+
const SCAN_PROMPT = `Analyze this codebase and produce a concise project context file. Read the key files (package.json, entry points, config files, README, CLAUDE.md) and output ONLY this markdown structure:
|
|
7
|
+
|
|
8
|
+
## Architecture
|
|
9
|
+
- Entry points and how they connect (e.g., "Express server in src/server/index.ts mounts routes from routes/*.ts")
|
|
10
|
+
- Database (type, schema location, how to query)
|
|
11
|
+
- Key directories and what they contain
|
|
12
|
+
|
|
13
|
+
## Conventions
|
|
14
|
+
- Language, framework, coding patterns used
|
|
15
|
+
- How tests are structured and run
|
|
16
|
+
- How new features should be wired in (e.g., "new routes must be imported in index.ts")
|
|
17
|
+
|
|
18
|
+
## Critical Rules
|
|
19
|
+
- Files/directories that must not be deleted or modified without care
|
|
20
|
+
- Integration points that break if not updated together
|
|
21
|
+
- Common mistakes to avoid in this codebase
|
|
22
|
+
|
|
23
|
+
## Active State
|
|
24
|
+
- Test status: (will be filled in by the loop)
|
|
25
|
+
- Recent changes: (will be filled in by the loop)
|
|
26
|
+
|
|
27
|
+
Keep each section to 3-5 bullet points. Be specific to THIS codebase, not generic advice. Under 400 words total.`;
|
|
28
|
+
export function scanCommand() {
|
|
29
|
+
const projectDir = process.cwd();
|
|
30
|
+
const contextDir = path.join(projectDir, '.alpha-loop');
|
|
31
|
+
const contextFile = path.join(contextDir, 'context.md');
|
|
32
|
+
const config = loadConfig();
|
|
33
|
+
fs.mkdirSync(contextDir, { recursive: true });
|
|
34
|
+
log.step('Scanning codebase for project context...');
|
|
35
|
+
const model = assertSafeShellArg(config.model ?? 'opus', 'model');
|
|
36
|
+
const result = exec(`echo ${JSON.stringify(SCAN_PROMPT)} | claude -p --model ${model} --dangerously-skip-permissions --output-format text 2>/dev/null`, { cwd: projectDir });
|
|
37
|
+
if (result.exitCode === 0 && result.stdout) {
|
|
38
|
+
fs.writeFileSync(contextFile, result.stdout + '\n');
|
|
39
|
+
log.success(`Project context saved to ${contextFile}`);
|
|
40
|
+
}
|
|
41
|
+
else if (result.stdout) {
|
|
42
|
+
fs.writeFileSync(contextFile, result.stdout + '\n');
|
|
43
|
+
log.warn('Claude exited with errors but produced output');
|
|
44
|
+
log.success(`Project context saved to ${contextFile}`);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
log.error(`Project context generation failed: ${result.stderr || 'empty output'}`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=scan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scan.js","sourceRoot":"","sources":["../../src/commands/scan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAElE,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;iHAqB6F,CAAC;AAElH,MAAM,UAAU,WAAW;IACzB,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IACjC,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;IACxD,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IACxD,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;IAE5B,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAE9C,GAAG,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC;IAErD,MAAM,KAAK,GAAG,kBAAkB,CAAC,MAAM,CAAC,KAAK,IAAI,MAAM,EAAE,OAAO,CAAC,CAAC;IAClE,MAAM,MAAM,GAAG,IAAI,CACjB,QAAQ,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,wBAAwB,KAAK,kEAAkE,EAClI,EAAE,GAAG,EAAE,UAAU,EAAE,CACpB,CAAC;IAEF,IAAI,MAAM,CAAC,QAAQ,KAAK,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;QAC3C,EAAE,CAAC,aAAa,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;QACpD,GAAG,CAAC,OAAO,CAAC,4BAA4B,WAAW,EAAE,CAAC,CAAC;IACzD,CAAC;SAAM,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;QACzB,EAAE,CAAC,aAAa,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;QACpD,GAAG,CAAC,IAAI,CAAC,+CAA+C,CAAC,CAAC;QAC1D,GAAG,CAAC,OAAO,CAAC,4BAA4B,WAAW,EAAE,CAAC,CAAC;IACzD,CAAC;SAAM,CAAC;QACN,GAAG,CAAC,KAAK,CAAC,sCAAsC,MAAM,CAAC,MAAM,IAAI,cAAc,EAAE,CAAC,CAAC;IACrF,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type SyncResult = {
|
|
2
|
+
synced: boolean;
|
|
3
|
+
docSynced: boolean;
|
|
4
|
+
skillsDirs: string[];
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Sync agent assets: AGENTS.md → CLAUDE.md, skills/ → .agents/skills/ + .claude/skills/
|
|
8
|
+
*
|
|
9
|
+
* Returns what was synced. If check=true, only reports drift without writing.
|
|
10
|
+
*/
|
|
11
|
+
export declare function syncAgentAssets(options?: {
|
|
12
|
+
check?: boolean;
|
|
13
|
+
projectDir?: string;
|
|
14
|
+
}): SyncResult;
|
|
15
|
+
/**
|
|
16
|
+
* CLI command handler for `alpha-loop sync`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function syncCommand(options?: {
|
|
19
|
+
check?: boolean;
|
|
20
|
+
}): void;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sync Command — keep agent docs and skills in sync across CLI tool formats.
|
|
3
|
+
*
|
|
4
|
+
* Source of truth:
|
|
5
|
+
* - AGENTS.md → copied to CLAUDE.md
|
|
6
|
+
* - skills/ → copied to .agents/skills/ and .claude/skills/
|
|
7
|
+
*
|
|
8
|
+
* This ensures both Claude and Codex (and any future agent) can find
|
|
9
|
+
* the same instructions and skills in their native locations.
|
|
10
|
+
*/
|
|
11
|
+
import { existsSync, copyFileSync, mkdirSync, readdirSync, statSync, readFileSync, rmSync } from 'node:fs';
|
|
12
|
+
import { join } from 'node:path';
|
|
13
|
+
import { log } from '../lib/logger.js';
|
|
14
|
+
const SOURCE_DOC = 'AGENTS.md';
|
|
15
|
+
const TARGET_DOC = 'CLAUDE.md';
|
|
16
|
+
const SOURCE_SKILLS = 'skills';
|
|
17
|
+
const TARGET_SKILL_DIRS = ['.agents/skills', '.claude/skills'];
|
|
18
|
+
/**
|
|
19
|
+
* Recursively copy a directory, deleting files in target that don't exist in source.
|
|
20
|
+
*/
|
|
21
|
+
function syncDir(src, dest) {
|
|
22
|
+
mkdirSync(dest, { recursive: true });
|
|
23
|
+
const srcEntries = new Set(readdirSync(src));
|
|
24
|
+
// Delete files in dest that don't exist in src
|
|
25
|
+
if (existsSync(dest)) {
|
|
26
|
+
for (const entry of readdirSync(dest)) {
|
|
27
|
+
if (!srcEntries.has(entry)) {
|
|
28
|
+
const destPath = join(dest, entry);
|
|
29
|
+
rmSync(destPath, { recursive: true, force: true });
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
// Copy from src to dest
|
|
34
|
+
for (const entry of srcEntries) {
|
|
35
|
+
const srcPath = join(src, entry);
|
|
36
|
+
const destPath = join(dest, entry);
|
|
37
|
+
const stat = statSync(srcPath);
|
|
38
|
+
if (stat.isDirectory()) {
|
|
39
|
+
syncDir(srcPath, destPath);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
copyFileSync(srcPath, destPath);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Check if two files have identical content.
|
|
48
|
+
*/
|
|
49
|
+
function filesMatch(a, b) {
|
|
50
|
+
if (!existsSync(a) || !existsSync(b))
|
|
51
|
+
return false;
|
|
52
|
+
return readFileSync(a).equals(readFileSync(b));
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Recursively check if two directories have identical content.
|
|
56
|
+
*/
|
|
57
|
+
function dirsMatch(src, dest) {
|
|
58
|
+
if (!existsSync(src) || !existsSync(dest))
|
|
59
|
+
return false;
|
|
60
|
+
const srcEntries = readdirSync(src).sort();
|
|
61
|
+
const destEntries = readdirSync(dest).sort();
|
|
62
|
+
if (srcEntries.length !== destEntries.length)
|
|
63
|
+
return false;
|
|
64
|
+
if (srcEntries.join(',') !== destEntries.join(','))
|
|
65
|
+
return false;
|
|
66
|
+
for (const entry of srcEntries) {
|
|
67
|
+
const srcPath = join(src, entry);
|
|
68
|
+
const destPath = join(dest, entry);
|
|
69
|
+
const stat = statSync(srcPath);
|
|
70
|
+
if (stat.isDirectory()) {
|
|
71
|
+
if (!dirsMatch(srcPath, destPath))
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
if (!filesMatch(srcPath, destPath))
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Sync agent assets: AGENTS.md → CLAUDE.md, skills/ → .agents/skills/ + .claude/skills/
|
|
83
|
+
*
|
|
84
|
+
* Returns what was synced. If check=true, only reports drift without writing.
|
|
85
|
+
*/
|
|
86
|
+
export function syncAgentAssets(options = {}) {
|
|
87
|
+
const { check = false, projectDir = process.cwd() } = options;
|
|
88
|
+
const sourceDoc = join(projectDir, SOURCE_DOC);
|
|
89
|
+
const targetDoc = join(projectDir, TARGET_DOC);
|
|
90
|
+
const sourceSkills = join(projectDir, SOURCE_SKILLS);
|
|
91
|
+
const result = { synced: false, docSynced: false, skillsDirs: [] };
|
|
92
|
+
// Sync AGENTS.md → CLAUDE.md
|
|
93
|
+
if (existsSync(sourceDoc)) {
|
|
94
|
+
if (!filesMatch(sourceDoc, targetDoc)) {
|
|
95
|
+
if (check) {
|
|
96
|
+
log.warn(`Drift: ${TARGET_DOC} differs from ${SOURCE_DOC}`);
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
copyFileSync(sourceDoc, targetDoc);
|
|
100
|
+
log.info(`Synced ${SOURCE_DOC} → ${TARGET_DOC}`);
|
|
101
|
+
}
|
|
102
|
+
result.docSynced = true;
|
|
103
|
+
result.synced = true;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
// Sync skills/ → target dirs
|
|
107
|
+
if (existsSync(sourceSkills)) {
|
|
108
|
+
for (const targetDir of TARGET_SKILL_DIRS) {
|
|
109
|
+
const targetPath = join(projectDir, targetDir);
|
|
110
|
+
if (!dirsMatch(sourceSkills, targetPath)) {
|
|
111
|
+
if (check) {
|
|
112
|
+
log.warn(`Drift: ${targetDir} differs from ${SOURCE_SKILLS}/`);
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
syncDir(sourceSkills, targetPath);
|
|
116
|
+
log.info(`Synced ${SOURCE_SKILLS}/ → ${targetDir}/`);
|
|
117
|
+
}
|
|
118
|
+
result.skillsDirs.push(targetDir);
|
|
119
|
+
result.synced = true;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return result;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* CLI command handler for `alpha-loop sync`.
|
|
127
|
+
*/
|
|
128
|
+
export function syncCommand(options = {}) {
|
|
129
|
+
const projectDir = process.cwd();
|
|
130
|
+
const sourceDoc = join(projectDir, SOURCE_DOC);
|
|
131
|
+
const sourceSkills = join(projectDir, SOURCE_SKILLS);
|
|
132
|
+
if (!existsSync(sourceDoc) && !existsSync(sourceSkills)) {
|
|
133
|
+
log.warn(`No ${SOURCE_DOC} or ${SOURCE_SKILLS}/ found. Nothing to sync.`);
|
|
134
|
+
log.info(`Create ${SOURCE_DOC} (agent instructions) and/or ${SOURCE_SKILLS}/ (skill definitions) first.`);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
const result = syncAgentAssets({ check: options.check, projectDir });
|
|
138
|
+
if (!result.synced) {
|
|
139
|
+
log.success('Agent assets are in sync.');
|
|
140
|
+
}
|
|
141
|
+
else if (options.check) {
|
|
142
|
+
log.error('Drift detected. Run "alpha-loop sync" to resolve.');
|
|
143
|
+
process.exit(1);
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
log.success('Agent assets synced.');
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
//# sourceMappingURL=sync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../../src/commands/sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC3G,OAAO,EAAE,IAAI,EAAY,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAEvC,MAAM,UAAU,GAAG,WAAW,CAAC;AAC/B,MAAM,UAAU,GAAG,WAAW,CAAC;AAC/B,MAAM,aAAa,GAAG,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