the-frame-ai 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.
Files changed (77) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +335 -0
  3. package/README.ru.md +333 -0
  4. package/bin/the-frame +5 -0
  5. package/bin/the-frame-ai +5 -0
  6. package/package.json +29 -0
  7. package/src/cli.js +84 -0
  8. package/src/doctor.js +164 -0
  9. package/src/init.js +178 -0
  10. package/src/languages.js +141 -0
  11. package/src/manifest.js +55 -0
  12. package/src/update.js +87 -0
  13. package/src/utils.js +55 -0
  14. package/templates/agents/builder.md +240 -0
  15. package/templates/agents/devils-advocate.md +136 -0
  16. package/templates/agents/planner.md +277 -0
  17. package/templates/agents/researcher.md +195 -0
  18. package/templates/agents/reviewer.md +300 -0
  19. package/templates/commands/frame:add-task.md +57 -0
  20. package/templates/commands/frame:build.md +170 -0
  21. package/templates/commands/frame:check-deps.md +118 -0
  22. package/templates/commands/frame:checkpoint.md +158 -0
  23. package/templates/commands/frame:cleanup-memory.md +80 -0
  24. package/templates/commands/frame:context.md +64 -0
  25. package/templates/commands/frame:daily.md +77 -0
  26. package/templates/commands/frame:debug.md +146 -0
  27. package/templates/commands/frame:doctor.md +170 -0
  28. package/templates/commands/frame:estimate.md +105 -0
  29. package/templates/commands/frame:explain.md +84 -0
  30. package/templates/commands/frame:fast.md +89 -0
  31. package/templates/commands/frame:forensics.md +139 -0
  32. package/templates/commands/frame:headless.md +118 -0
  33. package/templates/commands/frame:health.md +86 -0
  34. package/templates/commands/frame:init.md +231 -0
  35. package/templates/commands/frame:migrate.md +107 -0
  36. package/templates/commands/frame:note.md +32 -0
  37. package/templates/commands/frame:pause.md +145 -0
  38. package/templates/commands/frame:performance.md +228 -0
  39. package/templates/commands/frame:plan.md +198 -0
  40. package/templates/commands/frame:refactor.md +161 -0
  41. package/templates/commands/frame:research.md +131 -0
  42. package/templates/commands/frame:resume.md +137 -0
  43. package/templates/commands/frame:retrospective.md +196 -0
  44. package/templates/commands/frame:review.md +174 -0
  45. package/templates/commands/frame:rollback.md +207 -0
  46. package/templates/commands/frame:ship.md +148 -0
  47. package/templates/commands/frame:sprint-check.md +111 -0
  48. package/templates/commands/frame:status.md +103 -0
  49. package/templates/commands/frame:unstuck.md +102 -0
  50. package/templates/commands/frame:wave.md +312 -0
  51. package/templates/commands/frame:where.md +5 -0
  52. package/templates/commands/frame:why.md +57 -0
  53. package/templates/commands/frame:worktree.md +219 -0
  54. package/templates/hooks/git-safety.sh +33 -0
  55. package/templates/hooks/quality-gate.sh +52 -0
  56. package/templates/hooks/safety-net.sh +13 -0
  57. package/templates/hooks/session-init.sh +81 -0
  58. package/templates/planning/pause-state.json +1 -0
  59. package/templates/project/CLAUDE.md +63 -0
  60. package/templates/project/CONTEXT.md +16 -0
  61. package/templates/project/MAP.md +35 -0
  62. package/templates/project/ROADMAP.md +12 -0
  63. package/templates/project/STATE.md +13 -0
  64. package/templates/project/config.json +74 -0
  65. package/templates/project/memory/anti-patterns.md +14 -0
  66. package/templates/project/memory/context.md +23 -0
  67. package/templates/project/memory/conventions.md +19 -0
  68. package/templates/project/memory/decisions.md +20 -0
  69. package/templates/project/memory/dependencies.md +23 -0
  70. package/templates/project/memory/metrics.md +22 -0
  71. package/templates/project/memory/patterns.md +30 -0
  72. package/templates/project/memory/wins.md +11 -0
  73. package/templates/project/settings.local.json +50 -0
  74. package/templates/project/specs/_template/PRD.md +24 -0
  75. package/templates/project/specs/_template/plan.md +25 -0
  76. package/templates/project/specs/_template/spec.md +27 -0
  77. package/templates/project/specs/_template/subagent-prompt.md +43 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,335 @@
1
+ # THE Frame
2
+
3
+ FRAME — Framework for AI-Assisted Solo Development
4
+
5
+ [🇺🇸 English](README.md) | [🇪🇸 Español](README.es.md) | [🇷🇺 Русский](README.ru.md) | [🇨🇳 中文](README.zh.md) | [🇧🇷 Português](README.pt.md)
6
+
7
+ ## What is FRAME?
8
+
9
+ **FRAME (Framework for AI-Assisted Solo Development)** is a framework for solo developers building products with Claude Code. It turns chaotic AI-assisted development into a predictable process — from idea to deploy — with memory, structure, and protection against mistakes.
10
+
11
+ If you're building a product alone with Claude Code and want to work like a team — FRAME is for you.
12
+
13
+ ## What problems does FRAME solve?
14
+
15
+ | Problem | What FRAME provides |
16
+ |---------|-------------------|
17
+ | Losing context between sessions | Project memory and automatic state dump on session start |
18
+ | Chaos in tasks and priorities | 6-phase workflow: Research → Plan → Build → Review → Ship → Reflect |
19
+ | Fear of breaking something important | Safety hooks block destructive commands before they run |
20
+ | Repetitive routine tasks | 34 ready-made commands for the full development cycle |
21
+ | Complex features with dependencies | Parallel subagents for independent tasks |
22
+ | No structure for solo work | Roadmap, STATE.md, MAP.md — always know where you are and what's next |
23
+
24
+ ## How to work with FRAME
25
+
26
+ ```
27
+ Research → Plan → Build → Review → Ship → Reflect
28
+ ```
29
+
30
+ Each session is one cycle. Start with `/frame:daily`, end with `/frame:ship`.
31
+
32
+ **Research** — understand before you build
33
+ Run `/frame:research <topic>` — Claude explores the codebase, external sources, and builds context for the next step.
34
+
35
+ **Plan** — break it into tasks
36
+ `/frame:plan <feature>` turns research into a concrete task list with estimates.
37
+
38
+ **Build** — implement
39
+ `/frame:build` executes tasks sequentially (1–3 at a time) with TDD. For many independent tasks — `/frame:wave` runs them in parallel batches. Stuck — `/frame:unstuck`. Found a bug — `/frame:debug`.
40
+
41
+ **Review** — check before deploying
42
+ `/frame:review` runs automated checks and gives a checklist: tests, types, security, performance.
43
+
44
+ **Ship** — deploy and record
45
+ `/frame:ship` commits, optional push/PR, and updates project memory.
46
+
47
+ **Reflect** — learn and improve
48
+ `/frame:retrospective` after deploy updates metrics and captures patterns for future sessions.
49
+
50
+ ## Examples
51
+
52
+ ### New feature: add Google authentication
53
+
54
+ ```
55
+ /frame:daily
56
+ # → see current project status and what's planned
57
+
58
+ /frame:research "Google OAuth"
59
+ # → Claude studies the codebase: how current auth works,
60
+ # what patterns are already used, what needs to be added
61
+
62
+ /frame:plan "Google OAuth"
63
+ # → get a concrete task list:
64
+ # 1. configure Google OAuth credentials
65
+ # 2. add callback route
66
+ # 3. connect to sessions
67
+ # 4. add button to UI
68
+
69
+ /frame:checkpoint
70
+ # → save a restore point — if something goes wrong, you can roll back
71
+
72
+ /frame:wave
73
+ # → tasks 1–4 are independent, Claude runs them in parallel
74
+
75
+ /frame:review
76
+ # → automated checks: tests, types, security
77
+
78
+ /frame:ship
79
+ # → commit, optional push/PR, project memory updated
80
+ ```
81
+
82
+ ### Bug: users can't log in after password reset
83
+
84
+ ```
85
+ /frame:daily
86
+ # → restore context, see the bug is already in the plan or add it
87
+
88
+ /frame:debug "login after reset"
89
+ # → Claude systematically checks: logs, reset flow, sessions, tokens
90
+ # → you get a hypothesis with a specific location in the code
91
+
92
+ # If the cause is found immediately:
93
+ /frame:checkpoint # restore point before the fix
94
+ /frame:fast "fix: invalidate old session after password reset"
95
+ # → Claude makes a targeted fix, writes a regression test
96
+
97
+ # If the cause is unclear — go deeper:
98
+ /frame:forensics
99
+ # → analyzes git history of changes in this area,
100
+ # finds the commit that broke the behavior
101
+
102
+ /frame:checkpoint
103
+ /frame:fast "fix: ..." # fix the found cause
104
+
105
+ /frame:review
106
+ # → confirm the fix didn't break other login scenarios
107
+
108
+ /frame:ship
109
+ ```
110
+
111
+ ### Improvement: speed up dashboard loading
112
+
113
+ ```
114
+ /frame:daily
115
+
116
+ /frame:performance
117
+ # → get baseline: bundle size, load time, Lighthouse score
118
+ # remember the numbers — you'll need them for comparison at the end
119
+
120
+ /frame:research "dashboard performance"
121
+ # → Claude analyzes dashboard code: heavy components,
122
+ # redundant requests, what can be cached or lazy-loaded
123
+
124
+ /frame:plan "dashboard optimization"
125
+ # → task list with impact estimates:
126
+ # 1. lazy load heavy charts
127
+ # 2. cache API requests
128
+ # 3. remove duplicate requests on mount
129
+
130
+ /frame:build
131
+ # → sequential, each task with a test
132
+
133
+ /frame:performance
134
+ # → compare with baseline: see the real improvement
135
+
136
+ /frame:ship
137
+ ```
138
+
139
+ ## What's inside
140
+
141
+ FRAME provides:
142
+
143
+ - **6-phase workflow**: Research → Plan → Build → Review → Ship → Reflect
144
+ - **34 commands**: from quick tasks to full feature development cycle
145
+ - **5 AI agents**: Researcher, Planner, Builder, Reviewer, Devil's Advocate
146
+ - **Safety Hooks**: block destructive operations, enforce quality gates
147
+ - **Git Safety**: checkpoints, rollback, worktrees, pause/resume
148
+
149
+ ## Prerequisites
150
+
151
+ - Node.js >= 18
152
+ - Git (project must be a git repository)
153
+
154
+ ## Quick Start
155
+
156
+ ```bash
157
+ # Initialize git repo if needed
158
+ git init && git commit --allow-empty -m "init"
159
+
160
+ # Install FRAME
161
+ npx the-frame-ai init
162
+
163
+ # Open Claude Code in this project and run:
164
+ /frame:init # scans codebase, fills MAP.md
165
+ /frame:daily # your entry point every day
166
+ ```
167
+
168
+ ## Commands
169
+
170
+ ### Core — start here
171
+
172
+ These 7 commands cover 90% of solo dev work:
173
+
174
+ | Command | When to use |
175
+ |---------|-------------|
176
+ | `/frame:daily` | **Start here** after any break — what was done, what's next |
177
+ | `/frame:research <topic>` | Before planning a new feature |
178
+ | `/frame:plan <feature>` | Turn research into an actionable task list |
179
+ | `/frame:build` | Implement 1–3 tasks with TDD (sequential) |
180
+ | `/frame:wave` | Implement 4+ independent tasks (parallel subagents) |
181
+ | `/frame:review` | Before deploying — automated checks + checklist |
182
+ | `/frame:ship` | Commit, optional push/PR, update memory |
183
+
184
+ ### All Commands by Phase
185
+
186
+ <details>
187
+ <summary>Research</summary>
188
+
189
+ | Command | When to use |
190
+ |---------|-------------|
191
+ | `/frame:research <topic>` | Before planning a new feature |
192
+ | `/frame:explain <file>` | Why does this code look like this? |
193
+ | `/frame:why <topic>` | Search decision history |
194
+ </details>
195
+
196
+ <details>
197
+ <summary>Plan</summary>
198
+
199
+ | Command | When to use |
200
+ |---------|-------------|
201
+ | `/frame:plan <feature>` | Turn research into an actionable task list |
202
+ | `/frame:add-task` | Add a task to the plan without interrupting work |
203
+ </details>
204
+
205
+ <details>
206
+ <summary>Build</summary>
207
+
208
+ | Command | When to use |
209
+ |---------|-------------|
210
+ | `/frame:build` | Implement plan with TDD (1–3 tasks, sequential) |
211
+ | `/frame:wave` | Implement 4+ independent tasks in parallel batches |
212
+ | `/frame:fast <task>` | Quick task under 30 minutes |
213
+ | `/frame:debug <issue>` | Systematic bug investigation |
214
+ | `/frame:forensics` | Deep dive into why something broke |
215
+ | `/frame:refactor` | Refactor with TDD safety net |
216
+ | `/frame:migrate` | DB/API/deps migration with rollback plan |
217
+ </details>
218
+
219
+ <details>
220
+ <summary>Review</summary>
221
+
222
+ | Command | When to use |
223
+ |---------|-------------|
224
+ | `/frame:review` | Before deploying — automated checks + checklist |
225
+ | `/frame:health` | Full project health check |
226
+ | `/frame:check-deps` | Security audit + outdated packages |
227
+ | `/frame:performance` | Bundle size and Lighthouse audit |
228
+ </details>
229
+
230
+ <details>
231
+ <summary>Ship</summary>
232
+
233
+ | Command | When to use |
234
+ |---------|-------------|
235
+ | `/frame:ship` | Commit, optional push/PR, update memory |
236
+ | `/frame:checkpoint` | Save a git tag before a risky change |
237
+ | `/frame:rollback` | Roll back to a checkpoint |
238
+ </details>
239
+
240
+ <details>
241
+ <summary>Reflect</summary>
242
+
243
+ | Command | When to use |
244
+ |---------|-------------|
245
+ | `/frame:retrospective` | After deploy — update memory and metrics |
246
+ | `/frame:sprint-check` | Weekly progress vs roadmap |
247
+ | `/frame:cleanup-memory` | Trim and archive stale memory |
248
+ </details>
249
+
250
+ <details>
251
+ <summary>Daily & Utilities</summary>
252
+
253
+ | Command | When to use |
254
+ |---------|-------------|
255
+ | `/frame:daily` | Start of day — what was done, what's next |
256
+ | `/frame:status` | Full state dump (git, memory, blockers) |
257
+ | `/frame:note` | Capture a pattern, decision, or anti-pattern |
258
+ | `/frame:unstuck` | Stuck? Get 3 concrete options to unblock |
259
+ | `/frame:context` | Show current working context |
260
+ | `/frame:init` | First run — scan codebase, fill MAP.md |
261
+ | `/frame:doctor` | Verify FRAME installation |
262
+ | `/frame:pause` / `/frame:resume` | Save and restore mid-task state |
263
+ </details>
264
+
265
+ <details>
266
+ <summary>Advanced</summary>
267
+
268
+ | Command | When to use |
269
+ |---------|-------------|
270
+ | `/frame:worktree` | Isolated git worktree for parallel experiments |
271
+ | `/frame:headless` | Autonomous CI mode (no interaction) |
272
+ | `/frame:estimate <task>` | Scope and time estimate before starting |
273
+ </details>
274
+
275
+ ## Hooks
276
+
277
+ FRAME installs 4 hooks into `.claude/hooks/`. They run automatically.
278
+
279
+ | Hook | Trigger | What it does | To disable |
280
+ |------|---------|--------------|------------|
281
+ | `safety-net.sh` | Before Bash | Blocks `rm -rf` and `DROP TABLE/DATABASE` | Remove from `.claude/settings.local.json` |
282
+ | `git-safety.sh` | Before Bash | Blocks force push, `reset --hard`, warns on `git add -A` | Remove from `.claude/settings.local.json` |
283
+ | `quality-gate.sh` | After file write | Runs typecheck + lint on changed file | Remove from `.claude/settings.local.json` |
284
+ | `session-init.sh` | Session start | Shows current phase/task; full context dump if away > 24h | Remove from `.claude/settings.local.json` |
285
+
286
+ ## Configuration
287
+
288
+ FRAME is configured via `.frame/config.json`. Key settings:
289
+
290
+ ```json
291
+ {
292
+ "quality": {
293
+ "commands": {
294
+ "typecheck": "npx tsc --noEmit",
295
+ "test": "npx vitest run",
296
+ "lint": "npx eslint .",
297
+ "build": "npm run build"
298
+ }
299
+ }
300
+ }
301
+ ```
302
+
303
+ ## CLI
304
+
305
+ ```bash
306
+ npx the-frame-ai init [target-dir] # Install FRAME
307
+ npx the-frame-ai update [target-dir] # Update commands, agents, hooks
308
+ npx the-frame-ai doctor [target-dir] # Check installation health
309
+ npx the-frame-ai version # Show CLI version
310
+ ```
311
+
312
+ `update` only updates commands, agents, and hooks. Project files (STATE.md, MAP.md, memory/, etc.) are never overwritten.
313
+
314
+ ## Project Structure (after installation)
315
+
316
+ ```
317
+ .claude/
318
+ commands/ # 34 FRAME commands
319
+ agents/ # 5 AI agents
320
+ hooks/ # 4 safety hooks
321
+ .frame/
322
+ config.json # FRAME configuration
323
+ .planning/
324
+ STATE.md # Current position
325
+ MAP.md # Project map
326
+ ROADMAP.md # Roadmap
327
+ memory/ # Project memory
328
+ specs/ # Feature specs
329
+ reviews/ # Review results
330
+ reports/ # Reports (daily, deps, quality, sprint)
331
+ ```
332
+
333
+ ## License
334
+
335
+ MIT
package/README.ru.md ADDED
@@ -0,0 +1,333 @@
1
+ # THE Frame
2
+
3
+ [🇺🇸 English](README.md) | [🇪🇸 Español](README.es.md) | [🇷🇺 Русский](README.ru.md) | [🇨🇳 中文](README.zh.md) | [🇧🇷 Português](README.pt.md)
4
+
5
+ ## Что такое THE FRAME?
6
+
7
+ **FRAME (Framework for AI-Assisted Solo Development)** — это фреймворк для соло-разработчиков, которые строят продукты с помощью Claude Code. Он превращает хаотичную AI-разработку в предсказуемый процесс: от идеи до деплоя — с памятью, структурой и защитой от ошибок.
8
+
9
+ Если ты один пишешь продукт с Claude Code и хочешь работать как команда — FRAME для тебя.
10
+
11
+ ## Какие задачи решает FRAME?
12
+
13
+ | Задача | Что даёт FRAME |
14
+ |--------|---------------|
15
+ | Потеря контекста между сессиями | Память проекта и автоматический дамп состояния при старте |
16
+ | Хаос в задачах и приоритетах | 6-фазный воркфлоу: Research → Plan → Build → Review → Ship → Reflect |
17
+ | Страх сломать что-то важное | Safety-хуки блокируют деструктивные команды до их выполнения |
18
+ | Долгие однотипные задачи | 34 готовые команды для всего цикла разработки |
19
+ | Сложные фичи с зависимостями | Параллельные субагенты для независимых задач |
20
+ | Нет структуры для соло-работы | Роадмап, STATE.md, MAP.md — всегда знаешь где ты и что дальше |
21
+
22
+ ## Как работать с FRAME
23
+
24
+ ```
25
+ Research → Plan → Build → Review → Ship → Reflect
26
+ ```
27
+
28
+ Каждая сессия — это один цикл. Начинаешь с `/frame:daily`, заканчиваешь с `/frame:ship`.
29
+
30
+ **Research** — изучи перед тем как делать
31
+ Запусти `/frame:research <тема>` — Claude исследует кодовую базу, внешние источники и формирует контекст для следующего шага.
32
+
33
+ **Plan** — разбей на задачи
34
+ `/frame:plan <фича>` превращает исследование в конкретный список задач с оценкой.
35
+
36
+ **Build** — реализуй
37
+ `/frame:build` выполняет задачи последовательно (1–3 за раз) с TDD. Если задач много и они независимы — `/frame:wave` запускает их параллельно пачками. Застрял — `/frame:unstuck`. Нашёл баг — `/frame:debug`.
38
+
39
+ **Review** — проверь перед деплоем
40
+ `/frame:review` запускает автоматические проверки и даёт чеклист: тесты, типы, безопасность, производительность.
41
+
42
+ **Ship** — задеплой и зафиксируй
43
+ `/frame:ship` делает коммит, опциональный push/PR и обновляет память проекта.
44
+
45
+ **Reflect** — учись и улучшай
46
+ `/frame:retrospective` после деплоя обновляет метрики и фиксирует паттерны для следующих сессий.
47
+
48
+ ## Примеры
49
+
50
+ ### Новая фича: добавить авторизацию через Google
51
+
52
+ ```
53
+ /frame:daily
54
+ # → видишь текущий статус проекта и что запланировано
55
+
56
+ /frame:research "Google OAuth"
57
+ # → Claude изучает кодовую базу: как устроена текущая авторизация,
58
+ # какие паттерны уже используются, что нужно добавить
59
+
60
+ /frame:plan "Google OAuth"
61
+ # → получаешь конкретный список задач:
62
+ # 1. настроить Google OAuth credentials
63
+ # 2. добавить callback-роут
64
+ # 3. связать с сессиями
65
+ # 4. добавить кнопку в UI
66
+
67
+ /frame:checkpoint
68
+ # → сохраняешь точку возврата — если что-то пойдёт не так, можно откатиться
69
+
70
+ /frame:wave
71
+ # → задачи 1–4 независимы, Claude выполняет их параллельно
72
+
73
+ /frame:review
74
+ # → автоматические проверки: тесты, типы, безопасность
75
+
76
+ /frame:ship
77
+ # → коммит, опциональный push/PR, память проекта обновлена
78
+ ```
79
+
80
+ ### Баг: пользователи не могут войти после сброса пароля
81
+
82
+ ```
83
+ /frame:daily
84
+ # → восстанавливаешь контекст, видишь что баг уже в плане или добавляешь его
85
+
86
+ /frame:debug "login after reset"
87
+ # → Claude систематически проверяет: логи, flow сброса пароля, сессии, токены
88
+ # → в конце получаешь гипотезу с конкретным местом в коде
89
+
90
+ # Если причина найдена сразу:
91
+ /frame:checkpoint # точка возврата перед правкой
92
+ /frame:fast "fix: invalidate old session after password reset"
93
+ # → Claude вносит точечное исправление, пишет тест на регрессию
94
+
95
+ # Если причина неочевидна — идёшь глубже:
96
+ /frame:forensics
97
+ # → анализирует git-историю изменений в этой области,
98
+ # находит коммит который сломал поведение
99
+
100
+ /frame:checkpoint
101
+ /frame:fast "fix: ..." # правишь найденную причину
102
+
103
+ /frame:review
104
+ # → убеждаешься что фикс не сломал другие сценарии входа
105
+
106
+ /frame:ship
107
+ ```
108
+
109
+ ### Улучшение: ускорить загрузку дашборда
110
+
111
+ ```
112
+ /frame:daily
113
+
114
+ /frame:performance
115
+ # → получаешь baseline: размер бандла, время загрузки, Lighthouse-score
116
+ # запомни цифры — они нужны для сравнения в конце
117
+
118
+ /frame:research "dashboard performance"
119
+ # → Claude анализирует код дашборда: тяжёлые компоненты,
120
+ # лишние запросы, что можно закэшировать или загрузить лениво
121
+
122
+ /frame:plan "оптимизация дашборда"
123
+ # → список задач с оценкой эффекта:
124
+ # 1. lazy load тяжёлых графиков
125
+ # 2. кэшировать API-запросы
126
+ # 3. убрать дублирующиеся запросы при монтировании
127
+
128
+ /frame:build
129
+ # → последовательно, каждая задача с тестом
130
+
131
+ /frame:performance
132
+ # → сравниваешь с baseline: видишь реальный прирост
133
+
134
+ /frame:ship
135
+ ```
136
+
137
+ ## Что внутри
138
+
139
+ FRAME даёт:
140
+
141
+ - **6-фазный воркфлоу**: Research → Plan → Build → Review → Ship → Reflect
142
+ - **34 команды**: от быстрых задач до полного цикла разработки фичи
143
+ - **5 AI-агентов**: Researcher, Planner, Builder, Reviewer, Devil's Advocate
144
+ - **Safety Hooks**: блокируют деструктивные операции, запускают quality gates
145
+ - **Git Safety**: чекпоинты, откат, worktrees, пауза/возобновление
146
+
147
+ ## Требования
148
+
149
+ - Node.js >= 18
150
+ - Git (проект должен быть git-репозиторием)
151
+
152
+ ## Быстрый старт
153
+
154
+ ```bash
155
+ # Инициализировать git-репо если нужно
156
+ git init && git commit --allow-empty -m "init"
157
+
158
+ # Установить FRAME
159
+ npx the-frame init
160
+
161
+ # Открой Claude Code в этом проекте и введи:
162
+ /frame:init # сканирует кодовую базу, заполняет MAP.md
163
+ /frame:daily # твоя точка входа каждый день
164
+ ```
165
+
166
+ ## Команды
167
+
168
+ ### Ядро — начни здесь
169
+
170
+ Эти 7 команд покрывают 90% работы соло-разработчика:
171
+
172
+ | Команда | Когда использовать |
173
+ |---------|-------------------|
174
+ | `/frame:daily` | **Начни здесь** после любого перерыва — что сделано, что дальше |
175
+ | `/frame:research <тема>` | Перед планированием новой фичи |
176
+ | `/frame:plan <фича>` | Превратить исследование в список задач |
177
+ | `/frame:build` | Реализовать 1–3 задачи с TDD (последовательно) |
178
+ | `/frame:wave` | Реализовать 4+ независимых задачи (параллельные субагенты) |
179
+ | `/frame:review` | Перед деплоем — автоматические проверки + чеклист |
180
+ | `/frame:ship` | Коммит, опциональный push/PR, обновление памяти |
181
+
182
+ ### Все команды по фазам
183
+
184
+ <details>
185
+ <summary>Research</summary>
186
+
187
+ | Команда | Когда использовать |
188
+ |---------|-------------------|
189
+ | `/frame:research <тема>` | Перед планированием новой фичи |
190
+ | `/frame:explain <файл>` | Почему этот код выглядит именно так? |
191
+ | `/frame:why <тема>` | Поиск по истории решений |
192
+ </details>
193
+
194
+ <details>
195
+ <summary>Plan</summary>
196
+
197
+ | Команда | Когда использовать |
198
+ |---------|-------------------|
199
+ | `/frame:plan <фича>` | Превратить исследование в список задач |
200
+ | `/frame:add-task` | Добавить задачу в план без прерывания работы |
201
+ | `/frame:wave` | Параллельное выполнение независимых задач |
202
+ </details>
203
+
204
+ <details>
205
+ <summary>Build</summary>
206
+
207
+ | Команда | Когда использовать |
208
+ |---------|-------------------|
209
+ | `/frame:build` | Реализовать план с TDD (1–3 задачи) |
210
+ | `/frame:fast <задача>` | Быстрая задача до 30 минут |
211
+ | `/frame:debug <проблема>` | Систематическое расследование бага |
212
+ | `/frame:forensics` | Глубокий анализ причины поломки |
213
+ | `/frame:refactor` | Рефакторинг с TDD-страховкой |
214
+ | `/frame:migrate` | Миграция БД/API/зависимостей с планом отката |
215
+ </details>
216
+
217
+ <details>
218
+ <summary>Review</summary>
219
+
220
+ | Команда | Когда использовать |
221
+ |---------|-------------------|
222
+ | `/frame:review` | Перед деплоем — автоматические проверки + чеклист |
223
+ | `/frame:health` | Полная проверка здоровья проекта |
224
+ | `/frame:check-deps` | Аудит безопасности + устаревшие пакеты |
225
+ | `/frame:performance` | Размер бандла и Lighthouse-аудит |
226
+ </details>
227
+
228
+ <details>
229
+ <summary>Ship</summary>
230
+
231
+ | Команда | Когда использовать |
232
+ |---------|-------------------|
233
+ | `/frame:ship` | Коммит, опциональный push/PR, обновление памяти |
234
+ | `/frame:checkpoint` | Сохранить git-тег перед рискованным изменением |
235
+ | `/frame:rollback` | Откатиться к чекпоинту |
236
+ </details>
237
+
238
+ <details>
239
+ <summary>Reflect</summary>
240
+
241
+ | Команда | Когда использовать |
242
+ |---------|-------------------|
243
+ | `/frame:retrospective` | После деплоя — обновить память и метрики |
244
+ | `/frame:sprint-check` | Еженедельный прогресс vs роадмап |
245
+ | `/frame:cleanup-memory` | Очистить и архивировать устаревшую память |
246
+ </details>
247
+
248
+ <details>
249
+ <summary>Ежедневные и утилиты</summary>
250
+
251
+ | Команда | Когда использовать |
252
+ |---------|-------------------|
253
+ | `/frame:daily` | Начало дня — что сделано, что дальше |
254
+ | `/frame:status` | Полный дамп состояния (git, память, блокеры) |
255
+ | `/frame:note` | Зафиксировать паттерн, решение или антипаттерн |
256
+ | `/frame:unstuck` | Застрял? Получи 3 конкретных варианта разблокировки |
257
+ | `/frame:context` | Показать текущий рабочий контекст |
258
+ | `/frame:init` | Первый запуск — сканировать кодовую базу, заполнить MAP.md |
259
+ | `/frame:doctor` | Проверить установку FRAME |
260
+ | `/frame:pause` / `/frame:resume` | Сохранить и восстановить состояние на середине задачи |
261
+ </details>
262
+
263
+ <details>
264
+ <summary>Продвинутые</summary>
265
+
266
+ | Команда | Когда использовать |
267
+ |---------|-------------------|
268
+ | `/frame:worktree` | Изолированный git worktree для параллельных экспериментов |
269
+ | `/frame:headless` | Автономный CI-режим (без взаимодействия) |
270
+ | `/frame:estimate <задача>` | Оценка объёма и времени перед стартом |
271
+ </details>
272
+
273
+ ## Хуки
274
+
275
+ FRAME устанавливает 4 хука в `.claude/hooks/`. Запускаются автоматически.
276
+
277
+ | Хук | Триггер | Что делает | Как отключить |
278
+ |-----|---------|------------|---------------|
279
+ | `safety-net.sh` | Before Bash | Блокирует `rm -rf` и `DROP TABLE/DATABASE` | Удалить из `.claude/settings.local.json` |
280
+ | `git-safety.sh` | Before Bash | Блокирует force push, `reset --hard`, предупреждает о `git add -A` | Удалить из `.claude/settings.local.json` |
281
+ | `quality-gate.sh` | After file write | Запускает typecheck + lint на изменённом файле | Удалить из `.claude/settings.local.json` |
282
+ | `session-init.sh` | Session start | Показывает текущую фазу/задачу; полный дамп контекста если перерыв > 24ч | Удалить из `.claude/settings.local.json` |
283
+
284
+ ## Конфигурация
285
+
286
+ FRAME настраивается через `.frame/config.json`. Ключевые настройки:
287
+
288
+ ```json
289
+ {
290
+ "quality": {
291
+ "commands": {
292
+ "typecheck": "npx tsc --noEmit",
293
+ "test": "npx vitest run",
294
+ "lint": "npx eslint .",
295
+ "build": "npm run build"
296
+ }
297
+ }
298
+ }
299
+ ```
300
+
301
+ ## CLI
302
+
303
+ ```bash
304
+ npx the-frame init [целевая-папка] # Установить FRAME
305
+ npx the-frame update [целевая-папка] # Обновить команды, агентов, хуки
306
+ npx the-frame doctor [целевая-папка] # Проверить здоровье установки
307
+ npx the-frame version # Показать версию CLI
308
+ ```
309
+
310
+ `update` обновляет только команды, агентов и хуки. Файлы проекта (STATE.md, MAP.md, memory/ и т.д.) никогда не перезаписываются.
311
+
312
+ ## Структура проекта (после установки)
313
+
314
+ ```
315
+ .claude/
316
+ commands/ # 34 команды FRAME
317
+ agents/ # 5 AI-агентов
318
+ hooks/ # 4 safety-хука
319
+ .frame/
320
+ config.json # Конфигурация FRAME
321
+ .planning/
322
+ STATE.md # Текущая позиция
323
+ MAP.md # Карта проекта
324
+ ROADMAP.md # Роадмап
325
+ memory/ # Память проекта
326
+ specs/ # Спецификации фич
327
+ reviews/ # Результаты ревью
328
+ reports/ # Отчёты (daily, deps, quality, sprint)
329
+ ```
330
+
331
+ ## Лицензия
332
+
333
+ MIT