AUD-117: derive person from the question via project people list

Decode the people list from each project's /capabilities and set the /ask
person field from a whole-word, case-insensitive name in the question when
the caller did not name a person. Match only the routed project's people,
so a name from another project does not leak across. Fall back to asker
when no name matches.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2026-10-15 19:54:26 +11:00
parent ac7e6abbf9
commit 1d079a8bf1
9 changed files with 273 additions and 28 deletions

View File

@@ -17,8 +17,8 @@ For each request, the Hub runs the checks in this order:
1. **Never-route check.** If the request is a control action (section 3), return
`status: "refused"`. Stop. Do not ask an LLM.
2. **Read capabilities.** Read the topic list from each project's
`/capabilities` (`docs/ask-contract.md`).
2. **Read capabilities.** Read the topic list and the people list from each
project's `/capabilities` (`docs/ask-contract.md`).
3. **Read this file.** Read the topic map (section 1) and the overlap rule
(section 2).
4. **Ask the LLM.** Give the LLM the question, the capability lists, and this
@@ -28,6 +28,9 @@ For each request, the Hub runs the checks in this order:
- `clarify` — ask the user one short question.
- `no_match` — say it does not know.
5. **Route.** Send the request. The action call holds no LLM (brief rule 4).
When the caller did not name a `person`, set it from the question: match a
name against the routed project's `people` list, case-insensitive and whole
word. When no name matches, `person` stays the `asker`.
A project name in this file must match the `project` value in that project's
`/capabilities` reply. A new project adds one row here and one `/capabilities`