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 CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ The rules for the kit skills under `skills/` are in [06-2 Skill conventions and
- A phase skill runs only when the user calls it by name; no skill starts a phase skill.
- A kit skill that needs decisions from the human loads `shade-kit-interview` and names in its text the mode (`open` or `targeted`), the topics, the target artifact, the recording rule, and the recording time (`immediately` or `on return`); only the human's answers become decisions.
- A kit skill that researches loads `shade-kit-research` and names in its text the phase, the feature id, the focuses (each with a short name, which is the section heading `<phase> / <name>` in `researches.md`, an ID prefix that is unique in the file, and instructions), the files to read, and a context note (or none); only `shade-kit-research` writes the research sections.
- Every kit skill that ends (end of its work, a "no", or a refused start) loads `shade-kit-next-steps` for its closing message and passes it why it ends and the warnings of its CLI calls; it writes no next steps of its own.
- Every kit skill that ends (end of its work, a "no", or a refused start) loads `shade-kit-next-steps` for its closing message and passes it why it ends and the warnings of its CLI calls; it writes no next steps of its own. A recommendation in its own report names a skill only when the closing message does not list it (06-9).
- Skill texts have no automated tests. A changed skill is checked by a review by hand and by scenario runs: a subagent loads the skill, follows it with canned CLI envelopes, and records the commands it would run and its output. skill-creator's `quick_validate.py` checks the frontmatter, but not the content of `metadata`.

## Workflow
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`, 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`).
- **Profiles** (`Workflow/Profiles/`): a `WorkflowProfile` is a name and an ordered list of `WorkflowPhase` (name, phase skill, general skills, `CanReopen`, default `true`, `CanContinue`, 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).
- `new` cannot be continued in any built-in profile (`CanContinue = false`, default `true`): `phase next` returns no `continue` step for it, because calling `/shade-kit-new` again creates another feature. **Decided** on 2026-11-13 ([06-9](06-9-skill-skeleton-alignment.md)). **Implemented** (`WorkflowPhase.CanContinue`, `PhaseEngine.GetNext`).
- 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).
Expand Down Expand Up @@ -146,7 +147,7 @@ Returns the possible next steps of the current feature, so `shade-kit-next-phase
| Field | Content |
|---|---|
| `current` | `{ featureId, phase, state, status }`. For a `done` feature every other field is `null`. |
| `continue` | `{ phase, skill }` of the current phase when it is `in-progress`. |
| `continue` | `{ phase, skill }` of the current phase when it is `in-progress` and can be continued; `null` in `new`, whose skill would create another feature (`WorkflowPhase.CanContinue`, 06-9). |
| `pending` | `{ phase, gate: { approval, checklist }, skill }` of the target phase when the current phase is `awaiting-approval`. |
| `forward` | `{ phase, gate, skill }` of the next phase when the current phase is `in-progress` and not the last phase. |
| `reopen` | When the current phase is `in-progress`: list of `{ phase, skill }` of the earlier phases that can be reopened, in profile order; `[]` if there is none (for example in `new`). A reopen always needs an approval. |
Expand Down Expand Up @@ -215,7 +216,7 @@ Every criterion is **Implemented**. The tests that prove it carry `[Trait("Requi
- **FP04-AC11** `phase start <current>` while the current phase is `in-progress` leaves `feature.json` byte-for-byte unchanged and returns "already in progress" without a gate. Proven by `PhaseEngineStartTests`, `PhaseWorkflowStartTests`, `PhaseStartCommandTests`, `PhaseCommandsEndToEndTests`.
- **FP04-AC12** `phase start <next>` while the transition to `<next>` is already pending returns the same gate again and adds no `history` entry. Proven by `PhaseEngineStartTests`, `PhaseWorkflowStartTests`, `PhaseStartCommandTests`, `PhaseCommandsEndToEndTests`.
- **FP04-AC13** `phase start <current>` while the transition away from `<current>` is pending leaves `feature.json` unchanged and returns the pending transition without a gate. Proven by `PhaseEngineStartTests`, `PhaseWorkflowStartTests`, `PhaseCommandsEndToEndTests`.
- **FP04-AC14** `phase next --json` returns `continue`, `forward`, and `reopen` for a phase `in-progress`, `pending` for a phase `awaiting-approval`, no `forward` in the last phase, and only `current` for a `done` feature; `feature.json` is unchanged. Proven by `PhaseEngineNextTests`, `PhaseWorkflowReadTests`, `PhaseNextCommandTests`, `PhaseCommandsEndToEndTests`.
- **FP04-AC14** `phase next --json` returns `continue` (except in `new`, 06-9), `forward`, and `reopen` for a phase `in-progress`, `pending` for a phase `awaiting-approval`, no `forward` in the last phase, and only `current` for a `done` feature; `feature.json` is unchanged. Proven by `PhaseEngineNextTests`, `PhaseWorkflowReadTests`, `PhaseNextCommandTests`, `PhaseCommandsEndToEndTests`.

## Open points

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Status as of 2026-11-06. There are no automated tests of the skill texts (skill

- **FP06-2-AC1** Every skill under `skills/` has `metadata.version` in its frontmatter, and all skills have the same SemVer value. **Implemented**: all 17 skills carry `metadata.version: 0.7.0`. Proven by a one-off check that all values are equal, are strings, and are a plain `x.y.z`; no automated test, by the rule of this package. Skill-creator's `quick_validate.py` (17 of 17 valid) shows that the frontmatter stays valid; it does not read `metadata`.
- **FP06-2-AC2** The result of the visibility check for Claude Code is recorded in this package with the date and how it was checked. **Implemented**: recorded under Frontmatter visibility (2026-11-06, Claude Code 2.1.318).
- **FP06-2-AC3** If the check finds that the model does not see the frontmatter, every skill that calls `version --expect` states the same version in the text of its handshake step. Rule and wording **Decided** on 2026-11-06 (Frontmatter visibility). `shade-kit-phase-entry` (06-5) applies it since 2026-11-10 and `shade-kit-next-phase` (06-6) since 2026-11-11 (`--expect 0.7.0` in the text of their handshake steps); the other skeletons still call `shade-kit version --json` without it until 06-9 writes their handshake steps.
- **FP06-2-AC3** If the check finds that the model does not see the frontmatter, every skill that calls `version --expect` states the same version in the text of its handshake step. Rule and wording **Decided** on 2026-11-06 (Frontmatter visibility). `shade-kit-phase-entry` (06-5) applies it since 2026-11-10 and `shade-kit-next-phase` (06-6) since 2026-11-11 (`--expect 0.7.0` in the text of their handshake steps); `new`, `discuss`, and `drop` (06-9) since 2026-11-13. Every skill that calls `version --expect` now states the version in the text of its handshake step.

## Open points

Expand Down
2 changes: 1 addition & 1 deletion docs/feature-packages/06-3-next-steps-skill.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

| | |
|---|---|
| Status | Draft, 2026-11-04 (split from package 06), updated 2026-11-08 (implementation: `skills/shade-kit-next-steps/SKILL.md`; the steps of a pending transition and of a `done` feature, the refusal table keyed by error code, a missing `shade-kit`, a failing `phase next`, repeated warnings, the closing line of a refusal), 2026-11-11 (06-6: a `phase next` result passed by the calling skill replaces the skill's own call, stated once in flow step 3). AC1 to AC4 implemented; loading the skill from other skills follows in 06-5, 06-6, and 06-9. |
| Status | Draft, 2026-11-04 (split from package 06), updated 2026-11-08 (implementation: `skills/shade-kit-next-steps/SKILL.md`; the steps of a pending transition and of a `done` feature, the refusal table keyed by error code, a missing `shade-kit`, a failing `phase next`, repeated warnings, the closing line of a refusal), 2026-11-11 (06-6: a `phase next` result passed by the calling skill replaces the skill's own call, stated once in flow step 3). 2026-11-13 (06-9: `continue` is `null` in `new`, flow step 3). AC1 to AC4 implemented; loaded by 06-5, 06-6, and, since 2026-11-13, by every phase skill and by `new`, `discuss`, and `drop` (06-9). |
| Source | [06 Skill foundation](06-skill-foundation.md) (next-steps message), [phase start analysis](../../research/shade-kit-phase-start-analysis.md) |
| Kind | Skill (new general skill) |
| Depends on | 06-2 |
Expand Down
3 changes: 1 addition & 2 deletions docs/feature-packages/06-5-phase-entry-skill.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

| | |
|---|---|
| Status | Implemented (AC1 to AC9), 2026-11-10: `skills/shade-kit-phase-entry/SKILL.md`. Loading the skill from the phase skills follows in 06-9. |
| Status | Implemented (AC1 to AC9), 2026-11-10: `skills/shade-kit-phase-entry/SKILL.md`. Since 2026-11-13 (06-9) the eight phase skills load it as their first step, and step 5 says that the phase skill loads the general skills in the steps that use them. |
| Source | [06 Skill foundation](06-skill-foundation.md) (version handshake, entry protocol), [shade-kit-skills.md](../../research/shade-kit-skills.md), [phase start analysis](../../research/shade-kit-phase-start-analysis.md) |
| Kind | Skill (new general skill) |
| Depends on | 06-1, 06-3, 06-4 |
Expand Down Expand Up @@ -113,4 +113,3 @@ Five checks run in every scenario: the first command is the handshake with `--ex

- The defaults of the implementation marked **Proposed** above, among them the keep-pending option after a passed check and the return format that 06-9 builds on.
- No scenario run for a missing `shade-kit`, for a gate check `error` (approval on or off), for `transition-pending`, or for a failing `phase approve` or `phase reject`; the text covers each case.
- The phase skeletons still run their own entry step until 06-9 makes them load this skill.
2 changes: 1 addition & 1 deletion docs/feature-packages/06-6-next-phase-skill.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

| | |
|---|---|
| Status | Implemented (AC1 to AC5), 2026-11-11: `skills/shade-kit-next-phase/SKILL.md`. Draft of 2026-11-04 (split from package 06). |
| Status | Implemented (AC1 to AC5), 2026-11-11: `skills/shade-kit-next-phase/SKILL.md`. Draft of 2026-11-04 (split from package 06). Updated 2026-11-13 (06-9): the reference table says that `continue` is `null` in `new`. |
| Source | [06 Skill foundation](06-skill-foundation.md) (`shade-kit-next-phase`), [phase start analysis](../../research/shade-kit-phase-start-analysis.md) |
| Kind | Skill (skeleton worked out) |
| Depends on | 06-1, 06-3 |
Expand Down
Loading
Loading