build(release): add release.sh and 0.1.0 release notes

scripts/release.sh cuts a release from an already-bumped commit:
archive → Developer ID export → UDZO DMG → notarytool → stapler,
refusing before any build when the Developer ID identity is missing
(the private key lives only on the Mac that created the certificate).
diskutil image create replaces hdiutil create, deprecated on macOS 27.

CHANGELOG.md stays the entry-by-entry record with issue numbers;
docs/releases/<version>.md is the human-readable distillation pasted
into the Gitea release (DOX contract in docs/AGENTS.md). dist/ is
gitignored. Root AGENTS.md: commands block, scripts index row, and the
Stack line corrected to macOS 27+ to match MACOSX_DEPLOYMENT_TARGET.
This commit is contained in:
AlexKucera committed 2026-12-01 12:31:32 +01:00
1 parent c10477da35
commit 58355aa292
5 files changed
+164 -2

No files matched your search

+1
View File
@@ -2,6 +2,7 @@
.swiftpm/ .swiftpm/
DerivedData/ DerivedData/
_build/ _build/
dist/
**/xcuserdata/ **/xcuserdata/
.DS_Store .DS_Store
CLAUDE.md CLAUDE.md
+3 -2
View File
@@ -4,7 +4,7 @@
Museion — the Agentic Writing Environment (AWE): a native SwiftUI macOS app where scholars, texts, and AI minds work under a single roof. Named for the Mouseion of Alexandria. Museion — the Agentic Writing Environment (AWE): a native SwiftUI macOS app where scholars, texts, and AI minds work under a single roof. Named for the Mouseion of Alexandria.
- **Stack**: native Xcode project (`Museion.xcodeproj` at repo root, filesystem-synchronized groups — disk is truth). SwiftUI on macOS 26.5+, latest Xcode/Swift only (ADR-0001). Swift language mode 6 with default MainActor isolation, tabs. - **Stack**: native Xcode project (`Museion.xcodeproj` at repo root, filesystem-synchronized groups — disk is truth). SwiftUI on macOS 27+ (`MACOSX_DEPLOYMENT_TARGET = 27.0`, Apple Silicon only), latest Xcode/Swift only (ADR-0001). Swift language mode 6 with default MainActor isolation, tabs.
- **Forge**: Gitea @ git.babylondreams.de (`tea` CLI), CI via Gitea Actions (ADR-0003) — needs a self-hosted macOS runner. - **Forge**: Gitea @ git.babylondreams.de (`tea` CLI), CI via Gitea Actions (ADR-0003) — needs a self-hosted macOS runner.
- **License**: GPL-3.0-or-later (ADR-0002). - **License**: GPL-3.0-or-later (ADR-0002).
@@ -20,6 +20,7 @@ swiftformat . && swiftlint . # lint (r
./scripts/full-test.sh summary # finished run's executed/passed/failed ./scripts/full-test.sh summary # finished run's executed/passed/failed
./scripts/install-hooks.sh # once per clone: pre-push lint gate + no-push-while-testing ./scripts/install-hooks.sh # once per clone: pre-push lint gate + no-push-while-testing
./scripts/test-full-test.sh # pre-push hook acceptance rig (disposable git repo, all ref shapes) ./scripts/test-full-test.sh # pre-push hook acceptance rig (disposable git repo, all ref shapes)
./scripts/release.sh # release packaging: Developer ID export → notarized DMG in dist/ (refuses without the cert)
``` ```
# DOX framework # DOX framework
@@ -113,7 +114,7 @@ When the user requests a durable behavior change, record it here or in the relev
| `Museion/AGENTS.md` | App target — SwiftUI app shell, assets, entitlements | | `Museion/AGENTS.md` | App target — SwiftUI app shell, assets, entitlements |
| `MuseionTests/AGENTS.md` | Swift Testing unit suite (hosted in the app) | | `MuseionTests/AGENTS.md` | Swift Testing unit suite (hosted in the app) |
| `MuseionUITests/` | XCUITest smoke test — single file, no child doc yet | | `MuseionUITests/` | XCUITest smoke test — single file, no child doc yet |
| `scripts/` | Verify rail + hooks + build/deploy scripts — contracts live in each script's header; full-test.sh is the sanctioned verify rail (#190), no child doc | | `scripts/` | Verify rail + hooks + build/deploy/release-packaging scripts — contracts live in each script's header; full-test.sh is the sanctioned verify rail (#190), release.sh cuts the DMG from an already-bumped commit, no child doc |
| `docs/AGENTS.md` | Durable documentation — ADRs and their conventions | | `docs/AGENTS.md` | Durable documentation — ADRs and their conventions |
| `ref/writing skills/AGENTS.md` | Bundled writing-skill set — the G3a payload seeded into the museion profile | | `ref/writing skills/AGENTS.md` | Bundled writing-skill set — the G3a payload seeded into the museion profile |
| `GLOSSARY.md` | Binding project glossary — shared vocabulary for app, mentor, and docs | | `GLOSSARY.md` | Binding project glossary — shared vocabulary for app, mentor, and docs |
+2
View File
@@ -14,6 +14,7 @@ Owned by the root AGENTS.md contract.
- ADR format follows the domain-modeling skill's `ADR-FORMAT.md`: short title + 1–3 sentences; optional Considered Options / Consequences only when they earn their place. - ADR format follows the domain-modeling skill's `ADR-FORMAT.md`: short title + 1–3 sentences; optional Considered Options / Consequences only when they earn their place.
- `docs/agents/` holds the engineering-skills config (issue tracker, triage labels, domain-docs consumer rules) written by `setup-matt-pocock-skills` — edit directly, no child doc needed. - `docs/agents/` holds the engineering-skills config (issue tracker, triage labels, domain-docs consumer rules) written by `setup-matt-pocock-skills` — edit directly, no child doc needed.
- `docs/sample-pass.md` is the worked sample Pass demonstrating the craft-canon skills firing as Fix Cards (issues #7, #11, #123, and #58 verification artifacts); card shape follows GLOSSARY.md (lane and emitter fields included), anchors follow ADR-0006. - `docs/sample-pass.md` is the worked sample Pass demonstrating the craft-canon skills firing as Fix Cards (issues #7, #11, #123, and #58 verification artifacts); card shape follows GLOSSARY.md (lane and emitter fields included), anchors follow ADR-0006.
- `docs/releases/<version>.md` holds the release notes, one file per released version, written for humans: highlights, the milestones it closes, install, known limits. It distills that version's `CHANGELOG.md` section (which stays the entry-by-entry record with issue numbers); the Gitea release body is pasted from it.
## Work Guidance ## Work Guidance
@@ -31,3 +32,4 @@ Owned by the root AGENTS.md contract.
| `agents/` | Agent-skills config — issue-tracker, triage-label, domain conventions (written by `/setup-matt-pocock-skills`) | | `agents/` | Agent-skills config — issue-tracker, triage-label, domain conventions (written by `/setup-matt-pocock-skills`) |
| `brainstorming-output/` | Transient brainstorming session records — working artifacts, not durable decisions; durable outcomes flow into PRD/ADRs | | `brainstorming-output/` | Transient brainstorming session records — working artifacts, not durable decisions; durable outcomes flow into PRD/ADRs |
| `research/` | Verified research artifacts (provider/API factsheets) feeding ADRs — source-cited and probe-dated, not decisions | | `research/` | Verified research artifacts (provider/API factsheets) feeding ADRs — source-cited and probe-dated, not decisions |
| `releases/` | Release notes per version — human-readable distillation of the CHANGELOG section; the Gitea release body |
+55
View File
@@ -0,0 +1,55 @@
# Museion 0.1.0
*Released 2026-12-01 · the first release. Entry-by-entry detail with issue numbers: [CHANGELOG.md](../../CHANGELOG.md).*
Museion is the Agentic Writing Environment: a native macOS app where your text, your library, and a resident AI mentor work under one roof. It is built for long-form writers who want to get better, not ghostwritten — the mentor critiques, demonstrates, and remembers your recurring weaknesses, and nothing ships without your hand on it.
0.1.0 is the complete v1 loop, three months in the making and dogfooded along the way: write, get critiqued, remember what keeps going wrong, measure whether it stops, publish.
## What is in it
**The Mentor Loop.** A user-installed [Hermes](https://hermes-agent.nousresearch.com/docs) engine runs as a child process under three isolated profiles. **Pass 1** critiques structure, argument, and flow; **Pass 2** works at sentence level. Each pass ends in a verdict and a set of **Fix Cards** — mechanical ones apply behind a sheet that shows the exact edit, one card at a time, never all at once; demonstration ones show a single annotated example on your own text. A native deslop lint lands its findings as cards before the engine even sees the piece. Promote a card into **Learnings** and every later pass consults it; dismiss one and it fades, resurfacing on an output clock. **Sessions** are freeform conversations with resume, fork, and compact; a reply can become a new post. **Blind Read** judges the current text against the pass-start snapshot without knowing which is which.
**A real editor.** A TextKit 2 prose surface with styled markdown source, sub-second autosave, an honest save-state dot, cursor and scroll restored across restarts, and an explicit *Reload / Keep Local* alert when the file changes underneath you — never a silent overwrite. Reading mode, focus mode, image drops that copy into the piece and reference in place, list indentation and folding, and spellcheck on request.
**Cold Turkey.** A writing lock nested inside focus mode: pick net words or minutes, and Museion holds a fullscreen kiosk until you meet the goal. Quitting asks once. Nothing persists.
**Outlines.** Nested-bullet outline pieces with LogSeq-style keys, drag-to-reorder and nest, zoom into a branch, and a one-way Convert to Post.
**A library that is a folder.** Pieces live under projects and fold into an archive, all plain markdown under your **Museion Home** (iCloud Drive by default on fresh installs, `~/Documents/Museion` otherwise; repoint-only, never moved). Grouping by project and Pass State, search across titles and bodies, rename/move/archive/trash from the row menu, and a live file watcher so Finder edits show up without a refresh. Open any `.md` in place as a guest; import `.md` files as posts.
**Measurable improvement.** Running a pass on an unaided first draft captures four style metrics before the mentor sees anything. The Trends pane charts them across captures with an honest *improving / steady / slipping* verdict per metric.
**Publishing.** Micro.blog via Micropub: Send as Draft, review, Publish. Illustrations upload and ride inline; a picture without alt text never ships.
## Milestones
- **M0 — ACP bridge.** The app spawns Hermes, opens a session, streams replies, cancels, and tears down cleanly on quit.
- **M1 — Editor surface.** Posts list over the Home folder, post lifecycle (new, save, rename, trash), the TextKit 2 prose editor with autosave and external-change guard.
- **M2 — Passes and Fix Cards.** Pass 1 / Pass 2, the in-app MCP server that receives cards, the Fix Cards palette with ask-before Apply, the native deslop lint.
- **M3 — Critique memory.** Learnings: promote with one confirm, consult on every pass, dismiss with decay.
- **M4 — Measurable improvement.** First-draft stats capture and the Trends pane.
- **M5 — Research and library-light.** Mid-pass research notes kept into the piece with provenance; drill offers; the bundled skill set (Serif stack, deslop, craft canon, VOICE).
- **M6 — Micropub publish.** Draft → publish to Micro.blog, illustrations included.
- **After v1 scope.** Projects and archive, the outliner, library search, image drops, Cold Turkey, per-surface engines with in-app model settings and Test Connection, Nous Portal, gateless launch, iCloud-default Home, the editorial two-color chrome.
## Install
Download `Museion-0.1.0.dmg` below, open it, drag Museion to Applications.
- **macOS 27 or later**, Apple Silicon.
- **Hermes** is needed for Passes and Sessions — `curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash`. Museion provisions the profiles and seeds its skills on the next launch. The editor, library, outlines, and publishing work without it.
- A provider API key (z.ai, Anthropic, OpenAI, or Nous Portal) under Settings ▸ Provider Keys.
The app is Developer ID-signed and notarized.
## Known limits
- Long-form structure tools (binder, compile), backlinks and graph views, multi-mind setups, and publish targets beyond Micro.blog are out of v1 scope — see `PRODUCT.md` for the full non-goal list.
- Convert to Post is one-way. Opening a mixed-content outline asks how to proceed; opening as an outline normalizes on save.
- The Mentor methodology is a bundled skill set, not a trained model — fierce or gentle is a persona blend, not a setting.
- One user so far. No testimonials, customers, or benchmarks exist yet, and none are claimed.
## Numbers
74 Swift files, about 23,000 lines in the app target; a unit suite of over 700 tests, run through `scripts/full-test.sh`; SwiftFormat and SwiftLint clean repo-wide.
+103
View File
@@ -0,0 +1,103 @@
#!/usr/bin/env bash
# Release packaging: archive → Developer ID export → DMG → notarize → staple.
#
# Contract:
# - Bumps nothing and tags nothing. Run from the commit that already carries
# the version in MARKETING_VERSION; the git tag is the caller's job.
# - Refuses BEFORE building when no valid "Developer ID Application" identity
# is in the keychain (Xcode ▸ Settings ▸ Accounts ▸ Manage Certificates… ▸ +).
# The private key lives only on the Mac that created the certificate — a
# portal-side certificate without it is not an identity.
# - Notarizes through the `museion-notary` notarytool keychain profile, created
# once by the Account Holder:
# xcrun notarytool store-credentials museion-notary \
# --apple-id <apple-id> --team-id <team-id> --password <app-specific-password>
# NOTARIZE=0 skips notarize+staple (a Developer-ID-signed DMG Gatekeeper still warns on).
# - Output: dist/Museion-<MARKETING_VERSION>.dmg (gitignored). The version is
# read from build settings, never from the pbxproj text. Apple Silicon only —
# the deployment target is macOS 27, which does not run on Intel.
set -euo pipefail
PROJECT="Museion.xcodeproj"
SCHEME="Museion"
APP_NAME="Museion.app"
CONFIGURATION="Release"
IDENTITY="Developer ID Application"
NOTARY_PROFILE="museion-notary"
DIST="dist"
DESTINATION='platform=macOS,arch=arm64'
cd "$(dirname "$0")/.." # repo root — PROJECT is relative (same guard as deploy.sh)
if ! security find-identity -v -p codesigning | grep -q "\"$IDENTITY:"; then
echo "No valid \"$IDENTITY\" identity in the keychain." >&2
echo "Create it once: Xcode ▸ Settings ▸ Accounts ▸ Manage Certificates… ▸ + ▸ $IDENTITY" >&2
exit 1
fi
VERSION=$(xcodebuild -project "$PROJECT" -scheme "$SCHEME" -configuration "$CONFIGURATION" \
-destination "$DESTINATION" -showBuildSettings 2>/dev/null \
| awk -F'= ' '/MARKETING_VERSION = / {print $2; exit}')
if [[ -z "$VERSION" ]]; then
echo "MARKETING_VERSION not found in build settings" >&2
exit 1
fi
TEAM=$(xcodebuild -project "$PROJECT" -scheme "$SCHEME" -configuration "$CONFIGURATION" \
-destination "$DESTINATION" -showBuildSettings 2>/dev/null \
| awk -F'= ' '/DEVELOPMENT_TEAM = / {print $2; exit}')
DMG="$DIST/Museion-$VERSION.dmg"
echo "Packaging $SCHEME $VERSION"
# xcodebuild -quiet prints nothing on success; keep the log to show on failure.
log=$(mktemp -t museion-release)
trap 'rm -f "$log"' EXIT
run() { echo "→ $*"; if ! "$@" >"$log" 2>&1; then echo "Failed: $*" >&2; cat "$log" >&2; exit 1; fi; }
rm -rf "$DIST"
mkdir -p "$DIST"
run xcodebuild -project "$PROJECT" -scheme "$SCHEME" -configuration "$CONFIGURATION" \
-destination "$DESTINATION" -archivePath "$DIST/Museion.xcarchive" -quiet archive
cat >"$DIST/export-options.plist" <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"><dict>
<key>method</key><string>developer-id</string>
<key>signingStyle</key><string>automatic</string>
<key>teamID</key><string>$TEAM</string>
<key>destination</key><string>export</string>
</dict></plist>
EOF
run xcodebuild -exportArchive -archivePath "$DIST/Museion.xcarchive" \
-exportOptionsPlist "$DIST/export-options.plist" -exportPath "$DIST/export" \
-allowProvisioningUpdates -quiet
APP="$DIST/export/$APP_NAME"
if [[ ! -d "$APP" ]]; then
echo "Export did not produce $APP" >&2
exit 1
fi
run codesign --verify --deep --strict "$APP"
codesign -dvv "$APP" 2>&1 | grep -q '^Authority=Developer ID Application' \
|| { echo "Export is not Developer ID signed:" >&2; codesign -dvv "$APP" 2>&1 | grep '^Authority=' >&2; exit 1; }
# A mounted leftover from an earlier run makes the create fail with a busy volume.
hdiutil detach "/Volumes/$SCHEME $VERSION" -quiet 2>/dev/null || true
STAGE="$DIST/stage"
mkdir -p "$STAGE"
ditto "$APP" "$STAGE/$APP_NAME" # ditto preserves the bundle's signature and xattrs
ln -s /Applications "$STAGE/Applications"
# diskutil image create replaces the deprecated `hdiutil create` (macOS 27).
run diskutil image create from --format UDZO --volumeName "$SCHEME $VERSION" "$STAGE" "$DMG"
rm -rf "$STAGE" "$DIST/export"
if [[ "${NOTARIZE:-1}" == "1" ]]; then
run xcrun notarytool submit "$DMG" --keychain-profile "$NOTARY_PROFILE" --wait
run xcrun stapler staple "$DMG"
# The Gatekeeper verdict a downloader's Mac will reach.
spctl -a -t open --context context:primary-signature -v "$DMG"
fi
echo "Built: $DMG"