|
| 1 | +# 002 - System Architecture |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +Intent Blueprint Docs is a monorepo with three publishable packages, a template engine, and supporting infrastructure. |
| 6 | + |
| 7 | +## Architecture Diagram |
| 8 | + |
| 9 | +``` |
| 10 | + ┌─────────────────────────────┐ |
| 11 | + │ User Interfaces │ |
| 12 | + ├──────────┬──────────┬────────┤ |
| 13 | + │ CLI │ MCP │ IDE │ |
| 14 | + │ (npx) │ Server │ Plugin │ |
| 15 | + └────┬─────┴────┬─────┴───┬────┘ |
| 16 | + │ │ │ |
| 17 | + ┌────▼──────────▼─────────▼────┐ |
| 18 | + │ @intentsolutions/ │ |
| 19 | + │ blueprint-core │ |
| 20 | + │ │ |
| 21 | + │ ┌──────────┐ ┌───────────┐ │ |
| 22 | + │ │ Template │ │ Plugin │ │ |
| 23 | + │ │ Engine │ │ Manager │ │ |
| 24 | + │ └────┬─────┘ └─────┬─────┘ │ |
| 25 | + │ │ │ │ |
| 26 | + │ ┌────▼─────────────▼─────┐ │ |
| 27 | + │ │ Document Generator │ │ |
| 28 | + │ └────────────┬────────────┘ │ |
| 29 | + └──────────────┼────────────────┘ |
| 30 | + │ |
| 31 | + ┌──────────────▼────────────────┐ |
| 32 | + │ Output Layer │ |
| 33 | + ├──────┬───────┬────────┬───────┤ |
| 34 | + │ Files│GitHub │ Linear │ Notion │ |
| 35 | + └──────┴───────┴────────┴───────┘ |
| 36 | +``` |
| 37 | + |
| 38 | +## Package Structure |
| 39 | + |
| 40 | +``` |
| 41 | +intent-blueprint-docs/ |
| 42 | +├── packages/ |
| 43 | +│ ├── cli/ # @intentsolutions/blueprint |
| 44 | +│ │ ├── src/ |
| 45 | +│ │ │ ├── commands/ # CLI command handlers |
| 46 | +│ │ │ ├── interview/ # AI-guided interview engine |
| 47 | +│ │ │ └── index.ts # CLI entrypoint |
| 48 | +│ │ └── package.json |
| 49 | +│ │ |
| 50 | +│ └── chatbots/ # MCP server + chatbot integrations |
| 51 | +│ ├── src/ |
| 52 | +│ │ ├── mcp/ # MCP tool definitions |
| 53 | +│ │ └── index.ts |
| 54 | +│ └── package.json |
| 55 | +│ |
| 56 | +├── professional-templates/ # 22 master templates (READ-ONLY) |
| 57 | +├── form-system/ # Interactive CLI form tools |
| 58 | +├── 000-docs/ # Project documentation (doc-filing system) |
| 59 | +├── 01-Docs/ # Legacy docs (migrating to 000-docs/) |
| 60 | +└── .github/workflows/ # CI/CD pipelines |
| 61 | +``` |
| 62 | + |
| 63 | +## Key Components |
| 64 | + |
| 65 | +### Template Engine |
| 66 | +- Reads templates from `professional-templates/` |
| 67 | +- Replaces `{{DATE}}` and other placeholders |
| 68 | +- Validates template completeness |
| 69 | +- Supports scope filtering (MVP/Standard/Comprehensive) |
| 70 | + |
| 71 | +### Plugin System |
| 72 | +- Five plugin types: Formatter, Validator, Processor, Integration, Hook |
| 73 | +- Lifecycle hooks: before/after generation |
| 74 | +- Built-in plugins: markdown-formatter, html-formatter, quality-validator |
| 75 | + |
| 76 | +### MCP Server |
| 77 | +- Exposes 5 tools: generate, interview, list_templates, customize, export |
| 78 | +- Stateless design - each call is independent |
| 79 | +- Works with Claude, Cursor, VS Code, and any MCP client |
| 80 | + |
| 81 | +### Enterprise Pipeline |
| 82 | +- 17-question structured intake (`scripts/run-enterprise.mjs`) |
| 83 | +- Governance controls and CODEOWNERS protection |
| 84 | +- CI/CD integration via GitHub Actions |
| 85 | +- Automated E2E validation |
| 86 | + |
| 87 | +## Technology Stack |
| 88 | + |
| 89 | +| Component | Technology | |
| 90 | +|-----------|-----------| |
| 91 | +| Language | TypeScript 5.3+ | |
| 92 | +| Runtime | Node.js 18+ | |
| 93 | +| Build | Turbo (monorepo) | |
| 94 | +| Package Manager | npm (workspaces) | |
| 95 | +| CI/CD | GitHub Actions | |
| 96 | +| Templates | Markdown with placeholders | |
| 97 | +| MCP | Model Context Protocol SDK | |
| 98 | + |
| 99 | +## Build System |
| 100 | + |
| 101 | +Turborepo manages the monorepo with these pipelines: |
| 102 | + |
| 103 | +```json |
| 104 | +{ |
| 105 | + "build": { "dependsOn": ["^build"] }, |
| 106 | + "dev": { "persistent": true }, |
| 107 | + "lint": {}, |
| 108 | + "test": { "dependsOn": ["build"] } |
| 109 | +} |
| 110 | +``` |
0 commit comments