domain-knowledge-kit 0.2.15 → 0.2.16
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 +20 -0
- package/dist/cli.js.map +1 -1
- package/dist/features/agent/commands/init.d.ts.map +1 -1
- package/dist/features/agent/commands/init.js +141 -3
- 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 +104 -8
- package/dist/features/agent/commands/prime.js.map +1 -1
- 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/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/package.json +6 -3
- 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 +51 -0
- package/tools/dkk/claude/hooks/pre-edit-block-generated.mjs +39 -0
- package/tools/dkk/claude/hooks/session-start-prime.mjs +33 -0
- package/tools/dkk/claude/hooks/stop-validate.mjs +48 -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,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Review the current change for DKK domain impact. Delegates to the dkk-domain-reviewer subagent in an isolated context.
|
|
3
|
+
argument-hint: [pr-number | git-range]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Invoke the `dkk-domain-reviewer` subagent. Pass through `$ARGUMENTS` as the input scope:
|
|
7
|
+
|
|
8
|
+
- If `$ARGUMENTS` is empty, instruct the subagent to review the working-tree diff (`git status` + `git diff`).
|
|
9
|
+
- If `$ARGUMENTS` looks like a number or `#NNN`, instruct it to run `gh pr diff <number>` and review that PR.
|
|
10
|
+
- Otherwise, treat `$ARGUMENTS` as a git range (e.g. `origin/main...HEAD`) and pass it through.
|
|
11
|
+
|
|
12
|
+
Wait for the subagent's report. Display it verbatim to the user. Do not perform the review yourself.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Generate a user story or epic from a DKK flow using the dkk-story-analyst skill.
|
|
3
|
+
argument-hint: <flow-id-or-feature-name>
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Invoke the `dkk-story-analyst` skill. The user's target is `$ARGUMENTS`.
|
|
7
|
+
|
|
8
|
+
- If `$ARGUMENTS` is empty, ask the user which flow to draft a story for, or list available flows via `mcp__dkk__list` (filter `type: flow`).
|
|
9
|
+
- If `$ARGUMENTS` looks like a flow id (`flow.<Name>` or bare `<Name>`), pass it through to `mcp__dkk__story`.
|
|
10
|
+
- Otherwise, run `mcp__dkk__search` with `$ARGUMENTS` first to identify the matching flow or root command, then proceed.
|
|
11
|
+
|
|
12
|
+
Follow the skill's workflow end to end, including clarifying questions and acceptance-criteria mapping.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* PostToolUse hook — auto-validate after edits to domain YAML.
|
|
4
|
+
*
|
|
5
|
+
* When Claude Code edits or writes a file under `.dkk/domain/`, run
|
|
6
|
+
* `dkk validate` so any broken cross-references or schema violations
|
|
7
|
+
* surface back into the agent loop immediately, before the next step.
|
|
8
|
+
*
|
|
9
|
+
* Stays silent for unrelated edits (no-op, exit 0).
|
|
10
|
+
*/
|
|
11
|
+
import { spawnSync } from "node:child_process";
|
|
12
|
+
import { existsSync } from "node:fs";
|
|
13
|
+
import { resolve } from "node:path";
|
|
14
|
+
|
|
15
|
+
let raw = "";
|
|
16
|
+
process.stdin.on("data", (d) => (raw += d));
|
|
17
|
+
process.stdin.on("end", () => {
|
|
18
|
+
let payload;
|
|
19
|
+
try {
|
|
20
|
+
payload = JSON.parse(raw || "{}");
|
|
21
|
+
} catch {
|
|
22
|
+
process.exit(0);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const filePath =
|
|
26
|
+
payload?.tool_input?.file_path ??
|
|
27
|
+
payload?.tool_input?.notebook_path ??
|
|
28
|
+
"";
|
|
29
|
+
|
|
30
|
+
// Only act on domain YAML edits.
|
|
31
|
+
const isDomainYaml = /\.dkk\/domain\/.*\.ya?ml$/.test(filePath);
|
|
32
|
+
if (!isDomainYaml) process.exit(0);
|
|
33
|
+
|
|
34
|
+
const repoRoot = process.env.CLAUDE_PROJECT_DIR ?? process.cwd();
|
|
35
|
+
const cliEntry = resolve(repoRoot, "src/cli.ts");
|
|
36
|
+
|
|
37
|
+
const [cmd, args] = existsSync(cliEntry)
|
|
38
|
+
? ["npx", ["tsx", cliEntry, "validate", "--json", "--minify"]]
|
|
39
|
+
: ["dkk", ["validate", "--json", "--minify"]];
|
|
40
|
+
|
|
41
|
+
const res = spawnSync(cmd, args, { cwd: repoRoot, encoding: "utf8" });
|
|
42
|
+
// If validate fails, surface the JSON output to the model via stderr (exit 2
|
|
43
|
+
// makes Claude Code feed stderr back as a tool-result correction signal).
|
|
44
|
+
if (res.status !== 0) {
|
|
45
|
+
process.stderr.write(
|
|
46
|
+
`dkk validate failed after edit to ${filePath}:\n${res.stdout || res.stderr || ""}\n`,
|
|
47
|
+
);
|
|
48
|
+
process.exit(2);
|
|
49
|
+
}
|
|
50
|
+
process.exit(0);
|
|
51
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* PreToolUse hook — block writes to generated/derived directories.
|
|
4
|
+
*
|
|
5
|
+
* `.dkk/docs/` is regenerated from YAML by `dkk render`. Edits there are
|
|
6
|
+
* always lost on the next render, so we block the tool call up-front and
|
|
7
|
+
* tell the agent to edit the source YAML instead.
|
|
8
|
+
*
|
|
9
|
+
* Same treatment for `dist/` (TypeScript build output).
|
|
10
|
+
*/
|
|
11
|
+
let raw = "";
|
|
12
|
+
process.stdin.on("data", (d) => (raw += d));
|
|
13
|
+
process.stdin.on("end", () => {
|
|
14
|
+
let payload;
|
|
15
|
+
try {
|
|
16
|
+
payload = JSON.parse(raw || "{}");
|
|
17
|
+
} catch {
|
|
18
|
+
process.exit(0);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const filePath = payload?.tool_input?.file_path ?? "";
|
|
22
|
+
if (!filePath) process.exit(0);
|
|
23
|
+
|
|
24
|
+
if (/\.dkk\/docs\//.test(filePath)) {
|
|
25
|
+
process.stderr.write(
|
|
26
|
+
`Blocked: ${filePath} is generated by \`dkk render\`. Edit the YAML under .dkk/domain/ and re-render instead.\n`,
|
|
27
|
+
);
|
|
28
|
+
process.exit(2);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (/\/dist\//.test(filePath)) {
|
|
32
|
+
process.stderr.write(
|
|
33
|
+
`Blocked: ${filePath} is build output. Edit the source under src/ and run \`npm run build\`.\n`,
|
|
34
|
+
);
|
|
35
|
+
process.exit(2);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
process.exit(0);
|
|
39
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* SessionStart hook — pipe `dkk prime` output into Claude Code's context.
|
|
4
|
+
*
|
|
5
|
+
* The hook prints the agent context document (item types, retrieval/update
|
|
6
|
+
* workflows, current domain summary) to stdout, which Claude Code surfaces
|
|
7
|
+
* as additional context for the session. Any errors fall through silently
|
|
8
|
+
* so a missing domain model never blocks session start.
|
|
9
|
+
*/
|
|
10
|
+
import { spawnSync } from "node:child_process";
|
|
11
|
+
import { existsSync } from "node:fs";
|
|
12
|
+
import { resolve } from "node:path";
|
|
13
|
+
|
|
14
|
+
const repoRoot = process.env.CLAUDE_PROJECT_DIR ?? process.cwd();
|
|
15
|
+
const cliEntry = resolve(repoRoot, "src/cli.ts");
|
|
16
|
+
|
|
17
|
+
let cmd, args;
|
|
18
|
+
if (existsSync(cliEntry)) {
|
|
19
|
+
// Local DKK development: run via tsx.
|
|
20
|
+
cmd = "npx";
|
|
21
|
+
args = ["tsx", cliEntry, "prime"];
|
|
22
|
+
} else {
|
|
23
|
+
// Downstream consumer: rely on the published `dkk` binary.
|
|
24
|
+
cmd = "dkk";
|
|
25
|
+
args = ["prime"];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const res = spawnSync(cmd, args, { cwd: repoRoot, encoding: "utf8" });
|
|
29
|
+
if (res.status === 0 && res.stdout) {
|
|
30
|
+
process.stdout.write(res.stdout);
|
|
31
|
+
}
|
|
32
|
+
// Always exit 0 — never block session start over a missing/empty model.
|
|
33
|
+
process.exit(0);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Stop hook — final validation gate before the agent ends a turn.
|
|
4
|
+
*
|
|
5
|
+
* Runs `dkk validate`. If the domain model is invalid, returns exit code 2
|
|
6
|
+
* with the JSON error report on stderr. Claude Code feeds that back so the
|
|
7
|
+
* agent must fix the broken model before declaring the work complete.
|
|
8
|
+
*
|
|
9
|
+
* `stop_hook_active` is honoured to prevent infinite loops if Claude tries
|
|
10
|
+
* to stop again after the hook already fired once.
|
|
11
|
+
*/
|
|
12
|
+
import { spawnSync } from "node:child_process";
|
|
13
|
+
import { existsSync } from "node:fs";
|
|
14
|
+
import { resolve } from "node:path";
|
|
15
|
+
|
|
16
|
+
let raw = "";
|
|
17
|
+
process.stdin.on("data", (d) => (raw += d));
|
|
18
|
+
process.stdin.on("end", () => {
|
|
19
|
+
let payload;
|
|
20
|
+
try {
|
|
21
|
+
payload = JSON.parse(raw || "{}");
|
|
22
|
+
} catch {
|
|
23
|
+
process.exit(0);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (payload?.stop_hook_active) {
|
|
27
|
+
process.exit(0);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const repoRoot = process.env.CLAUDE_PROJECT_DIR ?? process.cwd();
|
|
31
|
+
const cliEntry = resolve(repoRoot, "src/cli.ts");
|
|
32
|
+
|
|
33
|
+
// No domain model? Nothing to gate on.
|
|
34
|
+
if (!existsSync(resolve(repoRoot, ".dkk/domain"))) process.exit(0);
|
|
35
|
+
|
|
36
|
+
const [cmd, args] = existsSync(cliEntry)
|
|
37
|
+
? ["npx", ["tsx", cliEntry, "validate", "--json", "--minify"]]
|
|
38
|
+
: ["dkk", ["validate", "--json", "--minify"]];
|
|
39
|
+
|
|
40
|
+
const res = spawnSync(cmd, args, { cwd: repoRoot, encoding: "utf8" });
|
|
41
|
+
if (res.status !== 0) {
|
|
42
|
+
process.stderr.write(
|
|
43
|
+
`Domain validation failed — fix these before ending the turn:\n${res.stdout || res.stderr || ""}\n`,
|
|
44
|
+
);
|
|
45
|
+
process.exit(2);
|
|
46
|
+
}
|
|
47
|
+
process.exit(0);
|
|
48
|
+
});
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/claude-code-settings.json",
|
|
3
|
+
"permissions": {
|
|
4
|
+
"allow": [
|
|
5
|
+
"Bash(dkk list:*)",
|
|
6
|
+
"Bash(dkk show:*)",
|
|
7
|
+
"Bash(dkk summary:*)",
|
|
8
|
+
"Bash(dkk search:*)",
|
|
9
|
+
"Bash(dkk related:*)",
|
|
10
|
+
"Bash(dkk graph:*)",
|
|
11
|
+
"Bash(dkk locate:*)",
|
|
12
|
+
"Bash(dkk story:*)",
|
|
13
|
+
"Bash(dkk validate:*)",
|
|
14
|
+
"Bash(dkk stats:*)",
|
|
15
|
+
"Bash(dkk prime:*)"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"hooks": {
|
|
19
|
+
"SessionStart": [
|
|
20
|
+
{
|
|
21
|
+
"hooks": [
|
|
22
|
+
{
|
|
23
|
+
"type": "command",
|
|
24
|
+
"command": "node \"$CLAUDE_PROJECT_DIR/.claude/hooks/session-start-prime.mjs\""
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"PreToolUse": [
|
|
30
|
+
{
|
|
31
|
+
"matcher": "Edit|Write|MultiEdit|NotebookEdit",
|
|
32
|
+
"hooks": [
|
|
33
|
+
{
|
|
34
|
+
"type": "command",
|
|
35
|
+
"command": "node \"$CLAUDE_PROJECT_DIR/.claude/hooks/pre-edit-block-generated.mjs\""
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"PostToolUse": [
|
|
41
|
+
{
|
|
42
|
+
"matcher": "Edit|Write|MultiEdit",
|
|
43
|
+
"hooks": [
|
|
44
|
+
{
|
|
45
|
+
"type": "command",
|
|
46
|
+
"command": "node \"$CLAUDE_PROJECT_DIR/.claude/hooks/post-edit-validate.mjs\""
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"Stop": [
|
|
52
|
+
{
|
|
53
|
+
"hooks": [
|
|
54
|
+
{
|
|
55
|
+
"type": "command",
|
|
56
|
+
"command": "node \"$CLAUDE_PROJECT_DIR/.claude/hooks/stop-validate.mjs\""
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dkk-adr-author
|
|
3
|
+
description: Draft a new Architecture Decision Record grounded in the local Domain Knowledge Pack. Use when the user wants to record an architectural decision, capture a trade-off, document a tech choice, or formalize a discussion as an ADR.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ADR Author
|
|
7
|
+
|
|
8
|
+
Use this skill whenever the user wants to **record an architectural decision, draft an ADR, or capture a trade-off** in a project that has a Domain Knowledge Pack (`.dkk/`).
|
|
9
|
+
|
|
10
|
+
> **The DKK model is the single source of truth.** Every ADR must link to the domain items it constrains, bidirectionally. Skipping that link is the most common failure mode this skill prevents.
|
|
11
|
+
|
|
12
|
+
## Preferred tools
|
|
13
|
+
|
|
14
|
+
1. `mcp__dkk__search` (with `type: adr`) — find related existing ADRs
|
|
15
|
+
2. `mcp__dkk__show` — read those ADRs in full
|
|
16
|
+
3. `mcp__dkk__search` and `mcp__dkk__related` — identify which domain items the decision affects
|
|
17
|
+
4. `mcp__dkk__locate` — get absolute paths to edit the linked items
|
|
18
|
+
5. `mcp__dkk__validate` — final correctness check
|
|
19
|
+
6. `dkk new adr "<title>"` (Bash) — scaffold the file with the right number and frontmatter
|
|
20
|
+
7. `dkk render` (Bash) — refresh docs and search index after the ADR is finished
|
|
21
|
+
|
|
22
|
+
Use the equivalent `dkk` shell commands only if the MCP server is unavailable.
|
|
23
|
+
|
|
24
|
+
## Workflow
|
|
25
|
+
|
|
26
|
+
1. **Search prior ADRs first.** Call `mcp__dkk__search` with the topic and `type: adr`. Read every related ADR via `mcp__dkk__show`. If a *current* ADR already covers the decision, do not create a new one — update the existing record (with `superseded_by` if direction has changed). If a *deprecated* ADR is relevant, surface its rationale to the user; do not relitigate without acknowledging it.
|
|
27
|
+
2. **Identify affected domain items.** From the user's description, search the model and use `mcp__dkk__related` to find aggregates, events, commands, policies, and read models the decision constrains. Confirm the list with the user.
|
|
28
|
+
3. **Clarify the decision.** Ask **2–5 targeted questions** before drafting. Derive each question and its options from the search results and the user's stated motivation. Skip questions only when the decision is fully specified and uncontroversial. Examples (only if relevant):
|
|
29
|
+
- What problem prompted the decision? (constraint / incident / new requirement / cleanup)
|
|
30
|
+
- What alternatives were considered, and why were they rejected?
|
|
31
|
+
- Which domain items are constrained by this decision?
|
|
32
|
+
- What is the status — Proposed (needs review), Accepted (in effect), or Deprecated (recording history)?
|
|
33
|
+
- Does this supersede a prior ADR? If yes, which one?
|
|
34
|
+
4. **Scaffold via the CLI.** Run `dkk new adr "<title>"` — this auto-increments the number and creates the file with valid frontmatter and the canonical section structure. Do not hand-create the file.
|
|
35
|
+
5. **Fill the body.** The canonical sections are *Context*, *Decision*, *Consequences*, and *Alternatives Considered*. Use precise domain terminology — match every name to the items returned by `mcp__dkk__search` and `mcp__dkk__show`.
|
|
36
|
+
6. **Set the bidirectional links.** Both sides must agree:
|
|
37
|
+
- In the ADR frontmatter, set `domain_refs:` to the list of affected item ids (e.g. `ordering.OrderPlaced`, `actor.Customer`).
|
|
38
|
+
- On every linked domain item's YAML, append the new ADR id to its `adr_refs:` list. Use `mcp__dkk__locate` to find each file.
|
|
39
|
+
7. **Run quality gates.** The post-edit hook runs `mcp__dkk__validate` automatically; before declaring the work done, also run `dkk render` to refresh `.dkk/docs/` and rebuild the search index.
|
|
40
|
+
|
|
41
|
+
## Status discipline
|
|
42
|
+
|
|
43
|
+
- **Proposed** — newly drafted, awaiting team review. The decision is not in effect yet.
|
|
44
|
+
- **Accepted** — the decision is in effect; new code must comply.
|
|
45
|
+
- **Deprecated** — no longer in effect, but kept as project memory. If a successor exists, set `superseded_by: adr-NNNN` in the frontmatter.
|
|
46
|
+
|
|
47
|
+
Never delete an ADR. Even superseded ones are institutional memory.
|
|
48
|
+
|
|
49
|
+
## Don'ts
|
|
50
|
+
|
|
51
|
+
- Don't draft an ADR that doesn't reference at least one domain item (the bidirectional link is what makes ADRs queryable).
|
|
52
|
+
- Don't invent domain terms in the ADR body — every name must exist in the model.
|
|
53
|
+
- Don't hand-edit the ADR filename or number; let `dkk new adr` assign it.
|
|
54
|
+
- Don't skip searching for prior ADRs — relitigating a decided question without referencing the prior ADR is the worst failure mode.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dkk-flow-implementer
|
|
3
|
+
description: Guide a developer through framework-agnostic implementation of a DKK flow. Use when the user asks to implement, build, or code a flow or feature that maps to a flow in the local Domain Knowledge Pack.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Flow Implementer
|
|
7
|
+
|
|
8
|
+
Use this skill whenever the user asks to **implement, build, or code a flow / feature** in a project that has a Domain Knowledge Pack (`.dkk/`).
|
|
9
|
+
|
|
10
|
+
> **Source of truth is local.** Do not look for or reference external trackers (Jira, GitHub Issues, Linear, Trello, etc.) for requirements. The local DKK model — accessed through the MCP `dkk` server or the `dkk` CLI — is authoritative.
|
|
11
|
+
|
|
12
|
+
## Preferred tools
|
|
13
|
+
|
|
14
|
+
Call MCP tools rather than shelling out, in this order of preference:
|
|
15
|
+
|
|
16
|
+
1. `mcp__dkk__story` — full flow context (actors, ordered steps, policies, BDD examples, ADRs, downstream effects) in one call
|
|
17
|
+
2. `mcp__dkk__list` — to discover available flows when the user hasn't named one
|
|
18
|
+
3. `mcp__dkk__search` — to locate a flow when the user gives a feature name instead of an id
|
|
19
|
+
4. `mcp__dkk__related` — to extend blast radius beyond the immediate flow
|
|
20
|
+
5. `mcp__dkk__show` — to read the full definition of a specific item
|
|
21
|
+
6. `mcp__dkk__validate` — final correctness check after edits
|
|
22
|
+
|
|
23
|
+
Fall back to the equivalent `dkk` shell commands only if the MCP server is unavailable.
|
|
24
|
+
|
|
25
|
+
## Workflow
|
|
26
|
+
|
|
27
|
+
1. **Identify the flow.** If the user gave an id, normalize it (`flow.<Name>` or bare `<Name>`). Otherwise call `mcp__dkk__list` filtered by `type: flow`, or `mcp__dkk__search` on the feature name to find a candidate flow or root command.
|
|
28
|
+
2. **Retrieve full context.** Call `mcp__dkk__story` with the flow id. Read the actors, ordered steps, triggered policies, BDD examples, ADRs, and downstream effects.
|
|
29
|
+
3. **Clarify scope.** Ask **1–7 clarifying questions** before generating any checklist. 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, no cross-context effects, no ambiguity). Questions should target implementation behavior and UX, e.g.:
|
|
30
|
+
- What should the user see immediately after this command succeeds?
|
|
31
|
+
- How should validation errors surface (inline / toast / page-level)?
|
|
32
|
+
- Optimistic UI or wait-for-confirmation?
|
|
33
|
+
- Concurrency: can two users trigger this simultaneously?
|
|
34
|
+
- Is there an undo path, or one-way?
|
|
35
|
+
4. **Present architectural constraints.** List every ADR returned in the story output (`adr-NNNN — title — status`). Ask the user to acknowledge these before implementation begins. If the agent identifies any ADR conflict with the user's stated approach, surface it before proceeding.
|
|
36
|
+
5. **Generate a framework-agnostic checklist.** Group by domain role:
|
|
37
|
+
- **Aggregates** — entities, state transitions, invariants
|
|
38
|
+
- **Commands** — handlers, preconditions, validations
|
|
39
|
+
- **Events** — what to publish on success
|
|
40
|
+
- **Policies** — reactive logic triggered by events
|
|
41
|
+
- **Read models** — projections to update on events
|
|
42
|
+
6. **Walk through interactively.** Ask the user which checklist item they want to tackle first. Guide on the **domain logic** — invariants, policies, transitions — not framework boilerplate. Only emit framework-specific code if the user explicitly asks or `AGENTS.md` / `CLAUDE.md` directs otherwise.
|
|
43
|
+
7. **Use the canonical nouns.** Whatever names appear in the `mcp__dkk__story` output are the only allowed names. Do not rename `OrderBasket` to `ShoppingCart`.
|
|
44
|
+
8. **Validate and render after structural changes.** When the user's implementation requires new or modified domain items, use the DKK CLI commands (`dkk add`, `dkk rename`, `dkk rm`) for structural changes and edit YAML directly only for content. The post-edit hook will run `mcp__dkk__validate` automatically; before declaring the work done, also run `dkk render` to refresh docs and the search index.
|
|
45
|
+
|
|
46
|
+
## Interaction rules
|
|
47
|
+
|
|
48
|
+
- Do not generate full boilerplate up front. Wait for the user to request code for a specific checklist item.
|
|
49
|
+
- Confirm with the user before moving to the next checklist item.
|
|
50
|
+
- If the user asks for a framework-specific implementation, defer to `AGENTS.md` or `CLAUDE.md` conventions.
|
|
51
|
+
- Never invent domain terms. If a needed concept is missing from the model, surface it as a gap and propose adding it via `dkk add` rather than coding around it.
|
|
@@ -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",
|