zugzbot 1.0.24 → 1.0.26
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/bin/init.js +0 -37
- package/package.json +1 -1
package/bin/init.js
CHANGED
|
@@ -88,43 +88,6 @@ for (const item of itemsToCopy) {
|
|
|
88
88
|
console.error(`${red}❌ Error copying ${item.name}: ${error.message}${reset}`);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
// Ensure .openspec directory, active-brief.md and sdd_state.json exist on target with a clean state
|
|
92
|
-
try {
|
|
93
|
-
const openspecDir = join(targetDir, '.openspec');
|
|
94
|
-
if (!fs.existsSync(openspecDir)) {
|
|
95
|
-
fs.mkdirSync(openspecDir, { recursive: true });
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
const activeBriefPath = join(openspecDir, 'active-brief.md');
|
|
99
|
-
if (!fs.existsSync(activeBriefPath)) {
|
|
100
|
-
fs.writeFileSync(
|
|
101
|
-
activeBriefPath,
|
|
102
|
-
"# SDD Active Brief\n\nNo hay ninguna sesión activa o el spec actual no ha sido iniciado.\n",
|
|
103
|
-
"utf8"
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
const sddStatePath = join(openspecDir, 'sdd_state.json');
|
|
108
|
-
if (!fs.existsSync(sddStatePath)) {
|
|
109
|
-
const cleanState = {
|
|
110
|
-
phase: "F0_DETECT",
|
|
111
|
-
activeContract: "",
|
|
112
|
-
stack: {
|
|
113
|
-
core: [],
|
|
114
|
-
databases: []
|
|
115
|
-
},
|
|
116
|
-
loopMode: false,
|
|
117
|
-
loopTargetIterations: 1,
|
|
118
|
-
loopCurrentIteration: 1,
|
|
119
|
-
rollbackCount: 0,
|
|
120
|
-
updatedAt: new Date().toISOString()
|
|
121
|
-
};
|
|
122
|
-
fs.writeFileSync(sddStatePath, JSON.stringify(cleanState, null, 2), "utf8");
|
|
123
|
-
}
|
|
124
|
-
} catch (error) {
|
|
125
|
-
console.error(`${red}❌ Error creating .openspec directory: ${error.message}${reset}`);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
91
|
// Ensure .openspec/ is ignored in the target's .gitignore to avoid propagating local state
|
|
129
92
|
try {
|
|
130
93
|
const gitignorePath = join(targetDir, '.gitignore');
|