Skip to content

feat(chronicle): Phase 2 — Research & evidence - #108

Merged
splaice merged 6 commits into
mainfrom
cheap-coder/chronicle-phase-2-app
Jul 14, 2026
Merged

splaice merged 6 commits into
mainfrom
cheap-coder/chronicle-phase-2-app

Conversation

@splaice

@splaice splaice commented Jul 14, 2026 •

Copy link
Copy Markdown
Owner

Objective

Phase 2 of Life Chronicle (epic #105): Research & evidence. Goal mode: review + merge delegated to Claude via /goal. Execution order: 2.1 → 2.3 → 2.4 → 2.2 → 2.5 → 2.6.

Tasks — all complete

  • 2.1 — POST /api/search: hybrid/exact/semantic with explanations, §5.3 parser, no-silent-fallback degradation, facets, ranked-window cursor
  • 2.3 — Research Desk UI: editable origin chips, typed cards, why-matched, grouping, scope inheritance
  • 2.4 — model gateway v1 (injection-tested three-role structure, hash-only audit) + SSE /api/ask + app_answers/app_citations
  • 2.2 — NL interpret: whitelisted model extraction, contacts person resolution, never blocks search
  • 2.5 — files browser: magic-number + containment-guarded sandboxed preview (SVG excluded), duplicate groups with provenance
  • 2.6 — workspaces v1: notebook blocks, optimistic concurrency, audited Markdown/JSON/CSV manifest exports

Phase 2 exit criterion (spec §20.1)

"User can answer a factual question, inspect evidence, and export a source manifest" — met: Ask streams grounded answers with citations resolving only to retrieved sources; every citation opens in the inspector; workspace exports carry fingerprinted manifests.

Gates

Every task commit green on both gates. Final: 188 server + 176 web tests (+1 todo), root 674.

Reviews

6/6 approved in session .cheap-coder/review-NN.md; 0 revision rounds; 0 reviewer code fixes this phase.

Provenance

Implementer: Grok Build CLI, grok-4.5 @ max. Architecture, spec, review: Claude.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XP7M17NHxw6mjpTFtMqwZu

Claude Code Agent and others added 6 commits July 13, 2026 20:08
…er, facets (Phase 2 task 2.1, #105)

POST /api/search over the maildb library: exact (mention_search/find,
date-ordered), semantic (search_all RRF), hybrid (endpoint-level RRF k=60
with exact-match boost), per-result match explanations. §5.3 structured
syntax parsed into scope constraints (total parser, unsupported operators
collected, never errors). Embedding failure: hybrid degrades to exact
with an explicit degraded flag, semantic returns 503 — no silent
fallback. Signed-cursor ranked window (500 ceiling), exact-basis facets.

Implemented via cheap-coder (grok-4.5 @ max).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XP7M17NHxw6mjpTFtMqwZu
…grouping (Phase 2 task 2.3, #105)

/research lens: hybrid/exact/semantic mode selection with distinct
descriptions; parsed-syntax constraints as editable chips (edit/remove
re-runs); message and attachment cards with visible type labels,
why-matched disclosures, React-node snippet emphasis (no innerHTML);
thread/year/mailbox grouping; facet sidebar; degraded-semantic banner;
J/K/Enter keyboard flow; scope inherited across lens changes both ways.

Implemented via cheap-coder (grok-4.5 @ max).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XP7M17NHxw6mjpTFtMqwZu
…contract (Phase 2 task 2.4, #105)

Model gateway v1: Ollama route behind an injectable transport, three-role
prompt structure confining source text to a delimited evidence block
(injection-tested), availability probe, audit rows with IDs and question
hash only. POST /api/ask streams retrieval status, answer tokens, and
citations over SSE; [S#] markers resolve only to retrieved sources
(unmatched surfaced, never fabricated); answers + citations persisted to
app_answers/app_citations with excerpt hashes. Research Desk gains the
Ask mode answer block (streaming, citation chips → inspector, model
route/policy footer, cancel); model-unavailable leaves search fully
functional.

Implemented via cheap-coder (grok-4.5 @ max).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XP7M17NHxw6mjpTFtMqwZu
… chips (Phase 2 task 2.2, #105)

POST /api/query/interpret: deterministic syntax parse always; gateway
extraction from residual text behind a strict JSON whitelist (any parse/
validation failure degrades to model_used=false, never 5xx); person names
resolve through the contacts subsystem or surface as unresolved chips;
syntax wins conflicts. Research Desk interprets NL-like queries first
(3s timeout falls through to search), rendering origin-badged chips.

Implemented via cheap-coder (grok-4.5 @ max).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XP7M17NHxw6mjpTFtMqwZu
… extraction visibility (Phase 2 task 2.5, #105)

/files lens: dense table + gallery over POST /api/attachments/list
(keyset, family filters, sha256 exact-duplicate groups with full
provenance). Preview endpoint enforces declared-type allowlist AND magic-
number match, CSP sandbox + nosniff headers, strict path containment
(resolve + is_relative_to, no path leakage); SVG never previewable;
downloads audited with attachment disposition. Failed extractions stay
discoverable with reasons.

Implemented via cheap-coder (grok-4.5 @ max).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XP7M17NHxw6mjpTFtMqwZu
…ports (Phase 2 task 2.6, #105)

app_workspaces/app_workspace_blocks with optimistic concurrency (409 on
version mismatch); heading/note/pin/answer blocks (notes plain-text only);
pin affordances in the inspector and answer block; workspace scope opens
in Chronicle as the live working set; Markdown/JSON/CSV exports share a
deduplicated source manifest (pins + answer citations) with a stable
fingerprint and export audit. Completes Phase 2.

Implemented via cheap-coder (grok-4.5 @ max).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XP7M17NHxw6mjpTFtMqwZu
@splaice
splaice merged commit 15d19e3 into main Jul 14, 2026
1 check passed
@splaice
splaice deleted the cheap-coder/chronicle-phase-2-app branch July 14, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant