49 lines
3.8 KiB
Markdown
49 lines
3.8 KiB
Markdown
# Internal Component Overview
|
|
|
|
## Purpose
|
|
|
|
This is the inventory of Scriptorium's implemented components for contributors.
|
|
The [architecture policy](../policy/architecture.md) owns normative boundaries
|
|
and invariants; public behavior belongs in the linked contracts.
|
|
|
|
## Public And Command Entrypoints
|
|
|
|
| Component | Implemented responsibility | References |
|
|
| --- | --- | --- |
|
|
| Root package `scriptorium` | Public Go facade that constructs the engine, exposes request/result types and options, and maps internal errors. | [Go package contract](../consumers/pkg-scriptorium.md), [adapter internals](adapters.md) |
|
|
| `cmd/scriptorium` | Process entrypoint that delegates command execution to the CLI adapter. | [CLI contract](../cli.md), [adapter internals](adapters.md) |
|
|
|
|
## Adapters, Domain, And Use Case
|
|
|
|
| Component | Implemented responsibility | References |
|
|
| --- | --- | --- |
|
|
| `internal/adapter/cli` | Parses CLI commands, constructs the public engine from application settings, and handles process input and output. | [CLI contract](../cli.md), [adapter internals](adapters.md) |
|
|
| `internal/adapter/http` | Maps HTTP requests and responses through public engine values, maps public errors, and owns restricted HTTP artifact policy. | [HTTP API contract](../api.md), [adapter internals](adapters.md) |
|
|
| `internal/domain` | Defines core request, result, output-contract, and LLM-boundary types. | [runner internals](runner.md) |
|
|
| `internal/usecase` | Implements `Runner` preparation, execution, validation coordination, and the repairer boundary. | [runner internals](runner.md) |
|
|
|
|
## Configuration And Sources
|
|
|
|
| Component | Implemented responsibility | References |
|
|
| --- | --- | --- |
|
|
| `internal/config` | Loads application settings, applies defaults, and applies CLI overrides. | [configuration contract](../config.md), [adapter internals](adapters.md) |
|
|
| `internal/defaults` | Holds compile-time default values used when application settings are resolved. | [configuration contract](../config.md) |
|
|
| `internal/promptdef` | Loads prompt definitions from filesystem and `fs.FS` sources. | [configuration contract](../config.md), [source internals](sources.md) |
|
|
| `internal/profile` | Loads filesystem and `fs.FS` execution profiles and combines profile repositories. | [configuration contract](../config.md), [source internals](sources.md) |
|
|
| `internal/profile/builtin` | Provides embedded built-in execution profiles as a repository. | [configuration contract](../config.md), [source internals](sources.md) |
|
|
| `internal/filecatalog` | Provides shared YAML discovery and source-root helpers. | [source internals](sources.md) |
|
|
| `internal/artifact` | Provides the framework's ordinary inline and unrestricted file artifact reader. | [configuration contract](../config.md), [source internals](sources.md) |
|
|
| `internal/prompt` | Renders prompt templates into messages. | [runner internals](runner.md) |
|
|
|
|
## Formatting, Validation, And Model Access
|
|
|
|
| Component | Implemented responsibility | References |
|
|
| --- | --- | --- |
|
|
| `internal/format` | Formats public prepared-run information for CLI output. | [CLI contract](../cli.md), [adapter internals](adapters.md) |
|
|
| `internal/validate` | Defines validation interfaces and provides standard filesystem and `fs.FS` schema validation. | [configuration contract](../config.md), [source internals](sources.md), [runner internals](runner.md) |
|
|
| `internal/llm` | Defines the provider-neutral LLM client boundary and its OpenAI-compatible implementation. | [OpenAI-compatible integration](../integrations/openai-compatible-chat.md), [LLM internals](llm.md), [runner internals](runner.md) |
|
|
|
|
Focused internal documents describe the components that have detailed
|
|
orchestration, adapter, or source behavior. Package tests live alongside the
|
|
implementation and are identified in those focused documents where relevant.
|