# Development This is the contributor entry point for Scriptorium. Scriptorium is an application that consumes the public [Promptkit v0.1.0 package](https://gitea.maximumdirect.net/eric/promptkit/src/tag/v0.1.0/docs/consumers/pkg-promptkit.md); framework implementation work belongs in Promptkit. ## Initial Orientation Before starting work: 1. inspect the working tree and preserve unrelated changes; 2. read the [architecture policy](policy/architecture.md); 3. follow the task-specific contracts and internal documents below; and 4. inspect the relevant implementation and tests before changing them. Also read the [documentation policy](policy/documentation.md) before changing documentation and the [testing policy](policy/testing.md) before changing tests. ## Task-Specific Reading Guide | Task | Read before changing | | --- | --- | | Repository orientation or component responsibility | [Internal component overview](internal/overview.md) and [architecture policy](policy/architecture.md) | | CLI commands, flags, output, or exit behavior | [CLI contract](cli.md) and [adapter internals](internal/adapters.md) | | HTTP routes, DTOs, limits, status mapping, or artifact policy | [HTTP API contract](api.md), [adapter internals](internal/adapters.md), and [source internals](internal/sources.md) | | Application configuration or precedence | [Configuration contract](config.md), [adapter internals](internal/adapters.md), and [source internals](internal/sources.md) | | Prepared-run presentation | [CLI contract](cli.md), [adapter internals](internal/adapters.md), and `internal/format` | | Prompt, profile, schema, generation, or validation semantics | [Promptkit framework formats](https://gitea.maximumdirect.net/eric/promptkit/src/tag/v0.1.0/docs/formats.md) and the [Promptkit consumer guide](https://gitea.maximumdirect.net/eric/promptkit/src/tag/v0.1.0/docs/consumers/pkg-promptkit.md) | | OpenAI-compatible outbound behavior or timeout layering | [Promptkit integration contract](https://gitea.maximumdirect.net/eric/promptkit/src/tag/v0.1.0/docs/integrations/openai-compatible-chat.md) | | Subprocess behavior | [Subprocess integration](integrations/subprocess.md) and [CLI contract](cli.md) | | Runtime operation or recovery | [Operations](operations.md) | | Release packaging | `.woodpecker/release.yml`, [operations](operations.md), and the architecture policy | | Examples or copyable assets | The owning Scriptorium contract, the relevant [Promptkit format contract](https://gitea.maximumdirect.net/eric/promptkit/src/tag/v0.1.0/docs/formats.md), and the related files under `examples/` | | Architecture decisions or future work | The [documentation policy](policy/documentation.md), relevant accepted ADRs, and relevant roadmap documents | Cross-project changes land and release in Promptkit before Scriptorium adopts the tagged version. Do not commit a Go workspace, local replacement, vendored Promptkit source, or an import of a Promptkit `internal` package. ## Baseline Validation For code changes, run: ```bash go test ./... go test -race ./... go vet ./... go build ./cmd/scriptorium ``` Check formatting with `gofmt`, run `git diff --check`, and validate affected examples and documentation links. Documentation-only work does not require unrelated new tests, but commands and examples changed by documentation must be run.