Commit graph

25 commits

Author SHA1 Message Date
Shay
175e9d4d10 docs(workbench): strengthen B3.5 D2 to runner-reproducibility; record C1-a persistence-first constraint
Two corrections from this session's source verification:

- B3.5 D2 (calibration artifact): coherence between report.json and
  ratification_queue.json is necessary but NOT sufficient. The 95/50/5 earned
  state is a fossil from the disabled resolve_pooled scorer (queue committed in
  b82897a0); no current runner reproduces it (main()=6/44/0, candidate-graph
  practice=0/1/149). Acceptance now requires report.json be byte-reproducible
  by a documented deterministic runner pass; copying numbers between artifacts
  is inadmissible. Three routes named (honest-floor now, earn-it-for-real
  follow-up, defer).

- C1 (cognitive pipeline visualizer): corrected the false "reader-first over
  existing telemetry" framing. Verified the journal persists only ~12 surface
  fields of CognitiveTurnResult's ~25; no /trace/{id}/pipeline endpoint. C1-a's
  real first deliverable is a persistence change: a curated
  CognitivePipelineRecord (never the raw field_state multivectors — O(n^2)
  cost), a runtime-contract update, and a non-vacuous fail-closed test.
2026-06-13 07:20:23 -07:00
Shay
7adae77de8 docs(workbench): reconcile Wave M plans into b3.5; scrap duplicate Phase A docs
The docs/proposal-artifact-substrate-v1 work (#727) — wave-m-consolidation-b3.5,
core-logos-studio-plan, proposal-artifact-substrate-v1 — is the authoritative
consolidation and supersedes the parallel 'Phase A' I'd just drafted. Reconciling
to one source of truth:

- FOLD IN the one genuine gap b3.5 missed (a design review caught it): the
  Calibration centerpiece undersells — the reader reads the sub-N_MIN committed
  practice report.json, so on live data no class shows licensed, while the
  earned state (additive 95/5/100, PROPOSE-licensed) sits in the disagreeing
  ratification_queue.json. Added as a diagnosis addendum + a Deliverable-2
  acceptance criterion (make the committed practice artifacts coherent; show
  ≥1 earned class). Data-side fix, not a re-derivation.
- FOLD IN the grouped-navigation idea: a  field on the route registry
  (Deliverable 1) + the organism's-loop grouping (Converse/Cognition/Evidence/
  Determinism/Discipline/Substrate/Settings), with the correction that
  'core-logos' is the language/manifold Studio surface, not the cognition cluster.
- REDIRECT wave-M-worthiness.md's consolidation section to point at b3.5 instead
  of defining a parallel Phase A.
- SCRAP duplicates: wave-M-phaseA-briefs (duplicated b3.5) and
  workbench-ui-ux-guide-brief (superseded by b3.5 Deliverable 4).
2026-06-13 04:18:44 -07:00
Shay
2bc1274dec docs(workbench): consolidate review + IA reorg into Wave M Phase A (re-sequenced before C)
Boils the design review and the information-architecture decision into one
integration. Phase B's heart (calibration/serving discipline) is done;
Phase A (Structure & Polish) now runs BEFORE resuming Phase C because two of
its items are structural prerequisites the Cognition cluster lands into.

Key synthesis: the command-palette drift bug and the grouped-nav idea are
the SAME fix — navigation derives from one registry that also encodes
structure. Standing IA constraint: one workbench, one address space, one
Chain Rail; grouping is a wayfinding skin, never an architectural fork; no
separate workbenches (the single evidence model is the thesis); 'levels' are
depth-within-a-surface, not top-level categories.

Phase A brief pack (wave-M-phaseA-briefs):
- A1: navigation registry (one source of truth) + grouped nav by the
  organism's loop (Converse/Cognition=core-logos/Evidence/Determinism/
  Discipline/Substrate/Settings) + palette fix (Demos+Calibration are
  currently unreachable via ⌘K; the ⌘1-0 map is stale)
- A2: Calibration earned-state — the centerpiece undersells (reads the
  sub-N_MIN report.json; the earned license lives in the disagreeing
  ratification_queue). Primary fix: regenerate coherent practice artifacts;
  fallback: reader surfaces both with provenance
- A3: Doctrine station ('how this UI can't lie') — elevate contracts/checks
  into a first-class surface; trails, larger

Parked: B4 (needs engine-side license stamping; no re-derivation),
Calibration EvidenceSubject kind.
2026-06-13 04:10:14 -07:00
Shay
658499dbde docs(workbench): index consolidation and CORE-Logos plans 2026-06-13 03:41:30 -07:00
Shay
c9c1b92d89 docs(workbench): capture CORE-Logos Studio plan 2026-06-13 03:41:10 -07:00
Shay
85b3b3e560 docs(workbench): capture Wave M consolidation plan 2026-06-13 03:40:27 -07:00
Shay
072ee80b8e docs(workbench): index proposal artifact substrate 2026-06-13 03:38:26 -07:00
Shay
23dbff8743 docs(workbench): define proposal artifact substrate v1 2026-06-13 03:38:06 -07:00
Shay
02f02c804a docs(workbench): Wave M plan (mastery & worthiness) + Phase B calibration brief pack
Wave M takes the workbench to mastery and closes its biggest design gap:
it surfaces the teaching/ratification loop but is blind to the
calibrated-learning / serving-discipline loop (gold-tether arena, reliability
gate, Wilson floor vs θ ceiling, 'the engine earns the right to guess') and
to cognition itself (pipeline stages, field substrate, identity continuity).
Lens: Anthropic + xAI as target users who'd WANT to use it.

- wave-M-worthiness.md: full plan, Phases A–E, the missing-surfaces table,
  the backend-reader-first / never-re-implement-engine-math disciplines,
  execution order (B→C→D, A parallel).
- wave-M-phaseB-calibration-briefs: executable Phase B pack grounded in the
  real core/reliability_gate shapes (ClassTally / conservative_floor /
  license_for / Action θ) and the committed report.json evidence — B1
  readers (GATING, Python), B2 Calibration route, B3 wrong=0 global frame,
  B4 leeway wiring. Dependency DAG + STOP gates + no-theater rules.
2026-06-12 23:51:57 -07:00
Shay
80e02ce7de feat(workbench): sealed single-turn replay backend — GET /replay/{turn_id} (Wave R3)
Replaces the W-026 501 stub. Re-executes a journaled prompt in a sealed
fresh runtime (ChatRuntime(no_load_state=True): no checkpoint load, no
checkpoint write, no proposal lineage) and compares the envelope
leaf-by-leaf against the recorded TurnJournalEntry.

Design correction vs the scoping doc (amended in-doc): journaled turns
each ran in a fresh ChatRuntime(), never one continuous session, so
genesis-PREFIX replay would manufacture spurious divergence; shipped
basis is sealed_fresh_runtime_single_turn (O(1)). origin_state:
"unrecorded" — the journal does not record whether the original turn's
runtime loaded a checkpoint, so divergence is reported as nondeterminism
OR origin-state influence, never disambiguated.

- workbench/replay.py: pure comparison + injected executor; every
  TurnJournalEntry field classified critical/informational exactly once
  (exhaustiveness enforced by test)
- api.py: route wiring under _CHAT_TURN_LOCK; runtime failure -> 500
  runtime_unavailable, no comparison may be fabricated
- schemas: additive TurnReplayComparison/TurnReplayDivergence (W-026
  artifact-keyed pair retires with the frontend Replay Moment PR)
- tests: 10 obligations incl. tamper-prompt, tamper-leaf precision,
  no-execution-no-comparison, no-trace (journal + engine_state bytes),
  wall-clock tolerance, sealed-construction proof
- snapshot regenerated; NOT_YET_MIRRORED debt entries for the two new
  classes (mirrors land with the frontend PR)
- api-contract-v1.md § Replay rewritten for the turn-keyed shape
2026-06-12 17:15:39 -07:00
Shay
f177efc837 feat(workbench): add R2 backend read substrate 2026-06-12 12:49:41 -07:00
Shay
e77403f773 docs(workbench): R0a CI path filter includes the workflow file itself 2026-06-12 10:29:29 -07:00
Shay
4d70841386 docs(workbench): fold execution-shape review into Wave R plan + briefs
- R0a honesty fix unconditional (j/k, /, Enter rows out; R0d restores)
- minimal route conformance test front-loaded R1 -> R0a
- Kbd front-loaded R1 -> R0d; KeyboardHelp becomes registry-driven
  (structurally impossible to advertise unimplemented shortcuts)
- merge order pinned: strict train, R0a first; parallel dispatch retained
- declined with reasons recorded: full echelon-1 serialization, folding
  Playwright into R0a
2026-06-12 10:22:28 -07:00
Shay
8e3995ff10 docs(workbench): Wave R mastery revamp plan + R0/R1 dispatch brief pack
Re-audit of the shipped Wave 1 evidence spine found six compounding gaps
(advertised-but-unimplemented shortcuts, no evidence addresses, doctrine
without tests, deferred substrate, CRUD-shaped Wave 2, no frontend CI lane).
Wave R fixes the substrate before Wave 2 routes are built on it:

- R0a test-runner hardening + first frontend CI lane
- R0b Playwright smoke lane (ADR-0162 acceptance 5-7 debt)
- R0c evidence addresses (URL = subject, Cmd+Shift+C copy link)
- R0d interaction substrate (list nav, virtualization, panel, resize, verbs)
- R1 design mastery pass (chain rail, typography, doctrine-as-tests)
- R2/R3 upgraded specs (deterministic DAG viewer, Replay Moment,
  wrong=0 ledger, Demo Theater)

Brief 5 (Trace) dispatch holds until R0 lands; re-issued upgraded as first
R2 brief. Wave 1 doc gains a supersession pointer.
2026-06-12 10:02:46 -07:00
Shay
2746655bb4 feat(workbench): evidence context, inspector drawer & command registry (Wave 1A/1B)
Brief 4 of the Wave 1 evidence spine — wire the evidence-context architecture
so every route can project into one shared evidence manifold.

Command registry (1A):
- commandRegistry.ts: useSyncExternalStore-backed command store with a cached
  snapshot (referentially stable to avoid render loops); useCommands /
  useCommandRegistry; recent-items in localStorage (last 10).
- CommandPalette.tsx: reads from the registry; all ten routes are navigation
  commands (was Chat/Proposals/Evals hardcoded); fuzzy filter, recent section,
  shortcut badges; Router/Fallback split preserved.
- useGlobalKeyboard.ts: Cmd+K palette, Cmd+I inspector, Cmd+1-0 routes, ? help.

Evidence drawer (1B):
- evidenceContext.tsx: EvidenceSubject union (turn|proposal|artifact|
  eval_result|none) + useEvidenceSubject hook + EvidenceProvider above the
  router Outlet so inspector state persists across route transitions.
- RightInspector.tsx: five evidence projections (was a null stub); reuses the
  Brief 2 primitives (MetadataTable, DigestBadge, Timestamp, badges).
- Shell.tsx: visibility driven by inspectorOpen (collapsed by default); no more
  hardcoded collapsed=true.
- KeyboardHelp.tsx: shortcut reference dialog.
- TopBar.tsx: palette open state lifted to Shell via props.

Tests: evidenceContext + RightInspector specs added; CommandPalette keyboard
contract updated for the ten-command navigation set (clamp at both ends).

Deferred (noted in spine doc): per-route register()/setSubject call sites,
action-commands (run eval / copy hash), resizable inspector width.

Verified: tsc -b + vite build green; affected specs pass per-file.
2026-06-12 07:44:19 -07:00
Shay
f4cb7a6b12 Merge pull request #704 from AssetOverflow/feat/wb-mutation-docs
docs(workbench): reconcile mutation doctrine
2026-06-12 07:05:01 -07:00
Shay
1630de6047 Merge pull request #703 from AssetOverflow/feat/wb-primitives
feat(workbench): six evidence primitives
2026-06-12 07:04:29 -07:00
Shay
ac9004783a docs(workbench): reconcile mutation doctrine with admitted corridors
Replace blanket no-mutation language with the admitted-corridor rule: ADR-governed path, visible preconditions, auditable telemetry, and replay evidence before action.

Math ratification is documented as the first admitted proposal corridor. Corpus, pack, workflow, arbitrary file, and unadmitted proposal mutation remain forbidden.
2026-06-12 06:50:26 -07:00
Shay
5b68e78ed2 feat(workbench): six evidence primitives (Wave 1C)
SplitPane, TabBar, MetadataTable, DigestBadge, Timestamp, SearchInput.
All token-driven, keyboard-navigable, ARIA-accessible, dark theme,
motion-respectful. No new dependencies — TabBar uses native ARIA
semantics instead of @radix-ui/react-tabs.

PreviewPage updated with all six components in representative states.
Section 1C checked off in wave-1-evidence-spine.md.
2026-06-12 06:45:20 -07:00
Shay
0d203d5b55 feat(workbench): turn evidence journal + trace API
Append-only JSONL journal records the exact ChatTurnResult envelope returned by /chat/turn with stable turn_id, trace_hash, all three surfaces, verdicts, and deterministic journal_digest.

GET /trace/turns and GET /trace/{turn_id} serve journal evidence for the Trace route frontend. Read model only; no teaching, pack, or journal-owned engine_state mutation.
2026-06-12 06:44:25 -07:00
Shay
a612038d41
feat(W-028): chat surface + trace drawer (#303) 2026-05-26 13:22:11 -07:00
Shay
cdead696ed
feat(W-027): Workbench frontend shell — five-region grid + ten empty routes + live StatusFooter (ADR-0160 / ADR-0162) (#299)
- Five-region CSS grid shell (TopBar, LeftNav, Main, StatusFooter; Inspector collapsed)
- Ten placeholder routes with EmptyState cli/string variants and ApiErrorBoundary
- Extended EmptyState API: nextAction accepts string (button) | { kind: "cli", command }
- Updated CommandPalette: real fuzzy search over three commands (Chat, Proposals, Evals)
  with ↑/↓/Enter keyboard nav and useInRouterContext degradation for Branch 1 preview
- TanStack Query hooks for all W-026 endpoints; 30s polling on runtime/status
- TypeScript mirror of workbench/schemas.py at src/types/api.ts
- StatusFooter: mutation_mode badge, git_revision (copy on click), checkpoint_revision
  with amber warning + ADR-0157/ADR-0158 expansion note
- TopBar: CORE Workbench wordmark, ⌘K palette trigger, connection pill
- ApiErrorBoundary (class component) catches WorkbenchApiError → ErrorState
- scripts/dump-api-schemas.py: AST-based Python dataclass field extractor
- workbench-ui/api-schema-snapshot.json: checked-in drift sentinel
- 51 tests across 10 files (0 failures); enum-coverage 4/4; clean vite build
2026-05-26 12:09:12 -07:00
Shay
e89463a975
feat(workbench-ui): design system v1 scaffold (ADR-0162 Branch 1) (#295)
* feat(workbench-ui): design system v1 scaffold

* fix(workbench): close R1 (GroundingSource enum coverage) + R4 (digest test)

R1 — Promote GroundingSource to a typed Literal in core/epistemic_state.py
so it has the same single-source-of-truth shape as ReviewState.  The
existing epistemic_state_for_grounding_source() function already
enumerates the six labels (pack, teaching, vault, partial, oov, none);
this codifies them.

scripts/dump-enums.py now snapshots GroundingSource via the existing
literal_values helper.  workbench-ui's enumCoverage.test.ts gains a
fourth assertion that the badge mapping matches the Python source
1:1.  Adding a grounding-source value on the Python side without
updating the badge fails the build-time test loud — same discipline
as the other three enums.

R4 — Add an explicit DigestBadge test to StableJsonViewer.test.tsx:
asserts the badge text matches the SHA-256 prefix of the source bytes,
and clicking the badge copies the FULL digest (not the truncated
prefix).  Recomputes the expected digest via crypto.subtle to avoid
hard-coding a hex string that could drift.

R2 (component-level reduced-motion enforcement), R3 (EmptyState
copy-CLI affordance), and R5 (`uv run core` packaging paper cut) are
deferred — R2/R3 become meaningful with W-027/W-029, R5 is a
packaging-layer concern outside this PR's scope.

Validation:
- pnpm test: 19 passed (was 17, +1 enum coverage, +1 digest test)
- pnpm build: clean
- pnpm test:enum-coverage: 4 passed
- core test --suite smoke -q: 67 passed
2026-05-26 11:33:27 -07:00
Shay
8a24ebe726
feat(W-026): read-only workbench API (ADR-0160 Phase 1) (#292)
* feat(W-026): add read-only workbench API

* fix(workbench): harden read-only API review gaps
2026-05-26 10:16:35 -07:00
Shay
404e694824
docs(workbench): CORE Workbench v1 planning architecture (ADR-0160)
Docs-only planning branch. Smoke + verify pinned lane SHAs CI checks pass.
2026-05-26 08:22:38 -07:00