Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
"name": "bytedesk-design-patterns",
"description": "ByteDeskAI marketplace for reusable design-pattern skills and reference catalogs.",
"version": "0.8.6",
"owner": {
"name": "ByteDeskAI"
},
Expand All @@ -11,7 +10,6 @@
"name": "design-patterns",
"source": "./plugins/design-patterns",
"description": "Source-neutral pattern advisor for architecture, refactoring, language idioms, integration design, dynamic catalog exploration, architecture scanning, context packs, simulations, graph intelligence, MCP tooling, and implementation brief generation.",
"version": "0.8.6",
"author": {
"name": "ByteDeskAI"
},
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"name": "Validate Design Patterns release",
"on": {
"release": {
"types": ["published"]
},
"workflow_dispatch": {}
},
"permissions": {
"contents": "read",
"id-token": "write"
},
"jobs": {
"publish": {
"runs-on": "ubuntu-latest",
"environment": "marketplace-production",
"steps": [
{
"uses": "actions/checkout@v4"
},
{
"uses": "actions/setup-python@v5",
"with": {
"python-version": "3.12"
}
},
{
"name": "Validate source and release contract",
"run": "set -euo pipefail\npython3 scripts/validate_catalog.py\npython3 plugins/design-patterns/scripts/validate_catalog.py\npython3 -m unittest tests.test_release_contract\npython3 scripts/run_evals.py\n"
},
{
"name": "Build deterministic provider artifacts",
"run": "set -euo pipefail\nmkdir -p dist\npython3 scripts/release_inventory.py > dist/release-inventory.json\npython3 scripts/release_inventory.py > \"$RUNNER_TEMP/release-inventory-second.json\"\ncmp dist/release-inventory.json \"$RUNNER_TEMP/release-inventory-second.json\"\npython3 scripts/build_release.py --output \"$RUNNER_TEMP/design-patterns-first\"\npython3 scripts/build_release.py --output \"$RUNNER_TEMP/design-patterns-second\"\ndiff -qr \"$RUNNER_TEMP/design-patterns-first\" \"$RUNNER_TEMP/design-patterns-second\"\npython3 scripts/build_release.py\n"
},
{
"uses": "actions/upload-artifact@v4",
"with": {
"name": "design-patterns-release-candidate",
"path": "bytedesk-package.yaml\ndist/design-patterns\ndist/release-inventory.json\n",
"if-no-files-found": "error"
}
},
{
"name": "Fail closed until bdm supports trusted-publisher OIDC",
"run": "echo \"::error title=Marketplace publication blocked::ByteDesk marketplace publication is blocked because bdm does not yet acquire GitHub Actions OIDC credentials.\"\necho \"Do not substitute a PAT, token, raw Actions JWT, or another secret.\"\nexit 1\n"
}
]
}
}
}
6 changes: 6 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ jobs:
run: python3 scripts/generate_site.py
- name: Validate catalog and marketplace metadata
run: python3 scripts/validate_catalog.py
- name: Validate self-contained release and deterministic inventory
run: |
python3 plugins/design-patterns/scripts/validate_catalog.py
python3 -m unittest tests.test_release_contract
test "$(python3 scripts/release_inventory.py)" = "$(python3 scripts/release_inventory.py)"
python3 scripts/build_release.py
- name: Run unit tests
run: python3 -m unittest discover
- name: Run golden eval checks
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
.playwright-mcp/
__pycache__/
*.pyc
dist/
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Design Pattern References

Claude Code and Codex plugin marketplace for reusable design-pattern guidance.
Claude Code, Codex, Grok Build, and Kimi Code plugin marketplace for reusable design-pattern guidance.

This repository is intended to be hosted at `ByteDeskAI/design-pattern-references` and added to Claude Code as a marketplace:

Expand All @@ -15,6 +15,10 @@ It can also be added to Codex as a marketplace:
codex plugin marketplace add ByteDeskAI/design-pattern-references
```

Grok Build consumes the same Git marketplace through
`.grok-plugin/plugin.json`. Kimi Code consumes the server's version-2 catalog
projection and the bundled `kimi.plugin.json` manifest.

For local development from this checkout:

```bash
Expand All @@ -41,11 +45,13 @@ codex plugin marketplace add .
- A Python-backed dynamic catalog workbench exposed by the plugin CLI.
- A stdio MCP server for tools that can call pattern recommendations, scans, context packs, ADRs, graph queries, simulations, and migrations.
- Language profiles for C#, Java, TypeScript, Python, Go, Rust, and C++.
- A bundled `patterns` CLI that Claude Code and Codex can use after the plugin is installed.
- A bundled `patterns` CLI that Claude Code, Codex, Grok Build, and Kimi Code can use after the plugin is installed.

## Plugin Capability

After installation, Claude Code or Codex can use the `design-patterns` plugin when the user asks for pattern selection, architecture tradeoffs, refactoring guidance, or language-specific implementation approaches.
After installation, Claude Code, Codex, Grok Build, or Kimi Code can use the
`design-patterns` plugin when the user asks for pattern selection, architecture
tradeoffs, refactoring guidance, or language-specific implementation approaches.

The plugin contributes:

Expand Down Expand Up @@ -177,9 +183,9 @@ Omit `--language` and `--scope` unless you want to override inference. The plugi

The repository includes three MCP configurations:

- [plugins/design-patterns/.mcp.json](/Users/kon1790/GitHub/design-pattern-reference/plugins/design-patterns/.mcp.json): packaged with the Claude plugin. It starts `design-patterns` through `${CLAUDE_PLUGIN_ROOT}/bin/patterns-mcp`, so global and project installs launch from the actual installed plugin directory.
- [plugins/design-patterns/.codex-mcp.json](/Users/kon1790/GitHub/design-pattern-reference/plugins/design-patterns/.codex-mcp.json): packaged with the Codex plugin. It uses the same install-root-aware launcher with Codex plugin-relative paths.
- [.mcp.json](/Users/kon1790/GitHub/design-pattern-reference/.mcp.json): project-scoped config for this repository checkout. Opening Claude in this project should show `design-patterns` as connected automatically.
- [`plugins/design-patterns/.mcp.json`](plugins/design-patterns/.mcp.json): packaged with Claude, Grok Build, and Kimi Code. Claude starts it through `${CLAUDE_PLUGIN_ROOT}/bin/patterns-mcp`; server adapters preserve provider-specific install-root handling.
- [`plugins/design-patterns/.codex-mcp.json`](plugins/design-patterns/.codex-mcp.json): packaged with Codex and uses plugin-relative paths.
- [`.mcp.json`](.mcp.json): project-scoped configuration for developing this repository.

Claude verification:

Expand Down Expand Up @@ -304,4 +310,7 @@ python3 scripts/run_evals.py

## Versioning

The marketplace and plugin versions move together. Bump both versions when publishing catalog or capability changes that users should receive through marketplace updates.
The immutable ByteDesk package, Codex, Grok Build, and Kimi Code manifests use
`0.9.3`. The internal Claude marketplace and plugin manifests remain versionless,
so Claude resolves their installed version from the immutable marketplace source
commit instead of serving a stale pinned cache.
54 changes: 54 additions & 0 deletions bytedesk-package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"$schema": "https://marketplace.bytedesk.ai/schemas/v1alpha1/bytedesk-package.schema.json",
"apiVersion": "marketplace.bytedesk.ai/v1alpha1",
"kind": "AgentPackageRelease",
"metadata": {
"namespace": "bytedesk",
"name": "design-patterns",
"version": "0.9.3",
"displayName": "Design Patterns"
},
"spec": {
"visibility": "public",
"summary": "Source-neutral design-pattern guidance, architecture review, catalog tools, and durable project pattern memory.",
"license": "Apache-2.0",
"repository": "https://github.com/ByteDeskAI/design-pattern-references",
"homepage": "https://github.com/ByteDeskAI/design-pattern-references",
"keywords": [
"architecture",
"design-patterns",
"integration-design",
"refactoring"
],
"variants": [
{
"id": "claude-code",
"provider": "claude-code",
"contract": "claude-plugin",
"contractVersion": "observed-2026-08-19",
"source": { "path": "dist/design-patterns" }
},
{
"id": "openai-codex",
"provider": "openai-codex",
"contract": "codex-plugin",
"contractVersion": "observed-2026-08-19",
"source": { "path": "dist/design-patterns" }
},
{
"id": "grok-build",
"provider": "grok-build",
"contract": "grok-plugin",
"contractVersion": "main-observed-2026-08-19",
"source": { "path": "dist/design-patterns" }
},
{
"id": "kimi-code",
"provider": "kimi-code",
"contract": "kimi-plugin",
"contractVersion": "0.38.0",
"source": { "path": "dist/design-patterns" }
}
]
}
}
22 changes: 22 additions & 0 deletions packaging/source-tree-v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"schemaVersion": 1,
"id": "source-tree-v1",
"revision": 1,
"source": "plugins/design-patterns",
"output": "dist/design-patterns",
"exclude": [
".in_use",
"**/__pycache__/**",
"**/*.pyc"
],
"modePolicy": {
"regular": "0644",
"executable": "0755"
},
"variants": [
"claude-code",
"openai-codex",
"grok-build",
"kimi-code"
]
}
1 change: 0 additions & 1 deletion plugins/design-patterns/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"$schema": "https://anthropic.com/claude-code/plugin.schema.json",
"name": "design-patterns",
"description": "Source-neutral advisor, Markdown reference catalog, MCP tooling, and dynamic workbench for software design patterns.",
"version": "0.8.6",
"author": {
"name": "ByteDeskAI"
},
Expand Down
3 changes: 1 addition & 2 deletions plugins/design-patterns/.codex-mcp.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
"mcpServers": {
"design-patterns": {
"type": "stdio",
"command": "./bin/patterns-mcp",
"cwd": "."
"command": "./bin/patterns-mcp"
}
}
}
29 changes: 12 additions & 17 deletions plugins/design-patterns/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"name": "design-patterns",
"version": "0.8.6",
"version": "0.9.3",
"description": "Source-neutral advisor, Markdown reference catalog, MCP tooling, and dynamic workbench for software design patterns.",
"author": {
"name": "ByteDeskAI",
"url": "https://github.com/ByteDeskAI"
"name": "ByteDeskAI"
},
"homepage": "https://github.com/ByteDeskAI/design-pattern-references",
"repository": "https://github.com/ByteDeskAI/design-pattern-references",
Expand All @@ -20,8 +19,8 @@
"mcpServers": "./.codex-mcp.json",
"interface": {
"displayName": "Design Patterns",
"shortDescription": "Pattern advice, architecture review, and refactoring guidance.",
"longDescription": "A source-neutral Markdown catalog and skill bundle for finding, reviewing, deciding, scanning, scoring, documenting, exploring, and applying reusable software design patterns across object design, integration design, architecture smells, playbooks, recipes, framework packs, language-specific implementation idioms, snippets, context packs, migration plans, decision simulations, graph intelligence, MCP tooling, and a dynamic Python-backed catalog workbench.",
"shortDescription": "Source-neutral advisor, Markdown reference catalog, MCP tooling, and dynamic workbench for software design patterns.",
"longDescription": "Source-neutral advisor, Markdown reference catalog, MCP tooling, and dynamic workbench for software design patterns.",
"developerName": "ByteDeskAI",
"category": "Engineering",
"capabilities": [
Expand All @@ -30,18 +29,14 @@
],
"websiteURL": "https://github.com/ByteDeskAI/design-pattern-references",
"defaultPrompt": [
"Find the right pattern for this design problem.",
"Review this architecture for pattern issues.",
"Draft an architecture decision using pattern tradeoffs.",
"Scan this repository for pattern-relevant architecture smells.",
"Serve the dynamic design pattern workbench for catalog exploration.",
"Generate an implementation brief from selected pattern candidates.",
"Plan this module toward a cleaner pattern.",
"Build a context pack from code evidence and pattern references.",
"Run the design-pattern MCP server for tool integrations.",
"Show copyable /patterns-* MCP request examples for this plugin.",
"Show /patterns-* command help for every design-pattern MCP tool.",
"Infer language and catalog scope from codebase and request context when omitted."
"Produce source-neutral architecture decision guidance using the design-pattern catalog, tradeoff analysis, and ADR-style output.",
"Find source-neutral design-pattern issues in code, architecture docs, PRs, diagrams, or design notes.",
"Review message-driven, event-driven, async workflow, broker, queue, stream, saga, or integration architecture.",
"Advise on selecting, comparing, applying, reviewing, or invoking reusable software design patterns.",
"Plan or implement a safe pattern-oriented refactor in an existing codebase.",
"Find and compare reusable design patterns from a problem statement.",
"Generate an ADR-style seed backed by the pattern catalog",
"Build a model-ready pattern context pack for code and a design question"
]
}
}
15 changes: 15 additions & 0 deletions plugins/design-patterns/.grok-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "design-patterns",
"version": "0.9.3",
"description": "Source-neutral advisor, Markdown reference catalog, MCP tooling, and dynamic workbench for software design patterns.",
"author": {
"name": "ByteDeskAI"
},
"homepage": "https://github.com/ByteDeskAI/design-pattern-references",
"repository": "https://github.com/ByteDeskAI/design-pattern-references",
"license": "Apache-2.0",
"skills": "./skills",
"agents": "./agents",
"commands": "./commands",
"mcpServers": "./.portable-mcp.json"
}
8 changes: 8 additions & 0 deletions plugins/design-patterns/.portable-mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"mcpServers": {
"design-patterns": {
"type": "stdio",
"command": "./bin/patterns-mcp"
}
}
}
46 changes: 46 additions & 0 deletions plugins/design-patterns/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Design Patterns

Source-neutral advisor, Markdown reference catalog, MCP tooling, and dynamic workbench for software design patterns.

This plugin works across Claude Code, Codex, Grok Build, and Kimi Code. Claude
Code loads `.claude-plugin/plugin.json`, Codex loads
`.codex-plugin/plugin.json`, Grok Build loads `.grok-plugin/plugin.json`, and
Kimi Code loads `kimi.plugin.json`.

## MCP server

Register the `design-patterns` stdio MCP server. Claude reads `.mcp.json`,
Codex reads `.codex-mcp.json`, and the Grok/Kimi manifests reference
`.portable-mcp.json`:

```json
{
"mcpServers": {
"design-patterns": {
"type": "stdio",
"command": "<plugin>/design-patterns/bin/patterns-mcp"
}
}
}
```

## Skills & commands

- **architecture-decision** (skill) — Produce source-neutral architecture decision guidance using the design-pattern catalog, tradeoff analysis, and ADR-style output.
- **architecture-issue-scan** (skill) — Find source-neutral design-pattern issues in code, architecture docs, PRs, diagrams, or design notes.
- **integration-flow-review** (skill) — Review message-driven, event-driven, async workflow, broker, queue, stream, saga, or integration architecture.
- **pattern-advisor** (skill) — Advise on selecting, comparing, applying, reviewing, or invoking reusable software design patterns.
- **pattern-application** (skill) — Plan or implement a safe pattern-oriented refactor in an existing codebase.
- **pattern-finder** (skill) — Find and compare reusable design patterns from a problem statement.
- **patterns-adr** (command) — Generate an ADR-style seed backed by the pattern catalog
- **patterns-context** (command) — Build a model-ready pattern context pack for code and a design question
- **patterns-examples** (command) — Show copyable Design Patterns slash commands and MCP request examples
- **patterns-graph** (command) — Query the typed pattern catalog graph and relationships
- **patterns-help** (command) — Show help for all Design Patterns slash commands or one command
- **patterns-history** (command) — Recall this project's pattern memory — prior scans, decisions, and applied refactors
- **patterns-migrate** (command) — Plan a migration from a current smell or shape to a target pattern
- **patterns-recommend** (command) — Recommend design patterns for an architecture force or problem
- **patterns-scan** (command) — Scan a file or directory for pattern-relevant architecture smells
- **patterns-simulate** (command) — Score pattern options against architecture decision criteria
- **patterns-snippets** (command) — Fetch language-specific implementation snippets for pattern slugs
- **pattern-architect** (agent) — Reviews architecture and code through source-neutral design-pattern domains.
Loading