@miniidealab/openlogos 0.9.5 → 0.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/claude-plugin-template/.claude-plugin/plugin.json +13 -0
- package/claude-plugin-template/agents/change-reviewer.md +46 -0
- package/claude-plugin-template/bin/openlogos-phase +428 -0
- package/claude-plugin-template/commands/archive.md +22 -0
- package/claude-plugin-template/commands/change.md +19 -0
- package/claude-plugin-template/commands/index.md +13 -0
- package/claude-plugin-template/commands/init.md +30 -0
- package/claude-plugin-template/commands/launch.md +16 -0
- package/claude-plugin-template/commands/merge.md +20 -0
- package/claude-plugin-template/commands/next.md +18 -0
- package/claude-plugin-template/commands/status.md +10 -0
- package/claude-plugin-template/commands/sync.md +12 -0
- package/claude-plugin-template/commands/verify.md +17 -0
- package/claude-plugin-template/hooks/hooks.json +14 -0
- package/claude-plugin-template/skills/api-designer/SKILL.md +230 -0
- package/claude-plugin-template/skills/architecture-designer/SKILL.md +186 -0
- package/claude-plugin-template/skills/change-writer/SKILL.md +160 -0
- package/claude-plugin-template/skills/code-implementor/SKILL.md +116 -0
- package/claude-plugin-template/skills/code-reviewer/SKILL.md +214 -0
- package/claude-plugin-template/skills/db-designer/SKILL.md +259 -0
- package/claude-plugin-template/skills/merge-executor/SKILL.md +118 -0
- package/claude-plugin-template/skills/prd-writer/SKILL.md +203 -0
- package/claude-plugin-template/skills/product-designer/SKILL.md +235 -0
- package/claude-plugin-template/skills/project-init/SKILL.md +168 -0
- package/claude-plugin-template/skills/scenario-architect/SKILL.md +229 -0
- package/claude-plugin-template/skills/test-orchestrator/SKILL.md +147 -0
- package/claude-plugin-template/skills/test-writer/SKILL.md +252 -0
- package/dist/commands/init.d.ts +7 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +145 -10
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/module.d.ts.map +1 -1
- package/dist/commands/module.js +14 -9
- package/dist/commands/module.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +15 -5
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/sync.d.ts +8 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +74 -3
- package/dist/commands/sync.js.map +1 -1
- package/dist/i18n.d.ts.map +1 -1
- package/dist/i18n.js +10 -0
- package/dist/i18n.js.map +1 -1
- package/dist/index.js +0 -0
- package/package.json +5 -4
- package/spec/logos-project.md +1 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: merge-executor
|
|
3
|
+
description: "Execute delta merges by generating MERGE_PROMPT.md from change proposals. Use when an approved change proposal needs to be applied to the codebase."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill: Merge Executor
|
|
7
|
+
|
|
8
|
+
> Read the MERGE_PROMPT.md instruction file generated by the CLI, and merge each delta file from the change proposal into the main documents one by one, ensuring changes are applied accurately.
|
|
9
|
+
|
|
10
|
+
## Trigger Conditions
|
|
11
|
+
|
|
12
|
+
- User requests AI to execute the merge after running `openlogos merge <slug>`
|
|
13
|
+
- User mentions "execute merge", "merge", "merge the deltas into the main documents"
|
|
14
|
+
- User mentions "read MERGE_PROMPT.md and execute"
|
|
15
|
+
|
|
16
|
+
## Prerequisites
|
|
17
|
+
|
|
18
|
+
1. `logos/changes/<slug>/MERGE_PROMPT.md` exists (generated by the `openlogos merge` command)
|
|
19
|
+
2. The delta files and target main documents referenced in MERGE_PROMPT.md all exist
|
|
20
|
+
|
|
21
|
+
If MERGE_PROMPT.md does not exist, prompt the user to run `openlogos merge <slug>` first.
|
|
22
|
+
|
|
23
|
+
## Core Capabilities
|
|
24
|
+
|
|
25
|
+
1. Parse merge instructions from MERGE_PROMPT.md
|
|
26
|
+
2. Read each delta file and interpret ADDED / MODIFIED / REMOVED markers
|
|
27
|
+
3. Precisely locate the corresponding sections in the main document and execute the merge
|
|
28
|
+
4. Maintain formatting and style consistency of the main document
|
|
29
|
+
5. Output a change summary
|
|
30
|
+
6. **Stop and wait for human confirmation** — After the merge is complete, the AI's role ends. Never run `openlogos archive` autonomously.
|
|
31
|
+
|
|
32
|
+
## Execution Steps
|
|
33
|
+
|
|
34
|
+
### Step 1: Read Merge Instructions
|
|
35
|
+
|
|
36
|
+
Read `logos/changes/<slug>/MERGE_PROMPT.md` and parse:
|
|
37
|
+
- Change proposal name and overview
|
|
38
|
+
- Each delta file's path, corresponding target main document path, and operation type
|
|
39
|
+
|
|
40
|
+
### Step 2: Merge Each Delta File
|
|
41
|
+
|
|
42
|
+
Process delta files one by one in the order listed in MERGE_PROMPT.md:
|
|
43
|
+
|
|
44
|
+
1. **Read the delta file**: Understand the ADDED / MODIFIED / REMOVED markers and content
|
|
45
|
+
2. **Read the target main document**: Locate the sections that need modification
|
|
46
|
+
3. **Execute the merge**:
|
|
47
|
+
- `ADDED`: Insert new content at the specified position in the main document
|
|
48
|
+
- `MODIFIED`: Replace the content of the same-named section in the main document
|
|
49
|
+
- `REMOVED`: Delete the corresponding section from the main document
|
|
50
|
+
4. **Output summary**: List what modifications were made to the file
|
|
51
|
+
|
|
52
|
+
### Step 3: Output Overall Change Report
|
|
53
|
+
|
|
54
|
+
After all deltas have been processed, output:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
Merge complete:
|
|
58
|
+
- [file path 1]: added x sections, modified y sections, deleted z sections
|
|
59
|
+
- [file path 2]: ...
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Then AI **automatically runs git commit** (no user confirmation needed, but must inform user):
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
git add -A
|
|
66
|
+
git commit -m "docs(<slug>): merge spec deltas"
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
> Use `git add -A` instead of `git add logos/resources/` to ensure all spec files touched by this merge (including spec/, skills/, CLAUDE.md, AGENTS.md, etc.) are included in the commit.
|
|
70
|
+
|
|
71
|
+
Then prompt the user with next steps:
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
✅ Spec documents merged and committed. Next steps:
|
|
75
|
+
|
|
76
|
+
Step 1: Implement code
|
|
77
|
+
Implement business code + test code per the updated logos/resources/ specs.
|
|
78
|
+
AI will automatically commit the code changes when done.
|
|
79
|
+
|
|
80
|
+
Step 2: Run verification (after code is complete)
|
|
81
|
+
Run in the project root:
|
|
82
|
+
openlogos verify
|
|
83
|
+
- PASS → proceed to Step 3
|
|
84
|
+
- FAIL → fix the code and re-run verify (no need to re-run merge)
|
|
85
|
+
|
|
86
|
+
Step 3: Archive (after verification passes)
|
|
87
|
+
openlogos archive <slug>
|
|
88
|
+
|
|
89
|
+
openlogos verify and openlogos archive are human confirmation points — AI must not execute them without explicit user authorization.
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Merge Principles
|
|
93
|
+
|
|
94
|
+
1. **Maintain format consistency**: Merged content must match the existing format, indentation, and heading levels of the main document
|
|
95
|
+
2. **Do not alter unrelated content**: Only modify the parts specified by the delta; do not reformat the entire document
|
|
96
|
+
3. **Ask on conflict**: If a section referenced by the delta cannot be found in the main document (possibly already modified by another change), pause and ask the user how to proceed
|
|
97
|
+
4. **Confirm after each file**: Show a modification summary after processing each delta file, and wait for user confirmation before processing the next one
|
|
98
|
+
|
|
99
|
+
## Output Specification
|
|
100
|
+
|
|
101
|
+
- Directly modify the main documents in `logos/resources/` (in-place editing)
|
|
102
|
+
- Do not modify any files in `logos/changes/`
|
|
103
|
+
- Do not create new files during the merge (unless a delta specifies adding a completely new document)
|
|
104
|
+
|
|
105
|
+
## Best Practices
|
|
106
|
+
|
|
107
|
+
- **Read everything before acting**: Read through all delta files and target documents first to understand the full picture, then merge one by one
|
|
108
|
+
- **MODIFIED is the most error-prone**: Section titles may have minor differences (capitalization, spacing) — fuzzy matching is needed
|
|
109
|
+
- **Preserve change traces**: If the main document has a "last updated" timestamp, remember to update it accordingly
|
|
110
|
+
- **Delta order matters**: Requirement document changes should be processed before API document changes to ensure upstream-downstream consistency
|
|
111
|
+
|
|
112
|
+
## Recommended Prompts
|
|
113
|
+
|
|
114
|
+
The following prompts can be copied directly for AI use:
|
|
115
|
+
|
|
116
|
+
- `Read logos/changes/<slug>/MERGE_PROMPT.md and execute the merge`
|
|
117
|
+
- `Help me merge the add-remember-me changes into the main documents`
|
|
118
|
+
- `Execute the change merge`
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prd-writer
|
|
3
|
+
description: "Write product requirements documents following OpenLogos methodology. Use when logos/resources/prd/1-product-requirements/ is empty or the user needs to create/update scenario-driven requirements with GIVEN/WHEN/THEN acceptance criteria."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill: PRD Writer
|
|
7
|
+
|
|
8
|
+
> Assist in writing scenario-driven requirements documents — starting from user pain points, identifying core business scenarios, and defining GIVEN/WHEN/THEN acceptance criteria for each scenario. Scenario numbers will carry through all subsequent phases.
|
|
9
|
+
|
|
10
|
+
## Trigger Conditions
|
|
11
|
+
|
|
12
|
+
- User requests writing a requirements document, product requirements, or PRD
|
|
13
|
+
- User discusses product positioning, target users, or feature requirements
|
|
14
|
+
- User mentions "Phase 1", "requirements layer", or "WHY"
|
|
15
|
+
- The project is currently in the requirements analysis phase
|
|
16
|
+
|
|
17
|
+
## Core Capabilities
|
|
18
|
+
|
|
19
|
+
1. Guide users through product positioning and target user profiling
|
|
20
|
+
2. Extract user pain points and establish causal chains
|
|
21
|
+
3. Identify and define business scenarios from pain points (assigning `S01`, `S02`... numbers)
|
|
22
|
+
4. Write GIVEN/WHEN/THEN acceptance criteria for each scenario
|
|
23
|
+
5. Prioritize scenarios
|
|
24
|
+
6. Identify constraints and the "won't-do" list
|
|
25
|
+
7. Generate scenario-driven requirements documents conforming to the OpenLogos specification
|
|
26
|
+
|
|
27
|
+
## Execution Steps
|
|
28
|
+
|
|
29
|
+
### Step 1: Understand Product Positioning
|
|
30
|
+
|
|
31
|
+
Confirm the following key questions with the user (proactively ask if information is insufficient):
|
|
32
|
+
|
|
33
|
+
- **One-line positioning**: What is this product? For whom? What problem does it solve?
|
|
34
|
+
- **Target user persona**: Specific enough to describe a real person
|
|
35
|
+
- **Core objectives**: What should the product achieve, and what metrics define success
|
|
36
|
+
|
|
37
|
+
### Step 2: Extract User Pain Points
|
|
38
|
+
|
|
39
|
+
Guide the user to identify pain points from the following dimensions:
|
|
40
|
+
|
|
41
|
+
- How does the user currently do it? (Current state)
|
|
42
|
+
- What difficulties are encountered in the process? (Pain points)
|
|
43
|
+
- What consequences do the difficulties cause? (Impact)
|
|
44
|
+
- How does the user expect it to be resolved? (Expectation)
|
|
45
|
+
|
|
46
|
+
**Every pain point must have a causal chain**: Because [reason] → leads to [pain point] → results in [consequence]
|
|
47
|
+
|
|
48
|
+
Assign a number to each pain point (`P01`, `P02`...) for scenario traceability.
|
|
49
|
+
|
|
50
|
+
### Step 3: Identify and Define Scenarios
|
|
51
|
+
|
|
52
|
+
**Scenarios are the anchor throughout the entire development lifecycle.** This step is critical.
|
|
53
|
+
|
|
54
|
+
Extract business scenarios from pain points and requirements. Each scenario is a **complete user action path**:
|
|
55
|
+
|
|
56
|
+
- **Who** triggers it under **what circumstances**
|
|
57
|
+
- Through **what steps** (must involve multiple interactions, not a single API call)
|
|
58
|
+
- To achieve **what business outcome** (a value the user can perceive)
|
|
59
|
+
|
|
60
|
+
Assign a globally unique number to each scenario (`S01`, `S02`...). This number will carry through to Phase 2 and Phase 3.
|
|
61
|
+
|
|
62
|
+
Output a scenario list table:
|
|
63
|
+
|
|
64
|
+
```markdown
|
|
65
|
+
| ID | Scenario Name | Trigger Condition | Related Pain Point | Priority |
|
|
66
|
+
|------|--------------------|----------------------------|--------------------|----------|
|
|
67
|
+
| S01 | Email Registration | New user's first visit | P01 | P0 |
|
|
68
|
+
| S02 | Password Login | Registered user returns | P01 | P0 |
|
|
69
|
+
| S03 | Forgot Password | User cannot log in | P02 | P1 |
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
#### Scenario Granularity Self-Check (MUST Pass)
|
|
73
|
+
|
|
74
|
+
After generating the scenario list, run these 4 tests. **If any test fails, re-organize the scenarios before proceeding.**
|
|
75
|
+
|
|
76
|
+
1. **Single-API Test**: If a scenario can be completed with just 1 API call, it is NOT a scenario — it is an operation. Merge it into a larger scenario.
|
|
77
|
+
2. **CRUD Test**: If the scenario list contains "Create X", "Read X", "Update X", "Delete X" as 4 separate scenarios, the granularity is too fine. Re-organize by user goals (e.g., "Manager plans weekly tasks" instead of "Create task" + "Assign task" + "Update task" + "Delete task").
|
|
78
|
+
3. **Business Value Test**: Describe in one sentence the value the user gains after completing the scenario. If the answer is merely "data was written/read/deleted", there is no real business goal — merge the scenario into a goal-driven one.
|
|
79
|
+
4. **Step Count Test**: A scenario's main path must contain at least 3 user-perceivable steps. Fewer than 3 means the granularity is too fine.
|
|
80
|
+
|
|
81
|
+
#### ❌ Anti-Pattern: One API = One Scenario
|
|
82
|
+
|
|
83
|
+
```markdown
|
|
84
|
+
| S01 | Create Task | User clicks "New" |
|
|
85
|
+
| S02 | Get Task List | User opens the page |
|
|
86
|
+
| S03 | Update Task | User edits a task |
|
|
87
|
+
| S04 | Delete Task | User deletes a task |
|
|
88
|
+
→ This is an API inventory, NOT a scenario list!
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
#### ✅ Correct: Organize by Business Goals
|
|
92
|
+
|
|
93
|
+
```markdown
|
|
94
|
+
| S01 | Team Lead Plans Weekly Tasks | Lead logs in → creates tasks → sets priority & deadline → assigns to members → members receive notifications |
|
|
95
|
+
| S02 | Developer Completes & Delivers | Dev views to-do → updates progress → marks complete → lead is notified and reviews |
|
|
96
|
+
| S03 | Lead Reviews Project Progress | Lead opens dashboard → filters by status/member → exports weekly report |
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Step 4: Write Scenario Acceptance Criteria
|
|
100
|
+
|
|
101
|
+
Write acceptance criteria for every P0 and P1 scenario:
|
|
102
|
+
|
|
103
|
+
```markdown
|
|
104
|
+
### S01: Email Registration
|
|
105
|
+
|
|
106
|
+
- **Trigger Condition**: New user's first visit, clicks "Sign Up"
|
|
107
|
+
- **User Value**: Quickly create an account and start using the product (← P01)
|
|
108
|
+
- **Priority**: P0
|
|
109
|
+
- **Main Path**: User fills in email and password, submits the form, receives a verification email, clicks the link to complete registration
|
|
110
|
+
|
|
111
|
+
#### Acceptance Criteria
|
|
112
|
+
|
|
113
|
+
##### Normal: Complete registration flow
|
|
114
|
+
- **GIVEN** the user has not registered before and is on the registration page
|
|
115
|
+
- **WHEN** the user fills in a valid email and password (≥8 characters) and clicks "Sign Up"
|
|
116
|
+
- **THEN** the system creates an account, sends a verification email, and the page displays "Please check your email for verification"
|
|
117
|
+
|
|
118
|
+
##### Exception: Email already registered
|
|
119
|
+
- **GIVEN** the email test@example.com is already registered
|
|
120
|
+
- **WHEN** the user attempts to register using test@example.com
|
|
121
|
+
- **THEN** the page displays "This email is already registered, please log in directly" and no email is sent
|
|
122
|
+
|
|
123
|
+
##### Exception: Password does not meet requirements
|
|
124
|
+
- **GIVEN** the user is on the registration page
|
|
125
|
+
- **WHEN** the user fills in a valid email but a password with fewer than 8 characters and clicks "Sign Up"
|
|
126
|
+
- **THEN** the page displays "Password must be at least 8 characters" and the request is not submitted
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**Principles for writing acceptance criteria**:
|
|
130
|
+
|
|
131
|
+
- Each scenario must have at least 1 normal + 1 exception acceptance criterion
|
|
132
|
+
- GIVEN describes the initial state — specific enough to be reproducible
|
|
133
|
+
- WHEN describes the user action — precise down to the button level
|
|
134
|
+
- THEN describes the expected behavior — specific enough to be verifiable
|
|
135
|
+
- Avoid vague wording: "fast", "friendly", "reasonable" → quantify with concrete metrics
|
|
136
|
+
|
|
137
|
+
### Step 5: Identify Constraints and Boundaries
|
|
138
|
+
|
|
139
|
+
- **Technical constraints**: Technology stack limitations, third-party service limitations
|
|
140
|
+
- **Resource constraints**: Team size, time window
|
|
141
|
+
- **"Won't-do" list**: Explicitly list features and scenarios that are out of scope for this phase to prevent scope creep
|
|
142
|
+
|
|
143
|
+
### Step 6: Assemble the Requirements Document
|
|
144
|
+
|
|
145
|
+
Output the complete document in the standard structure:
|
|
146
|
+
|
|
147
|
+
```markdown
|
|
148
|
+
# [Product Name] Requirements Document
|
|
149
|
+
|
|
150
|
+
> Last updated: [date]
|
|
151
|
+
|
|
152
|
+
## I. Product Background and Goals
|
|
153
|
+
### 1.1 Product Positioning
|
|
154
|
+
### 1.2 Core Objectives
|
|
155
|
+
### 1.3 Target User Persona
|
|
156
|
+
|
|
157
|
+
## II. User Pain Point Analysis
|
|
158
|
+
### P01: [Pain Point Name]
|
|
159
|
+
Because [reason] → leads to [pain point] → results in [consequence]
|
|
160
|
+
### P02: ...
|
|
161
|
+
|
|
162
|
+
## III. Scenario Overview
|
|
163
|
+
[Scenario list table: ID / Name / Trigger Condition / Related Pain Point / Priority]
|
|
164
|
+
|
|
165
|
+
## IV. Core Scenario Details
|
|
166
|
+
### S01: [Scenario Name]
|
|
167
|
+
[Trigger Condition + User Value + Priority + Main Path + Acceptance Criteria]
|
|
168
|
+
### S02: ...
|
|
169
|
+
|
|
170
|
+
## V. Constraints and Boundaries
|
|
171
|
+
### 5.1 Technical Constraints
|
|
172
|
+
### 5.2 Resource and Time Constraints
|
|
173
|
+
### 5.3 "Won't-Do" List
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## Output Specification
|
|
177
|
+
|
|
178
|
+
- File format: Markdown
|
|
179
|
+
- Storage location: `logos/resources/prd/1-product-requirements/`
|
|
180
|
+
- File naming: `{sequence}-{english-name}.md`, e.g., `01-requirements.md`
|
|
181
|
+
- Every scenario must be traceable to at least one user pain point
|
|
182
|
+
- P0/P1 scenarios must have GIVEN/WHEN/THEN (≥1 normal + ≥1 exception)
|
|
183
|
+
- Scenario numbers are globally unique and will carry through Phase 2 and Phase 3
|
|
184
|
+
|
|
185
|
+
## Best Practices
|
|
186
|
+
|
|
187
|
+
- **Cast a wide net first, then narrow down**: In the first pass, identify as many scenarios as possible, then cut non-core ones during prioritization
|
|
188
|
+
- **Scenarios ≠ Features, Scenarios ≠ APIs**: A scenario is a "complete path from the user's perspective to achieve a business goal". A single feature (e.g., "user authentication") may contain multiple scenarios (registration, login, password recovery); a single scenario (e.g., "first purchase") may span multiple features (browsing, adding to cart, payment). **Never define a single CRUD operation as a standalone scenario.**
|
|
189
|
+
- **Scenario granularity**: Keep granularity moderate in Phase 1. Too fine-grained ("user creates a record") is just an API call; too coarse ("user uses the product") is unverifiable. Good granularity: the main path of a scenario can be walked through in 1–2 minutes and involves at least 3 distinct steps
|
|
190
|
+
- **Acceptance criteria are the precise expression of requirements**: If you cannot write GIVEN/WHEN/THEN, the scenario is not yet well thought out
|
|
191
|
+
- **Exception scenarios are equally important**: Users don't always follow the happy path — exception handling often defines the product experience
|
|
192
|
+
- **The "won't-do" list is the hardest to write**: Restraint is the most important skill of a product manager
|
|
193
|
+
- **Once a scenario number is assigned, it is never reused**: Even if a scenario is deprecated, its number is not recycled, to avoid confusion
|
|
194
|
+
- **Requirements documents are living documents**: They are continuously updated as the product evolves, with every change tracked through Delta change management
|
|
195
|
+
|
|
196
|
+
## Recommended Prompts
|
|
197
|
+
|
|
198
|
+
The following prompts can be copied directly for use with an AI:
|
|
199
|
+
|
|
200
|
+
- `Help me write a requirements document`
|
|
201
|
+
- `I want to build a xxx product, help me sort out the requirements`
|
|
202
|
+
- `Help me organize these ideas into a structured requirements document`
|
|
203
|
+
- `Help me add exception scenario acceptance criteria to an existing requirements document`
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: product-designer
|
|
3
|
+
description: "Create product design specifications including feature specs and page designs. Use when requirements exist in logos/resources/prd/1-product-requirements/ but logos/resources/prd/2-product-design/ is empty."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill: Product Designer
|
|
7
|
+
|
|
8
|
+
> Based on scenarios from the Phase 1 requirements document, refine interaction flows and feature specifications, and generate product prototypes. The prototype format automatically adapts to the product type (Web/CLI/Library, etc.). Scenario numbering stays consistent with Phase 1.
|
|
9
|
+
|
|
10
|
+
## Trigger Conditions
|
|
11
|
+
|
|
12
|
+
- User requests a product design document or feature specification
|
|
13
|
+
- User requests prototypes or interaction design
|
|
14
|
+
- User mentions "Phase 2", "product design layer", or "WHAT"
|
|
15
|
+
- Requirements document exists (with scenario definitions) and solution design needs to begin
|
|
16
|
+
|
|
17
|
+
## Core Capabilities
|
|
18
|
+
|
|
19
|
+
1. **Identify the product type** and determine the corresponding prototype format (see Product Types and Prototype Strategy below)
|
|
20
|
+
2. Design information architecture (page structure / command structure / API structure)
|
|
21
|
+
3. Use Phase 1 scenarios as the backbone to refine interaction flows and feature specifications
|
|
22
|
+
4. Supplement each scenario with interaction-level GIVEN/WHEN/THEN acceptance criteria
|
|
23
|
+
5. Generate prototypes appropriate for the product type
|
|
24
|
+
6. When a scenario is too coarse-grained, split it into sub-scenarios (`S01.1`, `S01.2`)
|
|
25
|
+
|
|
26
|
+
## Product Types and Prototype Strategy
|
|
27
|
+
|
|
28
|
+
Before executing this Skill, first determine the product type (inferred from the requirements document's constraints and boundaries, and the `tech_stack` in `logos-project.yaml`), then select the corresponding prototype format:
|
|
29
|
+
|
|
30
|
+
| Product Type | Typical Features | Prototype Format | Interaction Spec Focus |
|
|
31
|
+
|---------|---------|---------|-------------|
|
|
32
|
+
| **Web Application** | Has UI pages, user login | Interactive HTML pages | Page navigation, form validation, state changes |
|
|
33
|
+
| **CLI Tool** | Terminal commands, no GUI | Terminal interaction examples (command + output simulation) | Command format, parameter design, output format, error messages |
|
|
34
|
+
| **AI Skills / Conversational Product** | User interacts with AI via natural language | Dialogue flowchart + sample dialogue scripts | Dialogue steps, AI questioning strategy, deliverable format |
|
|
35
|
+
| **Library / SDK** | Called by other programs | API usage examples (code snippets) | Public interfaces, parameter design, return values, error codes |
|
|
36
|
+
| **Mobile Application** | Mobile UI | HTML pages (mobile viewport) | Gesture interaction, navigation patterns, offline state |
|
|
37
|
+
| **Hybrid** | Combination of multiple deliverables | Select the corresponding format for each deliverable | Interaction handoffs between deliverables |
|
|
38
|
+
|
|
39
|
+
## Execution Steps
|
|
40
|
+
|
|
41
|
+
### Step 1: Read the Requirements Document and Identify the Product Type
|
|
42
|
+
|
|
43
|
+
Read the Phase 1 requirements document and extract:
|
|
44
|
+
- Scenario list (`S01`, `S02`...) and priorities
|
|
45
|
+
- Constraints and boundaries → determine product type
|
|
46
|
+
- `tech_stack` in `logos-project.yaml` → confirm technical form
|
|
47
|
+
|
|
48
|
+
**Scenario Granularity Check**: While reading the scenario list, watch for signs that scenarios are actually single CRUD operations (e.g., "Create Task", "Get Task List", "Update Task", "Delete Task" as 4 separate scenarios). If detected, recommend returning to Phase 1 to re-organize scenarios by business goals before proceeding with product design. Designing interactions for CRUD-level "scenarios" will produce shallow specs that don't reflect real user workflows.
|
|
49
|
+
|
|
50
|
+
Output the product type determination and rationale for the prototype strategy selection.
|
|
51
|
+
|
|
52
|
+
### Step 2: Design Information Architecture
|
|
53
|
+
|
|
54
|
+
Design architecture at different levels based on the product type:
|
|
55
|
+
|
|
56
|
+
- **Web Application**: Page structure, navigation hierarchy, route design
|
|
57
|
+
- **CLI Tool**: Command tree structure, subcommand hierarchy, global options
|
|
58
|
+
- **AI Skills**: Skill trigger relationships, dialogue step orchestration, deliverable dependency chain
|
|
59
|
+
- **Library / SDK**: Module structure, public API grouping
|
|
60
|
+
|
|
61
|
+
### Step 3: Refine Interaction Specifications Per Scenario
|
|
62
|
+
|
|
63
|
+
Define complete interaction details for each scenario (see format examples below). Different product types emphasize different interaction dimensions.
|
|
64
|
+
|
|
65
|
+
### Step 4: Supplement Interaction-Level Acceptance Criteria
|
|
66
|
+
|
|
67
|
+
Building on the Phase 1 GIVEN/WHEN/THEN, refine down to the interaction element level.
|
|
68
|
+
|
|
69
|
+
### Step 5: Generate Prototypes
|
|
70
|
+
|
|
71
|
+
Generate prototypes in the format corresponding to the product type (see examples).
|
|
72
|
+
|
|
73
|
+
### Step 6: Output the Product Design Document
|
|
74
|
+
|
|
75
|
+
Organize by scenario, with each scenario containing interaction specifications + corresponding prototype.
|
|
76
|
+
|
|
77
|
+
## Scenario Elaboration Examples
|
|
78
|
+
|
|
79
|
+
### Web Application Example
|
|
80
|
+
|
|
81
|
+
```markdown
|
|
82
|
+
### S01: Email Registration — Interaction Specification
|
|
83
|
+
|
|
84
|
+
**Pages Involved**: Registration page, email verification waiting page, verification success page
|
|
85
|
+
|
|
86
|
+
**Interaction Flow**:
|
|
87
|
+
1. User clicks "Sign Up" on the homepage → redirected to the registration page
|
|
88
|
+
2. Registration page contains: email input, password input, confirm password input, sign up button
|
|
89
|
+
3. Real-time validation: email format, password length ≥ 8, both passwords match
|
|
90
|
+
4. Successful submission → redirected to email verification waiting page
|
|
91
|
+
|
|
92
|
+
#### Acceptance Criteria (Interaction Level)
|
|
93
|
+
|
|
94
|
+
##### Normal: Successful Registration
|
|
95
|
+
- **GIVEN** User is on the registration page, all fields are empty
|
|
96
|
+
- **WHEN** User enters test@example.com, password "Pass1234", confirm password "Pass1234", clicks "Sign Up" button
|
|
97
|
+
- **THEN** "Sign Up" button enters loading state, redirects to email verification waiting page after 1-3 seconds
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Prototype**: `01-register-prototype.html` (interactive HTML page)
|
|
101
|
+
|
|
102
|
+
### CLI Tool Example
|
|
103
|
+
|
|
104
|
+
````markdown
|
|
105
|
+
### S01: CLI Project Initialization — Interaction Specification
|
|
106
|
+
|
|
107
|
+
**Command Format**: `openlogos init [name]`
|
|
108
|
+
|
|
109
|
+
**Parameter Design**:
|
|
110
|
+
| Parameter | Type | Required | Default | Description |
|
|
111
|
+
|------|------|------|--------|------|
|
|
112
|
+
| name | string | No | Current directory name | Project name |
|
|
113
|
+
|
|
114
|
+
**Interaction Flow**:
|
|
115
|
+
1. User runs `openlogos init my-project` in the terminal
|
|
116
|
+
2. CLI checks if `logos/logos.config.json` already exists
|
|
117
|
+
3. Does not exist → creates directory structure, outputs created file list line by line
|
|
118
|
+
4. Exists → outputs error message and exits
|
|
119
|
+
|
|
120
|
+
**Terminal Output Simulation**:
|
|
121
|
+
|
|
122
|
+
Normal path:
|
|
123
|
+
```
|
|
124
|
+
$ openlogos init my-project
|
|
125
|
+
|
|
126
|
+
Creating OpenLogos project structure...
|
|
127
|
+
|
|
128
|
+
✓ logos/resources/prd/1-product-requirements/
|
|
129
|
+
✓ logos/resources/prd/2-product-design/
|
|
130
|
+
✓ logos/resources/prd/3-technical-plan/1-architecture/
|
|
131
|
+
✓ logos/resources/prd/3-technical-plan/2-scenario-implementation/
|
|
132
|
+
✓ logos/resources/api/
|
|
133
|
+
✓ logos/resources/database/
|
|
134
|
+
✓ logos/resources/scenario/
|
|
135
|
+
✓ logos/changes/
|
|
136
|
+
✓ logos/logos.config.json
|
|
137
|
+
✓ logos/logos-project.yaml
|
|
138
|
+
✓ AGENTS.md
|
|
139
|
+
✓ CLAUDE.md
|
|
140
|
+
|
|
141
|
+
Project initialized. Next steps:
|
|
142
|
+
1. Edit logos/logos.config.json to configure your project
|
|
143
|
+
2. Start with Phase 1: tell AI "Help me write requirements"
|
|
144
|
+
3. Run `openlogos status` to check progress at any time
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Error path:
|
|
148
|
+
```
|
|
149
|
+
$ openlogos init
|
|
150
|
+
Error: logos/logos.config.json already exists in current directory.
|
|
151
|
+
This directory has already been initialized as an OpenLogos project.
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
#### Acceptance Criteria (Interaction Level)
|
|
155
|
+
|
|
156
|
+
##### Normal: Brand New Project
|
|
157
|
+
- **GIVEN** Current directory has no `logos/logos.config.json`
|
|
158
|
+
- **WHEN** User runs `openlogos init my-project`
|
|
159
|
+
- **THEN** Terminal outputs the 12 created files/directories line by line, ends with "Next steps" guidance, exit code is 0
|
|
160
|
+
|
|
161
|
+
##### Error: Already Initialized
|
|
162
|
+
- **GIVEN** Current directory already contains `logos/logos.config.json`
|
|
163
|
+
- **WHEN** User runs `openlogos init`
|
|
164
|
+
- **THEN** Terminal outputs a red error message, no files are created, exit code is 1
|
|
165
|
+
````
|
|
166
|
+
|
|
167
|
+
**Prototype**: `01-init-terminal.md` (terminal interaction simulation document)
|
|
168
|
+
|
|
169
|
+
### AI Skills / Conversational Product Example
|
|
170
|
+
|
|
171
|
+
```markdown
|
|
172
|
+
### S02: AI-Assisted Requirements Writing — Interaction Specification
|
|
173
|
+
|
|
174
|
+
**Trigger Method**: User enters natural language in an AI coding tool
|
|
175
|
+
|
|
176
|
+
**Dialogue Flow**:
|
|
177
|
+
1. User says "Help me write requirements"
|
|
178
|
+
2. AI reads the prd-writer Skill
|
|
179
|
+
3. AI follows up: "Please first tell me your product positioning — what problem does this product solve, and for whom?"
|
|
180
|
+
4. User describes the product idea
|
|
181
|
+
5. AI follows up: "Who is the core user? Can you describe a specific person?"
|
|
182
|
+
6. User describes the user persona
|
|
183
|
+
7. AI consolidates the information and begins outputting a structured requirements document
|
|
184
|
+
8. After output, AI asks: "The requirements draft has been generated. Please review it and let me know what needs to be changed."
|
|
185
|
+
|
|
186
|
+
**AI Behavioral Guidelines**:
|
|
187
|
+
- No more than 3 rounds of follow-up questions, each round focusing on 1 key piece of information
|
|
188
|
+
- If the user provides sufficient information in the first message, skip follow-up questions and output directly
|
|
189
|
+
- Output document format strictly follows the prd-writer specification
|
|
190
|
+
|
|
191
|
+
#### Acceptance Criteria (Interaction Level)
|
|
192
|
+
|
|
193
|
+
##### Normal: Sufficient Information
|
|
194
|
+
- **GIVEN** User describes product positioning, target users, and core pain points in the first message
|
|
195
|
+
- **WHEN** AI begins executing the prd-writer Skill
|
|
196
|
+
- **THEN** AI directly outputs a structured requirements document without follow-up questions
|
|
197
|
+
|
|
198
|
+
##### Normal: Insufficient Information
|
|
199
|
+
- **GIVEN** User only says "Help me write requirements"
|
|
200
|
+
- **WHEN** AI begins executing the prd-writer Skill
|
|
201
|
+
- **THEN** AI asks about product positioning (round 1) → user responds → AI asks about target users (round 2) → user responds → AI outputs requirements document
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
**Prototype**: `02-prd-writer-dialogue.md` (dialogue flow script)
|
|
205
|
+
|
|
206
|
+
## Output Specification
|
|
207
|
+
|
|
208
|
+
- Feature specs: `logos/resources/prd/2-product-design/1-feature-specs/`
|
|
209
|
+
- Prototypes: `logos/resources/prd/2-product-design/2-page-design/`
|
|
210
|
+
- Design documents and prototypes appear in pairs: `{number}-{name}-design.md` + `{number}-{name}-prototype.{ext}`
|
|
211
|
+
- Web Application: `.html`
|
|
212
|
+
- CLI Tool: `-terminal.md` (terminal interaction simulation)
|
|
213
|
+
- AI Skills: `-dialogue.md` (dialogue flow script)
|
|
214
|
+
- Library / SDK: `-api-examples.md` (usage examples)
|
|
215
|
+
- **Scenario numbering must be consistent with Phase 1**; use sub-numbers when splitting (`S01.1`)
|
|
216
|
+
|
|
217
|
+
## Best Practices
|
|
218
|
+
|
|
219
|
+
- **Scenarios are the backbone**: Don't organize documents by "pages" or "commands" — organize by "scenarios"
|
|
220
|
+
- **Phase 1 acceptance criteria are the input**: Phase 2 does not rewrite acceptance criteria; it refines Phase 1 criteria down to the interaction element level
|
|
221
|
+
- **Sub-scenario splits need justification**: Only split when a Phase 1 scenario truly contains two independent interaction paths
|
|
222
|
+
- **CLI "prototypes" are terminal output simulations**: No HTML needed — use code blocks to simulate terminal input/output
|
|
223
|
+
- **AI Skills "prototypes" are dialogue scripts**: Simulate multi-turn conversations between the user and AI, specifying AI behavior at each node
|
|
224
|
+
- **Hybrid products are organized by scenario**: Within the same product, CLI scenarios use terminal simulations while Web scenarios use HTML — no need for a uniform format
|
|
225
|
+
- **Nested Markdown code blocks**: When the document content itself contains ` ``` ` code fences (e.g., AI outputting code snippets in dialogue scripts, or nested command output in terminal simulations), **the outer fence must use 4 backticks** (` ```` `), keeping the inner fence at 3. This is standard Markdown syntax to prevent the parser from misjudging nesting levels and causing formatting issues. The CLI Tool example above demonstrates this rule.
|
|
226
|
+
|
|
227
|
+
## Recommended Prompts
|
|
228
|
+
|
|
229
|
+
The following prompts can be copied directly for use with AI:
|
|
230
|
+
|
|
231
|
+
- `Create product design based on the requirements document`
|
|
232
|
+
- `Help me design the interaction flow and prototype for S01`
|
|
233
|
+
- `Help me create the product design for all scenarios`
|
|
234
|
+
- `Help me design the CLI command interaction flow`
|
|
235
|
+
- `Help me design the AI Skill dialogue flow`
|