Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
Merge pull request #2251 from atomantic/claim/issue-2179
[._.]/ Adam Eivy4ce914b5dc25
diff --cc .changelog/NEXT.mdindex 57b4e7eec9,7b7459b946..68f7ae1488--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@@ -35,8 -35,9 +35,10 @@@- **[issue-2178] Canon can now be reveal-gated so a mystery or twist doesn't leak into the prose before it's due.** Canon context — including character secrets and late-story facts — was injected into every issue's drafting prompt, so the writer model could (and would) spill a reveal issues early. Each canon entry (character, place, or object) now carries optional reveal gating: a `revealIssue` number hides the fact from any issue before it; a `spoiler` flag hard-hides it from all drafting context; and an optional `surfaceDescriptor` is the spoiler-free stand-in shown before the reveal ("the locked east wing" instead of "the wing where the heir is imprisoned"). The drafting/rewrite prompts (`buildStageContext`, the alternate-POV rewrite cast) filter canon to each issue's reveal horizon, while the judge and editorial checks still receive the full canon so they can verify hint placement. Absent gate fields mean "always visible," so every existing canon entry and every federation peer round-trips unchanged. A reveal-timing editor with a spoiler badge lands on every canon-entry card (universe + series). A new `continuity.premature-reveal` editorial check (gated on the series having authored any reveal-gated canon) scans drafted prose for a gated fact stated or unambiguously implied before its reveal issue, distinguishing a genuine leak from deliberate foreshadowing — and its reveal issue feeds the Chekhov setups-payoffs check as an authored payoff so an orphaned reveal is flagged too.- **[issue-2177] Prose drafts now flow across issue boundaries instead of each issue opening and closing in a vacuum.** When drafting an issue's prose, the generator now injects the previous issue's actual closing prose (its last ~2000 characters) and the next issue's opening beats into the draft prompt — with guidance to open so it flows from the previous ending (without repeating its closing image or re-explaining what the reader just read) and to land the ending so it hands off to the next issue's beats. This is what keeps the narrative voice carrying across units and prevents the "every issue opens/closes the same way" tic, improving the autonomous first draft so the editorial loop has less to fix. Both blocks are token-budgeted (they degrade by trimming on a small-context local model rather than erroring), and when the previous issue hasn't been drafted yet — non-linear or parallel generation, or the first issue of a volume — the block simply doesn't render, so there's never any fabricated continuity. Every full prose (re)generation path gets it: the manual draft button, the auto-runner, and Series Autopilot. Existing installs auto-upgrade their prose prompt (a customized prompt is left untouched and flagged).- **[issue-2179] The voice-drift check can now measure each issue against the voice you CHOSE — its style-guide exemplars — instead of the average of what got drafted.** The `style.voice-drift` check flags an issue whose prose fingerprint sits more than a threshold's σ from a baseline; that baseline used to be the drafted-issue mean, which has a blind spot — if every issue drifted the same way, the average drifts with them and nothing flags. A new **Drift baseline** setting on the check adds two modes on top of the default `drafted`: `exemplars` re-centers every metric on the combined fingerprint of the style guide's voice exemplars (the "tuning fork" passages from the first #2179 slice), and `blended` uses the midpoint of the two. In exemplar/blended mode the spread (σ) is still the drafted corpus's — only the center shifts — so an issue is judged against the chosen voice while still tolerating the series' natural per-metric variance. When the style guide has too little exemplar prose (under ~40 words combined) the run silently falls back to `drafted` and says so. Findings read "…vs the style guide's chosen voice of 5 words" instead of implying drift from the drafted mean, and the deep-linkable **Voice Fingerprint** matrix view renders the chosen-voice baseline as its own footer row with the outlier cells measured against it. The check now also lists the style guide as a source, so editing an exemplar re-stales the finding — exactly like its LLM siblings. (Third slice of #2179 — the voice-fingerprint baseline hook; the AI-assisted voice-discovery flow and Writers Room parity ship separately.) (`server/lib/editorial/voiceFingerprint.js`, `server/lib/editorial/checks/proseStyle.js`, `server/services/pipeline/voiceFingerprint.js`, `client/src/pages/PipelineVoiceFingerprint.jsx`)+- **[issue-2248] The chosen-voice baseline now also catches drift the whole series shares — not just per-issue outliers.** The exemplar/blended `style.voice-drift` baseline (#2247) flags an issue that stands apart from the chosen voice, but it had a residual blind spot: when *every* drafted issue sits at the same value on a metric (zero spread) yet that shared value is far from the chosen voice, there is no per-issue outlier to name — the whole corpus is uniformly off-register. The classic case is a dialogue-free series measured against a dialogue-heavy chosen voice: every issue's dialogue ratio is 0, so the per-issue z-score model stays silent even though the register is plainly wrong. The check now emits a distinct **series-wide** finding for exactly this case ("The whole series sits at 0% on dialogue ratio vs the style guide's chosen voice of 42.5% — the corpus is uniformly below the chosen voice here"), gated on a scale-free relative distance so it works across metrics with wildly different scales and never fires under the default `drafted` baseline (where the center is the mean by definition). Series-wide findings carry no issue number (it's a corpus-wide observation, not an outlier) and escalate one severity rank above the per-issue floor, and the **Voice Fingerprint** matrix view surfaces them as a banner above the table since they have no single cell to highlight. (Follow-up slice of #2179.) (`server/lib/editorial/voiceFingerprint.js`, `server/lib/editorial/checks/proseStyle.js`, `server/services/pipeline/voiceFingerprint.js`, `client/src/pages/PipelineVoiceFingerprint.jsx`)+ - **[issue-2179] "Discover voice" now writes the same scene beat in five distinct registers so you can pick the series voice by ear.** Filling in a voice exemplar from a blank page is the hard part — so the series style-guide editor gains a **Discover voice** button that runs one LLM call and returns the *same* invented scene moment written five ways (spare / lyric / wry / close-psychic / cinematic). Each candidate renders side-by-side with its register label; one click files it into `voiceExemplars` ("the tuning fork") or, for a passage in the wrong register, into `voiceAntiExemplars` — both capped at 3, with the register carried as the passage note. Nothing persists until you save, exactly like the New Series "Generate with AI" concept flow, and the call only fires on your explicit click (no cold-bootstrap LLM work). The trial passages are seeded with the series' premise + existing tone/house-style so the registers vary *within* the world rather than swapping genre. Ships as a new `pipeline-series-voice-discover` stage prompt (seeded to existing installs, no migration since it's a brand-new template) behind `POST /api/pipeline/series/:id/discover-voice`. (Fourth slice of #2179 — the phase headline; Writers Room parity ships separately.) (`server/services/pipeline/seriesVoiceDiscover.js`, `server/routes/pipeline/series.js`, `server/lib/styleGuide.js`, `client/src/pages/PipelineSeries.jsx`, `data.reference/prompts/stages/pipeline-series-voice-discover.md`)+## Human Activity Tracking- **[issue-2150] Activity timeline** — a new `/timeline` page shows a unified, day-by-day view of your activity (emails sent/received and calendar events, with more sources coming), backed by a machine-local `human_activity_events` store that your existing message and calendar syncs populate automatically. Pick any day (deep-linkable via `/timeline/:date`), see an hourly activity histogram and per-source tallies, and browse the day's events. Only metadata and a short summary line are stored — full message bodies stay in their per-source caches — and the timeline is machine-local (never federated to peers), like Tribe.