Skip to content

Implement spec 043: mur find + sample catalogue#451

Open
sundaramramaswamy wants to merge 21 commits into
mainfrom
feature/mur-find
Open

Implement spec 043: mur find + sample catalogue#451
sundaramramaswamy wants to merge 21 commits into
mainfrom
feature/mur-find

Conversation

@sundaramramaswamy
Copy link
Copy Markdown
Collaborator

Summary

Implements spec 043 (mur find / sample catalogue) in two phases:

Phase 1 — Tool skeleton

  • CLI dispatch for \mur find, \mur get, \mur list\ commands
  • BM25 search engine with factory grouping and field weighting
  • Synonym expansion (phrase collapse → tokenize → expand)
  • Notes (pitfall guidance per factory anchor)
  • Embedded resource pipeline (\scenarios.json\ via build-time extractor)
  • AOT-compatible JSON via \System.Text.Json\ source generation

Phase 2 — P0 catalogue (~64 scenarios)

  • Hooks (16): useState, useReducer, useEffect, useRef, useMemo, useCallback, useContext, custom hooks
  • Layout (11): VStack, HStack, FlexRow, FlexColumn, Grid, Border, Card, ScrollView, Canvas, named styles
  • Text (6): TextBlock, type ramp, RichTextBlock, wrapping/truncation, localization
  • Buttons (6): Button, icon, command, hyperlink, toggle, CommandBar
  • Inputs (11): TextField, NumberBox, CheckBox, ToggleSwitch, RadioButtons, ComboBox, AutoSuggestBox, CalendarDatePicker, Slider, calendar-multiselect
  • Lists (6): ForEach, add/delete/toggle, empty state, loading, master-detail, virtualized
  • Forms (6): text fields, validation context, FormField wrapper, submit gating, async submit, server errors
  • Navigation (1): sidebar-nav with typed routing
  • Expanded synonym maps (~90 phrases, ~90 synonyms)
  • Expanded pitfall notes (28 entries)
  • Ported 9 legacy reactor-recipes → scenarios, deleted old files
  • Updated skill file references

Validation

  • 8321 unit tests pass, 0 failures
  • 64 scenarios extracted by catalogue tool
  • All scenario files follow the authoring contract (Scenario.cs + scenario.json)

Closes #355

sundaramramaswamy and others added 21 commits May 20, 2026 22:53
Scenario, ScenarioCatalogue, SearchResult records
with System.Text.Json source-gen for AOT compat.

Spec 043 Phase 1, work item 1.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
One scenario (use-state-basic) + README with
authoring contract. Spec 043 Phase 1, item 5.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
DataLoader reads embedded scenarios.json via
manifest resource. Notes seeds 5 pitfall entries.

Spec 043 Phase 1, work item 3.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Walks samples/scenarios/, validates JSON+CS,
strips metadata headers, emits scenarios.json.

Spec 043 Phase 1, work item 6.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Two-layer BM25 scorer, stop words, synonym/phrase
maps, SearchEngine with factory grouping.

Spec 043 Phase 1, work item 2.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
FindCommand uses SearchEngine for BM25 ranking.
GetCommand shows scenario + notes + related.
ListCommand groups by category. Program.cs dispatch.

Spec 043 Phase 1, work item 4.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
BM25, SearchEngine, Synonyms, Notes tests.
Spec 043 Phase 1, work item 7.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Generate via SampleCatalogue extractor, embed in
Reactor.Cli.csproj. Remove unnecessary PackageRef
from extractor.

Spec 043 Phase 1, wiring.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add ~90 phrase collapses and ~90 synonym entries
covering all P0 factories, cross-framework terms,
and abbreviations per spec 043 §4.7.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Cover all P0 factory anchors with 2-3 practical
notes each per spec 043 §4.8.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
textblock-basic, heading-subhead-caption,
body-bodystrong, rich-text-inlines,
text-wrap-truncate, localized-text.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
vstack-basic, hstack-basic, flexrow-with-grow,
flexcolumn-with-justify, grid-basic, grid-spans,
border-with-corner, card-surface,
scrollviewer-vertical, canvas-positioning.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
button-label-onclick, button-with-icon,
button-with-command, hyperlink-button,
togglebutton-basic, appbarbutton-in-commandbar.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
form-text-fields, form-validation-context,
form-field-wrapper, form-submit-gating,
form-async-submit, form-with-server-errors.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
list-basic-foreach, list-add-delete-toggle,
list-with-empty-state, list-with-loading,
master-detail, virtualized-large-list.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
textfield-twoway, numberbox-validated,
checkbox-bool, toggleswitch, radiobuttons-group,
combobox-from-list, combobox-of-elements,
autosuggestbox-typeahead, calendardatepicker,
slider-range.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
use-state-record, use-state-list-pitfall,
use-reducer-list, use-reducer-typed,
use-effect-mount, use-effect-deps,
use-effect-cleanup, use-ref-dom, use-ref-mutable,
use-memo, use-callback, use-context-basic,
use-context-multi, use-reducer-with-context,
custom-hook-pattern.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
calendar-multiselect, sidebar-nav,
async-fetch-list, named-styles.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
All 9 recipes ported to samples/scenarios/.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Point reactor-recipes skill at samples/scenarios/
instead of deleted references/*.cs files.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Collaborator

@codemonkeychris codemonkeychris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you run this with the eval framework to see if this actually helps the results? part of this specific one is to iterate on the evals to see it improve. if you need help getting the evals going, I can point you at the repo (this is Nikola's benchmark)

Console.WriteLine("```");

var notes = Notes.GetNotes(scenario.NotesKey);
if (notes is { Length: > 0 } && scenario.NotesKey is not null)
var (debounced, setDebounced) = ctx.UseState(value);
ctx.UseEffect(() =>
{
var cts = new CancellationTokenSource();
Comment on lines +240 to +246
foreach (Match match in TokenRegex().Matches(text.ToLowerInvariant()))
{
if (match.Value.Length > 0)
{
yield return match.Value;
}
}
Comment on lines +47 to +49
catch (TaskCanceledException)
{
}
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.

Implement spec 043: mur find / sample catalogue (Phase 1)

2 participants