koder.toml — `category` field

mandatory

Top-level `category` field in `koder.toml` placing each module in one of six canonical buckets. Drives the anti-drift heuristic for `policies/self-hosted-first.kmd` and unlocks per-category audit rules. Defined by `policies-RFC-002-self-hosted-first.md` Phase 4.

Spec — koder.toml top-level category field

Normative schema for the top-level category field in every koder.toml. Drives the obligation rule for the [self_hosted] block (policies/self-hosted-first.kmd § Anti-drift heuristic) and the per-category audit selection in policies/reuse-first.kmd sub-policies.

1. Where the field lives

Top-level scalar in koder.toml, alongside [package], [app], [backlog], etc.:

# koder.toml
category = "engine"

[package]
name        = "koder-lang"
version     = "7.28.0"
…

[backlog]
prefix = "LANG"

[self_hosted]
…

The field is *eclarative* it does not affect build behaviour. Tooling that consumes koder.toml (koder-spec-audit, khub, kicon, etc.) reads it to decide which audits and rules apply.

2. Schema

Field Type Required Notes
category enum string optional in Phase 4; *equired*in Phase 5 (koder-spec-audit self-hosted --validate strict) One of the six values in §3 below.

The field is at the *op level*of the TOML document, not inside any table.

3. Enum values

Six canonical buckets. New buckets require an RFC amendment.

Value Meaning Examples
product End-user product (UI + business value). Covers UI apps, mobile apps, web apps, CLIs/TUIs whose primary audience is humans, and landing pages. products/horizontal/talk, products/vertical/edictus, products/dev/hub, products/dev/kterm
engine Embeddable component imported and executed inside other modules. Native code with hot paths, ML runtimes, codecs, language runtimes, parsers. engines/kodec, engines/lang/lang, engines/lang/kvg, engines/sdk/koder_kit (the Flutter framework counts as engine, not lib, when the consumer *mbeds*it)
infra-tooling Operationallydeployed component or buildtime tool that the Stack runs / consumes (web servers, schedulers, registries, build CLIs, audit binaries). infra/net/jet, products/dev/kicon, `productsdevkoder-tools/cmd

Source: ../home/koder/dev/koder/meta/docs/stack/specs/koder-toml/category.kmd