@team-attention/hoyeon-cli 0.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.
@@ -0,0 +1,697 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "dev-spec/v4",
4
+ "title": "dev-spec v4",
5
+ "description": "JSON Schema for dev spec v4 — unified spec + state document",
6
+ "type": "object",
7
+ "required": ["meta", "tasks"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "$schema": { "type": "string" },
11
+ "meta": { "$ref": "#/$defs/meta" },
12
+ "context": { "$ref": "#/$defs/context" },
13
+ "requirements": {
14
+ "type": "array",
15
+ "items": { "$ref": "#/$defs/requirement" }
16
+ },
17
+ "tasks": {
18
+ "type": "array",
19
+ "minItems": 1,
20
+ "items": { "$ref": "#/$defs/task" }
21
+ },
22
+ "constraints": {
23
+ "type": "array",
24
+ "items": { "$ref": "#/$defs/constraint" }
25
+ },
26
+ "history": {
27
+ "type": "array",
28
+ "items": { "$ref": "#/$defs/historyEntry" }
29
+ },
30
+ "verification_summary": {
31
+ "$ref": "#/$defs/verificationSummary",
32
+ "description": "Derived from requirements — A/H/S classification. Do not author independently."
33
+ },
34
+ "external_dependencies": { "$ref": "#/$defs/externalDependencies" }
35
+ },
36
+ "$defs": {
37
+ "sha256Hash": {
38
+ "type": "string",
39
+ "pattern": "^[a-f0-9]{64}$",
40
+ "description": "Raw SHA-256 hex digest (64 lowercase hex characters, no prefix)"
41
+ },
42
+ "reference": {
43
+ "type": "object",
44
+ "required": ["path"],
45
+ "additionalProperties": false,
46
+ "properties": {
47
+ "path": { "type": "string" },
48
+ "start_line": { "type": "integer", "minimum": 1 },
49
+ "end_line": { "type": "integer", "minimum": 1 }
50
+ }
51
+ },
52
+ "taskConstraint": {
53
+ "type": "object",
54
+ "required": ["type", "target"],
55
+ "additionalProperties": false,
56
+ "properties": {
57
+ "type": {
58
+ "type": "string",
59
+ "enum": ["no_modify", "no_delete", "preserve_string", "read_only"]
60
+ },
61
+ "target": { "type": "string" }
62
+ }
63
+ },
64
+ "expect": {
65
+ "type": "object",
66
+ "required": ["exit_code"],
67
+ "additionalProperties": false,
68
+ "properties": {
69
+ "exit_code": { "type": "integer" },
70
+ "stdout_contains": { "type": "string" },
71
+ "stderr_empty": { "type": "boolean" }
72
+ }
73
+ },
74
+ "verifyCommand": {
75
+ "type": "object",
76
+ "required": ["type", "run", "expect"],
77
+ "additionalProperties": false,
78
+ "properties": {
79
+ "type": { "type": "string", "const": "command" },
80
+ "run": { "type": "string" },
81
+ "expect": { "$ref": "#/$defs/expect" }
82
+ }
83
+ },
84
+ "verifyAssertion": {
85
+ "type": "object",
86
+ "required": ["type", "checks"],
87
+ "additionalProperties": false,
88
+ "properties": {
89
+ "type": { "type": "string", "const": "assertion" },
90
+ "checks": {
91
+ "type": "array",
92
+ "minItems": 1,
93
+ "items": { "type": "string" }
94
+ }
95
+ }
96
+ },
97
+ "verifyInstruction": {
98
+ "type": "object",
99
+ "required": ["type", "ask"],
100
+ "additionalProperties": false,
101
+ "properties": {
102
+ "type": { "type": "string", "const": "instruction" },
103
+ "ask": { "type": "string" }
104
+ }
105
+ },
106
+ "verify": {
107
+ "oneOf": [
108
+ { "$ref": "#/$defs/verifyCommand" },
109
+ { "$ref": "#/$defs/verifyAssertion" },
110
+ { "$ref": "#/$defs/verifyInstruction" }
111
+ ]
112
+ },
113
+ "scenario": {
114
+ "type": "object",
115
+ "required": ["id", "given", "when", "then", "verified_by", "verify"],
116
+ "additionalProperties": false,
117
+ "properties": {
118
+ "id": { "type": "string" },
119
+ "given": { "type": "string" },
120
+ "when": { "type": "string" },
121
+ "then": { "type": "string" },
122
+ "verified_by": {
123
+ "type": "string",
124
+ "enum": ["machine", "agent", "human"],
125
+ "description": "WHO verifies: machine=automated command, agent=AI assertion, human=manual inspection"
126
+ },
127
+ "execution_env": {
128
+ "type": "string",
129
+ "enum": ["host", "sandbox", "ci"],
130
+ "description": "WHERE verification runs: host=local, sandbox=docker/container, ci=CI pipeline"
131
+ },
132
+ "verify": { "$ref": "#/$defs/verify" }
133
+ },
134
+ "allOf": [
135
+ {
136
+ "if": {
137
+ "properties": { "verified_by": { "const": "machine" } },
138
+ "required": ["verified_by"]
139
+ },
140
+ "then": {
141
+ "properties": {
142
+ "verify": { "$ref": "#/$defs/verifyCommand" }
143
+ }
144
+ }
145
+ },
146
+ {
147
+ "if": {
148
+ "properties": { "verified_by": { "const": "agent" } },
149
+ "required": ["verified_by"]
150
+ },
151
+ "then": {
152
+ "properties": {
153
+ "verify": { "$ref": "#/$defs/verifyAssertion" }
154
+ }
155
+ }
156
+ },
157
+ {
158
+ "if": {
159
+ "properties": { "verified_by": { "const": "human" } },
160
+ "required": ["verified_by"]
161
+ },
162
+ "then": {
163
+ "properties": {
164
+ "verify": { "$ref": "#/$defs/verifyInstruction" }
165
+ }
166
+ }
167
+ }
168
+ ]
169
+ },
170
+ "meta": {
171
+ "type": "object",
172
+ "required": ["name", "goal"],
173
+ "additionalProperties": false,
174
+ "properties": {
175
+ "name": { "type": "string" },
176
+ "goal": { "type": "string" },
177
+ "non_goals": {
178
+ "type": "array",
179
+ "items": { "type": "string" },
180
+ "description": "What this project is explicitly NOT trying to achieve (strategic scope exclusion)"
181
+ },
182
+ "deliverables": {
183
+ "type": "array",
184
+ "items": {
185
+ "type": "object",
186
+ "required": ["path", "description"],
187
+ "additionalProperties": false,
188
+ "properties": {
189
+ "path": { "type": "string" },
190
+ "description": { "type": "string" }
191
+ }
192
+ }
193
+ },
194
+ "mode": {
195
+ "type": "object",
196
+ "additionalProperties": false,
197
+ "properties": {
198
+ "depth": {
199
+ "type": "string",
200
+ "enum": ["quick", "standard"]
201
+ },
202
+ "interaction": {
203
+ "type": "string",
204
+ "enum": ["interactive", "autopilot"]
205
+ }
206
+ }
207
+ },
208
+ "derived_from": { "type": "string" },
209
+ "created_at": { "type": "string" },
210
+ "updated_at": { "type": "string" },
211
+ "approved_by": { "type": "string" },
212
+ "approved_at": { "type": "string" }
213
+ }
214
+ },
215
+ "context": {
216
+ "type": "object",
217
+ "additionalProperties": false,
218
+ "properties": {
219
+ "request": { "type": "string" },
220
+ "interview": {
221
+ "type": "array",
222
+ "items": {
223
+ "type": "object",
224
+ "required": ["topic", "decision"],
225
+ "additionalProperties": false,
226
+ "properties": {
227
+ "topic": { "type": "string" },
228
+ "decision": { "type": "string" }
229
+ }
230
+ }
231
+ },
232
+ "research": {
233
+ "oneOf": [
234
+ { "type": "string" },
235
+ { "$ref": "#/$defs/researchFindings" }
236
+ ]
237
+ },
238
+ "assumptions": {
239
+ "type": "array",
240
+ "items": {
241
+ "type": "object",
242
+ "required": ["id", "belief", "if_wrong", "impact"],
243
+ "additionalProperties": false,
244
+ "properties": {
245
+ "id": { "type": "string" },
246
+ "belief": { "type": "string" },
247
+ "if_wrong": { "type": "string" },
248
+ "impact": {
249
+ "type": "string",
250
+ "enum": ["minor", "major", "critical"]
251
+ }
252
+ }
253
+ }
254
+ },
255
+ "decisions": {
256
+ "type": "array",
257
+ "items": {
258
+ "type": "object",
259
+ "required": ["id", "decision", "rationale"],
260
+ "additionalProperties": false,
261
+ "properties": {
262
+ "id": { "type": "string" },
263
+ "decision": { "type": "string" },
264
+ "rationale": { "type": "string" },
265
+ "alternatives_rejected": {
266
+ "type": "array",
267
+ "items": {
268
+ "type": "object",
269
+ "required": ["option", "reason"],
270
+ "additionalProperties": false,
271
+ "properties": {
272
+ "option": { "type": "string" },
273
+ "reason": { "type": "string" }
274
+ }
275
+ }
276
+ }
277
+ }
278
+ }
279
+ },
280
+ "known_gaps": {
281
+ "type": "array",
282
+ "items": {
283
+ "type": "object",
284
+ "required": ["gap", "severity", "mitigation"],
285
+ "additionalProperties": false,
286
+ "properties": {
287
+ "gap": { "type": "string" },
288
+ "severity": {
289
+ "type": "string",
290
+ "enum": ["low", "medium", "high", "critical"]
291
+ },
292
+ "mitigation": { "type": "string" }
293
+ }
294
+ }
295
+ }
296
+ }
297
+ },
298
+ "requirement": {
299
+ "type": "object",
300
+ "required": ["id", "behavior", "priority", "scenarios"],
301
+ "additionalProperties": false,
302
+ "properties": {
303
+ "id": { "type": "string" },
304
+ "behavior": { "type": "string" },
305
+ "priority": {
306
+ "type": "integer",
307
+ "minimum": 1,
308
+ "maximum": 5
309
+ },
310
+ "scenarios": {
311
+ "type": "array",
312
+ "items": { "$ref": "#/$defs/scenario" }
313
+ }
314
+ }
315
+ },
316
+ "checkpoint": {
317
+ "type": "object",
318
+ "required": ["enabled"],
319
+ "additionalProperties": false,
320
+ "properties": {
321
+ "enabled": { "type": "boolean" },
322
+ "message": { "type": "string" },
323
+ "condition": {
324
+ "type": "string",
325
+ "enum": ["always", "on_fulfill", "manual"]
326
+ }
327
+ }
328
+ },
329
+ "task": {
330
+ "type": "object",
331
+ "required": ["id", "action", "type"],
332
+ "additionalProperties": false,
333
+ "properties": {
334
+ "id": { "type": "string" },
335
+ "action": { "type": "string" },
336
+ "type": {
337
+ "type": "string",
338
+ "enum": ["work", "verification"]
339
+ },
340
+ "risk": {
341
+ "type": "string",
342
+ "enum": ["low", "medium", "high"]
343
+ },
344
+ "file_scope": {
345
+ "type": "array",
346
+ "items": { "type": "string" }
347
+ },
348
+ "fulfills": {
349
+ "type": "array",
350
+ "items": { "type": "string" }
351
+ },
352
+ "depends_on": {
353
+ "type": "array",
354
+ "items": { "type": "string" }
355
+ },
356
+ "steps": {
357
+ "type": "array",
358
+ "description": "Task steps — either plain strings (backward compat) or structured objects with done tracking",
359
+ "items": {
360
+ "oneOf": [
361
+ { "type": "string" },
362
+ {
363
+ "type": "object",
364
+ "required": ["text"],
365
+ "additionalProperties": false,
366
+ "properties": {
367
+ "text": { "type": "string" },
368
+ "done": { "type": "boolean", "default": false }
369
+ }
370
+ }
371
+ ]
372
+ }
373
+ },
374
+ "references": {
375
+ "type": "array",
376
+ "items": { "$ref": "#/$defs/reference" }
377
+ },
378
+ "inputs": {
379
+ "type": "array",
380
+ "items": {
381
+ "type": "object",
382
+ "required": ["from_task", "artifact"],
383
+ "additionalProperties": false,
384
+ "properties": {
385
+ "from_task": { "type": "string" },
386
+ "artifact": { "type": "string" }
387
+ }
388
+ }
389
+ },
390
+ "outputs": {
391
+ "type": "array",
392
+ "items": {
393
+ "type": "object",
394
+ "required": ["id", "path"],
395
+ "additionalProperties": false,
396
+ "properties": {
397
+ "id": { "type": "string" },
398
+ "path": { "type": "string" }
399
+ }
400
+ }
401
+ },
402
+ "task_constraints": {
403
+ "type": "array",
404
+ "items": { "$ref": "#/$defs/taskConstraint" }
405
+ },
406
+ "checkpoint": {
407
+ "oneOf": [
408
+ { "$ref": "#/$defs/checkpoint" },
409
+ { "type": "null" }
410
+ ]
411
+ },
412
+ "status": {
413
+ "type": "string",
414
+ "enum": ["pending", "in_progress", "done"],
415
+ "default": "pending"
416
+ },
417
+ "started_at": { "type": "string" },
418
+ "completed_at": { "type": "string" },
419
+ "summary": { "type": "string" },
420
+ "required_tools": {
421
+ "type": "array",
422
+ "items": { "type": "string" }
423
+ },
424
+ "must_not_do": {
425
+ "type": "array",
426
+ "items": { "type": "string" }
427
+ },
428
+ "acceptance_criteria": { "$ref": "#/$defs/taskAcceptanceCriteria" }
429
+ }
430
+ },
431
+ "historyEntry": {
432
+ "type": "object",
433
+ "required": ["ts", "type"],
434
+ "additionalProperties": false,
435
+ "properties": {
436
+ "ts": { "type": "string" },
437
+ "type": {
438
+ "type": "string",
439
+ "enum": ["spec_created", "task_start", "task_done", "tasks_changed", "spec_updated"]
440
+ },
441
+ "task": { "type": "string" },
442
+ "summary": { "type": "string" },
443
+ "detail": { "type": "string" }
444
+ }
445
+ },
446
+ "acceptanceCriterionItem": {
447
+ "type": "object",
448
+ "required": ["description"],
449
+ "additionalProperties": false,
450
+ "properties": {
451
+ "description": { "type": "string" },
452
+ "command": { "type": "string" },
453
+ "status": {
454
+ "type": "string",
455
+ "enum": ["PASS", "FAIL", "SKIP"]
456
+ }
457
+ }
458
+ },
459
+ "taskAcceptanceCriteria": {
460
+ "type": "object",
461
+ "additionalProperties": false,
462
+ "properties": {
463
+ "functional": {
464
+ "type": "array",
465
+ "items": { "$ref": "#/$defs/acceptanceCriterionItem" }
466
+ },
467
+ "static": {
468
+ "type": "array",
469
+ "items": { "$ref": "#/$defs/acceptanceCriterionItem" }
470
+ },
471
+ "runtime": {
472
+ "type": "array",
473
+ "items": { "$ref": "#/$defs/acceptanceCriterionItem" }
474
+ },
475
+ "cleanup": {
476
+ "type": "array",
477
+ "items": { "$ref": "#/$defs/acceptanceCriterionItem" }
478
+ }
479
+ }
480
+ },
481
+ "verificationSummary": {
482
+ "type": "object",
483
+ "additionalProperties": false,
484
+ "properties": {
485
+ "agent_items": {
486
+ "type": "array",
487
+ "items": {
488
+ "type": "object",
489
+ "required": ["id", "criterion", "method"],
490
+ "additionalProperties": false,
491
+ "properties": {
492
+ "id": { "type": "string" },
493
+ "criterion": { "type": "string" },
494
+ "method": { "type": "string" },
495
+ "related_task": { "type": "string" }
496
+ }
497
+ }
498
+ },
499
+ "human_items": {
500
+ "type": "array",
501
+ "items": {
502
+ "type": "object",
503
+ "required": ["id", "criterion", "reason"],
504
+ "additionalProperties": false,
505
+ "properties": {
506
+ "id": { "type": "string" },
507
+ "criterion": { "type": "string" },
508
+ "reason": { "type": "string" },
509
+ "review_material": { "type": "string" }
510
+ }
511
+ }
512
+ },
513
+ "sandbox_items": {
514
+ "type": "array",
515
+ "items": {
516
+ "type": "object",
517
+ "required": ["id", "scenario", "agent", "method"],
518
+ "additionalProperties": false,
519
+ "properties": {
520
+ "id": { "type": "string" },
521
+ "scenario": { "type": "string" },
522
+ "agent": { "type": "string" },
523
+ "method": { "type": "string" }
524
+ }
525
+ }
526
+ },
527
+ "gaps": {
528
+ "type": "array",
529
+ "items": { "type": "string" }
530
+ }
531
+ }
532
+ },
533
+ "externalDependencies": {
534
+ "description": "Human-only tasks that the agent cannot perform (infra setup, API keys, deployment, etc.). If automatable, put it in the Task DAG instead.",
535
+ "type": "object",
536
+ "additionalProperties": false,
537
+ "properties": {
538
+ "pre_work": {
539
+ "description": "Human actions that must be completed BEFORE execution starts.",
540
+ "type": "array",
541
+ "items": {
542
+ "type": "object",
543
+ "required": ["dependency", "action"],
544
+ "additionalProperties": false,
545
+ "properties": {
546
+ "id": { "type": "string", "description": "Optional identifier (e.g., PW-1)" },
547
+ "dependency": { "type": "string" },
548
+ "action": { "type": "string", "description": "What the human must do" },
549
+ "command": { "type": "string", "description": "Hint command for the human (not agent-executed)" },
550
+ "blocking": { "type": "boolean", "description": "If true, execution halts until human confirms completion" }
551
+ }
552
+ }
553
+ },
554
+ "post_work": {
555
+ "description": "Human actions to perform AFTER execution completes.",
556
+ "type": "array",
557
+ "items": {
558
+ "type": "object",
559
+ "required": ["dependency", "action"],
560
+ "additionalProperties": false,
561
+ "properties": {
562
+ "id": { "type": "string", "description": "Optional identifier (e.g., POW-1)" },
563
+ "dependency": { "type": "string" },
564
+ "action": { "type": "string", "description": "What the human must do" },
565
+ "command": { "type": "string", "description": "Hint command for the human (not agent-executed)" }
566
+ }
567
+ }
568
+ }
569
+ }
570
+ },
571
+ "researchFindings": {
572
+ "type": "object",
573
+ "additionalProperties": false,
574
+ "properties": {
575
+ "summary": {
576
+ "type": "string",
577
+ "description": "High-level summary of exploration results"
578
+ },
579
+ "patterns": {
580
+ "type": "array",
581
+ "description": "Existing code patterns discovered (file:line format)",
582
+ "items": {
583
+ "type": "object",
584
+ "required": ["path", "description"],
585
+ "additionalProperties": false,
586
+ "properties": {
587
+ "path": { "type": "string" },
588
+ "start_line": { "type": "integer", "minimum": 1 },
589
+ "end_line": { "type": "integer", "minimum": 1 },
590
+ "description": { "type": "string" }
591
+ }
592
+ }
593
+ },
594
+ "structure": {
595
+ "type": "array",
596
+ "description": "Key directory/file structure paths",
597
+ "items": { "type": "string" }
598
+ },
599
+ "commands": {
600
+ "type": "object",
601
+ "description": "Project commands discovered",
602
+ "additionalProperties": false,
603
+ "properties": {
604
+ "typecheck": { "type": "string" },
605
+ "lint": { "type": "string" },
606
+ "test": { "type": "string" },
607
+ "build": { "type": "string" }
608
+ }
609
+ },
610
+ "documentation": {
611
+ "type": "array",
612
+ "description": "Internal docs findings (ADRs, conventions, constraints)",
613
+ "items": {
614
+ "type": "object",
615
+ "required": ["path", "description"],
616
+ "additionalProperties": false,
617
+ "properties": {
618
+ "path": { "type": "string" },
619
+ "line": { "type": "integer", "minimum": 1 },
620
+ "description": { "type": "string" }
621
+ }
622
+ }
623
+ },
624
+ "ux_review": {
625
+ "type": "object",
626
+ "description": "UX impact assessment from ux-reviewer agent",
627
+ "additionalProperties": false,
628
+ "properties": {
629
+ "current_flow": { "type": "string" },
630
+ "impact": { "type": "string" },
631
+ "recommendations": {
632
+ "type": "array",
633
+ "items": { "type": "string" }
634
+ },
635
+ "must_not_do": {
636
+ "type": "array",
637
+ "items": { "type": "string" }
638
+ }
639
+ }
640
+ }
641
+ }
642
+ },
643
+ "constraint": {
644
+ "type": "object",
645
+ "required": ["id", "type", "rule", "verified_by", "verify"],
646
+ "additionalProperties": false,
647
+ "properties": {
648
+ "id": { "type": "string" },
649
+ "type": {
650
+ "type": "string",
651
+ "enum": ["must_not_do", "preserve"]
652
+ },
653
+ "rule": { "type": "string" },
654
+ "verified_by": {
655
+ "type": "string",
656
+ "enum": ["machine", "agent", "human"]
657
+ },
658
+ "verify": { "$ref": "#/$defs/verify" }
659
+ },
660
+ "allOf": [
661
+ {
662
+ "if": {
663
+ "properties": { "verified_by": { "const": "machine" } },
664
+ "required": ["verified_by"]
665
+ },
666
+ "then": {
667
+ "properties": {
668
+ "verify": { "$ref": "#/$defs/verifyCommand" }
669
+ }
670
+ }
671
+ },
672
+ {
673
+ "if": {
674
+ "properties": { "verified_by": { "const": "agent" } },
675
+ "required": ["verified_by"]
676
+ },
677
+ "then": {
678
+ "properties": {
679
+ "verify": { "$ref": "#/$defs/verifyAssertion" }
680
+ }
681
+ }
682
+ },
683
+ {
684
+ "if": {
685
+ "properties": { "verified_by": { "const": "human" } },
686
+ "required": ["verified_by"]
687
+ },
688
+ "then": {
689
+ "properties": {
690
+ "verify": { "$ref": "#/$defs/verifyInstruction" }
691
+ }
692
+ }
693
+ }
694
+ ]
695
+ }
696
+ }
697
+ }