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.
- package/.claude/agents/acceptance-tester.md +53 -0
- package/.claude/agents/code-reviewer.md +56 -0
- package/.claude/agents/domain-architect.md +40 -0
- package/.claude/agents/lead-dev.md +50 -0
- package/.claude/agents/product-owner.md +39 -0
- package/.claude/agents/repo-analyst.md +78 -0
- package/.claude/agents/requirements-engineer.md +44 -0
- package/.claude/agents/ux-designer.md +64 -0
- package/.claude/hooks/bash-guard.ts +92 -0
- package/.claude/hooks/code-check.ts +37 -0
- package/.claude/hooks/path-guard.ts +34 -0
- package/.claude/hooks/path-rules.ts +66 -0
- package/.claude/hooks/project-check.ts +108 -0
- package/.claude/hooks/protect-files.ts +55 -0
- package/.claude/hooks/session-start.ts +213 -0
- package/.claude/hooks/stop-gate.ts +56 -0
- package/.claude/hooks/validate-docs.ts +58 -0
- package/.claude/lib/architecture.ts +736 -0
- package/.claude/lib/backlog-github.ts +454 -0
- package/.claude/lib/backlog-jira.ts +347 -0
- package/.claude/lib/backlog-sync.ts +42 -0
- package/.claude/lib/backlog.ts +396 -0
- package/.claude/lib/bazel.ts +212 -0
- package/.claude/lib/config.ts +122 -0
- package/.claude/lib/discovery.ts +821 -0
- package/.claude/lib/engineering.ts +406 -0
- package/.claude/lib/nx.ts +129 -0
- package/.claude/lib/repo.ts +1194 -0
- package/.claude/lib/toolgraph.ts +74 -0
- package/.claude/lib/turbo.ts +166 -0
- package/.claude/package-lock.json +427 -0
- package/.claude/package.json +21 -0
- package/.claude/settings.json +82 -0
- package/.claude/skills/adopt/SKILL.md +283 -0
- package/.claude/skills/adopt/scripts/boundary-check.ts +156 -0
- package/.claude/skills/adopt/scripts/package-doc.ts +71 -0
- package/.claude/skills/adopt/scripts/repo-map.ts +123 -0
- package/.claude/skills/adopt/scripts/rule-doc.ts +80 -0
- package/.claude/skills/architect/ADR-FORMAT.md +97 -0
- package/.claude/skills/architect/SKILL.md +64 -0
- package/.claude/skills/architect/TECH-STACK.md +21 -0
- package/.claude/skills/backlog/SKILL.md +198 -0
- package/.claude/skills/backlog/scripts/backlog-pull.ts +45 -0
- package/.claude/skills/backlog/scripts/backlog-push.ts +38 -0
- package/.claude/skills/backlog/scripts/backlog-status.ts +32 -0
- package/.claude/skills/backlog/scripts/jira-import.ts +40 -0
- package/.claude/skills/backlog/scripts/jira-plan.ts +26 -0
- package/.claude/skills/backlog/scripts/jira-record.ts +41 -0
- package/.claude/skills/bootstrap/SKILL.md +119 -0
- package/.claude/skills/codebase-design/DEEPENING.md +37 -0
- package/.claude/skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
- package/.claude/skills/codebase-design/SKILL.md +114 -0
- package/.claude/skills/domain-model/CONTEXT-FORMAT.md +47 -0
- package/.claude/skills/domain-model/SKILL.md +64 -0
- package/.claude/skills/domain-model/templates/data-model.md +29 -0
- package/.claude/skills/engineering-conventions/SKILL.md +31 -0
- package/.claude/skills/event-storming/SKILL.md +44 -0
- package/.claude/skills/event-storming/schema/events.schema.json +124 -0
- package/.claude/skills/event-storming/scripts/render-event-storming.ts +11 -0
- package/.claude/skills/event-storming/scripts/validate-events.ts +11 -0
- package/.claude/skills/event-storming/templates/events.example.yaml +91 -0
- package/.claude/skills/feature/SKILL.md +86 -0
- package/.claude/skills/feature/scripts/intake.ts +356 -0
- package/.claude/skills/grill-me/SKILL.md +7 -0
- package/.claude/skills/grill-with-docs/SKILL.md +7 -0
- package/.claude/skills/grilling/SKILL.md +30 -0
- package/.claude/skills/groom-backlog/SKILL.md +93 -0
- package/.claude/skills/groom-backlog/scripts/backlog-health.ts +238 -0
- package/.claude/skills/implement/SKILL.md +129 -0
- package/.claude/skills/implement/scripts/affected.ts +245 -0
- package/.claude/skills/implement/scripts/check-commands.ts +37 -0
- package/.claude/skills/implement/scripts/check-language.ts +15 -0
- package/.claude/skills/implement/scripts/check-scenarios.ts +59 -0
- package/.claude/skills/implement/scripts/next-story.ts +23 -0
- package/.claude/skills/implement/scripts/story-context.ts +135 -0
- package/.claude/skills/implement/scripts/story-status.ts +47 -0
- package/.claude/skills/implement/scripts/verify.ts +92 -0
- package/.claude/skills/improve-codebase-architecture/HTML-REPORT.md +123 -0
- package/.claude/skills/improve-codebase-architecture/SKILL.md +71 -0
- package/.claude/skills/retro/SKILL.md +53 -0
- package/.claude/skills/review-stories/SKILL.md +31 -0
- package/.claude/skills/shape/SKILL.md +193 -0
- package/.claude/skills/tdd/SKILL.md +38 -0
- package/.claude/skills/tdd/mocking.md +59 -0
- package/.claude/skills/tdd/tests.md +77 -0
- package/.claude/skills/user-stories/SKILL.md +138 -0
- package/.claude/skills/user-stories/schema/story.schema.json +39 -0
- package/.claude/skills/user-stories/scripts/render-backlog.ts +4 -0
- package/.claude/skills/user-stories/scripts/validate-stories.ts +13 -0
- package/.claude/skills/user-stories/templates/story-template.md +38 -0
- package/.claude/skills/ux-design/SKILL.md +107 -0
- package/.claude/skills/writing-for-agents/SKILL-MECHANICS.md +22 -0
- package/.claude/skills/writing-for-agents/SKILL.md +81 -0
- package/.claude/tsconfig.json +15 -0
- package/.opencode/agents/acceptance-tester.md +64 -0
- package/.opencode/agents/code-reviewer.md +69 -0
- package/.opencode/agents/domain-architect.md +59 -0
- package/.opencode/agents/lead-dev.md +67 -0
- package/.opencode/agents/product-owner.md +59 -0
- package/.opencode/agents/repo-analyst.md +86 -0
- package/.opencode/agents/requirements-engineer.md +58 -0
- package/.opencode/agents/ux-designer.md +83 -0
- package/.opencode/commands/adopt.md +7 -0
- package/.opencode/commands/backlog-sync.md +7 -0
- package/.opencode/commands/bootstrap.md +7 -0
- package/.opencode/commands/event-storming.md +7 -0
- package/.opencode/commands/feature.md +7 -0
- package/.opencode/commands/grill-me.md +7 -0
- package/.opencode/commands/grill-with-docs.md +7 -0
- package/.opencode/commands/groom-backlog.md +7 -0
- package/.opencode/commands/implement.md +7 -0
- package/.opencode/commands/improve-codebase-architecture.md +7 -0
- package/.opencode/commands/retro.md +7 -0
- package/.opencode/commands/review-stories.md +7 -0
- package/.opencode/commands/shape.md +7 -0
- package/.opencode/opencode.jsonc +15 -0
- package/.opencode/plugins/kataster/index.ts +283 -0
- package/AGENTS.md +21 -0
- package/CHANGELOG.md +82 -0
- package/LICENSE +21 -0
- package/README.md +324 -2
- package/bin/kataster.mjs +7 -0
- package/extras/skills/shadcn/SKILL.md +277 -0
- package/extras/skills/shadcn/agents/openai.yml +5 -0
- package/extras/skills/shadcn/assets/shadcn-small.png +0 -0
- package/extras/skills/shadcn/assets/shadcn.png +0 -0
- package/extras/skills/shadcn/cli.md +290 -0
- package/extras/skills/shadcn/customization.md +209 -0
- package/extras/skills/shadcn/evals/evals.json +77 -0
- package/extras/skills/shadcn/mcp.md +105 -0
- package/extras/skills/shadcn/registry.md +277 -0
- package/extras/skills/shadcn/rules/base-vs-radix.md +306 -0
- package/extras/skills/shadcn/rules/chat.md +250 -0
- package/extras/skills/shadcn/rules/composition.md +213 -0
- package/extras/skills/shadcn/rules/forms.md +192 -0
- package/extras/skills/shadcn/rules/icons.md +101 -0
- package/extras/skills/shadcn/rules/styling.md +185 -0
- package/guide/README.md +9 -0
- package/guide/brownfield.md +242 -0
- package/guide/concepts.md +109 -0
- package/guide/greenfield.md +84 -0
- package/guide/install.md +144 -0
- package/guide/release.md +62 -0
- package/package.json +56 -4
- package/src/cli.mjs +302 -0
- package/src/detect.mjs +237 -0
- package/src/install.mjs +427 -0
- package/src/repo.mjs +129 -0
- package/src/util.mjs +110 -0
- package/templates/CONTEXT.md +21 -0
- package/templates/conventions.md +63 -0
- package/templates/docs/adr/README.md +7 -0
- package/templates/docs/architecture/data-model.md +31 -0
- package/templates/docs/domain/context-map.md +21 -0
- package/templates/docs/domain/events.yaml +23 -0
- package/templates/docs/product/initiatives/README.md +41 -0
- package/templates/docs/product/ux-guidelines.md +27 -0
- package/templates/docs/product/vision.md +36 -0
- package/templates/docs/reviews/.gitkeep +0 -0
- package/templates/docs/stories/OPEN_QUESTIONS.md +8 -0
- package/templates/docs/stories/README.md +26 -0
- package/templates/docs/workflow.md +135 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.2.0 – 2026-10-31
|
|
4
|
+
|
|
5
|
+
- **Renamed from La Guardia to Kataster.** The CLI is `npx kataster`, the state directory is `.kataster/`, the
|
|
6
|
+
managed block markers are `kataster:*`, the OpenCode adapter lives in `.opencode/plugins/kataster/`, the env var is
|
|
7
|
+
`KATASTER_NODE` and the default backlog label prefix is `kataster`. `upgrade` migrates an existing installation in
|
|
8
|
+
place (state directory, plugin path, markers in `AGENTS.md`/`CLAUDE.md`, `.gitignore`); `doctor` reports leftovers.
|
|
9
|
+
An existing `.claude/project.json` keeps its own `backlog.labelPrefix`, so labels already in GitHub or Jira stay
|
|
10
|
+
valid – rename them by hand if you want them to follow.
|
|
11
|
+
|
|
12
|
+
- New `/shape` skill: the step between an idea and `/feature`. It grills a large idea, places it (existing or new
|
|
13
|
+
bounded context, shared library), maps change vs. new work, slices it, and produces a cost range with basis and
|
|
14
|
+
confidence. It creates no stories; the brief lives in `docs/product/initiatives/<slug>.md` and ends with one
|
|
15
|
+
recommendation (go / slice 1 / spike / discover / park / no-go). `--dry-run` writes nothing. A partially adopted
|
|
16
|
+
repository or an analogous service is used as evidence, never as a template.
|
|
17
|
+
- `/feature` accepts a reference: `ST-NNN`, `#issue`, a Jira key or URL, or a Jira issue exported through MCP.
|
|
18
|
+
A read-only `feature/scripts/intake.ts` resolves it, finds the linked local story by id or `external`, and returns a
|
|
19
|
+
route – continue a draft, review, implement, treat finished behaviour as a new story, send a bug to a regression
|
|
20
|
+
story, or run the feature pipeline. The ticket is evidence, not a specification: criteria are grilled, the source
|
|
21
|
+
is recorded in the story, and `external` stays owned by the backlog sync.
|
|
22
|
+
- Brownfield adoption in slices: `/adopt` now builds a deterministic repository map first
|
|
23
|
+
(`docs/architecture/repo-map.json`/`.md`), then adopts one domain plus at most one shared library per session.
|
|
24
|
+
The map knows packages, internal dependencies, consumers and an adoption ranking.
|
|
25
|
+
- Monorepo tooling detection (Nx, Turborepo, Bazel, pnpm/npm/yarn workspaces, Go, Cargo, Gradle, Maven) in
|
|
26
|
+
`.claude/project.json` → `repo.tooling`; commands per package and affected tests use that tool.
|
|
27
|
+
- Per-package docs: `<package>/AGENTS.md` (purpose, entities or public API, interfaces, pitfalls, boundaries) plus
|
|
28
|
+
a one-line `<package>/CLAUDE.md` importing it, so Claude Code and OpenCode load them only when working there.
|
|
29
|
+
The root `AGENTS.md` stays free of domain and keeps structure, commands and hard conventions.
|
|
30
|
+
- An existing `CLAUDE.md` now gets the `@AGENTS.md` import without losing its house rules; without the import,
|
|
31
|
+
Claude Code would read only the project's own file and never load the workflow instructions.
|
|
32
|
+
- Brownfield adoption no longer creates stories by default. It records a gap register in the adoption report;
|
|
33
|
+
`/adopt <scope> --stories` turns the selected gaps into a backlog when the user wants one.
|
|
34
|
+
- The installer preserves project hooks under `.claude/hooks/` on upgrade; only its own exact hook commands are
|
|
35
|
+
replaced.
|
|
36
|
+
- `verify.ts` warns when the generated repository map is stale.
|
|
37
|
+
- Architecture boundaries as data: `docs/architecture/boundaries.yaml` (first matching `from` → `to` rule wins),
|
|
38
|
+
a JS/TS import scanner or a `command` engine for dependency-cruiser, Nx, Bazel, ArchUnit, import-linter, and
|
|
39
|
+
`docs/architecture/boundaries.baseline.json` for baseline/ratchet. `--init` writes a proposal; existing
|
|
40
|
+
violations are frozen; only new ones fail.
|
|
41
|
+
- `docs/engineering/checks.yaml` and the `project-check.ts` dispatcher: project-owned checks run at edit time
|
|
42
|
+
(changed file only) and at Stop/CI. Wired once in Claude Code and OpenCode, never per package.
|
|
43
|
+
- `rule-doc.ts` scaffolds and validates `.claude/rules/*.md` with `paths:` frontmatter; directory rules stay in
|
|
44
|
+
`<dir>/AGENTS.md` so both harnesses load them on demand.
|
|
45
|
+
- Turborepo tool graph: `repo-map.ts` asks `turbo run <task> --dry=json` for the real package/task edges and stores
|
|
46
|
+
them as an optional `toolGraph`; without Turbo it falls back to manifests. `affected.ts` maps changed files (or
|
|
47
|
+
`--base`) to affected packages, follows dependents of shared libraries, and emits the native Turbo/Nx/Bazel/pnpm
|
|
48
|
+
command; `--run` executes it. `/implement` uses it for the fast loop, `verify.ts` remains the full gate.
|
|
49
|
+
- Nx and Bazel tool graphs: `nx graph --file=<temp>` is resolved to package names (Nx project names need not match,
|
|
50
|
+
e.g. `billing` vs `@acme/billing`) and kept in `toolGraph.projectNames` so `affected.ts` emits
|
|
51
|
+
`nx run-many -p billing,…`; Bazel packages and edges come from the `deps` attributes in `BUILD`/`BUILD.bazel`,
|
|
52
|
+
so no Bazel server or toolchain is needed. Both stay enrichment: no tool, no graph, manifest fallback.
|
|
53
|
+
- Path-scoped rules in both harnesses: `.claude/rules/*.md` stays the single source of truth, Claude Code scopes
|
|
54
|
+
it natively by `paths:`, and the OpenCode plugin calls the new `path-rules.ts` hook whenever a file is read or
|
|
55
|
+
written to attach each matching rule once per session as a keyed instruction entry. The rule body is sent
|
|
56
|
+
without its frontmatter; the scope is stated in the first line.
|
|
57
|
+
- Backlog backends: stories can stay local (default), live in GitHub Issues (`gh`) or in Jira (`mcp-atlassian`).
|
|
58
|
+
With a tracker, `docs/stories/` is a synchronized local mirror, `ST-NNN` stays the stable id and the tracker key
|
|
59
|
+
lives in `external`. Only the backlog core syncs; reviews and open questions stay local.
|
|
60
|
+
- New `backlog` skill and `/backlog-sync` command: status, pull and push, with conflict detection, backups and a
|
|
61
|
+
three-way sync state. GitHub syncs deterministically; Jira is driven through MCP with plan/record/import scripts.
|
|
62
|
+
- `kataster init --backlog local|github|jira`, provider config in `.claude/project.json`, `doctor` checks for `gh`,
|
|
63
|
+
the Jira project and the MCP server.
|
|
64
|
+
- Story schema and validator understand `external` and refuse a `ready`/`in-progress`/`done` mirror story without a
|
|
65
|
+
tracker link.
|
|
66
|
+
|
|
67
|
+
## 0.1.0 – 2026-10-29
|
|
68
|
+
|
|
69
|
+
First standalone release.
|
|
70
|
+
|
|
71
|
+
- `kataster init | upgrade | doctor` with stack detection, project profile and idempotent install
|
|
72
|
+
- Merges into existing `AGENTS.md`, `.claude/settings.json`, `.opencode/opencode.jsonc` and `.gitignore`
|
|
73
|
+
- Greenfield entry point `/bootstrap`: vision grilling → event storming → domain model → architecture → UX →
|
|
74
|
+
foundation stories
|
|
75
|
+
- Brownfield entry point `/adopt`: five parallel `repo-analyst` lenses → evidence-based domain draft → grilling →
|
|
76
|
+
gap stories
|
|
77
|
+
- `repo-analyst` agent (read-only) for OpenCode and Claude Code
|
|
78
|
+
- Project profile `.claude/project.json` replaces hardcoded project assumptions; `verify.ts` runs its commands
|
|
79
|
+
- `docs/engineering/conventions.md` replaces the project-specific conventions skill; the original is kept in
|
|
80
|
+
`examples/` as a reference
|
|
81
|
+
- Optional `shadcn` skill moved to `extras/` (`--with shadcn`)
|
|
82
|
+
- Guardrails generalized: deploy providers, database tools, default branch from the profile
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kataster contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,325 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Kataster
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**An agent workflow for domain-driven discovery and delivery.** Drop it into a repository, and the agent builds the
|
|
4
|
+
domain with you – by grilling, not by guessing – then carries it through stories, test-first implementation and
|
|
5
|
+
review.
|
|
6
|
+
|
|
7
|
+
The name is the German word for the official register of land parcels and their boundaries – a map that is
|
|
8
|
+
maintained, not invented. The domain model is that register: bounded contexts are the parcels, the glossary and the
|
|
9
|
+
data model are the entries, and nothing goes in without evidence.
|
|
10
|
+
|
|
11
|
+
Works in two situations:
|
|
12
|
+
|
|
13
|
+
- **Brownfield** – the repository already has code. `/adopt` analyses code, docs, tests, schema and git history,
|
|
14
|
+
drafts the domain model with evidence, and grills you to correct it. No rewrite, no invented domain.
|
|
15
|
+
- **Greenfield** – nothing but an idea. `/bootstrap` grills the vision, runs an event storming, builds contexts,
|
|
16
|
+
aggregates, the data model and the ADRs, and derives the foundation stories and first vertical slice.
|
|
17
|
+
|
|
18
|
+
The same workflow then handles every large idea (`/shape`), every feature (`/feature`), every story review
|
|
19
|
+
(`/review-stories`), implementation (`/implement`) and backlog care (`/groom-backlog`, `/retro`).
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx kataster init
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
That is the whole installation. It writes `.claude/`, `.opencode/`, `AGENTS.md` and a `docs/` skeleton into the
|
|
26
|
+
current repository, detects the stack, and asks four questions – the last one is whether stories stay local or live
|
|
27
|
+
in GitHub Issues or Jira (and if so, for the project or repository).
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Why this exists
|
|
32
|
+
|
|
33
|
+
Agents are good at writing code and bad at knowing what the words mean. A repository without a domain model produces
|
|
34
|
+
code that is locally plausible and globally inconsistent: three names for one concept, rules enforced only in the UI,
|
|
35
|
+
features nobody can place. Kataster makes the domain a first-class artifact – glossary, events, contexts,
|
|
36
|
+
aggregates, invariants – and makes the agent earn every statement in it from the user or from evidence.
|
|
37
|
+
|
|
38
|
+
Two rules run through everything:
|
|
39
|
+
|
|
40
|
+
1. **Facts are the agent's job, decisions are the user's.** The agent looks things up; it never invents a domain
|
|
41
|
+
term, a rule or a boundary.
|
|
42
|
+
2. **The user confirms, the agent writes.** Grilling works in rounds on the *frontier*: every question whose
|
|
43
|
+
prerequisites are settled, each with a recommended answer. Nothing is assumed silently.
|
|
44
|
+
|
|
45
|
+
## Requirements
|
|
46
|
+
|
|
47
|
+
- Node.js **22.18+** (the tooling runs TypeScript directly, no build step)
|
|
48
|
+
- Git
|
|
49
|
+
- An agent harness: **OpenCode** or **Claude Code**
|
|
50
|
+
- Optional: `gh` for pull requests and a GitHub Issues backlog, the `mcp-atlassian` MCP server for a Jira backlog,
|
|
51
|
+
a preview provider (Vercel, Netlify, …) for acceptance testing
|
|
52
|
+
|
|
53
|
+
## Quick start
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# existing repository
|
|
57
|
+
npx kataster init --brownfield
|
|
58
|
+
# new project
|
|
59
|
+
npx kataster init --greenfield
|
|
60
|
+
# stories in GitHub Issues or Jira
|
|
61
|
+
npx kataster init --backlog github --github-repo acme/shop
|
|
62
|
+
npx kataster init --backlog jira --jira-project PROJ
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Then open the repository in your agent harness and run `/adopt` or `/bootstrap`.
|
|
66
|
+
|
|
67
|
+
Non-interactive (CI, scripts):
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npx kataster init . --yes --name "Acme" --ui-language de --artifacts en
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## What gets installed
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
.claude/
|
|
77
|
+
project.json project profile – name, stack, languages, commands, backlog backend (edit this)
|
|
78
|
+
skills/ the workflow skills (grilling, event-storming, domain-model, architect, backlog, …)
|
|
79
|
+
skills/adopt/scripts/ repository map and per-package docs for brownfield adoption
|
|
80
|
+
skills/feature/scripts/ read-only intake: story, GitHub/Jira ticket or URL → route
|
|
81
|
+
agents/ review agents for Claude Code
|
|
82
|
+
hooks/ plain-Node guardrails and validators
|
|
83
|
+
lib/ deterministic domain/story/backlog logic
|
|
84
|
+
.opencode/
|
|
85
|
+
commands/ the slash commands
|
|
86
|
+
agents/ the same agents for OpenCode
|
|
87
|
+
plugins/kataster/ adapter that runs the .claude hooks in OpenCode
|
|
88
|
+
AGENTS.md short entry point for every session (merged, never clobbered)
|
|
89
|
+
CLAUDE.md imports AGENTS.md for Claude Code (created, or the import added to an existing file)
|
|
90
|
+
CONTEXT.md the glossary – starts as a template
|
|
91
|
+
docs/
|
|
92
|
+
workflow.md the map: sources of truth, commands, phases, rules
|
|
93
|
+
product/vision.md the vision, grilled with you
|
|
94
|
+
product/initiatives/ proposals for large ideas from /shape (no stories)
|
|
95
|
+
domain/events.yaml the event storming model (empty is valid)
|
|
96
|
+
domain/context-map.md
|
|
97
|
+
architecture/data-model.md
|
|
98
|
+
architecture/repo-map.* generated by /adopt: packages, edges, adoption ranking
|
|
99
|
+
engineering/conventions.md how this repo builds code + the seam catalog
|
|
100
|
+
stories/ the backlog – or the local mirror of GitHub/Jira
|
|
101
|
+
adr/ architecture decisions
|
|
102
|
+
reviews/ story reviews and adoption reports
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Existing `AGENTS.md`, `.claude/settings.json` and `.opencode/opencode.jsonc` are **merged**, not overwritten.
|
|
106
|
+
Existing `CONTEXT.md` and `docs/` are never touched.
|
|
107
|
+
|
|
108
|
+
## The commands
|
|
109
|
+
|
|
110
|
+
| Command | What it does |
|
|
111
|
+
|---|---|
|
|
112
|
+
| `/adopt [scope] [--stories]` | Brownfield: repository map → one slice (domain + shared library) → evidence → grilling → package docs and checks → gap register; stories only with `--stories`; repeat per slice |
|
|
113
|
+
| `/bootstrap` | Greenfield: vision → event storming → domain model → architecture → UX → foundation stories |
|
|
114
|
+
| `/grill-me` | Relentless interview on a plan, decision or idea |
|
|
115
|
+
| `/grill-with-docs` | The same, writing glossary and ADRs as you go |
|
|
116
|
+
| `/event-storming [process]` | Big-picture or single-process event storming |
|
|
117
|
+
| `/feature <idea \| ST-NNN \| #123 \| PROJ-123>` | New feature from an idea, an existing story or a ticket: intake and routing, grilling, focused storming, model, stories, review; bugs become a regression story |
|
|
118
|
+
| `/shape <idea \| ticket> [--dry-run]` | Before a large feature: frame, place (existing/new context, shared library), impact, slices, rough cost range, recommendation; creates no stories |
|
|
119
|
+
| `/review-stories [ST-…]` | One lead-dev pass (value, build, UX) before a story is `ready` |
|
|
120
|
+
| `/backlog-sync [status\|pull\|push]` | Keep `docs/stories/` in sync with GitHub Issues or Jira |
|
|
121
|
+
| `/groom-backlog [scope]` | Periodic challenge: is this backlog still worth building? |
|
|
122
|
+
| `/implement [ST-NNN]` | Test-first implementation of one story, review, refactor, PR |
|
|
123
|
+
| `/improve-codebase-architecture` | Scan for deepening opportunities, present them, grill one |
|
|
124
|
+
| `/retro` | Retrospective on a session, proposing rule changes |
|
|
125
|
+
|
|
126
|
+
### Starting from a ticket
|
|
127
|
+
|
|
128
|
+
`/feature` also accepts a reference: `/feature #123` (GitHub), `/feature PROJ-123` (Jira, with the issue fetched
|
|
129
|
+
through MCP), `/feature https://…` or `/feature ST-042`. A read-only intake resolves it and returns a route: an
|
|
130
|
+
existing `draft`/`review` story is revised, a `ready`/`in-progress` one goes to `/implement`, a finished one becomes a
|
|
131
|
+
new story, and a bug becomes one regression story instead of a feature. The ticket is **evidence, not a
|
|
132
|
+
specification** – its acceptance criteria are grilled, contradictions with the model are findings, and the source is
|
|
133
|
+
recorded in each story. `external` is still written only by the backlog sync.
|
|
134
|
+
|
|
135
|
+
### Shaping a large idea
|
|
136
|
+
|
|
137
|
+
`/shape` is the step between an idea and `/feature`. It grills the problem, decides where the work belongs – an
|
|
138
|
+
existing bounded context, a new one, or a shared library – maps what changes vs. what is built new, proposes 2–5
|
|
139
|
+
slices, and gives a rough **cost range with confidence and basis**. It ends with one recommendation: go, go with
|
|
140
|
+
slice 1, spike first, needs discovery, park or no-go. It creates **no stories**; each slice goes to `/feature`.
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
/shape "shop products with variants and channel prices"
|
|
144
|
+
/shape PROJ-123
|
|
145
|
+
/shape --dry-run "a new service next to the existing one" # test the method, write nothing
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
The brief lands in `docs/product/initiatives/<slug>.md` (`proposed` until you accept it). A new service in an
|
|
149
|
+
existing monorepo is treated as a new context in an existing landscape, not as a greenfield project; a similar
|
|
150
|
+
service is used as evidence and as the cost anchor, never as a template.
|
|
151
|
+
|
|
152
|
+
## Greenfield, end to end
|
|
153
|
+
|
|
154
|
+
1. `npx kataster init --greenfield` → review `.claude/project.json`.
|
|
155
|
+
2. `/bootstrap` → vision grilled, event storming, contexts/aggregates/data model, tech-stack ADR, UX guidelines.
|
|
156
|
+
3. `/review-stories` → the first foundation tech tasks and the first vertical slice become `ready`.
|
|
157
|
+
4. `/implement` → one story at a time, test-first, reviewed, merged by you.
|
|
158
|
+
5. `/feature <idea>` for everything after that.
|
|
159
|
+
|
|
160
|
+
## Brownfield, end to end
|
|
161
|
+
|
|
162
|
+
1. `npx kataster init --brownfield` → the profile is filled from the detected stack and monorepo tooling
|
|
163
|
+
(`repo.tooling`: Nx, Turborepo, Bazel, workspaces, Go, Cargo, Gradle, Maven).
|
|
164
|
+
2. `/adopt` → a deterministic **repository map** (`docs/architecture/repo-map.md`, `.json`) with packages,
|
|
165
|
+
dependency edges, consumers and an adoption ranking. No questions, no hand-scanning.
|
|
166
|
+
3. `/adopt [scope]` → **one slice** (one domain plus at most one shared library): two or three `repo-analyst`
|
|
167
|
+
subagents return evidence (five lenses for a small single-package repository); the main session drafts `CONTEXT.md`, `events.yaml`, context map, as-is data model,
|
|
168
|
+
conventions and de-facto ADRs; it writes `<package>/AGENTS.md` + `<package>/CLAUDE.md`, then grills you.
|
|
169
|
+
4. The safety net turns confirmed rules into checks (types, lint/boundary, tests, hooks) – report-only with a
|
|
170
|
+
baseline first, so a brownfield repository does not start red.
|
|
171
|
+
5. The gap analysis records **contradictions, missing behaviour and dead code** in the adoption report. It creates
|
|
172
|
+
**no stories by default** – what already works is documented, not re-storied. `/adopt <scope> --stories` turns
|
|
173
|
+
the selected gaps into a backlog when you want one.
|
|
174
|
+
6. `/adopt <next path>` for the next slice; `/adopt <scope> --stories`, `/review-stories`, then `/implement`.
|
|
175
|
+
|
|
176
|
+
Adopt in slices: one bounded context completely beats the whole repository shallowly. The root `AGENTS.md` stays
|
|
177
|
+
free of domain; the package docs are loaded only when someone works in that package.
|
|
178
|
+
|
|
179
|
+
## Monorepos
|
|
180
|
+
|
|
181
|
+
The installer detects the build tool (Nx, Turborepo, Bazel, pnpm/npm/yarn workspaces, Go, Cargo, Gradle, Maven)
|
|
182
|
+
and stores it in `.claude/project.json` → `repo.tooling`. `/adopt` builds the repository map once, then adopts
|
|
183
|
+
**one domain plus at most one shared library per session**. Every adopted package gets an `AGENTS.md` with its
|
|
184
|
+
purpose, entities or public API, interfaces and pitfalls – plus a one-line `CLAUDE.md` so Claude Code loads it on
|
|
185
|
+
demand; OpenCode loads the nested `AGENTS.md` itself. The root `AGENTS.md` stays short and free of domain.
|
|
186
|
+
|
|
187
|
+
Commands use the detected tool instead of assuming a single package: `nx affected -t test`,
|
|
188
|
+
`turbo run test --filter=<package>`, `bazel test //<package>/...`, `pnpm --filter <package> test`. The map also
|
|
189
|
+
stores the tool's own graph – Turborepo via `turbo run <task> --dry=json`, Nx via `nx graph`, Bazel from the
|
|
190
|
+
`BUILD` deps – and `affected.ts` turns changed files into the affected packages plus the native filter command,
|
|
191
|
+
following shared-library dependents:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
node .claude/skills/implement/scripts/affected.ts --changed libs/shared-kernel/src/index.ts
|
|
195
|
+
node .claude/skills/implement/scripts/affected.ts --base origin/main
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## The project profile
|
|
199
|
+
|
|
200
|
+
`.claude/project.json` is the single place for project facts. Skills, hooks and scripts read it instead of assuming
|
|
201
|
+
`main`, `npm` or a language.
|
|
202
|
+
|
|
203
|
+
```jsonc
|
|
204
|
+
{
|
|
205
|
+
"name": "Acme",
|
|
206
|
+
"kind": "brownfield",
|
|
207
|
+
"languages": { "artifacts": "en", "ui": "de" },
|
|
208
|
+
"stack": { "summary": "TypeScript, Next.js, PostgreSQL" },
|
|
209
|
+
"repo": {
|
|
210
|
+
"defaultBranch": "main",
|
|
211
|
+
"codeRoots": ["apps", "libs"],
|
|
212
|
+
"tooling": {
|
|
213
|
+
"kind": "nx",
|
|
214
|
+
"config": "nx.json",
|
|
215
|
+
"workspaces": ["apps/*", "libs/*"],
|
|
216
|
+
"manager": "pnpm",
|
|
217
|
+
"monorepo": true
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"commands": { "lint": "npm run lint", "typecheck": "npm run typecheck", "test": "npm test" },
|
|
221
|
+
"review": { "preview": "vercel", "pullRequest": "gh" },
|
|
222
|
+
"backlog": {
|
|
223
|
+
"provider": "local",
|
|
224
|
+
"github": { "repo": "", "labelPrefix": "kataster" },
|
|
225
|
+
"jira": {
|
|
226
|
+
"mcpServer": "mcp-atlassian",
|
|
227
|
+
"project": "PROJ",
|
|
228
|
+
"issueType": "Story",
|
|
229
|
+
"statusMap": { "draft": "To Do", "ready": "Ready", "done": "Done" },
|
|
230
|
+
"priorityMap": { "must": "Highest", "should": "High" }
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
`verify.ts` runs exactly these commands. `/adopt` fills them from the code; edit them if the detection is wrong.
|
|
237
|
+
|
|
238
|
+
## Backlog backends
|
|
239
|
+
|
|
240
|
+
Stories live in one of three places, chosen at install with `--backlog` and stored in `.claude/project.json`:
|
|
241
|
+
|
|
242
|
+
| Provider | Source of truth | Transport |
|
|
243
|
+
|---|---|---|
|
|
244
|
+
| `local` (default) | `docs/stories/` | the Markdown files |
|
|
245
|
+
| `github` | GitHub Issues | `gh` CLI – deterministic, works from scripts |
|
|
246
|
+
| `jira` | Jira | `mcp-atlassian` – MCP is agent-only |
|
|
247
|
+
|
|
248
|
+
With a tracker, **the tracker leads** and `docs/stories/` is a synchronized local mirror. That keeps the deterministic
|
|
249
|
+
parts – validation, `BACKLOG.md`, scenario ↔ test traceability, `next-story` – working offline, while the team works in
|
|
250
|
+
the tracker.
|
|
251
|
+
|
|
252
|
+
- Each story keeps its stable `ST-NNN` id; the tracker key lives in `external: { provider, key, url }`. Test titles do
|
|
253
|
+
not change.
|
|
254
|
+
- Only the backlog core syncs: story content, status, priority, size, risk, context, type, dependencies and labels.
|
|
255
|
+
Reviews and `OPEN_QUESTIONS.md` stay local.
|
|
256
|
+
- A story must be linked before it reaches `ready` – the validator refuses an unlinked mirror story.
|
|
257
|
+
- On a conflict the tracker wins; the local file is backed up to `.kataster/backup/backlog/` first. GitHub's `push`
|
|
258
|
+
refuses a story whose remote side changed; the Jira plan cannot see Jira, so pull before planning a push.
|
|
259
|
+
- GitHub issues are closed for `done`/`superseded`; Jira uses the configured status names and transitions.
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
node .claude/skills/backlog/scripts/backlog-status.ts # what is linked, what drifted
|
|
263
|
+
node .claude/skills/backlog/scripts/backlog-push.ts # mirror → tracker (GitHub)
|
|
264
|
+
node .claude/skills/backlog/scripts/backlog-pull.ts # tracker → mirror (GitHub)
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
For Jira, `jira-plan.ts` prints the exact MCP calls, `jira-record.ts` writes the returned keys back, and
|
|
268
|
+
`backlog-pull.ts --from issues.json` imports what the agent fetched through MCP. The `backlog` skill has the full flow.
|
|
269
|
+
|
|
270
|
+
## Quality gates
|
|
271
|
+
|
|
272
|
+
- **Hooks** validate `docs/domain/events.yaml` and stories after every write, format and lint changed code, block
|
|
273
|
+
edits to generated files and accepted ADRs, and stop force pushes, production deploys and destructive database
|
|
274
|
+
commands.
|
|
275
|
+
- **Path-scoped rules** live in `.claude/rules/*.md` with `paths:` frontmatter – for patterns a directory cannot
|
|
276
|
+
express. Claude Code loads them natively; in OpenCode the plugin attaches the matching rule to the session as
|
|
277
|
+
soon as a file under its globs is read or written, so one file serves both harnesses.
|
|
278
|
+
- **Architecture boundaries** are data: `docs/architecture/boundaries.yaml` lists allowed/forbidden edges (first
|
|
279
|
+
match wins), `boundary-check.ts` enforces them, and `boundaries.baseline.json` freezes existing debt so only
|
|
280
|
+
new violations fail. `docs/engineering/checks.yaml` decides what runs at edit time and at Stop/CI; the
|
|
281
|
+
`project-check.ts` dispatcher is wired once, not per package.
|
|
282
|
+
|
|
283
|
+
```bash
|
|
284
|
+
node .claude/skills/adopt/scripts/boundary-check.ts --init
|
|
285
|
+
node .claude/skills/adopt/scripts/boundary-check.ts # fail on new violations
|
|
286
|
+
node .claude/skills/adopt/scripts/boundary-check.ts --update-baseline
|
|
287
|
+
```
|
|
288
|
+
- **`verify.ts`** is the one gate: project checks, artifact validity, scenario ↔ test traceability, domain IDs in
|
|
289
|
+
the code, glossary language.
|
|
290
|
+
- **Review agents** never write code: `code-reviewer` and `acceptance-tester` report, the acceptance verdict decides
|
|
291
|
+
whether a story is `done`.
|
|
292
|
+
|
|
293
|
+
## Upgrading
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
npx kataster upgrade
|
|
297
|
+
npx kataster doctor
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
`upgrade` replaces workflow files, keeps project content (`CONTEXT.md`, `docs/`, `project.json`) and refuses to
|
|
301
|
+
overwrite files you changed locally – it lists them instead. `--force` overwrites and writes a backup to
|
|
302
|
+
`.kataster/backup/`.
|
|
303
|
+
|
|
304
|
+
## Optional extras
|
|
305
|
+
|
|
306
|
+
- `--with shadcn` installs the shadcn/ui skill for projects that use it.
|
|
307
|
+
|
|
308
|
+
## Design notes
|
|
309
|
+
|
|
310
|
+
- **`.claude/` is the source of truth.** OpenCode and Claude Code share skills, agents and hooks; `.opencode/` is an
|
|
311
|
+
adapter, not a second workflow.
|
|
312
|
+
- **Plain Node, no build step.** Hooks and validators run on Node 22.18+ with one runtime dependency (`yaml`).
|
|
313
|
+
- **Generated files stay generated.** `BACKLOG.md` and `event-storming.md` are rendered; edit the sources.
|
|
314
|
+
- **The backlog is local by default.** One Markdown file per story; no issue tracker required. GitHub Issues and Jira
|
|
315
|
+
are opt-in, and `docs/stories/` stays the mirror that validation and traceability run on.
|
|
316
|
+
|
|
317
|
+
## Name
|
|
318
|
+
|
|
319
|
+
The name is a historical reference, not a domain: the workflow has none of its own. Everything project-specific
|
|
320
|
+
was removed when the package was extracted – the examples are neutral, the stack is detected, and the language is
|
|
321
|
+
yours.
|
|
322
|
+
|
|
323
|
+
## License
|
|
324
|
+
|
|
325
|
+
MIT
|