Publish a finished unit to the library
This skill bridges two repositories without mixing their responsibilities:
- The current
ralphy repository owns projects, Units, provenance, extraction,
and validation.
../ralphy-web owns lib/library-v2/library.json, public media upload, and
the /library UI.
Read the templater skill first. It owns extraction, classification,
blueprints, and de-duplication.
Hard rules
- Do not publish before the unit passes its project and workspace evaluators.
- De-duplicate every proposed Template, Style, Recipe, and Asset against the
current library before creating a new block.
- Run the web publisher in dry-run mode first.
--push requires explicit user
approval of the entity list and files.
- Keep source project artifacts append-only. Publishing reads them; it never
moves, rewrites, or deletes them.
- Commit and push the
ralphy-web repository, not the CLI repository, for
library changes. Heavy reusable media belongs in sibling ralphy-assets.
- All committed text and commit messages are English-only.
Procedure
Resolve the active workspace, project, and unit slug. Read unit.json, the
postmortem, eval output, generation log, and referenced artifacts.
Run the templater classification and emit block specs plus any blueprint.
Compare candidates with ../ralphy-web/lib/library-v2/library.json; reuse
existing ids whenever semantics match.
From ../ralphy-web, run the generated publish commands without --push:
bun run scripts/publish-entity.ts --block-file <block.json>
bun run scripts/publish-entity.ts --unit <absolute-unit-dir>
bun run scripts/publish-entity.ts --blueprint <absolute-blueprint-dir>
Show the user the dry-run entity list, uploaded-media plan, and exact files
that will change. Wait for explicit approval.
Repeat the commands with --push in dependency order: blocks, unit, then
blueprint.
In ralphy-web, run its documented lint, typecheck, tests, and build checks;
run gitleaks protect --staged --redact; then commit and push the library
change.
If media moved to ralphy-assets, verify and commit that repository
separately. Never combine repositories in one commit.
Report the published unit id, reused and new block ids, and live /library
URL.
Stop conditions
Stop when the unit has no shippable output, the evaluator has unresolved hard
failures, the library contains an unresolved id collision, dry-run differs from
the proposed entity set, or approval to push is absent.
1---2name: dev-publish-template3description: Publish a finished Ralphy unit and its reusable blocks to the public library. Use when the user asks to publish a template, unit, style, recipe, or asset to the library. The CLI prepares the entity bundle; the sibling ralphy-web repository owns the committed library and upload script.4---56# Publish a finished unit to the library78This skill bridges two repositories without mixing their responsibilities:910- The current `ralphy` repository owns projects, Units, provenance, extraction,11 and validation.12- `../ralphy-web` owns `lib/library-v2/library.json`, public media upload, and13 the `/library` UI.1415Read the `templater` skill first. It owns extraction, classification,16blueprints, and de-duplication.1718## Hard rules19201. Do not publish before the unit passes its project and workspace evaluators.212. De-duplicate every proposed Template, Style, Recipe, and Asset against the22 current library before creating a new block.233. Run the web publisher in dry-run mode first. `--push` requires explicit user24 approval of the entity list and files.254. Keep source project artifacts append-only. Publishing reads them; it never26 moves, rewrites, or deletes them.275. Commit and push the `ralphy-web` repository, not the CLI repository, for28 library changes. Heavy reusable media belongs in sibling `ralphy-assets`.296. All committed text and commit messages are English-only.3031## Procedure32331. Resolve the active workspace, project, and unit slug. Read `unit.json`, the34 postmortem, eval output, generation log, and referenced artifacts.352. Run the `templater` classification and emit block specs plus any blueprint.363. Compare candidates with `../ralphy-web/lib/library-v2/library.json`; reuse37 existing ids whenever semantics match.384. From `../ralphy-web`, run the generated publish commands without `--push`:3940 ```bash41 bun run scripts/publish-entity.ts --block-file <block.json>42 bun run scripts/publish-entity.ts --unit <absolute-unit-dir>43 bun run scripts/publish-entity.ts --blueprint <absolute-blueprint-dir>44 ```45465. Show the user the dry-run entity list, uploaded-media plan, and exact files47 that will change. Wait for explicit approval.486. Repeat the commands with `--push` in dependency order: blocks, unit, then49 blueprint.507. In `ralphy-web`, run its documented lint, typecheck, tests, and build checks;51 run `gitleaks protect --staged --redact`; then commit and push the library52 change.538. If media moved to `ralphy-assets`, verify and commit that repository54 separately. Never combine repositories in one commit.559. Report the published unit id, reused and new block ids, and live `/library`56 URL.5758## Stop conditions5960Stop when the unit has no shippable output, the evaluator has unresolved hard61failures, the library contains an unresolved id collision, dry-run differs from62the proposed entity set, or approval to push is absent.