The product, its assistant, the repo, the host and every unit on the box now
share one name. 638 files, ~3,000 mentions: UI copy, config, env keys
(FLEETCROWN_* -> LOKI_*), systemd units (fleetcrown-* -> loki-*), docs,
articles, the deploy workflow other repos reuse, and nine file names.
- Three article slugs carried the old name and had been shared; permanent
redirects keep those links alive (next.config.ts).
- test-no-retired-name.sh now also forbids the old product name across the
whole repo, so the rename cannot creep back through templates and examples.
- ASSISTANT_STACK collapses the product and the assistant into one entry,
because they are now the same name.
Infra was cut over ahead of this merge: /opt/loki, loki-* units, the `loki`
database and role, loki.orangecat.ch (old host 308s to it; /api, /widget,
/embed keep proxying), GitHub repos bitbaum/loki and bitbaum/loki-releases.
The Resend sending domain stays fleetcrown.orangecat.ch until the new domain
is verified in DNS.
Claude-Session: https://claude.ai/code/session_016YJVAanfj8keVSXyZnTemh
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
George filed two reports through FleetCrown's own feedback widget, watched
nothing happen, and asked Loki "what was the most recent feedback sent".
Not in your data.
Both rows were in site_feedback, filed minutes earlier. Four runs spawned from
them sat in `waiting`. Twenty-four runs had errored in three days. The answer
was nevertheless honest: Loki had been handed no records, so the sentence was
true of what it could see — which is worse than an error, because a truthful
negative reads as a checked one.
Three independent causes, each sufficient alone.
1. NO SOURCE READ THE TABLE. `grep -rn feedback src/lib/agent/` returned
nothing. Nor did runs, agent sessions, alerts, or notes. Loki could see the
"life" half of the product (people, projects, goals) and nothing of the
fleet half the product is named after.
2. THE PROMPT BUDGET WAS ARITHMETICALLY IMPOSSIBLE. One module constant —
Groq's 12000-token minute window x 0.8 / 3 rounds = 3200 — applied to every
vendor. Groq has since cut the window to 8000, and the prompt's own fixed
cost measures 2946 tokens (system prompt 1264 + native tool schema 977 +
catalog), leaving ~254 tokens: one fact. With the operator's message it goes
negative, the fit correctly returns zero, and production logged
`[loki] round 1: 40 facts exceed the call budget — sending 0` on every turn
and sent it anyway with an empty Records block.
3. THE RICHER SEED WAS ON THE FALLBACK PATH ONLY. buildGroundedTurn (approvals,
knowledge, economy, cues) ran only inside askLokiViaGateway. The primary
loop seeded people + projects. So the approval queue seeded in #262
*specifically to survive losing the tool loop* was, on the path that
normally ran, reachable only by the tool call the loop could not afford.
WHAT CHANGED
Retrieve first, then reason. A pure keyword planner (src/lib/agent/plan.ts)
reads the question and fetches the relevant sources in parallel BEFORE the
model is called; tools become depth, not basic retrieval. A tool loop needs a
healthy model and a fitting prompt before it can ask its first question, which
is exactly what is missing when this class fires. A regex is dumber than a
model and never rate-limited. This is how OrangeCat's Cat has always worked.
Eleven new fact adapters: feedback, runs, live agent sessions, alerts, notes,
plus a computed fleet pulse (runner state, runs waiting/errored, unread
feedback, pending approvals, today's AI budget) and a buildFleetBrief of
SQL-computed answers the model may only phrase. Six new tools over them.
Budgets follow the vendor: linkPromptBudgetTokens() sizes Groq from its minute
window and large-context vendors by usefulness; the prompt is sized against the
largest usable link and the walker SKIPS links it does not fit (a preflight,
not a refused round-trip). Env-tunable without a deploy. When overhead busts
every budget the loop now throws instead of sending an empty Records block.
Conversation history reaches the primary path, so continuity no longer appears
and disappears depending on which brain served the turn.
Provenance is rendered: model, what was read per source, tools used, elapsed
time, and the grounding verdict. The verdict was always computed and always
returned; the route dropped it on persist and the assistant never read it, so a
flagged answer looked exactly like a clean one — the failure the harness exists
to prevent, reintroduced at the last inch.
THE GATE (this is the third time this class has fired)
Every read tool's data must ALSO be reachable from the seed. Seed =
survivability, tool = depth, one adapter called by both.
scripts/test/loki-retrieval-plan.ts fails the build on a read tool with no seed
source, and on a seed source no question can reach. It caught a real orphan on
its first run: the OrangeCat economy feed, fetchable but unreachable.
Also fixed while here: propose_action reported a failed DB write as a
successfully queued draft; the repair pass accepted a repair that invented a
NEW unsupported claim if it had fewer total; assignee matching used a bare
substring (the dr-UZH-nikov pattern on the write side); pageContext over 2000
chars 400'd the whole request instead of being clamped; the native tool schema
repeated each full description, paying for the same prose twice.
Docs: docs/architecture/loki-answering.md.
Tests: 4 files, 63 checks, all env-independent.
Claude-Session: https://claude.ai/code/session_01CAfKwM1oUSA9tU9fgdhfdf
Co-authored-by: Cato <georgy.butaev@revamp-it.ch>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* docs(cloud-primary): nothing left that describes the old substrate — docs, marketing, comments, focus_tab
The cloud-primary series (#615 routing, #618 OrangeCat auto-kickoff, #624
Fleet Runner 0.8.19, #630 web PTY-only) changed what the product IS. This
sweep makes every surface that describes it say so, so neither an agent
reading the repo nor a person reading the site is told about zellij tabs,
presence-based routing, a cold-start restore, or a handoff that "starts
nothing".
Inventory-driven (≈105 doc lines, ≈30 user-facing strings, ≈22 code
comments, 2 repo-level items), not a grep-and-replace:
User-facing
- /download prerequisites: the "Zellij — bundled" card is gone; copy says
each agent runs in a terminal Fleet Runner owns.
- Quickstart, license page, executor copy (cloud is the default; "This
computer" is a per-project choice under Runs on), marketing pillars,
whitepaper (owned-PTY design, "where a project runs is a decision, not a
guess", ZSH typing-guard section deleted), Control terminal panel strings
(components renamed LiveTerminalPanel / LiveTerminalRows), peek drawer
copy, GitHub release notes for 0.8.19, repo description + topics.
Agent-facing
- README, CLAUDE.md, AGENTS-adjacent SSOTs: cloud-local-workflows.md now
states the stored routing rule; priority plan closes B6; multitenancy plan
routes by builder_pref; HANDOFF.md staleness table + terminals section;
the 2026-09-10 cold-start handoff gets a dated "superseded" section; the
two shipped proposals (fleet-runner-pty-ownership, desktop-app) carry a
status banner; home/README describes the eight modules that exist;
desktop/README describes 0.8.19; roadmap seed marks the migration done;
box-runner unit and log drop FLEETCROWN_RUNNER_PTY; 22 code comments.
Code (one coherent retirement)
- focus_tab is removed from the pending-command contract, the desktop
validator and poller, enqueueTabCommand's type, the validator test and the
failure classifier (START_SESSION | RETRY). The runner had rejected it
since 0.8.19; now it cannot be enqueued at all.
Verified: tsc, eslint, 148/148 unit files, 130/130 home self-tests,
check:desktop (typecheck + build).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WSNERoZZqW2TgqbAGHSQZf
* chore(desktop): 0.8.20 — the focus_tab retirement touches desktop/, so it ships as a release
The release-drift gate is right: a desktop change without a bump goes red on
main once the next tag is minted. 0.8.19's changelog date is corrected to the
release's real publishedAt.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WSNERoZZqW2TgqbAGHSQZf
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Audit wave 1 of 3 (six-agent sweep findings):
- secrets/identity: private-zone PIN literal out of 3 scripts (rotate the
PIN separately — it lives in git history), seed email now env-driven,
GEORGE_USER_ID renamed, real-name comments neutralized, CODEOWNERS off
the old org, /home/g fallback replaced with os.homedir(), phone + path
examples anonymized; DEFAULT_USER_EXTERNAL_ID default now 'self' with
both DBs migrated (UPDATE entities SET external_id='self')
- URL SSOT: every product-code literal of the app domain now flows through
APP_URL (desktop menus, runner banner curl, templates, UA, doctor,
orangecat publish origin); new GITHUB_API_BASE shared by 7 files;
openclaw gateway fallback imports its constant; ORANGECAT_BASE_FALLBACK
+ LOCAL_DEV_URL single-sourced
- design tokens: --scrim/ui-backdrop (4 raw bg-black/NN backdrops),
--toggle-knob, --surface-terminal (cross-linked with terminal-theme.ts),
--text-compact, ui-pin-input + PIN_MAX_DIGITS=12 shared client/server
(fixes the 20-vs-12 maxLength drift), ui-icon-nudge for the 3px cluster
- dead code: HistoryFeed + loki-prompts deleted whole, 13 more dead
symbols removed; all console.log verified intentional and kept
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Cloud inject always queues even when box-runner is connected; distinguish
runnerConnected in Loki footer, Control toasts, and dispatch-status SSOT.
Add prod dogfood script and dispatch-status tests.
Co-authored-by: Cursor <cursoragent@cursor.com>
Browser-first onboarding and executor-copy SSOT; Loki imperatives and move-forward
route to the same builder queue as Control with cloud-first Terminal links; fleet-kick
queues when offline; deploy script syncs box-runner.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add Build/Pause selected on Control, multi-project command fan-out in Loki,
and route scoped screenshots to dispatch with vision preflight instead of chat.
Co-authored-by: Cursor <cursoragent@cursor.com>
Start building now batch-dispatches next_best on eligible idle projects
(capped at three concurrent) and Loki accepts develop-all phrasing; restore
the daily idle nudge for users with autopilot on after the mode collapse.
Co-authored-by: Cursor <cursoragent@cursor.com>
Wire NL fast paths before resolveCommand so Loki can generate living business
plans and queue profile field changes through Today’s action queue instead of
silent chat writes.
Co-authored-by: Cursor <cursoragent@cursor.com>
When a project is selected, named, or resolved for chat, prepend the same
getProjectContext block dispatch uses so Loki answers with mission, stack, and goals.
Co-authored-by: Cursor <cursoragent@cursor.com>
Groq Llama 4 Scout describes pasted/picked images for chat and dispatch.
Add scoped-project pill, quick-action chips, hide model picker on mobile,
and hide the shell FAB on /loki.
Co-authored-by: Cursor <cursoragent@cursor.com>
Route shell FAB and loki:open to /loki with composer prefill; retire the
chat-only modal. Add fleet list/create NL fast paths, project picker chips
for ambiguous dispatches, and a db helper to inspect recent conversations.
Co-authored-by: Cursor <cursoragent@cursor.com>
The doc was still labeled 'design / not built' but Loki is live and in
daily dogfood use: NL composer with project resolution, the 3-pane page,
mic/attach/model-picker, and dispatch parity with Control. Add a verified
'Shipped state' note, resolve open questions 1-2, and mark the phased plan
(1-3 done, 4 partial). Discovered by dogfooding FleetCrown via FleetCrown:
this very doc fix was dispatched through Loki.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Best-practices pass on the Phase 1 composer + standards reflected in docs so they
don't need restating:
- resolve route now derives intent ids from ORCHESTRATION_TASK_INTENT_IDS (SSOT)
instead of a hardcoded local copy; type is OrchestrationTaskIntentId.
- palette status line uses a new neutral `ui-palette-status` class instead of
reusing the negative/error class (design discipline — no stray design).
- CONTRIBUTING "Engineering Standards" now names the full bar (first-principles,
SSOT, DRY, SoC, no god files, no hardcoded values, four-layer design system,
config-driven, validate-at-boundary) and points to the global standards in
CLAUDE.md as the authoritative source.
- loki-command-surface.md references those standards.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Structured design docs for George's 2026-06-18 vision, kept as separate threads:
- docs/loki-command-surface.md — the "Loki" ChatGPT-style page + NL command
composer (auto-routes "code review for kivvi"); a new front-end over the
existing dispatch backend. Design only; open questions need sign-off.
- docs/terminal-parity.md — why the server terminal scrambled input (fixed) and
the plan for true interactive parity on the machine terminal.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>