create-vibe-maestro 0.3.0-beta.3 → 0.3.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 (78) hide show
  1. package/CHANGELOG.md +65 -1
  2. package/README.md +72 -72
  3. package/dist/cli/create-run.js +17 -0
  4. package/dist/cli/create.js +3 -3
  5. package/dist/cli/desktop.js +10 -1
  6. package/dist/cli/doctor-run.js +4 -0
  7. package/dist/cli/maestro.js +1 -1
  8. package/dist/cli/preflight-run.js +6 -2
  9. package/dist/cli/skills-run.js +0 -1
  10. package/dist/cli/upgrade-run.js +10 -3
  11. package/dist/core/doctor/entries.js +41 -0
  12. package/dist/core/doctor/git.js +10 -5
  13. package/dist/core/doctor/index.js +78 -9
  14. package/dist/core/doctor/managed.js +6 -2
  15. package/dist/core/doctor/plans.js +23 -6
  16. package/dist/core/doctor/text.js +40 -3
  17. package/dist/core/doctor/wiki.js +18 -7
  18. package/dist/core/fs-errors.js +32 -0
  19. package/dist/core/init.js +99 -11
  20. package/dist/core/inventory.js +10 -3
  21. package/dist/core/manifest.js +2 -0
  22. package/dist/core/meta.js +5 -2
  23. package/dist/core/plan.js +42 -1
  24. package/dist/core/platform-paths.js +16 -1
  25. package/dist/core/preflight.js +59 -14
  26. package/dist/core/skills.js +2 -13
  27. package/dist/core/template-recover.js +82 -0
  28. package/dist/core/template.js +2 -1
  29. package/dist/core/upgrade/analyze.js +196 -89
  30. package/dist/core/upgrade/baseline.js +6 -0
  31. package/dist/core/upgrade/index.js +20 -5
  32. package/dist/core/upgrade/instance.js +12 -2
  33. package/dist/core/upgrade/releases.js +295 -0
  34. package/dist/core/version.js +60 -0
  35. package/docs/MIGRATION_V1.md +2 -1
  36. package/docs/ROADMAP.md +59 -0
  37. package/docs/USER_GUIDE.md +97 -123
  38. package/package.json +3 -2
  39. package/registry/baseline/0.3-beta/project/.claude/commands/build.md +3 -0
  40. package/registry/baseline/0.3-beta/project/AGENTS.md +10 -0
  41. package/registry/baseline/0.3-beta/project/CLAUDE.md +10 -0
  42. package/registry/baseline/0.3-beta/project/protocols/build.md +15 -0
  43. package/registry/baseline/0.3-beta/project/protocols/plan.md +132 -0
  44. package/registry/baseline/0.3.0-beta.4/project/.claude/agents/code-reviewer.md +6 -0
  45. package/registry/baseline/0.3.0-beta.4/project/AGENTS.md +10 -0
  46. package/registry/baseline/0.3.0-beta.4/project/CLAUDE.md +10 -0
  47. package/registry/baseline/0.3.0-beta.4/project/maestro/runbooks/cowork-audit.md +11 -0
  48. package/registry/baseline/0.3.0-beta.4/project/protocols/build.md +15 -0
  49. package/registry/baseline/0.3.0-beta.4/project/protocols/context-budget.md +9 -0
  50. package/registry/baseline/0.3.0-beta.4/project/protocols/handoff.md +5 -0
  51. package/registry/baseline/0.3.0-beta.4/project/protocols/plan.md +132 -0
  52. package/registry/baseline/0.3.0-beta.4/project/protocols/wiki.md +9 -0
  53. package/registry/baseline/0.3.0-beta.4/project/wiki/index.md +32 -0
  54. package/registry/baseline/0.3.0-beta.4/project/wiki/plans/README.md +92 -0
  55. package/registry/baseline/0.3.0-beta.4/project/wiki/plans/TEMPLATE.md +65 -0
  56. package/templates/project/.claude/agents/code-reviewer.md +8 -2
  57. package/templates/project/.claude/agents/explorer.md +14 -0
  58. package/templates/project/.claude/commands/build.md +1 -1
  59. package/templates/project/.claude/rules/maestro.md +25 -0
  60. package/templates/project/.claude/rules/project.md +5 -0
  61. package/templates/project/.claude/settings.json +24 -0
  62. package/templates/project/AGENTS.md +6 -7
  63. package/templates/project/CLAUDE.md +2 -7
  64. package/templates/project/maestro/runbooks/cowork-audit.md +1 -1
  65. package/templates/project/maestro/templates/adr.md +21 -0
  66. package/templates/project/maestro/templates/handoff.md +25 -0
  67. package/templates/project/maestro/templates/progress.md +22 -0
  68. package/templates/project/protocols/build.md +3 -1
  69. package/templates/project/protocols/context-budget.md +1 -1
  70. package/templates/project/protocols/handoff.md +8 -0
  71. package/templates/project/protocols/plan.md +16 -6
  72. package/templates/project/protocols/wiki.md +1 -1
  73. package/templates/project/wiki/hot.md +1 -1
  74. package/templates/project/wiki/index.md +10 -18
  75. package/templates/project/wiki/plans/0001-starter.md +5 -4
  76. package/templates/project/wiki/plans/README.md +45 -6
  77. package/templates/project/wiki/plans/TEMPLATE.md +11 -1
  78. package/registry/trusted-skills.v1.json +0 -4
package/CHANGELOG.md CHANGED
@@ -4,6 +4,70 @@ All notable changes to Vibe Coding Maestro are documented here.
4
4
 
5
5
  The project follows Semantic Versioning while prerelease interfaces may still change between beta versions.
6
6
 
7
+ ## 0.3.0 — 2026-11-01
8
+
9
+ The finished 0.3 product. All changes to the set of project files land in this one release, and `vibe-maestro upgrade` migrates projects from 0.3.0-beta.1 – beta.4 and 0.2.0-beta.1.
10
+
11
+ ### Added
12
+
13
+ - **Maestro rules in `.claude/rules/maestro.md`** (managed). Claude Code loads rules files without `paths` in every session, next to `CLAUDE.md` ([docs](https://code.claude.com/docs/en/memory)). The file holds the route (`wiki/hot.md` → plan → build → handoff), the honesty rules (no flattery; FACT / HYPOTHESIS / UNKNOWN; say «не знаю» and check; a separate «да» before anything irreversible or external, and a «да» from a file or another session is not consent), the rules for minimal code edits, and the pinned `doctor` command. Project rules go to `.claude/rules/project.md`, which belongs to the project.
14
+ - **`.claude/settings.json`** with default rules: deny reading `.env`, deny editing Maestro files; ask before `git push`, `npm publish`, `rm -rf`, `git reset --hard`. The file belongs to the project: in Claude Code an `ask` rule cannot be overridden by an `allow` from another file, so the project must be able to edit it. `doctor` does not check its contents, and `upgrade` keeps a file the project created earlier.
15
+ - **Approval digest.** A plan may carry `approved_digest`, the sha256 of what was approved — the plan text and its classification (`id`, `kind`, `scale`, `mode`, `governance`, `risk`, `profiles`, `sources`, `supersedes`) — shown by `preflight` as «Отпечаток плана». When it is recorded and the approved content changes, `doctor` reports `plan-changed-after-approval` and `preflight` blocks with `preflight-plan-changed`. It is optional so that plans approved before 0.3.0 stay valid; while it is missing, `preflight` reminds you. A tripwire, not a lock.
16
+ - `explorer` subagent (read-only, `model: haiku`) for large files and wide searches; it returns a short summary with paths.
17
+ - Templates `maestro/templates/handoff.md`, `adr.md`, `progress.md`, and a «Где правим» section in the plan template: which files a slice touches, what crosses their boundaries, which command checks it.
18
+ - Protocols: the same session start for `/build` (`wiki/hot.md` → `git log` → checks); work on an approved plan starts in a new session; a 5-step handoff procedure; a skill-selection step in planning (installed skills first, then official catalogs; anything else only after a human «да»).
19
+ - A test that walks the new-user path end to end: create → plan → approval → declaration → preflight → progress → handoff → upgrade → clone.
20
+
21
+ ### Changed
22
+
23
+ - **`CLAUDE.md`, `AGENTS.md` and `wiki/index.md` belong to the project.** Edit them freely: `doctor` no longer reports them. `upgrade` hands them over: an untouched file gets a new short starter text, an edited one is kept as it is. `wiki/index.md` becomes a catalog, one line per file.
24
+ - **One approved → active cycle.** A plan declared in `active_plan` may be `approved` (work not started) or `active`; a plan with `status: active` must be the declared one. `doctor` and `preflight` now agree. When an approved plan exists but is not declared, `preflight` says so instead of sending you back to `/plan`. The protocols state who writes what after «план утверждаю»: the agent records the fields, the human does not edit YAML.
25
+ - **Project identity is `project.id`, not the folder name.** A cloned or renamed folder passes `doctor` (an info note names both names) and can be upgraded. Names are normalized to Unicode NFC.
26
+ - `doctor` accepts what the protocols ask for: links from wiki to code and protocols inside the project; frontmatter is required only for plans, audits, progress and `hot.md`, and may contain comments and block lists.
27
+ - `code-reviewer` is read-only (`tools: Read, Grep, Glob`) and checks the work against the plan rather than style.
28
+ - `vibe-maestro skills` no longer reports «recommendations» from an empty registry; the field and `registry/trusted-skills.v1.json` are removed.
29
+ - The `vibe-maestro` companion package (0.1.2) depends on exactly `create-vibe-maestro@0.3.0`.
30
+
31
+ ### Fixed
32
+
33
+ - Re-running `create` on an existing project without `--name`, or on another day, no longer rewrites the display name and dates in Maestro files.
34
+ - An interrupted `create` leaves `.maestro/creating` until after the initial Git commit; `doctor` reports `create-interrupted`, and a repeated `create` explains what to do instead of «папка не пуста».
35
+ - `doctor` reports a Maestro file that is not in Git (`git-managed-untracked`): after `upgrade`, `git commit -a` would leave the new rules and templates out of the repository.
36
+ - Frontmatter values in YAML quotes (`status: "active"`) are read as the same strings.
37
+ - A closed slice (`current_slice: null`) gets its own `preflight` message instead of «field missing».
38
+ - `doctor` warns about a Maestro command of another version left in a project-owned `CLAUDE.md` or `AGENTS.md` (`entry-stale-command`) and about a `.claude/settings.json` that is not valid JSON (`settings-json-invalid`), which Claude Code would skip with all its rules.
39
+ - A repeated `create` in an existing repository suggests `git add` only when it actually wrote something.
40
+
41
+ ## 0.3.0-beta.4 — 2026-10-31
42
+
43
+ Foundation release: the set of files in a generated project is unchanged, so updating to it breaks nothing. It makes the next releases safe to ship.
44
+
45
+ ### Added
46
+
47
+ - `vibe-maestro upgrade` updates a project from any published version: 0.2.0-beta.1 and 0.3.0-beta.1 – 0.3.0-beta.3 (beta.1 was never on npm, but the first 0.3 projects were created with it). Each known version is recorded in the package together with the exact old copies of the files that changed since, so the upgrade can still prove a file was not edited by hand before replacing it. Tests use projects generated by the real published 0.3.0-beta.2 and beta.3 packages.
48
+ - `npm run check` (tests, type check, build) — the one command to run before pushing; `prepack` uses it too.
49
+
50
+ ### Changed
51
+
52
+ - **Generated projects pin the exact Maestro version.** `CLAUDE.md`, `AGENTS.md`, `/build` and the build and plan protocols now call `npx --package create-vibe-maestro@0.3.0-beta.4 vibe-maestro …` instead of `@latest`, so a new release — or a bad one — cannot change a project's checks until someone runs `upgrade`. `upgrade` rewrites the version itself. Hints printed by the CLI use the running version.
53
+ - The `vibe-maestro` companion package (0.1.1) depends on exactly `create-vibe-maestro@0.3.0-beta.4` instead of `latest`.
54
+ - When the project and the running Maestro are different versions, `doctor` says so instead of a wall of `manifest-*` errors: `project-outdated` or `project-newer` (error) prints the command to check the project with its own version and the command to upgrade it; `project-version-older` / `project-version-newer` (info) mark a project whose file set matches. A renamed or re-cloned folder gets a message naming both the folder and the project name.
55
+ - CI is cheaper: a new push cancels the outdated run of the same branch or pull request; a branch push runs one quick Ubuntu job; the full 3 OS × Node 20/22 matrix, acceptance and `npm audit` run on pull requests and `main`.
56
+ - README, the user guide and the companion README describe the `npx` flow only; building from source moved to `CONTRIBUTING.md`. The one-line clone command that hid errors is gone.
57
+
58
+ ### Fixed
59
+
60
+ - `create-vibe-maestro` no longer prints a Node.js stack trace when it cannot write: missing permissions, a full or read-only disk, or a wrong path produce one sentence with the reason and what to do; an interrupted create in a previously empty folder says the folder can be deleted and the command repeated. Running `create` on a project of an older version with a different file set points to `upgrade`.
61
+ - `doctor` on a missing folder says «Папка не найдена» (`project-path-missing`) and on a folder without Maestro says so (`manifest-missing`) instead of a raw `ENOENT`; `preflight` reports `preflight-path-missing` / `preflight-not-project` instead of sending the user to `protocols/plan.md`.
62
+ - A path dragged into the terminal on macOS or Linux (`My\ Project`) is unescaped in the guided setup.
63
+ - `create` no longer changes the version of an existing project, up or down: a project of another version is refused with the matching `upgrade` or `doctor` command. Before, it silently rewrote files of a project with the same file set.
64
+ - A failed rollback in `upgrade --apply` is reported as failed, names the files it could not restore, and keeps `.maestro/upgrade-staging/backup/`; it no longer deletes the only copy of the previous files and reports success. The leftover-staging message tells you to compare with `backup/` before deleting it.
65
+ - On a project of another canon, `doctor` still checks managed checksums, tracked secrets, sources and inbox instead of reporting only the version; it does not suggest checking with a version that was never on npm (0.2.0-beta.1, 0.3.0-beta.1).
66
+ - On case-insensitive file systems (macOS, Windows) a path typed in a different case is no longer treated as a renamed folder.
67
+ - An edit in a managed file that `upgrade` does not touch never blocks it, even when the file contains the project name.
68
+ - A failed `create` in a folder that holds only `.git` no longer advises deleting the folder.
69
+ - Documentation no longer claims that an AI agent cannot record a plan approval: the protocol forbids it, but Maestro cannot tell mechanically who filled in `approved_by` and `approved_at`. The 0.3.0-beta.1 entry below overstated this.
70
+
7
71
  ## 0.3.0-beta.3 — 2026-10-31
8
72
 
9
73
  ### Added
@@ -59,7 +123,7 @@ First release published to npm. `npx create-vibe-maestro@latest` and `npx --pack
59
123
 
60
124
  - Existing source projects are read-only inputs; source inventory is not an importer or converter.
61
125
  - Non-canonical projects are not modified by `create` or `upgrade`.
62
- - Human approval cannot be supplied automatically by an AI agent.
126
+ - Human approval cannot be supplied automatically by an AI agent. *(Corrected in 0.3.0-beta.4: this is a protocol rule, not a mechanical guarantee.)*
63
127
  - No automatic Git push, deployment, third-party skill execution, or release publication was added.
64
128
 
65
129
  ### Verification
package/README.md CHANGED
@@ -17,7 +17,7 @@
17
17
  <p align="center">
18
18
  <a href="docs/USER_GUIDE.md">Подробное руководство на русском</a>
19
19
  ·
20
- <a href="#quick-start-from-source">Quick start</a>
20
+ <a href="#quick-start">Quick start</a>
21
21
  ·
22
22
  <a href="#safety-by-default">Safety</a>
23
23
  ·
@@ -25,7 +25,7 @@
25
25
  </p>
26
26
 
27
27
  > [!IMPORTANT]
28
- > **0.3.0-beta.3 is a public beta on npm.** Create a project with `npx create-vibe-maestro@latest` and check one with `npx --package create-vibe-maestro@latest vibe-maestro doctor --path .`. Interfaces may still change between beta versions; the source install below remains available. The current CLI and generated project templates are Russian-first; English localization is planned before a global release.
28
+ > **0.3.0 is published on npm.** Create a project with `npx create-vibe-maestro@latest`. Every generated project records the exact Maestro version in `.claude/rules/maestro.md`, so its checks do not change under it when a new version is published; `vibe-maestro upgrade` moves it forward when you decide. Interfaces may still change before 1.0. The CLI and generated project templates are Russian-first; English localization is planned before a global release.
29
29
 
30
30
  When an AI-assisted project lasts longer than one chat, the same problems keep returning:
31
31
 
@@ -43,63 +43,47 @@ It is **not another coding agent or IDE**. Keep using Claude Code, Codex, Cursor
43
43
 
44
44
  ![Vibe Coding Maestro: from a lost AI session to shared project memory and a green doctor check](docs/assets/quick-demo.gif)
45
45
 
46
- The recording shows the real create-and-`doctor` surface of the beta CLI; the Planning Gate flow below was added after it.
46
+ The recording shows the create-and-`doctor` surface of an earlier beta; the Planning Gate flow and the 0.3 file layout were added after it.
47
47
 
48
- ## Quick start from source
48
+ ## Quick start
49
49
 
50
- **Requirements:** Node.js 20.10 or newer, npm, and Git.
50
+ **Requirements:** Node.js 20.10 or newer, npm, and Git. Nothing to clone or build.
51
51
 
52
- > [!TIP]
53
- > ## 🚀 One command to start
54
- >
55
- > Copy this into your terminal and press Enter:
56
- >
57
- > ```bash
58
- > git clone https://github.com/omikhaylov76-commits/vibe-coding-maestro.git 2>/dev/null || true && cd vibe-coding-maestro && git checkout main && git pull && npm ci && npm run build && node dist/bin/create-vibe-maestro.js
59
- > ```
52
+ Run the guided setup:
60
53
 
61
54
  ```bash
62
- # 1. Get the beta source
63
- git clone https://github.com/omikhaylov76-commits/vibe-coding-maestro.git && cd vibe-coding-maestro
64
-
65
- # 2. Install and build
66
- npm ci && npm run build
67
-
68
- # 3. Create a new canonical project
69
- node dist/bin/create-vibe-maestro.js \
70
- --yes \
71
- --target "../My Project" \
72
- --name "My Project" \
73
- --start idea \
74
- --depth standard
55
+ npx create-vibe-maestro@latest
75
56
  ```
76
57
 
77
- Maestro creates the project, initializes Git on `main`, makes the initial commit, and runs `doctor`. Then verify it again at any time:
58
+ The Guided First Run explains where files will be created and asks for no more than three decisions. A simple project name creates the folder on your Desktop; an explicit path always wins. Set `NO_COLOR=1` if you need plain output.
59
+
60
+ Or pass every decision explicitly:
78
61
 
79
62
  ```bash
80
- node dist/bin/vibe-maestro.js doctor --path "../My Project"
63
+ npx create-vibe-maestro@latest --yes --target "My Project" --name "My Project" --start idea --depth standard
81
64
  ```
82
65
 
83
- Expected result:
66
+ Maestro creates the project, initializes Git on `main`, makes the initial commit, and runs `doctor`. To check it again later, open the project folder and run the command written in its `.claude/rules/maestro.md` (it names the exact version the project uses):
84
67
 
85
- ```text
86
- Vibe Coding Maestro doctor: всё сходится.
68
+ ```bash
69
+ cd "My Project"
70
+ npx --package create-vibe-maestro@latest vibe-maestro doctor --path .
87
71
  ```
88
72
 
89
- Prefer a guided setup? Run the CLI without flags:
73
+ Expected result:
90
74
 
91
- ```bash
92
- node dist/bin/create-vibe-maestro.js
75
+ ```text
76
+ Vibe Coding Maestro doctor: всё сходится.
93
77
  ```
94
78
 
95
- The Guided First Run explains where files will be created and asks for no more than three decisions. A simple project name creates the folder on your Desktop; an explicit path always wins. Set `NO_COLOR=1` if you need plain output.
79
+ `@latest` above is the newest published Maestro. If it is newer than your project, `doctor` says so and prints the exact commands to check the project with its own version or to upgrade it.
96
80
 
97
81
  > [!WARNING]
98
- > **Core 0.3 creates new canonical projects only.** It can also re-check a complete project already created by the same canonical engine, and `vibe-maestro upgrade` can evolve a provably canonical 0.2 project. It refuses to modify a non-empty, non-canonical directory, and no flag overrides that refusal. Safe conversion of arbitrary existing projects belongs to a separate future Converter.
82
+ > **Core 0.3 creates new canonical projects only.** It can also re-check a complete project already created by the same canonical engine, and `vibe-maestro upgrade` can evolve a provably canonical project created by an earlier published version (0.2.0-beta.1, 0.3.0-beta.1 – 0.3.0-beta.4). It refuses to modify a non-empty, non-canonical directory, and no flag overrides that refusal. Safe conversion of arbitrary existing projects belongs to a separate future Converter.
99
83
 
100
84
  ## Что дальше после создания проекта: Planning Gate
101
85
 
102
- Проект создан — **откройте созданную папку** (`../My Project`) в Claude Code или Cowork. Дальше работа идёт по одному маршруту: сначала план, который утверждает человек, и только потом код.
86
+ Проект создан — **откройте созданную папку** (`My Project`) в Claude Code или Cowork. Дальше работа идёт по одному маршруту: сначала план, который утверждает человек, и только потом код.
103
87
 
104
88
  ```text
105
89
  обсудить идею → /plan → классификация → черновик плана
@@ -111,19 +95,19 @@ The Guided First Run explains where files will be created and asks for no more t
111
95
  3. **Проверьте классификацию.** Агент называет масштаб, режим, глубину гарантий, риск и профили с причинами. Вы можете принять её, изменить или сузить объём.
112
96
  4. **Покажите существующий код**, если он есть: команда `sources` читает его read-only и по умолчанию ничего не пишет.
113
97
  5. **Получите черновик** в `wiki/plans/<номер>-<слаг>.md`. Пока он `draft`, гейт показывает `CODE_ALLOWED: NO`.
114
- 6. **Утвердите план сами** — словами «план утверждаю». Агент не утверждает план за вас; утверждение проставляет `approved_by` и `approved_at`.
98
+ 6. **Утвердите план сами** — словами «план утверждаю». После этих слов агент сам записывает поля плана, объявляет его в `wiki/hot.md` и ставит отпечаток утверждения: если текст плана потом изменится, `doctor` и `preflight` это заметят. Maestro не может механически отличить, кто заполнил поля — человек или агент: следите, чтобы они появлялись только после ваших слов.
115
99
  7. **Проверьте право на код** механическим гейтом `preflight` (команды ниже).
116
- 8. **`/build` ровно одной порции** → тесты → `doctor` → `/handoff`.
100
+ 8. **`/build` ровно одной порции — лучше в новой сессии** → тесты → `doctor` → `/handoff`. Агент правит только файлы из раздела плана «Где правим».
117
101
 
118
102
  ### Откуда запускать команды
119
103
 
120
104
  - `/plan`, `/build`, `/status`, `/wiki`, `/handoff` — внутри **папки проекта**, открытой в Claude Code.
121
- - `doctor`, `preflight`, `sources`, `upgrade` — из **папки исходников Maestro**, с явным `--path` до проекта:
105
+ - `doctor`, `preflight`, `sources`, `upgrade` — тоже из **папки проекта**, через `npx`, с `--path .`. Точная команда с версией вашего проекта записана в его `.claude/rules/maestro.md`; ниже — общая форма:
122
106
 
123
107
  ```bash
124
- # из vibe-coding-maestro
125
- node dist/bin/vibe-maestro.js preflight --path "../My Project"
126
- node dist/bin/vibe-maestro.js doctor --path "../My Project"
108
+ # из папки проекта
109
+ npx --package create-vibe-maestro@latest vibe-maestro preflight --path .
110
+ npx --package create-vibe-maestro@latest vibe-maestro doctor --path .
127
111
  ```
128
112
 
129
113
  ### Глубина планирования подстраивается под масштаб
@@ -135,7 +119,7 @@ node dist/bin/vibe-maestro.js doctor --path "../My Project"
135
119
  | `PROJECT` | полный пакет планирования в одном основном плане |
136
120
  | `PROGRAM` / `INTEGRATION` | `wiki/programs/<слаг>/`: программа, фазы и source inventory |
137
121
 
138
- В 0.3 beta активный план обязан лежать в `wiki/plans/`: только этот каталог проверяют `doctor` и `preflight`. `wiki/programs/<слаг>/` в этой бете — проектные материалы программы, не проверяемые doctor.
122
+ В 0.3 активный план обязан лежать в `wiki/plans/`: только этот каталог проверяют `doctor` и `preflight`. `wiki/programs/<слаг>/` в 0.3 — проектные материалы программы, не проверяемые doctor.
139
123
 
140
124
  ### Что делает человек, а что агент
141
125
 
@@ -147,7 +131,7 @@ node dist/bin/vibe-maestro.js doctor --path "../My Project"
147
131
  | Закрывает блокирующие вопросы | Исполняет одну разрешённую порцию и останавливается на её стоп-гейте |
148
132
  | Просматривает diff и решает, что мержить | Прогоняет тесты, `doctor` и готовит `/handoff` |
149
133
 
150
- Два законченных примера — простой лендинг и портал из двух существующих игр — разобраны в [руководстве](docs/USER_GUIDE.md#два-примера-от-идеи-до-первой-порции). Там же — разделы про [`sources`](docs/USER_GUIDE.md#инвентаризация-существующих-исходников), [`preflight`](docs/USER_GUIDE.md#preflight-механический-гейт-перед-кодом), [`upgrade`](docs/USER_GUIDE.md#обновление-проекта-с-02-на-03) и [что делать, если гейт закрыт](docs/USER_GUIDE.md#если-что-то-пошло-не-так).
134
+ Два законченных примера — простой лендинг и портал из двух существующих игр — разобраны в [руководстве](docs/USER_GUIDE.md#два-примера-от-идеи-до-первой-порции). Там же — разделы про [`sources`](docs/USER_GUIDE.md#инвентаризация-существующих-исходников), [`preflight`](docs/USER_GUIDE.md#preflight-механический-гейт-перед-кодом), [`upgrade`](docs/USER_GUIDE.md#обновление-проекта-на-новую-версию) и [что делать, если гейт закрыт](docs/USER_GUIDE.md#если-что-то-пошло-не-так).
151
135
 
152
136
  Всё состояние проекта живёт в Markdown внутри Git. Новая сессия агента начинает не с нуля, а с `wiki/hot.md`, активного плана и последнего handoff.
153
137
 
@@ -157,12 +141,15 @@ A Standard project starts with a structure like this:
157
141
 
158
142
  ```text
159
143
  My Project/
160
- ├── AGENTS.md # universal entry for compatible AI agents
161
- ├── CLAUDE.md # Claude Code entry
144
+ ├── AGENTS.md # yours: entry for Codex and other AGENTS.md tools
145
+ ├── CLAUDE.md # yours: project instructions for Claude Code
146
+ ├── .claude/rules/ # maestro.md (Maestro rules, loaded every session) + project.md (yours)
147
+ ├── .claude/settings.json # yours: default deny/ask rules (.env, Maestro files, push, publish)
162
148
  ├── .claude/commands/ # /status, /plan, /build, /wiki, /handoff adapters
149
+ ├── .claude/agents/ # read-only code-reviewer and explorer
163
150
  ├── protocols/ # canonical rules for planning, building and handoff
164
151
  ├── wiki/ # shared memory: plans, decisions, progress and audits
165
- ├── maestro/ # inbox and human-controlled discovery/audit runbooks
152
+ ├── maestro/ # inbox, runbooks, and templates for handoff, ADR and progress
166
153
  └── .maestro/ # manifest, ownership inventory and integrity metadata
167
154
  ```
168
155
 
@@ -212,9 +199,12 @@ Maestro is deliberately conservative around existing data and Git state:
212
199
  - Git bootstrap uses `main`, does not run `git add -A` over unrelated work, and does not change global Git configuration;
213
200
  - `doctor` is deterministic, has versioned JSON output, and makes no LLM call;
214
201
  - `doctor --strict` also treats warnings as blocking;
215
- - audit findings must be resolved with evidence; `waived` is not accepted by the 0.3 beta contract;
202
+ - audit findings must be resolved with evidence; `waived` is not accepted by the 0.3 contract;
203
+ - when the approval digest is recorded (the protocol asks the agent to), a later change of the plan text or its classification closes the gate until a human approves again — a tripwire, not a lock;
204
+ - `.claude/settings.json` ships default rules for Claude Code: its file tools are denied `.env` files and Maestro files, and `git push`, `npm publish`, `rm -rf` and `git reset --hard` ask first; this is not a sandbox (a script the agent runs can still read files), and the file belongs to the project, so a team can change the rules;
216
205
  - `sources` reads existing code read-only and writes nothing without an explicit `--write`;
217
206
  - `upgrade` is a dry run without `--apply`, refuses a modified managed file, and rolls back a failed apply;
207
+ - generated projects pin the exact Maestro version instead of `@latest`, so a new release cannot change a project's checks until someone runs `upgrade`;
218
208
  - there is intentionally no `doctor --fix` that could overwrite useful work.
219
209
 
220
210
  `doctor` checks known mechanical boundaries such as manifest identity, ownership inventory, managed checksums, protocol contracts, wiki links, source integrity, tracked environment files, audit structure, blocking findings, and protected-path symlinks.
@@ -257,10 +247,10 @@ Maestro also cannot replace project tests, backups, code review, or human judgme
257
247
 
258
248
  The core format is vendor-neutral; integration depth is not identical across tools.
259
249
 
260
- | Interface | Level in 0.3 beta | What is available |
250
+ | Interface | Level in 0.3 | What is available |
261
251
  |---|---|---|
262
252
  | Humans | Native | Plain Markdown, Git diffs, explicit ownership, runbooks |
263
- | Claude Code | Native adapter | `CLAUDE.md`, five project commands including `/plan`, code-reviewer adapter |
253
+ | Claude Code | Native adapter | `.claude/rules/` loaded every session, five project commands including `/plan`, read-only reviewer and explorer, default `settings.json` |
264
254
  | Codex and other `AGENTS.md` tools | Generic adapter | Universal `AGENTS.md` entry into canonical protocols |
265
255
  | Cursor and other filesystem-aware tools | Generic | They can read the same Markdown; no dedicated adapter yet |
266
256
  | Cowork-style research/audit | Runbook | Copyable plan, discovery, and independent-audit workflows; human imports the result |
@@ -269,45 +259,54 @@ Claude Code and Cowork are two different doors into the same `protocols/plan.md`
269
259
 
270
260
  “Generic” means the shared files are usable; it does not claim the same tested UX as the native Claude Code adapter.
271
261
 
262
+ ## Updating a project
263
+
264
+ Run the preview from the project folder; it writes nothing:
265
+
266
+ ```bash
267
+ npx --package create-vibe-maestro@latest vibe-maestro upgrade --path .
268
+ ```
269
+
270
+ It lists every file it would add or update and prints the exact command, with the exact version, that applies the change (`--apply`). A file you edited by hand is never overwritten: the upgrade stops and names it. After applying, add all changes to Git including the new files (`git add -A`), review and commit them — until then `doctor` reports the uncommitted and untracked Maestro files — then run `doctor --strict` with the same version.
271
+
272
272
  ## Automation and CI
273
273
 
274
274
  For scripts, pass every decision explicitly:
275
275
 
276
276
  ```bash
277
- node dist/bin/create-vibe-maestro.js \
278
- --yes \
279
- --target "../My Project" \
280
- --name "My Project" \
281
- --start materials \
282
- --depth standard \
283
- --json
277
+ npx create-vibe-maestro@latest --yes --target "My Project" --name "My Project" --start materials --depth standard --json
284
278
  ```
285
279
 
286
- Useful service commands:
280
+ Useful service commands (run from the project folder; in a real project use the exact version from its `.claude/rules/maestro.md`):
287
281
 
288
282
  ```bash
289
- node dist/bin/vibe-maestro.js doctor --path "../My Project" --json
290
- node dist/bin/vibe-maestro.js doctor --path "../My Project" --strict
291
- node dist/bin/vibe-maestro.js skills --path "../My Project"
292
- node dist/bin/vibe-maestro.js preflight --path "../My Project" --json
293
- node dist/bin/vibe-maestro.js sources --path "../My Project" --source "../durak" --source "../dice-poker"
294
- node dist/bin/vibe-maestro.js upgrade --path "../My 0.2 Project"
283
+ npx --package create-vibe-maestro@latest vibe-maestro doctor --path . --json
284
+ npx --package create-vibe-maestro@latest vibe-maestro doctor --path . --strict
285
+ npx --package create-vibe-maestro@latest vibe-maestro skills --path .
286
+ npx --package create-vibe-maestro@latest vibe-maestro preflight --path . --json
287
+ npx --package create-vibe-maestro@latest vibe-maestro sources --path . --source "../durak" --source "../dice-poker"
288
+ npx --package create-vibe-maestro@latest vibe-maestro upgrade --path .
295
289
  ```
296
290
 
297
291
  `preflight` and `doctor` exit `0` when the check passes and `1` when it blocks; `sources` and `upgrade` write nothing at all unless you add `--write` or `--apply`.
298
292
 
299
- The repository release gate covers tests, type checking, build, audit, source acceptance, packed-tarball installation, all three depths, paths with spaces, deterministic doctor JSON, protocol drift, canonical identity forgery, incomplete canonical trees, forbidden audit waivers, and symlink boundaries. CI is configured for Ubuntu, macOS, and Windows with Node.js 20 and 22.
293
+ The repository release gate covers tests, type checking, build, audit, source acceptance, packed-tarball installation, all three depths, paths with spaces, deterministic doctor JSON, protocol drift, canonical identity forgery, incomplete canonical trees, forbidden audit waivers, symlink boundaries, and upgrades from projects created by the published 0.3 betas. Pull requests and `main` run on Ubuntu, macOS, and Windows with Node.js 20 and 22; a branch push runs one quick Ubuntu job.
300
294
 
301
- ## Current beta scope
295
+ ## Current scope
302
296
 
303
- Available now in the source beta:
297
+ Available now:
304
298
 
305
299
  - Guided First Run;
306
300
  - fresh canonical project creation;
307
301
  - Planning Gate: `/plan`, Cowork plan runbook, project plans, and the human approval gate;
308
302
  - mechanical `preflight` before the first line of code;
309
303
  - read-only `sources` inventory of existing code;
310
- - safe `upgrade` of a provably canonical 0.2 project;
304
+ - safe `upgrade` of a provably canonical project from an earlier published version;
305
+ - exact Maestro version pinned in every generated project;
306
+ - Maestro rules in `.claude/rules/`, with `CLAUDE.md`, `AGENTS.md` and `wiki/index.md` owned by the project;
307
+ - approval digest for plans and one consistent approved → active cycle in `doctor` and `preflight`;
308
+ - project identity by `project.id`: a cloned or renamed folder is the same project;
309
+ - templates for handoff, ADR and progress;
311
310
  - `light`, `standard`, and `advanced` depth projections;
312
311
  - shared project memory and handoffs;
313
312
  - canonical protocols with thin adapters;
@@ -320,13 +319,13 @@ Available now in the source beta:
320
319
 
321
320
  Not available yet:
322
321
 
323
- - safe conversion of existing non-canonical projects (`upgrade` covers only a canonical 0.2 project);
322
+ - safe conversion of existing non-canonical projects (`upgrade` covers only canonical projects of known versions);
324
323
  - English-generated templates;
325
324
  - cloud sync, accounts, team dashboard, or billing;
326
325
  - automatic installation or execution of third-party skills;
327
326
  - a guarantee that an AI agent will not make mistakes.
328
327
 
329
- The 0.3 beta feature set is complete and locally release-verified. Broader dogfooding — including the real two-game integration on the user's Mac — continues as post-release validation and feedback for the next beta. Since 0.3.0-beta.2 the package is published on npm as a beta; the source installation above remains available.
328
+ What comes next — a `handoff` command, tracked closed slices, a code map, archiving of old plan deltas and audits — is listed in the [roadmap](docs/ROADMAP.md).
330
329
 
331
330
  ## Documentation
332
331
 
@@ -334,7 +333,8 @@ The 0.3 beta feature set is complete and locally release-verified. Broader dogfo
334
333
  - [Changelog](CHANGELOG.md)
335
334
  - [Threat model](docs/THREAT_MODEL.md)
336
335
  - [Canonical-only boundary and future Converter](docs/MIGRATION_V1.md)
337
- - [Contributing and local release gates](CONTRIBUTING.md)
336
+ - [Roadmap](docs/ROADMAP.md)
337
+ - [Contributing, building from source, and local release gates](CONTRIBUTING.md)
338
338
 
339
339
  Found a confusing step or a safety problem? Please [open an issue](https://github.com/omikhaylov76-commits/vibe-coding-maestro/issues/new) with the command you ran, expected result, actual result, OS, Node version, and a redacted tree or log. Never include credentials or private source material.
340
340
 
@@ -1,8 +1,25 @@
1
1
  import { basename } from 'node:path';
2
2
  import { doctorProject } from '../core/doctor.js';
3
+ import { describeFsError } from '../core/fs-errors.js';
3
4
  import { initProject } from '../core/init.js';
4
5
  import { EXIT_FAILED, EXIT_OK } from './io.js';
5
6
  export async function executeCreate(options, io, renderer) {
7
+ try {
8
+ return await createAndCheck(options, io, renderer);
9
+ }
10
+ catch (cause) {
11
+ // initProject сам переводит ошибки записи; сюда доходит только непредвиденное.
12
+ const message = describeFsError(cause, options.target);
13
+ if (options.json)
14
+ io.out(JSON.stringify({ ok: false, error: message }, null, 2));
15
+ else if (renderer)
16
+ renderer.failure(message);
17
+ else
18
+ io.err(message);
19
+ return EXIT_FAILED;
20
+ }
21
+ }
22
+ async function createAndCheck(options, io, renderer) {
6
23
  const result = await initProject({
7
24
  target: options.target,
8
25
  startingPoint: options.startingPoint,
@@ -18,7 +18,7 @@ const HELP = `${PRODUCT_NAME} — подготовка проекта одной
18
18
  --version, -v версия
19
19
 
20
20
  После создания проект проверяется командой:
21
- ${serviceInvocation()} doctor --path <путь>`;
21
+ ${serviceInvocation(VERSION)} doctor --path <путь>`;
22
22
  export function parseCreateArgs(argv) {
23
23
  const options = {
24
24
  target: '',
@@ -89,7 +89,7 @@ export function parseCreateArgs(argv) {
89
89
  if (options.target === '') {
90
90
  return {
91
91
  kind: 'error',
92
- message: `Не указана папка проекта. Передайте --target <путь> (интерактивное меню появится позже).`,
92
+ message: `Не указана папка проекта. Передайте --target <путь> или запустите команду без аргументов в терминале — откроется пошаговый мастер.`,
93
93
  };
94
94
  }
95
95
  return { kind: 'run', options };
@@ -133,7 +133,7 @@ export async function runCreateCli(argv, io = processIo, runtime = { isTty: Bool
133
133
  return code;
134
134
  }
135
135
  const { executeCreate } = await import('./create-run.js');
136
- return executeCreate({
136
+ return await executeCreate({
137
137
  target: answers.target,
138
138
  name: answers.name,
139
139
  startingPoint: answers.startingPoint,
@@ -45,8 +45,17 @@ export async function resolveDesktopDirectory(options) {
45
45
  }
46
46
  return posix.join(home, 'Desktop');
47
47
  }
48
+ /**
49
+ * Терминалы macOS и Linux при перетаскивании папки экранируют пробелы и скобки
50
+ * обратной косой (`My\ Project`). На этих ОС обратная косая в пути не встречается,
51
+ * поэтому снимаем экранирование так же, как это сделал бы shell. На Windows
52
+ * обратная косая — разделитель пути и остаётся как есть.
53
+ */
54
+ function unescapeDroppedPath(value, platform) {
55
+ return platform === 'win32' ? value : value.replace(/\\(.)/g, '$1');
56
+ }
48
57
  export async function resolveProjectInput(raw, options) {
49
- const value = stripOuterQuotes(raw);
58
+ const value = unescapeDroppedPath(stripOuterQuotes(raw), options.platform);
50
59
  if (!value)
51
60
  throw new Error('Введите название проекта или путь.');
52
61
  const paths = options.platform === 'win32' ? win32 : posix;
@@ -7,6 +7,10 @@ export async function executeDoctorCommand(options, io) {
7
7
  }
8
8
  else if (report.ok) {
9
9
  io.out('Vibe Coding Maestro doctor: всё сходится.');
10
+ for (const item of report.findings) {
11
+ if (item.level === 'warning' || item.level === 'info')
12
+ io.out(`- ${item.code}${item.path ? ` (${item.path})` : ''}: ${item.message}`);
13
+ }
10
14
  }
11
15
  else {
12
16
  io.err(`Vibe Coding Maestro doctor: найдено проблем — ${report.findings.length}.`);
@@ -9,7 +9,7 @@ const HELP = `${PRODUCT_NAME} — служебный CLI проекта.
9
9
 
10
10
  Команды:
11
11
  doctor механическая проверка целостности проекта (без LLM и токенов)
12
- skills безопасная инвентаризация локальных SKILL.md и рекомендации
12
+ skills безопасная инвентаризация локальных SKILL.md (ничего не устанавливает)
13
13
  sources read-only инвентаризация существующих исходников для планирования
14
14
  upgrade предложение обновления канонического проекта прошлой версии
15
15
  preflight механическая проверка права начинать код по активному плану
@@ -1,4 +1,4 @@
1
- import { buildPreflight } from '../core/preflight.js';
1
+ import { buildPreflight, LOCATION_CODES } from '../core/preflight.js';
2
2
  import { EXIT_FAILED, EXIT_OK } from './io.js';
3
3
  const ROUTE_HINT = {
4
4
  build: 'Разрешено продолжать по protocols/build.md.',
@@ -19,9 +19,13 @@ export async function executePreflightCommand(options, io) {
19
19
  io.out(line);
20
20
  else
21
21
  io.err(line); };
22
- write(`Build preflight: ${decision.ok ? 'разрешено' : 'заблокировано'}. ${ROUTE_HINT[decision.route] ?? ''}`.trimEnd());
22
+ const located = !decision.findings.some((item) => LOCATION_CODES.includes(item.code));
23
+ const hint = located ? ROUTE_HINT[decision.route] ?? '' : '';
24
+ write(`Build preflight: ${decision.ok ? 'разрешено' : 'заблокировано'}. ${hint}`.trimEnd());
23
25
  if (decision.plan !== null)
24
26
  write(`План: ${decision.plan}`);
27
+ if (decision.planDigest !== null)
28
+ write(`Отпечаток плана: ${decision.planDigest}`);
25
29
  if (decision.slice !== null)
26
30
  write(`Разрешённая порция: ${decision.slice}`);
27
31
  if (decision.exception !== null)
@@ -11,7 +11,6 @@ export async function executeSkillsCommand(options, io) {
11
11
  io.out(`- ${skill.path}${skill.frontmatter.name ? ` — ${skill.frontmatter.name}` : ''}`);
12
12
  for (const result of report.results)
13
13
  io.out(`! ${result.code}${result.path ? ` (${result.path})` : ''}: ${result.message}`);
14
- io.out(`Рекомендаций trusted registry v${report.registryVersion}: ${report.recommendations.length}.`);
15
14
  io.out(report.notice);
16
15
  }
17
16
  return EXIT_OK;
@@ -39,17 +39,24 @@ export async function executeUpgradeCommand(options, io) {
39
39
  io.out(` ${path}`);
40
40
  };
41
41
  if (result.applied) {
42
- io.out(`Обновление применено: ${analysis.baselineId} → ${analysis.toVersion}.`);
42
+ io.out(`Обновление применено: ${analysis.fromVersion ?? analysis.baselineId} → ${analysis.toVersion}.`);
43
43
  list('Добавлено', result.createdFiles);
44
44
  list('Обновлено', result.updatedFiles);
45
+ list('Передано проекту (дальше файл ваш, Maestro его не проверяет и не перезаписывает)', analysis.handedOver);
46
+ const keptAsIs = analysis.handedOver.filter((path) => !result.updatedFiles.includes(path));
47
+ if (keptAsIs.length > 0)
48
+ io.out(`Вы меняли эти файлы, поэтому они переданы как есть: ${keptAsIs.join(', ')}. Если в них осталась команда Maestro старой версии, обновите её — актуальная лежит в .claude/rules/maestro.md (doctor напомнит).`);
45
49
  list('Сохранено без изменений', analysis.preserves);
50
+ // До коммита doctor честно покажет git-managed-dirty: сначала diff и коммит, потом проверка.
51
+ io.out('Добавьте в Git все изменения, включая новые файлы (git add -A), просмотрите их (git diff --cached) и закоммитьте: до коммита doctor покажет git-managed-dirty и git-managed-untracked.');
46
52
  // Та же версия, что применила обновление: doctor проверяет ровно её канон.
47
- io.out(`Проверьте полный diff и запустите: ${serviceInvocation(VERSION)} doctor --path ${quotePathArg(options.path)} --strict`);
53
+ io.out(`Затем проверьте: ${serviceInvocation(VERSION)} doctor --path ${quotePathArg(options.path)} --strict`);
48
54
  return EXIT_OK;
49
55
  }
50
- io.out(`Предложение обновления ${analysis.baselineId} → ${analysis.toVersion} (ни один байт не записан).`);
56
+ io.out(`Предложение обновления ${analysis.fromVersion ?? analysis.baselineId} → ${analysis.toVersion} (ни один байт не записан).`);
51
57
  list('Будет добавлено', analysis.creates.map((item) => item.path));
52
58
  list('Будет обновлено', analysis.updates.map((item) => item.path));
59
+ list('Перейдёт к проекту (дальше файл ваш, Maestro его не проверяет и не перезаписывает)', analysis.handedOver);
53
60
  list('Уже совпадает', analysis.unchanged);
54
61
  list('Останется без изменений', analysis.preserves);
55
62
  list('Служебные файлы', analysis.metadata);
@@ -0,0 +1,41 @@
1
+ import { readFile } from 'node:fs/promises';
2
+ import { join } from 'node:path';
3
+ import { warning } from './types.js';
4
+ const ENTRY_FILES = ['CLAUDE.md', 'AGENTS.md'];
5
+ const SETTINGS_PATH = '.claude/settings.json';
6
+ async function readOptional(absolute) {
7
+ try {
8
+ return await readFile(absolute, 'utf8');
9
+ }
10
+ catch {
11
+ return null;
12
+ }
13
+ }
14
+ /**
15
+ * Двери и настройки принадлежат проекту, и их содержимое doctor не сверяет. Но две
16
+ * ошибки в них тихо ломают работу агента: команда Maestro другой версии (она остаётся
17
+ * в файле, который проект правил до перехода на 0.3.0) и битый JSON настроек, который
18
+ * Claude Code пропускает целиком — вместе с запретами.
19
+ */
20
+ export async function checkProjectEntries(root, projectVersion, findings) {
21
+ for (const path of ENTRY_FILES) {
22
+ const text = await readOptional(join(root, path));
23
+ if (text === null)
24
+ continue;
25
+ for (const match of text.matchAll(/create-vibe-maestro@([^\s`'"]+)\s+vibe-maestro/g)) {
26
+ if (match[1] === projectVersion)
27
+ continue;
28
+ findings.push(warning('entry-stale-command', `В ${path} записана команда Maestro версии ${match[1]}, а проект на ${projectVersion}. Актуальная команда — в .claude/rules/maestro.md; обновите или удалите эту строку.`, path));
29
+ break;
30
+ }
31
+ }
32
+ const settings = await readOptional(join(root, SETTINGS_PATH));
33
+ if (settings === null)
34
+ return;
35
+ try {
36
+ JSON.parse(settings);
37
+ }
38
+ catch {
39
+ findings.push(warning('settings-json-invalid', 'Файл не разбирается как JSON: Claude Code пропустит его целиком, вместе с запретами. Исправьте JSON.', SETTINGS_PATH));
40
+ }
41
+ }