@printpractical/cruze 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -5
- package/dist/adapters/inbound/cli/cli_context.js +2 -0
- package/dist/adapters/inbound/cli/commands/code.js +2 -1
- package/dist/adapters/inbound/cli/commands/journal.js +1 -1
- package/dist/adapters/inbound/cli/commands/show.js +32 -0
- package/dist/adapters/inbound/cli/commands/status.js +19 -3
- package/dist/adapters/inbound/cli/commands.js +3 -1
- package/dist/adapters/outbound/git_repository.js +40 -7
- package/dist/adapters/outbound/project_root.js +13 -0
- package/dist/app/use_cases/approve_artifact.js +19 -1
- package/dist/app/use_cases/check_code.js +10 -3
- package/dist/app/use_cases/journal_events.js +8 -5
- package/dist/app/use_cases/project_status.js +4 -1
- package/dist/app/use_cases/show_scope.js +37 -0
- package/dist/domain/check/budget_text.js +61 -0
- package/dist/domain/check/check_source.js +7 -4
- package/dist/domain/config.js +23 -1
- package/dist/domain/edits/agents_file.js +6 -1
- package/dist/domain/journal.js +13 -2
- package/dist/domain/project/scope_view.js +134 -0
- package/dist/domain/status/next_step.js +25 -2
- package/dist/domain/status/verification.js +12 -0
- package/dist/domain/status/work_status.js +13 -2
- package/dist/domain/validation/element_rules.js +5 -0
- package/dist/domain/validation/plan_rules.js +1 -1
- package/dist/domain/validation/size_rules.js +14 -5
- package/dist/domain/validation/work_item_rules.js +25 -3
- package/dist/domain/versions/rule_versions.js +1 -0
- package/dist/main.js +14 -4
- package/package.json +1 -1
- package/skills/architect/SKILL.md +6 -1
- package/skills/architect/feature.md +1 -1
- package/skills/architect/walkthrough.md +7 -4
- package/skills/build/SKILL.md +10 -8
- package/skills/dependency-approval/SKILL.md +8 -1
- package/skills/envision/SKILL.md +2 -0
- package/skills/envision/feature.md +1 -1
- package/skills/explore/SKILL.md +1 -1
- package/skills/formats/reference/architecture.md +1 -1
- package/skills/formats/reference/config.md +13 -4
- package/skills/formats/reference/specs.md +1 -1
- package/skills/formats/reference/work-items.md +1 -1
- package/skills/grilling/SKILL.md +19 -7
- package/skills/grilling/illustrating.md +37 -0
- package/skills/hexagonal-design/SKILL.md +2 -1
- package/skills/hexagonal-design/languages/rust.md +2 -1
- package/skills/improve/SKILL.md +3 -3
- package/skills/land/SKILL.md +2 -2
- package/skills/next/SKILL.md +1 -1
- package/skills/plan/SKILL.md +3 -3
- package/skills/plan/tasks.md +9 -5
- package/skills/realign/SKILL.md +2 -2
- package/skills/realign/notes/0.0.8.md +97 -0
- package/skills/realign/notes/0.0.9.md +59 -0
- package/skills/realign/notes.md +2 -0
- package/skills/research/SKILL.md +2 -1
- package/skills/rethink/SKILL.md +3 -3
- package/skills/rethink/levels.md +2 -2
- package/skills/roadmap/SKILL.md +2 -0
- package/skills/roles/SKILL.md +8 -10
- package/skills/roles/code-reviewer.md +10 -9
- package/skills/roles/design-reviewer.md +22 -12
- package/skills/roles/surveyor.md +1 -1
- package/skills/roles/verifier.md +8 -5
- package/skills/triage/SKILL.md +2 -0
- package/skills/verify/SKILL.md +6 -4
- package/src/adapters/inbound/cli/cli_context.ts +2 -0
- package/src/adapters/inbound/cli/commands/code.ts +2 -1
- package/src/adapters/inbound/cli/commands/journal.ts +1 -1
- package/src/adapters/inbound/cli/commands/show.ts +32 -0
- package/src/adapters/inbound/cli/commands/status.ts +19 -3
- package/src/adapters/inbound/cli/commands.ts +3 -1
- package/src/adapters/outbound/git_repository.ts +40 -7
- package/src/adapters/outbound/project_root.ts +13 -0
- package/src/app/use_cases/approve_artifact.ts +19 -1
- package/src/app/use_cases/check_code.ts +10 -3
- package/src/app/use_cases/journal_events.ts +8 -5
- package/src/app/use_cases/project_status.ts +4 -1
- package/src/app/use_cases/show_scope.ts +37 -0
- package/src/domain/check/budget_text.ts +61 -0
- package/src/domain/check/check_source.ts +7 -4
- package/src/domain/config.ts +23 -1
- package/src/domain/edits/agents_file.ts +6 -1
- package/src/domain/journal.ts +13 -2
- package/src/domain/project/scope_view.ts +134 -0
- package/src/domain/status/next_step.ts +25 -2
- package/src/domain/status/verification.ts +12 -0
- package/src/domain/status/work_status.ts +13 -2
- package/src/domain/validation/element_rules.ts +5 -0
- package/src/domain/validation/plan_rules.ts +1 -1
- package/src/domain/validation/size_rules.ts +14 -5
- package/src/domain/validation/work_item_rules.ts +25 -3
- package/src/domain/versions/rule_versions.ts +1 -0
- package/src/main.ts +14 -4
- package/templates/init/AGENTS.md +1 -1
- package/templates/init/config.yaml +5 -4
|
@@ -13,8 +13,8 @@ source: ["src/**/*.rs"]
|
|
|
13
13
|
tests: ["src/**/*.rs", "tests/**/*.rs"]
|
|
14
14
|
|
|
15
15
|
check:
|
|
16
|
-
max_lines:
|
|
17
|
-
max_types:
|
|
16
|
+
max_lines: 600
|
|
17
|
+
max_types: 12
|
|
18
18
|
exceptions:
|
|
19
19
|
- path: src/cli/args.rs
|
|
20
20
|
reason: the clap derive struct lists every flag in one place
|
|
@@ -33,6 +33,13 @@ changes:
|
|
|
33
33
|
min_builds: 3
|
|
34
34
|
max_scenarios: 30
|
|
35
35
|
max_tasks: 25
|
|
36
|
+
exceptions:
|
|
37
|
+
- item: 2026-09-25-open-console/02-ssh-hops
|
|
38
|
+
reason: every scenario runs through one reconcile, which can't be split without building it twice
|
|
39
|
+
|
|
40
|
+
references:
|
|
41
|
+
- path: third_party/rfc4254.txt
|
|
42
|
+
use: the SSH connection protocol every hop speaks; channels and their failures must follow it
|
|
36
43
|
|
|
37
44
|
layers:
|
|
38
45
|
- name: inventory-domain
|
|
@@ -52,9 +59,10 @@ layers:
|
|
|
52
59
|
| `tracker` | Where work items live. `markdown` is the only value in V1. |
|
|
53
60
|
| `source` | Globs of the source files `cruze check` inspects. |
|
|
54
61
|
| `tests` | Globs of the files `cruze trace` searches for scenario IDs. |
|
|
55
|
-
| `check.max_lines` | Line budget per source file. Test files outside `source` have no budget. |
|
|
56
|
-
| `check.max_types` | Budget of top-level types per source file. |
|
|
62
|
+
| `check.max_lines` | Line budget per source file, a backstop against a file that has outgrown one responsibility. `cruze init` sets `600`. Test files outside `source` have no budget, and a Rust file's `#[cfg(test)]` modules don't count. |
|
|
63
|
+
| `check.max_types` | Budget of top-level types per source file. `cruze init` sets `12`. |
|
|
57
64
|
| `check.exceptions` | Files allowed past a budget, or Rust test files allowed under `src/` (`test-placement`), each with a `path` and a `reason`. `realign` adds entries whose reason ends `scheduled in <ref>`, and landing that change removes them. |
|
|
65
|
+
| `references` | External documents the design must comply with, such as a protocol specification or a standard, each with its `path` in the repository and its `use`: what it governs. Optional. `cruze show` lists them, and architect, plan, build and the reviewers read the parts their scope relies on and cite them, such as `RFC 4254 §5.2`, in the design. |
|
|
58
66
|
| `layers` | Each layer has a `name`, the `paths` it covers, and `may_import`, the layers it may depend on. |
|
|
59
67
|
| `commands` | The project's commands by name, such as `test` or `run`. The walking-skeleton change fills them in, and `cruze land` copies them into the Commands section of `AGENTS.md`. When the suite has a slow tier, such as UI, device or end-to-end tests, `test` runs only the fast tier and `test_full` runs everything. The full suite is `test_full` when it is set, and `test` otherwise. |
|
|
60
68
|
| `review.command` | The program and arguments `cruze review` runs to start an agent in a fresh context, with the prompt on standard input. Optional. `cruze init` sets it for Claude Code to run in print mode, allowed to read the project and run `git diff`, `git log`, `git show` and `cruze`. The verifier runs the system, so add the project's build and run commands. When it is unset, or its program isn't installed, `cruze review` hands the role's prompt back to the calling agent to run in a helper. |
|
|
@@ -62,6 +70,7 @@ layers:
|
|
|
62
70
|
| `changes.min_builds` | A feature's change that builds fewer elements than this gets a `change-too-small` warning: merge it into the change it continues. Default `3`. |
|
|
63
71
|
| `changes.max_scenarios` | A change that delivers more scenarios than this gets a `change-too-large` warning: split it. Default `30`. |
|
|
64
72
|
| `changes.max_tasks` | A plan with more tasks than this gets a `plan-too-large` warning. Default `25`. |
|
|
73
|
+
| `changes.exceptions` | Features and changes the user accepted outside the band, each with the `item` (a feature's ID, `<feature>/<change>`, or a standalone change's ID) and the `reason`. The item's size warning stops. `cruze approve` refuses an item whose size warning still stands (`size-unaccepted`) until it is listed here or split. |
|
|
65
74
|
|
|
66
75
|
Rules for layers:
|
|
67
76
|
|
|
@@ -60,6 +60,6 @@ The full new requirement text.
|
|
|
60
60
|
|
|
61
61
|
- `ADDED CAPABILITY` creates a new spec file, with its title and purpose paragraph. It is only needed for a capability that has no file yet.
|
|
62
62
|
- `ADDED` introduces a new requirement with all its scenarios.
|
|
63
|
-
- `MODIFIED` replaces a requirement's whole block, including every scenario it keeps. A scenario left out is removed.
|
|
63
|
+
- `MODIFIED` replaces a requirement's whole block, including every scenario it keeps. A scenario left out is removed, so no part of the work may cite it by ID (`cites-dropped`); describe it in words.
|
|
64
64
|
- `REMOVED` retires a requirement and its scenarios, and needs a `Reason` and a `Migration`.
|
|
65
65
|
- `land` shifts heading levels to fit the spec file and keeps the managed status of scenarios that were already built.
|
|
@@ -35,7 +35,7 @@ Templates: [../templates/feature.md](../templates/feature.md), [../templates/cha
|
|
|
35
35
|
|
|
36
36
|
A standalone change adds `## Intent`, `## Adopt or build`, `## Spec delta` and `## Architecture delta` before its `## Scope`, in the same format as a feature's. Its scope covers every ID in its own deltas, plus any `planned` elements from the living docs that it builds.
|
|
37
37
|
|
|
38
|
-
A feature is designed in two steps. Feature-scope `envision` writes the intent, settled decisions and spec delta, and leaves `## Architecture delta` as `None.` and the Changes table empty. `architect` writes the architecture delta and the changes. Until the Changes table has a row, `cruze validate` reports the feature as `not-designed` (a warning), skips the coverage rules, and `cruze approve` refuses it. A feature of more than 6 changes gets a `feature-size` warning: split it, because one design review can't hold it. A change outside the size band in `changes:` of `.cruze/config.yaml` gets `change-too-small` (it builds fewer than 3 elements, in a feature of several changes) or `change-too-large` (it delivers more than 30 scenarios), and a plan of more than 25 tasks gets `plan-too-large`.
|
|
38
|
+
A feature is designed in two steps. Feature-scope `envision` writes the intent, settled decisions and spec delta, and leaves `## Architecture delta` as `None.` and the Changes table empty. `architect` writes the architecture delta and the changes. Until the Changes table has a row, `cruze validate` reports the feature as `not-designed` (a warning), skips the coverage rules, and `cruze approve` refuses it. A feature of more than 6 changes gets a `feature-size` warning: split it, because one design review can't hold it. A change outside the size band in `changes:` of `.cruze/config.yaml` gets `change-too-small` (it builds fewer than 3 elements, in a feature of several changes) or `change-too-large` (it delivers more than 30 scenarios), and a plan of more than 25 tasks gets `plan-too-large`. `cruze approve` refuses an item with one of these warnings standing (`size-unaccepted`) until the work is split or the user's acceptance is listed under `changes.exceptions`.
|
|
39
39
|
|
|
40
40
|
`architect` writes a standalone change's design sections and its scope, and leaves the test plan table empty and the tasks section blank. Until `plan` fills them, `cruze validate` reports the change as `not-planned` (a warning), skips the task and test plan rules, and `cruze approve` refuses it.
|
|
41
41
|
|
package/skills/grilling/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cruze-grilling
|
|
3
|
-
description: How to interview the user until design decisions are settled. Questions go in rounds over a tree of decisions, facts are looked up rather than asked, each question carries a recommendation, and challenges the user overrides are recorded. Use when a design step needs decisions from the user, when shaping an idea, vision, feature, architecture or plan with them, when the user steers toward something that breaks a rule, or when the user asks to be grilled or to stress-test a plan.
|
|
3
|
+
description: How to interview the user until design decisions are settled. Questions go in rounds over a tree of decisions, facts are looked up rather than asked, each question carries a recommendation and shows what each option looks like, and challenges the user overrides are recorded. Use when a design step needs decisions from the user, when shaping an idea, vision, feature, architecture or plan with them, when the user steers toward something that breaks a rule, or when the user asks to be grilled or to stress-test a plan, and when showing the user review findings or a design to decide on.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Grilling
|
|
@@ -12,25 +12,37 @@ Interview the user until you both understand the design the same way. Decisions
|
|
|
12
12
|
1. List the open decisions this step must settle, as a tree in which each decision hangs off the ones it depends on. Take them from the sections of the document the step writes and from what the user has already said. Done when every section the step writes has its decisions listed.
|
|
13
13
|
2. Settle the facts yourself. Anything the repository, the living docs, a `cruze` command or a primary source can answer is a fact, so look it up rather than asking. Where the agent can run a helper in parallel, send it to look while you ask about everything that doesn't depend on the answer.
|
|
14
14
|
3. Find the frontier: every open decision whose prerequisites are settled. A question that depends on another open question waits for a later round.
|
|
15
|
-
4. Ask the frontier as one round, in the format below. Every question carries your recommended answer and the reason for it.
|
|
15
|
+
4. Ask the frontier as one round, in the format below. Every question shows what each option looks like and carries your recommended answer and the reason for it. Read [illustrating.md](illustrating.md) before the first round.
|
|
16
16
|
5. Wait for the answers. Record each settled decision as described under Recording, then recompute the frontier.
|
|
17
17
|
6. Repeat until the frontier is empty: every branch visited, and nothing silently assumed.
|
|
18
|
-
7. Write the sections the step produces from the settled decisions, then summarize them and ask the user to confirm that they match their understanding. Done when the user confirms. Decisions and glossary terms are recorded as they settle, and nothing is approved before the confirmation.
|
|
18
|
+
7. Write the sections the step produces from the settled decisions, then summarize them, illustrated as [illustrating.md](illustrating.md) says, and ask the user to confirm that they match their understanding. Done when the user confirms. Decisions and glossary terms are recorded as they settle, and nothing is approved before the confirmation.
|
|
19
19
|
|
|
20
20
|
## A round
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
````markdown
|
|
23
|
+
Where we are: architect for 2026-09-25-open-console, round 2. Settled: D1 (a console session may cross jump hosts), D2 (credentials come from the vault).
|
|
24
|
+
|
|
23
25
|
**Q4. Where the jump-host list lives**
|
|
24
26
|
Per device in the device config, or as named hosts that devices reference. Named hosts avoid repeating a host's address and credentials across devices, but add a second lookup.
|
|
27
|
+
|
|
28
|
+
```yaml
|
|
29
|
+
# A: per device # B: named hosts (recommended)
|
|
30
|
+
devices: jump_hosts:
|
|
31
|
+
core-sw-01: lab-gw: { address: 10.0.0.5 }
|
|
32
|
+
jump: { address: 10.0.0.5 } devices:
|
|
33
|
+
core-sw-02: core-sw-01: { jump: lab-gw }
|
|
34
|
+
jump: { address: 10.0.0.5 } core-sw-02: { jump: lab-gw }
|
|
35
|
+
```
|
|
36
|
+
|
|
25
37
|
Recommended: named hosts, because the lab config already shares two jump hosts across 30 devices.
|
|
26
38
|
|
|
27
39
|
**Q5. What a refused second hop reports**
|
|
28
40
|
...
|
|
29
|
-
|
|
41
|
+
````
|
|
30
42
|
|
|
31
43
|
- Number questions across the whole session, not per round, so an answer such as "Q7: yes" is never ambiguous.
|
|
32
|
-
- Keep a round to what the user can answer in one reply, about 3 to
|
|
33
|
-
- Ask about behaviour and trade-offs in the user's terms and the glossary's words, not about implementation mechanics.
|
|
44
|
+
- Keep a round to what the user can answer in one reply, about 3 to 5 questions. When the frontier is bigger, ask first the questions that others depend on.
|
|
45
|
+
- Ask about behaviour and trade-offs in the user's terms and the glossary's words, not about implementation mechanics. Where the trade-off is in the code's shape, show the shape.
|
|
34
46
|
- When the user answers "you decide" or "I don't know", take your recommendation and record it with "(recommended; the user deferred)".
|
|
35
47
|
- When an answer contradicts an earlier decision, point to that decision and ask which one stands.
|
|
36
48
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Illustrating a question
|
|
2
|
+
|
|
3
|
+
The user decides from what they can picture. A question about a port's errors or a module's place is hard to answer from words alone, and the user is often coming back from other work. So every question, review exception and confirmation shows what each option looks like, and reads on its own without the conversation before it.
|
|
4
|
+
|
|
5
|
+
## Reading cold
|
|
6
|
+
|
|
7
|
+
- Open each round, and each message of review exceptions, with one line saying where things stand: the work item, the step, and the earlier decisions this round builds on, such as `Where we are: architect for 2026-10-08-subscriptions, round 3. Settled: D2 (one stream per session), D4 (events carry revisions).`
|
|
8
|
+
- Say what an ID means in plain words the first time a message uses it, such as `SCN-configuration.reject-taken-priority (a second set asking for a priority already taken is refused)`.
|
|
9
|
+
- Each question says what it decides and why it matters now, without pointing back to an earlier message.
|
|
10
|
+
|
|
11
|
+
## Choosing the illustration
|
|
12
|
+
|
|
13
|
+
Show each option, side by side, with the form that fits what the question decides:
|
|
14
|
+
|
|
15
|
+
| The question decides | Show |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| What a user does or sees | The command they type and its exact output, or a plain-text sketch of the screen, using the scenario's concrete values |
|
|
18
|
+
| A port, a use case's input and errors, or a public API | A code sketch in the project's language: the types and signatures, and the call a caller writes |
|
|
19
|
+
| Where something lives: contexts, modules, dependency direction | A box-and-arrow diagram, or the directory tree with the files the option adds |
|
|
20
|
+
| An order of steps, or what happens on failure | A numbered sequence or a plain-text sequence diagram, with the failure branch |
|
|
21
|
+
| States and what moves between them | The states with their transitions, one per line |
|
|
22
|
+
| A stored format or a config file | A sample of the file |
|
|
23
|
+
| A dependency | The code with it and the code without it |
|
|
24
|
+
|
|
25
|
+
Leave out the illustration only when the question is about a name, a number or the wording of a sentence, where it would repeat the words.
|
|
26
|
+
|
|
27
|
+
## Writing it
|
|
28
|
+
|
|
29
|
+
- Use the design's names and the glossary's words, and the values of a real scenario, so the user sees this project's code, not a generic example.
|
|
30
|
+
- A code sketch shows shape: types, signatures, the error variants, and one call site. Leave bodies out, writing `...` or the language's placeholder. Keep each option to about 15 lines.
|
|
31
|
+
- Draw diagrams in plain text, so they read in a terminal, where Mermaid shows only as source. The documents keep their Mermaid diagrams; the illustration is for the conversation.
|
|
32
|
+
- At envision, show behaviour only: interactions and screens, never code, since envision keeps implementation out.
|
|
33
|
+
- Mark your recommended option in the illustration itself, and show the failure case when the options differ in how they fail.
|
|
34
|
+
|
|
35
|
+
## After the answer
|
|
36
|
+
|
|
37
|
+
A shape the user chose from a sketch is part of the decision. Write it into the document in that document's format: the port's `Operations`, the entity's facts, the module's `Path`, or the scenario's values. Build follows the documents, so the code comes out as the user saw it.
|
|
@@ -89,7 +89,8 @@ Layers are dependency boundaries, not runtime hops. A port can be a plain functi
|
|
|
89
89
|
## Many small modules
|
|
90
90
|
|
|
91
91
|
- Give each responsibility its own module, grouped by domain concept, with the hexagonal roles inside. A context's core is usually one module, with each port beside the use cases that define it, and grows submodules by concept, not by layer. A file may hold a few closely related types.
|
|
92
|
-
- When a file
|
|
92
|
+
- When a file gains a second responsibility, split it into a submodule named for what it owns. Never split a file by length: one that grows with its one responsibility stays whole.
|
|
93
|
+
- The budgets (`check:` in `.cruze/config.yaml`, enforced by `cruze check`) are a backstop against a file that has outgrown one responsibility, never a shape to write code to. Write the code as you would with no budget: no type alias, string where an error type belongs, merged types or function moved away from its owner to stay under a limit. When a file over budget holds one responsibility, such as the related types of one grammar, list it under `check.exceptions` with that reason.
|
|
93
94
|
- Entry-point and namespace files, such as `main`, `lib.rs`, `mod.rs` and `index.ts`, hold only wiring and declarations.
|
|
94
95
|
- Don't create generic modules such as `utils`, `helpers`, `common`, `services`, `models`, `types` or `manager`. Shared behaviour belongs with the concept that owns it.
|
|
95
96
|
- Duplication is semantic. Two implementations of one rule are duplication even when the text differs, so consolidate them in the owner, not in a helper.
|
|
@@ -40,6 +40,7 @@ These add to the hexagonal design rules for Rust projects. The module map decide
|
|
|
40
40
|
- No `unsafe` unless the user approves it or an unavoidable low-level boundary needs it, with a `// SAFETY:` comment giving the reason.
|
|
41
41
|
- Format with `cargo fmt`, lint with `cargo clippy -- -D warnings`, and test with `cargo test`.
|
|
42
42
|
- Behaviour, contract and smoke tests live in the crate's `tests/` directory and reach the code through the library's public API. Domain tests sit in a `#[cfg(test)] mod tests` beside the code and need no fakes.
|
|
43
|
-
-
|
|
43
|
+
- `cruze check` leaves a file's `#[cfg(test)]` modules out of its budgets, so domain tests stay inline however long they grow. Never move them to `src/<module>/tests.rs` or `src/<module>/tests/`: `cruze check` reports those as `test-placement`.
|
|
44
|
+
- Name test files in `tests/` for what they cover: `tests/<module>.rs`, or `tests/<module>/main.rs` declaring one file per topic, such as `tests/generation/add_generation.rs`. Cargo builds each `tests/*.rs` and each `tests/*/main.rs` as a test binary, and nothing deeper.
|
|
44
45
|
- Group integration tests into a few binaries by area, `tests/<area>/main.rs` with one module per topic, since every binary links the crate again.
|
|
45
46
|
- Share fakes, fixtures and harnesses within a crate through `tests/support/mod.rs`, which each test binary declares with `mod support;`. In a workspace, put what several crates' tests share in one dev-only crate, such as `<project>-test-support`, listed under `[dev-dependencies]`. Never share them with `#[path]` includes.
|
package/skills/improve/SKILL.md
CHANGED
|
@@ -22,14 +22,14 @@ Realign is different. It applies what each release's notes expect of existing co
|
|
|
22
22
|
5. **List the candidates** in one message, numbered, merging candidates that share a cause across modules. For each, give:
|
|
23
23
|
- the problem in one sentence, and its evidence;
|
|
24
24
|
- the standard it departs from, or the friction it causes;
|
|
25
|
-
- the target shape;
|
|
25
|
+
- the target shape, sketched beside today's as `.agents/skills/cruze-grilling/illustrating.md` says;
|
|
26
26
|
- its size in prefactor changes, and its risk.
|
|
27
27
|
|
|
28
28
|
Recommend which to take and why, then ask the user to pick any or all of them.
|
|
29
29
|
6. **Record each decision:** `cruze journal add disposition --set review=improve --set finding="<module or area>: <summary>" --set disposition=<fixed|waived|deferred> --set reason="<reason>" --set decided=user`. A picked candidate is `fixed`. The rest are `waived`, with the user's reason, or `deferred`. A recorded waiver is never raised again.
|
|
30
30
|
7. **Design the target** for every picked candidate together, as a rethink at architecture level, following `.agents/skills/cruze-rethink/SKILL.md` with `kind=discovery` and `found_by=improve`:
|
|
31
31
|
- Amend `docs/architecture.md`: the module map and layers, the moved elements' `Module` and `File` facts, the `layers:` in `.cruze/config.yaml`, and a `D<n>` or an ADR for each structural decision. Change no requirement, scenario or port contract unless the user decided that in step 5.
|
|
32
|
-
- When a candidate changes an interface, such as a port or a module's public API, sketch two or three shapes, compare them, and recommend one before writing it.
|
|
32
|
+
- When a candidate changes an interface, such as a port or a module's public API, sketch two or three shapes as code, compare them, and recommend one before writing it.
|
|
33
33
|
- Before the rethink's walkthrough, run the design review from the roles skill on the diff, with `review=design`.
|
|
34
34
|
- Approve it as the rethink's architecture level says, with `--replan` for each built element that moves.
|
|
35
35
|
8. **Schedule the moves.** Group the replanned elements into prefactor changes, as "A prefactor" in `.agents/skills/cruze-architect/tweak.md` describes, each sized as step 12 of `.agents/skills/cruze-architect/feature.md` says.
|
|
@@ -48,4 +48,4 @@ Done when every candidate has a journaled disposition, the target architecture i
|
|
|
48
48
|
|
|
49
49
|
## Next step
|
|
50
50
|
|
|
51
|
-
`plan` for the first prefactor change. When the user picked nothing, `next`.
|
|
51
|
+
`plan` for the first prefactor change. When the user picked nothing, `next`. Start it in a new session, so its context starts empty.
|
package/skills/land/SKILL.md
CHANGED
|
@@ -24,7 +24,7 @@ Land makes finished work part of the living model. `cruze land` merges the chang
|
|
|
24
24
|
- A `merge-invalid` means the merged docs, or the feature and changes being landed, wouldn't validate, such as a decision citing an ID the change removes. Nothing was written. Stop and run `rethink`.
|
|
25
25
|
5. **Update the changelog.** Under `## [Unreleased]` in `CHANGELOG.md`, add one line per user-visible behaviour the change delivers, in the user's words, under `### Added`, `### Changed` or `### Removed`. Name the behaviour, not the code, including any rule a user can now run into that no scenario covers yet.
|
|
26
26
|
6. **Update the README** when the change altered how someone installs, runs or uses the product. Run every command you add, to check it works.
|
|
27
|
-
7. **Check the pitfalls.** Run `cruze journal list --event disposition
|
|
27
|
+
7. **Check the pitfalls.** Run `cruze journal list --event disposition --all --text | grep -i "<rubric item>"` for each rubric item this change's findings named, and `cruze journal list --event rethink --all` and `cruze journal list --event bug --all`; `--all` includes landed work, which the default leaves out. When findings under the same rubric item with the same root cause, or two defects with the same cause, have now happened twice, add one line under `## Known pitfalls` in `AGENTS.md` saying what to do instead. Keep `AGENTS.md` under one page. When the pitfalls outgrow it, propose to the user a `cruze check` rule or a knowledge-skill change for the oldest ones.
|
|
28
28
|
8. **Commit** the land with a message such as `docs: land <change>`. `cruze land` keeps the Commands and Layout sections of `AGENTS.md` current, from `commands:` in `.cruze/config.yaml` and the built modules; when `commands:` is empty, the Commands section stays as it was.
|
|
29
29
|
9. **Get it onto main.** Follow the project's convention in `AGENTS.md`. When it has none, ask the user whether they want pull requests or direct merges, and add their answer under `## Conventions`, such as "Changes land through pull requests." Open the pull request, or merge. CI must pass before the merge; when the project has no CI runner, run its steps locally with the project's commands.
|
|
30
30
|
|
|
@@ -41,4 +41,4 @@ A fix from `triage` has no change folder, so `cruze land` doesn't run.
|
|
|
41
41
|
|
|
42
42
|
## Next step
|
|
43
43
|
|
|
44
|
-
Once the work is on main, switch to an up-to-date main, run `cruze next` there, and name what it says. Before the merge, `cruze next` on the change's branch can name work that main doesn't hold yet. When a feature just finished and every roadmap item has landed, the next step is `roadmap`, to close the release.
|
|
44
|
+
Once the work is on main, switch to an up-to-date main, run `cruze next` there, and name what it says. Start it in a new session, so its context starts empty. Before the merge, `cruze next` on the change's branch can name work that main doesn't hold yet. When a feature just finished and every roadmap item has landed, the next step is `roadmap`, to close the release.
|
package/skills/next/SKILL.md
CHANGED
|
@@ -11,7 +11,7 @@ Next reads the project's state and says what to do now. The CLI works it out fro
|
|
|
11
11
|
|
|
12
12
|
1. **Ask the CLI.** Run `cruze next` and read its JSON: the step, what it works on, the reason, and any other work that could proceed.
|
|
13
13
|
2. **Add the detail.** Run `cruze status` when the reason mentions approvals, and quote the documents and elements that changed.
|
|
14
|
-
3. **Answer** in three lines or fewer: the step to run, with its target, why it is next, and what else is in flight on other branches. Don't start the step unless the user asks you to.
|
|
14
|
+
3. **Answer** in three lines or fewer: the step to run, with its target, why it is next, and what else is in flight on other branches. Say that the step runs in a new session, so its context starts empty. Don't start the step unless the user asks you to.
|
|
15
15
|
|
|
16
16
|
## What the steps mean
|
|
17
17
|
|
package/skills/plan/SKILL.md
CHANGED
|
@@ -19,14 +19,14 @@ Plan turns one designed change into work an implementer can do without guessing:
|
|
|
19
19
|
- `.agents/skills/cruze-behavioural-testing/SKILL.md`
|
|
20
20
|
- `.agents/skills/cruze-hexagonal-design/SKILL.md`, and its language file when one exists for the project's language
|
|
21
21
|
- `.agents/skills/cruze-formats/reference/work-items.md`
|
|
22
|
-
6. **Read the design it builds.**
|
|
22
|
+
6. **Read the design it builds.** Run `cruze show <ref>` and read its output: the full body of every element in the scope, every scenario it delivers, the settled decisions, the ledger and the references. Read an element it lists as cited only when a task will call it, from the place it names. Don't read `docs/architecture.md` or `feature.md` whole: two projects read a 40k-word architecture about 150 times each.
|
|
23
23
|
7. **Check for overlap.** Run `cruze status --overlap --change <ref>`. For each change on another branch that touches the same elements, tell the user which elements are shared and which change should land first. Record the answer under `## Risks`.
|
|
24
24
|
8. **Write the test plan.** Follow [test-plan.md](test-plan.md). Done when every delivered scenario has a `behaviour` row and every port a built adapter implements has a `contract` row.
|
|
25
25
|
9. **Write the tasks.** Follow [tasks.md](tasks.md). Done when every scope ID is proved by a task and every task line matches the grammar.
|
|
26
26
|
10. **Record decisions and risks.** Put task-level choices you made under `## Settled decisions`. Under `## Risks`, name the riskiest task and how its test catches the failure. Remove every template guide.
|
|
27
27
|
11. **Validate.** Run `cruze validate`. Done when it reports no errors for the change.
|
|
28
28
|
12. **Review the plan.** Commit the plan, then run the review in `.agents/skills/cruze-roles/SKILL.md` with the design reviewer and its plan rubric, `review=plan`, and `--item <ref>`.
|
|
29
|
-
13. **Approve.**
|
|
29
|
+
13. **Approve.** For a feature's change, run `cruze approve <ref> --by-agent` on this branch and quote its result. The plan carries no design of its own, so once its review has closed, with no blocker open and a disposition for every finding, you approve it for the user. A standalone change, such as the walking skeleton or a prefactor, carries its own design, so show the user the plan and ask them to approve it with `cruze approve <ref>`. The approval binds the change to the branch. When it refuses with `plan-review-open`, do what it names. When it refuses with `size-unaccepted`, the plan has more tasks than `changes.max_tasks`: split the change through `rethink` at feature level, or, when the user accepts the size, list the change under `changes.exceptions` in `.cruze/config.yaml` with their reason and approve again. A blocker still open after round 2 goes to the user, and once they decide it, they approve the plan themselves with `cruze approve <ref>`.
|
|
30
30
|
14. **Commit** with a message such as `docs: plan <change>`.
|
|
31
31
|
|
|
32
32
|
## When the plan needs design
|
|
@@ -49,4 +49,4 @@ The walking-skeleton change also makes CI and the project's tooling real. Its pl
|
|
|
49
49
|
|
|
50
50
|
## Next step
|
|
51
51
|
|
|
52
|
-
Show the user the test plan table, the tasks in order and the risks, and say the plan is approved. They can object, and you amend the plan, run its review on the diff, and approve again. Otherwise the next step is `build`, on this branch.
|
|
52
|
+
Show the user the test plan table, the tasks in order and the risks, and say the plan is approved, or, for a standalone change, ask them to approve it. They can object, and you amend the plan, run its review on the diff, and approve again. Otherwise the next step is `build`, on this branch, in a new session so its context starts empty.
|
package/skills/plan/tasks.md
CHANGED
|
@@ -9,8 +9,10 @@ A task is one owner, the files it writes, and the IDs it proves. Build does them
|
|
|
9
9
|
- The composition root comes last.
|
|
10
10
|
- Put fakes just before the first task whose test needs them.
|
|
11
11
|
- Each task's test can fail first and then pass, using only what earlier tasks built.
|
|
12
|
-
-
|
|
12
|
+
- Put each test in the task that builds the behaviour it checks. When an earlier task's code would already pass a later task's test, such as a failure path the earlier task had to handle, move the test into the earlier task.
|
|
13
|
+
- A test that expects a default or empty result, such as no prompt, an empty list, `nil` or `0`, passes against a stub that returns it. Name in the task the break it is first seen failing against, as the wrong behaviour rather than an edit to the code, such as "fails against a model that always shows the prompt". Build may use any break that compiles and turns the same assertion red.
|
|
13
14
|
- When the project's lint rejects unused code, such as `cargo clippy -- -D warnings`, put each new item in the task of its first user, or in a task whose own test uses it. Each task then commits green on its own.
|
|
15
|
+
- An accessor, variant or type arrives in the task whose code first handles, matches or constructs it, never in the task that only tests it. When a later task's `match` would pull in a variant, the variant belongs to that task. Two projects built 13 items in a task other than the planned one.
|
|
14
16
|
3. **Write one line per task:**
|
|
15
17
|
|
|
16
18
|
```markdown
|
|
@@ -19,13 +21,15 @@ A task is one owner, the files it writes, and the IDs it proves. Build does them
|
|
|
19
21
|
```
|
|
20
22
|
|
|
21
23
|
- Owner and paths in backticks. Every path is a file the architecture assigns to that owner, or a test or support file. List the test support files the task extends, such as a shared harness or fixture, so its tests reuse them.
|
|
24
|
+
- When a task adds a module, a file or a dependency, list the file that declares it, such as the crate root or `mod.rs`, the package manifest, or the Xcode project.
|
|
22
25
|
- A task proves the elements it builds, and each scenario whose test goes green in it.
|
|
23
26
|
- A task that only sets up tooling proves the flow or scenario its checks run.
|
|
24
|
-
4. **Find the
|
|
25
|
-
5. **
|
|
26
|
-
|
|
27
|
+
4. **Find the owners.** For each rule, text, format or conversion a task's element applies, such as a message, a path format, a rounding or a name check, search the code and the other tasks for every place that applies it. Give it one owner: when an earlier task's owner already holds it, the later task's line names that file as a callee rather than building the rule again. Done when no rule is written in two places. Two projects wrote 20 rules twice and moved them at code review.
|
|
28
|
+
5. **Find the callers.** For each signature, default or setting a task changes, search the code for every use of it, including tests that start the real binary or read the setting. Add each file that must change to the task. Done when no task will need a file it doesn't list.
|
|
29
|
+
6. **Size each task.** A task writes one owner, with its tests, in one sitting. When an owner would take several steps, such as a use case with many scenarios, split it into tasks that each prove a subset of the scenarios.
|
|
30
|
+
- When a task would give an existing file a second responsibility, name the new file in the task, named for what it owns. Never plan a split by line or type count: a file that grows with its one responsibility stays whole, and when it passes a budget, build lists it under `check.exceptions` as the budget rule in `.agents/skills/cruze-hexagonal-design/SKILL.md` says.
|
|
27
31
|
- The budgets apply to source files, not tests. Split a test file by the behaviour it covers, one use case or port per file, never to meet a budget. Tests that leave a source file go where the hexagonal-design language file you loaded says.
|
|
28
|
-
|
|
32
|
+
7. **Check coverage.**
|
|
29
33
|
- Every `Builds` ID is proved by a task, except a module, which is proved by any task that writes inside its `Path`.
|
|
30
34
|
- Every delivered scenario is proved by at least one task.
|
|
31
35
|
- Done when `cruze validate` reports no `unproved-scope`, `task-format` or `outside-module-map` problems. An `outside-module-map` warning means a task writes a file no module's `Path` covers: add the file to the owning module's `Path` through `rethink`, or move it.
|
package/skills/realign/SKILL.md
CHANGED
|
@@ -15,7 +15,7 @@ Each Cruze release can expect more of a project's code and documents than the la
|
|
|
15
15
|
- `.agents/skills/cruze-hexagonal-design/SKILL.md`, and its language file when one exists for the project's language
|
|
16
16
|
- `.agents/skills/cruze-behavioural-testing/SKILL.md`
|
|
17
17
|
- `.agents/skills/cruze-formats/reference/architecture.md`
|
|
18
|
-
4. **Audit.** Run the auditor role from `.agents/skills/cruze-roles/SKILL.md` on every note with an `Ask`. In a full audit, give it the standards instead, and run one auditor per module in the module map. Check its evidence against the files. Done when every note with an `Ask` has an answer with evidence, and every note with a `Detect` has its findings from the status report.
|
|
18
|
+
4. **Audit.** Run the auditor role from `.agents/skills/cruze-roles/SKILL.md` on every note with an `Ask`. A note whose `Rule` is an item of the design reviewer's rubric is about designs, not code: run the design reviewer instead, on each feature in flight, with that item only, since those designs were reviewed before the item existed. In a full audit, give it the standards instead, and run one auditor per module in the module map. Check its evidence against the files. Done when every note with an `Ask` has an answer with evidence, and every note with a `Detect` has its findings from the status report.
|
|
19
19
|
5. **Decide each finding** with the user, a group at a time, with your recommendation:
|
|
20
20
|
- `fixed`: a prefactor change will fix it.
|
|
21
21
|
- `waived`: the project keeps its own convention, with the reason. For a `check:` finding, list the file under `check.exceptions` with that reason, which keeps CI green. For the rest, the journal holds the waiver.
|
|
@@ -32,4 +32,4 @@ Done when `cruze realign status` reports the code meeting the installed version,
|
|
|
32
32
|
|
|
33
33
|
## Next step
|
|
34
34
|
|
|
35
|
-
`plan` for the first prefactor change. When nothing needed fixing, `next`.
|
|
35
|
+
`plan` for the first prefactor change. When nothing needed fixing, `next`. Start it in a new session, so its context starts empty.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Realign notes: 0.0.8
|
|
2
|
+
|
|
3
|
+
## Existing code
|
|
4
|
+
|
|
5
|
+
### module-path-glob: A module's Path is a directory or a file, never a glob
|
|
6
|
+
- Applies to: existing code
|
|
7
|
+
- Rule: `.agents/skills/cruze-formats/reference/architecture.md`, "Element facts"
|
|
8
|
+
- Detect: validate:module-path-glob
|
|
9
|
+
- Migrate: replace each glob in a `MOD` element's `Path` with the directories it meant, each ending in `/`, or the files, through `rethink` at architecture level.
|
|
10
|
+
|
|
11
|
+
### budget-not-a-shape: No code is bent to fit a file budget
|
|
12
|
+
- Applies to: existing code
|
|
13
|
+
- Rule: `.agents/skills/cruze-hexagonal-design/SKILL.md`, "Many small modules"
|
|
14
|
+
- Ask: is any code shaped to stay under `check.max_lines` or `check.max_types`, such as a type alias, a string where an error type belongs, merged types, a function placed away from its owner, or Rust domain tests moved out of their file only for its length?
|
|
15
|
+
- Migrate: write the code as it would be with no budget. Split a file that then passes its budget along a second responsibility, or list it under `check.exceptions` with the reason it has one. Rust domain tests may move back inline, since their `#[cfg(test)]` modules no longer count.
|
|
16
|
+
|
|
17
|
+
### no-dependency-workarounds: No code works around a dependency or feature nobody asked for
|
|
18
|
+
- Applies to: existing code
|
|
19
|
+
- Rule: `.agents/skills/cruze-dependency-approval/SKILL.md`, "Weighing"
|
|
20
|
+
- Ask: does any code hand-write, shell out for, or use a less idiomatic construct for something a dependency or a feature of an approved dependency does cleanly, where the design or a deviation gives avoiding the dependency as the reason?
|
|
21
|
+
- Migrate: ask the user for the dependency as the dependency-approval skill says, then replace the workaround through `rethink`: at architecture level when the workaround is in an `XC` rule or an import allowlist, at feature level otherwise.
|
|
22
|
+
|
|
23
|
+
### size-exceptions: An accepted size warning is recorded under changes.exceptions
|
|
24
|
+
- Applies to: existing code
|
|
25
|
+
- Rule: `.agents/skills/cruze-formats/reference/config.md`, "changes.exceptions"
|
|
26
|
+
- Ask: does `cruze validate` report a `change-too-small`, `change-too-large`, `plan-too-large` or `feature-size` warning that a `D<n>` line records the user accepting? `cruze approve` now refuses the item until it is listed.
|
|
27
|
+
- Migrate: list each such feature or change under `changes.exceptions` in `.cruze/config.yaml`, as its ref and the decision's reason.
|
|
28
|
+
|
|
29
|
+
## New work only
|
|
30
|
+
|
|
31
|
+
### fresh-session: Every step runs in a new session
|
|
32
|
+
- Applies to: new work only
|
|
33
|
+
- Rule: `.agents/skills/cruze-next/SKILL.md`, "Steps", step 3
|
|
34
|
+
|
|
35
|
+
### show-scope: Plan, build and the roles read the scope through cruze show
|
|
36
|
+
- Applies to: new work only
|
|
37
|
+
- Rule: `.agents/skills/cruze-plan/SKILL.md`, "Steps", step 6
|
|
38
|
+
|
|
39
|
+
### scoped-ledger: The settled ledger is the item's, and journal list leaves landed work out
|
|
40
|
+
- Applies to: new work only
|
|
41
|
+
- Rule: `.agents/skills/cruze-roles/SKILL.md`, "The settled ledger"
|
|
42
|
+
|
|
43
|
+
### round-2-by-agent: Round 2 is checked by the agent
|
|
44
|
+
- Applies to: new work only
|
|
45
|
+
- Rule: `.agents/skills/cruze-roles/SKILL.md`, "Round 2"
|
|
46
|
+
|
|
47
|
+
### verifier-front-doors: The verifier drives the scenarios that have a front door and never idles
|
|
48
|
+
- Applies to: new work only
|
|
49
|
+
- Rule: `.agents/skills/cruze-roles/verifier.md`, "Work", step 3
|
|
50
|
+
|
|
51
|
+
### design-gives-every-value: The design gives every error, limit, timeout, transition and message owner
|
|
52
|
+
- Applies to: new work only
|
|
53
|
+
- Rule: `.agents/skills/cruze-roles/design-reviewer.md`, "Rubric", item 6
|
|
54
|
+
|
|
55
|
+
### one-owner-per-rule: Plan gives each rule one owner, and each item to its first handler's task
|
|
56
|
+
- Applies to: new work only
|
|
57
|
+
- Rule: `.agents/skills/cruze-plan/tasks.md`, steps 2 and 4
|
|
58
|
+
|
|
59
|
+
### deviations-reviewed: The code reviewer reports a deviation that needed a rethink
|
|
60
|
+
- Applies to: new work only
|
|
61
|
+
- Rule: `.agents/skills/cruze-roles/code-reviewer.md`, "Rubric", item 11
|
|
62
|
+
|
|
63
|
+
### depends-on-gate: Building waits for every change a change depends on to land
|
|
64
|
+
- Applies to: new work only
|
|
65
|
+
- Rule: `.agents/skills/cruze-build/SKILL.md`, "Steps", step 1
|
|
66
|
+
|
|
67
|
+
### build-checks-ci: Build runs the same check as verify and CI
|
|
68
|
+
- Applies to: new work only
|
|
69
|
+
- Rule: `.agents/skills/cruze-build/SKILL.md`, "The task loop", step 4
|
|
70
|
+
|
|
71
|
+
### check-in-flight-modules: cruze check knows the modules that work in progress adds
|
|
72
|
+
- Applies to: new work only
|
|
73
|
+
- Rule: `.agents/skills/cruze-build/SKILL.md`, "The task loop", step 4
|
|
74
|
+
|
|
75
|
+
### cites-dropped: Work doesn't cite a scenario its delta drops
|
|
76
|
+
- Applies to: new work only
|
|
77
|
+
- Rule: `.agents/skills/cruze-formats/reference/specs.md`, "Spec delta"
|
|
78
|
+
|
|
79
|
+
### planned-breaks: Plans name a break as the wrong behaviour, and put each test in the task that builds what it checks
|
|
80
|
+
- Applies to: new work only
|
|
81
|
+
- Rule: `.agents/skills/cruze-plan/tasks.md`, step 2
|
|
82
|
+
|
|
83
|
+
### declaring-files: A task lists the file that declares what it adds
|
|
84
|
+
- Applies to: new work only
|
|
85
|
+
- Rule: `.agents/skills/cruze-plan/tasks.md`, step 3
|
|
86
|
+
|
|
87
|
+
### named-dependencies: Every outside name the design uses comes from a dependency the using target declares
|
|
88
|
+
- Applies to: new work only
|
|
89
|
+
- Rule: `.agents/skills/cruze-research/SKILL.md`, "Adopt or build", step 7
|
|
90
|
+
|
|
91
|
+
### nits-are-counts: Review nits get no disposition
|
|
92
|
+
- Applies to: new work only
|
|
93
|
+
- Rule: `.agents/skills/cruze-roles/SKILL.md`, "Running a review"
|
|
94
|
+
|
|
95
|
+
### illustrated-questions: Questions, review exceptions and the walkthrough show what each option looks like
|
|
96
|
+
- Applies to: new work only
|
|
97
|
+
- Rule: `.agents/skills/cruze-grilling/illustrating.md`
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Realign notes: 0.0.9
|
|
2
|
+
|
|
3
|
+
## Existing code
|
|
4
|
+
|
|
5
|
+
### budget-backstop: File budgets are a backstop, and files split by responsibility, never by length
|
|
6
|
+
- Applies to: existing code
|
|
7
|
+
- Rule: `.agents/skills/cruze-hexagonal-design/SKILL.md`, "Many small modules"
|
|
8
|
+
- Ask: does `.cruze/config.yaml` still set the old defaults, `check.max_lines: 250` and `check.max_types: 5`? Is any `check.exceptions` entry, or any split of one owner across files, there only to meet them?
|
|
9
|
+
- Migrate: raise the budgets to `max_lines: 600` and `max_types: 12`, unless the user chose the old ones, and remove each exception whose file is now within budget. A split made only for length, whose files share one responsibility, merges back in a prefactor; waive it when the files read well apart.
|
|
10
|
+
|
|
11
|
+
### flow-control-review: A design says how its work flows, waits and recovers
|
|
12
|
+
- Applies to: existing code
|
|
13
|
+
- Rule: `.agents/skills/cruze-roles/design-reviewer.md`, "Rubric", item 11
|
|
14
|
+
- Ask: for each feature in flight, does its design leave out any check in rubric item 11 that a scenario or an `XC` rule depends on, such as what a sender does when a queue is full, or what happens when a reconnect fails?
|
|
15
|
+
- Migrate: settle each gap through `rethink` at feature level before the feature's next change is planned. Code a landed change built goes to a prefactor.
|
|
16
|
+
|
|
17
|
+
### references: External specifications the design must follow are listed under references
|
|
18
|
+
- Applies to: existing code
|
|
19
|
+
- Rule: `.agents/skills/cruze-formats/reference/config.md`, "references"
|
|
20
|
+
- Ask: does the project rely on an external document it must comply with, such as a protocol specification in the repository, that `references:` in `.cruze/config.yaml` doesn't list?
|
|
21
|
+
- Migrate: list each under `references:` with its path and what it governs, as the user confirms.
|
|
22
|
+
|
|
23
|
+
## New work only
|
|
24
|
+
|
|
25
|
+
### plan-splits-by-responsibility: Plan splits a file for a second responsibility, never for its length
|
|
26
|
+
- Applies to: new work only
|
|
27
|
+
- Rule: `.agents/skills/cruze-plan/tasks.md`, step 6
|
|
28
|
+
|
|
29
|
+
### name-clash-review: The design reviewer checks new names against the ones a caller already reaches
|
|
30
|
+
- Applies to: new work only
|
|
31
|
+
- Rule: `.agents/skills/cruze-roles/design-reviewer.md`, "Rubric", item 8
|
|
32
|
+
|
|
33
|
+
### architecture-rethink-review: An architecture rethink that changes a contract gets a design review of the diff
|
|
34
|
+
- Applies to: new work only
|
|
35
|
+
- Rule: `.agents/skills/cruze-rethink/levels.md`, "Architecture", step 2
|
|
36
|
+
|
|
37
|
+
### missed-by-design-review: A gap the design review's rubric covers is missed by design-review
|
|
38
|
+
- Applies to: new work only
|
|
39
|
+
- Rule: `.agents/skills/cruze-rethink/SKILL.md`, "Steps", step 7
|
|
40
|
+
|
|
41
|
+
### sent-back-to: A sent-back verification says whether the change goes back to build or to rethink
|
|
42
|
+
- Applies to: new work only
|
|
43
|
+
- Rule: `.agents/skills/cruze-verify/SKILL.md`, "Steps", step 10
|
|
44
|
+
|
|
45
|
+
### standalone-plan-approval: The user approves the plan of a standalone change
|
|
46
|
+
- Applies to: new work only
|
|
47
|
+
- Rule: `.agents/skills/cruze-plan/SKILL.md`, "Steps", step 13
|
|
48
|
+
|
|
49
|
+
### deviation-read-back: Build reads a deviation back, and one that names a value the design didn't give is a rethink
|
|
50
|
+
- Applies to: new work only
|
|
51
|
+
- Rule: `.agents/skills/cruze-build/SKILL.md`, "Deviations"
|
|
52
|
+
|
|
53
|
+
### prefactor-verify: The verifier runs no suite again for a change that delivers no scenarios
|
|
54
|
+
- Applies to: new work only
|
|
55
|
+
- Rule: `.agents/skills/cruze-roles/verifier.md`, "Work", step 3
|
|
56
|
+
|
|
57
|
+
### design-on-main: The approved design reaches main before plan branches from it
|
|
58
|
+
- Applies to: new work only
|
|
59
|
+
- Rule: `.agents/skills/cruze-architect/SKILL.md`, "Next step"
|
package/skills/realign/notes.md
CHANGED
package/skills/research/SKILL.md
CHANGED
|
@@ -14,11 +14,12 @@ Run these steps for each component in a design that isn't domain logic. Domain l
|
|
|
14
14
|
1. State the capability in one line, with the requirements that matter: platforms, performance, footprint, and license limits from the vision's constraints.
|
|
15
15
|
2. Look in order: the language's standard library, the project's already-approved dependencies, then mature libraries in the ecosystem. Done when you have checked all three.
|
|
16
16
|
3. For the two or three serious candidates, gather the evidence in [evaluation.md](evaluation.md).
|
|
17
|
-
4. Recommend one. Adopt a library, or build with a concrete reason: the behaviour is specific to this product, no candidate meets a stated constraint, every candidate brings disproportionate risk or complexity, or the capability is the product itself.
|
|
17
|
+
4. Recommend one. Adopt a library, or build with a concrete reason: the behaviour is specific to this product, no candidate meets a stated constraint, every candidate brings disproportionate risk or complexity, or the capability is the product itself. Weigh the candidates as `.agents/skills/cruze-dependency-approval/SKILL.md` says under Weighing, where avoiding a dependency is never a reason.
|
|
18
18
|
5. Record the result as a row in the `## Adopt or build` table of the feature or standalone change, as Component, Decision, Choice and Reason. At project scope, record it as the adapter's `Adopts` fact, and put rows for anything no adapter owns in the walking-skeleton change's `## Adopt or build`. When the evidence runs longer than the reason, write it to `.cruze/notes/<date>-<slug>.md` and cite that note in the reason.
|
|
19
19
|
6. Take the recommendation to the user. Adopting means a new dependency, which follows `.agents/skills/cruze-dependency-approval/SKILL.md`. Building commodity functionality is the user's call as well.
|
|
20
20
|
7. Verify what the design will rely on. List each claim the design or its testing approach makes about anything it doesn't build:
|
|
21
21
|
- an adopted library or tool: the features or flags it needs, and each command the design spells out, such as a CI step;
|
|
22
|
+
- each type, trait, macro or API the design names from a package: that the package exports it at that version, and every crate, package or target that must declare the package to use it, test support included;
|
|
22
23
|
- the language or runtime, such as whether a trait with async methods can be used as a trait object;
|
|
23
24
|
- the platform's test environment, such as which permissions a test process gets;
|
|
24
25
|
- an external system the product talks to, such as what a broker logs or how it answers.
|
package/skills/rethink/SKILL.md
CHANGED
|
@@ -32,7 +32,7 @@ Finding a design flaw mid-build is information, not failure. Rethink amends the
|
|
|
32
32
|
--set agent="<the agent you run in>" [--item <ref>]
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
`found_by` is the step that found it. A defect also needs `missed_by`, the earliest step whose job was to catch it. Both take one of `envision`, `architect`, `research`, `design-review`, `walkthrough`, `plan`, `plan-review`, `build`, `code-review`, `verify`, `land`, `improve`, `validate`, `check` or `user`.
|
|
35
|
+
`found_by` is the step that found it. A defect also needs `missed_by`, the earliest step whose job was to catch it. Both take one of `envision`, `architect`, `research`, `design-review`, `walkthrough`, `plan`, `plan-review`, `build`, `code-review`, `verify`, `land`, `realign`, `improve`, `validate`, `check` or `user`. When a design review ran over the element and an item of its rubric in `.agents/skills/cruze-roles/design-reviewer.md` covers the gap, `missed_by` is `design-review`, not `architect`: a retro reads it to know which rubric to fix.
|
|
36
36
|
|
|
37
37
|
Done when `cruze status` shows every document approved and current, or names only work the user chose to leave for later.
|
|
38
38
|
|
|
@@ -43,7 +43,7 @@ Done when `cruze status` shows every document approved and current, or names onl
|
|
|
43
43
|
| Task | A helper belongs in a different file of the same module | Nothing. Record it with `cruze task deviation` | Carry on building. This is not a rethink, so record no rethink entry |
|
|
44
44
|
| Change | A test plan row or a task's file is wrong, with no design change | `change.md`: its test plan or tasks | Plan review of the diff, then re-approve the change |
|
|
45
45
|
| Feature | A use case needs a second port operation; a scenario is wrong | `feature.md`: its deltas and Changes table, or a standalone `change.md`'s deltas | Design review of the diff, walkthrough of the changed parts, then re-approve the feature and its changes |
|
|
46
|
-
| Architecture | An entity boundary is wrong, or a new port is needed | `docs/architecture.md` directly, plus an ADR when it passes the ADR test |
|
|
46
|
+
| Architecture | An entity boundary is wrong, or a new port is needed | `docs/architecture.md` directly, plus an ADR when it passes the ADR test | Design review of the diff when it changes an operation, port, error or `XC` rule, walkthrough of the diff, then `cruze approve architecture`, with `--replan` for built elements whose code must change |
|
|
47
47
|
| Vision | The release's scope was wrong, or a new goal appears | `docs/vision.md`, and `docs/roadmap.md` | Re-approve the vision and the roadmap. Decide what happens to features that served a dropped goal |
|
|
48
48
|
|
|
49
49
|
## After landing
|
|
@@ -56,4 +56,4 @@ Landed work is history, so rethink never edits an archived folder.
|
|
|
56
56
|
|
|
57
57
|
## Next step
|
|
58
58
|
|
|
59
|
-
Run `cruze next`, and name what it says.
|
|
59
|
+
Run `cruze next`, and name what it says. Start it in a new session, so its context starts empty.
|
package/skills/rethink/levels.md
CHANGED
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
## Architecture
|
|
19
19
|
|
|
20
20
|
1. Edit `docs/architecture.md` directly. Keep every element's ID, and write complete bodies. Write an ADR with `cruze new adr` when the decision passes the ADR test, and link it under `## Decisions`.
|
|
21
|
-
2. Run `cruze validate
|
|
22
|
-
3. List the elements you changed that are already `built`, whose code must now change. When the user approves, run `cruze approve architecture`, adding `--replan <ID>` for each of them. They go back to `planned` until a change rebuilds them.
|
|
21
|
+
2. Run `cruze validate`. When the amendment adds, renames or changes an operation, a port, a use case's `Errors` or an `XC` rule, run the review in `.agents/skills/cruze-roles/SKILL.md` on the diff with the design reviewer, `review=design`: a realign amendment once named a method that clashed with one the type already had, found only at plan. Then run the walkthrough of the diff only, following `.agents/skills/cruze-architect/walkthrough.md`.
|
|
22
|
+
3. List the elements you changed that are already `built`, whose code must now change. When the user approves, run `cruze approve architecture`, adding `--replan <ID>` for each of them. They go back to `planned` until a change rebuilds them, and only a land sets them back to `built`. A `- Status:` line belongs to the CLI: when an element was replanned by mistake, tell the user, and let the change rebuild or re-check it.
|
|
23
23
|
4. Commit the amendment, and get it onto main on its own, as a pull request or a merge. Every branch and every later change must build on it. Then merge main into the branch you were working on.
|
|
24
24
|
5. Hand each replanned element to a change that rebuilds it:
|
|
25
25
|
- **The current change**, when the rebuild belongs to its work. Add the element to the feature's Changes row for that change and to the change's `Builds`, then re-plan and re-approve the change.
|
package/skills/roadmap/SKILL.md
CHANGED
|
@@ -49,3 +49,5 @@ Name the first item whose blockers have all landed:
|
|
|
49
49
|
- A feature whose requirements are settled: `architect "<feature>"`.
|
|
50
50
|
- A standalone change whose design exists: `plan`.
|
|
51
51
|
- A tweak without a design yet: `architect "<tweak>"`.
|
|
52
|
+
|
|
53
|
+
Start it in a new session, so its context starts empty.
|