@futurelastic/colab-handbook 1.16.0-rc.9 → 1.16.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.
package/README.md CHANGED
@@ -153,7 +153,7 @@ shell its own `COLAB_SESSION=<any stable id>` so their holds stay apart.
153
153
  full plan from `code-plan`.
154
154
 
155
155
  Newcomers: read [`CONVENTIONS.md` §1](CONVENTIONS.md#1-the-model-in-one-picture)
156
- (the model) and [§11](CONVENTIONS.md#11-quick-reference) (quick reference)
156
+ (the model) and the [quick reference](tools/docs/quick-reference.md)
157
157
  first. The rest of `CONVENTIONS.md` is reference — look things up, do not read
158
158
  it end to end.
159
159
 
@@ -193,7 +193,8 @@ brings an adopted repo up to the current handbook without losing your local
193
193
  edits.
194
194
 
195
195
  By hand, the same steps (full checklist:
196
- [`CONVENTIONS.md` §9](CONVENTIONS.md#9-adopting-this)):
196
+ [`skills/handbook-sync/2-adoption-procedure.md`](skills/handbook-sync/2-adoption-procedure.md);
197
+ the rules it serves: [`CONVENTIONS.md` §9](CONVENTIONS.md#9-adopting-this)):
197
198
 
198
199
  1. `colab adopt` — answers the two gating questions and writes
199
200
  `.github/project.yml`. It stops there and prints the remaining steps.
@@ -261,9 +262,9 @@ migration hold with or without it.
261
262
  | [`CONVENTIONS.md`](CONVENTIONS.md) | The rules. Normative, the single source of truth (EN). |
262
263
  | [`AGENTS.md`](AGENTS.md) | The entry point for AI agents — the operational distillation (EN). |
263
264
  | [`project.schema.md`](project.schema.md) | Field reference for `.github/project.yml`. |
264
- | [`templates/`](templates/) | **Copy-and-own** starting points: CI, release, git hooks (a secret scan and an identity scan), and the `CLAUDE.md` block for adopting repos. Nothing is called remotely — copy it, edit it, own it. |
265
+ | [`templates/`](templates/) | **Copy-and-own** starting points: CI, release, git hooks (a secret scan and an identity scan), and the `CLAUDE.md` block for adopting repos. Optional — the handbook ships no enforcement; each file's home is the tool that runs it ([`templates/README.md`](templates/README.md#where-each-file-lives--the-handbook-ships-no-enforcement-643)). Copy it, edit it, own it; one caller, `instruction-files.yml`, is kept for compatibility. |
265
266
  | [`tools/`](tools/) | `colab` — a small CLI (optional): adopt a repo, claim issues, allocate ports, manage worktrees, and merge a finished branch to trunk when the repo grants it. JSON state, zero dependencies. Command reference: [`tools/README.md`](tools/README.md). |
266
- | [`audit/`](audit/) | An external conformance checker. Reads all your repos — every owner, including local-only ones — and reports drift in a single run. Advisory only. `--identity` also scans public repository descriptions and topics, which no git hook can see. `--batch-history` shows each repo's measured batch landing picture, flagged only against thresholds the repo declares. What each check means: [`audit/README.md`](audit/README.md). |
267
+ | [`audit/`](audit/) | An external conformance checker. Reads all your repos — every owner, including local-only ones — and reports drift in a single run. Advisory only. `--identity` also scans public repository descriptions and topics, which no git hook can see. `--batch-history` shows each repo's measured batch landing picture, flagged only against thresholds the repo declares. The text checks stay here; the multi-repo sweep is adopter tooling and leaves once its replacement ships. What each check means: [`audit/README.md`](audit/README.md). |
267
268
  | [`skills/`](skills/) | The session flow — see [*Your first session*](#your-first-session). Plain `SKILL.md` folders; `install.sh` links them into each coding agent you choose. |
268
269
  | [`guides/`](guides/) | The role guides — author, reviewer, coordinator, cure, by hand — each written as the files that role leaves for the next. The judgement only; the skills keep their names and point to their guide. |
269
270
  | [`engines/`](engines/) | One small data file per agent runtime: where its user-level skills go, how a skill is invoked, what it supports. Adding an agent runtime is adding a file — [`engines/README.md`](engines/README.md). |
package/README.vi.md CHANGED
@@ -153,7 +153,7 @@ vào nhau.
153
153
  dòng, 2 plan đầy đủ từ `code-plan`.
154
154
 
155
155
  Người mới: đọc [`CONVENTIONS.md` §1](CONVENTIONS.md#1-the-model-in-one-picture)
156
- (mô hình) và [§11](CONVENTIONS.md#11-quick-reference) (tra nhanh) trước. Phần
156
+ (mô hình) và [bảng tra nhanh](tools/docs/quick-reference.md) trước. Phần
157
157
  còn lại của `CONVENTIONS.md` là tài liệu tra cứu — cần gì tra nấy, đừng đọc từ
158
158
  đầu tới cuối.
159
159
 
@@ -192,7 +192,8 @@ này. Chạy lại về sau, chính skill đó kéo một repo đã adopt lên b
192
192
  nhất mà không làm mất phần bạn đã sửa.
193
193
 
194
194
  Làm bằng tay thì cũng đúng các bước đó (checklist đầy đủ:
195
- [`CONVENTIONS.md` §9](CONVENTIONS.md#9-adopting-this)):
195
+ [`skills/handbook-sync/2-adoption-procedure.md`](skills/handbook-sync/2-adoption-procedure.md);
196
+ các quy tắc nó phục vụ: [`CONVENTIONS.md` §9](CONVENTIONS.md#9-adopting-this)):
196
197
 
197
198
  1. `colab adopt` — trả lời hai câu hỏi về cổng và ghi `.github/project.yml`. Nó dừng ở
198
199
  đó và in ra các bước còn lại.
@@ -260,9 +261,9 @@ quyền cấp trước khi chạy migration vẫn đứng vững dù có nó hay
260
261
  | [`CONVENTIONS.md`](CONVENTIONS.md) | Luật. Chuẩn tắc, nguồn sự thật duy nhất (EN). |
261
262
  | [`AGENTS.md`](AGENTS.md) | Cửa vào cho AI agent — bản chưng cất vận hành (EN). |
262
263
  | [`project.schema.md`](project.schema.md) | Tham chiếu field của `.github/project.yml`. |
263
- | [`templates/`](templates/) | Điểm khởi đầu **copy-về-là-của-bạn**: CI, release, git hook (một bản quét secret và một bản quét danh tính), và block `CLAUDE.md` cho repo adopt. Không có gì được gọi từ xa — copy, sửa, sở hữu. |
264
+ | [`templates/`](templates/) | Điểm khởi đầu **copy-về-là-của-bạn**: CI, release, git hook (một bản quét secret và một bản quét danh tính), và block `CLAUDE.md` cho repo adopt. Tuỳ chọn — handbook không kèm cơ chế cưỡng chế nào; nhà của mỗi file là công cụ chạy nó ([`templates/README.md`](templates/README.md#where-each-file-lives--the-handbook-ships-no-enforcement-643)). Copy, sửa, sở hữu; riêng một caller, `instruction-files.yml`, được giữ để tương thích. |
264
265
  | [`tools/`](tools/) | `colab` — một CLI nhỏ (tùy chọn): adopt một repo, claim issue, cấp port, quản lý worktree, và merge nhánh đã xong vào trunk khi repo cho phép. State JSON, không dependency. Tham chiếu các lệnh: [`tools/README.md`](tools/README.md). |
265
- | [`audit/`](audit/) | Trình kiểm tra conformance từ bên ngoài. Đọc mọi repo của bạn — mọi owner, kể cả repo local-only — và báo drift trong một lần chạy. Chỉ cảnh báo. Thêm `--identity` thì quét cả description và topic của repo public — thứ mà không git hook nào nhìn thấy được. Thêm `--batch-history` thì hiện số liệu batch landing đo được của từng repo, chỉ cảnh báo theo ngưỡng repo tự khai báo. Ý nghĩa từng check: [`audit/README.md`](audit/README.md). |
266
+ | [`audit/`](audit/) | Trình kiểm tra conformance từ bên ngoài. Đọc mọi repo của bạn — mọi owner, kể cả repo local-only — và báo drift trong một lần chạy. Chỉ cảnh báo. Thêm `--identity` thì quét cả description và topic của repo public — thứ mà không git hook nào nhìn thấy được. Thêm `--batch-history` thì hiện số liệu batch landing đo được của từng repo, chỉ cảnh báo theo ngưỡng repo tự khai báo. Các check văn bản ở lại đây; phần quét nhiều repo là công cụ của bên adopt và sẽ rời đi khi bản thay thế ra mắt. Ý nghĩa từng check: [`audit/README.md`](audit/README.md). |
266
267
  | [`skills/`](skills/) | Luồng phiên làm việc — xem [*Phiên làm việc đầu tiên*](#phiên-làm-việc-đầu-tiên). Là các thư mục `SKILL.md` thuần; `install.sh` link chúng vào từng coding agent bạn chọn. |
267
268
  | [`guides/`](guides/) | Các hướng dẫn theo vai trò — author, reviewer, coordinator, cure, by hand — mỗi bản viết dưới dạng các file vai trò đó để lại cho bước sau. Chỉ phần phán đoán; các skill giữ nguyên tên và trỏ tới hướng dẫn của mình. |
268
269
  | [`engines/`](engines/) | Mỗi agent runtime một file dữ liệu nhỏ: skill cấp user đặt ở đâu, gọi skill thế nào, agent hỗ trợ gì. Thêm agent runtime là thêm một file — [`engines/README.md`](engines/README.md). |
package/package.json CHANGED
@@ -33,5 +33,5 @@
33
33
  "engines": {
34
34
  "node": ">=18"
35
35
  },
36
- "version": "1.16.0-rc.9"
36
+ "version": "1.16.0"
37
37
  }
@@ -2,11 +2,13 @@
2
2
 
3
3
  Starting points you **copy into your own repo**. That is the entire model.
4
4
 
5
- > **These are NOT called remotely.** There is no `uses: futurelastic/colab-handbook/...`
6
- > anywhere, and nothing here is a reusable workflow another repo calls. (`dist-refs.yml` is a
5
+ > **These are NOT called remotely — with one exception.** `instruction-files.yml` is a caller:
6
+ > its one job `uses:` this handbook's reusable `.github/workflows/instruction-files.yml` (#588,
7
+ > kept for compatibility — see *Where each file lives* below). Every other file here is copied,
8
+ > not called. (`dist-refs.yml` is a
7
9
  > `workflow_call` workflow, but its caller is your own release workflow, in the same repo, via
8
10
  > `uses: ./.github/workflows/dist-refs.yml` — the file still lives, in full, where it runs.) An earlier version of this
9
- > handbook told repos to call shared workflows; that was reversed. Every workflow now
11
+ > handbook told repos to call shared workflows; that was reversed. Every other workflow now
10
12
  > lives, in full, inside the repo that runs it. You copy the file, you edit it, **you
11
13
  > own it.** Divergence between your copy and this template is expected — a shared
12
14
  > workflow that silently changes under a hundred repos is the failure mode we are
@@ -70,6 +72,31 @@ Named it something other than `ci-heavy.yml`? Say so with `heavy-workflow:` in `
70
72
  light templates show a commented `paths-ignore` for docs as an option; the old in-workflow
71
73
  docs-only guard is gone.
72
74
 
75
+ ## Where each file lives — the handbook ships no enforcement (#643)
76
+
77
+ Every file in this folder is an **optional starting file**: copy it if it helps, change it as
78
+ you like, or write your own. The handbook states rules; the tool that runs a file is what
79
+ enforces anything, and that tool is the file's home. Where the runner is still a `colab`
80
+ command in this repo, the file stays here until that command's replacement ships — code moves
81
+ only after its replacement exists (epic #631), and a file that moves keeps its path here with a
82
+ header naming its new home ([`docs/compat-surfaces.md`](../docs/compat-surfaces.md)).
83
+
84
+ | File | Runs it today | Home |
85
+ |---|---|---|
86
+ | `ci-node.yml`, `ci-python.yml`, `ci-laravel.yml` (with the #625 `Migration round-trip` job), `ci-*-heavy.yml` | your forge's CI; `colab ship` / `promote` read or dispatch the runs; `colab template --roundtrip` writes the round-trip job | the adopter's CI layer; until it ships (#608), an optional starting file here |
87
+ | `release-tag.yml`, `release-auto.yml` | your forge's CI; `release-auto.yml` runs `colab release cut` / `finalize --auto` | the release commands' new home (#608); an optional starting file here until then |
88
+ | `dist-refs.yml`, `npx-launcher.mjs`, `npx-service.mjs` | your own release workflow and package `bin` | stays here, as an optional starting file |
89
+ | `publish-downloads.yml`, `publish-downloads.mjs` | your own release workflow, as its last job | stays here, as an optional starting file |
90
+ | `deploy-xserver.yml`, `deploy-container.yml`, `deploy-container-run.mjs`, `deploy-adapter-portainer.mjs` | your repo's deploy workflow | the adopter's deploy tooling; here as an optional starting file |
91
+ | `pre-push-guard` | git, honouring `COLAB_SHIP=1` from `colab ship` | the tool that lands branches (#608); an optional starting file here until then |
92
+ | `pre-commit-dispatch`, `pre-commit-identity`, `identity-vocabulary.example` | git (this repo's own `.githooks/` run them in place) | stays here, as an optional starting file |
93
+ | `pre-commit-instruction-files`, `instruction-files.yml` | `colab instruction-files`; the reusable workflow in this repo | the `colab instruction-files` command; the reusable workflow is the one remote call this folder keeps, for compatibility |
94
+ | `docs-lint.mjs`, `docs-lint.yml`, `branch-name.yml` | your CI (advisory or opt-in); `code-wrap`'s docs step | stays here, as an optional starting file |
95
+ | `repo-CLAUDE-block.md`, `gotchas-d-README.md`, `adr-README.md` | nothing — text you paste or copy (`colab adopt` pastes the block) | stays here |
96
+
97
+ Nothing in this table changes what a copied file does. A stamp, a drift report or a `colab`
98
+ check that reads one of these files is that tool's behaviour, documented with the tool.
99
+
73
100
  ## What each template is for
74
101
 
75
102
  | File | Copy to | For | Notes |
@@ -83,6 +110,8 @@ Named it something other than `ci-heavy.yml`? Say so with `heavy-workflow:` in `
83
110
  | `dist-refs.yml` | `.github/workflows/dist-refs.yml` | A **private** repo shipping a **compiled** tool, installed as `npx github:<org>/<repo>#vX.Y.Z` ([CONVENTIONS §6, *Distribution*](../CONVENTIONS.md#distribution--one-install-surface-npx-442)) | `workflow_call`, called from the same run that cut the release tag (a tag pushed with `GITHUB_TOKEN` triggers nothing else). Takes one build artifact per `<os>-<arch>` and pushes each as an orphan commit at `refs/tags/dist/vX.Y.Z/<os>-<arch>` with a `SHA256SUMS`. Refuses a public or unreadable repository (a public compiled tool ships npm platform packages instead), a version that is not an existing tag, and a missing platform — before pushing any. Never moves a dist ref that exists. |
84
111
  | `npx-launcher.mjs` | anywhere in-repo (e.g. `bin/launch.mjs`), named by the root `package.json`'s `bin` | Pairs with `dist-refs.yml` | Node ≥ 18, zero dependencies, needs `git`. Reads the `#vX.Y.Z` npx installed, fetches that one dist ref with the same URL and credentials npx cloned with, verifies `SHA256SUMS`, installs to a stable per-user path (`$XDG_DATA_HOME`/`%LOCALAPPDATA%`), and execs it; `--print-path` prints that path. A **channel** committish (`#stable`, `#next`, #465) is resolved to the release tag on the commit npx installed, then installed as that version; any other branch is refused. Also the library `npx-service.mjs` imports. `*.mjs`, so `colab template npx-launcher.mjs --dest <path>` copies it stamped, `--dest` required. One edit point: `BIN` (defaults to the package name without its scope). |
85
112
  | `npx-service.mjs` | the same directory as your `npx-launcher.mjs` copy (e.g. `bin/service.mjs`), named by the root `package.json`'s `bin` | A tool that runs as a **per-machine service** (a dashboard, a daemon, a JS app a launch agent serves), installed with npx ([CONVENTIONS §6, *Services over npx*](../CONVENTIONS.md#services-over-npx--init-update-rollback-465)) | `npx github:<org>/<repo>#vX.Y.Z init [--auto-update 6h \| --no-auto-update]`, then `<tool> update [--check] [--version vX.Y.Z] [--channel next\|stable]`, `<tool> rollback`, `<tool> status`, `<tool> uninstall [--purge]` (#472: unit, timer, shim and every version go; config and state stay unless `--purge`); anything else runs the current version's payload. Versions side by side under `$XDG_DATA_HOME/<tool>/` with `current`/`previous` links the unit and the `~/.local/bin` shim go through; update installs beside, switches, restarts, health-checks, and **switches back** on failure. Config/secrets under `$XDG_CONFIG_HOME/<tool>/`, state and logs under `$XDG_STATE_HOME/<tool>/` — the unit carries their locations, never a value. launchd agent on macOS, systemd user unit on Linux, Windows refused; `<TOOL>_SERVICE_MANAGER=none` skips the manager. `--auto-update` (#471) adds a timer (launchd `StartInterval` agent / systemd user `.timer`) that runs the same `update`. Node ≥ 18, zero dependencies; needs `git`, `npm` for `update`, `tar` for `dist`. **Imports `./npx-launcher.mjs`** — copy both, or edit the import. Edit points: `KIND` (`binary` = a compiled tool from dist refs, `package` = a JS app run with node, `dist` = a prebuilt JS app unpacked from one verified tarball in the `dist/vX.Y.Z/any` ref, #470), `LABEL`, `SERVICE_ARGS`, `ENTRY`, `DIST_FILE`, `HEALTH_URL`, `KEEP`, `AUTO_UPDATE`, `VERBS`. The package's `files` must include both copies (and a `package` app's built output). `colab template npx-service.mjs --dest <path>`, `--dest` required. |
113
+ | `publish-downloads.yml` | `.github/workflows/publish-downloads.yml` | A repo whose **finals** carry files people install on their own machines, published to a **self-hosted downloads site** ([CONVENTIONS §6, *Downloads*](../CONVENTIONS.md#downloads--finals-to-a-self-hosted-site-648); contract in [`docs/downloads.md`](../docs/downloads.md)) | `workflow_call` from your release workflow's last job (a tag or Release made with `GITHUB_TOKEN` triggers nothing else), and `workflow_dispatch` with a tag to retry, finish a partial run, or `dry_run`. Finals only. Downloads the Release's files the `downloads:` block in `project.yml` names and runs the script below. Inputs: `runs-on` — a runner that can **reach the site** (a private-network site is unreachable from a GitHub-hosted runner; an unresolvable name fails the run before anything is sent) — and `reserved`, names the site keeps for itself. Secrets `DOWNLOADS_SSH_KEY` / `_SSH_HOST` / `_SSH_PORT` / `_SSH_USER` / `_SSH_KNOWN_HOSTS` (the older `DOWNLOADS_KNOWN_HOSTS` is still read as a fallback), variable `DOWNLOADS_URL` (the site root). Edit point: `PUBLISH_SCRIPT`. |
114
+ | `publish-downloads.mjs` | `.github/downloads/publish-downloads.mjs` (the workflow's `PUBLISH_SCRIPT`) | Pairs with `publish-downloads.yml` | `check` · `names vX.Y.Z` · `publish vX.Y.Z <dir> [--dry-run]`. rsync over SSH in a fixed order — the version folder, each file read back over HTTPS against its checksum, `SHA256SUMS`, installers (`@DOWNLOADS_URL@` stamped), `manifest.json`, `latest.json` **last** (never moved back to an older final) — then reads it all back. Never replaces a published file; a different `SHA256SUMS` for a published version refuses; a re-run sends nothing. Validates the manifest the portal lists. Node ≥ 18, zero dependencies. `colab template publish-downloads.mjs --dest <path>`, `--dest` required. |
86
115
  | `deploy-xserver.yml` | `.github/workflows/deploy-xserver.yml` | PHP-framework + Vite apps shipped to **shared hosting over SSH** (no root, no Docker): build on a runner, rsync, migrate on the server | Derived from three independently-written copies. Resolves Node the same way the CI templates do — all three hardcoded it, and one shipped on a different major than its CI built on. Migrates **production**; keeps a **mandatory** smoke test. Does **not** change your tier. |
87
116
  | `deploy-container.yml` | `.github/workflows/deploy-container.yml` | A **container** app on a host whose platform has an API (Portainer today), `deploy: tag` ([CONVENTIONS §6, *A container deploy*](../CONVENTIONS.md#6-releases), #452) | One contract on every host: build each listed image **once** per final tag (`vX.Y.Z` + commit sha), run the pre-deploy hook, have the platform run exactly that tag (all images, one call), green only on a **verified running version** (stack settled, commit and container images checked, then `release.health-url` reporting `X.Y.Z`), roll back to the previous final on a failure after the platform accepted. **Two jobs (#460):** `publish` builds and pushes on **every** final, ungated — so a repo not yet cut over still gets each final's image in the registry; `deploy` `needs:` it, never builds (a missing image fails before the platform is touched), and is the one job you gate on "is the platform switched on". Images and build args sit in the workflow-level `env`, written once for both jobs. Triggers: a final tag push (route `deploy-tag`), `workflow_dispatch` with a tag (a manual deploy or rollback), and `workflow_call` — route `deploy-tag-fast` reaches it from `release-auto.yml`'s commented `deploy` job, like `dist-refs.yml` from its release run. Needs its two scripts below. One required secret: `PORTAINER_API_KEY`, a non-admin key owning only this app's stack; optional `HEALTH_AUTH_HEADER` (`Name: value`) or `HEALTH_BASIC_AUTH` (`user:password`) when the version URL sits behind auth — masked, never printed. **Every redeploy recreates the containers.** Does **not** change your exposure. |
88
117
  | `deploy-container-run.mjs` | `.github/deploy/deploy-container-run.mjs` | Pairs with `deploy-container.yml` | The driver: builds, runs the hook, calls the adapter, verifies, rolls back, records. `--publish-only` = build and push only (no platform config, no version URL needed); `--deploy-only` = everything after, refusing a tag whose image is not in the registry. **Build args:** `DEPLOY_BUILD_ARGS`, one per line — `KEY=VALUE` for every image or `<image-ref> KEY=VALUE` for one; `${TAG}` (`vX.Y.Z`), `${VERSION}` (`X.Y.Z`) and `${SHA}` are filled in by the driver, so a static site can bake public config and its version into a served file. They end up in the image — public values only, never a secret. Node ≥ 18, zero dependencies; shells out to `git`, `docker`, `gh`. `colab template deploy-container-run.mjs --dest <path>`, `--dest` required, stamped on line 2. |
@@ -246,6 +275,8 @@ directory into ~45 repos and was wrong — fixed 2026-08-20.
246
275
  colab template deploy-container --dest .github/workflows/deploy-container.yml
247
276
  colab template deploy-container-run.mjs --dest .github/deploy/deploy-container-run.mjs
248
277
  colab template deploy-adapter-portainer.mjs --dest .github/deploy/deploy-adapter-portainer.mjs
278
+ colab template publish-downloads --dest .github/workflows/publish-downloads.yml
279
+ colab template publish-downloads.mjs --dest .github/downloads/publish-downloads.mjs
249
280
  colab template docs-lint.mjs --dest tools/docs-lint.mjs # --dest is required for this one
250
281
  ```
251
282
 
@@ -376,6 +407,9 @@ drift is only ever a suggestion (#607), so the trailer is moot there. Full contr
376
407
  is missing or incoherent, when a declared toolchain disagrees with what CI actually
377
408
  pins, when branch names drift, and when a stamped copy has fallen behind its template.
378
409
  It is advisory — run it locally or on a schedule. It is **not** wired into any repo's CI.
410
+ That multi-repo sweep is adopter tooling: it runs from here, unchanged, until its replacement
411
+ ships, and then leaves; only the text checks stay
412
+ ([`audit/README.md`, *What stays and what leaves*](../audit/README.md#what-stays-and-what-leaves-643)).
379
413
 
380
414
  ## Runner policy
381
415