@su-record/vibe 2.13.0 → 2.14.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.
Files changed (42) hide show
  1. package/CLAUDE.md +18 -15
  2. package/README.en.md +5 -3
  3. package/README.md +6 -4
  4. package/dist/cli/postinstall/constants.d.ts.map +1 -1
  5. package/dist/cli/postinstall/constants.js +1 -0
  6. package/dist/cli/postinstall/constants.js.map +1 -1
  7. package/dist/cli/setup/ProjectSetup.d.ts.map +1 -1
  8. package/dist/cli/setup/ProjectSetup.js +4 -3
  9. package/dist/cli/setup/ProjectSetup.js.map +1 -1
  10. package/dist/tools/index.d.ts +2 -0
  11. package/dist/tools/index.d.ts.map +1 -1
  12. package/dist/tools/index.js +2 -0
  13. package/dist/tools/index.js.map +1 -1
  14. package/dist/tools/loop/index.d.ts +6 -0
  15. package/dist/tools/loop/index.d.ts.map +1 -0
  16. package/dist/tools/loop/index.js +5 -0
  17. package/dist/tools/loop/index.js.map +1 -0
  18. package/dist/tools/loop/validateLoopDefinition.d.ts +38 -0
  19. package/dist/tools/loop/validateLoopDefinition.d.ts.map +1 -0
  20. package/dist/tools/loop/validateLoopDefinition.js +224 -0
  21. package/dist/tools/loop/validateLoopDefinition.js.map +1 -0
  22. package/dist/tools/loop/validateLoopDefinition.test.d.ts +14 -0
  23. package/dist/tools/loop/validateLoopDefinition.test.d.ts.map +1 -0
  24. package/dist/tools/loop/validateLoopDefinition.test.js +229 -0
  25. package/dist/tools/loop/validateLoopDefinition.test.js.map +1 -0
  26. package/hooks/scripts/__tests__/.vibe/command-log.txt +21 -0
  27. package/hooks/scripts/__tests__/.vibe/memories/memories.db-shm +0 -0
  28. package/hooks/scripts/__tests__/.vibe/memories/memories.db-wal +0 -0
  29. package/hooks/scripts/__tests__/keyword-detector.test.js +26 -18
  30. package/hooks/scripts/__tests__/loop-ledger.test.js +321 -0
  31. package/hooks/scripts/keyword-detector.js +22 -22
  32. package/hooks/scripts/lib/hook-context.js +31 -2
  33. package/hooks/scripts/lib/loop-ledger.js +118 -0
  34. package/hooks/scripts/loop-ledger.js +56 -0
  35. package/package.json +1 -1
  36. package/skills/vibe/SKILL.md +40 -23
  37. package/skills/vibe.loop/SKILL.md +116 -0
  38. package/skills/vibe.run/SKILL.md +22 -18
  39. package/skills/vibe.run/references/ralph-loop.md +18 -17
  40. package/skills/vibe.run/references/ultrawork-mode.md +36 -33
  41. package/vibe/rules/loop-contract.md +54 -0
  42. package/vibe/templates/loop-template.md +69 -0
@@ -1,24 +1,26 @@
1
- # ULTRAWORK Mode — Full Reference
1
+ # ULTRAWORK Mode — Automation Level Reference
2
2
 
3
3
  > Loaded by vibe.run SKILL.md when user includes `ultrawork` or `ulw` keyword.
4
+ >
5
+ > **루프 시맨틱(ANCHOR/ACT/JUDGE/RECORD/stuck/max_iterations)의 SSOT는 `vibe/rules/loop-contract.md`다.** `ultrawork`/`ulw`는 `automationLevel: autonomous` + 병렬 ACT의 deprecated 별칭이다. 루프 자체는 모든 실행의 기본 동작이며, ultrawork는 그 루프를 자율(비대화형)·병렬 모드로 돌리는 축을 제어한다.
4
6
 
5
- ## What ULTRAWORK Enables
7
+ ## What `automationLevel: autonomous` Enables
6
8
 
7
- When you include `ultrawork` (or `ulw`), ALL of these activate automatically:
9
+ `ultrawork` (또는 `ulw`, `.vibe/config.json`의 `automationLevel: autonomous`) 설정 활성화:
8
10
 
9
11
  | Feature | Description |
10
12
  |---------|-------------|
11
- | **Parallel Exploration** | 3+ Task(haiku) agents run simultaneously |
12
- | **Boulder Loop** | Auto-continues until ALL phases complete |
13
+ | **Parallel Exploration** | 3+ Task(haiku) agents run simultaneously (ACT 병렬화) |
14
+ | **Loop (기본 동작)** | 모든 실행의 기본 exit=게이트 통과 또는 stuck 또는 max_iterations |
13
15
  | **Context Compression** | Aggressive auto-save at 70%+ context |
14
- | **No Pause** | Doesn't wait for confirmation between phases |
16
+ | **No Pause** | stuck·SPEC 게이트 확인 없음 (`automationLevel: autonomous`) |
15
17
  | **External LLMs** | Auto-consults GPT/Antigravity if enabled |
16
- | **Error Recovery** | Loops until 100% or stuck; on stuck auto-records TODO and proceeds (no user prompt) |
17
- | **Race Review (v2.6.9)** | Multi-LLM review (GPT+Antigravity) with cross-validation |
18
+ | **Error Recovery** | stuck TODO 기록 다음으로 (사용자 질문 없음) |
19
+ | **Race Review** | Multi-LLM review (GPT+Antigravity) with cross-validation |
18
20
 
19
- ## Boulder Loop (Inspired by Sisyphus)
21
+ ## Boulder Loop Parallel ACT Visualization
20
22
 
21
- Like Sisyphus rolling the boulder, ULTRAWORK **keeps going until done**:
23
+ 루프 자체는 loop-contract의 기본 동작이다. Boulder Loop는 `automationLevel: autonomous`에서 **병렬 ACT**가 어떻게 실행되는지를 보여주는 다이어그램이다:
22
24
 
23
25
  ```
24
26
  ┌─────────────────────────────────────────────────────────────────┐
@@ -45,23 +47,24 @@ Like Sisyphus rolling the boulder, ULTRAWORK **keeps going until done**:
45
47
  │ ↓ ↓ │
46
48
  │ [Continue] [Complete!] │
47
49
  │ │
48
- NO STOPPING until acceptance criteria met or error limit hit
50
+ loop-contract EXIT: 게이트 통과 stuck max_iterations
49
51
  └─────────────────────────────────────────────────────────────────┘
50
52
  ```
51
53
 
52
- ## ULTRAWORK Example Session
54
+ ## Example Session (automationLevel: autonomous)
53
55
 
54
56
  ```
55
57
  User: /vibe.run "brick-game" ultrawork
56
58
 
57
59
  Claude:
58
- ULTRAWORK MODE ACTIVATED
60
+ AUTONOMOUS MODE (automationLevel: autonomous)
59
61
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
60
62
 
61
63
  SPEC: .vibe/specs/brick-game.md
62
64
  4 Phases detected
63
- Boulder Loop: ENABLED (will continue until all phases complete)
64
- Auto-retry: ON (loop until 100% or stuck → auto-TODO)
65
+ Loop: ENABLED (exit = 게이트 통과 | stuck | max_iterations=10)
66
+ Parallel ACT: ON
67
+ automationLevel: autonomous (stuck → auto-TODO, no confirmation)
65
68
  Context compression: AGGRESSIVE
66
69
 
67
70
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -101,37 +104,37 @@ Retries: 2
101
104
  Context saved: 3 checkpoints
102
105
  ```
103
106
 
104
- ## Normal vs ULTRAWORK Comparison
107
+ ## confirm vs autonomous Comparison
105
108
 
106
- | Aspect | Normal | ULTRAWORK |
107
- |--------|--------|-----------|
108
- | Phase transition | May pause | Auto-continues |
109
- | On error | Reports and stops | Auto-retries (3x) |
109
+ | Aspect | `automationLevel: confirm` (default) | `automationLevel: autonomous` (ultrawork) |
110
+ |--------|--------------------------------------|-------------------------------------------|
111
+ | Loop | ANCHOR→ACT→JUDGE→RECORD (기본 동작) | 동일 |
112
+ | Confirmation gates | stuck·SPEC에서 질문 | stuck 포함 전부 skip → TODO |
113
+ | On error | Reports, asks before retry | Auto-retries, auto-TODO on stuck |
110
114
  | Context 70%+ | Warning only | Auto-compress + save |
111
115
  | Exploration | Sequential possible | FORCED parallel |
112
- | Completion | Phase-by-phase | Until ALL done |
113
116
 
114
117
  ## Automation Level System
115
118
 
116
- Magic keywords in the user input automatically set the **AutomationLevel**, which controls how much the AI self-advances vs. pausing for confirmation.
119
+ **automationLevel**은 루프가 사람 개입 없이 얼마나 자율적으로 진행하는지를 제어한다. `.vibe/config.json`에서 설정하거나, deprecated 별칭 키워드로 런타임 오버라이드 가능.
117
120
 
118
121
  ### Level Definitions
119
122
 
120
- | Level | Name | Keyword(s) | Auto-advance | Auto-retry | Stuck Behavior | Parallel Agents | Checkpoints |
121
- |-------|------|------------|--------------|------------|----------------|-----------------|-------------|
123
+ | Level | Name | 설정 방법 | Auto-advance | Auto-retry | Stuck Behavior | Parallel Agents | Checkpoints |
124
+ |-------|------|-----------|--------------|------------|----------------|-----------------|-------------|
122
125
  | L0 | Manual | `manual` | No | No | Ask user every step | No | All |
123
- | L1 | Guided | `guided`, `verify` | No | No | Ask user on stuck | No | All |
124
- | L2 | Semi-auto | `quick` (default) | Yes | Yes (low cap: 2) | Ask user after 2 retries | No | Key points |
125
- | L3 | Auto | `ultrawork`, `ulw` | Yes | Yes (no cap) | Auto-TODO + proceed | Yes | Checkpoint-only |
126
- | L4 | Full-auto | `ralph`, `ralplan` | Yes | Yes (no cap) | Auto-TODO + proceed | Yes | None |
126
+ | L1 | Guided | `guided`, `verify`(deprecated) | No | No | Ask user on stuck | No | All |
127
+ | L2 | confirm | default | Yes | Yes (low cap: 2) | Ask user after 2 retries | No | Key points |
128
+ | L3 | autonomous | `automationLevel: autonomous` / `ultrawork`(dep) / `ulw`(dep) | Yes | Yes (no cap) | Auto-TODO + proceed | Yes | Checkpoint-only |
129
+ | L4 | Full-auto | `ralph`(deprecated) / `ralplan`(deprecated) | Yes | Yes (no cap) | Auto-TODO + proceed | Yes | None |
127
130
 
128
- ### Detection Rule
131
+ ### Detection Rule (deprecated aliases)
129
132
 
130
133
  ```
131
- /vibe.run "login" → L2 Semi-auto (default)
132
- /vibe.run "login" ultrawork → L3 Auto
133
- /vibe.run "login" ralph → L4 Full-auto
134
- /vibe.run "login" verify → L1 Guided
134
+ /vibe.run "login" → L2 confirm (default)
135
+ /vibe.run "login" ultrawork → L3 autonomous (deprecated alias)
136
+ /vibe.run "login" ralph → L4 Full-auto (deprecated alias, exit=coverage-100)
137
+ /vibe.run "login" verify → L1 Guided (deprecated alias)
135
138
  ```
136
139
 
137
140
  ### Confirmation Matrix
@@ -0,0 +1,54 @@
1
+ # Loop Contract — vibe 실행의 기본 계약 (SSOT)
2
+
3
+ > `/vibe`의 기본 동작은 **단계별 1회 실행이 아니라 완성까지의 루프**다.
4
+ > 루프가 기본이 될 수 있는 이유: 폭주 방어가 모델의 양심이 아니라 결정론적 가드(코드)이기 때문.
5
+ > 이 문서가 루프 시맨틱의 유일한 정의다 — ralph/Boulder/Convergence 등 과거 명칭은 전부 이 계약의 파라미터로 환원된다.
6
+
7
+ ## 적용 범위
8
+
9
+ - **적용**: 검증 가능한 목표가 있는 실행 — `vibe.run`, `vibe.verify`, `vibe.review`, `vibe.loop` 및 이들을 체인하는 `/vibe` 파이프라인
10
+ - **제외**: 단발 조회·생성 작업 (`vibe.docs`, `vibe.analyze`, `vibe.scaffold` 등) — 루프 의례를 강제하지 않는다
11
+
12
+ ## 계약
13
+
14
+ ```
15
+ /vibe {요구사항}
16
+ → SPEC 확정 ← 유일한 의무적 사람 개입 지점 (DONE의 정의 = REQ-ID + 수용 기준 승인)
17
+ → 루프:
18
+ ANCHOR 디스크에서 재고정: SPEC + run-ledger + scope.json (+ 직전 인박스)
19
+ ACT 파이프라인 실행 (스킬 체인)
20
+ JUDGE 결정론 판정만 인정: run-ledger verifyPassed │ 테스트 exit code │ RTM status
21
+ — 모델의 "완료했습니다" 자기 보고는 종료 조건이 될 수 없다
22
+ RECORD run-ledger(현재 회전) + loop-history.jsonl(회전 이력, 스케줄 루프)
23
+ → 종료(EXIT): 게이트 전부 통과 │ stuck │ max_iterations │ 예산 상한
24
+ ```
25
+
26
+ ### ANCHOR가 컨텍스트 오염 방어인 이유
27
+ 루프 상태는 컨텍스트가 아니라 디스크에 산다. 매 회전이 아티팩트에서 다시 시작하므로 컨텍스트가 오염되거나 compact로 소실돼도 루프는 깨지지 않으며, 회전마다 fresh 컨텍스트(서브에이전트)로 돌려도 된다.
28
+
29
+ ### stuck (결정론)
30
+ 연속 2회 회전의 발견(discover/findings) 해시가 동일 → 중단하고 사람에게 (`loop-ledger.js check-stuck`이 판정·기록). "다시 해보면 될 것 같다"는 모델 판단으로 무시 금지.
31
+
32
+ ## 파라미터 (기본값)
33
+
34
+ | 파라미터 | 기본 | 의미 |
35
+ |---|---|---|
36
+ | `max_iterations` | 10 | 회전 상한. 도달 시 잔여를 인박스로 이월 |
37
+ | `exit` | 게이트 통과 (P1=0 ∧ verifyPassed) | 종료 기준. coverage 100% 등으로 상향 가능 |
38
+ | `--interactive` | off | 단계별 확인 모드 (회전마다 사람 승인 — 과거의 기본값) |
39
+ | `--max-iter N` | — | 회전 상한 명시 (N=1이면 1회 시도) |
40
+ | `automationLevel` | `confirm` | `confirm`(SPEC·stuck에서 질문) / `autonomous`(기록 후 계속, 비대화형) — `.vibe/config.json` |
41
+
42
+ ## 금지 (루프 권한 경계)
43
+
44
+ 루프는 push·release·배포·버전 범프를 수행하지 않는다. 커밋은 auto-commit verify 게이트 통과 시만. 결과는 인박스(사람 리뷰 큐)로.
45
+
46
+ ## Deprecated 별칭 (하위 호환 매핑 — 새 문서에서 가르치지 않는다)
47
+
48
+ | 별칭 | 환원 |
49
+ |---|---|
50
+ | `ralph` | 기본 동작과 동일 (no-op). 굳이 구분하면 `exit: coverage-100` |
51
+ | `verify` | 기본 동작과 동일 (no-op) — JUDGE는 항상 결정론 검증 |
52
+ | `quick` | `--max-iter 1` + 최소 JUDGE |
53
+ | `ralplan` | 같은 계약을 계획 단계에 적용 |
54
+ | `ultrawork` / `ulw` | `automationLevel: autonomous` + 병렬 ACT — 루프 시맨틱이 아니라 자율성·병렬성 축 |
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: {loop-name}
3
+ trigger: scheduled
4
+ schedule: "0 2 * * *"
5
+ goal: "{사람이 읽는 루프 목표 — 한 문장}"
6
+ discover: |
7
+ {일거리를 발견하는 지시문.
8
+ 여러 줄 사용 가능.
9
+ 예: .vibe/regressions/open/*.md 를 스캔해 우선순위 높은 항목을 반환한다.}
10
+ pipeline:
11
+ - vibe.spec
12
+ - vibe.run
13
+ - vibe.verify
14
+ verify: ledger
15
+ max_iterations: 10
16
+ isolation: none
17
+ status: active
18
+ ---
19
+
20
+ # 루프: {loop-name}
21
+
22
+ ## 목적
23
+
24
+ {이 루프가 자동화하는 작업과 그 이유를 1–3문장으로 설명한다.}
25
+
26
+ ## Discover 상세
27
+
28
+ {`discover` frontmatter 필드의 상세 설명.
29
+ 루프 런타임이 어떤 소스를 보는지, 어떤 형식으로 항목이 반환되는지 기술한다.
30
+
31
+ 예시:
32
+ - 스캔 대상: `.vibe/regressions/open/`
33
+ - 반환 형식: `- REQ-XXX-NNN: 설명` 불릿 목록
34
+ - 빈 결과 처리: 항목 없을 시 루프 즉시 종료}
35
+
36
+ ## 항목별 파이프라인
37
+
38
+ {`pipeline` frontmatter에 나열된 각 스킬이 단일 항목에 대해 수행하는 작업을 설명한다.
39
+
40
+ | 단계 | 스킬 | 입력 | 출력 |
41
+ |------|------|------|------|
42
+ | 1 | vibe.spec | 항목 설명 | SPEC 파일 |
43
+ | 2 | vibe.run | SPEC | 구현 |
44
+ | 3 | vibe.verify | 구현 | 검증 결과 |
45
+ }
46
+
47
+ ## 종료 조건
48
+
49
+ {루프가 단일 항목 처리를 완료로 판정하는 조건을 명시한다.}
50
+
51
+ - `verify: ledger` — `.vibe/metrics/run-ledger.json`의 `verifyPassed === true` (모델 자기 보고 불가)
52
+ - `verify: tests` — `test_command` exit code 0
53
+ - `verify: none` — 파이프라인 마지막 스킬 완료 시
54
+ - 연속 2회 `discoverHash` 동일 → stuck으로 중단, 인박스 기록
55
+
56
+ ## 인박스 보고 형식
57
+
58
+ {각 반복 완료 후 `.vibe/loops/inbox.md`에 추가되는 항목 형식.}
59
+
60
+ ```
61
+ ## [{loop-name}] {YYYY-MM-DD HH:mm}
62
+
63
+ - **결과**: ok | fail | stuck
64
+ - **처리한 항목**: {항목 설명}
65
+ - **검증 상태**: verifyPassed=true | false
66
+ - **리뷰 필요**: {사람이 확인해야 할 사항. 없으면 "없음"}
67
+ ```
68
+
69
+ > 루프는 push·release·배포를 수행하지 않는다. auto-commit verify 게이트 통과 시 커밋까지만.