Skip to content

feat(briefing): one command that explains the chart — the window as a markdown briefing - #92

Merged
benyblack merged 2 commits into
mainfrom
feat/briefing-mode
Oct 7, 2026
Merged

benyblack merged 2 commits into
mainfrom
feat/briefing-mode

Conversation

@benyblack

Copy link
Copy Markdown
Owner

What

Recommended PR #4 of the first five (ROADMAP v3, Track 1): wickchart-briefing synthesizes the visible window into a structured markdown briefing — tape summary, candlestick signal census, smart annotations and the narrate timeline — "explain this chart" as a first-class artifact. S–M effort, pure composition.

Design

  • Composition, not re-derivation: the Tape section is windowSummary (wickchart/core), the census is detectSignals (wickchart-signals), the annotations and timeline are detectAnnotations + narrateWindow (wickchart-narrator). The briefing can never disagree with the chart it describes.
  • API: attachBriefing(chart) installs chart.briefing() (the model: { title, generatedAt, window, summary, signals, annotations, timeline, markdown }, null before data) and chart.copyBriefing() (clipboard). Visible-range scoped, full-dataset fallback, detach() restores the instance.
  • Deterministic output: UTC-stable YYYY-MM-DD HH:MM stamps and an injectable now — the same window briefs byte-identically (pinned by tests).
  • wickchart-briefing/core is the pure half — no chart, no DOM.
  • Dependencies: wickchart-signals + wickchart-narrator (declared; the first plugin to compose siblings — the hub's zero-dependency claim is updated honestly). Root devDependencies gain file: links so the bare specifiers resolve in Node tests.

Gates

  • 3.4 KB gz under its own 5 KB CI budget line; main entry untouched.
  • 6 unit tests (plugins/briefing/tests/briefing.test.mjs): composition identity, markdown shape, determinism, degenerate windows, census grouping, attach/detach contract.
  • Docs: hub section + live playground (17th package), demo Explain panel gains an AI-summary/Briefing tab, README plugin section, roadmap row struck.
  • Verified locally: 726 unit tests, CI script, phone layout, hub + demo browser-checked.

… markdown briefing

wickchart-briefing composes the visible range into a structured markdown
document: tape summary (windowSummary), candlestick signal census
(detectSignals from wickchart-signals), smart annotations and the narrate
timeline with legs (narrateWindow from wickchart-narrator). Pure
composition, no re-derivation — the briefing can never disagree with the
chart. attachBriefing installs chart.briefing()/copyBriefing() over the
visible range; briefingModel() is the pure half (no chart, no DOM).
Deterministic output: UTC-stable stamps, injectable clock.
…ion; roadmap strikes the row

The hub's 17th package (import map extended for the sibling-plugin
specifiers); the demo's Explain panel gains an AI-summary/Briefing tab.
@benyblack
benyblack merged commit e39bb86 into main Oct 7, 2026
2 checks passed
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