autoworkflow 3.8.1 → 3.8.3

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.
@@ -13,8 +13,11 @@ BOLD='\033[1m'
13
13
  DIM='\033[2m'
14
14
  NC='\033[0m'
15
15
 
16
+ # Project directory (use env var if set, otherwise current directory)
17
+ PROJECT_DIR="${CLAUDE_PROJECT_DIR:-.}"
18
+
16
19
  # State directory
17
- STATE_DIR=".claude/.autoworkflow"
20
+ STATE_DIR="$PROJECT_DIR/.claude/.autoworkflow"
18
21
  mkdir -p "$STATE_DIR"
19
22
 
20
23
  # Configuration
@@ -14,8 +14,11 @@ BOLD='\033[1m'
14
14
  DIM='\033[2m'
15
15
  NC='\033[0m'
16
16
 
17
+ # Project directory (use env var if set, otherwise current directory)
18
+ PROJECT_DIR="${CLAUDE_PROJECT_DIR:-.}"
19
+
17
20
  # State directory
18
- STATE_DIR=".claude/.autoworkflow"
21
+ STATE_DIR="$PROJECT_DIR/.claude/.autoworkflow"
19
22
  mkdir -p "$STATE_DIR"
20
23
 
21
24
  # Output file
@@ -14,8 +14,11 @@ BOLD='\033[1m'
14
14
  DIM='\033[2m'
15
15
  NC='\033[0m'
16
16
 
17
+ # Project directory (use env var if set, otherwise current directory)
18
+ PROJECT_DIR="${CLAUDE_PROJECT_DIR:-.}"
19
+
17
20
  # State directory
18
- STATE_DIR=".claude/.autoworkflow"
21
+ STATE_DIR="$PROJECT_DIR/.claude/.autoworkflow"
19
22
  mkdir -p "$STATE_DIR"
20
23
 
21
24
  # State files
@@ -6,13 +6,16 @@
6
6
  # Routes:
7
7
  # - git commit → post-commit.sh (BLUEPRINT update reminder)
8
8
 
9
+ # Project directory (use env var if set, otherwise current directory)
10
+ PROJECT_DIR="${CLAUDE_PROJECT_DIR:-.}"
11
+
9
12
  # Get the command that was executed
10
13
  TOOL_INPUT="$1"
11
14
 
12
15
  # Check if this was a git commit command
13
16
  if echo "$TOOL_INPUT" | grep -qE "git\s+commit"; then
14
17
  # Route to post-commit hook
15
- ./.claude/hooks/post-commit.sh
18
+ "$PROJECT_DIR/.claude/hooks/post-commit.sh"
16
19
  exit $?
17
20
  fi
18
21
 
@@ -15,8 +15,11 @@ BOLD='\033[1m'
15
15
  DIM='\033[2m'
16
16
  NC='\033[0m'
17
17
 
18
+ # Project directory (use env var if set, otherwise current directory)
19
+ PROJECT_DIR="${CLAUDE_PROJECT_DIR:-.}"
20
+
18
21
  # State directory
19
- STATE_DIR=".claude/.autoworkflow"
22
+ STATE_DIR="$PROJECT_DIR/.claude/.autoworkflow"
20
23
 
21
24
  # State files
22
25
  PHASE_FILE="$STATE_DIR/phase"
@@ -17,8 +17,11 @@ BOLD='\033[1m'
17
17
  DIM='\033[2m'
18
18
  NC='\033[0m'
19
19
 
20
+ # Project directory (use env var if set, otherwise current directory)
21
+ PROJECT_DIR="${CLAUDE_PROJECT_DIR:-.}"
22
+
20
23
  # State directory
21
- STATE_DIR=".claude/.autoworkflow"
24
+ STATE_DIR="$PROJECT_DIR/.claude/.autoworkflow"
22
25
  mkdir -p "$STATE_DIR"
23
26
 
24
27
  # Configuration
@@ -16,8 +16,11 @@ CYAN='\033[0;36m'
16
16
  BOLD='\033[1m'
17
17
  NC='\033[0m'
18
18
 
19
+ # Project directory (use env var if set, otherwise current directory)
20
+ PROJECT_DIR="${CLAUDE_PROJECT_DIR:-.}"
21
+
19
22
  # State directory
20
- STATE_DIR=".claude/.autoworkflow"
23
+ STATE_DIR="$PROJECT_DIR/.claude/.autoworkflow"
21
24
  mkdir -p "$STATE_DIR"
22
25
 
23
26
  # Track errors
@@ -19,8 +19,11 @@ BOLD='\033[1m'
19
19
  DIM='\033[2m'
20
20
  NC='\033[0m'
21
21
 
22
+ # Project directory (use env var if set, otherwise current directory)
23
+ PROJECT_DIR="${CLAUDE_PROJECT_DIR:-.}"
24
+
22
25
  # State directory
23
- STATE_DIR=".claude/.autoworkflow"
26
+ STATE_DIR="$PROJECT_DIR/.claude/.autoworkflow"
24
27
 
25
28
  # State files
26
29
  PHASE_FILE="$STATE_DIR/phase"
@@ -7,8 +7,11 @@
7
7
 
8
8
  TOOL_INPUT="$1"
9
9
 
10
+ # Project directory (use env var if set, otherwise current directory)
11
+ PROJECT_DIR="${CLAUDE_PROJECT_DIR:-.}"
12
+
10
13
  # State directory
11
- STATE_DIR=".claude/.autoworkflow"
14
+ STATE_DIR="$PROJECT_DIR/.claude/.autoworkflow"
12
15
  mkdir -p "$STATE_DIR"
13
16
 
14
17
  # Check if this is a git commit command
@@ -29,7 +32,7 @@ is_destructive() {
29
32
  # Route based on command type
30
33
  if is_git_commit; then
31
34
  # Run full pre-commit gate checks
32
- exec ./.claude/hooks/pre-commit-check.sh
35
+ exec "$PROJECT_DIR/.claude/hooks/pre-commit-check.sh"
33
36
 
34
37
  elif is_git_push; then
35
38
  # Check if we're pushing to main/master without approval
@@ -18,8 +18,11 @@ BOLD='\033[1m'
18
18
  DIM='\033[2m'
19
19
  NC='\033[0m'
20
20
 
21
+ # Project directory (use env var if set, otherwise current directory)
22
+ PROJECT_DIR="${CLAUDE_PROJECT_DIR:-.}"
23
+
21
24
  # State directory
22
- STATE_DIR=".claude/.autoworkflow"
25
+ STATE_DIR="$PROJECT_DIR/.claude/.autoworkflow"
23
26
  mkdir -p "$STATE_DIR"
24
27
 
25
28
  # State files
@@ -11,7 +11,7 @@
11
11
  "hooks": [
12
12
  {
13
13
  "type": "command",
14
- "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/session-check.sh",
14
+ "command": "\"${CLAUDE_PROJECT_DIR:-.}\"/.claude/hooks/session-check.sh",
15
15
  "timeout": 10,
16
16
  "statusMessage": "Checking project state..."
17
17
  }
@@ -24,7 +24,7 @@
24
24
  "hooks": [
25
25
  {
26
26
  "type": "command",
27
- "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/pre-edit.sh",
27
+ "command": "\"${CLAUDE_PROJECT_DIR:-.}\"/.claude/hooks/pre-edit.sh",
28
28
  "timeout": 5,
29
29
  "statusMessage": "Checking plan approval..."
30
30
  }
@@ -35,7 +35,7 @@
35
35
  "hooks": [
36
36
  {
37
37
  "type": "command",
38
- "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/pre-tool-router.sh \"$TOOL_INPUT\"",
38
+ "command": "\"${CLAUDE_PROJECT_DIR:-.}\"/.claude/hooks/pre-tool-router.sh \"$TOOL_INPUT\"",
39
39
  "timeout": 300,
40
40
  "statusMessage": "Checking workflow gates..."
41
41
  }
@@ -48,7 +48,7 @@
48
48
  "hooks": [
49
49
  {
50
50
  "type": "command",
51
- "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/post-edit.sh",
51
+ "command": "\"${CLAUDE_PROJECT_DIR:-.}\"/.claude/hooks/post-edit.sh",
52
52
  "timeout": 120,
53
53
  "statusMessage": "Running verification..."
54
54
  }
@@ -59,7 +59,7 @@
59
59
  "hooks": [
60
60
  {
61
61
  "type": "command",
62
- "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/post-bash-router.sh \"$TOOL_INPUT\"",
62
+ "command": "\"${CLAUDE_PROJECT_DIR:-.}\"/.claude/hooks/post-bash-router.sh \"$TOOL_INPUT\"",
63
63
  "timeout": 30,
64
64
  "statusMessage": "Checking post-command actions..."
65
65
  }
@@ -16,7 +16,10 @@
16
16
  "Bash(node:*)",
17
17
  "Bash(echo:*)",
18
18
  "Bash(ls:*)",
19
- "Bash(npm view:*)"
19
+ "Bash(npm view:*)",
20
+ "Bash(env)",
21
+ "Bash(npx autoworkflow update)",
22
+ "Bash(grep:*)"
20
23
  ]
21
24
  }
22
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autoworkflow",
3
- "version": "3.8.1",
3
+ "version": "3.8.3",
4
4
  "description": "Automated workflow enforcement for Claude Code via hooks and system prompts",
5
5
  "type": "module",
6
6
  "bin": {