minicode-ai 0.11.0 → 0.13.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 (221) hide show
  1. package/CHANGELOG.md +98 -0
  2. package/LICENSE +21 -21
  3. package/README.md +4 -4
  4. package/cli/args.ts +46 -0
  5. package/cli/commands/acp.ts +163 -10
  6. package/cli/commands/config.ts +33 -18
  7. package/cli/commands/daemon.ts +515 -0
  8. package/cli/commands/exec.ts +145 -53
  9. package/cli/commands/openwork.ts +986 -0
  10. package/cli/commands/sessions.ts +4 -1
  11. package/cli/commands/stats.ts +34 -4
  12. package/cli/commands.ts +217 -2
  13. package/cli/index.ts +146 -14
  14. package/cli/recovery-warning.ts +115 -0
  15. package/cli/router.ts +32 -1
  16. package/cli/setup.ts +2332 -171
  17. package/cli/tui.ts +113 -7
  18. package/docs/OUTPUT_ARCHITECTURE_AUDIT.md +489 -0
  19. package/docs/OUTPUT_EVENT_MODEL.md +289 -0
  20. package/docs/OUTPUT_IMPLEMENTATION_PLAN.md +391 -0
  21. package/docs/OUTPUT_PROTOCOL_SPEC.md +285 -0
  22. package/docs/OUTPUT_RENDERING_SPEC.md +248 -0
  23. package/docs/OUTPUT_UX_RULES.md +449 -0
  24. package/docs/PLAN_UIUX_V6.md +2 -2
  25. package/docs/README.md +4 -3
  26. package/docs/TERMINAL_CONTRACT.md +278 -66
  27. package/docs/architecture.md +89 -7
  28. package/docs/changelog.md +1 -1
  29. package/docs/choosing-mode.md +2 -2
  30. package/docs/cli.md +9 -5
  31. package/docs/concepts.md +1 -1
  32. package/docs/contributing.md +9 -2
  33. package/docs/environment.md +6 -2
  34. package/docs/exec.md +46 -5
  35. package/docs/memory-sessions.md +2 -0
  36. package/docs/policy-sandbox.md +1 -1
  37. package/docs/pricing-budget.md +1 -1
  38. package/docs/quickstart.md +2 -2
  39. package/docs/repl.md +6 -2
  40. package/docs/security-model.md +1 -1
  41. package/docs/security.md +1 -1
  42. package/docs/skills.md +2 -2
  43. package/docs/terminal.md +9 -5
  44. package/docs/tools.md +1 -1
  45. package/package.json +35 -5
  46. package/src/app/session.ts +261 -15
  47. package/src/app/tool-layer.ts +94 -7
  48. package/src/daemon/approvals.ts +361 -0
  49. package/src/daemon/capability.ts +145 -0
  50. package/src/daemon/children.ts +142 -0
  51. package/src/daemon/client.ts +267 -0
  52. package/src/daemon/control.ts +350 -0
  53. package/src/daemon/discovery.ts +234 -0
  54. package/src/daemon/feed.ts +155 -0
  55. package/src/daemon/framing.ts +94 -0
  56. package/src/daemon/host.ts +316 -0
  57. package/src/daemon/protocol.ts +217 -0
  58. package/src/daemon/resource.ts +170 -0
  59. package/src/daemon/sanitize.ts +57 -0
  60. package/src/daemon/server.ts +627 -0
  61. package/src/daemon/store.ts +317 -0
  62. package/src/daemon/subscription.ts +270 -0
  63. package/src/daemon/telemetry.ts +81 -0
  64. package/src/hooks/run.ts +12 -1
  65. package/src/lib/atomic-write.ts +29 -3
  66. package/src/lib/db-path.ts +26 -0
  67. package/src/lib/keystore.ts +544 -42
  68. package/src/lib/net.ts +43 -1
  69. package/src/lib/safe-open.ts +116 -1
  70. package/src/lib/session-id.ts +15 -0
  71. package/src/lsp/client.ts +123 -5
  72. package/src/mcp/client.ts +139 -17
  73. package/src/mcp/server.ts +177 -50
  74. package/src/mcp/transport.ts +16 -19
  75. package/src/memory/vector.ts +770 -55
  76. package/src/policy/allowlist.ts +14 -2
  77. package/src/policy/bash-guard.ts +105 -10
  78. package/src/policy/compaction.ts +82 -5
  79. package/src/policy/consequence-engine.ts +220 -0
  80. package/src/policy/context.ts +132 -0
  81. package/src/policy/executor.ts +187 -121
  82. package/src/policy/no-progress.ts +559 -0
  83. package/src/policy/permission.ts +4 -8
  84. package/src/policy/pricing.ts +17 -3
  85. package/src/policy/scrub.ts +69 -2
  86. package/src/policy/tool-contract.ts +515 -0
  87. package/src/policy/usage.ts +310 -24
  88. package/src/policy/verifier.ts +6 -3
  89. package/src/policy/work-mode.ts +182 -0
  90. package/src/presentation/adapter.ts +533 -26
  91. package/src/presentation/events.ts +151 -0
  92. package/src/presentation/model.ts +180 -27
  93. package/src/presentation/projection.ts +858 -0
  94. package/src/presentation/reducer.ts +645 -310
  95. package/src/presentation/store.ts +12 -7
  96. package/src/providers/anthropic.ts +18 -10
  97. package/src/providers/responses.ts +17 -7
  98. package/src/runtime/capability.ts +409 -0
  99. package/src/runtime/child-execution.ts +274 -0
  100. package/src/runtime/composition.ts +958 -0
  101. package/src/runtime/dispatch.ts +591 -0
  102. package/src/runtime/execution-backend.ts +632 -0
  103. package/src/runtime/execution-events.ts +272 -0
  104. package/src/runtime/execution-id.ts +230 -0
  105. package/src/runtime/execution-journal.ts +926 -0
  106. package/src/runtime/execution-kernel.ts +456 -0
  107. package/src/runtime/execution-registry.ts +379 -0
  108. package/src/runtime/process-supervision.ts +276 -0
  109. package/src/runtime/production-execution.ts +551 -0
  110. package/src/runtime/production-runtime.ts +217 -0
  111. package/src/runtime/recovery-safety.ts +70 -0
  112. package/src/runtime/recovery.ts +477 -0
  113. package/src/runtime/runtime-capabilities.ts +179 -0
  114. package/src/runtime/runtime-diagnostics.ts +141 -0
  115. package/src/runtime/runtime-host.ts +365 -0
  116. package/src/runtime/runtime-status-facts.ts +222 -0
  117. package/src/runtime/runtime-status-provider.ts +74 -0
  118. package/src/runtime/runtime-status.ts +459 -0
  119. package/src/runtime/runtime-task-admission.ts +101 -0
  120. package/src/runtime/supervisor.ts +444 -0
  121. package/src/session/authority.ts +168 -0
  122. package/src/session/checkpoint.ts +88 -1
  123. package/src/session/context-adapter.ts +251 -0
  124. package/src/session/context-assembly.ts +242 -0
  125. package/src/session/context-identity.ts +389 -0
  126. package/src/session/context-projection.ts +248 -0
  127. package/src/session/context-selector.ts +500 -0
  128. package/src/session/cross-session-adoption.ts +249 -0
  129. package/src/session/full-history-fold.ts +171 -0
  130. package/src/session/identity.ts +192 -0
  131. package/src/session/journal.ts +805 -102
  132. package/src/session/open-work-intent.ts +732 -0
  133. package/src/session/open-work.ts +767 -0
  134. package/src/session/pending-tools.ts +94 -0
  135. package/src/session/persistence.ts +3569 -127
  136. package/src/session/runtime-header.ts +208 -0
  137. package/src/session/shadow-git.ts +13 -5
  138. package/src/session/verification.ts +1623 -0
  139. package/src/task/assignment.ts +136 -0
  140. package/src/task/autonomous-adapter.ts +168 -0
  141. package/src/task/autonomous-context.ts +630 -0
  142. package/src/task/autonomous-policy.ts +490 -0
  143. package/src/task/continuity.ts +179 -0
  144. package/src/task/execution-cancellation.ts +165 -0
  145. package/src/task/graph-validate.ts +379 -0
  146. package/src/task/graph.ts +305 -0
  147. package/src/task/identity.ts +230 -0
  148. package/src/task/model.ts +417 -0
  149. package/src/task/production-scheduler.ts +293 -0
  150. package/src/task/readiness.ts +229 -0
  151. package/src/task/scheduler-observability.ts +387 -0
  152. package/src/task/scheduler.ts +1197 -0
  153. package/src/task/scheduling-policy.ts +165 -0
  154. package/src/task/session-authority.ts +148 -0
  155. package/src/task/session-ownership.ts +211 -0
  156. package/src/task/store.ts +2887 -0
  157. package/src/task/sync.ts +343 -0
  158. package/src/task/trigger.ts +260 -0
  159. package/src/tools/bash.ts +377 -211
  160. package/src/tools/code_run.ts +1 -1
  161. package/src/tools/delete_file.ts +1 -1
  162. package/src/tools/edit.ts +33 -6
  163. package/src/tools/evidence.ts +30 -0
  164. package/src/tools/git.ts +4 -4
  165. package/src/tools/glob.ts +12 -3
  166. package/src/tools/grep.ts +1 -1
  167. package/src/tools/lsp.ts +4 -4
  168. package/src/tools/mcp_call.ts +11 -4
  169. package/src/tools/memory.ts +153 -18
  170. package/src/tools/move_file.ts +1 -1
  171. package/src/tools/patch.ts +1 -1
  172. package/src/tools/read_file.ts +1 -1
  173. package/src/tools/read_image.ts +1 -1
  174. package/src/tools/submit_result.ts +1 -1
  175. package/src/tools/task.ts +437 -41
  176. package/src/tools/todo.ts +662 -35
  177. package/src/tools/web_fetch.ts +4 -2
  178. package/src/tools/web_search.ts +9 -3
  179. package/src/tools/write_file.ts +1 -1
  180. package/src/ui/assistant/simple.ts +123 -50
  181. package/src/ui/assistant/turn-status.ts +17 -3
  182. package/src/ui/contract.ts +184 -0
  183. package/src/ui/footer.ts +54 -18
  184. package/src/ui/i18n/en.ts +62 -6
  185. package/src/ui/i18n/id.ts +62 -6
  186. package/src/ui/input/prompt-engine.ts +120 -25
  187. package/src/ui/render/errors.ts +39 -1
  188. package/src/ui/render/markdown-table.ts +455 -0
  189. package/src/ui/render/markdown.ts +22 -1
  190. package/src/ui/render/table-grid.ts +184 -0
  191. package/src/ui/render/table.ts +15 -76
  192. package/src/ui/runtime/screen.ts +7 -2
  193. package/src/ui/runtime/statusline.ts +25 -6
  194. package/src/ui/tui/app.ts +598 -133
  195. package/src/ui/tui/transcript.ts +531 -89
  196. package/vendor/minicore/VENDOR.md +1 -1
  197. package/vendor/minicore/src/core/budget.ts +25 -25
  198. package/vendor/minicore/src/core/compact.ts +75 -75
  199. package/vendor/minicore/src/core/errors.ts +59 -59
  200. package/vendor/minicore/src/core/events.ts +73 -73
  201. package/vendor/minicore/src/core/executor.ts +139 -139
  202. package/vendor/minicore/src/core/history.ts +31 -31
  203. package/vendor/minicore/src/core/index.ts +41 -41
  204. package/vendor/minicore/src/core/loop.ts +355 -355
  205. package/vendor/minicore/src/core/permission.ts +22 -22
  206. package/vendor/minicore/src/core/provider.ts +39 -39
  207. package/vendor/minicore/src/core/recovery.ts +35 -35
  208. package/vendor/minicore/src/core/session.ts +327 -327
  209. package/vendor/minicore/src/core/snapshot.ts +146 -146
  210. package/vendor/minicore/src/core/tokens.ts +107 -107
  211. package/vendor/minicore/src/core/tool.ts +115 -115
  212. package/vendor/minicore/src/core/types.ts +50 -50
  213. package/vendor/minicore/src/providers/openai-compat.ts +417 -417
  214. package/AGENTS.md +0 -45
  215. package/PLAN.md +0 -491
  216. package/docs/ARCHITECTURE.html +0 -1248
  217. package/docs/CONTROL-PLANE-MAP.md +0 -139
  218. package/docs/HARNESS.md +0 -150
  219. package/docs/SUMMARY.md +0 -52
  220. package/docs/UI_RENDER_PIPELINE.md +0 -165
  221. package/docs/USAGE.md +0 -11
@@ -0,0 +1,449 @@
1
+ # Output UX Rules
2
+
3
+ **Status:** contract grammar untuk normal/verbose/debug/machine output
4
+ **Tanggal:** 2026-09-25
5
+ **Audit sumber:** `docs/OUTPUT_ARCHITECTURE_AUDIT.md`
6
+
7
+ ## 1. North star
8
+
9
+ Output harus membuat tiga pertanyaan user mudah dijawab:
10
+
11
+ 1. Apa yang sedang dikerjakan?
12
+ 2. Apa yang sudah terjadi dan bukti apa yang tersedia?
13
+ 3. Apa yang harus saya lakukan berikutnya?
14
+
15
+ Output bukan tempat menaruh seluruh kompleksitas internal. Runtime boleh berkembang,
16
+ tetapi menambah kompleksitas tidak boleh otomatis menambah noise, warna, atau dump.
17
+
18
+ ## 2. Grammar blok
19
+
20
+ Urutan default:
21
+
22
+ ```text
23
+ USER INTENT
24
+ ↓
25
+ TASK
26
+ ↓
27
+ PROGRESS
28
+ ↓
29
+ ACTIVITY / EVIDENCE
30
+ ↓
31
+ FINDINGS
32
+ ↓
33
+ PLAN
34
+ ↓
35
+ RESULT
36
+ ```
37
+
38
+ Tidak semua task membutuhkan semua section. Short task boleh:
39
+
40
+ ```text
41
+ ✓ Updated src/router.ts
42
+ ✓ Tests passed
43
+
44
+ Done.
45
+ ```
46
+
47
+ Task audit boleh:
48
+
49
+ ```text
50
+ AUDIT
51
+ ──────────────
52
+ Workspace
53
+ Progress
54
+ Findings
55
+ Plan
56
+ Result
57
+ ```
58
+
59
+ ### Section
60
+
61
+ ```text
62
+ AUDIT
63
+ ────────────────────
64
+ ```
65
+
66
+ ### Activity
67
+
68
+ ```text
69
+ ✓ Analyzed 18 files
70
+ ```
71
+
72
+ ### Active operation
73
+
74
+ ```text
75
+ ◌ Analyzing source files…
76
+ ```
77
+
78
+ ### Warning
79
+
80
+ ```text
81
+ ⚠ Dependencies are not installed
82
+ Run the project install command, then retry.
83
+ ```
84
+
85
+ ### Error
86
+
87
+ ```text
88
+ ✕ Build failed
89
+ TypeScript compilation failed in src/app.ts.
90
+ → Fix the reported errors and retry.
91
+ ```
92
+
93
+ ### Finding
94
+
95
+ ```text
96
+ ⚠ Missing dependency installation
97
+
98
+ package.json exists, but node_modules/ is absent.
99
+ ```
100
+
101
+ ### Plan
102
+
103
+ ```text
104
+ PLAN
105
+ ────────────────────
106
+ 01 Install dependencies
107
+ 02 Run tests
108
+ 03 Review failing modules
109
+ ```
110
+
111
+ Plan hanya future work. “Read file”, “run grep”, dan “think” adalah activity, bukan plan.
112
+
113
+ ### Completion
114
+
115
+ ```text
116
+ ✓ Audit complete · 18 files · 42s
117
+ ```
118
+
119
+ ## 3. Status vocabulary
120
+
121
+ | Status | Glyph | Teks default | Arti |
122
+ |---|---|---|---|
123
+ | active | `◌` / `›` | `running` atau `active` | operasi masih berjalan |
124
+ | completed | `✓` | `completed` | sukses terminal |
125
+ | warning | `⚠` | `warning` | perlu perhatian, belum terminal failure |
126
+ | failed | `✗` | `failed` | operasi/turn gagal |
127
+ | denied | `⊘` | `denied` | policy/permission menolak |
128
+ | cancelled | `⊘` | `cancelled` | dibatalkan user/system |
129
+ | interrupted | `!` | `interrupted` | proses berhenti sebelum terminal |
130
+ | retrying | `↻` | `retrying` | recovery sedang berjalan |
131
+ | transition | `→` | `next` | tindakan berikutnya |
132
+ | info | `ℹ` | `info` | informasi non-actionable |
133
+
134
+ Glyph tidak pernah menjadi satu-satunya makna. ASCII fallback memakai kata atau struktur
135
+ yang setara. Warna hanya membantu hierarki, bukan encode status.
136
+
137
+ ## 4. Progressive disclosure
138
+
139
+ ### Normal
140
+
141
+ Tampilkan:
142
+
143
+ - task/intent aktif;
144
+ - progress yang bermakna;
145
+ - important finding dan result;
146
+ - actionable error;
147
+ - receipt singkat untuk efek yang penting;
148
+ - cancellation/partial state.
149
+
150
+ Sembunyikan:
151
+
152
+ - raw args lengkap;
153
+ - internal event/tool IDs;
154
+ - provider implementation details;
155
+ - raw tool output;
156
+ - repetitive file lists;
157
+ - token counters tanpa relasi dengan task;
158
+ - event trace.
159
+
160
+ ### Verbose
161
+
162
+ Tambahkan:
163
+
164
+ - tool name, target, duration;
165
+ - important file/command details;
166
+ - reasoning jika user meminta;
167
+ - retry chain;
168
+ - test/result detail;
169
+ - recovery strategy dan next action.
170
+
171
+ ### Debug
172
+
173
+ Tambahkan:
174
+
175
+ - event ID/correlation/parent;
176
+ - timestamps dan transition;
177
+ - redacted payload;
178
+ - anomaly counters;
179
+ - checkpoint/journal references;
180
+ - renderer/source trace.
181
+
182
+ ### Machine
183
+
184
+ Tidak bergantung pada human text. Memberikan typed event, final summary, dan correlation
185
+ fields. Tidak mengirim raw kernel shape sebagai public contract.
186
+
187
+ ## 5. Tool dan parallel operations
188
+
189
+ Activity menjelaskan apa yang sedang dikerjakan, bukan internal implementation dump.
190
+ Satu baris ledger default:
191
+
192
+ ```text
193
+ › read_file src/config.ts
194
+ ```
195
+
196
+ Completion:
197
+
198
+ ```text
199
+ ✓ read_file src/config.ts
200
+ ```
201
+
202
+ Failure:
203
+
204
+ ```text
205
+ ✗ read_file src/config.ts
206
+ File does not exist.
207
+ ```
208
+
209
+ Denial:
210
+
211
+ ```text
212
+ ⊘ bash
213
+ Permission denied by mode=plan.
214
+ ```
215
+
216
+ Receipt:
217
+
218
+ ```text
219
+ ✓ write_file src/router.ts · 1 file · 34ms
220
+ ```
221
+
222
+ ### Parallel
223
+
224
+ Jangan interleave raw output. Kelompokkan:
225
+
226
+ ```text
227
+ ◌ Analyzing 11 source files…
228
+
229
+ ✓ app.ts
230
+ ✓ config.ts
231
+ ✓ index.ts
232
+ ✓ router.ts
233
+ …
234
+ ✓ Source analysis complete · 11 files
235
+ ```
236
+
237
+ Untuk batch besar:
238
+
239
+ ```text
240
+ ✓ Analyzed 11 files
241
+ ```
242
+
243
+ ### Retry
244
+
245
+ Retry adalah call baru. Tampilkan hubungannya, bukan attempt number buatan:
246
+
247
+ ```text
248
+ ↻ read_file src/config.ts
249
+ retry after ENOENT
250
+ ```
251
+
252
+ Normal tidak menampilkan tool ID. Debug dapat menampilkan `correlationId`.
253
+
254
+ ## 6. Progress
255
+
256
+ Progress harus menunjukkan perubahan state, bukan heartbeat spam:
257
+
258
+ ```text
259
+ Processing…
260
+ Processing…
261
+ Processing…
262
+ ```
263
+
264
+ Dihindari. Gunakan:
265
+
266
+ ```text
267
+ ◌ Reading 18 files…
268
+ ◌ Running tests…
269
+ ◌ Applying migration…
270
+ ```
271
+
272
+ Untuk long-running tool:
273
+
274
+ ```text
275
+ ◌ Running integration tests… (2m 14s)
276
+ ```
277
+
278
+ Progress yang tidak berubah setelah stall dapat menjadi warning/timeout sesuai policy;
279
+ renderer tidak mengarang fake progress. TUI memakai sparkle/dots pada composer/status,
280
+ linear memakai transient heartbeat, dan machine memakai duration/status field.
281
+
282
+ ## 7. Findings, activity, dan evidence
283
+
284
+ Activity:
285
+
286
+ ```text
287
+ ✓ Read src/app.ts
288
+ ```
289
+
290
+ Finding:
291
+
292
+ ```text
293
+ ⚠ Router initialization has no error boundary
294
+ ```
295
+
296
+ Evidence:
297
+
298
+ ```text
299
+ src/app.ts:42
300
+ ```
301
+
302
+ Recommendation:
303
+
304
+ ```text
305
+ → Add explicit initialization failure handling
306
+ ```
307
+
308
+ Keempat konsep tersebut adalah node semantic yang berbeda. Node boleh ditampilkan
309
+ bersama, tetapi tidak boleh digabung menjadi satu string generik.
310
+
311
+ ## 8. Error UX
312
+
313
+ Setiap error attempt menjawab:
314
+
315
+ - apa yang terjadi?
316
+ - apa yang sedang dilakukan?
317
+ - mengapa gagal?
318
+ - apa next step?
319
+ - apakah user perlu bertindak?
320
+
321
+ Kategori minimum:
322
+
323
+ - `WARNING`: perlu perhatian, operasi masih dapat berjalan.
324
+ - `ERROR`: operasi gagal, tindakan atau retry dapat membantu.
325
+ - `DENIED`: policy sengaja memblokir tindakan.
326
+ - `CANCELLED`: user/system sengaja menghentikan operasi.
327
+ - `TIMEOUT`: deadline terlampaui.
328
+ - `PARTIAL`: sebagian pekerjaan selesai, belum semuanya.
329
+ - `RECOVERED`: fallback/retry berhasil.
330
+ - `UNAVAILABLE`: informasi/backend tidak dapat dijangkau.
331
+
332
+ Error example:
333
+
334
+ ```text
335
+ ✕ Provider request failed
336
+ Rate limit reached while running the model.
337
+ → Retry after the provider cooldown, or choose another provider.
338
+ ```
339
+
340
+ Jangan mencetak objek JSON/error provider sebagai pesan utama. Letakkan detail mentah
341
+ yang sudah disanitasi di verbose/debug dan pertahankan kategori/next action yang stabil.
342
+
343
+ ## 9. Cancellation, timeout, partial, recovery
344
+
345
+ Cancellation harus punya state, bukan hanya hilang:
346
+
347
+ ```text
348
+ ↻ Cancelling…
349
+
350
+ ✓ Task cancelled
351
+ ```
352
+
353
+ Timeout:
354
+
355
+ ```text
356
+ ✕ Operation timed out after 15m
357
+ → Retry with a smaller scope or increase the timeout.
358
+ ```
359
+
360
+ Partial:
361
+
362
+ ```text
363
+ ⚠ Completed 3 of 5 files
364
+ Two files failed; review the errors before retrying.
365
+ ```
366
+
367
+ Recovery:
368
+
369
+ ```text
370
+ ↻ Provider unavailable; retrying with fallback…
371
+ ✓ Recovered using fallback provider.
372
+ ```
373
+
374
+ TUI harus mencegah live stream/foreign painter menimpa state terminal. Linear harus
375
+ flush buffer secara deterministic once pada settle/abort. Machine harus mengirim
376
+ terminal task event dan summary tepat satu kali.
377
+
378
+ ## 10. Terminal geometry
379
+
380
+ - Target lebar 80, 100, dan 120+ columns.
381
+ - Semua ukuran memakai display columns; CJK/emoji dua kolom.
382
+ - Long path/command wrap atau truncate dengan marker, tidak pernah dipotong tanpa
383
+ petunjuk.
384
+ - Resize terjadi saat paint; cursor selalu diparkir di input/overlay aktif.
385
+ - TUI frame selalu memiliki tinggi valid; terminal kecil menolak layar interaktif
386
+ secara fail-closed, bukan menampilkan frame setengah.
387
+ - TTY dapat memakai aligned table; non-TTY dan machine mempertahankan source sanitized.
388
+ - Border/padding adalah chrome, bukan evidence/data.
389
+
390
+ ## 11. Windows, PowerShell, dan ANSI
391
+
392
+ - ANSI/Cursor control tidak diasumsikan selalu tersedia.
393
+ - `NO_COLOR` dan pipe/redirect menang atas `TERM`/`COLORTERM`.
394
+ - Windows legacy memakai ASCII glyph dan no-color-friendly words.
395
+ - ConPTY limitation harus diuji atau di-skip transparan; tidak boleh dianggap hijau
396
+ palsu.
397
+ - CRLF dan paste bracketed harus aman.
398
+ - Ctrl+C/EOF harus menghasilkan state yang koheren dan mengembalikan raw mode.
399
+ - Alternate-screen harus paired pada quit, error, fatal signal, dan child release.
400
+
401
+ ## 12. Copy/paste dan selection
402
+
403
+ Output harus berguna bila disalin ke issue, log, chat, atau docs:
404
+
405
+ - status tidak bergantung pada warna saja;
406
+ - status word dan path tetap terlihat;
407
+ - source text, bukan terminal escape, masuk ke clipboard;
408
+ - app-level selection dipetakan ke source melalui wrap/CJK/SGR/table;
409
+ - prompt/popup/footer tidak selectable kecuali dirancang eksplisit;
410
+ - `Ctrl+C` menyalin selection jika ada, tanpa selection no-op;
411
+ - `Esc` membersihkan selection sebelum behavior cancel apa pun;
412
+ - kegagalan OSC52 terlihat dan `/copy` tetap menjadi fallback.
413
+
414
+ Native terminal drag selection is not promised while the app owns mouse tracking.
415
+
416
+ ## 13. Accessibility dan i18n
417
+
418
+ - Semua user-visible UI text memakai dictionary `t()` pada TUI/linear surface yang
419
+ aktif.
420
+ - UI tidak bergantung pada warna atau glyph saja.
421
+ - A11y live-region/terminal bell harus opsional dan tidak mencemari machine stdout.
422
+ - Prioritas locale: session command > environment > persisted state > OS locale
423
+ > English fallback.
424
+ - Translation key yang hilang fallback ke English, bukan mencetak key secara diam-diam.
425
+
426
+ ## 14. Anti-patterns
427
+
428
+ - `if (text.includes("denied"))` menentukan status.
429
+ - Raw tool stdout langsung menjadi normal UI.
430
+ - Normal mode == debug mode.
431
+ - Semua detail disembunyikan sampai final dump.
432
+ - Model narration dipakai menggantikan runtime state.
433
+ - Renderer menyimpan state kedua yang berbeda dengan reducer.
434
+ - `eventSeq` dianggap causality.
435
+ - Context compaction menghapus presentation history.
436
+ - Selection menyalin frame bytes/ANSI/padding.
437
+ - Direct stdout/stderr write baru tanpa owner dan category.
438
+
439
+ ## 15. UX acceptance checklist
440
+
441
+ - [ ] User dapat melihat task, status, dan next action tanpa membaca debug.
442
+ - [ ] Tool denied/failed/cancelled/interrupted berbeda secara tekstual.
443
+ - [ ] Parallel work aggregated, tidak raw interleaved.
444
+ - [ ] Progress menunjukkan perubahan state, bukan spam.
445
+ - [ ] Plan bukan replay activity.
446
+ - [ ] Finding dan evidence terpisah secara semantic.
447
+ - [ ] Copy/paste tetap berguna tanpa color.
448
+ - [ ] 80-column/narrow/Unicode/resize/Windows fallback teruji.
449
+ - [ ] Machine output tidak bergantung pada scraping human text.
@@ -123,7 +123,7 @@ Aman untuk emoji: `backspace` sudah code-point aware (`prompt-engine.ts:80`); lo
123
123
  | # | Masalah | Berkas | Perbaikan |
124
124
  |---|---|---|---|
125
125
  | 7 | Overlay meluber melewati tinggi terminal dan tidak bisa di-scroll — 30 baris dirender penuh di terminal 20 baris, header terguling keluar | `fullscreen.ts:287, 344` | Slice ke `overlayLines`, state `overlayScroll`, panah/PgUp/PgDn, indikator `n/total`. Pinjam logika `cli/panel.ts:64-82` yang sudah benar |
126
- | 8 | Byte mouse bocor jadi teks (`teks` → `teks 00` saat diklik) | `screen.ts:30`, `prompt-engine.ts:225` | Hapus `enableMouse()`/`disableMouse()` — tidak ada konsumennya. `decodeKey` mengenali dan **membuang** `ESC[M`+3 byte serta SGR `ESC[<…M/m` untuk terminal yang mengirimnya sendiri |
126
+ | 8 | Byte mouse bocor jadi teks (`teks` → `teks 00` saat diklik) | `screen.ts:30`, `prompt-engine.ts:225` | Decoder mengenali `ESC[M`+3 byte serta SGR `ESC[<…M/m`; klik dibuang, wheel dinormalisasi menjadi scroll transkrip, dan mouse tracking hanya aktif selama TUI |
127
127
  | 9 | `/resume` di TUI hanya mencetak instruksi manual | `fullscreen-driver.ts:114` | Respawn dengan `--resume <id>` seperti jalur klasik (`commands.ts:326`) |
128
128
  | 9b | Tiap slash command menembak `onPicker` → `onOverlay` → `onLine` berurutan | `fullscreen.ts:218-241` | Satu tabel dispatch: `builtin(picker) | builtin(overlay) | skill | prompt`, diputuskan sebelum eksekusi, bukan dengan mencoba tiga jalur |
129
129
  | 10 | Panah atas menggabungkan history ke teks yang ada (`halo` → `halo audit dong…`) | `cli/input.ts:198` | Ganti baris, jangan gabungkan — sejajar dengan perilaku shell dan dengan jalur fullscreen |
@@ -204,6 +204,6 @@ Agar cakupan jelas dan tidak melebar:
204
204
 
205
205
  - **Tidak ada framework TUI baru.** Pure ANSI tetap. Ink/blessed akan membuang seluruh `fullscreen.ts` demi masalah yang perbaikannya berukuran satu baris sampai satu fungsi.
206
206
  - **Tidak ada wrap/scroll transcript virtual.** `RING_MAX 60` dan `tail.slice(-bodyH)` memadai; sisa PLAN_UIUX soal virtual scroll ditunda sampai ada keluhan nyata.
207
- - **Tidak ada mouse click-to-copy** (PLAN_UIUX P3). Mouse tracking justru dimatikan di fase 5 — ia hanya merusak input.
207
+ - **Tidak ada mouse click-to-copy** (PLAN_UIUX P3). Mouse wheel dipakai untuk scroll transkrip; klik mouse tetap diabaikan agar tidak merusak input.
208
208
  - **Tidak ada tema baru.** Empat preset yang ada dibuat bekerja lebih dulu.
209
209
  - **Repo-map, OAuth live, resolve-rate, publish npm** tetap di daftar tertunda PLAN_V5 — bukan UI/UX.
package/docs/README.md CHANGED
@@ -68,7 +68,7 @@ Anda baru dan tak mau menebak urutan baca? Ikuti jalur ini (total ±15 menit):
68
68
  1. **Install** — [Instalasi](getting-started.md) (5 menit): Bun, clone, `doctor`.
69
69
  2. **Prompt pertama** — [Quickstart](quickstart.md) (5 menit): wizard/API key atau OAuth, prompt ter-verify pertama.
70
70
  3. **Pilih mode** — [Memilih Mode](choosing-mode.md) (2 menit): baca, ubah, approve, atau plan.
71
- 4. **Workflow pertama** — [CLI](cli.md) + [REPL](repl.md): flag harian dan slash command sesuai kebutuhan.
71
+ 4. **Workflow pertama** — [CLI](cli.md) + [TUI](repl.md): flag harian dan slash command sesuai kebutuhan.
72
72
 
73
73
  Habis itu, baca sesuai kebutuhan lewat tabel Navigasi di bawah — tak perlu berurutan.
74
74
 
@@ -81,7 +81,7 @@ Habis itu, baca sesuai kebutuhan lewat tabel Navigasi di bawah — tak perlu ber
81
81
  | Mulai dari nol sampai membuat prompt pertama yang terverifikasi | [Quickstart](quickstart.md) |
82
82
  | Arti istilah-istilah yang dipakai di sini | [Glosarium](glossary.md) |
83
83
  | Semua perintah CLI dan flag yang tersedia | [CLI](cli.md) |
84
- | Perintah khusus di dalam Minicode dan tombol pintas | [REPL](repl.md) |
84
+ | Perintah khusus di dalam Minicode dan tombol pintas | [TUI](repl.md) |
85
85
  | Cara menjalankan Minicode tanpa interaksi (otomatis / di CI) | [Otomasi & CI](exec.md) |
86
86
  | Cara menyimpan pengaturan dan di mana data tersimpan | [Config](config.md) |
87
87
  | Cara menambah penyedia AI dan mengelola akses | [Config & Provider](config-providers.md) |
@@ -96,8 +96,9 @@ Habis itu, baca sesuai kebutuhan lewat tabel Navigasi di bawah — tak perlu ber
96
96
  | Threat model, prompt injection, supply chain | [Keamanan](security.md) |
97
97
  | Error umum + `doctor` | [Troubleshooting](troubleshooting.md) |
98
98
  | Peta lapisan, alur satu prompt | [Arsitektur](architecture.md) |
99
- | Kontrak stdout/stderr FROZEN, invariant I1–I30 | [Kontrak Terminal](terminal.md) |
99
+ | Kontrak stdout/stderr FROZEN, invariant I1–I35 | [Kontrak Terminal](terminal.md) |
100
100
  | Kontrak internal kontributor: terminal FROZEN, control-plane, pipeline render | [Internal & Arsitektur](TERMINAL_CONTRACT.md) (grup di sidebar) |
101
+ | Audit dan target arsitektur output/presentation | [Output Architecture Audit](OUTPUT_ARCHITECTURE_AUDIT.md) |
101
102
  | Ikut kontribusi, gate, batas lapisan | [Contributing](contributing.md) |
102
103
  | Perubahan per versi | [Changelog](changelog.md) |
103
104
  | Arsip panduan monolit lama (baca hanya bila perlu) | `USAGE.md` (file pendamping, status legacy) |