Expert: request classifier for symbolic analysis #12

Closed
opened 2026-08-29 12:49:25 +00:00 by lost-rob0t · 4 comments
lost-rob0t commented 2026-08-29 12:49:25 +00:00 (Migrated from github.com)

Parent: #8
Depends on: #10

Goal

Replace the current coarse classifier with a real symbolic request-classification expert backed by Tek9 + Prolog, primarily for analysis and dataset slicing.

Inputs

  • exact user message
  • request/session/task identity
  • provider/model/client surface when known
  • bounded prior task/user facts from Tek9
  • explicit execution/tool/artifact signals parsed from the request

Outputs

Multi-label assertions with provenance and explanation. Initial dimensions should include:

  • activity: coding/debugging/research/writing/review/planning/configuration/retrieval/chat
  • requested operation: implement/fix/explain/compare/search/summarize/rewrite/create/delete/merge/test/deploy/etc.
  • artifact target: code/document/issue/PR/config/service/image/data/etc.
  • execution locality: local/remote/web/connected-service/unknown
  • project/repository identity when explicit or strongly grounded
  • tool/capability need
  • authority/effect class
  • complexity/budget class
  • expected validation form

Classification is analytical metadata only. It MUST NOT grant authority or permission.

Rules

Rules live in Prolog and can evolve. Store rule IDs/versions and the exact supporting input facts for each assertion.

Unknown/ambiguous remains explicit rather than forcing a single class.

RED-first

Create fixtures where the existing classifier cannot distinguish important compound requests, ambiguous requests, artifact intent, or authority/effect semantics. Baseline must fail before implementation.

Acceptance

  • deterministic fixtures produce expected multi-label assertions;
  • each assertion carries rule/version + evidence IDs;
  • conflicting/ambiguous labels can coexist with explicit confidence/state;
  • no prompt/request mutation occurs;
  • results persist in Tek9 and can be queried by task/user-message/provider/model/time;
  • classifier failure does not block proxy forwarding by default.
Parent: #8 Depends on: #10 ## Goal Replace the current coarse classifier with a real symbolic request-classification expert backed by Tek9 + Prolog, primarily for analysis and dataset slicing. ## Inputs - exact user message - request/session/task identity - provider/model/client surface when known - bounded prior task/user facts from Tek9 - explicit execution/tool/artifact signals parsed from the request ## Outputs Multi-label assertions with provenance and explanation. Initial dimensions should include: - activity: coding/debugging/research/writing/review/planning/configuration/retrieval/chat - requested operation: implement/fix/explain/compare/search/summarize/rewrite/create/delete/merge/test/deploy/etc. - artifact target: code/document/issue/PR/config/service/image/data/etc. - execution locality: local/remote/web/connected-service/unknown - project/repository identity when explicit or strongly grounded - tool/capability need - authority/effect class - complexity/budget class - expected validation form Classification is analytical metadata only. It MUST NOT grant authority or permission. ## Rules Rules live in Prolog and can evolve. Store rule IDs/versions and the exact supporting input facts for each assertion. Unknown/ambiguous remains explicit rather than forcing a single class. ## RED-first Create fixtures where the existing classifier cannot distinguish important compound requests, ambiguous requests, artifact intent, or authority/effect semantics. Baseline must fail before implementation. ## Acceptance - deterministic fixtures produce expected multi-label assertions; - each assertion carries rule/version + evidence IDs; - conflicting/ambiguous labels can coexist with explicit confidence/state; - no prompt/request mutation occurs; - results persist in Tek9 and can be queried by task/user-message/provider/model/time; - classifier failure does not block proxy forwarding by default.
lost-rob0t commented 2026-08-31 09:18:46 +00:00 (Migrated from github.com)

Bounded #12 substrate slice merged via PR #27 at d9e961dbfad2db3111ff68f58c980318e7f333d5 after exact-head GREEN (7d89fffd1158e1d7816fdb09010c15b2a39e629d, run 33376862930). Canonical design remains research/LLM-LOG-RESEARCH-036-request-classification-expert.org; RED/GREEN evidence is evidence/LLM-LOG-EVIDENCE-017-request-classifier-red-green.org.

Landed: declared SWI-Prolog request-classification rules, CL typed validation/supervision, exact source-message Tek9 projection separate from derived assertions, bounded result validation/publication, provenance-bearing durable assertions, and preserved #10 fixture behavior. No Python rule engine and no Tek9 repo mutation.

Keep #12 OPEN. Remaining canonical acceptance: explicit ambiguity behavior plus bounded indexed query acceptance by request/user-message/provider/model/time and restart/query conformance. Dotfiles remains on the merged #10 pin until a later eligible classifier consumer transaction is justified.

Bounded #12 substrate slice merged via PR #27 at `d9e961dbfad2db3111ff68f58c980318e7f333d5` after exact-head GREEN (`7d89fffd1158e1d7816fdb09010c15b2a39e629d`, run 33376862930). Canonical design remains `research/LLM-LOG-RESEARCH-036-request-classification-expert.org`; RED/GREEN evidence is `evidence/LLM-LOG-EVIDENCE-017-request-classifier-red-green.org`. Landed: declared SWI-Prolog request-classification rules, CL typed validation/supervision, exact source-message Tek9 projection separate from derived assertions, bounded result validation/publication, provenance-bearing durable assertions, and preserved #10 fixture behavior. No Python rule engine and no Tek9 repo mutation. Keep #12 OPEN. Remaining canonical acceptance: explicit ambiguity behavior plus bounded indexed query acceptance by request/user-message/provider/model/time and restart/query conformance. Dotfiles remains on the merged #10 pin until a later eligible classifier consumer transaction is justified.
lost-rob0t commented 2026-08-31 11:35:43 +00:00 (Migrated from github.com)

Bounded #12 indexed-history + restart + ambiguity slice merged via PR #29 after exact-head GREEN at 94c8980cb306f4a6c3964de7617eaf8ffb71974a (run 33387423599). Canonical design: research/LLM-LOG-RESEARCH-037-request-classifier-indexed-query-restart.org; implementation evidence: evidence/LLM-LOG-EVIDENCE-018-request-classifier-indexed-query-restart.org.

Verified behavior: bounded Tek9-indexed history retrieval by request/user-message/provider/model, restart durability, preserved assertion/source/rule/expert provenance, rejection of unbounded queries, and SWI-Prolog-owned explicit ambiguity. Tek9 repo was not modified; existing public APIs were sufficient.

#12 remains open. Timestamp/time-range history acceptance still needs its own RED-first slice before this issue is complete.

Bounded #12 indexed-history + restart + ambiguity slice merged via PR #29 after exact-head GREEN at `94c8980cb306f4a6c3964de7617eaf8ffb71974a` (run 33387423599). Canonical design: `research/LLM-LOG-RESEARCH-037-request-classifier-indexed-query-restart.org`; implementation evidence: `evidence/LLM-LOG-EVIDENCE-018-request-classifier-indexed-query-restart.org`. Verified behavior: bounded Tek9-indexed history retrieval by request/user-message/provider/model, restart durability, preserved assertion/source/rule/expert provenance, rejection of unbounded queries, and SWI-Prolog-owned explicit ambiguity. Tek9 repo was not modified; existing public APIs were sufficient. #12 remains open. Timestamp/time-range history acceptance still needs its own RED-first slice before this issue is complete.
lost-rob0t commented 2026-08-31 12:32:41 +00:00 (Migrated from github.com)

Bounded #12 time-range slice merged via PR #31 after exact-head RED → GREEN.

Canonical design: research/LLM-LOG-RESEARCH-038-request-classifier-time-range.org
Evidence: evidence/LLM-LOG-EVIDENCE-019-request-classifier-time-range.org
Merged main: 7150e5cb80b8c47c682b15e3d2f48143657b8ac4

Verified behavior now includes restart-durable bounded history by user-message/provider/model/request plus canonical UTC half-open time ranges, explicit ambiguity, provenance, and typed rejection of unbounded/inverted time queries. Time retrieval uses the existing Tek9 request-event started_at index plus stable classifier-source point joins; Tek9 itself was not modified.

#12 remains OPEN. Fresh acceptance reconciliation found one still-unmet item in the issue body: history query by task/task_id. The classifier source persists task-id, but the current history query has no declared task_id selector/index path. That needs its own document-first RED slice before this epic can be closed. Downstream #13/#15/#17 remain gated behind completion of #12.

Bounded #12 time-range slice merged via PR #31 after exact-head RED → GREEN. Canonical design: `research/LLM-LOG-RESEARCH-038-request-classifier-time-range.org` Evidence: `evidence/LLM-LOG-EVIDENCE-019-request-classifier-time-range.org` Merged main: `7150e5cb80b8c47c682b15e3d2f48143657b8ac4` Verified behavior now includes restart-durable bounded history by user-message/provider/model/request plus canonical UTC half-open time ranges, explicit ambiguity, provenance, and typed rejection of unbounded/inverted time queries. Time retrieval uses the existing Tek9 request-event `started_at` index plus stable classifier-source point joins; Tek9 itself was not modified. #12 remains OPEN. Fresh acceptance reconciliation found one still-unmet item in the issue body: history query by `task`/`task_id`. The classifier source persists `task-id`, but the current history query has no declared `task_id` selector/index path. That needs its own document-first RED slice before this epic can be closed. Downstream #13/#15/#17 remain gated behind completion of #12.
lost-rob0t commented 2026-08-31 13:34:09 +00:00 (Migrated from github.com)

#12 final bounded acceptance slice merged via PR #33.

Canonical design: research/LLM-LOG-RESEARCH-039-request-classifier-task-id.org
Implementation evidence: evidence/LLM-LOG-EVIDENCE-020-request-classifier-task-id.org
RED: b5d2a0c83f1bdf6b159d15cd3a447b0697b8e78c, run 33397126254 — Common Lisp failed specifically because task-only history had no bounded selector; Python expert-policy and Home Manager remained GREEN.
GREEN implementation: 46d7a25e2df25f3f9aa2c4e9de1b89e5d4cb28a1, run 33397307360 — all three expert-plane gates GREEN.
Exact final documentation/evidence head: 9531bfdc889d556814770ac93cac68859a12838c, run 33397427164 — all three gates GREEN.
Merged main: a33f28ca51d347fd35961fdd9e927834777389db.

Verified final behavior: deterministic multi-label SWI-Prolog classification; assertion rule/version/evidence provenance; explicit ambiguity; no request mutation; restart-durable bounded Tek9 history by task/user-message/request/provider/model/time; fail-open proxy policy remains covered. task_id is analytical metadata only. Existing Tek9 public index APIs were sufficient; Tek9 itself was not modified.

This satisfies the current #12 acceptance body. Downstream expert-plane work can now advance to #13; #15 and #17 remain downstream, and provider census #6 remains separate backlog.

#12 final bounded acceptance slice merged via PR #33. Canonical design: `research/LLM-LOG-RESEARCH-039-request-classifier-task-id.org` Implementation evidence: `evidence/LLM-LOG-EVIDENCE-020-request-classifier-task-id.org` RED: `b5d2a0c83f1bdf6b159d15cd3a447b0697b8e78c`, run `33397126254` — Common Lisp failed specifically because task-only history had no bounded selector; Python expert-policy and Home Manager remained GREEN. GREEN implementation: `46d7a25e2df25f3f9aa2c4e9de1b89e5d4cb28a1`, run `33397307360` — all three expert-plane gates GREEN. Exact final documentation/evidence head: `9531bfdc889d556814770ac93cac68859a12838c`, run `33397427164` — all three gates GREEN. Merged main: `a33f28ca51d347fd35961fdd9e927834777389db`. Verified final behavior: deterministic multi-label SWI-Prolog classification; assertion rule/version/evidence provenance; explicit ambiguity; no request mutation; restart-durable bounded Tek9 history by task/user-message/request/provider/model/time; fail-open proxy policy remains covered. `task_id` is analytical metadata only. Existing Tek9 public index APIs were sufficient; Tek9 itself was not modified. This satisfies the current #12 acceptance body. Downstream expert-plane work can now advance to #13; #15 and #17 remain downstream, and provider census #6 remains separate backlog.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/llm-log#12
No description provided.