@pennyfarthing/core 8.0.0 → 8.0.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pennyfarthing/core",
3
- "version": "8.0.0",
3
+ "version": "8.0.2",
4
4
  "description": "Claude Code agent framework with TDD workflow and persona system",
5
5
  "type": "module",
6
6
  "bin": {
@@ -29,24 +29,30 @@ fi
29
29
  _real_script_dir="$(cd "$SCRIPT_DIR" && pwd -P)"
30
30
 
31
31
  # Derive package root from script location
32
- # Scripts in pennyfarthing-dist/scripts/lib/ are 3 levels deep
33
- # Scripts in pennyfarthing-dist/scripts/<category>/ are also 3 levels deep
32
+ # Scripts can be in:
33
+ # - pennyfarthing-dist/scripts/<category>/ (npm package or framework dev)
34
+ # - .pennyfarthing/scripts/<category>/ (consumer project after init)
34
35
  if [[ "$_real_script_dir" == */pennyfarthing-dist/scripts/* ]]; then
35
36
  # Extract everything before /pennyfarthing-dist/scripts/
36
37
  _pkg_root="${_real_script_dir%/pennyfarthing-dist/scripts/*}"
37
38
 
38
39
  # Determine context: framework dev or consumer?
39
- if [[ -d "$_pkg_root/pennyfarthing-dist" && ! -L "$_pkg_root/pennyfarthing-dist" ]]; then
40
- # Framework context: package root IS project root
41
- PROJECT_ROOT="$_pkg_root"
42
- elif [[ "$_pkg_root" == */node_modules/* ]]; then
40
+ # Check node_modules FIRST - if we're in node_modules, we're always a consumer
41
+ if [[ "$_pkg_root" == */node_modules/* ]]; then
43
42
  # Consumer context: walk up from node_modules to project
44
43
  PROJECT_ROOT="${_pkg_root%/node_modules/*}"
44
+ elif [[ -d "$_pkg_root/pennyfarthing-dist" && ! -L "$_pkg_root/pennyfarthing-dist" ]]; then
45
+ # Framework context: package root IS project root
46
+ PROJECT_ROOT="$_pkg_root"
45
47
  else
46
48
  PROJECT_ROOT="$_pkg_root"
47
49
  fi
50
+ elif [[ "$_real_script_dir" == */.pennyfarthing/scripts/* ]]; then
51
+ # Consumer project context: scripts copied to .pennyfarthing/scripts/
52
+ # Extract everything before /.pennyfarthing/scripts/
53
+ PROJECT_ROOT="${_real_script_dir%/.pennyfarthing/scripts/*}"
48
54
  else
49
- echo "Error: Script not in expected location (pennyfarthing-dist/scripts/...)" >&2
55
+ echo "Error: Script not in expected location (pennyfarthing-dist/scripts/ or .pennyfarthing/scripts/)" >&2
50
56
  echo "SCRIPT_DIR=$_real_script_dir" >&2
51
57
  exit 1
52
58
  fi
@@ -91,11 +91,17 @@ echo ""
91
91
  MANAGED_PATHS=(
92
92
  ".claude/core"
93
93
  ".claude/skills"
94
+ ".claude/commands"
94
95
  ".claude/personas"
95
96
  ".claude/pennyfarthing"
96
97
  ".claude/manifest.json"
97
98
  ".claude/settings.local.json"
98
99
  ".claude/statusline.sh"
100
+ ".pennyfarthing/agents"
101
+ ".pennyfarthing/guides"
102
+ ".pennyfarthing/personas"
103
+ ".pennyfarthing/scripts"
104
+ ".pennyfarthing/workflows"
99
105
  "scripts/core"
100
106
  "scripts/hooks"
101
107
  "scripts/lib"