Files
Lyrebird/claude/skills/lyrebird_release_prep/skill.md
T

9.2 KiB


name: lyrebird_release_prep description: Prepare the public LyrebirdRelease repo from the Lyrebird dev repo, replacing the manual "export → hand-copy in Finder" step. Syncs the dev repo's committed tree into the release working tree, excluding maintainer-only paths that never ship (legacy/, PLAN.md, .claude/, .githooks/, .swiftpm/) and cleaning accumulated Finder duplicate cruft. Dry-run first, then apply, then guides commit + tag + push to the gitea host. Use when cutting a new Lyrebird release (e.g. bumping to a new vX.Y.Z tag), and read it before ANY git push in Lyrebird, LyrebirdRelease or ShoeGaze: it records which remote is the private working repo (Bitbucket) and which is public (git.lyrebirdsynth.net, formerly realizedsound.mooo.com).

Lyrebird Release Prep

Replicates the Lyrebird dev repo (~/Documents/src/Lyrebird, origin = bitbucket) into the public release repo (~/Documents/src/LyrebirdRelease, origin = git.lyrebirdsynth.net, formerly realizedsound.mooo.com — a CNAME to the same server) that SwiftPM consumers resolve from — without the manual Finder export/hand-copy.

Remotes: where each repo pushes (read before any git push)

Two kinds of remote, with different rules:

Repo Local path origin Role
Lyrebird (dev) ~/Documents/src/Lyrebird git@bitbucket.org:realizedsound/lyrebird.git Working repo, Bitbucket. Private. Day-to-day commits, branches and WIP, including the maintainer-only paths listed below. Push here freely as work progresses.
LyrebirdRelease ~/Documents/src/LyrebirdRelease ssh://git@git.lyrebirdsynth.net:2222/josh/Lyrebird.git Public gitea. Every commit and tag pushed here is publicly visible, and SwiftPM consumers resolve from it. Only ever updated through this skill (sync, commit, tag, push), at release time.
ShoeGaze ~/Documents/src/ShoeGaze https://git.lyrebirdsynth.net/josh/ShoeGaze/ Public gitea. No Bitbucket remote, so a push here is public. It depends on a published Lyrebird tag.

The public gitea host is git.lyrebirdsynth.net (a DNS CNAME to realizedsound.mooo.com, the former hostname — both resolve to the same server, so old mooo URLs still work). "gitea" below means that public host.

Rules:

  1. Bitbucket = working directory, gitea = public releases and commits. Never push the dev repo to gitea, and never push maintainer-only files (legacy/, PLAN.md, DOC_UPDATE_PLAN.md, the two phase-planning docs, .claude/, .githooks/) or anything private to a public remote.
  2. Before anything goes to gitea, read the commit list and the file list as if a stranger will: no secrets, no private notes, no personal paths.
  3. Claude prepares (dry run, apply, commit message, tag), then the maintainer runs the push (it needs his key/touch). Claude does not push to gitea on its own.
  4. A ShoeGaze push to gitea is public too: confirm it builds against the tagged Lyrebird release it declares, not a local swift package edit override.

The gitea server (noted 2026-10-23): Gitea running in Docker on the Mac mini, reached at git.lyrebirdsynth.net (CNAME to realizedsound.mooo.com). It is written in Go, so the PHP2Shell vulnerability does not apply to it, but it is internet-facing: keep Gitea and the Docker host updated. If it is slow or unreachable (it intermittently was on 2026-10-23), check the Mac mini before suspecting the repo.

What it does (and why it's safe)

Works from a clean git archive HEAD of the dev repo, so:

  • only committed, tracked files ship (no .build, no editor state),
  • accumulated Finder duplicate cruft ( 2/ 3 suffixed dirs) never leaks in, and
  • the release's own .git and local .build are preserved.

Then it strips the maintainer-only paths that are tracked in dev but must not ship (verified to exactly account for the dev↔release tracked-file delta):

Excluded Why
legacy/ old pre-modernization reference code
PLAN.md private planning doc
DOC_UPDATE_PLAN.md private planning doc
docs/00-working-order.md maintainer phase-planning doc (what to build next)
docs/01-completed-working-order.md maintainer phase-planning doc (completed phases)
.claude/ agent working-copy mirror (release ships claude/ installer source only)
.githooks/ dev-only pre-commit hooks
.swiftpm/ local Xcode package state

The sync uses rsync -a -c --delete (checksum-based, so only real content differences transfer; --delete clears stale files + Finder cruft on the release side). A moo-URL guard on the release remote prevents --apply from ever touching the wrong directory.

Most of docs/ ships. The two phase-planning docs (docs/00-working-order.md, docs/01-completed-working-order.md) are excluded — they're maintainer-internal and mean nothing to consumers — along with the top-level PLAN.md / DOC_UPDATE_PLAN.md.

Steps

1. Pre-flight

Confirm the dev repo has the release commit already made (the script archives HEAD — uncommitted changes do not ship):

git -C ~/Documents/src/Lyrebird status --short   # should be clean
git -C ~/Documents/src/Lyrebird log -1 --oneline

If dirty, commit first (or the maintainer may pass --allow-dirty to archive HEAD anyway).

2. Dry run

~/.claude/skills/lyrebird_release_prep/prepare_release.sh

Read the summary: it lists the excluded paths, the deletions (Finder cruft cleanup), and the content changes (should match exactly the files changed since the last release). Metadata- only (mtime/perms) churn is reported as a count and is git-invisible.

Stop and investigate if the content-change list contains anything unexpected.

3. Apply

~/.claude/skills/lyrebird_release_prep/prepare_release.sh --apply

This mirrors the dev tree into the release working tree. It prints the release repo's git status --short afterward — this is the authoritative content diff.

4. Commit, tag, push (maintainer runs — push needs your key/touch)

The script prints these; fill in the version and message:

R=~/Documents/src/LyrebirdRelease
git -C "$R" add -A
git -C "$R" commit -m "vX.Y.Z release: <summary>"
git -C "$R" tag -a vX.Y.Z -m "vX.Y.Z: <summary>"
git -C "$R" push origin main && git -C "$R" push origin vX.Y.Z

Verify the tag landed:

git -C "$R" ls-remote --tags origin | grep vX.Y.Z

5. Point consumers at the new tag

For a downstream package pinned to a local swift package edit override during development (e.g. ShoeGaze), drop the override and bump the dependency once the tag is live:

cd <consumer-pkg>
swift package unedit Lyrebird
swift package update Lyrebird    # resolves to the new tag if Package.swift `from:` allows it
swift build && swift test

6. Re-render the online docs (every public/gitea release)

lyrebirdsynth.net/docs is a static DocC export (WordPress on Bluehost, uploaded over SSH). It does not regenerate itself — after a public release that changed docs or public API, rebuild the site folders so the maintainer can re-upload, or the online docs go stale. Render from the released HEAD into the durable folder ~/Documents/lyrebird-docs-site/ (not a scratch dir):

DEST=~/Documents/lyrebird-docs-site
cd ~/Documents/src/Lyrebird

# Core — all guides + symbol reference.
swift package --allow-writing-to-directory "$DEST/lyrebird" generate-documentation \
  --target LyrebirdSynth --disable-indexing --transform-for-static-hosting \
  --hosting-base-path docs/lyrebird --output-path "$DEST/lyrebird"

UI needs one caveat: Sources/LyrebirdUI/LyrebirdUIExports.swift does @_exported import SwiftUI, which makes DocC fold the entire SwiftUI API into LyrebirdUI's reference (165k pages / 2.3G instead of the correct ~34 real types / 261M). Temporarily demote it to a plain import for the UI build only, then restore:

E=Sources/LyrebirdUI/LyrebirdUIExports.swift
perl -pi -e 's/^\@_exported import SwiftUI/import SwiftUI/' "$E"
swift package --allow-writing-to-directory "$DEST/lyrebirdui" generate-documentation \
  --target LyrebirdUI --disable-indexing --transform-for-static-hosting \
  --hosting-base-path docs/lyrebirdui --output-path "$DEST/lyrebirdui"
git checkout -- "$E"     # restore @_exported — MUST run even if the build fails

Keep $DEST/index.html (landing), $DEST/.htaccess (Apache rewrite for DocC client-side routes — required or deep links 404 under WordPress), and $DEST/UPLOAD.md (rsync-over-SSH to ~/public_html/docs/). Expected: core ~115M, UI ~261M. Tell the maintainer the folder is ready; the upload itself is theirs.

Flags

  • --dev PATH / --release PATH — override the default repo locations.
  • --apply — actually modify the release working tree (default is dry-run).
  • --allow-dirty — proceed even if the dev repo has uncommitted changes (still archives HEAD).

Maintaining the exclusion list

If a new maintainer-only top-level path is added to the dev repo, add it to the EXCLUSIONS array in prepare_release.sh. Sanity check: after a dry run, the release tracked-file count plus the excluded tracked-file counts should equal the dev tracked-file count (git ls-files | wc -l in each; git ls-files <path> | wc -l per exclusion).