@printpractical/cruze 0.0.9 → 0.0.10
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 +17 -13
- package/dist/adapters/inbound/cli/cli_context.js +4 -0
- package/dist/adapters/inbound/cli/commands/diff.js +23 -0
- package/dist/adapters/inbound/cli/commands/documents.js +1 -1
- package/dist/adapters/inbound/cli/commands/show.js +66 -2
- package/dist/adapters/inbound/cli/commands/status.js +7 -3
- package/dist/adapters/inbound/cli/commands.js +9 -3
- package/dist/adapters/inbound/cli/parse_command.js +8 -0
- package/dist/adapters/outbound/git_repository.js +9 -0
- package/dist/app/ports/repository.js +4 -0
- package/dist/app/use_cases/approve_artifact.js +18 -10
- package/dist/app/use_cases/check_code.js +5 -3
- package/dist/app/use_cases/journal_events.js +6 -2
- package/dist/app/use_cases/new_project_doc.js +10 -2
- package/dist/app/use_cases/run_review.js +10 -2
- package/dist/app/use_cases/show_elements.js +18 -0
- package/dist/app/use_cases/show_notes.js +11 -0
- package/dist/app/use_cases/show_scope.js +15 -1
- package/dist/app/use_cases/upstream_diff.js +55 -0
- package/dist/domain/approvals/rebase.js +39 -0
- package/dist/domain/approvals/upstream_text.js +36 -0
- package/dist/domain/check/check_source.js +18 -1
- package/dist/domain/check/decision_comments.js +38 -0
- package/dist/domain/decision_citations.js +62 -0
- package/dist/domain/edits/agents_file.js +9 -0
- package/dist/domain/ids.js +3 -1
- package/dist/domain/journal.js +3 -1
- package/dist/domain/land/merge_plan.js +7 -2
- package/dist/domain/line_diff.js +56 -0
- package/dist/domain/project/element_lookup.js +124 -0
- package/dist/domain/project/living_model.js +2 -1
- package/dist/domain/project/notes.js +74 -0
- package/dist/domain/skill_budget.js +36 -0
- package/dist/domain/status/next_step.js +27 -5
- package/dist/domain/status/pending_rethink.js +22 -0
- package/dist/domain/status/work_status.js +17 -2
- package/dist/domain/validation/decision_rules.js +76 -0
- package/dist/domain/validation/delta_rules.js +2 -0
- package/dist/domain/validation/future_rules.js +40 -0
- package/dist/domain/validation/living_rules.js +2 -0
- package/dist/domain/validation/validate_project.js +4 -0
- package/dist/domain/validation/vision_rules.js +41 -0
- package/dist/domain/versions/rule_versions.js +3 -0
- package/package.json +1 -1
- package/skills/architect/SKILL.md +2 -1
- package/skills/architect/feature.md +6 -4
- package/skills/architect/project.md +2 -2
- package/skills/behavioural-testing/SKILL.md +3 -2
- package/skills/behavioural-testing/fakes.md +3 -3
- package/skills/build/SKILL.md +2 -2
- package/skills/envision/SKILL.md +3 -2
- package/skills/envision/feature.md +3 -1
- package/skills/envision/intake.md +28 -0
- package/skills/envision/possibilities.md +13 -0
- package/skills/envision/project.md +5 -3
- package/skills/explore/SKILL.md +2 -2
- package/skills/formats/SKILL.md +13 -2
- package/skills/formats/reference/architecture.md +7 -3
- package/skills/formats/reference/durable-docs.md +4 -1
- package/skills/formats/reference/work-items.md +1 -1
- package/skills/formats/templates/vision.md +12 -0
- package/skills/grilling/SKILL.md +10 -0
- package/skills/hexagonal-design/languages/rust.md +2 -1
- package/skills/hexagonal-design/runtime.md +1 -0
- package/skills/land/SKILL.md +6 -2
- package/skills/plan/SKILL.md +13 -3
- package/skills/plan/tasks.md +3 -3
- package/skills/realign/SKILL.md +5 -3
- package/skills/realign/notes/0.0.10.md +131 -0
- package/skills/realign/notes/0.0.2.md +1 -1
- package/skills/realign/notes/0.0.6.md +1 -1
- package/skills/realign/notes/0.0.8.md +1 -1
- package/skills/realign/notes/0.0.9.md +2 -2
- package/skills/realign/notes.md +1 -0
- package/skills/research/SKILL.md +3 -2
- package/skills/rethink/SKILL.md +5 -3
- package/skills/rethink/levels.md +6 -6
- package/skills/roadmap/SKILL.md +2 -1
- package/skills/roles/SKILL.md +3 -3
- package/skills/roles/auditor.md +1 -1
- package/skills/roles/code-reviewer.md +2 -2
- package/skills/roles/design-reviewer.md +4 -40
- package/skills/roles/design-rubric.md +40 -0
- package/skills/roles/plan-rubric.md +11 -0
- package/skills/roles/surveyor.md +3 -2
- package/skills/triage/SKILL.md +1 -1
- package/src/adapters/inbound/cli/cli_context.ts +4 -0
- package/src/adapters/inbound/cli/commands/diff.ts +23 -0
- package/src/adapters/inbound/cli/commands/documents.ts +1 -1
- package/src/adapters/inbound/cli/commands/show.ts +66 -2
- package/src/adapters/inbound/cli/commands/status.ts +7 -3
- package/src/adapters/inbound/cli/commands.ts +9 -3
- package/src/adapters/inbound/cli/parse_command.ts +8 -0
- package/src/adapters/outbound/git_repository.ts +9 -0
- package/src/app/ports/repository.ts +4 -0
- package/src/app/use_cases/approve_artifact.ts +18 -10
- package/src/app/use_cases/check_code.ts +5 -3
- package/src/app/use_cases/journal_events.ts +6 -2
- package/src/app/use_cases/new_project_doc.ts +10 -2
- package/src/app/use_cases/run_review.ts +10 -2
- package/src/app/use_cases/show_elements.ts +18 -0
- package/src/app/use_cases/show_notes.ts +11 -0
- package/src/app/use_cases/show_scope.ts +15 -1
- package/src/app/use_cases/upstream_diff.ts +55 -0
- package/src/domain/approvals/rebase.ts +39 -0
- package/src/domain/approvals/upstream_text.ts +36 -0
- package/src/domain/check/check_source.ts +18 -1
- package/src/domain/check/decision_comments.ts +38 -0
- package/src/domain/decision_citations.ts +62 -0
- package/src/domain/edits/agents_file.ts +9 -0
- package/src/domain/ids.ts +3 -1
- package/src/domain/journal.ts +3 -1
- package/src/domain/land/merge_plan.ts +7 -2
- package/src/domain/line_diff.ts +56 -0
- package/src/domain/project/element_lookup.ts +124 -0
- package/src/domain/project/living_model.ts +2 -1
- package/src/domain/project/notes.ts +74 -0
- package/src/domain/skill_budget.ts +36 -0
- package/src/domain/status/next_step.ts +27 -5
- package/src/domain/status/pending_rethink.ts +22 -0
- package/src/domain/status/work_status.ts +17 -2
- package/src/domain/validation/decision_rules.ts +76 -0
- package/src/domain/validation/delta_rules.ts +2 -0
- package/src/domain/validation/future_rules.ts +40 -0
- package/src/domain/validation/living_rules.ts +2 -0
- package/src/domain/validation/validate_project.ts +4 -0
- package/src/domain/validation/vision_rules.ts +41 -0
- package/src/domain/versions/rule_versions.ts +3 -0
- package/templates/init/AGENTS.md +1 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { rowElements } from "../elements.ts";
|
|
2
|
+
import { findSection } from "../markdown.ts";
|
|
3
|
+
import { splitRow } from "../markdown_tables.ts";
|
|
4
|
+
import { PATHS } from "../project/layout.ts";
|
|
5
|
+
import type { ProjectView } from "../project/project_view.ts";
|
|
6
|
+
import { error, type Problem } from "./problem.ts";
|
|
7
|
+
|
|
8
|
+
/** The section and the cells after the ID that each long-term row of the vision holds. */
|
|
9
|
+
const INTENT_ROWS: Record<string, { section: string; cells: string[] }> = {
|
|
10
|
+
PRINCIPLE: { section: "Principles", cells: ["Principle", "Why"] },
|
|
11
|
+
LATER: { section: "Must stay possible", cells: ["Capability", "Likelihood", "Why", "Leave room for"] },
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const LIKELIHOODS = ["likely", "possible"];
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The vision's principles and the capabilities that must stay possible are rows, so designs cite
|
|
18
|
+
* them and approvals pin them. One project kept its principles in a seed note and its long-term
|
|
19
|
+
* plans in the user's head: a feature reversed a principle unnoticed, and a later review proposed
|
|
20
|
+
* removing what those plans needed.
|
|
21
|
+
*/
|
|
22
|
+
export function visionProblems(view: ProjectView): Problem[] {
|
|
23
|
+
const doc = view.living.docs.get(PATHS.vision);
|
|
24
|
+
if (doc === undefined) return [];
|
|
25
|
+
return rowElements(doc).flatMap((row) => {
|
|
26
|
+
const shape = INTENT_ROWS[row.kind];
|
|
27
|
+
if (shape === undefined) return [];
|
|
28
|
+
const section = findSection(doc, shape.section);
|
|
29
|
+
if (section === null || row.start < section.start || row.start >= section.end) {
|
|
30
|
+
return [error(PATHS.vision, row.start, "vision-row", `${row.id} belongs in the table under ## ${shape.section}`)];
|
|
31
|
+
}
|
|
32
|
+
const cells = splitRow(doc.lines[row.start] ?? "").slice(1);
|
|
33
|
+
if (cells.length !== shape.cells.length || cells.some((cell) => cell === "")) {
|
|
34
|
+
return [error(PATHS.vision, row.start, "vision-row", `${row.id} needs ${shape.cells.join(", ")}, each filled`)];
|
|
35
|
+
}
|
|
36
|
+
if (row.kind === "LATER" && !LIKELIHOODS.includes(cells[1] ?? "")) {
|
|
37
|
+
return [error(PATHS.vision, row.start, "vision-row", `${row.id}'s likelihood must be ${LIKELIHOODS.join(" or ")}`)];
|
|
38
|
+
}
|
|
39
|
+
return [];
|
|
40
|
+
});
|
|
41
|
+
}
|
|
@@ -17,6 +17,9 @@ export const RULE_SINCE: Record<string, string> = {
|
|
|
17
17
|
"validate:change-too-large": "0.0.5",
|
|
18
18
|
"validate:plan-too-large": "0.0.5",
|
|
19
19
|
"validate:module-path-glob": "0.0.8",
|
|
20
|
+
"validate:decision-citation": "0.0.10",
|
|
21
|
+
"check:decision-citation": "0.0.10",
|
|
22
|
+
"validate:future-unanchored": "0.0.10",
|
|
20
23
|
};
|
|
21
24
|
|
|
22
25
|
/** Whether a rule arrived after the version the project's code meets, so it waits for `realign`. */
|
package/templates/init/AGENTS.md
CHANGED
|
@@ -25,4 +25,4 @@ Not defined yet. `cruze land` fills this in from the module map in `docs/archite
|
|
|
25
25
|
|
|
26
26
|
## Known pitfalls
|
|
27
27
|
|
|
28
|
-
None recorded yet. `land` adds a line here when the same review finding or defect happens twice.
|
|
28
|
+
None recorded yet. `land` adds a line here when the same review finding or defect about this project's code happens twice.
|