Business Blueprint Skill

v0.12.0

Use when turning presales requirements, meeting notes, or solution materials into editable business capability blueprints, swimlane flows, and application ar...

0· 180·0 current·0 all-time
byKaiser@kaisersong

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for kaisersong/kai-business-blueprint.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Business Blueprint Skill" (kaisersong/kai-business-blueprint) from ClawHub.
Skill page: https://clawhub.ai/kaisersong/kai-business-blueprint
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install kai-business-blueprint

ClawHub CLI

Package manager switcher

npx clawhub@latest install kai-business-blueprint
Security Scan
Capability signals
CryptoCan make purchasesRequires OAuth tokenRequires sensitive credentials
These labels describe what authority the skill may exercise. They are separate from suspicious or malicious moderation verdicts.
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description align with what the package contains: a Python-based blueprint generator, exporters (SVG/drawio/Excalidraw/Mermaid), viewer, validation and projection. No unrelated credentials, binaries, or config paths are required.
Instruction Scope
SKILL.md explicitly instructs using the included Python CLI (python -m business_blueprint.cli) and to read templates in the repo and write outputs to a local projects/workspace path. The instructions focus on entity extraction from user-provided source text and deterministic JSON → export pipelines. They do not instruct reading system-wide secrets or unrelated files, nor sending data to external endpoints. Note: the agent will process user-provided text (which could contain sensitive data) as part of normal operation.
Install Mechanism
No install spec is declared (instruction-only from the registry), and the skill bundle includes Python source files. There are no downloads, URL-based installers, or third-party package fetches in the reviewed files. README suggests optional pip install -e . for local usage; nothing in the provided code indicates on-install network activity.
Credentials
The skill declares no required environment variables, no primary credential, and no config path requirements. The code reviewed does not read environment variables or request unrelated secrets. The only notable runtime requirement is Python >= 3.12 as declared in README/pyproject.
Persistence & Privilege
Skill flags are default (always:false, user-invocable:true, agent-invocation allowed). The skill does not request permanent platform-wide privileges and there is no evidence it modifies other skills or system-wide agent settings.
Assessment
This skill appears to do what it says: a local Python CLI that turns text into a canonical blueprint JSON and exports viewers/diagrams. Before installing or running: 1) Ensure you run it in an isolated workspace (projects/workspace) so generated files don't mix with other data. 2) Do not pass secrets or credentials in the source text you provide to the skill (it processes all input text). 3) The bundle requires Python >= 3.12; review pyproject.toml and optionally run the code in a disposable virtualenv. 4) If you want extra assurance, scan the omitted source files (tests and the 66 truncated files) for any network/subprocess calls before use — the reviewed files show no network I/O or env-var exfiltration patterns.

Like a lobster shell, security has layers — review code before you run it.

latestvk97d8nhrc0zj8smhv7t6fdwkmn85fkkm
180downloads
0stars
4versions
Updated 4d ago
v0.12.0
MIT-0

Business Blueprint Skill

Use the Python scripts in this repository as the execution surface.

Output Directory

All generated files (blueprint JSON, viewers, exports) go into projects/workspace/ — not the repository root.

python -m business_blueprint.cli --plan projects/workspace/solution.blueprint.json --from "..."
python -m business_blueprint.cli --project projects/workspace/solution.blueprint.json
python -m business_blueprint.cli --export projects/workspace/solution.blueprint.json

Industry Selection

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 content
commonNo hints — generic domains
financeRisk control, credit, compliance, customer profile, etc.
manufacturingProduction planning, quality, warehouse, supply chain, etc.
retailStore operations, membership, POS, order fulfillment, etc.

How to Generate a Blueprint

The AI agent is responsible for entity extraction. The Python tool handles JSON writing, visualization, and export.

Step 1: Read industry hints

Read the seed template at business_blueprint/templates/{industry}/seed.json and get the industryHints.checklist.

Step 2: Extract entities from source text

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 (name, description, capabilityIds)

Step 3: Write the blueprint JSON

Write the JSON file directly to the output path. Use this schema:

{
  "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": {}
}

Step 4: Generate visualizations

python -m business_blueprint.cli --export <blueprint.json>

This generates SVG + HTML viewer by default. Use --format drawio|excalidraw|mermaid for other formats.

Export View Selection Policy

Treat export view choice as a routing decision, not a styling preference.

  • If a request matches a supported, standard export template, use that template.
  • If there is no standard export template for the requested diagram, fall back to freeflow.
  • Do not substitute swimlane, matrix, product tree, or other generic views just because they are available.
  • When embedding a blueprint diagram into a report or ad hoc analysis, freeflow is the safe default unless the user explicitly asks for a supported standard template.

Step 5: Generate downstream projection

python -m business_blueprint.cli --project <blueprint.json>

This generates solution.projection.json, the canonical machine projection consumed by downstream report/slide workflows.

Workflow Decision Tree

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

Commands

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

Export Formats

FormatFileUse Case
svg (default)solution.exports/solution.svg + HTML viewerQuick preview, embedding
drawiosolution.exports/solution.drawioEditable diagrams
excalidrawsolution.exports/solution.excalidrawWhiteboard-style diagrams
mermaidsolution.exports/solution.mermaid.mdGitHub-native rendering

Collaboration Boundary

This skill produces semantic intermediate artifacts. Downstream skills consume them:

  • report-creator consumes solution.projection.json → assembles reports
  • slide-creator consumes solution.projection.json → assembles presentations
  • Other skills may consume relations → generate PlantUML or other diagram syntax
  • Downstream skills should never directly edit solution.blueprint.json
  • solution.handoff.json is viewer-only metadata, not a downstream narrative input

Sandbox Execution

When running in an isolated Python sandbox (Jupyter, notebook, cloud REPL) that auto-installs dependencies:

  1. The sandbox auto-installs kai-business-blueprint from PyPI. Do NOT try to pip install -e or use sys.path hacks with __file____file__ is undefined in Jupyter.

  2. For --export (after blueprint JSON exists):

    from pathlib import Path
    from business_blueprint.model import load_json
    from business_blueprint.export_svg import export_svg_auto
    from business_blueprint.export_html import export_html_viewer
    
    blueprint_path = Path("solution.blueprint.json")
    blueprint = load_json(blueprint_path)
    export_dir = blueprint_path.with_name("solution.exports")
    export_dir.mkdir(parents=True, exist_ok=True)
    # Default fallback is freeflow unless a standard export template applies.
    export_svg_auto(blueprint, export_dir / "solution.svg")
    export_html_viewer(blueprint, blueprint_path.with_name("solution.blueprint.html"))
    
  3. Prohibited patterns in sandbox:

    • __file__ — undefined in Jupyter
    • sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) — will raise NameError
    • subprocess.run(["business-blueprint", ...]) — sandbox runs Python cells, not shell
    • os.system() — same reason

Architecture Diagram Generation

When user requests an architecture diagram (keywords: "架构图", "architecture diagram", "--export", "diagram"):

  1. Read references/architecture-design-system.md for the complete design system.
  2. Read the appropriate template from references/architecture-templates/ based on the user's domain:
    • AWS/Serverless/Lambda → serverless.md
    • Microservices/Kubernetes/微服务 → microservices.md
    • Other → use serverless.md as a structural reference
  3. Read the blueprint JSON to extract entities and flow steps.
  4. Generate a self-contained HTML file with inline SVG following the design system rules.
  5. 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.

Route eligibility matrix

Use an explicit route contract before rendering:

RouteStructural prerequisitesFirst fallbackTerminal behavior
freeflowAny valid blueprint with at least one renderable node or relationNoneIf integrity still fails, export exits non-zero with a structural diagnostics payload
architecture-templateRecognizable L→R architecture shape, categorized systems, limited per-layer density, and no route-breaking overflow riskfreeflowSame as above
posterClear layer/group structure with bounded peer density per row or wrapped-row supportwrapped poster or freeflowSame as above
swimlaneActor-owned flow steps with meaningful lane groupingfreeflowSame as above
hierarchyStable tree/group relationship with low ambiguity in parent-child groupingfreeflowSame as above
evolutionOrdered chronological or staged progression datafreeflowSame as above

Do not invent route heuristics ad hoc inside a renderer. Route eligibility must stay explicit and reviewable.

Generation Rules

  • Use dark mode by default (#020617 bg + 40px grid). Only use light mode when the user explicitly asks for it.
  • L→R data flow: Clients(左) → Frontend → Backend → Database(右)
  • Map systems[].category to semantic colors from the design system
  • Map systems[].properties.type == "aws" → AWS Region boundary box
  • Map systems[].properties.type == "k8s" → Kubernetes Cluster boundary box
  • Use flowSteps[].seqIndex for L→R ordering
  • Component sizing: 0-1 cap = small(44px h), 2-4 = medium(80px h), 5+ = large(80px h)
  • Layout must be content-driven. Never force every node in a layer into one fixed row if that creates toothpaste-style squeezing.
  • When a layer has more than 3 peer nodes, or labels/features become tight, wrap into multiple rows or widen the canvas before shrinking the content.
  • Render users/actors as actor labels, badges, or lane headers by default. Do not render them as ordinary system cards unless the user explicitly asks for that visual treatment.
  • Legend must live in a bottom safe area and participate in canvas sizing. Never place the legend as a floating overlay in the top-right corner.
  • Final SVG/HTML height must be derived from the bottom-most node, legend, summary cards, and footer plus padding. Do not use fixed-height wrappers or overflow: hidden that can clip the last row.
  • Z-order: bg → grid → title → region → arrows → nodes → legend → cards → footer
  • Component border: rx="8", stroke-width="2"
  • Region border: rx="16", stroke-dasharray="8,4", opacity="0.4"
  • Geometry-sensitive integrity checks must use the numeric thresholds from evals/export-integrity-thresholds.json, not prose heuristics.

Output

  • Single HTML file: {blueprint_stem}.html alongside the blueprint JSON
  • No external dependencies (except Google Fonts CDN for JetBrains Mono)
  • Opens in any browser, printable to PDF

Error Handling

  • If --validate returns errors: fix structural issues before proceeding to --export.
  • If --validate returns only warnings: proceed but note the warnings in any handoff.
  • If Python version < 3.12: the package will refuse to install. Use python3 -m business_blueprint.cli with system Python as fallback.
  • If a specialized route fails integrity: fall back to its configured fallback route.
  • If freeflow also fails integrity: export exits non-zero with a structural diagnostics payload instead of emitting a silently broken artifact.

Cross-Platform Scope

Phase 2 does not attempt full Windows terminal parity.

Known deferred cases:

  • PowerShell pipe quirks beyond documented CLI contract tests
  • console-default encoding issues outside explicit UTF-8 execution paths

Accepted workaround for encoding-sensitive runs:

  • use python -m business_blueprint.cli
  • set PYTHONIOENCODING=utf-8 where needed

Comments

Loading comments...