@nac3/forge-cli 1.0.50 → 1.0.52
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.md +466 -390
- package/dist/chat/agent_scope.d.ts +41 -0
- package/dist/chat/agent_scope.d.ts.map +1 -0
- package/dist/chat/agent_scope.js +80 -0
- package/dist/chat/agent_scope.js.map +1 -0
- package/dist/chat/agent_session.d.ts +46 -0
- package/dist/chat/agent_session.d.ts.map +1 -0
- package/dist/chat/agent_session.js +169 -0
- package/dist/chat/agent_session.js.map +1 -0
- package/dist/chat/bridge.d.ts +8 -0
- package/dist/chat/bridge.d.ts.map +1 -1
- package/dist/chat/bridge.js +8 -3
- package/dist/chat/bridge.js.map +1 -1
- package/dist/chat/doctrine_digest.d.ts +6 -1
- package/dist/chat/doctrine_digest.d.ts.map +1 -1
- package/dist/chat/doctrine_digest.js +7 -2
- package/dist/chat/doctrine_digest.js.map +1 -1
- package/dist/chat/panel.d.ts.map +1 -1
- package/dist/chat/panel.js +326 -8
- package/dist/chat/panel.js.map +1 -1
- package/dist/chat/server.d.ts +20 -1
- package/dist/chat/server.d.ts.map +1 -1
- package/dist/chat/server.js +122 -7
- package/dist/chat/server.js.map +1 -1
- package/dist/chat/tools/nac3_invoke.d.ts.map +1 -1
- package/dist/chat/tools/nac3_invoke.js +57 -1
- package/dist/chat/tools/nac3_invoke.js.map +1 -1
- package/dist/chat/tools/session_verbs.d.ts +39 -0
- package/dist/chat/tools/session_verbs.d.ts.map +1 -0
- package/dist/chat/tools/session_verbs.js +299 -0
- package/dist/chat/tools/session_verbs.js.map +1 -0
- package/dist/chat/tools.d.ts.map +1 -1
- package/dist/chat/tools.js +16 -0
- package/dist/chat/tools.js.map +1 -1
- package/dist/commands/chat.d.ts +18 -4
- package/dist/commands/chat.d.ts.map +1 -1
- package/dist/commands/chat.js +81 -2
- package/dist/commands/chat.js.map +1 -1
- package/dist/commands/pilot.d.ts.map +1 -1
- package/dist/commands/pilot.js +3 -1
- package/dist/commands/pilot.js.map +1 -1
- package/dist/core/file_tree.d.ts +27 -0
- package/dist/core/file_tree.d.ts.map +1 -0
- package/dist/core/file_tree.js +87 -0
- package/dist/core/file_tree.js.map +1 -0
- package/dist/core/limits_config.d.ts +10 -0
- package/dist/core/limits_config.d.ts.map +1 -1
- package/dist/core/limits_config.js +9 -0
- package/dist/core/limits_config.js.map +1 -1
- package/dist/docs/doctrine/session-orchestration.md +86 -0
- package/dist/nac3/internal_manifest.d.ts.map +1 -1
- package/dist/nac3/internal_manifest.js +103 -0
- package/dist/nac3/internal_manifest.js.map +1 -1
- package/dist/nac3/manifest_lazy.d.ts +5 -0
- package/dist/nac3/manifest_lazy.d.ts.map +1 -1
- package/dist/nac3/manifest_lazy.js +3 -3
- package/dist/nac3/manifest_lazy.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/doctrine/session-orchestration.md +86 -0
- package/package.json +1 -1
- package/src/i18n/catalogs/ar.json +13 -2
- package/src/i18n/catalogs/de.json +13 -2
- package/src/i18n/catalogs/en.json +13 -2
- package/src/i18n/catalogs/es.json +13 -2
- package/src/i18n/catalogs/fr.json +13 -2
- package/src/i18n/catalogs/hi.json +13 -2
- package/src/i18n/catalogs/it.json +13 -2
- package/src/i18n/catalogs/ja.json +13 -2
- package/src/i18n/catalogs/pt.json +13 -2
- package/src/i18n/catalogs/zh.json +13 -2
package/README.md
CHANGED
|
@@ -1,390 +1,466 @@
|
|
|
1
|
-
# Yujin Forge
|
|
2
|
-
|
|
3
|
-
**A voice-first NAC-3 development framework + build tool.** Forge
|
|
4
|
-
gives a developer (or an institution like ADIP teaching kids to
|
|
5
|
-
code) a single CLI + chat panel that covers the full app-creation
|
|
6
|
-
loop: read design specs by voice, generate code scaffolds from
|
|
7
|
-
those specs, decorate vanilla HTML into NAC-3, drive existing apps
|
|
8
|
-
via voice + chat.
|
|
9
|
-
|
|
10
|
-
> Status: **
|
|
11
|
-
>
|
|
12
|
-
>
|
|
13
|
-
>
|
|
14
|
-
>
|
|
15
|
-
> (
|
|
16
|
-
>
|
|
17
|
-
>
|
|
18
|
-
>
|
|
19
|
-
>
|
|
20
|
-
> (
|
|
21
|
-
> (
|
|
22
|
-
>
|
|
23
|
-
>
|
|
24
|
-
>
|
|
25
|
-
>
|
|
26
|
-
>
|
|
27
|
-
>
|
|
28
|
-
>
|
|
29
|
-
>
|
|
30
|
-
>
|
|
31
|
-
>
|
|
32
|
-
>
|
|
33
|
-
>
|
|
34
|
-
>
|
|
35
|
-
>
|
|
36
|
-
>
|
|
37
|
-
>
|
|
38
|
-
>
|
|
39
|
-
>
|
|
40
|
-
>
|
|
41
|
-
>
|
|
42
|
-
>
|
|
43
|
-
>
|
|
44
|
-
>
|
|
45
|
-
>
|
|
46
|
-
>
|
|
47
|
-
>
|
|
48
|
-
>
|
|
49
|
-
>
|
|
50
|
-
>
|
|
51
|
-
>
|
|
52
|
-
>
|
|
53
|
-
>
|
|
54
|
-
>
|
|
55
|
-
>
|
|
56
|
-
>
|
|
57
|
-
>
|
|
58
|
-
>
|
|
59
|
-
>
|
|
60
|
-
>
|
|
61
|
-
>
|
|
62
|
-
>
|
|
63
|
-
>
|
|
64
|
-
>
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
-
|
|
390
|
-
|
|
1
|
+
# Yujin Forge
|
|
2
|
+
|
|
3
|
+
**A voice-first NAC-3 development framework + build tool.** Forge
|
|
4
|
+
gives a developer (or an institution like ADIP teaching kids to
|
|
5
|
+
code) a single CLI + chat panel that covers the full app-creation
|
|
6
|
+
loop: read design specs by voice, generate code scaffolds from
|
|
7
|
+
those specs, decorate vanilla HTML into NAC-3, drive existing apps
|
|
8
|
+
via voice + chat.
|
|
9
|
+
|
|
10
|
+
> Status: **v1.0.51** (2026-06-28). Published on npm as
|
|
11
|
+
> `@nac3/forge-cli` (tag `latest`). **100% manifest verb
|
|
12
|
+
> coverage**: every one of the **119 declared NAC-3 verbs** has
|
|
13
|
+
> at least one fake-scripted scenario asserting it gets invoked
|
|
14
|
+
> (or refuses to) in the right intent. **56 top-level CLI
|
|
15
|
+
> commands** (see the full list below). Brain matrix QA harness +
|
|
16
|
+
> 8 helper CLIs under `yf qa`; ops docs (SECURITY, CONTRIBUTING,
|
|
17
|
+
> TESTING_GUIDE, DEPLOYMENT, CI_PIPELINE); structural fixture
|
|
18
|
+
> validator + pre-commit gate. The MCP bridge config + office.* +
|
|
19
|
+
> a11y.* verbs shipped; brain federation (parent/child) shipped;
|
|
20
|
+
> the agent orchestrator surface (`yf agent`) shipped; multi-agent
|
|
21
|
+
> session orchestration (`yujin.session.*`, opt-in, default OFF)
|
|
22
|
+
> shipped 2026-06-28.
|
|
23
|
+
>
|
|
24
|
+
> **HITO 0 -- credentials vault.** AES-256-GCM at-rest encryption
|
|
25
|
+
> with machine fingerprint binding, atomic writes (0o600), one-shot
|
|
26
|
+
> reveal, vault modal in chat panel. Slots: anthropic / openai /
|
|
27
|
+
> google_voice / elevenlabs / github_token.
|
|
28
|
+
>
|
|
29
|
+
> **HITO 1 -- voice + reader + spec ingest.** Bidirectional voice
|
|
30
|
+
> (Whisper + Google STT, ElevenLabs + Google TTS) with
|
|
31
|
+
> chunked pipelined playback (~600 ms first audio on long sections).
|
|
32
|
+
> Voiceprint enrolment + 5-layer trust model + liveness challenge on
|
|
33
|
+
> irreversible ops. Document reader for **txt / md / source / html /
|
|
34
|
+
> rtf / csv / epub / pdf / docx / xlsx** (10 formats) with voice-
|
|
35
|
+
> driven navigation (open / next / search / bookmark / recap). Spec
|
|
36
|
+
> drag-drop: drop a PDF/DOCX/etc into chat -> Forge parses ->
|
|
37
|
+
> Claude extracts requirements/entities/endpoints/components ->
|
|
38
|
+
> generates a file plan -> writes the scaffold after explicit
|
|
39
|
+
> approval -> rollback on demand.
|
|
40
|
+
>
|
|
41
|
+
> **Fase F -- 10-language i18n + manuals.** Panel UI + voice intent
|
|
42
|
+
> matcher + HTML user manuals all available in
|
|
43
|
+
> **es / en / pt / fr / ja / zh / hi / ar / de / it**. Globe button
|
|
44
|
+
> in the chat panel swaps the active language; the new
|
|
45
|
+
> `forge.manual.open` tool routes "abrime el manual" / "open the
|
|
46
|
+
> manual" / "マニュアルを開いて" / etc to the right HTML manual
|
|
47
|
+
> served through the reader pipeline. Catalog-lint refuses to
|
|
48
|
+
> publish if any locale is missing keys.
|
|
49
|
+
>
|
|
50
|
+
> Earlier work still shipping: G1 (AST migrator robustness) + G2
|
|
51
|
+
> (LLM retry loop) + G3 (multi-page HTML) + G4 (--dry-run for ai
|
|
52
|
+
> modes) + G5 (SPEC sync) + G6 (Figma scaffolder alpha) + the v0.3.0
|
|
53
|
+
> chat tool-use loop (`forge.read_manifest`,
|
|
54
|
+
> `forge.consult_nac_spec`, plus the V1.11..V1.13 github/git/
|
|
55
|
+
> lifecycle tools and the V1.28 + V1.32 reader tools).
|
|
56
|
+
>
|
|
57
|
+
> **Full vitest suite green** (~3800 cases across ~350 suites,
|
|
58
|
+
> Linux + macOS + Windows CI). AI decorator validated on calc
|
|
59
|
+
> fixture (15/15 dispatch tasks OK) + Conduit-NAC3 (178/180
|
|
60
|
+
> cross-lang at N=3).
|
|
61
|
+
> See [yujin.app/nac-spec/migration/](https://yujin.app/nac-spec/migration/)
|
|
62
|
+
> for the migration paper, `docs/HITO_1_ARCHITECTURE.md` for the
|
|
63
|
+
> voice+reader internals, and `docs/EVOLUTION_PLAN.md` for what is
|
|
64
|
+
> next.
|
|
65
|
+
|
|
66
|
+
## What it is
|
|
67
|
+
|
|
68
|
+
Four things in one:
|
|
69
|
+
|
|
70
|
+
1. **An AI-powered NAC-3 decorator.** `yf migrate <dir> --ai-silent`
|
|
71
|
+
calls Claude Sonnet 4.6 with the HTML + JS source, gets back a
|
|
72
|
+
fully-decorated HTML + JSON manifest, post-processes the output to
|
|
73
|
+
bake in the NAC3 runtime + contract bridge + inline `NAC.register`.
|
|
74
|
+
Takes ~25 s and ~$0.05 per app.
|
|
75
|
+
|
|
76
|
+
2. **A Pilot installer.** `yf pilot install <dir>` injects the
|
|
77
|
+
embedded chat + voice + multi-model bundle into any
|
|
78
|
+
Forge-decorated app. The same UI works against any NAC-3-compliant
|
|
79
|
+
page, regardless of how it was decorated.
|
|
80
|
+
|
|
81
|
+
3. **A React/AST migration scaffold (planned).** `yf migrate
|
|
82
|
+
<existing-react-repo>` audits the codebase, proposes the migration
|
|
83
|
+
path screen-by-screen, executes the diff. The audit + apply flow
|
|
84
|
+
is in place; the React-specific AST migrator is in flight.
|
|
85
|
+
|
|
86
|
+
4. **A voice-first developer assistant (HITO 1).** `yf chat`
|
|
87
|
+
launches a local panel with bidirectional voice, a 10-format
|
|
88
|
+
document reader, and drag-drop spec ingest. Drop a PDF / DOCX /
|
|
89
|
+
HTML spec into chat -> Forge extracts requirements via Claude ->
|
|
90
|
+
generates a file scaffold plan -> writes the project after you
|
|
91
|
+
approve. Reverse the scaffold with one click. Aimed at solo
|
|
92
|
+
developers + institutional teams (ADIP) who want the full
|
|
93
|
+
"read spec out loud, then write the code" cycle without leaving
|
|
94
|
+
the keyboard or the headset. See "Voice cockpit + spec ingest"
|
|
95
|
+
below.
|
|
96
|
+
|
|
97
|
+
## Quick start
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# Install
|
|
101
|
+
npm install -g @nac3/forge-cli@latest
|
|
102
|
+
|
|
103
|
+
# Guided first run: activates your license (auto-synced) + sets your
|
|
104
|
+
# AI key (BYOK). One command, it walks you through the rest.
|
|
105
|
+
yf onboard
|
|
106
|
+
|
|
107
|
+
# Decorate a vanilla HTML app (one shot, no human input)
|
|
108
|
+
yf migrate ./my-app --ai-silent --ai-out ./my-app-decorated
|
|
109
|
+
|
|
110
|
+
# Same, but include Yujin Pilot (needs the separate Pilot bundle --
|
|
111
|
+
# see "How Pilot works"; not shipped in this repo or the npm package)
|
|
112
|
+
yf migrate ./my-app --ai-silent --with-pilot --ai-out ./my-app-decorated
|
|
113
|
+
|
|
114
|
+
# Install Pilot into an already-decorated app (needs the Pilot bundle)
|
|
115
|
+
yf pilot install ./my-app-decorated
|
|
116
|
+
|
|
117
|
+
# Open it
|
|
118
|
+
xdg-open ./my-app-decorated/index.html
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
The decorated output is **drop-in NAC3-ready**: no CDN dependencies
|
|
122
|
+
at runtime, the manifest is registered inline at boot, every action
|
|
123
|
+
button is wired through `NAC.bindAction`, the floating Pilot button
|
|
124
|
+
appears bottom-right. Click it, paste an API key, and drive the page
|
|
125
|
+
by voice or text.
|
|
126
|
+
|
|
127
|
+
> NAC-3 version: Forge tracks NAC-3. The canonical version lives in
|
|
128
|
+
> the `nac-spec` repo (stable v2.5, latest alpha.5 at the time of
|
|
129
|
+
> writing); see [yujin.app/nac-spec/SPEC.html](https://yujin.app/nac-spec/SPEC.html)
|
|
130
|
+
> for the exact current value.
|
|
131
|
+
|
|
132
|
+
The chat-panel brain is BYOK and provider-agnostic. Forge wires
|
|
133
|
+
these brain providers: **Anthropic, OpenAI, Google (Gemini),
|
|
134
|
+
DeepSeek, xAI (Grok), Mistral, Cohere, Qwen (Alibaba DashScope),
|
|
135
|
+
and Zhipu GLM (z.ai)** via their own API keys, plus a **local**
|
|
136
|
+
brain via **Ollama** (or any OpenAI-compatible local server, no key
|
|
137
|
+
required). Two virtual providers complete the set: `yujin_managed`
|
|
138
|
+
(routes inference to the HITO 4 worker by plan/tier) and
|
|
139
|
+
`federation` (routes to a remote parent Forge's brain). See
|
|
140
|
+
`yf brain` + `yf federation`.
|
|
141
|
+
|
|
142
|
+
## Commands
|
|
143
|
+
|
|
144
|
+
Forge ships **56 top-level commands**. The core lifecycle:
|
|
145
|
+
|
|
146
|
+
| Command | What it does |
|
|
147
|
+
|---|---|
|
|
148
|
+
| `yf new <slug>` | Bootstrap a new Yujin Forge React app from `templates/react-app/`. |
|
|
149
|
+
| `yf migrate <repo>` | Audit (default) or apply a NAC-3 migration on a React or HTML project. See the migrate flags below. |
|
|
150
|
+
| `yf pilot install <dir>` | Inject the Pilot bundle into an already-decorated NAC-3 app (separate bundle required -- see "How Pilot works"). |
|
|
151
|
+
| `yf chat` | Launch the embedded voice+text panel hooked to the current project. |
|
|
152
|
+
| `yf test` | Run the project test corpus. |
|
|
153
|
+
| `yf ship` | Deploy gate: validate + license + tests + build -> `dist/`. |
|
|
154
|
+
| `yf doctor` | Diagnose the local Forge install + license + vault + voice + reader deps. |
|
|
155
|
+
| `yf validate [path]` | Statically check that a directory is a valid Yujin Forge project. |
|
|
156
|
+
| `yf license` | Activate, inspect, or revoke a license. |
|
|
157
|
+
| `yf onboard` | Guided first run: license (auto-synced) + BYOK key. |
|
|
158
|
+
| `yf upgrade` | Self-update (npm-global in place, or point at the desktop installer). |
|
|
159
|
+
|
|
160
|
+
`yf migrate` flags: `--apply` (React/AST), `--html` / `--assisted`
|
|
161
|
+
(rule-based HTML walker, offline), `--ai-silent` / `--ai-assisted`
|
|
162
|
+
(AI-powered decoration, paid seat), `--with-pilot` (also inject the
|
|
163
|
+
Pilot bundle).
|
|
164
|
+
|
|
165
|
+
The rest of the surface, by area:
|
|
166
|
+
|
|
167
|
+
- **Brain + keys + cost:** `brain`, `keys`, `federation`, `limits`,
|
|
168
|
+
`vault`.
|
|
169
|
+
- **Workflow + project state:** `workflow`, `pending`, `wiring`,
|
|
170
|
+
`projects`, `graph`, `triage`, `discover`, `clarify`, `spec`,
|
|
171
|
+
`approve`, `bootstrap`, `block`, `coverage`, `operate`, `legacy`.
|
|
172
|
+
- **Voice + accessibility:** `voice`.
|
|
173
|
+
- **NAC-3 + doctrine + MCP:** `manifest`, `nac3`, `doctrine`,
|
|
174
|
+
`doctrines`, `lessons`, `mcp`, `agent`.
|
|
175
|
+
- **Testing + QA:** `gen-tests`, `gen-flow-tests`, `scenarios:emit`,
|
|
176
|
+
`review-screens`, `review-status`, `qa`, `test-agent`.
|
|
177
|
+
- **Design + scaffolding:** `figma`.
|
|
178
|
+
- **Deploy + ops + infra:** `deploy`, `tunnel`, `publish`, `repo`,
|
|
179
|
+
`app`, `support`, `log`, `provision-link`.
|
|
180
|
+
- **Mobile:** `mobile`.
|
|
181
|
+
|
|
182
|
+
Run `yf --help` for the authoritative list and
|
|
183
|
+
[docs/USAGE.md](docs/USAGE.md) for every flag and worked examples.
|
|
184
|
+
|
|
185
|
+
## How decoration works
|
|
186
|
+
|
|
187
|
+
A vanilla HTML/JS app starts like:
|
|
188
|
+
|
|
189
|
+
```html
|
|
190
|
+
<button onclick="digit('7')">7</button>
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
After `yf migrate --ai-silent`:
|
|
194
|
+
|
|
195
|
+
```html
|
|
196
|
+
<body data-nac-plugin="calc">
|
|
197
|
+
...
|
|
198
|
+
<button onclick="digit('7')"
|
|
199
|
+
data-nac-id="calc.action.digit_7"
|
|
200
|
+
data-nac-role="action"
|
|
201
|
+
data-nac-action="digit_7">7</button>
|
|
202
|
+
...
|
|
203
|
+
<script src="nac.browser.js"></script>
|
|
204
|
+
<script src="calc.js"></script>
|
|
205
|
+
<script src="nac-bridge.js"></script>
|
|
206
|
+
<script>
|
|
207
|
+
(function () {
|
|
208
|
+
var manifest = { "plugin_slug": "calc", ... };
|
|
209
|
+
window.NAC.register(manifest);
|
|
210
|
+
})();
|
|
211
|
+
</script>
|
|
212
|
+
</body>
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Any LLM driver can now call:
|
|
216
|
+
|
|
217
|
+
```js
|
|
218
|
+
await NAC.click_by_verb('calc', 'digit_7');
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
and the host's existing `digit('7')` handler runs **plus** the
|
|
222
|
+
`nac:action:succeeded` contract event fires (because `nac-bridge.js`
|
|
223
|
+
re-wired the inline onclick via `NAC.bindAction`).
|
|
224
|
+
|
|
225
|
+
## How Pilot works
|
|
226
|
+
|
|
227
|
+
Pilot is a single-file IIFE bundle + companion stylesheet
|
|
228
|
+
(`pilot.bundle.js` + `pilot.css`). `yf pilot install` (or
|
|
229
|
+
`yf migrate --with-pilot`) copies both into the target directory and
|
|
230
|
+
inserts the script tags before `</body>`.
|
|
231
|
+
|
|
232
|
+
> **The Pilot bundle ships separately.** It is NOT included in this
|
|
233
|
+
> repository nor in the published `@nac3/forge-cli` npm package. To
|
|
234
|
+
> use `yf pilot install` / `yf migrate --with-pilot` you must supply
|
|
235
|
+
> the bundle yourself. `yf pilot install` looks for it (in order) at:
|
|
236
|
+
>
|
|
237
|
+
> 1. `--source <dir>` (an explicit path you pass), then
|
|
238
|
+
> 2. `../yujin-pilot/dist/` (a sibling checkout of the Pilot repo), then
|
|
239
|
+
> 3. `node_modules/@yujin/pilot/dist/` (if `@yujin/pilot` is installed).
|
|
240
|
+
>
|
|
241
|
+
> If none contain `pilot.bundle.js`, the command stops with a clear
|
|
242
|
+
> error listing exactly where it looked and how to point it at the
|
|
243
|
+
> bundle. Obtain the bundle from the
|
|
244
|
+
> [Yujin Pilot repo](https://github.com/yujinapp/yujin-pilot) (build
|
|
245
|
+
> its `dist/`), or pass `--source` at a path that already has it.
|
|
246
|
+
|
|
247
|
+
At runtime, Pilot mounts a floating sumi-e branch button at
|
|
248
|
+
bottom-right. Click it: chat panel opens. Click again: switches to
|
|
249
|
+
the "pizarra" mode (chat + voice + action trace). Configure: paste
|
|
250
|
+
an API key for any supported provider. Each provider supports all the
|
|
251
|
+
models the
|
|
252
|
+
[NAC3 benchmark](https://yujin.app/nac-spec/benchmark/) exercised.
|
|
253
|
+
|
|
254
|
+
Pilot reads `window.NAC.list_registered_plugins()` to get the active
|
|
255
|
+
manifest, sends it to the selected LLM with the user's utterance,
|
|
256
|
+
parses the JSON action chain, dispatches each via
|
|
257
|
+
`NAC.click_by_verb`, reads back any configured status probe, then
|
|
258
|
+
speaks the result via Web Speech / ElevenLabs / Google Cloud TTS.
|
|
259
|
+
|
|
260
|
+
Config persists in `localStorage` under `yujin_pilot.config`. Keys
|
|
261
|
+
never leave the browser. (Production deployments belong behind a
|
|
262
|
+
server proxy.)
|
|
263
|
+
|
|
264
|
+
See [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for the full
|
|
265
|
+
internal architecture.
|
|
266
|
+
|
|
267
|
+
## Voice cockpit + spec ingest (HITO 1)
|
|
268
|
+
|
|
269
|
+
`yf chat` opens a local panel with three views (globito / mini /
|
|
270
|
+
full). The full view has a chat stream on the left and a "pizarra"
|
|
271
|
+
trace on the right that shows every tool the system invoked to
|
|
272
|
+
answer.
|
|
273
|
+
|
|
274
|
+
What it covers end-to-end:
|
|
275
|
+
|
|
276
|
+
- **Vault** -- modal accessible via the Keys button. Slots for
|
|
277
|
+
`anthropic`, `openai`, `google_voice`, `elevenlabs`,
|
|
278
|
+
`github_token`. Values are encrypted at rest with the machine
|
|
279
|
+
fingerprint; shown once on entry, never again.
|
|
280
|
+
|
|
281
|
+
- **Voice in / voice out.** Press the mic, speak; the panel
|
|
282
|
+
records via `MediaRecorder`, ships the audio to the configured
|
|
283
|
+
STT provider, and either dispatches a recognised reader command
|
|
284
|
+
directly or feeds the transcript to the chat loop. Replies are
|
|
285
|
+
spoken back via the configured TTS provider with chunked
|
|
286
|
+
prefetch (first audio in ~600 ms even on long answers).
|
|
287
|
+
|
|
288
|
+
- **Voiceprint trust.** Enroll your voice once -- subsequent voice
|
|
289
|
+
commands are gated by a 5-layer trust model
|
|
290
|
+
(unknown / heard / recognised / trusted / authorised). Irreversible
|
|
291
|
+
actions (force push, branch delete, deploy) ALWAYS require a
|
|
292
|
+
liveness challenge regardless of trust level: a random Spanish/
|
|
293
|
+
English phrase plus a random number you have to read back.
|
|
294
|
+
|
|
295
|
+
- **Document reader.** Open any file in the project root and
|
|
296
|
+
navigate by voice: "abrime el readme", "siguiente", "buscar
|
|
297
|
+
pricing", "marcame aqui como inicio", "volver a marca inicio",
|
|
298
|
+
"recap". Supports **10 formats**: txt, md, source code (.ts / .py
|
|
299
|
+
/ .rs / 80+ extensions), HTML, RTF, CSV/TSV, EPUB, **PDF**
|
|
300
|
+
(via pdfjs-dist), **DOCX** (via mammoth), **XLSX** (via sheetjs).
|
|
301
|
+
All format detection happens automatically.
|
|
302
|
+
|
|
303
|
+
- **Spec drag-drop.** Drag a spec file onto the chat panel; an
|
|
304
|
+
overlay appears + the file uploads. Forge parses it through the
|
|
305
|
+
same reader pipeline, then a Claude call extracts structured
|
|
306
|
+
requirements, entities, endpoints, and UI components. A second
|
|
307
|
+
Claude call turns the extraction into a concrete file scaffold
|
|
308
|
+
plan (which files to create + where + what kind + which
|
|
309
|
+
requirement each serves + open questions for clarification).
|
|
310
|
+
Nothing is written until you POST `{approve: true}`. On approve,
|
|
311
|
+
the scaffolder writes the planned files with hand-rolled
|
|
312
|
+
templates per kind (model / api / component / test / doc) and
|
|
313
|
+
records a rollback log -- one click undoes the whole scaffold.
|
|
314
|
+
|
|
315
|
+
- **Reader recap modes.** Default `literal` mode joins recent
|
|
316
|
+
spoken blocks into a TTS-friendly narrative for "que dijiste".
|
|
317
|
+
Optional `summary` mode calls Claude for a 1-2 sentence
|
|
318
|
+
compression; gated by env var `YF_ENABLE_CLAUDE_RECAP=1` so it
|
|
319
|
+
cannot fire by accident and charge tokens. Cost model in
|
|
320
|
+
`docs/RECAP_CLAUDE_COSTS.md`.
|
|
321
|
+
|
|
322
|
+
### ADIP voice-first demo loop
|
|
323
|
+
|
|
324
|
+
```
|
|
325
|
+
User: (mic) "abrime el plan.md"
|
|
326
|
+
-> reader.open -> TTS "El Plan"
|
|
327
|
+
User: (mic) "siguiente"
|
|
328
|
+
-> reader.next -> TTS "Primer paso"
|
|
329
|
+
User: (mic) "buscar pricing"
|
|
330
|
+
-> reader.search -> TTS top snippet
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
Drag a spec PDF onto the panel:
|
|
334
|
+
|
|
335
|
+
```
|
|
336
|
+
panel -> spec ingested. Title: ADIP Spec. 4 sections.
|
|
337
|
+
First lines:
|
|
338
|
+
- The system MUST register patients.
|
|
339
|
+
- ...
|
|
340
|
+
panel (via Claude)-> extraction: 1 requirement, 1 entity (Paciente),
|
|
341
|
+
1 endpoint (POST /patients), 1 component
|
|
342
|
+
(PatientCard).
|
|
343
|
+
panel (via Claude)-> plan: src/models/Paciente.ts +
|
|
344
|
+
src/api/patients.ts +
|
|
345
|
+
src/components/PatientCard.tsx + README.md.
|
|
346
|
+
Open question: authentication unspecified.
|
|
347
|
+
user clicks -> approve.
|
|
348
|
+
scaffolder -> 4 files written, rollback log captured.
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
If anything looks off: one `POST /api/forge/ingest/rollback` and
|
|
352
|
+
the project is back to its prior state.
|
|
353
|
+
|
|
354
|
+
### Architecture pointer
|
|
355
|
+
|
|
356
|
+
The full step-by-step voice loop, reader pipeline, voiceprint
|
|
357
|
+
state machine, and "how to add a parser / intent / trust class"
|
|
358
|
+
recipes live in [docs/HITO_1_ARCHITECTURE.md](docs/HITO_1_ARCHITECTURE.md).
|
|
359
|
+
|
|
360
|
+
## Multi-agent session orchestration (opt-in, default OFF)
|
|
361
|
+
|
|
362
|
+
The single chat session can spawn **bounded headless sub-sessions**
|
|
363
|
+
to do orthogonal, well-scoped work in parallel and collect the
|
|
364
|
+
results over the coordination bridge. This is the `yujin.session.*`
|
|
365
|
+
verb family (`spawn` / `collect` / `list` / `stop`).
|
|
366
|
+
|
|
367
|
+
- **Default OFF.** The whole capability is gated by
|
|
368
|
+
`multiagent.enabled` in the limits config (Ajustes > Limites).
|
|
369
|
+
While off, the `yujin.session.*` verbs are hidden from the
|
|
370
|
+
manifest, the doctrine is not injected, and the handlers refuse.
|
|
371
|
+
Turn it on explicitly to use it.
|
|
372
|
+
- **Orthogonal + parallel only.** A sub-session boots a whole
|
|
373
|
+
headless server and spends BYOK tokens, so it is reserved for
|
|
374
|
+
independent work (wide reads, research, analysis over a different
|
|
375
|
+
subsystem) that does not need the live conversation. The user
|
|
376
|
+
approves each spawn; set `budget_tokens` to bound the spend.
|
|
377
|
+
- **Restricted child scope (enforced).** A sub-session can read /
|
|
378
|
+
search / write files in its project root, run safe shell, and
|
|
379
|
+
query the graph / pendings / reader. It CANNOT push / commit, do
|
|
380
|
+
destructive or irreversible actions, mutate workflow / pending /
|
|
381
|
+
keys, or spawn its own sub-sessions (no grandchildren). Anything
|
|
382
|
+
outward stays with the parent, where the user can approve it.
|
|
383
|
+
|
|
384
|
+
Full rules: [docs/doctrine/session-orchestration.md](docs/doctrine/session-orchestration.md).
|
|
385
|
+
|
|
386
|
+
## Why a separate product
|
|
387
|
+
|
|
388
|
+
NAC (the spec) is Apache-2.0 free forever. The reference runtime
|
|
389
|
+
`nac-spec` on npm is Apache-2.0 free forever. **Yujin Forge is the
|
|
390
|
+
commercial build layer:**
|
|
391
|
+
|
|
392
|
+
- The AI decorator (`--ai-silent` / `--ai-assisted`) burns Anthropic
|
|
393
|
+
tokens on your behalf; the seat license is what funds that.
|
|
394
|
+
- The chat panel, React scaffolder, test corpus generator, and mock
|
|
395
|
+
generator are all license-gated.
|
|
396
|
+
- The static-rule HTML walker (`--html`, `--assisted`) is open and
|
|
397
|
+
works offline.
|
|
398
|
+
|
|
399
|
+
The Apache spec attracts the ecosystem; Forge monetises the delivery
|
|
400
|
+
experience for teams that want to skip the per-app plumbing.
|
|
401
|
+
|
|
402
|
+
## What Forge gives an app (under the hood)
|
|
403
|
+
|
|
404
|
+
Every decorated output ships:
|
|
405
|
+
|
|
406
|
+
1. `index.html` -- decorated, drop-in NAC3-ready
|
|
407
|
+
2. `manifest.json` -- the NAC3 manifest, version-pinnable
|
|
408
|
+
3. `nac.browser.js` -- the NAC3 runtime (copied locally, no CDN dep)
|
|
409
|
+
4. `nac-bridge.js` -- ~50 lines, wires `NAC.bindAction` for every
|
|
410
|
+
action element so the host's existing handlers stay intact AND the
|
|
411
|
+
contract events fire
|
|
412
|
+
5. **With `--with-pilot`:** `pilot.bundle.js` + `pilot.css` -- the
|
|
413
|
+
embedded chat + voice cockpit
|
|
414
|
+
|
|
415
|
+
After running Forge, your app is ready to be driven by any LLM agent
|
|
416
|
+
that understands NAC-3. Pilot is one such driver; the
|
|
417
|
+
[600-run benchmark](https://yujin.app/nac-spec/benchmark/) was driven
|
|
418
|
+
by a custom harness; the React SDK in
|
|
419
|
+
[`@yujin/nac-react`](https://www.npmjs.com/package/nac-spec) is
|
|
420
|
+
another.
|
|
421
|
+
|
|
422
|
+
## Where this lives in the Yujin ecosystem
|
|
423
|
+
|
|
424
|
+
```
|
|
425
|
+
NAC (Apache-2.0) -- pkuschnirof/rpaforce-crm + yujin.app/nac-spec
|
|
426
|
+
spec + reference runtime + nac-spec NPM package
|
|
427
|
+
|
|
|
428
|
+
| depends on
|
|
429
|
+
v
|
|
430
|
+
Yujin Forge (closed core) -- yujinapp/yujin-forge (build NAC apps)
|
|
431
|
+
AI decorator, React scaffolder, license gating, this repo
|
|
432
|
+
| sibling product
|
|
433
|
+
v
|
|
434
|
+
Yujin Pilot (closed core) -- yujinapp/yujin-pilot (drive NAC apps)
|
|
435
|
+
Embedded chat + voice + multi-model cockpit
|
|
436
|
+
|
|
|
437
|
+
| downstream adopter
|
|
438
|
+
v
|
|
439
|
+
Customer apps
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
## Documentation
|
|
443
|
+
|
|
444
|
+
- [README.md](README.md) -- this file
|
|
445
|
+
- [PROJECT.md](PROJECT.md) -- topology + governance + slice/HITO process (mandatory read before touching code)
|
|
446
|
+
- [docs/SQ.md](docs/SQ.md) -- quality standards + deliverables + pre-development checklist (Spanish, mandatory)
|
|
447
|
+
- [docs/QUICKSTART_ADIP.md](docs/QUICKSTART_ADIP.md) -- step-by-step setup guide for the ADIP institutional rollout (Spanish)
|
|
448
|
+
- [docs/USAGE.md](docs/USAGE.md) -- every command + flag + worked examples
|
|
449
|
+
- [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) -- internals of the AI decorator + wiring + Pilot integration
|
|
450
|
+
- [docs/HITO_1_ARCHITECTURE.md](docs/HITO_1_ARCHITECTURE.md) -- HITO 1 voice + reader + spec ingest reference
|
|
451
|
+
- [docs/LANGUAGE_POLICY.md](docs/LANGUAGE_POLICY.md) -- the 10-canonical-languages rule + catalog-lint mechanism
|
|
452
|
+
- [docs/manuals/manual.es.html](docs/manuals/manual.es.html) -- end-user manual (10 languages: es/en/pt/fr/ja/zh/hi/ar/de/it)
|
|
453
|
+
- [docs/RECAP_CLAUDE_COSTS.md](docs/RECAP_CLAUDE_COSTS.md) -- cost model + lock mechanism for the Claude recap mode
|
|
454
|
+
- [docs/ROADMAP_VOICE_FORGE_2026_05_23.md](docs/ROADMAP_VOICE_FORGE_2026_05_23.md) -- HITO 0/1/2/3 roadmap with decisions taken
|
|
455
|
+
- [docs/TECHNICAL_MANUAL.md](docs/TECHNICAL_MANUAL.md) -- living manual updated at each slice close
|
|
456
|
+
- [docs/SPEC.md](docs/SPEC.md) -- the contract Forge makes with adopting teams
|
|
457
|
+
- [docs/COMMERCIAL_PLAN.md](docs/COMMERCIAL_PLAN.md) -- pricing + licensing model
|
|
458
|
+
- [docs/SESSION_HANDOFF_2026_05_23_AT_DOCTOR.md](docs/SESSION_HANDOFF_2026_05_23_AT_DOCTOR.md) -- state at last session boundary
|
|
459
|
+
|
|
460
|
+
## See also
|
|
461
|
+
|
|
462
|
+
- [NAC spec](https://yujin.app/nac-spec/SPEC.html)
|
|
463
|
+
- [NAC3 v2.3 benchmark](https://yujin.app/nac-spec/benchmark/) -- 600 runs across 5 models + 3 protocols
|
|
464
|
+
- [Migration paper](https://yujin.app/nac-spec/migration/) -- Forge silent vs assisted vs Sumi manual on a calculator
|
|
465
|
+
- [Yujin Pilot](https://github.com/yujinapp/yujin-pilot) -- the sibling driver product
|
|
466
|
+
- [Yujin CRM](https://github.com/pkuschnirof/rpaforce-crm) -- the first adopter of the full stack
|