@x0rium/devkit-cli 0.4.0 → 0.6.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 (40) hide show
  1. package/dist/diff.d.ts +35 -0
  2. package/dist/diff.d.ts.map +1 -0
  3. package/dist/diff.js +154 -0
  4. package/dist/diff.js.map +1 -0
  5. package/dist/index.js +101 -2
  6. package/dist/index.js.map +1 -1
  7. package/dist/scaffold.d.ts +1 -0
  8. package/dist/scaffold.d.ts.map +1 -1
  9. package/dist/scaffold.js +42 -4
  10. package/dist/scaffold.js.map +1 -1
  11. package/package.json +3 -2
  12. package/skills/arch-kit/README.md +195 -0
  13. package/skills/arch-kit/SKILL.md +128 -0
  14. package/skills/arch-kit/references/adr.md +25 -0
  15. package/skills/arch-kit/references/impact.md +13 -0
  16. package/skills/arch-kit/references/invariants.md +9 -0
  17. package/skills/arch-kit/references/investigation.md +37 -0
  18. package/skills/arch-kit/references/rfc.md +36 -0
  19. package/skills/devkit-init/SKILL.md +99 -0
  20. package/skills/devkit-init/references/brownfield.md +147 -0
  21. package/skills/devkit-init/references/greenfield.md +44 -0
  22. package/skills/devkit-init/references/upgrade.md +103 -0
  23. package/skills/product-kit/README.md +135 -0
  24. package/skills/product-kit/SKILL.md +101 -0
  25. package/skills/product-kit/references/roadmap.md +16 -0
  26. package/skills/product-kit/references/users.md +14 -0
  27. package/skills/product-kit/references/ux_invariants.md +8 -0
  28. package/skills/qa-kit/README.md +188 -0
  29. package/skills/qa-kit/SKILL.md +113 -0
  30. package/skills/qa-kit/references/assumption_checks.md +10 -0
  31. package/skills/qa-kit/references/coverage_map.md +19 -0
  32. package/skills/qa-kit/references/test_contracts.md +10 -0
  33. package/skills/research-kit/README.md +139 -0
  34. package/skills/research-kit/SKILL.md +84 -0
  35. package/skills/research-kit/references/assumptions.md +9 -0
  36. package/skills/research-kit/references/feasibility.md +15 -0
  37. package/skills/research-kit/references/market.md +13 -0
  38. package/skills/research-kit/references/unknowns.md +9 -0
  39. package/skills/spec-kit/README.md +139 -0
  40. package/skills/spec-kit/SKILL.md +108 -0
@@ -0,0 +1,44 @@
1
+ # Greenfield Mode
2
+
3
+ Fresh project. No code, no .devkit/, no .specify/.
4
+
5
+ ## What to Do
6
+
7
+ 1. Create .devkit/ structure (done by SKILL.md)
8
+ 2. Run `specify init . --ai claude` (done by SKILL.md)
9
+ 3. Tell developer to start with ResearchKit
10
+
11
+ ## Starting Message to Developer
12
+
13
+ ```
14
+ DevKit initialized for a new project.
15
+
16
+ Your development cycle:
17
+ /research-kit → explore feasibility and unknowns
18
+ /product-kit → define users and UX invariants
19
+ /arch-kit → verify architecture
20
+ /spec-kit → implement (via spec-kit workflow)
21
+ /qa-kit → verify against all decisions
22
+
23
+ Start with /research-kit — describe your idea.
24
+ ```
25
+
26
+ ## Files to Create
27
+
28
+ Create `.devkit/STATUS.md`:
29
+
30
+ ```markdown
31
+ # DevKit Status
32
+
33
+ MODE: greenfield
34
+ INITIALIZED: [date]
35
+ CURRENT_PHASE: research
36
+ SPEC_KIT: initialized
37
+
38
+ ## Phase Status
39
+ - [ ] ResearchKit
40
+ - [ ] ProductKit
41
+ - [ ] ArchKit
42
+ - [ ] SpecKit
43
+ - [ ] QAKit
44
+ ```
@@ -0,0 +1,103 @@
1
+ # Upgrade Mode
2
+
3
+ spec-kit exists (.specify/ present). No .devkit/ yet.
4
+ Developer is already using spec-kit and wants to add the full DevKit layer.
5
+
6
+ ## What This Means
7
+
8
+ spec-kit is already running. There are specs, possibly a constitution.md.
9
+ We need to reverse-engineer DevKit artifacts from what spec-kit has,
10
+ then connect them so ArchKit owns constitution.md going forward.
11
+
12
+ ## Phase 1: Read Existing spec-kit Artifacts
13
+
14
+ Read all files in `.specify/`:
15
+ - `constitution.md` — project principles and constraints
16
+ - `spec.md` — feature specifications
17
+ - `plan.md` — technical plans
18
+ - `tasks/` — implementation tasks
19
+
20
+ Understand what's already been built and decided.
21
+
22
+ ## Phase 2: Extract ArchKit Artifacts from constitution.md
23
+
24
+ constitution.md contains decisions that belong in ArchKit.
25
+
26
+ Extract:
27
+ - Tech stack decisions → ADR entries
28
+ - Constraints and rules → invariant candidates
29
+ - Patterns and standards → more invariants
30
+
31
+ Create `.devkit/arch/invariants.md` from these.
32
+ Create `.devkit/arch/decisions/` ADR files.
33
+
34
+ Mark all as `inferred` with `SOURCE: constitution.md`.
35
+
36
+ ## Phase 3: Extract ProductKit Artifacts
37
+
38
+ Look in constitution.md and spec.md for:
39
+ - Who the user is
40
+ - UX rules and constraints
41
+ - What's in scope / out of scope
42
+
43
+ Create `.devkit/product/users.md` and `ux_invariants.md`.
44
+ Mark as `inferred`.
45
+
46
+ ## Phase 4: Link DevKit to spec-kit
47
+
48
+ Going forward, constitution.md is OWNED by ArchKit.
49
+ Add a note at the top of `.specify/constitution.md`:
50
+
51
+ ```markdown
52
+ <!-- GENERATED BY DEVKIT — do not edit manually -->
53
+ <!-- Source: .devkit/arch/invariants.md + decisions/ -->
54
+ <!-- Regenerate with: /arch-kit generate-constitution -->
55
+ ```
56
+
57
+ ## Phase 5: Produce Status File
58
+
59
+ Create `.devkit/STATUS.md`:
60
+
61
+ ```markdown
62
+ # DevKit Status
63
+
64
+ MODE: upgrade-from-speckit
65
+ INITIALIZED: [date]
66
+ CURRENT_PHASE: arch-review
67
+
68
+ ## Migration Summary
69
+ SPEC_KIT_SPECS_FOUND: N
70
+ INVARIANTS_EXTRACTED: M
71
+ CONSTITUTION: linked (DevKit now owns it)
72
+
73
+ ## Required Actions
74
+ - [ ] Review .devkit/arch/invariants.md
75
+ - [ ] Confirm or correct extracted decisions
76
+ - [ ] Run /arch-kit to fill gaps
77
+
78
+ ## Phase Status
79
+ - [~] ResearchKit (not available — existing project)
80
+ - [~] ProductKit (partially extracted)
81
+ - [ ] ArchKit (review required)
82
+ - [x] SpecKit (already in use)
83
+ - [ ] QAKit
84
+ ```
85
+
86
+ ## Message to Developer
87
+
88
+ ```
89
+ DevKit initialized over your existing spec-kit project.
90
+
91
+ Extracted from your spec-kit artifacts:
92
+ Invariants: N (from constitution.md — review required)
93
+ Decisions: M (inferred — review required)
94
+
95
+ constitution.md is now managed by ArchKit.
96
+ Changes to architecture go through /arch-kit,
97
+ which regenerates constitution.md automatically.
98
+
99
+ Next steps:
100
+ 1. Review .devkit/arch/invariants.md
101
+ 2. Run /arch-kit to verify and complete the picture
102
+ 3. Continue using spec-kit as normal — it now has a verified foundation
103
+ ```
@@ -0,0 +1,135 @@
1
+ # ProductKit
2
+
3
+ > Уровень 2. "Что именно строим и для кого?"
4
+
5
+ ---
6
+
7
+ ## Когда использовать
8
+
9
+ - feasibility подтверждена в ResearchKit
10
+ - нужно определить что именно строить
11
+ - нужно понять как пользователь будет это использовать
12
+ - нужно зафиксировать UX инварианты до архитектуры
13
+ - нужно определить роадмап и приоритеты
14
+
15
+ ---
16
+
17
+ ## Ключевая идея
18
+
19
+ UX инварианты определяются **до** архитектуры. Они ограничивают архитектурные решения так же жёстко как технические требования.
20
+
21
+ Пример: если U1 = "CLI запускается с максимум 3 обязательными параметрами" зафиксирован здесь — архитектура с 60 параметрами станет блокером в ArchKit, а не открытием после реализации.
22
+
23
+ ---
24
+
25
+ ## Фазы
26
+
27
+ ### Phase 1: User Definition
28
+ ```
29
+ QUESTIONS:
30
+ - Кто конкретно будет это использовать?
31
+ - Какую проблему они решают сейчас без этого инструмента?
32
+ - Что они знают / умеют заранее?
33
+ - В каком контексте используют: вручную, в скрипте, в CI?
34
+
35
+ FORBIDDEN:
36
+ - думать о технической реализации
37
+ - выбирать стек
38
+ ```
39
+
40
+ ### Phase 2: UX Invariants
41
+ ```
42
+ Формализуем что система гарантирует пользователю.
43
+ Не "как выглядит" а "что обещает".
44
+
45
+ EXAMPLES:
46
+ U1: новый пользователь достигает результата за N шагов
47
+ U2: без конфига работает разумный default
48
+ U3: ошибка всегда содержит что делать дальше
49
+ U4: операция X занимает не более Y секунд субъективно
50
+ ```
51
+
52
+ ### Phase 3: Roadmap
53
+ ```
54
+ Фазы разработки с точки зрения продукта.
55
+ Что входит в MVP, что в v1, что позже.
56
+
57
+ BASIS: UX инварианты + assumptions из ResearchKit
58
+ CONSTRAINTS: будут дополнены техническими из ArchKit
59
+ ```
60
+
61
+ ---
62
+
63
+ ## Артефакты
64
+
65
+ ### users.md
66
+ ```markdown
67
+ # Users
68
+
69
+ ## Primary User
70
+ PROFILE: кто это
71
+ CONTEXT: как и где использует
72
+ KNOWLEDGE: что знает заранее
73
+ GOAL: чего хочет достичь
74
+ HAPPY_PATH: типичный сценарий (80% случаев)
75
+
76
+ ## Edge Cases
77
+ ...
78
+ ```
79
+
80
+ ### ux_invariants.md
81
+ ```markdown
82
+ # UX Invariants
83
+
84
+ ## U1: [название]
85
+ STATEMENT: что система гарантирует пользователю
86
+ RATIONALE: почему это важно
87
+ VALIDATION: как проверить что инвариант соблюдён
88
+ PRIORITY: must / should / could
89
+ STATUS: active / suspended / rejected
90
+ ```
91
+
92
+ ### roadmap.md
93
+ ```markdown
94
+ # Roadmap
95
+
96
+ ## MVP
97
+ GOAL: минимум для первого реального использования
98
+ UX_INVARIANTS: [какие инварианты покрывает]
99
+ EXCLUDES: [что явно не входит]
100
+
101
+ ## V1
102
+ ...
103
+
104
+ ## Later
105
+ ...
106
+
107
+ ## Never (явный anti-scope)
108
+ ...
109
+ ```
110
+
111
+ ---
112
+
113
+ ## Переход к ArchKit
114
+
115
+ **ALLOWED** когда:
116
+ - все пользовательские сценарии описаны
117
+ - UX инварианты зафиксированы для MVP
118
+ - роадмап имеет явный anti-scope
119
+ - нет open questions о том кто пользователь
120
+
121
+ **BLOCKED** когда:
122
+ - UX инварианты противоречат друг другу
123
+ - happy path не определён
124
+
125
+ ---
126
+
127
+ ## Команды
128
+
129
+ ```
130
+ /product init
131
+ /product users
132
+ /product ux-invariants
133
+ /product roadmap
134
+ /product status
135
+ ```
@@ -0,0 +1,101 @@
1
+ ---
2
+ name: product-kit
3
+ description: DevKit Level 2. Use after ResearchKit when developer needs to define who the user is, establish UX invariants, and set the roadmap before architecture. Triggers on phrases like "who is this for", "how will people use this", "what's the MVP", "user experience", or when ResearchKit handoff is complete.
4
+ license: MIT
5
+ metadata:
6
+ author: devkit
7
+ version: "1.0"
8
+ layer: "2-of-5"
9
+ prev: research-kit
10
+ next: arch-kit
11
+ ---
12
+
13
+ # ProductKit — Level 2: "What exactly are we building and for whom?"
14
+
15
+ You are operating in ProductKit phase. Your job is to define the user, establish UX invariants, and set roadmap priorities before any architecture decisions are made.
16
+
17
+ ## Your Role
18
+
19
+ - Define who the user is and how they interact with the product
20
+ - Establish UX invariants that constrain architecture
21
+ - Prioritize ruthlessly: MVP vs later vs never
22
+ - Do NOT recommend technical solutions
23
+ - Do NOT write code or architecture
24
+
25
+ ## Critical Principle
26
+
27
+ UX invariants are defined HERE, before ArchKit. They constrain architecture just as hard as technical requirements. If defined after, you get 60-parameter CLIs that formally work but are unusable.
28
+
29
+ ## Phases
30
+
31
+ ### Phase 1: User Definition
32
+ Identify the real user. Ask:
33
+ - Who specifically will use this? (developer, devops, manager, end user?)
34
+ - What do they already know?
35
+ - What context are they in when they use this? (manually, in CI, in a script?)
36
+ - What is their happy path — the 80% case?
37
+
38
+ ### Phase 2: UX Invariants
39
+ Formalize what the system PROMISES the user. Not how it looks — what it guarantees.
40
+
41
+ Examples:
42
+ - "New user reaches result in under N steps"
43
+ - "No required config to get started — sensible defaults"
44
+ - "Every error message tells you what to do next"
45
+ - "Core operation completes in under N seconds"
46
+
47
+ Each invariant gets: PRIORITY (must/should/could) and VALIDATION method.
48
+
49
+ ### Phase 3: Roadmap
50
+ Define phases from user perspective:
51
+ - MVP: minimum to be genuinely useful
52
+ - V1: full intended experience
53
+ - Later: good ideas for the future
54
+ - Never (anti-scope): explicitly out of scope — prevents scope creep
55
+
56
+ ## Artifacts to Produce
57
+
58
+ Read templates from:
59
+ - [Users template](references/users.md)
60
+ - [UX Invariants template](references/ux_invariants.md)
61
+ - [Roadmap template](references/roadmap.md)
62
+
63
+ Save artifacts to `.devkit/product/`.
64
+
65
+ ## Gate: When Can We Move to ArchKit?
66
+
67
+ ALLOWED to proceed when:
68
+ - Primary user and happy path defined
69
+ - UX invariants established for MVP scope
70
+ - Roadmap has explicit anti-scope
71
+ - No contradictions between UX invariants
72
+
73
+ BLOCKED when:
74
+ - UX invariants contradict each other
75
+ - Happy path unclear
76
+ - "Who is the user" still open
77
+
78
+ ## Event Detection
79
+
80
+ ### Product Blocker (triggered during SpecKit or later)
81
+ If developer says: "this is awkward to use", "too many parameters", "users won't understand this" — this is a UX invariant violation.
82
+
83
+ Response:
84
+ > "This looks like a UX invariant violation. Let me check product-kit artifacts.
85
+ > [check ux_invariants.md]
86
+ > This conflicts with [U_N]. Running ProductKit investigation before continuing."
87
+
88
+ Open `product/investigations/PROD-XXX.md`, explore options, update ux_invariants.md, propagate changes to ArchKit.
89
+
90
+ ## Handoff
91
+
92
+ When gate conditions are met:
93
+ ```
94
+ PRODUCT COMPLETE
95
+ USER: [one-line description]
96
+ HAPPY PATH: [one sentence]
97
+ UX INVARIANTS: N defined (M must, K should)
98
+ MVP SCOPE: [summary]
99
+ ANTI-SCOPE: [what we explicitly won't do]
100
+ READY FOR: ArchKit
101
+ ```
@@ -0,0 +1,16 @@
1
+ # Roadmap Template
2
+
3
+ ## MVP
4
+ GOAL: minimum to be genuinely useful to the primary user
5
+ UX_INVARIANTS_COVERED: [U1, U2, ...]
6
+ EXCLUDES: [what is explicitly out of MVP]
7
+
8
+ ## V1
9
+ GOAL: full intended experience
10
+ ADDS: [what MVP lacks]
11
+
12
+ ## Later
13
+ [Good ideas that are not V1]
14
+
15
+ ## Never (Anti-Scope)
16
+ [What we explicitly will NOT do — this prevents scope creep]
@@ -0,0 +1,14 @@
1
+ # Users Template
2
+
3
+ ## Primary User
4
+ PROFILE: who they are
5
+ CONTEXT: when and where they use this
6
+ KNOWLEDGE: what they know coming in
7
+ GOAL: what they want to achieve
8
+ HAPPY_PATH: the typical 80% scenario (one sentence)
9
+
10
+ ## Secondary Users
11
+ [Other users and their scenarios if applicable]
12
+
13
+ ## Anti-Users
14
+ [Who this is explicitly NOT for — prevents over-engineering]
@@ -0,0 +1,8 @@
1
+ # UX Invariants Template
2
+
3
+ ## U1: [name]
4
+ STATEMENT: what the system promises the user
5
+ RATIONALE: why this matters
6
+ VALIDATION: how to verify the invariant holds
7
+ PRIORITY: must / should / could
8
+ STATUS: active / suspended / rejected
@@ -0,0 +1,188 @@
1
+ # QAKit
2
+
3
+ > Уровень 5. "Работает ли это как мы решили?"
4
+
5
+ ---
6
+
7
+ ## Ключевая идея
8
+
9
+ Обычный QA проверяет код против спек. QAKit проверяет систему против **всех уровней принятых решений**. Тест который упал — это не просто баг. Это сигнал о том на каком уровне решение было неверным.
10
+
11
+ ```
12
+ QAKit проверяет:
13
+
14
+ против SpecKit: код делает что написано в спеке?
15
+ против ArchKit: система соблюдает технические инварианты?
16
+ против ProductKit: продукт решает проблему пользователя?
17
+ против ResearchKit: assumptions оказались верны?
18
+ ```
19
+
20
+ ---
21
+
22
+ ## Входные артефакты
23
+
24
+ ```
25
+ .devkit/arch/invariants.md → test_contracts.md
26
+ .devkit/product/ux_invariants.md → ux_test_contracts.md
27
+ .devkit/research/assumptions.md → assumption_checks.md
28
+ .specify/specs/ → spec coverage
29
+ ```
30
+
31
+ ---
32
+
33
+ ## Фазы
34
+
35
+ ### Phase 1: Contract Generation
36
+ ```
37
+ Из каждого инварианта генерируется тест-контракт:
38
+ - что проверяем
39
+ - как проверяем
40
+ - что является нарушением
41
+ - критичность нарушения
42
+ ```
43
+
44
+ ### Phase 2: Coverage Analysis
45
+ ```
46
+ Карта покрытия:
47
+ - какие инварианты покрыты тестами
48
+ - какие инварианты не покрыты (технический долг)
49
+ - какие assumptions проверены в реальности
50
+ ```
51
+
52
+ ### Phase 3: Assumption Validation
53
+ ```
54
+ Проверка что assumptions из ResearchKit
55
+ оказались верны в реальной системе.
56
+
57
+ Если assumption отклонён реальностью →
58
+ эскалация в ResearchKit для пересмотра.
59
+ ```
60
+
61
+ ---
62
+
63
+ ## Эскалация
64
+
65
+ ### Логика эскалации упавшего теста
66
+
67
+ ```
68
+ Тест упал
69
+
70
+ AI анализирует: что именно нарушено?
71
+
72
+ ┌─────────────────────────────────────────────┐
73
+ │ Баг реализации? │
74
+ │ Код не соответствует спеке │
75
+ │ → фикс в SpecKit, не эскалируем │
76
+ └─────────────────────────────────────────────┘
77
+ ↓ нет
78
+ ┌─────────────────────────────────────────────┐
79
+ │ Нарушен технический инвариант? │
80
+ │ Система не выполняет архитектурную гарантию │
81
+ │ → Investigation в ArchKit │
82
+ └─────────────────────────────────────────────┘
83
+ ↓ нет
84
+ ┌─────────────────────────────────────────────┐
85
+ │ Нарушен UX инвариант? │
86
+ │ Система работает но неудобна / непонятна │
87
+ │ → Product Blocker в ProductKit │
88
+ └─────────────────────────────────────────────┘
89
+ ↓ нет
90
+ ┌─────────────────────────────────────────────┐
91
+ │ Отклонён assumption из ResearchKit? │
92
+ │ Реальность не совпала с предположением │
93
+ │ → ResearchKit revision │
94
+ └─────────────────────────────────────────────┘
95
+ ```
96
+
97
+ ---
98
+
99
+ ## Артефакты
100
+
101
+ ### test_contracts.md
102
+ ```markdown
103
+ # Test Contracts
104
+
105
+ ## TC-I1: [название инварианта]
106
+ INVARIANT: I1 из invariants.md
107
+ WHAT: что проверяем
108
+ HOW: метод проверки (unit / integration / e2e / manual)
109
+ VIOLATION: что считается нарушением
110
+ CRITICALITY: blocker / major / minor
111
+ COVERAGE: covered / not-covered
112
+ ```
113
+
114
+ ### ux_test_contracts.md
115
+ ```markdown
116
+ # UX Test Contracts
117
+
118
+ ## TC-U1: [название UX инварианта]
119
+ INVARIANT: U1 из ux_invariants.md
120
+ SCENARIO: пользовательский сценарий для проверки
121
+ WHAT: что наблюдаем
122
+ VIOLATION: что считается нарушением
123
+ METHOD: usability test / metric / manual review
124
+ ```
125
+
126
+ ### assumption_checks.md
127
+ ```markdown
128
+ # Assumption Validation
129
+
130
+ ## AC-A1: [название assumption]
131
+ ASSUMPTION: A1 из assumptions.md
132
+ ORIGINAL_STATEMENT: что предполагали
133
+ VALIDATION_METHOD: как проверили
134
+ RESULT: confirmed / rejected / partially-confirmed
135
+ FINDING: что обнаружили
136
+ ESCALATION: none / ResearchKit revision needed
137
+ ```
138
+
139
+ ### coverage_map.md
140
+ ```markdown
141
+ # Coverage Map
142
+
143
+ ## Technical Invariants Coverage
144
+ | Инвариант | Контракт | Статус | Метод |
145
+ |----------|---------|--------|-------|
146
+ | I1 | TC-I1 | ✅ | unit |
147
+ | I2 | TC-I2 | ❌ | - |
148
+
149
+ ## UX Invariants Coverage
150
+ ...
151
+
152
+ ## Assumptions Validation
153
+ ...
154
+
155
+ ## Uncovered (технический долг)
156
+ ...
157
+ ```
158
+
159
+ ### escalations/
160
+ ```
161
+ ESC-XXX.md ← история каждой эскалации
162
+ ← что нашли, на какой уровень эскалировали, решение
163
+ ```
164
+
165
+ ---
166
+
167
+ ## Переход к Production
168
+
169
+ **ALLOWED** когда:
170
+ - все BLOCKER test contracts покрыты
171
+ - нет open эскалаций blocker уровня
172
+ - coverage_map показывает покрытие критических инвариантов
173
+
174
+ **BLOCKED** когда:
175
+ - есть непокрытые BLOCKER контракты
176
+ - есть open эскалации blocker уровня
177
+
178
+ ---
179
+
180
+ ## Команды
181
+
182
+ ```
183
+ /qa init ← генерация контрактов из инвариантов
184
+ /qa coverage ← анализ текущего покрытия
185
+ /qa check-assumptions ← валидация assumptions против реальности
186
+ /qa escalate "описание" ← ручная эскалация
187
+ /qa status ← можно ли в production
188
+ ```