feat!: classification facets come from the configuration #26

Merged
crapougnax merged 1 commit from feat/24-configurable-facets into develop 2026-11-17 09:08:49 +00:00
Member

Closes #24

What

  • src/lib/facets.ts: reads the facets an instance declares ({ id, label, description?, weight? }, none by default), picks their values out of a document, a request or a task, filters and scores.
  • Document model: the six fixed domain fields are gone; one list of strings is added per declared facet, stored flat under its identifier.
  • Ingestion task, /api/curate, /api/extract: iterate over the declared facets. A value given for something that is not a declared facet is ignored.
  • /api/taxonomies: returns the declared facets; a new theme is no longer tagged with a domain name.
  • Interface: neutral wording; document cards show the values of the declared facets.
  • README, HOWTO, AGENTS.md, sample configuration: describe axes and facets instead of one domain. AGENTS.md now states the system role (generic provider) and its neutral example domain.

Breaking

  • An instance that used the former fixed fields must declare them as facets (same identifiers): existing documents then stay valid as they are. Without the declaration, those fields are no longer written, filtered nor scored.
  • /api/extract no longer reads latitude / altitude, which were accepted but never used.
  • The extraction weights were fixed per field; they are now the weight of each facet (default 20).

Verified

  • yarn test: 83 tests pass, 9 new on the facets module.
  • End to end on the production build with two declared facets: values are stored flat in the front matter, an undeclared key is dropped, the list filters on one or two facets, the extraction scores by weight and by mention in the text, with facet values given nested or at the top level.

Not verified

  • The extraction dialog and the metadata form come from @quatrain/ux-curation, whose types still name the former fields: they were not exercised here and will be replaced by facet-driven pages in the interface work (#25).
  • Facets are not suggested by the AI extraction: its adapter has a fixed output schema.

Left as is

POC_WORKBOOK.md, docs/tickets/ and docs/guide-modaka-vs-modaka-hub.md still describe the first use case. They are historical notes; whether they stay in this repository is the maintainer's call.

🤖 Generated with Claude Code

Closes #24 ## What - **`src/lib/facets.ts`**: reads the facets an instance declares (`{ id, label, description?, weight? }`, none by default), picks their values out of a document, a request or a task, filters and scores. - **Document model**: the six fixed domain fields are gone; one list of strings is added per declared facet, stored flat under its identifier. - **Ingestion task, `/api/curate`, `/api/extract`**: iterate over the declared facets. A value given for something that is not a declared facet is ignored. - **`/api/taxonomies`**: returns the declared facets; a new theme is no longer tagged with a domain name. - **Interface**: neutral wording; document cards show the values of the declared facets. - **README, HOWTO, AGENTS.md, sample configuration**: describe axes and facets instead of one domain. `AGENTS.md` now states the system role (generic provider) and its neutral example domain. ## Breaking - An instance that used the former fixed fields must declare them as facets (same identifiers): existing documents then stay valid as they are. Without the declaration, those fields are no longer written, filtered nor scored. - `/api/extract` no longer reads `latitude` / `altitude`, which were accepted but never used. - The extraction weights were fixed per field; they are now the `weight` of each facet (default 20). ## Verified - `yarn test`: 83 tests pass, 9 new on the facets module. - End to end on the production build with two declared facets: values are stored flat in the front matter, an undeclared key is dropped, the list filters on one or two facets, the extraction scores by weight and by mention in the text, with facet values given nested or at the top level. ## Not verified - The extraction dialog and the metadata form come from `@quatrain/ux-curation`, whose types still name the former fields: they were not exercised here and will be replaced by facet-driven pages in the interface work (#25). - Facets are not suggested by the AI extraction: its adapter has a fixed output schema. ## Left as is `POC_WORKBOOK.md`, `docs/tickets/` and `docs/guide-modaka-vs-modaka-hub.md` still describe the first use case. They are historical notes; whether they stay in this repository is the maintainer's call. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat!: classification facets come from the configuration (#24)
All checks were successful
Build and Publish OCI Image / Build & Push ARM64 OCI Image (pull_request) Successful in 3m38s
3486ed32fd
The document model, the ingestion task, the curation filters and the extraction
scoring named the classification fields of one domain. An instance now declares
its facets in its configuration file (identifier, label, weight); the code
iterates over them and names none. A facet stays a flat list under its
identifier in the front matter, so existing documents remain valid for an
instance that declares the same identifiers.

The interface, the generated files, the README, the agent instructions and the
sample configuration use neutral wording.

BREAKING CHANGE: an instance that classified documents with the former fixed
fields must declare them as facets, otherwise they are no longer written,
filtered nor scored. /api/extract reads requested values under the identifier of
a declared facet; latitude and altitude are no longer read.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
crapougnax merged commit 590204a6f8 into develop 2026-11-17 09:08:49 +00:00
crapougnax deleted branch feat/24-configurable-facets 2026-11-17 09:08:49 +00:00
Sign in to join this conversation.
No reviewers
No labels
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
modaka/studio!26
No description provided.