@soddong/agentic-runtime 0.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.
Files changed (114) hide show
  1. package/.tbls.yml +103 -0
  2. package/CHANGELOG.md +229 -0
  3. package/README.md +707 -0
  4. package/dist/agent-router.d.ts +39 -0
  5. package/dist/agent-router.d.ts.map +1 -0
  6. package/dist/agent-router.js +175 -0
  7. package/dist/agent-router.js.map +1 -0
  8. package/dist/bundle-installer.d.ts +25 -0
  9. package/dist/bundle-installer.d.ts.map +1 -0
  10. package/dist/bundle-installer.js +149 -0
  11. package/dist/bundle-installer.js.map +1 -0
  12. package/dist/bundle-registry.d.ts +30 -0
  13. package/dist/bundle-registry.d.ts.map +1 -0
  14. package/dist/bundle-registry.js +102 -0
  15. package/dist/bundle-registry.js.map +1 -0
  16. package/dist/claude-code-adapter.d.ts +27 -0
  17. package/dist/claude-code-adapter.d.ts.map +1 -0
  18. package/dist/claude-code-adapter.js +177 -0
  19. package/dist/claude-code-adapter.js.map +1 -0
  20. package/dist/cli.d.ts +3 -0
  21. package/dist/cli.d.ts.map +1 -0
  22. package/dist/cli.js +1731 -0
  23. package/dist/cli.js.map +1 -0
  24. package/dist/codex-adapter.d.ts +23 -0
  25. package/dist/codex-adapter.d.ts.map +1 -0
  26. package/dist/codex-adapter.js +264 -0
  27. package/dist/codex-adapter.js.map +1 -0
  28. package/dist/database.d.ts +22 -0
  29. package/dist/database.d.ts.map +1 -0
  30. package/dist/database.js +184 -0
  31. package/dist/database.js.map +1 -0
  32. package/dist/execution-projects.d.ts +71 -0
  33. package/dist/execution-projects.d.ts.map +1 -0
  34. package/dist/execution-projects.js +333 -0
  35. package/dist/execution-projects.js.map +1 -0
  36. package/dist/execution-query.d.ts +73 -0
  37. package/dist/execution-query.d.ts.map +1 -0
  38. package/dist/execution-query.js +370 -0
  39. package/dist/execution-query.js.map +1 -0
  40. package/dist/execution.d.ts +47 -0
  41. package/dist/execution.d.ts.map +1 -0
  42. package/dist/execution.js +153 -0
  43. package/dist/execution.js.map +1 -0
  44. package/dist/hook-command.d.ts +3 -0
  45. package/dist/hook-command.d.ts.map +1 -0
  46. package/dist/hook-command.js +13 -0
  47. package/dist/hook-command.js.map +1 -0
  48. package/dist/hook-record.d.ts +16 -0
  49. package/dist/hook-record.d.ts.map +1 -0
  50. package/dist/hook-record.js +427 -0
  51. package/dist/hook-record.js.map +1 -0
  52. package/dist/index.d.ts +29 -0
  53. package/dist/index.d.ts.map +1 -0
  54. package/dist/index.js +15 -0
  55. package/dist/index.js.map +1 -0
  56. package/dist/kiro-adapter.d.ts +38 -0
  57. package/dist/kiro-adapter.d.ts.map +1 -0
  58. package/dist/kiro-adapter.js +374 -0
  59. package/dist/kiro-adapter.js.map +1 -0
  60. package/dist/module-registry.d.ts +21 -0
  61. package/dist/module-registry.d.ts.map +1 -0
  62. package/dist/module-registry.js +75 -0
  63. package/dist/module-registry.js.map +1 -0
  64. package/dist/runtime-info.d.ts +8 -0
  65. package/dist/runtime-info.d.ts.map +1 -0
  66. package/dist/runtime-info.js +15 -0
  67. package/dist/runtime-info.js.map +1 -0
  68. package/dist/seed-importer.d.ts +77 -0
  69. package/dist/seed-importer.d.ts.map +1 -0
  70. package/dist/seed-importer.js +570 -0
  71. package/dist/seed-importer.js.map +1 -0
  72. package/docs/build.md +129 -0
  73. package/docs/configuration.md +61 -0
  74. package/docs/delivery.md +90 -0
  75. package/docs/operations.md +112 -0
  76. package/docs/publishing.md +196 -0
  77. package/docs/schema/generated/README.md +31 -0
  78. package/docs/schema/generated/agentic_execution_logs.md +90 -0
  79. package/docs/schema/generated/agentic_execution_logs.svg +52 -0
  80. package/docs/schema/generated/agentic_execution_outputs.md +85 -0
  81. package/docs/schema/generated/agentic_execution_outputs.svg +52 -0
  82. package/docs/schema/generated/agentic_execution_project_activities.md +83 -0
  83. package/docs/schema/generated/agentic_execution_project_activities.svg +71 -0
  84. package/docs/schema/generated/agentic_execution_project_stages.md +69 -0
  85. package/docs/schema/generated/agentic_execution_project_stages.svg +71 -0
  86. package/docs/schema/generated/agentic_execution_projects.md +82 -0
  87. package/docs/schema/generated/agentic_execution_projects.svg +92 -0
  88. package/docs/schema/generated/agentic_execution_runs.md +111 -0
  89. package/docs/schema/generated/agentic_execution_runs.svg +92 -0
  90. package/docs/schema/generated/agentic_project_bundles.md +106 -0
  91. package/docs/schema/generated/agentic_project_bundles.svg +91 -0
  92. package/docs/schema/generated/agentic_project_modules.md +77 -0
  93. package/docs/schema/generated/agentic_project_modules.svg +49 -0
  94. package/docs/schema/generated/agentic_runtime_metadata.md +62 -0
  95. package/docs/schema/generated/agentic_runtime_metadata.svg +28 -0
  96. package/docs/schema/generated/agentic_schema_migrations.md +65 -0
  97. package/docs/schema/generated/agentic_schema_migrations.svg +32 -0
  98. package/docs/schema/generated/agentic_seed_import_items.md +85 -0
  99. package/docs/schema/generated/agentic_seed_import_items.svg +47 -0
  100. package/docs/schema/generated/agentic_seed_import_runs.md +103 -0
  101. package/docs/schema/generated/agentic_seed_import_runs.svg +68 -0
  102. package/docs/schema/generated/agentic_user_requests.md +66 -0
  103. package/docs/schema/generated/agentic_user_requests.svg +52 -0
  104. package/docs/schema/generated/schema.json +1976 -0
  105. package/docs/schema/generated/schema.mmd +167 -0
  106. package/docs/schema/generated/schema.svg +266 -0
  107. package/docs/schema/migrations.md +163 -0
  108. package/docs/usage.md +774 -0
  109. package/package.json +32 -0
  110. package/src/database/migrations/0001_runtime_base.sql +231 -0
  111. package/src/database/migrations/0002_runtime_bundles.sql +61 -0
  112. package/src/database/migrations/0003_runtime_seed_imports.sql +121 -0
  113. package/src/database/migrations/0004_runtime_seed_apply_status.sql +76 -0
  114. package/src/database/migrations/0005_runtime_execution_projects.sql +92 -0
package/docs/usage.md ADDED
@@ -0,0 +1,774 @@
1
+ # @soddong/agentic-runtime 사용 매뉴얼
2
+
3
+ ## 1. 목적
4
+
5
+ 본 문서는 사용자가 `@soddong/agentic-runtime`을 설치하고 `agentic` CLI 실행을 확인하는 절차를 설명합니다.
6
+
7
+ 운영환경 사용자는 구축 환경의 build, pack, publish 절차를 알 필요가 없습니다.
8
+
9
+ ## 2. 설치 전제
10
+
11
+ | 항목 | 기준 |
12
+ | --- | --- |
13
+ | NPM Registry | 기본값: `https://registry.npmjs.org/` |
14
+ | 인증 | publish 권한이 필요한 경우에만 `~/.npmrc`에 npm token 설정 |
15
+ | package | `@soddong/agentic-runtime` |
16
+ | CLI | `agentic` |
17
+
18
+ 토큰 실값은 문서, source, CI log에 기록하지 않습니다.
19
+
20
+ ```text
21
+ //registry.npmjs.org/:_authToken=${NPM_TOKEN}
22
+ ```
23
+
24
+ ## 3. 설치
25
+
26
+ registry 설정을 먼저 확인합니다.
27
+
28
+ ```bash
29
+ npm config get registry
30
+ ```
31
+
32
+ 공식 registry를 기본값으로 사용할 경우:
33
+
34
+ ```bash
35
+ npm config set registry https://registry.npmjs.org/ --location=user
36
+ ```
37
+
38
+ ```bash
39
+ npm install @soddong/agentic-runtime@0.16.0
40
+ ```
41
+
42
+ registry를 명시해야 하는 경우:
43
+
44
+ ```bash
45
+ npm install @soddong/agentic-runtime@0.16.0 --registry=https://registry.npmjs.org/
46
+ ```
47
+
48
+ Windows PowerShell:
49
+
50
+ ```powershell
51
+ npm install @soddong/agentic-runtime@0.16.0 --registry=https://registry.npmjs.org/
52
+ ```
53
+
54
+ ## 4. 실행 확인
55
+
56
+ ```bash
57
+ npx agentic --version
58
+ npx agentic --help
59
+ ```
60
+
61
+ Windows PowerShell:
62
+
63
+ ```powershell
64
+ npx agentic --version
65
+ npx agentic --help
66
+ ```
67
+
68
+ 기대 결과:
69
+
70
+ ```text
71
+ @soddong/agentic-runtime 0.16.0
72
+ ```
73
+
74
+ ## 5. 현재 지원 명령
75
+
76
+ ```bash
77
+ agentic help
78
+ agentic version
79
+ agentic init
80
+ agentic setup
81
+ agentic docs
82
+ agentic config
83
+ agentic run
84
+ agentic execution list
85
+ agentic execution latest
86
+ agentic execution show
87
+ agentic execution summary
88
+ agentic hook record
89
+ agentic db init
90
+ agentic db status
91
+ agentic adapter install
92
+ agentic adapter status
93
+ agentic agent register
94
+ agentic agent context
95
+ agentic module register
96
+ agentic module list
97
+ agentic bundle install
98
+ agentic bundle apply
99
+ agentic bundle list
100
+ agentic bundle status
101
+ agentic seed import
102
+ agentic seed apply
103
+ agentic seed status
104
+ agentic project create
105
+ agentic project status
106
+ ```
107
+
108
+ ## 6. 예정 명령
109
+
110
+ ```text
111
+ agentic validate
112
+ agentic render
113
+ ```
114
+
115
+ ## 7. 프로젝트 초기화
116
+
117
+ 사용자 프로젝트 루트에서 실행합니다.
118
+
119
+ ```bash
120
+ npx agentic init
121
+ ```
122
+
123
+ 생성 결과:
124
+
125
+ ```text
126
+ agentic.config.json
127
+ .agentic/
128
+ AGENTS.md
129
+ README.md
130
+ bin/
131
+ agentic-hook.mjs
132
+ data/
133
+ logs/
134
+ modules/
135
+ ```
136
+
137
+ 현재 설정 상태를 확인합니다.
138
+
139
+ ```bash
140
+ npx agentic config
141
+ ```
142
+
143
+ 설치된 패키지 문서 위치를 확인합니다.
144
+
145
+ ```bash
146
+ npx agentic docs
147
+ ```
148
+
149
+ Codex, Kiro, Claude Code adapter까지 한 번에 준비하려면 다음을 실행합니다.
150
+
151
+ ```bash
152
+ npx agentic setup --adapter codex
153
+ npx agentic setup --adapter kiro
154
+ npx agentic setup --adapter claude-code
155
+ ```
156
+
157
+ `adapter install`을 먼저 실행해도 됩니다. 프로젝트가 아직 초기화되지 않았으면 `adapter install`이 내부에서 `init`과 `db init`을 먼저 수행한 뒤 adapter 설치까지 진행합니다.
158
+
159
+ ```bash
160
+ npx agentic adapter install kiro
161
+ ```
162
+
163
+ `.agentic/AGENTS.md`는 @soddong/agentic-runtime managed block으로 관리됩니다.
164
+
165
+ ```md
166
+ <!-- agentic-runtime:start version=0.16.0 -->
167
+ ...
168
+ <!-- agentic-runtime:end -->
169
+ ```
170
+
171
+ `init`, `setup`, `adapter install`은 이 block의 version을 확인합니다. 기존 block version이 현재 runtime보다 낮으면 사용자 작성 영역은 보존하고 managed block만 갱신합니다. 사용자 고유 지침은 managed block 밖에 작성합니다.
172
+
173
+ Agent hook은 성능을 위해 `npx`를 매번 호출하지 않고 project-local wrapper를 사용합니다.
174
+
175
+ ```bash
176
+ node .agentic/bin/agentic-hook.mjs --source kiro --event PromptSubmit
177
+ ```
178
+
179
+ 파일 생성만 검증하려면 다음을 실행합니다.
180
+
181
+ ```bash
182
+ npx agentic setup --adapter codex --prepare-only
183
+ ```
184
+
185
+ ## 8. Runtime Execution 기록
186
+
187
+ 사용자 지시를 runtime execution으로 기록합니다.
188
+
189
+ ```bash
190
+ npx agentic run "요구사항을 검토해 주세요."
191
+ ```
192
+
193
+ Windows PowerShell:
194
+
195
+ ```powershell
196
+ npx agentic run "요구사항을 검토해 주세요."
197
+ ```
198
+
199
+ 현재 `agentic run`은 router 또는 개별 Agent module 실행 전 단계의 공통 기록 기능입니다.
200
+
201
+ 저장되는 정보:
202
+
203
+ | 정보 | 테이블 |
204
+ | --- | --- |
205
+ | 사용자 지시 | `agentic_user_requests` |
206
+ | 실행 단위 | `agentic_execution_runs` |
207
+ | 실행 로그 | `agentic_execution_logs` |
208
+ | 실행 결과 | `agentic_execution_outputs` |
209
+
210
+ `agentic init`은 `.agentic/AGENTS.md` 템플릿을 생성합니다.
211
+ consumer 프로젝트의 루트 `AGENTS.md`에는 이 내용을 반영해, Agentic Platform 관련 지시가 먼저 `npx agentic run "<사용자 지시문>"`으로 기록되도록 운영 정책을 둡니다.
212
+
213
+ ## 9. Agent Routing API
214
+
215
+ `@soddong/agentic-runtime`은 concrete domain package를 직접 의존하지 않습니다. 예를 들어 runtime이 `@soddong/agentic-domain-document`를 직접 import하지 않습니다.
216
+
217
+ 대신 agent package가 manifest를 등록하면 runtime은 등록된 manifest를 기준으로 route decision을 수행합니다.
218
+
219
+ ```ts
220
+ import {
221
+ registerAgentManifest,
222
+ routeRegisteredAgents
223
+ } from "@soddong/agentic-runtime";
224
+ import { createAgentManifest } from "@soddong/agentic-capability-agent-client";
225
+
226
+ const manifest = createAgentManifest({
227
+ agentId: "document-agent",
228
+ packageName: "agentic-agent-document",
229
+ packageVersion: "0.1.0",
230
+ moduleLayer: "application",
231
+ capabilities: [
232
+ {
233
+ capabilityId: "document.create",
234
+ description: "문서 초안을 생성합니다.",
235
+ keywords: ["문서", "초안", "작성"]
236
+ }
237
+ ]
238
+ });
239
+
240
+ registerAgentManifest(manifest);
241
+
242
+ const decision = routeRegisteredAgents({
243
+ requestText: "요구사항 정의서 초안을 작성해줘"
244
+ });
245
+
246
+ console.log(decision.selectedAgentId);
247
+ ```
248
+
249
+ 1차 routing은 keyword/example 기반 rule scoring입니다. LLM router와 embedding router는 후속 확장 대상입니다.
250
+
251
+ ## 10. Runtime Execution 이력 조회
252
+
253
+ 저장된 사용자 지시, 실행 상태, 로그, 결과는 다음 명령으로 조회합니다.
254
+
255
+ ```bash
256
+ npx agentic execution list --range today
257
+ npx agentic execution latest
258
+ npx agentic execution show <run-id>
259
+ npx agentic execution summary --range 7d
260
+ ```
261
+
262
+ Windows PowerShell:
263
+
264
+ ```powershell
265
+ npx agentic execution list --range today
266
+ npx agentic execution latest
267
+ npx agentic execution show <run-id>
268
+ npx agentic execution summary --range 7d
269
+ ```
270
+
271
+ Agent나 자동화 도구가 사용하기 쉬운 JSON 출력도 지원합니다.
272
+
273
+ ```bash
274
+ npx agentic execution list --range 7d --format json
275
+ npx agentic execution summary --range today --format json
276
+ npx agentic execution latest --range today --status succeeded --format json
277
+ ```
278
+
279
+ 이전 지시, 이전 결과, 마지막 완료 작업을 묻는 경우에는 현재 실행 중인 자기 run을 피하기 위해 `--status succeeded`를 우선 사용합니다.
280
+
281
+ 현재 실행 중인 작업을 묻는 경우에는 `--status running`, 실패 이력을 묻는 경우에는 `--status failed`를 사용합니다.
282
+
283
+ 주요 조회 옵션:
284
+
285
+ ```text
286
+ --range 1h|6h|24h|today|yesterday|7d|30d|this-week|last-week|this-month|last-month
287
+ --from YYYY-MM-DD
288
+ --to YYYY-MM-DD
289
+ --source codex|kiro|claude-code
290
+ --status succeeded
291
+ --limit 20
292
+ --format text|json
293
+ ```
294
+
295
+ Execution timestamp는 UTC 기준으로 저장합니다. SQLite `CURRENT_TIMESTAMP`로 저장된 timezone 없는 `DATETIME` 문자열도 UTC로 해석합니다.
296
+
297
+ 조회 range는 rolling range와 calendar range를 구분합니다.
298
+
299
+ | range | 기준 |
300
+ | --- | --- |
301
+ | `1h`, `6h`, `24h` | 현재 시각 기준 rolling range |
302
+ | `7d`, `30d` | 현재 시각 기준 rolling range |
303
+ | `today`, `yesterday` | KST calendar day |
304
+ | `this-week`, `last-week` | KST calendar week, 월요일 시작 |
305
+ | `this-month`, `last-month` | KST calendar month |
306
+
307
+ 예를 들어 `today`가 `2026-06-26 KST`이면 SQL 비교 boundary는 `2026-06-25 15:00:00 UTC`부터 `2026-06-26 15:00:00 UTC`까지입니다.
308
+
309
+ 사용자가 이전 지시, 작업 현황, 최근 결과를 질문하는 경우 Agent는 execution 이력을 우선 조회한 뒤 답변해야 합니다.
310
+
311
+ ## 11. Codex Adapter
312
+
313
+ Codex adapter는 전역 Codex plugin bridge를 통해 사용자 지시와 turn 결과를 execution DB에 기록합니다. 표준 selector는 `agentic-runtime-codex@agentic-runtime`이며, 실제 기록은 현재 작업 디렉터리에 `agentic.config.json`과 `.agentic/bin/agentic-hook.mjs`가 있는 프로젝트에서만 수행합니다.
314
+
315
+ ```bash
316
+ npx agentic adapter install codex
317
+ npx agentic adapter status codex
318
+ ```
319
+
320
+ Windows PowerShell:
321
+
322
+ ```powershell
323
+ npx agentic adapter install codex
324
+ npx agentic adapter status codex
325
+ ```
326
+
327
+ 이미 설치된 Codex adapter 파일을 현재 `@soddong/agentic-runtime` 버전 기준으로 갱신하려면 `--force`를 사용합니다.
328
+
329
+ ```bash
330
+ npx agentic adapter install codex --force
331
+ codex plugin list
332
+ ```
333
+
334
+ 설치 시 생성되는 주요 파일:
335
+
336
+ ```text
337
+ plugins/
338
+ agentic-runtime-codex/
339
+ .codex-plugin/
340
+ plugin.json
341
+ hooks/
342
+ hooks.json
343
+ skills/
344
+ agentic-runtime-usage/
345
+ SKILL.md
346
+ .agents/
347
+ plugins/
348
+ marketplace.json
349
+ ```
350
+
351
+ Codex adapter의 1차 기록 범위:
352
+
353
+ | Codex hook | 저장 내용 |
354
+ | --- | --- |
355
+ | `UserPromptSubmit` | 사용자 prompt 원문, 실행 run 시작 |
356
+ | `Stop` | turn 종료 결과 text 또는 payload JSON, 실행 run 종료 |
357
+
358
+ Codex가 hook 신뢰 승인을 요구하면 사용자가 hook 내용을 확인하고 승인해야 합니다.
359
+
360
+ Codex hook command는 프로젝트 로컬 wrapper인 `.agentic/bin/agentic-hook.mjs`가 있을 때만 기록을 수행합니다. wrapper가 없는 프로젝트에서는 성공 상태로 no-op 처리하므로, Codex plugin 등록이 남아 있어도 @soddong/agentic-runtime 미초기화 프로젝트의 turn이 hook 실패로 중단되지 않습니다.
361
+
362
+ 같은 `agentic-runtime-codex` plugin을 여러 marketplace에서 동시에 활성화하지 않습니다. 중복 등록이 있으면 hook이 중복 실행될 수 있으므로 `agentic-runtime-codex@agentic-runtime` 하나만 전역 bridge로 유지합니다.
363
+
364
+ Codex CLI로 직접 설치 상태를 확인하거나 재시도할 때는 다음 명령을 사용합니다.
365
+
366
+ ```bash
367
+ codex plugin marketplace list
368
+ codex plugin list
369
+ codex plugin add agentic-runtime-codex@agentic-runtime
370
+ ```
371
+
372
+ ## 12. Kiro Adapter
373
+
374
+ Kiro adapter는 Kiro CLI/IDE에서 사용자 지시와 Agent turn 종료를 execution DB에 기록하기 위한 설정을 생성합니다.
375
+
376
+ 지원 범위:
377
+
378
+ | 대상 | 생성/수정 파일 | 비고 |
379
+ | --- | --- | --- |
380
+ | Kiro CLI V3 Early Access | `.kiro/hooks/agentic-runtime.json` | standalone hook 파일, `UserPromptSubmit`/`Stop` trigger 사용 |
381
+ | Kiro CLI V2 | `.kiro/agents/kiro_with_hooks.json` | agent config의 embedded `hooks` 필드 사용 |
382
+ | Kiro IDE | `.kiro/hooks/*.kiro.hook` | IDE 호환용 보조 파일 |
383
+
384
+ ```bash
385
+ npx agentic adapter install kiro
386
+ npx agentic adapter status kiro
387
+ ```
388
+
389
+ Windows PowerShell:
390
+
391
+ ```powershell
392
+ npx agentic adapter install kiro
393
+ npx agentic adapter status kiro
394
+ ```
395
+
396
+ 이미 생성된 Kiro adapter 파일을 현재 `@soddong/agentic-runtime` 버전 기준으로 갱신하려면 `--force`를 사용합니다.
397
+
398
+ ```bash
399
+ npx agentic adapter install kiro --force
400
+ ```
401
+
402
+ Kiro CLI V2에서 hook agent를 기본값으로 지정하려면 `--set-default`를 명시합니다. 이 옵션은 사용자 Kiro 설정을 변경할 수 있으므로 기본 설치에서는 실행하지 않습니다.
403
+
404
+ ```bash
405
+ npx agentic adapter install kiro --set-default
406
+ ```
407
+
408
+ `--set-default`는 내부적으로 `kiro-cli agent set-default kiro_with_hooks`를 실행합니다. `kiro` 명령이 아니라 `kiro-cli` 명령이어야 하며, agent 이름은 `kito_with_hooks`가 아니라 `kiro_with_hooks`입니다.
409
+
410
+ 직접 확인:
411
+
412
+ ```bash
413
+ kiro-cli agent set-default kiro_with_hooks
414
+ kiro-cli --agent kiro_with_hooks
415
+ ```
416
+
417
+ 설치 시 생성되는 주요 파일:
418
+
419
+ ```text
420
+ .kiro/
421
+ agents/
422
+ kiro_with_hooks.json
423
+ hooks/
424
+ agentic-runtime.json
425
+ agentic-runtime-prompt-submit.kiro.hook
426
+ agentic-runtime-agent-stop.kiro.hook
427
+ steering/
428
+ agentic-runtime.md
429
+ plugins/
430
+ agentic-runtime-kiro/
431
+ README.md
432
+ hooks/
433
+ kiro-hook-guide.md
434
+ ```
435
+
436
+ 등록되는 command:
437
+
438
+ | 구분 | Event/Trigger | Command |
439
+ | --- | --- | --- |
440
+ | Kiro CLI V3 | `UserPromptSubmit` | `node .agentic/bin/agentic-hook.mjs --source kiro --event PromptSubmit` |
441
+ | Kiro CLI V3 | `Stop` | `node .agentic/bin/agentic-hook.mjs --source kiro --event AgentStop` |
442
+ | Kiro CLI V2 | `userPromptSubmit` | `node .agentic/bin/agentic-hook.mjs --source kiro --event PromptSubmit` |
443
+ | Kiro CLI V2 | `stop` | `node .agentic/bin/agentic-hook.mjs --source kiro --event AgentStop` |
444
+ | Kiro IDE | Prompt Submit | `node .agentic/bin/agentic-hook.mjs --source kiro --event PromptSubmit` |
445
+ | Kiro IDE | Agent Stop | `node .agentic/bin/agentic-hook.mjs --source kiro --event AgentStop` |
446
+
447
+ Kiro CLI V3는 현재 Early Access이며 `kiro-cli --v3`로 opt-in 하는 구조입니다. CLI V2는 기존 agent config embedded hook을 사용합니다. Kiro IDE에서 `.kiro/hooks/*.kiro.hook` 파일을 인식하지 못하면 Kiro UI에서 생성된 파일 내용을 기준으로 hook 등록 상태를 확인합니다.
448
+
449
+ Kiro CLI V2에서 hook을 적용하려면 다음 중 하나로 실행합니다.
450
+
451
+ ```bash
452
+ kiro-cli --agent kiro_with_hooks
453
+ kiro-cli agent set-default kiro_with_hooks
454
+ ```
455
+
456
+ 상세 설명:
457
+
458
+ ```bash
459
+ cat plugins/agentic-runtime-kiro/hooks/kiro-hook-guide.md
460
+ ```
461
+
462
+ Kiro 기록 확인:
463
+
464
+ ```bash
465
+ npx agentic adapter status kiro
466
+ npx agentic execution latest --source kiro --format json
467
+ npx agentic execution list --range today --source kiro
468
+ ```
469
+
470
+ ## 13. Claude Code Adapter
471
+
472
+ Claude Code adapter는 `.claude/settings.json`에 command hook을 자동 병합해 사용자 지시와 turn 종료를 execution DB에 기록합니다.
473
+
474
+ ```bash
475
+ npx agentic adapter install claude-code
476
+ npx agentic adapter status claude-code
477
+ ```
478
+
479
+ Windows PowerShell:
480
+
481
+ ```powershell
482
+ npx agentic adapter install claude-code
483
+ npx agentic adapter status claude-code
484
+ ```
485
+
486
+ 이미 생성된 Claude Code adapter 파일을 현재 `@soddong/agentic-runtime` 버전 기준으로 갱신하려면 `--force`를 사용합니다.
487
+
488
+ ```bash
489
+ npx agentic adapter install claude-code --force
490
+ ```
491
+
492
+ 설치 시 생성 또는 수정되는 주요 파일:
493
+
494
+ ```text
495
+ .claude/
496
+ settings.json
497
+ rules/
498
+ agentic-runtime.md
499
+ plugins/
500
+ agentic-runtime-claude-code/
501
+ README.md
502
+ ```
503
+
504
+ `.claude/settings.json`에 등록되는 hook:
505
+
506
+ | Claude Code hook | Command |
507
+ | --- | --- |
508
+ | UserPromptSubmit | `node .agentic/bin/agentic-hook.mjs --source claude-code --event UserPromptSubmit` |
509
+ | Stop | `node .agentic/bin/agentic-hook.mjs --source claude-code --event Stop` |
510
+
511
+ Claude Code 기록 확인:
512
+
513
+ ```bash
514
+ npx agentic execution latest --source claude-code --format json
515
+ npx agentic execution list --range today --source claude-code
516
+ ```
517
+
518
+ ## 14. SQLite 초기화
519
+
520
+ 사용자 프로젝트 루트에서 실행합니다.
521
+
522
+ ```bash
523
+ npx agentic db init
524
+ npx agentic db status
525
+ ```
526
+
527
+ 생성되는 기본 DB 파일:
528
+
529
+ ```text
530
+ .agentic/platform.sqlite
531
+ ```
532
+
533
+ 초기 생성 테이블:
534
+
535
+ ```text
536
+ agentic_runtime_metadata
537
+ agentic_schema_migrations
538
+ agentic_project_modules
539
+ agentic_user_requests
540
+ agentic_execution_runs
541
+ agentic_execution_logs
542
+ agentic_execution_outputs
543
+ ```
544
+
545
+ ## 15. Module Registry
546
+
547
+ 실행 프로젝트에서 사용할 Agentic package는 명시적으로 등록합니다.
548
+
549
+ ```bash
550
+ npx agentic module register sample-agent-package 0.0.1 application
551
+ npx agentic module list
552
+ ```
553
+
554
+ Windows PowerShell:
555
+
556
+ ```powershell
557
+ npx agentic module register sample-agent-package 0.0.1 application
558
+ npx agentic module list
559
+ ```
560
+
561
+ layer 값은 다음 중 하나입니다.
562
+
563
+ ```text
564
+ runtime
565
+ domain
566
+ capability
567
+ application
568
+ support
569
+ ```
570
+
571
+ 등록 정보는 `agentic_project_modules` 테이블에 저장됩니다.
572
+
573
+ ## 16. Project Bundle Registry
574
+
575
+ methodology seed bundle provider package가 설치되어 있으면 runtime에 bundle 설치 상태를 등록할 수 있습니다.
576
+
577
+ ```bash
578
+ npx agentic bundle install @soddong/agentic-methodology-ai-agent-sdlc --bundle ai-agent-sdlc-build-planning
579
+ npx agentic bundle apply @soddong/agentic-methodology-ai-agent-sdlc --bundle ai-agent-sdlc-build-planning
580
+ npx agentic bundle list
581
+ npx agentic bundle status
582
+ ```
583
+
584
+ Windows PowerShell:
585
+
586
+ ```powershell
587
+ npx agentic bundle install @soddong/agentic-methodology-ai-agent-sdlc --bundle ai-agent-sdlc-build-planning
588
+ npx agentic bundle apply @soddong/agentic-methodology-ai-agent-sdlc --bundle ai-agent-sdlc-build-planning
589
+ npx agentic bundle list
590
+ npx agentic bundle status
591
+ ```
592
+
593
+ `bundle install`은 1차에서 다음까지만 수행합니다.
594
+
595
+ ```text
596
+ - installed package의 bundle loader 호출
597
+ - bundle validator 호출
598
+ - agentic_project_modules 등록/갱신
599
+ - agentic_project_bundles 등록/갱신
600
+ ```
601
+
602
+ 실제 methodology, artifact, document domain DB 반영은 `seed import`로 계획을 만든 뒤 `seed apply`에서 target package handler를 통해 수행합니다.
603
+
604
+ `bundle apply`는 운영/consumer 사용성을 줄이기 위한 통합 명령입니다.
605
+
606
+ ```bash
607
+ npx agentic bundle apply @soddong/agentic-methodology-ai-agent-sdlc --bundle ai-agent-sdlc-build-planning
608
+ ```
609
+
610
+ package 설치까지 함께 수행하려면 다음 옵션을 사용합니다.
611
+
612
+ ```bash
613
+ npx agentic bundle apply @soddong/agentic-methodology-ai-agent-sdlc \
614
+ --bundle ai-agent-sdlc-build-planning \
615
+ --install-required
616
+ ```
617
+
618
+ 이 명령은 다음을 순서대로 수행합니다.
619
+
620
+ ```text
621
+ 1. agentic project init/db init 보장
622
+ 2. --install-required 지정 시 bundle provider package npm install
623
+ 3. bundle install
624
+ 4. --install-required 지정 시 bundle manifest의 requires.packages npm install
625
+ 5. bundle manifest의 requires.packages 자동 module register
626
+ 6. seed import dry-run plan 생성
627
+ 7. seed apply 실행
628
+ ```
629
+
630
+ 기본 `bundle apply`는 npm package 자동 설치를 수행하지 않습니다. 필요한 package를 직접 설치한 뒤 적용하려면 다음 흐름을 사용합니다.
631
+
632
+ ```bash
633
+ npm install \
634
+ @soddong/agentic-runtime \
635
+ @soddong/agentic-methodology-ai-agent-sdlc \
636
+ @soddong/agentic-domain-methodology \
637
+ @soddong/agentic-domain-artifact-standard \
638
+ @soddong/agentic-contract-validation \
639
+ @soddong/agentic-domain-artifact
640
+ ```
641
+
642
+ required package 누락 또는 단순 version range 불일치를 seed 적용 전에 차단하려면 다음 옵션을 사용합니다.
643
+
644
+ ```bash
645
+ npx agentic bundle apply @soddong/agentic-methodology-ai-agent-sdlc \
646
+ --bundle ai-agent-sdlc-build-planning \
647
+ --strict-required
648
+ ```
649
+
650
+ ## 17. Seed Import Plan
651
+
652
+ installed bundle을 기준으로 domain package 반영 계획을 dry-run으로 생성합니다.
653
+
654
+ ```bash
655
+ npx agentic seed import --bundle ai-agent-sdlc-build-planning
656
+ npx agentic seed apply --bundle ai-agent-sdlc-build-planning
657
+ npx agentic seed status
658
+ ```
659
+
660
+ Windows PowerShell:
661
+
662
+ ```powershell
663
+ npx agentic seed import --bundle ai-agent-sdlc-build-planning
664
+ npx agentic seed apply --bundle ai-agent-sdlc-build-planning
665
+ npx agentic seed status
666
+ ```
667
+
668
+ `seed import`는 다음 정보를 생성합니다.
669
+
670
+ ```text
671
+ - seed import run
672
+ - target package별 import item
673
+ - target package 준비 상태
674
+ - blocked/warning 사유
675
+ - bundle validation result snapshot
676
+ ```
677
+
678
+ target package가 설치 또는 등록되지 않았으면 해당 item은 `blocked`로 표시합니다. `seed import` 단계는 dry-run이며 domain DB에는 쓰지 않습니다.
679
+
680
+ `seed apply`는 생성된 import plan을 기준으로 target package의 `applyAgenticSeed` handler를 호출합니다.
681
+
682
+ ```bash
683
+ npx agentic seed apply --run <seed-import-run-id>
684
+ npx agentic seed apply --bundle ai-agent-sdlc-build-planning
685
+ ```
686
+
687
+ target package가 준비되지 않았거나 handler가 없으면 item은 `blocked`로 남습니다. handler가 실패하면 item은 `failed`로 기록됩니다. 1차 구현은 global rollback을 수행하지 않고 item별 상태를 runtime DB에 기록합니다.
688
+
689
+ ## 18. Execution Project Lifecycle
690
+
691
+ `seed apply`가 성공한 bundle은 execution project로 생성할 수 있습니다. 이 단계는 workflow engine 실행이 아니라, bundle의 stage/activity와 primary output artifact 기준을 runtime DB에 snapshot으로 등록하는 lifecycle scaffold입니다.
692
+
693
+ ```bash
694
+ npx agentic project create \
695
+ --bundle ai-agent-sdlc-build-planning \
696
+ --code my-build-planning \
697
+ --name "My Build Planning Project"
698
+ ```
699
+
700
+ 상태 조회:
701
+
702
+ ```bash
703
+ npx agentic project status --code my-build-planning
704
+ npx agentic project status --code my-build-planning --format json
705
+ ```
706
+
707
+ `project status`는 다음 정보를 보여줍니다.
708
+
709
+ ```text
710
+ - project status
711
+ - stage별 activity 완료 현황
712
+ - 전체 activity 수
713
+ - 예상 output artifact 수
714
+ - 생성된 artifact instance 수
715
+ ```
716
+
717
+ ## 19. Agent module 실행 API
718
+
719
+ Agent module 개발자는 `@soddong/agentic-runtime`이 제공하는 실행 래퍼를 사용할 수 있습니다.
720
+
721
+ ```ts
722
+ import { runAgentRuntimeClient } from "@soddong/agentic-runtime";
723
+
724
+ const agent = {
725
+ manifest: {
726
+ agentId: "sample-agent",
727
+ packageName: "sample-agent-package",
728
+ packageVersion: "0.1.0",
729
+ moduleLayer: "application",
730
+ capabilities: [
731
+ {
732
+ capabilityId: "sample.review",
733
+ description: "요구사항을 검토합니다.",
734
+ keywords: ["요구사항", "검토"]
735
+ }
736
+ ]
737
+ },
738
+ run(input, context) {
739
+ context.logger.info("Agent request received", {
740
+ requestText: input.requestText
741
+ });
742
+
743
+ return {
744
+ outputType: "json",
745
+ contentJson: {
746
+ ok: true
747
+ }
748
+ };
749
+ }
750
+ };
751
+
752
+ await runAgentRuntimeClient(agent, {
753
+ requestText: "요구사항을 검토해 주세요."
754
+ });
755
+ ```
756
+
757
+ 실행 후 `@soddong/agentic-runtime`은 다음 정보를 SQLite에 기록합니다.
758
+
759
+ | 정보 | 테이블 |
760
+ | --- | --- |
761
+ | 사용자 지시 | `agentic_user_requests` |
762
+ | 실행 상태 | `agentic_execution_runs` |
763
+ | 실행 로그 | `agentic_execution_logs` |
764
+ | 실행 결과 | `agentic_execution_outputs` |
765
+
766
+ ## 19. 문제 확인
767
+
768
+ | 증상 | 확인 |
769
+ | --- | --- |
770
+ | package를 찾을 수 없음 | 공식 npm registry publish 여부와 `npm config get registry` 결과 확인 |
771
+ | 인증 실패 | 사용자 홈 `.npmrc`의 npm auth token 확인 |
772
+ | 사설 registry 접근 시도 | `npm config get registry` 확인 |
773
+ | `npx agentic` 실패 | `node_modules/.bin/agentic` 생성 여부 확인 |
774
+ | Codex prompt가 기록되지 않음 | `npx agentic adapter status codex`와 Codex hook trust 상태 확인 |