@eventcatalog/core 5.7.6 → 5.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics/analytics.cjs +1 -1
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/log-build.cjs +1 -1
- package/dist/analytics/log-build.js +3 -3
- package/dist/{chunk-SLN5D6WP.js → chunk-26C26LFE.js} +1 -1
- package/dist/{chunk-E2262TPK.js → chunk-C4L6B5KR.js} +1 -1
- package/dist/{chunk-XB4U75TZ.js → chunk-SZU7I2PD.js} +1 -1
- package/dist/{chunk-UI2XA4V7.js → chunk-UIJUSHOT.js} +1 -1
- package/dist/{chunk-A22MC5P5.js → chunk-WN6ZFSXF.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/docs/api/02-config.md +1 -1
- package/dist/docs/development/00-why-eventcatalog.md +12 -8
- package/dist/docs/development/01-adopting-eventcatalog.md +51 -0
- package/dist/docs/development/{ask-your-architecture/03-install-skills.md → 01-getting-started/install-skills.md} +10 -4
- package/dist/docs/development/01-getting-started/installation.md +5 -1
- package/dist/docs/development/ask-your-architecture/01-intro.md +7 -5
- package/dist/docs/development/ask-your-architecture/03-mcp-server/getting-started.md +17 -3
- package/dist/docs/development/ask-your-architecture/03-mcp-server/introduction.md +3 -0
- package/dist/docs/development/ask-your-architecture/06-sync-docs-with-your-code.md +220 -0
- package/dist/docs/development/ask-your-architecture/07-catch-breaking-changes.md +142 -0
- package/dist/docs/development/components/custom-components/02-create-your-first-component.md +4 -0
- package/dist/docs/development/customization/customize-visualizer/00-visualizer-nodes.md +7 -5
- package/dist/docs/development/developer-tools/api-catalog.md +1 -1
- package/dist/docs/development/{ask-your-architecture/02-llms.txt.md → developer-tools/llms.txt.md} +2 -0
- package/dist/docs/development/{ask-your-architecture/03-schemas.txt.md → developer-tools/schemas.txt.md} +1 -1
- package/dist/docs/development/developer-tools/ubiquitous-language.txt.md +42 -0
- package/dist/docs/development/guides/domains/03-ownership-and-language/02-adding-ubiquitous-language.md +3 -0
- package/dist/eventcatalog.cjs +1 -1
- package/dist/eventcatalog.js +21 -21
- package/dist/federation/federate.js +2 -2
- package/dist/generate.cjs +1 -1
- package/dist/generate.js +3 -3
- package/dist/utils/cli-logger.cjs +1 -1
- package/dist/utils/cli-logger.js +2 -2
- package/eventcatalog/src/components/Settings/LlmAccessSettingsForm.tsx +23 -3
- package/eventcatalog/src/components/SpecificationDownloadButton.astro +24 -0
- package/eventcatalog/src/features/auth/middleware/middleware-auth.ts +1 -0
- package/eventcatalog/src/features/mcp/apps/generated/viewer.html +1 -1
- package/eventcatalog/src/features/mcp/mcp-scoped-tools.ts +7 -4
- package/eventcatalog/src/features/mcp/mcp-server.ts +13 -1
- package/eventcatalog/src/features/tools/catalog-tools.ts +97 -30
- package/eventcatalog/src/pages/api/schemas/services/[id]/[version]/[specification]/index.ts +25 -27
- package/eventcatalog/src/pages/discover/[type]/index.astro +9 -2
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/asyncapi/[filename]/[file].ts +7 -0
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/asyncapi/[filename].astro +19 -7
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/generic/[filename]/[file].ts +7 -0
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/generic/[filename].astro +21 -1
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/graphql/[filename]/[file].ts +7 -0
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/graphql/[filename].astro +19 -1
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/spec/[filename]/[file].ts +7 -0
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/spec/[filename].astro +4 -0
- package/eventcatalog/src/pages/docs/llm/llms.txt.ts +24 -17
- package/eventcatalog/src/pages/docs/llm/schemas.txt.ts +1 -1
- package/eventcatalog/src/pages/docs/llm/ubiquitous-language.txt.ts +68 -0
- package/eventcatalog/src/pages/docs/services/[id]/asyncapi/[filename]/[file].ts +7 -0
- package/eventcatalog/src/pages/docs/services/[id]/graphql/[filename]/[file].ts +7 -0
- package/eventcatalog/src/pages/docs/services/[id]/spec/[filename]/[file].ts +7 -0
- package/eventcatalog/src/pages/docs/services/_latest-raw-specification-route.ts +37 -0
- package/eventcatalog/src/pages/settings/llm-access.astro +2 -0
- package/eventcatalog/src/stores/sidebar-store/builders/data-product.ts +7 -3
- package/eventcatalog/src/utils/collections/domains.ts +84 -0
- package/eventcatalog/src/utils/raw-specification.ts +126 -0
- package/package.json +4 -4
- package/dist/docs/development/ask-your-architecture/04-agents/01-overview.md +0 -27
- package/dist/docs/development/ask-your-architecture/04-agents/02-code-to-docs.md +0 -124
- package/dist/docs/development/ask-your-architecture/04-agents/03-breaking-changes.md +0 -170
- package/dist/docs/development/ask-your-architecture/04-agents/_category_.json +0 -12
- package/dist/{chunk-46TBJZC3.js → chunk-QJ7KKN2D.js} +4 -4
|
@@ -169,7 +169,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
169
169
|
var import_os = __toESM(require("os"), 1);
|
|
170
170
|
|
|
171
171
|
// package.json
|
|
172
|
-
var version = "5.
|
|
172
|
+
var version = "5.9.0";
|
|
173
173
|
|
|
174
174
|
// src/constants.ts
|
|
175
175
|
var VERSION = version;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-WN6ZFSXF.js";
|
|
4
4
|
import "../chunk-AD7CL772.js";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-26C26LFE.js";
|
|
6
6
|
import "../chunk-YRZK7HKX.js";
|
|
7
7
|
import "../chunk-CA6WCQ2T.js";
|
|
8
8
|
import "../chunk-CPW6G62V.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-C4L6B5KR.js";
|
|
10
10
|
import "../chunk-4G7FSRPN.js";
|
|
11
11
|
export {
|
|
12
12
|
log_build_default as default
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
|
@@ -965,7 +965,7 @@ Enable tools like Claude, ChatGPT, GitHub Copilot, and Cursor to quickly underst
|
|
|
965
965
|
}
|
|
966
966
|
```
|
|
967
967
|
|
|
968
|
-
See the [LLMs documentation](/docs/development/
|
|
968
|
+
See the [LLMs documentation](/docs/development/developer-tools/llms.txt) for more information, how you can use it and examples.
|
|
969
969
|
|
|
970
970
|
|
|
971
971
|
### `exports.html` {#exports.html}
|
|
@@ -8,13 +8,15 @@ title: Why EventCatalog?
|
|
|
8
8
|
description: EventCatalog helps you bring discoverability to your event-driven architecture.
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
As AI builds more of our systems and teams keep growing, it matters more than ever to understand how your systems connect and how they work, at every level of your organization: from the domains your business is organized around, down to a single message.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
**Documentation tools today are not designed for software architecture.** They give you generic pages. They don't understand the primitives architecture is made of, such as [domains](/docs/development/guides/domains/introduction), [systems](/docs/development/guides/systems/introduction), [services](/docs/development/guides/resources/services/introduction), [APIs](/docs/development/guides/resources/schemas/add-specifications-to-services/add-openapi-specifications), [contracts](/docs/development/guides/resources/schemas/what-are-schemas-and-specifications) and [messages](/docs/development/guides/resources/messages/what-are-messages), or the relationships between them. The essence of your architecture gets lost across pages that drift out of date.
|
|
14
14
|
|
|
15
|
-
**Many
|
|
15
|
+
**Many of these tools also own your architecture knowledge.** It lives on their platform, in their format, and is hard to take with you. We believe your architecture knowledge belongs to you, inside your organization.
|
|
16
16
|
|
|
17
|
-
**Our
|
|
17
|
+
**Our mission is to make EventCatalog the documentation tool for software architecture.** You own your data and host it internally. Your teams, people and AI alike, get an understanding of your architecture, and keep it in sync as it changes.
|
|
18
|
+
|
|
19
|
+
Documentation shouldn't be where knowledge goes to die. It should be something your organization trusts, and gets value from.
|
|
18
20
|
|
|
19
21
|
### What is EventCatalog?
|
|
20
22
|
|
|
@@ -26,20 +28,22 @@ EventCatalog creates an internal [architecture graph](/docs/development/guides/a
|
|
|
26
28
|
|
|
27
29
|
EventCatalog is technology agnostic, this means you can document and model any systems you have.
|
|
28
30
|
|
|
31
|
+
**EventCatalog is self-hosted.** You run it on your own infrastructure, and your catalog lives in your own repositories. You own and control your architecture knowledge: it is never sent to us or to any third party. AI features only send content to the model provider you choose.
|
|
32
|
+
|
|
29
33
|
|
|
30
|
-
####
|
|
34
|
+
#### How EventCatalog can help you
|
|
31
35
|
|
|
32
36
|
- **Help you save time across the organization**
|
|
33
37
|
- Help teams find information they need across your business and organization
|
|
34
38
|
- Document high level information for stakeholders while providing lower level details to your teams.
|
|
35
39
|
- Connect to your AI Agents and AI Workflows. Give your LLMs the context they need.
|
|
36
40
|
- **Create a documentation solution you can trust**
|
|
37
|
-
- Sync documentation from your code with
|
|
41
|
+
- Sync documentation from your code with [EventCatalog Agents](/docs/development/agents/set-up-code-to-docs)
|
|
38
42
|
- Automate documentation from your [OpenAPI](/integrations/openapi), [AsyncAPI](/integrations/asyncapi), or [schema registries](/integrations)
|
|
39
|
-
- Use EventCatalog
|
|
43
|
+
- Use EventCatalog Agents to sync code to docs from your CI/CD workflows.
|
|
40
44
|
- Write your own automation and plugins with the [EventCatalog SDK](/docs/sdk)
|
|
41
45
|
- **Help you detect breaking changes before they reach production**
|
|
42
|
-
- Use EventCatalog
|
|
46
|
+
- Use EventCatalog Agents to [detect breaking schema changes](/docs/development/agents/set-up-breaking-changes)
|
|
43
47
|
- Bring your own model and get notified when things break
|
|
44
48
|
- **Use natural language to query your architecture**
|
|
45
49
|
- Connect AI tools to your architecture using [EventCatalog's MCP server](/docs/development/ask-your-architecture/mcp-server/introduction)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 2.5
|
|
3
|
+
slug: /development/getting-started/adopting-eventcatalog
|
|
4
|
+
keywords:
|
|
5
|
+
- EventCatalog adoption
|
|
6
|
+
- rollout
|
|
7
|
+
- champion
|
|
8
|
+
- Federation
|
|
9
|
+
sidebar_label: Adopting EventCatalog
|
|
10
|
+
title: Adopting EventCatalog in your organization
|
|
11
|
+
description: How organizations usually adopt EventCatalog, from one champion and one pain point to a catalog that grows across teams.
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
import { RolloutJourney } from '@site/src/components/Rollout';
|
|
15
|
+
import { OrgTopology } from '@site/src/components/AgentOutputs';
|
|
16
|
+
|
|
17
|
+
Most organizations adopt EventCatalog step by step. This is the pattern we see most often.
|
|
18
|
+
|
|
19
|
+
<RolloutJourney />
|
|
20
|
+
|
|
21
|
+
## 1. Start with a champion
|
|
22
|
+
|
|
23
|
+
A champion drives EventCatalog in your organization. It can be one person or a team. They set up the first catalog, and help other teams start using it.
|
|
24
|
+
|
|
25
|
+
## 2. Solve one pain point
|
|
26
|
+
|
|
27
|
+
The champion picks one workflow or pain point, and documents around it. For example, teams can't find the schemas for your events, so the first catalog documents your events and their schemas.
|
|
28
|
+
|
|
29
|
+
Starting small means the catalog is useful from day one, and you learn what your organization needs from it.
|
|
30
|
+
|
|
31
|
+
## 3. Share it and get feedback
|
|
32
|
+
|
|
33
|
+
Once the pain point is solved, share the catalog with other teams and ask for feedback. Teams will tell you what they want to see next, and some will start contributing.
|
|
34
|
+
|
|
35
|
+
## 4. Grow your catalog over time
|
|
36
|
+
|
|
37
|
+
Build the catalog up over time: add [domains](/docs/development/guides/domains/introduction), [systems](/docs/development/guides/systems/introduction), services, [flows](/docs/development/guides/resources/flows/introduction) and owners. The more you add, the more your catalog connects, and the more valuable it becomes.
|
|
38
|
+
|
|
39
|
+
To keep it up to date as it grows, generate parts of it from your [specifications and schema registries](/integrations), and keep it in sync with your code with [EventCatalog Agents](/docs/development/agents/set-up-code-to-docs).
|
|
40
|
+
|
|
41
|
+
## One catalog, or many
|
|
42
|
+
|
|
43
|
+
You can have one catalog for your whole organization, or a catalog per team combined with [Federation](/docs/federation/overview). With Federation, each team controls its own documentation, and you still get one view of your whole architecture.
|
|
44
|
+
|
|
45
|
+
<OrgTopology />
|
|
46
|
+
|
|
47
|
+
Most organizations start with one central catalog and a couple of champions, then roll it out to more teams.
|
|
48
|
+
|
|
49
|
+
## Talk to us
|
|
50
|
+
|
|
51
|
+
If you want to discuss how to roll out EventCatalog in your organization, [contact us at hello@eventcatalog.dev](mailto:hello@eventcatalog.dev). We're happy to walk you through the options and advise you.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
sidebar_position: 3
|
|
2
|
+
sidebar_position: 3.5
|
|
3
3
|
keywords:
|
|
4
4
|
- AI Skills
|
|
5
5
|
- Claude Code
|
|
@@ -26,15 +26,21 @@ With skills installed, you can ask your agent things like:
|
|
|
26
26
|
- "Create a Payments domain with a PaymentService, PaymentProcessed event, and ProcessPayment command"
|
|
27
27
|
- "Look at my src/ directory and generate EventCatalog documentation for the services and events you find"
|
|
28
28
|
- "Document the checkout flow from cart submission through payment processing to order confirmation"
|
|
29
|
+
- "Use this Structurizr DSL file to map our C4 model into my catalog"
|
|
30
|
+
- "Write a fitness function that fails CI when two services share a database"
|
|
29
31
|
|
|
30
32
|
The agent will generate properly formatted `index.mdx` files with correct frontmatter, schemas, and visualizations.
|
|
31
33
|
|
|
32
34
|
## Available skills
|
|
33
35
|
|
|
34
|
-
| Skill |
|
|
36
|
+
| Skill | What it does |
|
|
35
37
|
|-------|-------------|
|
|
36
|
-
| [Catalog Documentation Creator](https://github.com/event-catalog/skills) | Generates EventCatalog documentation
|
|
37
|
-
| [
|
|
38
|
+
| [Catalog Documentation Creator](https://github.com/event-catalog/skills/tree/main/skills/catalog-documentation-creator) | Generates EventCatalog documentation (domains, systems, services, agents, messages, channels, flows, data stores, ADRs, data products and entities) with the correct frontmatter, folder structure and best practices. Code to Catalog and C4 to EventCatalog use it to write their files. |
|
|
39
|
+
| [Code to Catalog](https://github.com/event-catalog/skills/tree/main/skills/code-to-catalog) | Scans your codebase, proposes an architecture model, asks you about the decisions it can't work out from the code, and writes a plan before documenting it. Works for new catalogs, and for catalogs that have drifted from the code. |
|
|
40
|
+
| [C4 to EventCatalog](https://github.com/event-catalog/skills/tree/main/skills/c4-to-eventcatalog) | Maps a C4 model (Structurizr, LikeC4, C4-PlantUML, Mermaid C4, or a diagram) into your catalog. |
|
|
41
|
+
| [Flow Wizard](https://github.com/event-catalog/skills/tree/main/skills/flow-wizard) | Documents a business or agent flow step by step in a conversation, linking the services, agents and messages already in your catalog. |
|
|
42
|
+
| [Fitness Functions](https://github.com/event-catalog/skills/tree/main/skills/fitness-functions) | Turns an architecture rule you describe in plain language into a [fitness function](/docs/development/guides/fitness-functions/what-are-fitness-functions), runs it, and adds it to your CI. |
|
|
43
|
+
| [Custom Pages and APIs](https://github.com/event-catalog/skills/tree/main/skills/custom-pages-and-apis) | Builds custom pages and API routes inside your catalog, with access to your catalog's data, and adds them to the navigation. |
|
|
38
44
|
|
|
39
45
|
## Install skills
|
|
40
46
|
|
|
@@ -7,10 +7,14 @@ title: Installation
|
|
|
7
7
|
description: Install EventCatalog and create a new catalog
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
import { AgentPrompt } from '@site/src/components/AgentPrompt';
|
|
11
|
+
|
|
10
12
|
The `create-eventcatalog` CLI command is the fastest way to start a new EventCatalog project. It creates a catalog directory, installs what you need, and gives you scripts for local development and production builds.
|
|
11
13
|
|
|
12
14
|
You can also start from a template, create an empty catalog, or use the EventCatalog AI skill to generate documentation from an existing codebase.
|
|
13
15
|
|
|
16
|
+
<AgentPrompt />
|
|
17
|
+
|
|
14
18
|
## Prerequisites
|
|
15
19
|
|
|
16
20
|
- [Node.js](https://nodejs.org/en/download/) v22 or higher. Check your version with `node -v`.
|
|
@@ -100,7 +104,7 @@ Then ask your AI agent to inspect your codebase and generate EventCatalog docume
|
|
|
100
104
|
Look at my directory and generate EventCatalog documentation from information you find.
|
|
101
105
|
```
|
|
102
106
|
|
|
103
|
-
The generated files can be edited like any other EventCatalog documentation. Learn more about [EventCatalog skills](/docs/development/
|
|
107
|
+
The generated files can be edited like any other EventCatalog documentation. Learn more about [EventCatalog skills](/docs/development/getting-started/install-skills).
|
|
104
108
|
|
|
105
109
|
## Optional: Use EventCatalog Editor
|
|
106
110
|
|
|
@@ -11,11 +11,13 @@ import AddedIn from '@site/src/components/MDX/AddedIn';
|
|
|
11
11
|
|
|
12
12
|
EventCatalog creates an internal graph of your architecture. Perfect for AI and LLMs.
|
|
13
13
|
|
|
14
|
-
EventCatalog supports
|
|
14
|
+
EventCatalog supports eight ways to use AI with your catalog:
|
|
15
15
|
|
|
16
16
|
- [EventCatalog MCP Server](/docs/development/ask-your-architecture/mcp-server/introduction) - Connect EventCatalog to Agents through MCP
|
|
17
|
-
- [AI Skills](/docs/development/ask-your-architecture/install-skills) - Install our Skills to help you manage your catalog
|
|
18
|
-
- [EventCatalog Agent](/docs/development/ask-your-architecture/agents/overview) - CI/CD Agent for breaking changes and doc updates
|
|
19
17
|
- [EventCatalog Assistant](/docs/development/ask-your-architecture/eventcatalog-assistant/what-is-eventcatalog-assistant) - AI Chat in your Catalog.
|
|
20
|
-
- [
|
|
21
|
-
- [
|
|
18
|
+
- [Sync docs with your code](/docs/development/agents/set-up-code-to-docs) - EventCatalog Agents keep your catalog in sync with your code
|
|
19
|
+
- [Catch breaking changes](/docs/development/agents/set-up-breaking-changes) - EventCatalog Agents warn you before a schema change breaks a consumer
|
|
20
|
+
- [AI Skills](/docs/development/getting-started/install-skills) - Install our Skills to help you manage your catalog
|
|
21
|
+
- [llms.txt](/docs/development/developer-tools/llms.txt) - Give AI tools a machine-readable index of your catalog.
|
|
22
|
+
- [schemas.txt](/docs/development/developer-tools/schemas.txt) - Give AI tools access to your schemas and specifications.
|
|
23
|
+
- [ubiquitous-language.txt](/docs/development/developer-tools/ubiquitous-language.txt) - Give AI tools the ubiquitous language of your organization.
|
|
@@ -63,7 +63,7 @@ or system.
|
|
|
63
63
|
|
|
64
64
|
:::note Scoped tool availability
|
|
65
65
|
Scoped servers omit C4, team and user directory, data product, custom documentation, and user-defined extended tools.
|
|
66
|
-
System-scoped servers also omit the
|
|
66
|
+
System-scoped servers also omit the ubiquitous-language tool. See [Available tools](#available-tools).
|
|
67
67
|
:::
|
|
68
68
|
|
|
69
69
|
### Disable the MCP server
|
|
@@ -254,7 +254,7 @@ wants to see a diagram or schema.
|
|
|
254
254
|
| `analyzeChangeImpact` | Analyze the impact of changing a message | Returns the affected producers and consumers, their owning teams and the blast radius of a change | Yes |
|
|
255
255
|
| `explainBusinessFlow` | Explain a business flow | Returns a flow's definition, steps and related services and agents | Yes |
|
|
256
256
|
| `findMessageBySchemaId` | Find a message from a schema | Finds a message from the `x-eventcatalog-id` (and optional `x-eventcatalog-version`) in a schema | Yes |
|
|
257
|
-
| `explainUbiquitousLanguageTerms` | Explain ubiquitous language terms | Returns
|
|
257
|
+
| `explainUbiquitousLanguageTerms` | Explain ubiquitous language terms | Returns ubiquitous language terms. See [Explain ubiquitous language](#explain-ubiquitous-language) | Domain servers only |
|
|
258
258
|
| `getC4Diagram` | Get C4 (LikeC4) diagrams | Returns the source of your C4 (LikeC4) diagrams | No |
|
|
259
259
|
| `getTeams` / `getTeam` | List teams / Get a team | Lists teams, or gets a team with its members | No |
|
|
260
260
|
| `getUsers` / `getUser` | List users / Get a user | Lists users, or gets a user with their role and contact details | No |
|
|
@@ -269,6 +269,20 @@ wants to see a diagram or schema.
|
|
|
269
269
|
In clients that support MCP Apps, the server also registers `getResourceView`. The viewer uses this app-only tool to load
|
|
270
270
|
diagrams and schemas. The model doesn't call it.
|
|
271
271
|
|
|
272
|
+
### Explain ubiquitous language
|
|
273
|
+
|
|
274
|
+
<AddedIn version="5.9.0" />
|
|
275
|
+
|
|
276
|
+
`explainUbiquitousLanguageTerms` has no required parameters. Each term returns its `id`, `summary` and full `description` (the summary when there is no description).
|
|
277
|
+
|
|
278
|
+
| Parameters | Returns |
|
|
279
|
+
|---|---|
|
|
280
|
+
| `domainId` | The terms of that domain and its subdomains |
|
|
281
|
+
| `term` | Each domain's meaning of the term, kept separate. Matches the term's name or id, case-insensitive |
|
|
282
|
+
| none | The whole glossary |
|
|
283
|
+
|
|
284
|
+
Use `cursor` to page through results when looking across every domain. Domain-scoped servers stay inside their domain: with no `domainId` they use the scoped domain, and another domain returns an error.
|
|
285
|
+
|
|
272
286
|
### Interactive diagrams and schemas
|
|
273
287
|
|
|
274
288
|
<AddedIn version="5.0.0" />
|
|
@@ -357,7 +371,7 @@ For catalogs without SSR mode, use the standalone `@eventcatalog/mcp-server` pac
|
|
|
357
371
|
For local development and testing, you can use the MCP Server on stdio. This is useful for single-client, low-latency tools.
|
|
358
372
|
|
|
359
373
|
**Prerequisites:**
|
|
360
|
-
- EventCatalog configured with the [`LLMS.txt` feature](/docs/development/
|
|
374
|
+
- EventCatalog configured with the [`LLMS.txt` feature](/docs/development/developer-tools/llms.txt)
|
|
361
375
|
- EventCatalog license key
|
|
362
376
|
- MCP client installed
|
|
363
377
|
|
|
@@ -8,11 +8,14 @@ description: Connect AI tools to your architecture catalog
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
import AddedIn from '@site/src/components/MDX/AddedIn';
|
|
11
|
+
import { McpFlow } from '@site/src/components/McpFlow';
|
|
11
12
|
|
|
12
13
|
EventCatalog exposes a built-in MCP server that lets AI agents and other MCP clients query your architecture catalog. Its
|
|
13
14
|
built-in tools can find resources, inspect schemas and ownership, follow message producers and consumers, and analyze change
|
|
14
15
|
impact.
|
|
15
16
|
|
|
17
|
+
<McpFlow />
|
|
18
|
+
|
|
16
19
|
You can connect a client to the whole catalog, or limit it to the graph of a particular domain or system. Scoped connections
|
|
17
20
|
give an agent the selected resource and resources recursively reachable through its supported relationships, without exposing
|
|
18
21
|
unrelated parts of the catalog.
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 6
|
|
3
|
+
keywords:
|
|
4
|
+
- Code-to-Docs
|
|
5
|
+
- EventCatalog Agents
|
|
6
|
+
- documentation automation
|
|
7
|
+
- docs drift
|
|
8
|
+
- GitHub Actions
|
|
9
|
+
sidebar_label: Sync docs with your code
|
|
10
|
+
title: Sync docs with your code
|
|
11
|
+
description: The Code-to-Docs workflow updates your EventCatalog when a pull request changes your architecture, and opens a pull request in your catalog for your team to review.
|
|
12
|
+
slug: /development/agents/set-up-code-to-docs
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
import { AgentFlow, CodeToDocsComment, OrgTopology } from '@site/src/components/AgentOutputs';
|
|
16
|
+
import { AgentPrompt } from '@site/src/components/AgentPrompt';
|
|
17
|
+
|
|
18
|
+
The **Code-to-Docs** workflow turns your catalog into self-updating knowledge of your architecture. When a pull request changes your architecture, it updates the docs the change affects, and opens a pull request in your catalog for your team to review.
|
|
19
|
+
|
|
20
|
+
<AgentPrompt variant="code-to-docs" />
|
|
21
|
+
|
|
22
|
+
Docs that drift stop being used. When your catalog matches what's running, engineers can trust it to answer questions without reading the code, and AI tools that read your catalog get the right answers too.
|
|
23
|
+
|
|
24
|
+
- **Bring your own model.** Use any model you want, with your own key. You pay your provider directly.
|
|
25
|
+
- **Your data stays private.** It runs in your own CI and sends code only to your model provider. We never see your code or your catalog.
|
|
26
|
+
- **Your own workflow.** You decide which repositories update which catalog, when, and who approves the changes.
|
|
27
|
+
|
|
28
|
+
## How it works
|
|
29
|
+
|
|
30
|
+
<AgentFlow />
|
|
31
|
+
|
|
32
|
+
1. **Reads the change.** The agent reads the pull request's diff and the code around it, and finds the affected resources in your catalog.
|
|
33
|
+
2. **Plans.** It decides which resources need to change and why. If nothing needs to change, it says so and stops.
|
|
34
|
+
3. **Updates your catalog.** It edits only the resources in its plan, the way your catalog is already written. If it edits a file outside its plan, the run stops and nothing is pushed.
|
|
35
|
+
4. **Checks its work.** It runs the EventCatalog linter and your [fitness functions](/blog/architecture-fitness-functions), and fixes the problems it caused. It never edits fitness functions.
|
|
36
|
+
5. **Opens a pull request** in your catalog, and comments on your pull request with a link to it.
|
|
37
|
+
|
|
38
|
+
The agent can get things wrong, so review every catalog pull request.
|
|
39
|
+
|
|
40
|
+
## Before you start
|
|
41
|
+
|
|
42
|
+
You need:
|
|
43
|
+
|
|
44
|
+
- An EventCatalog in a GitHub repository (the **catalog repository**), with the catalog at the root of the repository.
|
|
45
|
+
- A repository with code to document (the **source repository**).
|
|
46
|
+
- An API key for an AI model provider.
|
|
47
|
+
|
|
48
|
+
## Set it up
|
|
49
|
+
|
|
50
|
+
In your source repository, add two secrets under **Settings → Secrets and variables → Actions**:
|
|
51
|
+
|
|
52
|
+
- `ANTHROPIC_API_KEY`, or the key for [your model provider](#models).
|
|
53
|
+
- `EVENTCATALOG_TOKEN`, a GitHub token that can read your catalog repository, push branches to it and open pull requests. Or [use a GitHub App](#use-a-github-app).
|
|
54
|
+
|
|
55
|
+
Then add the workflow:
|
|
56
|
+
|
|
57
|
+
```yaml title=".github/workflows/eventcatalog.yml"
|
|
58
|
+
on:
|
|
59
|
+
pull_request:
|
|
60
|
+
types: [closed]
|
|
61
|
+
|
|
62
|
+
jobs:
|
|
63
|
+
code-to-docs:
|
|
64
|
+
# Only once the pull request is merged.
|
|
65
|
+
if: github.event.pull_request.merged == true
|
|
66
|
+
runs-on: ubuntu-latest
|
|
67
|
+
permissions:
|
|
68
|
+
contents: read
|
|
69
|
+
issues: write
|
|
70
|
+
pull-requests: write
|
|
71
|
+
steps:
|
|
72
|
+
- uses: actions/checkout@v6
|
|
73
|
+
with:
|
|
74
|
+
ref: ${{ github.event.pull_request.head.sha }}
|
|
75
|
+
fetch-depth: 0
|
|
76
|
+
- uses: event-catalog/agents@v2
|
|
77
|
+
env:
|
|
78
|
+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
79
|
+
with:
|
|
80
|
+
agent: code-to-docs
|
|
81
|
+
catalog-repo: your-org/your-catalog
|
|
82
|
+
catalog-token: ${{ secrets.EVENTCATALOG_TOKEN }}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Replace `your-org/your-catalog` with your catalog repository. Keep `fetch-depth: 0`: the agent needs it to compare the pull request with its base branch.
|
|
86
|
+
|
|
87
|
+
To check it works, merge a pull request that changes your architecture, such as a new event or a changed schema. The agent opens a pull request in your catalog, and comments on your pull request:
|
|
88
|
+
|
|
89
|
+
<CodeToDocsComment />
|
|
90
|
+
|
|
91
|
+
## Choose when it runs
|
|
92
|
+
|
|
93
|
+
We recommend running Code-to-Docs **when a pull request merges**, as above. It documents what shipped, runs once per pull request, and never documents abandoned work. A pull request closed without merging is skipped.
|
|
94
|
+
|
|
95
|
+
To show the catalog update to reviewers next to the code, run it **while the pull request is open** instead:
|
|
96
|
+
|
|
97
|
+
```yaml
|
|
98
|
+
on:
|
|
99
|
+
pull_request:
|
|
100
|
+
types: [opened, synchronize, reopened]
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
| | When the pull request merges | While the pull request is open |
|
|
104
|
+
| --- | --- | --- |
|
|
105
|
+
| Catalog pull request appears | After the merge | Before the merge, next to the code |
|
|
106
|
+
| Agent runs | Once per pull request | On every push |
|
|
107
|
+
| Abandoned pull requests | Never documented | Leave a catalog pull request for you to close |
|
|
108
|
+
|
|
109
|
+
Use `pull_request` events, not `push` to your main branch. The agent needs the pull request to compare it with its base branch and to comment on it.
|
|
110
|
+
|
|
111
|
+
## Use it across your organization
|
|
112
|
+
|
|
113
|
+
<OrgTopology />
|
|
114
|
+
|
|
115
|
+
- **One catalog for the organization.** Add the workflow to each repository with the same `catalog-repo`. The agent puts each change in the right domain and system.
|
|
116
|
+
- **A catalog per team.** Point each repository's `catalog-repo` at its team's catalog. [Federation](/docs/federation/overview) combines the team catalogs into one organization-wide catalog.
|
|
117
|
+
|
|
118
|
+
**Choose who reviews.** Catalog updates are pull requests, so your branch protection, required reviews and code owners apply. To send each update to the team that owns that part of the catalog, add a `CODEOWNERS` file to your catalog repository:
|
|
119
|
+
|
|
120
|
+
```text title=".github/CODEOWNERS"
|
|
121
|
+
/domains/Payments/ @acme/payments-platform
|
|
122
|
+
/domains/Orders/ @acme/ordering-platform
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Set up many repositories at once.** Keep the workflow in one place as a [reusable workflow](https://docs.github.com/en/actions/sharing-automations/reusing-workflows), and call it from each repository:
|
|
126
|
+
|
|
127
|
+
```yaml title=".github/workflows/eventcatalog.yml in each repository"
|
|
128
|
+
on:
|
|
129
|
+
pull_request:
|
|
130
|
+
types: [closed]
|
|
131
|
+
|
|
132
|
+
jobs:
|
|
133
|
+
eventcatalog:
|
|
134
|
+
if: github.event.pull_request.merged == true
|
|
135
|
+
uses: acme/.github/.github/workflows/eventcatalog-agents.yml@main
|
|
136
|
+
secrets: inherit
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Use [organization secrets](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-an-organization) for your model provider key, and a [GitHub App](#use-a-github-app) instead of a personal token.
|
|
140
|
+
|
|
141
|
+
## Configuration
|
|
142
|
+
|
|
143
|
+
| Input | Required | Default | Description |
|
|
144
|
+
| --- | --- | --- | --- |
|
|
145
|
+
| `agent` | No | `code-to-docs` | The workflow to run. This workflow is the default. |
|
|
146
|
+
| `catalog-repo` | Yes | | Your catalog repository, in `owner/repo` format. |
|
|
147
|
+
| `catalog-ref` | No | `main` | The catalog branch to read, and to open pull requests against. |
|
|
148
|
+
| `catalog-token` | No | `github.token` | A token that can read the catalog repository, push branches to it and open pull requests. |
|
|
149
|
+
| `github-app-client-id` | No | | Client ID of a [GitHub App](#use-a-github-app). Used instead of `catalog-token`. |
|
|
150
|
+
| `github-app-private-key` | No | | The private key of that GitHub App. Pass it from a secret. |
|
|
151
|
+
| `model` | No | `anthropic/claude-sonnet-4-6` | The model the agent uses. See [models](#models). |
|
|
152
|
+
| `ignore-paths` | No | Build and dependency folders | Comma-separated paths or glob patterns to leave out of the review. |
|
|
153
|
+
|
|
154
|
+
By default, `ignore-paths` leaves out folders such as `node_modules`, `dist` and `build`. Your list replaces the defaults, so keep the folders you still want left out:
|
|
155
|
+
|
|
156
|
+
```yaml
|
|
157
|
+
with:
|
|
158
|
+
ignore-paths: node_modules,dist,build,src/generated,**/*.test.ts
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Models
|
|
162
|
+
|
|
163
|
+
Use any model from [these providers](https://pi.dev/models). Set `model` to a provider and model name, and pass your provider's key as an environment variable on the step:
|
|
164
|
+
|
|
165
|
+
| Provider | Model example | Environment variable |
|
|
166
|
+
| --- | --- | --- |
|
|
167
|
+
| Anthropic | `anthropic/claude-sonnet-4-6` | `ANTHROPIC_API_KEY` |
|
|
168
|
+
| OpenAI | `openai/gpt-5.1` | `OPENAI_API_KEY` |
|
|
169
|
+
| OpenRouter | `openrouter/anthropic/claude-sonnet-4.6` | `OPENROUTER_API_KEY` |
|
|
170
|
+
|
|
171
|
+
We test with `anthropic/claude-sonnet-4-6`, the default. Smaller models are cheaper, but follow your catalog's conventions less reliably.
|
|
172
|
+
|
|
173
|
+
To use models in your own AWS account, use an `amazon-bedrock/` model and give the job AWS credentials. Your code is then sent only to Bedrock, in the region you choose:
|
|
174
|
+
|
|
175
|
+
```yaml
|
|
176
|
+
permissions:
|
|
177
|
+
id-token: write # for AWS OIDC
|
|
178
|
+
contents: read
|
|
179
|
+
issues: write
|
|
180
|
+
pull-requests: write
|
|
181
|
+
steps:
|
|
182
|
+
- uses: aws-actions/configure-aws-credentials@v4
|
|
183
|
+
with:
|
|
184
|
+
role-to-assume: arn:aws:iam::123456789012:role/eventcatalog-agents
|
|
185
|
+
aws-region: eu-west-1
|
|
186
|
+
- uses: event-catalog/agents@v2
|
|
187
|
+
with:
|
|
188
|
+
agent: code-to-docs
|
|
189
|
+
catalog-repo: your-org/your-catalog
|
|
190
|
+
catalog-token: ${{ secrets.EVENTCATALOG_TOKEN }}
|
|
191
|
+
model: amazon-bedrock/eu.anthropic.claude-sonnet-4-6
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
## Use a GitHub App
|
|
195
|
+
|
|
196
|
+
Instead of a personal access token, you can give the agent a GitHub App. Catalog pull requests then come from the App's bot account, there's no personal token to replace when someone leaves, and each run gets a token that only works on the catalog repository and expires after an hour.
|
|
197
|
+
|
|
198
|
+
1. [Create a GitHub App](https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/registering-a-github-app) in your organization with **Contents** and **Pull requests** set to **Read and write**. Turn off the webhook.
|
|
199
|
+
2. Generate a **private key**, and install the App on your catalog repository.
|
|
200
|
+
3. In your source repository, save the App's **Client ID** as a variable and its private key as a secret, and pass them instead of `catalog-token`:
|
|
201
|
+
|
|
202
|
+
```yaml
|
|
203
|
+
with:
|
|
204
|
+
agent: code-to-docs
|
|
205
|
+
catalog-repo: your-org/your-catalog
|
|
206
|
+
github-app-client-id: ${{ vars.EVENTCATALOG_APP_CLIENT_ID }}
|
|
207
|
+
github-app-private-key: ${{ secrets.EVENTCATALOG_APP_PRIVATE_KEY }}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
## Data and privacy
|
|
211
|
+
|
|
212
|
+
- **Your code goes to one place:** the model provider you configure. The agent runs in your GitHub Actions runner. EventCatalog never receives your code, your catalog or your pull requests.
|
|
213
|
+
- **It only changes your catalog through pull requests**, on branches named `eventcatalog-actions/...`. It never pushes to your catalog's main branch.
|
|
214
|
+
- **Your catalog's tools run without your secrets.** The linter and your fitness functions run as separate processes, without your model provider key or GitHub tokens.
|
|
215
|
+
|
|
216
|
+
Each run sends one anonymous usage event: the outcome and the kind of error if it failed, the model, the run's duration, whether the pull request was open or merged, the repository name, and how many of the agent's catalog pull requests are open, merged or closed. It never contains code, file names, paths, diffs or pull request content. To turn it off, set `POSTHOG_KEY: ''` in the step's `env`.
|
|
217
|
+
|
|
218
|
+
## Versions
|
|
219
|
+
|
|
220
|
+
Use `event-catalog/agents@v2` for the latest v2 release, or an exact release such as `event-catalog/agents@v2.1.0`, which never changes. Releases are listed on [GitHub](https://github.com/event-catalog/agents/tags).
|