@x0rium/devkit-cli 0.5.0 → 0.7.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 (66) hide show
  1. package/dist/constitution.d.ts.map +1 -1
  2. package/dist/constitution.js +62 -8
  3. package/dist/constitution.js.map +1 -1
  4. package/dist/dashboard.d.ts.map +1 -1
  5. package/dist/dashboard.js +6 -2
  6. package/dist/dashboard.js.map +1 -1
  7. package/dist/detector.d.ts.map +1 -1
  8. package/dist/detector.js +5 -2
  9. package/dist/detector.js.map +1 -1
  10. package/dist/escalate.d.ts.map +1 -1
  11. package/dist/escalate.js +8 -3
  12. package/dist/escalate.js.map +1 -1
  13. package/dist/gate.d.ts.map +1 -1
  14. package/dist/gate.js +57 -10
  15. package/dist/gate.js.map +1 -1
  16. package/dist/index.js +14 -7
  17. package/dist/index.js.map +1 -1
  18. package/dist/investigate.d.ts.map +1 -1
  19. package/dist/investigate.js +8 -10
  20. package/dist/investigate.js.map +1 -1
  21. package/dist/rfc.d.ts.map +1 -1
  22. package/dist/rfc.js +8 -10
  23. package/dist/rfc.js.map +1 -1
  24. package/dist/scaffold.d.ts +2 -0
  25. package/dist/scaffold.d.ts.map +1 -1
  26. package/dist/scaffold.js +52 -4
  27. package/dist/scaffold.js.map +1 -1
  28. package/dist/schemas.js +2 -2
  29. package/dist/schemas.js.map +1 -1
  30. package/dist/status.d.ts.map +1 -1
  31. package/dist/status.js +7 -4
  32. package/dist/status.js.map +1 -1
  33. package/dist/validator.js +1 -1
  34. package/dist/validator.js.map +1 -1
  35. package/dist/watch.js +10 -10
  36. package/dist/watch.js.map +1 -1
  37. package/package.json +4 -5
  38. package/skills/arch-kit/README.md +195 -0
  39. package/skills/arch-kit/SKILL.md +190 -0
  40. package/skills/arch-kit/references/adr.md +25 -0
  41. package/skills/arch-kit/references/impact.md +13 -0
  42. package/skills/arch-kit/references/invariants.md +9 -0
  43. package/skills/arch-kit/references/investigation.md +37 -0
  44. package/skills/arch-kit/references/rfc.md +36 -0
  45. package/skills/devkit-init/SKILL.md +74 -0
  46. package/skills/devkit-init/references/brownfield.md +147 -0
  47. package/skills/devkit-init/references/greenfield.md +44 -0
  48. package/skills/devkit-init/references/upgrade.md +103 -0
  49. package/skills/product-kit/README.md +135 -0
  50. package/skills/product-kit/SKILL.md +126 -0
  51. package/skills/product-kit/references/roadmap.md +16 -0
  52. package/skills/product-kit/references/users.md +14 -0
  53. package/skills/product-kit/references/ux_invariants.md +8 -0
  54. package/skills/qa-kit/README.md +188 -0
  55. package/skills/qa-kit/SKILL.md +155 -0
  56. package/skills/qa-kit/references/assumption_checks.md +10 -0
  57. package/skills/qa-kit/references/coverage_map.md +19 -0
  58. package/skills/qa-kit/references/test_contracts.md +10 -0
  59. package/skills/research-kit/README.md +139 -0
  60. package/skills/research-kit/SKILL.md +106 -0
  61. package/skills/research-kit/references/assumptions.md +9 -0
  62. package/skills/research-kit/references/feasibility.md +15 -0
  63. package/skills/research-kit/references/market.md +13 -0
  64. package/skills/research-kit/references/unknowns.md +9 -0
  65. package/skills/spec-kit/README.md +139 -0
  66. package/skills/spec-kit/SKILL.md +202 -0
@@ -0,0 +1,139 @@
1
+ # SpecKit
2
+
3
+ > Уровень 4. "Строим."
4
+
5
+ ---
6
+
7
+ ## Отношение к github/spec-kit
8
+
9
+ DevKit использует оригинальный [github/spec-kit](https://github.com/github/spec-kit) без изменений. SpecKit в контексте DevKit — это уровень 4 который получает на вход верифицированные артефакты из ArchKit.
10
+
11
+ Разница с использованием spec-kit напрямую:
12
+
13
+ ```
14
+ Без DevKit:
15
+ разработчик пишет constitution.md вручную
16
+ AI додумывает архитектуру сам
17
+ хитрит потому что нет доказанного основания
18
+
19
+ С DevKit:
20
+ constitution.md генерируется из invariants.md + decisions/
21
+ AI работает в рамках верифицированной архитектуры
22
+ отклонение от инвариантов — блокер, не молчаливое изменение
23
+ ```
24
+
25
+ ---
26
+
27
+ ## Входные артефакты
28
+
29
+ SpecKit получает из ArchKit:
30
+
31
+ ```
32
+ .devkit/arch/constitution.md → .specify/constitution.md
33
+ .devkit/arch/invariants.md → контекст для всех спек
34
+ .devkit/arch/impact.md → используется при эскалации
35
+ .devkit/product/ux_invariants.md → часть constitution
36
+ ```
37
+
38
+ ---
39
+
40
+ ## Стандартный флоу (github/spec-kit)
41
+
42
+ ```
43
+ /constitution ← не писать вручную, брать из ArchKit
44
+ /specify ← описание фичи
45
+ /clarify ← уточнение до планирования
46
+ /plan ← технический план
47
+ /tasks ← разбивка на задачи
48
+ /analyze ← проверка согласованности
49
+ /implement ← реализация
50
+ ```
51
+
52
+ ---
53
+
54
+ ## Детектор событий
55
+
56
+ В процессе работы в SpecKit AI отслеживает триггеры и эскалирует:
57
+
58
+ ### Триггер RFC
59
+ Разработчик упоминает новое требование которое меняет инварианты.
60
+
61
+ ```
62
+ Паттерны:
63
+ "нам ещё нужно..."
64
+ "а что если добавить..."
65
+ "заказчик попросил..."
66
+
67
+ Реакция AI:
68
+ "Это затрагивает инвариант [I_N] из invariants.md.
69
+ Предлагаю RFC перед продолжением. /arch rfc?"
70
+ ```
71
+
72
+ ### Триггер Investigation
73
+ Технический блокер в процессе реализации.
74
+
75
+ ```
76
+ Паттерны:
77
+ "либа не поддерживает..."
78
+ "бенчмарк показал..."
79
+ "нашёл баг в..."
80
+ "это работает не так как ожидали..."
81
+
82
+ Реакция AI:
83
+ "Это нарушает допущение из [ADR-N].
84
+ Нужен Investigation. /arch investigate?"
85
+ ```
86
+
87
+ ### Триггер Product Blocker
88
+ UX проблема обнаруженная при реализации.
89
+
90
+ ```
91
+ Паттерны:
92
+ "это неудобно использовать..."
93
+ "слишком много параметров..."
94
+ "пользователь не поймёт..."
95
+
96
+ Реакция AI:
97
+ "Это нарушение UX инварианта [U_N].
98
+ Нужен ProductKit investigation. /product investigate?"
99
+ ```
100
+
101
+ ---
102
+
103
+ ## Структура спеки
104
+
105
+ Каждая спека в DevKit контексте содержит дополнительный раздел:
106
+
107
+ ```markdown
108
+ # Spec NNN: [название]
109
+
110
+ ## Invariants
111
+ TECHNICAL: [какие инварианты из invariants.md затрагивает]
112
+ UX: [какие UX инварианты из ux_invariants.md затрагивает]
113
+
114
+ ## Standard SpecKit content
115
+ ...
116
+
117
+ ## Deviation Guard
118
+ Если реализация требует отклонения от инварианта — СТОП.
119
+ Не реализовывать. Создать RFC.
120
+ ```
121
+
122
+ ---
123
+
124
+ ## Команды
125
+
126
+ ```
127
+ /speckit init ← инициализация из ArchKit артефактов
128
+ /speckit sync ← обновить constitution из ArchKit после RFC
129
+ /speckit check-invariants ← проверить что спеки не нарушают инварианты
130
+
131
+ # Стандартные команды github/spec-kit
132
+ /constitution
133
+ /specify
134
+ /clarify
135
+ /plan
136
+ /tasks
137
+ /analyze
138
+ /implement
139
+ ```
@@ -0,0 +1,202 @@
1
+ ---
2
+ name: spec-kit
3
+ description: DevKit Level 4. Activated when architecture is verified and constitution is synced. Delegates implementation to github/spec-kit (specify-cli) as the execution engine. DevKit provides event detection (RFC, Investigation, Product Blocker) that interrupts spec-kit workflow when invariants are touched. Triggers on phrases like "let's build", "implement", "start coding", "write the feature".
4
+ license: MIT
5
+ metadata:
6
+ author: devkit
7
+ version: "2.0"
8
+ layer: "4-of-5"
9
+ prev: arch-kit
10
+ next: qa-kit
11
+ ---
12
+
13
+ # SpecKit — Level 4: "Build it."
14
+
15
+ You are operating in SpecKit phase. Architecture is verified. Constitution is synced to `.specify/memory/constitution.md`. Now you build — using **github/spec-kit** as the implementation engine.
16
+
17
+ ## Start
18
+
19
+ ```bash
20
+ devkit status
21
+ ```
22
+
23
+ Confirm you are in the spec phase. If not, check gate status of the previous phase.
24
+
25
+ ## Prerequisites
26
+
27
+ Before any spec work, verify:
28
+
29
+ 1. Constitution exists and is synced:
30
+ ```bash
31
+ ls .specify/memory/constitution.md
32
+ ```
33
+ If missing:
34
+ ```bash
35
+ devkit generate-constitution
36
+ devkit sync
37
+ ```
38
+
39
+ 2. spec-kit is initialized:
40
+ ```bash
41
+ ls .specify/scripts/
42
+ ```
43
+ If missing:
44
+ ```bash
45
+ specify init . --ai claude
46
+ ```
47
+
48
+ ## Your Role
49
+
50
+ - Delegate specification and implementation to spec-kit `/speckit.*` commands
51
+ - Monitor every developer message for escalation triggers
52
+ - STOP and escalate before proceeding when triggers are detected
53
+ - Never silently modify architecture within a spec
54
+
55
+ ## spec-kit Workflow
56
+
57
+ Execute these commands in order. Each is a slash command provided by spec-kit:
58
+
59
+ ### Step 1: Create Feature Specification
60
+ ```
61
+ /speckit.specify <feature description>
62
+ ```
63
+ Creates `.specify/specs/NNN-feature-name/spec.md` + git branch.
64
+ Focuses on WHAT and WHY, not HOW. Max 3 `[NEEDS CLARIFICATION]` markers.
65
+
66
+ ### Step 2: Resolve Ambiguities
67
+ ```
68
+ /speckit.clarify
69
+ ```
70
+ Structured ambiguity scan across 11 categories. Asks up to 5 questions per session.
71
+ Updates spec.md with `## Clarifications` section.
72
+
73
+ ### Step 3: Technical Implementation Plan
74
+ ```
75
+ /speckit.plan <tech stack preferences>
76
+ ```
77
+ Generates: `plan.md`, `research.md`, `data-model.md`, `contracts/`, `quickstart.md`.
78
+ Performs constitution compliance check automatically.
79
+
80
+ ### Step 4: Task Breakdown
81
+ ```
82
+ /speckit.tasks
83
+ ```
84
+ Generates `tasks.md` with dependency ordering.
85
+ Tasks tagged `[P]` for parallelizable, `[USn]` mapped to user stories.
86
+
87
+ ### Step 5: Cross-Artifact Consistency Analysis
88
+ ```
89
+ /speckit.analyze
90
+ ```
91
+ Read-only analysis: duplication, ambiguity, underspecification, constitution alignment, coverage gaps, inconsistency. Outputs severity-rated findings.
92
+
93
+ ### Step 6: Quality Checklists
94
+ ```
95
+ /speckit.checklist <domain>
96
+ ```
97
+ "Unit tests for English" — validates that requirements themselves are complete, clear, consistent, and measurable. Domains: security, ux, api, etc.
98
+
99
+ ### Step 7: Implement
100
+ ```
101
+ /speckit.implement
102
+ ```
103
+ Executes tasks phase-by-phase, marks completed in tasks.md, validates against spec.
104
+
105
+ ### Bonus: Export to GitHub Issues
106
+ ```
107
+ /speckit.taskstoissues
108
+ ```
109
+
110
+ ## Invariant Guard
111
+
112
+ Every spec must declare which invariants it touches:
113
+
114
+ ```markdown
115
+ ## Invariant Coverage
116
+ TECHNICAL: [I1, I3] from .devkit/arch/invariants.md
117
+ UX: [U2] from .devkit/product/ux_invariants.md
118
+ ```
119
+
120
+ If implementation requires deviating from an invariant — STOP. Do not implement. Open RFC:
121
+
122
+ ```bash
123
+ devkit impact "description of deviation"
124
+ devkit rfc "description"
125
+ ```
126
+
127
+ ## Event Detection — CRITICAL
128
+
129
+ Monitor every developer message. Before continuing spec work, check for triggers.
130
+
131
+ ### RFC Trigger — New Requirement
132
+ Patterns: "we also need", "add support for", "client wants", "what about", "can we also"
133
+
134
+ Action:
135
+ > "This sounds like a new requirement. Let me check if it touches our invariants."
136
+
137
+ ```bash
138
+ devkit impact "new requirement description"
139
+ devkit rfc "description"
140
+ ```
141
+
142
+ Do NOT continue spec work until RFC is resolved.
143
+
144
+ ### Investigation Trigger — Technical Blocker
145
+ Patterns: "bug in library", "this doesn't support", "benchmark shows", "unexpected behavior", "performance issue"
146
+
147
+ Action:
148
+ > "This breaks an architectural assumption. Opening Investigation."
149
+
150
+ ```bash
151
+ devkit investigate "description of blocker"
152
+ ```
153
+
154
+ Do NOT work around the blocker silently.
155
+
156
+ ### Product Blocker Trigger — UX Problem
157
+ Patterns: "this is hard to use", "too many parameters", "confusing", "users won't get this"
158
+
159
+ Action:
160
+ > "This looks like a UX invariant issue."
161
+
162
+ Check `.devkit/product/ux_invariants.md`. If violated — escalate to ProductKit.
163
+
164
+ ### No Trigger — Normal Work
165
+ When none of the above apply: proceed with spec-kit workflow.
166
+
167
+ **After creating or updating DevKit artifacts, always run:**
168
+ ```bash
169
+ devkit validate
170
+ ```
171
+
172
+ ## Gate: When Can We Move to QAKit?
173
+
174
+ ```bash
175
+ devkit gate
176
+ ```
177
+
178
+ ALLOWED when:
179
+ - At least one spec-kit feature implemented (`.specify/specs/NNN-*/`)
180
+ - No open RFCs or Investigations
181
+
182
+ BLOCKED when:
183
+ - Open RFC or Investigation exists
184
+ - No features in `.specify/specs/`
185
+
186
+ ## Handoff
187
+
188
+ When `devkit gate` shows ALLOWED:
189
+
190
+ ```bash
191
+ devkit advance
192
+ devkit status
193
+ ```
194
+
195
+ Then generate summary:
196
+ ```
197
+ IMPLEMENTATION COMPLETE
198
+ SPECS: [list of .specify/specs/NNN-*/ directories]
199
+ INVARIANTS COVERED: [list from spec invariant coverage sections]
200
+ OPEN ITEMS: none / [list with owners]
201
+ READY FOR: QAKit
202
+ ```