create-vibe-maestro 0.4.1 → 0.4.3
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.
- package/CHANGELOG.md +90 -0
- package/README.md +37 -34
- package/dist/cli/context-run.js +10 -0
- package/dist/cli/create-run.js +74 -9
- package/dist/cli/create.js +21 -2
- package/dist/cli/doctor-run.js +2 -1
- package/dist/cli/maestro.js +25 -2
- package/dist/cli/pack-run.js +42 -3
- package/dist/cli/prompt.js +12 -4
- package/dist/cli/renderer.js +5 -4
- package/dist/cli/upgrade-run.js +48 -5
- package/dist/core/context.js +47 -2
- package/dist/core/doctor/git.js +41 -1
- package/dist/core/doctor/inbox.js +5 -11
- package/dist/core/doctor/index.js +1 -1
- package/dist/core/doctor/plans.js +3 -3
- package/dist/core/doctor/sources.js +1 -1
- package/dist/core/github.js +107 -0
- package/dist/core/gitignore.js +3 -1
- package/dist/core/init.js +37 -10
- package/dist/core/inventory.js +6 -10
- package/dist/core/pack.js +130 -12
- package/dist/core/plan.js +21 -2
- package/dist/core/preflight.js +6 -5
- package/dist/core/readme.js +21 -0
- package/dist/core/settings.js +39 -0
- package/dist/core/template.js +2 -1
- package/dist/core/text-diff.js +108 -0
- package/dist/core/upgrade/analyze.js +131 -12
- package/dist/core/upgrade/baseline.js +14 -0
- package/dist/core/upgrade/index.js +53 -10
- package/dist/core/upgrade/releases.js +152 -11
- package/docs/ROADMAP.md +75 -44
- package/docs/USER_GUIDE.md +142 -79
- package/package.json +1 -1
- package/registry/baseline/0.4.1/project/.claude/commands/plan.md +2 -0
- package/registry/baseline/0.4.1/project/.claude/rules/maestro.md +35 -0
- package/registry/baseline/0.4.1/project/maestro/inbox/README.md +16 -0
- package/registry/baseline/0.4.1/project/maestro/runbooks/cowork-discovery.md +30 -0
- package/registry/baseline/0.4.1/project/protocols/plan.md +142 -0
- package/registry/baseline/0.4.2/project/.claude/agents/code-reviewer.md +13 -0
- package/registry/baseline/0.4.2/project/.claude/rules/maestro.md +37 -0
- package/registry/baseline/0.4.2/project/maestro/runbooks/cowork-audit.md +11 -0
- package/registry/baseline/0.4.2/project/maestro/templates/handoff.md +25 -0
- package/registry/baseline/0.4.2/project/protocols/audit.md +5 -0
- package/registry/baseline/0.4.2/project/protocols/build.md +18 -0
- package/registry/baseline/0.4.2/project/protocols/completion.md +22 -0
- package/registry/baseline/0.4.2/project/protocols/discovery.md +3 -0
- package/registry/baseline/0.4.2/project/protocols/handoff.md +15 -0
- package/registry/baseline/0.4.2/project/protocols/plan.md +149 -0
- package/registry/baseline/0.4.2/project/protocols/start.md +64 -0
- package/registry/baseline/0.4.2/project/protocols/wiki.md +9 -0
- package/registry/baseline/0.4.2/project/wiki/plans/README.md +131 -0
- package/registry/baseline/0.4.2/project/wiki/plans/TEMPLATE.md +75 -0
- package/registry/capabilities.v1.json +32 -20
- package/templates/project/.claude/agents/code-reviewer.md +18 -7
- package/templates/project/.claude/commands/plan.md +1 -0
- package/templates/project/.claude/commands/start.md +2 -0
- package/templates/project/.claude/rules/maestro.md +10 -5
- package/templates/project/.claude/rules/project.md +6 -0
- package/templates/project/.claude/settings.json +3 -0
- package/templates/project/README.md +11 -0
- package/templates/project/maestro/inbox/README.md +6 -6
- package/templates/project/maestro/runbooks/cowork-audit.md +9 -2
- package/templates/project/maestro/runbooks/cowork-discovery.md +1 -1
- package/templates/project/maestro/templates/audit.md +31 -0
- package/templates/project/maestro/templates/handoff.md +5 -1
- package/templates/project/protocols/audit.md +70 -1
- package/templates/project/protocols/build.md +111 -9
- package/templates/project/protocols/completion.md +8 -7
- package/templates/project/protocols/handoff.md +3 -1
- package/templates/project/protocols/plan.md +45 -28
- package/templates/project/protocols/start.md +64 -0
- package/templates/project/protocols/wiki.md +10 -2
- package/templates/project/wiki/concepts/discovery.md +30 -11
- package/templates/project/wiki/hot.md +2 -2
- package/templates/project/wiki/icebox.md +12 -0
- package/templates/project/wiki/index.md +2 -0
- package/templates/project/wiki/passport.md +3 -1
- package/templates/project/wiki/plans/0001-starter.md +16 -4
- package/templates/project/wiki/plans/README.md +7 -3
- package/templates/project/wiki/plans/TEMPLATE.md +13 -5
- package/templates/project/wiki/restore.md +32 -0
- /package/{templates → registry/baseline/0.4.1}/project/protocols/discovery.md +0 -0
- /package/{templates → registry/baseline/0.4.2}/project/protocols/build/audit-phase.md +0 -0
- /package/{templates → registry/baseline/0.4.2}/project/protocols/build/audit-plan.md +0 -0
- /package/{templates → registry/baseline/0.4.2}/project/protocols/build/step-1-rules.md +0 -0
- /package/{templates → registry/baseline/0.4.2}/project/protocols/build/step-2-spec.md +0 -0
- /package/{templates → registry/baseline/0.4.2}/project/protocols/build/step-3-architecture.md +0 -0
- /package/{templates → registry/baseline/0.4.2}/project/protocols/build/step-5-feature-loop.md +0 -0
- /package/{templates → registry/baseline/0.4.2}/project/protocols/context-budget.md +0 -0
- /package/{templates → registry/baseline/0.4.2}/project/protocols/lessons.md +0 -0
- /package/{templates → registry/baseline/0.4.2}/project/protocols/seams.md +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,96 @@ 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.4.3 — 2026-11-01
|
|
8
|
+
|
|
9
|
+
The fourth part of 0.4: checks, protocols and command fixes. Checks run once and only the fixes are re-checked; small tasks follow the same path as any plan; eight protocols instead of eighteen; `upgrade` shows its changes and can remove retired Maestro files; `pack` shows what goes to the customer before packing. The set of project files changes; `vibe-maestro upgrade` migrates projects from 0.4.2, 0.4.1, 0.4.0, 0.3.1, 0.3.0, 0.3.0-beta.1 – beta.4 and 0.2.0-beta.1.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **`upgrade --diff`** prints the changes themselves as unified-diff hunks: what is added, what changes line by line, what is removed. The plain proposal now shows the number of changed lines next to every file and points to `--diff`. `--diff` writes nothing and does not combine with `--apply` or `--json`. Line diff of its own, no dependencies.
|
|
14
|
+
- **`upgrade` removes retired Maestro files** — only those in its explicit list and only untouched ones (the previous source and the checksum match). A modified file stops the upgrade with a clear hint (bring it back or move your edits to your own file); a file already gone is skipped. Removal is part of the same transaction: bytes go to `backup/` first, a rollback brings them back; a folder emptied by removal goes away. Any other path missing from the new canon still stops the upgrade.
|
|
15
|
+
- **`maestro/templates/audit.md`** (managed): a check report in the format `doctor` accepts — header, `## Finding` with one-line fields, the fix check inside `resolution`, a new finding of the fix check as a new `## Finding`, «не исправляем» left `open`. IDs must be Latin letters, digits, `.`, `-`, `_` — `doctor` does not see a finding with another ID; the sample and the Cowork runbook say so.
|
|
16
|
+
- **`wiki/icebox.md`** (belongs to the project): ideas set aside — why and when to come back; unfixed check findings may point here.
|
|
17
|
+
- **`pack --dry-run`** shows what goes into the archive and highlights what to look at, without writing a byte. Highlights: service files (`.gitignore`, `.gitattributes`, `.DS_Store`, `.vscode/`, `.idea/`, `.github/`, `*.log`), home, project and temporary paths, Maestro names, internal folders (`wiki/`, `maestro/`, `protocols/`, `.claude/`), plan numbers. A highlight is a warning: packing is not refused and the exit code is unchanged. Plain `pack` prints the highlights too; JSON gets `highlights` when there are any and `noAccess` when the passport has no accesses; `--dry-run` reports `dryRun`, `entries` and, before the tag exists, `untagged`. The root `.gitattributes` and `.gitignore` that Maestro writes are marked «оставьте» instead of «убрать».
|
|
18
|
+
- «Проверки на GitHub» in `protocols/build.md` and a short rule in `.claude/rules/maestro.md`: check locally with the same commands first, push in a batch after a closed slice, do not push while the previous run is going, run a GitHub check by hand only for what cannot be checked locally (at most once per slice, never instead of the local run), and after a push keep working instead of waiting; the result is looked at once — at the start of the next slice or before merging. An economical workflow sample: `concurrency` with `cancel-in-progress`, a quick job on branches, the full set on pull requests, `paths-ignore` for `wiki/`, `maestro/` and documents, a schedule only by the human's decision about cost.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- **Eight protocols instead of eighteen.** The text of ten small protocols moved verbatim, anchors included: working rules, specification, architecture, the task capsule and the TDD loop into `protocols/build.md`; plan audit, seams and council reconciliation into `protocols/audit.md`; lessons into `protocols/wiki.md`. `protocols/discovery.md` (only a pointer to the start since 0.4.2) is gone. Contract IDs `VCM-…` are unchanged; the capability ledger names the new owners.
|
|
23
|
+
- **Checks without an extra round** (owner's decision of 2026-11-01). `protocols/audit.md` is the single owner of check rules: what each check is for, when it runs (plan audit before approval and `preflight`, code review after a slice with green tests), strictness — the stricter of the plan's classification and the project depth, one scale for plans and code, one full round and then one check of the fixes only, what to hand the read-only reviewer, how to write the report. A plan draft is always checked against the real situation (`plan.md` Stage D: every FACT by a file, code or command output, a guess by experience or HYPOTHESIS), for every scale. Critical/high are fixed and only the fix is checked; medium/low are fixed or written down with a reason, and the work stops. The human's «проверь ещё раз» always means a check.
|
|
24
|
+
- **One scale** — `critical | high | medium | low` with meanings for plans and code, word for word the same in `protocols/audit.md`, `.claude/agents/code-reviewer.md` and the Cowork runbook. `doctor`'s own message levels (`critical`, `error`, `warning`, `info`) are a different thing and do not change.
|
|
25
|
+
- `code-reviewer` knows three kinds of work — slice review, plan audit, fix check — returns findings in the sample's format and writes no file: the author writes the report without changing the reviewer's words, IDs or evidence.
|
|
26
|
+
- `governance` of a plan is never below the project depth; below it, the depth applies. The starter `governance: light` plan in a `standard` project is no longer a contradiction.
|
|
27
|
+
- **A small task** (`QUICK`) has its mini-plan in `wiki/plans/` (`kind: mini`, `scale: quick`: goal, files, check, risk, stop gate, what was checked) and is approved and closed like any plan; one confirmed red test per set. A small edit while another plan is active becomes a new slice of that plan after the human's «да» and a new digest. «The plan must define…» applies to FEATURE and up.
|
|
28
|
+
- **Labels:** one table in `protocols/plan.md` with Russian names and when to use each; the plan template uses the same six; three are enough in conversation.
|
|
29
|
+
- **New session:** one sentence in four places — `.claude/rules/maestro.md`, `protocols/build.md`, `protocols/handoff.md`, `protocols/plan.md` — advised by `context`, also after plan approval (no longer «always a new session»).
|
|
30
|
+
- **Ask the human only about what they understand and own** — what we do, money, sending to people and publishing, deleting what cannot be restored, their accounts and settings. Tests, plan and code checks, fix checks and GitHub checks run inside the work. At the end of a slice, a plain-words summary in two or three lines; the handoff template has a «Итог для человека» section. No new confirmations.
|
|
31
|
+
- **Ticks do not break the approval digest:** `[x]`/`[X]` in list items count as `[ ]`; editing an item's text still closes the gate. Plans approved before keep working: the previous digest of unchanged text is accepted. The plan template lists «done» criteria as `- [ ]`.
|
|
32
|
+
- **`pack --out dist/`** (or `dist\`) is a folder: it is created and the archive goes inside under the default name (it used to become a file named `dist`).
|
|
33
|
+
- **`HANDOVER.md`** says «доступов не было, менять нечего» instead of «смените все пароли и ключи» only when every access section of the passport — «Где работает», «Домен и DNS», «Данные, базы, резервные копии», «Внешние сервисы и чей аккаунт», «Переменные окружения» — is «не применимо». Any doubt keeps the old step.
|
|
34
|
+
- **`context` takes the window from the model** named in the transcript: 200 000 for a closed list of past models (Claude 3.x, Opus 4/4.1/4.5, Sonnet 4/4.5, Haiku 4.5; a session already larger means 1 000 000, as before), 1 000 000 for newer Claude models. An unknown name is said plainly with a hint to use `--window`, which still wins. A «Модель … — окно …» line; JSON gains `model` and `windowSource`.
|
|
35
|
+
- `protocols/completion.md`: `pack --dry-run` first; the agent checks and cleans the list and gives the human a summary; packing and sending stay behind «да». What stays open, including findings «не исправляем», is named in the final handoff.
|
|
36
|
+
- The template engine leaves GitHub `${{ … }}` expressions alone; any other unknown `{{…}}` still fails.
|
|
37
|
+
- The `vibe-maestro` companion package (0.1.7) depends on exactly `create-vibe-maestro@0.4.3`.
|
|
38
|
+
- Upgrade tests use projects generated by the real published 0.4.2 package.
|
|
39
|
+
- From the independent review: a small edit mid-plan needs a corner check of the new slice and the usual slice review, not a new audit of the whole plan, unless it changes approach, boundaries, classification, data, security or deployment (one «new risk» list everywhere); deleting or rewriting a file in a normal commit is an edit, not a destructive action — a confirmation is for what cannot be restored; the GitHub workflow sample runs the quick job on every push, `main` included; `upgrade` reminds to add `wiki/icebox.md` to the project's own `wiki/index.md` and gives a complete hint for a modified retired file; `context` reads Bedrock `global.` model names and judges a session larger than 200 000 by the current model only; `pack` does not take a URL path for an internal folder or a year for a plan number and catches «по плану 0002»; the starter mini-plan has the QUICK shape.
|
|
40
|
+
- From the live run of a small task: a medium/low fixed after the last fix check closes without a new round; a review with no findings is written in the slice handoff, not in `wiki/audits/` (doctor needs at least one finding); `preflight` and `doctor` name both kinds of «да» for a changed plan — a repeated «план утверждаю» or the «да» to a small edit mid-plan; `pack --dry-run` works before the delivery tag (it shows the last commit), so the list is cleaned before the tag is set once; the tag name goes into the passport before tagging; the passport template and `pack` say that «не применимо» with an explanation counts as an access record.
|
|
41
|
+
|
|
42
|
+
### For those who create projects with their own scripts
|
|
43
|
+
|
|
44
|
+
- **Fewer protocols.** Removed: `protocols/discovery.md`, `seams.md`, `lessons.md`, `context-budget.md` and the `protocols/build/` folder. Their text is in `protocols/build.md`, `protocols/audit.md`, `protocols/wiki.md`; the `VCM-…` anchors are unchanged. If you link to the old paths, replace them.
|
|
45
|
+
- **`upgrade` removes** untouched Maestro files that left the canon; a modified one stops it (`upgrade-removed-modified`). `--json` gains the field `removes`; the rest is unchanged. `upgrade --diff` shows the changes themselves. A project's own `maestro/templates/audit.md` stops the upgrade (`upgrade-template-collision`): rename it.
|
|
46
|
+
- **New files:** `maestro/templates/audit.md` (Maestro), `wiki/icebox.md` (project). Projects before 0.4.3: `.claude/settings.json` belongs to the project — add `Edit(/maestro/templates/audit.md)` to `deny` if you want the same protection.
|
|
47
|
+
- **Labels do not change:** FACT, HYPOTHESIS, UNKNOWN, HUMAN_DECISION, AGENT_PROPOSAL, OPEN_QUESTION.
|
|
48
|
+
- **The report scale is the same** — `critical|high|medium|low`; there is now a sample. `doctor`'s rules for `wiki/audits/` do not change; finding IDs must be Latin letters, digits, `.`, `-`, `_`. Medium/low left unfixed stay `status: open` with `resolution: не исправляем — причина; где записано` — `doctor` stays green; critical/high are closed only after a verified fix. `doctor`'s own message levels do not change.
|
|
49
|
+
- **Checks:** the plan is always checked against the real situation; after code review only the fixes are checked. A hub rule like «a clean plan — one round; only medium/low — write down and go on» agrees with this and may stay.
|
|
50
|
+
- **QUICK mini-plan** lives in `wiki/plans/` (`kind: mini`, `scale: quick`) and is approved like any plan. `preflight --scale quick --quick …` works as before, but the protocols no longer offer it.
|
|
51
|
+
- **Strictness — the stricter of two:** the plan's classification and the project depth. Small tasks run lighter in a `--depth light` project; whoever creates the project chooses.
|
|
52
|
+
- **Plan digest:** `[x]` ticks in lists are not counted; old digests of unchanged plans are accepted.
|
|
53
|
+
- **`pack`:** `--out` ending with `/` or `\` is a folder; `--dry-run` shows the list without writing (before the tag it shows the last commit); highlights are warnings, the exit code is unchanged, JSON gains `highlights`, `noAccess`, and in dry-run `dryRun`, `entries`, `untagged`; without accesses in the passport `HANDOVER.md` says «доступов не было» instead of «смените все пароли и ключи» — if your script looks for that line, take it into account.
|
|
54
|
+
- **`context`:** the window comes from the model in the transcript; the line «За сессию модель получила на вход …» and the `totalInputTokens` field are unchanged; JSON gains `model` and `windowSource`.
|
|
55
|
+
- **GitHub checks:** the agent's rule — check locally before pushing, push in a batch, run a GitHub check by hand only for what cannot be checked locally, do not wait after a push. The template's `.claude/settings.json` gains no `ask` rule for it.
|
|
56
|
+
- **Asking the human:** only about what they understand and own; technical checks run without questions, the slice summary is in plain words. No new confirmations.
|
|
57
|
+
- **Unchanged:** section names of `wiki/hot.md`, the `start:` flag in `wiki/concepts/discovery.md`, the materials place `maestro/inbox/` and the `-text` rule, `create --yes` without a repository.
|
|
58
|
+
- The `vibe-maestro` companion 0.1.7 depends on exactly `create-vibe-maestro@0.4.3`.
|
|
59
|
+
|
|
60
|
+
## 0.4.2 — 2026-11-01
|
|
61
|
+
|
|
62
|
+
The third part of 0.4: starting a project. One first step everywhere — create → `/start` → `/plan`; materials in one place, kept byte for byte; a private copy in the cloud from day one. The set of project files changes; `vibe-maestro upgrade` migrates projects from 0.4.1, 0.4.0, 0.3.1, 0.3.0, 0.3.0-beta.1 – beta.4 and 0.2.0-beta.1.
|
|
63
|
+
|
|
64
|
+
### Added
|
|
65
|
+
|
|
66
|
+
- **`/start` with its own protocol `protocols/start.md`** (managed, command `.claude/commands/start.md`). The first session reads what already exists — the starting point from `create --start`, materials in `maestro/inbox/` (large files through the `explorer` subagent), what the human said, code in another folder only read-only through `sources`, asking for the path. Then it asks one question at a time, in plain words: seven about the task (what we make; for whom; who gets the result — kept or handed to a customer, team, employer; what «done» means; what else exists; what we do not do; constraints — laws, platform rules, other people's personal data) and six about how we work (who decides and on whose behalf the agent may write; what only after a separate «да»; code right after plan approval or on «начинай»; how to talk; how to hand over keys; where the copy lives and how to restore), each with the agent's proposal as the default. Deadlines and budget are not asked; if named, they are written down. Found answers are shown with their source and a «верно?»; «не знаю» is recorded as UNKNOWN. A draft is kept in the project, so the human can stop and continue; `/start` can be run again to revise one agreement. A one-screen summary with the rhythm of slices, then writing only after «да»: the task to `wiki/concepts/discovery.md`, how we work to the «Как работаем» section of `.claude/rules/project.md` (other sections untouched), the copy and restore to `wiki/restore.md`, the cloud address to the passport. Protections in `settings.json` change only on a separate «да». `protocols/discovery.md` now points to the start; the capabilities `discovery-before-code` and new `project-start` live in `start.md`.
|
|
67
|
+
- **Start flag** `start:` in the `wiki/concepts/discovery.md` header: `not_started` → `in_progress` → `done`; `skipped` when the human declines. `protocols/plan.md` Stage A reads the start answers and does not ask again; if the start is not done it offers it once, and after a refusal asks only what the plan needs.
|
|
68
|
+
- **`wiki/restore.md`** (belongs to the project): what is in the cloud (address in the passport), what is not (`.env`, key values, personal settings), what to install, how to get the project, how to check it.
|
|
69
|
+
- **`README.md`** for a new project, only when the folder has no README of any name; it says the file is read first, also by the recipient, and asks to rewrite it. It is not in the inventory `doctor` checks and may be deleted.
|
|
70
|
+
- **A copy in the cloud from day one.** The wizard offers «Создать новый проект и закрытую копию на GitHub» as the last option of its first question, only when the GitHub CLI `gh` is installed and logged in (checked while the welcome is shown, 3 s timeout); still three decisions. For scripts: `create --github`. After the first commit: `gh repo create <name> --private --source <folder> --remote origin --push`; the name is Latin from the folder name (Cyrillic transliterated, empty → `project-YYYYMMDD`). Any `gh` failure is a warning with the command for later; the project stays and the exit code is 0. `--github` with `--no-git` is an error before writing.
|
|
71
|
+
- **`create --push-without-asking`** for new projects: `settings.json` gets the guide recipe — plain `git push` allowed; force pushes (`--force`, `-f`, `+branch`) and deleting in the cloud (`--delete`, `-d`, `--mirror`, `--prune`) still ask; one `ask` key. `.claude/rules/maestro.md` names this exception to «push only after a separate „да“».
|
|
72
|
+
- `doctor` `info` findings from local Git data only, no network: `git-no-remote`, `git-no-upstream`, `git-unpushed`. They do not fail `--strict` or `preflight`.
|
|
73
|
+
- `maestro/inbox/.gitattributes` (managed, `* -text`, written by code like the root `.gitattributes`): Git keeps materials byte for byte, a fresh clone returns the original bytes on any `core.autocrlf`.
|
|
74
|
+
- Rules for everyone in `.claude/rules/maestro.md`: check a person's proposal against what already exists and say so if it is not needed or done; plain words, a technical term only with its meaning. «Выбор навыков» in `protocols/plan.md`: installed, GitHub and official Anthropic catalogs; compare several, check `SKILL.md`, `allowed-tools`, hooks; pick the best; install only after «да». Maestro installs nothing itself.
|
|
75
|
+
|
|
76
|
+
### Changed
|
|
77
|
+
|
|
78
|
+
- One first step in five places — the create screen, `wiki/hot.md`, `wiki/plans/0001-starter.md`, `.claude/rules/maestro.md`, the README — and in the user guide: create → `/start` → `/plan`. Section names of `wiki/hot.md` are unchanged.
|
|
79
|
+
- **Materials without a red check.** `inbox-not-empty` is removed: files in `maestro/inbox/` are not a finding, even with `--strict`. `source-hashes-missing` (still critical) now says that `maestro/sources/` holds only `sources --write` snapshots and points to `maestro/inbox/`. The create screen, `maestro/inbox/README.md` and `protocols/plan.md` say the same.
|
|
80
|
+
- `maestro/runbooks/cowork-discovery.md` no longer says Claude Code does not rewrite discovery: Cowork prepares material for `maestro/inbox/`, `/start` writes the answers.
|
|
81
|
+
- The passport template says it goes to the recipient in `HANDOVER.md` and should be written for them.
|
|
82
|
+
- The `vibe-maestro` companion package (0.1.6) depends on exactly `create-vibe-maestro@0.4.2`.
|
|
83
|
+
- Upgrade tests use projects generated by the real published 0.4.1 package.
|
|
84
|
+
|
|
85
|
+
### For those who create projects with their own scripts
|
|
86
|
+
|
|
87
|
+
- **Place for materials** — `maestro/inbox/`. Files there no longer give `inbox-not-empty` (it is gone). `maestro/sources/` is only for `vibe-maestro sources --write` snapshots; your own files there are still critical (`source-hashes-missing`).
|
|
88
|
+
- **The `-text` rule.** `create` and `upgrade` write `maestro/inbox/.gitattributes` with `* -text`: Git does not change line endings, a fresh clone returns the original bytes. Your own folder for other people's files — put the same `.gitattributes` there. Materials that were committed before the rule are not re-read by Git on their own: run `git add --renormalize maestro/inbox` and commit (checked on Git 2.54: a file Git has already seen is not shown as modified after the rule appears). If a file was already normalized (for example, taken from a fresh clone on another computer), the original bytes exist only in its source.
|
|
89
|
+
- **The start flag** — `start: done` in the `wiki/concepts/discovery.md` header. Set it right after `create`, and `/plan` will not offer the start. Values: `not_started`, `in_progress`, `done`, `skipped`. No field = not done.
|
|
90
|
+
- **Section names of `wiki/hot.md` do not change:** «Сейчас в работе», «Открытые вопросы», «Следующий шаг». Only the text inside changes for new projects.
|
|
91
|
+
- **`create --yes` creates no repository.** A private GitHub repository only with `--github`; push without asking only with `--push-without-asking`. Neither flag acts on a repeated `create` of an existing project.
|
|
92
|
+
- **New project files:** `protocols/start.md`, `.claude/commands/start.md`, `maestro/inbox/.gitattributes` (Maestro); `wiki/restore.md` (project). `README.md` only when the root has no README; `doctor` does not require it.
|
|
93
|
+
- **`doctor`:** new findings `git-no-remote`, `git-no-upstream`, `git-unpushed` are `info` and block neither `--strict` nor `preflight`.
|
|
94
|
+
- **Your own `.claude/commands/start.md`** stops `upgrade` with a clear message: rename it (for example, to `my-start.md`) and run again.
|
|
95
|
+
- **Projects before 0.4.2:** `.claude/settings.json` belongs to the project and `upgrade` does not change it — add `Edit(/.claude/commands/start.md)` and `Edit(/maestro/inbox/.gitattributes)` to `deny` if you want the same protection.
|
|
96
|
+
|
|
7
97
|
## 0.4.1 — 2026-10-31
|
|
8
98
|
|
|
9
99
|
The second part of 0.4: packing a project for the customer and measuring the session. The set of project files is unchanged; `upgrade` from 0.4.0 rewrites the pinned version, `.claude/rules/maestro.md`, `protocols/handoff.md` and `protocols/completion.md`.
|
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
</p>
|
|
26
26
|
|
|
27
27
|
> [!IMPORTANT]
|
|
28
|
-
> **0.4.
|
|
28
|
+
> **0.4.3 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
|
|
|
@@ -47,15 +47,13 @@ The recording shows the create-and-`doctor` surface of an earlier beta; the Plan
|
|
|
47
47
|
|
|
48
48
|
## Quick start
|
|
49
49
|
|
|
50
|
-
**Requirements:** Node.js 20.10 or newer, npm, and Git. Nothing to clone or build.
|
|
51
|
-
|
|
52
|
-
Run the guided setup:
|
|
50
|
+
**Requirements:** Node.js 20.10 or newer, npm, and Git. Nothing to clone or build. Run the guided setup:
|
|
53
51
|
|
|
54
52
|
```bash
|
|
55
53
|
npx create-vibe-maestro@latest
|
|
56
54
|
```
|
|
57
55
|
|
|
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.
|
|
56
|
+
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. When the GitHub CLI (`gh`) is installed and you are logged in, the first question also offers «Создать новый проект и закрытую копию на GitHub». Set `NO_COLOR=1` if you need plain output.
|
|
59
57
|
|
|
60
58
|
Or pass every decision explicitly:
|
|
61
59
|
|
|
@@ -63,7 +61,7 @@ Or pass every decision explicitly:
|
|
|
63
61
|
npx create-vibe-maestro@latest --yes --target "My Project" --name "My Project" --start idea --depth standard
|
|
64
62
|
```
|
|
65
63
|
|
|
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):
|
|
64
|
+
Maestro creates the project, initializes Git on `main`, makes the initial commit, and runs `doctor`. Two optional flags for scripts: `--github` creates a private GitHub repository after the first commit (`gh repo create … --private --source … --remote origin --push`; any `gh` failure is only a warning with the command for later), and `--push-without-asking` lets the agent run a plain `git push` without a question while force pushes still ask. Without them `create --yes` creates no repository and keeps the default protections. 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):
|
|
67
65
|
|
|
68
66
|
```bash
|
|
69
67
|
cd "My Project"
|
|
@@ -74,34 +72,36 @@ Expected result:
|
|
|
74
72
|
|
|
75
73
|
```text
|
|
76
74
|
Vibe Coding Maestro doctor: всё сходится.
|
|
75
|
+
- git-no-remote: Копии проекта в облаке нет: у репозитория нет remote. …
|
|
77
76
|
```
|
|
78
77
|
|
|
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.
|
|
78
|
+
The second line is `info` (from local Git data only; it never fails `doctor`, `--strict` or `preflight`) and disappears once the project has a copy in the cloud. `@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.
|
|
80
79
|
|
|
81
80
|
> [!WARNING]
|
|
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, 0.3.0). 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.
|
|
81
|
+
> **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, 0.3.0, 0.3.1, 0.4.0, 0.4.1, 0.4.2). 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.
|
|
83
82
|
|
|
84
83
|
## Что дальше после создания проекта: Planning Gate
|
|
85
84
|
|
|
86
|
-
Проект создан — **откройте созданную папку** (`My Project`) в Claude Code
|
|
85
|
+
Проект создан — **откройте созданную папку** (`My Project`) в Claude Code. Первый шаг один: `/start`, потом `/plan`. Дальше работа идёт по одному маршруту: сначала план, который утверждает человек, и только потом код.
|
|
87
86
|
|
|
88
87
|
```text
|
|
89
|
-
|
|
88
|
+
создание → /start → /plan → классификация → черновик плана
|
|
90
89
|
→ человек утверждает → preflight → /build одной порции → тесты и doctor → /handoff
|
|
91
90
|
```
|
|
92
91
|
|
|
93
|
-
1.
|
|
94
|
-
2.
|
|
95
|
-
3.
|
|
96
|
-
4.
|
|
97
|
-
5.
|
|
98
|
-
6.
|
|
99
|
-
7.
|
|
100
|
-
8.
|
|
92
|
+
1. **Материалы**, если есть, — заметки, требования, скриншоты — положите в `maestro/inbox/`. Готовый код оставьте, где лежит: `/start` спросит путь и прочитает его только на чтение.
|
|
93
|
+
2. **Напишите `/start`** — знакомство с задачей. Агент сначала читает, что уже есть, потом спрашивает по одному вопросу: о задаче (что делаем, для кого, кому отдаём результат, что значит «готово», что ещё есть, чего не делаем, ограничения) и о том, как работаем (кто решает, что только после вашего «да», когда начинать код, как говорить, как отдавать ключи, где копия проекта). «Не знаю» — нормальный ответ. Можно прерваться и продолжить. После вашего «да» на сводку ответы записываются в проект. Агент без команд (Codex и другие) проходит старт по `protocols/start.md`.
|
|
94
|
+
3. **Попросите план.** В Claude Code это команда `/plan`, в Cowork — фраза «план» по runbook `maestro/runbooks/cowork-plan.md`. Это две разные двери в один и тот же канонический `protocols/plan.md`. План не переспрашивает ответы старта.
|
|
95
|
+
4. **Проверьте классификацию.** Агент называет масштаб, режим, глубину гарантий, риск и профили с причинами. Вы можете принять её, изменить или сузить объём.
|
|
96
|
+
5. **Покажите существующий код**, если он есть: команда `sources` читает его read-only и по умолчанию ничего не пишет.
|
|
97
|
+
6. **Получите черновик** в `wiki/plans/<номер>-<слаг>.md`. Пока он `draft`, гейт показывает `CODE_ALLOWED: NO`.
|
|
98
|
+
7. **Утвердите план сами** — словами «план утверждаю». После этих слов агент сам записывает поля плана, объявляет его в `wiki/hot.md` и ставит отпечаток утверждения: если текст плана потом изменится, `doctor` и `preflight` это заметят. Maestro не может механически отличить, кто заполнил поля — человек или агент: следите, чтобы они появлялись только после ваших слов.
|
|
99
|
+
8. **Проверьте право на код** механическим гейтом `preflight` (команды ниже).
|
|
100
|
+
9. **`/build` ровно одной порции — лучше в новой сессии** → тесты → `doctor` → `/handoff`. Агент правит только файлы из раздела плана «Где правим».
|
|
101
101
|
|
|
102
102
|
### Откуда запускать команды
|
|
103
103
|
|
|
104
|
-
- `/plan`, `/build`, `/status`, `/wiki`, `/handoff` — внутри **папки проекта**, открытой в Claude Code.
|
|
104
|
+
- `/start`, `/plan`, `/build`, `/status`, `/wiki`, `/handoff` — внутри **папки проекта**, открытой в Claude Code.
|
|
105
105
|
- `doctor`, `preflight`, `sources`, `upgrade` — тоже из **папки проекта**, через `npx`, с `--path .`. Точная команда с версией вашего проекта записана в его `.claude/rules/maestro.md`; ниже — общая форма:
|
|
106
106
|
|
|
107
107
|
```bash
|
|
@@ -114,7 +114,7 @@ npx --package create-vibe-maestro@latest vibe-maestro doctor --path .
|
|
|
114
114
|
|
|
115
115
|
| Масштаб | Что создаётся |
|
|
116
116
|
|---|---|
|
|
117
|
-
| `QUICK` | mini-plan в `wiki/
|
|
117
|
+
| `QUICK` | mini-plan в `wiki/plans/` — тот же путь, что у любого плана, без тяжёлого пакета планирования |
|
|
118
118
|
| `FEATURE` | один план `wiki/plans/<номер>-<слаг>.md` |
|
|
119
119
|
| `PROJECT` | полный пакет планирования в одном основном плане |
|
|
120
120
|
| `PROGRAM` / `INTEGRATION` | `wiki/programs/<слаг>/`: программа, фазы и source inventory |
|
|
@@ -143,13 +143,14 @@ A Standard project starts with a structure like this:
|
|
|
143
143
|
My Project/
|
|
144
144
|
├── AGENTS.md # yours: entry for Codex and other AGENTS.md tools
|
|
145
145
|
├── CLAUDE.md # yours: project instructions for Claude Code
|
|
146
|
+
├── README.md # yours: only when the folder had no README; rewrite it for your reader
|
|
146
147
|
├── .claude/rules/ # maestro.md (Maestro rules, loaded every session) + project.md (yours)
|
|
147
148
|
├── .claude/settings.json # yours: default deny/ask rules (Maestro files, push, publish)
|
|
148
|
-
├── .claude/commands/ # /status, /plan, /build, /wiki, /handoff adapters
|
|
149
|
+
├── .claude/commands/ # /start, /status, /plan, /build, /wiki, /handoff adapters
|
|
149
150
|
├── .claude/agents/ # read-only code-reviewer and explorer
|
|
150
|
-
├── protocols/ # canonical
|
|
151
|
-
├── wiki/ # shared memory: plans, decisions, progress, audits
|
|
152
|
-
├── maestro/ # inbox
|
|
151
|
+
├── protocols/ # eight canonical protocols: start, plan, build, audit, wiki, status, handoff, completion
|
|
152
|
+
├── wiki/ # shared memory: start answers, plans, decisions, progress, audits, passport, restore page
|
|
153
|
+
├── maestro/ # inbox for your materials (kept byte for byte), runbooks, and templates
|
|
153
154
|
└── .maestro/ # manifest, ownership inventory and integrity metadata
|
|
154
155
|
```
|
|
155
156
|
|
|
@@ -177,10 +178,11 @@ From there, `protocols/build.md` routes the agent through the relevant rules, pl
|
|
|
177
178
|
|
|
178
179
|
## A normal working cycle
|
|
179
180
|
|
|
180
|
-
The guided path above is the whole cycle: material in `maestro/inbox/` → plan → human approval → one bounded build with tests and live evidence → `doctor` → handoff, then a new session for the next slice (`vibe-maestro context` tells the agent how large the session has grown). When the last slice is done, `protocols/completion.md` walks through delivery or closing: criteria checked, tests green, a delivery tag, a complete project passport (`wiki/passport.md`: where everything lives, names of environment variables but never their values), customer documents, a final handoff; `vibe-maestro pack` builds the customer archive from the delivery tag. Independent audit findings are recorded with stable IDs; open `high` or `critical` findings block a green doctor result.
|
|
181
|
+
The guided path above is the whole cycle: material in `maestro/inbox/` → `/start` (getting to know the task) → plan → human approval → one bounded build with tests and live evidence → `doctor` → handoff, then a new session for the next slice (`vibe-maestro context` tells the agent how large the session has grown). When the last slice is done, `protocols/completion.md` walks through delivery or closing: criteria checked, tests green, a delivery tag, a complete project passport (`wiki/passport.md`: where everything lives, names of environment variables but never their values), customer documents, a final handoff; `vibe-maestro pack` builds the customer archive from the delivery tag. Checks run once: the plan is always checked against the real situation, a plan audit before approval, one code review per slice, then only the fixes are re-checked; the agent runs tests and checks itself and asks the human only about what they understand and own. Independent audit findings are recorded with stable IDs on one `critical | high | medium | low` scale (sample: `maestro/templates/audit.md`); open `high` or `critical` findings block a green doctor result.
|
|
181
182
|
|
|
182
|
-
Claude Code projects receive
|
|
183
|
+
Claude Code projects receive six thin commands:
|
|
183
184
|
|
|
185
|
+
- `/start` — the first session: read what already exists, then agree on the task and on how we work, one question at a time;
|
|
184
186
|
- `/status` — read current context without changing files;
|
|
185
187
|
- `/plan` — follow the canonical planning protocol up to the human approval gate;
|
|
186
188
|
- `/build` — follow the canonical build protocol;
|
|
@@ -204,8 +206,8 @@ Maestro is deliberately conservative around existing data and Git state:
|
|
|
204
206
|
- `.claude/settings.json` ships default rules for Claude Code: its file tools are denied Maestro files, and `git push`, `npm publish`, `rm -rf` and `git reset --hard` ask first; this is not a sandbox, and the file belongs to the project, so a team can change the rules — see [how to tune protections for a project](docs/USER_GUIDE.md#как-подстроить-защиты-под-проект) (Russian);
|
|
205
207
|
- API keys live only in `.env`, which `.gitignore` excludes and `doctor` reports if Git tracks it; the agent writes a key you paste into `.env` itself, or opens `.env` in an editor for you to paste it (a key typed into the chat stays in the session history);
|
|
206
208
|
- `sources` reads existing code read-only and writes nothing without an explicit `--write`;
|
|
207
|
-
- `pack` builds the customer archive only from a delivery tag, leaves Maestro and agent folders out, adds `HANDOVER.md` with «change all passwords and keys
|
|
208
|
-
- `upgrade` is a dry run without `--apply
|
|
209
|
+
- `pack` builds the customer archive only from a delivery tag, leaves Maestro and agent folders out, adds `HANDOVER.md` with «change all passwords and keys» (or «there were no accesses» when every access section of the passport is «не применимо»), refuses on common kinds of secrets (a sieve, not a guarantee) or an incomplete passport, and gives the same bytes for the same tag; `pack --dry-run` shows the archive list first and highlights service files, personal paths, Maestro names, internal folders and plan numbers;
|
|
210
|
+
- `upgrade` is a dry run without `--apply` (`--diff` prints the changes themselves), refuses a modified managed file, removes only untouched Maestro files that left the canon, and rolls back a failed apply;
|
|
209
211
|
- generated projects pin the exact Maestro version instead of `@latest`, so a new release cannot change a project's checks until someone runs `upgrade`;
|
|
210
212
|
- there is intentionally no `doctor --fix` that could overwrite useful work.
|
|
211
213
|
|
|
@@ -252,7 +254,7 @@ The core format is vendor-neutral; integration depth is not identical across too
|
|
|
252
254
|
| Interface | Level in 0.3 | What is available |
|
|
253
255
|
|---|---|---|
|
|
254
256
|
| Humans | Native | Plain Markdown, Git diffs, explicit ownership, runbooks |
|
|
255
|
-
| Claude Code | Native adapter | `.claude/rules/` loaded every session,
|
|
257
|
+
| Claude Code | Native adapter | `.claude/rules/` loaded every session, six project commands including `/start` and `/plan`, read-only reviewer and explorer, default `settings.json` |
|
|
256
258
|
| Codex and other `AGENTS.md` tools | Generic adapter | Universal `AGENTS.md` entry into canonical protocols |
|
|
257
259
|
| Cursor and other filesystem-aware tools | Generic | They can read the same Markdown; no dedicated adapter yet |
|
|
258
260
|
| Cowork-style research/audit | Runbook | Copyable plan, discovery, and independent-audit workflows; human imports the result |
|
|
@@ -269,7 +271,7 @@ Run the preview from the project folder; it writes nothing:
|
|
|
269
271
|
npx --package create-vibe-maestro@latest vibe-maestro upgrade --path .
|
|
270
272
|
```
|
|
271
273
|
|
|
272
|
-
It lists every file it would add or
|
|
274
|
+
It lists every file it would add, update or remove, with changed line counts, and prints the exact command, with the exact version, that applies the change (`--apply`); `--diff` prints the changes line by line. A file you edited by hand is never overwritten or removed: the upgrade stops and names it. Moving to 0.4.3 removes ten small protocols whose text moved into `protocols/build.md`, `protocols/audit.md` and `protocols/wiki.md`, and adds `maestro/templates/audit.md` and `wiki/icebox.md`. Moving to 0.4.2 adds the `/start` command and protocol, `maestro/inbox/.gitattributes` and `wiki/restore.md`, and a `README.md` only if the project has no README of any name; if materials already sit in `maestro/inbox/`, run `git add --renormalize maestro/inbox` before committing so Git keeps them byte for byte. 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.
|
|
273
275
|
|
|
274
276
|
## Automation and CI
|
|
275
277
|
|
|
@@ -292,14 +294,15 @@ npx --package create-vibe-maestro@latest vibe-maestro upgrade --path .
|
|
|
292
294
|
|
|
293
295
|
`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`.
|
|
294
296
|
|
|
295
|
-
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.
|
|
297
|
+
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, 0.3.x, 0.4.0, 0.4.1 and 0.4.2. Pull requests and `main` run on Ubuntu, macOS, and Windows with Node.js 20 and 22; a branch push runs one quick Ubuntu job.
|
|
296
298
|
|
|
297
299
|
## Current scope
|
|
298
300
|
|
|
299
301
|
Available now:
|
|
300
302
|
|
|
301
|
-
- Guided First Run;
|
|
302
|
-
- fresh canonical project creation;
|
|
303
|
+
- Guided First Run, with an optional private GitHub copy when `gh` is logged in;
|
|
304
|
+
- fresh canonical project creation, then `/start`: the first session reads what exists and agrees on the task and on how we work, one question at a time;
|
|
305
|
+
- `maestro/inbox/` as the one place for materials, kept byte for byte by Git;
|
|
303
306
|
- Planning Gate: `/plan`, Cowork plan runbook, project plans, and the human approval gate;
|
|
304
307
|
- mechanical `preflight` before the first line of code;
|
|
305
308
|
- read-only `sources` inventory of existing code;
|
|
@@ -327,7 +330,7 @@ Not available yet:
|
|
|
327
330
|
- automatic installation or execution of third-party skills;
|
|
328
331
|
- a guarantee that an AI agent will not make mistakes.
|
|
329
332
|
|
|
330
|
-
What comes next — a
|
|
333
|
+
What comes next — checks with a cutoff, one set of labels, and project memory that does not grow — is listed in the [roadmap](docs/ROADMAP.md).
|
|
331
334
|
|
|
332
335
|
## Documentation
|
|
333
336
|
|
package/dist/cli/context-run.js
CHANGED
|
@@ -18,6 +18,15 @@ const ADVICE = {
|
|
|
18
18
|
'finish-slice': 'Порцию лучше закончить в этой сессии, а следующую начать в новой — после передачи дел (/handoff).',
|
|
19
19
|
'new-session': 'Пора в новую сессию: сделайте передачу дел (/handoff) сейчас и продолжайте в новой.',
|
|
20
20
|
};
|
|
21
|
+
/** Откуда взято окно — одной строкой. */
|
|
22
|
+
function windowLine(source, model, budget) {
|
|
23
|
+
if (source === 'option')
|
|
24
|
+
return `Окно задано вручную (--window): ${formatTokens(budget)} ${tokensWord(budget)}.`;
|
|
25
|
+
if (source === 'model' && model !== undefined)
|
|
26
|
+
return `Модель ${model} — окно ${formatTokens(budget)} ${tokensWord(budget)}.`;
|
|
27
|
+
const name = model === undefined ? 'в журнале не названа' : `«${model}» мне незнакома`;
|
|
28
|
+
return `Модель ${name}: окно взято ${formatTokens(budget)} ${tokensWord(budget)} по размеру сессии. Знаете окно этой модели — задайте его: --window <токены>.`;
|
|
29
|
+
}
|
|
21
30
|
export async function executeContextCommand(options, io) {
|
|
22
31
|
const report = await measureContext({ root: options.path, ...(options.window === undefined ? {} : { budget: options.window }) });
|
|
23
32
|
if (options.json) {
|
|
@@ -30,6 +39,7 @@ export async function executeContextCommand(options, io) {
|
|
|
30
39
|
}
|
|
31
40
|
const tokens = report.contextTokens ?? 0;
|
|
32
41
|
io.out(`Размер сессии: ${formatTokens(tokens)} ${tokensWord(tokens)} (${report.percent}% окна модели в ${formatTokens(report.budget)}).`);
|
|
42
|
+
io.out(windowLine(report.windowSource, report.model, report.budget));
|
|
33
43
|
io.out(ADVICE[report.level]);
|
|
34
44
|
const total = report.totalInputTokens ?? 0;
|
|
35
45
|
io.out(`За сессию модель получила на вход ${formatTokens(total)} ${tokensWord(total)} (шагов модели: ${report.requests}): каждый шаг заново пересылает всю историю.`);
|
package/dist/cli/create-run.js
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
|
+
import { execFile } from 'node:child_process';
|
|
1
2
|
import { basename } from 'node:path';
|
|
3
|
+
import { promisify } from 'node:util';
|
|
2
4
|
import { doctorProject } from '../core/doctor.js';
|
|
3
5
|
import { describeFsError } from '../core/fs-errors.js';
|
|
6
|
+
import { createGithubCopy, displayRemoteUrl, githubCreateCommand, githubRepoName } from '../core/github.js';
|
|
4
7
|
import { initProject } from '../core/init.js';
|
|
8
|
+
import { onDiskBasename } from '../core/platform-paths.js';
|
|
5
9
|
import { EXIT_FAILED, EXIT_OK } from './io.js';
|
|
6
|
-
|
|
10
|
+
const execFileAsync = promisify(execFile);
|
|
11
|
+
export async function executeCreate(options, io, renderer, gh) {
|
|
7
12
|
try {
|
|
8
|
-
return await createAndCheck(options, io, renderer);
|
|
13
|
+
return await createAndCheck(options, io, renderer, gh);
|
|
9
14
|
}
|
|
10
15
|
catch (cause) {
|
|
11
16
|
// initProject сам переводит ошибки записи; сюда доходит только непредвиденное.
|
|
@@ -19,12 +24,60 @@ export async function executeCreate(options, io, renderer) {
|
|
|
19
24
|
return EXIT_FAILED;
|
|
20
25
|
}
|
|
21
26
|
}
|
|
22
|
-
async function
|
|
27
|
+
async function hasRemote(root) {
|
|
28
|
+
const remotes = await execFileAsync('git', ['remote'], { cwd: root, encoding: 'utf8' }).catch(() => null);
|
|
29
|
+
return remotes !== null && remotes.stdout.trim() !== '';
|
|
30
|
+
}
|
|
31
|
+
/** Адрес копии в облаке по локальным данным Git: origin, иначе первый remote; нет — null. */
|
|
32
|
+
async function remoteUrl(root) {
|
|
33
|
+
const remotes = await execFileAsync('git', ['remote'], { cwd: root, encoding: 'utf8' }).catch(() => null);
|
|
34
|
+
const names = (remotes?.stdout ?? '').split(/\r?\n/).filter(Boolean);
|
|
35
|
+
const name = names.includes('origin') ? 'origin' : names[0];
|
|
36
|
+
if (name === undefined)
|
|
37
|
+
return null;
|
|
38
|
+
const url = await execFileAsync('git', ['remote', 'get-url', name], { cwd: root, encoding: 'utf8' }).catch(() => null);
|
|
39
|
+
const shown = url?.stdout.trim();
|
|
40
|
+
return shown ? displayRemoteUrl(shown) : null;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Копия на GitHub — только для проекта, чей репозиторий и первый коммит сделал этот create.
|
|
44
|
+
* Сбой gh не отменяет созданный проект: человек получает причину и команду на потом.
|
|
45
|
+
*/
|
|
46
|
+
async function cloudStep(options, result, gh) {
|
|
47
|
+
if (options.github !== true)
|
|
48
|
+
return { status: 'none' };
|
|
49
|
+
if (result.existingProject === true) {
|
|
50
|
+
return {
|
|
51
|
+
status: 'skipped',
|
|
52
|
+
reason: (await hasRemote(result.target))
|
|
53
|
+
? 'Копию на GitHub не завожу: это готовый проект, и копия в облаке (remote) у него уже есть. Create не меняет готовый проект.'
|
|
54
|
+
: 'Копию на GitHub не завожу: create не меняет готовый проект. Завести копию в облаке поможет `/start`.',
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
const name = githubRepoName(onDiskBasename(result.target));
|
|
58
|
+
if (result.gitCreated !== true) {
|
|
59
|
+
return {
|
|
60
|
+
status: 'skipped',
|
|
61
|
+
reason: `Копию на GitHub не завожу: первый коммит не сделан (репозиторий Git уже был или шаги Git пропущены). Когда коммит будет, из папки проекта: ${githubCreateCommand(name)}`,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
const copy = await createGithubCopy(result.target, name, gh);
|
|
65
|
+
if (copy.ok)
|
|
66
|
+
return { status: 'created', url: copy.url };
|
|
67
|
+
// Репозиторий мог успеть появиться, а отправка — нет: тогда нужна только отправка.
|
|
68
|
+
const later = (await hasRemote(result.target)) ? 'git push -u origin main' : githubCreateCommand(name);
|
|
69
|
+
return { status: 'failed', reason: copy.reason, later };
|
|
70
|
+
}
|
|
71
|
+
function cloudLine(url) {
|
|
72
|
+
return url !== null ? `Копия в облаке: ${url}` : 'Копии в облаке нет — завести её поможет /start.';
|
|
73
|
+
}
|
|
74
|
+
async function createAndCheck(options, io, renderer, gh) {
|
|
23
75
|
const result = await initProject({
|
|
24
76
|
target: options.target,
|
|
25
77
|
startingPoint: options.startingPoint,
|
|
26
78
|
git: options.git,
|
|
27
79
|
depth: options.depth,
|
|
80
|
+
...(options.pushWithoutAsking === true ? { pushWithoutAsking: true } : {}),
|
|
28
81
|
requested: {
|
|
29
82
|
...(options.explicit?.depth === true ? { depth: options.depth } : {}),
|
|
30
83
|
...(options.explicit?.startingPoint === true ? { startingPoint: options.startingPoint } : {}),
|
|
@@ -40,15 +93,25 @@ async function createAndCheck(options, io, renderer) {
|
|
|
40
93
|
io.err(result.error ?? 'Не удалось подготовить проект.');
|
|
41
94
|
return EXIT_FAILED;
|
|
42
95
|
}
|
|
96
|
+
const cloud = await cloudStep(options, result, gh);
|
|
97
|
+
const warnings = [...result.warnings];
|
|
98
|
+
if (cloud.status === 'skipped')
|
|
99
|
+
warnings.push(cloud.reason);
|
|
100
|
+
if (cloud.status === 'failed')
|
|
101
|
+
warnings.push(`Копию на GitHub завести не удалось: ${cloud.reason}. Проект создан и работает на этом компьютере. Повторить можно из папки проекта: ${cloud.later}`);
|
|
102
|
+
// Строка о копии — по фактическому remote: у готового проекта копия могла появиться раньше.
|
|
103
|
+
const cloudUrl = cloud.status === 'created' ? cloud.url : await remoteUrl(result.target);
|
|
43
104
|
const report = await doctorProject(result.target);
|
|
44
|
-
|
|
105
|
+
// Пометки info — не проблемы.
|
|
106
|
+
const problems = report.findings.filter((item) => item.level !== 'info').length;
|
|
107
|
+
const output = { init: result, ...(options.github === true ? { github: cloud } : {}), doctor: report };
|
|
45
108
|
if (options.json) {
|
|
46
109
|
io.out(JSON.stringify(output, null, 2));
|
|
47
110
|
}
|
|
48
111
|
else {
|
|
49
112
|
if (!renderer)
|
|
50
113
|
io.out(`Проект подготовлен: ${result.target}`);
|
|
51
|
-
for (const warning of
|
|
114
|
+
for (const warning of warnings) {
|
|
52
115
|
if (renderer)
|
|
53
116
|
renderer.warning(warning);
|
|
54
117
|
else
|
|
@@ -56,12 +119,14 @@ async function createAndCheck(options, io, renderer) {
|
|
|
56
119
|
}
|
|
57
120
|
if (renderer) {
|
|
58
121
|
if (report.ok)
|
|
59
|
-
renderer.success({ action: 'create', target: result.target, name: options.name ?? basename(result.target), doctorOk: true });
|
|
122
|
+
renderer.success({ action: 'create', target: result.target, name: options.name ?? basename(result.target), doctorOk: true, cloud: cloudUrl });
|
|
60
123
|
else
|
|
61
|
-
renderer.failure(`Проверка нашла проблем: ${
|
|
124
|
+
renderer.failure(`Проверка нашла проблем: ${problems}.`);
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
io.out(cloudLine(cloudUrl));
|
|
128
|
+
io.out(report.ok ? 'Doctor: всё сходится.' : `Doctor: найдено проблем — ${problems}.`);
|
|
62
129
|
}
|
|
63
|
-
else
|
|
64
|
-
io.out(report.ok ? 'Doctor: всё сходится.' : `Doctor: найдено проблем — ${report.findings.length}.`);
|
|
65
130
|
}
|
|
66
131
|
return report.ok ? EXIT_OK : EXIT_FAILED;
|
|
67
132
|
}
|
package/dist/cli/create.js
CHANGED
|
@@ -12,6 +12,10 @@ const HELP = `${PRODUCT_NAME} — подготовка проекта одной
|
|
|
12
12
|
--start <состояние> исходное состояние идеи: ${STARTING_POINTS.join(' | ')} (по умолчанию idea)
|
|
13
13
|
--depth <глубина> canonical depth: ${DEPTHS.join(' | ')} (по умолчанию standard)
|
|
14
14
|
--no-git не выполнять git init и стартовый commit
|
|
15
|
+
--github после первого коммита завести закрытую копию на GitHub
|
|
16
|
+
(нужны GitHub CLI gh и выполненный вход; без флага --yes её не заводит)
|
|
17
|
+
--push-without-asking новый проект: обычный git push без вопроса, принудительная отправка
|
|
18
|
+
по-прежнему с вопросом; без флага защиты прежние
|
|
15
19
|
--yes, -y неинтерактивный режим (все ответы взяты из флагов)
|
|
16
20
|
--json машиночитаемый отчёт
|
|
17
21
|
--help, -h эта справка
|
|
@@ -26,6 +30,8 @@ export function parseCreateArgs(argv) {
|
|
|
26
30
|
git: true,
|
|
27
31
|
json: false,
|
|
28
32
|
depth: 'standard',
|
|
33
|
+
github: false,
|
|
34
|
+
pushWithoutAsking: false,
|
|
29
35
|
explicit: {},
|
|
30
36
|
};
|
|
31
37
|
for (let i = 0; i < argv.length; i += 1) {
|
|
@@ -40,6 +46,12 @@ export function parseCreateArgs(argv) {
|
|
|
40
46
|
case '--no-git':
|
|
41
47
|
options.git = false;
|
|
42
48
|
break;
|
|
49
|
+
case '--github':
|
|
50
|
+
options.github = true;
|
|
51
|
+
break;
|
|
52
|
+
case '--push-without-asking':
|
|
53
|
+
options.pushWithoutAsking = true;
|
|
54
|
+
break;
|
|
43
55
|
case '--yes':
|
|
44
56
|
case '-y':
|
|
45
57
|
break;
|
|
@@ -89,6 +101,12 @@ export function parseCreateArgs(argv) {
|
|
|
89
101
|
return { kind: 'error', message: `Лишний аргумент: ${arg}` };
|
|
90
102
|
}
|
|
91
103
|
}
|
|
104
|
+
if (options.github && !options.git) {
|
|
105
|
+
return {
|
|
106
|
+
kind: 'error',
|
|
107
|
+
message: 'Флаг --github отправляет на GitHub первый коммит, а --no-git отключает Git: оставьте один из них. Проект не создан.',
|
|
108
|
+
};
|
|
109
|
+
}
|
|
92
110
|
if (options.target === '') {
|
|
93
111
|
return {
|
|
94
112
|
kind: 'error',
|
|
@@ -143,7 +161,8 @@ export async function runCreateCli(argv, io = processIo, runtime = { isTty: Bool
|
|
|
143
161
|
git: true,
|
|
144
162
|
json: false,
|
|
145
163
|
depth: 'standard',
|
|
146
|
-
|
|
164
|
+
github: answers.github,
|
|
165
|
+
}, io, prompt.renderer, runtime.gh);
|
|
147
166
|
}
|
|
148
167
|
catch (error) {
|
|
149
168
|
io.err(error instanceof Error ? error.message : 'Интерактивный ввод прерван.');
|
|
@@ -155,5 +174,5 @@ export async function runCreateCli(argv, io = processIo, runtime = { isTty: Bool
|
|
|
155
174
|
return EXIT_USAGE;
|
|
156
175
|
}
|
|
157
176
|
const { executeCreate } = await import('./create-run.js');
|
|
158
|
-
return executeCreate(parsed.options, io);
|
|
177
|
+
return executeCreate(parsed.options, io, undefined, runtime.gh);
|
|
159
178
|
}
|
package/dist/cli/doctor-run.js
CHANGED
|
@@ -13,7 +13,8 @@ export async function executeDoctorCommand(options, io) {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
else {
|
|
16
|
-
|
|
16
|
+
// Пометки info — не проблемы: в числе их нет, но в списке они видны.
|
|
17
|
+
io.err(`Vibe Coding Maestro doctor: найдено проблем — ${report.findings.filter((item) => item.level !== 'info').length}.`);
|
|
17
18
|
for (const item of report.findings) {
|
|
18
19
|
io.err(`- ${item.code}${item.path ? ` (${item.path})` : ''}: ${item.message}`);
|
|
19
20
|
}
|
package/dist/cli/maestro.js
CHANGED
|
@@ -31,14 +31,16 @@ const HELP = `${PRODUCT_NAME} — служебный CLI проекта.
|
|
|
31
31
|
|
|
32
32
|
Опции upgrade:
|
|
33
33
|
--apply выполнить обновление; без флага это только dry-run
|
|
34
|
+
--diff показать сами правки построчно (только просмотр, ни байта не пишет)
|
|
34
35
|
|
|
35
36
|
Опции pack:
|
|
36
37
|
--tag <тег> тег сдачи (обязательно)
|
|
37
|
-
--out <файл> куда записать архив (по умолчанию — Рабочий стол)
|
|
38
|
+
--out <файл> куда записать архив (по умолчанию — Рабочий стол); путь с / или \ на конце — папка
|
|
38
39
|
--allow <путь> файл, который человек проверил: не секрет; флаг можно повторять
|
|
40
|
+
--dry-run состав архива с подсветкой внутреннего; ничего не пишет
|
|
39
41
|
|
|
40
42
|
Опции context:
|
|
41
|
-
--window <токены> окно модели в токенах (по умолчанию
|
|
43
|
+
--window <токены> окно модели в токенах (по умолчанию — по модели из журнала сессии)
|
|
42
44
|
|
|
43
45
|
Опции preflight:
|
|
44
46
|
--scale <масштаб> ${PLAN_SCALES.join(' | ')} (по умолчанию feature)
|
|
@@ -87,6 +89,13 @@ export function parseMaestroArgs(argv) {
|
|
|
87
89
|
options.apply = true;
|
|
88
90
|
break;
|
|
89
91
|
}
|
|
92
|
+
case '--diff': {
|
|
93
|
+
const message = only(arg, 'upgrade');
|
|
94
|
+
if (message !== null)
|
|
95
|
+
return { kind: 'error', message };
|
|
96
|
+
options.diff = true;
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
90
99
|
case '--scale': {
|
|
91
100
|
const message = only(arg, 'preflight');
|
|
92
101
|
if (message !== null)
|
|
@@ -170,6 +179,13 @@ export function parseMaestroArgs(argv) {
|
|
|
170
179
|
i += 1;
|
|
171
180
|
break;
|
|
172
181
|
}
|
|
182
|
+
case '--dry-run': {
|
|
183
|
+
const message = only(arg, 'pack');
|
|
184
|
+
if (message !== null)
|
|
185
|
+
return { kind: 'error', message };
|
|
186
|
+
options.dryRun = true;
|
|
187
|
+
break;
|
|
188
|
+
}
|
|
173
189
|
case '--allow': {
|
|
174
190
|
const message = only(arg, 'pack');
|
|
175
191
|
if (message !== null)
|
|
@@ -207,6 +223,13 @@ export function parseMaestroArgs(argv) {
|
|
|
207
223
|
return { kind: 'error', message: `Лишний аргумент: ${arg}` };
|
|
208
224
|
}
|
|
209
225
|
}
|
|
226
|
+
if (first === 'upgrade' && options.diff === true) {
|
|
227
|
+
if (options.apply === true)
|
|
228
|
+
return { kind: 'error', message: 'Флаг --diff только показывает правки и не сочетается с --apply: сначала посмотрите, затем примените отдельной командой.' };
|
|
229
|
+
// Отчёт --json по договору не содержит текста файлов.
|
|
230
|
+
if (options.json)
|
|
231
|
+
return { kind: 'error', message: 'Флаг --diff показывает правки текстом и не сочетается с --json: отчёт --json содержимого файлов не содержит.' };
|
|
232
|
+
}
|
|
210
233
|
if (first === 'pack' && options.tag === undefined) {
|
|
211
234
|
return { kind: 'error', message: 'Команда pack требует --tag <тег сдачи>.' };
|
|
212
235
|
}
|