Feature plan: Step 1 · Step 2 · Step 3 · Step 4

Debug mode: enabled

Effort study: railspike-effort / v3/operator_cockpit; host ledger operator_cockpit.md. Standing P2 enrollment.

Extended estimates: enabled.

Cycle estimate: 0.80

Approved Step 1 commit: a159b346 (Option B, first slice, with the maintainer's answers).

Problem

The operator learns the site's state only by opening System status, Deploy, User Access and other tools one by one. Problems surface late or by accident.

User stories

  • As the operator, I want one row of modules on Tools that lights up only when something needs me, so that one glance tells me whether to act.

  • As the operator, I want every value to show the command or query behind it, so that I can check it over SSH or in the SQLite Viewer.

  • As the operator, I want the most serious level in the header of every page, so that I notice a warning without opening Tools.

  • As the operator, I want to mark a level as seen and still find out later why it was lit.

  • As a visitor or an agent, I want the same status in plain text, so that I can read it without a browser.

  • As the operator, I want each level change kept in a file, so that a later cycle can replay the past.

Core requirements

  • /tools/ shows the annunciator above the existing launcher, for everyone. Two fixed rows: Site (Deploy, Rebuild, Tests, Worker, Backup) and Community (Keys, Reports, Staged, Fastmod, Traffic). Modules never change position.

  • Each module shows an icon, a one-line description, a value, a level and its source command. Levels are warning (failing), caution (degrading) and to do (waiting for the operator), each a small tinted pill with its word. A module with no confirmed source stays unlit and reads "no source yet".

  • The annunciator renders on the server and works without JavaScript. No check may wait on the network: Deploy uses the last stored update check, never a new git fetch.

  • The header shows the most serious level on every page, loaded by script from a small text address, so cached and published pages stay correct. "Seen" is kept per browser and leaves a small dot that opens into the reason.

  • Each level change appends one Key: value block to state/logs/status_history.txt. The file stays out of every export.

Module sources

ModuleSourceFirst-version rule
DeployAppUpdate::check() with a maximum age, as the header prompt usesto do when behind origin/main
RebuildOperatorStatusCollector read-model status and stale markercaution when not ready; warning when the rebuild task failed
Testsstate/test_run_history.sqlite from tests/run.phpwarning when the latest run failed; "no source yet" where no history exists, as on prod
WorkerOperatorStatusCollector task queuewarning when tasks wait and the executor is not seen; caution when tasks failed
Backupnone: archives are built on download, and nothing records a backup"no source yet"
Keyspending keys, as users_pending.php lists themto do when one or more wait
ReportsUsageReportStoreto do when reports arrived in the last day
StagedStagedSubmissionStoreto do when any post is staged
FastmodSqliteFastScoreStore work queuecaution above a backlog limit set in Step 3
Trafficvisitor_statistics_hourly and the high-traffic flagvalue only; never lit in this cycle

Concepts touched: tools launcher (changed: the annunciator sits above it); application update, read-model rebuild, internal task queue, staged submission, usage reports, fastmod scoring, visitor statistics, high-traffic mode (read, unchanged). Proposed new entries: status check and status history.

Delivery scope

  • Work type: application change, behind a new flag FORUM_OPERATOR_COCKPIT_ENABLED, off by default.

  • Out of scope: telemetry charts, System facts, flight log, command palette, guarded switches, the replay scrubber, runbook checklists and the copilot. Each becomes its own epic cycle.

Completion boundary

  • Normal entry: Tools in the main navigation, on a desktop browser.

  • End-to-end outcome: on zenmemes.com the annunciator shows real values, the header shows the top level on Board and Recent, and a level change adds a block to the history file.

  • Recovery: a check that throws or times out shows unlit with "check failed" and expandable details, per the error-details guideline. The rest of the page still renders.

  • Release condition: flag on in prod after a deploy, with the iPhone header still working.

Known user or environment

The operator deploys from an iPhone SE in Safari. The header status must show there, and the Tools page must stay usable there even though its layout is desktop-first. The operator verifies on the phone by loading Board after a level change. If the header shows nothing, the operator opens /tools/status.txt to see the same status as text.

Risks

  • Slow Tools page. Ten checks run per view. Validate early by timing each check on prod data. Mitigation: one time limit per check; a slow check reads "check failed".

  • Stale header in cached pages. High-traffic mode serves stored HTML. Validate by loading Board with the mode on. Mitigation: the header reads status by script, never from the page HTML.

  • History noise. Two views at once can append the same change twice. Validate with two parallel requests. Mitigation: append under a file lock and compare with the last block.

  • Public sources. Everyone sees commands and counts. Validate that no command shows an absolute server path or a key. Mitigation: show repository-relative paths only.

Shared component inventory

  • Launcher and registry: reuse ToolsPageSupport.php and templates/pages/tools.php; the annunciator is a new partial above the launcher.

  • Status data: reuse OperatorStatusCollector.php, which System status already uses; no second reader of the read model or task queue.

  • Header: extend templates/partials/app_header.php beside the deploy prompt, following the reveal-by-script pattern of deploy_prompt.js.

  • History format: reuse the Key: value block format of deploy_history.txt in AppUpdate.php.

  • Text form: follow /api/status's key=value style in CodebaseStateController.php.

User flow

  1. The operator opens any page. The header shows "1 WARNING" with a red pill.

  2. They click it and land on Tools. Tests in the Site row is lit, with its failing count and its command.

  3. They fix the problem. On the next view, Tests is unlit and the history file gains a block.

  4. Later, a to do appears for Keys. They mark it seen. A dot remains, and opening it reads "2 keys waiting since 14:10".

Success criteria

  • On prod, all ten modules render, and at least seven have a real source.

  • /tools/ renders with every check in under 300 ms on prod.

  • Header status matches /tools/status.txt on Board, Recent and a cached thread page, on desktop and iPhone.

  • A forced level change writes exactly one history block.

— Claude · 2026-11-30 UTC · Model: Claude Opus 5.5

Study snapshot

FieldValue
CheckpointStep 2 handoff
Projected total0.80 (was 0.75)
Reason for changeNew understanding: the header needs a text address and a script, because cached pages can't carry live status; and the per-check time limit adds work
Reference / protocolR1 / P2
RaterClaude, single exposed rater
Baselinea159b346
ApprovalApproved Step 2 by the maintainer, 2026-11-30