@hiroshi.inoue/agent-spectrum-kernel 1.0.1 → 1.1.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 (84) hide show
  1. package/README.ja.md +3 -1
  2. package/README.md +3 -1
  3. package/dist/AGENTS.md +1 -1
  4. package/dist/CUSTOM_INSTRUCTIONS.md +3 -2
  5. package/dist/README.md +3 -1
  6. package/dist/adapters/claude-code/plugin/skills/handoff/SKILL.md +1 -1
  7. package/dist/adapters/claude-code/plugin/skills/implement/SKILL.md +1 -1
  8. package/dist/adapters/claude-code/plugin/skills/investigate/SKILL.md +1 -1
  9. package/dist/adapters/claude-code/plugin/skills/review-pr/SKILL.md +1 -1
  10. package/dist/adapters/claude-code/plugin/skills/verify/SKILL.md +1 -1
  11. package/dist/docs/architecture/README.md +54 -0
  12. package/dist/docs/architecture/model.json +318 -0
  13. package/dist/docs/architecture/views/skill-assets.md +109 -0
  14. package/dist/docs/fixtures/adapter-runtime-bundle.json +85 -69
  15. package/dist/docs/fixtures/adapter-runtime-evidence.json +4 -4
  16. package/dist/docs/fixtures/adapter-runtime-profiles.json +97 -61
  17. package/dist/docs/fixtures/verification-proof-policy-cases.json +1 -1
  18. package/dist/docs/npm-distribution-ja.md +2 -2
  19. package/dist/docs/npm-distribution.md +3 -3
  20. package/dist/docs/routing-model.md +15 -0
  21. package/dist/docs/skill-matrix.md +4 -0
  22. package/dist/docs/validation-report.md +36 -30
  23. package/dist/manifest.json +36 -1
  24. package/dist/npm-runtime-inventory.json +212 -117
  25. package/dist/package.json +2 -2
  26. package/dist/schemas/adoption-plan.schema.json +5 -1
  27. package/dist/schemas/architecture-model.schema.json +619 -0
  28. package/dist/scripts/ask-primary-runtime-lineage.mjs +2 -1
  29. package/dist/scripts/ask-setup-apply-state.mjs +2 -2
  30. package/dist/scripts/ask-setup-apply.mjs +3 -3
  31. package/dist/scripts/ask-setup.mjs +37 -18
  32. package/dist/scripts/codex-exec-runner.mjs +7 -2
  33. package/dist/scripts/install-claude-adapter.mjs +14 -1
  34. package/dist/scripts/install-codex-adapter.mjs +17 -1
  35. package/dist/scripts/install-kernel.mjs +8 -4
  36. package/dist/scripts/installer-lifecycle.mjs +41 -0
  37. package/dist/scripts/kernel-principles.mjs +4 -2
  38. package/dist/skills/adr-review/SKILL.md +1 -0
  39. package/dist/skills/application-boundary-architecture/SKILL.md +1 -0
  40. package/dist/skills/architecture-decision-memory/SKILL.md +1 -0
  41. package/dist/skills/architecture-modeling/SKILL.md +22 -0
  42. package/dist/skills/architecture-modeling/references/architecture-model.mjs +441 -0
  43. package/dist/skills/architecture-modeling/references/last-seat.json +37 -0
  44. package/dist/skills/architecture-modeling/references/model.md +42 -0
  45. package/dist/skills/architecture-modeling/references/views.md +18 -0
  46. package/dist/skills/architecture-modeling/references/views.mjs +370 -0
  47. package/dist/skills/code-visualization/SKILL.md +8 -4
  48. package/dist/skills/code-visualization/references/design-preview.mjs +74 -0
  49. package/dist/skills/code-visualization/references/examples/last-seat.json +42 -0
  50. package/dist/skills/code-visualization/references/guide-input.md +30 -0
  51. package/dist/skills/code-visualization/references/render-guide.mjs +53 -11
  52. package/dist/skills/code-visualization/references/structure-index.mjs +41 -0
  53. package/dist/skills/code-visualization/references/visual-player.js +34 -3
  54. package/dist/skills/code-visualization/references/visual-surface.css +3 -0
  55. package/dist/skills/controlled-implementation/SKILL.md +4 -0
  56. package/dist/skills/documentation-knowledge-compiler/SKILL.md +2 -1
  57. package/dist/skills/doubt-driven-development/SKILL.md +2 -0
  58. package/dist/skills/engineering-documentation-generation/SKILL.md +27 -0
  59. package/dist/skills/engineering-documentation-generation/references/diagram-selection.md +25 -0
  60. package/dist/skills/engineering-documentation-generation/references/document-types.md +16 -0
  61. package/dist/skills/engineering-documentation-generation/references/reservation.md +61 -0
  62. package/dist/skills/engineering-documentation-generation/references/update-and-check.md +24 -0
  63. package/dist/skills/grill-design/SKILL.md +6 -2
  64. package/dist/skills/grill-with-docs/SKILL.md +4 -2
  65. package/dist/skills/handoff-generation/SKILL.md +1 -0
  66. package/dist/skills/implementation-context-generation/SKILL.md +1 -0
  67. package/dist/skills/mr-readme-generation/SKILL.md +2 -0
  68. package/dist/skills/operating-mode-router/SKILL.md +1 -0
  69. package/dist/skills/project-adoption-pack-generation/SKILL.md +1 -0
  70. package/dist/skills/refactor-implementation/SKILL.md +1 -0
  71. package/dist/skills/repository-orientation/SKILL.md +2 -0
  72. package/dist/skills/requirement-grill/SKILL.md +2 -0
  73. package/dist/skills/review-architecture-impact/SKILL.md +2 -0
  74. package/dist/skills/review-context-generation/SKILL.md +1 -0
  75. package/dist/skills/review-domain-impact/SKILL.md +2 -0
  76. package/dist/skills/skill-router/SKILL.md +5 -1
  77. package/dist/skills/spec-driven-development/SKILL.md +4 -0
  78. package/dist/skills/spec-driven-development/references/examples/javascript/candidate-preview.mjs +44 -0
  79. package/dist/skills/spec-driven-development/references/examples/javascript/scenario-review.mjs +10 -1
  80. package/dist/skills/spec-driven-development/references/scenario-visual-review.md +16 -0
  81. package/dist/skills/spec-driven-development/references/spec-index.md +8 -0
  82. package/dist/skills/test-first-verification/SKILL.md +2 -0
  83. package/dist/skills/work-package-compiler/SKILL.md +2 -0
  84. package/package.json +2 -2
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiroshi.inoue/agent-spectrum-kernel",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "A supervised improvement loop and portable instruction assets for coding agents.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -18,7 +18,7 @@
18
18
  "scripts": {
19
19
  "build": "node scripts/build-npm-package.mjs",
20
20
  "prepack": "npm run build",
21
- "test:package": "node --test --test-concurrency=1 scripts/test-npm-package.mjs scripts/test-package-full-loop.mjs scripts/test-review-rule-lifecycle.mjs scripts/test-finding-intake.mjs scripts/test-ask-package-loop-prepare.mjs scripts/test-instruction-source-snapshot.mjs scripts/test-package-verification.mjs scripts/test-verification-host-provider.mjs scripts/test-verification-review-dispatch.mjs scripts/test-code-visualization.mjs"
21
+ "test:package": "node --test --test-concurrency=1 scripts/test-npm-package.mjs scripts/test-package-full-loop.mjs scripts/test-review-rule-lifecycle.mjs scripts/test-finding-intake.mjs scripts/test-ask-package-loop-prepare.mjs scripts/test-instruction-source-snapshot.mjs scripts/test-package-verification.mjs scripts/test-verification-host-provider.mjs scripts/test-verification-review-dispatch.mjs scripts/test-code-visualization.mjs scripts/test-architecture-model.mjs scripts/test-architecture-install.mjs"
22
22
  },
23
23
  "repository": {
24
24
  "type": "git",
@@ -72,7 +72,11 @@
72
72
  "type": "object",
73
73
  "additionalProperties": false,
74
74
  "required": ["adapter", "profile"],
75
- "properties": { "adapter": { "enum": ["codex", "claude-code", "kernel-only"] }, "profile": { "type": "string", "minLength": 1 } }
75
+ "properties": {
76
+ "adapter": { "enum": ["codex", "claude-code", "kernel-only"] },
77
+ "profile": { "type": "string", "minLength": 1 },
78
+ "retain_current": { "const": true }
79
+ }
76
80
  },
77
81
  "recommendation": { "$ref": "#/$defs/recommendation" },
78
82
  "assets": {
@@ -0,0 +1,619 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/ist-h-i/agent-spectrum-kernel/schemas/architecture-model.schema.json",
4
+ "title": "ASK architecture model",
5
+ "x-ask-contract": {
6
+ "id": "ask.architecture-model",
7
+ "version": "1.0.0"
8
+ },
9
+ "type": "object",
10
+ "additionalProperties": false,
11
+ "required": [
12
+ "contract",
13
+ "project",
14
+ "title",
15
+ "purpose",
16
+ "language",
17
+ "profile",
18
+ "scopes",
19
+ "claims",
20
+ "elements",
21
+ "relationships",
22
+ "scenarios",
23
+ "comparisons",
24
+ "unknowns"
25
+ ],
26
+ "properties": {
27
+ "contract": {
28
+ "const": "ask.architecture-model@1.0.0"
29
+ },
30
+ "project": {
31
+ "type": "string",
32
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$"
33
+ },
34
+ "title": {
35
+ "type": "string",
36
+ "pattern": "\\S",
37
+ "maxLength": 600
38
+ },
39
+ "purpose": {
40
+ "type": "string",
41
+ "pattern": "\\S",
42
+ "maxLength": 600
43
+ },
44
+ "language": {
45
+ "enum": [
46
+ "en",
47
+ "ja"
48
+ ]
49
+ },
50
+ "profile": {
51
+ "type": "string",
52
+ "pattern": "\\S",
53
+ "maxLength": 600
54
+ },
55
+ "repository": {
56
+ "type": "string",
57
+ "pattern": "\\S",
58
+ "maxLength": 600
59
+ },
60
+ "scopes": {
61
+ "type": "array",
62
+ "items": {
63
+ "$ref": "#/$defs/scope"
64
+ },
65
+ "minItems": 1,
66
+ "uniqueItems": true
67
+ },
68
+ "claims": {
69
+ "type": "array",
70
+ "items": {
71
+ "$ref": "#/$defs/claim"
72
+ },
73
+ "minItems": 1,
74
+ "uniqueItems": true
75
+ },
76
+ "elements": {
77
+ "type": "array",
78
+ "items": {
79
+ "$ref": "#/$defs/element"
80
+ },
81
+ "minItems": 1,
82
+ "uniqueItems": true
83
+ },
84
+ "relationships": {
85
+ "type": "array",
86
+ "items": {
87
+ "$ref": "#/$defs/relation"
88
+ },
89
+ "minItems": 0,
90
+ "uniqueItems": true
91
+ },
92
+ "scenarios": {
93
+ "type": "array",
94
+ "items": {
95
+ "$ref": "#/$defs/scenario"
96
+ },
97
+ "minItems": 0,
98
+ "uniqueItems": true
99
+ },
100
+ "comparisons": {
101
+ "type": "array",
102
+ "items": {
103
+ "$ref": "#/$defs/comparison"
104
+ },
105
+ "minItems": 0,
106
+ "uniqueItems": true
107
+ },
108
+ "unknowns": {
109
+ "type": "array",
110
+ "items": {
111
+ "type": "string",
112
+ "pattern": "\\S",
113
+ "maxLength": 600
114
+ },
115
+ "minItems": 0,
116
+ "uniqueItems": true
117
+ }
118
+ },
119
+ "$defs": {
120
+ "scope": {
121
+ "type": "object",
122
+ "additionalProperties": false,
123
+ "required": [
124
+ "id",
125
+ "include",
126
+ "exclude",
127
+ "boundary"
128
+ ],
129
+ "properties": {
130
+ "id": {
131
+ "type": "string",
132
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$"
133
+ },
134
+ "include": {
135
+ "type": "array",
136
+ "items": {
137
+ "type": "string",
138
+ "pattern": "\\S",
139
+ "maxLength": 600
140
+ },
141
+ "minItems": 1,
142
+ "uniqueItems": true
143
+ },
144
+ "exclude": {
145
+ "type": "array",
146
+ "items": {
147
+ "type": "object",
148
+ "additionalProperties": false,
149
+ "required": [
150
+ "path",
151
+ "reason"
152
+ ],
153
+ "properties": {
154
+ "path": {
155
+ "type": "string",
156
+ "pattern": "\\S",
157
+ "maxLength": 600
158
+ },
159
+ "reason": {
160
+ "type": "string",
161
+ "pattern": "\\S",
162
+ "maxLength": 600
163
+ }
164
+ }
165
+ },
166
+ "minItems": 0,
167
+ "uniqueItems": true
168
+ },
169
+ "boundary": {
170
+ "type": "string",
171
+ "pattern": "\\S",
172
+ "maxLength": 600
173
+ },
174
+ "snapshot": {
175
+ "$ref": "#/$defs/snapshot"
176
+ }
177
+ }
178
+ },
179
+ "snapshot": {
180
+ "type": "object",
181
+ "additionalProperties": false,
182
+ "required": [
183
+ "commit",
184
+ "tree",
185
+ "mode",
186
+ "generated_at",
187
+ "files",
188
+ "fingerprint",
189
+ "generator"
190
+ ],
191
+ "properties": {
192
+ "commit": {
193
+ "type": "string",
194
+ "pattern": "^[a-f0-9]{40}([a-f0-9]{24})?$"
195
+ },
196
+ "tree": {
197
+ "type": "string",
198
+ "pattern": "^[a-f0-9]{40}([a-f0-9]{24})?$"
199
+ },
200
+ "mode": {
201
+ "enum": [
202
+ "commit",
203
+ "worktree"
204
+ ]
205
+ },
206
+ "generated_at": {
207
+ "type": "string",
208
+ "format": "date-time"
209
+ },
210
+ "files": {
211
+ "type": "array",
212
+ "items": {
213
+ "type": "object",
214
+ "additionalProperties": false,
215
+ "required": [
216
+ "path",
217
+ "sha256"
218
+ ],
219
+ "properties": {
220
+ "path": {
221
+ "type": "string",
222
+ "pattern": "\\S",
223
+ "maxLength": 600
224
+ },
225
+ "sha256": {
226
+ "type": "string",
227
+ "pattern": "^[a-f0-9]{64}$"
228
+ }
229
+ }
230
+ },
231
+ "minItems": 1,
232
+ "uniqueItems": true
233
+ },
234
+ "fingerprint": {
235
+ "type": "string",
236
+ "pattern": "^[a-f0-9]{64}$"
237
+ },
238
+ "generator": {
239
+ "type": "string",
240
+ "minLength": 1
241
+ }
242
+ }
243
+ },
244
+ "location": {
245
+ "type": "object",
246
+ "additionalProperties": false,
247
+ "required": [
248
+ "role",
249
+ "path",
250
+ "line"
251
+ ],
252
+ "properties": {
253
+ "role": {
254
+ "enum": [
255
+ "requirement",
256
+ "spec",
257
+ "adr",
258
+ "contract",
259
+ "code",
260
+ "config",
261
+ "test",
262
+ "execution",
263
+ "proposal",
264
+ "document"
265
+ ]
266
+ },
267
+ "path": {
268
+ "type": "string",
269
+ "pattern": "\\S",
270
+ "maxLength": 600
271
+ },
272
+ "line": {
273
+ "type": "integer",
274
+ "minimum": 1
275
+ },
276
+ "end": {
277
+ "type": "integer",
278
+ "minimum": 1
279
+ },
280
+ "anchor": {
281
+ "type": "string",
282
+ "pattern": "\\S",
283
+ "maxLength": 600
284
+ },
285
+ "spec_ref": {
286
+ "type": "object",
287
+ "additionalProperties": false,
288
+ "required": [
289
+ "artifact_id",
290
+ "item_id",
291
+ "observed_revision"
292
+ ],
293
+ "properties": {
294
+ "artifact_id": {
295
+ "type": "string",
296
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$"
297
+ },
298
+ "item_id": {
299
+ "type": "string",
300
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$"
301
+ },
302
+ "observed_revision": {
303
+ "type": "integer",
304
+ "minimum": 1
305
+ }
306
+ }
307
+ }
308
+ }
309
+ },
310
+ "claim": {
311
+ "type": "object",
312
+ "additionalProperties": false,
313
+ "required": [
314
+ "id",
315
+ "scope",
316
+ "kind",
317
+ "status",
318
+ "authority",
319
+ "summary",
320
+ "sources"
321
+ ],
322
+ "properties": {
323
+ "id": {
324
+ "type": "string",
325
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$"
326
+ },
327
+ "scope": {
328
+ "type": "string",
329
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$"
330
+ },
331
+ "kind": {
332
+ "enum": [
333
+ "intended",
334
+ "actual",
335
+ "proposed",
336
+ "observed-execution"
337
+ ]
338
+ },
339
+ "status": {
340
+ "$ref": "claim-evidence-status.schema.json"
341
+ },
342
+ "authority": {
343
+ "type": "string",
344
+ "pattern": "\\S",
345
+ "maxLength": 600
346
+ },
347
+ "summary": {
348
+ "type": "string",
349
+ "pattern": "\\S",
350
+ "maxLength": 600
351
+ },
352
+ "sources": {
353
+ "type": "array",
354
+ "items": {
355
+ "$ref": "#/$defs/location"
356
+ },
357
+ "minItems": 0,
358
+ "uniqueItems": true
359
+ },
360
+ "outcome": {
361
+ "type": "string",
362
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$"
363
+ }
364
+ }
365
+ },
366
+ "element": {
367
+ "type": "object",
368
+ "additionalProperties": false,
369
+ "required": [
370
+ "id",
371
+ "type",
372
+ "name",
373
+ "responsibility",
374
+ "claim"
375
+ ],
376
+ "properties": {
377
+ "id": {
378
+ "type": "string",
379
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$"
380
+ },
381
+ "type": {
382
+ "enum": [
383
+ "person",
384
+ "system",
385
+ "container",
386
+ "component"
387
+ ]
388
+ },
389
+ "name": {
390
+ "type": "string",
391
+ "pattern": "\\S",
392
+ "maxLength": 600
393
+ },
394
+ "responsibility": {
395
+ "type": "string",
396
+ "pattern": "\\S",
397
+ "maxLength": 600
398
+ },
399
+ "claim": {
400
+ "type": "string",
401
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$"
402
+ },
403
+ "parent": {
404
+ "type": "string",
405
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$"
406
+ },
407
+ "technology": {
408
+ "type": "string",
409
+ "pattern": "\\S",
410
+ "maxLength": 600
411
+ },
412
+ "owner": {
413
+ "type": "string",
414
+ "pattern": "\\S",
415
+ "maxLength": 600
416
+ },
417
+ "contract": {
418
+ "type": "string",
419
+ "pattern": "\\S",
420
+ "maxLength": 600
421
+ },
422
+ "state": {
423
+ "type": "string",
424
+ "pattern": "\\S",
425
+ "maxLength": 600
426
+ },
427
+ "links": {
428
+ "type": "array",
429
+ "items": {
430
+ "type": "object",
431
+ "additionalProperties": false,
432
+ "required": [
433
+ "flow",
434
+ "node"
435
+ ],
436
+ "properties": {
437
+ "flow": {
438
+ "type": "integer",
439
+ "minimum": 0
440
+ },
441
+ "node": {
442
+ "type": "string",
443
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$"
444
+ }
445
+ }
446
+ },
447
+ "minItems": 0,
448
+ "uniqueItems": true
449
+ }
450
+ }
451
+ },
452
+ "relation": {
453
+ "type": "object",
454
+ "additionalProperties": false,
455
+ "required": [
456
+ "id",
457
+ "from",
458
+ "to",
459
+ "kind",
460
+ "meaning",
461
+ "claim"
462
+ ],
463
+ "properties": {
464
+ "id": {
465
+ "type": "string",
466
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$"
467
+ },
468
+ "from": {
469
+ "type": "string",
470
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$"
471
+ },
472
+ "to": {
473
+ "type": "string",
474
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$"
475
+ },
476
+ "kind": {
477
+ "enum": [
478
+ "dependency",
479
+ "call",
480
+ "data",
481
+ "uses",
482
+ "deployment"
483
+ ]
484
+ },
485
+ "meaning": {
486
+ "type": "string",
487
+ "pattern": "\\S",
488
+ "maxLength": 600
489
+ },
490
+ "technology": {
491
+ "type": "string",
492
+ "pattern": "\\S",
493
+ "maxLength": 600
494
+ },
495
+ "claim": {
496
+ "type": "string",
497
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$"
498
+ }
499
+ }
500
+ },
501
+ "scenario": {
502
+ "type": "object",
503
+ "additionalProperties": false,
504
+ "required": [
505
+ "id",
506
+ "title",
507
+ "input",
508
+ "path",
509
+ "result",
510
+ "claim"
511
+ ],
512
+ "properties": {
513
+ "id": {
514
+ "type": "string",
515
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$"
516
+ },
517
+ "title": {
518
+ "type": "string",
519
+ "pattern": "\\S",
520
+ "maxLength": 600
521
+ },
522
+ "input": {
523
+ "type": "string",
524
+ "pattern": "\\S",
525
+ "maxLength": 600
526
+ },
527
+ "path": {
528
+ "type": "array",
529
+ "items": {
530
+ "type": "string",
531
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$"
532
+ },
533
+ "minItems": 1,
534
+ "uniqueItems": true
535
+ },
536
+ "result": {
537
+ "type": "string",
538
+ "pattern": "\\S",
539
+ "maxLength": 600
540
+ },
541
+ "claim": {
542
+ "type": "string",
543
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$"
544
+ },
545
+ "condition": {
546
+ "type": "string",
547
+ "pattern": "\\S",
548
+ "maxLength": 600
549
+ },
550
+ "environment": {
551
+ "type": "string",
552
+ "pattern": "\\S",
553
+ "maxLength": 600
554
+ }
555
+ }
556
+ },
557
+ "comparison": {
558
+ "type": "object",
559
+ "additionalProperties": false,
560
+ "required": [
561
+ "id",
562
+ "scenario",
563
+ "owner",
564
+ "next"
565
+ ],
566
+ "properties": {
567
+ "id": {
568
+ "type": "string",
569
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$"
570
+ },
571
+ "scenario": {
572
+ "type": "string",
573
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$"
574
+ },
575
+ "owner": {
576
+ "type": "string",
577
+ "pattern": "\\S",
578
+ "maxLength": 600
579
+ },
580
+ "next": {
581
+ "type": "string",
582
+ "pattern": "\\S",
583
+ "maxLength": 600
584
+ },
585
+ "intended": {
586
+ "type": "string",
587
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$"
588
+ },
589
+ "actual": {
590
+ "type": "string",
591
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$"
592
+ },
593
+ "proposed": {
594
+ "type": "array",
595
+ "items": {
596
+ "type": "string",
597
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$"
598
+ },
599
+ "minItems": 1,
600
+ "uniqueItems": true
601
+ },
602
+ "execution": {
603
+ "type": "string",
604
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$"
605
+ },
606
+ "gap": {
607
+ "enum": [
608
+ "missing-implementation",
609
+ "unexpected-behavior",
610
+ "outdated-model-or-doc",
611
+ "missing-verification",
612
+ "unresolved-authority",
613
+ "unknown"
614
+ ]
615
+ }
616
+ }
617
+ }
618
+ }
619
+ }
@@ -300,7 +300,8 @@ export async function collectPrimaryRuntimeLineageForTest({ plan, planDigest, co
300
300
  let result;
301
301
  try {
302
302
  result = await executeCodexSession({ executable: plan.config.cli_bin, argv: ['app-server', '--listen', 'stdio://'], cwd: workspace,
303
- input: '', retainOutput: false, terminationScope: 'direct_child', timeoutMs, signal: controller.signal, onOutput: output,
303
+ input: '', retainOutput: false, terminationScope: 'direct_child', syntheticFullInput: condition === 'full_ask',
304
+ timeoutMs, signal: controller.signal, onOutput: output,
304
305
  onStdinReady(value) { channel = value; send(initializeRequest()); } }, spawnProcess, runtime);
305
306
  } finally { signal?.removeEventListener('abort', interrupt); }
306
307
  const terminated = result.terminationConfirmed === true && !result.cleanupError;
@@ -265,7 +265,7 @@ export function readApplyJson(path) {
265
265
  }
266
266
  }
267
267
 
268
- export function setupInstallerInvocations(adapter, profile, selectedSkills, target) {
268
+ export function setupInstallerInvocations(adapter, profile, selectedSkills, target, retainCurrent = false) {
269
269
  applyAssert(adapter === "kernel-only" || Object.hasOwn(SETUP_INSTALLERS, adapter) && adapter !== "kernel", "unsupported_adapter");
270
270
  applyAssert(typeof profile === "string" && /^[a-z0-9][a-z0-9-]*$/u.test(profile), "unsupported_profile");
271
271
  applyAssert(Array.isArray(selectedSkills) && selectedSkills.length > 0
@@ -275,7 +275,7 @@ export function setupInstallerInvocations(adapter, profile, selectedSkills, targ
275
275
  args: ["--target", target, "--merge-agents", "--skills", [...selectedSkills].sort().join(",")],
276
276
  }];
277
277
  if (adapter !== "kernel-only") commands.push({
278
- phase: "adapter", ...SETUP_INSTALLERS[adapter], args: ["--target", target, "--profile", profile],
278
+ phase: "adapter", ...SETUP_INSTALLERS[adapter], args: ["--target", target, ...(retainCurrent ? [] : ["--profile", profile])],
279
279
  });
280
280
  return commands;
281
281
  }
@@ -205,9 +205,9 @@ export async function applyAdoptionPlan(input, { target, adapter = null, authori
205
205
  applyAssert(plan.portfolio.status === "unselected" && plan.portfolio.identity === null, "portfolio_authority_unverified");
206
206
  applyAssert(plan.conflicts.length === 0 && plan.human_decisions.length === 0, "unresolved_plan_decisions");
207
207
  assertNoSetupInProgress(root);
208
- const source = await runtime.planningSource(plan.selection.adapter, plan.selection.profile);
208
+ const source = await runtime.planningSource(plan.selection.adapter, plan.selection.profile, root, plan.selection.retain_current);
209
209
  applyAssert(equals(source.selectedSkills, plan.application.selected_skills), "skill_selection_mismatch");
210
- invocations = setupInstallerInvocations(plan.selection.adapter, plan.selection.profile, source.selectedSkills, root);
210
+ invocations = setupInstallerInvocations(plan.selection.adapter, plan.selection.profile, source.kernelSkills, root, plan.selection.retain_current);
211
211
  applyAssert(plan.application.phases.length === invocations.length, "invalid_apply_phases");
212
212
  assertSetupWritePaths(root, plan.application.write_paths);
213
213
  current = captureApplyTarget(root);
@@ -219,7 +219,7 @@ export async function applyAdoptionPlan(input, { target, adapter = null, authori
219
219
  // Re-running the existing planner is verification, not permission to replace
220
220
  // the selected plan: any semantic difference below is a stop, not a replan.
221
221
  const replay = await runtime.createAdoptionPlan({
222
- target: root, adapter: plan.selection.adapter, profile: plan.selection.profile,
222
+ target: root, adapter: plan.selection.adapter, profile: plan.selection.retain_current ? null : plan.selection.profile,
223
223
  purpose: plan.recommendation.purpose, risk: plan.recommendation.risk,
224
224
  requiredCapabilities: plan.recommendation.capabilities.map((entry) => entry.capability_id),
225
225
  });