From a9e1b7435cd1ef799373a9abbb952a1b987c8ade Mon Sep 17 00:00:00 2001 From: Eric Rakestraw Date: Sun, 26 Jul 2026 17:43:42 +0000 Subject: [PATCH] Correct source option documentation --- docs/consumers/pkg-scriptorium.md | 11 +++++++---- docs/policy/architecture.md | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/consumers/pkg-scriptorium.md b/docs/consumers/pkg-scriptorium.md index 973fcff..8d5fec3 100644 --- a/docs/consumers/pkg-scriptorium.md +++ b/docs/consumers/pkg-scriptorium.md @@ -40,10 +40,13 @@ Source options replace their matching directory source: - LLM client: `WithLLMClient(client)`. `fs.FS` prompt-content and schema paths stay inside their configured roots. -A single-file option exposes that file by its base name. In-memory profiles take -precedence over an explicit or directory-backed profile source, which in turn -takes precedence over built-ins. File and filesystem sources use the format and -credential rules in the [configuration reference](../config.md). +Single-file prompt and profile sources are selected by their YAML `id`, not +their file names. `WithPromptFile` resolves relative `content_file` paths from +the prompt file's directory. `WithSchemaFile` exposes its schema by the schema +file's base name. In-memory profiles take precedence over an explicit or +directory-backed profile source, which in turn takes precedence over built-ins. +File and filesystem sources use the format and credential rules in the +[configuration reference](../config.md). ## Prepare And Run diff --git a/docs/policy/architecture.md b/docs/policy/architecture.md index baabeaf..5af6e58 100644 --- a/docs/policy/architecture.md +++ b/docs/policy/architecture.md @@ -18,7 +18,8 @@ Domain behavior is centralized in `internal/usecase` and `internal/domain`. - Keep orchestration narrow: Scriptorium executes one prompt request; it is not a multi-step workflow engine. - Keep adapter logic thin: adapters map external shapes to domain requests/results and should not hold domain decisions. - Keep boundaries explicit: repositories/loaders/renderers/validators/LLM client stay behind package interfaces. -- Keep config strict: YAML/JSON decoding for external inputs should reject unknown fields. +- Keep external decoding strict: configuration, prompt, and profile YAML and + HTTP JSON should reject unknown fields. - Keep secrets out of payloads: raw API key values must not be accepted or emitted. ## Dependency Direction @@ -63,7 +64,6 @@ defined by the [documentation policy](documentation.md). ## Architectural Invariants - `Runner.Run` reuses `Runner.Prepare` flow. -- Unknown input fields in config/prompt/profile/http JSON should be rejected by strict decoding. - Raw API key values must not be accepted through external configuration or request payloads, and resolved secret values must not be emitted.