Add built-in profile repository wiring

This commit is contained in:
2026-07-04 16:48:18 +00:00
parent 712c6b92b8
commit 32e2433628
34 changed files with 581 additions and 64 deletions

View File

@@ -21,10 +21,9 @@ When `--config <path>` is provided, that file is required.
```yaml
prompt_dir: ./examples/prompts
profile_dir: ./examples/profiles
```
This is enough to use `run` and `render` when prompt/profile files are valid.
This is enough to use `run` and `render` when prompts select built-in profiles.
## Production-Oriented App Config
@@ -45,7 +44,7 @@ defaults:
Top-level fields:
- `prompt_dir` (optional): default prompt definition directory.
- `profile_dir` (optional): default profile definition directory.
- `profile_dir` (optional): default custom profile definition directory.
- `schema_dir` (optional): base directory for schema files used by `json_schema` validation.
- `server.addr` (optional): default listen address for `serve`.
- `defaults.render_format` (optional): default `render` output format (`text` or `json`).
@@ -173,7 +172,7 @@ Repair behavior boundary:
## Profile Definition Files
Execution profiles are YAML files anywhere under `profile_dir`, including nested subdirectories.
Scriptorium includes built-in execution profiles. Custom execution profiles are YAML files anywhere under `profile_dir`, including nested subdirectories.
Subdirectories are organizational only. Callers still select profiles by the YAML `id`, not by file path. For example, `profiles/local/local-quality.yaml` may still declare `id: local-quality`, and callers use `--profile local-quality`.
@@ -212,6 +211,9 @@ Field reference:
Profile rules:
- `profile_dir` is optional. If omitted, only built-in profiles are available.
- If `profile_dir` is set, custom profiles from that directory override built-in profiles with the same `id`.
- Duplicate IDs within the custom profile directory are invalid. Matching IDs across custom and built-in profiles are valid override behavior.
- Profile decoding is strict; unknown YAML fields are rejected.
- Raw `api_key` is rejected; use `api_key_env`.
- If `api_key_env` is set, that environment variable must be set when preparing/running.
@@ -250,7 +252,7 @@ Supported artifact reference types for request inputs are `file` and `inline`.
- App config: `examples/config.yml`
- Prompt examples: `examples/prompts/`
- Profile examples: `examples/profiles/`
- Custom profile examples: `examples/profiles/`
- Schema examples: `examples/schemas/`
- Input fixtures: `examples/fixtures/`
- Render example script: `examples/render-markdown-summary.sh`