agentic-sdlc 1.0.0 → 1.5.0
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/.agent/ide-integration/INTEGRATION-SUMMARY.md +309 -0
- package/.agent/ide-integration/KIRO-IDE.md +381 -0
- package/.agent/ide-integration/README.md +256 -209
- package/.agent/knowledge-base/AUTO-LEARNING-GUIDE.md +327 -0
- package/.agent/knowledge-base/HOW-IT-WORKS.md +365 -0
- package/.agent/knowledge-base/INDEX.md +43 -0
- package/.agent/knowledge-base/README.md +47 -7
- package/.agent/knowledge-base/architecture/KB-2026-01-01-003-neo4j-graph-database-skills.md +1146 -0
- package/.agent/knowledge-base/architecture/README.md +98 -0
- package/.agent/knowledge-base/bugs/KB-2026-01-02-yaml-special-character-escaping.md +56 -0
- package/.agent/knowledge-base/bugs/medium/KB-2026-01-01-001-example-auto-learned.md +198 -0
- package/.agent/knowledge-base/features/KB-2026-01-01-001-landing-page-design-trends-2026.md +646 -0
- package/.agent/knowledge-base/features/KB-2026-01-01-004-uiux-design-skills-2026.md +945 -0
- package/.agent/knowledge-base/features/KB-2026-01-01-005-modern-ai-landing-page-ui.md +310 -0
- package/.agent/knowledge-base/features/KB-2026-01-01-006-award-winning-landing-page-patterns.md +324 -0
- package/.agent/knowledge-base/features/KB-2026-01-02-001-cleanup-workflow.md +242 -0
- package/.agent/knowledge-base/features/KB-2026-01-02-002-landing-page-monorepo-architecture.md +148 -0
- package/.agent/knowledge-base/features/KB-2026-01-02-003-premium-glassmorphism-patterns.md +58 -0
- package/.agent/knowledge-base/features/KB-2026-01-04-ai-agent-enforcement.md +46 -0
- package/.agent/knowledge-base/features/README.md +83 -0
- package/.agent/knowledge-base/features/figma-landing-page-workflow.md +311 -0
- package/.agent/knowledge-base/features/figma-mcp-sa-guide.md +673 -0
- package/.agent/knowledge-base/features/figma-mcp-uiux-guide.md +459 -0
- package/.agent/knowledge-base/performance/KB-2026-01-02-lazy-loading-optimization.md +80 -0
- package/.agent/knowledge-base/platform-specific/KB-2026-01-02-windows-console-encoding.md +56 -0
- package/.agent/knowledge-base/role-guides/DEV-KB-Guide.md +527 -0
- package/.agent/knowledge-base/role-guides/DEVOPS-KB-Guide.md +491 -0
- package/.agent/knowledge-base/role-guides/PM-KB-Guide.md +299 -0
- package/.agent/knowledge-base/role-guides/SECA-KB-Guide.md +555 -0
- package/.agent/knowledge-base/role-guides/TESTER-KB-Guide.md +519 -0
- package/.agent/knowledge-base/security/KB-2026-01-02-input-validation-sanitization.md +74 -0
- package/.agent/rules/AUTO-LEARNING.md +418 -0
- package/.agent/rules/ai-enforcement.md +11 -0
- package/.agent/rules/artifacts.md +77 -58
- package/.agent/rules/git-workflow.md +25 -65
- package/.agent/rules/global.md +18 -13
- package/.agent/skills/role-ba.md +76 -0
- package/.agent/skills/role-brain.md +470 -0
- package/.agent/skills/role-dev.md +338 -0
- package/.agent/skills/role-devops.md +122 -0
- package/.agent/skills/role-orchestrator.md +223 -0
- package/.agent/skills/role-pm.md +258 -0
- package/.agent/skills/role-po.md +237 -0
- package/.agent/skills/role-qa.md +81 -0
- package/.agent/skills/role-reporter.md +117 -0
- package/.agent/skills/role-sa.md +277 -0
- package/.agent/skills/role-seca.md +294 -0
- package/.agent/skills/role-stakeholder.md +105 -0
- package/.agent/skills/role-tester.md +294 -0
- package/.agent/skills/role-uiux.md +264 -0
- package/.agent/templates/CHANGELOG-Template.md +83 -0
- package/.agent/templates/Knowledge-Entry-Template.md +3 -0
- package/.agent/workflows/brain.md +84 -53
- package/.agent/workflows/compound.md +51 -0
- package/.agent/workflows/cycle.md +61 -0
- package/.agent/workflows/emergency.md +114 -0
- package/.agent/workflows/explore.md +147 -0
- package/.agent/workflows/housekeeping.md +105 -0
- package/.agent/workflows/metrics.md +179 -0
- package/.agent/workflows/orchestrator.md +68 -0
- package/.agent/workflows/preflight.md +35 -0
- package/.agent/workflows/release.md +153 -0
- package/.agent/workflows/route.md +160 -0
- package/.agent/workflows/sprint.md +125 -0
- package/.agent/workflows/validate.md +146 -0
- package/CHANGELOG.md +349 -6
- package/README.md +171 -86
- package/bin/CROSS-PLATFORM-CLI.md +526 -0
- package/bin/README.md +525 -0
- package/bin/cli.js +65 -90
- package/bin/kb +34 -0
- package/bin/kb.bat +28 -0
- package/bin/kb_cli.py +226 -0
- package/bin/lib/README.md +411 -0
- package/bin/lib/__init__.py +7 -0
- package/bin/lib/__pycache__/kb_add.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_common.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_compound.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_index.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_list.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_search.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_stats.cpython-313.pyc +0 -0
- package/bin/lib/kb_add.py +203 -0
- package/bin/lib/kb_common.py +224 -0
- package/bin/lib/kb_compound.py +250 -0
- package/bin/lib/kb_index.py +193 -0
- package/bin/lib/kb_list.py +144 -0
- package/bin/lib/kb_search.py +121 -0
- package/bin/lib/kb_stats.py +153 -0
- package/docs/AGENT-MANAGEMENT-GUIDE.md +298 -0
- package/docs/ARCHITECTURE-OVERVIEW.md +350 -0
- package/docs/BRAIN-ARCHITECTURE.md +396 -0
- package/docs/COMPOUND-ENGINEERING-SETUP.md +326 -0
- package/docs/KNOWLEDGE-BASE-GUIDE.md +330 -0
- package/docs/KNOWLEDGE-BASE-SIMPLE.md +248 -0
- package/docs/MONOREPO-ARCHITECTURE.md +492 -0
- package/docs/PROJECT-DOCUMENTATION-INDEX.md +540 -0
- package/docs/SDLC-Diagram.md +235 -0
- package/docs/analysis/Workflow-Optimization-Diagram.md +524 -0
- package/docs/analysis/Workflows-Deep-Analysis-2026-01-03.md +604 -0
- package/docs/architecture/{brain.md → BRAIN.md} +1 -1
- package/docs/global/Master-Documentation.md +307 -0
- package/docs/global/reports/Final-Approval-Report.md +257 -0
- package/docs/guides/AUTO-LEARNING-COMPLETE-GUIDE.md +519 -0
- package/docs/guides/AUTO-LEARNING-SYSTEM.md +322 -0
- package/docs/guides/LEARNING-FLOW.md +0 -0
- package/docs/guides/MCP-QUICK-REFERENCE.md +104 -0
- package/docs/guides/MCP-SETUP.md +139 -0
- package/docs/guides/QUICK-START.md +4 -0
- package/docs/guides/ROLE-COMMUNICATION-SYSTEM.md +71 -0
- package/docs/reports/Metrics-Dashboard-2026-01-02.md +66 -0
- package/docs/reports/Metrics-Dashboard-2026-01-04.md +68 -0
- package/docs/reports/UIUX-Design-Skills-Research-Report-2026.md +91 -0
- package/docs/reports/Validation-Report-2026-01-04.md +23 -0
- package/docs/research-reports/research-20260103-101315.json +95 -0
- package/docs/research-reports/research-20260103-101315.md +78 -0
- package/docs/research-reports/research-20260103-183837.json +95 -0
- package/docs/research-reports/research-20260103-183837.md +78 -0
- package/docs/research-reports/research-20260103-190346.json +100 -0
- package/docs/research-reports/research-20260103-190346.md +83 -0
- package/docs/setup/{github-management.md → GITHUB-MANAGEMENT.md} +1 -1
- package/docs/setup/RESEARCH-AGENT-SETUP.md +575 -0
- package/docs/sprints/{sprint-github-issues.md → SPRINT-GITHUB-ISSUES.md} +1 -1
- package/docs/sprints/{sprint-leann-integration.md → SPRINT-LEANN-INTEGRATION.md} +1 -1
- package/docs/sprints/sprint-1/designs/Backend-Design-Spec-Sprint-1-v1.md +1206 -0
- package/docs/sprints/sprint-1/designs/System-Design-Spec-Sprint-1-v1.md +439 -0
- package/docs/sprints/sprint-1/designs/System-Design-Spec-v1.0.md +425 -0
- package/docs/sprints/sprint-1/designs/UIUX-Design-Spec-Sprint-1-v1.md +55 -0
- package/docs/sprints/sprint-1/designs/UIUX-Design-Spec-v1.0.md +644 -0
- package/docs/sprints/sprint-1/logs/DevOps-Plan-and-Log-Sprint-1-v1.md +253 -0
- package/docs/sprints/sprint-1/logs/Development-Log-Phase1.md +433 -0
- package/docs/sprints/sprint-1/logs/Development-Log-Sprint-1-v1.md +181 -0
- package/docs/sprints/sprint-1/logs/Development-Log-Sprint-1.md +548 -0
- package/docs/sprints/sprint-1/logs/Orchestration-Log-Sprint-1.md +46 -0
- package/docs/sprints/sprint-1/logs/Phase1-Summary.md +84 -0
- package/docs/sprints/sprint-1/plans/Product-Backlog-Sprint-1-v1.md +40 -0
- package/docs/sprints/sprint-1/plans/Product-Backlog-v1.0.md +613 -0
- package/docs/sprints/sprint-1/plans/Project-Plan-Sprint-1-v1.0.md +210 -0
- package/docs/sprints/sprint-1/plans/Project-Plan-Sprint-1-v1.md +377 -0
- package/docs/sprints/sprint-1/reports/Design-Verification-Report-v1.0.md +220 -0
- package/docs/sprints/sprint-1/reports/Phase-Report-Sprint-1-v1.md +238 -0
- package/docs/sprints/sprint-1/reports/Security-Review-Report-v1.0.md +285 -0
- package/docs/sprints/sprint-1/reports/Sprint-Report-Sprint-1.md +74 -0
- package/docs/sprints/sprint-1/reports/Test-Report-v1.0.md +346 -0
- package/docs/sprints/sprint-1/reviews/Design-Verification-Report.md +508 -0
- package/docs/sprints/sprint-1/reviews/Security-Review-Report.md +589 -0
- package/docs/sprints/sprint-1/sprint-current/logs/WORKFLOW-CLEANUP-FINAL.md +121 -0
- package/docs/sprints/sprint-1/sprint-current/logs/WORKFLOW-OPTIMIZATION-COMPLETE.md +224 -0
- package/docs/sprints/sprint-1/sprint-current/logs/Workflow-Optimization-Progress.md +310 -0
- package/docs/sprints/sprint-1/sprint-current/logs/Workflow-Optimization-Session-Summary.md +420 -0
- package/docs/sprints/sprint-1/sprint-current/plans/Workflow-Optimization-Implementation-Plan.md +1124 -0
- package/docs/sprints/sprint-2/SPRINT-SUMMARY.md +150 -0
- package/docs/sprints/sprint-2/designs/UIUX-Design-Spec-Sprint-2-v1.md +352 -0
- package/docs/sprints/sprint-2/logs/Development-Log-Sprint-2-v1.md +293 -0
- package/docs/sprints/sprint-2/plans/Product-Backlog-Sprint-2-v1.md +62 -0
- package/docs/sprints/sprint-2/plans/Project-Plan-Sprint-2-v1.md +228 -0
- package/docs/sprints/sprint-2/reports/Phase-Report-Sprint-2-v1.md +303 -0
- package/docs/sprints/sprint-3/designs/UIUX-Design-Spec-Sprint-3-v1.md +160 -0
- package/docs/sprints/sprint-3/logs/Development-Log-Sprint-3-v1.md +249 -0
- package/docs/sprints/sprint-3/logs/Testing-Report-Sprint-3-v1.md +244 -0
- package/docs/sprints/sprint-3/plans/Product-Backlog-Sprint-3-v1.md +95 -0
- package/docs/sprints/sprint-3/reports/Final-Approval-Report-Sprint-3-v1.md +299 -0
- package/docs/sprints/sprint-3/reports/Sprint-Summary-Sprint-3-v1.md +276 -0
- package/docs/sprints/sprint-3/reviews/Design-Verification-Report-Sprint-3-v1.md +122 -0
- package/docs/sprints/sprint-3/reviews/Security-Review-Report-Sprint-3-v1.md +67 -0
- package/docs/sprints/sprint-5/designs/Backend-Design-Spec-Sprint-5-v1.md +1734 -0
- package/docs/sprints/sprint-5/designs/Design-Verification-Report.md +101 -0
- package/docs/sprints/sprint-5/designs/Security-Review-Report.md +84 -0
- package/docs/sprints/sprint-6/.brain-state.json +29 -0
- package/package.json +92 -16
- package/.agent/ide-integration/aider-commands.md +0 -40
- package/.agent/ide-integration/cline-config.json +0 -108
- package/.agent/ide-integration/cursor-rules.md +0 -63
- package/.agent/ide-integration/github-copilot-instructions.md +0 -75
- package/.agent/ide-integration/vscode-commands.json +0 -190
- package/.agent/ide-integration/windsurf-cascade.md +0 -125
- package/.agent/knowledge-base/index.md +0 -202
- package/.agent/legacy/roles/designer.md +0 -311
- package/.agent/legacy/roles/dev.md +0 -177
- package/.agent/legacy/roles/devops.md +0 -146
- package/.agent/legacy/roles/orchestrator.md +0 -339
- package/.agent/legacy/roles/pm.md +0 -120
- package/.agent/legacy/roles/po.md +0 -89
- package/.agent/legacy/roles/qa.md +0 -108
- package/.agent/legacy/roles/reporter.md +0 -70
- package/.agent/legacy/roles/sa.md +0 -118
- package/.agent/legacy/roles/seca.md +0 -112
- package/.agent/legacy/roles/stakeholder.md +0 -111
- package/.agent/legacy/roles/tester.md +0 -129
- package/.agent/rules/global.md.bak +0 -154
- package/.agent/usage.md +0 -653
- package/.agent/workflows/auto.md +0 -35
- package/.agent/workflows/dev.md +0 -30
- package/.agent/workflows/devops.md +0 -28
- package/.agent/workflows/kb-search.md +0 -22
- package/.agent/workflows/pm.md +0 -42
- package/.agent/workflows/po.md +0 -21
- package/.agent/workflows/qa.md +0 -31
- package/.agent/workflows/reporter.md +0 -21
- package/.agent/workflows/sa.md +0 -51
- package/.agent/workflows/seca.md +0 -21
- package/.agent/workflows/stakeholder.md +0 -26
- package/.agent/workflows/tester.md +0 -21
- package/.agent/workflows/uiux.md +0 -38
- package/.cursorrules +0 -49
- package/.env.template +0 -10
- package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -47
- package/.github/ISSUE_TEMPLATE/config.yml +0 -8
- package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -33
- package/.github/ISSUE_TEMPLATE/security_alert.yml +0 -28
- package/.github/ISSUE_TEMPLATE/task_implementation.yml +0 -37
- package/.github/copilot-instructions.md +0 -60
- package/bin/commands/create.js +0 -96
- package/bin/commands/help.js +0 -69
- package/bin/commands/ide.js +0 -116
- package/bin/commands/init-kb.js +0 -74
- package/bin/commands/install.js +0 -68
- package/bin/commands/list.js +0 -35
- package/bin/graph_brain.py +0 -86
- package/bin/sync_github.py +0 -75
- package/bin/utils/args-parser.js +0 -33
- package/bin/utils/colors.js +0 -21
- package/bin/verify_neo4j.py +0 -25
- /package/.agent/rules/{knowledge-base.md → KNOWLEDGE-BASE.md} +0 -0
- /package/docs/architecture/{neo4j-learning-queries.md → NEO4J-LEARNING-QUERIES.md} +0 -0
- /package/docs/reports/{comparison-leann-neo4j.md → COMPARISON-LEANN-NEO4J.md} +0 -0
- /package/docs/sprints/{sprint-neo4j-brain.md → SPRINT-NEO4J-BRAIN.md} +0 -0
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Figma MCP Integration for @UIUX"
|
|
3
|
+
category: feature
|
|
4
|
+
priority: high
|
|
5
|
+
date: 2026-01-02
|
|
6
|
+
tags: [figma, mcp, uiux, design, code-generation]
|
|
7
|
+
related_files: [.agent/roles/role-uiux.md]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Figma MCP Integration for @UIUX
|
|
11
|
+
|
|
12
|
+
## Overview
|
|
13
|
+
|
|
14
|
+
Figma MCP tools enable @UIUX to bridge design and development by:
|
|
15
|
+
- Generating screenshots from Figma designs
|
|
16
|
+
- Extracting design context and code
|
|
17
|
+
- Accessing design variables and tokens
|
|
18
|
+
- Creating diagrams directly in FigJam
|
|
19
|
+
- Mapping designs to code components
|
|
20
|
+
|
|
21
|
+
## Available Figma MCP Tools
|
|
22
|
+
|
|
23
|
+
### 1. Get Screenshot
|
|
24
|
+
**Tool:** `mcp_figma_get_screenshot`
|
|
25
|
+
**Purpose:** Generate visual previews of Figma designs
|
|
26
|
+
|
|
27
|
+
**Parameters:**
|
|
28
|
+
- `fileKey` (required): Extract from Figma URL
|
|
29
|
+
- `nodeId` (required): Node ID from URL (format: "123:456")
|
|
30
|
+
- `clientLanguages`: Programming languages (e.g., "typescript,react")
|
|
31
|
+
- `clientFrameworks`: Frameworks (e.g., "react,nextjs")
|
|
32
|
+
|
|
33
|
+
**Example URL:** `https://figma.com/design/pqrs/ExampleFile?node-id=1-2`
|
|
34
|
+
- `fileKey` = `pqrs`
|
|
35
|
+
- `nodeId` = `1:2`
|
|
36
|
+
|
|
37
|
+
**Usage:**
|
|
38
|
+
```javascript
|
|
39
|
+
// Get screenshot of a component
|
|
40
|
+
mcp_figma_get_screenshot({
|
|
41
|
+
fileKey: "pqrs",
|
|
42
|
+
nodeId: "1:2",
|
|
43
|
+
clientLanguages: "typescript",
|
|
44
|
+
clientFrameworks: "react"
|
|
45
|
+
})
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### 2. Get Design Context
|
|
49
|
+
**Tool:** `mcp_figma_get_design_context`
|
|
50
|
+
**Purpose:** Generate UI code from Figma designs
|
|
51
|
+
|
|
52
|
+
**Parameters:**
|
|
53
|
+
- `fileKey` (required)
|
|
54
|
+
- `nodeId` (required)
|
|
55
|
+
- `clientLanguages`: Target languages
|
|
56
|
+
- `clientFrameworks`: Target frameworks
|
|
57
|
+
- `disableCodeConnect`: Disable Code Connect (optional)
|
|
58
|
+
- `forceCode`: Always return code (optional)
|
|
59
|
+
|
|
60
|
+
**Returns:**
|
|
61
|
+
- Generated code string
|
|
62
|
+
- Asset download URLs
|
|
63
|
+
- Component structure
|
|
64
|
+
|
|
65
|
+
**Usage:**
|
|
66
|
+
```javascript
|
|
67
|
+
// Generate React component from Figma
|
|
68
|
+
mcp_figma_get_design_context({
|
|
69
|
+
fileKey: "pqrs",
|
|
70
|
+
nodeId: "1:2",
|
|
71
|
+
clientLanguages: "typescript",
|
|
72
|
+
clientFrameworks: "react,nextjs"
|
|
73
|
+
})
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### 3. Get Metadata
|
|
77
|
+
**Tool:** `mcp_figma_get_metadata`
|
|
78
|
+
**Purpose:** Get node structure overview in XML format
|
|
79
|
+
|
|
80
|
+
**Use Case:** Understanding design hierarchy before generating code
|
|
81
|
+
|
|
82
|
+
**Usage:**
|
|
83
|
+
```javascript
|
|
84
|
+
// Get page structure
|
|
85
|
+
mcp_figma_get_metadata({
|
|
86
|
+
fileKey: "pqrs",
|
|
87
|
+
nodeId: "0:1", // Page ID
|
|
88
|
+
clientLanguages: "typescript",
|
|
89
|
+
clientFrameworks: "react"
|
|
90
|
+
})
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### 4. Get Variable Definitions
|
|
94
|
+
**Tool:** `mcp_figma_get_variable_defs`
|
|
95
|
+
**Purpose:** Extract design tokens (colors, spacing, typography)
|
|
96
|
+
|
|
97
|
+
**Returns:** `{'icon/default/secondary': '#949494'}`
|
|
98
|
+
|
|
99
|
+
**Usage:**
|
|
100
|
+
```javascript
|
|
101
|
+
// Get design tokens
|
|
102
|
+
mcp_figma_get_variable_defs({
|
|
103
|
+
fileKey: "pqrs",
|
|
104
|
+
nodeId: "1:2",
|
|
105
|
+
clientLanguages: "typescript",
|
|
106
|
+
clientFrameworks: "react"
|
|
107
|
+
})
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### 5. Generate Diagram
|
|
111
|
+
**Tool:** `mcp_figma_generate_diagram`
|
|
112
|
+
**Purpose:** Create flowcharts, sequence diagrams, gantt charts in FigJam
|
|
113
|
+
|
|
114
|
+
**Supported Types:**
|
|
115
|
+
- Flowchart / Graph (LR direction by default)
|
|
116
|
+
- Sequence Diagram
|
|
117
|
+
- State Diagram
|
|
118
|
+
- Gantt Chart
|
|
119
|
+
|
|
120
|
+
**Parameters:**
|
|
121
|
+
- `name` (required): Diagram title
|
|
122
|
+
- `mermaidSyntax` (required): Mermaid.js code
|
|
123
|
+
- `userIntent`: Description of purpose
|
|
124
|
+
|
|
125
|
+
**Usage:**
|
|
126
|
+
```javascript
|
|
127
|
+
// Create user flow diagram
|
|
128
|
+
mcp_figma_generate_diagram({
|
|
129
|
+
name: "User Authentication Flow",
|
|
130
|
+
mermaidSyntax: `
|
|
131
|
+
flowchart LR
|
|
132
|
+
A["Login Page"] --> B["Enter Credentials"]
|
|
133
|
+
B --> C{"Valid?"}
|
|
134
|
+
C -->|"Yes"| D["Dashboard"]
|
|
135
|
+
C -->|"No"| E["Error Message"]
|
|
136
|
+
`,
|
|
137
|
+
userIntent: "Document authentication user flow"
|
|
138
|
+
})
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**Important Rules:**
|
|
142
|
+
- Use LR (left-right) direction for flowcharts
|
|
143
|
+
- Quote all text: `["Text"]`, `-->|"Edge Text"|`
|
|
144
|
+
- No emojis in Mermaid code
|
|
145
|
+
- No `\n` for newlines
|
|
146
|
+
- Avoid word "end" in classNames
|
|
147
|
+
|
|
148
|
+
### 6. Code Connect Map
|
|
149
|
+
**Tool:** `mcp_figma_get_code_connect_map`
|
|
150
|
+
**Purpose:** Get mapping of Figma nodes to code components
|
|
151
|
+
|
|
152
|
+
**Returns:** `{'1:2': { codeConnectSrc: 'components/Button.tsx', codeConnectName: 'Button' }}`
|
|
153
|
+
|
|
154
|
+
**Usage:**
|
|
155
|
+
```javascript
|
|
156
|
+
// Get component mappings
|
|
157
|
+
mcp_figma_get_code_connect_map({
|
|
158
|
+
fileKey: "pqrs",
|
|
159
|
+
nodeId: "1:2",
|
|
160
|
+
codeConnectLabel: "React" // Optional: filter by framework
|
|
161
|
+
})
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### 7. Add Code Connect Map
|
|
165
|
+
**Tool:** `mcp_figma_add_code_connect_map`
|
|
166
|
+
**Purpose:** Map Figma node to code component
|
|
167
|
+
|
|
168
|
+
**Parameters:**
|
|
169
|
+
- `fileKey`, `nodeId` (required)
|
|
170
|
+
- `source` (required): File path (e.g., "components/Button.tsx")
|
|
171
|
+
- `componentName` (required): Component name
|
|
172
|
+
- `label` (required): Framework (React, Vue, SwiftUI, etc.)
|
|
173
|
+
|
|
174
|
+
**Valid Labels:**
|
|
175
|
+
- React, Web Components, Vue, Svelte, Storybook, Javascript
|
|
176
|
+
- Swift UIKit, Objective-C UIKit, SwiftUI
|
|
177
|
+
- Compose, Java, Kotlin, Android XML Layout, Flutter
|
|
178
|
+
|
|
179
|
+
**Usage:**
|
|
180
|
+
```javascript
|
|
181
|
+
// Map Button component
|
|
182
|
+
mcp_figma_add_code_connect_map({
|
|
183
|
+
fileKey: "pqrs",
|
|
184
|
+
nodeId: "1:2",
|
|
185
|
+
source: "src/components/Button.tsx",
|
|
186
|
+
componentName: "Button",
|
|
187
|
+
label: "React"
|
|
188
|
+
})
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### 8. Get FigJam
|
|
192
|
+
**Tool:** `mcp_figma_get_figjam`
|
|
193
|
+
**Purpose:** Extract content from FigJam boards
|
|
194
|
+
|
|
195
|
+
**Note:** Only works for FigJam files, not regular Figma files
|
|
196
|
+
|
|
197
|
+
**Usage:**
|
|
198
|
+
```javascript
|
|
199
|
+
// Extract FigJam board
|
|
200
|
+
mcp_figma_get_figjam({
|
|
201
|
+
fileKey: "board-key",
|
|
202
|
+
nodeId: "1:2",
|
|
203
|
+
includeImagesOfNodes: true
|
|
204
|
+
})
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## @UIUX Workflow with Figma MCP
|
|
208
|
+
|
|
209
|
+
### Phase 1: Design Exploration
|
|
210
|
+
```bash
|
|
211
|
+
# 1. Get design structure
|
|
212
|
+
mcp_figma_get_metadata({
|
|
213
|
+
fileKey: "your-file-key",
|
|
214
|
+
nodeId: "0:1", # Page ID
|
|
215
|
+
clientLanguages: "typescript",
|
|
216
|
+
clientFrameworks: "react,nextjs"
|
|
217
|
+
})
|
|
218
|
+
|
|
219
|
+
# 2. Extract design tokens
|
|
220
|
+
mcp_figma_get_variable_defs({
|
|
221
|
+
fileKey: "your-file-key",
|
|
222
|
+
nodeId: "component-node-id"
|
|
223
|
+
})
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Phase 2: Component Generation
|
|
227
|
+
```bash
|
|
228
|
+
# 1. Generate screenshot for documentation
|
|
229
|
+
mcp_figma_get_screenshot({
|
|
230
|
+
fileKey: "your-file-key",
|
|
231
|
+
nodeId: "component-node-id",
|
|
232
|
+
clientLanguages: "typescript",
|
|
233
|
+
clientFrameworks: "react"
|
|
234
|
+
})
|
|
235
|
+
|
|
236
|
+
# 2. Generate component code
|
|
237
|
+
mcp_figma_get_design_context({
|
|
238
|
+
fileKey: "your-file-key",
|
|
239
|
+
nodeId: "component-node-id",
|
|
240
|
+
clientLanguages: "typescript",
|
|
241
|
+
clientFrameworks: "react,nextjs"
|
|
242
|
+
})
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Phase 3: Documentation
|
|
246
|
+
```bash
|
|
247
|
+
# Create user flow diagram
|
|
248
|
+
mcp_figma_generate_diagram({
|
|
249
|
+
name: "User Journey - Checkout Flow",
|
|
250
|
+
mermaidSyntax: `
|
|
251
|
+
flowchart LR
|
|
252
|
+
A["Cart"] --> B["Checkout"]
|
|
253
|
+
B --> C["Payment"]
|
|
254
|
+
C --> D["Confirmation"]
|
|
255
|
+
`
|
|
256
|
+
})
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Phase 4: Code Mapping
|
|
260
|
+
```bash
|
|
261
|
+
# Map design to implementation
|
|
262
|
+
mcp_figma_add_code_connect_map({
|
|
263
|
+
fileKey: "your-file-key",
|
|
264
|
+
nodeId: "button-node-id",
|
|
265
|
+
source: "src/components/ui/Button.tsx",
|
|
266
|
+
componentName: "Button",
|
|
267
|
+
label: "React"
|
|
268
|
+
})
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
## Best Practices
|
|
272
|
+
|
|
273
|
+
### 1. Extract File Key and Node ID
|
|
274
|
+
From URL: `https://figma.com/design/abc123/MyFile?node-id=45-67`
|
|
275
|
+
- `fileKey` = `abc123`
|
|
276
|
+
- `nodeId` = `45:67` (replace `-` with `:`)
|
|
277
|
+
|
|
278
|
+
### 2. Specify Client Context
|
|
279
|
+
Always provide:
|
|
280
|
+
- `clientLanguages`: "typescript" or "javascript,html,css"
|
|
281
|
+
- `clientFrameworks`: "react,nextjs" or "vue,nuxt"
|
|
282
|
+
|
|
283
|
+
This helps generate appropriate code.
|
|
284
|
+
|
|
285
|
+
### 3. Use Metadata First
|
|
286
|
+
Before generating code, use `get_metadata` to understand structure:
|
|
287
|
+
```javascript
|
|
288
|
+
// Get overview first
|
|
289
|
+
mcp_figma_get_metadata({ fileKey, nodeId: "0:1" })
|
|
290
|
+
|
|
291
|
+
// Then generate specific components
|
|
292
|
+
mcp_figma_get_design_context({ fileKey, nodeId: "specific-component" })
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
### 4. Document Design Tokens
|
|
296
|
+
Extract and document design variables:
|
|
297
|
+
```javascript
|
|
298
|
+
const tokens = mcp_figma_get_variable_defs({ fileKey, nodeId })
|
|
299
|
+
// Document in design system: colors, spacing, typography
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
### 5. Create Visual Documentation
|
|
303
|
+
Use diagrams for user flows:
|
|
304
|
+
```javascript
|
|
305
|
+
mcp_figma_generate_diagram({
|
|
306
|
+
name: "Authentication Flow",
|
|
307
|
+
mermaidSyntax: "flowchart LR\n A[\"Login\"] --> B[\"Verify\"]"
|
|
308
|
+
})
|
|
309
|
+
// Returns URL - include in design spec
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
## Integration with @UIUX Workflow
|
|
313
|
+
|
|
314
|
+
### In Design Spec
|
|
315
|
+
```markdown
|
|
316
|
+
## Figma Design References
|
|
317
|
+
|
|
318
|
+
**Design File:** [Link to Figma]
|
|
319
|
+
- File Key: `abc123`
|
|
320
|
+
- Main Components: Node IDs `1:2`, `3:4`, `5:6`
|
|
321
|
+
|
|
322
|
+
**Design Tokens Extracted:**
|
|
323
|
+
```json
|
|
324
|
+
{
|
|
325
|
+
"colors/primary": "#007AFF",
|
|
326
|
+
"spacing/base": "8px",
|
|
327
|
+
"typography/heading": "Inter Bold 24px"
|
|
328
|
+
}
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
**Generated Components:**
|
|
332
|
+
- Button: `src/components/ui/Button.tsx` (Node: 1:2)
|
|
333
|
+
- Card: `src/components/ui/Card.tsx` (Node: 3:4)
|
|
334
|
+
|
|
335
|
+
**User Flow Diagrams:**
|
|
336
|
+
- [Authentication Flow](figma-figjam-url)
|
|
337
|
+
- [Checkout Flow](figma-figjam-url)
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
### Handoff to @SA
|
|
341
|
+
```markdown
|
|
342
|
+
### Design-to-Code Mapping
|
|
343
|
+
|
|
344
|
+
**Figma Components → Code:**
|
|
345
|
+
| Component | Node ID | Code Path | Status |
|
|
346
|
+
|-----------|---------|-----------|--------|
|
|
347
|
+
| Button | 1:2 | src/components/ui/Button.tsx | Mapped |
|
|
348
|
+
| Card | 3:4 | src/components/ui/Card.tsx | Mapped |
|
|
349
|
+
|
|
350
|
+
**Design Tokens:**
|
|
351
|
+
- Extracted from Figma Variables
|
|
352
|
+
- Available in: `src/styles/tokens.ts`
|
|
353
|
+
|
|
354
|
+
### Next Step:
|
|
355
|
+
- @SA - Please review API requirements for these components
|
|
356
|
+
- @DEV - Figma code generation available for implementation
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
## Common Patterns
|
|
360
|
+
|
|
361
|
+
### Pattern 1: Component Library Setup
|
|
362
|
+
```javascript
|
|
363
|
+
// 1. Get all components metadata
|
|
364
|
+
const structure = await mcp_figma_get_metadata({
|
|
365
|
+
fileKey: "design-system",
|
|
366
|
+
nodeId: "0:1"
|
|
367
|
+
})
|
|
368
|
+
|
|
369
|
+
// 2. Extract design tokens
|
|
370
|
+
const tokens = await mcp_figma_get_variable_defs({
|
|
371
|
+
fileKey: "design-system",
|
|
372
|
+
nodeId: "tokens-page"
|
|
373
|
+
})
|
|
374
|
+
|
|
375
|
+
// 3. Generate each component
|
|
376
|
+
for (const component of components) {
|
|
377
|
+
const code = await mcp_figma_get_design_context({
|
|
378
|
+
fileKey: "design-system",
|
|
379
|
+
nodeId: component.id,
|
|
380
|
+
clientFrameworks: "react,nextjs"
|
|
381
|
+
})
|
|
382
|
+
|
|
383
|
+
// 4. Map to codebase
|
|
384
|
+
await mcp_figma_add_code_connect_map({
|
|
385
|
+
fileKey: "design-system",
|
|
386
|
+
nodeId: component.id,
|
|
387
|
+
source: `src/components/${component.name}.tsx`,
|
|
388
|
+
componentName: component.name,
|
|
389
|
+
label: "React"
|
|
390
|
+
})
|
|
391
|
+
}
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
### Pattern 2: Design Documentation
|
|
395
|
+
```javascript
|
|
396
|
+
// 1. Screenshot for specs
|
|
397
|
+
const screenshot = await mcp_figma_get_screenshot({
|
|
398
|
+
fileKey: "project",
|
|
399
|
+
nodeId: "screen-id"
|
|
400
|
+
})
|
|
401
|
+
|
|
402
|
+
// 2. Create flow diagram
|
|
403
|
+
const flowUrl = await mcp_figma_generate_diagram({
|
|
404
|
+
name: "User Flow",
|
|
405
|
+
mermaidSyntax: "flowchart LR..."
|
|
406
|
+
})
|
|
407
|
+
|
|
408
|
+
// 3. Include in design spec
|
|
409
|
+
// Add screenshot and flow diagram URLs to documentation
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
### Pattern 3: Responsive Design
|
|
413
|
+
```javascript
|
|
414
|
+
// Generate code for different breakpoints
|
|
415
|
+
const desktop = await mcp_figma_get_design_context({
|
|
416
|
+
fileKey: "project",
|
|
417
|
+
nodeId: "desktop-variant"
|
|
418
|
+
})
|
|
419
|
+
|
|
420
|
+
const mobile = await mcp_figma_get_design_context({
|
|
421
|
+
fileKey: "project",
|
|
422
|
+
nodeId: "mobile-variant"
|
|
423
|
+
})
|
|
424
|
+
|
|
425
|
+
// Combine into responsive component
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
## Troubleshooting
|
|
429
|
+
|
|
430
|
+
### Issue: "Unsupported response item type: resource_link"
|
|
431
|
+
**Solution:** This is a known MCP response format issue. The tool still works, just ignore the error.
|
|
432
|
+
|
|
433
|
+
### Issue: Invalid Node ID
|
|
434
|
+
**Solution:** Ensure format is "123:456" not "123-456". Replace hyphens with colons.
|
|
435
|
+
|
|
436
|
+
### Issue: File Key Not Found
|
|
437
|
+
**Solution:**
|
|
438
|
+
- Check URL format
|
|
439
|
+
- For branch URLs: `https://figma.com/design/:fileKey/branch/:branchKey/:fileName`
|
|
440
|
+
- Use `branchKey` as `fileKey`
|
|
441
|
+
|
|
442
|
+
### Issue: Code Generation Too Large
|
|
443
|
+
**Solution:** Use `forceCode: true` parameter or get metadata first to identify smaller nodes.
|
|
444
|
+
|
|
445
|
+
## Metrics to Track
|
|
446
|
+
|
|
447
|
+
- **Components Generated:** Number of Figma components converted to code
|
|
448
|
+
- **Design Tokens Extracted:** Number of variables documented
|
|
449
|
+
- **Code Mappings Created:** Figma nodes linked to codebase
|
|
450
|
+
- **Diagrams Created:** User flows and documentation diagrams
|
|
451
|
+
- **Time Saved:** Hours saved vs manual implementation
|
|
452
|
+
|
|
453
|
+
## Related Documentation
|
|
454
|
+
|
|
455
|
+
- `.agent/roles/role-uiux.md` - Full @UIUX role documentation
|
|
456
|
+
- `.agent/knowledge-base/features/figma-mcp-sa-guide.md` - @SA Figma integration
|
|
457
|
+
- Figma MCP Official Docs: [Link if available]
|
|
458
|
+
|
|
459
|
+
#figma #mcp #uiux #design #code-generation #compound-learning
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Lazy Loading and Code Splitting Optimization"
|
|
3
|
+
category: performance
|
|
4
|
+
priority: medium
|
|
5
|
+
sprint: sprint-[N]
|
|
6
|
+
date: 2026-01-02
|
|
7
|
+
tags: [performance, lazy-loading, code-splitting, optimization, web]
|
|
8
|
+
related_files: []
|
|
9
|
+
attempts: 1
|
|
10
|
+
time_saved: "1 hour (future reuse)"
|
|
11
|
+
author: "DEV"
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Problem
|
|
15
|
+
Initial page load slow due to loading all JavaScript/components at once, even those not immediately visible.
|
|
16
|
+
|
|
17
|
+
## Root Cause
|
|
18
|
+
Bundle includes all components regardless of whether they're needed on initial render. No code splitting enabled.
|
|
19
|
+
|
|
20
|
+
## Solution
|
|
21
|
+
|
|
22
|
+
### 1. Route-based Code Splitting (React/Next.js)
|
|
23
|
+
```tsx
|
|
24
|
+
import dynamic from 'next/dynamic';
|
|
25
|
+
|
|
26
|
+
const HeavyComponent = dynamic(() => import('./HeavyComponent'), {
|
|
27
|
+
loading: () => <Skeleton />,
|
|
28
|
+
ssr: false
|
|
29
|
+
});
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### 2. Component-based Lazy Loading (React)
|
|
33
|
+
```tsx
|
|
34
|
+
import { lazy, Suspense } from 'react';
|
|
35
|
+
|
|
36
|
+
const LazyChart = lazy(() => import('./ChartComponent'));
|
|
37
|
+
|
|
38
|
+
function Dashboard() {
|
|
39
|
+
return (
|
|
40
|
+
<Suspense fallback={<Loading />}>
|
|
41
|
+
<LazyChart />
|
|
42
|
+
</Suspense>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 3. Intersection Observer for Images
|
|
48
|
+
```tsx
|
|
49
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
50
|
+
const ref = useRef();
|
|
51
|
+
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
const observer = new IntersectionObserver(
|
|
54
|
+
([entry]) => setIsVisible(entry.isIntersecting),
|
|
55
|
+
{ threshold: 0.1 }
|
|
56
|
+
);
|
|
57
|
+
observer.observe(ref.current);
|
|
58
|
+
return () => observer.disconnect();
|
|
59
|
+
}, []);
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### 4. Astro Islands (for Astro projects)
|
|
63
|
+
```astro
|
|
64
|
+
<HeavyComponent client:visible />
|
|
65
|
+
<InteractiveWidget client:idle />
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Metrics to Track
|
|
69
|
+
- First Contentful Paint (FCP)
|
|
70
|
+
- Largest Contentful Paint (LCP)
|
|
71
|
+
- Time to Interactive (TTI)
|
|
72
|
+
- Bundle size reduction
|
|
73
|
+
|
|
74
|
+
## Prevention
|
|
75
|
+
1. Audit bundle size regularly with `webpack-bundle-analyzer`
|
|
76
|
+
2. Lazy load all below-fold content
|
|
77
|
+
3. Use `client:visible` in Astro for interactive components
|
|
78
|
+
4. Implement skeleton loading states
|
|
79
|
+
|
|
80
|
+
#performance #lazy-loading #optimization #web
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Windows Console Encoding Fix for Unicode Characters"
|
|
3
|
+
category: platform-specific
|
|
4
|
+
priority: medium
|
|
5
|
+
sprint: sprint-[N]
|
|
6
|
+
date: 2026-01-02
|
|
7
|
+
tags: [windows, encoding, python, unicode, console]
|
|
8
|
+
related_files: [tools/utils/common.py, bin/kb_cli.py]
|
|
9
|
+
attempts: 1
|
|
10
|
+
time_saved: "30 minutes (future reuse)"
|
|
11
|
+
author: "DEV"
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Problem
|
|
15
|
+
Python scripts on Windows console fail to print Unicode characters (checkmarks, emojis) due to default cp1252 encoding:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
'charmap' codec can't encode character '\u2713' in position 5
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Root Cause
|
|
22
|
+
Windows console uses cp1252 encoding by default which doesn't support Unicode. When scripts try to print ✓ (U+2713) or other Unicode characters, the encoding fails.
|
|
23
|
+
|
|
24
|
+
## Solution
|
|
25
|
+
|
|
26
|
+
### Option 1: Reconfigure stdout encoding (applied in kb_cli.py)
|
|
27
|
+
```python
|
|
28
|
+
if sys.platform == 'win32':
|
|
29
|
+
try:
|
|
30
|
+
sys.stdout.reconfigure(encoding='utf-8')
|
|
31
|
+
sys.stderr.reconfigure(encoding='utf-8')
|
|
32
|
+
except:
|
|
33
|
+
pass
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Option 2: Use ASCII fallbacks
|
|
37
|
+
```python
|
|
38
|
+
CHECKMARK = '✓' if sys.platform != 'win32' else '[OK]'
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Option 3: Environment variable
|
|
42
|
+
```bash
|
|
43
|
+
set PYTHONIOENCODING=utf-8
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Prevention
|
|
47
|
+
1. Always wrap Unicode output in try/except for Windows
|
|
48
|
+
2. Use ASCII fallbacks for cross-platform CLI tools
|
|
49
|
+
3. Test tools on Windows before release
|
|
50
|
+
4. Document encoding requirements in tool README
|
|
51
|
+
|
|
52
|
+
## Related Patterns
|
|
53
|
+
- Cross-platform CLI development
|
|
54
|
+
- Unicode handling in Python
|
|
55
|
+
|
|
56
|
+
#platform-specific #windows #encoding #python
|