prjct-cli 0.10.10 → 0.10.11

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,78 @@
1
+ ---
2
+ name: database-design
3
+ description: Design database schema
4
+ allowed-tools: [Read, Glob, Grep]
5
+ ---
6
+
7
+ # Database Design
8
+
9
+ Design database schema for the given requirements.
10
+
11
+ ## Input
12
+ - Target: {{target}}
13
+ - Requirements: {{requirements}}
14
+
15
+ ## Analysis Steps
16
+
17
+ 1. **Identify Entities**
18
+ - What data needs to be stored?
19
+ - What are the relationships?
20
+ - What queries will be common?
21
+
22
+ 2. **Review Existing Schema**
23
+ - Read current models/migrations
24
+ - Match naming conventions
25
+ - Use consistent patterns
26
+
27
+ 3. **Design Tables/Collections**
28
+ - Fields and types
29
+ - Indexes for queries
30
+ - Constraints and defaults
31
+
32
+ 4. **Plan Migrations**
33
+ - Order of operations
34
+ - Data transformations
35
+ - Rollback strategy
36
+
37
+ ## Output Format
38
+
39
+ ```markdown
40
+ # Database Design: {target}
41
+
42
+ ## Entities
43
+
44
+ ### users
45
+ | Column | Type | Constraints | Description |
46
+ |--------|------|-------------|-------------|
47
+ | id | uuid | PK | Unique identifier |
48
+ | email | varchar(255) | UNIQUE, NOT NULL | User email |
49
+ | created_at | timestamp | NOT NULL, DEFAULT now() | Creation time |
50
+
51
+ ### posts
52
+ | Column | Type | Constraints | Description |
53
+ |--------|------|-------------|-------------|
54
+ | id | uuid | PK | Unique identifier |
55
+ | user_id | uuid | FK(users.id) | Author reference |
56
+ | title | varchar(255) | NOT NULL | Post title |
57
+
58
+ ## Relationships
59
+ - users 1:N posts (one user has many posts)
60
+
61
+ ## Indexes
62
+ - `users_email_idx` on users(email)
63
+ - `posts_user_id_idx` on posts(user_id)
64
+
65
+ ## Migrations
66
+ 1. Create users table
67
+ 2. Create posts table with FK
68
+ 3. Add indexes
69
+
70
+ ## Queries (common)
71
+ - Get user by email: `SELECT * FROM users WHERE email = ?`
72
+ - Get user posts: `SELECT * FROM posts WHERE user_id = ?`
73
+ ```
74
+
75
+ ## Guidelines
76
+ - Normalize appropriately
77
+ - Add indexes for common queries
78
+ - Document relationships clearly
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: flow-design
3
+ description: Design user/data flow
4
+ allowed-tools: [Read, Glob, Grep]
5
+ ---
6
+
7
+ # Flow Design
8
+
9
+ Design the user or data flow for the given feature.
10
+
11
+ ## Input
12
+ - Target: {{target}}
13
+ - Requirements: {{requirements}}
14
+
15
+ ## Analysis Steps
16
+
17
+ 1. **Identify Actors**
18
+ - Who initiates the flow?
19
+ - What systems are involved?
20
+ - What are the touchpoints?
21
+
22
+ 2. **Map Steps**
23
+ - Start to end journey
24
+ - Decision points
25
+ - Error scenarios
26
+
27
+ 3. **Define States**
28
+ - Initial state
29
+ - Intermediate states
30
+ - Final state(s)
31
+
32
+ 4. **Plan Error Handling**
33
+ - What can go wrong?
34
+ - Recovery paths
35
+ - User feedback
36
+
37
+ ## Output Format
38
+
39
+ ```markdown
40
+ # Flow: {target}
41
+
42
+ ## Overview
43
+ Brief description of this flow.
44
+
45
+ ## Actors
46
+ - **User**: Primary actor
47
+ - **System**: Backend services
48
+ - **External**: Third-party APIs
49
+
50
+ ## Flow Diagram
51
+ ```
52
+ [Start] → [Step 1] → [Decision?]
53
+ ↓ Yes
54
+ [Step 2] → [End]
55
+ ↓ No
56
+ [Error] → [Recovery]
57
+ ```
58
+
59
+ ## Steps
60
+
61
+ ### 1. User Action
62
+ - User does X
63
+ - System validates Y
64
+ - **Success**: Continue to step 2
65
+ - **Error**: Show message, allow retry
66
+
67
+ ### 2. Processing
68
+ - System processes data
69
+ - Calls external API
70
+ - Updates database
71
+
72
+ ### 3. Completion
73
+ - Show success message
74
+ - Update UI state
75
+ - Log event
76
+
77
+ ## Error Scenarios
78
+ | Error | Cause | Recovery |
79
+ |-------|-------|----------|
80
+ | Invalid input | Bad data | Show validation |
81
+ | API timeout | Network | Retry with backoff |
82
+ | Auth failed | Token expired | Redirect to login |
83
+
84
+ ## States
85
+ - `idle`: Initial state
86
+ - `loading`: Processing
87
+ - `success`: Completed
88
+ - `error`: Failed
89
+ ```
90
+
91
+ ## Guidelines
92
+ - Cover happy path first
93
+ - Document all error cases
94
+ - Keep flows focused