domain-knowledge-kit 0.2.15 → 0.2.19
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 +4 -0
- package/dist/cli.js +24 -1
- package/dist/cli.js.map +1 -1
- package/dist/features/agent/commands/init.d.ts +90 -1
- package/dist/features/agent/commands/init.d.ts.map +1 -1
- package/dist/features/agent/commands/init.js +328 -32
- package/dist/features/agent/commands/init.js.map +1 -1
- package/dist/features/agent/commands/prime.d.ts +11 -0
- package/dist/features/agent/commands/prime.d.ts.map +1 -1
- package/dist/features/agent/commands/prime.js +105 -8
- package/dist/features/agent/commands/prime.js.map +1 -1
- package/dist/features/agent/commands/update.d.ts +27 -0
- package/dist/features/agent/commands/update.d.ts.map +1 -0
- package/dist/features/agent/commands/update.js +316 -0
- package/dist/features/agent/commands/update.js.map +1 -0
- package/dist/features/agent/dkk-artifacts.d.ts +76 -0
- package/dist/features/agent/dkk-artifacts.d.ts.map +1 -0
- package/dist/features/agent/dkk-artifacts.js +328 -0
- package/dist/features/agent/dkk-artifacts.js.map +1 -0
- package/dist/features/agent/install-mode.d.ts +34 -0
- package/dist/features/agent/install-mode.d.ts.map +1 -0
- package/dist/features/agent/install-mode.js +78 -0
- package/dist/features/agent/install-mode.js.map +1 -0
- package/dist/features/agent/mcp-register.d.ts +20 -0
- package/dist/features/agent/mcp-register.d.ts.map +1 -0
- package/dist/features/agent/mcp-register.js +116 -0
- package/dist/features/agent/mcp-register.js.map +1 -0
- package/dist/features/agent/settings-prune.d.ts +29 -0
- package/dist/features/agent/settings-prune.d.ts.map +1 -0
- package/dist/features/agent/settings-prune.js +70 -0
- package/dist/features/agent/settings-prune.js.map +1 -0
- package/dist/features/agent/tests/settings-prune.test.d.ts +2 -0
- package/dist/features/agent/tests/settings-prune.test.d.ts.map +1 -0
- package/dist/features/agent/tests/settings-prune.test.js +118 -0
- package/dist/features/agent/tests/settings-prune.test.js.map +1 -0
- package/dist/features/federation/commands/consumers.d.ts +40 -0
- package/dist/features/federation/commands/consumers.d.ts.map +1 -0
- package/dist/features/federation/commands/consumers.js +126 -0
- package/dist/features/federation/commands/consumers.js.map +1 -0
- package/dist/features/federation/commands/peers-add.d.ts +14 -0
- package/dist/features/federation/commands/peers-add.d.ts.map +1 -0
- package/dist/features/federation/commands/peers-add.js +79 -0
- package/dist/features/federation/commands/peers-add.js.map +1 -0
- package/dist/features/federation/commands/peers-list.d.ts +8 -0
- package/dist/features/federation/commands/peers-list.d.ts.map +1 -0
- package/dist/features/federation/commands/peers-list.js +51 -0
- package/dist/features/federation/commands/peers-list.js.map +1 -0
- package/dist/features/federation/commands/peers-status.d.ts +8 -0
- package/dist/features/federation/commands/peers-status.d.ts.map +1 -0
- package/dist/features/federation/commands/peers-status.js +78 -0
- package/dist/features/federation/commands/peers-status.js.map +1 -0
- package/dist/features/federation/commands/pull.d.ts +18 -0
- package/dist/features/federation/commands/pull.d.ts.map +1 -0
- package/dist/features/federation/commands/pull.js +153 -0
- package/dist/features/federation/commands/pull.js.map +1 -0
- package/dist/features/federation/git-fetcher.d.ts +45 -0
- package/dist/features/federation/git-fetcher.d.ts.map +1 -0
- package/dist/features/federation/git-fetcher.js +70 -0
- package/dist/features/federation/git-fetcher.js.map +1 -0
- package/dist/features/federation/loader.d.ts +60 -0
- package/dist/features/federation/loader.d.ts.map +1 -0
- package/dist/features/federation/loader.js +193 -0
- package/dist/features/federation/loader.js.map +1 -0
- package/dist/features/federation/lock.d.ts +12 -0
- package/dist/features/federation/lock.d.ts.map +1 -0
- package/dist/features/federation/lock.js +48 -0
- package/dist/features/federation/lock.js.map +1 -0
- package/dist/features/federation/tests/git-fetcher.test.d.ts +2 -0
- package/dist/features/federation/tests/git-fetcher.test.d.ts.map +1 -0
- package/dist/features/federation/tests/git-fetcher.test.js +167 -0
- package/dist/features/federation/tests/git-fetcher.test.js.map +1 -0
- package/dist/features/federation/tests/loader.test.d.ts +2 -0
- package/dist/features/federation/tests/loader.test.d.ts.map +1 -0
- package/dist/features/federation/tests/loader.test.js +144 -0
- package/dist/features/federation/tests/loader.test.js.map +1 -0
- package/dist/features/federation/tests/phase5.test.d.ts +2 -0
- package/dist/features/federation/tests/phase5.test.d.ts.map +1 -0
- package/dist/features/federation/tests/phase5.test.js +137 -0
- package/dist/features/federation/tests/phase5.test.js.map +1 -0
- package/dist/features/federation/tests/schema-load.test.d.ts +2 -0
- package/dist/features/federation/tests/schema-load.test.d.ts.map +1 -0
- package/dist/features/federation/tests/schema-load.test.js +97 -0
- package/dist/features/federation/tests/schema-load.test.js.map +1 -0
- package/dist/features/federation/tests/validator.test.d.ts +2 -0
- package/dist/features/federation/tests/validator.test.d.ts.map +1 -0
- package/dist/features/federation/tests/validator.test.js +319 -0
- package/dist/features/federation/tests/validator.test.js.map +1 -0
- package/dist/features/mcp/commands/serve.d.ts +10 -0
- package/dist/features/mcp/commands/serve.d.ts.map +1 -0
- package/dist/features/mcp/commands/serve.js +12 -0
- package/dist/features/mcp/commands/serve.js.map +1 -0
- package/dist/features/mcp/server.d.ts +15 -0
- package/dist/features/mcp/server.d.ts.map +1 -0
- package/dist/features/mcp/server.js +438 -0
- package/dist/features/mcp/server.js.map +1 -0
- package/dist/features/pipeline/commands/validate.d.ts.map +1 -1
- package/dist/features/pipeline/commands/validate.js +7 -0
- package/dist/features/pipeline/commands/validate.js.map +1 -1
- package/dist/features/pipeline/indexer.d.ts +28 -2
- package/dist/features/pipeline/indexer.d.ts.map +1 -1
- package/dist/features/pipeline/indexer.js +82 -27
- package/dist/features/pipeline/indexer.js.map +1 -1
- package/dist/features/pipeline/validator.d.ts +10 -0
- package/dist/features/pipeline/validator.d.ts.map +1 -1
- package/dist/features/pipeline/validator.js +274 -27
- package/dist/features/pipeline/validator.js.map +1 -1
- package/dist/features/query/commands/list.d.ts +10 -0
- package/dist/features/query/commands/list.d.ts.map +1 -1
- package/dist/features/query/commands/list.js +1 -1
- package/dist/features/query/commands/list.js.map +1 -1
- package/dist/features/query/commands/locate.d.ts +1 -0
- package/dist/features/query/commands/locate.d.ts.map +1 -1
- package/dist/features/query/commands/locate.js +1 -1
- package/dist/features/query/commands/locate.js.map +1 -1
- package/dist/features/query/commands/search.d.ts.map +1 -1
- package/dist/features/query/commands/search.js +2 -0
- package/dist/features/query/commands/search.js.map +1 -1
- package/dist/features/query/commands/show.d.ts +15 -0
- package/dist/features/query/commands/show.d.ts.map +1 -1
- package/dist/features/query/commands/show.js +116 -58
- package/dist/features/query/commands/show.js.map +1 -1
- package/dist/features/query/commands/story.d.ts +70 -0
- package/dist/features/query/commands/story.d.ts.map +1 -1
- package/dist/features/query/commands/story.js +2 -2
- package/dist/features/query/commands/story.js.map +1 -1
- package/dist/features/query/commands/summary.d.ts +3 -0
- package/dist/features/query/commands/summary.d.ts.map +1 -1
- package/dist/features/query/commands/summary.js +1 -1
- package/dist/features/query/commands/summary.js.map +1 -1
- package/dist/features/query/searcher.d.ts +18 -1
- package/dist/features/query/searcher.d.ts.map +1 -1
- package/dist/features/query/searcher.js +11 -2
- package/dist/features/query/searcher.js.map +1 -1
- package/dist/features/scaffold/commands/new-domain.d.ts +22 -0
- package/dist/features/scaffold/commands/new-domain.d.ts.map +1 -1
- package/dist/features/scaffold/commands/new-domain.js +44 -28
- package/dist/features/scaffold/commands/new-domain.js.map +1 -1
- package/dist/features/scaffold/commands/service-init.d.ts +12 -0
- package/dist/features/scaffold/commands/service-init.d.ts.map +1 -0
- package/dist/features/scaffold/commands/service-init.js +69 -0
- package/dist/features/scaffold/commands/service-init.js.map +1 -0
- package/dist/shared/graph.d.ts +8 -0
- package/dist/shared/graph.d.ts.map +1 -1
- package/dist/shared/graph.js +180 -112
- package/dist/shared/graph.js.map +1 -1
- package/dist/shared/index.d.ts +4 -1
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +6 -1
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/loader.d.ts +22 -0
- package/dist/shared/loader.d.ts.map +1 -1
- package/dist/shared/loader.js +31 -1
- package/dist/shared/loader.js.map +1 -1
- package/dist/shared/paths.d.ts +59 -7
- package/dist/shared/paths.d.ts.map +1 -1
- package/dist/shared/paths.js +93 -11
- package/dist/shared/paths.js.map +1 -1
- package/dist/shared/refs.d.ts +96 -0
- package/dist/shared/refs.d.ts.map +1 -0
- package/dist/shared/refs.js +182 -0
- package/dist/shared/refs.js.map +1 -0
- package/dist/shared/service-id.d.ts +11 -0
- package/dist/shared/service-id.d.ts.map +1 -0
- package/dist/shared/service-id.js +64 -0
- package/dist/shared/service-id.js.map +1 -0
- package/dist/shared/tests/paths.test.d.ts +2 -0
- package/dist/shared/tests/paths.test.d.ts.map +1 -0
- package/dist/shared/tests/paths.test.js +111 -0
- package/dist/shared/tests/paths.test.js.map +1 -0
- package/dist/shared/tests/refs.test.d.ts +2 -0
- package/dist/shared/tests/refs.test.d.ts.map +1 -0
- package/dist/shared/tests/refs.test.js +104 -0
- package/dist/shared/tests/refs.test.js.map +1 -0
- package/dist/shared/types/domain.d.ts +14 -0
- package/dist/shared/types/domain.d.ts.map +1 -1
- package/dist/shared/types/federation.d.ts +60 -0
- package/dist/shared/types/federation.d.ts.map +1 -0
- package/dist/shared/types/federation.js +12 -0
- package/dist/shared/types/federation.js.map +1 -0
- package/dist/version.d.ts +4 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +15 -0
- package/dist/version.js.map +1 -0
- package/package.json +8 -5
- package/tools/dkk/claude/agents/dkk-domain-reviewer.md +69 -0
- package/tools/dkk/claude/commands/dkk-adr.md +11 -0
- package/tools/dkk/claude/commands/dkk-impact.md +34 -0
- package/tools/dkk/claude/commands/dkk-implement.md +12 -0
- package/tools/dkk/claude/commands/dkk-prime.md +6 -0
- package/tools/dkk/claude/commands/dkk-review.md +12 -0
- package/tools/dkk/claude/commands/dkk-story.md +12 -0
- package/tools/dkk/claude/hooks/post-edit-validate.mjs +68 -0
- package/tools/dkk/claude/hooks/pre-edit-block-generated.mjs +39 -0
- package/tools/dkk/claude/hooks/session-start-prime.mjs +20 -0
- package/tools/dkk/claude/hooks/stop-validate.mjs +67 -0
- package/tools/dkk/claude/settings.json +62 -0
- package/tools/dkk/claude/skills/dkk-adr-author/SKILL.md +54 -0
- package/tools/dkk/claude/skills/dkk-flow-implementer/SKILL.md +51 -0
- package/tools/dkk/claude/skills/dkk-story-analyst/SKILL.md +108 -0
- package/tools/dkk/schema/actors.schema.json +1 -1
- package/tools/dkk/schema/adr-frontmatter.schema.json +4 -4
- package/tools/dkk/schema/aggregate.schema.json +1 -1
- package/tools/dkk/schema/command.schema.json +1 -1
- package/tools/dkk/schema/event.schema.json +1 -1
- package/tools/dkk/schema/federation.schema.json +71 -0
- package/tools/dkk/schema/glossary.schema.json +1 -1
- package/tools/dkk/schema/index.schema.json +2 -2
- package/tools/dkk/schema/policy.schema.json +1 -1
- package/tools/dkk/schema/read-model.schema.json +1 -1
- package/tools/dkk/schema/service.schema.json +30 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dkk-story-analyst
|
|
3
|
+
description: Generate, split, or reshape user stories and epics from the local Domain Knowledge Pack. Use when the user asks to write, draft, refine, or split a user story or epic for a feature that maps to a DKK flow or command.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Story Analyst
|
|
7
|
+
|
|
8
|
+
Use this skill whenever the user asks to **write, draft, generate, refine, or split a user story or epic** in a project that has a Domain Knowledge Pack (`.dkk/`).
|
|
9
|
+
|
|
10
|
+
> **"User stories" and "epics" here are behavioral requirements derived from the local DDD/Event-Storming model in `.dkk/`.** Do not consult external trackers (Jira, GitHub Issues, Linear, Trello, etc.). The MCP `dkk` server (or the `dkk` CLI as fallback) is the only source of truth.
|
|
11
|
+
|
|
12
|
+
## Preferred tools
|
|
13
|
+
|
|
14
|
+
1. `mcp__dkk__story` — aggregate a flow's full context (actors, steps, policies, BDD examples, ADRs, downstream effects) in one call
|
|
15
|
+
2. `mcp__dkk__list` filtered by `type: flow` — discover available flows
|
|
16
|
+
3. `mcp__dkk__search` — locate a flow or command from a feature name
|
|
17
|
+
4. `mcp__dkk__show` — fall back when no flow exists, to read a command directly
|
|
18
|
+
5. `mcp__dkk__related` — to gather neighbours when working from a command instead of a flow
|
|
19
|
+
|
|
20
|
+
Use the corresponding `dkk` shell commands only if the MCP server is unavailable.
|
|
21
|
+
|
|
22
|
+
## Workflow
|
|
23
|
+
|
|
24
|
+
1. **Identify the flow.** Normalize the id (`flow.<Name>` or bare `<Name>`). If the user gave a feature name instead, call `mcp__dkk__search` to locate a matching flow or root command.
|
|
25
|
+
2. **Retrieve context.** Call `mcp__dkk__story` with the flow id. The response contains actors, ordered steps, triggered policies, BDD examples, ADRs, and downstream effects.
|
|
26
|
+
3. **Clarify scope.** Ask **1–7 clarifying questions** before drafting. Derive every question, its options, and your recommended default from the actual story output and the project's conventions — never use a fixed list. Each question must offer concrete options with one marked as recommended. **Skip the questions entirely** for trivial flows (≤2 steps, 1 actor, no ambiguity). Target product behavior and story scope, e.g.:
|
|
27
|
+
- Which user-facing outcome matters most?
|
|
28
|
+
- Confirmation/feedback on success — how should it surface?
|
|
29
|
+
- On failure or rejection, what does the user experience?
|
|
30
|
+
- Optional steps that can be skipped, or strictly linear?
|
|
31
|
+
- Happy path only, or include edge cases?
|
|
32
|
+
4. **Map to story format.**
|
|
33
|
+
- **As a** `<Actor from "Actors" section>`
|
|
34
|
+
- **I want to** `<Command description from Steps>`
|
|
35
|
+
- **So that** `<Flow description>`
|
|
36
|
+
5. **Write acceptance criteria** from the policies and BDD examples in the output:
|
|
37
|
+
- Policies → Given/When/Then: *When [triggering event] → Then [consequent command]*
|
|
38
|
+
- BDD examples on commands and events are pre-written scenarios — use them directly or expand
|
|
39
|
+
6. **Add an Architectural Constraints section** listing every ADR (`adr-NNNN — title — status`). Developers must respect these.
|
|
40
|
+
7. **Add an Implementation Notes section** from the downstream effects: read models to update, secondary policies that fire.
|
|
41
|
+
|
|
42
|
+
## Noun enforcement (mandatory)
|
|
43
|
+
|
|
44
|
+
Use only the terminology in the `mcp__dkk__story` output. Do not:
|
|
45
|
+
|
|
46
|
+
- Invent entity, command, or event names not present
|
|
47
|
+
- Rename domain terms (if DKK says `OrderBasket`, the story says `OrderBasket`)
|
|
48
|
+
- Reference bounded contexts not mentioned in the step refs
|
|
49
|
+
- Pull names from external APIs or trackers
|
|
50
|
+
|
|
51
|
+
If unsure whether a term is canonical, run `mcp__dkk__search` to verify.
|
|
52
|
+
|
|
53
|
+
## Epic vs. story decision rules
|
|
54
|
+
|
|
55
|
+
After retrieving the flow context:
|
|
56
|
+
|
|
57
|
+
- **Single story** when the flow has ≤3 command steps and spans ≤1 bounded context.
|
|
58
|
+
- **Epic with story slices** when the flow has >3 command steps **or** spans >1 bounded context. Slice by:
|
|
59
|
+
1. Group consecutive steps that share the same context prefix (all `ordering.*` steps → Story 1)
|
|
60
|
+
2. Each policy trigger becomes its own story ("As a system, when X happens, I want Y to be triggered, so that Z")
|
|
61
|
+
3. Each slice that produces an event consumed by a read model must include updating that read model in its scope or acceptance criteria
|
|
62
|
+
|
|
63
|
+
When recommending an epic breakdown, present the slice boundaries and explain which downstream effects belong to each slice based on the model.
|
|
64
|
+
|
|
65
|
+
## Story reshaping
|
|
66
|
+
|
|
67
|
+
When asked to refine, split, or revise an existing story:
|
|
68
|
+
|
|
69
|
+
1. Call `mcp__dkk__story` for the relevant flow to get current domain truth
|
|
70
|
+
2. Compare the story's terminology to the output
|
|
71
|
+
3. Flag mismatches: invented terms, missing actors, acceptance criteria that contradict policies
|
|
72
|
+
4. Suggest corrections using exact DKK terminology
|
|
73
|
+
5. Ensure the reshaped story still covers all downstream effects
|
|
74
|
+
|
|
75
|
+
## Fallback: no flow exists
|
|
76
|
+
|
|
77
|
+
If no flow has been modeled for the requested feature:
|
|
78
|
+
|
|
79
|
+
1. Locate the most relevant command: `mcp__dkk__search` with `type: command`
|
|
80
|
+
2. Get its full definition: `mcp__dkk__show`
|
|
81
|
+
3. Get its neighbours: `mcp__dkk__related` with `depth: 2`
|
|
82
|
+
4. Assemble the story from:
|
|
83
|
+
- Command `actor` → "As a..."
|
|
84
|
+
- Command `description` → "I want to..."
|
|
85
|
+
- Command `preconditions`, `rejections`, `examples` → acceptance criteria
|
|
86
|
+
- Neighbouring policies and read models → downstream effects
|
|
87
|
+
5. Note in the story that no formal flow has been modeled, and recommend the team define one.
|
|
88
|
+
|
|
89
|
+
## Output format
|
|
90
|
+
|
|
91
|
+
```markdown
|
|
92
|
+
## [Story Title]
|
|
93
|
+
|
|
94
|
+
**As a** [Actor], **I want to** [action], **so that** [business value].
|
|
95
|
+
|
|
96
|
+
### Acceptance Criteria
|
|
97
|
+
|
|
98
|
+
- **Given** [precondition], **When** [command/event], **Then** [outcome]
|
|
99
|
+
- (repeat for each policy rule and BDD example)
|
|
100
|
+
|
|
101
|
+
### Architectural Constraints
|
|
102
|
+
|
|
103
|
+
- [adr-NNNN]: [title] ([status])
|
|
104
|
+
|
|
105
|
+
### Implementation Notes
|
|
106
|
+
|
|
107
|
+
- [Downstream read models, secondary policy triggers, cross-context effects]
|
|
108
|
+
```
|
|
@@ -34,16 +34,16 @@
|
|
|
34
34
|
"type": "array",
|
|
35
35
|
"items": {
|
|
36
36
|
"type": "string",
|
|
37
|
-
"pattern": "^[a-z][a-z0-9-]*\\.[A-Za-z][A-Za-z0-9]*$",
|
|
38
|
-
"description": "Domain item reference in context.Name format (e.g. ordering.OrderPlaced)"
|
|
37
|
+
"pattern": "^([a-z][a-z0-9-]*:)?[a-z][a-z0-9-]*\\.[A-Za-z][A-Za-z0-9]*$",
|
|
38
|
+
"description": "Domain item reference in context.Name format (e.g. ordering.OrderPlaced, or service:context.Name for federated refs)"
|
|
39
39
|
},
|
|
40
40
|
"uniqueItems": true,
|
|
41
41
|
"description": "Domain items related to this decision"
|
|
42
42
|
},
|
|
43
43
|
"superseded_by": {
|
|
44
44
|
"type": "string",
|
|
45
|
-
"pattern": "^adr-\\d{4}$",
|
|
46
|
-
"description": "ID of the ADR that supersedes this one"
|
|
45
|
+
"pattern": "^([a-z][a-z0-9-]*:)?adr-\\d{4}$",
|
|
46
|
+
"description": "ID of the ADR that supersedes this one (optionally service-qualified for peer ADRs)"
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
"required": ["id", "title", "status", "date"],
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "federation.schema.json",
|
|
4
|
+
"title": "Federation Manifest",
|
|
5
|
+
"description": "Peer service manifest for multi-repo federation (.dkk/federation.yml). Each peer points at a filesystem path or a git URL+branch; the peer's `.dkk/` directory is loaded read-only alongside the local model.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"peers": {
|
|
9
|
+
"type": "array",
|
|
10
|
+
"items": { "$ref": "#/definitions/peer" },
|
|
11
|
+
"description": "Peer services whose .dkk/ should be loaded alongside the local model."
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"required": ["peers"],
|
|
15
|
+
"additionalProperties": false,
|
|
16
|
+
"definitions": {
|
|
17
|
+
"peer": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"name": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
23
|
+
"description": "Kebab-case peer service name (must match the peer's own service.yml)."
|
|
24
|
+
},
|
|
25
|
+
"source": {
|
|
26
|
+
"oneOf": [
|
|
27
|
+
{ "$ref": "#/definitions/localSource" },
|
|
28
|
+
{ "$ref": "#/definitions/gitSource" }
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"required": ["name", "source"],
|
|
33
|
+
"additionalProperties": false
|
|
34
|
+
},
|
|
35
|
+
"localSource": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"properties": {
|
|
38
|
+
"type": { "const": "local" },
|
|
39
|
+
"path": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"minLength": 1,
|
|
42
|
+
"description": "Absolute or repo-root-relative path to the peer's repository root."
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"required": ["type", "path"],
|
|
46
|
+
"additionalProperties": false
|
|
47
|
+
},
|
|
48
|
+
"gitSource": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"properties": {
|
|
51
|
+
"type": { "const": "git" },
|
|
52
|
+
"url": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"minLength": 1,
|
|
55
|
+
"description": "Git URL (https or ssh)."
|
|
56
|
+
},
|
|
57
|
+
"branch": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"minLength": 1,
|
|
60
|
+
"description": "Branch to track."
|
|
61
|
+
},
|
|
62
|
+
"path": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"description": "Optional sub-path inside the peer repo where .dkk/ lives (default: repo root)."
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"required": ["type", "url", "branch"],
|
|
68
|
+
"additionalProperties": false
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"adr_refs": {
|
|
25
25
|
"type": "array",
|
|
26
|
-
"items": { "type": "string", "pattern": "^adr-\\d{4}$" },
|
|
26
|
+
"items": { "type": "string", "pattern": "^([a-z][a-z0-9-]*:)?adr-\\d{4}$" },
|
|
27
27
|
"uniqueItems": true,
|
|
28
28
|
"description": "Related ADR identifiers (e.g. adr-0001)"
|
|
29
29
|
}
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"properties": {
|
|
47
47
|
"ref": {
|
|
48
48
|
"type": "string",
|
|
49
|
-
"pattern": "^[a-z][a-z0-9-]*\\.[A-Za-z][A-Za-z0-9]*$",
|
|
50
|
-
"description": "Domain item reference (context.Name)"
|
|
49
|
+
"pattern": "^([a-z][a-z0-9-]*:)?[a-z][a-z0-9-]*\\.[A-Za-z][A-Za-z0-9]*$",
|
|
50
|
+
"description": "Domain item reference (context.Name, or service:context.Name for federated refs)"
|
|
51
51
|
},
|
|
52
52
|
"type": {
|
|
53
53
|
"type": "string",
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "service.schema.json",
|
|
4
|
+
"title": "Service Manifest",
|
|
5
|
+
"description": "Service identity for multi-repo federation (.dkk/service.yml). Declares this repo's service name and the bounded contexts it publishes for cross-repo consumption.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"name": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
11
|
+
"description": "Kebab-case service identifier (e.g. \"ordering\"). Globally unique within an org."
|
|
12
|
+
},
|
|
13
|
+
"exports": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"pattern": "^[a-z][a-z0-9-]*$"
|
|
18
|
+
},
|
|
19
|
+
"uniqueItems": true,
|
|
20
|
+
"description": "Bounded-context names this service publishes for federation."
|
|
21
|
+
},
|
|
22
|
+
"description": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"minLength": 1,
|
|
25
|
+
"description": "Optional human-readable description of the service."
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"required": ["name", "exports"],
|
|
29
|
+
"additionalProperties": false
|
|
30
|
+
}
|