domain-knowledge-kit 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/LICENSE +94 -0
  2. package/README.md +266 -0
  3. package/dist/cli.d.ts +3 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +40 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/features/adr/commands/adr-related.d.ts +14 -0
  8. package/dist/features/adr/commands/adr-related.d.ts.map +1 -0
  9. package/dist/features/adr/commands/adr-related.js +146 -0
  10. package/dist/features/adr/commands/adr-related.js.map +1 -0
  11. package/dist/features/adr/commands/adr-show.d.ts +10 -0
  12. package/dist/features/adr/commands/adr-show.d.ts.map +1 -0
  13. package/dist/features/adr/commands/adr-show.js +30 -0
  14. package/dist/features/adr/commands/adr-show.js.map +1 -0
  15. package/dist/features/pipeline/commands/render.d.ts +10 -0
  16. package/dist/features/pipeline/commands/render.d.ts.map +1 -0
  17. package/dist/features/pipeline/commands/render.js +71 -0
  18. package/dist/features/pipeline/commands/render.js.map +1 -0
  19. package/dist/features/pipeline/commands/validate.d.ts +10 -0
  20. package/dist/features/pipeline/commands/validate.d.ts.map +1 -0
  21. package/dist/features/pipeline/commands/validate.js +48 -0
  22. package/dist/features/pipeline/commands/validate.js.map +1 -0
  23. package/dist/features/pipeline/indexer.d.ts +36 -0
  24. package/dist/features/pipeline/indexer.d.ts.map +1 -0
  25. package/dist/features/pipeline/indexer.js +279 -0
  26. package/dist/features/pipeline/indexer.js.map +1 -0
  27. package/dist/features/pipeline/renderer.d.ts +42 -0
  28. package/dist/features/pipeline/renderer.d.ts.map +1 -0
  29. package/dist/features/pipeline/renderer.js +239 -0
  30. package/dist/features/pipeline/renderer.js.map +1 -0
  31. package/dist/features/pipeline/tests/indexer.test.d.ts +2 -0
  32. package/dist/features/pipeline/tests/indexer.test.d.ts.map +1 -0
  33. package/dist/features/pipeline/tests/indexer.test.js +224 -0
  34. package/dist/features/pipeline/tests/indexer.test.js.map +1 -0
  35. package/dist/features/pipeline/tests/renderer.test.d.ts +2 -0
  36. package/dist/features/pipeline/tests/renderer.test.d.ts.map +1 -0
  37. package/dist/features/pipeline/tests/renderer.test.js +252 -0
  38. package/dist/features/pipeline/tests/renderer.test.js.map +1 -0
  39. package/dist/features/pipeline/tests/validate-schemas.test.d.ts +2 -0
  40. package/dist/features/pipeline/tests/validate-schemas.test.d.ts.map +1 -0
  41. package/dist/features/pipeline/tests/validate-schemas.test.js +183 -0
  42. package/dist/features/pipeline/tests/validate-schemas.test.js.map +1 -0
  43. package/dist/features/pipeline/tests/validator.test.d.ts +2 -0
  44. package/dist/features/pipeline/tests/validator.test.d.ts.map +1 -0
  45. package/dist/features/pipeline/tests/validator.test.js +371 -0
  46. package/dist/features/pipeline/tests/validator.test.js.map +1 -0
  47. package/dist/features/pipeline/validator.d.ts +44 -0
  48. package/dist/features/pipeline/validator.d.ts.map +1 -0
  49. package/dist/features/pipeline/validator.js +289 -0
  50. package/dist/features/pipeline/validator.js.map +1 -0
  51. package/dist/features/query/commands/list.d.ts +10 -0
  52. package/dist/features/query/commands/list.d.ts.map +1 -0
  53. package/dist/features/query/commands/list.js +123 -0
  54. package/dist/features/query/commands/list.js.map +1 -0
  55. package/dist/features/query/commands/related.d.ts +10 -0
  56. package/dist/features/query/commands/related.d.ts.map +1 -0
  57. package/dist/features/query/commands/related.js +61 -0
  58. package/dist/features/query/commands/related.js.map +1 -0
  59. package/dist/features/query/commands/search.d.ts +10 -0
  60. package/dist/features/query/commands/search.d.ts.map +1 -0
  61. package/dist/features/query/commands/search.js +55 -0
  62. package/dist/features/query/commands/search.js.map +1 -0
  63. package/dist/features/query/commands/show.d.ts +10 -0
  64. package/dist/features/query/commands/show.d.ts.map +1 -0
  65. package/dist/features/query/commands/show.js +96 -0
  66. package/dist/features/query/commands/show.js.map +1 -0
  67. package/dist/features/query/searcher.d.ts +58 -0
  68. package/dist/features/query/searcher.d.ts.map +1 -0
  69. package/dist/features/query/searcher.js +185 -0
  70. package/dist/features/query/searcher.js.map +1 -0
  71. package/dist/features/query/tests/searcher.test.d.ts +2 -0
  72. package/dist/features/query/tests/searcher.test.d.ts.map +1 -0
  73. package/dist/features/query/tests/searcher.test.js +320 -0
  74. package/dist/features/query/tests/searcher.test.js.map +1 -0
  75. package/dist/shared/adr-parser.d.ts +14 -0
  76. package/dist/shared/adr-parser.d.ts.map +1 -0
  77. package/dist/shared/adr-parser.js +72 -0
  78. package/dist/shared/adr-parser.js.map +1 -0
  79. package/dist/shared/errors.d.ts +43 -0
  80. package/dist/shared/errors.d.ts.map +1 -0
  81. package/dist/shared/errors.js +60 -0
  82. package/dist/shared/errors.js.map +1 -0
  83. package/dist/shared/graph.d.ts +71 -0
  84. package/dist/shared/graph.d.ts.map +1 -0
  85. package/dist/shared/graph.js +250 -0
  86. package/dist/shared/graph.js.map +1 -0
  87. package/dist/shared/index.d.ts +16 -0
  88. package/dist/shared/index.d.ts.map +1 -0
  89. package/dist/shared/index.js +24 -0
  90. package/dist/shared/index.js.map +1 -0
  91. package/dist/shared/item-visitor.d.ts +62 -0
  92. package/dist/shared/item-visitor.d.ts.map +1 -0
  93. package/dist/shared/item-visitor.js +95 -0
  94. package/dist/shared/item-visitor.js.map +1 -0
  95. package/dist/shared/loader.d.ts +19 -0
  96. package/dist/shared/loader.d.ts.map +1 -0
  97. package/dist/shared/loader.js +166 -0
  98. package/dist/shared/loader.js.map +1 -0
  99. package/dist/shared/paths.d.ts +32 -0
  100. package/dist/shared/paths.d.ts.map +1 -0
  101. package/dist/shared/paths.js +62 -0
  102. package/dist/shared/paths.js.map +1 -0
  103. package/dist/shared/tests/graph.test.d.ts +2 -0
  104. package/dist/shared/tests/graph.test.d.ts.map +1 -0
  105. package/dist/shared/tests/graph.test.js +291 -0
  106. package/dist/shared/tests/graph.test.js.map +1 -0
  107. package/dist/shared/tests/loader.test.d.ts +2 -0
  108. package/dist/shared/tests/loader.test.d.ts.map +1 -0
  109. package/dist/shared/tests/loader.test.js +239 -0
  110. package/dist/shared/tests/loader.test.js.map +1 -0
  111. package/dist/shared/tests/verify-collision-fix.test.d.ts +2 -0
  112. package/dist/shared/tests/verify-collision-fix.test.d.ts.map +1 -0
  113. package/dist/shared/tests/verify-collision-fix.test.js +114 -0
  114. package/dist/shared/tests/verify-collision-fix.test.js.map +1 -0
  115. package/dist/shared/types/domain.d.ts +244 -0
  116. package/dist/shared/types/domain.d.ts.map +1 -0
  117. package/dist/shared/types/domain.js +6 -0
  118. package/dist/shared/types/domain.js.map +1 -0
  119. package/dist/shared/types/index.d.ts +34 -0
  120. package/dist/shared/types/index.d.ts.map +1 -0
  121. package/dist/shared/types/index.js +9 -0
  122. package/dist/shared/types/index.js.map +1 -0
  123. package/dist/shared/yaml.d.ts +13 -0
  124. package/dist/shared/yaml.d.ts.map +1 -0
  125. package/dist/shared/yaml.js +29 -0
  126. package/dist/shared/yaml.js.map +1 -0
  127. package/package.json +48 -0
  128. package/tools/domain-pack/schema/.gitkeep +0 -0
  129. package/tools/domain-pack/schema/actors.schema.json +42 -0
  130. package/tools/domain-pack/schema/adr-frontmatter.schema.json +51 -0
  131. package/tools/domain-pack/schema/aggregate.schema.json +58 -0
  132. package/tools/domain-pack/schema/command.schema.json +76 -0
  133. package/tools/domain-pack/schema/context.schema.json +51 -0
  134. package/tools/domain-pack/schema/event.schema.json +66 -0
  135. package/tools/domain-pack/schema/glossary.schema.json +33 -0
  136. package/tools/domain-pack/schema/index.schema.json +76 -0
  137. package/tools/domain-pack/schema/policy.schema.json +53 -0
  138. package/tools/domain-pack/schema/read-model.schema.json +39 -0
  139. package/tools/domain-pack/templates/.gitkeep +0 -0
  140. package/tools/domain-pack/templates/context.md.hbs +89 -0
  141. package/tools/domain-pack/templates/index.md.hbs +60 -0
  142. package/tools/domain-pack/templates/item.md.hbs +85 -0
@@ -0,0 +1,166 @@
1
+ /**
2
+ * Domain model loader.
3
+ *
4
+ * Recursively walks `domain/` and `docs/adr/` to discover all YAML
5
+ * definition files and ADR Markdown files, then assembles and returns
6
+ * a fully-typed {@link DomainModel}.
7
+ *
8
+ * Context layout (per-item directory format):
9
+ *
10
+ * domain/contexts/<name>/
11
+ * context.yml ← metadata: name, description, glossary
12
+ * events/ ← one .yml file per DomainEvent
13
+ * commands/ ← one .yml file per Command
14
+ * policies/ ← one .yml file per Policy
15
+ * aggregates/ ← one .yml file per Aggregate
16
+ * read-models/ ← one .yml file per ReadModel
17
+ */
18
+ import { readFileSync, readdirSync, existsSync } from "node:fs";
19
+ import { join, basename, extname } from "node:path";
20
+ import { parseYaml } from "./yaml.js";
21
+ import { parseAdrFile } from "./adr-parser.js";
22
+ import { actorsFile, contextsDir, indexFile, adrDir, } from "./paths.js";
23
+ // ── Helpers ───────────────────────────────────────────────────────────
24
+ /** Read a YAML file and parse it into `T`. */
25
+ function loadYaml(filePath) {
26
+ const text = readFileSync(filePath, "utf-8");
27
+ return parseYaml(text);
28
+ }
29
+ /**
30
+ * Discover all `.yml` / `.yaml` files under a directory (non-recursive).
31
+ * Skips dotfiles (e.g. `.gitkeep`).
32
+ */
33
+ function listYamlFiles(dir) {
34
+ if (!existsSync(dir))
35
+ return [];
36
+ return readdirSync(dir)
37
+ .filter((f) => {
38
+ const ext = extname(f).toLowerCase();
39
+ return (ext === ".yml" || ext === ".yaml") && !f.startsWith(".");
40
+ })
41
+ .sort()
42
+ .map((f) => join(dir, f));
43
+ }
44
+ /**
45
+ * Discover all `.md` files under a directory (non-recursive).
46
+ * Skips README.md and dotfiles.
47
+ */
48
+ function listAdrFiles(dir) {
49
+ if (!existsSync(dir))
50
+ return [];
51
+ return readdirSync(dir)
52
+ .filter((f) => {
53
+ const ext = extname(f).toLowerCase();
54
+ const name = basename(f).toLowerCase();
55
+ return ext === ".md" && !f.startsWith(".") && name !== "readme.md";
56
+ })
57
+ .sort()
58
+ .map((f) => join(dir, f));
59
+ }
60
+ /**
61
+ * Load a bounded context from a per-item directory.
62
+ *
63
+ * Expects:
64
+ * <ctxDir>/context.yml — identity: name, description, glossary
65
+ * <ctxDir>/events/*.yml — one file per DomainEvent
66
+ * <ctxDir>/commands/*.yml — one file per Command
67
+ * <ctxDir>/policies/*.yml — one file per Policy
68
+ * <ctxDir>/aggregates/*.yml — one file per Aggregate
69
+ * <ctxDir>/read-models/*.yml — one file per ReadModel
70
+ *
71
+ * Returns `null` if `context.yml` is absent or has no `name`.
72
+ */
73
+ function loadPerItemContext(ctxDir) {
74
+ const metaPath = join(ctxDir, "context.yml");
75
+ if (!existsSync(metaPath))
76
+ return null;
77
+ const meta = loadYaml(metaPath);
78
+ if (!meta.name)
79
+ return null;
80
+ const events = listYamlFiles(join(ctxDir, "events")).map((f) => loadYaml(f));
81
+ const commands = listYamlFiles(join(ctxDir, "commands")).map((f) => loadYaml(f));
82
+ const policies = listYamlFiles(join(ctxDir, "policies")).map((f) => loadYaml(f));
83
+ const aggregates = listYamlFiles(join(ctxDir, "aggregates")).map((f) => loadYaml(f));
84
+ const readModels = listYamlFiles(join(ctxDir, "read-models")).map((f) => loadYaml(f));
85
+ const ctx = {
86
+ name: meta.name,
87
+ description: meta.description,
88
+ };
89
+ if (meta.glossary?.length)
90
+ ctx.glossary = meta.glossary;
91
+ if (events.length)
92
+ ctx.events = events;
93
+ if (commands.length)
94
+ ctx.commands = commands;
95
+ if (policies.length)
96
+ ctx.policies = policies;
97
+ if (aggregates.length)
98
+ ctx.aggregates = aggregates;
99
+ if (readModels.length)
100
+ ctx.read_models = readModels;
101
+ return ctx;
102
+ }
103
+ /**
104
+ * Discover and load all bounded contexts from `domain/contexts/`.
105
+ *
106
+ * Each sub-directory that contains a `context.yml` is treated as a
107
+ * bounded context in the new per-item format.
108
+ */
109
+ function loadAllContexts(ctxDir) {
110
+ const contexts = new Map();
111
+ if (!existsSync(ctxDir))
112
+ return contexts;
113
+ const entries = readdirSync(ctxDir, { withFileTypes: true });
114
+ for (const entry of entries) {
115
+ if (entry.name.startsWith("."))
116
+ continue;
117
+ if (!entry.isDirectory())
118
+ continue;
119
+ const ctx = loadPerItemContext(join(ctxDir, entry.name));
120
+ if (ctx)
121
+ contexts.set(ctx.name, ctx);
122
+ }
123
+ return contexts;
124
+ }
125
+ /**
126
+ * Load the complete domain model from disk.
127
+ *
128
+ * 1. Parses `domain/index.yml`
129
+ * 2. Parses `domain/actors.yml`
130
+ * 3. Discovers and parses every bounded-context YAML file
131
+ * under `domain/contexts/`
132
+ * 4. Discovers and parses ADR frontmatter from `docs/adr/*.md`
133
+ *
134
+ * @returns A fully-populated {@link DomainModel}.
135
+ */
136
+ export function loadDomainModel(options = {}) {
137
+ const root = options.root;
138
+ // 1. Domain index
139
+ const indexPath = indexFile(root);
140
+ const index = existsSync(indexPath)
141
+ ? loadYaml(indexPath)
142
+ : { contexts: [] };
143
+ // 2. Actors
144
+ const actorsPath = actorsFile(root);
145
+ const actorsData = existsSync(actorsPath)
146
+ ? loadYaml(actorsPath)
147
+ : { actors: [] };
148
+ // 3. Bounded contexts
149
+ const contexts = loadAllContexts(contextsDir(root));
150
+ // 4. ADRs
151
+ const adrs = new Map();
152
+ const adrFiles = listAdrFiles(adrDir(root));
153
+ for (const adrPath of adrFiles) {
154
+ const record = parseAdrFile(adrPath);
155
+ if (record) {
156
+ adrs.set(record.id, record);
157
+ }
158
+ }
159
+ return {
160
+ index,
161
+ actors: actorsData.actors ?? [],
162
+ contexts,
163
+ adrs,
164
+ };
165
+ }
166
+ //# sourceMappingURL=loader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loader.js","sourceRoot":"","sources":["../../src/shared/loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAcpD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAA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AI;KACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Resolve the repository root.
3
+ *
4
+ * When running from source (`tsx src/cli.ts`) `import.meta.dirname`
5
+ * points at `src/shared/`, so we go up two levels. When running from
6
+ * the compiled output (`dist/shared/`) we also go up two levels.
7
+ *
8
+ * Callers can override by passing an explicit `repoRoot`.
9
+ */
10
+ export declare function repoRoot(override?: string): string;
11
+ /** Absolute path to the `domain/` directory. */
12
+ export declare function domainDir(root?: string): string;
13
+ /** Absolute path to `domain/contexts/`. */
14
+ export declare function contextsDir(root?: string): string;
15
+ /** Absolute path to `domain/actors.yml`. */
16
+ export declare function actorsFile(root?: string): string;
17
+ /** Absolute path to `domain/index.yml`. */
18
+ export declare function indexFile(root?: string): string;
19
+ /** Absolute path to `docs/adr/`. */
20
+ export declare function adrDir(root?: string): string;
21
+ /** Absolute path to `docs/domain/` (rendered output). */
22
+ export declare function docsDir(root?: string): string;
23
+ /** Absolute path to `tools/domain-pack/templates/`. */
24
+ export declare function templatesDir(root?: string): string;
25
+ /** Absolute path to `tools/domain-pack/schema/`. */
26
+ export declare function schemaDir(root?: string): string;
27
+ /**
28
+ * Turn an absolute path into a repo-relative POSIX path
29
+ * (forward slashes, no leading `./`).
30
+ */
31
+ export declare function repoRelative(absPath: string, root?: string): string;
32
+ //# sourceMappingURL=paths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/shared/paths.ts"],"names":[],"mappings":"AAQA;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAIlD;AAED,gDAAgD;AAChD,wBAAgB,SAAS,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,2CAA2C;AAC3C,wBAAgB,WAAW,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,4CAA4C;AAC5C,wBAAgB,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,2CAA2C;AAC3C,wBAAgB,SAAS,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,oCAAoC;AACpC,wBAAgB,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED,yDAAyD;AACzD,wBAAgB,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAE7C;AAED,uDAAuD;AACvD,wBAAgB,YAAY,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,oDAAoD;AACpD,wBAAgB,SAAS,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAEnE"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Repo-relative path resolution utilities.
3
+ *
4
+ * Every path helper resolves relative to the repository root
5
+ * so callers never need to worry about the working directory.
6
+ */
7
+ import { resolve, join, relative } from "node:path";
8
+ /**
9
+ * Resolve the repository root.
10
+ *
11
+ * When running from source (`tsx src/cli.ts`) `import.meta.dirname`
12
+ * points at `src/shared/`, so we go up two levels. When running from
13
+ * the compiled output (`dist/shared/`) we also go up two levels.
14
+ *
15
+ * Callers can override by passing an explicit `repoRoot`.
16
+ */
17
+ export function repoRoot(override) {
18
+ if (override)
19
+ return resolve(override);
20
+ // import.meta.dirname is src/shared or dist/shared
21
+ return resolve(import.meta.dirname, "../..");
22
+ }
23
+ /** Absolute path to the `domain/` directory. */
24
+ export function domainDir(root) {
25
+ return join(repoRoot(root), "domain");
26
+ }
27
+ /** Absolute path to `domain/contexts/`. */
28
+ export function contextsDir(root) {
29
+ return join(domainDir(root), "contexts");
30
+ }
31
+ /** Absolute path to `domain/actors.yml`. */
32
+ export function actorsFile(root) {
33
+ return join(domainDir(root), "actors.yml");
34
+ }
35
+ /** Absolute path to `domain/index.yml`. */
36
+ export function indexFile(root) {
37
+ return join(domainDir(root), "index.yml");
38
+ }
39
+ /** Absolute path to `docs/adr/`. */
40
+ export function adrDir(root) {
41
+ return join(repoRoot(root), "docs", "adr");
42
+ }
43
+ /** Absolute path to `docs/domain/` (rendered output). */
44
+ export function docsDir(root) {
45
+ return join(repoRoot(root), "docs", "domain");
46
+ }
47
+ /** Absolute path to `tools/domain-pack/templates/`. */
48
+ export function templatesDir(root) {
49
+ return join(repoRoot(root), "tools", "domain-pack", "templates");
50
+ }
51
+ /** Absolute path to `tools/domain-pack/schema/`. */
52
+ export function schemaDir(root) {
53
+ return join(repoRoot(root), "tools", "domain-pack", "schema");
54
+ }
55
+ /**
56
+ * Turn an absolute path into a repo-relative POSIX path
57
+ * (forward slashes, no leading `./`).
58
+ */
59
+ export function repoRelative(absPath, root) {
60
+ return relative(repoRoot(root), absPath).replace(/\\/g, "/");
61
+ }
62
+ //# sourceMappingURL=paths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/shared/paths.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAEpD;;;;;;;;GAQG;AACH,MAAM,UAAU,QAAQ,CAAC,QAAiB;IACxC,IAAI,QAAQ;QAAE,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;IACvC,oDAAoD;IACpD,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAC/C,CAAC;AAED,gDAAgD;AAChD,MAAM,UAAU,SAAS,CAAC,IAAa;IACrC,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAC;AACxC,CAAC;AAED,2CAA2C;AAC3C,MAAM,UAAU,WAAW,CAAC,IAAa;IACvC,OA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@
1
+ {"version":3,"file":"graph.test.d.ts","sourceRoot":"","sources":["../../../src/shared/tests/graph.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,291 @@
1
+ /**
2
+ * Tests for the domain graph (adjacency-list) module.
3
+ *
4
+ * Builds a DomainModel in-memory (via the loader's temp-dir approach)
5
+ * and verifies that DomainGraph correctly wires nodes and edges.
6
+ */
7
+ import { mkdirSync, writeFileSync, rmSync } from "node:fs";
8
+ import { join } from "node:path";
9
+ import { tmpdir } from "node:os";
10
+ import { loadDomainModel } from "../loader.js";
11
+ import { DomainGraph } from "../graph.js";
12
+ // ── Fixture setup ─────────────────────────────────────────────────────
13
+ const TMP = join(tmpdir(), `dkk-graph-test-${Date.now()}`);
14
+ const DOMAIN = join(TMP, "domain");
15
+ const CONTEXTS = join(DOMAIN, "contexts");
16
+ const ADR_DIR = join(TMP, "docs", "adr");
17
+ function setup() {
18
+ mkdirSync(join(CONTEXTS, "ordering", "events"), { recursive: true });
19
+ mkdirSync(join(CONTEXTS, "ordering", "commands"), { recursive: true });
20
+ mkdirSync(join(CONTEXTS, "ordering", "policies"), { recursive: true });
21
+ mkdirSync(join(CONTEXTS, "ordering", "aggregates"), { recursive: true });
22
+ mkdirSync(join(CONTEXTS, "shipping", "events"), { recursive: true });
23
+ mkdirSync(join(CONTEXTS, "shipping", "commands"), { recursive: true });
24
+ mkdirSync(join(CONTEXTS, "shipping", "aggregates"), { recursive: true });
25
+ mkdirSync(join(CONTEXTS, "shipping", "read-models"), { recursive: true });
26
+ mkdirSync(ADR_DIR, { recursive: true });
27
+ // domain/index.yml
28
+ writeFileSync(join(DOMAIN, "index.yml"), [
29
+ "contexts:",
30
+ " - name: ordering",
31
+ ' description: "Order management"',
32
+ " - name: shipping",
33
+ ' description: "Shipping logistics"',
34
+ "flows:",
35
+ " - name: PlaceAndShip",
36
+ ' description: "Order to shipment"',
37
+ " steps:",
38
+ " - ref: ordering.PlaceOrder",
39
+ " type: command",
40
+ " - ref: ordering.OrderPlaced",
41
+ " type: event",
42
+ " - ref: shipping.ShipOrder",
43
+ " type: command",
44
+ ].join("\n"));
45
+ // domain/actors.yml
46
+ writeFileSync(join(DOMAIN, "actors.yml"), [
47
+ "actors:",
48
+ " - name: Customer",
49
+ " type: human",
50
+ ' description: "A paying customer"',
51
+ " - name: WarehouseBot",
52
+ " type: system",
53
+ ' description: "Automated warehouse robot"',
54
+ ].join("\n"));
55
+ // domain/contexts/ordering/ — per-item directory
56
+ writeFileSync(join(CONTEXTS, "ordering", "context.yml"), [
57
+ "name: ordering",
58
+ 'description: "Handles the order lifecycle"',
59
+ "glossary:",
60
+ " - term: Order",
61
+ ' definition: "A customer purchase request"',
62
+ " adr_refs:",
63
+ " - adr-0001",
64
+ ].join("\n"));
65
+ writeFileSync(join(CONTEXTS, "ordering", "events", "OrderPlaced.yml"), [
66
+ "name: OrderPlaced",
67
+ 'description: "Raised when an order is placed"',
68
+ "fields:",
69
+ " - name: orderId",
70
+ " type: UUID",
71
+ "raised_by: Order",
72
+ ].join("\n"));
73
+ writeFileSync(join(CONTEXTS, "ordering", "events", "OrderCancelled.yml"), [
74
+ "name: OrderCancelled",
75
+ 'description: "Raised when an order is cancelled"',
76
+ "raised_by: Order",
77
+ ].join("\n"));
78
+ writeFileSync(join(CONTEXTS, "ordering", "commands", "PlaceOrder.yml"), [
79
+ "name: PlaceOrder",
80
+ 'description: "Submit a new order"',
81
+ "actor: Customer",
82
+ "handled_by: Order",
83
+ ].join("\n"));
84
+ writeFileSync(join(CONTEXTS, "ordering", "commands", "CancelOrder.yml"), [
85
+ "name: CancelOrder",
86
+ 'description: "Cancel an order"',
87
+ "handled_by: Order",
88
+ ].join("\n"));
89
+ writeFileSync(join(CONTEXTS, "ordering", "policies", "NotifyOnCancel.yml"), [
90
+ "name: NotifyOnCancel",
91
+ 'description: "Notify customer when order is cancelled"',
92
+ "when:",
93
+ " events:",
94
+ " - OrderCancelled",
95
+ "then:",
96
+ " commands:",
97
+ " - SendNotification",
98
+ ].join("\n"));
99
+ writeFileSync(join(CONTEXTS, "ordering", "aggregates", "Order.yml"), [
100
+ "name: Order",
101
+ 'description: "Order aggregate root"',
102
+ "handles:",
103
+ " commands:",
104
+ " - PlaceOrder",
105
+ " - CancelOrder",
106
+ "emits:",
107
+ " events:",
108
+ " - OrderPlaced",
109
+ " - OrderCancelled",
110
+ ].join("\n"));
111
+ // domain/contexts/shipping/ — per-item directory
112
+ writeFileSync(join(CONTEXTS, "shipping", "context.yml"), [
113
+ "name: shipping",
114
+ 'description: "Handles shipment tracking"',
115
+ ].join("\n"));
116
+ writeFileSync(join(CONTEXTS, "shipping", "commands", "ShipOrder.yml"), [
117
+ "name: ShipOrder",
118
+ 'description: "Initiate shipment for an order"',
119
+ "handled_by: Shipment",
120
+ ].join("\n"));
121
+ writeFileSync(join(CONTEXTS, "shipping", "events", "ShipmentDispatched.yml"), [
122
+ "name: ShipmentDispatched",
123
+ 'description: "Raised when a shipment is dispatched"',
124
+ "raised_by: Shipment",
125
+ ].join("\n"));
126
+ writeFileSync(join(CONTEXTS, "shipping", "aggregates", "Shipment.yml"), [
127
+ "name: Shipment",
128
+ 'description: "Shipment aggregate"',
129
+ "handles:",
130
+ " commands:",
131
+ " - ShipOrder",
132
+ "emits:",
133
+ " events:",
134
+ " - ShipmentDispatched",
135
+ ].join("\n"));
136
+ writeFileSync(join(CONTEXTS, "shipping", "read-models", "ShipmentStatus.yml"), [
137
+ "name: ShipmentStatus",
138
+ 'description: "Current status of a shipment"',
139
+ "subscribes_to:",
140
+ " - ShipmentDispatched",
141
+ "used_by:",
142
+ " - Customer",
143
+ ].join("\n"));
144
+ // docs/adr/0001-use-yaml.md
145
+ writeFileSync(join(ADR_DIR, "0001-use-yaml.md"), [
146
+ "---",
147
+ "id: adr-0001",
148
+ "title: Use YAML for domain models",
149
+ "status: accepted",
150
+ "date: 2026-01-15",
151
+ "deciders:",
152
+ " - Alice",
153
+ "domain_refs:",
154
+ " - ordering.Order",
155
+ "---",
156
+ "",
157
+ "# ADR-0001 — Use YAML for domain models",
158
+ ].join("\n"));
159
+ // docs/adr/0002-superseded.md
160
+ writeFileSync(join(ADR_DIR, "0002-superseded.md"), [
161
+ "---",
162
+ "id: adr-0002",
163
+ "title: Old approach",
164
+ "status: superseded",
165
+ "date: 2026-01-10",
166
+ "superseded_by: adr-0001",
167
+ "---",
168
+ "",
169
+ "# ADR-0002",
170
+ ].join("\n"));
171
+ writeFileSync(join(ADR_DIR, "README.md"), "# ADRs\n");
172
+ }
173
+ function teardown() {
174
+ rmSync(TMP, { recursive: true, force: true });
175
+ }
176
+ // ── Assertions ────────────────────────────────────────────────────────
177
+ let passed = 0;
178
+ let failed = 0;
179
+ function assert(label, condition, detail) {
180
+ if (condition) {
181
+ console.log(` OK: ${label}`);
182
+ passed++;
183
+ }
184
+ else {
185
+ console.error(`FAIL: ${label}${detail ? ` — ${detail}` : ""}`);
186
+ failed++;
187
+ }
188
+ }
189
+ // ── Run tests ─────────────────────────────────────────────────────────
190
+ setup();
191
+ try {
192
+ const model = loadDomainModel({ root: TMP });
193
+ const graph = DomainGraph.from(model);
194
+ // ── Node existence ───────────────────────────────────────────────
195
+ console.log("\n=== Node existence ===");
196
+ assert("actor.Customer node exists", graph.hasNode("actor.Customer"));
197
+ assert("actor.WarehouseBot node exists", graph.hasNode("actor.WarehouseBot"));
198
+ assert("context.ordering node exists", graph.hasNode("context.ordering"));
199
+ assert("context.shipping node exists", graph.hasNode("context.shipping"));
200
+ assert("ordering.OrderPlaced node exists", graph.hasNode("ordering.OrderPlaced"));
201
+ assert("ordering.PlaceOrder node exists", graph.hasNode("ordering.PlaceOrder"));
202
+ assert("ordering.Order (aggregate) node exists", graph.hasNode("ordering.Order"));
203
+ assert("ordering.Order (glossary) exists", graph.hasNode("ordering.Order"));
204
+ assert("shipping.ShipmentStatus node exists", graph.hasNode("shipping.ShipmentStatus"));
205
+ assert("adr-0001 node exists", graph.hasNode("adr-0001"));
206
+ assert("adr-0002 node exists", graph.hasNode("adr-0002"));
207
+ assert("flow.PlaceAndShip node exists", graph.hasNode("flow.PlaceAndShip"));
208
+ assert("ordering.NotifyOnCancel (policy) exists", graph.hasNode("ordering.NotifyOnCancel"));
209
+ // ── Edge counts (sanity) ─────────────────────────────────────────
210
+ console.log("\n=== Edge existence ===");
211
+ assert("graph has edges", graph.edges.length > 0);
212
+ // ── getNeighbours ────────────────────────────────────────────────
213
+ console.log("\n=== getNeighbours ===");
214
+ const orderAggNeighbours = graph.getNeighbours("ordering.Order");
215
+ assert("Order aggregate neighbours include PlaceOrder", orderAggNeighbours.has("ordering.PlaceOrder"));
216
+ assert("Order aggregate neighbours include OrderPlaced", orderAggNeighbours.has("ordering.OrderPlaced"));
217
+ assert("Order aggregate neighbours include CancelOrder", orderAggNeighbours.has("ordering.CancelOrder"));
218
+ assert("Order aggregate neighbours include OrderCancelled", orderAggNeighbours.has("ordering.OrderCancelled"));
219
+ assert("Order aggregate neighbours include context.ordering", orderAggNeighbours.has("context.ordering"));
220
+ // Command → Actor
221
+ const placeOrderNeighbours = graph.getNeighbours("ordering.PlaceOrder");
222
+ assert("PlaceOrder neighbours include actor.Customer", placeOrderNeighbours.has("actor.Customer"));
223
+ // ReadModel → Event (subscribes_to)
224
+ const shipmentStatusNeighbours = graph.getNeighbours("shipping.ShipmentStatus");
225
+ assert("ShipmentStatus subscribes_to ShipmentDispatched", shipmentStatusNeighbours.has("shipping.ShipmentDispatched"));
226
+ // ReadModel → Actor (used_by)
227
+ assert("ShipmentStatus used_by Customer", shipmentStatusNeighbours.has("actor.Customer"));
228
+ // Policy → Event (triggers) and Command (emits)
229
+ const policyNeighbours = graph.getNeighbours("ordering.NotifyOnCancel");
230
+ assert("NotifyOnCancel triggered by OrderCancelled", policyNeighbours.has("ordering.OrderCancelled"));
231
+ assert("NotifyOnCancel emits SendNotification", policyNeighbours.has("ordering.SendNotification"));
232
+ // ADR → domain_ref
233
+ const adr0001Neighbours = graph.getNeighbours("adr-0001");
234
+ assert("adr-0001 linked to ordering.Order", adr0001Neighbours.has("ordering.Order"));
235
+ // ADR superseded_by
236
+ const adr0002Neighbours = graph.getNeighbours("adr-0002");
237
+ assert("adr-0002 superseded_by adr-0001", adr0002Neighbours.has("adr-0001"));
238
+ // Flow steps
239
+ const flowNeighbours = graph.getNeighbours("flow.PlaceAndShip");
240
+ assert("flow linked to ordering.PlaceOrder", flowNeighbours.has("ordering.PlaceOrder"));
241
+ assert("flow linked to ordering.OrderPlaced", flowNeighbours.has("ordering.OrderPlaced"));
242
+ assert("flow linked to shipping.ShipOrder", flowNeighbours.has("shipping.ShipOrder"));
243
+ // Flow consecutive steps linked
244
+ const placeOrderFlowNeighbours = graph.getNeighbours("ordering.PlaceOrder");
245
+ assert("PlaceOrder flow_next to OrderPlaced", placeOrderFlowNeighbours.has("ordering.OrderPlaced"));
246
+ const orderPlacedFlowNeighbours = graph.getNeighbours("ordering.OrderPlaced");
247
+ assert("OrderPlaced flow_next to ShipOrder", orderPlacedFlowNeighbours.has("shipping.ShipOrder"));
248
+ // Glossary adr_ref
249
+ const orderGlossaryNeighbours = graph.getNeighbours("ordering.Order");
250
+ assert("Order glossary/aggregate linked to adr-0001", orderGlossaryNeighbours.has("adr-0001"));
251
+ // ── getRelated (depth traversal) ─────────────────────────────────
252
+ console.log("\n=== getRelated (BFS depth) ===");
253
+ // depth 0 equivalent — returns empty
254
+ const related0 = graph.getRelated("ordering.PlaceOrder", 0);
255
+ assert("depth 0 returns empty set", related0.size === 0);
256
+ // depth 1 — immediate neighbours
257
+ const related1 = graph.getRelated("ordering.PlaceOrder", 1);
258
+ assert("depth 1 includes actor.Customer", related1.has("actor.Customer"));
259
+ assert("depth 1 includes ordering.Order", related1.has("ordering.Order"));
260
+ assert("depth 1 includes context.ordering", related1.has("context.ordering"));
261
+ // depth 2 — two hops out
262
+ const related2 = graph.getRelated("ordering.PlaceOrder", 2);
263
+ assert("depth 2 includes OrderPlaced (via Order aggregate)", related2.has("ordering.OrderPlaced"));
264
+ // actor.Customer → shipping.ShipmentStatus (via used_by)
265
+ assert("depth 2 includes ShipmentStatus (via Customer)", related2.has("shipping.ShipmentStatus"));
266
+ // ── Unknown node ──────────────────────────────────────────────────
267
+ console.log("\n=== Edge cases ===");
268
+ const unknownRelated = graph.getRelated("nonexistent.Node", 1);
269
+ assert("unknown node returns empty set", unknownRelated.size === 0);
270
+ assert("hasNode returns false for unknown", !graph.hasNode("nonexistent.Node"));
271
+ // ── Empty model ───────────────────────────────────────────────────
272
+ console.log("\n=== Empty model ===");
273
+ const emptyTmp = join(tmpdir(), `dkk-graph-empty-${Date.now()}`);
274
+ mkdirSync(join(emptyTmp, "domain", "contexts"), { recursive: true });
275
+ mkdirSync(join(emptyTmp, "docs", "adr"), { recursive: true });
276
+ writeFileSync(join(emptyTmp, "domain", "index.yml"), "contexts: []\n");
277
+ writeFileSync(join(emptyTmp, "domain", "actors.yml"), "actors: []\n");
278
+ const emptyModel = loadDomainModel({ root: emptyTmp });
279
+ const emptyGraph = DomainGraph.from(emptyModel);
280
+ assert("empty graph has 0 nodes", emptyGraph.nodes.size === 0);
281
+ assert("empty graph has 0 edges", emptyGraph.edges.length === 0);
282
+ rmSync(emptyTmp, { recursive: true, force: true });
283
+ }
284
+ finally {
285
+ teardown();
286
+ }
287
+ // ── Summary ───────────────────────────────────────────────────────────
288
+ console.log(`\n${passed} passed, ${failed} failed`);
289
+ if (failed > 0)
290
+ process.exit(1);
291
+ //# sourceMappingURL=graph.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph.test.js","sourceRoot":"","sources":["../../../src/shared/tests/graph.test.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AA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