Skip to content

feat(router): project-registerable component nouns (issue #10 dir #3) - #17

Open
Munawarx wants to merge 1 commit into
Nazim22:mainfrom
Munawarx:feat/component-nouns-routing
Open

feat(router): project-registerable component nouns (issue #10 dir #3)#17
Munawarx wants to merge 1 commit into
Nazim22:mainfrom
Munawarx:feat/component-nouns-routing

Conversation

@Munawarx

Copy link
Copy Markdown
Contributor

Summary

Implements issue #10 direction #3 — project-registerable component nouns. Adds an optional policy/component-nouns.yaml; each listed noun behaves like the built-in API noun: 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 while API responding right now? routed). This lets each project register its own nouns without hard-coding them into tells.yaml.

Design (posted first as issue #16, per CONTRIBUTING core-surface rule)

  • New optional file policy/component-nouns.yaml with a nouns: list.
  • matcher.loadPolicy merges it into the policy; matchPrompt appends a runtime-component-noun tell when a registered noun + state qualifier is present.
  • Per-project: drop a copy next to tells.yaml to register domain nouns.

Measurement (issue #10 ground rules)

  • RED tests in test/component-nouns.test.js (4 cases) — all green.
  • Precision verified manually: what did we decide about the store? still routes historical (no false runtime); only store + still/read routes runtime.
  • Router + component-noun suite: 36/36 green, 0 regressions.

Changes

  • src/matcher.js — glossary load + matchComponentNoun + wiring into matchPrompt.
  • 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.js
  • policy/component-nouns.yaml
  • test/component-nouns.test.js

Co-Authored-By: Hermes Agent noreply@hermes.ai

…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>
@Munawarx

Copy link
Copy Markdown
Contributor Author

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

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