claude-prism 0.4.0 → 0.4.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.ko.md +44 -19
- package/README.md +43 -17
- package/hooks/scope-guard.mjs +21 -1
- package/package.json +1 -1
- package/templates/commands/claude-prism/checkpoint.md +17 -1
- package/templates/commands/claude-prism/prism.md +19 -6
- package/templates/rules.en.md +33 -3
- package/templates/rules.ja.md +33 -3
- package/templates/rules.ko.md +33 -3
- package/templates/rules.zh.md +33 -3
- package/templates/skills/prism/SKILL.md +19 -6
package/README.ko.md
CHANGED
|
@@ -32,6 +32,22 @@ AI 코딩 문제 분해 도구 — Understand, Decompose, Execute, Checkpoint (U
|
|
|
32
32
|
|
|
33
33
|
AI 코딩의 가장 비싼 실패는 나쁜 코드가 아니라 — **틀린 것을 만드는 것**이다. AI 에이전트는 이해를 건너뛰고, 분해를 건너뛰고, 30분간 자율 실행한 뒤 사용자가 원하지 않은 것을 만들어냄. Prism은 CLAUDE.md에 방법론 규칙을 주입하여 Claude의 사고방식을 바꾼다.
|
|
34
34
|
|
|
35
|
+
### v0.4.0 주요 변경
|
|
36
|
+
|
|
37
|
+
- **태스크 크기 태그** — 모든 태스크에 `[S]`, `[M]`, `[L]` 부여, 적응형 배치 구성 (S+S+M = 1배치, L = 단독)
|
|
38
|
+
- **태스크별 검증 전략** — 플랜 템플릿에 `| 검증: TDD`, `| 검증: Build`, `| 검증: Visual` 명시
|
|
39
|
+
- **사전 분해 체크리스트** — 플랜 작성 전 타입/스키마/의존성 확인 필수화
|
|
40
|
+
- **진행률 대시보드** — 각 체크포인트에 Phase/Batch/Task 퍼센트와 시각적 프로그레스 바
|
|
41
|
+
- **적응형 체크포인트** — 3회 연속 승인 시 남은 Phase 동안 배치 크기 5-8로 확대
|
|
42
|
+
- **Scope Guard 디스크 폴백** — 세션 간 `docs/plans/*.md` 존재를 디스크에서 직접 확인 (거짓 "without a plan" 경고 해결)
|
|
43
|
+
- **20개 테스트 러너 패턴** — bun, pnpm, yarn, deno, rspec, dotnet, mvn, gradle 감지 추가
|
|
44
|
+
- **9개 프레임워크별 결과 감지** — node, jest, vitest, pytest, go, cargo, mocha, rspec, dotnet 정확한 성공/실패 판별
|
|
45
|
+
- **통합 hook 파이프라인** — hook 이벤트당 단일 프로세스 (I/O 감소)
|
|
46
|
+
- **i18n 메시지 시스템** — 모든 hook 메시지 en/ko/ja/zh 지역화
|
|
47
|
+
- **세션 이벤트 로깅** — JSONL 기반 세션별 이벤트 기록
|
|
48
|
+
- **정렬 감지** — 범위 이탈 추적 및 주요 결정 플래깅
|
|
49
|
+
- **커스텀 규칙** — 설정을 통한 사용자 정의 hook 규칙
|
|
50
|
+
|
|
35
51
|
## 설치
|
|
36
52
|
|
|
37
53
|
프로젝트 루트에서:
|
|
@@ -65,19 +81,23 @@ npx claude-prism update --global # 글로벌 스킬도 업데이트
|
|
|
65
81
|
│ │ ├── help.md # /claude-prism:help
|
|
66
82
|
│ │ └── update.md # /claude-prism:update
|
|
67
83
|
│ ├── hooks/ # (선택, --no-hooks 시 생략)
|
|
68
|
-
│ │ ├──
|
|
69
|
-
│ │ ├──
|
|
70
|
-
│ │
|
|
71
|
-
│ │ └── scope-guard.mjs
|
|
84
|
+
│ │ ├── pre-tool.mjs # 통합 PreToolUse 러너
|
|
85
|
+
│ │ ├── post-tool.mjs # 통합 PostToolUse 러너
|
|
86
|
+
│ │ └── user-prompt.mjs # UserPromptSubmit 러너
|
|
72
87
|
│ ├── rules/ # hook 규칙 로직
|
|
73
88
|
│ │ ├── commit-guard.mjs
|
|
74
89
|
│ │ ├── debug-loop.mjs
|
|
75
90
|
│ │ ├── test-tracker.mjs
|
|
76
|
-
│ │
|
|
91
|
+
│ │ ├── scope-guard.mjs
|
|
92
|
+
│ │ ├── alignment.mjs
|
|
93
|
+
│ │ └── turn-reporter.mjs
|
|
77
94
|
│ ├── lib/ # hook 의존 모듈
|
|
78
95
|
│ │ ├── adapter.mjs
|
|
96
|
+
│ │ ├── pipeline.mjs
|
|
79
97
|
│ │ ├── state.mjs
|
|
98
|
+
│ │ ├── session.mjs
|
|
80
99
|
│ │ ├── config.mjs
|
|
100
|
+
│ │ ├── messages.mjs
|
|
81
101
|
│ │ └── utils.mjs
|
|
82
102
|
│ └── settings.json # Claude Code hook 등록
|
|
83
103
|
└── docs/plans/ # /claude-prism:prism 실행 시 계획 파일 생성
|
|
@@ -235,7 +255,7 @@ prism stats
|
|
|
235
255
|
|
|
236
256
|
출력:
|
|
237
257
|
```
|
|
238
|
-
Version: v0.
|
|
258
|
+
Version: v0.4.0
|
|
239
259
|
Language: ko
|
|
240
260
|
Plans: 2 file(s)
|
|
241
261
|
OMC: ✅ v4.1.1
|
|
@@ -311,16 +331,19 @@ Hook은 선택 사항인 CLI 가드로, 개발 중 규율을 강제합니다. `p
|
|
|
311
331
|
|
|
312
332
|
테스트 커맨드 실행을 감지하고 타임스탐프와 성공/실패 상태를 기록합니다. `commit-guard`가 최근 테스트 실행을 확인하는 데 사용합니다.
|
|
313
333
|
|
|
314
|
-
**감지하는
|
|
315
|
-
- `npm test`, `
|
|
316
|
-
- `jest`, `vitest`
|
|
317
|
-
- `node --test`
|
|
318
|
-
- `npx
|
|
319
|
-
- `pytest`
|
|
320
|
-
- `
|
|
321
|
-
- `go test`
|
|
334
|
+
**감지하는 테스트 (20개 패턴):**
|
|
335
|
+
- `npm test`, `pnpm test`, `yarn test`, `bun test`
|
|
336
|
+
- `jest`, `vitest`, `mocha`, `rspec`
|
|
337
|
+
- `node --test`, `deno test`
|
|
338
|
+
- `npx jest`, `npx vitest`, `npx mocha`, `bunx vitest`
|
|
339
|
+
- `pytest`, `cargo test`, `go test`
|
|
340
|
+
- `dotnet test`, `mvn test`, `gradle test`
|
|
322
341
|
- `make test`
|
|
323
342
|
|
|
343
|
+
**프레임워크별 결과 감지 (9개):**
|
|
344
|
+
- Node test runner, Jest, Vitest, Pytest, Go, Cargo, Mocha, RSpec, dotnet
|
|
345
|
+
- stdout와 stderr를 모두 분석하여 정확한 성공/실패 판별
|
|
346
|
+
|
|
324
347
|
**설정:**
|
|
325
348
|
```json
|
|
326
349
|
{
|
|
@@ -366,6 +389,7 @@ Hook은 선택 사항인 CLI 가드로, 개발 중 규율을 강제합니다. `p
|
|
|
366
389
|
- **플랜 인식**: 플랜 파일 생성 시 (`docs/plans/*.md`) 임계값이 자동으로 2배
|
|
367
390
|
- 표준 + 플랜: 8개에서 경고, 14개에서 차단
|
|
368
391
|
- Agent + 플랜: 16개에서 경고, 24개에서 차단
|
|
392
|
+
- **세션 간 지속성**: 현재 세션에서 생성된 플랜뿐만 아니라 디스크에 존재하는 기존 플랜 파일(`docs/plans/*.md`)도 감지. 새 세션에서 작업 재개 시 거짓 "without a plan" 경고 해결.
|
|
369
393
|
|
|
370
394
|
## 설정
|
|
371
395
|
|
|
@@ -411,7 +435,7 @@ prism doctor # 진단 정보에 OMC 감지 표시
|
|
|
411
435
|
## 기술 사양
|
|
412
436
|
|
|
413
437
|
- **패키지명**: `claude-prism`
|
|
414
|
-
- **버전**: 0.
|
|
438
|
+
- **버전**: 0.4.0
|
|
415
439
|
- **CLI 커맨드**: `prism`
|
|
416
440
|
- **Node 버전**: >= 18
|
|
417
441
|
- **의존성**: 0 (순수 ESM 모듈)
|
|
@@ -430,10 +454,11 @@ prism doctor # 진단 정보에 OMC 감지 표시
|
|
|
430
454
|
|
|
431
455
|
1. **정보 충분성 판별** — 요청이 명확한가? 질문이 필요한가?
|
|
432
456
|
2. **최대 3라운드 질문** — 한 번에 하나씩, 객관식 우선
|
|
433
|
-
3. **분해 5
|
|
434
|
-
4.
|
|
435
|
-
5.
|
|
436
|
-
6.
|
|
457
|
+
3. **분해 5원칙 + 사전 체크** — 단위 크기, 테스트 선행, 독립 검증, 파일 명시, 의존성 명시 + 타입/스키마/교차패키지 확인
|
|
458
|
+
4. **크기 태그 + 적응형 배치** — [S/M/L] 태그 기반 배치 구성, 3회 연속 승인 시 배치 확대
|
|
459
|
+
5. **태스크별 검증 전략** — TDD / Build / Visual 명시, 파일 경로별 자동 선택
|
|
460
|
+
6. **진행률 대시보드** — Phase/Batch/Task % 시각화, 체크포인트마다 보고
|
|
461
|
+
7. **자기 교정** — 같은 파일 3회 편집 시 멈추고 재검토
|
|
437
462
|
|
|
438
463
|
## 라이선스
|
|
439
464
|
|
package/README.md
CHANGED
|
@@ -21,6 +21,22 @@ An AI coding problem decomposition tool for Claude Code. Installs the **UDEC** m
|
|
|
21
21
|
|
|
22
22
|
**Core philosophy:** Never implement what you haven't understood. Never execute what you haven't decomposed.
|
|
23
23
|
|
|
24
|
+
### What's New in v0.4.0
|
|
25
|
+
|
|
26
|
+
- **Task size tags** — Every task gets `[S]`, `[M]`, or `[L]` with adaptive batch composition (S+S+M = 1 batch, L = solo)
|
|
27
|
+
- **Verification strategy per task** — `| Verify: TDD`, `| Verify: Build`, or `| Verify: Visual` in plan templates
|
|
28
|
+
- **Pre-decomposition checklist** — Mandatory type/schema/dependency check before creating plans
|
|
29
|
+
- **Progress dashboard** — Visual progress bar with phase/batch/task percentages at each checkpoint
|
|
30
|
+
- **Adaptive checkpoints** — After 3 consecutive approvals, batch size expands to 5-8 for the rest of the phase
|
|
31
|
+
- **Scope guard disk fallback** — Detects existing `docs/plans/*.md` on disk, not just in-session writes (fixes false "without a plan" warnings across sessions)
|
|
32
|
+
- **20 test runner patterns** — Added bun, pnpm, yarn, deno, rspec, dotnet, mvn, gradle detection
|
|
33
|
+
- **9 framework-specific result detectors** — Accurate pass/fail for node, jest, vitest, pytest, go, cargo, mocha, rspec, dotnet
|
|
34
|
+
- **Unified hook pipeline** — Single process per hook event instead of separate processes per rule (reduced I/O)
|
|
35
|
+
- **i18n message system** — All hook messages localized in en/ko/ja/zh
|
|
36
|
+
- **Session event logging** — JSONL-based per-session event recording
|
|
37
|
+
- **Alignment detection** — Scope drift tracking and major decision flagging
|
|
38
|
+
- **Custom rules** — User-defined hook rules via config
|
|
39
|
+
|
|
24
40
|
## The Problem
|
|
25
41
|
|
|
26
42
|
Without structure, Claude does this:
|
|
@@ -66,11 +82,13 @@ After running `prism init`, your project gains:
|
|
|
66
82
|
- `/claude-prism:update` — Update rules and commands to latest version
|
|
67
83
|
- `/claude-prism:help` — Command reference
|
|
68
84
|
|
|
69
|
-
**Hooks** (optional, unless `--no-hooks` is set) —
|
|
85
|
+
**Hooks** (optional, unless `--no-hooks` is set) — Six CLI guards that enforce discipline:
|
|
70
86
|
- `commit-guard` — Prevents commits when tests haven't run recently
|
|
71
87
|
- `debug-loop` — Detects divergent editing patterns on the same file (catches infinite debugging loops)
|
|
72
|
-
- `test-tracker` — Detects test
|
|
73
|
-
- `scope-guard` — Warns at 4 unique files modified, blocks at 7 (agent-aware
|
|
88
|
+
- `test-tracker` — Detects test execution (20 patterns, 9 framework-specific result detectors) and records pass/fail
|
|
89
|
+
- `scope-guard` — Warns at 4 unique files modified, blocks at 7 (agent-aware, plan-aware with disk fallback)
|
|
90
|
+
- `alignment` — Detects scope drift (new directories outside base scope) and major decisions (package installs, db migrations, destructive deletes)
|
|
91
|
+
- `turn-reporter` — Tracks turn count, warns at 5 autonomous turns without user input, provides previous turn summary
|
|
74
92
|
|
|
75
93
|
**Configuration** — `.prism.json` stores language preference and hook settings. Includes OMC (oh-my-claudecode) detection.
|
|
76
94
|
|
|
@@ -91,19 +109,23 @@ your-project/
|
|
|
91
109
|
│ │ ├── update.md # /claude-prism:update
|
|
92
110
|
│ │ └── help.md # /claude-prism:help
|
|
93
111
|
│ ├── hooks/ # (optional, if --no-hooks not set)
|
|
94
|
-
│ │ ├──
|
|
95
|
-
│ │ ├──
|
|
96
|
-
│ │
|
|
97
|
-
│ │ └── scope-guard.mjs
|
|
112
|
+
│ │ ├── pre-tool.mjs # Unified PreToolUse runner
|
|
113
|
+
│ │ ├── post-tool.mjs # Unified PostToolUse runner
|
|
114
|
+
│ │ └── user-prompt.mjs # UserPromptSubmit runner
|
|
98
115
|
│ ├── rules/ # Hook logic modules
|
|
99
116
|
│ │ ├── commit-guard.mjs
|
|
100
117
|
│ │ ├── debug-loop.mjs
|
|
101
118
|
│ │ ├── test-tracker.mjs
|
|
102
|
-
│ │
|
|
119
|
+
│ │ ├── scope-guard.mjs
|
|
120
|
+
│ │ ├── alignment.mjs
|
|
121
|
+
│ │ └── turn-reporter.mjs
|
|
103
122
|
│ ├── lib/ # Hook dependencies
|
|
104
123
|
│ │ ├── adapter.mjs
|
|
124
|
+
│ │ ├── pipeline.mjs
|
|
105
125
|
│ │ ├── state.mjs
|
|
126
|
+
│ │ ├── session.mjs
|
|
106
127
|
│ │ ├── config.mjs
|
|
128
|
+
│ │ ├── messages.mjs
|
|
107
129
|
│ │ └── utils.mjs
|
|
108
130
|
│ └── settings.json # Claude Code hook registration
|
|
109
131
|
└── docs/plans/
|
|
@@ -268,16 +290,19 @@ Detects editing patterns on the same file. Distinguishes between **divergent** e
|
|
|
268
290
|
|
|
269
291
|
Detects test command execution and records the timestamp and pass/fail state. Used by `commit-guard` to verify tests ran recently.
|
|
270
292
|
|
|
271
|
-
**Detects:**
|
|
272
|
-
- `npm test`, `
|
|
273
|
-
- `jest`, `vitest`
|
|
274
|
-
- `node --test`
|
|
275
|
-
- `npx
|
|
276
|
-
- `pytest`
|
|
277
|
-
- `
|
|
278
|
-
- `go test`
|
|
293
|
+
**Detects (20 patterns):**
|
|
294
|
+
- `npm test`, `pnpm test`, `yarn test`, `bun test`
|
|
295
|
+
- `jest`, `vitest`, `mocha`, `rspec`
|
|
296
|
+
- `node --test`, `deno test`
|
|
297
|
+
- `npx jest`, `npx vitest`, `npx mocha`, `bunx vitest`
|
|
298
|
+
- `pytest`, `cargo test`, `go test`
|
|
299
|
+
- `dotnet test`, `mvn test`, `gradle test`
|
|
279
300
|
- `make test`
|
|
280
301
|
|
|
302
|
+
**Framework-specific result detection (9 detectors):**
|
|
303
|
+
- Node test runner, Jest, Vitest, Pytest, Go, Cargo, Mocha, RSpec, dotnet
|
|
304
|
+
- Analyzes both stdout and stderr for accurate pass/fail determination
|
|
305
|
+
|
|
281
306
|
**Configuration:**
|
|
282
307
|
```json
|
|
283
308
|
{
|
|
@@ -323,6 +348,7 @@ Tracks unique source files modified per session. Warns when scope grows without
|
|
|
323
348
|
- **Plan-aware**: When a plan file is created (`docs/plans/*.md`), thresholds are automatically doubled
|
|
324
349
|
- Standard with plan: warns at 8, blocks at 14
|
|
325
350
|
- Agent with plan: warns at 16, blocks at 24
|
|
351
|
+
- **Cross-session persistence**: Detects existing plan files on disk (`docs/plans/*.md`), not just plans created in the current session. Fixes false "without a plan" warnings when resuming work in a new session.
|
|
326
352
|
|
|
327
353
|
## Configuration
|
|
328
354
|
|
|
@@ -412,7 +438,7 @@ prism stats
|
|
|
412
438
|
|
|
413
439
|
Output:
|
|
414
440
|
```
|
|
415
|
-
Version: v0.
|
|
441
|
+
Version: v0.4.0
|
|
416
442
|
Language: en
|
|
417
443
|
Plans: 2 file(s)
|
|
418
444
|
OMC: ✅ v4.1.1
|
package/hooks/scope-guard.mjs
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
import { readJsonState, writeJsonState } from '../lib/state.mjs';
|
|
7
7
|
import { DEFAULTS, buildSourcePattern, buildTestPattern } from '../lib/config.mjs';
|
|
8
8
|
import { getMessage } from '../lib/messages.mjs';
|
|
9
|
+
import { existsSync, readdirSync } from 'fs';
|
|
10
|
+
import { join } from 'path';
|
|
9
11
|
|
|
10
12
|
const PLAN_PATTERN = /(?:^|\/)docs\/plans\/.*\.md$|(?:^|\/).*plan.*\.md$/i;
|
|
11
13
|
|
|
@@ -47,7 +49,25 @@ export const scopeGuard = {
|
|
|
47
49
|
let blockAt = isAgent ? (config.agentBlockAt || 12) : (config.blockAt || 7);
|
|
48
50
|
|
|
49
51
|
// Active plan → double thresholds (planned work is expected to touch many files)
|
|
50
|
-
|
|
52
|
+
let hasPlan = readJsonState(stateDir, 'scope-has-plan');
|
|
53
|
+
|
|
54
|
+
// Fallback: check disk for existing plan files (survives session restart)
|
|
55
|
+
if (!hasPlan) {
|
|
56
|
+
try {
|
|
57
|
+
const root = config.projectRoot || process.cwd();
|
|
58
|
+
const plansDir = join(root, 'docs', 'plans');
|
|
59
|
+
if (existsSync(plansDir)) {
|
|
60
|
+
const planFiles = readdirSync(plansDir).filter(f => f.endsWith('.md'));
|
|
61
|
+
if (planFiles.length > 0) {
|
|
62
|
+
hasPlan = true;
|
|
63
|
+
writeJsonState(stateDir, 'scope-has-plan', true);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
} catch {
|
|
67
|
+
// Ignore filesystem errors — fail open
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
51
71
|
if (hasPlan) {
|
|
52
72
|
warnAt *= 2;
|
|
53
73
|
blockAt *= 2;
|
package/package.json
CHANGED
|
@@ -22,13 +22,29 @@ When this command is invoked:
|
|
|
22
22
|
|
|
23
23
|
### Progress
|
|
24
24
|
|
|
25
|
+
```
|
|
26
|
+
Phase: [current phase] | Batch: [N/M] | Tasks: [done/total] ([%])
|
|
27
|
+
[████████░░] 80% — Next: [next batch name]
|
|
28
|
+
```
|
|
29
|
+
|
|
25
30
|
- Batches complete: N/M
|
|
26
31
|
- Current batch: [name] — [X/Y tasks done]
|
|
27
32
|
- Remaining: [batch names]
|
|
28
33
|
- Blockers: [any issues encountered]
|
|
29
34
|
|
|
35
|
+
### Task Size Distribution
|
|
36
|
+
|
|
37
|
+
| Size | Count | Done |
|
|
38
|
+
|------|-------|------|
|
|
39
|
+
| [S] Small | N | N |
|
|
40
|
+
| [M] Medium | N | N |
|
|
41
|
+
| [L] Large | N | N |
|
|
42
|
+
|
|
30
43
|
4. **Show summary**:
|
|
31
44
|
- Files created/modified so far
|
|
32
45
|
- Tests added and their status
|
|
33
46
|
- Commits made
|
|
34
|
-
5. **
|
|
47
|
+
5. **Checkpoint policy check**:
|
|
48
|
+
- If 3+ consecutive approvals → suggest expanding batch size to 5-8
|
|
49
|
+
- If phase boundary → always stop
|
|
50
|
+
6. **Ask**: "Continue with the current plan, adjust, or stop?"
|
|
@@ -42,8 +42,15 @@ When this command is invoked, follow the UDEC framework strictly:
|
|
|
42
42
|
- Independent verification: each unit has a pass criterion
|
|
43
43
|
- Files specified: list files to create/modify per unit
|
|
44
44
|
- Dependencies noted: mark if unit depends on a previous one
|
|
45
|
-
9. **
|
|
46
|
-
|
|
45
|
+
9. **Assign size tags** to every task: [S] <30 LOC, [M] 30-100 LOC, [L] >100 LOC
|
|
46
|
+
- Batch composition: S+S+M = 1 batch, L = 1 batch alone
|
|
47
|
+
10. **Assign verification strategy** per task: `| Verify: TDD` or `| Verify: Build` or `| Verify: Visual`
|
|
48
|
+
11. **Pre-decomposition checklist**:
|
|
49
|
+
- Required types/interfaces have the necessary fields?
|
|
50
|
+
- External package APIs behave as expected?
|
|
51
|
+
- Cross-package dependencies identified and noted as prerequisites?
|
|
52
|
+
12. **Save plan** to `docs/plans/YYYY-MM-DD-<topic>.md`
|
|
53
|
+
13. **Get approval**: "Proceed with this plan?"
|
|
47
54
|
|
|
48
55
|
## E — EXECUTE
|
|
49
56
|
|
|
@@ -70,15 +77,21 @@ When this command is invoked, follow the UDEC framework strictly:
|
|
|
70
77
|
|
|
71
78
|
## C — CHECKPOINT
|
|
72
79
|
|
|
73
|
-
|
|
80
|
+
20. After each batch, report using this format:
|
|
74
81
|
|
|
75
82
|
| Item | Before | After |
|
|
76
83
|
|------|--------|-------|
|
|
77
84
|
| [what changed] | [old behavior] | [new behavior] |
|
|
78
85
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
86
|
+
```
|
|
87
|
+
Phase: [current] | Batch: [N/M] | Tasks: [done/total] ([%])
|
|
88
|
+
[████████░░] 80% — Next: [next batch name]
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
21. Include: verification results, files modified, tests status
|
|
92
|
+
22. **Checkpoint policy**: after 3 consecutive approvals, increase batch size to 5-8 for the rest of the phase
|
|
93
|
+
23. Ask: "Continue to next batch?"
|
|
94
|
+
24. User can redirect, adjust scope, or stop at any checkpoint
|
|
82
95
|
|
|
83
96
|
## OMC Integration
|
|
84
97
|
|
package/templates/rules.en.md
CHANGED
|
@@ -105,11 +105,16 @@ One sentence: what we're building and why.
|
|
|
105
105
|
Tech stack, key decisions, 2-3 sentences max.
|
|
106
106
|
|
|
107
107
|
## Batch 1: [Name]
|
|
108
|
-
- [ ] Task 1.1: [description] → `path/to/file`
|
|
108
|
+
- [ ] Task 1.1: [S] [description] | Verify: Build → `path/to/file`
|
|
109
|
+
- Pass criterion: [specific assertion]
|
|
110
|
+
- [ ] Task 1.2: [M] [description] | Verify: TDD → `path/to/file`
|
|
111
|
+
- Prerequisite: Task 1.1
|
|
112
|
+
- Test: `path/to/test` — [what it verifies]
|
|
113
|
+
- Pass criterion: [specific assertion]
|
|
114
|
+
- [ ] Task 1.3: [L] [description] | Verify: TDD → `path/to/file`
|
|
115
|
+
- Prerequisite: Task 1.1, Task 1.2
|
|
109
116
|
- Test: `path/to/test` — [what it verifies]
|
|
110
117
|
- Pass criterion: [specific assertion]
|
|
111
|
-
- [ ] Task 1.2: ...
|
|
112
|
-
- [ ] Task 1.3: ...
|
|
113
118
|
|
|
114
119
|
## Batch 2: [Name]
|
|
115
120
|
- [ ] Task 2.1: ...
|
|
@@ -118,6 +123,20 @@ Tech stack, key decisions, 2-3 sentences max.
|
|
|
118
123
|
- [Known unknowns or potential blockers]
|
|
119
124
|
```
|
|
120
125
|
|
|
126
|
+
### 2-6. Task Sizing and Pre-Decomposition Check
|
|
127
|
+
|
|
128
|
+
**Size Tags (assign to every task):**
|
|
129
|
+
- **[S]** Small: <30 LOC, config/style/single-function changes
|
|
130
|
+
- **[M]** Medium: 30-100 LOC, feature implementation, component creation
|
|
131
|
+
- **[L]** Large: >100 LOC, multi-file rewrite, new module/architecture
|
|
132
|
+
|
|
133
|
+
**Batch composition by size**: S+S+M = 1 batch, L = 1 batch alone, S+S+S+S = 1 batch
|
|
134
|
+
|
|
135
|
+
**Pre-decomposition checklist (before creating plan):**
|
|
136
|
+
- [ ] Required types/interfaces have the necessary fields?
|
|
137
|
+
- [ ] External package APIs behave as expected?
|
|
138
|
+
- [ ] Cross-package dependencies identified and noted as prerequisites?
|
|
139
|
+
|
|
121
140
|
---
|
|
122
141
|
|
|
123
142
|
## 3. EXECUTE — Execution Protocol
|
|
@@ -212,6 +231,17 @@ After each batch:
|
|
|
212
231
|
- Preview next batch
|
|
213
232
|
- "Continue?"
|
|
214
233
|
|
|
234
|
+
**Checkpoint frequency policy:**
|
|
235
|
+
- **Phase boundary**: always stop (mandatory)
|
|
236
|
+
- **Batch boundary**: stop by default → after 3 consecutive approvals, increase batch size to 5-8 for the remainder of the phase
|
|
237
|
+
- **Blocker encountered**: always stop (mandatory)
|
|
238
|
+
|
|
239
|
+
**Progress dashboard (include at each checkpoint):**
|
|
240
|
+
```
|
|
241
|
+
Phase: [current phase] | Batch: [N/M] | Tasks: [done/total] ([%])
|
|
242
|
+
[████████░░] 80% — Next: [next batch name]
|
|
243
|
+
```
|
|
244
|
+
|
|
215
245
|
### 4-2. Direction Change
|
|
216
246
|
|
|
217
247
|
User says "change direction" → return to UNDERSTAND
|
package/templates/rules.ja.md
CHANGED
|
@@ -105,11 +105,16 @@ DECOMPOSEに進む前に確認:
|
|
|
105
105
|
技術スタック、主要決定事項、2-3文。
|
|
106
106
|
|
|
107
107
|
## Batch 1: [名前]
|
|
108
|
-
- [ ] Task 1.1: [説明] → `path/to/file`
|
|
108
|
+
- [ ] Task 1.1: [S] [説明] | 検証: Build → `path/to/file`
|
|
109
|
+
- 合格基準: [具体的なアサーション]
|
|
110
|
+
- [ ] Task 1.2: [M] [説明] | 検証: TDD → `path/to/file`
|
|
111
|
+
- 前提: Task 1.1
|
|
112
|
+
- テスト: `path/to/test` — [検証内容]
|
|
113
|
+
- 合格基準: [具体的なアサーション]
|
|
114
|
+
- [ ] Task 1.3: [L] [説明] | 検証: TDD → `path/to/file`
|
|
115
|
+
- 前提: Task 1.1, Task 1.2
|
|
109
116
|
- テスト: `path/to/test` — [検証内容]
|
|
110
117
|
- 合格基準: [具体的なアサーション]
|
|
111
|
-
- [ ] Task 1.2: ...
|
|
112
|
-
- [ ] Task 1.3: ...
|
|
113
118
|
|
|
114
119
|
## Batch 2: [名前]
|
|
115
120
|
- [ ] Task 2.1: ...
|
|
@@ -118,6 +123,20 @@ DECOMPOSEに進む前に確認:
|
|
|
118
123
|
- [既知の不確実性や潜在的ブロッカー]
|
|
119
124
|
```
|
|
120
125
|
|
|
126
|
+
### 2-6. タスクサイズ見積もりと事前分解チェック
|
|
127
|
+
|
|
128
|
+
**サイズタグ(すべてのタスクに付与):**
|
|
129
|
+
- **[S]** Small: <30 LOC、設定/スタイル/単一関数の変更
|
|
130
|
+
- **[M]** Medium: 30-100 LOC、機能実装、コンポーネント作成
|
|
131
|
+
- **[L]** Large: >100 LOC、複数ファイルの書き換え、新規モジュール/アーキテクチャ
|
|
132
|
+
|
|
133
|
+
**サイズに基づくバッチ構成**: S+S+M = 1バッチ、L = 単独1バッチ、S+S+S+S = 1バッチ
|
|
134
|
+
|
|
135
|
+
**事前分解チェックリスト(計画作成前に必須):**
|
|
136
|
+
- [ ] 必要な型/インターフェースに必要なフィールドが存在するか?
|
|
137
|
+
- [ ] 外部パッケージのAPIが期待通りに動作するか?
|
|
138
|
+
- [ ] パッケージ間の依存関係が特定され、前提条件として記録されているか?
|
|
139
|
+
|
|
121
140
|
---
|
|
122
141
|
|
|
123
142
|
## 3. EXECUTE (実行) — 実行プロトコル
|
|
@@ -212,6 +231,17 @@ DECOMPOSEに進む前に確認:
|
|
|
212
231
|
- 次のバッチをプレビュー
|
|
213
232
|
- 「続行しますか?」
|
|
214
233
|
|
|
234
|
+
**チェックポイント頻度ポリシー:**
|
|
235
|
+
- **フェーズ境界**: 常に停止(必須)
|
|
236
|
+
- **バッチ境界**: デフォルトで停止 → 3回連続承認後、残りのフェーズはバッチサイズを5-8に拡大
|
|
237
|
+
- **ブロッカー発生**: 常に停止(必須)
|
|
238
|
+
|
|
239
|
+
**進捗ダッシュボード(各チェックポイントに含める):**
|
|
240
|
+
```
|
|
241
|
+
Phase: [現在のフェーズ] | Batch: [N/M] | Tasks: [完了/合計] ([%])
|
|
242
|
+
[████████░░] 80% — 次: [次のバッチ名]
|
|
243
|
+
```
|
|
244
|
+
|
|
215
245
|
### 4-2. 方向転換
|
|
216
246
|
|
|
217
247
|
ユーザーが「方向を変える」と言う → UNDERSTANDに戻る
|
package/templates/rules.ko.md
CHANGED
|
@@ -105,11 +105,16 @@ DECOMPOSE로 넘어가기 전 확인:
|
|
|
105
105
|
기술 스택, 주요 결정, 2-3문장.
|
|
106
106
|
|
|
107
107
|
## Batch 1: [이름]
|
|
108
|
-
- [ ] Task 1.1: [설명] → `path/to/file`
|
|
108
|
+
- [ ] Task 1.1: [S] [설명] | 검증: Build → `path/to/file`
|
|
109
|
+
- 통과 기준: [구체적 단언]
|
|
110
|
+
- [ ] Task 1.2: [M] [설명] | 검증: TDD → `path/to/file`
|
|
111
|
+
- 선행: Task 1.1
|
|
112
|
+
- 테스트: `path/to/test` — [검증 대상]
|
|
113
|
+
- 통과 기준: [구체적 단언]
|
|
114
|
+
- [ ] Task 1.3: [L] [설명] | 검증: TDD → `path/to/file`
|
|
115
|
+
- 선행: Task 1.1, Task 1.2
|
|
109
116
|
- 테스트: `path/to/test` — [검증 대상]
|
|
110
117
|
- 통과 기준: [구체적 단언]
|
|
111
|
-
- [ ] Task 1.2: ...
|
|
112
|
-
- [ ] Task 1.3: ...
|
|
113
118
|
|
|
114
119
|
## Batch 2: [이름]
|
|
115
120
|
- [ ] Task 2.1: ...
|
|
@@ -118,6 +123,20 @@ DECOMPOSE로 넘어가기 전 확인:
|
|
|
118
123
|
- [알려진 불확실성 또는 잠재적 블로커]
|
|
119
124
|
```
|
|
120
125
|
|
|
126
|
+
### 2-6. 태스크 크기 산정 및 사전 분해 점검
|
|
127
|
+
|
|
128
|
+
**크기 태그 (모든 태스크에 부여):**
|
|
129
|
+
- **[S]** Small: <30 LOC, 설정/스타일/단일 함수 변경
|
|
130
|
+
- **[M]** Medium: 30-100 LOC, 기능 구현, 컴포넌트 생성
|
|
131
|
+
- **[L]** Large: >100 LOC, 멀티파일 리라이트, 새 모듈/아키텍처
|
|
132
|
+
|
|
133
|
+
**크기별 배치 구성**: S+S+M = 1배치, L = 단독 1배치, S+S+S+S = 1배치
|
|
134
|
+
|
|
135
|
+
**사전 분해 체크리스트 (플랜 작성 전 필수):**
|
|
136
|
+
- [ ] 필요한 타입/인터페이스에 요구되는 필드가 존재하는가?
|
|
137
|
+
- [ ] 외부 패키지 API가 예상대로 동작하는가?
|
|
138
|
+
- [ ] 교차 패키지 의존성이 식별되고 선행 조건으로 기록되었는가?
|
|
139
|
+
|
|
121
140
|
---
|
|
122
141
|
|
|
123
142
|
## 3. EXECUTE — 실행 프로토콜
|
|
@@ -212,6 +231,17 @@ DECOMPOSE로 넘어가기 전 확인:
|
|
|
212
231
|
- 다음 배치 미리보기
|
|
213
232
|
- "계속 진행할까요?"
|
|
214
233
|
|
|
234
|
+
**체크포인트 빈도 정책:**
|
|
235
|
+
- **Phase 경계**: 항상 멈춤 (필수)
|
|
236
|
+
- **Batch 경계**: 기본 멈춤 → 3회 연속 승인 시 남은 Phase 동안 배치 크기 5-8로 확대
|
|
237
|
+
- **블로커 발생**: 항상 멈춤 (필수)
|
|
238
|
+
|
|
239
|
+
**진행률 대시보드 (각 체크포인트에 포함):**
|
|
240
|
+
```
|
|
241
|
+
Phase: [현재 페이즈] | Batch: [N/M] | Tasks: [완료/전체] ([%])
|
|
242
|
+
[████████░░] 80% — 다음: [다음 배치 이름]
|
|
243
|
+
```
|
|
244
|
+
|
|
215
245
|
### 4-2. 방향 전환
|
|
216
246
|
|
|
217
247
|
사용자가 "방향 바꾸자" → UNDERSTAND로 돌아감
|
package/templates/rules.zh.md
CHANGED
|
@@ -105,11 +105,16 @@
|
|
|
105
105
|
技术栈、关键决策,2-3 句。
|
|
106
106
|
|
|
107
107
|
## Batch 1: [名称]
|
|
108
|
-
- [ ] Task 1.1: [描述] → `path/to/file`
|
|
108
|
+
- [ ] Task 1.1: [S] [描述] | 验证: Build → `path/to/file`
|
|
109
|
+
- 通过标准: [具体断言]
|
|
110
|
+
- [ ] Task 1.2: [M] [描述] | 验证: TDD → `path/to/file`
|
|
111
|
+
- 前置: Task 1.1
|
|
112
|
+
- 测试: `path/to/test` — [验证什么]
|
|
113
|
+
- 通过标准: [具体断言]
|
|
114
|
+
- [ ] Task 1.3: [L] [描述] | 验证: TDD → `path/to/file`
|
|
115
|
+
- 前置: Task 1.1, Task 1.2
|
|
109
116
|
- 测试: `path/to/test` — [验证什么]
|
|
110
117
|
- 通过标准: [具体断言]
|
|
111
|
-
- [ ] Task 1.2: ...
|
|
112
|
-
- [ ] Task 1.3: ...
|
|
113
118
|
|
|
114
119
|
## Batch 2: [名称]
|
|
115
120
|
- [ ] Task 2.1: ...
|
|
@@ -118,6 +123,20 @@
|
|
|
118
123
|
- [已知的不确定性或潜在阻塞]
|
|
119
124
|
```
|
|
120
125
|
|
|
126
|
+
### 2-6. 任务规模评估与分解前检查
|
|
127
|
+
|
|
128
|
+
**规模标签(为每个任务分配):**
|
|
129
|
+
- **[S]** Small:<30 LOC,配置/样式/单函数变更
|
|
130
|
+
- **[M]** Medium:30-100 LOC,功能实现,组件创建
|
|
131
|
+
- **[L]** Large:>100 LOC,多文件重写,新模块/架构
|
|
132
|
+
|
|
133
|
+
**按规模组成批次**:S+S+M = 1批次,L = 单独1批次,S+S+S+S = 1批次
|
|
134
|
+
|
|
135
|
+
**分解前检查清单(创建计划前必须):**
|
|
136
|
+
- [ ] 所需的类型/接口是否具有必要的字段?
|
|
137
|
+
- [ ] 外部包的 API 是否按预期工作?
|
|
138
|
+
- [ ] 是否已识别跨包依赖并记录为前置条件?
|
|
139
|
+
|
|
121
140
|
---
|
|
122
141
|
|
|
123
142
|
## 3. EXECUTE (执行) — 执行协议
|
|
@@ -212,6 +231,17 @@
|
|
|
212
231
|
- 预览下一批次
|
|
213
232
|
- "继续吗?"
|
|
214
233
|
|
|
234
|
+
**检查点频率策略:**
|
|
235
|
+
- **阶段边界**:始终停止(必须)
|
|
236
|
+
- **批次边界**:默认停止 → 连续3次批准后,剩余阶段的批次大小扩大至5-8
|
|
237
|
+
- **遇到阻塞**:始终停止(必须)
|
|
238
|
+
|
|
239
|
+
**进度仪表板(在每个检查点包含):**
|
|
240
|
+
```
|
|
241
|
+
Phase: [当前阶段] | Batch: [N/M] | Tasks: [已完成/总数] ([%])
|
|
242
|
+
[████████░░] 80% — 下一步: [下一批次名称]
|
|
243
|
+
```
|
|
244
|
+
|
|
215
245
|
### 4-2. 方向变更
|
|
216
246
|
|
|
217
247
|
用户说"改变方向" → 返回 UNDERSTAND
|
|
@@ -71,8 +71,15 @@ AI agents optimize for speed, not correctness. Without structure, they skip unde
|
|
|
71
71
|
- Independent verification: each unit has a pass criterion
|
|
72
72
|
- Files specified: list files to create/modify per unit
|
|
73
73
|
- Dependencies noted: mark if unit depends on a previous one
|
|
74
|
-
9. **
|
|
75
|
-
|
|
74
|
+
9. **Assign size tags** to every task: [S] <30 LOC, [M] 30-100 LOC, [L] >100 LOC
|
|
75
|
+
- Batch composition: S+S+M = 1 batch, L = 1 batch alone
|
|
76
|
+
10. **Assign verification strategy** per task: `| Verify: TDD` or `| Verify: Build` or `| Verify: Visual`
|
|
77
|
+
11. **Pre-decomposition checklist**:
|
|
78
|
+
- Required types/interfaces have the necessary fields?
|
|
79
|
+
- External package APIs behave as expected?
|
|
80
|
+
- Cross-package dependencies identified and noted as prerequisites?
|
|
81
|
+
12. **Save plan** to `docs/plans/YYYY-MM-DD-<topic>.md`
|
|
82
|
+
13. **Get approval**: "Proceed with this plan?"
|
|
76
83
|
|
|
77
84
|
## E — EXECUTE
|
|
78
85
|
|
|
@@ -99,15 +106,21 @@ AI agents optimize for speed, not correctness. Without structure, they skip unde
|
|
|
99
106
|
|
|
100
107
|
## C — CHECKPOINT
|
|
101
108
|
|
|
102
|
-
|
|
109
|
+
20. After each batch, report using this format:
|
|
103
110
|
|
|
104
111
|
| Item | Before | After |
|
|
105
112
|
|------|--------|-------|
|
|
106
113
|
| [what changed] | [old behavior] | [new behavior] |
|
|
107
114
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
115
|
+
```
|
|
116
|
+
Phase: [current] | Batch: [N/M] | Tasks: [done/total] ([%])
|
|
117
|
+
[████████░░] 80% — Next: [next batch name]
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
21. Include: verification results, files modified, tests status
|
|
121
|
+
22. **Checkpoint policy**: after 3 consecutive approvals, increase batch size to 5-8 for the rest of the phase
|
|
122
|
+
23. Ask: "Continue to next batch?"
|
|
123
|
+
24. User can redirect, adjust scope, or stop at any checkpoint
|
|
111
124
|
|
|
112
125
|
## OMC Integration
|
|
113
126
|
|