@printpractical/cruze 0.0.13 → 0.0.14
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 +61 -118
- package/dist/adapters/inbound/cli/cli_context.js +0 -27
- package/dist/adapters/inbound/cli/commands/code.js +5 -18
- package/dist/adapters/inbound/cli/commands/documents.js +11 -37
- package/dist/adapters/inbound/cli/commands/init.js +1 -1
- package/dist/adapters/inbound/cli/commands/review.js +2 -9
- package/dist/adapters/inbound/cli/commands/status.js +16 -63
- package/dist/adapters/inbound/cli/commands.js +10 -37
- package/dist/adapters/inbound/cli/parse_command.js +0 -54
- package/dist/adapters/outbound/git_repository.js +2 -71
- package/dist/app/ports/repository.js +0 -12
- package/dist/app/project_context.js +15 -25
- package/dist/app/use_cases/approve_document.js +29 -0
- package/dist/app/use_cases/check_code.js +21 -56
- package/dist/app/use_cases/new_document.js +25 -0
- package/dist/app/use_cases/project_status.js +43 -67
- package/dist/app/use_cases/run_review.js +11 -30
- package/dist/app/use_cases/validate_project.js +4 -4
- package/dist/domain/approvals.js +51 -0
- package/dist/domain/check/check_source.js +2 -31
- package/dist/domain/config.js +8 -84
- package/dist/domain/hashing.js +16 -30
- package/dist/domain/ids.js +13 -27
- package/dist/domain/next_step.js +41 -0
- package/dist/domain/project/features.js +71 -0
- package/dist/domain/project/layout.js +11 -27
- package/dist/domain/project/project_docs.js +48 -0
- package/dist/domain/project/release.js +30 -0
- package/dist/domain/scaffold.js +0 -1
- package/dist/domain/skill_budget.js +4 -4
- package/dist/domain/trace.js +8 -25
- package/dist/domain/validation/document_rules.js +70 -0
- package/dist/domain/validation/release_rules.js +45 -0
- package/dist/domain/validation/validate_project.js +20 -27
- package/dist/domain/versions/cruze_version.js +3 -9
- package/dist/main.js +1 -1
- package/package.json +1 -1
- package/skills/asking/SKILL.md +51 -0
- package/skills/behavioural-testing/SKILL.md +14 -16
- package/skills/behavioural-testing/examples.md +1 -2
- package/skills/behavioural-testing/fakes.md +2 -2
- package/skills/build/SKILL.md +34 -38
- package/skills/dependency-approval/SKILL.md +34 -31
- package/skills/envision/SKILL.md +23 -18
- package/skills/envision/architecture.md +16 -0
- package/skills/envision/breakdown.md +14 -0
- package/skills/envision/possibilities.md +6 -7
- package/skills/fix/SKILL.md +34 -0
- package/skills/formats/SKILL.md +39 -87
- package/skills/formats/config.md +47 -0
- package/skills/formats/templates/architecture.md +18 -74
- package/skills/formats/templates/feature.md +18 -34
- package/skills/formats/templates/vision.md +15 -27
- package/skills/hexagonal-design/SKILL.md +11 -11
- package/skills/hexagonal-design/contracts.md +3 -3
- package/skills/hexagonal-design/fundamentals.md +1 -1
- package/skills/hexagonal-design/languages/cpp.md +1 -1
- package/skills/hexagonal-design/languages/rust.md +1 -1
- package/skills/hexagonal-design/languages/swift.md +2 -2
- package/skills/hexagonal-design/runtime.md +2 -2
- package/skills/research/SKILL.md +4 -4
- package/skills/research/evaluation.md +1 -1
- package/skills/review/SKILL.md +27 -0
- package/skills/roles/SKILL.md +8 -59
- package/skills/roles/code-reviewer.md +21 -32
- package/skills/roles/researcher.md +3 -3
- package/skills/shape/SKILL.md +37 -0
- package/skills/shape/self-check.md +12 -0
- package/src/adapters/inbound/cli/cli_context.ts +0 -27
- package/src/adapters/inbound/cli/commands/code.ts +5 -18
- package/src/adapters/inbound/cli/commands/documents.ts +11 -37
- package/src/adapters/inbound/cli/commands/init.ts +1 -1
- package/src/adapters/inbound/cli/commands/review.ts +2 -9
- package/src/adapters/inbound/cli/commands/status.ts +16 -63
- package/src/adapters/inbound/cli/commands.ts +10 -37
- package/src/adapters/inbound/cli/parse_command.ts +0 -54
- package/src/adapters/outbound/git_repository.ts +2 -71
- package/src/app/ports/repository.ts +0 -12
- package/src/app/project_context.ts +15 -25
- package/src/app/use_cases/approve_document.ts +29 -0
- package/src/app/use_cases/check_code.ts +21 -56
- package/src/app/use_cases/new_document.ts +25 -0
- package/src/app/use_cases/project_status.ts +49 -73
- package/src/app/use_cases/run_review.ts +11 -30
- package/src/app/use_cases/validate_project.ts +4 -4
- package/src/domain/approvals.ts +51 -0
- package/src/domain/check/check_source.ts +2 -31
- package/src/domain/config.ts +9 -85
- package/src/domain/hashing.ts +16 -30
- package/src/domain/ids.ts +13 -27
- package/src/domain/next_step.ts +41 -0
- package/src/domain/project/features.ts +71 -0
- package/src/domain/project/layout.ts +11 -27
- package/src/domain/project/project_docs.ts +48 -0
- package/src/domain/project/release.ts +30 -0
- package/src/domain/scaffold.ts +0 -1
- package/src/domain/skill_budget.ts +4 -4
- package/src/domain/trace.ts +8 -25
- package/src/domain/validation/document_rules.ts +70 -0
- package/src/domain/validation/release_rules.ts +45 -0
- package/src/domain/validation/validate_project.ts +21 -28
- package/src/domain/versions/cruze_version.ts +3 -9
- package/src/main.ts +1 -1
- package/templates/init/AGENTS.md +4 -12
- package/templates/init/ci.yml +3 -3
- package/templates/init/config.yaml +8 -17
- package/templates/init/review/claude.yaml +2 -2
- package/dist/adapters/inbound/cli/argument_files.js +0 -29
- package/dist/adapters/inbound/cli/commands/diff.js +0 -23
- package/dist/adapters/inbound/cli/commands/journal.js +0 -32
- package/dist/adapters/inbound/cli/commands/progress.js +0 -55
- package/dist/adapters/inbound/cli/commands/realign.js +0 -28
- package/dist/adapters/inbound/cli/commands/show.js +0 -96
- package/dist/app/use_cases/abandon_work.js +0 -42
- package/dist/app/use_cases/approve_artifact.js +0 -197
- package/dist/app/use_cases/journal_events.js +0 -64
- package/dist/app/use_cases/land_change.js +0 -134
- package/dist/app/use_cases/new_project_doc.js +0 -48
- package/dist/app/use_cases/new_work_item.js +0 -75
- package/dist/app/use_cases/realign_done.js +0 -45
- package/dist/app/use_cases/realign_status.js +0 -106
- package/dist/app/use_cases/record_progress.js +0 -118
- package/dist/app/use_cases/show_elements.js +0 -18
- package/dist/app/use_cases/show_notes.js +0 -11
- package/dist/app/use_cases/show_scope.js +0 -51
- package/dist/app/use_cases/upstream_diff.js +0 -55
- package/dist/domain/approvals/agent_approval.js +0 -68
- package/dist/domain/approvals/evaluate.js +0 -36
- package/dist/domain/approvals/fingerprint.js +0 -52
- package/dist/domain/approvals/rebase.js +0 -39
- package/dist/domain/approvals/records.js +0 -50
- package/dist/domain/approvals/upstream_text.js +0 -36
- package/dist/domain/architecture_sections.js +0 -23
- package/dist/domain/check/decision_comments.js +0 -38
- package/dist/domain/decision_citations.js +0 -62
- package/dist/domain/edits/agents_file.js +0 -58
- package/dist/domain/edits/managed_tables.js +0 -60
- package/dist/domain/edits/progress_block.js +0 -33
- package/dist/domain/edits/status_lines.js +0 -52
- package/dist/domain/elements.js +0 -126
- package/dist/domain/journal.js +0 -109
- package/dist/domain/land/bookkeeping.js +0 -54
- package/dist/domain/land/merge_plan.js +0 -137
- package/dist/domain/land/text_ops.js +0 -66
- package/dist/domain/line_diff.js +0 -56
- package/dist/domain/project/artifact_ref.js +0 -42
- package/dist/domain/project/deltas.js +0 -49
- package/dist/domain/project/element_lookup.js +0 -124
- package/dist/domain/project/living_model.js +0 -55
- package/dist/domain/project/new_items.js +0 -48
- package/dist/domain/project/notes.js +0 -74
- package/dist/domain/project/plan_parts.js +0 -111
- package/dist/domain/project/progress.js +0 -43
- package/dist/domain/project/project_view.js +0 -72
- package/dist/domain/project/roadmap.js +0 -43
- package/dist/domain/project/scope_view.js +0 -134
- package/dist/domain/project/work_items.js +0 -68
- package/dist/domain/status/next_step.js +0 -181
- package/dist/domain/status/pending_rethink.js +0 -22
- package/dist/domain/status/verification.js +0 -29
- package/dist/domain/status/work_status.js +0 -125
- package/dist/domain/validation/decision_rules.js +0 -76
- package/dist/domain/validation/delta_rules.js +0 -81
- package/dist/domain/validation/element_rules.js +0 -104
- package/dist/domain/validation/future_rules.js +0 -40
- package/dist/domain/validation/living_rules.js +0 -99
- package/dist/domain/validation/plan_rules.js +0 -124
- package/dist/domain/validation/project_rules.js +0 -115
- package/dist/domain/validation/size_rules.js +0 -45
- package/dist/domain/validation/vision_rules.js +0 -41
- package/dist/domain/validation/work_item_rules.js +0 -175
- package/dist/domain/versions/realign_notes.js +0 -72
- package/dist/domain/versions/rule_versions.js +0 -29
- package/dist/domain/versions/scheduled_exceptions.js +0 -41
- package/skills/about/SKILL.md +0 -21
- package/skills/architect/SKILL.md +0 -49
- package/skills/architect/feature.md +0 -40
- package/skills/architect/project.md +0 -71
- package/skills/architect/tweak.md +0 -22
- package/skills/architect/walkthrough.md +0 -35
- package/skills/domain-language/SKILL.md +0 -37
- package/skills/envision/feature.md +0 -25
- package/skills/envision/intake.md +0 -28
- package/skills/envision/project.md +0 -24
- package/skills/explore/SKILL.md +0 -39
- package/skills/formats/reference/architecture.md +0 -84
- package/skills/formats/reference/config.md +0 -80
- package/skills/formats/reference/durable-docs.md +0 -74
- package/skills/formats/reference/specs.md +0 -65
- package/skills/formats/reference/work-items.md +0 -100
- package/skills/formats/templates/adr.md +0 -7
- package/skills/formats/templates/change.md +0 -29
- package/skills/formats/templates/glossary.md +0 -8
- package/skills/formats/templates/roadmap.md +0 -32
- package/skills/formats/templates/spec.md +0 -11
- package/skills/formats/templates/standalone-change.md +0 -46
- package/skills/grilling/SKILL.md +0 -90
- package/skills/grilling/illustrating.md +0 -38
- package/skills/improve/SKILL.md +0 -51
- package/skills/land/SKILL.md +0 -48
- package/skills/next/SKILL.md +0 -31
- package/skills/plan/SKILL.md +0 -62
- package/skills/plan/tasks.md +0 -35
- package/skills/plan/test-plan.md +0 -14
- package/skills/realign/SKILL.md +0 -37
- package/skills/realign/notes/0.0.10.md +0 -131
- package/skills/realign/notes/0.0.11.md +0 -15
- package/skills/realign/notes/0.0.12.md +0 -31
- package/skills/realign/notes/0.0.13.md +0 -11
- package/skills/realign/notes/0.0.2.md +0 -69
- package/skills/realign/notes/0.0.3.md +0 -11
- package/skills/realign/notes/0.0.4.md +0 -27
- package/skills/realign/notes/0.0.5.md +0 -38
- package/skills/realign/notes/0.0.6.md +0 -44
- package/skills/realign/notes/0.0.7.md +0 -11
- package/skills/realign/notes/0.0.8.md +0 -97
- package/skills/realign/notes/0.0.9.md +0 -59
- package/skills/realign/notes.md +0 -40
- package/skills/rethink/SKILL.md +0 -62
- package/skills/rethink/levels.md +0 -54
- package/skills/roadmap/SKILL.md +0 -54
- package/skills/roles/auditor.md +0 -35
- package/skills/roles/design-reviewer.md +0 -43
- package/skills/roles/design-rubric.md +0 -41
- package/skills/roles/plan-rubric.md +0 -11
- package/skills/roles/surveyor.md +0 -41
- package/skills/roles/verifier.md +0 -42
- package/skills/triage/SKILL.md +0 -37
- package/skills/verify/SKILL.md +0 -45
- package/skills/verify/manual-test.md +0 -23
- package/src/adapters/inbound/cli/argument_files.ts +0 -29
- package/src/adapters/inbound/cli/commands/diff.ts +0 -23
- package/src/adapters/inbound/cli/commands/journal.ts +0 -32
- package/src/adapters/inbound/cli/commands/progress.ts +0 -55
- package/src/adapters/inbound/cli/commands/realign.ts +0 -28
- package/src/adapters/inbound/cli/commands/show.ts +0 -96
- package/src/app/use_cases/abandon_work.ts +0 -42
- package/src/app/use_cases/approve_artifact.ts +0 -197
- package/src/app/use_cases/journal_events.ts +0 -64
- package/src/app/use_cases/land_change.ts +0 -134
- package/src/app/use_cases/new_project_doc.ts +0 -48
- package/src/app/use_cases/new_work_item.ts +0 -75
- package/src/app/use_cases/realign_done.ts +0 -45
- package/src/app/use_cases/realign_status.ts +0 -106
- package/src/app/use_cases/record_progress.ts +0 -118
- package/src/app/use_cases/show_elements.ts +0 -18
- package/src/app/use_cases/show_notes.ts +0 -11
- package/src/app/use_cases/show_scope.ts +0 -51
- package/src/app/use_cases/upstream_diff.ts +0 -55
- package/src/domain/approvals/agent_approval.ts +0 -68
- package/src/domain/approvals/evaluate.ts +0 -36
- package/src/domain/approvals/fingerprint.ts +0 -52
- package/src/domain/approvals/rebase.ts +0 -39
- package/src/domain/approvals/records.ts +0 -50
- package/src/domain/approvals/upstream_text.ts +0 -36
- package/src/domain/architecture_sections.ts +0 -23
- package/src/domain/check/decision_comments.ts +0 -38
- package/src/domain/decision_citations.ts +0 -62
- package/src/domain/edits/agents_file.ts +0 -58
- package/src/domain/edits/managed_tables.ts +0 -60
- package/src/domain/edits/progress_block.ts +0 -33
- package/src/domain/edits/status_lines.ts +0 -52
- package/src/domain/elements.ts +0 -126
- package/src/domain/journal.ts +0 -109
- package/src/domain/land/bookkeeping.ts +0 -54
- package/src/domain/land/merge_plan.ts +0 -137
- package/src/domain/land/text_ops.ts +0 -66
- package/src/domain/line_diff.ts +0 -56
- package/src/domain/project/artifact_ref.ts +0 -42
- package/src/domain/project/deltas.ts +0 -49
- package/src/domain/project/element_lookup.ts +0 -124
- package/src/domain/project/living_model.ts +0 -55
- package/src/domain/project/new_items.ts +0 -48
- package/src/domain/project/notes.ts +0 -74
- package/src/domain/project/plan_parts.ts +0 -111
- package/src/domain/project/progress.ts +0 -43
- package/src/domain/project/project_view.ts +0 -72
- package/src/domain/project/roadmap.ts +0 -43
- package/src/domain/project/scope_view.ts +0 -134
- package/src/domain/project/work_items.ts +0 -68
- package/src/domain/status/next_step.ts +0 -181
- package/src/domain/status/pending_rethink.ts +0 -22
- package/src/domain/status/verification.ts +0 -29
- package/src/domain/status/work_status.ts +0 -125
- package/src/domain/validation/decision_rules.ts +0 -76
- package/src/domain/validation/delta_rules.ts +0 -81
- package/src/domain/validation/element_rules.ts +0 -104
- package/src/domain/validation/future_rules.ts +0 -40
- package/src/domain/validation/living_rules.ts +0 -99
- package/src/domain/validation/plan_rules.ts +0 -124
- package/src/domain/validation/project_rules.ts +0 -115
- package/src/domain/validation/size_rules.ts +0 -45
- package/src/domain/validation/vision_rules.ts +0 -41
- package/src/domain/validation/work_item_rules.ts +0 -175
- package/src/domain/versions/realign_notes.ts +0 -72
- package/src/domain/versions/rule_versions.ts +0 -29
- package/src/domain/versions/scheduled_exceptions.ts +0 -41
- package/templates/init/gitattributes +0 -2
|
@@ -2,99 +2,43 @@
|
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
### VIEW-context: System context
|
|
5
|
+
<What the system is, in two sentences. Then the diagram: inbound adapters on the left, the application core in the middle, the ports and the adapters behind them on the right.>
|
|
8
6
|
|
|
9
7
|
```mermaid
|
|
10
8
|
flowchart LR
|
|
11
|
-
user([<User>]) --> cli[<Inbound adapter>]
|
|
12
|
-
cli --> ctx[<Bounded context>]
|
|
13
|
-
ctx --> ext[(<External system>)]
|
|
14
9
|
```
|
|
15
10
|
|
|
16
|
-
##
|
|
11
|
+
## Ports
|
|
17
12
|
|
|
18
|
-
|
|
19
|
-
- Purpose: <what this context is responsible for>
|
|
20
|
-
- Depends on: <CTX ID and what it uses, or "nothing">
|
|
13
|
+
<One subsection per port: what the core needs from the outside world, or offers to it.>
|
|
21
14
|
|
|
22
|
-
|
|
15
|
+
### <Port name>
|
|
23
16
|
|
|
24
|
-
|
|
17
|
+
<What it is for, and who drives it. Then its operations as code, each with its errors.>
|
|
25
18
|
|
|
26
|
-
```
|
|
27
|
-
classDiagram
|
|
28
|
-
class <Entity>
|
|
19
|
+
```text
|
|
29
20
|
```
|
|
30
21
|
|
|
31
|
-
### ENT-<context>.<name>: <Entity title>
|
|
32
|
-
- Kind: <aggregate | entity | value | service | policy | event>
|
|
33
|
-
- Invariants:
|
|
34
|
-
- <a rule that always holds>
|
|
35
|
-
- Relationships:
|
|
36
|
-
- <verb> <ENT ID> (<cardinality>)
|
|
37
|
-
- Module: <MOD ID>
|
|
38
|
-
- File: `<path>`
|
|
39
|
-
|
|
40
|
-
## Use cases
|
|
41
|
-
|
|
42
|
-
### UC-<context>.<name>: <Use case title>
|
|
43
|
-
- Input: <what the caller provides>
|
|
44
|
-
- Output: <what the caller gets>
|
|
45
|
-
- Errors: <each failure the caller can see>
|
|
46
|
-
- Uses: <PORT IDs>
|
|
47
|
-
- Module: <MOD ID>
|
|
48
|
-
- File: `<path>`
|
|
49
|
-
|
|
50
|
-
## Ports
|
|
51
|
-
|
|
52
|
-
### PORT-<context>.<name>: <Port title>
|
|
53
|
-
- Direction: <driven | driving>
|
|
54
|
-
- Operations:
|
|
55
|
-
- `<signature>`: <guarantee; failure cases; who owns cleanup>
|
|
56
|
-
- Implemented by: <ADP IDs>
|
|
57
|
-
- Module: <MOD ID>
|
|
58
|
-
- File: `<path>`
|
|
59
|
-
|
|
60
22
|
## Adapters
|
|
61
23
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
- Adopts: <library, and why adopt rather than build>
|
|
66
|
-
- Module: <MOD ID>
|
|
67
|
-
- File: `<path>`
|
|
68
|
-
|
|
69
|
-
## Flows
|
|
70
|
-
|
|
71
|
-
### FLOW-<context>.<name>: <Flow title>
|
|
72
|
-
- Serves: <SCN IDs>
|
|
73
|
-
- Elements: <IDs of every participant>
|
|
74
|
-
|
|
75
|
-
```mermaid
|
|
76
|
-
sequenceDiagram
|
|
77
|
-
participant A as <Element title>
|
|
78
|
-
```
|
|
24
|
+
| Adapter | Implements | Technology |
|
|
25
|
+
| --- | --- | --- |
|
|
26
|
+
| <name> | <port, or the inbound side it serves> | <library, protocol or device> |
|
|
79
27
|
|
|
80
|
-
##
|
|
28
|
+
## Runtime
|
|
81
29
|
|
|
82
|
-
|
|
83
|
-
- Path: `<directory or file>`
|
|
84
|
-
- Layer: <core | domain | application | adapter | composition>
|
|
30
|
+
<The threading or async model and how work is scheduled. Every limit and timeout with its number. What happens on overload, when a dependency fails, and at shutdown.>
|
|
85
31
|
|
|
86
|
-
##
|
|
32
|
+
## Technology
|
|
87
33
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
34
|
+
| Choice | For | Why |
|
|
35
|
+
| --- | --- | --- |
|
|
36
|
+
| <language, framework or significant dependency> | <what it does here> | <why it, in one line> |
|
|
91
37
|
|
|
92
|
-
##
|
|
38
|
+
## Layers
|
|
93
39
|
|
|
94
|
-
|
|
95
|
-
<How the system handles it, and where.>
|
|
40
|
+
<The layers, what each holds, and which may import which. The rules are in .cruze/config.yaml, where cruze check enforces them.>
|
|
96
41
|
|
|
97
42
|
## Decisions
|
|
98
43
|
|
|
99
|
-
-
|
|
100
|
-
- D1: <a project-level decision below the ADR bar> (<reason>)
|
|
44
|
+
- <A choice that shapes the whole system, and why.>
|
|
@@ -1,49 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
id: {{id}}
|
|
3
|
-
title: {{title_quoted}}
|
|
4
|
-
roadmap: <roadmap item slug>
|
|
5
|
-
---
|
|
1
|
+
# {{title}}
|
|
6
2
|
|
|
7
|
-
|
|
3
|
+
- Status: shaped
|
|
8
4
|
|
|
9
5
|
## Intent
|
|
10
6
|
|
|
11
|
-
<
|
|
7
|
+
<What the user can do once this is built, and why, in two sentences.>
|
|
12
8
|
|
|
13
|
-
|
|
9
|
+
## Behaviour
|
|
14
10
|
|
|
15
|
-
- <
|
|
11
|
+
### SCN-{{slug}}.<name>: <Scenario title>
|
|
16
12
|
|
|
17
|
-
|
|
13
|
+
- Given <the starting state>
|
|
14
|
+
- When <the one action>
|
|
15
|
+
- Then <what the user sees>
|
|
18
16
|
|
|
19
|
-
|
|
17
|
+
## Public API
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
<Every public type, function, command, endpoint or message this feature adds or changes, as real code in the project's language. Write "No change." when there is none.>
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
```text
|
|
22
|
+
```
|
|
25
23
|
|
|
26
|
-
##
|
|
24
|
+
## Stack sketch
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
<The requirement using SHALL or MUST.>
|
|
26
|
+
<The main scenario crossing the stack, from the inbound adapter through the core to the ports and adapters, with what is new marked. Then each change this feature makes to docs/architecture.md, one line each.>
|
|
30
27
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
- WHEN <the one action>
|
|
34
|
-
- THEN <observable outcome>
|
|
28
|
+
```text
|
|
29
|
+
```
|
|
35
30
|
|
|
36
|
-
##
|
|
31
|
+
## Decisions
|
|
37
32
|
|
|
38
|
-
|
|
39
|
-
- <the element's full body, as it will read in architecture.md>
|
|
40
|
-
|
|
41
|
-
## Changes
|
|
42
|
-
|
|
43
|
-
| Change | Delivers | Builds | Depends on |
|
|
44
|
-
| --- | --- | --- | --- |
|
|
45
|
-
| 01-<slug> | <SCN and REQ IDs> | <architecture IDs> | |
|
|
46
|
-
|
|
47
|
-
<!-- cruze:managed -->
|
|
48
|
-
## Progress
|
|
49
|
-
<!-- /cruze:managed -->
|
|
33
|
+
- <A choice the user would notice or might question, and why.>
|
|
@@ -8,42 +8,30 @@
|
|
|
8
8
|
|
|
9
9
|
- <Who, and in what situation they use it.>
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Terms
|
|
12
12
|
|
|
13
|
-
|
|
|
13
|
+
| Term | Meaning | Avoid |
|
|
14
14
|
| --- | --- | --- |
|
|
15
|
-
|
|
|
15
|
+
| <term> | <What it means in this product.> | <Synonyms that would confuse.> |
|
|
16
16
|
|
|
17
|
-
##
|
|
18
|
-
|
|
19
|
-
- <What the product deliberately doesn't do, and why.>
|
|
17
|
+
## Release
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
<What a user can do when this release ships, in one sentence.>
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
## Principles
|
|
26
|
-
|
|
27
|
-
| ID | Principle | Why |
|
|
21
|
+
| Feature | Summary | Needs |
|
|
28
22
|
| --- | --- | --- |
|
|
29
|
-
|
|
|
30
|
-
|
|
31
|
-
## Must stay possible
|
|
23
|
+
| <slug> | <What the user can do once it is built.> | <Slugs of the features it can't be built without, or blank.> |
|
|
32
24
|
|
|
33
|
-
|
|
34
|
-
| --- | --- | --- | --- | --- |
|
|
35
|
-
| LATER-<name> | <A capability the product may need after this release.> | <likely or possible> | <Why the user may want it.> | <What no design may close off. Never how to build it.> |
|
|
25
|
+
## Future features
|
|
36
26
|
|
|
37
|
-
|
|
38
|
-
|
|
27
|
+
| Feature | Summary | Must stay possible |
|
|
28
|
+
| --- | --- | --- |
|
|
29
|
+
| <slug> | <What it would let the user do.> | <What no design may rule out. Never how to build it.> |
|
|
39
30
|
|
|
40
|
-
|
|
31
|
+
## Non-goals
|
|
41
32
|
|
|
42
|
-
|
|
43
|
-
| --- | --- | --- |
|
|
33
|
+
- <What the product deliberately doesn't do, and why.>
|
|
44
34
|
|
|
45
|
-
|
|
35
|
+
## Constraints
|
|
46
36
|
|
|
47
|
-
|
|
48
|
-
| --- | --- | --- |
|
|
49
|
-
<!-- /cruze:managed -->
|
|
37
|
+
- <A platform, language, dependency, performance, security or legal limit.>
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cruze-hexagonal-design
|
|
3
|
-
description: The architecture standard for a Cruze project, covering hexagonal ports and adapters with domain-driven design, the owner of each rule, dependency direction, many small modules and composition. Use when designing or reviewing the architecture or
|
|
3
|
+
description: The architecture standard for a Cruze project, covering hexagonal ports and adapters with domain-driven design, the owner of each rule, dependency direction, many small modules and composition. Use when designing or reviewing the architecture map or a feature's stack sketch, when naming a port, adapter or module, when writing code that adds a type, file or import between modules, or when reviewing code for layering and structure.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Hexagonal design
|
|
7
7
|
|
|
8
|
-
The system is a hexagon. A domain and an application form the core, and adapters reach the outside world through ports. Every rule has one owner, dependencies point inward, and
|
|
8
|
+
The system is a hexagon. A domain and an application form the core, and adapters reach the outside world through ports. Every rule has one owner, dependencies point inward, and `docs/architecture.md` maps the ports, adapters and layers. Designs, code and reviews are all held to this standard.
|
|
9
9
|
|
|
10
10
|
## Placing an owner
|
|
11
11
|
|
|
12
|
-
Follow these steps whenever a design or
|
|
12
|
+
Follow these steps whenever a design or the code introduces behaviour, such as a rule, a workflow, a mapping or an integration.
|
|
13
13
|
|
|
14
14
|
1. Describe one representative operation in the caller's terms before choosing any structure. Done when you can say who calls, with what, and what they get back or see fail.
|
|
15
|
-
2. Search the
|
|
16
|
-
3. Name the owner by what it means, in the
|
|
17
|
-
4. Place it in the
|
|
18
|
-
5. Check the direction of every new dependency against the `
|
|
15
|
+
2. Search the architecture map and the code for an existing owner of the same behaviour. Reuse or extend it when it is correct. Done when you can name the owner, or can say that none exists.
|
|
16
|
+
3. Name the owner by what it means, in the vision's terms. A rule or invariant goes to a domain concept, a workflow to a use case, a capability the application needs to a port, and a technology to an adapter.
|
|
17
|
+
4. Place it in the layer its role belongs to, in a module named for the concept. Done when you can name its file, and its layer may import everything it uses.
|
|
18
|
+
5. Check the direction of every new dependency against the `layers:` in `.cruze/config.yaml`. Done when no dependency points outward.
|
|
19
19
|
6. Name the tests that will prove it, following `.agents/skills/cruze-behavioural-testing/SKILL.md`. When a plausible wrong outcome exists, make sure a scenario step rules it out, such as `AND the first hop is closed`.
|
|
20
20
|
|
|
21
21
|
Stop when the behaviour and its boundaries are covered. A pure library needs no application layer or ports, so don't invent layers to complete the recipe.
|
|
@@ -70,7 +70,7 @@ Layers are dependency boundaries, not runtime hops. A port can be a plain functi
|
|
|
70
70
|
### Ports
|
|
71
71
|
|
|
72
72
|
- A driven port names a capability the application needs, not a technology: `DeviceCatalog`, `Clock` and `HopConnector`, not `TomlFile`, `TokioTimer` or `Ssh2Client`.
|
|
73
|
-
- The application owns each port's contract and shapes it around what the core needs, never mirroring an SDK. Read [contracts.md](contracts.md) before writing a port's
|
|
73
|
+
- The application owns each port's contract and shapes it around what the core needs, never mirroring an SDK. Read [contracts.md](contracts.md) before writing a port's operations.
|
|
74
74
|
- A port that keeps a technology out of the core is justified with one adapter. An interface over an internal policy with one strategy is not.
|
|
75
75
|
- Declare a driving port only when several inbound adapters share it or the application promises a stable contract. Otherwise an inbound adapter calls the use case directly.
|
|
76
76
|
- Name each thing once. Never produce `Foo`, `FooPort`, `FooService` and `FooImpl` families.
|
|
@@ -94,8 +94,8 @@ Layers are dependency boundaries, not runtime hops. A port can be a plain functi
|
|
|
94
94
|
- Entry-point and namespace files, such as `main`, `lib.rs`, `mod.rs` and `index.ts`, hold only wiring and declarations.
|
|
95
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.
|
|
96
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.
|
|
97
|
-
- Structure follows the
|
|
98
|
-
- In an existing codebase, its established layout and naming win over these structure rules until the user
|
|
97
|
+
- Structure follows the architecture's layers and the domain's concepts, never a per-language template. Write idiomatic code for the language and use its standard tooling. [languages/rust.md](languages/rust.md), [languages/swift.md](languages/swift.md) and [languages/cpp.md](languages/cpp.md) add rules for those languages.
|
|
98
|
+
- In an existing codebase, its established layout and naming win over these structure rules until the user chooses to restructure it. Ownership and dependency direction still apply.
|
|
99
99
|
|
|
100
100
|
## Representations and errors
|
|
101
101
|
|
|
@@ -126,7 +126,7 @@ These are review signals, not automatic failures. When one could be checked mech
|
|
|
126
126
|
## Further reading
|
|
127
127
|
|
|
128
128
|
- [shapes.md](shapes.md): choosing the layout for a library, a daemon or service, a mobile or desktop app, or a CLI.
|
|
129
|
-
- [contracts.md](contracts.md): writing a port's
|
|
129
|
+
- [contracts.md](contracts.md): writing a port's operations, a public API, an IPC protocol or a stored format.
|
|
130
130
|
- [runtime.md](runtime.md): concurrency, long-lived resources (connections, sessions, devices, subprocesses), state machines, cancellation or a hot path.
|
|
131
131
|
- [fundamentals.md](fundamentals.md): choosing a data structure, a state representation or an abstraction mechanism; defining equality or ordering; bounding loops, retries and fan-out.
|
|
132
132
|
- `.agents/skills/cruze-dependency-approval/SKILL.md`: before any design or code adds a dependency.
|
|
@@ -14,7 +14,7 @@ A concrete function or type can be a fine seam. Use a port to keep a technology
|
|
|
14
14
|
|
|
15
15
|
## Obligations
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
For each port in `docs/architecture.md`, and each public API in a feature, give each operation's signature in the project's language, then the rows below that apply.
|
|
18
18
|
|
|
19
19
|
| Concern | What the caller can rely on |
|
|
20
20
|
| --- | --- |
|
|
@@ -30,7 +30,7 @@ In a `PORT` element, each item under `Operations` gives the signature in the pro
|
|
|
30
30
|
|
|
31
31
|
Add compatibility machinery (versioning, extension points, binary stability) only for a concrete reason: existing callers, stored data, peers that upgrade independently, or an explicit requirement. Name the supported callers or versions when it matters.
|
|
32
32
|
|
|
33
|
-
A contract lives in one place: the
|
|
33
|
+
A contract lives in one place: the port in `docs/architecture.md`, the feature's public API, a schema, or a header. A change edits it there rather than writing a second competing definition.
|
|
34
34
|
|
|
35
35
|
## Compose guarantees, not just types
|
|
36
36
|
|
|
@@ -43,7 +43,7 @@ Suppose an operation saves a document and then notifies subscribers. It must dec
|
|
|
43
43
|
- Separate what a component owns from what it borrows. A reusable component never shuts down its caller's runtime or closes a borrowed connection.
|
|
44
44
|
- Treat retry permission, deadlines and partial success as behaviour the caller sees, not details an adapter picks.
|
|
45
45
|
|
|
46
|
-
A
|
|
46
|
+
A feature's stack sketch shows the composition for its main scenario, and its failure scenarios say what each failure leaves behind.
|
|
47
47
|
|
|
48
48
|
## IPC and stored formats
|
|
49
49
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Engineering fundamentals
|
|
2
2
|
|
|
3
|
-
Use these to test material engineering choices in a design,
|
|
3
|
+
Use these to test material engineering choices in a design, code or a review. Keep the search bounded by the work at hand: the seams it touches, its scenarios, and the failure and workload risks that are credible. Stop when those have decisions backed by evidence.
|
|
4
4
|
|
|
5
5
|
## Workload before structure
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Rust
|
|
2
2
|
|
|
3
|
-
These add to the hexagonal design rules for Rust projects. The
|
|
3
|
+
These add to the hexagonal design rules for Rust projects. The architecture's layers decide the layout; this file never does.
|
|
4
4
|
|
|
5
5
|
## Modules
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Swift
|
|
2
2
|
|
|
3
|
-
These add to the hexagonal design rules for Swift projects, such as iOS and macOS apps and Swift packages. The
|
|
3
|
+
These add to the hexagonal design rules for Swift projects, such as iOS and macOS apps and Swift packages. The architecture's layers decide the layout; this file never does.
|
|
4
4
|
|
|
5
5
|
## Packages and targets
|
|
6
6
|
|
|
@@ -43,4 +43,4 @@ These add to the hexagonal design rules for Swift projects, such as iOS and macO
|
|
|
43
43
|
|
|
44
44
|
- Format with `swift format format --in-place --recursive`, and lint with `swift format lint --strict --recursive`.
|
|
45
45
|
- Package tests live in `Tests/<Target>Tests/`. They import the target with `@testable import`, which makes its `internal` declarations visible, so nothing is made `public` only for tests. UI tests live in the app's UI test target.
|
|
46
|
-
-
|
|
46
|
+
- Run the package's tests on every change and the app's UI tests before review, since UI tests run through the simulator and are by far the slowest. Name both commands in `AGENTS.md`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Runtime ownership
|
|
2
2
|
|
|
3
|
-
Runtime architecture decides how work executes and who owns resources. It is independent of the hexagonal layers: a port is not a thread, and a use case is not a task. Record runtime decisions in
|
|
3
|
+
Runtime architecture decides how work executes and who owns resources. It is independent of the hexagonal layers: a port is not a thread, and a use case is not a task. Record runtime decisions in the architecture's `## Runtime`, and in the operations of the ports involved.
|
|
4
4
|
|
|
5
5
|
## Choose the execution model
|
|
6
6
|
|
|
@@ -34,7 +34,7 @@ Every long-lived, mutable, stateful or exclusive resource has one named owner. T
|
|
|
34
34
|
|
|
35
35
|
## Cross-cutting infrastructure
|
|
36
36
|
|
|
37
|
-
Centralize repeated tracing and context propagation, authentication metadata, instrumentation, protocol error mapping and serialization conventions in middleware, wrappers or a dedicated adapter component. Record each
|
|
37
|
+
Centralize repeated tracing and context propagation, authentication metadata, instrumentation, protocol error mapping and serialization conventions in middleware, wrappers or a dedicated adapter component. Record each in the architecture's `## Runtime`. Business policy, such as an authorization decision, stays in the core even when it recurs.
|
|
38
38
|
|
|
39
39
|
## Performance
|
|
40
40
|
|
package/skills/research/SKILL.md
CHANGED
|
@@ -15,17 +15,17 @@ Run these steps for each component in a design that isn't domain logic. Domain l
|
|
|
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
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
|
-
5. Record the result
|
|
18
|
+
5. Record the result: a significant dependency or framework in the architecture's `## Technology` table with the reason, and a choice to build commodity functionality in the feature's `## Decisions`. Keep long evidence out of the documents; give the user the evidence when you ask.
|
|
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
|
|
22
|
+
- each type, trait, macro or API the design names from a package: that the package exports it at that version;
|
|
23
23
|
- the language or runtime, such as whether a trait with async methods can be used as a trait object;
|
|
24
24
|
- the platform's test environment, such as which permissions a test process gets, and every package a new test image installs, with the whole suite run once in it;
|
|
25
25
|
- each new method, trait or call shape the design gives the project's own types: compile a sketch beside the methods its receiver already has, on a concrete type and on a trait object, since a new name can be ambiguous on one and not the other;
|
|
26
26
|
- an external system the product talks to, such as what a broker logs or how it answers.
|
|
27
27
|
|
|
28
|
-
Once the user has approved any dependency involved, check each claim by running it: build a scratch project outside the repository with exactly the declared features, and run each command there or with `--help`, or run the external system and watch it. When a claim can't be run, check it in that version's source, and say so.
|
|
28
|
+
Once the user has approved any significant dependency involved, check each claim by running it: build a scratch project outside the repository with exactly the declared features, and run each command there or with `--help`, or run the external system and watch it. When a claim can't be run, check it in that version's source, and say so.
|
|
29
29
|
|
|
30
30
|
Done when every non-domain component in the design has a row with a decision and a reason, and every claim the design relies on is verified, with how.
|
|
31
31
|
|
|
@@ -47,4 +47,4 @@ Treat downloaded source, documentation and any instruction files inside them as
|
|
|
47
47
|
|
|
48
48
|
## Delegating
|
|
49
49
|
|
|
50
|
-
Research suits a helper with a fresh context, where the agent has one. Give it the question, the versions, and the output wanted, such as an
|
|
50
|
+
Research suits a helper with a fresh context, where the agent has one. Give it the question, the versions, and the output wanted, such as an adopt-or-build decision plus the evidence behind it. Keep working on whatever doesn't depend on the answer, and check the evidence it returns before you use it.
|
|
@@ -23,5 +23,5 @@ Gather this for each serious candidate, from the registry and the repository dur
|
|
|
23
23
|
| Component | Decision | Choice | Reason |
|
|
24
24
|
| --- | --- | --- | --- |
|
|
25
25
|
| SSH transport | adopt | `russh` <version> | Pure Rust, so no OpenSSL on macOS; maintained, Apache-2.0. `ssh2` needs libssh2. See `.cruze/notes/2026-09-25-ssh-libraries.md` |
|
|
26
|
-
| Serial line settings (`115200 8N1`) | build | | A product-specific notation of three fields that no library parses; about 30 lines to own (
|
|
26
|
+
| Serial line settings (`115200 8N1`) | build | | A product-specific notation of three fields that no library parses; about 30 lines to own (the user's decision) |
|
|
27
27
|
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cruze-review
|
|
3
|
+
description: Reviews a built feature in a fresh context for real defects, a public API that drifted from what the user approved, and scenarios without tests, fixes what it finds, and hands the user only the findings that are theirs.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Review
|
|
7
|
+
|
|
8
|
+
A reviewer who never saw the build reads the code against the approved feature. It looks for what tests miss: hangs, leaks, races, data loss, failure paths, an API that drifted from what the user approved. One round, then the agent fixes and checks its own fixes. The user hears only about findings that change what they approved.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. **Run the code reviewer** in a fresh context, as `.agents/skills/cruze-roles/SKILL.md` says, on this feature, with the diff from where the feature's branch left `main`: `cruze review code-reviewer --feature <slug> --base <merge-base>`, where the merge base is `git merge-base main HEAD`. Done when you have its report.
|
|
13
|
+
2. **Check each finding** against the code before acting on it. Drop one whose evidence doesn't hold, and say why in one line.
|
|
14
|
+
3. **Sort them.** A finding is the user's when fixing it would change a scenario, the public API they approved, or a significant dependency. Every other finding is yours, blockers included.
|
|
15
|
+
4. **Fix yours.** Fix every blocker, and the concerns worth fixing, each with a test when it is a behaviour. Run the full suite, `cruze check --ci` and `cruze trace <slug>` again. Check your own fixes; don't run the reviewer a second time.
|
|
16
|
+
5. **Bring the user theirs,** illustrated as `.agents/skills/cruze-asking/SKILL.md` says: the problem in plain words, who meets it and how, and the change to the feature you recommend, as code or output, before and after. Their answer goes through `shape` as a change to the approved feature, then back to build.
|
|
17
|
+
6. **Report and open the pull request.** Tell the user, in a few lines:
|
|
18
|
+
- what the feature now does;
|
|
19
|
+
- how to try it: the commands to run, with what they should see;
|
|
20
|
+
- what the review found and what you fixed, counted;
|
|
21
|
+
- any finding you left, and why, each filed as an issue as `fix` says, so it isn't lost.
|
|
22
|
+
|
|
23
|
+
Add a line in the user's words under `[Unreleased]` in `CHANGELOG.md`. Update the README's status, and its usage when the feature changes what a user runs or sees, with the same commands as "how to try it". Push the branch and open a pull request, or merge as the project does. Done when the pull request is open or the branch is merged.
|
|
24
|
+
|
|
25
|
+
## Next step
|
|
26
|
+
|
|
27
|
+
`cruze next` names it: usually `shape` for the next feature.
|
package/skills/roles/SKILL.md
CHANGED
|
@@ -1,71 +1,20 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cruze-roles
|
|
3
|
-
description: Prompts for Cruze's fresh-context roles
|
|
3
|
+
description: Prompts for Cruze's fresh-context roles, the code reviewer and the researcher, and how to run one. Use when a Cruze step says to run a review or research in a fresh context.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Roles
|
|
7
7
|
|
|
8
|
-
A role is a prompt with fixed inputs and a report as its only output. It runs in a fresh context, so it judges the
|
|
8
|
+
A role is a prompt with fixed inputs and a report as its only output. It runs in a fresh context, so it judges the work rather than the conversation that produced it. It never edits files.
|
|
9
9
|
|
|
10
10
|
| Role | File | Used by |
|
|
11
11
|
| --- | --- | --- |
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
| Verifier | [verifier.md](verifier.md) | verify, to run the system |
|
|
15
|
-
| Researcher | [researcher.md](researcher.md) | architect, for adopt-or-build decisions |
|
|
16
|
-
| Auditor | [auditor.md](auditor.md) | realign, to compare existing code with what a release now expects |
|
|
17
|
-
| Surveyor | [surveyor.md](surveyor.md) | improve, to find structure that departs from the standards or keeps causing friction |
|
|
12
|
+
| Code reviewer | [code-reviewer.md](code-reviewer.md) | review and fix |
|
|
13
|
+
| Researcher | [researcher.md](researcher.md) | envision, for technology choices; any step with a question that needs evidence |
|
|
18
14
|
|
|
19
15
|
## Running a role
|
|
20
16
|
|
|
21
|
-
1.
|
|
22
|
-
2.
|
|
23
|
-
3.
|
|
24
|
-
4. Take the report as it comes back
|
|
25
|
-
|
|
26
|
-
## Running a review
|
|
27
|
-
|
|
28
|
-
A review has at most two rounds. Only blockers can force the second one.
|
|
29
|
-
|
|
30
|
-
### Round 1
|
|
31
|
-
|
|
32
|
-
1. Commit the documents under review (`docs: <artifact> for design review`), so the fixes in round 2 have a diff. Then run the reviewer on the complete artifact.
|
|
33
|
-
2. Record the round: `cruze journal add review --set review=<design|plan|code> --set round=1 --set blockers=<n> --set concerns=<n> --set nits=<n>`, with the counts from the report's last line, adding `--item <ref>` for a feature or change.
|
|
34
|
-
3. **Sort the findings.** A finding is an **exception**, which the user decides, when any of these holds:
|
|
35
|
-
- Its fix changes behaviour: it adds, removes or rewrites a requirement or scenario, or changes what a person sees or does beyond what the spec says. Making the code or the plan meet a scenario as written is not a change of behaviour.
|
|
36
|
-
- Its fix changes a port, a port's `Operations` or a public contract that the approved design names.
|
|
37
|
-
- Its fix changes another decision the grilling skill leaves to the user: a context, dependency direction or a dependency.
|
|
38
|
-
- You recommend anything but `fixed`: waiving, deferring or rejecting it, or a rethink because it needs a design change. A fix through a detail amendment is an exception too.
|
|
39
|
-
- You would fix it differently from the reviewer's proposed fix.
|
|
40
|
-
|
|
41
|
-
Every other finding is yours, blockers included: you fix it as the reviewer proposes. When `review.decide` in `.cruze/config.yaml` is `all`, every finding is an exception. Nits are a count, not findings: when a report lists any, they get no disposition and you don't bring them to the user.
|
|
42
|
-
4. **Present them in one message,** written to be read cold and illustrated as `.agents/skills/cruze-grilling/illustrating.md` says. First each exception: what goes wrong, shown as the reviewer's failure scenario played out (the interaction, the code or the diagram), what the fix changes, shown before and after, and your recommended disposition and why:
|
|
43
|
-
- `fixed`: you will change the work as the finding proposes.
|
|
44
|
-
- `waived`: the finding is right, but the user accepts the risk.
|
|
45
|
-
- `deferred`: it belongs to later work. When it is future scope, add it with `cruze features add <slug> --summary <text> --goals <ids>`.
|
|
46
|
-
- `rejected`: the finding is wrong, with the reason.
|
|
47
|
-
|
|
48
|
-
A finding whose fix would change an approved element, such as one marked `Needs design change`, is never `waived`. Recommend `fixed` through a detail amendment when it qualifies, as "Detail" in `.agents/skills/cruze-rethink/levels.md` says, otherwise `rethink` at that element's level now, or `deferred` for a concern later work can carry. Once the rethink is done and the code follows it, record the finding as `fixed`. When the user wants the rethink later, record it as `rethink` instead, with `--item` naming the feature or change it amends: `cruze next` and the build gate hold that work until a rethink is recorded for it.
|
|
49
|
-
|
|
50
|
-
Then one line for each finding you are fixing yourself. When there are no exceptions, say what you are fixing and carry on without waiting. The user can object to any line until the work is approved, and that finding becomes an exception: revert its fix and let them decide it.
|
|
51
|
-
5. **Record every disposition:** `cruze journal add disposition --set finding="<rubric item>: <summary>" --set disposition=<fixed|waived|deferred|rejected|rethink> --set reason="<reason>" --set review=<design|plan|code> --set decided=<agent|user>`, with the same `--item`. Use `decided=user` for each exception, once the user decides it, and `decided=agent` for each finding you fixed yourself. The CLI refuses `decided=agent` for anything but `fixed`. A recorded disposition is never raised again.
|
|
52
|
-
6. Apply every `fixed` change, then run `cruze validate`. Done when it reports no errors.
|
|
53
|
-
7. When a finding could be caught by a tool, such as a layering, naming or size rule, tell the user which `cruze check` rule or linter setting would catch it next time.
|
|
54
|
-
|
|
55
|
-
### Round 2
|
|
56
|
-
|
|
57
|
-
Run round 2 only when a round-1 blocker was fixed. It checks only whether those blockers are fixed, and raises nothing new. You check them: in 49 recorded rounds across two projects, no reviewer re-reading a fix found a blocker still open, and the user sees every fix at the walkthrough, in the plan, or in verify's report.
|
|
58
|
-
|
|
59
|
-
1. **Check each blocker** against the diff of its fix, and run `cruze validate`. A blocker is fixed when the diff does what the proposal says and validate reports no new errors. When a fix differs from the proposal or reaches past what the finding names, say so in the message that presents it, so the user can object.
|
|
60
|
-
2. Record the round with `round=2`, the blockers still open, `concerns=0` and `checked_by=agent`.
|
|
61
|
-
3. Take any blocker still open to the user, who fixes it now, waives it or starts a rethink. There is no round 3.
|
|
62
|
-
|
|
63
|
-
Done when every finding has a journaled disposition, and every exception, and every blocker left open in round 2, has the user's decision.
|
|
64
|
-
|
|
65
|
-
## The settled ledger
|
|
66
|
-
|
|
67
|
-
Reviewers read the settled ledger so they never re-raise a decision. It consists of:
|
|
68
|
-
|
|
69
|
-
- The `## Settled decisions` of the feature or change under review.
|
|
70
|
-
- The `D<n>` lines in the `## Decisions` section of `docs/architecture.md`, and the accepted ADRs in `docs/adr/`.
|
|
71
|
-
- Earlier dispositions of the item under review, from `cruze journal list --event disposition --item <ref>`. `cruze show <ref>` includes them. Never list the whole project's: two projects' reviewers read every disposition ever recorded, about 36k tokens a time, a hundred times each.
|
|
17
|
+
1. **Start a fresh context:** a helper agent with no conversation history, where the agent can start one. Give it the role file's full text, the feature slug and the base commit, and nothing else: your opinions and your reasons for the code stay out.
|
|
18
|
+
2. **Or let the CLI start one:** `cruze review <role> --feature <slug> --base <commit>`, where the role is `code-reviewer` or `researcher`. It runs the agent configured under `review:` in `.cruze/config.yaml` and prints the role's report. When no agent is configured, or it isn't installed, it prints `status: run-in-helper` with the full prompt instead: give exactly that prompt to a helper.
|
|
19
|
+
3. **When no fresh context can run,** the code reviewer must still run fresh: tell the user, and have them run the prompt in a new session. The researcher may run in your own context, since its evidence is checkable; say that you did.
|
|
20
|
+
4. **Take the report** as it comes back, and check each finding's evidence against the files before you act on it.
|