Use the Python scripts in this repository as the execution surface.
All generated files (blueprint JSON, viewers, exports) go into projects/workspace/ — not the repository root.
bash
python scripts/business_blueprint/cli.py --plan projects/workspace/solution.blueprint.json --from "..."
python scripts/business_blueprint/cli.py --project projects/workspace/solution.blueprint.json
python scripts/business_blueprint/cli.py --export projects/workspace/solution.blueprint.json
Choose --industry from exactly one of: "common", "finance", "manufacturing", "retail". Select the closest match based on the user's domain and materials; do not invent other values.
IndustryHints contentcommonNo hints — generic domainsfinanceRisk control, credit, compliance, customer profile, etc.manufacturingProduction planning, quality, warehouse, supply chain, etc.retailStore operations, membership, POS, order fulfillment, etc.
The AI agent is responsible for entity extraction. The Python tool handles JSON writing, visualization, and export.
Read the seed template at business_blueprint/templates/{industry}/seed.json and get the industryHints.checklist.
Using the user's source material AND the industry hints checklist, extract:
capabilities: business capability areas (name, description)
actors: roles/people involved (name)
flowSteps: business process steps (name, actorId, capabilityIds, stepType)
systems: IT systems that support capabilities
references/entities-schema.md for all entity field definitionsreferences/systems-schema.md for systems category/layer rulesscripts/business_blueprint/templates/common/seed.json for field examplesDomain-knowledge mode (when seed has meta.blueprintType: "domain-knowledge",
e.g. cross-border-ecommerce): entities go into library.knowledge.*
(painPoints / strategies / rules / metrics / practices / pitfalls), not the
architecture buckets above. The seed's industryHints.knowledgeHints.namingHints
section, when present, dictates content granularity:
strategy.name must be a 4-10 字 product-grade noun phrase
(e.g. "统一归因模型", "AIGC 素材工厂"), not an action ("优化素材") or a
dimension ("测款节奏"). Reference the seed's strategy_named_examples.painPoint.audience and strategy.audience are free-string fields tagging
the primary persona ("品牌方/DTC", "平台卖家", "代运营/服务商"). Multiple
values comma-separated. No standalone persona entity is required.metric.forecast: {direction, magnitude, unit} is optional and used for
commitments to the customer ("ROAS 提升 25%"). Keep value/ benchmarkContext
for current baseline; the two coexist as "now X, can reach Y".These fields are pass-through under v2 minimal-validation: the validator does not enforce them, but renderers and pitch flows consume them.
Write the JSON file directly to the output path. Use this schema:
json
{
"version": "1.0",
"meta": {
"title": "...",
"industry": "retail",
"revisionId": "rev-YYYYMMDD-NN",
"parentRevisionId": null,
"lastModifiedAt": "ISO8601",
"lastModifiedBy": "ai"
},
"context": {
"goals": [],
"scope": [],
"assumptions": [],
"constraints": [],
"sourceRefs": [{"type": "inline-text", "excerpt": "..."}],
"clarifyRequests": [],
"clarifications": []
},
"library": {
"capabilities": [
{"id": "cap-xxx", "name": "...", "level": 1, "description": "...", "ownerActorIds": [], "supportingSystemIds": []}
],
"actors": [
{"id": "actor-xxx", "name": "..."}
],
"flowSteps": [
{"id": "flow-xxx", "name": "...", "actorId": "actor-xxx", "capabilityIds": ["cap-xxx"], "systemIds": [], "stepType": "task", "inputRefs": [], "outputRefs": []}
],
"systems": [
{"id": "sys-xxx", "kind": "system", "name": "...", "aliases": [], "description": "...", "resolution": {"status": "canonical", "canonicalName": "..."}, "capabilityIds": ["cap-xxx"]}
]
},
"relations": [
{"id": "rel-xxx", "type": "supports", "from": "sys-xxx", "to": "cap-xxx", "label": "支撑"}
],
"views": [],
"editor": {"fieldLocks": {}, "theme": "enterprise-default"},
"artifacts": {}
}
bash
python scripts/business_blueprint/cli.py --export <blueprint.json>
This generates SVG + HTML viewer by default. Use --format drawio|excalidraw|mermaid for other formats.
Treat export view choice as a routing decision, not a styling preference.
freeflow.swimlane, matrix, product tree, or other generic views just because they are available.freeflow is the safe default unless the user explicitly asks for a supported standard template.bash
python scripts/business_blueprint/cli.py --project <blueprint.json>
This generates solution.projection.json, the canonical machine projection consumed by downstream report/slide workflows.
text
User provides raw requirements / meeting notes?
→ AI agent reads hints, extracts entities, writes blueprint JSON
→ Optionally run --project for downstream machine handoff
→ Then run --export for visualization
User needs diagram files (SVG, draw.io, etc.)?
→ --export (default: SVG + HTML viewer)
User unsure about blueprint quality?
→ --validate
User wants downstream report / slide generation?
→ --project
CommandDescription--plan <path> --from <text>Generate empty blueprint JSON from source text (AI should prefer writing JSON directly)--project <path>Generate canonical projection JSON for downstream skills--export <path>Export SVG + HTML viewer (default), or use --format for other formats--validate <path>Validate a blueprint and print JSON results
Execution: Run directly as scripts:
bash
python scripts/business_blueprint/cli.py --plan ...
python scripts/business_blueprint/cli.py --export ...
FormatFileUse Casesvg (default)solution.exports/solution.svg + HTML viewerQuick preview, embeddingdrawio``solution.exports/solution.drawioEditable diagramsexcalidraw``solution.exports/solution.excalidrawWhiteboard-style diagramsmermaid``solution.exports/solution.mermaid.mdGitHub-native rendering
This skill produces semantic intermediate artifacts. Downstream skills consume them:
report-creator consumes solution.projection.json → assembles reportsslide-creator consumes solution.projection.json → assembles presentationsrelations → generate PlantUML or other diagram syntaxsolution.blueprint.jsonsolution.handoff.json is viewer-only metadata, not a downstream narrative inputWhen running in an isolated Python sandbox (Jupyter, notebook, cloud REPL) that auto-installs dependencies:
The sandbox uses scripts directly. Run execution scripts from the repository root: python
import subprocess
subprocess.run(["python", "scripts/business_blueprint/cli.py", "--export", "solution.blueprint.json"])
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) — will raise NameErrorsubprocess.run(["business-blueprint", ...]) — sandbox runs Python cells, not shellos.system() — same reasonWhen user requests an architecture diagram (keywords: "架构图", "architecture diagram", "--export", "diagram"):
Read references/architecture-design-system.md for the complete design system.
Read the appropriate template from references/architecture-templates/ based on the user's domain:
serverless.mdmicroservices.mdserverless.md as a structural referenceRead the blueprint JSON to extract entities and flow steps.
Generate a self-contained HTML file with inline SVG following the design system rules.
Write the output file to the same directory as the blueprint JSON.
If the request does not match one of the supported standard templates above, stay on the default freeflow export path. Do not switch to another generic view type as a fallback.
If a standard template would create a squeezed, clipped, or overcrowded diagram, stop using the fixed template geometry and fall back to freeflow or a wrapped multi-row layout.
Use an explicit route contract before rendering:
RouteStructural prerequisitesFirst fallbackTerminal behaviorfreeflowAny valid blueprint with at least one renderable node or relationNoneIf integrity still fails, export exits non-zero with a structural diagnostics payloadarchitecture-templateRecognizable L→R architecture shape, categorized systems, limited per-layer density, and no route-breaking overflow riskfreeflowSame as aboveposterClear layer/group structure with bounded peer density per row or wrapped-row supportwrapped poster or freeflowSame as aboveswimlaneActor-owned flow steps with meaningful lane groupingfreeflowSame as abovehierarchyStable tree/group relationship with low ambiguity in parent-child groupingfreeflowSame as aboveevolutionOrdered chronological or staged progression datafreeflowSame as above
Do not invent route heuristics ad hoc inside a renderer. Route eligibility must stay explicit and reviewable.
#020617 bg + 40px grid). Only use light mode when the user explicitly asks for it.systems[].category to semantic colors from the design systemsystems[].properties.type == "aws" → AWS Region boundary boxsystems[].properties.type == "k8s" → Kubernetes Cluster boundary boxflowSteps[].seqIndex for L→R orderingoverflow: hidden that can clip the last row.rx="8", stroke-width="2"rx="16", stroke-dasharray="8,4", opacity="0.4"evals/export-integrity-thresholds.json, not prose heuristics.{blueprint_stem}.html alongside the blueprint JSON--validate returns errors: fix structural issues before proceeding to --export.--validate returns only warnings: proceed but note the warnings in any handoff.python3 -m business_blueprint.cli with system Python as fallback.freeflow also fails integrity: export exits non-zero with a structural diagnostics payload instead of emitting a silently broken artifact.Phase 2 does not attempt full Windows terminal parity.
Known deferred cases:
Accepted workaround for encoding-sensitive runs:
subprocess.run(["python", "scripts/business_blueprint/cli.py", "--export", str(blueprint_path)])
PYTHONIOENCODING=utf-8 where needed