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-28 00:27:03 +00:00
2. Use the Policy Reading Guide below to select applicable policies.
3. Read the 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-28 00:27:03 +00:00
## Policy Reading Guide
| Policy | Read before… |
| --- | --- |
| [Policy set provenance ](policy/meta.md ) | Adopting policies, checking upstream revisions, or updating the adopted policy set. |
| [Agents ](policy/agents.md ) | Recommending, planning, or implementing repository changes. |
| [Architecture ](policy/architecture.md ) | Planning or changing Go library code or its structure. |
| [Testing ](policy/testing.md ) | Selecting validation for code changes, or adding, changing, removing, or evaluating tests. |
| [Documentation ](policy/documentation.md ) | Writing, revising, or reorganizing documentation. |
| [OSS ](policy/oss.md ) | Adding or updating dependencies or incorporated third-party material, or changing licensing or attribution. |
| [Release ](policy/release.md ) | Preparing or publishing a release, changing release procedures, or making versioning and compatibility decisions. |
- Read applicable policies before making decisions they govern; multiple policies
may apply.
- Select policies using the task triggers above. Follow cross-references to
relevant sections when needed to resolve a concrete question.
- Reuse policies already available in context; reread when changed or no longer
available.
- Expand reading when the task's scope expands.
- When revising a policy itself, read that policy and any provisions elsewhere
affected by the revision.
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 |
| --- | --- |
2026-09-28 00:27:03 +00:00
| Repository orientation or component responsibility | [Component overview ](internal/overview.md ) |
| Documentation changes | The owning document |
| Licensing, dependencies, attribution, or release-document changes | [Project grant ](../COPYRIGHT ) and [attribution ](oss/attribution.md ); release changes also follow the release procedure |
| Architecture decisions or future work | [Deferred scope ](roadmap/deferred.md ) and relevant ADRs listed below |
| Code and test changes | 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-28 00:27:03 +00:00
| Release preparation | [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
2026-09-28 01:13:09 +00:00
[release procedure ](release.md ). Its single publication command validates the
committed candidate and publishes only the intended refs.
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-29 20:11:42 +00:00
The completed filesystem-source and underlay roadmap, original feature request,
implementation plan, and resolved remediation record are preserved in Git history
at `b604aa1` under `docs/roadmap/` . Current behavior belongs to the
[configuration contract ](config.md#layered-loading ). Named-entry inheritance is
separate proposed work in its [roadmap ](roadmap/named-inheritance.md ).
2026-09-23 22:34:50 +00:00
The completed overlay rename plan and release-workflow simplification record are
preserved in Git history at `73ce6e9` under `docs/roadmap/` . Current overlay
behavior belongs to the [configuration contract ](config.md#selected-overlays ),
and release operations belong to the [release procedure ](release.md ).
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-28 01:13:09 +00:00
The [publication command ](release.md#4-publish-the-committed-candidate ) invokes
the release checker once. It performs one minimum-toolchain offline race-suite
run, one full vet pass, and Linux cross-builds using readonly module mode.
2026-09-23 18:10:37 +00:00
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'` |
2026-09-29 18:22:45 +00:00
| Native filesystem and mapping sources | [Native acquisition ](../internal/engine/native_filesystem_test.go ), [filesystem facade ](../facade_filesystem_test.go ), [mapping facade ](../facade_mapping_test.go ) | `go test ./internal/engine -run 'NativeFilesystem'` and `go test . -run 'TestFacade'` |
2026-09-23 18:27:29 +00:00
| Composition, selected overlays, CLI precedence | [Composition ](../internal/engine/compose_test.go ), [overlay ](../internal/engine/overlay_test.go ), [selected overlays ](../internal/engine/selected_overlay_test.go ), [overrides ](../internal/engine/override_test.go ) | `go test ./internal/engine -run 'Compose\|Overlay\|Override'` |
2026-09-29 18:22:45 +00:00
| Layered loading and source equivalence | [Grouped lifecycle ](../internal/engine/load_request_test.go ), [layered facade ](../facade_layered_test.go ), [equivalence ](../facade_equivalence_test.go ) | `go test ./internal/engine -run '^TestGrouped'` , `go test . -run '^TestFacadeLayered'` , and `go test . -run '^TestEquivalentSourceForms'` |
2026-09-12 16:26:44 +00:00
| 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'` |
2026-09-29 18:22:45 +00:00
| Passive resource contexts | [Engine contexts ](../internal/engine/resource_context_test.go ), [public contexts ](../facade_resource_context_test.go ) | `go test ./internal/engine -run 'Resource'` and `go test . -run 'SourceContext'` |
2026-09-12 16:26:44 +00:00
| 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-29 18:22:45 +00:00
| Consumer examples and migration fixtures | [Consumer tests ](../examples/consumers/consumers_test.go ), [native and layered examples ](../examples/consumers/layered_test.go ), [API examples ](../example_test.go ) | `go test ./examples/consumers` and `go test . -run '^Example'` |
| Assembly and layered scaling evidence | [Assembly benchmarks ](../internal/engine/assembly_bench_test.go ), [layered benchmarks ](../internal/engine/underlay_bench_test.go ) | `go test ./internal/engine -run '^$' -bench '^BenchmarkUnderlay' -benchmem` ; repeat with `^BenchmarkCompose` and `^BenchmarkOverlay` |
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-28 01:13:09 +00:00
| Development and release checker behavior | [Shell regression ](../release_check_test.go ) | `go test . -run 'TestCheckScripts\|TestDevelopmentCheck'` |
| Guarded release publication and recovery | [Publication regression ](../release_publish_test.go ) | `go test . -run '^TestReleasePublication'` |
2026-09-12 16:26:44 +00:00
## 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
```