Skip to content

Commit 0d57834

Browse files
authored
Merge pull request #4 from claude-code-expert/develop
Develop
2 parents 57ec03d + 8232bf4 commit 0d57834

3 files changed

Lines changed: 38 additions & 23 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [1.3.2] - 2026-04-11
6+
7+
### Added
8+
9+
- **Automated test suite**: `tests/test-router.sh` (67 cases), `tests/test-files.sh` (78 cases), `tests/run-all.sh` unified runner
10+
- **Pre-commit hook**: `install.sh --dev` registers git pre-commit that runs all tests on commit
11+
- **Router enforcement**: `additionalContext` message changed to "MUST delegate" to ensure subagent execution
12+
13+
### Changed
14+
15+
- **CI pipeline**: Replaced manual frontmatter checks with `test-router.sh` + `test-files.sh`
16+
- **VERSION**: Bumped to 1.3.2
17+
518
## [1.3.1] - 2026-04-11
619

720
### Changed

‎README.en.md‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,11 @@ Subagents are invoked via Claude Code's built-in **Agent tool** — not by runni
7575

7676
### Version
7777

78-
**v1.3.1** (current) — [Full changelog](CHANGELOG.md)
78+
**v1.3.2** (current) — [Full changelog](CHANGELOG.md)
7979

8080
| Version | Key Changes |
8181
|---------|-------------|
82+
| v1.3.2 | 145 automated tests, pre-commit hook, router delegation enforcement, `run-all.sh` |
8283
| v1.3.1 | README restructure (KO/EN split), CI shellcheck fix, hook mechanism docs |
8384
| v1.3.0 | Squad Router hook (80 keywords, 3-phase matching, context injection) |
8485
| v1.2.1 | Cross-platform notifications (macOS/Linux/WSL), subagent verification |
@@ -230,13 +231,13 @@ Claude Code's `UserPromptSubmit` hook fires every time the user submits a prompt
230231
│ "security" detected → AGENT="squad-audit" │
231232
│ │
232233
│ 4. Outputs JSON to stdout (context injection) │
233-
│ {"hookSpecificOutput": { │
234-
│ "hookEventName": "UserPromptSubmit", │
235-
│ "additionalContext": "[Squad Router] Use the squad-audit..." │
236-
│ }} │
234+
│ {"hookSpecificOutput": { │
235+
│ "hookEventName": "UserPromptSubmit", │
236+
│ "additionalContext": "[Squad Router] Use the squad-audit.."│
237+
│ }} │
237238
│ │
238239
│ 5. Claude sees injected context and delegates to subagent │
239-
│ → Agent(subagent_type="squad-audit", prompt="...") │
240+
│ → Agent(subagent_type="squad-audit", prompt="...") │
240241
└─────────────────────────────────────────────────────────────────┘
241242
```
242243

‎README.md‎

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,11 @@ bash install.sh
7575

7676
### 버전
7777

78-
**v1.3.1** (현재) — [전체 변경 이력](CHANGELOG.md)
78+
**v1.3.2** (현재) — [전체 변경 이력](CHANGELOG.md)
7979

8080
| 버전 | 주요 변경 |
8181
|------|----------|
82+
| v1.3.2 | 자동 테스트 145건, pre-commit hook, 라우터 위임 강제, `run-all.sh` |
8283
| v1.3.1 | README 구조 개편 (KO/EN 분리), CI shellcheck 수정, 훅 메커니즘 문서화 |
8384
| v1.3.0 | Squad Router 훅 추가 (80 키워드, 3단계 매칭, context injection) |
8485
| v1.2.1 | 크로스 플랫폼 알림 (macOS/Linux/WSL), 서브에이전트 검증 완료 |
@@ -219,25 +220,25 @@ squad-plan → [구현] → squad-review → squad-qa → squad-gitops
219220
Claude Code의 `UserPromptSubmit` 훅은 사용자가 프롬프트를 제출할 때마다 실행됩니다. Squad Router는 이 메커니즘을 활용합니다:
220221

221222
```
222-
┌─────────────────────────────────────────────────────────────────┐
223-
│ 1. 사용자가 프롬프트 입력 │
224-
│ "이 코드 보안 검사해줘" │
225-
│ │
226-
│ 2. Claude Code가 훅 실행 (프롬프트가 Claude에 전달되기 전) │
227-
│ stdin → {"prompt": "이 코드 보안 검사해줘"} │
228-
│ │
229-
│ 3. squad-router.sh가 키워드 매칭 │
230-
│ "보안" 감지 → AGENT="squad-audit" │
231-
│ │
232-
│ 4. stdout으로 JSON 출력 (context injection) │
223+
┌──────────────────────────────────────────────────────────────────┐
224+
│ 1. 사용자가 프롬프트 입력 │
225+
│ "이 코드 보안 검사해줘" │
226+
│ │
227+
│ 2. Claude Code가 훅 실행 (프롬프트가 Claude에 전달되기 전) │
228+
│ stdin → {"prompt": "이 코드 보안 검사해줘"} │
229+
│ │
230+
│ 3. squad-router.sh가 키워드 매칭 │
231+
│ "보안" 감지 → AGENT="squad-audit" │
232+
│ │
233+
│ 4. stdout으로 JSON 출력 (context injection) │
233234
│ {"hookSpecificOutput": { │
234235
│ "hookEventName": "UserPromptSubmit", │
235-
│ "additionalContext": "[Squad Router] Use the squad-audit..." │
236+
│ "additionalContext": "[Squad Router] Use the squad-audit..."│
236237
│ }} │
237-
│ │
238-
│ 5. Claude가 주입된 컨텍스트를 보고 서브에이전트에 위임 │
239-
│ → Agent(subagent_type="squad-audit", prompt="...") │
240-
└─────────────────────────────────────────────────────────────────┘
238+
│ │
239+
│ 5. Claude가 주입된 컨텍스트를 보고 서브에이전트에 위임 │
240+
│ → Agent(subagent_type="squad-audit", prompt="...") │
241+
└──────────────────────────────────────────────────────────────────┘
241242
```
242243

243244
핵심은 `hookSpecificOutput.additionalContext`입니다. 이 필드로 출력한 텍스트는 Claude가 프롬프트를 처리할 때 system-reminder로 주입되어, Claude가 자연스럽게 해당 서브에이전트를 호출하도록 유도합니다. 프롬프트 자체는 변경되지 않습니다.

0 commit comments

Comments
 (0)