pack publish
research-os pack publish automates the manual closeout work from Experiment 1.
Given a frozen pack on disk, it derives the admission contract, copies all artifacts,
and verifies the result — in one command.
Quick use
Section titled “Quick use”research-os pack publish \ --from ./research-os-packs/my-pack \ --to ./research-packs/packages/my-packExit 0 = admission-contract PASS. Exit 2 = refused (nothing written).
| Flag | Required | Default | Description |
|---|---|---|---|
--to <path> | yes | — | Target package directory |
--from <path> | no | cwd | Source frozen pack directory |
--operator-notes <text> | no | "" | Notes written into pack.manifest.json |
--force | no | false | --force clears and replaces the target package directory. Do not keep hand-authored files inside generated package output. |
--dry-run | no | false | Derive and print plan; write nothing |
What it produces
Section titled “What it produces”<target>/ pack/ ← full frozen pack copy audits/ freeze-receipt.json ← admission contract anchor synthesis/ ← citation-clean prose final-report.md decision-brief.md pack.manifest.json ← derived metadata README.md ← derived from final-report docs/ how-to-read-this.md ← scaffold; you fill in the proseRefusal cases (exit 2)
Section titled “Refusal cases (exit 2)”The command refuses — writing nothing — if any of these conditions hold:
audits/freeze-receipt.jsonis missing from the source packsynthesis/final-report.mdis missing from the source packaudits/freeze-refusal.jsonis present (pack not cleanly frozen)- Target directory is non-empty and
--forcewas not given audits/<section>-gate.jsonis missing for any sectionresearch.yaml.frozen_atis null (pack not yet frozen)accepted_claimscount disagrees betweenclaim-reviews.jsonlandpack-audit.json- Any unresolved contradictions remain in
contradiction-resolutions.jsonl
After writing, pack publish also verifies the target and refuses if the freeze-receipt sha256 doesn’t reproduce or any fingerprinted artifact was corrupted.
Typical workflow
Section titled “Typical workflow”# 1. Freeze your packresearch-os freeze
# 2. Clone research-packs locallygit clone https://github.com/mcp-tool-shop-org/research-packs
# 3. Publishresearch-os pack publish \ --from ./research-os-packs/my-pack \ --to ./research-packs/packages/my-pack
# 4. Finish the how-to-read scaffold# Open docs/how-to-read-this.md — find the SCAFFOLD marker and write the prose
# 5. Verify independently (optional — pack publish already did this)node research-packs/scripts/verify-pack.mjs research-packs/packages/my-pack
# 6. Commit and pushcd research-packsgit add packages/my-packgit commit -m "feat: add my-pack"git pushWhat pack publish does NOT do
Section titled “What pack publish does NOT do”- Does not push to GitHub — committing and pushing is the operator’s step
- Does not modify the source pack — the frozen pack is read-only
- Does not write to npm or any package registry
- Does not create new claims, reviews, or resolutions inside the pack
- Does not author the
docs/how-to-read-this.mdprose — it provisions a scaffold - Does not update
catalog.jsonin the monorepo root — that step is manual
Dogfood proof
Section titled “Dogfood proof”Both day-one packages in research-packs were re-derived via pack publish and passed verify-pack.mjs:
comfyui-workflow-durability— 302 accepted claims, 124 artifacts verified, receipt sha256d71943c6...research-os-self-dogfood— 296 accepted claims, 131 artifacts verified, receipt sha256368d23...
Full receipt: docs/pack-publish-dogfood.md
Full reference
Section titled “Full reference”docs/pack-publish.md
in the repository covers refusal cases, manifest shape, and implementation details.