@zenuml/core 3.41.4 → 3.41.6

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.
@@ -0,0 +1,23 @@
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 -->
@@ -0,0 +1,219 @@
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`*
@@ -0,0 +1,116 @@
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
+ ---
@@ -0,0 +1,127 @@
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
package/README.md CHANGED
@@ -9,6 +9,33 @@ help documentation catch up with development.
9
9
  ZenUML allows even non-programmers to easily create beautiful sequence diagrams through
10
10
  the [ZenUML Live Editor](https://app.zenuml.com).
11
11
 
12
+ ```mermaid
13
+
14
+ zenuml
15
+ title Order Service
16
+ @Actor Client #FFEBE6
17
+ @Boundary OrderController #0747A6
18
+ @EC2 <<BFF>> OrderService #E3FCEF
19
+ group BusinessService {
20
+ @Lambda PurchaseService
21
+ @AzureFunction InvoiceService
22
+ }
23
+
24
+ // `POST /orders`
25
+ OrderController.post(payload) {
26
+ OrderService.create(payload) {
27
+ order = new Order(payload1)
28
+ if(order != null) {
29
+ par {
30
+ PurchaseService.createPO(order)
31
+ InvoiceService.createInvoice(order)
32
+ }
33
+ }
34
+ }
35
+ }
36
+
37
+ ```
38
+
12
39
  You can use it ZenUML on your favorite platforms and applications:
13
40
 
14
41
  - [Confluence](https://marketplace.atlassian.com/apps/1218380/zenuml-diagrams-for-confluence-freemium?hosting=cloud&tab=overview)