@hopla/claude-setup 1.3.0 → 1.3.1

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.
Files changed (2) hide show
  1. package/cli.js +22 -0
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -140,6 +140,25 @@ const PLANNING_COMMANDS = [
140
140
  "hopla-git-pr.md",
141
141
  ];
142
142
 
143
+ function removeExecutionCommands() {
144
+ const planningSet = new Set(PLANNING_COMMANDS);
145
+ const removed = [];
146
+ if (!fs.existsSync(COMMANDS_DIR)) return;
147
+ for (const file of fs.readdirSync(COMMANDS_DIR)) {
148
+ if (file.startsWith("hopla-") && !planningSet.has(file)) {
149
+ fs.rmSync(path.join(COMMANDS_DIR, file));
150
+ removed.push(file);
151
+ }
152
+ }
153
+ if (removed.length > 0) {
154
+ log(`${CYAN}Removing execution commands (planning mode)...${RESET}`);
155
+ for (const file of removed) {
156
+ log(` ${RED}✕${RESET} Removed: ~/.claude/commands/${file}`);
157
+ }
158
+ log("");
159
+ }
160
+ }
161
+
143
162
  async function install() {
144
163
  const modeLabel = PLANNING ? "Planning Mode (Robert)" : "Full Install";
145
164
  log(`\n${BOLD}@hopla/claude-setup${RESET} — Agentic Coding System ${CYAN}[${modeLabel}]${RESET}\n`);
@@ -151,6 +170,9 @@ async function install() {
151
170
  // Remove old non-prefixed commands from previous versions
152
171
  removeLegacyFiles();
153
172
 
173
+ // In planning mode, remove any execution commands left from a previous full install
174
+ if (PLANNING) removeExecutionCommands();
175
+
154
176
  log(`${CYAN}Installing global rules...${RESET}`);
155
177
  await installFile(
156
178
  path.join(FILES_DIR, "CLAUDE.md"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hopla/claude-setup",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Hopla team agentic coding system for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {