create-kuckit-app 0.1.1 → 0.2.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 (92) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/{create-project-DTm05G7D.js → create-project-CP-h4Ygi.js} +7 -5
  3. package/dist/index.js +1 -1
  4. package/package.json +3 -2
  5. package/templates/base/.claude/CLAUDE.md +44 -0
  6. package/templates/base/.claude/agents/daidalos.md +76 -0
  7. package/templates/base/.claude/agents/episteme.md +79 -0
  8. package/templates/base/.claude/agents/librarian.md +132 -0
  9. package/templates/base/.claude/agents/oracle.md +210 -0
  10. package/templates/base/.claude/commands/create-plan.md +159 -0
  11. package/templates/base/.claude/commands/file-beads.md +98 -0
  12. package/templates/base/.claude/commands/review-beads.md +161 -0
  13. package/templates/base/.claude/settings.json +11 -0
  14. package/templates/base/.claude/skills/kuckit/SKILL.md +436 -0
  15. package/templates/base/.claude/skills/kuckit/references/ARCHITECTURE.md +388 -0
  16. package/templates/base/.claude/skills/kuckit/references/CLI-COMMANDS.md +365 -0
  17. package/templates/base/.claude/skills/kuckit/references/MODULE-DEVELOPMENT.md +581 -0
  18. package/templates/base/.claude/skills/kuckit/references/PACKAGES.md +112 -0
  19. package/templates/base/.claude/skills/kuckit/references/PUBLISHING.md +231 -0
  20. package/templates/base/.env.example +13 -0
  21. package/templates/base/.github/workflows/ci.yml +28 -0
  22. package/templates/base/.husky/pre-commit +1 -0
  23. package/templates/base/.prettierignore +5 -0
  24. package/templates/base/.prettierrc +8 -0
  25. package/templates/base/AGENTS.md +148 -0
  26. package/templates/base/apps/server/.env.example +18 -0
  27. package/templates/base/apps/server/AGENTS.md +37 -0
  28. package/templates/base/apps/server/package.json +13 -2
  29. package/templates/base/apps/server/src/app.ts +20 -0
  30. package/templates/base/apps/server/src/auth.ts +10 -0
  31. package/templates/base/apps/server/src/config/modules.ts +22 -0
  32. package/templates/base/apps/server/src/container.ts +81 -0
  33. package/templates/base/apps/server/src/health.ts +27 -0
  34. package/templates/base/apps/server/src/middleware/container.ts +41 -0
  35. package/templates/base/apps/server/src/rpc-router-registry.ts +26 -0
  36. package/templates/base/apps/server/src/rpc.ts +31 -0
  37. package/templates/base/apps/server/src/server.ts +42 -14
  38. package/templates/base/apps/web/.env.example +4 -0
  39. package/templates/base/apps/web/AGENTS.md +53 -0
  40. package/templates/base/apps/web/index.html +1 -1
  41. package/templates/base/apps/web/package.json +15 -2
  42. package/templates/base/apps/web/src/lib/kuckit-router.ts +42 -0
  43. package/templates/base/apps/web/src/main.tsx +26 -14
  44. package/templates/base/apps/web/src/providers/KuckitProvider.tsx +147 -0
  45. package/templates/base/apps/web/src/providers/ServicesProvider.tsx +47 -0
  46. package/templates/base/apps/web/src/routeTree.gen.ts +91 -0
  47. package/templates/base/apps/web/src/routes/__root.tsx +31 -0
  48. package/templates/base/apps/web/src/routes/index.tsx +46 -0
  49. package/templates/base/apps/web/src/routes/login.tsx +108 -0
  50. package/templates/base/apps/web/src/services/auth-client.ts +12 -0
  51. package/templates/base/apps/web/src/services/index.ts +3 -0
  52. package/templates/base/apps/web/src/services/rpc.ts +29 -0
  53. package/templates/base/apps/web/src/services/types.ts +14 -0
  54. package/templates/base/apps/web/vite.config.ts +2 -1
  55. package/templates/base/docker-compose.yml +23 -0
  56. package/templates/base/eslint.config.js +18 -0
  57. package/templates/base/package.json +32 -2
  58. package/templates/base/packages/api/AGENTS.md +27 -0
  59. package/templates/base/packages/api/package.json +35 -0
  60. package/templates/base/packages/api/src/context.ts +48 -0
  61. package/templates/base/packages/api/src/index.ts +22 -0
  62. package/templates/base/packages/api/tsconfig.json +8 -0
  63. package/templates/base/packages/auth/AGENTS.md +45 -0
  64. package/templates/base/packages/auth/package.json +27 -0
  65. package/templates/base/packages/auth/src/index.ts +22 -0
  66. package/templates/base/packages/auth/tsconfig.json +8 -0
  67. package/templates/base/packages/db/AGENTS.md +59 -0
  68. package/templates/base/packages/db/drizzle.config.ts +19 -0
  69. package/templates/base/packages/db/package.json +36 -0
  70. package/templates/base/packages/db/src/connection.ts +40 -0
  71. package/templates/base/packages/db/src/index.ts +4 -0
  72. package/templates/base/packages/db/src/migrations/0000_init.sql +54 -0
  73. package/templates/base/packages/db/src/migrations/meta/_journal.json +13 -0
  74. package/templates/base/packages/db/src/schema/auth.ts +51 -0
  75. package/templates/base/packages/db/tsconfig.json +8 -0
  76. package/templates/base/packages/items-module/AGENTS.md +112 -0
  77. package/templates/base/packages/items-module/package.json +32 -0
  78. package/templates/base/packages/items-module/src/adapters/item.drizzle.ts +66 -0
  79. package/templates/base/packages/items-module/src/api/items.router.ts +47 -0
  80. package/templates/base/packages/items-module/src/client-module.ts +39 -0
  81. package/templates/base/packages/items-module/src/domain/item.entity.ts +36 -0
  82. package/templates/base/packages/items-module/src/index.ts +15 -0
  83. package/templates/base/packages/items-module/src/module.ts +53 -0
  84. package/templates/base/packages/items-module/src/ports/item.repository.ts +13 -0
  85. package/templates/base/packages/items-module/src/ui/ItemsPage.tsx +162 -0
  86. package/templates/base/packages/items-module/src/usecases/create-item.ts +25 -0
  87. package/templates/base/packages/items-module/src/usecases/delete-item.ts +18 -0
  88. package/templates/base/packages/items-module/src/usecases/get-item.ts +19 -0
  89. package/templates/base/packages/items-module/src/usecases/list-items.ts +21 -0
  90. package/templates/base/packages/items-module/tsconfig.json +9 -0
  91. package/templates/base/turbo.json +13 -1
  92. package/templates/base/apps/web/src/App.tsx +0 -16
@@ -0,0 +1,159 @@
1
+ ---
2
+ description: Generate a structured Kuckit module implementation plan from brainstorming
3
+ argument-hint: <module-name-or-raw-plan-description>
4
+ ---
5
+
6
+ # Create Structured Module Implementation Plan
7
+
8
+ You are tasked with transforming raw brainstorming or rough feature ideas into a complete, structured implementation plan following Kuckit module conventions.
9
+
10
+ ## Step 1: Gather Raw Plan Input
11
+
12
+ First, review the context provided: `$ARGUMENTS`
13
+
14
+ If no specific plan/brainstorming is provided, ask the user:
15
+
16
+ > What module would you like to plan? Please describe:
17
+ >
18
+ > 1. **Module name** (e.g., "notifications", "billing", "analytics")
19
+ > 2. **Core features** (what should it do?)
20
+ > 3. **User flows** (how will users interact with it?)
21
+ > 4. **Data needs** (what entities/tables are needed?)
22
+
23
+ ## Step 2: Read the Template
24
+
25
+ Read the plan template to understand the required structure:
26
+
27
+ ```
28
+ history/PLAN_TEMPLATE.md
29
+ ```
30
+
31
+ Reference this template for all 10 sections that must be populated.
32
+
33
+ ## Step 3: Extract Module Metadata
34
+
35
+ From the raw input, identify and confirm with the user:
36
+
37
+ | Field | Example | Your Value |
38
+ | ------------------- | ------------------------------ | ---------- |
39
+ | Module ID | `kuckit.notifications` | ? |
40
+ | Module Display Name | `Notifications` | ? |
41
+ | Package Name | `@kuckit/notifications-module` | ? |
42
+ | Primary Route | `/notifications` | ? |
43
+ | Brief Description | One-line summary | ? |
44
+
45
+ ## Step 4: Design Data Model
46
+
47
+ Based on the features, design the database schema:
48
+
49
+ 1. **Identify Entities** - What are the core objects? (e.g., Notification, NotificationPreference)
50
+ 2. **Define Tables** - What columns does each table need?
51
+ 3. **Map Relationships** - How do entities relate to each other and to `user`?
52
+ 4. **Define Enums** - What status/type enums are needed?
53
+ 5. **Plan Indexes** - What queries will be common?
54
+
55
+ Document your proposed schema before proceeding.
56
+
57
+ ## Step 5: Identify Use Cases
58
+
59
+ List all use cases following the naming convention `make{Action}{Entity}`:
60
+
61
+ | Use Case | Type | Description |
62
+ | -------------------------- | ----- | ------------------------- |
63
+ | `makeCreateNotification` | write | Create a new notification |
64
+ | `makeGetUserNotifications` | read | List user's notifications |
65
+ | `makeMarkNotificationRead` | write | Mark notification as read |
66
+
67
+ For each use case, identify:
68
+
69
+ - Input parameters
70
+ - Output shape
71
+ - Auth requirements (public vs authed)
72
+ - Side effects (emails, webhooks, etc.)
73
+
74
+ ## Step 6: Map User Flows
75
+
76
+ Create sequence diagrams for the main flows:
77
+
78
+ 1. **Primary happy path** - The main user journey
79
+ 2. **Secondary flows** - Alternative paths, edge cases
80
+ 3. **Error flows** - What happens when things fail?
81
+
82
+ Use ASCII sequence diagrams as shown in the template.
83
+
84
+ ## Step 7: Generate the Complete Plan
85
+
86
+ Now generate the full plan document with ALL 10 sections:
87
+
88
+ 1. **Executive Summary** - 3-4 bullet points on what this implements
89
+ 2. **Module Structure** - Directory tree with actual file names
90
+ 3. **Architecture Overview** - ASCII diagram showing layer interactions
91
+ 4. **Flows** - Sequence diagrams and data tables
92
+ 5. **Module Implementation** - Complete code snippets for:
93
+ - 5.1 Package.json
94
+ - 5.2 Database Schema (Drizzle)
95
+ - 5.3 Repository (interface + factory)
96
+ - 5.4 Use Cases (at least 2-3 examples)
97
+ - 5.5 oRPC Router
98
+ - 5.6 Server Module Definition
99
+ - 5.7 Client Module Definition
100
+ - 5.8 Client Page/Component
101
+ 6. **External Integrations** (if applicable)
102
+ 7. **Security Considerations** - Table of security measures
103
+ 8. **Error Handling** - Table of error codes/messages
104
+ 9. **Implementation Order** - Day-by-day breakdown
105
+ 10. **Summary** - Exports, patterns, scope
106
+
107
+ ## Step 8: Save the Plan
108
+
109
+ Save the generated plan to:
110
+
111
+ ```
112
+ history/{{MODULE_NAME}}_PLAN.md
113
+ ```
114
+
115
+ For example: `history/NOTIFICATIONS_PLAN.md`
116
+
117
+ ## Step 9: Summarize and Next Steps
118
+
119
+ After saving, provide:
120
+
121
+ 1. **Plan location** - Where the file was saved
122
+ 2. **Key decisions made** - Summarize the main design choices
123
+ 3. **Open questions** - Any ambiguities that need user input
124
+ 4. **Suggested next steps**:
125
+ - Review the plan
126
+ - Run `/file-beads` to create issues from the plan
127
+ - Begin implementation following the Implementation Order
128
+
129
+ ## Quality Checklist
130
+
131
+ Before finalizing, verify:
132
+
133
+ - [ ] All 10 template sections are populated
134
+ - [ ] Code snippets follow Kuckit conventions (factory functions, typed cradles)
135
+ - [ ] Database schema includes proper indexes
136
+ - [ ] Use cases have clear input/output types
137
+ - [ ] Flows show complete user journeys
138
+ - [ ] Security considerations are addressed
139
+ - [ ] Error handling covers common failure modes
140
+ - [ ] Implementation order is realistic (5 days typical)
141
+
142
+ ## Iteration
143
+
144
+ You may iterate on the plan up to 3 times based on user feedback. After 3 iterations, suggest moving to implementation.
145
+
146
+ Track iterations:
147
+
148
+ - Iteration 1: Initial plan generation
149
+ - Iteration 2: Refinements based on feedback
150
+ - Iteration 3: Final polish
151
+
152
+ ## Reference Documents
153
+
154
+ For context on Kuckit conventions, you may reference:
155
+
156
+ - `AGENTS.md` - Project architecture overview
157
+ - `packages/sdk/docs/MODULE_DEVELOPMENT.md` - Module development guide
158
+ - `history/CLI_AUTHORIZATION_PLAN.md` - Example completed plan
159
+ - `apps/server/AGENTS.md` - Server-specific patterns (especially oRPC routes)
@@ -0,0 +1,98 @@
1
+ ---
2
+ description: File detailed Beads epics and issues from a plan
3
+ argument-hint: <plan-description-or-context>
4
+ ---
5
+
6
+ # File Beads Epics and Issues from Plan
7
+
8
+ You are tasked with converting a plan into a comprehensive set of Beads epics and issues. Follow these steps carefully:
9
+
10
+ ## Step 1: Understand the Plan
11
+
12
+ First, review the plan context provided: `$ARGUMENTS`
13
+
14
+ If no specific plan is provided, ask the user to share the plan or point to a planning document (check `history/` directory for recent plans).
15
+
16
+ ## Step 2: Analyze and Structure
17
+
18
+ Before filing any issues, analyze the plan for:
19
+
20
+ 1. **Major workstreams** - These become epics
21
+ 2. **Individual tasks** - These become issues under epics
22
+ 3. **Dependencies** - What must complete before other work can start?
23
+ 4. **Parallelization opportunities** - What can be worked on simultaneously?
24
+ 5. **Technical risks** - What needs spikes or investigation first?
25
+
26
+ ## Step 3: File Epics First
27
+
28
+ Create epics for major workstreams using:
29
+
30
+ ```bash
31
+ bd create "Epic: <title>" -t epic -p <priority> --json
32
+ ```
33
+
34
+ Epics should:
35
+
36
+ - Have clear, descriptive titles
37
+ - Include acceptance criteria in the description
38
+ - Be scoped to deliverable milestones
39
+
40
+ ## Step 4: File Detailed Issues
41
+
42
+ For each epic, create child issues with:
43
+
44
+ ```bash
45
+ bd create "<task title>" -t <type> -p <priority> --deps <parent-epic-id> --json
46
+ ```
47
+
48
+ Each issue MUST include:
49
+
50
+ - **Clear title** - Action-oriented (e.g., "Implement X", "Add Y", "Configure Z")
51
+ - **Detailed description** - What exactly needs to be done
52
+ - **Acceptance criteria** - How do we know it's done?
53
+ - **Technical notes** - Implementation hints, gotchas, relevant files
54
+ - **Dependencies** - Link to blocking issues with `--deps bd-<id>`
55
+
56
+ ## Step 5: Map Dependencies Carefully
57
+
58
+ For each issue, consider:
59
+
60
+ - Does this depend on another issue completing first?
61
+ - Can this be worked on in parallel with siblings?
62
+ - Are there cross-epic dependencies?
63
+
64
+ Use `--deps bd-X,bd-Y` for multiple dependencies.
65
+
66
+ ## Step 6: Set Priorities Thoughtfully
67
+
68
+ - `0` - Critical path blockers, security issues
69
+ - `1` - Core functionality, high business value
70
+ - `2` - Standard work items (default)
71
+ - `3` - Nice-to-haves, polish
72
+ - `4` - Backlog, future considerations
73
+
74
+ ## Step 7: Verify the Graph
75
+
76
+ After filing all issues, run:
77
+
78
+ ```bash
79
+ bd list --json
80
+ bd ready --json
81
+ ```
82
+
83
+ Verify:
84
+
85
+ - All epics have child issues
86
+ - Dependencies form a valid DAG (no cycles)
87
+ - Ready work exists (some issues have no blockers)
88
+ - Priorities make sense for execution order
89
+
90
+ ## Output Format
91
+
92
+ After completing, provide:
93
+
94
+ 1. Summary of epics created
95
+ 2. Summary of issues per epic
96
+ 3. Dependency graph overview (what unblocks what)
97
+ 4. Suggested starting points (ready issues)
98
+ 5. Parallelization opportunities
@@ -0,0 +1,161 @@
1
+ ---
2
+ description: Review, proofread, and refine filed Beads epics and issues
3
+ argument-hint: [optional: specific epic or issue IDs to focus on]
4
+ ---
5
+
6
+ # Review and Refine Beads Issues
7
+
8
+ You are tasked with thoroughly reviewing, proofreading, and polishing the filed Beads epics and issues to ensure workers have a smooth implementation experience.
9
+
10
+ ## Step 1: Load Current Issues
11
+
12
+ First, get the current state:
13
+
14
+ ```bash
15
+ bd list --json
16
+ bd ready --json
17
+ ```
18
+
19
+ If specific IDs were provided (`$ARGUMENTS`), focus on those. Otherwise, review all issues.
20
+
21
+ ## Step 2: Systematic Review Checklist
22
+
23
+ For EACH issue, verify:
24
+
25
+ ### Clarity
26
+
27
+ - [ ] Title is action-oriented and specific
28
+ - [ ] Description is clear and unambiguous
29
+ - [ ] A developer unfamiliar with the codebase could understand the task
30
+ - [ ] No jargon without explanation
31
+
32
+ ### Completeness
33
+
34
+ - [ ] Acceptance criteria are defined and testable
35
+ - [ ] Technical implementation hints are provided where helpful
36
+ - [ ] Relevant file paths or modules are mentioned
37
+ - [ ] Edge cases and error handling are considered
38
+
39
+ ### Dependencies
40
+
41
+ - [ ] All blocking dependencies are linked
42
+ - [ ] No circular dependencies exist
43
+ - [ ] Dependencies are minimal (not over-constrained)
44
+ - [ ] Ready issues exist for parallel work
45
+
46
+ ### Scope
47
+
48
+ - [ ] Issue is appropriately sized (not too large)
49
+ - [ ] Large issues are broken into subtasks
50
+ - [ ] No duplicate or overlapping issues
51
+
52
+ ### Priority
53
+
54
+ - [ ] Priority reflects actual importance
55
+ - [ ] Critical path items are prioritized correctly
56
+ - [ ] Dependencies and priorities align
57
+
58
+ ## Step 3: Common Issues to Fix
59
+
60
+ Watch for and correct:
61
+
62
+ 1. **Vague titles**: "Fix bug" → "Fix null pointer in UserService.getProfile when user not found"
63
+ 2. **Missing context**: Add relevant file paths, function names, or module references
64
+ 3. **Implicit knowledge**: Make assumptions explicit
65
+ 4. **Missing acceptance criteria**: Add "Done when..." statements
66
+ 5. **Over-coupling**: Break dependencies that aren't strictly necessary
67
+ 6. **Under-specified**: Add technical notes for complex tasks
68
+ 7. **Duplicate work**: Merge or link related issues
69
+ 8. **Missing dependencies**: Link issues that should be sequenced
70
+ 9. **Wrong priorities**: Adjust based on critical path analysis
71
+ 10. **Typos and grammar**: Fix for professionalism
72
+
73
+ ## Step 4: Update Issues
74
+
75
+ Use bd update to fix issues:
76
+
77
+ ```bash
78
+ bd update <id> --title "Improved title" --json
79
+ bd update <id> --priority <new-priority> --json
80
+ bd update <id> --description "New description" --json
81
+ bd update <id> --acceptance "Acceptance criteria" --json
82
+ ```
83
+
84
+ Manage dependencies separately with `bd dep`:
85
+
86
+ ```bash
87
+ bd dep add <issue-id> <dependency-id> --json # Add dependency
88
+ bd dep remove <issue-id> <dependency-id> --json # Remove dependency
89
+ bd dep tree <issue-id> --json # View dependency tree
90
+ bd dep cycles --json # Check for circular deps
91
+ ```
92
+
93
+ For major rewrites, close and recreate:
94
+
95
+ ```bash
96
+ bd close <id> --reason "Replaced by <new-id>" --json
97
+ bd create "Better title" -t <type> -p <priority> --deps <dep-id> --json
98
+ ```
99
+
100
+ ## Step 5: Dependency Graph Validation
101
+
102
+ After refinements, validate:
103
+
104
+ ```bash
105
+ bd list --json # View all issues
106
+ bd list --status open --json # View only open issues
107
+ bd ready --json # View unblocked issues ready for work
108
+ bd dep cycles --json # Check for circular dependencies
109
+ bd dep tree <epic-id> --json # View dependency tree for an epic
110
+ ```
111
+
112
+ Check:
113
+
114
+ - No orphaned issues (except entry points)
115
+ - No circular dependencies
116
+ - Critical path is clear
117
+ - Parallelization opportunities are preserved
118
+
119
+ ## Step 6: Final Quality Gate
120
+
121
+ Before completing, ensure:
122
+
123
+ 1. **Readability**: Any developer can pick up any ready issue
124
+ 2. **Traceability**: Issues link to epics, epics link to the plan
125
+ 3. **Testability**: Each issue has clear "done" criteria
126
+ 4. **Parallelism**: Multiple issues can be worked simultaneously
127
+ 5. **Completeness**: No gaps in the plan coverage
128
+
129
+ ## Output Format
130
+
131
+ Provide a review report:
132
+
133
+ ### Summary
134
+
135
+ - Total issues reviewed: X
136
+ - Issues updated: Y
137
+ - Issues created: Z
138
+ - Issues closed/merged: W
139
+
140
+ ### Changes Made
141
+
142
+ - List significant updates with rationale
143
+
144
+ ### Remaining Concerns
145
+
146
+ - Any issues that need user input
147
+ - Ambiguities that couldn't be resolved
148
+
149
+ ### Ready for Implementation
150
+
151
+ - List of ready issues workers can start with
152
+ - Suggested execution order for optimal flow
153
+
154
+ ## Iteration Tracking
155
+
156
+ You may iterate on refinements up to 5 times if asked. Track iterations:
157
+
158
+ - Iteration 1: Initial review pass
159
+ - Iteration 2-5: Deeper refinements based on feedback
160
+
161
+ After 5 iterations, respond: "I don't think we can do much better than this. The issues are thoroughly reviewed, well-documented, and ready for workers to implement."
@@ -0,0 +1,11 @@
1
+ {
2
+ "permissions": {
3
+ "allow": ["Bash(bd:*)"]
4
+ },
5
+ "mcpServers": {
6
+ "shadcn": {
7
+ "command": "npx",
8
+ "args": ["shadcn@latest", "mcp"]
9
+ }
10
+ }
11
+ }