Distribution mirror — built artifacts only (codex plugins v0.5.11). Generated from a private source repository. Do not open pull requests here.
Turn a codebase or a document set into a living architecture/knowledge board on ContextDX Portal — straight from your AI coding host. No manual diagramming: the plugin scans your code or docs, classifies every component against your org's archetype catalogue, maps the relationships, and syncs a structured graph you can review, share, and run analyses on.
The pipeline runs both ways: the platform also carries your app's spec — compiled skills
(specs + guidelines), architect intents, board designs, and aspect contracts — and /build
implements it in the repo, from an empty directory up, then maps the result back onto the board.
Two plugins, one engine:
| Plugin | Install id | Analyzes | Produces | Phase‑2 command |
|---|---|---|---|---|
| Cdx Code | cdx-code |
A codebase — JS/TS, Python, Java, Go, C#, Ruby, Rust | An architecture board (services, modules, data flow) | /analyze |
| Cdx Work | cdx-work |
A document set — specs, RFCs, ADRs, policies, wikis, notes | A knowledge board (concepts, decisions, ownership) | /analyze-docs |
Both emit the same node/edge wire model and sync through the same engine; only the analysis brain differs. Per‑plugin docs: Cdx Code · Cdx Work.
The same plugin content is repackaged per host. Pick the row for your tool:
| Host | Cdx Code | Cdx Work | How you install |
|---|---|---|---|
| Claude Code / Claude Cowork | ✅ | ✅ | Marketplace contextdx/cdx-claude |
| Codex | ✅ | ✅ | Marketplace contextdx/cdx-codex |
| Cursor | ✅ | planned | Local install + “Add to Cursor” deeplink |
Note
Cursor ships Cdx Code only for now — Cdx Work on Cursor is planned, not yet built.
Also: the published artifacts are useless without ContextDX Portal credentials — installing a
plugin is safe, but it does nothing until you /configure it against a board you own.
Important
Pre-release. The marketplaces and dist repos referenced below
(contextdx/cdx-claude, contextdx/cdx-codex) are created and published by the first
release (yarn release). Until that ships, the marketplace add / install commands
will not resolve. To try it now, build from source (yarn build) and install the generated
plugin under plugins/<host>/<domain>/ via your host's local-install path, or watch
contextdx.com for availability.
Add the marketplace once, then install whichever plugins you want (Cowork uses the same marketplace):
/plugin marketplace add contextdx/cdx-claude
/plugin install cdx-code@contextdx # codebase → architecture board
/plugin install cdx-work@contextdx # documents → knowledge boardRestart Claude Code so the commands load. Scope the install with --scope user (default, all your
projects), --scope project (shared via .claude/settings.json), or --scope local (only you, only
this repo).
codex plugin marketplace add contextdx/cdx-codexThen install cdx-code and/or cdx-work from /plugins and restart Codex. Auth uses the same
.contextdx/config.json described below.
Cursor installs locally (no marketplace yet). After building (or downloading) the plugin:
# Copy the built plugin into Cursor's local plugins directory:
cp -r cdx-code ~/.cursor/plugins/local/cdx-codeThen add the MCP server with the “Add to Cursor” deeplink on contextdx.com and restart Cursor. (Cursor currently ships Cdx Code only.)
Every host reads the same project‑local config. Get a Binding Token and API Secret from the
ContextDX Portal (Sources → Add Source → Board Builder — saving generates the secret), then create
.contextdx/config.json at the root of your repo or document set:
{
"bindingToken": "your-base64url-binding-token",
"apiSecret": "ck_cp_live_your_api_secret",
"boardSlug": "my-project-overview",
"branch": "main",
"baseUrl": "https://platform.contextdx.com/api"
}| Field | Required | Notes |
|---|---|---|
bindingToken |
yes | Base64url orgId:bindingId from the portal. Sent as X-CodePlugin-Token. |
apiSecret |
yes | Must start with ck_cp_live_. Sent as X-CodePlugin-Secret. |
boardSlug |
yes | Target board. /configure can discover and write it for you. |
branch |
yes | Must match the binding, or /sync returns 400 Branch Mismatch. (Optional for non‑git doc sets.) |
baseUrl |
no | Override for self‑hosted (default https://platform.contextdx.com/api). |
excludePaths |
no | Paths skipped during analysis (default node_modules, dist, .git, coverage). |
includeTests |
no | Cdx Code only — include test files in analysis (default false). |
includeSourceReferences |
no | Attach file/doc path + short excerpt to synced nodes/edges (default true). |
Run /configure to validate the config, test the connection, and add .contextdx/ to your
.gitignore. Credentials live only in this file — never logged or echoed to chat, and sent only to
platform.contextdx.com.
A
SessionStarthook scaffolds an empty.contextdx/config.jsonand the.gitignoreline for you on first run. It makes no network calls. (Cowork/Cursor‑cloud may not fire hooks — use/configureand/statusas the fallback.)
Analysis is split into two phases so every component gets a fit archetype instead of a misfit that needs re‑typing later:
/configure— connect to the portal (one‑time per repo / doc set)./analyze-archetypes— Phase 1: scan for the categories present, compare them against your server's archetype catalogue, and either confirm it's complete or submit proposals for admin review. This is a precondition — Phase 2 prompts you to run it if the catalogue is stale or missing./analyze(Cdx Code) or/analyze-docs(Cdx Work) — Phase 2: the full analysis. Incremental by default — only changed files/docs are re‑analyzed./sync— push the analysis to your board (smart diff: only new/changed elements)./insights— run server‑defined analyses (security, performance, etc.) against the board./status— see config state, the archetype precondition, the analysis summary, and sync state.
# Cdx Code
/configure
/analyze-archetypes # settle the vocabulary (Phase 1)
/analyze # analyze the codebase (Phase 2, incremental)
/analyze src/backend # or target a path
/analyze --clean # force a full re-analysis
/sync # push to the portal
# Cdx Work
/configure
/analyze-archetypes # settle the vocabulary (Phase 1)
/analyze-docs # analyze the document set (Phase 2, incremental)
/sync # push to the portalCommands are grouped by lifecycle stage — the same five groups /help renders. The stages form a
loop: Operate findings become intents an architect approves, Build implements them,
Map re-syncs so the server verifies the change, Understand evaluates the new state.
1 · Connect — bind this project to a ContextDX board
| Command | Plugin | What it does |
|---|---|---|
/login |
both | Sign in in the browser and pick a board — no copy‑paste |
/configure |
both | Manual credential setup, connection test, .gitignore |
/status |
both | Lifecycle dial (where you are + the one next command) + config, archetype, analysis, and sync state |
/help |
both | Grouped command list and the plugin version |
/update |
both | Update this plugin to the latest published version for your host |
2 · Map — turn the codebase / document set into a living board
| Command | Plugin | What it does |
|---|---|---|
/analyze-archetypes (--dry-run / --skip-submit / --replace) |
both | Phase 1 — scan for archetype gaps, submit proposals if needed |
/analyze [path] (--clean / --drill <board>/<node> / --all) |
Cdx Code | Phase 2 — analyze codebase architecture (incremental) |
/analyze-docs (same flags) |
Cdx Work | Phase 2 — analyze the document set (incremental) |
/adopt [--db | --api] |
Cdx Code | Extract a code aspect (DB schema / API surface) onto the board |
/sync [--board <slug>] · /sync --all |
both | Push analysis to the portal (diff‑based); one board or every board |
/demo-insights [count] |
both | Seed a freshly mapped board with demonstrative, path‑rich insights |
3 · Understand — run intelligence on the mapped board
| Command | Plugin | What it does |
|---|---|---|
/insights · /insights <slug> · /insights --all |
both | List and run server‑defined insight skills against the board |
4 · Build — let the platform's spec drive the code
| Command | Plugin | What it does |
|---|---|---|
/skills [--status] |
both | Compile the platform's skill bundle (specs + guidelines) into the repo — never overwrites your local edits |
/build [--plan] |
Cdx Code | Build the app from the platform's spec — compiled skills, intents, board design, aspect contracts. Works from an empty repo (bootstrap) or an existing one (gap‑fill), incrementally |
/intents |
both | Pull architect‑authored intents, implement them, record resolutions |
5 · Operate — keep production and the board in a scheduled loop
| Command | Plugin | What it does |
|---|---|---|
/monitor · /monitor setup |
Cdx Code | Correlate monitoring signals (Sentry errors, CloudWatch, cloud costs) with board elements and push the findings as a draft insight; architects promote findings to intents. setup configures sources + a recurring run |
For non‑trivial inputs, Phase 2 produces a hierarchy so you can navigate from a 10–30 node overview down to detail without overwhelming any single view:
| Layer | Scope (Code) | Scope (Work) |
|---|---|---|
| L0 Overview | Entire project | Entire knowledge base |
| L1 Domain | Domain / workspace | Subject area / doc collection |
| L2 Component | Service / module | Single document / spec |
| L3 Detail | Deep internals (opt‑in) | Section / decision internals (opt‑in) |
Board hierarchy and per‑board sync state live in .contextdx/boards/ (manifest.json,
<board-slug>.json, stores/<board-slug>.store.json).
Components are classified against archetypes defined on your ContextDX server — not a fixed list
shipped with the plugin. The catalogue is per board kind (code for architecture boards,
knowledge for knowledge boards); Phase 1 settles the right one before Phase 2 runs. If your input has
patterns that don't fit, /analyze-archetypes proposes new archetypes (or improvements) for human
review before any board is produced.
- Credentials are user‑supplied and stored only in project‑local
.contextdx/config.json(plaintext, gitignored). They are never logged, never echoed to chat, and sent only asX-CodePlugin-Token/X-CodePlugin-Secretheaders. The plugin reads no secrets from environment variables and no files outside your project (~/.ssh,~/.aws,~/.netrc, etc. are never touched). - The only network endpoint is
https://platform.contextdx.com/api, contacted solely when you run/analyze-archetypes,/sync, or/insights— never in the background. - What leaves your machine: node/edge names and descriptions (≤500 chars), file/document paths,
short source excerpts (≤500 chars per reference), line ranges, the git origin remote URL
(
git remote get-url origin), branch, commit, and project name. SetincludeSourceReferences: falseto omit paths/excerpts (analysis still runs).
| Problem | Solution |
|---|---|
| “ContextDX not configured” | Run /configure with credentials set in .contextdx/config.json |
| “Configuration file not found” | Run /configure first — it scaffolds .contextdx/config.json |
| “Invalid apiSecret format” | The API secret must start with ck_cp_live_ |
401 Unauthorized |
Regenerate the binding token / API secret in the ContextDX Portal |
400 Branch Mismatch |
Set branch in the config to match the board binding |
| “No analysis found” | Run /analyze (or /analyze-docs) before /sync |
| Commands not showing | Restart the host after installing; on Cowork/Cursor‑cloud use /configure + /status |
/analyze keeps asking for Phase 1 |
Run /analyze-archetypes — the catalogue is stale or hasn't been settled for this state |
Business Source License 1.1 — source‑available, converts to Apache 2.0 on 2030‑05‑29. See LICENSE for the Additional Use Grant (production use permitted except for offering a competing hosted/managed service).