@loomwright/cli 1.0.0 → 1.0.1
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 +15 -0
- package/README.md +11 -9
- package/dist/cli.js +842 -395
- package/dist/package.json +1 -3
- package/package.json +5 -33
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
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.1
|
|
6
|
+
|
|
7
|
+
### Patch Changes
|
|
8
|
+
|
|
9
|
+
- 31c32b1: The shell guard resolves `bun` builtin subcommands before package scripts, so `bun test`,
|
|
10
|
+
`bun run test`, `bun run check` and `bun run build` no longer expand a same-named script into
|
|
11
|
+
itself. Cyclic script expansion stops with one reason naming the script, and JS/TS script
|
|
12
|
+
files are inspected as code, so prose inside a string no longer blocks a recording while a
|
|
13
|
+
literal reaching an execution primitive still does. `bunx` is treated as the `bun x` alias, so
|
|
14
|
+
the command it wraps gets the same publish, global-install and shell checks.
|
|
15
|
+
- e56d031: Move the engine and the command layer into Bun workspace packages. The published tarball,
|
|
16
|
+
the CLI entry, both binaries and the workspace file formats are unchanged. A command that
|
|
17
|
+
hits its deadline now settles `exec` itself, instead of waiting for a child exit notification
|
|
18
|
+
that a wedged `bun test` worker can lose.
|
|
19
|
+
|
|
5
20
|
## 1.0.0
|
|
6
21
|
|
|
7
22
|
### Major Changes
|
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ Run the CLI without installing it:
|
|
|
39
39
|
bunx @loomwright/cli init
|
|
40
40
|
```
|
|
41
41
|
|
|
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).
|
|
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 packages/cli/dist/cli.js` (or `npm link` it).
|
|
43
43
|
|
|
44
44
|
`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
45
|
|
|
@@ -232,23 +232,23 @@ Logs: `.factory/logs/<id>/` (redacted tool calls and gate results). Run state: `
|
|
|
232
232
|
## Adding a language profile
|
|
233
233
|
|
|
234
234
|
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.
|
|
235
|
+
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.
|
|
236
|
+
2. Add detection in `packages/core/src/detect/languages.ts`: the manifest or marker files that imply it.
|
|
237
237
|
3. Write `templates/standards/<id>.md` from the language's primary docs:
|
|
238
238
|
- a `<!-- Sources: [key] Title — URL -->` block under the title;
|
|
239
239
|
- a `## Summary` of standalone bullets (they go into `AGENTS.md`);
|
|
240
240
|
- under each section, a `<!-- [key] … -->` comment naming what grounds it, and `<!-- factory -->` after rules that come from the factory rather than a source.
|
|
241
241
|
|
|
242
242
|
A test enforces the citations. The comments are stripped from agent prompts.
|
|
243
|
-
4. Add the profile to `PROFILES` in `src/profiles/index.ts`:
|
|
243
|
+
4. Add the profile to `PROFILES` in `packages/core/src/profiles/index.ts`:
|
|
244
244
|
- `testGlobs`: what the tester may edit;
|
|
245
245
|
- `markers` and `targets`: where gates run;
|
|
246
246
|
- `extensions` and `binDirs`;
|
|
247
247
|
- `gates`: per gate type, candidates in preference order, with optional `when` requirements and `scoped` per-task variants;
|
|
248
248
|
- `install`: lockfile → command;
|
|
249
249
|
- `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`).
|
|
250
|
+
5. If its package manager has a cache, add it to `cacheEnv` in `packages/core/src/gates/install.ts`.
|
|
251
|
+
6. Add tests: detection (`packages/core/test/detect-units.test.ts`) and gate resolution (`packages/core/test/gates-resolve.test.ts`).
|
|
252
252
|
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
253
|
|
|
254
254
|
## Development
|
|
@@ -256,12 +256,14 @@ A profile is the language's prose standard plus a machine-readable part: test gl
|
|
|
256
256
|
```bash
|
|
257
257
|
bun install
|
|
258
258
|
bun run check # biome + tsc + bun test
|
|
259
|
-
bun run build # dist/cli.js and the bundled plugin
|
|
259
|
+
bun run build # packages/cli/dist/cli.js and the bundled plugin
|
|
260
260
|
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
|
|
261
|
+
AI_FACTORY_E2E=1 bun test packages/cli/test/opencode-runtime.e2e.test.ts # real opencode, stub model server
|
|
262
262
|
bun scripts/e2e-transcript.ts single # re-record docs/e2e/single.md (also: submodules)
|
|
263
263
|
```
|
|
264
264
|
|
|
265
|
+
The root is a private workspace manifest; the packages are `packages/protocol`, `packages/core` and `packages/cli`.
|
|
266
|
+
|
|
265
267
|
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
268
|
|
|
267
269
|
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 each supported opencode version (2.1.2 and 2.2.0).
|
|
@@ -270,7 +272,7 @@ CI runs the full suite on Ubuntu and macOS, then smoke-tests the npm tarball and
|
|
|
270
272
|
|
|
271
273
|
Changesets owns the version and the changelog. Release tooling runs on Node 24; the published CLI still supports Node >=20.3.
|
|
272
274
|
1. Create `release/vX.Y.Z` from `main`.
|
|
273
|
-
2. Run `bun run release:version`. It applies the pending changesets, writes `CHANGELOG.md
|
|
275
|
+
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
276
|
3. Review the changelog and the version files, then run `bun run check`.
|
|
275
277
|
4. Commit, push and open a normal PR. CI runs on it.
|
|
276
278
|
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.
|