Compare commits
8
Commits
822b1b562e
...
v0.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd806e9e76 | ||
|
|
5f92241308 | ||
|
|
217a87324e | ||
|
|
d470615ac7 | ||
|
|
58355aa292 | ||
|
|
c10477da35 | ||
|
|
3bb178220f | ||
|
|
1df46a816f |
No files matched your search
@@ -2,6 +2,7 @@
|
||||
.swiftpm/
|
||||
DerivedData/
|
||||
_build/
|
||||
dist/
|
||||
**/xcuserdata/
|
||||
.DS_Store
|
||||
CLAUDE.md
|
||||
|
||||
@@ -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.
|
||||
|
||||
- **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.
|
||||
- **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/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/release.sh # release packaging: Developer ID export → notarized DMG in dist/ (refuses without the cert)
|
||||
```
|
||||
|
||||
# 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 |
|
||||
| `MuseionTests/AGENTS.md` | Swift Testing unit suite (hosted in the app) |
|
||||
| `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 |
|
||||
| `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 |
|
||||
@@ -132,50 +133,6 @@ Default five canonical roles, label string = role name. See `docs/agents/triage-
|
||||
|
||||
Single-context: `GLOSSARY.md` + `docs/adr/` at the repo root. See `docs/agents/domain.md`.
|
||||
|
||||
<!-- gitnexus:start -->
|
||||
# GitNexus — Code Intelligence
|
||||
|
||||
This project is indexed by GitNexus as **museion** (7133 symbols, 36787 relationships, 300 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.
|
||||
|
||||
> Index stale? Run `node .gitnexus/run.cjs analyze` from the project root — it auto-selects an available runner. No `.gitnexus/run.cjs` yet? `npx gitnexus analyze` (npm 11 crash → `npm i -g gitnexus`; #1939).
|
||||
|
||||
## Always Do
|
||||
|
||||
- **MUST run impact analysis before editing any symbol.** Before modifying a function, class, or method, run `impact({target: "symbolName", direction: "upstream"})` and report the blast radius (direct callers, affected processes, risk level) to the user.
|
||||
- **MUST run `detect_changes()` before committing** to verify your changes only affect expected symbols and execution flows. For regression review, compare against the default branch: `detect_changes({scope: "compare", base_ref: "main"})`.
|
||||
- **MUST warn the user** if impact analysis returns HIGH or CRITICAL risk before proceeding with edits.
|
||||
- When exploring unfamiliar code, use `query({query: "concept"})` to find execution flows instead of grepping. It returns process-grouped results ranked by relevance.
|
||||
- When you need full context on a specific symbol — callers, callees, which execution flows it participates in — use `context({name: "symbolName"})`.
|
||||
|
||||
## Never Do
|
||||
|
||||
- NEVER edit a function, class, or method without first running `impact` on it.
|
||||
- NEVER ignore HIGH or CRITICAL risk warnings from impact analysis.
|
||||
- NEVER rename symbols with find-and-replace — use `rename` which understands the call graph.
|
||||
- NEVER commit changes without running `detect_changes()` to check affected scope.
|
||||
|
||||
## Resources
|
||||
|
||||
| Resource | Use for |
|
||||
|----------|---------|
|
||||
| `gitnexus://repo/museion/context` | Codebase overview, check index freshness |
|
||||
| `gitnexus://repo/museion/clusters` | All functional areas |
|
||||
| `gitnexus://repo/museion/processes` | All execution flows |
|
||||
| `gitnexus://repo/museion/process/{name}` | Step-by-step execution trace |
|
||||
|
||||
## CLI
|
||||
|
||||
| Task | Read this skill file |
|
||||
|------|---------------------|
|
||||
| Understand architecture / "How does X work?" | `.claude/skills/gitnexus/gitnexus-exploring/SKILL.md` |
|
||||
| Blast radius / "What breaks if I change X?" | `.claude/skills/gitnexus/gitnexus-impact-analysis/SKILL.md` |
|
||||
| Trace bugs / "Why is X failing?" | `.claude/skills/gitnexus/gitnexus-debugging/SKILL.md` |
|
||||
| Rename / extract / split / refactor | `.claude/skills/gitnexus/gitnexus-refactoring/SKILL.md` |
|
||||
| Tools, resources, schema reference | `.claude/skills/gitnexus/gitnexus-guide/SKILL.md` |
|
||||
| Index, status, clean, wiki CLI commands | `.claude/skills/gitnexus/gitnexus-cli/SKILL.md` |
|
||||
|
||||
<!-- gitnexus:end -->
|
||||
|
||||
## Project Learnings
|
||||
|
||||
<!-- distill-learnings: project-learnings -->
|
||||
@@ -217,14 +174,14 @@ Session logs live in `docs/devlog/` (one per completed task/issue/milestone). Fu
|
||||
<!-- write-log: window-start -->
|
||||
| Date | Log |
|
||||
| --- | --- |
|
||||
| 2026-12-01 | [20261201-release-010-readme-notes-packaging_log.md](docs/devlog/20261201-release-010-readme-notes-packaging_log.md) |
|
||||
| 2026-11-23 | [20261123-home-repoint-retains-old-editor-target_log.md](docs/devlog/20261123-home-repoint-retains-old-editor-target_log.md) |
|
||||
| 2026-11-19 | [20261119-issue200-gate-quit-time-flushes-through-departure-gate_log.md](docs/devlog/20261119-issue200-gate-quit-time-flushes-through-departure-gate_log.md) |
|
||||
| 2026-11-17 | [20261117-acp-backpressure-defeats-timeout-and-shutdown_log.md](docs/devlog/20261117-acp-backpressure-defeats-timeout-and-shutdown_log.md) |
|
||||
| 2026-11-17 | [20261117-issue193-split-fat-files-along-postsmodel-pattern_log.md](docs/devlog/20261117-issue193-split-fat-files-along-postsmodel-pattern_log.md) |
|
||||
| 2026-11-17 | [20261117-issue192-collapse-gate-running-learnings-into-verify-rail-pointer_log.md](docs/devlog/20261117-issue192-collapse-gate-running-learnings-into-verify-rail-pointer_log.md) |
|
||||
| 2026-11-17 | [20261117-issue197-repo-wide-swiftlint-green-documented-lint-contract_log.md](docs/devlog/20261117-issue197-repo-wide-swiftlint-green-documented-lint-contract_log.md) |
|
||||
| 2026-11-17 | [20261117-issue190-full-test-verify-rail-pre-push-hook_log.md](docs/devlog/20261117-issue190-full-test-verify-rail-pre-push-hook_log.md) |
|
||||
| 2026-11-16 | [20261116-failed-flush-discarded-on-document-switch_log.md](docs/devlog/20261116-failed-flush-discarded-on-document-switch_log.md) |
|
||||
| 2026-11-13 | [20261113-fold-typing-budget-pin_log.md](docs/devlog/20261113-fold-typing-budget-pin_log.md) |
|
||||
| 2026-11-13 | [20261113-cold-turkey-full-tokenization_log.md](docs/devlog/20261113-cold-turkey-full-tokenization_log.md) |
|
||||
| 2026-11-11 | [20261111-fix-library-search-stale-after-mutation_log.md](docs/devlog/20261111-fix-library-search-stale-after-mutation_log.md) |
|
||||
| 2026-11-10 | [20261110-pr184-deferred-empty-piece-scope-lost-audit_log.md](docs/devlog/20261110-pr184-deferred-empty-piece-scope-lost-audit_log.md) |
|
||||
| 2026-11-10 | [20261110-issue182-profilelayout-config-set-rail_log.md](docs/devlog/20261110-issue182-profilelayout-config-set-rail_log.md) |
|
||||
<!-- write-log: window-end -->
|
||||
@@ -4,8 +4,13 @@ All notable changes to this project will be documented in this file. The format
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.1.0] - 2026-12-01
|
||||
|
||||
First release. Human-readable notes: [docs/releases/0.1.0.md](docs/releases/0.1.0.md).
|
||||
|
||||
### Fixed
|
||||
|
||||
- **reading:** The bundled apex renderer is self-contained and notarizable. apex's release build links libyaml through CI/Homebrew rpaths, so on any Mac without Homebrew it failed to launch and reading mode silently fell back to the raw source — the bundle promised "no install gate" (ADR-0011) and didn't deliver; Apple's notary service also rejects an unsigned Mach-O in Resources, which is how the 0.1.0 release run found it. Now `Resources/apex` is the arm64 slice of apex 1.1.58 (the bundle had shipped 1.1.17), Developer ID–signed with the hardened runtime, with one rpath (`@executable_path/../Resources/libyaml.bundle`) that resolves in the bundle and in the checkout alike; `Resources/libyaml.bundle/libyaml-0.2.dylib` (0.2.5, MIT) rides beside it, same team signature — inside a `.bundle` folder because Xcode's synced-folder classifier silently links a bare dylib into the app. `release.sh` now proves the shipped layout: apex must run from the export and the app must not link libyaml, before anything is notarized. `THIRD-PARTY-NOTICES.md` ships in the bundle.
|
||||
- **editor:** A Home repoint is a guarded document departure (finding `museion/home-repoint-retains-old-editor-target`, argus cycle-5; unticketed fix, brief-28) — Settings → Choose… committed the new Home and flipped `watchedHome` without departing the open session: the session's immutable target kept the OLD Home, so a same-slug piece in the new library made the ID-only reselect return it (autosave/Save/quit wrote the old library while structural operations resolved against the new one), the new library's rescan raised a spurious reload conflict on it, a no-collision piece was torn down by the vanish path with its dirty buffer dropped, and a card scan from the old library could land on the new library's same-slug piece. #198's departure gate never saw this seam. Now `PostsModel.repoint(to:)` runs the SAME gate (`sessionMayDepart`'s three legs — unanswered conflict, failed flush, never-loaded retype; no parallel gate) BEFORE anything commits: a refusal changes nothing (preference, binding, the session's target and buffer stay; the #198 reason spoken once, the #200 quit-refusal posture, since no Posts strip is in sight from Settings), an acceptance lands the edits on the old library first and clears the departed piece's state — nothing auto-reopens. Document identity is (Home, ID) everywhere (`EditorSession.targets`, `PostsModel.openSessionTargets`): every bare `session.postID ==` comparison is retired across select, the structural rail, conversion, the pass guard, Micropub and the card refresh, and async continuations re-validate identity at COMPLETION (the card-scan hop-back; `rescan`'s stale-Home verdict is hoisted to cover the list, the revision and the #67 text, not just the vanish check). The in-memory draft survives a repoint (no Home until first save). +9 tests over a two-Home same-slug rig (the three refusal legs with ordering pinned, same-slug open + save on flush AND quit, no-collision cleanup, stale card scan via the per-model `scanPieceCards` seam — mutation-checked, pass after repoint; review r1: the hoisted `rescan` stale-Home verdict via the `scanLibrary` seam — mutation-checked — and the draft-survives repoint), RED-first 6/6 at the pin. Suite 717 (unticketed fix, brief-28)
|
||||
|
||||
- **editor:** Quit no longer bypasses the document departure gate (#200, follow-up to the #198 audit) — `PostsModel.shutdown()` flushed both sessions best-effort and ignored the results, so quitting with an unanswered reload-conflict alert wrote the local text over the foreign disk body (`flush()` holds for conflicts only in the debounce, never itself), and a failed quit-time flush silently dropped the only copy of the edits. Quit now routes through the same departure gate as navigation (`documentsMayDepart` → `sessionMayDepart`): an unanswered conflict never writes over the foreign body, and the failed-flush-at-quit posture is BLOCK QUIT — `WritingLockAppDelegate.applicationShouldTerminate` refuses termination with one spoken reason (running before the Cold Turkey ask, so a refusal never strands a walked-away block), pinned at the pure `quitReply(posts:)` seam. Finish-audit additions: a never-loaded session's retyped words refuse too (their flush is a vacuous success — the same gap closed for navigation), and the external guest's quit-time flush is pinned. +5 tests, all flip-verified. Suite 708
|
||||
|
||||
@@ -405,6 +405,7 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
@@ -423,7 +424,7 @@
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 27.0;
|
||||
MARKETING_VERSION = 1.0;
|
||||
MARKETING_VERSION = 0.1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.babylondreams.Museion;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
REGISTER_APP_GROUPS = YES;
|
||||
@@ -441,6 +442,7 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
@@ -459,7 +461,7 @@
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 27.0;
|
||||
MARKETING_VERSION = 1.0;
|
||||
MARKETING_VERSION = 0.1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.babylondreams.Museion;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
REGISTER_APP_GROUPS = YES;
|
||||
@@ -482,7 +484,7 @@
|
||||
DEVELOPMENT_TEAM = 3M7APDAAC5;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 27.0;
|
||||
MARKETING_VERSION = 1.0;
|
||||
MARKETING_VERSION = 0.1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.babylondreams.MuseionTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
STRING_CATALOG_GENERATE_SYMBOLS = NO;
|
||||
@@ -504,7 +506,7 @@
|
||||
DEVELOPMENT_TEAM = 3M7APDAAC5;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 27.0;
|
||||
MARKETING_VERSION = 1.0;
|
||||
MARKETING_VERSION = 0.1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.babylondreams.MuseionTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
STRING_CATALOG_GENERATE_SYMBOLS = NO;
|
||||
@@ -524,7 +526,7 @@
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_TEAM = 3M7APDAAC5;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
MARKETING_VERSION = 0.1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.babylondreams.MuseionUITests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
STRING_CATALOG_GENERATE_SYMBOLS = NO;
|
||||
@@ -544,7 +546,7 @@
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_TEAM = 3M7APDAAC5;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
MARKETING_VERSION = 0.1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.babylondreams.MuseionUITests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
STRING_CATALOG_GENERATE_SYMBOLS = NO;
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ The map and the contracts, one bullet per file. Pin-level detail lives in the te
|
||||
- Prose list machinery — `ProseList.swift` (pure item scan/mutation over the plain buffer; every structural edit is ONE range replacement = single undo step); `ProseListTextView.swift` — folds are VIEW state (buffer never changes; hidden scopes styled via `foldedAttributes`), re-keyed to the nearest same-marker parent, dying when the marker text vanishes; single-line edits re-key in place (`rekey`), the newline gate is `\.isNewline` NEVER literal `\n`/`\r` compares (a CRLF pair is one grapheme); wholesale restyles self-heal into the full pass via a font probe. Fold chrome renders as tiny per-glyph CALayers in a click-through overlay — NEVER a document-sized bitmap. Image drops bridge through `ProseDropBridge` into `ingestDrop` (saved posts only, publishable files only, PLAIN files only — a dropped symlink refuses); the drop point is solved by the pure `dropIndex` (sampling + bracket + binary search; the SwiftUI closure's `location` is unusable under this hosting, off-screen rects return garbage).
|
||||
- Settings — `SettingsPaneView.swift` (sidebar + detail: Content · Pass 1 · Pass 2 · Chat · Provider Keys; the pane takes the gate's `binaryPath` and hydrates at open; detail forms left-anchored). `SettingsModel.swift` — #181: `ModelProvider` is the provider-descriptor TABLE — label, effort ladder, flagship, default endpoint, env var, wire `dialect` (chat/models paths + the SSE decoder selector), `authMode` (Bearer vs Anthropic's header pair), `keyless` (nous rides the shared Portal login); the keyless UI branch, the probe's selectors, and both credential consumers key off it. `ProviderCredential` = the ONE credential resolution (provider key, else the Portal session key for keyless providers — official endpoint ONLY, never a user-set URL) serving Test Connection and pass readiness. Writes COALESCE: the newer write queues past an in-flight one, superseded writes never spawn (partial key prefixes of a secret never reach `.env`); `hydrate` reads only and never stomps a pending edit. `HermesSettingsWriter.swift` — the real write path: surface writes and the base_url write-through ride the HermesConfigRail (#182 — the writer only builds its key list: provider, default, effort set-or-unset, base_url LAST); provider keys upsert into ALL THREE profiles' `.env` (foreign lines byte-preserved, 0600, line-broken values REFUSED — env injection; paths via ProfileLayout). `ProviderProbe.swift` — Test Connection: every request carries `Content-Type: application/json` (without it z.ai answers 200 with an error envelope); per-provider dialects (OpenAI speaks the Responses API, Anthropic `x-api-key` + pinned version + required max_tokens, zai thinking+reasoning_effort, nous plain chat-completions) — #181: URL paths, auth shape, and the SSE decoder SELECT by the descriptor's dialect, the per-dialect code stays separate functions; 512 token cap; errors riding a 2xx decode as the provider error. `onChatSurfaceWrite` → `requestRestart` (chat surface only — pass engines are one-shot). `PassReadiness.swift` — #181: the per-surface readiness module (ready / missingKey / unknown): reads each surface's provider + `.env` key through the settings seam and resolves credentials through `ProviderCredential` (the keyless fallback included); MentorSessionModel stores the verdicts and reads no keys or auth files itself.
|
||||
- Focus mode — transient per-launch (no persistence); `FocusChrome` hover zones + overlay panels float over the measure, never push it; `CaretCentering` is EDITOR-WIDE, not focus-gated; focus × reading are orthogonal axes. Cold Turkey chrome (`ColdTurkeySeat`/`ColdTurkeyDot`) mounts as overlays on the focused branch only.
|
||||
- Reading mode (ADR-0011) — `ReadingPresenter.swift`: the bundled apex binary with `-t html --no-mixed-lists --embed-images` (no-mixed-lists REQUIRED — the default merges ordered-after-bullets, killing `1. 1. 1.` renumbering; embed-images inlines base64 so `loadHTMLString` needs no file access); `<!--S:N-->` sentinels rewritten to `data-source-line` stamps; `blocks(for:)` = the click→edit line map; stylesheet = `Resources/reading.css` read fresh per build (dev builds prefer the repo copy); fallback on apex failure = escaped source, never a second renderer. `ReadingSurface.swift` — ONE WKWebView reloaded in place (remount was the dominant switch cost); only our own about:blank main-frame load is allowed.
|
||||
- Reading mode (ADR-0011) — `ReadingPresenter.swift`: the bundled apex binary (arm64, Developer ID–signed with the hardened runtime at commit time, beside `libyaml.bundle/libyaml-0.2.dylib` — self-contained through the single rpath `@executable_path/../Resources/libyaml.bundle`; the `.bundle` wrapper is load-bearing: a bare dylib in the synced folder (with or without extension — Xcode sniffs Mach-O content) becomes the APP's link target; re-sign both when the Developer ID certificate rotates) with `-t html --no-mixed-lists --embed-images` (no-mixed-lists REQUIRED — the default merges ordered-after-bullets, killing `1. 1. 1.` renumbering; embed-images inlines base64 so `loadHTMLString` needs no file access); `<!--S:N-->` sentinels rewritten to `data-source-line` stamps; `blocks(for:)` = the click→edit line map; stylesheet = `Resources/reading.css` read fresh per build (dev builds prefer the repo copy); fallback on apex failure = escaped source, never a second renderer. `ReadingSurface.swift` — ONE WKWebView reloaded in place (remount was the dominant switch cost); only our own about:blank main-frame load is allowed.
|
||||
- `AppGateState.museionHome` — fresh installs resolve once and PIN the winner: legacy `~/Documents/Museion` (dir-ness gated) → `<CloudDocs>/Museion` (resolved at the unprefixed path, never a hard-coded `iCloud~` form) → silent Documents fallback. Hosted tests take an early return — the machine's real iCloud state and defaults are never touched.
|
||||
|
||||
## Engine check (gateless launch)
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
# Third-Party Notices
|
||||
|
||||
Museion is GPL-3.0-or-later. It bundles the two components below, both under
|
||||
the MIT License; the full license text follows.
|
||||
|
||||
## apex 1.1.58 (`apex`)
|
||||
|
||||
Markdown → HTML converter, used for reading mode.
|
||||
Copyright (c) 2026 Brett Terpstra — https://github.com/ApexMarkdown/apex
|
||||
Redistributed as the arm64 slice of the v1.1.58 release binary (checksum
|
||||
verified against the published `.sha256`), re-signed for Developer ID
|
||||
distribution; rpath rewritten to load the libyaml beside it.
|
||||
|
||||
## libyaml 0.2.5 (`libyaml.bundle/libyaml-0.2.dylib`)
|
||||
|
||||
YAML parser linked by apex.
|
||||
Copyright (c) 2017-2020 Ingy döt Net
|
||||
Copyright (c) 2006-2016 Kirill Simonov — https://github.com/yaml/libyaml
|
||||
Re-signed for Developer ID distribution (the hardened runtime's library
|
||||
validation requires the team's own signature); shipped inside a `.bundle`
|
||||
folder so Xcode copies it as a resource instead of linking it into the app.
|
||||
|
||||
## MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,40 +1,140 @@
|
||||
# Museion
|
||||
|
||||
The Agentic Writing Environment (AWE): where scholars, texts, and AI minds work under a single roof — named for the Mouseion of Alexandria, the one place in history where they already did.
|
||||
**The Agentic Writing Environment** — a native macOS app where your text, your library, and a resident AI mentor work under one roof. Named for the Mouseion of Alexandria, the one place in history where they already did.
|
||||
|
||||
[](LICENSE)
|
||||
|
||||
An Obsidian-and-Copilot-class tool for long-form AI-assisted writing, with Ulysses/Scrivener depth and Paper elegance. Native macOS, built in SwiftUI.
|
||||
Museion 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. Everything you write is plain markdown in a folder you own.
|
||||
|
||||
## Features
|
||||
|
||||
### Writing
|
||||
|
||||
- **Native prose editor** (TextKit 2) with styled markdown source — headings scale, syntax dims, the plain file stays the truth. Autosaves about a second after you stop typing; `⌘S` saves now. The dot in the toolbar tells the truth: changed, saved, or failed.
|
||||
- **Reading mode** (`⌘R`) renders the piece for reading. Click anywhere to drop back into editing at that spot.
|
||||
- **Focus mode** (`⌥⌘F`) recesses the library, the mentor, and the toolbar; they return on edge hover.
|
||||
- **Cold Turkey** — a writing lock inside focus mode. Set a goal (net new words, or minutes) and Museion goes into a fullscreen kiosk until you meet it. Quitting asks once. Nothing persists.
|
||||
- **Drop an image** into prose: it is copied into the piece's `assets/` and a markdown reference lands at the drop point with the alt text selected.
|
||||
- **Lists** — `Tab` / `⇧Tab` indents and outdents, `⌥↑` / `⌥↓` moves the item with its subtree. Nested lists fold behind a gutter chevron.
|
||||
- **External files** — `⌘O` opens any `.md` file in place as a guest (never converted, never moved). `⇧⌘O` imports `.md` files as posts (copies; the originals stay put).
|
||||
- An edit from outside (Finder, iCloud, another editor) raises a **Reload / Keep Local** alert — never a silent overwrite. Cursor and scroll position come back on reopen.
|
||||
|
||||
### Outlines
|
||||
|
||||
Outline pieces are plain nested bullets with LogSeq-style keys: `⌘↑` / `⌘↓` fold, `Enter` splits at the caret, double-click a bullet to zoom into its branch with breadcrumbs back out. Drag blocks to reorder or nest. **Convert to Post…** turns an outline into prose — verbatim bullets, or a headings ladder. One-way in v1.
|
||||
|
||||
### Library
|
||||
|
||||
- Pieces live under **projects** and fold into an **archive**. The library column groups by project and Pass State, with collapse toggles and counts.
|
||||
- **Search** across titles and bodies (frontmatter excluded), title matches first.
|
||||
- Rename (retitles and moves the folder), move to project, archive, restore, trash — all from the row's menu. A folder move flushes pending edits first; a failed write aborts the move with nothing relocated.
|
||||
- The library mirrors the folder live: a recursive file watcher picks up Finder edits, new pieces, and deletes.
|
||||
|
||||
### The Mentor
|
||||
|
||||
- The mentor is a resident **[Hermes](https://hermes-agent.nousresearch.com/docs)** engine you install yourself, spawned as a child process over ACP under three isolated profiles — `museion` for Chat and Sessions, `museion-pass1` and `museion-pass2` for the passes. Model, provider, and reasoning effort are set per surface in Settings and written through Hermes' own config rail. z.ai, Anthropic, OpenAI, and Nous Portal are wired up; **Test Connection** says in plain words what is wrong.
|
||||
- **Passes** — Pass 1 critiques structure, argument, and flow (paragraph level and up); Pass 2 works at sentence level and below. Each pass streams live and ends in a verdict plus **Fix Cards**.
|
||||
- **Fix Cards** are a first-class surface, never toasts. A mechanical card offers **Apply** behind a sheet showing the exact edit (anchored quote → replacement) — one card at a time, there is no apply-all. A demonstration card shows one annotated example on your own text and closes Done or Skip. A stale anchor (the text moved) flags the card instead of editing.
|
||||
- **Deslop lint** runs natively in Swift at every pass invocation — banned-vocabulary tiers and em-dash density land as cards before the engine even sees the piece. Override the tables with `<Home>/deslop-lint.json`.
|
||||
- **Learnings** — promote a card into a per-writer, per-content-type memory of your recurring weaknesses. Plain markdown files in the Home; every later pass consults them. Dismiss a Learning and it fades, resurfacing after 10 completed passes (doubling on each re-dismiss).
|
||||
- **Sessions** — freeform conversations: new, resume, fork, compact, Stop. **New Post** turns a reply into a piece (stamped `origin: ai`, never stats-eligible). A Brainstorm is a session with an opener.
|
||||
- **Blind Read** — an advisory A/B judgment of the current text against the pass-start snapshot, by a fresh session that never saw the history. Records nothing; you stay the judge.
|
||||
- **Research notes** — mid-pass findings arrive as candidate cards with provenance. Keep lands a note in the piece's `research/`; Reject vanishes.
|
||||
- **Drill offers** — two-minute craft drills riding the finding that motivates them. Declined drills vanish; drill output never touches the draft.
|
||||
- The methodology ships as markdown skills seeded into the profiles (the Serif stack, deslop, pass and session personas, demonstrator doctrine, craft canon, the VOICE payload). Your own skills are never overwritten.
|
||||
|
||||
### Measuring progress
|
||||
|
||||
Running a pass on an unaided first draft captures four style metrics — burstiness, type-token ratio, sentence variation, trigram repetition — before the mentor sees the text. The **Trends** pane charts them across captures with an honest *improving / steady / slipping* verdict per metric.
|
||||
|
||||
### Publishing
|
||||
|
||||
**[Micro.blog](https://micro.blog) via Micropub:** Publish ▸ **Send as Draft** ▸ review on Micro.blog ▸ **Publish**. The app token lives in your login keychain. Illustrations upload first and ride inline where you placed them; a picture without alt text never ships. The piece on disk never changes.
|
||||
|
||||
### Rails
|
||||
|
||||
- Hardened runtime on; sandbox off (the app spawns your `hermes` binary).
|
||||
- Daily backup of the three Hermes profiles, last seven kept — Help ▸ Open Backup Folder.
|
||||
- Quit, navigation, and Home changes all pass one departure gate: an unanswered conflict or a failed save blocks the move. Edits are never dropped.
|
||||
|
||||
## Requirements
|
||||
|
||||
- macOS 26.5+ — developed against the latest Xcode (26.x) and Swift (6.3.x); no backward compatibility
|
||||
- [SwiftFormat](https://github.com/nicklockwood/SwiftFormat) and [SwiftLint](https://github.com/realm/SwiftLint) for linting (`brew install swiftformat swiftlint`)
|
||||
- **macOS 27 or later** (Apple Silicon).
|
||||
- **Hermes engine** — needed for Passes and Sessions. The editor, library, outlines, and publishing work without it. Install with `curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash` ([installation guide](https://hermes-agent.nousresearch.com/docs)).
|
||||
- A provider API key for the model the mentor should run on (Settings ▸ Provider Keys).
|
||||
- A [Micro.blog](https://micro.blog) account — only if you publish.
|
||||
|
||||
## Getting started
|
||||
## Install
|
||||
|
||||
```bash
|
||||
git clone https://git.babylondreams.de/AlexKucera/museion.git
|
||||
cd museion
|
||||
Download `Museion-<version>.dmg` from [Releases](https://git.babylondreams.de/AlexKucera/museion/releases), open it, drag Museion to **Applications**.
|
||||
|
||||
open Museion.xcodeproj # develop in Xcode
|
||||
xcodebuild -project Museion.xcodeproj -scheme Museion -destination 'platform=macOS' build # build
|
||||
xcodebuild -project Museion.xcodeproj -scheme Museion -destination 'platform=macOS' test # test (unit + UI)
|
||||
swiftformat . && swiftlint . # lint
|
||||
```
|
||||
The app is signed with a Developer ID and notarized with Apple, so it opens like any other app.
|
||||
|
||||
Full Xcode project at the repo root — `open Museion.xcodeproj` and run.
|
||||
## Quick start
|
||||
|
||||
1. **First launch** picks your **Museion Home** — the folder everything lives in. Fresh installs get `iCloud Drive/Museion` when iCloud Drive is on, otherwise `~/Documents/Museion`. Settings ▸ Content shows the path; repoint any time (Museion never moves files).
|
||||
2. **Install Hermes** (one-liner above). Museion finds it on the next launch, creates the three profiles, and seeds the writing skills — nothing else to set up. The rail pill and the Mentor header show engine state; the status card carries **Re-check**.
|
||||
3. **Add a provider key** under Settings ▸ Provider Keys and hit **Test Connection**.
|
||||
4. **Write.** `⌘N` for a new post, `⇧⌘N` for an outline. The first line is the title.
|
||||
5. **Run a Pass** from the Mentor pane. Read the verdict, work the Fix Cards one at a time, promote the patterns worth remembering into Learnings.
|
||||
6. **Publish** when the piece is yours.
|
||||
|
||||
## Keyboard shortcuts
|
||||
|
||||
| Action | Keys |
|
||||
| --- | --- |
|
||||
| New Post · New Outline · New Project… | `⌘N` · `⇧⌘N` · `⌥⌘N` |
|
||||
| Open a file as a guest · Import files | `⌘O` · `⇧⌘O` |
|
||||
| Save | `⌘S` |
|
||||
| Toggle Reading Mode | `⌘R` |
|
||||
| Toggle Focus Mode | `⌥⌘F` |
|
||||
| Start Cold Turkey… | View menu (inside focus mode) |
|
||||
| Check Spelling While Typing | Edit menu (off by default) |
|
||||
| Prose list: indent · outdent · move item | `Tab` · `⇧Tab` · `⌥↑` `⌥↓` |
|
||||
| Outline: fold · move subtree · select blocks · split | `⌘↑` `⌘↓` · `⌥↑` `⌥↓` · `⇧↑` `⇧↓` · `Enter` |
|
||||
| Composer: send · newline | `Return` · `⇧Return` |
|
||||
|
||||
## Your Museion Home
|
||||
|
||||
Everything you write lives in one folder — the **Museion Home** — as plain markdown you can reach from anywhere.
|
||||
|
||||
```
|
||||
<Home>/
|
||||
projects/<project>/<piece-id>/post.md one piece, one folder
|
||||
assets/ illustrations (drop an image)
|
||||
research/ kept research notes
|
||||
cards/ the piece's fix cards
|
||||
passes/ pass-start snapshots
|
||||
archive/<project>/<piece-id>/post.md finished work, Finder-visible
|
||||
learnings/<content-type>/… promoted patterns, one markdown file each
|
||||
deslop-lint.json optional lint-table override
|
||||
```
|
||||
|
||||
- **Default for new Homes: `iCloud Drive/Museion`** — `~/Library/Mobile Documents/com~apple~CloudDocs/Museion`, resolved dynamically. When iCloud Drive is unavailable at first run, Museion silently falls back to `~/Documents/Museion` — no dialog; the Settings Home field shows the resolved path. An existing `~/Documents/Museion` Home is never silently moved — it stays your Home until you migrate it yourself (#169).
|
||||
- **Migrating an existing Home:** Museion is repoint-only — it never moves content. Move the `Museion` folder in Finder (e.g. `~/Documents/Museion` → `iCloud Drive/Museion`), then repoint via **Settings ▸ Content ▸ Museion Home ▸ Choose…** (Museion/SettingsPaneView.swift:199).
|
||||
- **Migrating an existing Home:** Museion is repoint-only — it never moves content. Move the `Museion` folder in Finder (e.g. `~/Documents/Museion` → `iCloud Drive/Museion`), then repoint via **Settings ▸ Content ▸ Museion Home ▸ Choose…**.
|
||||
- **Avoid eviction stalls:** right-click the `Museion` folder in Finder and choose **Keep Downloaded**. Pinning keeps files local, so opening a piece never waits on a download (#168).
|
||||
- **iCloud quirks are substrate, not bugs:** editing the same file on two devices yields numbered duplicate siblings — iCloud keeps both, it never merges. An evicted file keeps its real name and size, but its first read blocks while the data downloads (#168).
|
||||
- **Companions:** Textastic-class editors open and edit pieces in place on iPhone/iPad via the Files app / document picker; iCloud.com and iCloud for Windows reach the Home too (#168, #169).
|
||||
|
||||
## Development
|
||||
|
||||
SwiftUI, Swift 6 (language mode 6, default MainActor isolation), macOS 27+, latest Xcode only — no backward compatibility, no pinned toolchains.
|
||||
|
||||
```bash
|
||||
git clone https://git.babylondreams.de/AlexKucera/museion.git
|
||||
cd museion
|
||||
|
||||
open Museion.xcodeproj # develop in Xcode
|
||||
./scripts/build-and-run.sh # build + launch (⌘R equivalent)
|
||||
xcodebuild -project Museion.xcodeproj -scheme Museion -destination 'platform=macOS' build
|
||||
./scripts/full-test.sh start && ./scripts/full-test.sh status # full unit suite (verify rail)
|
||||
swiftformat . && swiftlint . # lint (brew install swiftformat swiftlint)
|
||||
./scripts/deploy.sh # Release build → /Applications
|
||||
./scripts/release.sh # Developer ID-signed, notarized DMG → dist/
|
||||
```
|
||||
|
||||
`AGENTS.md` is the binding work contract for agents and humans alike; `GLOSSARY.md` pins the vocabulary; decisions live in `docs/adr/`; one session log per task in `docs/devlog/`.
|
||||
|
||||
## License
|
||||
|
||||
GPL-3.0-or-later — see [LICENSE](LICENSE).
|
||||
GPL-3.0-or-later — see [LICENSE](LICENSE). The bundled reading renderer (apex) and its libyaml are MIT; see [Museion/Resources/THIRD-PARTY-NOTICES.md](Museion/Resources/THIRD-PARTY-NOTICES.md).
|
||||
@@ -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.
|
||||
- `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/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
|
||||
|
||||
@@ -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`) |
|
||||
| `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 |
|
||||
| `releases/` | Release notes per version — human-readable distillation of the CHANGELOG section; the Gitea release body |
|
||||
@@ -9,7 +9,7 @@ Reading mode renders markdown through apex (MIT, unified dialect) as an HTML fra
|
||||
|
||||
## Consequences
|
||||
|
||||
- **Bundling:** the prebuilt apex binary ships in app resources, signed + notarized. No source build in CI, no user install gate — a renderer must not grow a gate.
|
||||
- **Bundling:** the prebuilt apex binary (arm64 slice) and a vendored libyaml ship in app resources, Developer ID–signed at commit time (apex with the hardened runtime), apex's rpaths replaced by the single `@executable_path/../Resources`, which resolves in the bundle and in the checkout alike; Xcode copies and seals both as resources untouched. The vendored copy lives in `Resources/libyaml.bundle/` ON PURPOSE: Xcode's synced-folder classifier sniffs Mach-O content and silently adds any bare dylib (extension or not) to the app's link phase; a `.bundle` folder is an opaque resource. apex's release build links libyaml through CI/Homebrew rpaths, so alone it only ever ran on developer machines — reading mode silently fell back to source for everyone else (surfaced by the 0.1.0 notarization, which also rejects an unsigned Mach-O in Resources). Re-sign both when the Developer ID certificate rotates (`codesign -f -s "<identity>" --options runtime --timestamp Resources/apex`; `codesign -f -s "<identity>" --timestamp Resources/libyaml.bundle/libyaml-0.2.dylib`). No source build in CI, no user install gate — a renderer must not grow a gate. Licenses: `Resources/THIRD-PARTY-NOTICES.md`.
|
||||
- **One WKWebView, reloaded in place.** Remounting per document (`.id(sel)`) was the dominant switch cost — hundreds of ms of web-process respawn; `loadHTMLString` on a retained view feels instant.
|
||||
- **`--no-mixed-lists` is required**, not tuning: apex's default merges an ordered list following a bullet list into one `<ul>`, killing `1. 1. 1.` auto-renumbering.
|
||||
- **Early handoff:** stdout EOF is conversion done; apex's ~65 ms teardown is reaped async via `terminationHandler` (the error path still waits for exit status).
|
||||
@@ -0,0 +1,98 @@
|
||||
# Release 0.1.0 — version bump, README rewrite, release notes, DMG packaging
|
||||
|
||||
> **Date:** 2026-12-01
|
||||
> **Type:** milestone
|
||||
> **Reference:** tag `v0.1.0` at `d470615` (local; push + Gitea release pending Alexander's go)
|
||||
|
||||
## Goal
|
||||
|
||||
Cut the first release: bump to 0.1.0 with a git tag, a DMG shareable on Gitea, a human-readable
|
||||
release-notes document (CHANGELOG.md is too dense for a release page), and a README with a real
|
||||
feature list and usage instructions now that the codebase is stable.
|
||||
|
||||
## What Was Done
|
||||
|
||||
- `Museion.xcodeproj/project.pbxproj`: `MARKETING_VERSION` 1.0 → 0.1.0 on all three targets (six
|
||||
configs). `CURRENT_PROJECT_VERSION` stays 1. Verified in a real Release archive: Info.plist reads
|
||||
`0.1.0` / `1`, `LSMinimumSystemVersion` 27.0, binary arm64 only.
|
||||
- `CHANGELOG.md`: `## [0.1.0] - 2026-12-01` heading over the former Unreleased entries, empty
|
||||
`[Unreleased]` above, pointer to the release notes.
|
||||
- `README.md`: rewritten. Intro → features (Writing, Outlines, Library, The Mentor, Measuring
|
||||
progress, Publishing, Rails) → requirements → install → quick start → shortcut table → the
|
||||
Museion Home (kept, plus a folder-layout block) → development commands → license. Every feature
|
||||
line grounded in `MuseionApp.swift` (menus/shortcuts), `Museion/AGENTS.md`, and CHANGELOG entries;
|
||||
nothing from the PRD's ambitions.
|
||||
- `docs/releases/0.1.0.md`: the distilled notes — what's in it, the milestones closed (M0–M6 plus
|
||||
the post-v1 extensions), install, known limits, numbers. This is the Gitea release body.
|
||||
- `scripts/release.sh`: archive → `-exportArchive` with `method: developer-id` → UDZO DMG
|
||||
(`diskutil image create from`) → `notarytool --wait` → `stapler staple` → `spctl` assessment.
|
||||
Preflight refuses before any build when no `Developer ID Application` identity is in the
|
||||
keychain. `NOTARIZE=0` skips notarize+staple. Output `dist/Museion-<MARKETING_VERSION>.dmg`
|
||||
(version read from build settings, not from the pbxproj text). `.gitignore` gains `dist/`.
|
||||
- DOX: root `AGENTS.md` commands block + scripts index row + Stack line (macOS 27+, see gotchas);
|
||||
`docs/AGENTS.md` Local Contract for `docs/releases/<version>.md` + Child DOX Index row.
|
||||
- Three commits (`docs(readme)`, `build(release)`, `chore(release)`) and annotated tag `v0.1.0` on
|
||||
the last.
|
||||
- Verification: `scripts/full-test.sh` at the tagged commit — 717 executed / 717 passed / 0 failed;
|
||||
`shellcheck scripts/release.sh` clean; `bash -n` clean; preflight refusal exercised; archive step
|
||||
ran (38 s); DMG step proven on the dev-signed archive app (3.3 MB UDZO, mounts, signature
|
||||
verifies inside).
|
||||
|
||||
## Decisions & Rationale
|
||||
|
||||
| Decision | Rationale |
|
||||
|----------|-----------|
|
||||
| No wayfinder map — direct session | The skill's own test: no fog, one session. The only real decision (signing) was a question for Alexander, not a ticket. |
|
||||
| `v0.1.0` tag with the `v` | The convention Gitea release pages expect; annotated so it carries a message. |
|
||||
| Tag AFTER the docs commits | The tagged tree must contain the README and release notes it describes. |
|
||||
| DMG, no zip | Same effort with `diskutil image create`; DMG is what Mac users expect. |
|
||||
| `docs/releases/<version>.md` over a root `RELEASE_NOTES.md` | Scales per release, lives under the docs contract, reviewable in the commit; the Gitea release body is pasted from it. |
|
||||
| `archive` + `-exportArchive` (method `developer-id`) over a plain Release build with `CODE_SIGN_IDENTITY` overrides | The Xcode-sanctioned distribution path — identical to Organizer's export, so a GUI fallback matches. Preflight guarantees no portal-side surprise from `-allowProvisioningUpdates`. |
|
||||
| arm64 only | `MACOSX_DEPLOYMENT_TARGET = 27.0`; macOS 27 does not run on Intel, so a universal binary is dead weight. |
|
||||
| Developer ID + notarization | Alexander has a Developer ID (not yet on this Mac). Without notarization Gatekeeper still blocks on Sequoia+ regardless of the signing cert, so Developer ID alone buys nothing for the downloader. |
|
||||
| `diskutil image create from` over `hdiutil create` | hdiutil create is deprecated on macOS 27 (warning on every run); the replacement produced an identical UDZO image. |
|
||||
| Stale README "macOS 26.5+" → 27+ | pbxproj `MACOSX_DEPLOYMENT_TARGET = 27.0` on all six configs and `Museion/AGENTS.md` already said 27.0; the root Stack line was corrected to match. |
|
||||
|
||||
## Gotchas & Fixes
|
||||
|
||||
| Problem | Root Cause | Fix |
|
||||
|---------|------------|-----|
|
||||
| `codesign -dv` prints no `Authority=` lines — the script's Developer-ID check would have false-failed on the real run | Authority chain needs `-dvv` | `codesign -dvv` in both the check and the diagnostic echo |
|
||||
| `hdiutil create` warns "deprecated. Please use 'diskutil image create…'" on macOS 27 | Apple moved image creation under diskutil | `diskutil image create from --format UDZO --volumeName … <stage> <dmg>`; kept `hdiutil detach` for the busy-volume guard (not deprecated) |
|
||||
| `security find-identity -v -p codesigning` showed only `Apple Development` despite Alexander having a Developer ID | A Developer ID private key exists only on the Mac that generated the CSR; the portal copy is useless without it | Preflight names the Xcode path (Settings ▸ Accounts ▸ Manage Certificates ▸ + ▸ Developer ID Application) or a `.p12` import from the other Mac |
|
||||
| `git log --oneline` hid the merge commit `3bb1782` and read as if HEAD were `cac66f6` | This machine's log config suppresses merges in short logs | Trust `git status --branch` and `git show -s` for ancestry; the snapshot's "ahead 2" was the merge + one chore commit |
|
||||
| AGENTS.md session-log window was one log stale (11-23 missing) | The 11-23 write-log did not refresh the window | Window rebuilt from INDEX's 10 newest rows |
|
||||
|
||||
## Files Changed
|
||||
|
||||
| File | Change Summary |
|
||||
|------|---------------|
|
||||
| `Museion.xcodeproj/project.pbxproj` | `MARKETING_VERSION = 0.1.0` ×6 |
|
||||
| `CHANGELOG.md` | `[0.1.0] - 2026-12-01` heading + notes pointer |
|
||||
| `README.md` | Full rewrite: features, requirements, install, quick start, shortcuts, Home layout, development |
|
||||
| `docs/releases/0.1.0.md` | New — distilled release notes (Gitea release body) |
|
||||
| `scripts/release.sh` | New — Developer ID export → notarized DMG |
|
||||
| `.gitignore` | `dist/` |
|
||||
| `AGENTS.md` | Stack line → macOS 27+; commands block `release.sh`; scripts index row; session-log window |
|
||||
| `docs/AGENTS.md` | `docs/releases/<version>.md` contract + index row |
|
||||
|
||||
## Open Items & Next Steps
|
||||
|
||||
- [ ] Alexander: create the Developer ID Application identity on this Mac (Xcode ▸ Settings ▸
|
||||
Accounts ▸ Manage Certificates… ▸ + ▸ Developer ID Application — Account Holder only) or
|
||||
import the `.p12` from the Mac that holds the private key.
|
||||
- [ ] Alexander (for notarization): `xcrun notarytool store-credentials museion-notary --apple-id …
|
||||
--team-id 3M7APDAAC5 --password <app-specific password>` — the secret never leaves his hands.
|
||||
- [ ] Then `./scripts/release.sh` → `dist/Museion-0.1.0.dmg`; mount test, `spctl` should read
|
||||
`accepted, source=Notarized Developer ID`.
|
||||
- [ ] Only on explicit go: `git push origin main v0.1.0`, then the Gitea release with the DMG
|
||||
attached and `docs/releases/0.1.0.md` as the body.
|
||||
- [ ] README's "signed and notarized" sentence is true only after the step above lands — revert
|
||||
to the Gatekeeper-workaround wording if notarization is skipped.
|
||||
- [ ] Optional: a screenshot for the README (launch the archive build, `screencapture -l <window>`).
|
||||
- [ ] Pre-existing, not touched: Release build emits `Text +` deprecation warnings in
|
||||
`TrendsPaneView.swift:389–391`.
|
||||
|
||||
---
|
||||
|
||||
*Log written by write-log skill*
|
||||
@@ -5,6 +5,7 @@ Complete history of session logs in this directory, newest first. One-line summa
|
||||
<!-- write-log: full-index -->
|
||||
| Date | Type | File | Summary |
|
||||
|------|------|------|---------|
|
||||
| 2026-12-01 | milestone | [20261201-release-010-readme-notes-packaging_log.md](20261201-release-010-readme-notes-packaging_log.md) | Release 0.1.0: version bump + tag, README feature/usage rewrite, distilled release notes, release.sh (Developer ID DMG, notarize); rail 717/717; Developer ID cert pending |
|
||||
| 2026-11-23 | fix | [20261123-home-repoint-retains-old-editor-target_log.md](20261123-home-repoint-retains-old-editor-target_log.md) | Unticketed fix (brief-28, argus cycle-5): a Home repoint is a guarded document departure — the gate runs before the preference/binding commit, the refusal keeps Home A and the buffers; document identity is (Home, ID) across the model and re-checked at async completion (card scan, rescan — both mutation-checked); RED-first 6/6 at ca265d3b, review r1 +2 pins (rescan hoist, draft survives); rail 717/717 |
|
||||
| 2026-11-19 | fix | [20261119-issue200-gate-quit-time-flushes-through-departure-gate_log.md](20261119-issue200-gate-quit-time-flushes-through-departure-gate_log.md) | Quit routes through the departure gate (#200): conflict-held shutdown, BLOCK-QUIT at applicationShouldTerminate, never-loaded-retype guard; finish-audit fixes; rail 708/708 |
|
||||
| 2026-11-17 | fix | [20261117-acp-backpressure-defeats-timeout-and-shutdown_log.md](20261117-acp-backpressure-defeats-timeout-and-shutdown_log.md) | Unticketed fix (brief-27, argus cycle-4): stdin writes move to a dedicated writer queue — engine backpressure can no longer defeat the request deadline, Stop, or a bounded reaping close; neverRead/serverPing fake modes, 3 RED-first smokes + healthy-contract pin, suite 697/697 |
|
||||
|
||||
@@ -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.
|
||||
Executable
+135
@@ -0,0 +1,135 @@
|
||||
#!/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. Create it at developer.apple.com ▸ Certificates ▸ + ▸
|
||||
# Developer ID Application from a Keychain Access ▸ Certificate Assistant CSR —
|
||||
# Xcode's Manage Certificates refuses this even for the Account Holder (stale
|
||||
# role cache). The private key lives only on the Mac that made the CSR — 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: developer.apple.com ▸ Certificates ▸ + ▸ $IDENTITY (CSR from Keychain Access ▸ Certificate Assistant)" >&2
|
||||
exit 1
|
||||
fi
|
||||
SIGNER=$(security find-identity -v -p codesigning | sed -n 's/.*"\('"$IDENTITY"':[^"]*\)".*/\1/p' | head -1)
|
||||
|
||||
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"
|
||||
# Capture first: `codesign -dvv | grep -q` SIGPIPEs codesign under pipefail (grep
|
||||
# quits at the first Authority line while codesign still writes its Info.plist dump).
|
||||
SIGNATURE=$(codesign -dvv "$APP" 2>&1)
|
||||
grep -q '^Authority=Developer ID Application' <<<"$SIGNATURE" \
|
||||
|| { echo "Export is not Developer ID signed:" >&2; grep '^Authority=' <<<"$SIGNATURE" >&2; exit 1; }
|
||||
# The bundled renderer must run from the SHIPPED layout (rpath → Resources/libyaml.bundle), and
|
||||
# the app must not link libyaml — a bare dylib in the synced Resources folder becomes a link target
|
||||
# silently (Xcode sniffs Mach-O content), which is why the vendored copy sits in a .bundle.
|
||||
if otool -L "$APP/Contents/MacOS/$SCHEME" | grep -q libyaml; then
|
||||
echo "The app links libyaml — it must only be apex's dependency, never the app's" >&2; exit 1
|
||||
fi
|
||||
run "$APP/Contents/Resources/apex" --version
|
||||
|
||||
# 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"
|
||||
# Gatekeeper's open-assessment needs the IMAGE signed too; the notary ticket is stapled onto this signature.
|
||||
run codesign --timestamp --sign "$SIGNER" "$DMG"
|
||||
|
||||
if [[ "${NOTARIZE:-1}" == "1" ]]; then
|
||||
# `--wait` exits 0 on Invalid too — the status FIELD is the verdict. (JSON goes to
|
||||
# stdout only; notarytool has no output-path option.)
|
||||
echo "→ xcrun notarytool submit $DMG --keychain-profile $NOTARY_PROFILE --wait"
|
||||
if ! xcrun notarytool submit "$DMG" --keychain-profile "$NOTARY_PROFILE" --wait --output-format json >"$DIST/notary.json" 2>"$log"; then
|
||||
echo "Failed: notarytool submit" >&2; cat "$log" >&2; exit 1
|
||||
fi
|
||||
if ! grep -Eq '"status" *: *"Accepted"' "$DIST/notary.json"; then
|
||||
echo "Notarization not accepted — Apple's log:" >&2
|
||||
xcrun notarytool log --keychain-profile "$NOTARY_PROFILE" \
|
||||
"$(awk -F'"' '/"id" *:/ {print $4; exit}' "$DIST/notary.json")" >&2
|
||||
exit 1
|
||||
fi
|
||||
# The ticket can reach the CDN a few seconds after "Accepted"; stapler 404s in that window.
|
||||
for attempt in 1 2 3 4 5 6; do
|
||||
xcrun stapler staple "$DMG" && break
|
||||
[[ "$attempt" == 6 ]] && { echo "Stapling failed after 6 attempts; retry: xcrun stapler staple $DMG" >&2; exit 1; }
|
||||
echo " ticket not on the CDN yet, retrying in 10 s ($attempt/6)…"
|
||||
sleep 10
|
||||
done
|
||||
# The Gatekeeper verdict a downloader's Mac will reach.
|
||||
spctl -a -t open --context context:primary-signature -v "$DMG"
|
||||
fi
|
||||
|
||||
echo "Built: $DMG"
|
||||
Reference in new issue
Block a user