Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions CLAUDE.md

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions GitVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
# The version is derived from the git history; a release is a tag `v<SemVer>` on `main`, and every
# build that is not on such a tag is a prerelease.
#
# `next-version` is the one number kept here: the lowest version the next release may have. It
# raises the minor place ahead of the release when the kit skills move to a new minor (their
# `metadata.version` must match the major.minor of the build, see SkillKitVersionTests). GitVersion
# is documented to ignore it once a tag at or above it exists (not yet observed in this repository,
# see 06-2), so it should need no clean-up after the release. It is written with the tag prefix
# `v`, because GitVersion parses it with `tag-prefix`.
# `next-version` is the one number kept here: the lowest version the next product release may
# have. It is a product decision only; the kit skills do not depend on it (they name the CLI
# contract of the engine, not a product version, see SkillContractTests). GitVersion is documented
# to ignore it once a tag at or above it exists (not yet observed in this repository, see 06-2), so
# it should need no clean-up after the release. It is written with the tag prefix `v`, because
# GitVersion parses it with `tag-prefix`.

mode: ContinuousDelivery
tag-prefix: 'v'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

| | |
|---|---|
| Status | Draft, 2026-10-14, updated 2026-10-18 (implementation state; package 02 implementation: missing `features/` is valid, exit codes 11, 13, 23; code review rework: exit codes 14, 24), 2026-10-21 (package 03 implementation: exit codes 15, 16, 30–34, 36, 40, warning codes, store file operations; code review rework: exit codes 2 and 130, warning codes `feature-folder-invalid`, `feature-id-mismatch`, `current-feature-invalid`, `MoveDirectory`; second code review: exit code 35), 2026-10-26 (package 04 implementation: exit codes 37, 41–46; 40 owned by 04), 2026-11-01 (package 05 implementation: exit code 47, warning codes `gates-defaults-used` and `gate-entry-ignored`), 2026-11-04 (package 05 reviews: exit code 17, since the /simplify review of feature/feature-05 for every write of the store), 2026-11-06 (package 06-1 implementation: range 50–59, exit code 50, warning code `engine-prerelease-version-mismatch`, `version --expect`), 2026-11-13 (package 07 implementation: format id `integrations` removed, `integrations` in `version --json`, exit codes 51–53, warning codes `integration-prerelease-ref`, `integration-release-tag-missing`, and `agent-unavailable`), 2026-11-14 (package 07 review rework: a command-specific message for 130), and 2026-11-20 (package 09: warning code `source-not-removed`). Implemented. |
| Status | Draft, 2026-10-14, updated 2026-10-18 (implementation state; package 02 implementation: missing `features/` is valid, exit codes 11, 13, 23; code review rework: exit codes 14, 24), 2026-10-21 (package 03 implementation: exit codes 15, 16, 30–34, 36, 40, warning codes, store file operations; code review rework: exit codes 2 and 130, warning codes `feature-folder-invalid`, `feature-id-mismatch`, `current-feature-invalid`, `MoveDirectory`; second code review: exit code 35), 2026-10-26 (package 04 implementation: exit codes 37, 41–46; 40 owned by 04), 2026-11-01 (package 05 implementation: exit code 47, warning codes `gates-defaults-used` and `gate-entry-ignored`), 2026-11-04 (package 05 reviews: exit code 17, since the /simplify review of feature/feature-05 for every write of the store), 2026-11-06 (package 06-1 implementation: range 50–59, exit code 50, warning code `engine-prerelease-version-mismatch`, `version --expect`), 2026-11-13 (package 07 implementation: format id `integrations` removed, `integrations` in `version --json`, exit codes 51–53, warning codes `integration-prerelease-ref`, `integration-release-tag-missing`, and `agent-unavailable`), 2026-11-14 (package 07 review rework: a command-specific message for 130), 2026-11-20 (package 09: warning code `source-not-removed`), and 2026-11-22 (package 06-1: CLI contract; `data.contract` in `version --json`, exit codes 54 `engine-outdated` and 55 `skills-outdated`; exit code 50 and the warning `engine-prerelease-version-mismatch` removed). Implemented. |
| Source | Concept §3.1, §3.2, §4.1, [§9](../../research/shade-kit-concept.md#9-version-drift) |
| Depends on | — |
| Enables | Every later package |
Expand Down Expand Up @@ -71,7 +71,7 @@ Every file the kit writes into a repository is safe across branch merges and kit
### `shade-kit version`

- Plain output: the engine version, since package 07 followed by one line per installed integration. **Decided** (implemented in code). **Implemented** (`VersionCommand`).
- `--json` output: engine version and the current format version per file type, keyed by format id (`"formats": { "config": 1, … }`). This is the engine's capability, not the state of a repository. **Decided** (implemented in code). **Implemented** (`VersionCommandData`). Skills use it for the version handshake (package 06): with `--expect <version>` it checks the engine against the skill's version (package 06-1, **Implemented**). Since package 07 it also has the always-present field `integrations` with the installed integrations (`agent`, `pluginId`, `kitVersion`, `ref`, `enabled`), read from the agents whose CLI is detected; an agent CLI that is missing gives no warning, one that is detected but fails gives the warning `agent-unavailable`, and neither fails the command (**Implemented** on 2026-11-13, `VersionCommandData.Integrations`).
- `--json` output: engine version and the current format version per file type, keyed by format id (`"formats": { "config": 1, … }`). This is the engine's capability, not the state of a repository. **Decided** (implemented in code). **Implemented** (`VersionCommandData`). Skills use it for the version handshake (package 06): with `--expect <version>` it checks the engine against the skill's version (package 06-1, **Implemented**). Replaced on 2026-11-22 (package 06-1, CLI contract): it always has `contract` (`{"current": 1, "minSupported": 1}`, after `formats`), and with `--expect-contract <n>` it checks the CLI contract the skill is written for, echoes it as `expectedContract`, and leaves out `integrations` (**Implemented**). Since package 07 it also has the field `integrations` (present without `--expect-contract`, left out with it) with the installed integrations (`agent`, `pluginId`, `kitVersion`, `ref`, `enabled`), read from the agents whose CLI is detected; an agent CLI that is missing gives no warning, one that is detected but fails gives the warning `agent-unavailable`, and neither fails the command (**Implemented** on 2026-11-13, `VersionCommandData.Integrations`).

### Agent contract (applies to every agent-facing command)

Expand All @@ -89,8 +89,8 @@ Every file the kit writes into a repository is safe across branch merges and kit
```

On failure, `ok` is `false`, `data` is `null`, and `error` is `{ "code": "…", "message": "…" }`. **Implemented** (`CliJsonEnvelope`, `ICliJsonWriter`, `CliErrorMapper`).
- Every failure has a stable exit code from `ShadeKitCliExitCodes` and, in JSON mode, a stable error code string, so skills can branch on it without parsing messages. **Decided** (implemented in code). Error and warning codes are kebab-case. **Decided** (implemented in code). Codes that only appear as warnings are in `ShadeKitCliWarningCodes`: `current-feature-mismatch`, `current-feature-missing`, `current-feature-invalid`, `feature-file-missing`, `feature-folder-invalid`, and `feature-id-mismatch`, all from package 03; `gates-defaults-used` and `gate-entry-ignored` from package 05 (since 2026-11-01); `engine-prerelease-version-mismatch` from package 06-1 (since 2026-11-06); `integration-prerelease-ref`, `integration-release-tag-missing`, and `agent-unavailable` from package 07 (since 2026-11-13); `source-not-removed` from package 03 (`feature new --move-source`, since 2026-11-20, package 09); `upgrade-needed` is both an error code and a warning code. **Implemented** (`ShadeKitCliWarningCodes`, since 2026-10-21).
- Exit codes are grouped in ranges per area: 10–19 store and kit root, 20–29 file format and format version, 30–39 features, 40–49 phases and gates, 50–59 versions and integrations (since 2026-11-06, package 06-1), 255 host errors. **Decided** (implemented in code). Two codes are outside the area ranges, because they apply to every command: 2 (`invalid-arguments`) is the usage code for arguments the option parser rejects, for example a missing required argument; the message names the problem and points to `shade-kit <command> --help`, and there is no stack trace. **Decided** on 2026-10-21 (package 03 code review rework). 130 (`canceled`, 128 + SIGINT) ends a run canceled with Ctrl+C. **Decided** on 2026-10-21 (package 03 code review rework). A command may give its own message for 130: a cancellation during the marketplace switch of `integrations install` or `update` names the repair (`IntegrationSwitchCanceledException`, mapped in `CliErrorMapper.Map`; **Decided** on 2026-11-14, package 07 review rework). Both are **Implemented** (`CliErrorMapper.MapArgumentError`, `CliErrorMapper.MapCancellation`, `Program`); in JSON mode each writes one failure envelope. An option class the parser cannot create is a defect of the CLI and stays 255 (`host-error`). Codes owned by packages 01 to 06-1, all **Implemented** (`ShadeKitCliExitCodes`, `ShadeKitCliErrorCodes`, `CliErrorMapper`). Exit code 11 is free since 2026-10-18 (see [Kit root](#kit-root)). Exit code 35 (`feature-io-failed`) was added on 2026-10-21 after the second code review of package 03. Exit code 37 (`no-current-feature`) was added on 2026-10-26 with package 04, in the features range because it is about features. Exit code 40 is owned by package 04 since 2026-10-26, because profiles belong to it; package 04 added 41–46 (package 04, [Errors](04-phase-engine-and-workflow-profiles.md#errors)). Exit code 47 (`checklist-template-not-found`) was added on 2026-11-01 with package 05, and exit code 17 (`kit-file-write-failed`, a file of the store cannot be written, in the store range) on 2026-11-04 after the code review of package 05 (package 05, [Errors](05-gates-and-checklists.md#errors)); since the /simplify review of the same day it applies to every write of the store ([Kit root](#kit-root)). Exit code 50 (`version-mismatch`) was added on 2026-11-06 with package 06-1 (package 06-1, [Exit and warning codes](06-1-engine-version-check.md#exit-and-warning-codes)):
- Every failure has a stable exit code from `ShadeKitCliExitCodes` and, in JSON mode, a stable error code string, so skills can branch on it without parsing messages. **Decided** (implemented in code). Error and warning codes are kebab-case. **Decided** (implemented in code). Codes that only appear as warnings are in `ShadeKitCliWarningCodes`: `current-feature-mismatch`, `current-feature-missing`, `current-feature-invalid`, `feature-file-missing`, `feature-folder-invalid`, and `feature-id-mismatch`, all from package 03; `gates-defaults-used` and `gate-entry-ignored` from package 05 (since 2026-11-01); `engine-prerelease-version-mismatch` from package 06-1 (from 2026-11-06, removed on 2026-11-22 with the `--expect` check); `integration-prerelease-ref`, `integration-release-tag-missing`, and `agent-unavailable` from package 07 (since 2026-11-13); `source-not-removed` from package 03 (`feature new --move-source`, since 2026-11-20, package 09); `upgrade-needed` is both an error code and a warning code. **Implemented** (`ShadeKitCliWarningCodes`, since 2026-10-21).
- Exit codes are grouped in ranges per area: 10–19 store and kit root, 20–29 file format and format version, 30–39 features, 40–49 phases and gates, 50–59 versions and integrations (since 2026-11-06, package 06-1), 255 host errors. **Decided** (implemented in code). Two codes are outside the area ranges, because they apply to every command: 2 (`invalid-arguments`) is the usage code for arguments the option parser rejects, for example a missing required argument; the message names the problem and points to `shade-kit <command> --help`, and there is no stack trace. **Decided** on 2026-10-21 (package 03 code review rework). 130 (`canceled`, 128 + SIGINT) ends a run canceled with Ctrl+C. **Decided** on 2026-10-21 (package 03 code review rework). A command may give its own message for 130: a cancellation during the marketplace switch of `integrations install` or `update` names the repair (`IntegrationSwitchCanceledException`, mapped in `CliErrorMapper.Map`; **Decided** on 2026-11-14, package 07 review rework). Both are **Implemented** (`CliErrorMapper.MapArgumentError`, `CliErrorMapper.MapCancellation`, `Program`); in JSON mode each writes one failure envelope. An option class the parser cannot create is a defect of the CLI and stays 255 (`host-error`). Codes owned by packages 01 to 06-1, all **Implemented** (`ShadeKitCliExitCodes`, `ShadeKitCliErrorCodes`, `CliErrorMapper`). Exit code 11 is free since 2026-10-18 (see [Kit root](#kit-root)). Exit code 35 (`feature-io-failed`) was added on 2026-10-21 after the second code review of package 03. Exit code 37 (`no-current-feature`) was added on 2026-10-26 with package 04, in the features range because it is about features. Exit code 40 is owned by package 04 since 2026-10-26, because profiles belong to it; package 04 added 41–46 (package 04, [Errors](04-phase-engine-and-workflow-profiles.md#errors)). Exit code 47 (`checklist-template-not-found`) was added on 2026-11-01 with package 05, and exit code 17 (`kit-file-write-failed`, a file of the store cannot be written, in the store range) on 2026-11-04 after the code review of package 05 (package 05, [Errors](05-gates-and-checklists.md#errors)); since the /simplify review of the same day it applies to every write of the store ([Kit root](#kit-root)). Exit code 50 (`version-mismatch`) was added on 2026-11-06 with package 06-1 and removed on 2026-11-22, when 54 (`engine-outdated`) and 55 (`skills-outdated`) of the CLI contract replaced it (package 06-1, [Exit and warning codes](06-1-engine-version-check.md#exit-and-warning-codes)):

| Exit code | Error code | Owner |
|---|---|---|
Expand Down Expand Up @@ -123,10 +123,12 @@ Every file the kit writes into a repository is safe across branch merges and kit
| 45 | `complete-not-allowed` | 04 |
| 46 | `phase-state-invalid` | 04 |
| 47 | `checklist-template-not-found` | 05 |
| 50 | `version-mismatch` | 06-1 |
| 50 | `version-mismatch` | 06-1 (removed on 2026-11-22, replaced by 54 and 55; 50 is unused) |
| 51 | `agent-not-found` | 07 |
| 52 | `agent-command-failed` | 07 |
| 53 | `integration-conflict` | 07 |
| 54 | `engine-outdated` | 06-1 (since 2026-11-22) |
| 55 | `skills-outdated` | 06-1 (since 2026-11-22) |
| 130 | `canceled` | 03 (every command) |
| 255 | `host-error` | 01 |

Expand Down
Loading
Loading