2026-09-06 10:52:38 -05:00
# Development
2026-09-07 01:40:39 +00:00
Start here when contributing to ConfigKit. Read the task-specific owners below
before making changes. The [component overview ](internal/overview.md ) maps
implementation responsibilities; the [configuration contract ](config.md ) owns
public behavior.
2026-09-06 10:52:38 -05:00
2026-09-06 11:48:22 -05:00
## Initial orientation
2026-09-06 10:52:38 -05:00
2026-09-06 11:48:22 -05:00
1. Inspect the working tree and preserve unrelated changes.
2026-09-23 17:58:49 +00:00
Agents must read and follow the [agent policy ](policy/agents.md ) before
recommending, planning, or implementing changes.
2026-09-06 11:48:22 -05:00
2. Read the architecture policy for code or design work.
3. Read the policy, contract, and internal documents applicable to the task.
2026-09-07 01:40:39 +00:00
4. Inspect the relevant implementation and behavioral tests before changing them.
2026-09-06 10:52:38 -05:00
2026-09-06 11:48:22 -05:00
## Task-specific reading guide
2026-09-06 10:52:38 -05:00
2026-09-06 11:48:22 -05:00
| Task | Read |
| --- | --- |
| Repository orientation or component responsibility | [Architecture policy ](policy/architecture.md ) and [component overview ](internal/overview.md ) |
| Documentation changes | [Documentation policy ](policy/documentation.md ) and the owning document |
2026-09-07 01:42:57 +00:00
| Architecture decisions or future work | [Documentation policy ](policy/documentation.md ), [deferred scope ](roadmap/deferred.md ), and relevant ADRs listed below |
2026-09-07 01:40:39 +00:00
| Code and test changes | [Architecture policy ](policy/architecture.md ), [testing policy ](policy/testing.md ), and the owning contract and tests from the map below |
2026-09-06 22:26:14 +00:00
| Examples or copyable assets | The owning implemented contract and [consumer adoption guide ](consumers/README.md ) |
2026-09-07 01:52:38 +00:00
| Release preparation | [Release policy ](policy/release.md ) and [release procedure ](release.md ) |
2026-09-06 10:52:38 -05:00
2026-09-06 11:48:22 -05:00
Accepted decisions:
2026-09-06 10:52:38 -05:00
2026-09-06 11:48:22 -05:00
- [Separate composition and overlay ](adr/0001-separate-composition-and-overlay.md )
- [Own YAML semantics behind a private parser boundary ](adr/0002-own-yaml-semantics.md )
- [Preserve presence and record application resolution ](adr/0003-preserve-presence-and-resolution-history.md )
2026-09-06 13:59:01 -05:00
- [Secret references and explicit bootstrap ](adr/0004-secret-references-and-explicit-bootstrap.md )
- [Explicit overrides and safe explanation ](adr/0005-explicit-overrides-and-safe-explanation.md )
2026-09-12 15:56:11 +00:00
- [Keep the public facade root-owned ](adr/0006-public-facade.md )
2026-09-06 13:59:01 -05:00
2026-09-07 01:42:57 +00:00
For cross-cutting changes, follow every applicable row. Completed implementation
and remediation plans are preserved in Git history at `cb5b435` ; use current
contracts and the component overview for ongoing work. For example:
```sh
git show cb5b435:docs/roadmap/remediation.md
```
2026-09-07 01:52:38 +00:00
Release-candidate, publication, and verification work follows the operational
[release procedure ](release.md ).
2026-09-06 10:52:38 -05:00
2026-09-12 01:33:17 +00:00
The completed string-and-integer schema-version implementation and remediation
records are preserved in Git history at `244104f` . The
[configuration contract ](config.md#application-schema-versions ) owns current behavior.
2026-09-12 00:25:54 +00:00
2026-09-12 18:35:51 +00:00
The completed source-origins and public-facade roadmaps, implementation plan, and
resolved review findings are preserved in Git history at `5760614` , for example
`git show 5760614:docs/roadmap/remediation.md` . The earlier source-origins staged
plan remains at `28e7fc5:docs/roadmap/implementation.md` . Current resolution
behavior belongs to the [configuration contract ](config.md#recorded-application-resolution ),
and current facade ownership belongs to the [component overview ](internal/overview.md ).
2026-09-12 12:52:32 +00:00
2026-09-06 11:48:22 -05:00
## Baseline validation
2026-09-06 10:52:38 -05:00
2026-09-06 19:13:36 +00:00
Install Go 1.25.0 or a supported patched/newer Go toolchain. Acquire declared
dependencies explicitly before entering an offline development or validation
environment:
2026-09-06 10:52:38 -05:00
2026-09-06 11:48:22 -05:00
```sh
2026-09-06 19:13:36 +00:00
go mod download
2026-09-06 11:48:22 -05:00
```
2026-09-06 10:52:38 -05:00
2026-09-07 01:40:39 +00:00
Run the everyday check with Bash 3.2 or newer and Git:
2026-09-06 19:13:36 +00:00
```sh
2026-09-07 01:40:39 +00:00
./scripts/check.sh
2026-09-06 19:13:36 +00:00
```
2026-09-06 10:52:38 -05:00
2026-09-07 01:40:39 +00:00
[The script ](../scripts/check.sh ) runs from the repository root regardless of the
invocation directory. It checks Go formatting without rewriting files, checks
staged/unstaged and untracked whitespace, then runs `go test ./...` ,
`go vet ./...` , and `go build ./...` , stopping on the first failure. It uses the
installed Go toolchain by default, honors an explicit `GOTOOLCHAIN` , and disables
dependency downloads. Acquire dependencies and any selected toolchain beforehand.
Format reported Go files with `gofmt -w <files>` .
The default suite includes executable examples, maintained consumer fixtures,
local documentation-link checks, and the dependency import-boundary check.
It must stay deterministic and runnable without network access or credentials.
Still inspect new/untracked content and review paths, examples, ownership, and
current-versus-planned claims; automated checks do not replace content review.
Use focused checks while iterating, with validation proportionate to the change
under the testing policy. Documentation-only work normally needs the local-link
check below and whitespace review; behavior-bearing examples and commands also
need execution. Use `go test -race ./...` for ownership or concurrency changes.
2026-09-23 18:10:37 +00:00
The [release checker ](release.md#4-validate-the-source-candidate ) performs one
minimum-toolchain race-suite run, vet, module hygiene, and Linux cross-builds.
It already covers examples, links, and package boundaries; do not additionally
run the everyday checker just to repeat those checks. CI never gates a release.
2026-09-07 01:40:39 +00:00
## Task-to-test map
Commands run from the repository root after dependency acquisition. These are
starting points for focused iteration; run the everyday check before handing off
code changes. Use the component overview to find the corresponding implementation.
| Task | Behavioral test owners | Focused command |
| --- | --- | --- |
2026-09-12 16:26:44 +00:00
| YAML syntax, diagnostics, parser limits | [Adapter tests ](../internal/yaml/parse_test.go ), [source translation ](../internal/engine/parse_test.go ) | `go test ./internal/yaml` and `go test ./internal/engine -run '^TestParseSource'` |
| File/reader access, imports, globs, containment | [Sources ](../internal/engine/source_test.go ), [FIFO ](../internal/engine/source_fifo_test.go ), [imports ](../internal/engine/imports_test.go ), [globs ](../internal/engine/glob_test.go ) | `go test ./internal/engine -run 'Source\|Import\|Glob\|Filesystem\|Nonregular\|RegularFile'` |
| Composition, profiles, CLI precedence | [Composition ](../internal/engine/compose_test.go ), [overlay ](../internal/engine/overlay_test.go ), [profiles ](../internal/engine/profile_test.go ), [overrides ](../internal/engine/override_test.go ) | `go test ./internal/engine -run 'Compose\|Overlay\|Profile\|Override'` |
| Schema, defaults, projection, cloning | [Schema ](../internal/engine/schema_test.go ), [decoding ](../internal/engine/decode_test.go ), [projection ](../internal/engine/projection_test.go ) | `go test ./internal/engine -run 'Schema\|Decode\|Projection\|Clone\|Inline\|CompareDocument'` |
| Lifecycle, resolution, validation, callback ownership | [Loading ](../internal/engine/load_test.go ), [resolution ](../internal/engine/resolution_test.go ), [validation ](../internal/engine/validation_test.go ), [ownership ](../internal/engine/callback_ownership_test.go ), [independence ](../internal/engine/independence_test.go ) | `go test ./internal/engine -run 'Load\|Resolution\|Validation\|Validator\|Hook\|Callback\|Parallel'` |
| Paths, metadata, provenance | [Paths ](../internal/engine/path_test.go ), [metadata ](../internal/engine/metadata_test.go ), [provenance ](../internal/engine/provenance_test.go ) | `go test ./internal/engine -run 'Path\|Metadata\|Provenance\|Queries'` |
| Secrets, bootstrap, redaction, explanation | [References ](../internal/engine/secret_reference_test.go ), [bootstrap ](../internal/engine/secrets_test.go ), [rendering ](../internal/engine/render_test.go ), [explanation ](../internal/engine/explain_test.go ) | `go test ./internal/engine -run 'Secret\|Bootstrap\|Effective\|Explain\|Explanation\|History\|Sensitivity'` |
2026-09-07 01:40:39 +00:00
| Consumer examples and migration fixtures | [Consumer tests ](../examples/consumers/consumers_test.go ), [API examples ](../example_test.go ) | `go test ./examples/consumers` and `go test . -run '^Example'` |
2026-09-12 17:26:12 +00:00
| Documentation links and dependency isolation | [Link checks ](../documentation_test.go ), [import boundary ](../import_boundary_test.go ), [public boundary ](../public_boundary_test.go ) | `go test . -run 'TestLocalDocumentationLinks\|TestDependencyImportBoundary\|TestPublicFacadeBoundary'` |
2026-09-12 16:26:44 +00:00
| Check-command behavior | [Shell regression ](../release_check_test.go ) | `go test . -run '^TestCheckScripts'` |
## Fuzz validation
Run the bounded fuzz targets independently from the repository root. These exact
commands keep each campaign short and constrain concurrent workers:
```sh
go test ./internal/engine -run='^$' -fuzz='^FuzzParsePath$' -fuzztime=30s -parallel=2
go test ./internal/yaml -run='^$' -fuzz='^FuzzParseDocument$' -fuzztime=30s -parallel=2
go test ./internal/engine -run='^$' -fuzz='^FuzzCompositionAndOverlay$' -fuzztime=30s -parallel=2
2026-09-06 22:35:01 +00:00
```