kataster 0.0.0-stage → 0.2.0

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.
Files changed (162) hide show
  1. package/.claude/agents/acceptance-tester.md +53 -0
  2. package/.claude/agents/code-reviewer.md +56 -0
  3. package/.claude/agents/domain-architect.md +40 -0
  4. package/.claude/agents/lead-dev.md +50 -0
  5. package/.claude/agents/product-owner.md +39 -0
  6. package/.claude/agents/repo-analyst.md +78 -0
  7. package/.claude/agents/requirements-engineer.md +44 -0
  8. package/.claude/agents/ux-designer.md +64 -0
  9. package/.claude/hooks/bash-guard.ts +92 -0
  10. package/.claude/hooks/code-check.ts +37 -0
  11. package/.claude/hooks/path-guard.ts +34 -0
  12. package/.claude/hooks/path-rules.ts +66 -0
  13. package/.claude/hooks/project-check.ts +108 -0
  14. package/.claude/hooks/protect-files.ts +55 -0
  15. package/.claude/hooks/session-start.ts +213 -0
  16. package/.claude/hooks/stop-gate.ts +56 -0
  17. package/.claude/hooks/validate-docs.ts +58 -0
  18. package/.claude/lib/architecture.ts +736 -0
  19. package/.claude/lib/backlog-github.ts +454 -0
  20. package/.claude/lib/backlog-jira.ts +347 -0
  21. package/.claude/lib/backlog-sync.ts +42 -0
  22. package/.claude/lib/backlog.ts +396 -0
  23. package/.claude/lib/bazel.ts +212 -0
  24. package/.claude/lib/config.ts +122 -0
  25. package/.claude/lib/discovery.ts +821 -0
  26. package/.claude/lib/engineering.ts +406 -0
  27. package/.claude/lib/nx.ts +129 -0
  28. package/.claude/lib/repo.ts +1194 -0
  29. package/.claude/lib/toolgraph.ts +74 -0
  30. package/.claude/lib/turbo.ts +166 -0
  31. package/.claude/package-lock.json +427 -0
  32. package/.claude/package.json +21 -0
  33. package/.claude/settings.json +82 -0
  34. package/.claude/skills/adopt/SKILL.md +283 -0
  35. package/.claude/skills/adopt/scripts/boundary-check.ts +156 -0
  36. package/.claude/skills/adopt/scripts/package-doc.ts +71 -0
  37. package/.claude/skills/adopt/scripts/repo-map.ts +123 -0
  38. package/.claude/skills/adopt/scripts/rule-doc.ts +80 -0
  39. package/.claude/skills/architect/ADR-FORMAT.md +97 -0
  40. package/.claude/skills/architect/SKILL.md +64 -0
  41. package/.claude/skills/architect/TECH-STACK.md +21 -0
  42. package/.claude/skills/backlog/SKILL.md +198 -0
  43. package/.claude/skills/backlog/scripts/backlog-pull.ts +45 -0
  44. package/.claude/skills/backlog/scripts/backlog-push.ts +38 -0
  45. package/.claude/skills/backlog/scripts/backlog-status.ts +32 -0
  46. package/.claude/skills/backlog/scripts/jira-import.ts +40 -0
  47. package/.claude/skills/backlog/scripts/jira-plan.ts +26 -0
  48. package/.claude/skills/backlog/scripts/jira-record.ts +41 -0
  49. package/.claude/skills/bootstrap/SKILL.md +119 -0
  50. package/.claude/skills/codebase-design/DEEPENING.md +37 -0
  51. package/.claude/skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
  52. package/.claude/skills/codebase-design/SKILL.md +114 -0
  53. package/.claude/skills/domain-model/CONTEXT-FORMAT.md +47 -0
  54. package/.claude/skills/domain-model/SKILL.md +64 -0
  55. package/.claude/skills/domain-model/templates/data-model.md +29 -0
  56. package/.claude/skills/engineering-conventions/SKILL.md +31 -0
  57. package/.claude/skills/event-storming/SKILL.md +44 -0
  58. package/.claude/skills/event-storming/schema/events.schema.json +124 -0
  59. package/.claude/skills/event-storming/scripts/render-event-storming.ts +11 -0
  60. package/.claude/skills/event-storming/scripts/validate-events.ts +11 -0
  61. package/.claude/skills/event-storming/templates/events.example.yaml +91 -0
  62. package/.claude/skills/feature/SKILL.md +86 -0
  63. package/.claude/skills/feature/scripts/intake.ts +356 -0
  64. package/.claude/skills/grill-me/SKILL.md +7 -0
  65. package/.claude/skills/grill-with-docs/SKILL.md +7 -0
  66. package/.claude/skills/grilling/SKILL.md +30 -0
  67. package/.claude/skills/groom-backlog/SKILL.md +93 -0
  68. package/.claude/skills/groom-backlog/scripts/backlog-health.ts +238 -0
  69. package/.claude/skills/implement/SKILL.md +129 -0
  70. package/.claude/skills/implement/scripts/affected.ts +245 -0
  71. package/.claude/skills/implement/scripts/check-commands.ts +37 -0
  72. package/.claude/skills/implement/scripts/check-language.ts +15 -0
  73. package/.claude/skills/implement/scripts/check-scenarios.ts +59 -0
  74. package/.claude/skills/implement/scripts/next-story.ts +23 -0
  75. package/.claude/skills/implement/scripts/story-context.ts +135 -0
  76. package/.claude/skills/implement/scripts/story-status.ts +47 -0
  77. package/.claude/skills/implement/scripts/verify.ts +92 -0
  78. package/.claude/skills/improve-codebase-architecture/HTML-REPORT.md +123 -0
  79. package/.claude/skills/improve-codebase-architecture/SKILL.md +71 -0
  80. package/.claude/skills/retro/SKILL.md +53 -0
  81. package/.claude/skills/review-stories/SKILL.md +31 -0
  82. package/.claude/skills/shape/SKILL.md +193 -0
  83. package/.claude/skills/tdd/SKILL.md +38 -0
  84. package/.claude/skills/tdd/mocking.md +59 -0
  85. package/.claude/skills/tdd/tests.md +77 -0
  86. package/.claude/skills/user-stories/SKILL.md +138 -0
  87. package/.claude/skills/user-stories/schema/story.schema.json +39 -0
  88. package/.claude/skills/user-stories/scripts/render-backlog.ts +4 -0
  89. package/.claude/skills/user-stories/scripts/validate-stories.ts +13 -0
  90. package/.claude/skills/user-stories/templates/story-template.md +38 -0
  91. package/.claude/skills/ux-design/SKILL.md +107 -0
  92. package/.claude/skills/writing-for-agents/SKILL-MECHANICS.md +22 -0
  93. package/.claude/skills/writing-for-agents/SKILL.md +81 -0
  94. package/.claude/tsconfig.json +15 -0
  95. package/.opencode/agents/acceptance-tester.md +64 -0
  96. package/.opencode/agents/code-reviewer.md +69 -0
  97. package/.opencode/agents/domain-architect.md +59 -0
  98. package/.opencode/agents/lead-dev.md +67 -0
  99. package/.opencode/agents/product-owner.md +59 -0
  100. package/.opencode/agents/repo-analyst.md +86 -0
  101. package/.opencode/agents/requirements-engineer.md +58 -0
  102. package/.opencode/agents/ux-designer.md +83 -0
  103. package/.opencode/commands/adopt.md +7 -0
  104. package/.opencode/commands/backlog-sync.md +7 -0
  105. package/.opencode/commands/bootstrap.md +7 -0
  106. package/.opencode/commands/event-storming.md +7 -0
  107. package/.opencode/commands/feature.md +7 -0
  108. package/.opencode/commands/grill-me.md +7 -0
  109. package/.opencode/commands/grill-with-docs.md +7 -0
  110. package/.opencode/commands/groom-backlog.md +7 -0
  111. package/.opencode/commands/implement.md +7 -0
  112. package/.opencode/commands/improve-codebase-architecture.md +7 -0
  113. package/.opencode/commands/retro.md +7 -0
  114. package/.opencode/commands/review-stories.md +7 -0
  115. package/.opencode/commands/shape.md +7 -0
  116. package/.opencode/opencode.jsonc +15 -0
  117. package/.opencode/plugins/kataster/index.ts +283 -0
  118. package/AGENTS.md +21 -0
  119. package/CHANGELOG.md +82 -0
  120. package/LICENSE +21 -0
  121. package/README.md +324 -2
  122. package/bin/kataster.mjs +7 -0
  123. package/extras/skills/shadcn/SKILL.md +277 -0
  124. package/extras/skills/shadcn/agents/openai.yml +5 -0
  125. package/extras/skills/shadcn/assets/shadcn-small.png +0 -0
  126. package/extras/skills/shadcn/assets/shadcn.png +0 -0
  127. package/extras/skills/shadcn/cli.md +290 -0
  128. package/extras/skills/shadcn/customization.md +209 -0
  129. package/extras/skills/shadcn/evals/evals.json +77 -0
  130. package/extras/skills/shadcn/mcp.md +105 -0
  131. package/extras/skills/shadcn/registry.md +277 -0
  132. package/extras/skills/shadcn/rules/base-vs-radix.md +306 -0
  133. package/extras/skills/shadcn/rules/chat.md +250 -0
  134. package/extras/skills/shadcn/rules/composition.md +213 -0
  135. package/extras/skills/shadcn/rules/forms.md +192 -0
  136. package/extras/skills/shadcn/rules/icons.md +101 -0
  137. package/extras/skills/shadcn/rules/styling.md +185 -0
  138. package/guide/README.md +9 -0
  139. package/guide/brownfield.md +242 -0
  140. package/guide/concepts.md +109 -0
  141. package/guide/greenfield.md +84 -0
  142. package/guide/install.md +144 -0
  143. package/guide/release.md +62 -0
  144. package/package.json +56 -4
  145. package/src/cli.mjs +302 -0
  146. package/src/detect.mjs +237 -0
  147. package/src/install.mjs +427 -0
  148. package/src/repo.mjs +129 -0
  149. package/src/util.mjs +110 -0
  150. package/templates/CONTEXT.md +21 -0
  151. package/templates/conventions.md +63 -0
  152. package/templates/docs/adr/README.md +7 -0
  153. package/templates/docs/architecture/data-model.md +31 -0
  154. package/templates/docs/domain/context-map.md +21 -0
  155. package/templates/docs/domain/events.yaml +23 -0
  156. package/templates/docs/product/initiatives/README.md +41 -0
  157. package/templates/docs/product/ux-guidelines.md +27 -0
  158. package/templates/docs/product/vision.md +36 -0
  159. package/templates/docs/reviews/.gitkeep +0 -0
  160. package/templates/docs/stories/OPEN_QUESTIONS.md +8 -0
  161. package/templates/docs/stories/README.md +26 -0
  162. package/templates/docs/workflow.md +135 -0
@@ -0,0 +1,63 @@
1
+ # Engineering conventions – {{project}}
2
+
3
+ <!--
4
+ How the code is built here. The ADRs decide WHAT; this file says HOW. `/adopt` fills it from the
5
+ existing codebase; a greenfield project writes it after the first foundation stories, when the shapes
6
+ actually exist (not before).
7
+
8
+ Keep it factual and short enough to be read before writing a story. When code and this file disagree,
9
+ raise it – don't silently follow either.
10
+
11
+ It must answer, for this repository:
12
+ -->
13
+
14
+ ## Module layout
15
+
16
+ [OPEN] Which directories exist, what belongs in each, and which imports are allowed across them?
17
+
18
+ ## Monorepo and shared libraries
19
+
20
+ [OPEN] Which tool builds and tests across packages (Nx, Turborepo, Bazel, pnpm/npm/yarn workspaces, Go, Cargo,
21
+ Gradle, Maven)? How do you run one package, and how do you run only affected tests? What may a shared library
22
+ import, and who are its consumers? The generated overview is in `docs/architecture/repo-map.md`; `repo-map`
23
+ stores the build tool's graph (Turbo, Nx, Bazel) and `affected.ts` turns changed files into the native command.
24
+
25
+ ## Architecture enforcement
26
+
27
+ [OPEN] Which rules are checked deterministically, and where? `docs/architecture/boundaries.yaml` holds the
28
+ allowed/forbidden edges (first match wins), `docs/engineering/checks.yaml` decides what runs at edit time and at
29
+ Stop/CI, and `.claude/rules/*.md` holds path-scoped rules a directory cannot express. Existing violations live in
30
+ `docs/architecture/boundaries.baseline.json`; only new ones fail. Name the engine for non-JS/TS stacks
31
+ (dependency-cruiser, Nx module boundaries, Bazel, ArchUnit, import-linter).
32
+
33
+ ## Commands and events
34
+
35
+ [OPEN] How does a command run (transaction, authorization, version check)? Where do domain events go?
36
+ How are automatic policies triggered? What is the ID convention?
37
+
38
+ ## Read models
39
+
40
+ [OPEN] Where do queries live, and how do they stay out of the write path?
41
+
42
+ ## Time-based rules
43
+
44
+ [OPEN] How is "now" injected, so due/overdue rules are testable?
45
+
46
+ ## UI and texts
47
+
48
+ [OPEN] Where do texts live, which language(s), which shared components/frames exist?
49
+
50
+ ## Test data and seams
51
+
52
+ [OPEN] Test data builders, fixed clock, database per test run.
53
+
54
+ ### Seam catalog
55
+
56
+ Which seam each kind of code is tested at. `/implement` only stops for the user when a seam is missing here.
57
+
58
+ | Kind of code | Seam | Test type | Example |
59
+ |---|---|---|---|
60
+ | Pure domain rule | the rule's public function | unit | – |
61
+ | Command | the command through its public interface | integration | – |
62
+ | Read model | the query | integration | – |
63
+ | Page, form, flow | the browser | e2e | – |
@@ -0,0 +1,7 @@
1
+ # Architecture decisions
2
+
3
+ `NNNN-slug.md`, sequential, never reused. Format and when to write one:
4
+ `.claude/skills/architect/ADR-FORMAT.md`.
5
+
6
+ New ADRs start as `proposed`; **only the user sets `accepted`**. Accepted ADRs are never edited – they are
7
+ superseded by a new ADR. The hooks enforce that.
@@ -0,0 +1,31 @@
1
+ # Logical data model – {{project}}
2
+
3
+ <!--
4
+ Stack-neutral until an ADR decides the stack. Per aggregate: root entity, entities, value objects,
5
+ attributes with domain types, required/optional. Lifecycle as a Mermaid stateDiagram-v2, overall view
6
+ as an erDiagram. Every attribute traces back to an event's `data` or a read model's `fields`;
7
+ anything without a source is a hotspot.
8
+ -->
9
+
10
+ ## Aggregates
11
+
12
+ <!--
13
+ ### AGG-Example – <name>
14
+ | Attribute | Type | Required | Source |
15
+ |---|---|---|---|
16
+ | … | … | yes | EVT-… |
17
+ -->
18
+
19
+ ## Lifecycle
20
+
21
+ ```mermaid
22
+ stateDiagram-v2
23
+ %% [*] --> Example
24
+ ```
25
+
26
+ ## Overview
27
+
28
+ ```mermaid
29
+ erDiagram
30
+ %% AGG_EXAMPLE ||--o{ AGG_OTHER : references
31
+ ```
@@ -0,0 +1,21 @@
1
+ # Context map – {{project}}
2
+
3
+ <!--
4
+ One section per bounded context: purpose, core terms, owner role. Relationships as a Mermaid flowchart
5
+ using the DDD patterns: Customer/Supplier, Conformist, Anti-Corruption Layer, Shared Kernel,
6
+ Published Language. 2–4 contexts are typical for a small system.
7
+ -->
8
+
9
+ ```mermaid
10
+ flowchart LR
11
+ %% BC-ExampleA -->|Customer/Supplier| BC-ExampleB
12
+ ```
13
+
14
+ ## Contexts
15
+
16
+ <!--
17
+ ### BC-Example – <name>
18
+ Purpose: …
19
+ Core terms: …
20
+ Owner role: …
21
+ -->
@@ -0,0 +1,23 @@
1
+ # Event storming model
2
+ #
3
+ # Single source of truth for events, commands, policies, read models, aggregates and bounded contexts.
4
+ # Format: .claude/skills/event-storming/templates/events.example.yaml
5
+ # Schema: .claude/skills/event-storming/schema/events.schema.json
6
+ #
7
+ # Written by /bootstrap, /adopt, /event-storming and /feature. Validated and rendered to
8
+ # docs/domain/event-storming.md after every write. An empty model is valid: it grows during discovery.
9
+
10
+ version: 1
11
+ domain: {{project}}
12
+
13
+ events: []
14
+
15
+ # actors: []
16
+ # external_systems: []
17
+ # bounded_contexts: []
18
+ # aggregates: []
19
+ # commands: []
20
+ # policies: []
21
+ # read_models: []
22
+ # hotspots: []
23
+ # flows: []
@@ -0,0 +1,41 @@
1
+ # Initiatives
2
+
3
+ Proposals for ideas larger than one feature, written by `/shape`. An initiative is **not** a work item: it has no
4
+ `ready`/`done`, creates no stories and never replaces `docs/stories/`. It answers four questions and ends with a
5
+ recommendation:
6
+
7
+ 1. Should we do this at all?
8
+ 2. Where does it belong – an existing bounded context, a new one, a shared library?
9
+ 3. What changes, and what is genuinely new?
10
+ 4. What does it roughly cost – in scope, range and risk?
11
+
12
+ File: `<slug>.md`, one per initiative. Status is `proposed` until the user accepts it; `parked` and `rejected` are
13
+ final until a new initiative replaces them. On handoff to `/feature`, set `promoted: <slug>` and let the stories
14
+ carry the label `feature:<slug>`.
15
+
16
+ ```markdown
17
+ ---
18
+ status: proposed # proposed | accepted | parked | rejected
19
+ created: YYYY-MM-DD
20
+ source: "" # optional ticket reference
21
+ promoted: "" # feature:<slug> once slices are handed to /feature
22
+ ---
23
+
24
+ # Initiative: <title>
25
+
26
+ ## Problem & outcome
27
+ ## Fit with the vision
28
+ ## Placement
29
+ | Capability | Context | New/existing | Why | Confidence |
30
+ ## Impact – change vs. build new
31
+ | Dimension | Change | New | Evidence |
32
+ ## Slices
33
+ 1. …
34
+ ## Rough cost
35
+ | Currency | Estimate | Confidence | Basis |
36
+ ## Risks & open questions
37
+ ## Recommendation
38
+ ```
39
+
40
+ Cost is always a range with a basis and a confidence – never a single number. An unknown is a line in the brief,
41
+ not a silent percentage.
@@ -0,0 +1,27 @@
1
+ # UX guidelines – {{project}}
2
+
3
+ <!--
4
+ The yardstick, not the method. The method is `.claude/skills/ux-design/SKILL.md`.
5
+ Every guideline is a rule someone can point at, with the date and the reason it was decided.
6
+ `ux-designer` maintains this file; the user approves a guideline before it is written here.
7
+
8
+ Format:
9
+ ## G1 – <short rule>
10
+ <One or two sentences, in the voice of a rule.> (YYYY-MM-DD – reason)
11
+ -->
12
+
13
+ ## Devices and context
14
+
15
+ [OPEN] Which devices, which screen sizes, which situations? Is there a design size?
16
+
17
+ ## Language
18
+
19
+ UI language: {{uiLanguage}}. [OPEN] Which terms appear, and which pages are in another language?
20
+
21
+ ## The states every screen needs
22
+
23
+ [OPEN] Empty, full, rejected, no permission – how does each one look and what does it say?
24
+
25
+ ## Patterns
26
+
27
+ [OPEN] Recurring decisions (forms keep input after a rejection, lists newest first, …) become G-numbers here.
@@ -0,0 +1,36 @@
1
+ # Vision – {{project}}
2
+
3
+ <!--
4
+ Source of truth for scope. `/bootstrap` and `/adopt` grill this file with the user and remove every
5
+ answered `[OPEN]`. Keep it short enough that someone reads it before a decision.
6
+ -->
7
+
8
+ ## Problem
9
+
10
+ [OPEN] Which problem does the software solve, for whom, and what happens today without it?
11
+
12
+ ## User groups
13
+
14
+ | Group | What they need | Where they are |
15
+ |---|---|---|
16
+ | [OPEN] | | |
17
+
18
+ ## Goals
19
+
20
+ - [OPEN] What must be true for this to be worth building? Make it measurable.
21
+
22
+ ## Non-goals
23
+
24
+ - [OPEN] What is explicitly out of scope? (As valuable as the goals.)
25
+
26
+ ## Success criteria
27
+
28
+ - [OPEN] How do we know in three months that this worked?
29
+
30
+ ## Constraints
31
+
32
+ - [OPEN] Devices, connectivity, languages, legal, budget, deadlines, existing systems.
33
+
34
+ ## Domain in one paragraph
35
+
36
+ [OPEN] The business in plain language: what moves through the system, who decides what.
File without changes
@@ -0,0 +1,8 @@
1
+ # Open questions
2
+
3
+ Decisions that block a story or an artifact. One row per question; the answer is written here and the
4
+ `[OPEN]` marker is removed from the artifact.
5
+
6
+ | Story/artifact | Question | Since | Answer |
7
+ |---|---|---|---|
8
+ | – | – | – | – |
@@ -0,0 +1,26 @@
1
+ # Stories
2
+
3
+ One Markdown file per story: `ST-NNN-short-title.md`. `BACKLOG.md` is generated – never edit it by hand.
4
+ Rules, format and splitting: `.claude/skills/user-stories/SKILL.md`.
5
+ Template: `.claude/skills/user-stories/templates/story-template.md`.
6
+
7
+ Workflow: `draft → review → ready → in-progress → done` (plus `superseded`).
8
+
9
+ - Discovery ends at `ready`; `/implement` moves a story to `in-progress` and `done`.
10
+ - A story that turns out wrong goes back to `review` with an `[OPEN]` and a row in `OPEN_QUESTIONS.md`.
11
+ - `done` is final: a change to finished behaviour is a new story.
12
+
13
+ ## Backlog backend
14
+
15
+ `docs/stories/` is the backlog when `.claude/project.json` has `backlog.provider: "local"` (the default). With
16
+ `"github"` or `"jira"`, the tracker is the source of truth and this directory is its **local mirror**:
17
+
18
+ - a story keeps its stable `ST-NNN` id and carries `external: { provider, key, url }`
19
+ - pull before reviewing or implementing, push after creating, changing or approving a story
20
+ - a story must be linked before it reaches `ready`
21
+ - the tracker wins on conflict; the local copy is backed up, never silently lost
22
+ - reviews and `OPEN_QUESTIONS.md` stay local; `BACKLOG.md` is generated from the mirror
23
+
24
+ Sync with `/backlog-sync`; the rules are in `.claude/skills/backlog/SKILL.md`.
25
+
26
+ Start with `/bootstrap` (greenfield) or `/adopt` (brownfield), then `/feature` for new work.
@@ -0,0 +1,135 @@
1
+ # Workflow – {{project}}
2
+
3
+ The map of this repository's agent workflow. `AGENTS.md` is the short version loaded into every session; this file
4
+ is what to read when you are unsure where something belongs.
5
+
6
+ ## Two phases
7
+
8
+ - **Discovery** produces the domain artifacts in `docs/` – including the backlog of stories as Markdown files. It
9
+ continues for every new feature (`/feature`).
10
+ - **Engineering** implements the `ready` stories one by one with `/implement`. Code and discovery artifacts live in
11
+ the same repository and change together.
12
+
13
+ ## Sources of truth
14
+
15
+ | Artifact | File | Owner |
16
+ |---|---|---|
17
+ | Vision, user groups, scope | `docs/product/vision.md` | user + `product-owner` |
18
+ | Initiative briefs (proposals, no stories) | `docs/product/initiatives/<slug>.md` | `/shape`; user accepts |
19
+ | UI/UX decisions (yardstick) | `docs/product/ux-guidelines.md` | `ux-designer` (user approves) |
20
+ | Glossary (ubiquitous language) | `CONTEXT.md` | `domain-model` skill |
21
+ | Event storming model | `docs/domain/events.yaml` | event storming / `domain-architect` |
22
+ | Visualization (generated!) | `docs/domain/event-storming.md` | hook – never edit manually |
23
+ | Context map | `docs/domain/context-map.md` | `domain-architect` |
24
+ | Logical data model | `docs/architecture/data-model.md` | `domain-architect` |
25
+ | Repository map (generated!) | `docs/architecture/repo-map.json`, `docs/architecture/repo-map.md` | `repo-map.ts` – never edit manually |
26
+ | Package docs (loaded on demand) | `<package>/AGENTS.md` + `<package>/CLAUDE.md` | `/adopt`, user confirms the prose |
27
+ | Path-scoped rules | `.claude/rules/*.md` (both harnesses) | `/adopt`, user approves |
28
+ | Architecture boundaries | `docs/architecture/boundaries.yaml` | user confirms; checked by `boundary-check.ts` |
29
+ | Existing boundary debt (generated) | `docs/architecture/boundaries.baseline.json` | `boundary-check.ts --update-baseline` |
30
+ | Project checks (what runs when) | `docs/engineering/checks.yaml` | `/adopt`, user approves |
31
+ | Architecture decisions (ADRs) | `docs/adr/` | `architect` skill / `domain-architect` (user accepts) |
32
+ | Stories | `docs/stories/ST-NNN-*.md` | `requirements-engineer`; status by `/implement`; with a tracker this is the mirror |
33
+ | Backlog backend | `.claude/project.json` → `backlog.provider` – `local`, `github` or `jira` | user |
34
+ | Backlog mirror (with a tracker) | `docs/stories/` | `/backlog-sync` |
35
+ | Backlog (generated!) | `docs/stories/BACKLOG.md` | hook – never edit manually |
36
+ | Open questions | `docs/stories/OPEN_QUESTIONS.md` | everyone |
37
+ | Reviews | `docs/reviews/` | `review-stories`, `acceptance-tester`, `code-reviewer` |
38
+ | Engineering conventions, seam catalog | `docs/engineering/conventions.md` | written after the foundation, user approves |
39
+ | Application code and tests | `repo.codeRoots` in `.claude/project.json` | `/implement` |
40
+
41
+ ## Commands
42
+
43
+ | Command | Covers |
44
+ |---|---|
45
+ | `/bootstrap` | greenfield: vision → event storming → model → architecture → UX → stories |
46
+ | `/adopt [scope] [--stories]` | brownfield: repo map → one slice (domain + shared library) → evidence → domain draft → package docs → grilling → gap register; stories only with `--stories`; repeat per slice |
47
+ | `/shape <idea \| ticket>` | before a large feature: frame, place (existing/new context, shared library), impact, slices, rough cost range, recommendation; creates no stories; `--dry-run` writes nothing |
48
+ | `boundary-check.ts` | architecture boundaries: `--init`, `--update-baseline`, `--changed`, `--json` |
49
+ | `affected.ts` | monorepo fast loop: changed files or `--base` → affected packages + native test command |
50
+ | `grilling` (`/grill-me`) | relentless interview in rounds with recommended answers – how we ask questions |
51
+ | `/grill-with-docs` | grilling + `domain-model` + `architect`: writes glossary and ADRs as it goes |
52
+ | `/event-storming [process]`, `/feature <idea \| ST-NNN \| ticket>` | discovery entry points; both start by grilling. `/feature` resolves a story or ticket read-only and routes bugs to a regression story |
53
+ | `user-stories`, `/review-stories` | story format, validation, review |
54
+ | `backlog`, `/backlog-sync` | local / GitHub Issues / Jira mirror, sync and conflict rules |
55
+ | `ux-design` | how we decide the interface: the UX frontier, what a story says about a screen, review order |
56
+ | `/groom-backlog` | periodic challenge of the open backlog |
57
+ | `/implement [ST-NNN]` | one story test-first, verify, review, refactor, acceptance, pull request |
58
+ | `tdd` | red → green loop, good tests, seams |
59
+ | `codebase-design` | vocabulary for deep modules |
60
+ | `/improve-codebase-architecture` | periodic scan for deepening opportunities, then grilling |
61
+ | `/retro` | retrospective on a session; the user picks the changes |
62
+ | `writing-for-agents` | how to write skills, agent files and `AGENTS.md` |
63
+
64
+ ## Rules
65
+
66
+ - **Language.** Artifacts and code are in the artifact language (`languages.artifacts`), UI texts in the UI language
67
+ (`languages.ui`) – both in `.claude/project.json`. IDs are CamelCase with a prefix (`EVT-OrderPlaced`).
68
+ - **Domain terms exactly as in `CONTEXT.md`**, never an `_Avoid_` synonym – in docs and in code. A new term goes into
69
+ `CONTEXT.md` first.
70
+ - **Don't guess.** Capture anything unclear as a hotspot (`HS-n` in `events.yaml`) or `[OPEN]` plus a row in
71
+ `OPEN_QUESTIONS.md`. During implementation, a wrong or unclear story goes back to `review` – never decided in code.
72
+ - **`events.yaml` and stories are validated by a hook after every write**, including status changes. Fix errors
73
+ immediately; never work around them.
74
+ - **Tech stack only after event storming and domain model**, via ADR. New ADRs are `proposed`; only the user sets
75
+ `accepted`. Accepted ADRs are never edited, only superseded (a hook enforces it).
76
+ - **The backlog is local by default.** `docs/stories/` is the backlog and no issue tracker is required. With
77
+ `backlog.provider` = `jira` or `github` in `.claude/project.json`, the tracker is the source of truth and
78
+ `docs/stories/` is its local mirror; sync through `/backlog-sync` and never edit `BACKLOG.md` by hand. Reviews and
79
+ open questions stay local. `ST-NNN` stays the stable id; the tracker key lives in `external`.
80
+ - **Traceability in the code**: every Gherkin scenario has a test titled exactly `ST-NNN: <scenario title>`;
81
+ commands, events, read models and policies carry their ID from `events.yaml`. `verify.ts` checks both.
82
+ - **Status changes** go through `node .claude/skills/implement/scripts/story-status.ts`. A `done` story is never
83
+ reopened – changes become a new story.
84
+ - **Never weaken or delete a test to get green.** One branch and one pull request per story; the user merges.
85
+ - **Subagents don't know the conversation**: when delegating, pass file paths and a clear task.
86
+ - **Adopt in slices.** One domain plus at most one shared library per session; never the whole monorepo. The
87
+ ranking in `docs/architecture/repo-map.md` suggests where to start.
88
+ - **The root `AGENTS.md` has no domain.** Structure, commands, hard conventions and links. Domain language lives
89
+ in `CONTEXT.md`, package reality in `<package>/AGENTS.md` – loaded only when someone works there.
90
+ - **Directory docs before glob rules.** Rules that apply to a directory belong in its `AGENTS.md`; `.claude/rules/`
91
+ with `paths:` is for patterns a directory cannot express. Claude Code scopes it natively, OpenCode's plugin
92
+ attaches it when a matching file is read or written – one file, both harnesses.
93
+ - **Checks are green on day one.** Brownfield checks start report-only with a baseline and only new violations
94
+ fail; a red hook gets switched off. `docs/engineering/checks.yaml` decides what runs at edit time and at
95
+ Stop/CI; the `project-check.ts` dispatcher is wired once and never per package.
96
+ - **Boundaries are data, not prose.** `docs/architecture/boundaries.yaml` lists the allowed/forbidden edges
97
+ (first match wins); `boundary-check.ts` enforces them. Existing debt lives in
98
+ `boundaries.baseline.json` and only shrinks.
99
+ - **A ticket is evidence, not a specification.** When `/feature` starts from an `ST-NNN`, `#issue` or Jira key, the
100
+ source is recorded in the story (`Source: …`), its acceptance criteria are grilled like any other claim, and
101
+ `external` is still written only by the backlog sync. A bug is a story with the label `bug`, not a separate type; a
102
+ change to a documented rule is a feature, because the rule changes.
103
+ - **Initiatives are not a backlog.** `docs/product/initiatives/` holds proposals from `/shape`; they have no
104
+ `ready`/`done` and create no stories. Only `docs/stories/` is work. Cost is a range with a basis and a
105
+ confidence – never a single number, never a commitment.
106
+ - **At most 3 questions to the user at once** – except in grilling rounds, which ask the whole frontier.
107
+
108
+ ## Workflow
109
+
110
+ Discovery, first time: `/bootstrap` (greenfield) or `/adopt` (existing code), then `/review-stories` until stories
111
+ are `ready`. A monorepo is adopted slice by slice: finish one domain plus its shared library, then run
112
+ `/adopt <next path>` – the map keeps track of what is adopted. Later features: `/feature <idea | ticket>`; an idea
113
+ larger than one feature goes through `/shape` first and then `/feature` per slice.
114
+
115
+ Engineering, story by story: `/implement [ST-NNN]` (empty = next ready story whose dependencies are done):
116
+ prepare → test plan → red/green per scenario → `verify.ts` → review lane scaled to risk → refactor → acceptance
117
+ tester's verdict → `done` + pull request; **the user only merges**. Start the next story in a fresh session.
118
+
119
+ With a tracker: pull before `/review-stories`, `/groom-backlog` and `/implement`; push after changing or approving
120
+ stories and after `done`. The tracker leads on conflict; `docs/stories/` is the mirror and `BACKLOG.md` stays
121
+ generated from it.
122
+
123
+ Periodic: `/improve-codebase-architecture` and `/groom-backlog` after a bounded context or about every 8–10 done
124
+ domain stories – not in between. Progress is measured in done domain stories and scenarios, not in story count.
125
+
126
+ ## Tool access
127
+
128
+ - **`gh`** (optional): with it, `/implement` opens the pull request itself and a GitHub backlog syncs; without it, push
129
+ and hand the user the compare URL. The session-start hook reports what is missing.
130
+ - **`mcp-atlassian`** (optional, for a Jira backlog): configured in the harness. Jira reads and writes go through the
131
+ MCP tools; the local mirror keeps validation and traceability deterministic.
132
+ - **Preview provider** (optional, `review.preview` in `.claude/project.json`): with it, acceptance testing uses the
133
+ branch preview; without it, the reviewers work from the code.
134
+ - Never work around missing access silently (no token in a file, no login in the background) – report it and let the
135
+ user decide.