@vpxa/aikit 0.1.58 → 0.1.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -3
- package/package.json +2 -1
- package/packages/aikit-client/dist/index.d.ts +146 -4
- package/packages/aikit-client/dist/index.js +5 -1
- package/packages/analyzers/dist/index.d.ts +309 -11
- package/packages/analyzers/dist/index.js +54 -1
- package/packages/chunker/dist/index.d.ts +451 -18
- package/packages/chunker/dist/index.js +24 -1
- package/packages/cli/dist/{commands/init/constants.js → constants-D3v4VDf0.js} +1 -1
- package/packages/cli/dist/index.js +15 -2
- package/packages/cli/dist/init-D0CiV9PX.js +7 -0
- package/packages/cli/dist/scaffold-CJwkHf-q.js +2 -0
- package/packages/cli/dist/{commands/init/templates.js → templates-DJ7EC5vw.js} +1 -1
- package/packages/cli/dist/user-HmJYNt5b.js +5 -0
- package/packages/core/dist/index.d.ts +357 -6
- package/packages/core/dist/index.js +1 -1
- package/packages/dashboard/dist/assets/{index-Cdke3KDK.js → index-C6D-PCp0.js} +7 -7
- package/packages/dashboard/dist/assets/index-C6D-PCp0.js.map +1 -0
- package/packages/dashboard/dist/index.html +1 -1
- package/packages/elicitation/dist/index.d.ts +139 -4
- package/packages/elicitation/dist/index.js +1 -1
- package/packages/embeddings/dist/index.d.ts +45 -2
- package/packages/embeddings/dist/index.js +1 -1
- package/packages/enterprise-bridge/dist/index.d.ts +275 -7
- package/packages/enterprise-bridge/dist/index.js +1 -1
- package/packages/flows/dist/index.d.ts +345 -12
- package/packages/flows/dist/index.js +15 -1
- package/packages/indexer/dist/index.d.ts +196 -6
- package/packages/indexer/dist/index.js +1 -1
- package/packages/present/dist/index.html +315 -314
- package/packages/server/dist/curated-manager-DX-_oJg0.js +5 -0
- package/packages/server/dist/index.d.ts +139 -1
- package/packages/server/dist/index.js +1 -1
- package/packages/server/dist/server-eMZ64H9b.js +1274 -0
- package/packages/store/dist/index.d.ts +316 -5
- package/packages/store/dist/index.js +90 -1
- package/packages/store/dist/lance-store-jdHZp-V4.js +1 -0
- package/packages/tools/dist/index.d.ts +2161 -61
- package/packages/tools/dist/index.js +117 -1
- package/packages/tui/dist/{App-CoMyn2kt.js → App-DobfqTPH.js} +1 -1
- package/packages/tui/dist/App.d.ts +1 -1
- package/packages/tui/dist/App.js +1 -1
- package/packages/tui/dist/{LogPanel-CDItCD0E.js → LogPanel-DGeptKim.js} +3 -3
- package/packages/tui/dist/hooks/useKBClient.d.ts +1 -1
- package/packages/tui/dist/{index-MXJeXmCf.d.ts → index-floZQwfo.d.ts} +2 -1
- package/packages/tui/dist/index.d.ts +1 -1
- package/packages/tui/dist/index.js +1 -1
- package/packages/tui/dist/panels/LogPanel.js +1 -1
- package/scaffold/definitions/bodies.mjs +47 -0
- package/scaffold/definitions/protocols.mjs +9 -0
- package/scaffold/definitions/tools.mjs +15 -0
- package/scaffold/general/agents/Debugger.agent.md +9 -0
- package/scaffold/general/agents/Documenter.agent.md +9 -0
- package/scaffold/general/agents/Frontend.agent.md +9 -0
- package/scaffold/general/agents/Implementer.agent.md +9 -0
- package/scaffold/general/agents/Orchestrator.agent.md +47 -0
- package/scaffold/general/agents/Planner.agent.md +9 -0
- package/scaffold/general/agents/Refactor.agent.md +9 -0
- package/scaffold/general/agents/Security.agent.md +9 -0
- package/scaffold/general/agents/_shared/code-agent-base.md +9 -0
- package/scaffold/general/skills/aikit/SKILL.md +71 -7
- package/scaffold/general/skills/c4-architecture/SKILL.md +87 -1
- package/scaffold/general/skills/c4-architecture/references/html-design-system.md +337 -0
- package/scaffold/general/skills/c4-architecture/references/html-template.html +627 -0
- package/scaffold/general/skills/present/SKILL.md +180 -0
- package/packages/aikit-client/dist/direct-client.d.ts +0 -37
- package/packages/aikit-client/dist/direct-client.js +0 -1
- package/packages/aikit-client/dist/mcp-client.d.ts +0 -19
- package/packages/aikit-client/dist/mcp-client.js +0 -4
- package/packages/aikit-client/dist/parsers.d.ts +0 -35
- package/packages/aikit-client/dist/parsers.js +0 -2
- package/packages/aikit-client/dist/types.d.ts +0 -62
- package/packages/aikit-client/dist/types.js +0 -1
- package/packages/analyzers/dist/blast-radius-analyzer.d.ts +0 -19
- package/packages/analyzers/dist/blast-radius-analyzer.js +0 -6
- package/packages/analyzers/dist/dependency-analyzer.d.ts +0 -32
- package/packages/analyzers/dist/dependency-analyzer.js +0 -8
- package/packages/analyzers/dist/diagram-generator.d.ts +0 -16
- package/packages/analyzers/dist/diagram-generator.js +0 -2
- package/packages/analyzers/dist/entry-point-analyzer.d.ts +0 -40
- package/packages/analyzers/dist/entry-point-analyzer.js +0 -4
- package/packages/analyzers/dist/knowledge-producer.d.ts +0 -40
- package/packages/analyzers/dist/knowledge-producer.js +0 -26
- package/packages/analyzers/dist/pattern-analyzer.d.ts +0 -15
- package/packages/analyzers/dist/pattern-analyzer.js +0 -2
- package/packages/analyzers/dist/regex-call-graph.d.ts +0 -10
- package/packages/analyzers/dist/regex-call-graph.js +0 -1
- package/packages/analyzers/dist/structure-analyzer.d.ts +0 -19
- package/packages/analyzers/dist/structure-analyzer.js +0 -4
- package/packages/analyzers/dist/symbol-analyzer.d.ts +0 -14
- package/packages/analyzers/dist/symbol-analyzer.js +0 -9
- package/packages/analyzers/dist/ts-call-graph.d.ts +0 -29
- package/packages/analyzers/dist/ts-call-graph.js +0 -1
- package/packages/analyzers/dist/types.d.ts +0 -110
- package/packages/analyzers/dist/types.js +0 -1
- package/packages/chunker/dist/call-graph-extractor.d.ts +0 -25
- package/packages/chunker/dist/call-graph-extractor.js +0 -1
- package/packages/chunker/dist/chunker-factory.d.ts +0 -19
- package/packages/chunker/dist/chunker-factory.js +0 -1
- package/packages/chunker/dist/chunker.interface.d.ts +0 -13
- package/packages/chunker/dist/chunker.interface.js +0 -1
- package/packages/chunker/dist/code-chunker.d.ts +0 -17
- package/packages/chunker/dist/code-chunker.js +0 -11
- package/packages/chunker/dist/extractors/call-extractor.d.ts +0 -24
- package/packages/chunker/dist/extractors/call-extractor.js +0 -1
- package/packages/chunker/dist/extractors/entry-point-detector.d.ts +0 -14
- package/packages/chunker/dist/extractors/entry-point-detector.js +0 -1
- package/packages/chunker/dist/extractors/import-extractor.d.ts +0 -14
- package/packages/chunker/dist/extractors/import-extractor.js +0 -1
- package/packages/chunker/dist/extractors/pattern-detector.d.ts +0 -14
- package/packages/chunker/dist/extractors/pattern-detector.js +0 -1
- package/packages/chunker/dist/extractors/scope-resolver.d.ts +0 -26
- package/packages/chunker/dist/extractors/scope-resolver.js +0 -1
- package/packages/chunker/dist/extractors/symbol-extractor.d.ts +0 -14
- package/packages/chunker/dist/extractors/symbol-extractor.js +0 -3
- package/packages/chunker/dist/extractors/types.d.ts +0 -44
- package/packages/chunker/dist/extractors/types.js +0 -1
- package/packages/chunker/dist/generic-chunker.d.ts +0 -15
- package/packages/chunker/dist/generic-chunker.js +0 -5
- package/packages/chunker/dist/markdown-chunker.d.ts +0 -17
- package/packages/chunker/dist/markdown-chunker.js +0 -3
- package/packages/chunker/dist/wasm/languages.d.ts +0 -18
- package/packages/chunker/dist/wasm/languages.js +0 -1
- package/packages/chunker/dist/wasm/query-executor.d.ts +0 -70
- package/packages/chunker/dist/wasm/query-executor.js +0 -1
- package/packages/chunker/dist/wasm/runtime.d.ts +0 -44
- package/packages/chunker/dist/wasm/runtime.js +0 -1
- package/packages/chunker/dist/wasm/types.d.ts +0 -84
- package/packages/chunker/dist/wasm/types.js +0 -1
- package/packages/chunker/dist/wasm-chunker.d.ts +0 -23
- package/packages/chunker/dist/wasm-chunker.js +0 -6
- package/packages/cli/dist/aikit-init.d.ts +0 -59
- package/packages/cli/dist/aikit-init.js +0 -1
- package/packages/cli/dist/commands/analyze.d.ts +0 -6
- package/packages/cli/dist/commands/analyze.js +0 -2
- package/packages/cli/dist/commands/context-cmds.d.ts +0 -6
- package/packages/cli/dist/commands/context-cmds.js +0 -1
- package/packages/cli/dist/commands/environment.d.ts +0 -6
- package/packages/cli/dist/commands/environment.js +0 -1
- package/packages/cli/dist/commands/execution.d.ts +0 -6
- package/packages/cli/dist/commands/execution.js +0 -1
- package/packages/cli/dist/commands/flow.d.ts +0 -6
- package/packages/cli/dist/commands/flow.js +0 -1
- package/packages/cli/dist/commands/graph.d.ts +0 -6
- package/packages/cli/dist/commands/graph.js +0 -6
- package/packages/cli/dist/commands/init/adapters.d.ts +0 -28
- package/packages/cli/dist/commands/init/adapters.js +0 -1
- package/packages/cli/dist/commands/init/config.d.ts +0 -10
- package/packages/cli/dist/commands/init/config.js +0 -3
- package/packages/cli/dist/commands/init/constants.d.ts +0 -46
- package/packages/cli/dist/commands/init/curated.d.ts +0 -7
- package/packages/cli/dist/commands/init/curated.js +0 -1
- package/packages/cli/dist/commands/init/frontmatter.d.ts +0 -79
- package/packages/cli/dist/commands/init/frontmatter.js +0 -2
- package/packages/cli/dist/commands/init/index.d.ts +0 -36
- package/packages/cli/dist/commands/init/index.js +0 -5
- package/packages/cli/dist/commands/init/manifest.d.ts +0 -72
- package/packages/cli/dist/commands/init/manifest.js +0 -1
- package/packages/cli/dist/commands/init/scaffold.d.ts +0 -58
- package/packages/cli/dist/commands/init/scaffold.js +0 -1
- package/packages/cli/dist/commands/init/templates.d.ts +0 -9
- package/packages/cli/dist/commands/init/user.d.ts +0 -61
- package/packages/cli/dist/commands/init/user.js +0 -5
- package/packages/cli/dist/commands/knowledge.d.ts +0 -6
- package/packages/cli/dist/commands/knowledge.js +0 -1
- package/packages/cli/dist/commands/search.d.ts +0 -6
- package/packages/cli/dist/commands/search.js +0 -1
- package/packages/cli/dist/commands/system.d.ts +0 -6
- package/packages/cli/dist/commands/system.js +0 -4
- package/packages/cli/dist/commands/upgrade.d.ts +0 -6
- package/packages/cli/dist/commands/upgrade.js +0 -1
- package/packages/cli/dist/commands/workspace.d.ts +0 -6
- package/packages/cli/dist/commands/workspace.js +0 -1
- package/packages/cli/dist/context.d.ts +0 -7
- package/packages/cli/dist/context.js +0 -1
- package/packages/cli/dist/helpers.d.ts +0 -55
- package/packages/cli/dist/helpers.js +0 -5
- package/packages/cli/dist/types.d.ts +0 -9
- package/packages/cli/dist/types.js +0 -1
- package/packages/core/dist/constants.d.ts +0 -74
- package/packages/core/dist/constants.js +0 -1
- package/packages/core/dist/content-detector.d.ts +0 -13
- package/packages/core/dist/content-detector.js +0 -1
- package/packages/core/dist/errors.d.ts +0 -20
- package/packages/core/dist/errors.js +0 -1
- package/packages/core/dist/global-registry.d.ts +0 -69
- package/packages/core/dist/global-registry.js +0 -1
- package/packages/core/dist/logger.d.ts +0 -32
- package/packages/core/dist/logger.js +0 -1
- package/packages/core/dist/types.d.ts +0 -149
- package/packages/core/dist/types.js +0 -1
- package/packages/dashboard/dist/assets/index-Cdke3KDK.js.map +0 -1
- package/packages/elicitation/dist/build.d.ts +0 -14
- package/packages/elicitation/dist/build.js +0 -1
- package/packages/elicitation/dist/fields.d.ts +0 -32
- package/packages/elicitation/dist/fields.js +0 -1
- package/packages/elicitation/dist/normalize.d.ts +0 -15
- package/packages/elicitation/dist/normalize.js +0 -1
- package/packages/elicitation/dist/types.d.ts +0 -88
- package/packages/elicitation/dist/types.js +0 -1
- package/packages/embeddings/dist/embedder.interface.d.ts +0 -26
- package/packages/embeddings/dist/embedder.interface.js +0 -1
- package/packages/embeddings/dist/onnx-embedder.d.ts +0 -23
- package/packages/embeddings/dist/onnx-embedder.js +0 -1
- package/packages/enterprise-bridge/dist/cache.d.ts +0 -28
- package/packages/enterprise-bridge/dist/cache.js +0 -1
- package/packages/enterprise-bridge/dist/er-client.d.ts +0 -37
- package/packages/enterprise-bridge/dist/er-client.js +0 -1
- package/packages/enterprise-bridge/dist/evolution-collector.d.ts +0 -62
- package/packages/enterprise-bridge/dist/evolution-collector.js +0 -1
- package/packages/enterprise-bridge/dist/policy-store.d.ts +0 -45
- package/packages/enterprise-bridge/dist/policy-store.js +0 -1
- package/packages/enterprise-bridge/dist/push-adapter.d.ts +0 -23
- package/packages/enterprise-bridge/dist/push-adapter.js +0 -1
- package/packages/enterprise-bridge/dist/result-merger.d.ts +0 -14
- package/packages/enterprise-bridge/dist/result-merger.js +0 -1
- package/packages/enterprise-bridge/dist/types.d.ts +0 -81
- package/packages/enterprise-bridge/dist/types.js +0 -1
- package/packages/flows/dist/adapters/claude-plugin.d.ts +0 -25
- package/packages/flows/dist/adapters/claude-plugin.js +0 -3
- package/packages/flows/dist/adapters/copilot.d.ts +0 -12
- package/packages/flows/dist/adapters/copilot.js +0 -1
- package/packages/flows/dist/adapters/index.d.ts +0 -12
- package/packages/flows/dist/adapters/index.js +0 -1
- package/packages/flows/dist/adapters/native.d.ts +0 -10
- package/packages/flows/dist/adapters/native.js +0 -1
- package/packages/flows/dist/adapters/openspec.d.ts +0 -40
- package/packages/flows/dist/adapters/openspec.js +0 -1
- package/packages/flows/dist/builtins.d.ts +0 -16
- package/packages/flows/dist/builtins.js +0 -1
- package/packages/flows/dist/foundation.d.ts +0 -20
- package/packages/flows/dist/foundation.js +0 -11
- package/packages/flows/dist/git.d.ts +0 -53
- package/packages/flows/dist/git.js +0 -2
- package/packages/flows/dist/loader.d.ts +0 -13
- package/packages/flows/dist/loader.js +0 -2
- package/packages/flows/dist/registry.d.ts +0 -23
- package/packages/flows/dist/registry.js +0 -1
- package/packages/flows/dist/state-machine.d.ts +0 -23
- package/packages/flows/dist/state-machine.js +0 -1
- package/packages/flows/dist/symlinks.d.ts +0 -17
- package/packages/flows/dist/symlinks.js +0 -1
- package/packages/flows/dist/types.d.ts +0 -127
- package/packages/flows/dist/types.js +0 -1
- package/packages/indexer/dist/file-hasher.d.ts +0 -13
- package/packages/indexer/dist/file-hasher.js +0 -1
- package/packages/indexer/dist/filesystem-crawler.d.ts +0 -29
- package/packages/indexer/dist/filesystem-crawler.js +0 -1
- package/packages/indexer/dist/graph-extractor.d.ts +0 -22
- package/packages/indexer/dist/graph-extractor.js +0 -1
- package/packages/indexer/dist/hash-cache.d.ts +0 -24
- package/packages/indexer/dist/hash-cache.js +0 -1
- package/packages/indexer/dist/incremental-indexer.d.ts +0 -73
- package/packages/indexer/dist/incremental-indexer.js +0 -1
- package/packages/indexer/dist/smart-index-scheduler.d.ts +0 -47
- package/packages/indexer/dist/smart-index-scheduler.js +0 -1
- package/packages/server/dist/api.d.ts +0 -3
- package/packages/server/dist/api.js +0 -1
- package/packages/server/dist/auto-gc.d.ts +0 -30
- package/packages/server/dist/auto-gc.js +0 -1
- package/packages/server/dist/background-task.d.ts +0 -47
- package/packages/server/dist/background-task.js +0 -1
- package/packages/server/dist/completions.d.ts +0 -14
- package/packages/server/dist/completions.js +0 -1
- package/packages/server/dist/compression-interceptor.d.ts +0 -12
- package/packages/server/dist/compression-interceptor.js +0 -1
- package/packages/server/dist/config.d.ts +0 -16
- package/packages/server/dist/cross-workspace.d.ts +0 -43
- package/packages/server/dist/cross-workspace.js +0 -1
- package/packages/server/dist/curated-manager.d.ts +0 -92
- package/packages/server/dist/curated-manager.js +0 -5
- package/packages/server/dist/dashboard-static.d.ts +0 -27
- package/packages/server/dist/elicitor.d.ts +0 -18
- package/packages/server/dist/elicitor.js +0 -1
- package/packages/server/dist/idle-timer.d.ts +0 -33
- package/packages/server/dist/idle-timer.js +0 -1
- package/packages/server/dist/mcp-logging.d.ts +0 -11
- package/packages/server/dist/mcp-logging.js +0 -1
- package/packages/server/dist/memory-monitor.d.ts +0 -37
- package/packages/server/dist/memory-monitor.js +0 -1
- package/packages/server/dist/output-schemas.d.ts +0 -244
- package/packages/server/dist/output-schemas.js +0 -1
- package/packages/server/dist/prompts.d.ts +0 -13
- package/packages/server/dist/prompts.js +0 -13
- package/packages/server/dist/replay-interceptor.d.ts +0 -23
- package/packages/server/dist/replay-interceptor.js +0 -1
- package/packages/server/dist/resource-links.d.ts +0 -34
- package/packages/server/dist/resource-links.js +0 -1
- package/packages/server/dist/resources/curated-resources.d.ts +0 -13
- package/packages/server/dist/resources/curated-resources.js +0 -2
- package/packages/server/dist/resources/resource-notifier.d.ts +0 -45
- package/packages/server/dist/resources/resource-notifier.js +0 -1
- package/packages/server/dist/resources/resources.d.ts +0 -8
- package/packages/server/dist/resources/resources.js +0 -2
- package/packages/server/dist/sampling.d.ts +0 -41
- package/packages/server/dist/sampling.js +0 -2
- package/packages/server/dist/server.d.ts +0 -63
- package/packages/server/dist/server.js +0 -3
- package/packages/server/dist/structured-content-guard.d.ts +0 -28
- package/packages/server/dist/structured-content-guard.js +0 -1
- package/packages/server/dist/task-manager.d.ts +0 -40
- package/packages/server/dist/task-manager.js +0 -1
- package/packages/server/dist/tool-metadata.d.ts +0 -38
- package/packages/server/dist/tool-metadata.js +0 -1
- package/packages/server/dist/tool-prefix.d.ts +0 -12
- package/packages/server/dist/tool-prefix.js +0 -1
- package/packages/server/dist/tool-timeout.d.ts +0 -27
- package/packages/server/dist/tool-timeout.js +0 -1
- package/packages/server/dist/tools/analyze.tools.d.ts +0 -14
- package/packages/server/dist/tools/analyze.tools.js +0 -8
- package/packages/server/dist/tools/audit.tool.d.ts +0 -8
- package/packages/server/dist/tools/audit.tool.js +0 -1
- package/packages/server/dist/tools/brainstorm.tool.d.ts +0 -7
- package/packages/server/dist/tools/brainstorm.tool.js +0 -9
- package/packages/server/dist/tools/bridge.tools.d.ts +0 -34
- package/packages/server/dist/tools/bridge.tools.js +0 -15
- package/packages/server/dist/tools/config.tool.d.ts +0 -8
- package/packages/server/dist/tools/config.tool.js +0 -12
- package/packages/server/dist/tools/context.tools.d.ts +0 -15
- package/packages/server/dist/tools/context.tools.js +0 -10
- package/packages/server/dist/tools/evolution.tools.d.ts +0 -7
- package/packages/server/dist/tools/evolution.tools.js +0 -5
- package/packages/server/dist/tools/execution.tools.d.ts +0 -14
- package/packages/server/dist/tools/execution.tools.js +0 -4
- package/packages/server/dist/tools/flow.tools.d.ts +0 -7
- package/packages/server/dist/tools/flow.tools.js +0 -16
- package/packages/server/dist/tools/forge.tools.d.ts +0 -13
- package/packages/server/dist/tools/forge.tools.js +0 -10
- package/packages/server/dist/tools/forget.tool.d.ts +0 -8
- package/packages/server/dist/tools/forget.tool.js +0 -1
- package/packages/server/dist/tools/graph.tool.d.ts +0 -7
- package/packages/server/dist/tools/graph.tool.js +0 -29
- package/packages/server/dist/tools/infra.tools.d.ts +0 -10
- package/packages/server/dist/tools/infra.tools.js +0 -5
- package/packages/server/dist/tools/list.tool.d.ts +0 -7
- package/packages/server/dist/tools/list.tool.js +0 -2
- package/packages/server/dist/tools/lookup.tool.d.ts +0 -7
- package/packages/server/dist/tools/lookup.tool.js +0 -3
- package/packages/server/dist/tools/manipulation.tools.d.ts +0 -10
- package/packages/server/dist/tools/manipulation.tools.js +0 -4
- package/packages/server/dist/tools/onboard.tool.d.ts +0 -12
- package/packages/server/dist/tools/onboard.tool.js +0 -2
- package/packages/server/dist/tools/persistence.tools.d.ts +0 -10
- package/packages/server/dist/tools/persistence.tools.js +0 -5
- package/packages/server/dist/tools/policy.tools.d.ts +0 -7
- package/packages/server/dist/tools/policy.tools.js +0 -3
- package/packages/server/dist/tools/present/browser.d.ts +0 -4
- package/packages/server/dist/tools/present/browser.js +0 -93
- package/packages/server/dist/tools/present/helpers.d.ts +0 -19
- package/packages/server/dist/tools/present/helpers.js +0 -16
- package/packages/server/dist/tools/present/html.d.ts +0 -18
- package/packages/server/dist/tools/present/html.js +0 -5
- package/packages/server/dist/tools/present/index.d.ts +0 -2
- package/packages/server/dist/tools/present/index.js +0 -1
- package/packages/server/dist/tools/present/markdown.d.ts +0 -32
- package/packages/server/dist/tools/present/markdown.js +0 -11
- package/packages/server/dist/tools/present/templates.d.ts +0 -14
- package/packages/server/dist/tools/present/templates.js +0 -472
- package/packages/server/dist/tools/present/tool.d.ts +0 -27
- package/packages/server/dist/tools/present/tool.js +0 -39
- package/packages/server/dist/tools/present-blocks.d.ts +0 -46
- package/packages/server/dist/tools/present-blocks.js +0 -27
- package/packages/server/dist/tools/present-charts.d.ts +0 -31
- package/packages/server/dist/tools/present-charts.js +0 -34
- package/packages/server/dist/tools/present-theme.d.ts +0 -14
- package/packages/server/dist/tools/present-theme.js +0 -396
- package/packages/server/dist/tools/present-utils.d.ts +0 -11
- package/packages/server/dist/tools/present-utils.js +0 -1
- package/packages/server/dist/tools/present.tool.d.ts +0 -2
- package/packages/server/dist/tools/present.tool.js +0 -1
- package/packages/server/dist/tools/produce.tool.d.ts +0 -7
- package/packages/server/dist/tools/produce.tool.js +0 -4
- package/packages/server/dist/tools/read.tool.d.ts +0 -7
- package/packages/server/dist/tools/read.tool.js +0 -2
- package/packages/server/dist/tools/reindex.tool.d.ts +0 -11
- package/packages/server/dist/tools/reindex.tool.js +0 -9
- package/packages/server/dist/tools/remember.tool.d.ts +0 -9
- package/packages/server/dist/tools/remember.tool.js +0 -4
- package/packages/server/dist/tools/replay.tool.d.ts +0 -6
- package/packages/server/dist/tools/replay.tool.js +0 -3
- package/packages/server/dist/tools/restore.tool.d.ts +0 -6
- package/packages/server/dist/tools/restore.tool.js +0 -3
- package/packages/server/dist/tools/search.tool.d.ts +0 -11
- package/packages/server/dist/tools/search.tool.js +0 -10
- package/packages/server/dist/tools/status.tool.d.ts +0 -28
- package/packages/server/dist/tools/status.tool.js +0 -3
- package/packages/server/dist/tools/update.tool.d.ts +0 -8
- package/packages/server/dist/tools/update.tool.js +0 -1
- package/packages/server/dist/tools/utility.tools.d.ts +0 -15
- package/packages/server/dist/tools/utility.tools.js +0 -13
- package/packages/server/dist/version-check.d.ts +0 -32
- package/packages/store/dist/graph-store.interface.d.ts +0 -159
- package/packages/store/dist/graph-store.interface.js +0 -1
- package/packages/store/dist/lance-store.d.ts +0 -46
- package/packages/store/dist/lance-store.js +0 -1
- package/packages/store/dist/sqlite-graph-store.d.ts +0 -57
- package/packages/store/dist/sqlite-graph-store.js +0 -90
- package/packages/store/dist/store-factory.d.ts +0 -12
- package/packages/store/dist/store-factory.js +0 -1
- package/packages/store/dist/store.interface.d.ts +0 -54
- package/packages/store/dist/store.interface.js +0 -1
- package/packages/tools/dist/audit.d.ts +0 -65
- package/packages/tools/dist/audit.js +0 -6
- package/packages/tools/dist/batch.d.ts +0 -23
- package/packages/tools/dist/batch.js +0 -1
- package/packages/tools/dist/changelog.d.ts +0 -36
- package/packages/tools/dist/changelog.js +0 -2
- package/packages/tools/dist/check.d.ts +0 -48
- package/packages/tools/dist/check.js +0 -2
- package/packages/tools/dist/checkpoint.d.ts +0 -19
- package/packages/tools/dist/checkpoint.js +0 -1
- package/packages/tools/dist/codemod.d.ts +0 -39
- package/packages/tools/dist/codemod.js +0 -2
- package/packages/tools/dist/compact.d.ts +0 -47
- package/packages/tools/dist/compact.js +0 -3
- package/packages/tools/dist/compress-output.d.ts +0 -38
- package/packages/tools/dist/compress-output.js +0 -1
- package/packages/tools/dist/compression/delta-cache.d.ts +0 -29
- package/packages/tools/dist/compression/delta-cache.js +0 -1
- package/packages/tools/dist/compression/engine.d.ts +0 -34
- package/packages/tools/dist/compression/engine.js +0 -4
- package/packages/tools/dist/compression/litm.d.ts +0 -20
- package/packages/tools/dist/compression/litm.js +0 -1
- package/packages/tools/dist/compression/mmr.d.ts +0 -24
- package/packages/tools/dist/compression/mmr.js +0 -1
- package/packages/tools/dist/compression/rules/docker.d.ts +0 -11
- package/packages/tools/dist/compression/rules/docker.js +0 -3
- package/packages/tools/dist/compression/rules/generic.d.ts +0 -11
- package/packages/tools/dist/compression/rules/generic.js +0 -3
- package/packages/tools/dist/compression/rules/git.d.ts +0 -11
- package/packages/tools/dist/compression/rules/git.js +0 -3
- package/packages/tools/dist/compression/rules/index.d.ts +0 -14
- package/packages/tools/dist/compression/rules/index.js +0 -1
- package/packages/tools/dist/compression/rules/kubectl.d.ts +0 -11
- package/packages/tools/dist/compression/rules/kubectl.js +0 -3
- package/packages/tools/dist/compression/rules/lint.d.ts +0 -11
- package/packages/tools/dist/compression/rules/lint.js +0 -3
- package/packages/tools/dist/compression/rules/npm.d.ts +0 -11
- package/packages/tools/dist/compression/rules/npm.js +0 -3
- package/packages/tools/dist/compression/rules/test-runner.d.ts +0 -11
- package/packages/tools/dist/compression/rules/test-runner.js +0 -3
- package/packages/tools/dist/compression/scoring.d.ts +0 -26
- package/packages/tools/dist/compression/scoring.js +0 -1
- package/packages/tools/dist/compression/types.d.ts +0 -61
- package/packages/tools/dist/compression/types.js +0 -1
- package/packages/tools/dist/config-extractor.d.ts +0 -9
- package/packages/tools/dist/config-extractor.js +0 -7
- package/packages/tools/dist/data-transform.d.ts +0 -12
- package/packages/tools/dist/data-transform.js +0 -1
- package/packages/tools/dist/dead-symbols.d.ts +0 -28
- package/packages/tools/dist/dead-symbols.js +0 -2
- package/packages/tools/dist/delegate.d.ts +0 -36
- package/packages/tools/dist/delegate.js +0 -1
- package/packages/tools/dist/diagram-builder.d.ts +0 -9
- package/packages/tools/dist/diagram-builder.js +0 -9
- package/packages/tools/dist/diff-parse.d.ts +0 -28
- package/packages/tools/dist/diff-parse.js +0 -3
- package/packages/tools/dist/digest.d.ts +0 -55
- package/packages/tools/dist/digest.js +0 -6
- package/packages/tools/dist/dogfood-log.d.ts +0 -49
- package/packages/tools/dist/dogfood-log.js +0 -2
- package/packages/tools/dist/encode.d.ts +0 -16
- package/packages/tools/dist/encode.js +0 -1
- package/packages/tools/dist/env-info.d.ts +0 -30
- package/packages/tools/dist/env-info.js +0 -1
- package/packages/tools/dist/eval.d.ts +0 -15
- package/packages/tools/dist/eval.js +0 -2
- package/packages/tools/dist/evidence-map.d.ts +0 -92
- package/packages/tools/dist/evidence-map.js +0 -2
- package/packages/tools/dist/file-cache.d.ts +0 -41
- package/packages/tools/dist/file-cache.js +0 -3
- package/packages/tools/dist/file-summary.d.ts +0 -52
- package/packages/tools/dist/file-summary.js +0 -2
- package/packages/tools/dist/file-walk.d.ts +0 -6
- package/packages/tools/dist/file-walk.js +0 -1
- package/packages/tools/dist/find-examples.d.ts +0 -29
- package/packages/tools/dist/find-examples.js +0 -3
- package/packages/tools/dist/find.d.ts +0 -49
- package/packages/tools/dist/find.js +0 -1
- package/packages/tools/dist/forge-classify.d.ts +0 -44
- package/packages/tools/dist/forge-classify.js +0 -2
- package/packages/tools/dist/forge-ground.d.ts +0 -61
- package/packages/tools/dist/forge-ground.js +0 -1
- package/packages/tools/dist/git-context.d.ts +0 -25
- package/packages/tools/dist/git-context.js +0 -3
- package/packages/tools/dist/graph-query.d.ts +0 -98
- package/packages/tools/dist/graph-query.js +0 -1
- package/packages/tools/dist/guide.d.ts +0 -25
- package/packages/tools/dist/guide.js +0 -1
- package/packages/tools/dist/health.d.ts +0 -16
- package/packages/tools/dist/health.js +0 -2
- package/packages/tools/dist/http-request.d.ts +0 -25
- package/packages/tools/dist/http-request.js +0 -1
- package/packages/tools/dist/lane.d.ts +0 -41
- package/packages/tools/dist/lane.js +0 -6
- package/packages/tools/dist/measure.d.ts +0 -42
- package/packages/tools/dist/measure.js +0 -2
- package/packages/tools/dist/onboard-utils.d.ts +0 -12
- package/packages/tools/dist/onboard-utils.js +0 -1
- package/packages/tools/dist/onboard.d.ts +0 -50
- package/packages/tools/dist/onboard.js +0 -18
- package/packages/tools/dist/parse-output.d.ts +0 -84
- package/packages/tools/dist/parse-output.js +0 -2
- package/packages/tools/dist/path-resolver.d.ts +0 -14
- package/packages/tools/dist/path-resolver.js +0 -1
- package/packages/tools/dist/process-manager.d.ts +0 -20
- package/packages/tools/dist/process-manager.js +0 -1
- package/packages/tools/dist/queue.d.ts +0 -40
- package/packages/tools/dist/queue.js +0 -1
- package/packages/tools/dist/regex-test.d.ts +0 -33
- package/packages/tools/dist/regex-test.js +0 -1
- package/packages/tools/dist/regex-utils.d.ts +0 -8
- package/packages/tools/dist/regex-utils.js +0 -1
- package/packages/tools/dist/rename.d.ts +0 -31
- package/packages/tools/dist/rename.js +0 -2
- package/packages/tools/dist/replay.d.ts +0 -59
- package/packages/tools/dist/replay.js +0 -4
- package/packages/tools/dist/response-envelope.d.ts +0 -43
- package/packages/tools/dist/response-envelope.js +0 -1
- package/packages/tools/dist/restore-points.d.ts +0 -22
- package/packages/tools/dist/restore-points.js +0 -1
- package/packages/tools/dist/schema-validate.d.ts +0 -25
- package/packages/tools/dist/schema-validate.js +0 -1
- package/packages/tools/dist/scope-map.d.ts +0 -51
- package/packages/tools/dist/scope-map.js +0 -1
- package/packages/tools/dist/snippet.d.ts +0 -35
- package/packages/tools/dist/snippet.js +0 -1
- package/packages/tools/dist/stash.d.ts +0 -14
- package/packages/tools/dist/stash.js +0 -1
- package/packages/tools/dist/stratum-card.d.ts +0 -30
- package/packages/tools/dist/stratum-card.js +0 -4
- package/packages/tools/dist/symbol.d.ts +0 -45
- package/packages/tools/dist/symbol.js +0 -3
- package/packages/tools/dist/synthesis-engine.d.ts +0 -13
- package/packages/tools/dist/synthesis-engine.js +0 -6
- package/packages/tools/dist/test-run.d.ts +0 -28
- package/packages/tools/dist/test-run.js +0 -2
- package/packages/tools/dist/text-utils.d.ts +0 -24
- package/packages/tools/dist/text-utils.js +0 -2
- package/packages/tools/dist/time-utils.d.ts +0 -20
- package/packages/tools/dist/time-utils.js +0 -1
- package/packages/tools/dist/trace.d.ts +0 -43
- package/packages/tools/dist/trace.js +0 -2
- package/packages/tools/dist/truncation.d.ts +0 -66
- package/packages/tools/dist/truncation.js +0 -11
- package/packages/tools/dist/watch.d.ts +0 -32
- package/packages/tools/dist/watch.js +0 -1
- package/packages/tools/dist/web-fetch.d.ts +0 -47
- package/packages/tools/dist/web-fetch.js +0 -8
- package/packages/tools/dist/web-search.d.ts +0 -25
- package/packages/tools/dist/web-search.js +0 -1
- package/packages/tools/dist/workset.d.ts +0 -47
- package/packages/tools/dist/workset.js +0 -1
- package/scaffold/__tests__/copilot-inline-shared-protocols.test.mjs +0 -39
- /package/packages/server/dist/{config.js → config-C5IU9Lau.js} +0 -0
- /package/packages/server/dist/{dashboard-static.js → dashboard-static-BfIe0Si1.js} +0 -0
- /package/packages/server/dist/{version-check.js → version-check-D4j0Pykd.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: aikit
|
|
3
|
-
description: "Use the @vpxa/aikit AI Kit MCP server for codebase search, analysis, and persistent memory. Load this skill when using aikit_search, aikit_remember, aikit_analyze_*, or any aikit_* tool. Covers all
|
|
3
|
+
description: "Use the @vpxa/aikit AI Kit MCP server for codebase search, analysis, and persistent memory. Load this skill when using aikit_search, aikit_remember, aikit_analyze_*, or any aikit_* tool. Covers all 82 MCP tools: search (hybrid/semantic/keyword), code analysis (structure, dependencies, symbols, patterns, entry points, diagrams, blast radius), knowledge graph (auto-populated module/symbol/import graph with traversal), context management (worksets, stash, checkpoints, restore, lanes), code manipulation (rename, codemod, eval), knowledge management (remember/read/update/forget), web access (fetch, search, http), FORGE protocol (ground, classify, evidence map, stratum cards, digest), brainstorming (interactive ideation sessions), presentation (rich dashboards via present tool), onboarding (full codebase analysis in one call), and developer utilities (regex, encode, measure, changelog, schema-validate, snippet, env, time)."
|
|
4
4
|
metadata:
|
|
5
5
|
category: cross-cutting
|
|
6
6
|
domain: general
|
|
@@ -12,7 +12,7 @@ metadata:
|
|
|
12
12
|
|
|
13
13
|
# @vpxa/aikit — AI Kit
|
|
14
14
|
|
|
15
|
-
Local-first AI developer toolkit —
|
|
15
|
+
Local-first AI developer toolkit — 82 MCP tools for search, analysis, context compression, FORGE quality gates, knowledge management, code manipulation, execution, web access, brainstorming, presentation, and developer utilities.
|
|
16
16
|
|
|
17
17
|
## When to Use
|
|
18
18
|
|
|
@@ -37,7 +37,7 @@ Local-first AI developer toolkit — 67 MCP tools for search, analysis, context
|
|
|
37
37
|
core → store → embeddings → chunker → indexer → analyzers → tools → server → cli → tui
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
- **MCP server**:
|
|
40
|
+
- **MCP server**: 82 tools + 2 resources (via `@modelcontextprotocol/sdk`)
|
|
41
41
|
- **CLI**: 45 commands (thin dispatcher + 10 command groups)
|
|
42
42
|
- **Search**: Hybrid vector + keyword + RRF fusion
|
|
43
43
|
- **Embeddings**: ONNX local (mxbai-embed-large-v1, 1024 dimensions)
|
|
@@ -68,10 +68,11 @@ remember (capture insights)
|
|
|
68
68
|
|
|
69
69
|
### End of Session
|
|
70
70
|
```
|
|
71
|
+
session_digest({ persist: true }) # Auto-capture session activity
|
|
71
72
|
remember({ title: "Session checkpoint: <topic>", content: "<what was done, decisions made, next steps>", category: "conventions" })
|
|
72
73
|
```
|
|
73
74
|
|
|
74
|
-
## Tool Catalog (
|
|
75
|
+
## Tool Catalog (82 tools)
|
|
75
76
|
|
|
76
77
|
### Search & Discovery (8)
|
|
77
78
|
| Tool | CLI | Purpose |
|
|
@@ -176,9 +177,10 @@ Lane actions: `create` (copy files to lane), `list`, `status` (modified/added/de
|
|
|
176
177
|
| `stratum_card` | — | Generate T1/T2 compressed context cards from files (10-100x token reduction) |
|
|
177
178
|
| `digest` | — | Compress N text sources into token-budgeted summary |
|
|
178
179
|
|
|
179
|
-
### System (
|
|
180
|
+
### System (9)
|
|
180
181
|
| Tool | CLI | Purpose |
|
|
181
182
|
|------|-----|---------|
|
|
183
|
+
| `config` | `aikit config` | View or update project configuration (kb.config.json) |
|
|
182
184
|
| `status` | `aikit status` | Index statistics |
|
|
183
185
|
| `reindex` | `aikit reindex` | Rebuild index |
|
|
184
186
|
| `health` | `aikit health` | Project health checks (package.json, tsconfig, lockfile, circular deps) |
|
|
@@ -188,7 +190,7 @@ Lane actions: `create` (copy files to lane), `list`, `status` (modified/added/de
|
|
|
188
190
|
| `queue` | `aikit queue` | Task queue for sequential agent operations (create/push/next/done/fail) |
|
|
189
191
|
| `replay` | `aikit replay` | View or clear the audit trail of tool invocations (action: list/clear) |
|
|
190
192
|
|
|
191
|
-
### Flows (
|
|
193
|
+
### Flows (10)
|
|
192
194
|
| Tool | CLI | Purpose |
|
|
193
195
|
|------|-----|---------|
|
|
194
196
|
| `flow_list` | `aikit flow list` | List available flows |
|
|
@@ -198,6 +200,9 @@ Lane actions: `create` (copy files to lane), `list`, `status` (modified/added/de
|
|
|
198
200
|
| `flow_status` | `aikit flow status` | Check if a flow is active and view the current step |
|
|
199
201
|
| `flow_read_instruction` | `aikit flow read-instruction` | Read the current step's instruction file content directly |
|
|
200
202
|
| `flow_reset` | `aikit flow reset` | Clear flow state to start over |
|
|
203
|
+
| `flow_add` | `aikit flow add` | Add a custom flow from a directory |
|
|
204
|
+
| `flow_update` | `aikit flow update` | Update an existing custom flow |
|
|
205
|
+
| `flow_remove` | `aikit flow remove` | Remove a custom flow |
|
|
201
206
|
|
|
202
207
|
### Presentation (1)
|
|
203
208
|
| Tool | CLI | Purpose |
|
|
@@ -209,6 +214,18 @@ Lane actions: `create` (copy files to lane), `list`, `status` (modified/added/de
|
|
|
209
214
|
|------|-----|---------|
|
|
210
215
|
| `brainstorm` | — | Interactive brainstorming and ideation sessions with structured output |
|
|
211
216
|
|
|
217
|
+
### Meta-Tools — Tool Discovery (3)
|
|
218
|
+
| Tool | CLI | Purpose |
|
|
219
|
+
|------|-----|---------|
|
|
220
|
+
| `list_tools` | — | List all active AI Kit tools with names, titles, and categories. Accepts optional `category` filter. Use for initial tool discovery. |
|
|
221
|
+
| `describe_tool` | — | Get detailed metadata for a specific tool (title, categories, annotations). Use after `list_tools` to understand a tool before calling it. |
|
|
222
|
+
| `search_tools` | — | Search active tools by keyword across names, titles, and categories. Use when you know what you need but not the tool name. |
|
|
223
|
+
|
|
224
|
+
### Session Management (1)
|
|
225
|
+
| Tool | CLI | Purpose |
|
|
226
|
+
|------|-----|---------|
|
|
227
|
+
| `session_digest` | — | Generate a compressed digest of session activity (replay log, stash, checkpoints). Options: `scope` (tools/stash/all), `since`, `last`, `focus`, `mode` (deterministic/sampling), `tokenBudget`, `persist`. Use at session end for handoff or mid-session to review what happened. |
|
|
228
|
+
|
|
212
229
|
## Flow System
|
|
213
230
|
|
|
214
231
|
Flows are multi-step guided workflows that structure complex tasks. Each step has a skill file with detailed instructions, required artifacts, and agent assignments.
|
|
@@ -235,6 +252,14 @@ flow_status() # Check progress
|
|
|
235
252
|
flow_reset() # Clear state, start over
|
|
236
253
|
```
|
|
237
254
|
|
|
255
|
+
Custom flow lifecycle management:
|
|
256
|
+
|
|
257
|
+
```text
|
|
258
|
+
flow_add({ source: ".github/flows/my-flow" })
|
|
259
|
+
flow_update({ name: "my-flow" })
|
|
260
|
+
flow_remove({ name: "my-flow" })
|
|
261
|
+
```
|
|
262
|
+
|
|
238
263
|
### Creating Custom Flows
|
|
239
264
|
|
|
240
265
|
1. Create a directory under `.github/flows/<flow-name>/`
|
|
@@ -541,10 +566,46 @@ aikit reindex # Rebuild index
|
|
|
541
566
|
"indexing": { "chunkSize": 1500, "chunkOverlap": 200, "minChunkSize": 100, "concurrency": 5 },
|
|
542
567
|
"embedding": { "model": "mixedbread-ai/mxbai-embed-large-v1", "dimensions": 1024 },
|
|
543
568
|
"store": { "backend": "lancedb", "path": ".aikit-data" },
|
|
544
|
-
"curated": { "path": "curated" }
|
|
569
|
+
"curated": { "path": "curated", "adapter": "filesystem" }
|
|
570
|
+
}
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
## Tool Profiles
|
|
574
|
+
|
|
575
|
+
Tool profiles control which subset of the 82 tools are active. Profiles reduce token overhead by exposing only relevant tools for a given task.
|
|
576
|
+
|
|
577
|
+
### Built-in Profiles
|
|
578
|
+
|
|
579
|
+
| Profile | Description | Use When |
|
|
580
|
+
|---------|-------------|----------|
|
|
581
|
+
| `full` | All tools enabled (default) | General development, orchestration |
|
|
582
|
+
| `safe` | Read-only tools — no file/state modifications | Code review, analysis, research |
|
|
583
|
+
| `research` | Search, analysis, knowledge, web access | Investigation, documentation |
|
|
584
|
+
| `minimal` | Essential tools only — search, check, test | Simple tasks, low-token budgets |
|
|
585
|
+
| `discovery` | Full toolset + meta-tools for guided exploration | New users, onboarding, tool learning |
|
|
586
|
+
|
|
587
|
+
### Activating a Profile
|
|
588
|
+
|
|
589
|
+
Set `toolProfile` in `kb.config.json`:
|
|
590
|
+
|
|
591
|
+
```json
|
|
592
|
+
{
|
|
593
|
+
"toolProfile": "research"
|
|
545
594
|
}
|
|
546
595
|
```
|
|
547
596
|
|
|
597
|
+
Base tools (`status`, `config`, `guide`, `health`) are **always available** regardless of profile.
|
|
598
|
+
|
|
599
|
+
### Meta-Tool Discovery Pattern (Token Cost Reduction)
|
|
600
|
+
|
|
601
|
+
Instead of loading all 82 tool descriptions at session start, use the `discovery` profile:
|
|
602
|
+
|
|
603
|
+
1. `list_tools()` — get a compact list of tool names + categories (~50 tokens)
|
|
604
|
+
2. `search_tools({ query: "what I need" })` — find relevant tools by keyword
|
|
605
|
+
3. `describe_tool({ tool_name: "specific_tool" })` — get full metadata only for tools you'll use
|
|
606
|
+
|
|
607
|
+
This pattern reduces initial tool-loading cost from ~3000 tokens to ~200 tokens.
|
|
608
|
+
|
|
548
609
|
## IDE Integration
|
|
549
610
|
|
|
550
611
|
### VS Code — HTTP mode (recommended for development)
|
|
@@ -626,6 +687,9 @@ Flows are structured multi-step workflows that guide agents through complex task
|
|
|
626
687
|
| `flow_step` | Advance: `next`, `skip`, or `redo` current step |
|
|
627
688
|
| `flow_read_instruction` | Read the current step's instruction file content directly |
|
|
628
689
|
| `flow_reset` | Clear flow state to start over |
|
|
690
|
+
| `flow_add` | Add a custom flow from a directory |
|
|
691
|
+
| `flow_update` | Update an existing custom flow |
|
|
692
|
+
| `flow_remove` | Remove a custom flow |
|
|
629
693
|
|
|
630
694
|
### Flow Selection
|
|
631
695
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: c4-architecture
|
|
3
|
-
description: Generate architecture documentation using C4 model Mermaid
|
|
3
|
+
description: Generate architecture documentation using C4 model diagrams. Supports two output formats: Mermaid (md) for documentation and HTML/SVG for presentations. Use when asked to create architecture diagrams, document system architecture, visualize software structure, create C4 diagrams, or generate context/container/component/deployment diagrams.
|
|
4
4
|
metadata:
|
|
5
5
|
category: cross-cutting
|
|
6
6
|
domain: general
|
|
@@ -22,6 +22,56 @@ Generate software architecture documentation using C4 model diagrams in Mermaid
|
|
|
22
22
|
> **Tip:** Use `present({ format: "html" })` to render diagrams as interactive visual output, rather than raw Mermaid code blocks. This provides a better viewing experience for stakeholders.
|
|
23
23
|
4. **Document** - Write diagrams to markdown files with explanatory context
|
|
24
24
|
|
|
25
|
+
## Format Selection
|
|
26
|
+
|
|
27
|
+
This skill supports two output formats. Choose based on the audience and delivery method:
|
|
28
|
+
|
|
29
|
+
> **Default rule:** When using the `present` tool to display architecture, **always use HTML/SVG format** (Method 2). It produces professional dark-themed diagrams with SVG icons, category colors, and summary cards. Use Mermaid only for saving to markdown docs or when the user explicitly requests it.
|
|
30
|
+
|
|
31
|
+
| Format | Output | Best For | Delivery |
|
|
32
|
+
|--------|--------|----------|----------|
|
|
33
|
+
| **Mermaid (md)** | `.md` files with Mermaid code blocks | Developer docs, GitHub rendering, version control | Save to `docs/architecture/*.md` |
|
|
34
|
+
| **HTML/SVG (html)** | Self-contained `.html` files | Stakeholder presentations, visual reviews, browser viewing | Save as `.html` or render via `present` tool |
|
|
35
|
+
|
|
36
|
+
### Format Decision Tree
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
What is the goal?
|
|
40
|
+
├── Save to docs / version control → Mermaid (md)
|
|
41
|
+
├── Present via `present` tool → HTML/SVG (html) ← DEFAULT for present
|
|
42
|
+
├── User says "Mermaid" or "markdown" → Mermaid (md)
|
|
43
|
+
└── User says "show", "visualize", "present" → HTML/SVG (html)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Present Tool Integration
|
|
47
|
+
|
|
48
|
+
Both formats work with the `present` tool:
|
|
49
|
+
|
|
50
|
+
**Mermaid format** - Use a `mermaid` content block:
|
|
51
|
+
```js
|
|
52
|
+
present({
|
|
53
|
+
format: "html", // or "browser"
|
|
54
|
+
title: "System Architecture",
|
|
55
|
+
content: [
|
|
56
|
+
{ type: "mermaid", title: "C4 Container Diagram", value: "C4Container\n title Container Diagram\n ..." }
|
|
57
|
+
]
|
|
58
|
+
})
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**HTML/SVG format** - Use a `markdown` block with the full HTML structure. Pair with `metrics` and `cards` blocks for a complete dashboard. See [references/html-design-system.md](references/html-design-system.md#present-tool-integration) for the full composition pattern.
|
|
62
|
+
|
|
63
|
+
```js
|
|
64
|
+
present({
|
|
65
|
+
format: "html", // or "browser" - both work
|
|
66
|
+
title: "System Architecture",
|
|
67
|
+
content: [
|
|
68
|
+
{ type: "metrics", title: "Overview", value: [{ label: "Services", value: "6" }, ...] },
|
|
69
|
+
{ type: "markdown", title: "Architecture Diagram", value: "<div class='arch-diagram'>...(inline SVG + CSS)...</div>" },
|
|
70
|
+
{ type: "cards", title: "Summary", value: [{ title: "Frontend", body: "React SPA" }, ...] }
|
|
71
|
+
]
|
|
72
|
+
})
|
|
73
|
+
```
|
|
74
|
+
|
|
25
75
|
## C4 Diagram Levels
|
|
26
76
|
|
|
27
77
|
Select the appropriate level based on the documentation need:
|
|
@@ -129,6 +179,40 @@ C4Deployment
|
|
|
129
179
|
Rel(api, db, "Reads/writes", "JDBC")
|
|
130
180
|
```
|
|
131
181
|
|
|
182
|
+
## HTML/SVG Format
|
|
183
|
+
|
|
184
|
+
For HTML/SVG output, use the design system and template from the references.
|
|
185
|
+
|
|
186
|
+
The component type registry, color palette, typography, and layout rules are defined in [references/html-design-system.md](references/html-design-system.md). This is the single source of truth - update colors, types, and icons there.
|
|
187
|
+
|
|
188
|
+
Copy and customize [references/html-template.html](references/html-template.html) for each diagram. The template is self-contained and opens directly in any browser.
|
|
189
|
+
|
|
190
|
+
### Component Categories
|
|
191
|
+
|
|
192
|
+
See the design system for the full sub-type registry and icon slots.
|
|
193
|
+
|
|
194
|
+
- Frontend - stroke `#22d3ee`
|
|
195
|
+
- Backend - stroke `#34d399`
|
|
196
|
+
- Data - stroke `#a78bfa`
|
|
197
|
+
- Infrastructure - stroke `#fbbf24`
|
|
198
|
+
- Messaging - stroke `#fb923c`
|
|
199
|
+
- Security - stroke `#fb7185`
|
|
200
|
+
- External - stroke `#94a3b8`
|
|
201
|
+
- Monitoring - stroke `#38bdf8`
|
|
202
|
+
|
|
203
|
+
### Minimal Component Box Example
|
|
204
|
+
|
|
205
|
+
Use the design system's inline SVG component pattern inside the HTML template's main `<svg>`:
|
|
206
|
+
|
|
207
|
+
```svg
|
|
208
|
+
<g class="node backend">
|
|
209
|
+
<rect x="280" y="210" width="190" height="60" rx="6" />
|
|
210
|
+
<text class="c4-tag" x="294" y="226"><<Container>></text>
|
|
211
|
+
<text class="node-title" x="294" y="243">API Service</text>
|
|
212
|
+
<text class="node-subtitle" x="294" y="257">Backend / HTTPS JSON</text>
|
|
213
|
+
</g>
|
|
214
|
+
```
|
|
215
|
+
|
|
132
216
|
## Element Syntax
|
|
133
217
|
|
|
134
218
|
### People and Systems
|
|
@@ -301,3 +385,5 @@ Write architecture documentation to `docs/architecture/` with naming convention:
|
|
|
301
385
|
- [references/c4-syntax.md](references/c4-syntax.md) - Complete Mermaid C4 syntax
|
|
302
386
|
- [references/common-mistakes.md](references/common-mistakes.md) - Anti-patterns to avoid
|
|
303
387
|
- [references/advanced-patterns.md](references/advanced-patterns.md) - Microservices, event-driven, deployment
|
|
388
|
+
- [references/html-design-system.md](references/html-design-system.md) - Centralized HTML/SVG design system (types, colors, icons, present integration)
|
|
389
|
+
- [references/html-template.html](references/html-template.html) - Self-contained HTML template for C4 diagrams
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
# HTML/SVG Architecture Diagram Design System
|
|
2
|
+
|
|
3
|
+
This file is the centralized design system for HTML and SVG architecture diagrams.
|
|
4
|
+
|
|
5
|
+
It is the single source of truth for visual tokens, component categories, layout rules, and `present` tool composition guidance used by the `c4-architecture` skill and the `present` skill. Update component types, colors, layout rules, and icon slots here only.
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
- Define a reusable visual language for C4-style architecture diagrams rendered as HTML and inline SVG.
|
|
10
|
+
- Keep category styling extensible through a registry instead of hardcoded component types.
|
|
11
|
+
- Standardize diagram composition for both skill-authored documentation and `present` output.
|
|
12
|
+
|
|
13
|
+
## Core Design Tokens
|
|
14
|
+
|
|
15
|
+
### Typography
|
|
16
|
+
|
|
17
|
+
- Font family: `"JetBrains Mono", monospace`
|
|
18
|
+
- Font source: Google Fonts (`https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700;800&display=swap`)
|
|
19
|
+
- Component names: `12px`
|
|
20
|
+
- Sublabels: `9px`
|
|
21
|
+
- Annotations: `8px`
|
|
22
|
+
- Tiny labels: `7px`
|
|
23
|
+
- Legend: `10px`
|
|
24
|
+
- Icon area labels: `11px`
|
|
25
|
+
|
|
26
|
+
### Background
|
|
27
|
+
|
|
28
|
+
- Page background: `#020617` (`slate-950`)
|
|
29
|
+
- Background pattern: inline SVG grid pattern over the page background
|
|
30
|
+
- Recommended grid line colors:
|
|
31
|
+
- Major grid: `rgba(148, 163, 184, 0.08)`
|
|
32
|
+
- Minor grid: `rgba(148, 163, 184, 0.04)`
|
|
33
|
+
|
|
34
|
+
### Component Box Defaults
|
|
35
|
+
|
|
36
|
+
- Shape: rounded rectangle
|
|
37
|
+
- Border radius: `rx="6"`
|
|
38
|
+
- Stroke width: `1.5px`
|
|
39
|
+
- Fill: category-specific semi-transparent RGBA fill
|
|
40
|
+
- Stroke: category-specific hex stroke
|
|
41
|
+
- Label stack:
|
|
42
|
+
- Line 1: C4 label such as `<<Container>>`
|
|
43
|
+
- Line 2: component name
|
|
44
|
+
- Line 3: subtype or technology summary
|
|
45
|
+
|
|
46
|
+
## Category Registry
|
|
47
|
+
|
|
48
|
+
The registry is hierarchical: categories define shared tokens and C4 intent, while sub-types inherit the category styling and reserve an icon slot for future SVG glyphs.
|
|
49
|
+
|
|
50
|
+
| Category | Stroke Color | Fill Color | C4 Mapping | Sub-types |
|
|
51
|
+
|---|---|---|---|---|
|
|
52
|
+
| Frontend | `#22d3ee` | `rgba(8, 51, 68, 0.4)` | Container (SPA, web) | SPA, Mobile App, Static Site, Micro-frontend, PWA, Desktop App |
|
|
53
|
+
| Backend | `#34d399` | `rgba(6, 78, 59, 0.4)` | Container (service) | API Service, Worker/Job, BFF, Microservice, Serverless Function, gRPC Service |
|
|
54
|
+
| Data | `#a78bfa` | `rgba(76, 29, 149, 0.4)` | ContainerDb | Relational DB, Document DB, Key-Value Store, Cache, Search Engine, Data Warehouse, Graph DB, Time-Series DB |
|
|
55
|
+
| Infrastructure | `#fbbf24` | `rgba(120, 53, 15, 0.3)` | Deployment_Node | CDN, Load Balancer, DNS, Object Storage, Container Registry, Reverse Proxy, Service Mesh |
|
|
56
|
+
| Messaging | `#fb923c` | `rgba(251, 146, 60, 0.3)` | ContainerQueue | Message Queue, Event Bus, Stream, Pub/Sub, Webhook |
|
|
57
|
+
| Security | `#fb7185` | `rgba(136, 19, 55, 0.4)` | System_Ext / boundary | Auth Provider, API Gateway, WAF, Secret Manager, Certificate Manager, Identity Provider |
|
|
58
|
+
| External | `#94a3b8` | `rgba(30, 41, 59, 0.5)` | System_Ext | Third-party API, SaaS, Legacy System, Partner Service, Payment Provider |
|
|
59
|
+
| Monitoring | `#38bdf8` | `rgba(12, 74, 110, 0.4)` | Container | Logging, Metrics, Tracing, Alerting, APM |
|
|
60
|
+
|
|
61
|
+
## Sub-type Registry
|
|
62
|
+
|
|
63
|
+
Each sub-type inherits its category tokens and keeps a placeholder slot for an inline SVG icon.
|
|
64
|
+
|
|
65
|
+
| Category | Sub-type | C4 Label | Icon Slot |
|
|
66
|
+
|---|---|---|---|
|
|
67
|
+
| Frontend | SPA | `<<Container>>` | `icon-spa` |
|
|
68
|
+
| Frontend | Mobile App | `<<Container>>` | `icon-mobile-app` |
|
|
69
|
+
| Frontend | Static Site | `<<Container>>` | `icon-static-site` |
|
|
70
|
+
| Frontend | Micro-frontend | `<<Container>>` | `icon-micro-frontend` |
|
|
71
|
+
| Frontend | PWA | `<<Container>>` | `icon-pwa` |
|
|
72
|
+
| Frontend | Desktop App | `<<Container>>` | `icon-desktop-app` |
|
|
73
|
+
| Backend | API Service | `<<Container>>` | `icon-api-service` |
|
|
74
|
+
| Backend | Worker/Job | `<<Container>>` | `icon-worker-job` |
|
|
75
|
+
| Backend | BFF | `<<Container>>` | `icon-bff` |
|
|
76
|
+
| Backend | Microservice | `<<Container>>` | `icon-microservice` |
|
|
77
|
+
| Backend | Serverless Function | `<<Container>>` | `icon-serverless-function` |
|
|
78
|
+
| Backend | gRPC Service | `<<Container>>` | `icon-grpc-service` |
|
|
79
|
+
| Data | Relational DB | `<<ContainerDb>>` | `icon-relational-db` |
|
|
80
|
+
| Data | Document DB | `<<ContainerDb>>` | `icon-document-db` |
|
|
81
|
+
| Data | Key-Value Store | `<<ContainerDb>>` | `icon-key-value-store` |
|
|
82
|
+
| Data | Cache | `<<ContainerDb>>` | `icon-cache` |
|
|
83
|
+
| Data | Search Engine | `<<ContainerDb>>` | `icon-search-engine` |
|
|
84
|
+
| Data | Data Warehouse | `<<ContainerDb>>` | `icon-data-warehouse` |
|
|
85
|
+
| Data | Graph DB | `<<ContainerDb>>` | `icon-graph-db` |
|
|
86
|
+
| Data | Time-Series DB | `<<ContainerDb>>` | `icon-time-series-db` |
|
|
87
|
+
| Infrastructure | CDN | `<<Deployment_Node>>` | `icon-cdn` |
|
|
88
|
+
| Infrastructure | Load Balancer | `<<Deployment_Node>>` | `icon-load-balancer` |
|
|
89
|
+
| Infrastructure | DNS | `<<Deployment_Node>>` | `icon-dns` |
|
|
90
|
+
| Infrastructure | Object Storage | `<<Deployment_Node>>` | `icon-object-storage` |
|
|
91
|
+
| Infrastructure | Container Registry | `<<Deployment_Node>>` | `icon-container-registry` |
|
|
92
|
+
| Infrastructure | Reverse Proxy | `<<Deployment_Node>>` | `icon-reverse-proxy` |
|
|
93
|
+
| Infrastructure | Service Mesh | `<<Deployment_Node>>` | `icon-service-mesh` |
|
|
94
|
+
| Messaging | Message Queue | `<<ContainerQueue>>` | `icon-message-queue` |
|
|
95
|
+
| Messaging | Event Bus | `<<ContainerQueue>>` | `icon-event-bus` |
|
|
96
|
+
| Messaging | Stream | `<<ContainerQueue>>` | `icon-stream` |
|
|
97
|
+
| Messaging | Pub/Sub | `<<ContainerQueue>>` | `icon-pub-sub` |
|
|
98
|
+
| Messaging | Webhook | `<<ContainerQueue>>` | `icon-webhook` |
|
|
99
|
+
| Security | Auth Provider | `<<System_Ext>>` | `icon-auth-provider` |
|
|
100
|
+
| Security | API Gateway | `<<System_Ext>>` | `icon-api-gateway` |
|
|
101
|
+
| Security | WAF | `<<System_Ext>>` | `icon-waf` |
|
|
102
|
+
| Security | Secret Manager | `<<System_Ext>>` | `icon-secret-manager` |
|
|
103
|
+
| Security | Certificate Manager | `<<System_Ext>>` | `icon-certificate-manager` |
|
|
104
|
+
| Security | Identity Provider | `<<System_Ext>>` | `icon-identity-provider` |
|
|
105
|
+
| External | Third-party API | `<<System_Ext>>` | `icon-third-party-api` |
|
|
106
|
+
| External | SaaS | `<<System_Ext>>` | `icon-saas` |
|
|
107
|
+
| External | Legacy System | `<<System_Ext>>` | `icon-legacy-system` |
|
|
108
|
+
| External | Partner Service | `<<System_Ext>>` | `icon-partner-service` |
|
|
109
|
+
| External | Payment Provider | `<<System_Ext>>` | `icon-payment-provider` |
|
|
110
|
+
| Monitoring | Logging | `<<Container>>` | `icon-logging` |
|
|
111
|
+
| Monitoring | Metrics | `<<Container>>` | `icon-metrics` |
|
|
112
|
+
| Monitoring | Tracing | `<<Container>>` | `icon-tracing` |
|
|
113
|
+
| Monitoring | Alerting | `<<Container>>` | `icon-alerting` |
|
|
114
|
+
| Monitoring | APM | `<<Container>>` | `icon-apm` |
|
|
115
|
+
|
|
116
|
+
## Icon Registry
|
|
117
|
+
|
|
118
|
+
Icons are inline SVG `<symbol>` elements with a 16x16 viewBox, rendered via `<use>` at `(x+W-22, y+4)` inside the component box. They use `currentColor` to inherit the category stroke color.
|
|
119
|
+
|
|
120
|
+
### Category-Level Icons (active)
|
|
121
|
+
|
|
122
|
+
Each category has a shared icon defined in `html-template.html` `<defs>`. All sub-types within a category use their category icon by default. Sub-type-specific icons can override these in the future.
|
|
123
|
+
|
|
124
|
+
| Category | Symbol ID | Shape | Status |
|
|
125
|
+
|---|---|---|---|
|
|
126
|
+
| Frontend | `icon-frontend` | Monitor with stand | **active** |
|
|
127
|
+
| Backend | `icon-backend` | Server rack (3 units) | **active** |
|
|
128
|
+
| Data | `icon-data` | Database cylinder | **active** |
|
|
129
|
+
| Infrastructure | `icon-infrastructure` | Cloud | **active** |
|
|
130
|
+
| Messaging | `icon-messaging` | Envelope | **active** |
|
|
131
|
+
| Security | `icon-security` | Shield with checkmark | **active** |
|
|
132
|
+
| External | `icon-external` | Globe with meridians | **active** |
|
|
133
|
+
| Monitoring | `icon-monitoring` | Line chart with axes | **active** |
|
|
134
|
+
|
|
135
|
+
Usage pattern:
|
|
136
|
+
```svg
|
|
137
|
+
<use href="#icon-frontend" class="icon-use" x="448" y="154" width="16" height="16"/>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Sub-type Icons (planned)
|
|
141
|
+
|
|
142
|
+
When a sub-type icon is added, it overrides the category icon for that specific component. Until implemented, all sub-types use their category icon.
|
|
143
|
+
|
|
144
|
+
| Sub-type | Icon | Status |
|
|
145
|
+
|---|---|---|
|
|
146
|
+
| SPA | `icon-spa` | planned |
|
|
147
|
+
| Mobile App | `icon-mobile-app` | planned |
|
|
148
|
+
| Static Site | `icon-static-site` | planned |
|
|
149
|
+
| Micro-frontend | `icon-micro-frontend` | planned |
|
|
150
|
+
| PWA | `icon-pwa` | planned |
|
|
151
|
+
| Desktop App | `icon-desktop-app` | planned |
|
|
152
|
+
| API Service | `icon-api-service` | planned |
|
|
153
|
+
| Worker/Job | `icon-worker-job` | planned |
|
|
154
|
+
| BFF | `icon-bff` | planned |
|
|
155
|
+
| Microservice | `icon-microservice` | planned |
|
|
156
|
+
| Serverless Function | `icon-serverless-function` | planned |
|
|
157
|
+
| gRPC Service | `icon-grpc-service` | planned |
|
|
158
|
+
| Relational DB | `icon-relational-db` | planned |
|
|
159
|
+
| Document DB | `icon-document-db` | planned |
|
|
160
|
+
| Key-Value Store | `icon-key-value-store` | planned |
|
|
161
|
+
| Cache | `icon-cache` | planned |
|
|
162
|
+
| Search Engine | `icon-search-engine` | planned |
|
|
163
|
+
| Data Warehouse | `icon-data-warehouse` | planned |
|
|
164
|
+
| Graph DB | `icon-graph-db` | planned |
|
|
165
|
+
| Time-Series DB | `icon-time-series-db` | planned |
|
|
166
|
+
| CDN | `icon-cdn` | planned |
|
|
167
|
+
| Load Balancer | `icon-load-balancer` | planned |
|
|
168
|
+
| DNS | `icon-dns` | planned |
|
|
169
|
+
| Object Storage | `icon-object-storage` | planned |
|
|
170
|
+
| Container Registry | `icon-container-registry` | planned |
|
|
171
|
+
| Reverse Proxy | `icon-reverse-proxy` | planned |
|
|
172
|
+
| Service Mesh | `icon-service-mesh` | planned |
|
|
173
|
+
| Message Queue | `icon-message-queue` | planned |
|
|
174
|
+
| Event Bus | `icon-event-bus` | planned |
|
|
175
|
+
| Stream | `icon-stream` | planned |
|
|
176
|
+
| Pub/Sub | `icon-pub-sub` | planned |
|
|
177
|
+
| Webhook | `icon-webhook` | planned |
|
|
178
|
+
| Auth Provider | `icon-auth-provider` | planned |
|
|
179
|
+
| API Gateway | `icon-api-gateway` | planned |
|
|
180
|
+
| WAF | `icon-waf` | planned |
|
|
181
|
+
| Secret Manager | `icon-secret-manager` | planned |
|
|
182
|
+
| Certificate Manager | `icon-certificate-manager` | planned |
|
|
183
|
+
| Identity Provider | `icon-identity-provider` | planned |
|
|
184
|
+
| Third-party API | `icon-third-party-api` | planned |
|
|
185
|
+
| SaaS | `icon-saas` | planned |
|
|
186
|
+
| Legacy System | `icon-legacy-system` | planned |
|
|
187
|
+
| Partner Service | `icon-partner-service` | planned |
|
|
188
|
+
| Payment Provider | `icon-payment-provider` | planned |
|
|
189
|
+
| Logging | `icon-logging` | planned |
|
|
190
|
+
| Metrics | `icon-metrics` | planned |
|
|
191
|
+
| Tracing | `icon-tracing` | planned |
|
|
192
|
+
| Alerting | `icon-alerting` | planned |
|
|
193
|
+
| APM | `icon-apm` | planned |
|
|
194
|
+
|
|
195
|
+
## Visual Elements
|
|
196
|
+
|
|
197
|
+
### Component Box Pattern
|
|
198
|
+
|
|
199
|
+
Use a rounded component box with semi-transparent fill and category stroke.
|
|
200
|
+
|
|
201
|
+
```svg
|
|
202
|
+
<g class="node backend">
|
|
203
|
+
<rect x="280" y="210" width="190" height="60" rx="6" />
|
|
204
|
+
<text class="c4-tag" x="294" y="226"><<Container>></text>
|
|
205
|
+
<text class="node-title" x="294" y="243">API Service</text>
|
|
206
|
+
<text class="node-subtitle" x="294" y="257">Backend / HTTPS JSON</text>
|
|
207
|
+
</g>
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Arrow Masking Technique
|
|
211
|
+
|
|
212
|
+
Use an opaque background rectangle below the box content to visually hide arrows beneath components without breaking the component fill style.
|
|
213
|
+
|
|
214
|
+
```svg
|
|
215
|
+
<g class="node-mask-layer">
|
|
216
|
+
<rect x="280" y="210" width="190" height="60" rx="6" fill="#020617" />
|
|
217
|
+
<rect x="280" y="210" width="190" height="60" rx="6"
|
|
218
|
+
fill="rgba(6, 78, 59, 0.4)" stroke="#34d399" stroke-width="1.5" />
|
|
219
|
+
</g>
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### Security Group Boundary
|
|
223
|
+
|
|
224
|
+
- Purpose: show auth, gateway, WAF, or identity zones
|
|
225
|
+
- Stroke color: rose (`#fb7185`)
|
|
226
|
+
- Pattern: `stroke-dasharray="4,4"`
|
|
227
|
+
- Suggested label: `Security Boundary`
|
|
228
|
+
|
|
229
|
+
```svg
|
|
230
|
+
<rect x="700" y="140" width="220" height="180" rx="12"
|
|
231
|
+
fill="transparent" stroke="#fb7185" stroke-width="1.5"
|
|
232
|
+
stroke-dasharray="4,4" />
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Region Boundary
|
|
236
|
+
|
|
237
|
+
- Purpose: group a deployment region, platform segment, or domain slice
|
|
238
|
+
- Stroke color: amber (`#fbbf24`)
|
|
239
|
+
- Pattern: `stroke-dasharray="8,4"`
|
|
240
|
+
- Radius: `rx="12"`
|
|
241
|
+
|
|
242
|
+
```svg
|
|
243
|
+
<rect x="70" y="120" width="600" height="430" rx="12"
|
|
244
|
+
fill="transparent" stroke="#fbbf24" stroke-width="1.5"
|
|
245
|
+
stroke-dasharray="8,4" />
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Arrow Marker SVG Definition
|
|
249
|
+
|
|
250
|
+
```svg
|
|
251
|
+
<defs>
|
|
252
|
+
<marker id="arrowhead" markerWidth="8" markerHeight="8" refX="7" refY="4" orient="auto">
|
|
253
|
+
<path d="M0,0 L8,4 L0,8 Z" fill="#cbd5e1" />
|
|
254
|
+
</marker>
|
|
255
|
+
</defs>
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Arrow Z-order Rule
|
|
259
|
+
|
|
260
|
+
Draw arrows early in the SVG so component boxes and masking layers paint over them. This keeps connectors readable in dense diagrams and avoids arrow overlap across component interiors.
|
|
261
|
+
|
|
262
|
+
## Spacing Rules
|
|
263
|
+
|
|
264
|
+
- Standard component height: `60px`
|
|
265
|
+
- Minimum vertical gap between stacked components: `40px`
|
|
266
|
+
- Inline connectors should route through gaps rather than through component interiors
|
|
267
|
+
- Keep labels inside the top `28px` of the box and the subtype line inside the lower third
|
|
268
|
+
- Place legends outside boundaries to prevent classification noise inside the diagram area
|
|
269
|
+
|
|
270
|
+
## Layout Structure
|
|
271
|
+
|
|
272
|
+
The canonical page composition is:
|
|
273
|
+
|
|
274
|
+
1. Header: title, pulse dot, subtitle
|
|
275
|
+
2. Main SVG diagram: embedded inside a rounded border card
|
|
276
|
+
3. Summary cards: grid of 3 cards beneath the diagram
|
|
277
|
+
4. Footer metadata: generator, scope, rendering notes, last-updated stamp
|
|
278
|
+
|
|
279
|
+
## Present Tool Integration
|
|
280
|
+
|
|
281
|
+
Compose architecture diagrams with the `present` tool by embedding the full HTML/SVG diagram in a markdown block and pairing it with metrics or cards blocks as needed.
|
|
282
|
+
|
|
283
|
+
### `format: "html"`
|
|
284
|
+
|
|
285
|
+
Use a `markdown` block with embedded `<div>`, inline SVG, and a `<style>` tag containing the full CSS. The `present` html format renders raw HTML in markdown blocks.
|
|
286
|
+
|
|
287
|
+
### `format: "browser"`
|
|
288
|
+
|
|
289
|
+
Use the same composition: a `markdown` block containing the full HTML structure. Summary content can also be added with `cards` and `metrics` blocks alongside the SVG diagram block.
|
|
290
|
+
|
|
291
|
+
### Example `present` Call Structure
|
|
292
|
+
|
|
293
|
+
```js
|
|
294
|
+
present({
|
|
295
|
+
format: "html", // or "browser"
|
|
296
|
+
title: "System Architecture",
|
|
297
|
+
content: [
|
|
298
|
+
{
|
|
299
|
+
type: "metrics",
|
|
300
|
+
title: "Overview",
|
|
301
|
+
value: [
|
|
302
|
+
{ label: "Services", value: "6" },
|
|
303
|
+
{ label: "Data Stores", value: "2" },
|
|
304
|
+
{ label: "External Systems", value: "3" }
|
|
305
|
+
]
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
type: "markdown",
|
|
309
|
+
title: "Architecture Diagram",
|
|
310
|
+
value: "<div class='arch-diagram'>...(inline SVG)...</div><style>...(design system CSS)...</style>"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
type: "cards",
|
|
314
|
+
title: "Summary",
|
|
315
|
+
value: [
|
|
316
|
+
{ title: "Frontend", body: "React SPA..." },
|
|
317
|
+
{ title: "Backend", body: "API + async workers..." },
|
|
318
|
+
{ title: "Security", body: "Gateway + IdP..." }
|
|
319
|
+
]
|
|
320
|
+
}
|
|
321
|
+
]
|
|
322
|
+
})
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
This design system is the single source of truth. The `c4-architecture` skill and `present` skill both reference this file. Update component types, colors, or layout rules here only.
|
|
326
|
+
|
|
327
|
+
## Adding New Categories
|
|
328
|
+
|
|
329
|
+
1. Add a new row to the Category Registry with the category name, colors, C4 mapping, and initial subtype set.
|
|
330
|
+
2. Add the new sub-types to the Sub-type Registry with a C4 label and icon slot name.
|
|
331
|
+
3. Add icon placeholders to the Icon Registry.
|
|
332
|
+
4. Update [html-template.html](html-template.html) legend content so the new category appears in the rendered template.
|
|
333
|
+
5. Update summary card accent colors in [html-template.html](html-template.html) if the new category needs a dedicated card treatment.
|
|
334
|
+
|
|
335
|
+
## Template Pairing
|
|
336
|
+
|
|
337
|
+
See [html-template.html](html-template.html) for the complete self-contained reference implementation of this design system.
|