@loomwright/cli 1.0.0 → 1.0.2
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 +23 -0
- package/README.md +20 -16
- package/dist/cli.js +910 -419
- package/dist/package.json +1 -3
- package/package.json +5 -33
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes per release. `loomwright update` applies them to an installed workspace (see [docs/cli.md](docs/cli.md#update)).
|
|
4
4
|
|
|
5
|
+
## 1.0.2
|
|
6
|
+
|
|
7
|
+
### Patch Changes
|
|
8
|
+
|
|
9
|
+
- a9d57b0: opencode: accept every 2.x minor below 3.0.0 and let features declare their own floor
|
|
10
|
+
(`mcp.roles` needs 2.2.0); the lock records the effective floor and init, update and doctor
|
|
11
|
+
report it.
|
|
12
|
+
|
|
13
|
+
## 1.0.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 31c32b1: The shell guard resolves `bun` builtin subcommands before package scripts, so `bun test`,
|
|
18
|
+
`bun run test`, `bun run check` and `bun run build` no longer expand a same-named script into
|
|
19
|
+
itself. Cyclic script expansion stops with one reason naming the script, and JS/TS script
|
|
20
|
+
files are inspected as code, so prose inside a string no longer blocks a recording while a
|
|
21
|
+
literal reaching an execution primitive still does. `bunx` is treated as the `bun x` alias, so
|
|
22
|
+
the command it wraps gets the same publish, global-install and shell checks.
|
|
23
|
+
- e56d031: Move the engine and the command layer into Bun workspace packages. The published tarball,
|
|
24
|
+
the CLI entry, both binaries and the workspace file formats are unchanged. A command that
|
|
25
|
+
hits its deadline now settles `exec` itself, instead of waiting for a child exit notification
|
|
26
|
+
that a wedged `bun test` worker can lose.
|
|
27
|
+
|
|
5
28
|
## 1.0.0
|
|
6
29
|
|
|
7
30
|
### Major Changes
|
package/README.md
CHANGED
|
@@ -24,22 +24,24 @@ How it works inside: [ARCHITECTURE.md](ARCHITECTURE.md). Every command: [docs/cl
|
|
|
24
24
|
|
|
25
25
|
Requirements: macOS or Linux, Node ≥ 20 or Bun ≥ 1.3, and these tools on `PATH`:
|
|
26
26
|
|
|
27
|
-
| Tool | Version
|
|
28
|
-
| -------- |
|
|
29
|
-
| git | ≥ 2.31
|
|
30
|
-
| opencode | 2.
|
|
31
|
-
| OpenSpec | 1.x (≥ 1.10)
|
|
32
|
-
| Graphify | 0.9.x (≥ 0.9.93)
|
|
27
|
+
| Tool | Version | Install |
|
|
28
|
+
| -------- | ------------------------------------ | -------------------------------------------------- |
|
|
29
|
+
| git | ≥ 2.31 | Xcode CLT or your package manager |
|
|
30
|
+
| opencode | 2.x (≥ 2.1.2, < 3.0.0; tested 2.2.0) | `npm install --global @opencode/cli@2.2.0` |
|
|
31
|
+
| OpenSpec | 1.x (≥ 1.10) | `npm install --global @fission-ai/openspec@1.14.3` |
|
|
32
|
+
| Graphify | 0.9.x (≥ 0.9.93) | `uv tool install graphifyy==0.9.93` |
|
|
33
33
|
|
|
34
34
|
Plus credentials for the model providers you configure, either exported (`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, …) or stored with `opencode auth login`. The factory copies the configured providers' stored credentials into its private runtime database at startup, so they never enter your config or git.
|
|
35
35
|
|
|
36
|
+
opencode support is bounded by majors: every 2.x release is accepted until 3.0.0. Features that need a newer minor raise the floor for the workspaces that use them: `mcp.roles` needs 2.2.0, because 2.2.0 exposes MCP/plugin tools to agents that deny `execute`. A config without `mcp.roles` keeps running on 2.1.2.
|
|
37
|
+
|
|
36
38
|
Run the CLI without installing it:
|
|
37
39
|
|
|
38
40
|
```bash
|
|
39
41
|
bunx @loomwright/cli init
|
|
40
42
|
```
|
|
41
43
|
|
|
42
|
-
`npx @loomwright/cli init` works too. The package is `@loomwright/cli`; its command is `loomwright`, so after `npm install --global @loomwright/cli` you run `loomwright init`. The old `ai-factory` binary still works as a deprecated alias. Note: the unscoped npm package `ai-factory` is an unrelated project. To run it from a checkout of this repository instead, build it with `bun install && bun run build`, then run `node dist/cli.js` (or `npm link` it).
|
|
44
|
+
`npx @loomwright/cli init` works too. The package is `@loomwright/cli`; its command is `loomwright`, so after `npm install --global @loomwright/cli` you run `loomwright init`. The old `ai-factory` binary still works as a deprecated alias. Note: the unscoped npm package `ai-factory` is an unrelated project. To run it from a checkout of this repository instead, build it with `bun install && bun run build`, then run `node packages/cli/dist/cli.js` (or `npm link` it).
|
|
43
45
|
|
|
44
46
|
`init` is idempotent. It detects the layout, languages, contracts and existing `opencode.json` instructions, and writes `factory.config.jsonc` from what it found, so edit that file afterwards. It also renders the agents, plugin, standards, skills and OpenSpec's commands into `.opencode/`, installs the `pre-push` hooks, builds the graph, writes `factory.lock.json`, and commits it all as `chore(factory): init vX.Y.Z`. On a first install it archives replaced custom agents, commands and skills under `.factory/legacy/<timestamp>/`; `init --plan` shows that plan without writing. Then check the setup:
|
|
45
47
|
|
|
@@ -232,23 +234,23 @@ Logs: `.factory/logs/<id>/` (redacted tool calls and gate results). Run state: `
|
|
|
232
234
|
## Adding a language profile
|
|
233
235
|
|
|
234
236
|
A profile is the language's prose standard plus a machine-readable part: test globs, markers, gate commands and install steps.
|
|
235
|
-
1. Add the id to `LANGUAGES` in `src/config/schema.ts`. Enum additions need no config migration, and the editor JSON schema is generated from it.
|
|
236
|
-
2. Add detection in `src/detect/languages.ts`: the manifest or marker files that imply it.
|
|
237
|
+
1. Add the id to `LANGUAGES` in `packages/core/src/config/schema.ts`. Enum additions need no config migration, and the editor JSON schema is generated from it.
|
|
238
|
+
2. Add detection in `packages/core/src/detect/languages.ts`: the manifest or marker files that imply it.
|
|
237
239
|
3. Write `templates/standards/<id>.md` from the language's primary docs:
|
|
238
240
|
- a `<!-- Sources: [key] Title — URL -->` block under the title;
|
|
239
241
|
- a `## Summary` of standalone bullets (they go into `AGENTS.md`);
|
|
240
242
|
- under each section, a `<!-- [key] … -->` comment naming what grounds it, and `<!-- factory -->` after rules that come from the factory rather than a source.
|
|
241
243
|
|
|
242
244
|
A test enforces the citations. The comments are stripped from agent prompts.
|
|
243
|
-
4. Add the profile to `PROFILES` in `src/profiles/index.ts`:
|
|
245
|
+
4. Add the profile to `PROFILES` in `packages/core/src/profiles/index.ts`:
|
|
244
246
|
- `testGlobs`: what the tester may edit;
|
|
245
247
|
- `markers` and `targets`: where gates run;
|
|
246
248
|
- `extensions` and `binDirs`;
|
|
247
249
|
- `gates`: per gate type, candidates in preference order, with optional `when` requirements and `scoped` per-task variants;
|
|
248
250
|
- `install`: lockfile → command;
|
|
249
251
|
- `supersedes` (optional): profiles whose target in the same directory this one replaces. The Tauri profile replaces Rust in `src-tauri/`, for example.
|
|
250
|
-
5. If its package manager has a cache, add it to `cacheEnv` in `src/gates/install.ts`.
|
|
251
|
-
6. Add tests: detection (`test/detect-units.test.ts`) and gate resolution (`test/gates-resolve.test.ts`).
|
|
252
|
+
5. If its package manager has a cache, add it to `cacheEnv` in `packages/core/src/gates/install.ts`.
|
|
253
|
+
6. Add tests: detection (`packages/core/test/detect-units.test.ts`) and gate resolution (`packages/core/test/gates-resolve.test.ts`).
|
|
252
254
|
7. Add a changeset with `bun run changeset` (a user-facing change needs a release note). Workspaces pick up the new standard and their regenerated implementers with `loomwright update`, then `loomwright detect --apply` adds the language to the repos that use it.
|
|
253
255
|
|
|
254
256
|
## Development
|
|
@@ -256,21 +258,23 @@ A profile is the language's prose standard plus a machine-readable part: test gl
|
|
|
256
258
|
```bash
|
|
257
259
|
bun install
|
|
258
260
|
bun run check # biome + tsc + bun test
|
|
259
|
-
bun run build # dist/cli.js and the bundled plugin
|
|
261
|
+
bun run build # packages/cli/dist/cli.js and the bundled plugin
|
|
260
262
|
bun run changeset # record a release note for this PR
|
|
261
|
-
AI_FACTORY_E2E=1 bun test test/opencode-runtime.e2e.test.ts # real opencode, stub model server
|
|
263
|
+
AI_FACTORY_E2E=1 bun test packages/cli/test/opencode-runtime.e2e.test.ts # real opencode, stub model server
|
|
262
264
|
bun scripts/e2e-transcript.ts single # re-record docs/e2e/single.md (also: submodules)
|
|
263
265
|
```
|
|
264
266
|
|
|
267
|
+
The root is a private workspace manifest; the packages are `packages/protocol`, `packages/core` and `packages/cli`.
|
|
268
|
+
|
|
265
269
|
The test suite builds fixture workspaces in temp dirs: a single TS repo, and an AI repo with Go, React and Helm submodules. It stubs the LLM with scripted handoffs. The manual end-to-end runs in [docs/e2e/](docs/e2e/) drive the real opencode server, git, OpenSpec, Graphify and gate toolchains, with a scripted role-aware model, so they cost nothing and can be reproduced. See ADR-0023 for what they cover and what they don't.
|
|
266
270
|
|
|
267
|
-
CI runs the full suite on Ubuntu and macOS, then smoke-tests the npm tarball and the built bundle on Node 20.3, 22 and 24. The manual `E2E` workflow runs the real-opencode runtime test against
|
|
271
|
+
CI runs the full suite on Ubuntu and macOS, then smoke-tests the npm tarball and the built bundle on Node 20.3, 22 and 24. The manual `E2E` workflow runs the real-opencode runtime test against the opencode versions verified end to end (2.1.2 and 2.2.0).
|
|
268
272
|
|
|
269
273
|
### Releasing
|
|
270
274
|
|
|
271
275
|
Changesets owns the version and the changelog. Release tooling runs on Node 24; the published CLI still supports Node >=20.3.
|
|
272
276
|
1. Create `release/vX.Y.Z` from `main`.
|
|
273
|
-
2. Run `bun run release:version`. It applies the pending changesets, writes `CHANGELOG.md
|
|
277
|
+
2. Run `bun run release:version`. It applies the pending changesets, writes `packages/cli/CHANGELOG.md` (the root `CHANGELOG.md` is a symlink to it), syncs `packages/core/src/version.ts` and regenerates the install snapshot.
|
|
274
278
|
3. Review the changelog and the version files, then run `bun run check`.
|
|
275
279
|
4. Commit, push and open a normal PR. CI runs on it.
|
|
276
280
|
5. Merge the PR. The release workflow re-runs the checks, publishes the new version to npm with provenance, and creates the `X.Y.Z` GitHub Release and tag with the tarball attached.
|