2026-07-26 08:59:46 -05:00
# Development
2026-07-28 14:21:19 +00:00
This is the contributor entry point for Scriptorium. Scriptorium is an
application that consumes the public
2026-09-26 15:24:55 +00:00
[Promptkit v0.11.0 package ](https://gitea.maximumdirect.net/eric/promptkit/src/tag/v0.11.0/docs/consumers/pkg-promptkit.md );
2026-07-28 14:21:19 +00:00
framework implementation work belongs in Promptkit.
2026-07-26 08:59:46 -05:00
## Initial Orientation
2026-09-26 14:25:32 +00:00
Before recommending, planning, or implementing work:
2026-07-26 08:59:46 -05:00
2026-09-26 14:25:32 +00:00
1. read the [agent policy ](policy/agents.md );
2. inspect the working tree and preserve unrelated changes;
3. read the [architecture policy ](policy/architecture.md );
4. follow the task-specific contracts and internal documents below; and
5. inspect the relevant implementation and tests before changing them.
2026-07-28 14:21:19 +00:00
Also read the [documentation policy ](policy/documentation.md ) before changing
documentation and the [testing policy ](policy/testing.md ) before changing
tests.
2026-07-26 08:59:46 -05:00
## Task-Specific Reading Guide
| Task | Read before changing |
| --- | --- |
2026-07-26 14:06:55 +00:00
| Repository orientation or component responsibility | [Internal component overview ](internal/overview.md ) and [architecture policy ](policy/architecture.md ) |
2026-07-28 14:21:19 +00:00
| 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` |
2026-09-26 15:24:55 +00:00
| Prompt, profile, schema, generation, or validation semantics | [Promptkit framework formats ](https://gitea.maximumdirect.net/eric/promptkit/src/tag/v0.11.0/docs/formats.md ) and the [Promptkit consumer guide ](https://gitea.maximumdirect.net/eric/promptkit/src/tag/v0.11.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.11.0/docs/integrations/openai-compatible-chat.md ) |
2026-07-26 08:59:46 -05:00
| Subprocess behavior | [Subprocess integration ](integrations/subprocess.md ) and [CLI contract ](cli.md ) |
2026-07-26 14:22:29 +00:00
| Runtime operation or recovery | [Operations ](operations.md ) |
2026-09-26 16:36:45 +00:00
| Dependencies, copied assets, or attribution | The [OSS policy ](policy/oss.md ), [component attributions ](oss/attribution.md ), and [architecture policy ](policy/architecture.md ) |
| Release documentation, packaging, or publication | The [release policy ](policy/release.md ), [OSS policy ](policy/oss.md ), [release procedure ](release.md ), [hosted release workflow ](../.woodpecker/release.yml ), and [architecture policy ](policy/architecture.md ) |
2026-09-26 15:24:55 +00:00
| Examples or copyable assets | The owning Scriptorium contract, the relevant [Promptkit format contract ](https://gitea.maximumdirect.net/eric/promptkit/src/tag/v0.11.0/docs/formats.md ), and the related files under `examples/` |
2026-07-28 14:21:19 +00:00
| Architecture decisions or future work | The [documentation policy ](policy/documentation.md ), relevant accepted ADRs, and relevant roadmap documents |
2026-07-26 08:59:46 -05:00
2026-07-28 14:21:19 +00:00
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.
2026-07-26 08:59:46 -05:00
## Baseline Validation
2026-07-28 14:21:19 +00:00
For code changes, run:
2026-07-26 08:59:46 -05:00
```bash
go test ./...
2026-07-28 14:21:19 +00:00
go test -race ./...
2026-07-26 08:59:46 -05:00
go vet ./...
go build ./cmd/scriptorium
```
2026-07-28 14:21:19 +00:00
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.