aiblueprint-cli 1.4.23 → 1.4.25
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/claude-code-config/skills/git-commit/SKILL.md +42 -0
- package/claude-code-config/{commands/git/create-pr.md → skills/git-create-pr/SKILL.md} +12 -18
- package/claude-code-config/skills/git-fix-pr-comments/SKILL.md +51 -0
- package/claude-code-config/skills/git-merge/SKILL.md +68 -0
- package/claude-code-config/skills/{claude-memory → meta-claude-memory}/SKILL.md +7 -2
- package/claude-code-config/skills/meta-claude-memory/references/rules-directory-guide.md +298 -0
- package/claude-code-config/skills/meta-prompt-creator/SKILL.md +285 -0
- package/claude-code-config/skills/meta-prompt-creator/references/anthropic-best-practices.md +126 -0
- package/claude-code-config/skills/meta-prompt-creator/references/anti-patterns.md +57 -0
- package/claude-code-config/skills/meta-prompt-creator/references/clarity-principles.md +54 -0
- package/claude-code-config/skills/meta-prompt-creator/references/context-management.md +389 -0
- package/claude-code-config/skills/meta-prompt-creator/references/few-shot-patterns.md +47 -0
- package/claude-code-config/skills/meta-prompt-creator/references/openai-best-practices.md +50 -0
- package/claude-code-config/skills/meta-prompt-creator/references/prompt-templates.md +110 -0
- package/claude-code-config/skills/meta-prompt-creator/references/reasoning-techniques.md +52 -0
- package/claude-code-config/skills/meta-prompt-creator/references/system-prompt-patterns.md +48 -0
- package/claude-code-config/skills/meta-prompt-creator/references/xml-structure.md +36 -0
- package/claude-code-config/skills/meta-skill-creator/LICENSE.txt +202 -0
- package/claude-code-config/skills/meta-skill-creator/SKILL.md +421 -0
- package/claude-code-config/skills/meta-skill-creator/package.json +5 -0
- package/claude-code-config/skills/meta-skill-creator/references/output-patterns.md +82 -0
- package/claude-code-config/skills/meta-skill-creator/references/progressive-disclosure-patterns.md +374 -0
- package/claude-code-config/skills/meta-skill-creator/references/prompting-integration.md +363 -0
- package/claude-code-config/skills/meta-skill-creator/references/real-world-examples.md +513 -0
- package/claude-code-config/skills/meta-skill-creator/references/script-patterns.md +385 -0
- package/claude-code-config/skills/meta-skill-creator/references/workflows.md +28 -0
- package/claude-code-config/skills/meta-skill-creator/references/xml-tag-guide.md +606 -0
- package/claude-code-config/skills/meta-skill-creator/scripts/init-skill.ts +214 -0
- package/claude-code-config/skills/meta-skill-creator/scripts/package-skill.ts +146 -0
- package/claude-code-config/skills/meta-skill-creator/scripts/validate.ts +138 -0
- package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/SKILL.md +41 -15
- package/claude-code-config/skills/{setup-ralph → ralph-loop}/steps/step-00-init.md +2 -3
- package/claude-code-config/skills/utils-fix-errors/SKILL.md +61 -0
- package/claude-code-config/skills/utils-fix-grammar/SKILL.md +59 -0
- package/claude-code-config/skills/utils-oneshot/SKILL.md +56 -0
- package/claude-code-config/skills/workflow-apex/SKILL.md +303 -0
- package/claude-code-config/skills/workflow-apex/scripts/setup-templates.sh +134 -0
- package/claude-code-config/skills/workflow-apex/scripts/update-progress.sh +80 -0
- package/claude-code-config/skills/workflow-apex/steps/step-00-init.md +288 -0
- package/claude-code-config/skills/workflow-apex/steps/step-00b-branch.md +126 -0
- package/claude-code-config/skills/workflow-apex/steps/step-00b-economy.md +244 -0
- package/claude-code-config/skills/workflow-apex/steps/step-00b-interactive.md +153 -0
- package/claude-code-config/skills/workflow-apex/steps/step-01-analyze.md +361 -0
- package/claude-code-config/skills/workflow-apex/steps/step-02-plan.md +264 -0
- package/claude-code-config/skills/workflow-apex/steps/step-03-execute.md +239 -0
- package/claude-code-config/skills/workflow-apex/steps/step-04-validate.md +264 -0
- package/claude-code-config/skills/workflow-apex/steps/step-05-examine.md +294 -0
- package/claude-code-config/skills/workflow-apex/steps/step-06-resolve.md +237 -0
- package/claude-code-config/skills/workflow-apex/steps/step-07-tests.md +250 -0
- package/claude-code-config/skills/workflow-apex/steps/step-08-run-tests.md +308 -0
- package/claude-code-config/skills/workflow-apex/steps/step-09-finish.md +193 -0
- package/claude-code-config/skills/workflow-apex/templates/00-context.md +51 -0
- package/claude-code-config/skills/workflow-apex/templates/01-analyze.md +10 -0
- package/claude-code-config/skills/workflow-apex/templates/02-plan.md +10 -0
- package/claude-code-config/skills/workflow-apex/templates/03-execute.md +10 -0
- package/claude-code-config/skills/workflow-apex/templates/04-validate.md +10 -0
- package/claude-code-config/skills/workflow-apex/templates/05-examine.md +10 -0
- package/claude-code-config/skills/workflow-apex/templates/06-resolve.md +10 -0
- package/claude-code-config/skills/workflow-apex/templates/07-tests.md +10 -0
- package/claude-code-config/skills/workflow-apex/templates/08-run-tests.md +10 -0
- package/claude-code-config/skills/workflow-apex/templates/09-finish.md +10 -0
- package/claude-code-config/skills/workflow-apex/templates/README.md +195 -0
- package/claude-code-config/skills/workflow-apex/templates/step-complete.md +7 -0
- package/claude-code-config/skills/workflow-apex-free/SKILL.md +261 -0
- package/claude-code-config/skills/workflow-apex-free/scripts/setup-templates.sh +100 -0
- package/claude-code-config/skills/workflow-apex-free/scripts/update-progress.sh +80 -0
- package/claude-code-config/skills/workflow-apex-free/steps/step-00-init.md +267 -0
- package/claude-code-config/skills/workflow-apex-free/steps/step-00b-branch.md +126 -0
- package/claude-code-config/skills/workflow-apex-free/steps/step-00b-economy.md +244 -0
- package/claude-code-config/skills/workflow-apex-free/steps/step-00b-interactive.md +153 -0
- package/claude-code-config/skills/workflow-apex-free/steps/step-01-analyze.md +361 -0
- package/claude-code-config/skills/workflow-apex-free/steps/step-02-plan.md +264 -0
- package/claude-code-config/skills/workflow-apex-free/steps/step-03-execute.md +239 -0
- package/claude-code-config/skills/workflow-apex-free/steps/step-04-validate.md +251 -0
- package/claude-code-config/skills/workflow-apex-free/templates/00-context.md +43 -0
- package/claude-code-config/skills/workflow-apex-free/templates/01-analyze.md +10 -0
- package/claude-code-config/skills/workflow-apex-free/templates/02-plan.md +10 -0
- package/claude-code-config/skills/workflow-apex-free/templates/03-execute.md +10 -0
- package/claude-code-config/skills/workflow-apex-free/templates/04-validate.md +10 -0
- package/claude-code-config/skills/workflow-apex-free/templates/README.md +176 -0
- package/claude-code-config/skills/workflow-apex-free/templates/step-complete.md +7 -0
- package/dist/cli.js +146 -9
- package/package.json +1 -1
- package/claude-code-config/commands/explore.md +0 -90
- package/claude-code-config/commands/git/commit.md +0 -60
- package/claude-code-config/commands/git/fix-pr-comments.md +0 -59
- package/claude-code-config/commands/oneshot.md +0 -57
- package/claude-code-config/skills/create-slash-commands/SKILL.md +0 -1110
- package/claude-code-config/skills/create-slash-commands/references/arguments.md +0 -273
- package/claude-code-config/skills/create-slash-commands/references/patterns.md +0 -947
- package/claude-code-config/skills/create-slash-commands/references/prompt-examples.md +0 -656
- package/claude-code-config/skills/create-slash-commands/references/tool-restrictions.md +0 -389
- /package/claude-code-config/skills/{claude-memory → meta-claude-memory}/references/comprehensive-example.md +0 -0
- /package/claude-code-config/skills/{claude-memory → meta-claude-memory}/references/project-patterns.md +0 -0
- /package/claude-code-config/skills/{claude-memory → meta-claude-memory}/references/prompting-techniques.md +0 -0
- /package/claude-code-config/skills/{claude-memory → meta-claude-memory}/references/section-templates.md +0 -0
- /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/context-management.md +0 -0
- /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/debugging-agents.md +0 -0
- /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/error-handling-and-recovery.md +0 -0
- /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/evaluation-and-testing.md +0 -0
- /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/orchestration-patterns.md +0 -0
- /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/subagents.md +0 -0
- /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/writing-subagent-prompts.md +0 -0
- /package/claude-code-config/skills/{setup-ralph → ralph-loop}/SKILL.md +0 -0
- /package/claude-code-config/skills/{setup-ralph → ralph-loop}/scripts/setup.sh +0 -0
- /package/claude-code-config/skills/{setup-ralph → ralph-loop}/steps/step-01-interactive-prd.md +0 -0
- /package/claude-code-config/skills/{setup-ralph → ralph-loop}/steps/step-02-create-stories.md +0 -0
- /package/claude-code-config/skills/{setup-ralph → ralph-loop}/steps/step-03-finish.md +0 -0
package/dist/cli.js
CHANGED
|
@@ -33301,6 +33301,44 @@ function formatDate(date) {
|
|
|
33301
33301
|
const pad = (n) => n.toString().padStart(2, "0");
|
|
33302
33302
|
return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}-${pad(date.getHours())}-${pad(date.getMinutes())}-${pad(date.getSeconds())}`;
|
|
33303
33303
|
}
|
|
33304
|
+
async function listBackups() {
|
|
33305
|
+
const exists = await import_fs_extra5.default.pathExists(BACKUP_BASE_DIR);
|
|
33306
|
+
if (!exists) {
|
|
33307
|
+
return [];
|
|
33308
|
+
}
|
|
33309
|
+
const entries = await import_fs_extra5.default.readdir(BACKUP_BASE_DIR, { withFileTypes: true });
|
|
33310
|
+
const backups = [];
|
|
33311
|
+
for (const entry of entries) {
|
|
33312
|
+
if (!entry.isDirectory())
|
|
33313
|
+
continue;
|
|
33314
|
+
const match = entry.name.match(/^(\d{4})-(\d{2})-(\d{2})-(\d{2})-(\d{2})-(\d{2})$/);
|
|
33315
|
+
if (!match)
|
|
33316
|
+
continue;
|
|
33317
|
+
const [, year, month, day, hour, minute, second] = match;
|
|
33318
|
+
const date = new Date(parseInt(year), parseInt(month) - 1, parseInt(day), parseInt(hour), parseInt(minute), parseInt(second));
|
|
33319
|
+
backups.push({
|
|
33320
|
+
name: entry.name,
|
|
33321
|
+
path: path7.join(BACKUP_BASE_DIR, entry.name),
|
|
33322
|
+
date
|
|
33323
|
+
});
|
|
33324
|
+
}
|
|
33325
|
+
return backups.sort((a, b) => b.date.getTime() - a.date.getTime());
|
|
33326
|
+
}
|
|
33327
|
+
async function loadBackup(backupPath, claudeDir) {
|
|
33328
|
+
const exists = await import_fs_extra5.default.pathExists(backupPath);
|
|
33329
|
+
if (!exists) {
|
|
33330
|
+
throw new Error(`Backup not found: ${backupPath}`);
|
|
33331
|
+
}
|
|
33332
|
+
await import_fs_extra5.default.ensureDir(claudeDir);
|
|
33333
|
+
const itemsToCopy = ["commands", "agents", "skills", "scripts", "song", "settings.json"];
|
|
33334
|
+
for (const item of itemsToCopy) {
|
|
33335
|
+
const sourcePath = path7.join(backupPath, item);
|
|
33336
|
+
const destPath = path7.join(claudeDir, item);
|
|
33337
|
+
if (await import_fs_extra5.default.pathExists(sourcePath)) {
|
|
33338
|
+
await import_fs_extra5.default.copy(sourcePath, destPath, { overwrite: true });
|
|
33339
|
+
}
|
|
33340
|
+
}
|
|
33341
|
+
}
|
|
33304
33342
|
async function createBackup(claudeDir) {
|
|
33305
33343
|
const exists = await import_fs_extra5.default.pathExists(claudeDir);
|
|
33306
33344
|
if (!exists) {
|
|
@@ -35732,6 +35770,22 @@ async function proSyncCommand(options = {}) {
|
|
|
35732
35770
|
if (syncMode === "updates") {
|
|
35733
35771
|
selectedItems = [...newItems, ...modifiedItems];
|
|
35734
35772
|
} else if (syncMode === "updates_and_delete") {
|
|
35773
|
+
M2.message("");
|
|
35774
|
+
M2.message(source_default.red.bold("⚠️ WARNING: DESTRUCTIVE ACTION"));
|
|
35775
|
+
M2.message(source_default.red("━".repeat(50)));
|
|
35776
|
+
M2.message(source_default.red("All your custom skills, commands, agents, and configuration files"));
|
|
35777
|
+
M2.message(source_default.red("that are not in the premium version will be PERMANENTLY DELETED"));
|
|
35778
|
+
M2.message(source_default.red("and replaced by the new version."));
|
|
35779
|
+
M2.message(source_default.red("━".repeat(50)));
|
|
35780
|
+
M2.message("");
|
|
35781
|
+
const deleteConfirm = await ye({
|
|
35782
|
+
message: source_default.red.bold("Are you sure you want to delete and replace all files?"),
|
|
35783
|
+
initialValue: false
|
|
35784
|
+
});
|
|
35785
|
+
if (pD(deleteConfirm) || !deleteConfirm) {
|
|
35786
|
+
xe("Sync cancelled");
|
|
35787
|
+
process.exit(0);
|
|
35788
|
+
}
|
|
35735
35789
|
selectedItems = [...newItems, ...modifiedItems, ...deletedItems];
|
|
35736
35790
|
} else {
|
|
35737
35791
|
const fileChoices = choices.filter((c) => c.value.type !== "hook");
|
|
@@ -35879,13 +35933,90 @@ async function proSyncCommand(options = {}) {
|
|
|
35879
35933
|
}
|
|
35880
35934
|
}
|
|
35881
35935
|
|
|
35936
|
+
// src/commands/backup.ts
|
|
35937
|
+
import os15 from "os";
|
|
35938
|
+
import path15 from "path";
|
|
35939
|
+
function formatBackupDate(date) {
|
|
35940
|
+
const now = new Date;
|
|
35941
|
+
const diffMs = now.getTime() - date.getTime();
|
|
35942
|
+
const diffDays = Math.floor(diffMs / (1000 * 60 * 60 * 24));
|
|
35943
|
+
const diffHours = Math.floor(diffMs / (1000 * 60 * 60));
|
|
35944
|
+
const diffMinutes = Math.floor(diffMs / (1000 * 60));
|
|
35945
|
+
let relative;
|
|
35946
|
+
if (diffMinutes < 60) {
|
|
35947
|
+
relative = `${diffMinutes} minute${diffMinutes !== 1 ? "s" : ""} ago`;
|
|
35948
|
+
} else if (diffHours < 24) {
|
|
35949
|
+
relative = `${diffHours} hour${diffHours !== 1 ? "s" : ""} ago`;
|
|
35950
|
+
} else if (diffDays < 7) {
|
|
35951
|
+
relative = `${diffDays} day${diffDays !== 1 ? "s" : ""} ago`;
|
|
35952
|
+
} else {
|
|
35953
|
+
relative = date.toLocaleDateString();
|
|
35954
|
+
}
|
|
35955
|
+
return `${date.toLocaleString()} (${relative})`;
|
|
35956
|
+
}
|
|
35957
|
+
async function backupLoadCommand(options = {}) {
|
|
35958
|
+
const claudeDir = options.folder || path15.join(os15.homedir(), ".claude");
|
|
35959
|
+
Ie(source_default.blue("\uD83D\uDCE6 Load Backup"));
|
|
35960
|
+
const spinner = Y2();
|
|
35961
|
+
spinner.start("Scanning for backups...");
|
|
35962
|
+
const backups = await listBackups();
|
|
35963
|
+
spinner.stop(`Found ${backups.length} backup${backups.length !== 1 ? "s" : ""}`);
|
|
35964
|
+
if (backups.length === 0) {
|
|
35965
|
+
M2.warn("No backups found in ~/.config/aiblueprint/backup/");
|
|
35966
|
+
M2.info("Backups are created automatically when you run setup or sync commands.");
|
|
35967
|
+
Se(source_default.gray("Nothing to restore"));
|
|
35968
|
+
return;
|
|
35969
|
+
}
|
|
35970
|
+
const backupOptions = backups.map((backup) => ({
|
|
35971
|
+
value: backup,
|
|
35972
|
+
label: backup.name,
|
|
35973
|
+
hint: formatBackupDate(backup.date)
|
|
35974
|
+
}));
|
|
35975
|
+
const selected = await ve({
|
|
35976
|
+
message: "Select a backup to restore:",
|
|
35977
|
+
options: backupOptions
|
|
35978
|
+
});
|
|
35979
|
+
if (pD(selected)) {
|
|
35980
|
+
xe("Operation cancelled");
|
|
35981
|
+
process.exit(0);
|
|
35982
|
+
}
|
|
35983
|
+
M2.info(`Selected: ${source_default.cyan(selected.name)}`);
|
|
35984
|
+
M2.info(`Date: ${source_default.gray(formatBackupDate(selected.date))}`);
|
|
35985
|
+
const confirm = await ye({
|
|
35986
|
+
message: `This will overwrite your current configuration in ${source_default.cyan(claudeDir)}. Continue?`,
|
|
35987
|
+
initialValue: false
|
|
35988
|
+
});
|
|
35989
|
+
if (pD(confirm) || !confirm) {
|
|
35990
|
+
xe("Operation cancelled");
|
|
35991
|
+
process.exit(0);
|
|
35992
|
+
}
|
|
35993
|
+
spinner.start("Creating backup of current configuration...");
|
|
35994
|
+
const currentBackup = await createBackup(claudeDir);
|
|
35995
|
+
if (currentBackup) {
|
|
35996
|
+
spinner.stop(`Current config backed up to: ${source_default.gray(currentBackup)}`);
|
|
35997
|
+
} else {
|
|
35998
|
+
spinner.stop("No current config to backup");
|
|
35999
|
+
}
|
|
36000
|
+
spinner.start("Restoring backup...");
|
|
36001
|
+
try {
|
|
36002
|
+
await loadBackup(selected.path, claudeDir);
|
|
36003
|
+
spinner.stop("Backup restored successfully");
|
|
36004
|
+
M2.success(`Restored configuration from ${source_default.cyan(selected.name)}`);
|
|
36005
|
+
Se(source_default.green("✅ Backup loaded successfully"));
|
|
36006
|
+
} catch (error) {
|
|
36007
|
+
spinner.stop("Restore failed");
|
|
36008
|
+
M2.error(`Failed to restore backup: ${error}`);
|
|
36009
|
+
process.exit(1);
|
|
36010
|
+
}
|
|
36011
|
+
}
|
|
36012
|
+
|
|
35882
36013
|
// src/commands/dynamic-scripts.ts
|
|
35883
|
-
import
|
|
36014
|
+
import path18 from "path";
|
|
35884
36015
|
import { homedir } from "os";
|
|
35885
36016
|
|
|
35886
36017
|
// src/lib/script-parser.ts
|
|
35887
36018
|
var import_fs_extra12 = __toESM(require_lib4(), 1);
|
|
35888
|
-
import
|
|
36019
|
+
import path16 from "path";
|
|
35889
36020
|
var EXCLUDED_SCRIPTS = ["test", "lint", "format", "start"];
|
|
35890
36021
|
var EXCLUDED_SUFFIXES = [":test", ":lint", ":test-fixtures", ":start"];
|
|
35891
36022
|
function shouldIncludeScript(scriptName) {
|
|
@@ -35896,7 +36027,7 @@ function shouldIncludeScript(scriptName) {
|
|
|
35896
36027
|
return true;
|
|
35897
36028
|
}
|
|
35898
36029
|
async function readScriptsPackageJson(claudeDir) {
|
|
35899
|
-
const packageJsonPath =
|
|
36030
|
+
const packageJsonPath = path16.join(claudeDir, "scripts", "package.json");
|
|
35900
36031
|
try {
|
|
35901
36032
|
if (!await import_fs_extra12.default.pathExists(packageJsonPath)) {
|
|
35902
36033
|
return null;
|
|
@@ -35948,11 +36079,11 @@ function groupScriptsByPrefix(commands) {
|
|
|
35948
36079
|
var import_fs_extra13 = __toESM(require_lib4(), 1);
|
|
35949
36080
|
import { spawn as spawn2 } from "child_process";
|
|
35950
36081
|
import { execSync as execSync4 } from "child_process";
|
|
35951
|
-
import
|
|
35952
|
-
import
|
|
36082
|
+
import path17 from "path";
|
|
36083
|
+
import os16 from "os";
|
|
35953
36084
|
function checkCommand(cmd) {
|
|
35954
36085
|
try {
|
|
35955
|
-
const isWindows =
|
|
36086
|
+
const isWindows = os16.platform() === "win32";
|
|
35956
36087
|
const whichCmd = isWindows ? `where ${cmd}` : `which ${cmd}`;
|
|
35957
36088
|
execSync4(whichCmd, { stdio: "ignore" });
|
|
35958
36089
|
return true;
|
|
@@ -35978,13 +36109,13 @@ async function executeScript(scriptName, claudeDir) {
|
|
|
35978
36109
|
console.error(source_default.red("Bun is not installed. Install with: npm install -g bun"));
|
|
35979
36110
|
return 1;
|
|
35980
36111
|
}
|
|
35981
|
-
const scriptsDir =
|
|
36112
|
+
const scriptsDir = path17.join(claudeDir, "scripts");
|
|
35982
36113
|
if (!await import_fs_extra13.default.pathExists(scriptsDir)) {
|
|
35983
36114
|
console.error(source_default.red(`Scripts directory not found at ${scriptsDir}`));
|
|
35984
36115
|
console.log(source_default.gray("Run: aiblueprint claude-code setup"));
|
|
35985
36116
|
return 1;
|
|
35986
36117
|
}
|
|
35987
|
-
const packageJsonPath =
|
|
36118
|
+
const packageJsonPath = path17.join(scriptsDir, "package.json");
|
|
35988
36119
|
if (!await import_fs_extra13.default.pathExists(packageJsonPath)) {
|
|
35989
36120
|
console.error(source_default.red(`package.json not found in ${scriptsDir}`));
|
|
35990
36121
|
return 1;
|
|
@@ -36012,7 +36143,7 @@ async function executeScript(scriptName, claudeDir) {
|
|
|
36012
36143
|
|
|
36013
36144
|
// src/commands/dynamic-scripts.ts
|
|
36014
36145
|
function getClaudeDir(parentOptions) {
|
|
36015
|
-
return parentOptions.claudeCodeFolder || parentOptions.folder ?
|
|
36146
|
+
return parentOptions.claudeCodeFolder || parentOptions.folder ? path18.resolve(parentOptions.claudeCodeFolder || parentOptions.folder) : path18.join(homedir(), ".claude");
|
|
36016
36147
|
}
|
|
36017
36148
|
async function registerDynamicScriptCommands(claudeCodeCmd, claudeDir) {
|
|
36018
36149
|
const scripts = await readScriptsPackageJson(claudeDir);
|
|
@@ -36095,6 +36226,12 @@ proCmd.command("sync").description("Sync premium configurations with selective u
|
|
|
36095
36226
|
const claudeCodeFolder = parentOptions.claudeCodeFolder || parentOptions.folder;
|
|
36096
36227
|
proSyncCommand({ folder: claudeCodeFolder });
|
|
36097
36228
|
});
|
|
36229
|
+
var backupCmd = claudeCodeCmd.command("backup").description("Manage Claude Code configuration backups");
|
|
36230
|
+
backupCmd.command("load").description("Load a previous backup interactively").action((options, command) => {
|
|
36231
|
+
const parentOptions = command.parent.parent.opts();
|
|
36232
|
+
const claudeCodeFolder = parentOptions.claudeCodeFolder || parentOptions.folder;
|
|
36233
|
+
backupLoadCommand({ folder: claudeCodeFolder });
|
|
36234
|
+
});
|
|
36098
36235
|
try {
|
|
36099
36236
|
const claudeDir = join2(homedir2(), ".claude");
|
|
36100
36237
|
await registerDynamicScriptCommands(claudeCodeCmd, claudeDir);
|
package/package.json
CHANGED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Deep exploration of codebase, docs, and web for any topic or question
|
|
3
|
-
argument-hint: <topic-or-question>
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
You are an exploration specialist. Your mission is to gather comprehensive context about a topic.
|
|
7
|
-
|
|
8
|
-
**ULTRA THINK before launching agents.**
|
|
9
|
-
|
|
10
|
-
## Workflow
|
|
11
|
-
|
|
12
|
-
1. **ULTRA THINK**: Plan exploration strategy
|
|
13
|
-
- Identify key concepts, files, patterns to find
|
|
14
|
-
- Determine which sources need exploration (codebase/docs/web)
|
|
15
|
-
- List specific questions each agent should answer
|
|
16
|
-
- **CRITICAL**: Know EXACTLY what to search for before launching agents
|
|
17
|
-
|
|
18
|
-
2. **LAUNCH PARALLEL EXPLORATION**: Gather context from all sources
|
|
19
|
-
|
|
20
|
-
Launch ALL relevant agents in parallel in a single message.
|
|
21
|
-
Scale agent count based on complexity:
|
|
22
|
-
|
|
23
|
-
- **Codebase exploration** (`explore-codebase` agents):
|
|
24
|
-
- Simple topic: 1 agent for general search
|
|
25
|
-
- Complex topic: 2-3 agents for different aspects
|
|
26
|
-
- Multi-area: 1 agent per codebase area
|
|
27
|
-
|
|
28
|
-
Each agent should:
|
|
29
|
-
- Find related implementations and examples
|
|
30
|
-
- Locate relevant files and patterns
|
|
31
|
-
- Identify existing conventions and utilities
|
|
32
|
-
- Search for related helpers and abstractions
|
|
33
|
-
|
|
34
|
-
- **Documentation exploration** (`explore-docs` agents):
|
|
35
|
-
- Single library: 1 agent with focused topics
|
|
36
|
-
- Multiple libraries: 1 agent per library
|
|
37
|
-
- Complex integration: agents for each + integration
|
|
38
|
-
|
|
39
|
-
Each agent should:
|
|
40
|
-
- Search library docs for APIs and patterns
|
|
41
|
-
- Find best practices for tools being used
|
|
42
|
-
- Gather code examples from official docs
|
|
43
|
-
|
|
44
|
-
- **Web research** (`websearch` agents):
|
|
45
|
-
- Simple question: 1 agent
|
|
46
|
-
- Multi-faceted topic: 2-3 agents for different angles
|
|
47
|
-
|
|
48
|
-
Each agent should:
|
|
49
|
-
- Research latest approaches and solutions
|
|
50
|
-
- Find community examples and patterns
|
|
51
|
-
- Gather architectural guidance
|
|
52
|
-
|
|
53
|
-
## Agent Scaling Guide
|
|
54
|
-
|
|
55
|
-
| Complexity | Codebase | Docs | Web |
|
|
56
|
-
|-----------|----------|------|-----|
|
|
57
|
-
| Simple | 1 | 1 | 1 |
|
|
58
|
-
| Medium | 2 | 1-2 | 1 |
|
|
59
|
-
| Complex | 2-3 | 2-3 | 2 |
|
|
60
|
-
| Multi-library | 1-2 | 1 per lib | 1-2 |
|
|
61
|
-
|
|
62
|
-
3. **SYNTHESIZE FINDINGS**: Combine and organize results
|
|
63
|
-
- Merge findings from all agents
|
|
64
|
-
- Organize by topic/concern
|
|
65
|
-
- Include file paths with line numbers (e.g., `src/auth.ts:42`)
|
|
66
|
-
- Highlight key patterns and examples found
|
|
67
|
-
- Note any dependencies or prerequisites
|
|
68
|
-
|
|
69
|
-
4. **REPORT**: Present findings to user
|
|
70
|
-
- **Key Files**: List relevant files with purposes
|
|
71
|
-
- **Patterns**: Existing conventions to follow
|
|
72
|
-
- **Examples**: Code snippets and implementations found
|
|
73
|
-
- **Documentation**: Key insights from docs
|
|
74
|
-
- **Recommendations**: Suggested approaches based on findings
|
|
75
|
-
|
|
76
|
-
## Execution Rules
|
|
77
|
-
|
|
78
|
-
- **PARALLEL EXECUTION**: All agents must run simultaneously for speed
|
|
79
|
-
- **ULTRA THINK FIRST**: Never launch agents without clear search strategy
|
|
80
|
-
- **COMPREHENSIVE**: Gather more context than seems necessary
|
|
81
|
-
- **FILE REFERENCES**: Always include file paths with line numbers
|
|
82
|
-
- **NO FILES**: Do NOT create any files - output findings directly
|
|
83
|
-
|
|
84
|
-
## Priority
|
|
85
|
-
|
|
86
|
-
Context depth > Speed. Thorough exploration prevents implementation issues.
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
User: #$ARGUMENTS
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Quick commit and push with minimal, clean messages
|
|
3
|
-
model: haiku
|
|
4
|
-
allowed-tools: Bash(git :*), Bash(npm :*), Bash(pnpm :*)
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<objective>
|
|
8
|
-
Quickly analyze git changes and create a conventional commit message following the commitizen format (e.g., "update(statusline): refresh spend data"). This command prioritizes speed and efficiency for straightforward commits.
|
|
9
|
-
</objective>
|
|
10
|
-
|
|
11
|
-
<context>
|
|
12
|
-
Git state: !`git status`
|
|
13
|
-
Staged changes: !`git diff --cached --stat`
|
|
14
|
-
Unstaged changes: !`git diff --stat`
|
|
15
|
-
Recent commits: !`git log --oneline -5`
|
|
16
|
-
Current branch: !`git branch --show-current`
|
|
17
|
-
</context>
|
|
18
|
-
|
|
19
|
-
<process>
|
|
20
|
-
1. **Analyze changes**: Review git status to determine what needs to be committed
|
|
21
|
-
- If nothing staged but unstaged changes exist: stage all changes with `git add .`
|
|
22
|
-
- If nothing to commit: inform user and exit
|
|
23
|
-
|
|
24
|
-
2. **Determine commit type and scope**:
|
|
25
|
-
- Types: `feat`, `fix`, `update`, `docs`, `chore`, `refactor`, `test`, `perf`, `revert`
|
|
26
|
-
- Scope: Identify the main area affected (e.g., `statusline`, `auth`, `api`, `ui`, `commands`)
|
|
27
|
-
- Use `update` for refreshing/updating existing features
|
|
28
|
-
- Use `feat` for new features
|
|
29
|
-
- Use `fix` for bug fixes
|
|
30
|
-
|
|
31
|
-
3. **Generate commit message**:
|
|
32
|
-
- Format: `type(scope): brief description`
|
|
33
|
-
- Keep it under 72 characters
|
|
34
|
-
- Use imperative mood ("add" not "added")
|
|
35
|
-
- Start description with lowercase
|
|
36
|
-
- Be specific but concise
|
|
37
|
-
- Example: `update(statusline): refresh spend data`
|
|
38
|
-
|
|
39
|
-
4. **Create commit**: Execute `git commit -m "message"` immediately with the generated message
|
|
40
|
-
|
|
41
|
-
5. **Push changes**: After successful commit, push to remote with `git push`
|
|
42
|
-
</process>
|
|
43
|
-
|
|
44
|
-
<success_criteria>
|
|
45
|
-
- Changes properly staged if needed
|
|
46
|
-
- Commit message follows format: `type(scope): description`
|
|
47
|
-
- Commit created successfully
|
|
48
|
-
- Changes pushed to remote
|
|
49
|
-
- No errors during git operations
|
|
50
|
-
</success_criteria>
|
|
51
|
-
|
|
52
|
-
<rules>
|
|
53
|
-
- **SPEED OVER PERFECTION**: Generate one good commit message and commit immediately
|
|
54
|
-
- **NO INTERACTION**: Never use AskUserQuestion - just analyze and commit
|
|
55
|
-
- **AUTO-STAGE**: If changes exist but nothing staged, stage everything
|
|
56
|
-
- **AUTO-PUSH**: Always push after committing
|
|
57
|
-
- **MINIMAL OUTPUT**: Brief confirmation of what was committed
|
|
58
|
-
- **IMPERATIVE MOOD**: Use "add", "update", "fix", not past tense
|
|
59
|
-
- **LOWERCASE**: Description starts lowercase after colon
|
|
60
|
-
</rules>
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Fetch PR review comments and implement all requested changes
|
|
3
|
-
allowed-tools: Bash(gh :*), Bash(git :*), Read, Edit, MultiEdit
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
You are a PR review resolver. **Systematically address ALL unresolved review comments until PR is approved.**
|
|
7
|
-
|
|
8
|
-
## Context
|
|
9
|
-
|
|
10
|
-
- Current branch: !`git branch --show-current`
|
|
11
|
-
- Working tree status: !`git status --short`
|
|
12
|
-
- Recent commits: !`git log --oneline -3`
|
|
13
|
-
|
|
14
|
-
## Workflow
|
|
15
|
-
|
|
16
|
-
1. **FETCH COMMENTS**: Gather all unresolved PR feedback
|
|
17
|
-
- **Identify PR**: `gh pr status --json number,headRefName`
|
|
18
|
-
- **Get reviews**: `gh pr review list --state CHANGES_REQUESTED`
|
|
19
|
-
- **Get inline**: `gh api repos/{owner}/{repo}/pulls/{number}/comments`
|
|
20
|
-
- **CRITICAL**: Capture BOTH review comments AND inline code comments
|
|
21
|
-
- **STOP** if no PR found - ask user for PR number
|
|
22
|
-
|
|
23
|
-
2. **ANALYZE & PLAN**: Map feedback to specific actions
|
|
24
|
-
- **Extract locations**: Note exact file:line references
|
|
25
|
-
- **Group by file**: Batch changes for MultiEdit efficiency
|
|
26
|
-
- **Define scope**: List **ONLY** files from review comments
|
|
27
|
-
- **STAY IN SCOPE**: NEVER fix unrelated issues
|
|
28
|
-
- **Create checklist**: One item per comment to track
|
|
29
|
-
|
|
30
|
-
3. **IMPLEMENT FIXES**: Address each comment systematically
|
|
31
|
-
- **BEFORE editing**: ALWAYS `Read` the target file first
|
|
32
|
-
- **Batch changes**: Use `MultiEdit` for same-file modifications
|
|
33
|
-
- **Verify resolution**: Each comment **MUST** be fully addressed
|
|
34
|
-
- **Direct fixes only**: Make **EXACTLY** what reviewer requested
|
|
35
|
-
- **Track progress**: Check off each resolved comment
|
|
36
|
-
|
|
37
|
-
4. **COMMIT & PUSH**: Submit all fixes as single commit
|
|
38
|
-
- **Stage everything**: `git add -A`
|
|
39
|
-
- **Commit format**: `fix: address PR review comments`
|
|
40
|
-
- **Push changes**: `git push` to update the PR
|
|
41
|
-
- **NEVER include**: No "Generated with Claude Code" or co-author tags
|
|
42
|
-
- **Verify**: Check PR updated with `gh pr view`
|
|
43
|
-
|
|
44
|
-
## Execution Rules
|
|
45
|
-
|
|
46
|
-
- **NON-NEGOTIABLE**: Every unresolved comment MUST be addressed
|
|
47
|
-
- **CRITICAL RULE**: Read files BEFORE any edits - no exceptions
|
|
48
|
-
- **MUST** use exact file paths from review comments
|
|
49
|
-
- **STOP** if unable to fetch comments - request PR number
|
|
50
|
-
- **FORBIDDEN**: Style changes beyond reviewer requests
|
|
51
|
-
- **On failure**: Return to ANALYZE phase, never skip comments
|
|
52
|
-
|
|
53
|
-
## Priority
|
|
54
|
-
|
|
55
|
-
**Reviewer requests > Everything else**. STAY IN SCOPE - fix ONLY what was requested.
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
User: #$ARGUMENTS
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Ultra-fast feature implementation - Explore then Code then Test
|
|
3
|
-
argument-hint: <feature-description>
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
<objective>
|
|
7
|
-
Implement #$ARGUMENTS at maximum speed using the OneShot methodology.
|
|
8
|
-
|
|
9
|
-
This workflow prioritizes rapid delivery through surgical exploration, immediate implementation, and focused validation. Speed over completeness - ship fast, iterate later.
|
|
10
|
-
</objective>
|
|
11
|
-
|
|
12
|
-
<process>
|
|
13
|
-
1. **EXPLORE** (5-10 min max):
|
|
14
|
-
- Launch 1-2 parallel subagents maximum to find relevant files
|
|
15
|
-
- Use `explore-codebase` for codebase search
|
|
16
|
-
- Use `explore-docs` ONLY if library-specific knowledge needed
|
|
17
|
-
- Find files to use as examples or edit targets
|
|
18
|
-
- Be surgical - know exactly what to search for
|
|
19
|
-
- NO PLANNING PHASE - gather context and move to coding
|
|
20
|
-
|
|
21
|
-
2. **CODE** (implement immediately):
|
|
22
|
-
- Start coding as soon as basic context available
|
|
23
|
-
- Follow existing codebase patterns and style
|
|
24
|
-
- Prefer clear variable/method names over comments
|
|
25
|
-
- Stay STRICTLY in scope - change only what's needed
|
|
26
|
-
- NO comments unless absolutely necessary
|
|
27
|
-
- NO refactoring beyond feature requirements
|
|
28
|
-
- Run autoformatting scripts when done
|
|
29
|
-
- Fix reasonable linter warnings as you go
|
|
30
|
-
|
|
31
|
-
3. **TEST** (validate quality):
|
|
32
|
-
- Check package.json for available scripts (lint, typecheck, format)
|
|
33
|
-
- Run: `npm run lint && npm run typecheck` (or equivalent)
|
|
34
|
-
- If checks fail: fix errors immediately and re-run
|
|
35
|
-
- Stay in scope - don't run full test suite unless requested
|
|
36
|
-
- For major changes only: run relevant tests with `npm test -- <pattern>`
|
|
37
|
-
</process>
|
|
38
|
-
|
|
39
|
-
<rules>
|
|
40
|
-
**Critical constraints:**
|
|
41
|
-
- SPEED IS PRIORITY: Move fast, break nothing
|
|
42
|
-
- NO PLANNING: Trust exploration and code directly
|
|
43
|
-
- PARALLEL AGENTS: Max 2 agents during explore phase
|
|
44
|
-
- MINIMAL TESTS: Lint + typecheck only (unless user requests more)
|
|
45
|
-
- STAY FOCUSED: Implement exactly what's requested, nothing more
|
|
46
|
-
- ULTRA THINK: Always engage deep reasoning for optimal solutions
|
|
47
|
-
- If stuck or uncertain: ask user immediately instead of over-exploring
|
|
48
|
-
</rules>
|
|
49
|
-
|
|
50
|
-
<success_criteria>
|
|
51
|
-
|
|
52
|
-
- Feature implemented following existing codebase patterns
|
|
53
|
-
- Code passes linting and type checking
|
|
54
|
-
- Implementation stays strictly within requested scope
|
|
55
|
-
- No unnecessary comments or refactoring
|
|
56
|
-
- Autoformatting applied where available
|
|
57
|
-
</success_criteria>
|