@aslomon/effectum 0.1.4 → 0.1.6

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/install.js CHANGED
@@ -408,6 +408,16 @@ async function install(opts) {
408
408
  const wResults = copyDir(workshopSrc, workshopDest, { skipExisting: true });
409
409
  steps.push(...wResults);
410
410
 
411
+ // 6. Copy templates + stacks so /setup can find them after npx install
412
+ const templatesSrc = path.join(repoRoot, 'system', 'templates');
413
+ const stacksSrc = path.join(repoRoot, 'system', 'stacks');
414
+ const effectumDir = isGlobal
415
+ ? path.join(os.homedir(), '.effectum')
416
+ : path.join(targetDir, '.effectum');
417
+ const tResults = copyDir(templatesSrc, path.join(effectumDir, 'templates'), { skipExisting: false });
418
+ const sResults = copyDir(stacksSrc, path.join(effectumDir, 'stacks'), { skipExisting: false });
419
+ steps.push(...tResults, ...sResults);
420
+
411
421
  return steps;
412
422
  }
413
423
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aslomon/effectum",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Autonomous development system for Claude Code — describe what you want, get production-ready code",
5
5
  "bin": {
6
6
  "effectum": "bin/install.js"
@@ -12,7 +12,7 @@ Validate:
12
12
  - The path exists. If not, ask: "This directory does not exist. Should I create it?"
13
13
  - Check for an existing `.claude/` directory at the target path.
14
14
  - If found, ask: **"A .claude/ directory already exists. Overwrite, merge, or abort?"**
15
- - **Overwrite**: Delete existing `.claude/` and replace with fresh installation.
15
+ - **Overwrite**: Replace CONFIGURATION files only (`CLAUDE.md`, `.claude/settings.json`, `.claude/guardrails.md`) but **keep all commands** already in `.claude/commands/`.
16
16
  - **Merge**: Keep existing files, only add missing ones. Warn about conflicts.
17
17
  - **Abort**: Stop the installation.
18
18
 
@@ -57,12 +57,24 @@ Options: English, German (du/informal), or specify another.
57
57
 
58
58
  ## Step 3: Read Templates and Stack Preset
59
59
 
60
- Read these files from the repo root:
60
+ Read the template files check these locations **in order** and use the first one found:
61
61
 
62
- 1. `system/templates/CLAUDE.md.tmpl`Main configuration template
63
- 2. `system/templates/settings.json.tmpl`Settings template
64
- 3. `system/templates/guardrails.md.tmpl`Guardrails template
65
- 4. `system/stacks/{selected-stack}.md` — Stack-specific content (nextjs-supabase.md, python-fastapi.md, swift-ios.md, or generic.md)
62
+ 1. `.effectum/templates/`local install (created by `npx @aslomon/effectum --local`)
63
+ 2. `~/.effectum/templates/`global install (created by `npx @aslomon/effectum --global`)
64
+ 3. `system/templates/`development (running directly from the repo)
65
+
66
+ Templates to read:
67
+ - `CLAUDE.md.tmpl` — Main configuration template
68
+ - `settings.json.tmpl` — Settings template
69
+ - `guardrails.md.tmpl` — Guardrails template
70
+
71
+ Read the stack preset file — check these locations **in order** and use the first one found:
72
+
73
+ 1. `.effectum/stacks/{selected-stack}.md`
74
+ 2. `~/.effectum/stacks/{selected-stack}.md`
75
+ 3. `system/stacks/{selected-stack}.md`
76
+
77
+ Available stacks: `nextjs-supabase.md`, `python-fastapi.md`, `swift-ios.md`, `generic.md`
66
78
 
67
79
  The stack preset file contains values for these placeholders:
68
80
 
@@ -32,8 +32,8 @@ Follow these strictly — each exists because ignoring it caused real problems.
32
32
 
33
33
  ## Stack-Specific
34
34
 
35
- {{STACK_SPECIFIC_GUARDRAILS}}
35
+ No stack-specific guardrails configured yet. Run /setup to configure for your stack.
36
36
 
37
37
  ## Tool-Specific
38
38
 
39
- {{TOOL_SPECIFIC_GUARDRAILS}}
39
+ No tool-specific guardrails configured yet. Run /setup to configure.
@@ -42,7 +42,7 @@
42
42
  "hooks": [
43
43
  {
44
44
  "type": "command",
45
- "command": "bash -c 'cd \"$CLAUDE_PROJECT_DIR\" 2>/dev/null; echo \"=== POST-COMPACTION CONTEXT ===\"; echo \"Branch: $(git branch --show-current 2>/dev/null)\"; echo \"Modified: $(git diff --name-only 2>/dev/null | tr \"\\n\" \", \")\"; echo \"Staged: $(git diff --cached --name-only 2>/dev/null | tr \"\\n\" \", \")\"; echo \"Last 5 commits: $(git log --oneline -5 2>/dev/null)\"; echo \"Rules: {{PACKAGE_MANAGER}} (not others). Check DESIGN.md before UI work.\"; if [ -f DESIGN.md ]; then echo \"DESIGN.md exists — follow it.\"; fi; if [ -f .claude/logs/tool-failures.jsonl ]; then echo \"Recent errors:\"; tail -3 .claude/logs/tool-failures.jsonl 2>/dev/null; fi; GLOBAL_GR=\"$HOME/.claude/guardrails.md\"; PROJECT_GR=\"${CLAUDE_PROJECT_DIR:-.}/.claude/guardrails.md\"; if [ -f \"$GLOBAL_GR\" ]; then echo \"=== GUARDRAILS ===\"; head -50 \"$GLOBAL_GR\"; echo \"=== END ===\"; fi; if [ -f \"$PROJECT_GR\" ] && [ \"$PROJECT_GR\" != \"$GLOBAL_GR\" ]; then echo \"=== PROJECT GUARDRAILS ===\"; head -30 \"$PROJECT_GR\"; echo \"=== END ===\"; fi; echo \"=== END CONTEXT ===\"'",
45
+ "command": "bash -c 'cd \"$CLAUDE_PROJECT_DIR\" 2>/dev/null; echo \"=== POST-COMPACTION CONTEXT ===\"; echo \"Branch: $(git branch --show-current 2>/dev/null)\"; echo \"Modified: $(git diff --name-only 2>/dev/null | tr \"\\n\" \", \")\"; echo \"Staged: $(git diff --cached --name-only 2>/dev/null | tr \"\\n\" \", \")\"; echo \"Last 5 commits: $(git log --oneline -5 2>/dev/null)\"; echo \"Rules: npm (not others). Check DESIGN.md before UI work.\"; if [ -f DESIGN.md ]; then echo \"DESIGN.md exists — follow it.\"; fi; if [ -f .claude/logs/tool-failures.jsonl ]; then echo \"Recent errors:\"; tail -3 .claude/logs/tool-failures.jsonl 2>/dev/null; fi; GLOBAL_GR=\"$HOME/.claude/guardrails.md\"; PROJECT_GR=\"${CLAUDE_PROJECT_DIR:-.}/.claude/guardrails.md\"; if [ -f \"$GLOBAL_GR\" ]; then echo \"=== GUARDRAILS ===\"; head -50 \"$GLOBAL_GR\"; echo \"=== END ===\"; fi; if [ -f \"$PROJECT_GR\" ] && [ \"$PROJECT_GR\" != \"$GLOBAL_GR\" ]; then echo \"=== PROJECT GUARDRAILS ===\"; head -30 \"$PROJECT_GR\"; echo \"=== END ===\"; fi; echo \"=== END CONTEXT ===\"'",
46
46
  "statusMessage": "Re-injecting context..."
47
47
  }
48
48
  ]