diff --git a/docs/roadmap/promptkit-architecture-discussion.md b/docs/roadmap/promptkit-architecture-discussion.md index d14d8cf5..08e559e5 100644 --- a/docs/roadmap/promptkit-architecture-discussion.md +++ b/docs/roadmap/promptkit-architecture-discussion.md @@ -76,9 +76,42 @@ the change lands. Do not treat the remaining topics as decided by this direction ## 2. Prompt Assets And Schema Assembly -Consider replacing custom asset registration and virtual filesystem remounting -with native embedded sources, imports, collections, and source-relative assets. -Modules would continue to own prompt meaning and typed interpretation. +**Proposed design:** Keep the embedded content tree and load its prompt and +profile definitions as native PromptKit configuration in the application +collection. Use native filesystem contexts and imports to reference shared +content directly. Supply the embedded filesystem as the schema root, with +distinct schema paths selected by native output contracts. Application +composition assembles the embedded and operator sources once; modules select +prompt IDs, supply domain inputs, and interpret typed results. + +The spell extractor illustrates the current duplication: its prompt YAML +declares ordered messages and a schema, while a separate Go asset manifest +lists files, mounts shared fragments, registers filesystems, and hashes them. +The proposed design makes native declarations the sole prompt assembly source. + +Candidates for removal: + +- `AssetRegistry` and per-module prompt, schema, and fallback-profile + registration plumbing. +- `ModulePromptFS`, `PromptAssetManifest`, shared-name lookup tables, synthetic + `sharedassets` mounts, and the custom read-only filesystem if no uses remain. +- Private response-schema wrappers whose only jobs are reading JSON, duplicating + schema metadata, and computing a digest. PromptKit owns loading and compiling + the selected model-response schema; Go response types and application checks + remain with their consumers. +- Manual prompt-file enumeration for fingerprints, replaced by captured native + prompt identities subject to the broader identity design in item 5. + +Keep prompt prose, ordered messages, cache controls, workload profiles, private +response schema documents, and domain interpretation. Durable artifact schemas +remain separate. Content ownership does not require runtime asset registration. + +Native schema paths resolve against the configured schema root, separately from +message-file source contexts. PromptKit v0.23.2 loads schemas during preparation +and requires self-contained schema documents. A captured prompt hash alone does +not establish schema equality. Existing schema metadata in manifests and +checkpoint inputs must be deliberately replaced or retired; its presence does +not require preserving the complete wrapper system. Questions: @@ -90,8 +123,11 @@ Questions: **Discussion / decision:** Pending. -**Follow-up:** Separate private LLM schema plumbing from durable artifact -schemas; do not assume a captured prompt hash covers schema content. +**Follow-up:** Confirm native source contexts for shared fragments, schema +root/path selection, and operator replacements. Resolve metadata and reuse +identity with items 5–6. Verify the resulting definitions through native +preparation and fake-provider execution; filesystem remounting tests can retire +with the removed implementation. This is a proposal, not an implemented change. ## 3. Retry And Semantic Correction Ownership