moveros 4.0.8 → 4.1.0
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/install.js +4 -2
- package/package.json +1 -1
- package/src/hooks/context-staleness.sh +46 -46
- package/src/hooks/dirty-tree-guard.sh +33 -33
- package/src/hooks/engine-protection.sh +43 -43
- package/src/hooks/git-safety.sh +47 -47
- package/src/hooks/pre-compact-backup.sh +177 -177
- package/src/hooks/session-log-reminder.sh +135 -73
- package/src/skills/systematic-debugging/CREATION-LOG.md +119 -119
- package/src/skills/systematic-debugging/SKILL.md +296 -296
- package/src/skills/systematic-debugging/condition-based-waiting-example.ts +158 -158
- package/src/skills/systematic-debugging/condition-based-waiting.md +115 -115
- package/src/skills/systematic-debugging/defense-in-depth.md +122 -122
- package/src/skills/systematic-debugging/find-polluter.sh +63 -63
- package/src/skills/systematic-debugging/root-cause-tracing.md +169 -169
- package/src/skills/systematic-debugging/test-academic.md +14 -14
- package/src/skills/systematic-debugging/test-pressure-1.md +58 -58
- package/src/skills/systematic-debugging/test-pressure-2.md +68 -68
- package/src/skills/systematic-debugging/test-pressure-3.md +69 -69
- package/src/structure/01_Projects/_Template Project/plan.md +55 -55
- package/src/structure/01_Projects/_Template Project/project_brief.md +45 -45
- package/src/structure/02_Areas/Engine/Active_Context.md +146 -146
- package/src/structure/02_Areas/Engine/Auto_Learnings.md +36 -36
- package/src/structure/02_Areas/Engine/Daily_Template.md +133 -133
- package/src/structure/02_Areas/Engine/Identity_Prime_template.md +86 -86
- package/src/structure/02_Areas/Engine/Mover_Dossier.md +120 -120
- package/src/structure/02_Areas/Engine/Strategy_template.md +65 -65
- package/src/structure/03_Library/SOPs/Tech_Stack.md +55 -55
- package/src/structure/03_Library/SOPs/Zone_Operating.md +57 -57
- package/src/system/V4_CONTEXT.md +262 -262
- package/src/theme/minimal-theme.css +271 -271
- package/src/workflows/analyse-day.md +401 -401
- package/src/workflows/debug-resistance.md +180 -180
- package/src/workflows/harvest.md +239 -239
- package/src/workflows/ignite.md +720 -720
- package/src/workflows/init-plan.md +16 -16
- package/src/workflows/morning.md +222 -222
- package/src/workflows/overview.md +203 -203
- package/src/workflows/pivot-strategy.md +218 -218
- package/src/workflows/plan-tomorrow.md +308 -308
- package/src/workflows/primer.md +207 -207
- package/src/workflows/reboot.md +201 -201
- package/src/workflows/refactor-plan.md +135 -135
- package/src/workflows/review-week.md +558 -558
- package/src/workflows/setup.md +388 -388
- package/src/workflows/update.md +10 -13
- package/src/workflows/walkthrough.md +523 -523
package/install.js
CHANGED
|
@@ -1892,8 +1892,10 @@ async function main() {
|
|
|
1892
1892
|
}
|
|
1893
1893
|
}
|
|
1894
1894
|
|
|
1895
|
-
// 8. Version stamp
|
|
1896
|
-
|
|
1895
|
+
// 8. Version stamp (fresh install only — update mode lets /update workflow stamp after migrations)
|
|
1896
|
+
if (!updateMode) {
|
|
1897
|
+
fs.writeFileSync(path.join(vaultPath, ".mover-version"), `V${VERSION}\n`, "utf8");
|
|
1898
|
+
}
|
|
1897
1899
|
|
|
1898
1900
|
barLn();
|
|
1899
1901
|
|
package/package.json
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# context-staleness.sh
|
|
3
|
-
# Mover OS V4 - Stop Hook
|
|
4
|
-
# Warns when Active_Context.md hasn't been updated in 3+ days.
|
|
5
|
-
# Fires once per session via marker file.
|
|
6
|
-
|
|
7
|
-
INPUT=$(cat)
|
|
8
|
-
SESSION_ID=$(echo "$INPUT" | grep -o '"session_id"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*: *"//;s/"//')
|
|
9
|
-
|
|
10
|
-
# One warning per session
|
|
11
|
-
MARKER_FILE="/tmp/mover_context_stale_${SESSION_ID}"
|
|
12
|
-
if [ -f "$MARKER_FILE" ]; then
|
|
13
|
-
exit 0
|
|
14
|
-
fi
|
|
15
|
-
|
|
16
|
-
if [ -z "$CLAUDE_PROJECT_DIR" ]; then
|
|
17
|
-
exit 0
|
|
18
|
-
fi
|
|
19
|
-
|
|
20
|
-
# Find vault root via git, then locate Engine
|
|
21
|
-
VAULT_ROOT=$(git -C "$CLAUDE_PROJECT_DIR" rev-parse --show-toplevel 2>/dev/null)
|
|
22
|
-
if [ -z "$VAULT_ROOT" ]; then
|
|
23
|
-
exit 0
|
|
24
|
-
fi
|
|
25
|
-
ACTIVE_CONTEXT="$VAULT_ROOT/02_Areas/Engine/Active_Context.md"
|
|
26
|
-
|
|
27
|
-
if [ ! -f "$ACTIVE_CONTEXT" ]; then
|
|
28
|
-
exit 0
|
|
29
|
-
fi
|
|
30
|
-
|
|
31
|
-
# Get last modified time in seconds since epoch
|
|
32
|
-
LAST_MODIFIED=$(stat -c %Y "$ACTIVE_CONTEXT" 2>/dev/null || stat -f %m "$ACTIVE_CONTEXT" 2>/dev/null)
|
|
33
|
-
NOW=$(date +%s)
|
|
34
|
-
|
|
35
|
-
if [ -z "$LAST_MODIFIED" ]; then
|
|
36
|
-
exit 0
|
|
37
|
-
fi
|
|
38
|
-
|
|
39
|
-
DAYS_OLD=$(( (NOW - LAST_MODIFIED) / 86400 ))
|
|
40
|
-
|
|
41
|
-
if [ "$DAYS_OLD" -ge 3 ]; then
|
|
42
|
-
touch "$MARKER_FILE"
|
|
43
|
-
echo "{\"decision\":\"block\",\"reason\":\"STALE CONTEXT: Active_Context.md hasn't been updated in $DAYS_OLD days. Before ending session, run /analyse-day Step 8 to refresh it — or it will drift from reality.\"}"
|
|
44
|
-
fi
|
|
45
|
-
|
|
46
|
-
exit 0
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# context-staleness.sh
|
|
3
|
+
# Mover OS V4 - Stop Hook
|
|
4
|
+
# Warns when Active_Context.md hasn't been updated in 3+ days.
|
|
5
|
+
# Fires once per session via marker file.
|
|
6
|
+
|
|
7
|
+
INPUT=$(cat)
|
|
8
|
+
SESSION_ID=$(echo "$INPUT" | grep -o '"session_id"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*: *"//;s/"//')
|
|
9
|
+
|
|
10
|
+
# One warning per session
|
|
11
|
+
MARKER_FILE="/tmp/mover_context_stale_${SESSION_ID}"
|
|
12
|
+
if [ -f "$MARKER_FILE" ]; then
|
|
13
|
+
exit 0
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
if [ -z "$CLAUDE_PROJECT_DIR" ]; then
|
|
17
|
+
exit 0
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
# Find vault root via git, then locate Engine
|
|
21
|
+
VAULT_ROOT=$(git -C "$CLAUDE_PROJECT_DIR" rev-parse --show-toplevel 2>/dev/null)
|
|
22
|
+
if [ -z "$VAULT_ROOT" ]; then
|
|
23
|
+
exit 0
|
|
24
|
+
fi
|
|
25
|
+
ACTIVE_CONTEXT="$VAULT_ROOT/02_Areas/Engine/Active_Context.md"
|
|
26
|
+
|
|
27
|
+
if [ ! -f "$ACTIVE_CONTEXT" ]; then
|
|
28
|
+
exit 0
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
# Get last modified time in seconds since epoch
|
|
32
|
+
LAST_MODIFIED=$(stat -c %Y "$ACTIVE_CONTEXT" 2>/dev/null || stat -f %m "$ACTIVE_CONTEXT" 2>/dev/null)
|
|
33
|
+
NOW=$(date +%s)
|
|
34
|
+
|
|
35
|
+
if [ -z "$LAST_MODIFIED" ]; then
|
|
36
|
+
exit 0
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
DAYS_OLD=$(( (NOW - LAST_MODIFIED) / 86400 ))
|
|
40
|
+
|
|
41
|
+
if [ "$DAYS_OLD" -ge 3 ]; then
|
|
42
|
+
touch "$MARKER_FILE"
|
|
43
|
+
echo "{\"decision\":\"block\",\"reason\":\"STALE CONTEXT: Active_Context.md hasn't been updated in $DAYS_OLD days. Before ending session, run /analyse-day Step 8 to refresh it — or it will drift from reality.\"}"
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
exit 0
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# dirty-tree-guard.sh
|
|
3
|
-
# Mover OS V4 - Stop Hook
|
|
4
|
-
# Warns when session ends with uncommitted changes in src/.
|
|
5
|
-
# Fires once per session via marker file.
|
|
6
|
-
|
|
7
|
-
INPUT=$(cat)
|
|
8
|
-
SESSION_ID=$(echo "$INPUT" | grep -o '"session_id"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*: *"//;s/"//')
|
|
9
|
-
|
|
10
|
-
# One warning per session
|
|
11
|
-
MARKER_FILE="/tmp/mover_dirty_warned_${SESSION_ID}"
|
|
12
|
-
if [ -f "$MARKER_FILE" ]; then
|
|
13
|
-
exit 0
|
|
14
|
-
fi
|
|
15
|
-
|
|
16
|
-
if [ -z "$CLAUDE_PROJECT_DIR" ]; then
|
|
17
|
-
exit 0
|
|
18
|
-
fi
|
|
19
|
-
|
|
20
|
-
# Only check src/ — ignore .claude/session-backups, dev/, etc.
|
|
21
|
-
DIRTY=$(git -C "$CLAUDE_PROJECT_DIR" status --porcelain -- src/ 2>/dev/null)
|
|
22
|
-
|
|
23
|
-
if [ -z "$DIRTY" ]; then
|
|
24
|
-
exit 0
|
|
25
|
-
fi
|
|
26
|
-
|
|
27
|
-
CHANGED=$(echo "$DIRTY" | grep -c .)
|
|
28
|
-
CHANGED=${CHANGED:-0}
|
|
29
|
-
|
|
30
|
-
touch "$MARKER_FILE"
|
|
31
|
-
|
|
32
|
-
echo "{\"decision\":\"block\",\"reason\":\"UNCOMMITTED CHANGES: $CHANGED file(s) in src/ are modified but not committed. Stage and commit before ending session: git add src/[specific-path] then git commit -m 'description'. Files:\n$(echo "$DIRTY" | head -10)\"}"
|
|
33
|
-
exit 0
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# dirty-tree-guard.sh
|
|
3
|
+
# Mover OS V4 - Stop Hook
|
|
4
|
+
# Warns when session ends with uncommitted changes in src/.
|
|
5
|
+
# Fires once per session via marker file.
|
|
6
|
+
|
|
7
|
+
INPUT=$(cat)
|
|
8
|
+
SESSION_ID=$(echo "$INPUT" | grep -o '"session_id"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*: *"//;s/"//')
|
|
9
|
+
|
|
10
|
+
# One warning per session
|
|
11
|
+
MARKER_FILE="/tmp/mover_dirty_warned_${SESSION_ID}"
|
|
12
|
+
if [ -f "$MARKER_FILE" ]; then
|
|
13
|
+
exit 0
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
if [ -z "$CLAUDE_PROJECT_DIR" ]; then
|
|
17
|
+
exit 0
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
# Only check src/ — ignore .claude/session-backups, dev/, etc.
|
|
21
|
+
DIRTY=$(git -C "$CLAUDE_PROJECT_DIR" status --porcelain -- src/ 2>/dev/null)
|
|
22
|
+
|
|
23
|
+
if [ -z "$DIRTY" ]; then
|
|
24
|
+
exit 0
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
CHANGED=$(echo "$DIRTY" | grep -c .)
|
|
28
|
+
CHANGED=${CHANGED:-0}
|
|
29
|
+
|
|
30
|
+
touch "$MARKER_FILE"
|
|
31
|
+
|
|
32
|
+
echo "{\"decision\":\"block\",\"reason\":\"UNCOMMITTED CHANGES: $CHANGED file(s) in src/ are modified but not committed. Stage and commit before ending session: git add src/[specific-path] then git commit -m 'description'. Files:\n$(echo "$DIRTY" | head -10)\"}"
|
|
33
|
+
exit 0
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# engine-protection.sh
|
|
3
|
-
# Mover OS V4 - PreToolUse Hook (Write|Edit)
|
|
4
|
-
# Safety net: warns when modifying core Engine files.
|
|
5
|
-
# Engine files are irreplaceable user data.
|
|
6
|
-
# No jq dependency - uses grep/sed for JSON parsing.
|
|
7
|
-
|
|
8
|
-
INPUT=$(cat)
|
|
9
|
-
|
|
10
|
-
# Extract file_path from tool input
|
|
11
|
-
FILE_PATH=$(echo "$INPUT" | grep -o '"file_path"[[:space:]]*:[[:space:]]*"[^"]*"' | head -1 | sed 's/.*: *"//;s/"//')
|
|
12
|
-
|
|
13
|
-
# If no file_path found, try path field
|
|
14
|
-
if [ -z "$FILE_PATH" ]; then
|
|
15
|
-
FILE_PATH=$(echo "$INPUT" | grep -o '"path"[[:space:]]*:[[:space:]]*"[^"]*"' | head -1 | sed 's/.*: *"//;s/"//')
|
|
16
|
-
fi
|
|
17
|
-
|
|
18
|
-
# Normalize path separators
|
|
19
|
-
FILE_PATH_NORMALIZED=$(echo "$FILE_PATH" | sed 's|\\\\|/|g' | sed 's|\\|/|g')
|
|
20
|
-
|
|
21
|
-
# Check if the target is an Engine file
|
|
22
|
-
if echo "$FILE_PATH_NORMALIZED" | grep -qi "02_Areas/Engine/"; then
|
|
23
|
-
# Allow: templates, dailies, weekly reviews, auto-managed files
|
|
24
|
-
if echo "$FILE_PATH_NORMALIZED" | grep -qi "Daily_Template\|_template\|Dailies/\|Weekly Reviews/\|Auto_Learnings\|Active_Context\|Metrics_Log"; then
|
|
25
|
-
exit 0
|
|
26
|
-
fi
|
|
27
|
-
|
|
28
|
-
# Core Engine files: Identity, Strategy, Dossier, Goals
|
|
29
|
-
# Require user confirmation
|
|
30
|
-
cat <<'HOOK_OUTPUT'
|
|
31
|
-
{
|
|
32
|
-
"hookSpecificOutput": {
|
|
33
|
-
"hookEventName": "PreToolUse",
|
|
34
|
-
"permissionDecision": "ask",
|
|
35
|
-
"permissionDecisionReason": "Modifying a core Engine file. Engine files are irreplaceable user data. Verify the workflow authorizes this write and version/date headers will be updated."
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
HOOK_OUTPUT
|
|
39
|
-
exit 0
|
|
40
|
-
fi
|
|
41
|
-
|
|
42
|
-
# Non-Engine files: allow
|
|
43
|
-
exit 0
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# engine-protection.sh
|
|
3
|
+
# Mover OS V4 - PreToolUse Hook (Write|Edit)
|
|
4
|
+
# Safety net: warns when modifying core Engine files.
|
|
5
|
+
# Engine files are irreplaceable user data.
|
|
6
|
+
# No jq dependency - uses grep/sed for JSON parsing.
|
|
7
|
+
|
|
8
|
+
INPUT=$(cat)
|
|
9
|
+
|
|
10
|
+
# Extract file_path from tool input
|
|
11
|
+
FILE_PATH=$(echo "$INPUT" | grep -o '"file_path"[[:space:]]*:[[:space:]]*"[^"]*"' | head -1 | sed 's/.*: *"//;s/"//')
|
|
12
|
+
|
|
13
|
+
# If no file_path found, try path field
|
|
14
|
+
if [ -z "$FILE_PATH" ]; then
|
|
15
|
+
FILE_PATH=$(echo "$INPUT" | grep -o '"path"[[:space:]]*:[[:space:]]*"[^"]*"' | head -1 | sed 's/.*: *"//;s/"//')
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
# Normalize path separators
|
|
19
|
+
FILE_PATH_NORMALIZED=$(echo "$FILE_PATH" | sed 's|\\\\|/|g' | sed 's|\\|/|g')
|
|
20
|
+
|
|
21
|
+
# Check if the target is an Engine file
|
|
22
|
+
if echo "$FILE_PATH_NORMALIZED" | grep -qi "02_Areas/Engine/"; then
|
|
23
|
+
# Allow: templates, dailies, weekly reviews, auto-managed files
|
|
24
|
+
if echo "$FILE_PATH_NORMALIZED" | grep -qi "Daily_Template\|_template\|Dailies/\|Weekly Reviews/\|Auto_Learnings\|Active_Context\|Metrics_Log"; then
|
|
25
|
+
exit 0
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
# Core Engine files: Identity, Strategy, Dossier, Goals
|
|
29
|
+
# Require user confirmation
|
|
30
|
+
cat <<'HOOK_OUTPUT'
|
|
31
|
+
{
|
|
32
|
+
"hookSpecificOutput": {
|
|
33
|
+
"hookEventName": "PreToolUse",
|
|
34
|
+
"permissionDecision": "ask",
|
|
35
|
+
"permissionDecisionReason": "Modifying a core Engine file. Engine files are irreplaceable user data. Verify the workflow authorizes this write and version/date headers will be updated."
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
HOOK_OUTPUT
|
|
39
|
+
exit 0
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
# Non-Engine files: allow
|
|
43
|
+
exit 0
|
package/src/hooks/git-safety.sh
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# git-safety.sh
|
|
3
|
-
# Mover OS V4 - PreToolUse Hook (Bash)
|
|
4
|
-
# Blocks banned git patterns:
|
|
5
|
-
# - git add . / git add -A / git add --all at repo root
|
|
6
|
-
# - git commit without -m flag (no message = editor opens, hangs Claude)
|
|
7
|
-
|
|
8
|
-
INPUT=$(cat)
|
|
9
|
-
|
|
10
|
-
# Extract command from Bash tool input
|
|
11
|
-
COMMAND=$(echo "$INPUT" | grep -o '"command"[[:space:]]*:[[:space:]]*"[^"]*"' | head -1 | sed 's/.*: *"//;s/"//')
|
|
12
|
-
|
|
13
|
-
if [ -z "$COMMAND" ]; then
|
|
14
|
-
exit 0
|
|
15
|
-
fi
|
|
16
|
-
|
|
17
|
-
# --- Rule 1: git add . / -A / --all ---
|
|
18
|
-
# Block broad adds at root. Allow if a specific subfolder is also named.
|
|
19
|
-
if echo "$COMMAND" | grep -qE 'git add \.$|git add \. |git add --all|git add -A( |$)'; then
|
|
20
|
-
cat << 'HOOK_OUTPUT'
|
|
21
|
-
{
|
|
22
|
-
"hookSpecificOutput": {
|
|
23
|
-
"hookEventName": "PreToolUse",
|
|
24
|
-
"permissionDecision": "deny",
|
|
25
|
-
"permissionDecisionReason": "BLOCKED: 'git add .' / 'git add -A' at repo root is banned (risks committing secrets, Dailies, or node_modules). Add specific paths instead:\n git add src/workflows/\n git add src/hooks/\n git add src/skills/[name]/\nSee .gitignore for excluded paths."
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
HOOK_OUTPUT
|
|
29
|
-
exit 0
|
|
30
|
-
fi
|
|
31
|
-
|
|
32
|
-
# --- Rule 2: git commit without -m ---
|
|
33
|
-
# Bare 'git commit' opens an editor and hangs the session.
|
|
34
|
-
if echo "$COMMAND" | grep -qE '^git commit$|git commit --amend$'; then
|
|
35
|
-
cat << 'HOOK_OUTPUT'
|
|
36
|
-
{
|
|
37
|
-
"hookSpecificOutput": {
|
|
38
|
-
"hookEventName": "PreToolUse",
|
|
39
|
-
"permissionDecision": "deny",
|
|
40
|
-
"permissionDecisionReason": "BLOCKED: 'git commit' without -m opens an interactive editor and hangs the session. Always use: git commit -m \"your message\""
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
HOOK_OUTPUT
|
|
44
|
-
exit 0
|
|
45
|
-
fi
|
|
46
|
-
|
|
47
|
-
exit 0
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# git-safety.sh
|
|
3
|
+
# Mover OS V4 - PreToolUse Hook (Bash)
|
|
4
|
+
# Blocks banned git patterns:
|
|
5
|
+
# - git add . / git add -A / git add --all at repo root
|
|
6
|
+
# - git commit without -m flag (no message = editor opens, hangs Claude)
|
|
7
|
+
|
|
8
|
+
INPUT=$(cat)
|
|
9
|
+
|
|
10
|
+
# Extract command from Bash tool input
|
|
11
|
+
COMMAND=$(echo "$INPUT" | grep -o '"command"[[:space:]]*:[[:space:]]*"[^"]*"' | head -1 | sed 's/.*: *"//;s/"//')
|
|
12
|
+
|
|
13
|
+
if [ -z "$COMMAND" ]; then
|
|
14
|
+
exit 0
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
# --- Rule 1: git add . / -A / --all ---
|
|
18
|
+
# Block broad adds at root. Allow if a specific subfolder is also named.
|
|
19
|
+
if echo "$COMMAND" | grep -qE 'git add \.$|git add \. |git add --all|git add -A( |$)'; then
|
|
20
|
+
cat << 'HOOK_OUTPUT'
|
|
21
|
+
{
|
|
22
|
+
"hookSpecificOutput": {
|
|
23
|
+
"hookEventName": "PreToolUse",
|
|
24
|
+
"permissionDecision": "deny",
|
|
25
|
+
"permissionDecisionReason": "BLOCKED: 'git add .' / 'git add -A' at repo root is banned (risks committing secrets, Dailies, or node_modules). Add specific paths instead:\n git add src/workflows/\n git add src/hooks/\n git add src/skills/[name]/\nSee .gitignore for excluded paths."
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
HOOK_OUTPUT
|
|
29
|
+
exit 0
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
# --- Rule 2: git commit without -m ---
|
|
33
|
+
# Bare 'git commit' opens an editor and hangs the session.
|
|
34
|
+
if echo "$COMMAND" | grep -qE '^git commit$|git commit --amend$'; then
|
|
35
|
+
cat << 'HOOK_OUTPUT'
|
|
36
|
+
{
|
|
37
|
+
"hookSpecificOutput": {
|
|
38
|
+
"hookEventName": "PreToolUse",
|
|
39
|
+
"permissionDecision": "deny",
|
|
40
|
+
"permissionDecisionReason": "BLOCKED: 'git commit' without -m opens an interactive editor and hangs the session. Always use: git commit -m \"your message\""
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
HOOK_OUTPUT
|
|
44
|
+
exit 0
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
exit 0
|