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
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
fetch-depth: 0

- uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
- uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
global-json-file: global.json

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
- uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
global-json-file: global.json
- name: 'Cache: ~/.nuget/packages'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
- uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
global-json-file: global.json
- name: 'Cache: ~/.nuget/packages'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
- uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
global-json-file: global.json
- name: 'Cache: ~/.nuget/packages'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
- uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
global-json-file: global.json
- name: 'Cache: ~/.nuget/packages'
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
- uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
global-json-file: global.json
- name: 'Download: nuget package'
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
- uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
global-json-file: global.json
- name: 'Download: dist packages'
Expand Down
5 changes: 3 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ If a design choice can stay agent-agnostic **without losing functionality or pre
| Path | Purpose |
|---|---|
| `skills/` | Shipped plugin content |
| `src/` | Production .NET projects: `CreativeCoders.ShadeKit.Cli` (the `shade-kit` CLI) and `CreativeCoders.ShadeKit.Core` (engine logic). The templates that `init` writes live in `src/CreativeCoders.ShadeKit.Core/Templates/Resources/` (`<name>.template.md`, checklists in `checks/`) and are embedded into the Core assembly; their repository paths are listed in `ShippedTemplates`. The phase workflow lives in `src/CreativeCoders.ShadeKit.Core/Workflow/`: `Profiles/` (built-in profiles in `BuiltInWorkflowProfiles` behind `IWorkflowProfileCatalog`), `Engine/` (the pure state machine `IPhaseEngine`), and the orchestration `PhaseWorkflow` with the gate seam `ITransitionGateProvider`. The gates live in `src/CreativeCoders.ShadeKit.Core/Gates/`: `GatesConfig` (`gates.json`, defaults in `CreateDefault()`), `GatesConfigTransitionGateProvider` behind the gate seam (one cached read of `gates.json` per store, checked against the profile catalog; returns the configured gates of a profile as a read-only view, and the engine applies the default gate to a phase without one), and `IFeatureChecklistWriter` (the checklist copy in the feature folder). The version check lives in `src/CreativeCoders.ShadeKit.Core/Versions/`: `SemanticVersion` (strict SemVer 2.0.0) and `IEngineVersionChecker` (the match rule of `version --expect`). |
| `tests/` | One test project per production project (`<Project>.Tests`); `tests/Shared/` holds test helpers that both projects compile in (`<Compile Include="..\Shared\**\*.cs">`) |
| `src/` | Production .NET projects: `CreativeCoders.ShadeKit.Cli` (the `shade-kit` CLI) and `CreativeCoders.ShadeKit.Core` (engine logic). The templates that `init` writes live in `src/CreativeCoders.ShadeKit.Core/Templates/Resources/` (`<name>.template.md`, checklists in `checks/`) and are embedded into the Core assembly; their repository paths are listed in `ShippedTemplates`. The phase workflow lives in `src/CreativeCoders.ShadeKit.Core/Workflow/`: `Profiles/` (built-in profiles in `BuiltInWorkflowProfiles` behind `IWorkflowProfileCatalog`; each phase lists the artifacts it writes, `PhaseArtifact` with an `onDemand` flag, names in `WorkflowArtifactNames`), `Engine/` (the pure state machine `IPhaseEngine`; the default gate of a phase without an entry is `TransitionGate.ForPhase`, and `HasGate` says whether a phase has a gate), and the orchestration `PhaseWorkflow` with the gate seam `ITransitionGateProvider`. The gates live in `src/CreativeCoders.ShadeKit.Core/Gates/`: `GatesConfig` (`gates.json`, defaults in `CreateDefault()`), `GatesConfigTransitionGateProvider` behind the gate seam (one cached read of `gates.json` per store, checked against the profile catalog; returns the configured gates of a profile as a read-only view, and the engine applies the default gate to a phase without one), and `IFeatureChecklistWriter` (the checklist copy in the feature folder). `IPhaseWorkflow.GetGateInfoAsync` reads the read-only gate data of one feature (the current one or by id) for `gate info`: the feature, its phases with their state and artifacts (`FeaturePhase`, the same `phases` array as `feature show`), the configured gate of a phase with its checklist copy, and `coverageThreshold`. The version check lives in `src/CreativeCoders.ShadeKit.Core/Versions/`: `SemanticVersion` (strict SemVer 2.0.0) and `IEngineVersionChecker` (the match rule of `version --expect`). |
| `tests/` | One test project per production project (`<Project>.Tests`); `tests/Shared/` holds test helpers that both projects compile in (`<Compile Include="..\Shared\**\*.cs">`); the CLI end-to-end tests run commands through `CliEndToEndHarness` (`tests/CreativeCoders.ShadeKit.Cli.Tests/Commands/`) |
| `build/` | Cake Frosting build project (`CreativeCoders.CakeBuild`), run through `build.sh` / `build.ps1` / `build.cmd`. Not part of `ShadeKit.slnx`; it has its own `Directory.Build.props` and `Directory.Packages.props`. |
| `.github/` | GitHub Actions workflows and Dependabot configuration |
| `research/` | Design notes and investigations. Not shipped. Shipped code and skills must not depend on it. |
Expand Down Expand Up @@ -77,6 +77,7 @@ dotnet run --project src/CreativeCoders.ShadeKit.Cli -- phase reject <phase> [--
dotnet run --project src/CreativeCoders.ShadeKit.Cli -- phase complete
dotnet run --project src/CreativeCoders.ShadeKit.Cli -- phase skills <phase> --json
dotnet run --project src/CreativeCoders.ShadeKit.Cli -- phase next --json
dotnet run --project src/CreativeCoders.ShadeKit.Cli -- gate info <phase> [--feature <id>] --json # read-only gate data for a gate check (checklist copy, coverageThreshold)
dotnet pack src/CreativeCoders.ShadeKit.Cli # dotnet global tool package (command: shade-kit)
dotnet publish src/CreativeCoders.ShadeKit.Cli -c Release -r <rid> # self-contained single-file binary
```
Expand Down
10 changes: 5 additions & 5 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
<PackageVersion Include="CreativeCoders.SysConsole.Core" Version="6.10.0" />
<PackageVersion Include="editorconfig" Version="0.18.0" />
<PackageVersion Include="FakeItEasy" Version="9.0.1" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="10.0.13" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.13" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="10.0.13" />
<PackageVersion Include="Microsoft.Extensions.TimeProvider.Testing" Version="10.10.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="10.0.15" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.15" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="10.0.15" />
<PackageVersion Include="Microsoft.Extensions.TimeProvider.Testing" Version="10.11.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.11.0" />
<PackageVersion Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.12.0" />
<PackageVersion Include="Microsoft.Testing.Extensions.TrxReport" Version="2.5.2" />
<PackageVersion Include="Spectre.Console.Testing" Version="0.57.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="4.0.1" />
<PackageVersion Include="xunit.v3" Version="4.0.3" />
</ItemGroup>
</Project>
</Project>
2 changes: 1 addition & 1 deletion docs/feature-packages/03-feature-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ The engine does not create or switch branches in v1. `feature new` returns the s
| `list` | `{ features: [ { id, title, profile, status, currentPhase } ] }` |
| `current` | `{ resolved, resolvedFrom, feature: { id, title, profile, status, currentPhase, phaseState, paths } }`; `resolvedFrom` is `branch` or `override`; not resolved: `{ resolved: false, resolvedFrom: null, feature: null }` |
| `set` | `{ id }` |
| `show` | `{ id, title, profile, status, source, createdAt, createdBy: { name, email }, paths, currentPhase, pendingTransition, phases, history: [ { at, by: { name, email }, action, from, to, note } ] }`; `phases` in profile order, then kept entries of phases the profile no longer has; `pendingTransition`, `from`, `to`, and `note` are `null` when they have no value |
| `show` | `{ id, title, profile, status, source, createdAt, createdBy: { name, email }, paths, currentPhase, pendingTransition, phases: [ { name, state, artifacts: [ { file, onDemand } ] } ], history: [ { at, by: { name, email }, action, from, to, note } ] }`; `phases` in profile order, then kept entries of phases the profile no longer has (with empty `artifacts`), in the same shape as `phases` of `gate info` (06-4, D-43: an array since 2026-11-10, before an object phase → state); `pendingTransition`, `from`, `to`, and `note` are `null` when they have no value |
| `drop` | `{ id, dropped, files, overrideAffected, overrideCleared }`; `files` lists every file in the folder; `overrideAffected` (the override points to this feature, so it is or would be cleared) is set in the preview and after the drop; `overrideCleared` is true only after the override was deleted (`overrideAffected` **Decided** on 2026-10-21, code review rework; before, the JSON preview could not tell that the override would be cleared) |

`paths` is `{ featureDir, featureFile, request }`, for example:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ CLI Commands/Phase/* ──► IPhaseWorkflow / PhaseWorkflow (orche
└ WorkflowPhase
```

- **Profiles** (`Workflow/Profiles/`): a `WorkflowProfile` is a name and an ordered list of `WorkflowPhase` (name, phase skill, general skills, `CanReopen`, default `true`). The built-in profiles are C# definitions in `BuiltInWorkflowProfiles`, offered by `IWorkflowProfileCatalog` / `BuiltInWorkflowProfileCatalog`. A profile needs a non-empty name, at least one phase, and unique phase names; the catalog needs unique profile names. Names are compared ordinally. Adding a profile or changing the phase order of a profile means changing `BuiltInWorkflowProfiles` only. The names are constants in `WorkflowProfileNames`, `WorkflowPhaseNames`, and `WorkflowSkillNames` (`ForPhase(phase)` gives `shade-kit-<phase>`). **Implemented** (`BuiltInWorkflowProfilesTests`, `BuiltInWorkflowProfileCatalogTests`, `WorkflowProfileTests`, `WorkflowPhaseTests`).
- **Profiles** (`Workflow/Profiles/`): a `WorkflowProfile` is a name and an ordered list of `WorkflowPhase` (name, phase skill, general skills, `CanReopen`, default `true`, and the artifacts it writes into the feature folder, each a `PhaseArtifact` with its file and an `OnDemand` flag). The built-in profiles are C# definitions in `BuiltInWorkflowProfiles`, offered by `IWorkflowProfileCatalog` / `BuiltInWorkflowProfileCatalog`. A profile needs a non-empty name, at least one phase, and unique phase names; the catalog needs unique profile names. Names are compared ordinally. Adding a profile or changing the phase order of a profile means changing `BuiltInWorkflowProfiles` only. The names are constants in `WorkflowProfileNames`, `WorkflowPhaseNames`, and `WorkflowSkillNames` (`ForPhase(phase)` gives `shade-kit-<phase>`). **Implemented** (`BuiltInWorkflowProfilesTests`, `BuiltInWorkflowProfileCatalogTests`, `WorkflowProfileTests`, `WorkflowPhaseTests`).
- **Engine** (`Workflow/Engine/`): `IPhaseEngine` / `PhaseEngine` is a pure state machine without I/O, clock, or git. It gets the profile, the stored phase state, and the gates, and returns a decision (new state and one history record) or throws. It contains no profile, phase, or skill name; everything comes from the `WorkflowProfile` it is given. The interface `IPhaseEngine` is an explicit decision of the user (2026-10-26). **Implemented** (`PhaseEngineGenericityTests` run synthetic profiles with four, two, and one phase; `PhaseEngineArchitectureTests` scan the IL of the engine namespace for references to the built-in profiles and for profile, phase, and skill name literals).
- **Gate seam**: `ITransitionGateProvider.GetGatesAsync(store, profile)` returns the configured `TransitionGate(Approval, Checklist)` of the transitions into the phases of the profile, keyed by target phase, together with the warnings of reading the gate configuration (`WorkflowProfileGates`; one call per profile since 2026-11-04, review of feature/feature-05, [package 05](05-gates-and-checklists.md#reading-gatesjson); before, `GetGateAsync(store, profile, targetPhase)` returned the gate of one phase). A phase without a gate gets `TransitionGate.Default` from the engine, which is the only place of this default; before the /simplify review of 2026-11-04, the provider filled it in for every phase of the profile. Package 04 registered `DefaultTransitionGateProvider` (approval required, no checklist, for every transition). Since 2026-11-01, `AddShadeKitCore()` registers `GatesConfigTransitionGateProvider` of package 05 instead, which reads `gates.json` from the store it gets, once per store (since 2026-11-04 without the separate `IGatesConfigReader`); `DefaultTransitionGateProvider` is removed ([package 05](05-gates-and-checklists.md#reading-gatesjson)). The engine handles `Approval = false` generically ([Transitions](#transitions)). A reopen always needs an approval and has no checklist, whatever the provider returns (engine rule). **Implemented** (`GatesConfigTransitionGateProviderTests`, `PhaseEngineStartTests`).
- **Orchestration**: `IPhaseWorkflow` / `PhaseWorkflow` resolves the current feature, reads `feature.json`, asks the catalog for the profile and the provider for the gates, calls the engine, reads the git identity only when a write follows, and writes `feature.json` through `IKitStore.WriteJsonAsync`. `phase start` copies the checklist of the gate into the feature folder between reading the identity and writing (package 05). `phase complete` also clears the local override. **Implemented** (`PhaseWorkflow*Tests`).
Expand All @@ -72,6 +72,7 @@ A profile is an ordered list of phases plus its gate defaults (gate defaults: pa

- The phase skill of every phase is `shade-kit-<phase>`; with the `quick` phase this holds for every phase of every profile. Skills adapt their behaviour to the profile they read from `feature current` (for example `plan` is short in `bugfix`). The general skills follow `research/shade-kit-skills.md` §3. **Decided** on 2026-10-26 (implementation clarification). `shade-kit-gate-check` is a constant in `WorkflowSkillNames` but in no phase list: the entry protocol loads it for a gate with a checklist (package 06).
- `new` cannot be reopened in any built-in profile (`CanReopen = false`); every other phase can. **Decided** on 2026-10-26 (implementation clarification).
- The artifacts of the phases, in `BuiltInWorkflowProfiles` (file names in `WorkflowArtifactNames`): `new` → `request.md`; `refine` → `spec.md`, `researches.md`; `map` → `researches.md`; `diagnose` → `diagnosis.md`, `spec.md`, `researches.md`; `plan` → `plan.md`, `tasks.md`; `implement` → `review.md`; `verify` → `verification.md`, `playbook.md`; `quick` → `spec.md`, `review.md`, `verification.md`, and `playbook.md` on demand (only for a manual criterion); `finish` → `report.md` on demand (`report` in `config.json`). `gate info` and `feature show` return them with the phases, and the gate check decides its n/a rule on them (06-4). **Decided** on 2026-11-10 (simplify review, D-43 in 06-4).
- `quick` is a phase of its own: clarification, compact spec, implementation, and review in one run (package 17). **Decided** on 2026-10-18.
- The profile of a feature is fixed at `feature new` and cannot change in v1. **Proposed.** `feature new` (package 03) checks the profile against the catalog (`IWorkflowProfileCatalog.GetProfile`) and stops with exit code 40 (`unknown-profile`) for an unknown one. A `feature.json` whose `profile` the catalog does not know stops every phase command and `feature list`, `current`, and `show` with exit code 40 too; the message names the file and the field. **Implemented** (`UnknownProfileException` in `Workflow/Profiles/Exceptions/`, which carries the known profile names, so `CliErrorMapper` needs no catalog).
- `discuss` and `drop` are not phases of any profile. `discuss` needs no feature state (package 09), `drop` is `feature drop` (package 03). **Decided** (findings clarification, 2026-10-18).
Expand Down
Loading
Loading