@zenuml/core 3.47.9 → 3.48.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 (204) hide show
  1. package/dist/cloud-icons-eHuugVSv.js.map +1 -0
  2. package/dist/zenuml.esm.mjs +2153 -2156
  3. package/dist/zenuml.esm.mjs.map +1 -0
  4. package/dist/zenuml.js +82 -82
  5. package/dist/zenuml.js.map +1 -0
  6. package/package.json +11 -1
  7. package/src/cli/zenuml.ts +1164 -0
  8. package/.agents/skills/babysit-pr/SKILL.md +0 -223
  9. package/.agents/skills/babysit-pr/agents/openai.yaml +0 -7
  10. package/.agents/skills/dia-scoring/SKILL.md +0 -139
  11. package/.agents/skills/dia-scoring/agents/openai.yaml +0 -7
  12. package/.agents/skills/dia-scoring/references/selectors-and-keys.md +0 -253
  13. package/.agents/skills/land-pr/SKILL.md +0 -120
  14. package/.agents/skills/propagate-core-release/SKILL.md +0 -205
  15. package/.agents/skills/propagate-core-release/agents/openai.yaml +0 -7
  16. package/.agents/skills/propagate-core-release/references/downstreams.md +0 -42
  17. package/.agents/skills/ship-branch/SKILL.md +0 -105
  18. package/.agents/skills/submit-branch/SKILL.md +0 -76
  19. package/.agents/skills/validate-branch/SKILL.md +0 -72
  20. package/.claude/commands/README.md +0 -162
  21. package/.claude/commands/analyze.md +0 -101
  22. package/.claude/commands/clarify.md +0 -158
  23. package/.claude/commands/code-review.md +0 -322
  24. package/.claude/commands/constitution.md +0 -73
  25. package/.claude/commands/create-docs.md +0 -309
  26. package/.claude/commands/full-context.md +0 -121
  27. package/.claude/commands/gemini-consult.md +0 -164
  28. package/.claude/commands/handoff.md +0 -146
  29. package/.claude/commands/implement.md +0 -56
  30. package/.claude/commands/plan.md +0 -43
  31. package/.claude/commands/refactor.md +0 -188
  32. package/.claude/commands/specify.md +0 -21
  33. package/.claude/commands/tasks.md +0 -62
  34. package/.claude/commands/update-docs.md +0 -314
  35. package/.claude/hooks/README.md +0 -270
  36. package/.claude/hooks/config/sensitive-patterns.json +0 -86
  37. package/.claude/hooks/gemini-context-injector.sh +0 -129
  38. package/.claude/hooks/mcp-security-scan.sh +0 -147
  39. package/.claude/hooks/notify.sh +0 -103
  40. package/.claude/hooks/setup/hook-setup.md +0 -96
  41. package/.claude/hooks/setup/settings.json.template +0 -63
  42. package/.claude/hooks/sounds/complete.wav +0 -0
  43. package/.claude/hooks/sounds/input-needed.wav +0 -0
  44. package/.claude/hooks/subagent-context-injector.sh +0 -65
  45. package/.claude/skills/babysit-pr/SKILL.md +0 -223
  46. package/.claude/skills/babysit-pr/agents/openai.yaml +0 -7
  47. package/.claude/skills/dia-scoring/SKILL.md +0 -139
  48. package/.claude/skills/dia-scoring/agents/openai.yaml +0 -7
  49. package/.claude/skills/dia-scoring/references/selectors-and-keys.md +0 -253
  50. package/.claude/skills/emoji-eval/SKILL.md +0 -187
  51. package/.claude/skills/land-pr/SKILL.md +0 -120
  52. package/.claude/skills/propagate-core-release/SKILL.md +0 -205
  53. package/.claude/skills/propagate-core-release/agents/openai.yaml +0 -7
  54. package/.claude/skills/propagate-core-release/references/downstreams.md +0 -42
  55. package/.claude/skills/ship-branch/SKILL.md +0 -105
  56. package/.claude/skills/submit-branch/SKILL.md +0 -76
  57. package/.claude/skills/validate-branch/SKILL.md +0 -72
  58. package/.claude/skills/zenuml-ux-research/SKILL.md +0 -183
  59. package/.claude/skills/zenuml-ux-research/references/assertion-catalog.md +0 -261
  60. package/.claude/skills/zenuml-ux-research/references/best-practices-overview.md +0 -56
  61. package/.claude/skills/zenuml-ux-research/references/report-template.md +0 -89
  62. package/.claude/skills/zenuml-ux-research/references/scenarios/edit-message-label.md +0 -37
  63. package/.claude/skills/zenuml-ux-research/references/scenarios/insert-message.md +0 -36
  64. package/.claude/skills/zenuml-ux-research/references/scenarios/insert-participant.md +0 -31
  65. package/.claude/skills/zenuml-ux-research/references/scenarios/rename-participant.md +0 -33
  66. package/.claude/skills/zenuml-ux-research/references/scenarios/undo-insert.md +0 -35
  67. package/.devcontainer/devcontainer.json +0 -21
  68. package/.dockerignore +0 -19
  69. package/.eslintrc.js +0 -39
  70. package/.git-blame-ignore-revs +0 -6
  71. package/.kiro/hooks/README.md +0 -38
  72. package/.kiro/hooks/session-sound-notification.js +0 -44
  73. package/.kiro/hooks/session-sound-notification.json +0 -23
  74. package/.mcp.json.example +0 -17
  75. package/.nvmrc +0 -1
  76. package/.prettierignore +0 -4
  77. package/.prettierrc +0 -1
  78. package/.specify/memory/constitution.md +0 -33
  79. package/.specify/scripts/bash/check-prerequisites.sh +0 -166
  80. package/.specify/scripts/bash/common.sh +0 -113
  81. package/.specify/scripts/bash/create-new-feature.sh +0 -97
  82. package/.specify/scripts/bash/setup-plan.sh +0 -60
  83. package/.specify/scripts/bash/update-agent-context.sh +0 -728
  84. package/.specify/templates/agent-file-template.md +0 -23
  85. package/.specify/templates/plan-template.md +0 -219
  86. package/.specify/templates/spec-template.md +0 -116
  87. package/.specify/templates/tasks-template.md +0 -127
  88. package/.storybook/main.ts +0 -25
  89. package/.storybook/preview.ts +0 -29
  90. package/.watchmanconfig +0 -3
  91. package/AGENTS.md +0 -26
  92. package/CLAUDE.md +0 -124
  93. package/DEPLOYMENT.md +0 -62
  94. package/Dockerfile +0 -36
  95. package/IMPLEMENTATION_PLAN.md +0 -163
  96. package/Integration/vanilla-js/index.html +0 -42
  97. package/MCP-ASSISTANT-RULES.md +0 -85
  98. package/README_CN.md +0 -15
  99. package/TUTORIAL.md +0 -116
  100. package/antlr/antlr-4.11.1-complete.jar +0 -0
  101. package/bun.lock +0 -1544
  102. package/bunfig.toml +0 -52
  103. package/docs/UNICODE_SUPPORT.md +0 -179
  104. package/docs/ai-context/deployment-infrastructure.md +0 -21
  105. package/docs/ai-context/docs-overview.md +0 -89
  106. package/docs/ai-context/handoff.md +0 -174
  107. package/docs/ai-context/project-structure.md +0 -160
  108. package/docs/ai-context/system-integration.md +0 -21
  109. package/docs/asciidoc/contributor.adoc +0 -54
  110. package/docs/asciidoc/create-my-own-theme.adoc +0 -149
  111. package/docs/asciidoc/images/creation-component.png +0 -0
  112. package/docs/asciidoc/images/creation-rtl.png +0 -0
  113. package/docs/asciidoc/images/message-arrow-rtl.png +0 -0
  114. package/docs/asciidoc/images/occurrence.png +0 -0
  115. package/docs/asciidoc/images/return-message-conflict.png +0 -0
  116. package/docs/asciidoc/images/shift-up-half-the-height.png +0 -0
  117. package/docs/asciidoc/images/three-layer-info-arch.png +0 -0
  118. package/docs/asciidoc/images/vertical-alignment.svg +0 -1
  119. package/docs/asciidoc/images/vertically-aligning.png +0 -0
  120. package/docs/asciidoc/index.adoc +0 -277
  121. package/docs/asciidoc/theme-debug-web-app.png +0 -0
  122. package/docs/asciidoc/tutorial.adoc +0 -22
  123. package/docs/asciidoc/user-css.png +0 -0
  124. package/docs/async-vs-sync-parser-rules.md +0 -81
  125. package/docs/divider-parser-allow-spaces.md +0 -38
  126. package/docs/highlighting-messages.md +0 -52
  127. package/docs/images/editor-sample.png +0 -0
  128. package/docs/inherited-vs-provided-from.md +0 -64
  129. package/docs/parser/Assignment.md +0 -8
  130. package/docs/parser/PARSER_IMPROVEMENTS_CC.md +0 -425
  131. package/docs/parser/grammar_review_gemini.md +0 -116
  132. package/docs/participants-function.md +0 -25
  133. package/docs/responsive-participant-margin.md +0 -52
  134. package/docs/starter.md +0 -9
  135. package/docs/superpowers/plans/2026-03-27-e2e-test-reorg.md +0 -698
  136. package/docs/superpowers/plans/2026-03-30-emoji-support.md +0 -1220
  137. package/docs/superpowers/plans/2026-03-30-self-correcting-scoring.md +0 -206
  138. package/docs/superpowers/plans/2026-04-15-keyboard-editing-on-diagram.md +0 -1992
  139. package/docs/superpowers/plans/2026-04-15-zenuml-ux-research-skill.md +0 -1452
  140. package/docs/ux-research/.gitkeep +0 -0
  141. package/docs/ux-research/2026-04-15-rename-participant.md +0 -156
  142. package/docs/ux-research/2026-04-18-insert-participant.md +0 -151
  143. package/docs/width-translate-and-offsets.md +0 -62
  144. package/docs/xss.md +0 -59
  145. package/e2e/data/compare-cases.js +0 -1090
  146. package/e2e/data/diff-algorithm.js +0 -199
  147. package/e2e/fixtures/create-message.html +0 -26
  148. package/e2e/fixtures/editable-label.html +0 -35
  149. package/e2e/fixtures/editable-span.html +0 -122
  150. package/e2e/fixtures/empty-diagram.html +0 -23
  151. package/e2e/fixtures/fixture.html +0 -31
  152. package/e2e/fixtures/insert-participant.html +0 -23
  153. package/e2e/fixtures/reorder-cross-fragment.html +0 -31
  154. package/e2e/fixtures/reorder-fragment.html +0 -29
  155. package/e2e/fixtures/reorder-message.html +0 -27
  156. package/e2e/fixtures/svg-test.html +0 -21
  157. package/e2e/fixtures/type-switch.html +0 -29
  158. package/e2e/tools/canonical-history.html +0 -908
  159. package/e2e/tools/compare-case.html +0 -371
  160. package/e2e/tools/compare.html +0 -35
  161. package/e2e/tools/native-diff-ext/background.js +0 -60
  162. package/e2e/tools/native-diff-ext/bridge.js +0 -26
  163. package/e2e/tools/native-diff-ext/content.js +0 -194
  164. package/e2e/tools/svg-preview.html +0 -56
  165. package/embed.html +0 -193
  166. package/eslint.config.mjs +0 -35
  167. package/firebase-debug.log +0 -108
  168. package/iframe-container-demo/diagram.html +0 -124
  169. package/iframe-container-demo/host.html +0 -817
  170. package/index.html +0 -771
  171. package/mermaid-zenuml-async-spa-auth.png +0 -0
  172. package/mermaid-zenuml-async-spa-auth.snapshot.md +0 -96
  173. package/newsletter/unicode-support-announcement.md +0 -134
  174. package/playground/creation.html +0 -53
  175. package/playground/message.html +0 -63
  176. package/playwright.config.ts +0 -40
  177. package/renderer.html +0 -366
  178. package/scripts/analyze-compare-case/collect-data.mjs +0 -1134
  179. package/scripts/analyze-compare-case/config.mjs +0 -102
  180. package/scripts/analyze-compare-case/geometry.mjs +0 -101
  181. package/scripts/analyze-compare-case/native-diff.mjs +0 -224
  182. package/scripts/analyze-compare-case/output.mjs +0 -74
  183. package/scripts/analyze-compare-case/panel-diff.mjs +0 -114
  184. package/scripts/analyze-compare-case/report.mjs +0 -162
  185. package/scripts/analyze-compare-case/residual-scopes.mjs +0 -347
  186. package/scripts/analyze-compare-case/scoring.mjs +0 -829
  187. package/scripts/analyze-compare-case.mjs +0 -149
  188. package/scripts/bump-version.js +0 -117
  189. package/scripts/snapshot-dual.js +0 -173
  190. package/scripts/update-snapshots.js +0 -70
  191. package/skills/dia-scoring/SKILL.md +0 -129
  192. package/skills/dia-scoring/agents/openai.yaml +0 -7
  193. package/skills/dia-scoring/references/selectors-and-keys.md +0 -253
  194. package/tailwind.config.js +0 -126
  195. package/test-compression.html +0 -274
  196. package/test-mermaid-zenuml.html +0 -57
  197. package/test-setup.ts +0 -124
  198. package/test-url-params.html +0 -192
  199. package/tsconfig.app.json +0 -31
  200. package/tsconfig.node.json +0 -24
  201. package/tsconfig.test.json +0 -9
  202. package/vite.config.lib.ts +0 -93
  203. package/vite.config.ts +0 -84
  204. package/wrangler.toml +0 -18
@@ -1,146 +0,0 @@
1
- You are concluding work on the VR Language Learning App project and need to create a comprehensive handoff for the next AI session. This command intelligently analyzes your current session achievements and updates the handoff document with both auto-detected progress and user-provided context.
2
-
3
- ## Auto-Loaded Project Context:
4
- @docs/ai-context/HANDOFF.md
5
- @/CLAUDE.md
6
-
7
- ## Step 1: Process User Arguments
8
-
9
- Handle the arguments flexibly:
10
- - **With Arguments**: `$ARGUMENTS` provides user context about what was accomplished or attempted
11
- - **Without Arguments**: Focus purely on auto-detection from session analysis
12
-
13
- User provided context: "$ARGUMENTS"
14
-
15
- ## Step 2: Analyze Current Session Achievements
16
-
17
- Think about what was accomplished in this session and how to best capture it for handoff. Review your recent conversation and tool usage to identify significant work:
18
-
19
- **Auto-Detect Evidence of:**
20
- - **File Operations** (Write, Edit, MultiEdit tools) - what files were modified and why
21
- - **New Features** - functionality added or implemented
22
- - **Bug Fixes** - issues resolved or debugging attempts
23
- - **Architecture Changes** - structural improvements or refactoring
24
- - **Configuration Updates** - settings, dependencies, or environment changes
25
- - **Documentation Work** - updates to documentation files
26
- - **Incomplete Work** - attempts that didn't reach completion
27
- - **Blockers Encountered** - issues that prevented completion
28
-
29
- **Generate Session Summary:**
30
- ```
31
- Session Analysis:
32
- - Primary work area: [component/domain affected]
33
- - Main accomplishments: [key achievements]
34
- - Files modified: [list of changed files]
35
- - Status: [completed/in-progress/blocked]
36
- - User context: [if $ARGUMENTS provided]
37
- ```
38
-
39
- ## Step 3: Analyze Auto-Loaded HANDOFF.md
40
-
41
- Analyze the auto-loaded `docs/ai-context/HANDOFF.md` to understand:
42
- - **Existing sections** and their current status
43
- - **Related ongoing work** that might connect to your session
44
- - **Structure and formatting** patterns to maintain consistency
45
- - **Unrelated content** that should be preserved
46
-
47
- ## Step 4: Determine Update Strategy
48
-
49
- Think about how to best update the handoff based on this session's work. Based on your session analysis and the auto-loaded existing handoff content, decide:
50
-
51
- **If Current Work Relates to Existing Task:**
52
- - Update the existing section with new progress
53
- - Add accomplishments to "What Was Accomplished"
54
- - Update "Current Status" and "Current Issue" if resolved
55
- - Modify "Next Steps" based on new state
56
-
57
- **If Current Work is New/Unrelated:**
58
- - Create a new section with descriptive title
59
- - Include timestamp for session identification
60
- - Follow existing document structure and formatting
61
-
62
- **If Work Completed an Existing Task:**
63
- - Mark the task as completed
64
- - Summarize final outcome
65
- - Consider archiving or removing if fully resolved
66
-
67
- ## Step 5: Update HANDOFF.md Intelligently
68
-
69
- Make targeted updates to the auto-loaded HANDOFF.md:
70
-
71
- ### For New Sections, Include:
72
- ```markdown
73
- ## [Task Title] - [Status]
74
-
75
- ### Current Status
76
- [Brief description of current state]
77
-
78
- ### What Was Accomplished
79
- [Bulleted list of concrete achievements with file paths]
80
-
81
- ### Current Issue (if applicable)
82
- [Any blockers or unresolved problems]
83
-
84
- ### Next Steps to [Objective]
85
- [Actionable items for continuation]
86
-
87
- ### Key Files to Review
88
- [List of relevant files organized by category]
89
-
90
- ### Context for Next Session
91
- [Important notes for continuity]
92
- ```
93
-
94
- ### For Updates to Existing Sections:
95
- - **Add to accomplishments** without duplicating existing content
96
- - **Update status** if progress changed the situation
97
- - **Modify current issues** if problems were resolved or new ones discovered
98
- - **Refresh next steps** based on new progress
99
-
100
- ## Step 6: Maintain Document Quality
101
-
102
- Ensure your updates follow these guidelines:
103
-
104
- **Content Quality:**
105
- - **Specific**: Include exact file paths and technical details
106
- - **Actionable**: Provide clear next steps for continuation
107
- - **Contextual**: Explain the reasoning behind decisions
108
- - **Current**: Reflect the actual state after your session
109
-
110
- **Formatting Consistency:**
111
- - Follow existing markdown structure and patterns
112
- - Use consistent heading levels and formatting
113
- - Maintain bullet point styles and organization
114
- - Preserve the document's overall structure
115
-
116
- **Information Management:**
117
- - **Don't duplicate** existing information unless updating it
118
- - **Preserve unrelated** sections that weren't part of your work
119
- - **Consolidate** related information rather than fragmenting it
120
- - **Archive completed** work appropriately
121
-
122
- ## Step 7: Final Verification
123
-
124
- Before completing, verify that your handoff:
125
- - **Accurately reflects** what was accomplished in the session
126
- - **Combines** auto-detected technical changes with user-provided context
127
- - **Provides clear direction** for the next AI session
128
- - **Maintains continuity** with existing handoff content
129
- - **Is immediately actionable** for someone picking up the work
130
-
131
- ## Quality Standards
132
-
133
- **Be Comprehensive But Concise:**
134
- - Include all relevant technical details
135
- - Focus on actionable information
136
- - Avoid redundancy with existing content
137
-
138
- **Maintain Professional Handoff Quality:**
139
- - Clear problem statements and current status
140
- - Specific file references and technical context
141
- - Logical next steps that build on current progress
142
- - Helpful context that speeds up the next session
143
-
144
- This intelligent handoff approach ensures smooth continuity between AI sessions while capturing both the technical reality of what was accomplished and the user's perspective on the work.
145
-
146
- Now analyze your session, combine it with the user context "$ARGUMENTS", and update the handoff document accordingly.
@@ -1,56 +0,0 @@
1
- ---
2
- description: Execute the implementation plan by processing and executing all tasks defined in tasks.md
3
- ---
4
-
5
- The user input can be provided directly by the agent or as a command argument - you **MUST** consider it before proceeding with the prompt (if not empty).
6
-
7
- User input:
8
-
9
- $ARGUMENTS
10
-
11
- 1. Run `.specify/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks` from repo root and parse FEATURE_DIR and AVAILABLE_DOCS list. All paths must be absolute.
12
-
13
- 2. Load and analyze the implementation context:
14
- - **REQUIRED**: Read tasks.md for the complete task list and execution plan
15
- - **REQUIRED**: Read plan.md for tech stack, architecture, and file structure
16
- - **IF EXISTS**: Read data-model.md for entities and relationships
17
- - **IF EXISTS**: Read contracts/ for API specifications and test requirements
18
- - **IF EXISTS**: Read research.md for technical decisions and constraints
19
- - **IF EXISTS**: Read quickstart.md for integration scenarios
20
-
21
- 3. Parse tasks.md structure and extract:
22
- - **Task phases**: Setup, Tests, Core, Integration, Polish
23
- - **Task dependencies**: Sequential vs parallel execution rules
24
- - **Task details**: ID, description, file paths, parallel markers [P]
25
- - **Execution flow**: Order and dependency requirements
26
-
27
- 4. Execute implementation following the task plan:
28
- - **Phase-by-phase execution**: Complete each phase before moving to the next
29
- - **Respect dependencies**: Run sequential tasks in order, parallel tasks [P] can run together
30
- - **Follow TDD approach**: Execute test tasks before their corresponding implementation tasks
31
- - **File-based coordination**: Tasks affecting the same files must run sequentially
32
- - **Validation checkpoints**: Verify each phase completion before proceeding
33
-
34
- 5. Implementation execution rules:
35
- - **Setup first**: Initialize project structure, dependencies, configuration
36
- - **Tests before code**: If you need to write tests for contracts, entities, and integration scenarios
37
- - **Core development**: Implement models, services, CLI commands, endpoints
38
- - **Integration work**: Database connections, middleware, logging, external services
39
- - **Polish and validation**: Unit tests, performance optimization, documentation
40
-
41
- 6. Progress tracking and error handling:
42
- - Report progress after each completed task
43
- - Halt execution if any non-parallel task fails
44
- - For parallel tasks [P], continue with successful tasks, report failed ones
45
- - Provide clear error messages with context for debugging
46
- - Suggest next steps if implementation cannot proceed
47
- - **IMPORTANT** For completed tasks, make sure to mark the task off as [X] in the tasks file.
48
-
49
- 7. Completion validation:
50
- - Verify all required tasks are completed
51
- - Check that implemented features match the original specification
52
- - Validate that tests pass and coverage meets requirements
53
- - Confirm the implementation follows the technical plan
54
- - Report final status with summary of completed work
55
-
56
- Note: This command assumes a complete task breakdown exists in tasks.md. If tasks are incomplete or missing, suggest running `/tasks` first to regenerate the task list.
@@ -1,43 +0,0 @@
1
- ---
2
- description: Execute the implementation planning workflow using the plan template to generate design artifacts.
3
- ---
4
-
5
- The user input to you can be provided directly by the agent or as a command argument - you **MUST** consider it before proceeding with the prompt (if not empty).
6
-
7
- User input:
8
-
9
- $ARGUMENTS
10
-
11
- Given the implementation details provided as an argument, do this:
12
-
13
- 1. Run `.specify/scripts/bash/setup-plan.sh --json` from the repo root and parse JSON for FEATURE_SPEC, IMPL_PLAN, SPECS_DIR, BRANCH. All future file paths must be absolute.
14
- - BEFORE proceeding, inspect FEATURE_SPEC for a `## Clarifications` section with at least one `Session` subheading. If missing or clearly ambiguous areas remain (vague adjectives, unresolved critical choices), PAUSE and instruct the user to run `/clarify` first to reduce rework. Only continue if: (a) Clarifications exist OR (b) an explicit user override is provided (e.g., "proceed without clarification"). Do not attempt to fabricate clarifications yourself.
15
- 2. Read and analyze the feature specification to understand:
16
- - The feature requirements and user stories
17
- - Functional and non-functional requirements
18
- - Success criteria and acceptance criteria
19
- - Any technical constraints or dependencies mentioned
20
-
21
- 3. Read the constitution at `.specify/memory/constitution.md` to understand constitutional requirements.
22
-
23
- 4. Execute the implementation plan template:
24
- - Load `.specify/templates/plan-template.md` (already copied to IMPL_PLAN path)
25
- - Set Input path to FEATURE_SPEC
26
- - Run the Execution Flow (main) function steps 1-9
27
- - The template is self-contained and executable
28
- - Follow error handling and gate checks as specified
29
- - Let the template guide artifact generation in $SPECS_DIR:
30
- * Phase 0 generates research.md
31
- * Phase 1 generates data-model.md, contracts/, quickstart.md
32
- * Phase 2 generates tasks.md
33
- - Incorporate user-provided details from arguments into Technical Context: $ARGUMENTS
34
- - Update Progress Tracking as you complete each phase
35
-
36
- 5. Verify execution completed:
37
- - Check Progress Tracking shows all phases complete
38
- - Ensure all required artifacts were generated
39
- - Confirm no ERROR states in execution
40
-
41
- 6. Report results with branch name, file paths, and generated artifacts.
42
-
43
- Use absolute paths with the repository root for all file operations to avoid path issues.
@@ -1,188 +0,0 @@
1
- You are working on the VR Language Learning App project. The user has requested to refactor specific files tagged with @ symbols in their arguments: "$ARGUMENTS"
2
-
3
- ## Auto-Loaded Project Context:
4
- @/CLAUDE.md
5
- @/docs/ai-context/project-structure.md
6
- @/docs/ai-context/docs-overview.md
7
-
8
- ## Step 1: Parse Tagged Files
9
- Extract all @ tagged file paths from the user's arguments. Only process files that are explicitly tagged with @ symbols.
10
-
11
- **Example parsing:**
12
- - Input: "refactor @src/big-file.ts @components/Large.svelte"
13
- - Extract: ["src/big-file.ts", "components/Large.svelte"]
14
-
15
- ## Step 2: Validate and Analyze Files
16
- For each tagged file:
17
- 1. **Verify file exists** - If file doesn't exist, inform user and skip
18
- 2. **Read file contents** - Understand the structure and dependencies
19
- 3. **Analyze current directory structure** - Map existing patterns around the file
20
-
21
- ## Step 3: Intelligent Analysis Strategy Decision
22
- Think deeply about the safest and most effective refactoring approach based on the auto-loaded project context. Based on the initial analysis from Step 2 and the auto-loaded project context, intelligently decide the optimal approach for each file:
23
-
24
- ### Strategy Options:
25
-
26
- **Direct Refactoring** (0-1 sub-agents):
27
- - Simple files with clear, obvious split points
28
- - Files with minimal external dependencies
29
- - Standard refactoring patterns (e.g., extract utils, split large classes)
30
- - Low risk of breaking changes
31
-
32
- **Focused Analysis** (2-3 sub-agents):
33
- - Moderate complexity with specific concerns
34
- - Files with moderate dependency footprint
35
- - When one aspect needs deep analysis (e.g., complex dependencies OR intricate file structure)
36
-
37
- **Comprehensive Analysis** (3+ sub-agents):
38
- - High complexity files with multiple concerns
39
- - Extensive dependency networks
40
- - Novel refactoring patterns not seen in project
41
- - High risk of breaking changes
42
- - Files that are central to multiple systems
43
-
44
- ## Step 4: Execute Chosen Strategy
45
-
46
- ### For Direct Refactoring:
47
- Proceed with straightforward refactoring using the initial analysis and project context.
48
-
49
- ### For Sub-Agent Approaches:
50
- You have complete autonomy to design and launch sub-agents based on the specific refactoring needs identified. Consider these key investigation areas and design custom agents to cover what's most relevant:
51
-
52
- **Core Investigation Areas to Consider:**
53
- - **File Structure Analysis**: Logical component boundaries, split points, cohesion assessment
54
- - **Dependency Network Mapping**: Import/export analysis, usage patterns, circular dependency risks
55
- - **Project Pattern Compliance**: Directory structures, naming conventions, organizational patterns
56
- - **Impact Assessment**: Test files, configuration files, build scripts that need updates
57
- - **Import Update Analysis**: All files that import from the target file and need updated import paths
58
- - **Technology Stack Considerations**: Language-specific patterns, framework conventions
59
-
60
- **Autonomous Sub-Agent Design Principles:**
61
- - **Custom Specialization**: Define agents based on the specific file's complexity and risks
62
- - **Flexible Agent Count**: Use as many agents as needed - scale based on actual complexity
63
- - **Adaptive Coverage**: Ensure critical aspects are covered without unnecessary overlap
64
- - **Risk-Focused Analysis**: Prioritize investigation of the highest-risk refactoring aspects
65
-
66
- **Sub-Agent Task Template:**
67
- ```
68
- Task: "Analyze [SPECIFIC_INVESTIGATION_AREA] for safe refactoring of [TARGET_FILE] related to user request '$ARGUMENTS'"
69
-
70
- Standard Investigation Workflow:
71
- 1. Review auto-loaded project context (CLAUDE.md, project-structure.md, docs-overview.md)
72
- 2. [CUSTOM_ANALYSIS_STEPS] - Investigate the specific area thoroughly
73
- 3. Return actionable findings that support safe and effective refactoring
74
-
75
- Return comprehensive findings addressing this investigation area."
76
- ```
77
-
78
- **CRITICAL: When launching sub-agents, always use parallel execution with a single message containing multiple Task tool invocations.**
79
-
80
-
81
- ## Step 5: Synthesize Analysis and Plan Refactoring
82
-
83
- Think deeply about integrating findings from all sub-agent investigations for safe and effective refactoring. Combine findings from all agents to create optimal refactoring strategy:
84
-
85
- ### Integration Analysis
86
- - **File Structure**: Use File Analysis Agent's component breakdown
87
- - **Organization**: Apply Pattern Recognition Agent's directory recommendations
88
- - **Safety**: Implement Dependency Analysis Agent's import/export strategy
89
- - **Completeness**: Address Impact Assessment Agent's broader concerns
90
-
91
- ### Refactoring Strategy Decision
92
- Based on synthesized analysis, determine:
93
- - **Split granularity**: How many files and what logical divisions
94
- - **Directory structure**: Same-level, subdirectory, or existing directory placement
95
- - **Import/export strategy**: How to restructure exports and update all consuming files
96
- - **File naming**: Following project conventions and clarity
97
-
98
- ### Risk Assessment
99
- - **Breaking changes**: Identify and mitigate potential issues
100
- - **Dependency conflicts**: Plan import/export restructuring
101
- - **Test impacts**: Plan for test file updates
102
- - **Documentation needs**: Identify doc updates required
103
-
104
- ## Step 6: Refactoring Value Assessment
105
-
106
- ### Evaluate Refactoring Worth
107
- After synthesizing all analysis, critically evaluate whether the proposed refactoring will actually improve the codebase:
108
-
109
- **Positive Indicators (Worth Refactoring):**
110
- - File significantly exceeds reasonable size limits (500+ lines for components, 1000+ for utilities)
111
- - Clear separation of concerns violations (UI mixed with business logic, multiple unrelated features)
112
- - High cyclomatic complexity that would be reduced
113
- - Repeated code patterns that could be abstracted
114
- - Poor testability that would improve with modularization
115
- - Dependencies would become cleaner and more maintainable
116
- - Aligns with project's architectural patterns
117
-
118
- **Negative Indicators (Not Worth Refactoring):**
119
- - File is already well-organized despite its size
120
- - Splitting would create artificial boundaries that reduce clarity
121
- - Would introduce unnecessary complexity or abstraction
122
- - Dependencies would become more convoluted
123
- - File serves a single, cohesive purpose effectively
124
- - Refactoring would violate project conventions
125
- - Minimal actual improvement in maintainability
126
-
127
- ### Decision Point
128
- Based on the assessment:
129
-
130
- **If Refactoring IS Worth It:**
131
- - Print clear summary of benefits: "✅ This refactoring will improve the codebase by: [specific benefits]"
132
- - Proceed automatically to Step 7 (Execute Refactoring)
133
-
134
- **If Refactoring IS NOT Worth It:**
135
- - Be brutally honest about why: "❌ This refactoring is not recommended because: [specific reasons]"
136
- - Explain what makes the current structure acceptable
137
- - Ask user explicitly: "The file is currently well-structured for its purpose. Do you still want to proceed with the refactoring? (yes/no)"
138
- - Only continue if user confirms
139
-
140
- ## Step 7: Execute Refactoring
141
-
142
- Implement the refactoring based on the synthesized analysis:
143
-
144
- ### File Creation Order
145
- 1. **Create directories** - Create any new subdirectories needed
146
- 2. **Create core files** - Start with main/index files
147
- 3. **Create supporting files** - Types, utils, constants
148
- 4. **Update imports** - Fix all import/export statements
149
- 5. **Update original file** - Replace with new modular structure
150
-
151
- ### Import/Export Management
152
- - **Update all consuming files** - Modify import statements to point to new file locations
153
- - **Restructure exports** - Organize exports in the new file structure
154
- - **Update relative imports** - Fix paths throughout the codebase
155
- - **Follow naming conventions** - Use project's established patterns
156
-
157
- ### Quality Assurance
158
- - **Preserve functionality** - Ensure no breaking changes
159
- - **Maintain type safety** - Keep all TypeScript types intact
160
- - **Follow coding standards** - Apply project's style guidelines
161
- - **Test compatibility** - Verify imports work correctly
162
-
163
-
164
- ## Step 8: Quality Verification
165
-
166
- For each refactored file:
167
- - **Check imports** - Verify all imports resolve correctly
168
- - **Run type checks** - Ensure TypeScript compilation passes
169
- - **Test functionality** - Confirm no breaking changes
170
- - **Validate structure** - Ensure new organization follows project patterns
171
-
172
-
173
- ## Error Handling
174
- - **File not found** - Skip and inform user
175
- - **Not worth refactoring** - Skip files that are good as is and give users an explanation.
176
- - **Parse errors** - Report syntax issues and skip
177
- - **Import conflicts** - Resolve or report issues
178
-
179
- ## Summary Format
180
- Provide a comprehensive summary of:
181
- - **Analysis Results**: Key findings from each sub-agent
182
- - **Refactoring Strategy**: Chosen approach and rationale
183
- - **Value Assessment**: Whether refactoring improves the code (from Step 6)
184
- - **Files Created**: New structure with explanations (if refactoring proceeded)
185
- - **Dependencies Fixed**: Import/export changes made (if refactoring proceeded)
186
- - **Issues Encountered**: Any problems and resolutions
187
-
188
- Now proceed with multi-agent analysis and refactoring of the tagged files: $ARGUMENTS
@@ -1,21 +0,0 @@
1
- ---
2
- description: Create or update the feature specification from a natural language feature description.
3
- ---
4
-
5
- The user input to you can be provided directly by the agent or as a command argument - you **MUST** consider it before proceeding with the prompt (if not empty).
6
-
7
- User input:
8
-
9
- $ARGUMENTS
10
-
11
- The text the user typed after `/specify` in the triggering message **is** the feature description. Assume you always have it available in this conversation even if `$ARGUMENTS` appears literally below. Do not ask the user to repeat it unless they provided an empty command.
12
-
13
- Given that feature description, do this:
14
-
15
- 1. Run the script `.specify/scripts/bash/create-new-feature.sh --json "$ARGUMENTS"` from repo root and parse its JSON output for BRANCH_NAME and SPEC_FILE. All file paths must be absolute.
16
- **IMPORTANT** You must only ever run this script once. The JSON is provided in the terminal as output - always refer to it to get the actual content you're looking for.
17
- 2. Load `.specify/templates/spec-template.md` to understand required sections.
18
- 3. Write the specification to SPEC_FILE using the template structure, replacing placeholders with concrete details derived from the feature description (arguments) while preserving section order and headings.
19
- 4. Report completion with branch name, spec file path, and readiness for the next phase.
20
-
21
- Note: The script creates and checks out the new branch and initializes the spec file before writing.
@@ -1,62 +0,0 @@
1
- ---
2
- description: Generate an actionable, dependency-ordered tasks.md for the feature based on available design artifacts.
3
- ---
4
-
5
- The user input to you can be provided directly by the agent or as a command argument - you **MUST** consider it before proceeding with the prompt (if not empty).
6
-
7
- User input:
8
-
9
- $ARGUMENTS
10
-
11
- 1. Run `.specify/scripts/bash/check-prerequisites.sh --json` from repo root and parse FEATURE_DIR and AVAILABLE_DOCS list. All paths must be absolute.
12
- 2. Load and analyze available design documents:
13
- - Always read plan.md for tech stack and libraries
14
- - IF EXISTS: Read data-model.md for entities
15
- - IF EXISTS: Read contracts/ for API endpoints
16
- - IF EXISTS: Read research.md for technical decisions
17
- - IF EXISTS: Read quickstart.md for test scenarios
18
-
19
- Note: Not all projects have all documents. For example:
20
- - CLI tools might not have contracts/
21
- - Simple libraries might not need data-model.md
22
- - Generate tasks based on what's available
23
-
24
- 3. Generate tasks following the template:
25
- - Use `.specify/templates/tasks-template.md` as the base
26
- - Replace example tasks with actual tasks based on:
27
- * **Setup tasks**: Project init, dependencies, linting
28
- * **Test tasks [P]**: One per contract, one per integration scenario
29
- * **Core tasks**: One per entity, service, CLI command, endpoint
30
- * **Integration tasks**: DB connections, middleware, logging
31
- * **Polish tasks [P]**: Unit tests, performance, docs
32
-
33
- 4. Task generation rules:
34
- - Each contract file → contract test task marked [P]
35
- - Each entity in data-model → model creation task marked [P]
36
- - Each endpoint → implementation task (not parallel if shared files)
37
- - Each user story → integration test marked [P]
38
- - Different files = can be parallel [P]
39
- - Same file = sequential (no [P])
40
-
41
- 5. Order tasks by dependencies:
42
- - Setup before everything
43
- - Tests before implementation (TDD)
44
- - Models before services
45
- - Services before endpoints
46
- - Core before integration
47
- - Everything before polish
48
-
49
- 6. Include parallel execution examples:
50
- - Group [P] tasks that can run together
51
- - Show actual Task agent commands
52
-
53
- 7. Create FEATURE_DIR/tasks.md with:
54
- - Correct feature name from implementation plan
55
- - Numbered tasks (T001, T002, etc.)
56
- - Clear file paths for each task
57
- - Dependency notes
58
- - Parallel execution guidance
59
-
60
- Context for task generation: $ARGUMENTS
61
-
62
- The tasks.md should be immediately executable - each task must be specific enough that an LLM can complete it without additional context.