@@ -1,12 +1,11 @@
11 #!/usr/bin/env bun
2-import { existsSync, mkdirSync, writeFileSync, writeSync } from "node:fs";
3-import { homedir } from "node:os";
4-import { join } from "node:path";
2+import { writeSync } from "node:fs";
53
64 import * as c from "yoctocolors";
75 import { initAgent } from "./agent/agent.ts";
86 import { loadAgents } from "./cli/agents.ts";
97 import { parseArgs, printHelp } from "./cli/args.ts";
8+import { bootstrapGlobalDefaults } from "./cli/bootstrap.ts";
109 import { initErrorLog } from "./cli/error-log.ts";
1110 import { resolveFileRefs } from "./cli/file-refs.ts";
1211 import { HeadlessReporter } from "./cli/headless-reporter.ts";
@@ -42,38 +41,6 @@ initApiLog();
4241 initModelInfoCache();
4342 void refreshModelInfoInBackground().catch(() => {});
4443
45-// ─── Bootstrap global defaults ────────────────────────────────────────────────
46-
47-const REVIEW_COMMAND_CONTENT = `---
48-description: Review recent changes for correctness, code quality, and performance
49-context: fork
50----
51-You are a code reviewer. Review recent changes and provide actionable feedback.
52-
53-$ARGUMENTS
54-
55-Perform a sensible code review:
56-- Correctness: Are the changes in alignment with the goal?
57-- Code quality: Is there duplicate, dead, or bad code patterns introduced?
58-- Is the code performant?
59-- Never flag style choices as bugs, don't be a zealot.
60-- Never flag false positives, check before raising an issue.
61-
62-Output a small summary with only the issues found. If nothing is wrong, say so.
63-`;
64-
65-function bootstrapGlobalDefaults(): void {
66- const commandsDir = join(homedir(), ".agents", "commands");
67- const reviewPath = join(commandsDir, "review.md");
68- if (!existsSync(reviewPath)) {
69- mkdirSync(commandsDir, { recursive: true });
70- writeFileSync(reviewPath, REVIEW_COMMAND_CONTENT, "utf-8");
71- writeln(
72- `${c.green("✓")} created ${c.dim("~/.agents/commands/review.md")} ${c.dim("(edit it to customise your reviews)")}`,
73- );
74- }
75-}
76-
7744 // ─── Main ─────────────────────────────────────────────────────────────────────
7845
7946 async function main(): Promise<void> {