deel-local-cli 1.15.0 → 1.16.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.
- package/README.ko.md +70 -13
- package/README.md +71 -13
- package/bin/deel.js +45 -1
- package/package.json +1 -1
- package/src/acp/jsonrpc.js +23 -0
- package/src/acp/serve.js +62 -5
- package/src/agent/asks.js +58 -2
- package/src/agent/budget.js +33 -0
- package/src/agent/effort.js +69 -0
- package/src/agent/loop.js +10 -2
- package/src/agent/modes.js +179 -17
- package/src/agent/route.js +119 -8
- package/src/backend/adapter.js +56 -5
- package/src/cmdnames.js +1 -0
- package/src/commands.js +31 -13
- package/src/completion.js +1 -0
- package/src/i18n/en.js +13 -0
- package/src/i18n/ja.js +13 -0
- package/src/i18n/ko.js +13 -0
- package/src/i18n/zh.js +13 -0
- package/src/tools/doc2md.js +266 -0
- package/src/tools/docs.js +14 -4
- package/src/tools/fig.js +393 -0
- package/src/tools/index.js +49 -8
- package/src/tools/kiwi.js +293 -0
package/src/agent/asks.js
CHANGED
|
@@ -93,6 +93,59 @@ const 시킴꼴 = /(줘|주세요|주라|해라|하라|하자|해다오|할래|
|
|
|
93
93
|
// 줄머리 표. 번호(1. 2))·글머리(- * ·)·동그라미 숫자.
|
|
94
94
|
const 줄머리 = /^\s*(?:(\d{1,2})\s*[.)]|[-*·▪️•]|[①-⑮])\s+/;
|
|
95
95
|
|
|
96
|
+
/*
|
|
97
|
+
* ── 시킨 것이 아니라 **조건**인 줄 ─────────────────────────────────────
|
|
98
|
+
*
|
|
99
|
+
* 실제로 이렇게 틀렸다. 사람이 친 말은 이랬다 —
|
|
100
|
+
*
|
|
101
|
+
* 이 기능을 분석해서 … 부분을 찾아줘.
|
|
102
|
+
* 각 문제마다 관련 파일과 함수, 발생 조건, 원인을 설명해줘.
|
|
103
|
+
* 코드는 수정하지 마.
|
|
104
|
+
* 최대 5개까지만 찾아줘.
|
|
105
|
+
*
|
|
106
|
+
* 네 줄 중 셋이 시킴꼴이라 **항목 셋**으로 잡혔고, 마지막 줄이 자국에 안
|
|
107
|
+
* 닿아서 이런 말이 나갔다 —
|
|
108
|
+
*
|
|
109
|
+
* 「시킨 것 중 1가지에 아직 손도 안 댔습니다: 3. 최대 5개까지만 찾아줘.
|
|
110
|
+
* 지금 하세요.」
|
|
111
|
+
*
|
|
112
|
+
* 그런데 「최대 5개까지만」 은 **할 일이 아니라 1번에 붙은 조건**이다. 이미
|
|
113
|
+
* 지킨 것을 안 했다고 말한 것이고, 이 파일 맨 위에 「제일 나쁘다」 고 적어
|
|
114
|
+
* 둔 바로 그 짓이다 — 한 번 이러면 그 뒤로 이 검사를 아무도 안 믿는다.
|
|
115
|
+
*
|
|
116
|
+
* ── 어떻게 가르나 ───────────────────────────────────────────────────────
|
|
117
|
+
*
|
|
118
|
+
* 낱말로 가른다. 그 줄에서 **알맹이를 다 빼고 나면 무엇이 남는가.** 수와
|
|
119
|
+
* 한계말과 「찾아줘」 같은 맨 동사밖에 안 남으면, 그 줄은 무엇을 하라는
|
|
120
|
+
* 말이 아니라 얼마나 하라는 말이다.
|
|
121
|
+
*
|
|
122
|
+
* 이렇게 하면 진짜 할 일은 안 걸린다 — 「테스트 최대 10개 만들어줘」 에는
|
|
123
|
+
* '테스트' 가 남아서 조건이 아니다. 가르는 자리를 수가 아니라 **남는 알맹이**
|
|
124
|
+
* 에 두었기 때문이다.
|
|
125
|
+
*/
|
|
126
|
+
const 한계말 = new Set([
|
|
127
|
+
'최대', '최소', '많아야', '적어도', '이내', '이하', '이상', '까지', '정도', '넘게',
|
|
128
|
+
'최대한', '이상은', '개', '가지', '건', '줄', '짧게', '간단히', '간결하게', '되도록',
|
|
129
|
+
'max', 'min', 'most', 'least', 'only', 'up',
|
|
130
|
+
]);
|
|
131
|
+
// 무엇을 하라는 말이 아니라 그냥 「내놔라」 인 동사들. 이것만 남으면 알맹이가 없다.
|
|
132
|
+
const 맨동사 = new Set([
|
|
133
|
+
'찾아줘', '찾아', '찾기', '골라줘', '골라', '뽑아줘', '뽑아', '적어줘', '적어',
|
|
134
|
+
'알려줘', '보여줘', '제시해', '제시', '내줘', '달라', '말해줘', '써줘',
|
|
135
|
+
]);
|
|
136
|
+
// 「…하지 마」 는 무슨 일이 있어도 할 일이 아니다. 안 하는 것이 다 한 것이다.
|
|
137
|
+
const 하지마 = /(?:하지|치지|시키지|되지|넣지|쓰지|고치지|바꾸지|건드리지|만지지)\s*(?:는)?\s*(?:마|말)/;
|
|
138
|
+
const 하지마En = /\b(?:do not|don'?t|never|without)\b/i;
|
|
139
|
+
|
|
140
|
+
/** 이 줄이 할 일이 아니라 그 일에 붙은 조건인가. */
|
|
141
|
+
export function 조건줄인가(글) {
|
|
142
|
+
const s = String(글 ?? '');
|
|
143
|
+
if (하지마.test(s) || 하지마En.test(s)) return true;
|
|
144
|
+
const 낱말 = 알맹이낱말(s);
|
|
145
|
+
if (!낱말.length) return false; // 잴 것이 없으면 안 건다 — 빠진것 이 따로 거른다
|
|
146
|
+
return 낱말.every((w) => 한계말.has(w) || 맨동사.has(w) || /^\d/.test(w));
|
|
147
|
+
}
|
|
148
|
+
|
|
96
149
|
/**
|
|
97
150
|
* 시킨 것을 항목으로 쪼갠다.
|
|
98
151
|
*
|
|
@@ -100,6 +153,9 @@ const 줄머리 = /^\s*(?:(\d{1,2})\s*[.)]|[-*·▪️•]|[①-⑮])\s+/;
|
|
|
100
153
|
* 문장 하나를 쉼표로 더 쪼개지는 않는다. 쪼갤수록 없는 항목이 생기고,
|
|
101
154
|
* 없는 항목을 "안 했다" 고 말하는 것이 제일 나쁘다.
|
|
102
155
|
*
|
|
156
|
+
* 조건인 줄은 항목에서 뺀다(조건줄인가). 개수 제한과 금지는 **지켰을 때
|
|
157
|
+
* 자국이 안 남는** 종류라, 그대로 두면 지킨 것이 안 한 것으로 잡힌다.
|
|
158
|
+
*
|
|
103
159
|
* @returns {Array<{번호:number, 글:string}>}
|
|
104
160
|
*/
|
|
105
161
|
export function 요청항목들(요청) {
|
|
@@ -111,12 +167,12 @@ export function 요청항목들(요청) {
|
|
|
111
167
|
const m = 줄머리.exec(줄);
|
|
112
168
|
if (!m) continue;
|
|
113
169
|
const 글 = 줄.slice(m[0].length).trim();
|
|
114
|
-
if (글) 표붙은것.push(글);
|
|
170
|
+
if (글 && !조건줄인가(글)) 표붙은것.push(글);
|
|
115
171
|
}
|
|
116
172
|
if (표붙은것.length >= 2) return 표붙은것.map((글, i) => ({ 번호: i + 1, 글 }));
|
|
117
173
|
|
|
118
174
|
// 2) 표는 없지만 줄마다 시키는 꼴
|
|
119
|
-
const 시킨줄 = 줄들.map((l) => l.trim()).filter((l) => l && 시킴꼴.test(l));
|
|
175
|
+
const 시킨줄 = 줄들.map((l) => l.trim()).filter((l) => l && 시킴꼴.test(l) && !조건줄인가(l));
|
|
120
176
|
if (시킨줄.length >= 2) return 시킨줄.map((글, i) => ({ 번호: i + 1, 글 }));
|
|
121
177
|
|
|
122
178
|
return [];
|
package/src/agent/budget.js
CHANGED
|
@@ -33,6 +33,18 @@ const 걸음규칙 = {
|
|
|
33
33
|
ask: { 배수: 0.25, 최소: 4, 최대: 12 },
|
|
34
34
|
plan: { 배수: 0.6, 최소: 8, 최대: 40 },
|
|
35
35
|
architect: { 배수: 0.7, 최소: 8, 최대: 48 },
|
|
36
|
+
/*
|
|
37
|
+
* 점검은 **묻기보다 훨씬 넉넉해야** 한다.
|
|
38
|
+
*
|
|
39
|
+
* 이 값이 왜 여기 적혀 있는지가 중요하다. 같은 일이 묻기(ask)로 갔을 때
|
|
40
|
+
* 걸음이 열두 번에서 멈췄다 — 배수 0.25 에 최대 12 라, 창이 200k 여도 12 다.
|
|
41
|
+
* 파일 열 개를 훑어야 하는 점검에 열두 걸음이면 절반쯤 보고 답을 낸다.
|
|
42
|
+
* 그런데 화면에는 「다 봤다」 와 구별되는 표시가 아무것도 안 뜬다.
|
|
43
|
+
*
|
|
44
|
+
* 설계보다도 넉넉히 준다. 설계는 몇 파일의 관계를 보면 되지만 점검은
|
|
45
|
+
* **다 뒤져야** 한다 — 안 본 자리에 있는 결함은 없는 것과 같다.
|
|
46
|
+
*/
|
|
47
|
+
inspect: { 배수: 1.2, 최소: 16, 최대: 120 },
|
|
36
48
|
auto: { 배수: 1.5, 최소: 16, 최대: 200 },
|
|
37
49
|
code: { 배수: 1.5, 최소: 16, 최대: 200 },
|
|
38
50
|
debug: { 배수: 2, 최소: 16, 최대: 250 },
|
|
@@ -101,6 +113,27 @@ export function 웹글자수(ctx) {
|
|
|
101
113
|
return 사이(k(ctx) * 400, 4000, 120000);
|
|
102
114
|
}
|
|
103
115
|
|
|
116
|
+
/**
|
|
117
|
+
* 도구 하나가 한 번에 돌려줄 글자 수.
|
|
118
|
+
*
|
|
119
|
+
* ── 여기만 고정 숫자로 남아 있었다 ──────────────────────────────────────
|
|
120
|
+
*
|
|
121
|
+
* 이 파일 맨 위에 「고정한 것 자체가 틀린 것」 이라고 적어 놓고, 정작 도구
|
|
122
|
+
* 결과 상한만 30,000자로 박혀 있었다(tools/index.js 의 MAX_OUT). 그쪽 주석은
|
|
123
|
+
* 「모델에 맞춰 정한다」 고 말하고 있었으므로, 글과 코드가 서로 다른 말을
|
|
124
|
+
* 하는 자리이기도 했다.
|
|
125
|
+
*
|
|
126
|
+
* 8k 짜리 모델에 30,000자면 한 번으로 창이 넘친다. 넘치면 접히고, 접히면
|
|
127
|
+
* 앞엣말을 잊는다 — 화면에는 아무 표시가 없고, 사람 눈에는 그냥 "모델이
|
|
128
|
+
* 멍청해졌다" 로 보인다. 이 파일이 없애려던 고장이 바로 그것이다.
|
|
129
|
+
*
|
|
130
|
+
* 큰 창에서는 여태와 같은 값에 선다(30,000). 그 자리는 문제가 없었고,
|
|
131
|
+
* 문제 없던 자리를 같이 바꾸면 무엇이 좋아졌는지 못 가린다.
|
|
132
|
+
*/
|
|
133
|
+
export function 한번에낼글자수(ctx) {
|
|
134
|
+
return 사이(k(ctx) * 160, 2000, 30000);
|
|
135
|
+
}
|
|
136
|
+
|
|
104
137
|
/**
|
|
105
138
|
* 하위 작업이 돌 걸음 수.
|
|
106
139
|
*
|
package/src/agent/effort.js
CHANGED
|
@@ -180,6 +180,75 @@ export function 가벼운가(글) {
|
|
|
180
180
|
return true;
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
+
/*
|
|
184
|
+
* ── 반대쪽 문: **깊이 봐야 하는 말** ────────────────────────────────────
|
|
185
|
+
*
|
|
186
|
+
* 위 `가벼운가` 는 강도를 내리는 문이다. 이건 그 문을 **잠그는** 자리다.
|
|
187
|
+
*
|
|
188
|
+
* 왜 필요한가 — 모드가 강도를 낮추는 자리가 있다(modes.js 의 묻기: low).
|
|
189
|
+
* 그 값이 옳은 자리는 "이 함수 뭐야?" 같은 한 줄짜리다. 그런데 무엇이
|
|
190
|
+
* 묻기 모드로 가는지는 낱말이 정한다(route.js). "…설명해줘" 한 마디면
|
|
191
|
+
* 간다. 그래서 이런 것도 같이 갔다 —
|
|
192
|
+
*
|
|
193
|
+
* 「이 프로젝트의 공동작업 기능을 분석해서 동시 편집 시 데이터 손실,
|
|
194
|
+
* 덮어쓰기, 충돌 또는 상태 불일치가 발생할 가능성이 있는 부분을 찾아줘.
|
|
195
|
+
* 실제 코드 근거가 있는 문제만 제시하고 각 문제마다 관련 파일과 함수,
|
|
196
|
+
* 발생 조건, 원인을 설명해줘. 코드는 수정하지 마. 최대 5개까지만 찾아줘.」
|
|
197
|
+
*
|
|
198
|
+
* 파일 열 개를 읽고 경합 조건을 짚어야 하는 일인데, 「짧게 답하라」 는 글과
|
|
199
|
+
* `low` 를 달고 돌았다. 재 보면 이렇다 — 같은 프로젝트, 같은 질문 —
|
|
200
|
+
*
|
|
201
|
+
* 생각 블록: 이쪽 0자 · 깊게 본 쪽 165,000자
|
|
202
|
+
*
|
|
203
|
+
* 값이 5분의 1이면 싼 것이지만, **답이 다르면 싼 게 아니다.**
|
|
204
|
+
*
|
|
205
|
+
* ── 무엇으로 가르나 ─────────────────────────────────────────────────────
|
|
206
|
+
*
|
|
207
|
+
* 시킨 말의 **모양**으로 가른다. 줄이 여럿이면 시킨 것이 여럿이고, 길면
|
|
208
|
+
* 조건이 붙어 있고, 살펴보라는 낱말이 있으면 읽어야 답이 나온다. 셋 중
|
|
209
|
+
* 하나면 충분하다 — 틀리는 방향이 「조금 더 생각한다」 쪽이라 값이 싸다.
|
|
210
|
+
*/
|
|
211
|
+
const 살펴보라는말 = /분석|검토|감사|점검|진단|살펴|파헤|훑어|짚어|찾아|가능성|위험|취약|누락|경합|충돌|불일치|원인|근거|비교|추적|audit|review|analy[sz]e|investigat|assess|diagnos|vulnerab|race\s*condition|compare|trace/i;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* 얕게 보면 안 되는 말인가.
|
|
215
|
+
*
|
|
216
|
+
* `가벼운가` 의 반대말이 아니다. 둘 다 아닌 말이 대부분이고, 그때는 아무것도
|
|
217
|
+
* 안 움직인다 — 사람이 정한 천장 그대로 간다.
|
|
218
|
+
*/
|
|
219
|
+
export function 무거운가(글) {
|
|
220
|
+
const s = String(글 ?? '').trim();
|
|
221
|
+
if (!s || 인사인가(s)) return false;
|
|
222
|
+
// 줄이 여럿이면 시킨 것이 여럿이다. 빈 줄은 안 센다 — 붙여넣기에 흔하다.
|
|
223
|
+
if (s.split(/\r?\n/).filter((l) => l.trim()).length >= 3) return true;
|
|
224
|
+
// 길면 조건이 붙어 있다. 조건이 붙은 말을 얕게 읽으면 조건부터 떨어진다.
|
|
225
|
+
if (s.length >= 200) return true;
|
|
226
|
+
// 짧아도 살펴보라는 말이면 읽어야 답이 나온다. 한 마디짜리는 뺀다.
|
|
227
|
+
// 스무 자다. 한국어는 빽빽해서 「공동작업 쪽에 경합 조건 있는지 좀 봐줘」 가 스물둘이다 —
|
|
228
|
+
// 마흔으로 잡으면 진짜 일이 가벼운 쪽으로 떨어진다. 틀리는 값이 한쪽은
|
|
229
|
+
// 「조금 더 생각한다」 이고 다른 쪽은 「얕게 답한다」 라, 싼 쪽으로 기운다.
|
|
230
|
+
return s.length >= 20 && 살펴보라는말.test(s);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* 이번 턴의 **천장** — 모드가 정한 값과 사람이 정한 값 중에서 고른다.
|
|
235
|
+
*
|
|
236
|
+
* 모드가 더 세게 보라고 하면 그대로 따른다(설계·디버그·계획·점검). 그건
|
|
237
|
+
* 「이 일은 원래 깊다」 는 말이고, 사람이 손대지 않은 기본값보다 그 말이 낫다.
|
|
238
|
+
*
|
|
239
|
+
* 모드가 **낮출 때**만 한 번 더 본다. 낮추는 것이 맞는 자리는 한 줄짜리
|
|
240
|
+
* 물음이고, 시킨 것이 여럿이거나 살펴보라는 말이면 그 자리가 아니다.
|
|
241
|
+
* 그때는 사람이 정한 값으로 돌아간다 — 모드가 낮추기 전의 자리다.
|
|
242
|
+
*/
|
|
243
|
+
export function 천장고르기(모드think, 세션think, 요청 = '') {
|
|
244
|
+
const 세션 = LEVELS.includes(세션think) ? 세션think : 'medium';
|
|
245
|
+
// 끈 것은 모드가 못 켠다. `off` 는 기본값이 아니라 사람이 고른 값이다.
|
|
246
|
+
if (세션 === 'off') return 'off';
|
|
247
|
+
if (!모드think || !LEVELS.includes(모드think)) return 세션;
|
|
248
|
+
if (LEVELS.indexOf(모드think) >= LEVELS.indexOf(세션)) return 모드think;
|
|
249
|
+
return 무거운가(요청) ? 세션 : 모드think;
|
|
250
|
+
}
|
|
251
|
+
|
|
183
252
|
/**
|
|
184
253
|
* 이번 턴의 기준 강도.
|
|
185
254
|
*
|
package/src/agent/loop.js
CHANGED
|
@@ -5,7 +5,7 @@ import { 그림메시지 } from '../backend/vision.js';
|
|
|
5
5
|
import { 어떻게할까 } from '../safety/policy.js';
|
|
6
6
|
import { toolSchemas, runTool, TOOLS, 파일현황 } from '../tools/index.js';
|
|
7
7
|
import { isMutating } from '../safety/guard.js';
|
|
8
|
-
import { effortFor, tokensFor, fullCap, wasCut, shiftLevel, 자동강도, 인사인가 as 인사말인가 } from './effort.js';
|
|
8
|
+
import { effortFor, tokensFor, fullCap, wasCut, shiftLevel, 자동강도, 천장고르기, 인사인가 as 인사말인가 } from './effort.js';
|
|
9
9
|
import { 배울전선, 카드고치기, 카드저장꼴, 전선붙이기 } from '../backend/wire.js';
|
|
10
10
|
import { 살린쓰기 } from './salvage.js';
|
|
11
11
|
import { 배울것, 길이문제인가 } from '../backend/learn.js';
|
|
@@ -407,7 +407,15 @@ export async function* run(session, ctx, userText, { signal = null, 깊이 = 0,
|
|
|
407
407
|
* 한 번 정하면 이 턴 안에서는 안 바꾼다. while 바깥에서 정하는 것이 그
|
|
408
408
|
* 뜻이다 — 걸음마다 흔들리면 그것이 곧 캐시가 매번 새로 엮인다는 말이다.
|
|
409
409
|
*/
|
|
410
|
-
|
|
410
|
+
/*
|
|
411
|
+
* 모드가 정한 강도는 **가벼운 말에만** 낮춘다 (effort.js 의 천장고르기).
|
|
412
|
+
*
|
|
413
|
+
* 묻기 모드는 low 다. "이 함수 뭐야?" 에는 맞는 값이다. 그런데 무엇이
|
|
414
|
+
* 묻기로 가는지는 낱말이 정하고(route.js), "…설명해줘" 한 마디면 간다.
|
|
415
|
+
* 그래서 파일 열 개를 읽고 경합 조건을 짚어야 하는 일까지 low 로 돌았다 —
|
|
416
|
+
* 생각 블록이 0자로 나가고, 답이 그만큼 얕았다.
|
|
417
|
+
*/
|
|
418
|
+
const 천장 = session.thinkSet ? session.think : 천장고르기(모드.think, session.think, userText);
|
|
411
419
|
const think = 자동강도(userText, 천장, {
|
|
412
420
|
대화크기: session.messages.length,
|
|
413
421
|
켜짐: session.autoThink !== false,
|
package/src/agent/modes.js
CHANGED
|
@@ -50,6 +50,53 @@ const 확인 = ['Verify'];
|
|
|
50
50
|
*/
|
|
51
51
|
const 쪼개기 = ['Task'];
|
|
52
52
|
|
|
53
|
+
/*
|
|
54
|
+
* ── 남의 코드를 읽는 법 ─────────────────────────────────────────────────
|
|
55
|
+
*
|
|
56
|
+
* 모드마다 따로 적지 않는다. 따로 적으면 언젠가 한쪽만 고쳐지고, 그때부터
|
|
57
|
+
* 「모드에 따라 읽는 법이 다르다」 는 없던 규칙이 생긴다.
|
|
58
|
+
*
|
|
59
|
+
* 프롬프트에는 **한 번에 한 모드의 글만** 실리므로, 여기 모아 둬도 전선에
|
|
60
|
+
* 나가는 양은 똑같다.
|
|
61
|
+
*
|
|
62
|
+
* ── 왜 이 두 줄인가 ─────────────────────────────────────────────────────
|
|
63
|
+
*
|
|
64
|
+
* 같은 프로젝트에 같은 질문을 두 벌 돌려서 재 봤다. 갈린 자리가 여기였다.
|
|
65
|
+
*
|
|
66
|
+
* 통째로 읽은 쪽: 도구 결과 10개, 평균 14,000자. 한 번은 상한(30,000자)에
|
|
67
|
+
* 걸려 잘렸다. 자른 것은 아무도 안 말해 준다.
|
|
68
|
+
* 좁게 읽은 쪽: 도구 결과 30여 개, 평균 5,000자. 같은 자리를 두 번 읽은
|
|
69
|
+
* 적이 없다.
|
|
70
|
+
*
|
|
71
|
+
* 창에 부어 넣은 양은 앞쪽이 세 배인데, 답이 얕았다. 많이 넣는 것과 많이
|
|
72
|
+
* 아는 것은 다르다 — 앞엣것이 접혀 나가면 안 읽은 것과 같아진다.
|
|
73
|
+
*
|
|
74
|
+
* 두 번째 줄(나란히 부르기)은 값이 아니라 **시간**이다. 읽기 도구는 같이
|
|
75
|
+
* 돌게 되어 있는데(loop.js 의 묶기), 한 개씩 부르면 그 수만큼 왕복이 는다.
|
|
76
|
+
*/
|
|
77
|
+
const 읽는법 = [
|
|
78
|
+
'- 남의 코드는 Outline 으로 모양부터 본다. Grep 으로 그 말이 닿는 자리를 다 모은 뒤,',
|
|
79
|
+
' **짚은 자리 앞뒤만** Read 한다 (offset·limit). 통째로 읽지 마라 — 한 번에 다',
|
|
80
|
+
' 부어 넣으면 뒤로 갈수록 앞엣것이 접혀 나가고, 잊은 채로 「없다」 고 답하게 된다.',
|
|
81
|
+
'- 서로 상관없는 읽기는 **한 번에 같이 부른다.** 읽기 도구는 나란히 돈다.',
|
|
82
|
+
' 한 개씩 부르면 그 수만큼 왕복이 늘고, 그게 그대로 사람이 기다리는 시간이다.',
|
|
83
|
+
];
|
|
84
|
+
const 읽는법짧게 = [
|
|
85
|
+
'- 남의 코드는 Outline → Grep → **짚은 자리 앞뒤만** Read (offset·limit). 통째로 읽지 마라.',
|
|
86
|
+
'- 상관없는 읽기는 한 번에 같이 부른다 — 나란히 돈다.',
|
|
87
|
+
];
|
|
88
|
+
const 읽는법En = [
|
|
89
|
+
'- For code you did not write, get the shape with Outline. Use Grep to gather every place it touches,',
|
|
90
|
+
' then Read **only around the lines you found** (offset/limit). Do not read whole files - pour it all',
|
|
91
|
+
' in at once and the earlier turns fold away, and you answer having forgotten them.',
|
|
92
|
+
'- Fire unrelated reads **together in one message.** Read tools run side by side; one call at a time',
|
|
93
|
+
' adds that many round trips, and that is the waiting the person feels.',
|
|
94
|
+
];
|
|
95
|
+
const 읽는법짧게En = [
|
|
96
|
+
'- Code you did not write: Outline -> Grep -> Read **only around what you found** (offset/limit). Never whole files.',
|
|
97
|
+
'- Fire unrelated reads together in one message - they run side by side.',
|
|
98
|
+
];
|
|
99
|
+
|
|
53
100
|
import { 언어, 지시말 } from '../i18n/index.js';
|
|
54
101
|
|
|
55
102
|
export const MODES = {
|
|
@@ -64,8 +111,8 @@ export const MODES = {
|
|
|
64
111
|
auto: {
|
|
65
112
|
id: 'auto',
|
|
66
113
|
hintEn: "picks the right mode for what you ask",
|
|
67
|
-
sayEn: "You are in **Auto** mode. What comes next is not fixed.\n\n- Work out what kind of job this is first, then do it that way.\n If it is an edit, read before editing. If it is a diagnosis, confirm before concluding.\n If it is an explanation, back it with the files.\n- For a large job, break it into steps with TodoWrite and **finish everything you wrote down.**\n Do not write the list and then ask. If there are several chunks, hand them off with Task —\n a subtask runs in its own window, so yours does not fill up.\n- For code you did not write,
|
|
68
|
-
say짧게En: "**Auto** mode. What comes next is not fixed.\n- Work out what kind of job this is, then do it that way.\n- Large job: break it up with TodoWrite and **finish it all.** Several chunks: hand off with Task.\n- Code you did not write: Outline
|
|
114
|
+
sayEn: "You are in **Auto** mode. What comes next is not fixed.\n\n- Work out what kind of job this is first, then do it that way.\n If it is an edit, read before editing. If it is a diagnosis, confirm before concluding.\n If it is an explanation, back it with the files.\n- For a large job, break it into steps with TodoWrite and **finish everything you wrote down.**\n Do not write the list and then ask. If there are several chunks, hand them off with Task —\n a subtask runs in its own window, so yours does not fill up.\n- For code you did not write, get the shape with Outline. Use Grep to gather every place it\n touches, then Read **only around the lines you found** (offset/limit). Do not read whole\n files - pour it all in at once and the earlier turns fold away, and you answer having\n forgotten them.\n- Fire unrelated reads **together in one message.** Read tools run side by side; one call at\n a time adds that many round trips, and that is the waiting the person feels.\n- Making several files: one Write call (files array). Do not call it once per file.\n Several places to edit: one Edit call the same way (edits array).\n- Commands that never end (dev servers, watch) need background: true on Bash. Called plainly\n they die on timeout. After starting one, read its output with Jobs, and end it with Jobs when done.\n- Verify what can be verified — call Verify. Do not call something done that you did not check.\n- Do what the job needs. Do not start work the job did not ask for.",
|
|
115
|
+
say짧게En: "**Auto** mode. What comes next is not fixed.\n- Work out what kind of job this is, then do it that way.\n- Large job: break it up with TodoWrite and **finish it all.** Several chunks: hand off with Task.\n- Code you did not write: Outline -> Grep -> Read **only around what you found** (offset/limit).\n- Fire unrelated reads together in one message - they run side by side.\n- Several files: one Write (files array). Several edits: one Edit (edits array).\n- Commands that never end (dev server, watch): background: true on Bash. Read with Jobs, end with Jobs.\n- Verify before you finish. Do not call something done that you did not check.",
|
|
69
116
|
name: '종합',
|
|
70
117
|
en: 'Auto',
|
|
71
118
|
glyph: '◎',
|
|
@@ -78,7 +125,7 @@ export const MODES = {
|
|
|
78
125
|
'**종합** 모드다. 무슨 일이 올지 정해져 있지 않다.',
|
|
79
126
|
'- 무슨 일인지 먼저 가늠하고 그에 맞게 해라.',
|
|
80
127
|
'- 큰 일이면 TodoWrite 로 쪼개 적고 **다 끝낸다.** 덩이가 여럿이면 Task 로 떼어 준다.',
|
|
81
|
-
|
|
128
|
+
...읽는법짧게,
|
|
82
129
|
'- 파일 여러 개는 Write 한 번에 (files 배열), 고칠 자리 여럿은 Edit 한 번에 (edits 배열).',
|
|
83
130
|
'- 끝내지 않는 명령(dev 서버·watch)은 Bash 에 background: true. Jobs 로 읽고 끝낸다.',
|
|
84
131
|
'- 끝내기 전에 Verify. 확인 못 한 것을 됐다고 하지 마라.',
|
|
@@ -91,7 +138,7 @@ export const MODES = {
|
|
|
91
138
|
' 설명하는 일이면 근거를 파일에서 대라.',
|
|
92
139
|
'- 큰 일이면 TodoWrite 로 쪼개 적고 **적은 것을 다 끝낸다.** 적어 놓고 묻지 마라.',
|
|
93
140
|
' 덩이가 여럿이면 Task 로 떼어 준다 — 하위는 제 창에서 돌아 네 창이 안 찬다.',
|
|
94
|
-
|
|
141
|
+
...읽는법,
|
|
95
142
|
'- 파일을 여러 개 만들 때는 Write 한 번에 (files 배열). 한 개씩 부르지 마라.',
|
|
96
143
|
' 고칠 자리가 여러 군데일 때도 마찬가지로 Edit 한 번에 (edits 배열).',
|
|
97
144
|
'- 끝나지 않는 명령(dev 서버·watch)은 Bash 에 background: true 를 준다. 그냥 부르면',
|
|
@@ -104,8 +151,8 @@ export const MODES = {
|
|
|
104
151
|
code: {
|
|
105
152
|
id: 'code',
|
|
106
153
|
hintEn: "edits and builds",
|
|
107
|
-
sayEn: "This is **implementation**. Follow this order.\n\n1. For code you did not write, look at the **shape first** with Outline
|
|
108
|
-
say짧게En: "**Implementation.** Follow this order.\n1. Code you did not write: Outline
|
|
154
|
+
sayEn: "This is **implementation**. Follow this order.\n\n1. For code you did not write, look at the **shape first** with Outline - a folder through\n Outline is a fraction of the size. Grep to gather every place the thing you are changing\n touches, then Read **only around the lines you found** (offset/limit). Never whole files.\n Fire unrelated reads **together in one message** - read tools run side by side.\n2. Always Read a file before editing it. The tool refuses an edit to a file you have not read.\n3. Follow the conventions of the surrounding code — naming, error handling, comment density.\n Do not import a new convention. Do what this code already does.\n4. Make and change every file the job needs. Do not touch one file and stop.\n For something new, lay out the folder structure first and create **several files in one Write**\n (files array). Several places to change go in **one Edit** (edits array).\n One call per item adds that many round trips, and minutes go with them.\n5. If the work splits into separate strands, hand a chunk off with Task.\n A subtask runs in its own window and returns only a summary — your window does not fill up.\n6. **Call Verify before you finish.** A file existing and a file working are different things.\n Fix what comes back and call it again. Say \"I could not verify this\" for anything you did not check.\n For things you only learn by running (dev servers, watch), give Bash **background: true**.\n Called plainly they never end and die on timeout. Read output with Jobs, and always end it\n with Jobs when done — otherwise that server keeps holding the port.\n7. When done, say what you changed and why in a line or two. Do not paste the code back.",
|
|
155
|
+
say짧게En: "**Implementation.** Follow this order.\n1. Code you did not write: Outline -> Grep -> Read **only around what you found** (offset/limit).\n Fire unrelated reads together in one message - they run side by side.\n2. Always Read a file before editing it.\n3. Follow the surrounding conventions. Do not import a new one.\n4. Several files: one Write (files array). Several edits: one Edit (edits array).\n5. Several strands: hand off with Task.\n6. **Verify before you finish.** Fix what comes back and call it again.\n If it must be run, Bash with background: true — called plainly it dies on timeout. Read with Jobs, end with Jobs.\n7. Say what changed and why in a line or two. Do not paste code.",
|
|
109
156
|
name: '코드',
|
|
110
157
|
en: 'Code',
|
|
111
158
|
glyph: '◆',
|
|
@@ -116,7 +163,8 @@ export const MODES = {
|
|
|
116
163
|
|
|
117
164
|
say짧게: [
|
|
118
165
|
'**구현**이다. 이 순서를 지켜라.',
|
|
119
|
-
'1. 남의 코드면 Outline
|
|
166
|
+
'1. 남의 코드면 Outline → Grep → **짚은 자리 앞뒤만** Read (offset·limit). 통째로 읽지 마라.',
|
|
167
|
+
' 상관없는 읽기는 한 번에 같이 부른다 — 나란히 돈다.',
|
|
120
168
|
'2. 고칠 파일은 반드시 먼저 Read.',
|
|
121
169
|
'3. 주변 코드의 관례를 따른다. 새 관례를 들여오지 마라.',
|
|
122
170
|
'4. 파일 여럿은 Write 한 번에 (files 배열). 고칠 자리 여럿은 Edit 한 번에 (edits 배열).',
|
|
@@ -129,9 +177,10 @@ export const MODES = {
|
|
|
129
177
|
say: [
|
|
130
178
|
"지금 하는 일은 **구현**이다. 아래 순서를 지켜라.",
|
|
131
179
|
"",
|
|
132
|
-
"1. 남의 코드를 만지는 일이면 Outline 으로 **모양부터** 본다.
|
|
133
|
-
"
|
|
134
|
-
"
|
|
180
|
+
"1. 남의 코드를 만지는 일이면 Outline 으로 **모양부터** 본다. 폴더 하나가",
|
|
181
|
+
" Outline 으로는 몇십 분의 일이다. Grep 으로 고칠 말이 닿는 자리를 다 모으고,",
|
|
182
|
+
" **짚은 자리 앞뒤만** Read 한다 (offset·limit). 파일을 통째로 읽지 마라.",
|
|
183
|
+
" 서로 상관없는 읽기는 **한 번에 같이 부른다** — 읽기 도구는 나란히 돈다.",
|
|
135
184
|
"2. 고칠 파일은 반드시 먼저 Read 한다. 안 읽고 고치려 하면 도구가 거절한다.",
|
|
136
185
|
"3. 주변 코드의 관례를 따른다 — 이름 짓는 법, 오류 다루는 법, 주석 밀도까지.",
|
|
137
186
|
" 새 관례를 들여오지 마라. 이 코드가 이미 하고 있는 대로 한다.",
|
|
@@ -153,7 +202,7 @@ export const MODES = {
|
|
|
153
202
|
architect: {
|
|
154
203
|
id: 'architect',
|
|
155
204
|
hintEn: "shapes the structure · touches no files",
|
|
156
|
-
sayEn: "This is **design**. You have not been given the tools that change files.\n\nRead first. Designing without knowing the current structure is imagining, not designing.\n - Start with Outline for the shape of the folder. Narrow with Glob/Grep
|
|
205
|
+
sayEn: "This is **design**. You have not been given the tools that change files.\n\nRead first. Designing without knowing the current structure is imagining, not designing.\n - Start with Outline for the shape of the folder. Narrow with Glob/Grep, then Read\n **only around the lines you found** (offset/limit). Read whole files and the earlier\n ones fold away after a handful - then you have not seen the structure, only the last file\n - Fire unrelated reads together in one message - they run side by side\n - Work out what depends on what, and in which direction\n\nThen answer in this order.\n 1. Current structure — files, their roles, where the boundaries are (point with path:line)\n 2. What is wrong — why the current shape does not hold\n 3. Two or three options — what each gains, what each costs, how much work it is\n 4. One recommendation with the reason, and why you dropped the others\n 5. The files this affects\n\nFind the answer inside the conventions this code already uses. Bringing in a new framework is\nthe last resort, and if you go there, first say why the existing conventions cannot do it.",
|
|
157
206
|
name: '설계',
|
|
158
207
|
en: 'Architect',
|
|
159
208
|
glyph: '◈',
|
|
@@ -166,7 +215,9 @@ export const MODES = {
|
|
|
166
215
|
"",
|
|
167
216
|
"먼저 읽어라. 지금 구조를 모르면 설계가 아니라 상상이다.",
|
|
168
217
|
" - Outline 으로 폴더 모양부터 본다. 그 다음 Glob/Grep 으로 좁히고,",
|
|
169
|
-
"
|
|
218
|
+
" **짚은 자리 앞뒤만** Read 한다 (offset·limit). 통째로 읽으면 파일 몇 개 만에",
|
|
219
|
+
" 앞엣것이 접혀 나가고, 그러면 구조를 본 것이 아니라 마지막 파일만 본 것이 된다",
|
|
220
|
+
" - 서로 상관없는 읽기는 한 번에 같이 부른다 — 나란히 돈다",
|
|
170
221
|
" - 무엇이 무엇에 기대고 있는지(의존 방향)를 파악한다",
|
|
171
222
|
"",
|
|
172
223
|
"그 다음 이 차례로 답한다.",
|
|
@@ -197,15 +248,119 @@ export const MODES = {
|
|
|
197
248
|
"",
|
|
198
249
|
"- 근거를 파일에서 대라. 경로와 줄 번호를 같이 적어라 (src/a.js:42).",
|
|
199
250
|
"- 모르면 모른다고 하라. 그럴듯한 답을 지어내지 마라.",
|
|
200
|
-
"-
|
|
251
|
+
"- **답의 크기를 물음의 크기에 맞춰라.** 한 줄로 물으면 한 줄로 답하고,",
|
|
252
|
+
" 여러 가지를 물으면 물은 것을 하나도 빼지 말고 다 답한다. 짧은 것이 목적이 아니다.",
|
|
253
|
+
"- 읽어야 답이 나오는 물음이면 읽어라 — Outline → Grep → **짚은 자리 앞뒤만** Read.",
|
|
254
|
+
" 상관없는 읽기는 한 번에 같이 부른다.",
|
|
201
255
|
"- 고치라는 말이 없으면 고칠 것을 제안하지 마라. 시키지 않은 일을 벌이지 마라.",
|
|
202
256
|
].join('\n'),
|
|
203
257
|
},
|
|
204
258
|
|
|
259
|
+
/*
|
|
260
|
+
* ── 왜 이 모드가 따로 있나 ─────────────────────────────────────────────
|
|
261
|
+
*
|
|
262
|
+
* 「이 기능을 훑어서 동시에 고칠 때 데이터가 날아갈 자리를 찾아 줘. 근거가
|
|
263
|
+
* 있는 것만. 고치지는 말고. 다섯 개까지만.」
|
|
264
|
+
*
|
|
265
|
+
* 이 말이 갈 데가 없었다. 묻기(ask)로 갔다 — 「설명해줘」 가 들어 있어서다.
|
|
266
|
+
* 그런데 묻기는 **짧게 답하는 모드**이고 강도가 low 이고 걸음이 열두 번까지다.
|
|
267
|
+
* 읽어야 할 파일이 열 개인 일에 그 셋이 한꺼번에 걸리면 이렇게 된다 —
|
|
268
|
+
*
|
|
269
|
+
* 생각 0자 · 도구 10번 · 「짧게 답하라」 · 그러고 답이 나온다
|
|
270
|
+
*
|
|
271
|
+
* 답이 틀린 것은 아니다. **덜 본 것**이다. 그리고 덜 봤다는 말은 아무 데도
|
|
272
|
+
* 안 적힌다 — 사람은 그게 전부인 줄 안다.
|
|
273
|
+
*
|
|
274
|
+
* 설계(architect)도 아니다. 설계는 「어떻게 바꿀까」 이고 이건 「지금 무엇이
|
|
275
|
+
* 잘못됐나」 다. 디버그도 아니다. 디버그는 증상이 하나 있고 그 원인을 좁혀
|
|
276
|
+
* 가지만, 이건 증상이 아직 없고 **날 수 있는 자리**를 찾는 일이다.
|
|
277
|
+
*
|
|
278
|
+
* 그래서 따로 둔다. 읽기만 하고, 깊게 보고, 걸음을 넉넉히 준다.
|
|
279
|
+
*/
|
|
280
|
+
inspect: {
|
|
281
|
+
id: 'inspect',
|
|
282
|
+
hintEn: "finds defects · touches no files",
|
|
283
|
+
sayEn: [
|
|
284
|
+
"This is an **inspection**. You have not been given the tools that change files.",
|
|
285
|
+
"",
|
|
286
|
+
"Read wide first, then narrow.",
|
|
287
|
+
" 1. Outline for the shape. Grep to gather **every** place the thing touches - a defect that",
|
|
288
|
+
" only shows up between two files is invisible if you read just one of them.",
|
|
289
|
+
" 2. Then Read **only around the lines you found** (offset/limit). Do not read whole files -",
|
|
290
|
+
" pour it all in at once and the earlier turns fold away, and you answer having forgotten them.",
|
|
291
|
+
" 3. Fire unrelated reads together in one message. Read tools run side by side.",
|
|
292
|
+
"",
|
|
293
|
+
"Write each finding in this shape.",
|
|
294
|
+
" - What - in one line",
|
|
295
|
+
" - Where - path:line, and the function name",
|
|
296
|
+
" - When it happens - the **order of events** that triggers it (while A is doing X, B does Y)",
|
|
297
|
+
" - Why - which line of code makes it so",
|
|
298
|
+
" - What it costs - is data lost, or is only the screen briefly out of step",
|
|
299
|
+
"",
|
|
300
|
+
"Hold to this.",
|
|
301
|
+
"- **Only what the code shows.** No guesses. If there is somewhere you could not look,",
|
|
302
|
+
" write that you did not - unsaid means you looked.",
|
|
303
|
+
"- If you were given a count, spend it on the **worst ones first.** Do not pad to reach the",
|
|
304
|
+
" number. Asked for five and found three? Give three.",
|
|
305
|
+
"- Do not fix anything. A fix goes in one line, and only if you were asked for one.",
|
|
306
|
+
"- If there is nothing, say there is nothing. Manufacture one finding and nobody trusts the rest.",
|
|
307
|
+
].join('\n'),
|
|
308
|
+
say짧게En: [
|
|
309
|
+
"**Inspection.** You change nothing.",
|
|
310
|
+
"1. Outline -> Grep every place it touches -> Read **only around what you found** (offset/limit).",
|
|
311
|
+
" Fire unrelated reads together - they run side by side.",
|
|
312
|
+
"2. Per finding: what - where (path:line + function) - the order of events that triggers it - why - what it costs.",
|
|
313
|
+
"3. **Only what the code shows.** No guesses. Say what you could not look at.",
|
|
314
|
+
"4. Given a count? Worst first, no padding. Found fewer? Give fewer.",
|
|
315
|
+
"5. Do not fix anything. If there is nothing, say so.",
|
|
316
|
+
].join('\n'),
|
|
317
|
+
name: '점검',
|
|
318
|
+
en: 'Inspect',
|
|
319
|
+
glyph: '◍',
|
|
320
|
+
hint: '결함을 찾는다 · 파일은 안 건드림',
|
|
321
|
+
tools: [...읽기, ...계획],
|
|
322
|
+
effort: 'deep',
|
|
323
|
+
think: 'high',
|
|
324
|
+
say짧게: [
|
|
325
|
+
'**점검**이다. 아무것도 바꾸지 않는다.',
|
|
326
|
+
'1. Outline → 그 말이 닿는 자리를 Grep 으로 **다** 모으기 → 짚은 자리 앞뒤만 Read (offset·limit).',
|
|
327
|
+
' 상관없는 읽기는 한 번에 같이 부른다 — 나란히 돈다.',
|
|
328
|
+
'2. 찾은 것마다: 무엇 · 어디(경로:줄 과 함수) · 일어나는 차례 · 왜 · 무엇을 잃나.',
|
|
329
|
+
'3. **코드에 있는 것만.** 짐작은 적지 마라. 못 본 자리는 못 봤다고 적어라.',
|
|
330
|
+
'4. 개수를 정해 줬으면 **제일 아픈 것부터.** 수를 채우려고 약한 것을 넣지 마라.',
|
|
331
|
+
'5. 없으면 없다고 해라. 고치지는 마라.',
|
|
332
|
+
].join('\n'),
|
|
333
|
+
say: [
|
|
334
|
+
'지금 하는 일은 **점검**이다. 파일을 바꾸는 도구는 주어지지 않았다.',
|
|
335
|
+
'',
|
|
336
|
+
'먼저 넓게 보고, 그 다음 좁게 읽어라.',
|
|
337
|
+
' 1. Outline 으로 모양부터. 그 다음 Grep 으로 그 기능이 닿는 자리를 **다** 모은다.',
|
|
338
|
+
' 두 파일 사이에서만 나는 결함은 한쪽만 읽으면 아예 안 보인다.',
|
|
339
|
+
' 2. 그러고 나서 **짚은 자리 앞뒤만** Read 한다 (offset·limit). 통째로 읽지 마라 —',
|
|
340
|
+
' 한 번에 다 부어 넣으면 뒤로 갈수록 앞엣것이 접혀 나가고, 잊은 채로 답하게 된다.',
|
|
341
|
+
' 3. 서로 상관없는 읽기는 **한 번에 같이 부른다.** 읽기 도구는 나란히 돈다.',
|
|
342
|
+
'',
|
|
343
|
+
'찾은 것은 하나씩 이 꼴로 적어라.',
|
|
344
|
+
' · 무엇 — 한 줄로',
|
|
345
|
+
' · 어디 — 경로:줄 과 함수 이름',
|
|
346
|
+
' · 언제 나나 — 그 일이 일어나는 **차례**를 적어라 (A 가 …하는 사이에 B 가 …하면)',
|
|
347
|
+
' · 왜 그런가 — 코드의 어느 줄이 그렇게 만드는지',
|
|
348
|
+
' · 무엇을 잃나 — 자료가 사라지는가, 화면만 잠깐 어긋나는가',
|
|
349
|
+
'',
|
|
350
|
+
'지키는 것:',
|
|
351
|
+
'- **코드에 근거가 있는 것만.** 짐작은 적지 마라. 못 본 자리가 있으면',
|
|
352
|
+
' "여기는 못 봤다" 고 적어라 — 안 적으면 다 본 것으로 읽힌다.',
|
|
353
|
+
'- 개수를 정해 줬으면 그 안에서 **제일 아픈 것부터** 고른다.',
|
|
354
|
+
' 수를 채우려고 약한 것을 끼워 넣지 마라. 다섯을 시켰는데 셋이면 셋만 낸다.',
|
|
355
|
+
'- 고치지 마라. 고칠 방법은 한 줄까지만, 그것도 물어봤을 때만.',
|
|
356
|
+
'- 없으면 없다고 해라. 억지로 찾아내면 그 뒤로 이 말을 아무도 안 믿는다.',
|
|
357
|
+
].join('\n'),
|
|
358
|
+
},
|
|
359
|
+
|
|
205
360
|
debug: {
|
|
206
361
|
id: 'debug',
|
|
207
362
|
hintEn: "finds the cause",
|
|
208
|
-
sayEn: "This is **finding the cause**. Do not fix by guessing.\n\nFollow this order.\n 1. Restate the symptom in one sentence — what happens when you do what.\n 2. Get a reproduction. If there is none, build one. Without it you cannot tell whether you fixed it.\n 3. Form two or three hypotheses. For each, write down what you should see if it is true.\n 4. Check them one at a time, for real — read the logs, run something small, print the value.\n Only what you checked is fact. What you did not check is still a hypothesis.\n 5. When you name the cause, bring the evidence. A cause that starts with \"probably\" is not a cause.\n 6. After fixing, run the reproduction from step 2 again. If it is not fixed, go back to step 3.\n\nDo not change several places at once. You will not know which one fixed it.",
|
|
363
|
+
sayEn: "This is **finding the cause**. Do not fix by guessing.\n\nFollow this order.\n 1. Restate the symptom in one sentence — what happens when you do what.\n 2. Get a reproduction. If there is none, build one. Without it you cannot tell whether you fixed it.\n 3. Form two or three hypotheses. For each, write down what you should see if it is true.\n 4. Check them one at a time, for real — read the logs, run something small, print the value.\n Only what you checked is fact. What you did not check is still a hypothesis.\n If several hypotheses turn on reading alone, read for all of them in one message.\n 5. When you name the cause, bring the evidence. A cause that starts with \"probably\" is not a cause.\n 6. After fixing, run the reproduction from step 2 again. If it is not fixed, go back to step 3.\n\nDo not change several places at once. You will not know which one fixed it.",
|
|
209
364
|
name: '디버그',
|
|
210
365
|
en: 'Debug',
|
|
211
366
|
glyph: '◉',
|
|
@@ -222,6 +377,7 @@ export const MODES = {
|
|
|
222
377
|
" 3. 가설을 2~3개 세운다. 각각 \"이게 맞다면 무엇이 보여야 하는가\" 를 같이 적는다.",
|
|
223
378
|
" 4. 하나씩 실제로 확인한다 — 로그를 보고, 작게 돌려 보고, 값을 찍어 본다.",
|
|
224
379
|
" 확인한 것만 사실이다. 확인 안 한 것은 아직 가설이다.",
|
|
380
|
+
" 읽기만으로 가리는 가설이 여럿이면 **한 번에 같이 읽는다** — 나란히 돈다.",
|
|
225
381
|
" 5. 원인을 짚을 때는 증거를 같이 댄다. \"아마\" 로 시작하는 원인은 원인이 아니다.",
|
|
226
382
|
" 6. 고친 뒤 2번의 재현 절차로 다시 확인한다. 안 고쳐졌으면 3번으로 돌아간다.",
|
|
227
383
|
"",
|
|
@@ -232,7 +388,7 @@ export const MODES = {
|
|
|
232
388
|
plan: {
|
|
233
389
|
id: 'plan',
|
|
234
390
|
hintEn: "plan first · run it after approval",
|
|
235
|
-
sayEn: "This is **planning**. You have not been given the tools that change files.\nDo not try to edit code. Produce a plan and stop.\n\nConfirm first — a plan built without knowing the current state is a wish, not a plan.\n Start with Outline for the shape, narrow with Glob/Grep, then Read only
|
|
391
|
+
sayEn: "This is **planning**. You have not been given the tools that change files.\nDo not try to edit code. Produce a plan and stop.\n\nConfirm first — a plan built without knowing the current state is a wish, not a plan.\n Start with Outline for the shape, narrow with Glob/Grep, then Read **only around the lines\n you found** (offset/limit). Fire unrelated reads together in one message.\n\nThen write it in this order.\n 1. Goal — what does \"done\" look like (as a sentence you can check)\n 2. Current state — the files involved and what they do now (point with path:line)\n 3. What changes — per file, what and why\n 4. Order — step by step. Each step small enough to check on its own\n 5. Risks — what could break, and how to get back if it does\n 6. How to check — what do you run to know it worked\n\nWrite the steps into TodoWrite as well. After approval you continue straight from them.\n The number of steps is not fixed — match it to the size of the job. Do not force it to three.\n A small job ends in two or three; a large one lists all ten or more.\nIf something is unknown, do not invent it — write \"this needs to be confirmed\".\n\nEnd with \"Shall I go ahead with this?\". Once approved, switch to /code and run it.",
|
|
236
392
|
name: '계획',
|
|
237
393
|
en: 'Plan',
|
|
238
394
|
glyph: '☰',
|
|
@@ -245,7 +401,8 @@ export const MODES = {
|
|
|
245
401
|
"코드를 고치려 들지 마라. 계획을 내고 멈춘다.",
|
|
246
402
|
"",
|
|
247
403
|
"먼저 확인하라 — 지금 무엇이 어떻게 되어 있는지 모르면 계획이 아니라 희망이다.",
|
|
248
|
-
" Outline 으로 모양부터 보고, Glob/Grep 으로 좁힌 뒤,
|
|
404
|
+
" Outline 으로 모양부터 보고, Glob/Grep 으로 좁힌 뒤, **짚은 자리 앞뒤만** Read 해라",
|
|
405
|
+
" (offset·limit). 상관없는 읽기는 한 번에 같이 부른다 — 나란히 돈다.",
|
|
249
406
|
"",
|
|
250
407
|
"그 다음 이 차례로 적어라.",
|
|
251
408
|
" 1. 목표 — 무엇이 끝나면 다 된 것인가 (확인할 수 있는 문장으로)",
|
|
@@ -306,7 +463,7 @@ export const MODES = {
|
|
|
306
463
|
},
|
|
307
464
|
};
|
|
308
465
|
|
|
309
|
-
export const ORDER = ['auto', 'code', 'plan', 'architect', 'debug', 'ask', 'orchestrator'];
|
|
466
|
+
export const ORDER = ['auto', 'code', 'plan', 'architect', 'debug', 'inspect', 'ask', 'orchestrator'];
|
|
310
467
|
export const DEFAULT = 'auto';
|
|
311
468
|
|
|
312
469
|
/** 이름을 관대하게 받는다. 한글·영문·줄임말 다 통한다. */
|
|
@@ -321,6 +478,11 @@ export function normalize(v) {
|
|
|
321
478
|
'설계': 'architect', '아키': 'architect', 'arch': 'architect', 'a': 'architect',
|
|
322
479
|
'디버그': 'debug', '버그': 'debug', 'd': 'debug',
|
|
323
480
|
'묻기': 'ask', '질문': 'ask', '일상': 'ask', 'q': 'ask',
|
|
481
|
+
// 점검: '리뷰' 도 여기로 받는다. 슬래시 `/review` 는 **방금 바꾼 것**을 보는
|
|
482
|
+
// 다른 일이지만(agent/review.js), `/work 리뷰` 라고 친 사람이 원하는 것은
|
|
483
|
+
// 이쪽이다 — 그 둘을 가르는 것은 우리 몫이지 사람 몫이 아니다.
|
|
484
|
+
'점검': 'inspect', '감사': 'inspect', '검토': 'inspect', '리뷰': 'inspect',
|
|
485
|
+
'inspect': 'inspect', 'audit': 'inspect', 'review': 'inspect', 'i': 'inspect',
|
|
324
486
|
'총괄': 'orchestrator', '오케': 'orchestrator', 'orch': 'orchestrator', 'o': 'orchestrator',
|
|
325
487
|
};
|
|
326
488
|
return 별명[s] ?? null;
|