2026-09-23 15:03:20 +00:00
|
|
|
# Configuration and CLI Change Recipes
|
|
|
|
|
|
|
|
|
|
This document owns contributor editing and validation steps for configuration,
|
|
|
|
|
CLI wiring, and maintained examples. Definitions of behavior belong to the
|
|
|
|
|
[configuration](../config.md) and [CLI](../cli.md) contracts.
|
|
|
|
|
|
|
|
|
|
## Changing Configuration
|
|
|
|
|
|
|
|
|
|
1. Update fields, defaults, loading, and validation in `internal/core/config`.
|
2026-09-24 02:37:20 +00:00
|
|
|
2. Update file, selected overlay, credential reference, and CLI mapping as
|
|
|
|
|
applicable. Preserve the precedence defined in the
|
2026-11-10 17:52:14 +00:00
|
|
|
[configuration contract](../config.md#loading-and-composition), including the
|
2026-09-23 15:03:20 +00:00
|
|
|
distinct validation and effective-config commands.
|
|
|
|
|
3. Update redaction when secrets are involved.
|
|
|
|
|
4. Review configuration tests and related CLI tests for precedence, validation,
|
|
|
|
|
and source-specific behavior. Add or adjust tests for the changed contract
|
|
|
|
|
according to the [testing policy](../policy/testing.md).
|
|
|
|
|
5. Update the configuration reference and affected [examples](../../examples/).
|
|
|
|
|
|
|
|
|
|
## Changing CLI Behavior
|
|
|
|
|
|
|
|
|
|
1. Implement parsing and wiring in `internal/cli`.
|
|
|
|
|
2. Preserve [stream and exit contracts](../cli.md) unless a change is intentional
|
|
|
|
|
and documented. Review [subprocess integration](../integrations/subprocess.md)
|
|
|
|
|
when changing output, error, or report handling.
|
|
|
|
|
3. Review `internal/cli` tests and `cmd/audita` subprocess tests; update coverage
|
|
|
|
|
for the changed behavior.
|
|
|
|
|
4. Update the CLI reference and affected integration guidance.
|
|
|
|
|
|
2026-10-07 14:09:00 +00:00
|
|
|
The `version` route uses ReleaseKit's public `buildinfo.Version()` accessor and
|
|
|
|
|
stays independent of application runtime assembly. Preserve its behavior from
|
2026-11-10 17:52:14 +00:00
|
|
|
the [CLI contract](../cli.md) when changing the command; the
|
2026-10-07 14:09:00 +00:00
|
|
|
adoption decision is recorded in [ADR 0001](../adr/0001-releasekit.md).
|
|
|
|
|
|
2026-09-23 15:03:20 +00:00
|
|
|
## Validating Examples
|
|
|
|
|
|
|
|
|
|
Keep complete copyable files in [examples](../../examples/) and link to them from
|
|
|
|
|
their canonical contract documentation. Keep them valid and secret-free.
|
2026-11-10 17:52:14 +00:00
|
|
|
Run the commands in the [example guide](../../examples/README.md) from each
|
|
|
|
|
project's directory. `internal/cli/examples_integration_test.go` exercises the
|
|
|
|
|
maintained projects with a controlled provider, and the preview fixture can be
|
|
|
|
|
prepared without inference. Review automatic companion sources and overlays in
|
|
|
|
|
their actual project directories. Keep service credentials synthetic in tests.
|
2026-09-23 15:03:20 +00:00
|
|
|
|
|
|
|
|
## Runtime Change Checks
|
|
|
|
|
|
|
|
|
|
Select checks according to the [testing policy](../policy/testing.md):
|
|
|
|
|
|
|
|
|
|
- Configuration or CLI changes: inspect `internal/core/config` tests,
|
|
|
|
|
`internal/cli` tests, and `cmd/audita` integration tests.
|
|
|
|
|
- Process/output changes: verify stdout, stderr, exit, output-file, and report
|
|
|
|
|
behavior against the [CLI contract](../cli.md) and
|
|
|
|
|
[subprocess guidance](../integrations/subprocess.md), including failures.
|
|
|
|
|
- Report or diagnostics changes: review [report assembly tests and redaction
|
|
|
|
|
checks](diagnostics-reporting.md#key-tests), metadata fields, and artifact paths.
|
|
|
|
|
- Schema or serialization changes: review [output-schema tests](output-schemas.md#key-tests)
|
|
|
|
|
and `internal/core/schema` tests, including supported formats and rejection of
|
|
|
|
|
unsupported schemas.
|
2026-09-24 02:37:20 +00:00
|
|
|
- Changes affecting assembled output: inspect controlled HTTP subprocess workflows
|
|
|
|
|
and retained report/artifact assertions.
|
2026-09-23 15:03:20 +00:00
|
|
|
|
|
|
|
|
Use the [contributor guide](../development.md#baseline-validation) for baseline
|
|
|
|
|
commands. These recipes supplement, rather than duplicate, public contracts.
|