@kood/claude-code 0.6.5 → 0.6.7
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/dist/index.js +255 -149
- package/package.json +1 -1
- package/templates/.claude/agents/researcher.md +8 -1
- package/templates/.claude/instructions/sourcing/reliable-search.md +49 -2
- package/templates/.claude/scripts/deploy/build-run.sh +36 -0
- package/templates/.claude/scripts/deploy/deploy-check.sh +38 -0
- package/templates/.claude/scripts/git/git-all.sh +57 -0
- package/templates/.claude/scripts/git/git-clean-check.sh +31 -0
- package/templates/.claude/scripts/git/git-commit.sh +51 -0
- package/templates/.claude/scripts/git/git-info.sh +34 -0
- package/templates/.claude/scripts/git/git-push.sh +50 -0
- package/templates/.claude/scripts/lint/lint-check.sh +56 -0
- package/templates/.claude/scripts/lint/lint-file.sh +41 -0
- package/templates/.claude/scripts/pm/pm-detect.sh +25 -0
- package/templates/.claude/scripts/pm/pm-run.sh +41 -0
- package/templates/.claude/scripts/version/version-bump.sh +54 -0
- package/templates/.claude/scripts/version/version-find.sh +49 -0
- package/templates/.claude/skills/docs-fetch/SKILL.md +5 -4
- package/templates/.claude/skills/project-optimizer/AGENTS.md +275 -0
- package/templates/.claude/skills/project-optimizer/SKILL.md +374 -0
- package/templates/.claude/skills/project-optimizer/rules/arch-config-centralize.md +66 -0
- package/templates/.claude/skills/project-optimizer/rules/arch-hot-path.md +35 -0
- package/templates/.claude/skills/project-optimizer/rules/arch-interface-segregation.md +51 -0
- package/templates/.claude/skills/project-optimizer/rules/arch-module-boundary.md +42 -0
- package/templates/.claude/skills/project-optimizer/rules/build-cache.md +57 -0
- package/templates/.claude/skills/project-optimizer/rules/build-code-split.md +56 -0
- package/templates/.claude/skills/project-optimizer/rules/build-incremental.md +65 -0
- package/templates/.claude/skills/project-optimizer/rules/build-minify.md +61 -0
- package/templates/.claude/skills/project-optimizer/rules/build-tree-shake.md +60 -0
- package/templates/.claude/skills/project-optimizer/rules/code-complexity.md +65 -0
- package/templates/.claude/skills/project-optimizer/rules/code-dead-elimination.md +32 -0
- package/templates/.claude/skills/project-optimizer/rules/code-duplication.md +54 -0
- package/templates/.claude/skills/project-optimizer/rules/code-error-handling.md +75 -0
- package/templates/.claude/skills/project-optimizer/rules/code-naming.md +52 -0
- package/templates/.claude/skills/project-optimizer/rules/concurrency-defer-await.md +54 -0
- package/templates/.claude/skills/project-optimizer/rules/concurrency-parallel.md +90 -0
- package/templates/.claude/skills/project-optimizer/rules/concurrency-pipeline.md +68 -0
- package/templates/.claude/skills/project-optimizer/rules/concurrency-pool.md +68 -0
- package/templates/.claude/skills/project-optimizer/rules/deps-lightweight-alt.md +37 -0
- package/templates/.claude/skills/project-optimizer/rules/deps-peer-align.md +44 -0
- package/templates/.claude/skills/project-optimizer/rules/deps-security-audit.md +45 -0
- package/templates/.claude/skills/project-optimizer/rules/deps-unused-removal.md +25 -0
- package/templates/.claude/skills/project-optimizer/rules/deps-version-pin.md +40 -0
- package/templates/.claude/skills/project-optimizer/rules/dx-ci-speed.md +47 -0
- package/templates/.claude/skills/project-optimizer/rules/dx-dev-server.md +35 -0
- package/templates/.claude/skills/project-optimizer/rules/dx-lint-config.md +36 -0
- package/templates/.claude/skills/project-optimizer/rules/dx-test-coverage.md +34 -0
- package/templates/.claude/skills/project-optimizer/rules/dx-type-safety.md +49 -0
- package/templates/.claude/skills/project-optimizer/rules/io-batch-queries.md +67 -0
- package/templates/.claude/skills/project-optimizer/rules/io-cache-layer.md +67 -0
- package/templates/.claude/skills/project-optimizer/rules/io-connection-reuse.md +67 -0
- package/templates/.claude/skills/project-optimizer/rules/io-serialize-minimal.md +61 -0
- package/templates/.claude/skills/project-optimizer/rules/io-stream.md +75 -0
- package/templates/.claude/skills/project-optimizer/rules/memory-bounded-cache.md +65 -0
- package/templates/.claude/skills/project-optimizer/rules/memory-large-data.md +64 -0
- package/templates/.claude/skills/project-optimizer/rules/memory-lazy-init.md +78 -0
- package/templates/.claude/skills/project-optimizer/rules/memory-leak-prevention.md +79 -0
- package/templates/.claude/skills/project-optimizer/rules/memory-pool-reuse.md +70 -0
- package/templates/.claude/skills/sql-optimizer/SKILL.md +437 -0
- package/templates/.claude/skills/sql-optimizer/orm-patterns.md +218 -0
- package/templates/.claude/skills/tanstack-start-react-best-practices/AGENTS.md +53 -14
- package/templates/.claude/skills/tanstack-start-react-best-practices/SKILL.md +93 -27
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/bundle-defer-third-party.md +42 -19
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/client-optimistic-updates.md +109 -0
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/client-suspense-query.md +74 -0
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/client-use-hook.md +81 -0
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rerender-react-compiler.md +81 -0
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/routing-beforeload-auth.md +121 -0
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/routing-file-conventions.md +104 -0
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/routing-link-navigation.md +119 -0
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/routing-nested-layouts.md +155 -0
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/routing-path-params.md +89 -0
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/routing-pending-component.md +110 -0
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/routing-preload-strategy.md +91 -0
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/routing-router-context.md +120 -0
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/routing-search-params.md +114 -0
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/server-deferred-data.md +1 -1
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/server-error-boundaries.md +79 -0
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/server-middleware.md +85 -0
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/server-serialization.md +56 -21
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/server-streaming.md +84 -0
- package/templates/.claude/skills/tanstack-start-react-best-practices/rules/server-validator.md +71 -0
- package/templates/.claude/skills/tauri-react-best-practices/AGENTS.md +527 -0
- package/templates/.claude/skills/tauri-react-best-practices/SKILL.md +570 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/bundle-barrel-imports.md +140 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/bundle-cargo-profile.md +96 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/bundle-frontend-treeshake.md +242 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/bundle-lazy-components.md +255 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/bundle-remove-unused-commands.md +160 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/deploy-ci-pipeline.md +269 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/deploy-signing.md +207 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/deploy-updater.md +226 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/ipc-async-commands.md +172 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/ipc-batch-commands.md +133 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/ipc-binary-response.md +198 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/ipc-channel-streaming.md +186 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/ipc-error-handling.md +250 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/ipc-type-safe.md +227 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/perf-derived-state.md +231 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/perf-functional-setstate.md +191 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/perf-index-maps.md +276 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/perf-lazy-state-init.md +196 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/plugin-lifecycle.md +265 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/plugin-mobile-compat.md +199 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/plugin-permission-scope.md +193 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/react-error-boundary.md +239 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/react-event-listener.md +151 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/react-file-src.md +155 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/react-invoke-hook.md +139 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/react-optimistic-update.md +211 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/security-capability-split.md +205 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/security-csp.md +207 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/security-least-privilege.md +106 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/security-no-wildcard.md +253 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/security-scope-paths.md +160 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/state-async-mutex.md +270 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/state-mutex-pattern.md +265 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/state-react-sync.md +375 -0
- package/templates/.claude/skills/tauri-react-best-practices/rules/state-single-container.md +275 -0
- package/templates/tanstack-start/docs/architecture.md +238 -167
- package/templates/tanstack-start/docs/library/tanstack-router/error-handling.md +777 -38
- package/templates/tanstack-start/docs/library/tanstack-router/hooks.md +549 -37
- package/templates/tanstack-start/docs/library/tanstack-router/index.md +895 -111
- package/templates/tanstack-start/docs/library/tanstack-router/navigation.md +641 -43
- package/templates/tanstack-start/docs/library/tanstack-router/route-context.md +889 -38
- package/templates/tanstack-start/docs/library/tanstack-router/search-params.md +891 -29
- package/templates/tanstack-start/docs/library/tanstack-start/auth-patterns.md +972 -36
- package/templates/tanstack-start/docs/library/tanstack-start/index.md +1525 -881
- package/templates/tanstack-start/docs/library/tanstack-start/middleware.md +1099 -20
- package/templates/tanstack-start/docs/library/tanstack-start/routing.md +796 -30
- package/templates/tanstack-start/docs/library/tanstack-start/server-functions.md +953 -35
- package/templates/tanstack-start/docs/library/tanstack-start/setup.md +371 -15
- package/templates/tauri/CLAUDE.md +189 -0
- package/templates/tauri/docs/guides/distribution.md +261 -0
- package/templates/tauri/docs/guides/getting-started.md +302 -0
- package/templates/tauri/docs/guides/mobile.md +288 -0
- package/templates/tauri/docs/library/tauri/index.md +510 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# build-run.sh - Package manager 감지 후 build 실행
|
|
3
|
+
# Usage: ./build-run.sh
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
8
|
+
PM_DIR="$SCRIPT_DIR/../pm"
|
|
9
|
+
|
|
10
|
+
# Package manager 감지
|
|
11
|
+
PM=$("$PM_DIR/pm-detect.sh")
|
|
12
|
+
|
|
13
|
+
echo "=== Building with $PM ==="
|
|
14
|
+
|
|
15
|
+
# Build 실행
|
|
16
|
+
case "$PM" in
|
|
17
|
+
bun)
|
|
18
|
+
bun run build
|
|
19
|
+
;;
|
|
20
|
+
pnpm)
|
|
21
|
+
pnpm run build
|
|
22
|
+
;;
|
|
23
|
+
yarn)
|
|
24
|
+
yarn build
|
|
25
|
+
;;
|
|
26
|
+
npm)
|
|
27
|
+
npm run build
|
|
28
|
+
;;
|
|
29
|
+
*)
|
|
30
|
+
echo "Error: Unknown package manager: $PM" >&2
|
|
31
|
+
exit 1
|
|
32
|
+
;;
|
|
33
|
+
esac
|
|
34
|
+
|
|
35
|
+
echo ""
|
|
36
|
+
echo "✓ Build completed successfully"
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# deploy-check.sh - 배포 전 전체 검증 (tsc + eslint + build)
|
|
3
|
+
# Usage: ./deploy-check.sh
|
|
4
|
+
# 검사 실패 시 조기 종료
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
|
|
8
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
9
|
+
LINT_DIR="$SCRIPT_DIR/../lint"
|
|
10
|
+
|
|
11
|
+
echo "=========================================="
|
|
12
|
+
echo " Pre-Deploy Verification"
|
|
13
|
+
echo "=========================================="
|
|
14
|
+
|
|
15
|
+
# 스크립트 존재 검증
|
|
16
|
+
if [ ! -x "$LINT_DIR/lint-check.sh" ]; then
|
|
17
|
+
echo "Error: lint-check.sh not found or not executable" >&2
|
|
18
|
+
exit 1
|
|
19
|
+
fi
|
|
20
|
+
if [ ! -x "$SCRIPT_DIR/build-run.sh" ]; then
|
|
21
|
+
echo "Error: build-run.sh not found or not executable" >&2
|
|
22
|
+
exit 1
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
# Step 1: Lint 검사 (tsc + eslint 병렬)
|
|
26
|
+
echo ""
|
|
27
|
+
echo "[1/2] Running lint checks..."
|
|
28
|
+
"$LINT_DIR/lint-check.sh"
|
|
29
|
+
|
|
30
|
+
# Step 2: Build
|
|
31
|
+
echo ""
|
|
32
|
+
echo "[2/2] Running build..."
|
|
33
|
+
"$SCRIPT_DIR/build-run.sh"
|
|
34
|
+
|
|
35
|
+
echo ""
|
|
36
|
+
echo "=========================================="
|
|
37
|
+
echo " ✓ All checks passed - Ready to deploy"
|
|
38
|
+
echo "=========================================="
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# git-all.sh - 모든 변경사항 add + commit + push (단순 케이스)
|
|
3
|
+
# Usage: ./git-all.sh "커밋 메시지"
|
|
4
|
+
# WARNING: git add -A 사용 - 민감 파일(.env 등) 포함 주의
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
|
|
8
|
+
# Git 저장소 확인
|
|
9
|
+
if ! git rev-parse --git-dir > /dev/null 2>&1; then
|
|
10
|
+
echo "Error: Not a git repository"
|
|
11
|
+
exit 1
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
if [ -z "$1" ]; then
|
|
15
|
+
echo "Usage: $0 \"commit message\""
|
|
16
|
+
exit 1
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
COMMIT_MSG="$1"
|
|
20
|
+
|
|
21
|
+
# 빈 메시지 체크
|
|
22
|
+
if [ -z "$(echo "$COMMIT_MSG" | xargs)" ]; then
|
|
23
|
+
echo "Error: Commit message cannot be empty" >&2
|
|
24
|
+
exit 1
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
# 변경사항 확인
|
|
28
|
+
if [ -n "$(git status --porcelain)" ]; then
|
|
29
|
+
# 민감 파일 검증
|
|
30
|
+
SENSITIVE=$(git status --porcelain | grep -E '^\?\?.*\.(env|pem|key|secret|credentials)' || true)
|
|
31
|
+
if [ -n "$SENSITIVE" ]; then
|
|
32
|
+
echo "ERROR: Sensitive files detected:" >&2
|
|
33
|
+
echo "$SENSITIVE" >&2
|
|
34
|
+
echo "" >&2
|
|
35
|
+
echo "Please use git-commit.sh with specific files instead" >&2
|
|
36
|
+
exit 1
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
echo "=== Adding all changes ==="
|
|
40
|
+
git add -A
|
|
41
|
+
|
|
42
|
+
echo "=== Committing ==="
|
|
43
|
+
git commit -m "$COMMIT_MSG"
|
|
44
|
+
|
|
45
|
+
echo "=== Pushing ==="
|
|
46
|
+
BRANCH=$(git branch --show-current)
|
|
47
|
+
if ! git rev-parse --abbrev-ref "@{upstream}" >/dev/null 2>&1; then
|
|
48
|
+
git push -u origin "$BRANCH"
|
|
49
|
+
else
|
|
50
|
+
git push
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
echo "Done: All changes committed and pushed"
|
|
54
|
+
else
|
|
55
|
+
echo "No changes to commit"
|
|
56
|
+
exit 0
|
|
57
|
+
fi
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# git-clean-check.sh - Working directory clean 여부 확인
|
|
3
|
+
# Usage: ./git-clean-check.sh [--quiet]
|
|
4
|
+
# Exit 0: clean, Exit 1: dirty
|
|
5
|
+
|
|
6
|
+
set -uo pipefail
|
|
7
|
+
|
|
8
|
+
# Git 저장소 확인
|
|
9
|
+
if ! git rev-parse --git-dir > /dev/null 2>&1; then
|
|
10
|
+
echo "Error: Not a git repository"
|
|
11
|
+
exit 1
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
QUIET=false
|
|
15
|
+
if [ "${1:-}" = "--quiet" ]; then
|
|
16
|
+
QUIET=true
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
if [ -n "$(git status --porcelain)" ]; then
|
|
20
|
+
if [ "$QUIET" = false ]; then
|
|
21
|
+
echo "Working directory is DIRTY"
|
|
22
|
+
echo ""
|
|
23
|
+
git status --short
|
|
24
|
+
fi
|
|
25
|
+
exit 1
|
|
26
|
+
else
|
|
27
|
+
if [ "$QUIET" = false ]; then
|
|
28
|
+
echo "Working directory is CLEAN"
|
|
29
|
+
fi
|
|
30
|
+
exit 0
|
|
31
|
+
fi
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# git-commit.sh - 커밋 실행
|
|
3
|
+
# Usage: ./git-commit.sh "커밋 메시지" [files...]
|
|
4
|
+
# files 미지정 시 staged files만 커밋
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
|
|
8
|
+
# Git 저장소 확인
|
|
9
|
+
if ! git rev-parse --git-dir > /dev/null 2>&1; then
|
|
10
|
+
echo "Error: Not a git repository"
|
|
11
|
+
exit 1
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
if [ -z "$1" ]; then
|
|
15
|
+
echo "Usage: $0 \"commit message\" [files...]"
|
|
16
|
+
echo " files: 커밋할 파일들 (미지정 시 staged files만)"
|
|
17
|
+
exit 1
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
COMMIT_MSG="$1"
|
|
21
|
+
|
|
22
|
+
# 빈 메시지 체크
|
|
23
|
+
if [ -z "$(echo "$COMMIT_MSG" | xargs)" ]; then
|
|
24
|
+
echo "Error: Commit message cannot be empty" >&2
|
|
25
|
+
exit 1
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
shift
|
|
29
|
+
FILES_PROVIDED=$#
|
|
30
|
+
|
|
31
|
+
# 파일 지정된 경우 add
|
|
32
|
+
if [ $FILES_PROVIDED -gt 0 ]; then
|
|
33
|
+
git add "$@"
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
# staged 파일 확인
|
|
37
|
+
if git diff --cached --quiet; then
|
|
38
|
+
if [ $FILES_PROVIDED -eq 0 ]; then
|
|
39
|
+
echo "Error: No staged changes to commit"
|
|
40
|
+
echo "Tip: Stage files with 'git add' or pass files as arguments"
|
|
41
|
+
else
|
|
42
|
+
echo "Error: No changes in specified files"
|
|
43
|
+
echo "Tip: Check if files exist and have modifications"
|
|
44
|
+
fi
|
|
45
|
+
exit 1
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
# 커밋
|
|
49
|
+
git commit -m "$COMMIT_MSG"
|
|
50
|
+
|
|
51
|
+
echo "Committed successfully"
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# git-info.sh - Git 상태 및 diff 요약 출력
|
|
3
|
+
# 에이전트가 분석할 정보를 빠르게 수집
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
# Git 저장소 확인
|
|
8
|
+
if ! git rev-parse --git-dir > /dev/null 2>&1; then
|
|
9
|
+
echo "Error: Not a git repository"
|
|
10
|
+
exit 1
|
|
11
|
+
fi
|
|
12
|
+
|
|
13
|
+
echo "=== Git Status ==="
|
|
14
|
+
if [ -n "$(git status --porcelain)" ]; then
|
|
15
|
+
git status --short
|
|
16
|
+
else
|
|
17
|
+
echo "(clean)"
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
echo ""
|
|
21
|
+
echo "=== Changed Files ==="
|
|
22
|
+
git diff --stat
|
|
23
|
+
|
|
24
|
+
echo ""
|
|
25
|
+
echo "=== Staged Files ==="
|
|
26
|
+
git diff --cached --stat
|
|
27
|
+
|
|
28
|
+
echo ""
|
|
29
|
+
echo "=== Recent Commits (5) ==="
|
|
30
|
+
git log --oneline -5
|
|
31
|
+
|
|
32
|
+
echo ""
|
|
33
|
+
echo "=== Current Branch ==="
|
|
34
|
+
git branch --show-current
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# git-push.sh - 안전한 푸시 (상태 확인 후)
|
|
3
|
+
# Usage: ./git-push.sh [--force]
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
# Git 저장소 확인
|
|
8
|
+
if ! git rev-parse --git-dir > /dev/null 2>&1; then
|
|
9
|
+
echo "Error: Not a git repository"
|
|
10
|
+
exit 1
|
|
11
|
+
fi
|
|
12
|
+
|
|
13
|
+
# 현재 브랜치
|
|
14
|
+
BRANCH=$(git branch --show-current)
|
|
15
|
+
|
|
16
|
+
if [ -z "$BRANCH" ]; then
|
|
17
|
+
echo "Error: Not on any branch (detached HEAD)"
|
|
18
|
+
exit 1
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
# Force push 처리
|
|
22
|
+
USE_FORCE=false
|
|
23
|
+
if [ "${1:-}" = "--force" ]; then
|
|
24
|
+
# main/master 보호
|
|
25
|
+
if [ "$BRANCH" = "main" ] || [ "$BRANCH" = "master" ]; then
|
|
26
|
+
echo "ERROR: Cannot force push to $BRANCH"
|
|
27
|
+
echo "This operation is too dangerous on protected branches"
|
|
28
|
+
exit 1
|
|
29
|
+
fi
|
|
30
|
+
USE_FORCE=true
|
|
31
|
+
echo "Warning: Force push enabled (with lease) to $BRANCH"
|
|
32
|
+
fi
|
|
33
|
+
|
|
34
|
+
# upstream 확인 및 push
|
|
35
|
+
if ! git rev-parse --abbrev-ref "@{upstream}" >/dev/null 2>&1; then
|
|
36
|
+
echo "Setting upstream for branch: $BRANCH"
|
|
37
|
+
if [ "$USE_FORCE" = true ]; then
|
|
38
|
+
git push -u origin "$BRANCH" --force-with-lease
|
|
39
|
+
else
|
|
40
|
+
git push -u origin "$BRANCH"
|
|
41
|
+
fi
|
|
42
|
+
else
|
|
43
|
+
if [ "$USE_FORCE" = true ]; then
|
|
44
|
+
git push --force-with-lease
|
|
45
|
+
else
|
|
46
|
+
git push
|
|
47
|
+
fi
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
echo "Pushed to origin/$BRANCH"
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# lint-check.sh - tsc + eslint 병렬 실행
|
|
3
|
+
# Usage: ./lint-check.sh
|
|
4
|
+
# 두 검사를 병렬로 실행하고 결과를 수집
|
|
5
|
+
|
|
6
|
+
set -uo pipefail
|
|
7
|
+
|
|
8
|
+
# 임시 파일
|
|
9
|
+
TSC_OUT=$(mktemp)
|
|
10
|
+
ESLINT_OUT=$(mktemp)
|
|
11
|
+
TSC_EXIT=0
|
|
12
|
+
ESLINT_EXIT=0
|
|
13
|
+
|
|
14
|
+
# Cleanup (ERR, INT, TERM도 처리)
|
|
15
|
+
trap "rm -f $TSC_OUT $ESLINT_OUT" EXIT ERR INT TERM
|
|
16
|
+
|
|
17
|
+
echo "=== Running TypeScript + ESLint in parallel ==="
|
|
18
|
+
|
|
19
|
+
# 병렬 실행
|
|
20
|
+
(npx tsc --noEmit > "$TSC_OUT" 2>&1) &
|
|
21
|
+
TSC_PID=$!
|
|
22
|
+
|
|
23
|
+
(npx eslint . > "$ESLINT_OUT" 2>&1) &
|
|
24
|
+
ESLINT_PID=$!
|
|
25
|
+
|
|
26
|
+
# 대기
|
|
27
|
+
wait $TSC_PID || TSC_EXIT=$?
|
|
28
|
+
wait $ESLINT_PID || ESLINT_EXIT=$?
|
|
29
|
+
|
|
30
|
+
# 결과 출력
|
|
31
|
+
echo ""
|
|
32
|
+
echo "=== TypeScript Results ==="
|
|
33
|
+
if [ $TSC_EXIT -eq 0 ]; then
|
|
34
|
+
echo "✓ No type errors"
|
|
35
|
+
else
|
|
36
|
+
cat "$TSC_OUT"
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
echo ""
|
|
40
|
+
echo "=== ESLint Results ==="
|
|
41
|
+
if [ $ESLINT_EXIT -eq 0 ]; then
|
|
42
|
+
echo "✓ No lint errors"
|
|
43
|
+
else
|
|
44
|
+
cat "$ESLINT_OUT"
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
echo ""
|
|
48
|
+
echo "=== Summary ==="
|
|
49
|
+
if [ $TSC_EXIT -eq 0 ] && [ $ESLINT_EXIT -eq 0 ]; then
|
|
50
|
+
echo "✓ All checks passed"
|
|
51
|
+
exit 0
|
|
52
|
+
else
|
|
53
|
+
[ $TSC_EXIT -ne 0 ] && echo "✗ TypeScript: FAILED"
|
|
54
|
+
[ $ESLINT_EXIT -ne 0 ] && echo "✗ ESLint: FAILED"
|
|
55
|
+
exit 1
|
|
56
|
+
fi
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# lint-file.sh - 특정 파일/디렉토리만 검사
|
|
3
|
+
# Usage: ./lint-file.sh <file|directory> [file2...]
|
|
4
|
+
# Example: ./lint-file.sh src/utils/api.ts
|
|
5
|
+
# ./lint-file.sh src/components/
|
|
6
|
+
|
|
7
|
+
set -uo pipefail
|
|
8
|
+
|
|
9
|
+
if [ $# -eq 0 ]; then
|
|
10
|
+
echo "Usage: $0 <file|directory> [file2...]"
|
|
11
|
+
echo "Example: $0 src/utils/api.ts"
|
|
12
|
+
exit 1
|
|
13
|
+
fi
|
|
14
|
+
|
|
15
|
+
TSC_EXIT=0
|
|
16
|
+
ESLINT_EXIT=0
|
|
17
|
+
|
|
18
|
+
echo "=== Checking: $@ ==="
|
|
19
|
+
|
|
20
|
+
# TypeScript 검사 (전체 프로젝트 - tsc는 개별 파일 검사 미지원)
|
|
21
|
+
echo ""
|
|
22
|
+
echo "=== TypeScript ==="
|
|
23
|
+
echo "(Note: tsc checks entire project)"
|
|
24
|
+
npx tsc --noEmit || TSC_EXIT=$?
|
|
25
|
+
|
|
26
|
+
# ESLint 검사
|
|
27
|
+
echo ""
|
|
28
|
+
echo "=== ESLint ==="
|
|
29
|
+
npx eslint "$@" || ESLINT_EXIT=$?
|
|
30
|
+
|
|
31
|
+
# 결과
|
|
32
|
+
echo ""
|
|
33
|
+
echo "=== Summary ==="
|
|
34
|
+
if [ $TSC_EXIT -eq 0 ] && [ $ESLINT_EXIT -eq 0 ]; then
|
|
35
|
+
echo "✓ All checks passed"
|
|
36
|
+
exit 0
|
|
37
|
+
else
|
|
38
|
+
[ $TSC_EXIT -ne 0 ] && echo "✗ TypeScript: FAILED"
|
|
39
|
+
[ $ESLINT_EXIT -ne 0 ] && echo "✗ ESLint: FAILED"
|
|
40
|
+
exit 1
|
|
41
|
+
fi
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# pm-detect.sh - Package manager 자동 감지
|
|
3
|
+
# Usage: ./pm-detect.sh
|
|
4
|
+
# Output: npm | yarn | pnpm | bun
|
|
5
|
+
# Exit 1 if no lock file found
|
|
6
|
+
|
|
7
|
+
set -euo pipefail
|
|
8
|
+
|
|
9
|
+
# Lock 파일 기반 감지
|
|
10
|
+
if [ -f "bun.lockb" ]; then
|
|
11
|
+
echo "bun"
|
|
12
|
+
elif [ -f "pnpm-lock.yaml" ]; then
|
|
13
|
+
echo "pnpm"
|
|
14
|
+
elif [ -f "yarn.lock" ]; then
|
|
15
|
+
echo "yarn"
|
|
16
|
+
elif [ -f "package-lock.json" ]; then
|
|
17
|
+
echo "npm"
|
|
18
|
+
elif [ -f "package.json" ]; then
|
|
19
|
+
# Lock 파일 없으면 기본 npm
|
|
20
|
+
echo "Warning: No lock file found, defaulting to npm" >&2
|
|
21
|
+
echo "npm"
|
|
22
|
+
else
|
|
23
|
+
echo "Error: No package.json found" >&2
|
|
24
|
+
exit 1
|
|
25
|
+
fi
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# pm-run.sh - 감지된 package manager로 스크립트 실행
|
|
3
|
+
# Usage: ./pm-run.sh <script> [args...]
|
|
4
|
+
# Example: ./pm-run.sh build
|
|
5
|
+
# ./pm-run.sh test --watch
|
|
6
|
+
|
|
7
|
+
set -euo pipefail
|
|
8
|
+
|
|
9
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
10
|
+
|
|
11
|
+
if [ $# -eq 0 ] || [ -z "${1:-}" ]; then
|
|
12
|
+
echo "Usage: $0 <script> [args...]"
|
|
13
|
+
echo "Example: $0 build"
|
|
14
|
+
exit 1
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
SCRIPT="$1"
|
|
18
|
+
shift
|
|
19
|
+
|
|
20
|
+
# Package manager 감지
|
|
21
|
+
PM=$("$SCRIPT_DIR/pm-detect.sh")
|
|
22
|
+
|
|
23
|
+
# 실행
|
|
24
|
+
case "$PM" in
|
|
25
|
+
bun)
|
|
26
|
+
bun run "$SCRIPT" "$@"
|
|
27
|
+
;;
|
|
28
|
+
pnpm)
|
|
29
|
+
pnpm run "$SCRIPT" "$@"
|
|
30
|
+
;;
|
|
31
|
+
yarn)
|
|
32
|
+
yarn "$SCRIPT" "$@"
|
|
33
|
+
;;
|
|
34
|
+
npm)
|
|
35
|
+
npm run "$SCRIPT" "$@"
|
|
36
|
+
;;
|
|
37
|
+
*)
|
|
38
|
+
echo "Error: Unknown package manager: $PM" >&2
|
|
39
|
+
exit 1
|
|
40
|
+
;;
|
|
41
|
+
esac
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# version-bump.sh - 버전 계산
|
|
3
|
+
# Usage: ./version-bump.sh <current_version> <bump_type>
|
|
4
|
+
# bump_type: +1 (patch), +minor, +major, or direct version (x.x.x)
|
|
5
|
+
# Example: ./version-bump.sh 1.2.3 +1 → 1.2.4
|
|
6
|
+
# ./version-bump.sh 1.2.3 +minor → 1.3.0
|
|
7
|
+
# ./version-bump.sh 1.2.3 +major → 2.0.0
|
|
8
|
+
# ./version-bump.sh 1.2.3 2.0.0 → 2.0.0
|
|
9
|
+
|
|
10
|
+
set -euo pipefail
|
|
11
|
+
|
|
12
|
+
if [ $# -lt 2 ]; then
|
|
13
|
+
echo "Usage: $0 <current_version> <bump_type>"
|
|
14
|
+
echo "bump_type: +1, +minor, +major, or x.x.x"
|
|
15
|
+
exit 1
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
CURRENT="$1"
|
|
19
|
+
BUMP="$2"
|
|
20
|
+
|
|
21
|
+
# 버전 형식 먼저 검증
|
|
22
|
+
if ! [[ "$CURRENT" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
|
23
|
+
echo "Error: Invalid version format: $CURRENT" >&2
|
|
24
|
+
echo "Expected: x.x.x (e.g., 1.2.3)" >&2
|
|
25
|
+
exit 1
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
# 버전 파싱
|
|
29
|
+
IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT"
|
|
30
|
+
|
|
31
|
+
# 새 버전 계산
|
|
32
|
+
case "$BUMP" in
|
|
33
|
+
+1|+patch)
|
|
34
|
+
NEW_VERSION="$MAJOR.$MINOR.$((PATCH + 1))"
|
|
35
|
+
;;
|
|
36
|
+
+minor)
|
|
37
|
+
NEW_VERSION="$MAJOR.$((MINOR + 1)).0"
|
|
38
|
+
;;
|
|
39
|
+
+major)
|
|
40
|
+
NEW_VERSION="$((MAJOR + 1)).0.0"
|
|
41
|
+
;;
|
|
42
|
+
*)
|
|
43
|
+
# 직접 버전 지정 검증
|
|
44
|
+
if [[ "$BUMP" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
|
45
|
+
NEW_VERSION="$BUMP"
|
|
46
|
+
else
|
|
47
|
+
echo "Error: Invalid bump type: $BUMP"
|
|
48
|
+
echo "Use: +1, +minor, +major, or x.x.x"
|
|
49
|
+
exit 1
|
|
50
|
+
fi
|
|
51
|
+
;;
|
|
52
|
+
esac
|
|
53
|
+
|
|
54
|
+
echo "$NEW_VERSION"
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# version-find.sh - 버전 파일 탐색
|
|
3
|
+
# Usage: ./version-find.sh
|
|
4
|
+
# package.json과 .version() 코드 파일을 병렬로 탐색
|
|
5
|
+
|
|
6
|
+
set -uo pipefail
|
|
7
|
+
|
|
8
|
+
echo "=== Searching version files ==="
|
|
9
|
+
|
|
10
|
+
# 임시 파일
|
|
11
|
+
PKG_OUT=$(mktemp)
|
|
12
|
+
CODE_OUT=$(mktemp)
|
|
13
|
+
|
|
14
|
+
trap "rm -f $PKG_OUT $CODE_OUT" EXIT ERR INT TERM
|
|
15
|
+
|
|
16
|
+
# 병렬 탐색 (fd 우선, 없으면 find)
|
|
17
|
+
if command -v fd &>/dev/null; then
|
|
18
|
+
fd -t f 'package.json' -E node_modules > "$PKG_OUT" 2>&1 &
|
|
19
|
+
else
|
|
20
|
+
find . -name 'package.json' -not -path '*/node_modules/*' > "$PKG_OUT" 2>&1 &
|
|
21
|
+
fi
|
|
22
|
+
PID1=$!
|
|
23
|
+
|
|
24
|
+
(rg "\.version\(['\"]" --type ts --type js -l 2>/dev/null || true) > "$CODE_OUT" &
|
|
25
|
+
PID2=$!
|
|
26
|
+
|
|
27
|
+
wait $PID1
|
|
28
|
+
wait $PID2
|
|
29
|
+
|
|
30
|
+
# 결과 출력
|
|
31
|
+
echo ""
|
|
32
|
+
echo "=== package.json files ==="
|
|
33
|
+
if [ -s "$PKG_OUT" ]; then
|
|
34
|
+
cat "$PKG_OUT"
|
|
35
|
+
else
|
|
36
|
+
echo "(none found)"
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
echo ""
|
|
40
|
+
echo "=== Code files with .version() ==="
|
|
41
|
+
if [ -s "$CODE_OUT" ]; then
|
|
42
|
+
cat "$CODE_OUT"
|
|
43
|
+
else
|
|
44
|
+
echo "(none found)"
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
echo ""
|
|
48
|
+
echo "=== All version files ==="
|
|
49
|
+
cat "$PKG_OUT" "$CODE_OUT" | sort -u
|
|
@@ -74,8 +74,9 @@ ARGUMENT 있음 → 다음 단계 진행
|
|
|
74
74
|
| **2** | GitHub MCP + gh CLI | README, docs/, CHANGELOG 직접 접근 |
|
|
75
75
|
| **3** | Firecrawl `/map`→`/crawl` + SearXNG 검색 | 문서 일괄 수집 + breaking changes 보충 (동시 실행) |
|
|
76
76
|
| **4** | Context7 MCP | 라이브러리 문서 즉시 조회, 업데이트 지연 가능성 있음 |
|
|
77
|
-
| **5** |
|
|
78
|
-
| **6** |
|
|
77
|
+
| **5** | Jina Reader | `WebFetch('https://r.jina.ai/{URL}')` JS 렌더링 클린 MD (WebFetch 실패 시) |
|
|
78
|
+
| **6** | WebFetch | 개별 페이지 직접 읽기 |
|
|
79
|
+
| **7** | WebSearch | 최후 보충 검색 |
|
|
79
80
|
|
|
80
81
|
**Smart Tier Fallback 및 MCP 통합 전략**: @../../instructions/sourcing/reliable-search.md 참조
|
|
81
82
|
|
|
@@ -174,7 +175,7 @@ Task(subagent_type="researcher", model="haiku",
|
|
|
174
175
|
| Tier | 경로 | 실행 |
|
|
175
176
|
|------|------|------|
|
|
176
177
|
| **1 (MCP)** | Firecrawl + SearXNG | `firecrawl_map` → `firecrawl_crawl` (최대 50p) + `searxng_search` 병렬 |
|
|
177
|
-
| **2 (내장)** | WebFetch | llms.txt 링크 우선, 없으면 GitHub docs/ + 공식 문서 10-15p (5개씩 병렬) |
|
|
178
|
+
| **2 (내장)** | Jina Reader + WebFetch | llms.txt 링크 우선, SPA 문서는 `r.jina.ai` 경유, 없으면 GitHub docs/ + 공식 문서 10-15p (5개씩 병렬) |
|
|
178
179
|
|
|
179
180
|
### 공통: Breaking Changes 추출
|
|
180
181
|
|
|
@@ -386,7 +387,7 @@ researcher(검색) ──┘
|
|
|
386
387
|
| **Context7** | `resolve-library-id`, `get-library-docs` | 라이브러리 문서 즉시 조회 (업데이트 지연 가능) |
|
|
387
388
|
| **GitHub** | `get_file_contents`, `get_latest_release` | README, docs/, CHANGELOG |
|
|
388
389
|
|
|
389
|
-
**MCP 미설치** → WebFetch (페이지별)
|
|
390
|
+
**MCP 미설치** → Jina Reader (`r.jina.ai`) → WebFetch (페이지별) → WebSearch (내장) → `gh api` (CLI) 폴백
|
|
390
391
|
|
|
391
392
|
</mcp_integration>
|
|
392
393
|
|