create-ombutocode 0.2.15 → 0.2.17

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/README.md CHANGED
@@ -46,6 +46,66 @@ What it does:
46
46
  `docs/`; if it is not, it says so — the scheduler builds in git worktrees,
47
47
  so a repository is needed before agents can run.
48
48
 
49
+ ## Upgrade an existing project
50
+
51
+ ```bash
52
+ cd /path/to/project
53
+ npx create-ombutocode@latest --upgrade
54
+ ```
55
+
56
+ Moves the workbench (`.ombutocode/`) of an existing project to this
57
+ installer's pinned release. `<dir>` is optional and defaults to the current
58
+ directory; it must contain `.ombutocode/src/package.json` (a directory
59
+ without a workbench is pointed at `--into-existing` instead). Use `@latest`
60
+ so the newest installer, and therefore the newest release, is the one that
61
+ runs. The full contract lives in `UPGRADING.md` at the repository root;
62
+ this is the summary.
63
+
64
+ What it does, in order:
65
+
66
+ 1. Refuses to run if `.ombutocode/.instance.lock` names a live Electron
67
+ process (close the app first), and exits 0 without changes if the
68
+ project is already at the pinned release (`--force` reinstalls; it is
69
+ also required to downgrade).
70
+ 2. Writes `.ombutocode-backup-<version>-<YYYYMMDD-HHMMSS>.zip` in the
71
+ project root with `data/`, `codingagents/`, `planning/`, `features/`,
72
+ `profiles/`, `codingagent-state.json` and the old `src/package.json`,
73
+ then verifies the archive (entry count, CRCs, `ombutocode.db` present).
74
+ The zip is written with Node's own `zlib` — the installer still has no
75
+ runtime dependencies.
76
+ 3. Clones the pinned release into a temporary directory, as a fresh
77
+ install does.
78
+ 4. Replaces workbench code by allow-list and nothing else: `src/`
79
+ (deleted whole, `node_modules` included), `tools/`, `templates/`,
80
+ `scripts/`, `bench/`, `buildandrun*`, `initombuto*`,
81
+ `OMBUTOCODE_ENGINEERING_GUIDE.md`, `README.md`, `LICENSE` and
82
+ `codingagent-templates.json`.
83
+ 5. Runs `npm install --no-audit --no-fund` in the new `src/`
84
+ (`--omit-dev` applies here too).
85
+ 6. Prints the old and new version and the backup path.
86
+
87
+ What it never touches: `.ombutocode/data/` (database, ticket files,
88
+ headless settings), `logs/`, `run-output/`, `codingagent-state.json`,
89
+ `codingagents/codingagents.yml` (if the release's copy differs it is
90
+ written alongside as `codingagents.yml.new` for you to merge), existing
91
+ files in `profiles/` (missing ones are added), and every file under
92
+ `docs/` — the only thing added there is a skill template under
93
+ `docs/Skills/` that the release ships and the project lacks. Anything
94
+ under `.ombutocode/` not named in step 4 is left as it was. The project's
95
+ own files, `.gitignore` included, are not modified, and nothing is
96
+ committed: review `git status` and commit the result yourself.
97
+
98
+ Restoring from the backup, from the project root:
99
+
100
+ ```bash
101
+ git checkout -- .ombutocode # the workbench code, if committed
102
+ unzip -o .ombutocode-backup-<version>-<stamp>.zip # your state; Expand-Archive -Force on Windows
103
+ ```
104
+
105
+ The zip's entries are rooted at `.ombutocode/`, so it extracts straight
106
+ back into place. If the upgrade fails after step 4 has started, the
107
+ installer prints these same instructions.
108
+
49
109
  ## Headless-only install
50
110
 
51
111
  ```bash
@@ -68,9 +128,22 @@ toolchain.
68
128
  |--------|--------|
69
129
  | `<project-name>` | Create a new project directory (must not exist). |
70
130
  | `--into-existing <dir>` | Adopt into an existing directory instead. Mutually exclusive with `<project-name>`. |
131
+ | `--upgrade [<dir>]` | Upgrade the workbench in `<dir>` (default: current directory) to the pinned release. Mutually exclusive with `--into-existing`. |
132
+ | `--no-backup` | With `--upgrade`: skip the backup zip. |
133
+ | `--force` | With `--upgrade`: proceed even if the project is already at, or newer than, the pinned release. |
71
134
  | `--omit-dev` | `npm install --omit=dev --legacy-peer-deps`; no UI toolchain. |
72
135
  | `-h`, `--help` | Show usage. |
73
136
 
137
+ ## Tests
138
+
139
+ ```bash
140
+ node --test create-ombutocode/test/*.test.js
141
+ ```
142
+
143
+ Plain `node:test`, no network: the ZIP writer round-trip (cross-checked
144
+ against `unzip` or `Expand-Archive` when one is available) and the upgrade
145
+ replace step on a fake `.ombutocode/` tree.
146
+
74
147
  ## Publishing
75
148
 
76
149
  See `DeployInstructions.md` at the repository root: bump `CLONE_REF`,