@patronage/software-factory 1.0.0-alpha.47 → 1.0.0-alpha.49

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
@@ -32,26 +32,26 @@ This is the release checklist. It lives here and nowhere else; the repository ru
32
32
 
33
33
  Releases are attended. Nothing in the factory publishes, tags, or releases on its own, and no step below may be automated as a drive-by. Delivery closeout (`boundary:check --final`, then `factory:closeout` on the epic) is a separate act with a separate owner: it closes the epic and releases nothing. Only a release-owning boundary carries a release, and one issue at a time holds that authority for a given version. A docs-only or non-release-owning runtime boundary closes without a bump and waits for the next attended cut. The admission skill's [closeout reference](../skills/patronage-software-factory-admission/references/epic-closeout.md#delivery-closeout-is-not-a-release) states the same split from the closeout side.
34
34
 
35
- The factory family has one version posture (ADR 0026, `docs/adr/0026-factory-family-version-lines-move-in-lockstep.md` in the source repository): `@patronage/factory-ci` and this CLI always release together at the same version, even when only one of them changed. A consumer pins both at the same version; there is no compatibility matrix. Until factory-ci's first 1.x release, its published 0.x line is the named pre-adoption state and pairs with any CLI version. `@patronage/alchemy-d1-state` keeps independent SemVer. Lockstep is a rule the maintainer follows when cutting releases, never automation.
35
+ The factory has one package and one version line. The CI building blocks that `@patronage/factory-ci` published until alpha.48 ship inside this package as the `@patronage/software-factory/ci` entry from alpha.49, bundled from the private `factory-ci/` workspace package, so a consumer pins one version and there is nothing to pair. ADR 0026's lockstep rule (`docs/adr/0026-factory-family-version-lines-move-in-lockstep.md` in the source repository) is superseded by that fold.
36
36
 
37
- For a release-owning epic boundary, the terminal oracle runs before the version-bump pull request merges. The candidate it reviews is exact: the merged implementation children plus the open release-owning version-bump PR at its head. Repair its findings inside the same engagement and re-earn the affected evidence before the bump merges. Once the bump merges, the publish, tag, and GitHub release below follow immediately; the six-fact convergence assertion in step 6 stays the post-publication machine readback, never the first correctness review of released behavior. A bump merged before the oracle burns the version number and forces a forward release — that is how alpha.11 needed alpha.12 on 2026-08-09. Nothing enforces this ordering (ADR 0024, `docs/adr/0024-prose-explains-it-never-enforces.md` in the source repository); it is release discipline the maintainer follows.
37
+ For a release-owning epic boundary, the terminal oracle runs before the version-bump pull request merges. The candidate it reviews is exact: the merged implementation children plus the open release-owning version-bump PR at its head. Repair its findings inside the same engagement and re-earn the affected evidence before the bump merges. Once the bump merges, the publish, tag, and GitHub release below follow immediately; the five-fact convergence assertion in step 6 stays the post-publication machine readback, never the first correctness review of released behavior. A bump merged before the oracle burns the version number and forces a forward release — that is how alpha.11 needed alpha.12 on 2026-08-09. Nothing enforces this ordering (ADR 0024, `docs/adr/0024-prose-explains-it-never-enforces.md` in the source repository); it is release discipline the maintainer follows.
38
38
 
39
39
  A stacked release train has one terminal release-owning slice. Interior slices do not bump `package.json` or cut a checkpoint unless the boundary explicitly intends a separately published release at that slice: a lower-slice bump consumes the release window before the terminal slice lands, and the train must then advance the version and re-earn its terminal evidence.
40
40
 
41
41
  A stable cut has two phases. Phase 1 is the verified package candidate: steps 1 through 4 below, ending in the attended npm publish, tag, and GitHub release. Phase 2 is post-publication stable-doc convergence: steps 5 and 6, a normal admitted docs PR followed by the read-only convergence assertion from a clean `main`. Stable docs must never claim an unpublished version, so they cannot land in the phase-1 change. Prerelease behavior is unchanged: prerelease notes may land before publish while stable docs keep naming the prior stable version.
42
42
 
43
43
  1. Bump `package.json` to valid SemVer. The assertion derives its expected stable or prerelease channel from the version; it accepts no channel flag. Before publishing, prove production HQ accepts this candidate's proof schema. The manifest bump triggers the CI-only `HQ Deploy` workflow because HQ bundles this package's public schemas. From a clean `main`, record `RELEASE_SHA="$(git rev-parse HEAD)"`, find the `HQ Deploy` run with `gh run list --workflow "HQ Deploy" --commit "$RELEASE_SHA"`, and use `gh run watch <run-id> --exit-status`; an older green deployment does not count. One exception is defined: when the version bump merged earlier inside the release boundary and the release-owning PR touches no `HQ Deploy` path, no run can exist at the release SHA. The gate then binds to the most recent merge that modified an `HQ Deploy`-triggering path; that run must be green at its exact SHA, every later merge up to the release SHA must be outside those paths, and the release notes record which SHA satisfied the gate. Then, outside a sandbox, run `psf hq:flush --cwd <candidate-worktree>` against the candidate's retained `pr-verify-proof`. The release may proceed only when the current proof exists, the exact-SHA deployment passed, and the drain reports that proof `delivered` or `duplicate` (or no pending spool because its original delivery already succeeded), with `rejected 0` and no event remaining. This is an attended release-compatibility gate; it does not make HQ authoritative for ordinary admission.
44
- 2. Build and review one pnpm tarball, then publish that exact tarball with `pnpm release:publish` per the [repository operations runbook](../docs/repository-operations.md#publishing). The command is attended: it asks for the exact `name@version` before it publishes. Publishing the workspace directory is not allowed because it rebuilds during `prepack` after the artifact review, and the command refuses a directory. **Always pass `--tag` explicitly, on every publish, prerelease or stable**: `pnpm release:publish "$SOFTWARE_FACTORY_TARBALL" --tag next` for a prerelease, `--tag latest` for a stable cut. The command refuses a missing tag or one that disagrees with the version, checks that pnpm published the reviewed bytes, and reads the tag and integrity back from the registry. A filtered directory publish takes pnpm's recursive path, which passes its own `--tag` (defaulting to `latest`) to npm and therefore ignores the `publishConfig.tag: next` pin both factory packages carry; that is how 1.0.0-alpha.6 briefly took `latest` (#658). The pins stay as belt and braces, but they are not the control. For a raw `pnpm publish`, omitting the flag is not a safe failure: it moves `latest`, which the convergence assertion can only report after the fact. The attended token path does not promise an npm provenance attestation; the source SHA and reviewed tarball SRI are its operational provenance.
44
+ 2. Publish through the `Publish the factory package` workflow (dispatch on `main` with the exact version, review its dry run, dispatch it again with `publish` checked, then approve the staged version on npm with 2FA), or, as the fallback, build and review one pnpm tarball, then publish that exact tarball with `pnpm release:publish` per the [repository operations runbook](../docs/repository-operations.md#publishing). The command is attended: it asks for the exact `name@version` before it publishes. Publishing the workspace directory is not allowed because it rebuilds during `prepack` after the artifact review, and the command refuses a directory. **Always pass `--tag` explicitly, on every publish, prerelease or stable**: `pnpm release:publish "$SOFTWARE_FACTORY_TARBALL" --tag next` for a prerelease, `--tag latest` for a stable cut. The command refuses a missing tag or one that disagrees with the version, checks that pnpm published the reviewed bytes, and reads the tag and integrity back from the registry. A filtered directory publish takes pnpm's recursive path, which passes its own `--tag` (defaulting to `latest`) to npm and therefore ignores the `publishConfig.tag: next` pin the package carries; that is how 1.0.0-alpha.6 briefly took `latest` (#658). The pins stay as belt and braces, but they are not the control. For a raw `pnpm publish`, omitting the flag is not a safe failure: it moves `latest`, which the convergence assertion can only report after the fact. The attended token path does not promise an npm provenance attestation; the source SHA and reviewed tarball SRI are its operational provenance.
45
45
  3. Cut the `software-factory-vX.Y.Z` tag and push it.
46
46
  4. Cut the GitHub release for that tag, with notes covering features, deletions, breaking changes, and closed issues. Mark it as a prerelease exactly when its SemVer version has a prerelease component. When the release changes the profile `schemaVersion`, state it in the notes — the profile schema version is a separate axis from the package version.
47
47
  5. Converge the stable docs after publication. Update affected `software-factory-docs/` pages through a normal admitted docs PR. Stable docs must state the current stable version. Prerelease docs may record the candidate and its migration notes, but must not represent it as the current stable release.
48
- 6. After the docs PR merges, confirm the six facts converge from a clean checkout of `main`:
48
+ 6. After the docs PR merges, confirm the five facts converge from a clean checkout of `main`:
49
49
 
50
50
  ```bash
51
51
  pnpm --filter @patronage/software-factory exec tsx scripts/assert-publish-manifest.ts --release .
52
52
  ```
53
53
 
54
- It reads what you just did and derives the channel from the manifest version. A stable release must converge exactly among manifest, npm `latest`, non-prerelease GitHub release, tag, and stable docs. A prerelease must exist on npm, own npm `next`, leave npm `latest` at the stable docs version, and have its prerelease GitHub release and tag. The sixth fact is the factory-ci pairing above: the assertion passes while every observed published `@patronage/factory-ci` version is pre-adoption 0.x and names that state, fails once a lockstep factory-ci release exists but factory-ci has not published the CLI's exact version, and fails when the registry read yields no readable factory-ci versions or contains an entry that does not parse — missing or unreadable data is an unsatisfied fact, not pre-adoption. It publishes nothing. Step 6 is the only step a machine performs, and it performs it after you.
54
+ It reads what you just did and derives the channel from the manifest version. A stable release must converge exactly among manifest, npm `latest`, non-prerelease GitHub release, tag, and stable docs. A prerelease must exist on npm, own npm `next`, leave npm `latest` at the stable docs version, and have its prerelease GitHub release and tag. It publishes nothing. Step 6 is the only step a machine performs, and it performs it after you.
55
55
 
56
56
  ## Use it in a project
57
57
 
@@ -102,3 +102,7 @@ process.exitCode = result.status ?? 1;
102
102
  Install tools without credentials during the environment build, after the repository's own dependency installation. Resolve the shipped installer with `import.meta.resolve("@patronage/software-factory/cloud/install-tools.sh")`, convert that file URL with `fileURLToPath`, and run it through Bash with an absolute bin directory argument. It installs checksum-pinned Linux binaries; macOS, unsupported architectures and archive mismatches fail closed. Put that bin directory on the runtime PATH using the repository's existing setup path. Never resolve secrets during the build or write resolved values to shell profiles or hook export files. The module needs Node 24 and a runtime `OP_SERVICE_ACCOUNT_TOKEN`; it does not install tools or select a runtime.
103
103
 
104
104
  These exports ship from `1.0.0-alpha.47`; `1.0.0-alpha.46` and earlier do not have them. Consumer adoption must pin alpha.47 or later and validate its packed artifact before changing live startup paths. See the source repository's `docs/agents/cloud-setup.md` for Factory-only rollout policy and acceptance.
105
+
106
+ `@patronage/software-factory/cloud/run.sh` (from `1.0.0-alpha.48`) is the launcher for Factory commands in a Claude cloud project thread, which runs no repository `SessionStart` hook: `bash node_modules/@patronage/software-factory/dist/cloud/run.sh <command>`. It sets `FACTORY_SESSION_ID` and the HQ relay settings when the egress proxy injects HQ access, and the CLI's `claude-cloud` GitHub lane (HQ read relay for GraphQL reads, REST and proxy routes for writes) for that one command. Its `gh` shim was removed in `1.0.0-alpha.49`. It installs nothing and reads no credential value. See the docs site's "Admit from a Claude cloud thread" page for what a consumer repository adds.
107
+
108
+ `@patronage/software-factory/cloud/review.sh` (from `1.0.0-alpha.49`) starts the clean, independent review session for a cloud lane: run `bash node_modules/@patronage/software-factory/dist/cloud/review.sh` from the repository after `pr:review --assemble`, then pass the findings path it prints to `pr:review --findings`. It starts a new `claude -p` session with its own `--session-id`, read-only tools, and write access to the findings file alone. `FACTORY_REVIEW_MODEL` overrides the default `claude-fable-5-2`.