chiefwiggum 1.3.14 → 1.3.15
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.cjs +56 -11
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -626,6 +626,17 @@ async function cmdLoop() {
|
|
|
626
626
|
var __dirname = (0, import_node_path2.dirname)((0, import_node_url.fileURLToPath)(importMetaUrl));
|
|
627
627
|
var LOCAL_TEMPLATES_DIR = ".chiefwiggum/templates";
|
|
628
628
|
var CONFIG_FILE = ".chiefwiggum/CLAUDE.md";
|
|
629
|
+
function getProjectTracker() {
|
|
630
|
+
if (!(0, import_node_fs3.existsSync)(CONFIG_FILE)) {
|
|
631
|
+
return "todo";
|
|
632
|
+
}
|
|
633
|
+
try {
|
|
634
|
+
const config2 = JSON.parse((0, import_node_fs3.readFileSync)(CONFIG_FILE, "utf-8"));
|
|
635
|
+
return config2.projectTracker || "todo";
|
|
636
|
+
} catch {
|
|
637
|
+
return "todo";
|
|
638
|
+
}
|
|
639
|
+
}
|
|
629
640
|
var BUNDLED_TEMPLATES_DIR = (0, import_node_path2.join)(__dirname, "..", "templates");
|
|
630
641
|
var SKIP_DIRS = /* @__PURE__ */ new Set([
|
|
631
642
|
"node_modules",
|
|
@@ -935,14 +946,42 @@ Write directly to CLAUDE.md.`;
|
|
|
935
946
|
await runClaude({ prompt: claudePrompt });
|
|
936
947
|
console.log(import_picocolors7.default.green(" \u2713 CLAUDE.md"));
|
|
937
948
|
}
|
|
938
|
-
|
|
939
|
-
console.log(import_picocolors7.default.yellow(`[4/4] Generating ${todoFile}...`));
|
|
949
|
+
const tracker = getProjectTracker();
|
|
940
950
|
const techGenerated = (0, import_node_fs3.existsSync)(techPath) ? (0, import_node_fs3.readFileSync)(techPath, "utf-8") : "";
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
(
|
|
944
|
-
|
|
945
|
-
|
|
951
|
+
if (tracker === "github") {
|
|
952
|
+
console.log();
|
|
953
|
+
console.log(import_picocolors7.default.yellow("[4/4] Creating GitHub Issues..."));
|
|
954
|
+
const issuesPrompt = `You are creating GitHub Issues based on specs.
|
|
955
|
+
|
|
956
|
+
Here is the PRD:
|
|
957
|
+
<prd>
|
|
958
|
+
${prdGenerated}
|
|
959
|
+
</prd>
|
|
960
|
+
|
|
961
|
+
Here is the Technical Specification:
|
|
962
|
+
<technical>
|
|
963
|
+
${techGenerated}
|
|
964
|
+
</technical>
|
|
965
|
+
|
|
966
|
+
Create GitHub Issues for this project using the gh CLI.
|
|
967
|
+
Break down the work into granular issues (1-2 hours each).
|
|
968
|
+
Group related issues with labels like "phase-1", "phase-2", etc.
|
|
969
|
+
|
|
970
|
+
For each issue, run a command like:
|
|
971
|
+
gh issue create --title "Issue title" --body "Description of the task" --label "phase-1"
|
|
972
|
+
|
|
973
|
+
Create 5-15 issues covering the full implementation.
|
|
974
|
+
Do NOT create a TODO.md file - only create GitHub Issues.`;
|
|
975
|
+
await runClaude({ prompt: issuesPrompt });
|
|
976
|
+
console.log(import_picocolors7.default.green(" \u2713 GitHub Issues created"));
|
|
977
|
+
} else {
|
|
978
|
+
console.log();
|
|
979
|
+
console.log(import_picocolors7.default.yellow(`[4/4] Generating ${todoFile}...`));
|
|
980
|
+
const todoDir = (0, import_node_path2.dirname)(todoFile);
|
|
981
|
+
if (todoDir !== ".") {
|
|
982
|
+
(0, import_node_fs3.mkdirSync)(todoDir, { recursive: true });
|
|
983
|
+
}
|
|
984
|
+
const todoPrompt = `You are filling in a TODO template based on specs.
|
|
946
985
|
|
|
947
986
|
Here is the PRD:
|
|
948
987
|
<prd>
|
|
@@ -964,8 +1003,9 @@ Use checkbox format: - [ ] Task description
|
|
|
964
1003
|
Keep tasks granular (1-2 hours max each).
|
|
965
1004
|
End each phase with: - [ ] Phase N review
|
|
966
1005
|
Write directly to ${todoFile}.`;
|
|
967
|
-
|
|
968
|
-
|
|
1006
|
+
await runClaude({ prompt: todoPrompt });
|
|
1007
|
+
console.log(import_picocolors7.default.green(` \u2713 ${todoFile}`));
|
|
1008
|
+
}
|
|
969
1009
|
console.log();
|
|
970
1010
|
console.log(import_picocolors7.default.green("Specs generated:"));
|
|
971
1011
|
console.log(` - ${prdPath}`);
|
|
@@ -973,10 +1013,15 @@ Write directly to ${todoFile}.`;
|
|
|
973
1013
|
if (!(0, import_node_fs3.existsSync)("CLAUDE.md")) {
|
|
974
1014
|
console.log(" - CLAUDE.md");
|
|
975
1015
|
}
|
|
976
|
-
|
|
1016
|
+
if (tracker === "github") {
|
|
1017
|
+
console.log(" - GitHub Issues");
|
|
1018
|
+
} else {
|
|
1019
|
+
console.log(` - ${todoFile}`);
|
|
1020
|
+
}
|
|
977
1021
|
try {
|
|
978
1022
|
(0, import_node_child_process6.execSync)("git rev-parse --git-dir", { stdio: "pipe" });
|
|
979
|
-
|
|
1023
|
+
const filesToAdd = tracker === "github" ? `${specsDir}/ CLAUDE.md` : `${specsDir}/ ${todoFile} CLAUDE.md`;
|
|
1024
|
+
(0, import_node_child_process6.execSync)(`git add ${filesToAdd} 2>/dev/null || true`, { stdio: "pipe" });
|
|
980
1025
|
(0, import_node_child_process6.execSync)('git commit -m "chore: generate specs from plan" 2>/dev/null || true', {
|
|
981
1026
|
stdio: "pipe"
|
|
982
1027
|
});
|