@angar2/taskery 0.8.1 → 1.0.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.
- package/README.md +437 -188
- package/bin/add.js +27 -99
- package/bin/backlog.js +240 -113
- package/bin/check.js +182 -0
- package/bin/commands.js +151 -0
- package/bin/finish.js +365 -0
- package/bin/init.js +99 -190
- package/bin/install.js +143 -0
- package/bin/lib.js +591 -1336
- package/bin/mcp.js +31 -263
- package/bin/orche.js +240 -0
- package/bin/plan.js +58 -120
- package/bin/prepare.js +329 -0
- package/bin/prune.js +46 -176
- package/bin/status.js +57 -151
- package/bin/taskery.js +76 -120
- package/bin/update.js +66 -269
- package/package.json +5 -5
- package/template/.taskery/BACKLOG.md +38 -0
- package/template/.taskery/rules/CHANGELOG_RULE.md +31 -0
- package/template/.taskery/rules/DEV_RULE.local.md +8 -0
- package/template/.taskery/rules/GIT_RULE.md +82 -0
- package/template/.taskery/rules/MOCKUP_RULE.md +19 -0
- package/template/.taskery/rules/TASKERY_RULE.md +112 -0
- package/template/.taskery/rules/TASK_DOC_RULE.md +104 -0
- package/template/.taskery/rules/TEST_RULE.local.md +16 -0
- package/template/AGENTS.md +15 -53
- package/template/shared/skills/add-backlog/SKILL.md +8 -38
- package/template/shared/skills/log-friction/SKILL.md +10 -88
- package/template/shared/skills/plan-init/SKILL.md +10 -98
- package/template/shared/skills/project-init/SKILL.md +13 -342
- package/template/shared/skills/task-close/SKILL.md +16 -319
- package/template/shared/skills/task-dev/SKILL.md +19 -233
- package/template/shared/skills/task-init/SKILL.md +11 -68
- package/template/shared/skills/task-orche/SKILL.md +35 -0
- package/template/shared/skills/task-plan/SKILL.md +19 -498
- package/template/shared/skills/task-test/SKILL.md +23 -342
- package/bin/close.js +0 -86
- package/bin/fork.js +0 -112
- package/bin/legacy-quotes.js +0 -60
- package/bin/migrate.js +0 -481
- package/bin/set-status.js +0 -98
- package/template/.claude/hooks/closed-immutable.sh +0 -77
- package/template/.claude/settings.json +0 -18
- package/template/.claude/skills/run-team/SKILL.md +0 -145
- package/template/.codex/agents/task-tester.toml +0 -41
- package/template/.codex/agents/test-plan-author.toml +0 -34
- package/template/.codex/config.toml +0 -17
- package/template/.codex/hooks/closed-immutable.sh +0 -66
- package/template/.project/changelog/.gitkeep +0 -0
- package/template/.project/flows/.gitkeep +0 -0
- package/template/.project/plans/.gitkeep +0 -0
- package/template/.project/rules/CHANGELOG_RULE.md +0 -97
- package/template/.project/rules/GIT_RULE.md +0 -325
- package/template/.project/rules/MOCKUP_RULE.md +0 -86
- package/template/.project/rules/TASKERY_RULE.md +0 -237
- package/template/.project/rules/TASK_DOC_RULE.md +0 -668
- package/template/.project/shared/received/completed/.gitkeep +0 -0
- package/template/.project/shared/sent/completed/.gitkeep +0 -0
- package/template/.project/tasks/.gitkeep +0 -0
- package/template/shared/hooks/git-guard.sh +0 -108
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# .claude/hooks/git-guard.sh
|
|
3
|
-
# PreToolUse(Bash) 훅 — catastrophic git 명령 차단
|
|
4
|
-
#
|
|
5
|
-
# 잡는 것:
|
|
6
|
-
# 1. main / dev 브랜치 직접 커밋 (5종 변형 인식: -C / --git-dir / --work-tree)
|
|
7
|
-
# 2. git push --force / -f
|
|
8
|
-
# 3. git commit --no-verify
|
|
9
|
-
# 4. git branch -D (강제 삭제)
|
|
10
|
-
# 5. git reset --hard
|
|
11
|
-
# 6. git clean -fd
|
|
12
|
-
#
|
|
13
|
-
# 정상 흐름에서는 작동 0회 (무해). 사용자 명시 승인 케이스는 hook 비활성화 또는 직접 우회 필요.
|
|
14
|
-
#
|
|
15
|
-
# Single source of truth: .project/rules/GIT_RULE.md (없으면 ~/.claude/rules/GIT_RULE.md)
|
|
16
|
-
|
|
17
|
-
INPUT=$(cat)
|
|
18
|
-
|
|
19
|
-
# tool_input.command 추출
|
|
20
|
-
CMD=$(echo "$INPUT" | python3 -c "
|
|
21
|
-
import sys, json
|
|
22
|
-
try:
|
|
23
|
-
d = json.load(sys.stdin)
|
|
24
|
-
print(d.get('tool_input', {}).get('command', ''))
|
|
25
|
-
except Exception:
|
|
26
|
-
print('')
|
|
27
|
-
" 2>/dev/null)
|
|
28
|
-
|
|
29
|
-
# git 명령 아니면 통과
|
|
30
|
-
if ! echo "$CMD" | grep -qE '(^|;|&&|\|\|)\s*git\s'; then
|
|
31
|
-
exit 0
|
|
32
|
-
fi
|
|
33
|
-
|
|
34
|
-
# 헬퍼: git 명령에서 대상 워크트리 경로 추출 (5종 변형)
|
|
35
|
-
# 1. git -C <경로>
|
|
36
|
-
# 2. git --git-dir=<경로> (= 형태)
|
|
37
|
-
# 3. git --git-dir <경로> (공백 분리)
|
|
38
|
-
# 4. git --work-tree=<경로> (= 형태)
|
|
39
|
-
# 5. git --work-tree <경로> (공백 분리)
|
|
40
|
-
# 추출 실패 시 빈 문자열 (cwd 사용).
|
|
41
|
-
# --git-dir 변형은 `.git` 디렉토리를 가리키므로 dirname 처리해 워크트리 경로로 변환.
|
|
42
|
-
extract_target_path() {
|
|
43
|
-
local cmd="$1"
|
|
44
|
-
local path=""
|
|
45
|
-
|
|
46
|
-
if [[ "$cmd" =~ git[[:space:]]+-C[[:space:]]+([^[:space:]]+) ]]; then
|
|
47
|
-
path="${BASH_REMATCH[1]}"
|
|
48
|
-
elif [[ "$cmd" =~ --git-dir=([^[:space:]]+) ]]; then
|
|
49
|
-
path=$(dirname "${BASH_REMATCH[1]}")
|
|
50
|
-
elif [[ "$cmd" =~ --git-dir[[:space:]]+([^[:space:]]+) ]]; then
|
|
51
|
-
path=$(dirname "${BASH_REMATCH[1]}")
|
|
52
|
-
elif [[ "$cmd" =~ --work-tree=([^[:space:]]+) ]]; then
|
|
53
|
-
path="${BASH_REMATCH[1]}"
|
|
54
|
-
elif [[ "$cmd" =~ --work-tree[[:space:]]+([^[:space:]]+) ]]; then
|
|
55
|
-
path="${BASH_REMATCH[1]}"
|
|
56
|
-
fi
|
|
57
|
-
|
|
58
|
-
echo "$path"
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
# 1. main / dev 직접 커밋 차단 (5종 변형 인식)
|
|
62
|
-
# 현재 브랜치 확인 + git commit 명령 감지 시 차단
|
|
63
|
-
if echo "$CMD" | grep -qE '(^|;|&&|\|\|)\s*git(\s+(-C\s+\S+|--git-dir[= ]\S+|--work-tree[= ]\S+))*\s+commit\b'; then
|
|
64
|
-
TARGET_PATH=$(extract_target_path "$CMD")
|
|
65
|
-
if [ -n "$TARGET_PATH" ]; then
|
|
66
|
-
CURRENT_BRANCH=$(git -C "$TARGET_PATH" branch --show-current 2>/dev/null)
|
|
67
|
-
else
|
|
68
|
-
CURRENT_BRANCH=$(git branch --show-current 2>/dev/null)
|
|
69
|
-
fi
|
|
70
|
-
if [ "$CURRENT_BRANCH" = "main" ] || [ "$CURRENT_BRANCH" = "dev" ]; then
|
|
71
|
-
echo "git-guard: '$CURRENT_BRANCH' 브랜치 직접 커밋 차단. 작업 브랜치({타입}/{개발자}_TASK-NNN_slug)에서 커밋. (.project/rules/GIT_RULE.md §기본 원칙)" >&2
|
|
72
|
-
echo " 변형 인식: 'git -C <경로> ...' / 'git --git-dir=<경로> ...' / 'git --work-tree=<경로> ...' — 메인 cwd에서 워크트리 대상 커밋 가능." >&2
|
|
73
|
-
echo " 셸 prefix('cd <경로> && git ...' / '(cd ... && git ...)')는 hook이 정확히 인식 X — 'git -C <경로> ...' 형태로만 발행." >&2
|
|
74
|
-
exit 2
|
|
75
|
-
fi
|
|
76
|
-
fi
|
|
77
|
-
|
|
78
|
-
# 2. git commit --no-verify 차단
|
|
79
|
-
if echo "$CMD" | grep -qE 'git\s+commit\b.*--no-verify'; then
|
|
80
|
-
echo "git-guard: 'git commit --no-verify' 차단. commit hook 우회 금지. (.project/rules/GIT_RULE.md §금지 사항)" >&2
|
|
81
|
-
exit 2
|
|
82
|
-
fi
|
|
83
|
-
|
|
84
|
-
# 3. git push --force / -f 차단
|
|
85
|
-
if echo "$CMD" | grep -qE 'git\s+push\b.*(\s--force(\s|$|=)|\s-f(\s|$))'; then
|
|
86
|
-
echo "git-guard: 'git push --force' 차단. 정상 흐름 사유 없음. 사용자 명시 승인 필요. (.project/rules/GIT_RULE.md §destructive 명령)" >&2
|
|
87
|
-
exit 2
|
|
88
|
-
fi
|
|
89
|
-
|
|
90
|
-
# 4. git branch -D 차단 (강제 삭제)
|
|
91
|
-
if echo "$CMD" | grep -qE 'git\s+branch\b.*\s-D(\s|$)'; then
|
|
92
|
-
echo "git-guard: 'git branch -D' 차단. 머지 안 된 브랜치 강제 삭제 사유 없음. 사용자 명시 승인 필요. (.project/rules/GIT_RULE.md §destructive 명령)" >&2
|
|
93
|
-
exit 2
|
|
94
|
-
fi
|
|
95
|
-
|
|
96
|
-
# 5. git reset --hard 차단
|
|
97
|
-
if echo "$CMD" | grep -qE 'git\s+reset\b.*--hard'; then
|
|
98
|
-
echo "git-guard: 'git reset --hard' 차단. 작업 손실 위험. 사용자 명시 승인 필요. (.project/rules/GIT_RULE.md §destructive 명령)" >&2
|
|
99
|
-
exit 2
|
|
100
|
-
fi
|
|
101
|
-
|
|
102
|
-
# 6. git clean -fd 차단
|
|
103
|
-
if echo "$CMD" | grep -qE 'git\s+clean\b.*\s-[a-zA-Z]*f[a-zA-Z]*d'; then
|
|
104
|
-
echo "git-guard: 'git clean -fd' 차단. untracked 파일 + 디렉토리 강제 삭제 사유 없음. 사용자 명시 승인 필요. (.project/rules/GIT_RULE.md §destructive 명령)" >&2
|
|
105
|
-
exit 2
|
|
106
|
-
fi
|
|
107
|
-
|
|
108
|
-
exit 0
|