@zenuml/core 3.47.8 → 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,23 +0,0 @@
1
- # [PROJECT NAME] Development Guidelines
2
-
3
- Auto-generated from all feature plans. Last updated: [DATE]
4
-
5
- ## Active Technologies
6
- [EXTRACTED FROM ALL PLAN.MD FILES]
7
-
8
- ## Project Structure
9
- ```
10
- [ACTUAL STRUCTURE FROM PLANS]
11
- ```
12
-
13
- ## Commands
14
- [ONLY COMMANDS FOR ACTIVE TECHNOLOGIES]
15
-
16
- ## Code Style
17
- [LANGUAGE-SPECIFIC, ONLY FOR LANGUAGES IN USE]
18
-
19
- ## Recent Changes
20
- [LAST 3 FEATURES AND WHAT THEY ADDED]
21
-
22
- <!-- MANUAL ADDITIONS START -->
23
- <!-- MANUAL ADDITIONS END -->
@@ -1,219 +0,0 @@
1
-
2
- # Implementation Plan: [FEATURE]
3
-
4
- **Branch**: `[###-feature-name]` | **Date**: [DATE] | **Spec**: [link]
5
- **Input**: Feature specification from `/specs/[###-feature-name]/spec.md`
6
-
7
- ## Execution Flow (/plan command scope)
8
- ```
9
- 1. Load feature spec from Input path
10
- → If not found: ERROR "No feature spec at {path}"
11
- 2. Fill Technical Context (scan for NEEDS CLARIFICATION)
12
- → Detect Project Type from file system structure or context (web=frontend+backend, mobile=app+api)
13
- → Set Structure Decision based on project type
14
- 3. Fill the Constitution Check section based on the content of the constitution document.
15
- 4. Evaluate Constitution Check section below
16
- → If violations exist: Document in Complexity Tracking
17
- → If no justification possible: ERROR "Simplify approach first"
18
- → Update Progress Tracking: Initial Constitution Check
19
- 5. Execute Phase 0 → research.md
20
- → If NEEDS CLARIFICATION remain: ERROR "Resolve unknowns"
21
- 6. Execute Phase 1 → contracts, data-model.md, quickstart.md, agent-specific template file (e.g., `CLAUDE.md` for Claude Code, `.github/copilot-instructions.md` for GitHub Copilot, `GEMINI.md` for Gemini CLI, `QWEN.md` for Qwen Code, or `AGENTS.md` for all other agents).
22
- 7. Re-evaluate Constitution Check section
23
- → If new violations: Refactor design, return to Phase 1
24
- → Update Progress Tracking: Post-Design Constitution Check
25
- 8. Plan Phase 2 → Describe task generation approach (DO NOT create tasks.md)
26
- 9. STOP - Ready for /tasks command
27
- ```
28
-
29
- **IMPORTANT**: The /plan command STOPS at step 7. Phases 2-4 are executed by other commands:
30
- - Phase 2: /tasks command creates tasks.md
31
- - Phase 3-4: Implementation execution (manual or via tools)
32
-
33
- ## Summary
34
- [Extract from feature spec: primary requirement + technical approach from research]
35
-
36
- ## Technical Context
37
- **Language/Version**: [e.g., Python 3.11, Swift 5.9, Rust 1.75 or NEEDS CLARIFICATION]
38
- **Primary Dependencies**: [e.g., FastAPI, UIKit, LLVM or NEEDS CLARIFICATION]
39
- **Storage**: [if applicable, e.g., PostgreSQL, CoreData, files or N/A]
40
- **Testing**: [e.g., pytest, XCTest, cargo test or NEEDS CLARIFICATION]
41
- **Target Platform**: [e.g., Linux server, iOS 15+, WASM or NEEDS CLARIFICATION]
42
- **Project Type**: [single/web/mobile - determines source structure]
43
- **Performance Goals**: [domain-specific, e.g., 1000 req/s, 10k lines/sec, 60 fps or NEEDS CLARIFICATION]
44
- **Constraints**: [domain-specific, e.g., <200ms p95, <100MB memory, offline-capable or NEEDS CLARIFICATION]
45
- **Scale/Scope**: [domain-specific, e.g., 10k users, 1M LOC, 50 screens or NEEDS CLARIFICATION]
46
-
47
- ## Constitution Check
48
- *GATE: Must pass before Phase 0 research. Re-check after Phase 1 design.*
49
-
50
- [Gates determined based on constitution file]
51
-
52
- ## Project Structure
53
-
54
- ### Documentation (this feature)
55
- ```
56
- specs/[###-feature]/
57
- ├── plan.md # This file (/plan command output)
58
- ├── research.md # Phase 0 output (/plan command)
59
- ├── data-model.md # Phase 1 output (/plan command)
60
- ├── quickstart.md # Phase 1 output (/plan command)
61
- ├── contracts/ # Phase 1 output (/plan command)
62
- └── tasks.md # Phase 2 output (/tasks command - NOT created by /plan)
63
- ```
64
-
65
- ### Source Code (repository root)
66
- <!--
67
- ACTION REQUIRED: Replace the placeholder tree below with the concrete layout
68
- for this feature. Delete unused options and expand the chosen structure with
69
- real paths (e.g., apps/admin, packages/something). The delivered plan must
70
- not include Option labels.
71
- -->
72
- ```
73
- # [REMOVE IF UNUSED] Option 1: Single project (DEFAULT)
74
- src/
75
- ├── models/
76
- ├── services/
77
- ├── cli/
78
- └── lib/
79
-
80
- tests/
81
- ├── contract/
82
- ├── integration/
83
- └── unit/
84
-
85
- # [REMOVE IF UNUSED] Option 2: Web application (when "frontend" + "backend" detected)
86
- backend/
87
- ├── src/
88
- │ ├── models/
89
- │ ├── services/
90
- │ └── api/
91
- └── tests/
92
-
93
- frontend/
94
- ├── src/
95
- │ ├── components/
96
- │ ├── pages/
97
- │ └── services/
98
- └── tests/
99
-
100
- # [REMOVE IF UNUSED] Option 3: Mobile + API (when "iOS/Android" detected)
101
- api/
102
- └── [same as backend above]
103
-
104
- ios/ or android/
105
- └── [platform-specific structure: feature modules, UI flows, platform tests]
106
- ```
107
-
108
- **Structure Decision**: [Document the selected structure and reference the real
109
- directories captured above]
110
-
111
- ## Phase 0: Outline & Research
112
- 1. **Extract unknowns from Technical Context** above:
113
- - For each NEEDS CLARIFICATION → research task
114
- - For each dependency → best practices task
115
- - For each integration → patterns task
116
-
117
- 2. **Generate and dispatch research agents**:
118
- ```
119
- For each unknown in Technical Context:
120
- Task: "Research {unknown} for {feature context}"
121
- For each technology choice:
122
- Task: "Find best practices for {tech} in {domain}"
123
- ```
124
-
125
- 3. **Consolidate findings** in `research.md` using format:
126
- - Decision: [what was chosen]
127
- - Rationale: [why chosen]
128
- - Alternatives considered: [what else evaluated]
129
-
130
- **Output**: research.md with all NEEDS CLARIFICATION resolved
131
-
132
- ## Phase 1: Design & Contracts
133
- *Prerequisites: research.md complete*
134
-
135
- 1. **Extract entities from feature spec** → `data-model.md`:
136
- - Entity name, fields, relationships
137
- - Validation rules from requirements
138
- - State transitions if applicable
139
-
140
- 2. **Generate API contracts** from functional requirements:
141
- - For each user action → endpoint
142
- - Use standard REST/GraphQL patterns
143
- - Output OpenAPI/GraphQL schema to `/contracts/`
144
-
145
- 3. **Generate contract tests** from contracts:
146
- - One test file per endpoint
147
- - Assert request/response schemas
148
- - Tests must fail (no implementation yet)
149
-
150
- 4. **Extract test scenarios** from user stories:
151
- - Each story → integration test scenario
152
- - Quickstart test = story validation steps
153
-
154
- 5. **Update agent file incrementally** (O(1) operation):
155
- - Run `.specify/scripts/bash/update-agent-context.sh claude`
156
- **IMPORTANT**: Execute it exactly as specified above. Do not add or remove any arguments.
157
- - If exists: Add only NEW tech from current plan
158
- - Preserve manual additions between markers
159
- - Update recent changes (keep last 3)
160
- - Keep under 150 lines for token efficiency
161
- - Output to repository root
162
-
163
- **Output**: data-model.md, /contracts/*, failing tests, quickstart.md, agent-specific file
164
-
165
- ## Phase 2: Task Planning Approach
166
- *This section describes what the /tasks command will do - DO NOT execute during /plan*
167
-
168
- **Task Generation Strategy**:
169
- - Load `.specify/templates/tasks-template.md` as base
170
- - Generate tasks from Phase 1 design docs (contracts, data model, quickstart)
171
- - Each contract → contract test task [P]
172
- - Each entity → model creation task [P]
173
- - Each user story → integration test task
174
- - Implementation tasks to make tests pass
175
-
176
- **Ordering Strategy**:
177
- - TDD order: Tests before implementation
178
- - Dependency order: Models before services before UI
179
- - Mark [P] for parallel execution (independent files)
180
-
181
- **Estimated Output**: 25-30 numbered, ordered tasks in tasks.md
182
-
183
- **IMPORTANT**: This phase is executed by the /tasks command, NOT by /plan
184
-
185
- ## Phase 3+: Future Implementation
186
- *These phases are beyond the scope of the /plan command*
187
-
188
- **Phase 3**: Task execution (/tasks command creates tasks.md)
189
- **Phase 4**: Implementation (execute tasks.md following constitutional principles)
190
- **Phase 5**: Validation (run tests, execute quickstart.md, performance validation)
191
-
192
- ## Complexity Tracking
193
- *Fill ONLY if Constitution Check has violations that must be justified*
194
-
195
- | Violation | Why Needed | Simpler Alternative Rejected Because |
196
- |-----------|------------|-------------------------------------|
197
- | [e.g., 4th project] | [current need] | [why 3 projects insufficient] |
198
- | [e.g., Repository pattern] | [specific problem] | [why direct DB access insufficient] |
199
-
200
-
201
- ## Progress Tracking
202
- *This checklist is updated during execution flow*
203
-
204
- **Phase Status**:
205
- - [ ] Phase 0: Research complete (/plan command)
206
- - [ ] Phase 1: Design complete (/plan command)
207
- - [ ] Phase 2: Task planning complete (/plan command - describe approach only)
208
- - [ ] Phase 3: Tasks generated (/tasks command)
209
- - [ ] Phase 4: Implementation complete
210
- - [ ] Phase 5: Validation passed
211
-
212
- **Gate Status**:
213
- - [ ] Initial Constitution Check: PASS
214
- - [ ] Post-Design Constitution Check: PASS
215
- - [ ] All NEEDS CLARIFICATION resolved
216
- - [ ] Complexity deviations documented
217
-
218
- ---
219
- *Based on Constitution v1.1.0 - See `.specify/memory/constitution.md`*
@@ -1,116 +0,0 @@
1
- # Feature Specification: [FEATURE NAME]
2
-
3
- **Feature Branch**: `[###-feature-name]`
4
- **Created**: [DATE]
5
- **Status**: Draft
6
- **Input**: User description: "$ARGUMENTS"
7
-
8
- ## Execution Flow (main)
9
- ```
10
- 1. Parse user description from Input
11
- → If empty: ERROR "No feature description provided"
12
- 2. Extract key concepts from description
13
- → Identify: actors, actions, data, constraints
14
- 3. For each unclear aspect:
15
- → Mark with [NEEDS CLARIFICATION: specific question]
16
- 4. Fill User Scenarios & Testing section
17
- → If no clear user flow: ERROR "Cannot determine user scenarios"
18
- 5. Generate Functional Requirements
19
- → Each requirement must be testable
20
- → Mark ambiguous requirements
21
- 6. Identify Key Entities (if data involved)
22
- 7. Run Review Checklist
23
- → If any [NEEDS CLARIFICATION]: WARN "Spec has uncertainties"
24
- → If implementation details found: ERROR "Remove tech details"
25
- 8. Return: SUCCESS (spec ready for planning)
26
- ```
27
-
28
- ---
29
-
30
- ## ⚡ Quick Guidelines
31
- - ✅ Focus on WHAT users need and WHY
32
- - ❌ Avoid HOW to implement (no tech stack, APIs, code structure)
33
- - 👥 Written for business stakeholders, not developers
34
-
35
- ### Section Requirements
36
- - **Mandatory sections**: Must be completed for every feature
37
- - **Optional sections**: Include only when relevant to the feature
38
- - When a section doesn't apply, remove it entirely (don't leave as "N/A")
39
-
40
- ### For AI Generation
41
- When creating this spec from a user prompt:
42
- 1. **Mark all ambiguities**: Use [NEEDS CLARIFICATION: specific question] for any assumption you'd need to make
43
- 2. **Don't guess**: If the prompt doesn't specify something (e.g., "login system" without auth method), mark it
44
- 3. **Think like a tester**: Every vague requirement should fail the "testable and unambiguous" checklist item
45
- 4. **Common underspecified areas**:
46
- - User types and permissions
47
- - Data retention/deletion policies
48
- - Performance targets and scale
49
- - Error handling behaviors
50
- - Integration requirements
51
- - Security/compliance needs
52
-
53
- ---
54
-
55
- ## User Scenarios & Testing *(mandatory)*
56
-
57
- ### Primary User Story
58
- [Describe the main user journey in plain language]
59
-
60
- ### Acceptance Scenarios
61
- 1. **Given** [initial state], **When** [action], **Then** [expected outcome]
62
- 2. **Given** [initial state], **When** [action], **Then** [expected outcome]
63
-
64
- ### Edge Cases
65
- - What happens when [boundary condition]?
66
- - How does system handle [error scenario]?
67
-
68
- ## Requirements *(mandatory)*
69
-
70
- ### Functional Requirements
71
- - **FR-001**: System MUST [specific capability, e.g., "allow users to create accounts"]
72
- - **FR-002**: System MUST [specific capability, e.g., "validate email addresses"]
73
- - **FR-003**: Users MUST be able to [key interaction, e.g., "reset their password"]
74
- - **FR-004**: System MUST [data requirement, e.g., "persist user preferences"]
75
- - **FR-005**: System MUST [behavior, e.g., "log all security events"]
76
-
77
- *Example of marking unclear requirements:*
78
- - **FR-006**: System MUST authenticate users via [NEEDS CLARIFICATION: auth method not specified - email/password, SSO, OAuth?]
79
- - **FR-007**: System MUST retain user data for [NEEDS CLARIFICATION: retention period not specified]
80
-
81
- ### Key Entities *(include if feature involves data)*
82
- - **[Entity 1]**: [What it represents, key attributes without implementation]
83
- - **[Entity 2]**: [What it represents, relationships to other entities]
84
-
85
- ---
86
-
87
- ## Review & Acceptance Checklist
88
- *GATE: Automated checks run during main() execution*
89
-
90
- ### Content Quality
91
- - [ ] No implementation details (languages, frameworks, APIs)
92
- - [ ] Focused on user value and business needs
93
- - [ ] Written for non-technical stakeholders
94
- - [ ] All mandatory sections completed
95
-
96
- ### Requirement Completeness
97
- - [ ] No [NEEDS CLARIFICATION] markers remain
98
- - [ ] Requirements are testable and unambiguous
99
- - [ ] Success criteria are measurable
100
- - [ ] Scope is clearly bounded
101
- - [ ] Dependencies and assumptions identified
102
-
103
- ---
104
-
105
- ## Execution Status
106
- *Updated by main() during processing*
107
-
108
- - [ ] User description parsed
109
- - [ ] Key concepts extracted
110
- - [ ] Ambiguities marked
111
- - [ ] User scenarios defined
112
- - [ ] Requirements generated
113
- - [ ] Entities identified
114
- - [ ] Review checklist passed
115
-
116
- ---
@@ -1,127 +0,0 @@
1
- # Tasks: [FEATURE NAME]
2
-
3
- **Input**: Design documents from `/specs/[###-feature-name]/`
4
- **Prerequisites**: plan.md (required), research.md, data-model.md, contracts/
5
-
6
- ## Execution Flow (main)
7
- ```
8
- 1. Load plan.md from feature directory
9
- → If not found: ERROR "No implementation plan found"
10
- → Extract: tech stack, libraries, structure
11
- 2. Load optional design documents:
12
- → data-model.md: Extract entities → model tasks
13
- → contracts/: Each file → contract test task
14
- → research.md: Extract decisions → setup tasks
15
- 3. Generate tasks by category:
16
- → Setup: project init, dependencies, linting
17
- → Tests: contract tests, integration tests
18
- → Core: models, services, CLI commands
19
- → Integration: DB, middleware, logging
20
- → Polish: unit tests, performance, docs
21
- 4. Apply task rules:
22
- → Different files = mark [P] for parallel
23
- → Same file = sequential (no [P])
24
- → Tests before implementation (TDD)
25
- 5. Number tasks sequentially (T001, T002...)
26
- 6. Generate dependency graph
27
- 7. Create parallel execution examples
28
- 8. Validate task completeness:
29
- → All contracts have tests?
30
- → All entities have models?
31
- → All endpoints implemented?
32
- 9. Return: SUCCESS (tasks ready for execution)
33
- ```
34
-
35
- ## Format: `[ID] [P?] Description`
36
- - **[P]**: Can run in parallel (different files, no dependencies)
37
- - Include exact file paths in descriptions
38
-
39
- ## Path Conventions
40
- - **Single project**: `src/`, `tests/` at repository root
41
- - **Web app**: `backend/src/`, `frontend/src/`
42
- - **Mobile**: `api/src/`, `ios/src/` or `android/src/`
43
- - Paths shown below assume single project - adjust based on plan.md structure
44
-
45
- ## Phase 3.1: Setup
46
- - [ ] T001 Create project structure per implementation plan
47
- - [ ] T002 Initialize [language] project with [framework] dependencies
48
- - [ ] T003 [P] Configure linting and formatting tools
49
-
50
- ## Phase 3.2: Tests First (TDD) ⚠️ MUST COMPLETE BEFORE 3.3
51
- **CRITICAL: These tests MUST be written and MUST FAIL before ANY implementation**
52
- - [ ] T004 [P] Contract test POST /api/users in tests/contract/test_users_post.py
53
- - [ ] T005 [P] Contract test GET /api/users/{id} in tests/contract/test_users_get.py
54
- - [ ] T006 [P] Integration test user registration in tests/integration/test_registration.py
55
- - [ ] T007 [P] Integration test auth flow in tests/integration/test_auth.py
56
-
57
- ## Phase 3.3: Core Implementation (ONLY after tests are failing)
58
- - [ ] T008 [P] User model in src/models/user.py
59
- - [ ] T009 [P] UserService CRUD in src/services/user_service.py
60
- - [ ] T010 [P] CLI --create-user in src/cli/user_commands.py
61
- - [ ] T011 POST /api/users endpoint
62
- - [ ] T012 GET /api/users/{id} endpoint
63
- - [ ] T013 Input validation
64
- - [ ] T014 Error handling and logging
65
-
66
- ## Phase 3.4: Integration
67
- - [ ] T015 Connect UserService to DB
68
- - [ ] T016 Auth middleware
69
- - [ ] T017 Request/response logging
70
- - [ ] T018 CORS and security headers
71
-
72
- ## Phase 3.5: Polish
73
- - [ ] T019 [P] Unit tests for validation in tests/unit/test_validation.py
74
- - [ ] T020 Performance tests (<200ms)
75
- - [ ] T021 [P] Update docs/api.md
76
- - [ ] T022 Remove duplication
77
- - [ ] T023 Run manual-testing.md
78
-
79
- ## Dependencies
80
- - Tests (T004-T007) before implementation (T008-T014)
81
- - T008 blocks T009, T015
82
- - T016 blocks T018
83
- - Implementation before polish (T019-T023)
84
-
85
- ## Parallel Example
86
- ```
87
- # Launch T004-T007 together:
88
- Task: "Contract test POST /api/users in tests/contract/test_users_post.py"
89
- Task: "Contract test GET /api/users/{id} in tests/contract/test_users_get.py"
90
- Task: "Integration test registration in tests/integration/test_registration.py"
91
- Task: "Integration test auth in tests/integration/test_auth.py"
92
- ```
93
-
94
- ## Notes
95
- - [P] tasks = different files, no dependencies
96
- - Verify tests fail before implementing
97
- - Commit after each task
98
- - Avoid: vague tasks, same file conflicts
99
-
100
- ## Task Generation Rules
101
- *Applied during main() execution*
102
-
103
- 1. **From Contracts**:
104
- - Each contract file → contract test task [P]
105
- - Each endpoint → implementation task
106
-
107
- 2. **From Data Model**:
108
- - Each entity → model creation task [P]
109
- - Relationships → service layer tasks
110
-
111
- 3. **From User Stories**:
112
- - Each story → integration test [P]
113
- - Quickstart scenarios → validation tasks
114
-
115
- 4. **Ordering**:
116
- - Setup → Tests → Models → Services → Endpoints → Polish
117
- - Dependencies block parallel execution
118
-
119
- ## Validation Checklist
120
- *GATE: Checked by main() before returning*
121
-
122
- - [ ] All contracts have corresponding tests
123
- - [ ] All entities have model tasks
124
- - [ ] All tests come before implementation
125
- - [ ] Parallel tasks truly independent
126
- - [ ] Each task specifies exact file path
127
- - [ ] No task modifies same file as another [P] task
@@ -1,25 +0,0 @@
1
- import type { StorybookConfig } from '@storybook/react-vite';
2
-
3
- const config: StorybookConfig = {
4
- "stories": [
5
- "../src/**/*.mdx",
6
- "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"
7
- ],
8
- "addons": [
9
- "@storybook/addon-docs",
10
- "@storybook/addon-onboarding"
11
- ],
12
- "framework": {
13
- "name": "@storybook/react-vite",
14
- "options": {}
15
- },
16
- "typescript": {
17
- "check": false,
18
- "reactDocgen": "react-docgen-typescript",
19
- "reactDocgenTypescriptOptions": {
20
- "shouldExtractLiteralValuesFromEnum": true,
21
- "propFilter": (prop) => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true),
22
- },
23
- },
24
- };
25
- export default config;
@@ -1,29 +0,0 @@
1
- import type { Preview } from '@storybook/react-vite'
2
- import '../src/index.css'
3
-
4
- const preview: Preview = {
5
- parameters: {
6
- controls: {
7
- matchers: {
8
- color: /(background|color)$/i,
9
- date: /Date$/i,
10
- },
11
- },
12
- backgrounds: {
13
- default: 'light',
14
- values: [
15
- {
16
- name: 'light',
17
- value: '#ffffff',
18
- },
19
- {
20
- name: 'dark',
21
- value: '#333333',
22
- },
23
- ],
24
- },
25
- actions: { argTypesRegex: '^on[A-Z].*' },
26
- },
27
- };
28
-
29
- export default preview;
package/.watchmanconfig DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "ignore_dirs": ["build", "node_modules", "dist"]
3
- }
package/AGENTS.md DELETED
@@ -1,26 +0,0 @@
1
- # Repository Guidelines
2
-
3
- ## Project Structure & Module Organization
4
- `src/` holds the TypeScript/React core plus ANTLR grammars in `src/g4/` whose generated output belongs in `src/generated-parser/`. Static assets stay in `public/`, while demos and docs live in `playground/` and `docs/`. Bun specs reside in `test/unit/` (fixtures in `test/`); Playwright suites and snapshots live in `tests/`. Tooling sits in `scripts/`, `antlr/`, `types/`, and the repo-level configs (including `wrangler.toml`).
5
-
6
- ## Build, Test, and Development Commands
7
- - `bun install` – install dependencies (Bun 1.x, Node ≥20).
8
- - `bun run dev` – Vite dev server on `http://localhost:4000`.
9
- - `bun run build` – library bundle via `vite.config.lib.ts`.
10
- - `bun run build:site` / `bun run build:gh-pages` – demo/docs build (standard vs GitHub Pages).
11
- - `bun run test` – Bun unit tests covering `src` and `test/unit`.
12
- - `bun run pw`, `bun run pw:smoke`, `bun run pw:update` – Playwright full suite, smoke subset, snapshot refresh.
13
- - `bun run worker:dev` / `worker:deploy(:staging)` – build site then run or ship the Cloudflare Worker.
14
- - `bun run antlr:lexer && bun run antlr:parser` (plus `antlr:clear`) – regenerate parser artifacts after grammar edits.
15
-
16
- ## Coding Style & Naming Conventions
17
- Stick to 2-space indentation, TypeScript, and arrow components with PascalCase names. Hooks/atoms stay camelCase (`modeAtom`), constants SCREAMING_SNAKE_CASE, and specs follow `FeatureName.spec.ts`. Scope Tailwind utilities under `.zenuml`; styles belong in `src/assets/tailwind.css` or the relevant component SCSS. Run `bun run eslint` and `bun run prettier` before committing.
18
-
19
- ## Testing Guidelines
20
- Touching parser, rendering, or positioning code requires matching `*.spec.ts/tsx` updates, with fixtures held in `test/unit/parser/fixture`. Keep Bun tests deterministic (fake timers, no global state leaks) and prefer small diagrams. UI or regression work belongs in `tests/*.spec.ts` with stable selectors; refresh snapshots via `pw:update`. Every fix ships with a failing test first and, when visuals change, the updated snapshot artifacts.
21
-
22
- ## Commit & Pull Request Guidelines
23
- Follow the conventional pattern (`fix:`, `feat:`, `refactor:`, etc.) and reference issues using `(#123)` in the subject. PRs summarize intent, list the verification commands (`bun run test`, `bun run pw:smoke`, etc.), and attach screenshots or GIFs for UI updates. Call out parser regeneration, config edits, or worker deploy steps so reviewers can verify the correct artifacts.
24
-
25
- ## Security & Configuration Tips
26
- Keep secrets out of git—Wrangler reads Cloudflare credentials from your local profile, and environment overrides stay in untracked `.env`. Document worker route or KV changes in the PR, verify them in staging, and scrub proprietary diagrams before committing docs or tests.