feat(router): project-registerable component nouns (issue #10 dir #3) - #17
feat(router): project-registerable component nouns (issue #10 dir #3)#17Munawarx wants to merge 1 commit into
Conversation
…dir Nazim22#3) Adds an optional policy/component-nouns.yaml listing domain nouns that behave like the built-in 'API' noun: a noun + live/recorded-state qualifier (alive/up/responding/still/today/...) routes to runtime; the noun alone never routes (precision > recall). Matcher loads the glossary via loadPolicy and appends a runtime-component-noun tell. Per-project: drop a copy next to tells.yaml to register your own nouns. Design posted first as issue Nazim22#16 (core-surface change per CONTRIBUTING). RED test added; 36/36 router + component-noun tests green. Precision verified: 'what did we decide about the store?' still routes historical, no false runtime. Co-Authored-By: Hermes Agent <noreply@hermes.ai>
|
Tracking our current contribution set for Leadline (Munawarx). All are independent, each on its own branch:
Each PR is self-contained and ready to review independently. Happy to split, adjust, or rebase any of them. Co-Authored-By: Hermes Agent noreply@hermes.ai |
Nazim22
left a comment
There was a problem hiding this comment.
Thanks for this — the direction is right (issue #10 dir #3) and worth pursuing, but three blockers before it can land: (1) matching is boundary-less substring (src/matcher.js indexOf) — "storefront"/"restore" match the noun "store"; needs token boundaries. (2) generated matches lack _order, and the shared sorter dereferences it — same-span matches crash the hook. (3) issue #10's intended rule is a qualifier co-occurring with a project-owned component noun (loaded glossary), not a hardcoded list. Happy to re-review a revision.
Summary
Implements issue #10 direction #3 — project-registerable component nouns. Adds an optional
policy/component-nouns.yaml; each listed noun behaves like the built-inAPInoun: when it co-occurs with a live/recorded-state qualifier (alive,up,responding,still,today,right now, …) the prompt routes to runtime, but the noun alone never routes (precision > recall).Why
Issue #10 showed custom component nouns are invisible to the runtime family (
fleet-hub alive right now?got no contract whileAPI responding right now?routed). This lets each project register its own nouns without hard-coding them intotells.yaml.Design (posted first as issue #16, per CONTRIBUTING core-surface rule)
policy/component-nouns.yamlwith anouns:list.matcher.loadPolicymerges it into the policy;matchPromptappends aruntime-component-nountell when a registered noun + state qualifier is present.tells.yamlto register domain nouns.Measurement (issue #10 ground rules)
test/component-nouns.test.js(4 cases) — all green.what did we decide about the store?still routes historical (no false runtime); onlystore + still/readroutes runtime.Changes
src/matcher.js— glossary load +matchComponentNoun+ wiring intomatchPrompt.policy/component-nouns.yaml— example nouns (fleet-hub,connector,ingest,vendor-archive,store).test/component-nouns.test.js— RED + precision + backward-compat tests.Trade-offs / risks
Files
src/matcher.jspolicy/component-nouns.yamltest/component-nouns.test.jsCo-Authored-By: Hermes Agent noreply@hermes.ai