aiag-cli 2.18.0 → 2.20.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.
Files changed (62) hide show
  1. package/.claude/commands/bmad/core/agents/bmad-master.md +14 -0
  2. package/.claude/commands/bmad/core/tasks/index-docs.md +9 -0
  3. package/.claude/commands/bmad/core/tasks/shard-doc.md +9 -0
  4. package/.claude/commands/bmad/core/workflows/brainstorming.md +5 -0
  5. package/.claude/commands/bmad/core/workflows/party-mode.md +5 -0
  6. package/.claude/settings.local.json +7 -0
  7. package/README.md +13 -0
  8. package/_bmad/_config/agent-manifest.csv +2 -0
  9. package/_bmad/_config/agents/core-bmad-master.customize.yaml +41 -0
  10. package/_bmad/_config/files-manifest.csv +31 -0
  11. package/_bmad/_config/ides/claude-code.yaml +6 -0
  12. package/_bmad/_config/manifest.yaml +8 -0
  13. package/_bmad/_config/task-manifest.csv +5 -0
  14. package/_bmad/_config/tool-manifest.csv +1 -0
  15. package/_bmad/_config/workflow-manifest.csv +3 -0
  16. package/_bmad/core/agents/bmad-master.md +57 -0
  17. package/_bmad/core/config.yaml +9 -0
  18. package/_bmad/core/resources/excalidraw/README.md +160 -0
  19. package/_bmad/core/resources/excalidraw/excalidraw-helpers.md +127 -0
  20. package/_bmad/core/resources/excalidraw/library-loader.md +50 -0
  21. package/_bmad/core/resources/excalidraw/validate-json-instructions.md +79 -0
  22. package/_bmad/core/tasks/index-docs.xml +65 -0
  23. package/_bmad/core/tasks/review-adversarial-general.xml +41 -0
  24. package/_bmad/core/tasks/shard-doc.xml +109 -0
  25. package/_bmad/core/tasks/workflow.xml +235 -0
  26. package/_bmad/core/workflows/advanced-elicitation/methods.csv +51 -0
  27. package/_bmad/core/workflows/advanced-elicitation/workflow.xml +117 -0
  28. package/_bmad/core/workflows/brainstorming/brain-methods.csv +62 -0
  29. package/_bmad/core/workflows/brainstorming/steps/step-01-session-setup.md +197 -0
  30. package/_bmad/core/workflows/brainstorming/steps/step-01b-continue.md +122 -0
  31. package/_bmad/core/workflows/brainstorming/steps/step-02a-user-selected.md +225 -0
  32. package/_bmad/core/workflows/brainstorming/steps/step-02b-ai-recommended.md +237 -0
  33. package/_bmad/core/workflows/brainstorming/steps/step-02c-random-selection.md +209 -0
  34. package/_bmad/core/workflows/brainstorming/steps/step-02d-progressive-flow.md +264 -0
  35. package/_bmad/core/workflows/brainstorming/steps/step-03-technique-execution.md +399 -0
  36. package/_bmad/core/workflows/brainstorming/steps/step-04-idea-organization.md +303 -0
  37. package/_bmad/core/workflows/brainstorming/template.md +15 -0
  38. package/_bmad/core/workflows/brainstorming/workflow.md +58 -0
  39. package/_bmad/core/workflows/party-mode/steps/step-01-agent-loading.md +139 -0
  40. package/_bmad/core/workflows/party-mode/steps/step-02-discussion-orchestration.md +204 -0
  41. package/_bmad/core/workflows/party-mode/steps/step-03-graceful-exit.md +159 -0
  42. package/_bmad/core/workflows/party-mode/workflow.md +206 -0
  43. package/dist/commands/connect.d.ts.map +1 -1
  44. package/dist/commands/connect.js +7 -4
  45. package/dist/commands/connect.js.map +1 -1
  46. package/dist/commands/init.d.ts.map +1 -1
  47. package/dist/commands/init.js +70 -0
  48. package/dist/commands/init.js.map +1 -1
  49. package/dist/commands/sync.d.ts.map +1 -1
  50. package/dist/commands/sync.js +3 -2
  51. package/dist/commands/sync.js.map +1 -1
  52. package/dist/types.d.ts +3 -1
  53. package/dist/types.d.ts.map +1 -1
  54. package/dist/utils/connection.d.ts +33 -4
  55. package/dist/utils/connection.d.ts.map +1 -1
  56. package/dist/utils/connection.js +50 -7
  57. package/dist/utils/connection.js.map +1 -1
  58. package/dist/utils/messages.d.ts +2 -0
  59. package/dist/utils/messages.d.ts.map +1 -1
  60. package/dist/utils/messages.js +3 -1
  61. package/dist/utils/messages.js.map +1 -1
  62. package/package.json +3 -1
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: 'bmad-master'
3
+ description: 'bmad-master agent'
4
+ ---
5
+
6
+ You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
7
+
8
+ <agent-activation CRITICAL="TRUE">
9
+ 1. LOAD the FULL agent file from @_bmad/core/agents/bmad-master.md
10
+ 2. READ its entire contents - this contains the complete agent persona, menu, and instructions
11
+ 3. Execute ALL activation steps exactly as written in the agent file
12
+ 4. Follow the agent's persona and menu system precisely
13
+ 5. Stay in character throughout the session
14
+ </agent-activation>
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: 'Generates or updates an index.md of all documents in the specified directory'
3
+ ---
4
+
5
+ # Index Docs
6
+
7
+ LOAD and execute the task at: _bmad/core/tasks/index-docs.xml
8
+
9
+ Follow all instructions in the task file exactly as written.
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: 'Splits large markdown documents into smaller, organized files based on level 2 (default) sections'
3
+ ---
4
+
5
+ # Shard Document
6
+
7
+ LOAD and execute the task at: _bmad/core/tasks/shard-doc.xml
8
+
9
+ Follow all instructions in the task file exactly as written.
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: 'Facilitate interactive brainstorming sessions using diverse creative techniques and ideation methods'
3
+ ---
4
+
5
+ IT IS CRITICAL THAT YOU FOLLOW THIS COMMAND: LOAD the FULL @_bmad/core/workflows/brainstorming/workflow.md, READ its entire contents and follow its directions exactly!
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: 'Orchestrates group discussions between all installed BMAD agents, enabling natural multi-agent conversations'
3
+ ---
4
+
5
+ IT IS CRITICAL THAT YOU FOLLOW THIS COMMAND: LOAD the FULL @_bmad/core/workflows/party-mode/workflow.md, READ its entire contents and follow its directions exactly!
@@ -0,0 +1,7 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [],
4
+ "deny": [],
5
+ "ask": []
6
+ }
7
+ }
package/README.md CHANGED
@@ -256,6 +256,19 @@ Anthropic의 Long-Running Agent 아키텍처 기반:
256
256
 
257
257
  ## 변경 이력
258
258
 
259
+ ### v2.18.0 (2026-01-07)
260
+
261
+ - **`aiag test --fix` 옵션**: 실패한 테스트 자동 수정 워크플로우
262
+ - testCommand 재생성: v2.17.0의 개선된 패턴 규칙으로 재생성
263
+ - 테스트 실행 후 성공 시 `passes: true` 자동 업데이트
264
+ - 사용법: `aiag test --fix`, `aiag test --failed --fix`
265
+
266
+ ### v2.17.0 (2026-01-07)
267
+
268
+ - **testCommand 자동 생성 개선**: acceptanceCriteria 기반 10가지 패턴 규칙
269
+ - 한글/영어 패턴 모두 지원
270
+ - 파일 존재, API 라우트, HTTP 핸들러, 컴포넌트 등 자동 검증
271
+
259
272
  ### v2.14.0 (2026-01-03)
260
273
 
261
274
  - **프로젝트 추가 문서 자동 통합**: `aiag feature` 실행 시 프로젝트의 추가 문서를 자동 검색하여 CLAUDE.md에 포함
@@ -0,0 +1,2 @@
1
+ name,displayName,title,icon,role,identity,communicationStyle,principles,module,path
2
+ "bmad-master","BMad Master","BMad Master Executor, Knowledge Custodian, and Workflow Orchestrator","🧙","Master Task Executor + BMad Expert + Guiding Facilitator Orchestrator","Master-level expert in the BMAD Core Platform and all loaded modules with comprehensive knowledge of all resources, tasks, and workflows. Experienced in direct task execution and runtime resource management, serving as the primary execution engine for BMAD operations.","Direct and comprehensive, refers to himself in the 3rd person. Expert-level communication focused on efficient task execution, presenting information systematically using numbered lists with immediate command response capability.","- &quot;Load resources at runtime never pre-load, and always present numbered lists for choices.&quot;","core","_bmad/core/agents/bmad-master.md"
@@ -0,0 +1,41 @@
1
+ # Agent Customization
2
+ # Customize any section below - all are optional
3
+
4
+ # Override agent name
5
+ agent:
6
+ metadata:
7
+ name: ""
8
+
9
+ # Replace entire persona (not merged)
10
+ persona:
11
+ role: ""
12
+ identity: ""
13
+ communication_style: ""
14
+ principles: []
15
+
16
+ # Add custom critical actions (appended after standard config loading)
17
+ critical_actions: []
18
+
19
+ # Add persistent memories for the agent
20
+ memories: []
21
+ # Example:
22
+ # memories:
23
+ # - "User prefers detailed technical explanations"
24
+ # - "Current project uses React and TypeScript"
25
+
26
+ # Add custom menu items (appended to base menu)
27
+ # Don't include * prefix or help/exit - auto-injected
28
+ menu: []
29
+ # Example:
30
+ # menu:
31
+ # - trigger: my-workflow
32
+ # workflow: "{project-root}/custom/my.yaml"
33
+ # description: My custom workflow
34
+
35
+ # Add custom prompts (for action="#id" handlers)
36
+ prompts: []
37
+ # Example:
38
+ # prompts:
39
+ # - id: my-prompt
40
+ # content: |
41
+ # Prompt instructions here
@@ -0,0 +1,31 @@
1
+ type,name,module,path,hash
2
+ "csv","agent-manifest","_config","_config/agent-manifest.csv","f9c7d9f4e9967f432933545313248b5f9f5629ad4d5bd1285d3ed186570b5f6b"
3
+ "csv","task-manifest","_config","_config/task-manifest.csv","f1581a8d78f818b0d8ac2a84bf13b74dec26f7a6b9696d9d4d277d239ec4ff68"
4
+ "csv","workflow-manifest","_config","_config/workflow-manifest.csv","dfbd7627a6894e106643522f4739006a4fa7e079b69de56066f81a2b18597d2a"
5
+ "yaml","manifest","_config","_config/manifest.yaml","bcf041d428f38395e97977b6c6713783e6698b5bfcacb88226826fcd2463da94"
6
+ "csv","brain-methods","core","core/workflows/brainstorming/brain-methods.csv","0ab5878b1dbc9e3fa98cb72abfc3920a586b9e2b42609211bb0516eefd542039"
7
+ "csv","methods","core","core/workflows/advanced-elicitation/methods.csv","e08b2e22fec700274982e37be608d6c3d1d4d0c04fa0bae05aa9dba2454e6141"
8
+ "md","excalidraw-helpers","core","core/resources/excalidraw/excalidraw-helpers.md","37f18fa0bd15f85a33e7526a2cbfe1d5a9404f8bcb8febc79b782361ef790de4"
9
+ "md","library-loader","core","core/resources/excalidraw/library-loader.md","7837112bd0acb5906870dff423a21564879d49c5322b004465666a42c52477ab"
10
+ "md","README","core","core/resources/excalidraw/README.md","72de8325d7289128f1c8afb3b0eea867ba90f4c029ca42e66a133cd9f92c285d"
11
+ "md","step-01-agent-loading","core","core/workflows/party-mode/steps/step-01-agent-loading.md","cd2ca8ec03576fd495cbaec749b3f840c82f7f0d485c8a884894a72d047db013"
12
+ "md","step-01-session-setup","core","core/workflows/brainstorming/steps/step-01-session-setup.md","0437c1263788b93f14b7d361af9059ddbc2cbb576974cbd469a58ea757ceba19"
13
+ "md","step-01b-continue","core","core/workflows/brainstorming/steps/step-01b-continue.md","a92fd1825a066f21922c5ac8d0744f0553ff4a6d5fc3fa998d12aea05ea2819c"
14
+ "md","step-02-discussion-orchestration","core","core/workflows/party-mode/steps/step-02-discussion-orchestration.md","a9afe48b2c43f191541f53abb3c15ef608f9970fa066dcb501e2c1071e5e7d02"
15
+ "md","step-02a-user-selected","core","core/workflows/brainstorming/steps/step-02a-user-selected.md","558b162466745b92687a5d6e218f243a98436dd177b2d5544846c5ff4497cc94"
16
+ "md","step-02b-ai-recommended","core","core/workflows/brainstorming/steps/step-02b-ai-recommended.md","99aa935279889f278dcb2a61ba191600a18e9db356dd8ce62f0048d3c37c9531"
17
+ "md","step-02c-random-selection","core","core/workflows/brainstorming/steps/step-02c-random-selection.md","f188c260c321c7f026051fefcd267a26ee18ce2a07f64bab7f453c0c3e483316"
18
+ "md","step-02d-progressive-flow","core","core/workflows/brainstorming/steps/step-02d-progressive-flow.md","a28c7a3edf34ceb0eea203bf7dc80f39ca04974f6d1ec243f0a088281b2e55de"
19
+ "md","step-03-graceful-exit","core","core/workflows/party-mode/steps/step-03-graceful-exit.md","f3299f538d651b55efb6e51ddc3536a228df63f16b1e0129a830cceb8e21303f"
20
+ "md","step-03-technique-execution","core","core/workflows/brainstorming/steps/step-03-technique-execution.md","f9a8ee4354fda0b9eb8fe3d30963eeebad76796cd12d9bcc72e4e7e9606b0803"
21
+ "md","step-04-idea-organization","core","core/workflows/brainstorming/steps/step-04-idea-organization.md","a1b7a17b95bb1c06fa678f65a56a9ac2fd9655871e99b9378c6b4afa5d574050"
22
+ "md","template","core","core/workflows/brainstorming/template.md","5c99d76963eb5fc21db96c5a68f39711dca7c6ed30e4f7d22aedee9e8bb964f9"
23
+ "md","validate-json-instructions","core","core/resources/excalidraw/validate-json-instructions.md","0970bac93d52b4ee591a11998a02d5682e914649a40725d623489c77f7a1e449"
24
+ "md","workflow","core","core/workflows/brainstorming/workflow.md","4c63ca09925befb1d0641bf22107b60ca723f92d68ccf2170a9c47a821ff0956"
25
+ "md","workflow","core","core/workflows/party-mode/workflow.md","851cbc7f57b856390be18464d38512337b52508cc634f327e4522e379c778573"
26
+ "xml","index-docs","core","core/tasks/index-docs.xml","13ffd40ccaed0f05b35e4f22255f023e77a6926e8a2f01d071b0b91a4c942812"
27
+ "xml","review-adversarial-general","core","core/tasks/review-adversarial-general.xml","05466fd1a0b207dd9987ba1e8674b40060025b105ba51f5b49fe852c44e51f12"
28
+ "xml","shard-doc","core","core/tasks/shard-doc.xml","dd4c834b62f9d7fbe4970d10a9c075fe9408195b0ee4c32bbdb699227d45a808"
29
+ "xml","workflow","core","core/tasks/workflow.xml","8f7ad9ff1d80251fa5df344ad70701605a74dcfc030c04708650f23b2606851a"
30
+ "xml","workflow","core","core/workflows/advanced-elicitation/workflow.xml","063e6aab417f9cc67ae391b1d89ba972fc890c123f8101b7180496d413a63d81"
31
+ "yaml","config","core","core/config.yaml","3c165e7929e623222ce809385273e8ce1147b1b36fc3574a55fa8de12e17988b"
@@ -0,0 +1,6 @@
1
+ ide: claude-code
2
+ configured_date: 2026-01-12T23:54:37.973Z
3
+ last_updated: 2026-01-12T23:54:37.973Z
4
+ configuration:
5
+ subagentChoices: null
6
+ installLocation: null
@@ -0,0 +1,8 @@
1
+ installation:
2
+ version: 6.0.0-alpha.23
3
+ installDate: 2026-01-12T23:54:37.953Z
4
+ lastUpdated: 2026-01-12T23:54:37.953Z
5
+ modules:
6
+ - core
7
+ ides:
8
+ - claude-code
@@ -0,0 +1,5 @@
1
+ name,displayName,description,module,path,standalone
2
+ "index-docs","Index Docs","Generates or updates an index.md of all documents in the specified directory","core","_bmad/core/tasks/index-docs.xml","true"
3
+ "review-adversarial-general","Adversarial Review (General)","Cynically review content and produce findings","core","_bmad/core/tasks/review-adversarial-general.xml","false"
4
+ "shard-doc","Shard Document","Splits large markdown documents into smaller, organized files based on level 2 (default) sections","core","_bmad/core/tasks/shard-doc.xml","true"
5
+ "workflow","Execute Workflow","Execute given workflow by loading its configuration, following instructions, and producing output","core","_bmad/core/tasks/workflow.xml","false"
@@ -0,0 +1 @@
1
+ name,displayName,description,module,path,standalone
@@ -0,0 +1,3 @@
1
+ name,description,module,path
2
+ "brainstorming","Facilitate interactive brainstorming sessions using diverse creative techniques and ideation methods","core","_bmad/core/workflows/brainstorming/workflow.md"
3
+ "party-mode","Orchestrates group discussions between all installed BMAD agents, enabling natural multi-agent conversations","core","_bmad/core/workflows/party-mode/workflow.md"
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: "bmad master"
3
+ description: "BMad Master Executor, Knowledge Custodian, and Workflow Orchestrator"
4
+ ---
5
+
6
+ You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
7
+
8
+ ```xml
9
+ <agent id="bmad-master.agent.yaml" name="BMad Master" title="BMad Master Executor, Knowledge Custodian, and Workflow Orchestrator" icon="🧙">
10
+ <activation critical="MANDATORY">
11
+ <step n="1">Load persona from this current agent file (already in context)</step>
12
+ <step n="2">🚨 IMMEDIATE ACTION REQUIRED - BEFORE ANY OUTPUT:
13
+ - Load and read {project-root}/_bmad/core/config.yaml NOW
14
+ - Store ALL fields as session variables: {user_name}, {communication_language}, {output_folder}
15
+ - VERIFY: If config not loaded, STOP and report error to user
16
+ - DO NOT PROCEED to step 3 until config is successfully loaded and variables stored
17
+ </step>
18
+ <step n="3">Remember: user's name is {user_name}</step>
19
+ <step n="4">Load into memory {project-root}/_bmad/core/config.yaml and set variable project_name, output_folder, user_name, communication_language</step>
20
+ <step n="5">Remember the users name is {user_name}</step>
21
+ <step n="6">ALWAYS communicate in {communication_language}</step>
22
+ <step n="7">Show greeting using {user_name} from config, communicate in {communication_language}, then display numbered list of ALL menu items from menu section</step>
23
+ <step n="8">STOP and WAIT for user input - do NOT execute menu items automatically - accept number or cmd trigger or fuzzy command match</step>
24
+ <step n="9">On user input: Number → execute menu item[n] | Text → case-insensitive substring match | Multiple matches → ask user to clarify | No match → show "Not recognized"</step>
25
+ <step n="10">When executing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item (workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handler instructions</step>
26
+
27
+ <menu-handlers>
28
+ <handlers>
29
+ <handler type="action">
30
+ When menu item has: action="#id" → Find prompt with id="id" in current agent XML, execute its content
31
+ When menu item has: action="text" → Execute the text directly as an inline instruction
32
+ </handler>
33
+ </handlers>
34
+ </menu-handlers>
35
+
36
+ <rules>
37
+ <r>ALWAYS communicate in {communication_language} UNLESS contradicted by communication_style.</r>
38
+ <r> Stay in character until exit selected</r>
39
+ <r> Display Menu items as the item dictates and in the order given.</r>
40
+ <r> Load files ONLY when executing a user chosen workflow or a command requires it, EXCEPTION: agent activation step 2 config.yaml</r>
41
+ </rules>
42
+ </activation> <persona>
43
+ <role>Master Task Executor + BMad Expert + Guiding Facilitator Orchestrator</role>
44
+ <identity>Master-level expert in the BMAD Core Platform and all loaded modules with comprehensive knowledge of all resources, tasks, and workflows. Experienced in direct task execution and runtime resource management, serving as the primary execution engine for BMAD operations.</identity>
45
+ <communication_style>Direct and comprehensive, refers to himself in the 3rd person. Expert-level communication focused on efficient task execution, presenting information systematically using numbered lists with immediate command response capability.</communication_style>
46
+ <principles>- &quot;Load resources at runtime never pre-load, and always present numbered lists for choices.&quot;</principles>
47
+ </persona>
48
+ <menu>
49
+ <item cmd="MH or fuzzy match on menu or help">[MH] Redisplay Menu Help</item>
50
+ <item cmd="CH or fuzzy match on chat">[CH] Chat with the Agent about anything</item>
51
+ <item cmd="LT or fuzzy match on list-tasks" action="list all tasks from {project-root}/_bmad/_config/task-manifest.csv">[LT] List Available Tasks</item>
52
+ <item cmd="LW or fuzzy match on list-workflows" action="list all workflows from {project-root}/_bmad/_config/workflow-manifest.csv">[LW] List Workflows</item>
53
+ <item cmd="PM or fuzzy match on party-mode" exec="{project-root}/_bmad/core/workflows/party-mode/workflow.md">[PM] Start Party Mode</item>
54
+ <item cmd="DA or fuzzy match on exit, leave, goodbye or dismiss agent">[DA] Dismiss Agent</item>
55
+ </menu>
56
+ </agent>
57
+ ```
@@ -0,0 +1,9 @@
1
+ # CORE Module Configuration
2
+ # Generated by BMAD installer
3
+ # Version: 6.0.0-alpha.23
4
+ # Date: 2026-01-12T23:54:37.947Z
5
+
6
+ user_name: aiag
7
+ communication_language: Korean
8
+ document_output_language: Korean
9
+ output_folder: "{project-root}/_bmad-output"
@@ -0,0 +1,160 @@
1
+ # Core Excalidraw Resources
2
+
3
+ Universal knowledge for creating Excalidraw diagrams. All agents that create Excalidraw files should reference these resources.
4
+
5
+ ## Purpose
6
+
7
+ Provides the **HOW** (universal knowledge) while agents provide the **WHAT** (domain-specific application).
8
+
9
+ **Core = "How to create Excalidraw elements"**
10
+
11
+ - How to group shapes with text labels
12
+ - How to calculate text width
13
+ - How to create arrows with proper bindings
14
+ - How to validate JSON syntax
15
+ - Base structure and primitives
16
+
17
+ **Agents = "What diagrams to create"**
18
+
19
+ - Frame Expert (BMM): Technical flowcharts, architecture diagrams, wireframes
20
+ - Presentation Master (CIS): Pitch decks, creative visuals, Rube Goldberg machines
21
+ - Tech Writer (BMM): Documentation diagrams, concept explanations
22
+
23
+ ## Files in This Directory
24
+
25
+ ### excalidraw-helpers.md
26
+
27
+ **Universal element creation patterns**
28
+
29
+ - Text width calculation
30
+ - Element grouping rules (shapes + labels)
31
+ - Grid alignment
32
+ - Arrow creation (straight, elbow)
33
+ - Theme application
34
+ - Validation checklist
35
+ - Optimization rules
36
+
37
+ **Agents reference this to:**
38
+
39
+ - Create properly grouped shapes
40
+ - Calculate text dimensions
41
+ - Connect elements with arrows
42
+ - Ensure valid structure
43
+
44
+ ### validate-json-instructions.md
45
+
46
+ **Universal JSON validation process**
47
+
48
+ - How to validate Excalidraw JSON
49
+ - Common errors and fixes
50
+ - Workflow integration
51
+ - Error recovery
52
+
53
+ **Agents reference this to:**
54
+
55
+ - Validate files after creation
56
+ - Fix syntax errors
57
+ - Ensure files can be opened in Excalidraw
58
+
59
+ ### library-loader.md (Future)
60
+
61
+ **How to load external .excalidrawlib files**
62
+
63
+ - Programmatic library loading
64
+ - Community library integration
65
+ - Custom library management
66
+
67
+ **Status:** To be developed when implementing external library support.
68
+
69
+ ## How Agents Use These Resources
70
+
71
+ ### Example: Frame Expert (Technical Diagrams)
72
+
73
+ ```yaml
74
+ # workflows/excalidraw-diagrams/create-flowchart/workflow.yaml
75
+ helpers: '{project-root}/_bmad/core/resources/excalidraw/excalidraw-helpers.md'
76
+ json_validation: '{project-root}/_bmad/core/resources/excalidraw/validate-json-instructions.md'
77
+ ```
78
+
79
+ **Domain-specific additions:**
80
+
81
+ ```yaml
82
+ # workflows/excalidraw-diagrams/_shared/flowchart-templates.yaml
83
+ flowchart:
84
+ start_node:
85
+ type: ellipse
86
+ width: 120
87
+ height: 60
88
+ process_box:
89
+ type: rectangle
90
+ width: 160
91
+ height: 80
92
+ decision_diamond:
93
+ type: diamond
94
+ width: 140
95
+ height: 100
96
+ ```
97
+
98
+ ### Example: Presentation Master (Creative Visuals)
99
+
100
+ ```yaml
101
+ # workflows/create-visual-metaphor/workflow.yaml
102
+ helpers: '{project-root}/_bmad/core/resources/excalidraw/excalidraw-helpers.md'
103
+ json_validation: '{project-root}/_bmad/core/resources/excalidraw/validate-json-instructions.md'
104
+ ```
105
+
106
+ **Domain-specific additions:**
107
+
108
+ ```yaml
109
+ # workflows/_shared/creative-templates.yaml
110
+ rube_goldberg:
111
+ whimsical_connector:
112
+ type: arrow
113
+ strokeStyle: dashed
114
+ roughness: 2
115
+ playful_box:
116
+ type: rectangle
117
+ roundness: 12
118
+ ```
119
+
120
+ ## What Doesn't Belong in Core
121
+
122
+ **Domain-Specific Elements:**
123
+
124
+ - Flowchart-specific templates (belongs in Frame Expert)
125
+ - Pitch deck layouts (belongs in Presentation Master)
126
+ - Documentation-specific styles (belongs in Tech Writer)
127
+
128
+ **Agent Workflows:**
129
+
130
+ - How to create a flowchart (Frame Expert workflow)
131
+ - How to create a pitch deck (Presentation Master workflow)
132
+ - Step-by-step diagram creation (agent-specific)
133
+
134
+ **Theming:**
135
+
136
+ - Currently in agent workflows
137
+ - **Future:** Will be refactored to core as user-configurable themes
138
+
139
+ ## Architecture Principle
140
+
141
+ **Single Source of Truth:**
142
+
143
+ - Core holds universal knowledge
144
+ - Agents reference core, don't duplicate
145
+ - Updates to core benefit all agents
146
+ - Agents specialize with domain knowledge
147
+
148
+ **DRY (Don't Repeat Yourself):**
149
+
150
+ - Element creation logic: ONCE in core
151
+ - Text width calculation: ONCE in core
152
+ - Validation process: ONCE in core
153
+ - Arrow binding patterns: ONCE in core
154
+
155
+ ## Future Enhancements
156
+
157
+ 1. **External Library Loader** - Load .excalidrawlib files from libraries.excalidraw.com
158
+ 2. **Theme Management** - User-configurable color themes saved in core
159
+ 3. **Component Library** - Shared reusable components across agents
160
+ 4. **Layout Algorithms** - Auto-layout helpers for positioning elements
@@ -0,0 +1,127 @@
1
+ # Excalidraw Element Creation Guidelines
2
+
3
+ ## Text Width Calculation
4
+
5
+ For text elements inside shapes (labels):
6
+
7
+ ```
8
+ text_width = (text.length × fontSize × 0.6) + 20
9
+ ```
10
+
11
+ Round to nearest 10 for grid alignment.
12
+
13
+ ## Element Grouping Rules
14
+
15
+ **CRITICAL:** When creating shapes with labels:
16
+
17
+ 1. Generate unique IDs:
18
+ - `shape-id` for the shape
19
+ - `text-id` for the text
20
+ - `group-id` for the group
21
+
22
+ 2. Shape element must have:
23
+ - `groupIds: [group-id]`
24
+ - `boundElements: [{type: "text", id: text-id}]`
25
+
26
+ 3. Text element must have:
27
+ - `containerId: shape-id`
28
+ - `groupIds: [group-id]` (SAME as shape)
29
+ - `textAlign: "center"`
30
+ - `verticalAlign: "middle"`
31
+ - `width: calculated_width`
32
+
33
+ ## Grid Alignment
34
+
35
+ - Snap all `x`, `y` coordinates to 20px grid
36
+ - Formula: `Math.round(value / 20) * 20`
37
+ - Spacing between elements: 60px minimum
38
+
39
+ ## Arrow Creation
40
+
41
+ ### Straight Arrows
42
+
43
+ Use for forward flow (left-to-right, top-to-bottom):
44
+
45
+ ```json
46
+ {
47
+ "type": "arrow",
48
+ "startBinding": {
49
+ "elementId": "source-shape-id",
50
+ "focus": 0,
51
+ "gap": 10
52
+ },
53
+ "endBinding": {
54
+ "elementId": "target-shape-id",
55
+ "focus": 0,
56
+ "gap": 10
57
+ },
58
+ "points": [[0, 0], [distance_x, distance_y]]
59
+ }
60
+ ```
61
+
62
+ ### Elbow Arrows
63
+
64
+ Use for upward flow, backward flow, or complex routing:
65
+
66
+ ```json
67
+ {
68
+ "type": "arrow",
69
+ "startBinding": {...},
70
+ "endBinding": {...},
71
+ "points": [
72
+ [0, 0],
73
+ [intermediate_x, 0],
74
+ [intermediate_x, intermediate_y],
75
+ [final_x, final_y]
76
+ ],
77
+ "elbowed": true
78
+ }
79
+ ```
80
+
81
+ ### Update Connected Shapes
82
+
83
+ After creating arrow, update `boundElements` on both connected shapes:
84
+
85
+ ```json
86
+ {
87
+ "id": "shape-id",
88
+ "boundElements": [
89
+ { "type": "text", "id": "text-id" },
90
+ { "type": "arrow", "id": "arrow-id" }
91
+ ]
92
+ }
93
+ ```
94
+
95
+ ## Theme Application
96
+
97
+ Theme colors should be applied consistently:
98
+
99
+ - **Shapes**: `backgroundColor` from theme primary fill
100
+ - **Borders**: `strokeColor` from theme accent
101
+ - **Text**: `strokeColor` = "#1e1e1e" (dark text)
102
+ - **Arrows**: `strokeColor` from theme accent
103
+
104
+ ## Validation Checklist
105
+
106
+ Before saving, verify:
107
+
108
+ - [ ] All shapes with labels have matching `groupIds`
109
+ - [ ] All text elements have `containerId` pointing to parent shape
110
+ - [ ] Text width calculated properly (no cutoff)
111
+ - [ ] Text alignment set (`textAlign` + `verticalAlign`)
112
+ - [ ] All elements snapped to 20px grid
113
+ - [ ] All arrows have `startBinding` and `endBinding`
114
+ - [ ] `boundElements` array updated on connected shapes
115
+ - [ ] Theme colors applied consistently
116
+ - [ ] No metadata or history in final output
117
+ - [ ] All IDs are unique
118
+
119
+ ## Optimization
120
+
121
+ Remove from final output:
122
+
123
+ - `appState` object
124
+ - `files` object (unless images used)
125
+ - All elements with `isDeleted: true`
126
+ - Unused library items
127
+ - Version history
@@ -0,0 +1,50 @@
1
+ # External Library Loader
2
+
3
+ **Status:** Placeholder for future implementation
4
+
5
+ ## Purpose
6
+
7
+ Load external .excalidrawlib files from <https://libraries.excalidraw.com> or custom sources.
8
+
9
+ ## Planned Capabilities
10
+
11
+ - Load libraries by URL
12
+ - Load libraries from local files
13
+ - Merge multiple libraries
14
+ - Filter library components
15
+ - Cache loaded libraries
16
+
17
+ ## API Reference
18
+
19
+ Will document how to use:
20
+
21
+ - `importLibrary(url)` - Load library from URL
22
+ - `loadSceneOrLibraryFromBlob()` - Load from file
23
+ - `mergeLibraryItems()` - Combine libraries
24
+
25
+ ## Usage Example
26
+
27
+ ```yaml
28
+ # Future workflow.yaml structure
29
+ libraries:
30
+ - url: 'https://libraries.excalidraw.com/libraries/...'
31
+ filter: ['aws', 'cloud']
32
+ - path: '{project-root}/_data/custom-library.excalidrawlib'
33
+ ```
34
+
35
+ ## Implementation Notes
36
+
37
+ This will be developed when agents need to leverage the extensive library ecosystem available at <https://libraries.excalidraw.com>.
38
+
39
+ Hundreds of pre-built component libraries exist for:
40
+
41
+ - AWS/Cloud icons
42
+ - UI/UX components
43
+ - Business diagrams
44
+ - Mind map shapes
45
+ - Floor plans
46
+ - And much more...
47
+
48
+ ## User Configuration
49
+
50
+ Future: Users will be able to configure favorite libraries in their BMAD config for automatic loading.