autoforge-ai 0.1.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.
- package/.claude/commands/check-code.md +32 -0
- package/.claude/commands/checkpoint.md +40 -0
- package/.claude/commands/create-spec.md +613 -0
- package/.claude/commands/expand-project.md +234 -0
- package/.claude/commands/gsd-to-autoforge-spec.md +10 -0
- package/.claude/commands/review-pr.md +75 -0
- package/.claude/templates/app_spec.template.txt +331 -0
- package/.claude/templates/coding_prompt.template.md +265 -0
- package/.claude/templates/initializer_prompt.template.md +354 -0
- package/.claude/templates/testing_prompt.template.md +146 -0
- package/.env.example +64 -0
- package/LICENSE.md +676 -0
- package/README.md +423 -0
- package/agent.py +444 -0
- package/api/__init__.py +10 -0
- package/api/database.py +536 -0
- package/api/dependency_resolver.py +449 -0
- package/api/migration.py +156 -0
- package/auth.py +83 -0
- package/autoforge_paths.py +315 -0
- package/autonomous_agent_demo.py +293 -0
- package/bin/autoforge.js +3 -0
- package/client.py +607 -0
- package/env_constants.py +27 -0
- package/examples/OPTIMIZE_CONFIG.md +230 -0
- package/examples/README.md +531 -0
- package/examples/org_config.yaml +172 -0
- package/examples/project_allowed_commands.yaml +139 -0
- package/lib/cli.js +791 -0
- package/mcp_server/__init__.py +1 -0
- package/mcp_server/feature_mcp.py +988 -0
- package/package.json +53 -0
- package/parallel_orchestrator.py +1800 -0
- package/progress.py +247 -0
- package/prompts.py +427 -0
- package/pyproject.toml +17 -0
- package/rate_limit_utils.py +132 -0
- package/registry.py +614 -0
- package/requirements-prod.txt +14 -0
- package/security.py +959 -0
- package/server/__init__.py +17 -0
- package/server/main.py +261 -0
- package/server/routers/__init__.py +32 -0
- package/server/routers/agent.py +177 -0
- package/server/routers/assistant_chat.py +327 -0
- package/server/routers/devserver.py +309 -0
- package/server/routers/expand_project.py +239 -0
- package/server/routers/features.py +746 -0
- package/server/routers/filesystem.py +514 -0
- package/server/routers/projects.py +524 -0
- package/server/routers/schedules.py +356 -0
- package/server/routers/settings.py +127 -0
- package/server/routers/spec_creation.py +357 -0
- package/server/routers/terminal.py +453 -0
- package/server/schemas.py +593 -0
- package/server/services/__init__.py +36 -0
- package/server/services/assistant_chat_session.py +496 -0
- package/server/services/assistant_database.py +304 -0
- package/server/services/chat_constants.py +57 -0
- package/server/services/dev_server_manager.py +557 -0
- package/server/services/expand_chat_session.py +399 -0
- package/server/services/process_manager.py +657 -0
- package/server/services/project_config.py +475 -0
- package/server/services/scheduler_service.py +683 -0
- package/server/services/spec_chat_session.py +502 -0
- package/server/services/terminal_manager.py +756 -0
- package/server/utils/__init__.py +1 -0
- package/server/utils/process_utils.py +134 -0
- package/server/utils/project_helpers.py +32 -0
- package/server/utils/validation.py +54 -0
- package/server/websocket.py +903 -0
- package/start.py +456 -0
- package/ui/dist/assets/index-8W_wmZzz.js +168 -0
- package/ui/dist/assets/index-B47Ubhox.css +1 -0
- package/ui/dist/assets/vendor-flow-CVNK-_lx.js +7 -0
- package/ui/dist/assets/vendor-query-BUABzP5o.js +1 -0
- package/ui/dist/assets/vendor-radix-DTNNCg2d.js +45 -0
- package/ui/dist/assets/vendor-react-qkC6yhPU.js +1 -0
- package/ui/dist/assets/vendor-utils-COeKbHgx.js +2 -0
- package/ui/dist/assets/vendor-xterm-DP_gxef0.js +16 -0
- package/ui/dist/index.html +23 -0
- package/ui/dist/ollama.png +0 -0
- package/ui/dist/vite.svg +6 -0
- package/ui/package.json +57 -0
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Expand an existing project with new features
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# PROJECT DIRECTORY
|
|
6
|
+
|
|
7
|
+
This command **requires** the project directory as an argument via `$ARGUMENTS`.
|
|
8
|
+
|
|
9
|
+
**Example:** `/expand-project generations/my-app`
|
|
10
|
+
|
|
11
|
+
If `$ARGUMENTS` is empty, inform the user they must provide a project path and exit.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# GOAL
|
|
16
|
+
|
|
17
|
+
Help the user add new features to an existing project. You will:
|
|
18
|
+
1. Understand the current project by reading its specification
|
|
19
|
+
2. Discuss what NEW capabilities they want to add
|
|
20
|
+
3. Create features directly in the database (no file generation needed)
|
|
21
|
+
|
|
22
|
+
This is different from `/create-spec` because:
|
|
23
|
+
- The project already exists with features
|
|
24
|
+
- We're ADDING to it, not creating from scratch
|
|
25
|
+
- Features go directly to the database
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
# YOUR ROLE
|
|
30
|
+
|
|
31
|
+
You are the **Project Expansion Assistant** - an expert at understanding existing projects and adding new capabilities. Your job is to:
|
|
32
|
+
|
|
33
|
+
1. Read and understand the existing project specification
|
|
34
|
+
2. Ask about what NEW features the user wants
|
|
35
|
+
3. Clarify requirements through focused conversation
|
|
36
|
+
4. Create features that integrate well with existing ones
|
|
37
|
+
|
|
38
|
+
**IMPORTANT:** Like create-spec, cater to all skill levels. Many users are product owners. Ask about WHAT they want, not HOW to build it.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
# FIRST: Read and Understand Existing Project
|
|
43
|
+
|
|
44
|
+
**Step 1:** Read the existing specification:
|
|
45
|
+
- Read `$ARGUMENTS/.autoforge/prompts/app_spec.txt`
|
|
46
|
+
|
|
47
|
+
**Step 2:** Present a summary to the user:
|
|
48
|
+
|
|
49
|
+
> "I've reviewed your **[Project Name]** project. Here's what I found:
|
|
50
|
+
>
|
|
51
|
+
> **Current Scope:**
|
|
52
|
+
> - [Brief description from overview]
|
|
53
|
+
> - [Key feature areas]
|
|
54
|
+
>
|
|
55
|
+
> **Technology:** [framework/stack from spec]
|
|
56
|
+
>
|
|
57
|
+
> What would you like to add to this project?"
|
|
58
|
+
|
|
59
|
+
**STOP HERE and wait for their response.**
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
# CONVERSATION FLOW
|
|
64
|
+
|
|
65
|
+
## Phase 1: Understand Additions
|
|
66
|
+
|
|
67
|
+
Start with open questions:
|
|
68
|
+
|
|
69
|
+
> "Tell me about what you want to add. What new things should users be able to do?"
|
|
70
|
+
|
|
71
|
+
**Follow-up questions:**
|
|
72
|
+
- How does this connect to existing features?
|
|
73
|
+
- Walk me through the user experience for this new capability
|
|
74
|
+
- Are there new screens or pages needed?
|
|
75
|
+
- What data will this create or use?
|
|
76
|
+
|
|
77
|
+
**Keep asking until you understand:**
|
|
78
|
+
- What the user sees
|
|
79
|
+
- What actions they can take
|
|
80
|
+
- What happens as a result
|
|
81
|
+
- What errors could occur
|
|
82
|
+
|
|
83
|
+
## Phase 2: Clarify Details
|
|
84
|
+
|
|
85
|
+
For each new capability, understand:
|
|
86
|
+
|
|
87
|
+
**User flows:**
|
|
88
|
+
- What triggers this feature?
|
|
89
|
+
- What steps does the user take?
|
|
90
|
+
- What's the success state?
|
|
91
|
+
- What's the error state?
|
|
92
|
+
|
|
93
|
+
**Integration:**
|
|
94
|
+
- Does this modify existing features?
|
|
95
|
+
- Does this need new data/fields?
|
|
96
|
+
- What permissions apply?
|
|
97
|
+
|
|
98
|
+
**Edge cases:**
|
|
99
|
+
- What validation is needed?
|
|
100
|
+
- What happens with empty/invalid input?
|
|
101
|
+
- What about concurrent users?
|
|
102
|
+
|
|
103
|
+
## Phase 3: Derive Features
|
|
104
|
+
|
|
105
|
+
**Count the testable behaviors** for additions:
|
|
106
|
+
|
|
107
|
+
For each new capability, estimate features:
|
|
108
|
+
- Each CRUD operation = 1 feature
|
|
109
|
+
- Each UI interaction = 1 feature
|
|
110
|
+
- Each validation/error case = 1 feature
|
|
111
|
+
- Each visual requirement = 1 feature
|
|
112
|
+
|
|
113
|
+
**Present breakdown for approval:**
|
|
114
|
+
|
|
115
|
+
> "Based on what we discussed, here's my feature breakdown for the additions:
|
|
116
|
+
>
|
|
117
|
+
> **[New Category 1]:** ~X features
|
|
118
|
+
> - [Brief description of what's covered]
|
|
119
|
+
>
|
|
120
|
+
> **[New Category 2]:** ~Y features
|
|
121
|
+
> - [Brief description of what's covered]
|
|
122
|
+
>
|
|
123
|
+
> **Total: ~N new features**
|
|
124
|
+
>
|
|
125
|
+
> These will be added to your existing features. The agent will implement them in order. Does this look right?"
|
|
126
|
+
|
|
127
|
+
**Wait for approval before creating features.**
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
# FEATURE CREATION
|
|
132
|
+
|
|
133
|
+
Once the user approves, create features using the MCP tool.
|
|
134
|
+
|
|
135
|
+
**Signal that you're ready to create features by saying:**
|
|
136
|
+
|
|
137
|
+
> "Great! I'll create these N features now."
|
|
138
|
+
|
|
139
|
+
**Then call the `feature_create_bulk` tool to save them directly to the database:**
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
feature_create_bulk(features=[
|
|
143
|
+
{
|
|
144
|
+
"category": "functional",
|
|
145
|
+
"name": "Brief feature name",
|
|
146
|
+
"description": "What this feature tests and how to verify it works",
|
|
147
|
+
"steps": [
|
|
148
|
+
"Step 1: Action to take",
|
|
149
|
+
"Step 2: Expected result",
|
|
150
|
+
"Step 3: Verification"
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"category": "style",
|
|
155
|
+
"name": "Another feature name",
|
|
156
|
+
"description": "Description of visual/style requirement",
|
|
157
|
+
"steps": [
|
|
158
|
+
"Step 1: Navigate to page",
|
|
159
|
+
"Step 2: Check visual element",
|
|
160
|
+
"Step 3: Verify styling"
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
])
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**CRITICAL:**
|
|
167
|
+
- Call the `feature_create_bulk` MCP tool with ALL features at once
|
|
168
|
+
- Use valid JSON (double quotes, no trailing commas)
|
|
169
|
+
- Include ALL features you promised to create
|
|
170
|
+
- Each feature needs: category, name, description, steps (array of strings)
|
|
171
|
+
- The tool will return the count of created features - verify it matches your expected count
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
# FEATURE QUALITY STANDARDS
|
|
176
|
+
|
|
177
|
+
**Categories to use:**
|
|
178
|
+
- `security` - Authentication, authorization, access control
|
|
179
|
+
- `functional` - Core functionality, CRUD operations, workflows
|
|
180
|
+
- `style` - Visual design, layout, responsive behavior
|
|
181
|
+
- `navigation` - Routing, links, breadcrumbs
|
|
182
|
+
- `error-handling` - Error states, validation, edge cases
|
|
183
|
+
- `data` - Data integrity, persistence, relationships
|
|
184
|
+
|
|
185
|
+
**Good feature names:**
|
|
186
|
+
- Start with what the user does: "User can create new task"
|
|
187
|
+
- Or what happens: "Login form validates email format"
|
|
188
|
+
- Be specific: "Dashboard shows task count per category"
|
|
189
|
+
|
|
190
|
+
**Good descriptions:**
|
|
191
|
+
- Explain what's being tested
|
|
192
|
+
- Include the expected behavior
|
|
193
|
+
- Make it clear how to verify success
|
|
194
|
+
|
|
195
|
+
**Good test steps:**
|
|
196
|
+
- 2-5 steps for simple features
|
|
197
|
+
- 5-10 steps for complex workflows
|
|
198
|
+
- Each step is a concrete action or verification
|
|
199
|
+
- Include setup, action, and verification
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
# AFTER FEATURE CREATION
|
|
204
|
+
|
|
205
|
+
Once features are created, tell the user:
|
|
206
|
+
|
|
207
|
+
> "I've created N new features for your project!
|
|
208
|
+
>
|
|
209
|
+
> **What happens next:**
|
|
210
|
+
> - These features are now in your pending queue
|
|
211
|
+
> - The agent will implement them in priority order
|
|
212
|
+
> - They'll appear in the Pending column on your kanban board
|
|
213
|
+
>
|
|
214
|
+
> **To start implementing:** Close this chat and click the Play button to start the agent.
|
|
215
|
+
>
|
|
216
|
+
> Would you like to add more features, or are you done for now?"
|
|
217
|
+
|
|
218
|
+
If they want to add more, go back to Phase 1.
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
# IMPORTANT GUIDELINES
|
|
223
|
+
|
|
224
|
+
1. **Preserve existing features** - We're adding, not replacing
|
|
225
|
+
2. **Integration focus** - New features should work with existing ones
|
|
226
|
+
3. **Quality standards** - Same thoroughness as initial features
|
|
227
|
+
4. **Incremental is fine** - Multiple expansion sessions are OK
|
|
228
|
+
5. **Don't over-engineer** - Only add what the user asked for
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
# BEGIN
|
|
233
|
+
|
|
234
|
+
Start by reading the app specification file at `$ARGUMENTS/.autoforge/prompts/app_spec.txt`, then greet the user with a summary of their existing project and ask what they want to add.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
allowed-tools: Read, Write, Bash, Glob, Grep
|
|
3
|
+
description: Convert GSD codebase mapping to AutoForge app_spec.txt
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# GSD to AutoForge Spec
|
|
7
|
+
|
|
8
|
+
Convert `.planning/codebase/*.md` (from `/gsd:map-codebase`) to AutoForge's `.autoforge/prompts/app_spec.txt`.
|
|
9
|
+
|
|
10
|
+
@.claude/skills/gsd-to-autoforge-spec/SKILL.md
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Review pull requests
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Pull request(s): $ARGUMENTS
|
|
6
|
+
|
|
7
|
+
- If no PR numbers are provided, ask the user to provide PR number(s).
|
|
8
|
+
- At least 1 PR is required.
|
|
9
|
+
|
|
10
|
+
## TASKS
|
|
11
|
+
|
|
12
|
+
1. **Retrieve PR Details**
|
|
13
|
+
- Use the GH CLI tool to retrieve the details (descriptions, diffs, comments, feedback, reviews, etc)
|
|
14
|
+
|
|
15
|
+
2. **Assess PR Complexity**
|
|
16
|
+
|
|
17
|
+
After retrieving PR details, assess complexity based on:
|
|
18
|
+
- Number of files changed
|
|
19
|
+
- Lines added/removed
|
|
20
|
+
- Number of contributors/commits
|
|
21
|
+
- Whether changes touch core/architectural files
|
|
22
|
+
|
|
23
|
+
### Complexity Tiers
|
|
24
|
+
|
|
25
|
+
**Simple** (no deep dive agents needed):
|
|
26
|
+
- ≤5 files changed AND ≤100 lines changed AND single author
|
|
27
|
+
- Review directly without spawning agents
|
|
28
|
+
|
|
29
|
+
**Medium** (1-2 deep dive agents):
|
|
30
|
+
- 6-15 files changed, OR 100-500 lines, OR 2 contributors
|
|
31
|
+
- Spawn 1 agent for focused areas, 2 if changes span multiple domains
|
|
32
|
+
|
|
33
|
+
**Complex** (up to 3 deep dive agents):
|
|
34
|
+
- >15 files, OR >500 lines, OR >2 contributors, OR touches core architecture
|
|
35
|
+
- Spawn up to 3 agents to analyze different aspects (e.g., security, performance, architecture)
|
|
36
|
+
|
|
37
|
+
3. **Analyze Codebase Impact**
|
|
38
|
+
- Based on the complexity tier determined above, spawn the appropriate number of deep dive subagents
|
|
39
|
+
- For Simple PRs: analyze directly without spawning agents
|
|
40
|
+
- For Medium PRs: spawn 1-2 agents focusing on the most impacted areas
|
|
41
|
+
- For Complex PRs: spawn up to 3 agents to cover security, performance, and architectural concerns
|
|
42
|
+
|
|
43
|
+
4. **PR Scope & Title Alignment Check**
|
|
44
|
+
- Compare the PR title and description against the actual diff content
|
|
45
|
+
- Check whether the PR is focused on a single coherent change or contains multiple unrelated changes
|
|
46
|
+
- If the title/description describe one thing but the PR contains significantly more (e.g., title says "fix typo in README" but the diff touches 20 files across multiple domains), flag this as a **scope mismatch**
|
|
47
|
+
- A scope mismatch is a **merge blocker** — recommend the author split the PR into smaller, focused PRs
|
|
48
|
+
- Suggest specific ways to split the PR (e.g., "separate the refactor from the feature addition")
|
|
49
|
+
- Reviewing large, unfocused PRs is impractical and error-prone; the review cannot provide adequate assurance for such changes
|
|
50
|
+
|
|
51
|
+
5. **Vision Alignment Check**
|
|
52
|
+
- Read the project's README.md and CLAUDE.md to understand the application's core purpose
|
|
53
|
+
- Assess whether this PR aligns with the application's intended functionality
|
|
54
|
+
- If the changes deviate significantly from the core vision or add functionality that doesn't serve the application's purpose, note this in the review
|
|
55
|
+
- This is not a blocker, but should be flagged for the reviewer's consideration
|
|
56
|
+
|
|
57
|
+
6. **Safety Assessment**
|
|
58
|
+
- Provide a review on whether the PR is safe to merge as-is
|
|
59
|
+
- Provide any feedback in terms of risk level
|
|
60
|
+
|
|
61
|
+
7. **Improvements**
|
|
62
|
+
- Propose any improvements in terms of importance and complexity
|
|
63
|
+
|
|
64
|
+
8. **Merge Recommendation**
|
|
65
|
+
- Based on all findings, provide a clear merge/don't-merge recommendation
|
|
66
|
+
- If all concerns are minor (cosmetic issues, naming suggestions, small style nits, missing comments, etc.), recommend **merging the PR** and note that the reviewer can address these minor concerns themselves with a quick follow-up commit pushed directly to master
|
|
67
|
+
- If there are significant concerns (bugs, security issues, architectural problems, scope mismatch), recommend **not merging** and explain what needs to be resolved first
|
|
68
|
+
|
|
69
|
+
9. **TLDR**
|
|
70
|
+
- End the review with a `## TLDR` section
|
|
71
|
+
- In 3-5 bullet points maximum, summarize:
|
|
72
|
+
- What this PR is actually about (one sentence)
|
|
73
|
+
- The key concerns, if any (or "no significant concerns")
|
|
74
|
+
- **Verdict: MERGE** / **MERGE (with minor follow-up)** / **DON'T MERGE** with a one-line reason
|
|
75
|
+
- This section should be scannable in under 10 seconds
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Project Specification Template
|
|
3
|
+
==============================
|
|
4
|
+
|
|
5
|
+
This is a placeholder template. Replace with your actual project specification.
|
|
6
|
+
|
|
7
|
+
You can either:
|
|
8
|
+
1. Use the /create-spec command to generate this interactively with Claude
|
|
9
|
+
2. Manually edit this file following the structure below
|
|
10
|
+
|
|
11
|
+
See existing projects in generations/ for examples of complete specifications.
|
|
12
|
+
-->
|
|
13
|
+
|
|
14
|
+
<project_specification>
|
|
15
|
+
<project_name>YOUR_PROJECT_NAME</project_name>
|
|
16
|
+
|
|
17
|
+
<overview>
|
|
18
|
+
Describe your project in 2-3 sentences. What are you building? What problem
|
|
19
|
+
does it solve? Who is it for? Include key features and design goals.
|
|
20
|
+
</overview>
|
|
21
|
+
|
|
22
|
+
<technology_stack>
|
|
23
|
+
<frontend>
|
|
24
|
+
<framework>React with Vite</framework>
|
|
25
|
+
<styling>Tailwind CSS</styling>
|
|
26
|
+
<state_management>React hooks and context</state_management>
|
|
27
|
+
<routing>React Router for navigation</routing>
|
|
28
|
+
<port>3000</port>
|
|
29
|
+
</frontend>
|
|
30
|
+
<backend>
|
|
31
|
+
<runtime>Node.js with Express</runtime>
|
|
32
|
+
<database>SQLite with better-sqlite3</database>
|
|
33
|
+
<port>3001</port>
|
|
34
|
+
</backend>
|
|
35
|
+
<communication>
|
|
36
|
+
<api>RESTful endpoints</api>
|
|
37
|
+
</communication>
|
|
38
|
+
</technology_stack>
|
|
39
|
+
|
|
40
|
+
<prerequisites>
|
|
41
|
+
<environment_setup>
|
|
42
|
+
- Node.js 18+ installed
|
|
43
|
+
- npm or pnpm package manager
|
|
44
|
+
- Any API keys or external services needed
|
|
45
|
+
</environment_setup>
|
|
46
|
+
</prerequisites>
|
|
47
|
+
|
|
48
|
+
<core_features>
|
|
49
|
+
<!--
|
|
50
|
+
List features grouped by category. Each feature should be:
|
|
51
|
+
- Specific and testable
|
|
52
|
+
- Independent where possible
|
|
53
|
+
- Written as a capability ("User can...", "System displays...")
|
|
54
|
+
-->
|
|
55
|
+
|
|
56
|
+
<authentication>
|
|
57
|
+
- User registration with email/password
|
|
58
|
+
- User login with session management
|
|
59
|
+
- User logout
|
|
60
|
+
- Password reset flow
|
|
61
|
+
- Profile management
|
|
62
|
+
</authentication>
|
|
63
|
+
|
|
64
|
+
<main_functionality>
|
|
65
|
+
<!-- Replace with your app's primary features -->
|
|
66
|
+
- Create new items
|
|
67
|
+
- View list of items with pagination
|
|
68
|
+
- Edit existing items
|
|
69
|
+
- Delete items with confirmation
|
|
70
|
+
- Search and filter items
|
|
71
|
+
</main_functionality>
|
|
72
|
+
|
|
73
|
+
<user_interface>
|
|
74
|
+
- Responsive layout (mobile, tablet, desktop)
|
|
75
|
+
- Dark/light theme toggle
|
|
76
|
+
- Loading states and skeletons
|
|
77
|
+
- Error handling with user feedback
|
|
78
|
+
- Toast notifications for actions
|
|
79
|
+
</user_interface>
|
|
80
|
+
|
|
81
|
+
<data_management>
|
|
82
|
+
- Data validation on forms
|
|
83
|
+
- Auto-save drafts
|
|
84
|
+
- Export data functionality
|
|
85
|
+
- Import data functionality
|
|
86
|
+
</data_management>
|
|
87
|
+
|
|
88
|
+
<!-- Add more feature categories as needed -->
|
|
89
|
+
</core_features>
|
|
90
|
+
|
|
91
|
+
<database_schema>
|
|
92
|
+
<tables>
|
|
93
|
+
<users>
|
|
94
|
+
- id (PRIMARY KEY)
|
|
95
|
+
- email (UNIQUE, NOT NULL)
|
|
96
|
+
- password_hash (NOT NULL)
|
|
97
|
+
- name
|
|
98
|
+
- avatar_url
|
|
99
|
+
- preferences (JSON)
|
|
100
|
+
- created_at, updated_at
|
|
101
|
+
</users>
|
|
102
|
+
|
|
103
|
+
<!-- Add more tables for your domain entities -->
|
|
104
|
+
<items>
|
|
105
|
+
- id (PRIMARY KEY)
|
|
106
|
+
- user_id (FOREIGN KEY -> users.id)
|
|
107
|
+
- title (NOT NULL)
|
|
108
|
+
- description
|
|
109
|
+
- status (enum: draft, active, archived)
|
|
110
|
+
- created_at, updated_at
|
|
111
|
+
</items>
|
|
112
|
+
|
|
113
|
+
<!-- Add additional tables as needed -->
|
|
114
|
+
</tables>
|
|
115
|
+
</database_schema>
|
|
116
|
+
|
|
117
|
+
<api_endpoints_summary>
|
|
118
|
+
<authentication>
|
|
119
|
+
- POST /api/auth/register
|
|
120
|
+
- POST /api/auth/login
|
|
121
|
+
- POST /api/auth/logout
|
|
122
|
+
- GET /api/auth/me
|
|
123
|
+
- PUT /api/auth/profile
|
|
124
|
+
- POST /api/auth/forgot-password
|
|
125
|
+
- POST /api/auth/reset-password
|
|
126
|
+
</authentication>
|
|
127
|
+
|
|
128
|
+
<items>
|
|
129
|
+
- GET /api/items (list with pagination, search, filters)
|
|
130
|
+
- POST /api/items (create)
|
|
131
|
+
- GET /api/items/:id (get single)
|
|
132
|
+
- PUT /api/items/:id (update)
|
|
133
|
+
- DELETE /api/items/:id (delete)
|
|
134
|
+
</items>
|
|
135
|
+
|
|
136
|
+
<!-- Add more endpoint categories as needed -->
|
|
137
|
+
</api_endpoints_summary>
|
|
138
|
+
|
|
139
|
+
<ui_layout>
|
|
140
|
+
<main_structure>
|
|
141
|
+
Describe the overall layout structure:
|
|
142
|
+
- Header with navigation and user menu
|
|
143
|
+
- Sidebar for navigation (collapsible on mobile)
|
|
144
|
+
- Main content area
|
|
145
|
+
- Footer (optional)
|
|
146
|
+
</main_structure>
|
|
147
|
+
|
|
148
|
+
<sidebar>
|
|
149
|
+
- Logo/brand at top
|
|
150
|
+
- Navigation links
|
|
151
|
+
- Quick actions
|
|
152
|
+
- User profile at bottom
|
|
153
|
+
</sidebar>
|
|
154
|
+
|
|
155
|
+
<main_content>
|
|
156
|
+
- Page header with title and actions
|
|
157
|
+
- Content area with cards/lists/forms
|
|
158
|
+
- Pagination or infinite scroll
|
|
159
|
+
</main_content>
|
|
160
|
+
|
|
161
|
+
<modals_overlays>
|
|
162
|
+
- Confirmation dialogs
|
|
163
|
+
- Form modals for create/edit
|
|
164
|
+
- Settings modal
|
|
165
|
+
- Help/keyboard shortcuts reference
|
|
166
|
+
</modals_overlays>
|
|
167
|
+
</ui_layout>
|
|
168
|
+
|
|
169
|
+
<design_system>
|
|
170
|
+
<color_palette>
|
|
171
|
+
- Primary: #3B82F6 (blue)
|
|
172
|
+
- Secondary: #10B981 (green)
|
|
173
|
+
- Accent: #F59E0B (amber)
|
|
174
|
+
- Background: #FFFFFF (light), #1A1A1A (dark)
|
|
175
|
+
- Surface: #F5F5F5 (light), #2A2A2A (dark)
|
|
176
|
+
- Text: #1F2937 (light), #E5E5E5 (dark)
|
|
177
|
+
- Border: #E5E5E5 (light), #404040 (dark)
|
|
178
|
+
- Error: #EF4444
|
|
179
|
+
- Success: #10B981
|
|
180
|
+
- Warning: #F59E0B
|
|
181
|
+
</color_palette>
|
|
182
|
+
|
|
183
|
+
<typography>
|
|
184
|
+
- Font family: Inter, system-ui, -apple-system, sans-serif
|
|
185
|
+
- Headings: font-semibold
|
|
186
|
+
- Body: font-normal, leading-relaxed
|
|
187
|
+
- Code: JetBrains Mono, Consolas, monospace
|
|
188
|
+
</typography>
|
|
189
|
+
|
|
190
|
+
<components>
|
|
191
|
+
<buttons>
|
|
192
|
+
- Primary: colored background, white text, rounded
|
|
193
|
+
- Secondary: border style, hover fill
|
|
194
|
+
- Ghost: transparent, hover background
|
|
195
|
+
- Icon buttons: square with hover state
|
|
196
|
+
</buttons>
|
|
197
|
+
|
|
198
|
+
<inputs>
|
|
199
|
+
- Rounded borders with focus ring
|
|
200
|
+
- Clear placeholder text
|
|
201
|
+
- Error states with red border
|
|
202
|
+
- Disabled state styling
|
|
203
|
+
</inputs>
|
|
204
|
+
|
|
205
|
+
<cards>
|
|
206
|
+
- Subtle border or shadow
|
|
207
|
+
- Rounded corners (8px)
|
|
208
|
+
- Hover state for interactive cards
|
|
209
|
+
</cards>
|
|
210
|
+
</components>
|
|
211
|
+
|
|
212
|
+
<animations>
|
|
213
|
+
- Smooth transitions (150-300ms)
|
|
214
|
+
- Fade in for new content
|
|
215
|
+
- Slide animations for modals/sidebars
|
|
216
|
+
- Loading spinners
|
|
217
|
+
- Skeleton loaders
|
|
218
|
+
</animations>
|
|
219
|
+
</design_system>
|
|
220
|
+
|
|
221
|
+
<key_interactions>
|
|
222
|
+
<!-- Describe the main user flows -->
|
|
223
|
+
<user_flow_1>
|
|
224
|
+
1. User arrives at landing page
|
|
225
|
+
2. Clicks "Get Started" or "Sign Up"
|
|
226
|
+
3. Fills registration form
|
|
227
|
+
4. Receives confirmation
|
|
228
|
+
5. Redirected to main dashboard
|
|
229
|
+
</user_flow_1>
|
|
230
|
+
|
|
231
|
+
<user_flow_2>
|
|
232
|
+
1. User clicks "Create New"
|
|
233
|
+
2. Form modal opens
|
|
234
|
+
3. User fills in details
|
|
235
|
+
4. Clicks save
|
|
236
|
+
5. Item appears in list with success toast
|
|
237
|
+
</user_flow_2>
|
|
238
|
+
|
|
239
|
+
<!-- Add more key interactions as needed -->
|
|
240
|
+
</key_interactions>
|
|
241
|
+
|
|
242
|
+
<implementation_steps>
|
|
243
|
+
<step number="1">
|
|
244
|
+
<title>Project Setup and Database</title>
|
|
245
|
+
<tasks>
|
|
246
|
+
- Initialize frontend with Vite + React
|
|
247
|
+
- Set up Express backend
|
|
248
|
+
- Create SQLite database with schema
|
|
249
|
+
- Configure CORS and middleware
|
|
250
|
+
- Set up environment variables
|
|
251
|
+
</tasks>
|
|
252
|
+
</step>
|
|
253
|
+
|
|
254
|
+
<step number="2">
|
|
255
|
+
<title>Authentication System</title>
|
|
256
|
+
<tasks>
|
|
257
|
+
- Implement user registration
|
|
258
|
+
- Build login/logout flow
|
|
259
|
+
- Add session management
|
|
260
|
+
- Create protected routes
|
|
261
|
+
- Build user profile page
|
|
262
|
+
</tasks>
|
|
263
|
+
</step>
|
|
264
|
+
|
|
265
|
+
<step number="3">
|
|
266
|
+
<title>Core Features</title>
|
|
267
|
+
<tasks>
|
|
268
|
+
- Build main CRUD operations
|
|
269
|
+
- Implement list views with pagination
|
|
270
|
+
- Add search and filtering
|
|
271
|
+
- Create form validation
|
|
272
|
+
- Handle error states
|
|
273
|
+
</tasks>
|
|
274
|
+
</step>
|
|
275
|
+
|
|
276
|
+
<step number="4">
|
|
277
|
+
<title>UI Polish and Responsiveness</title>
|
|
278
|
+
<tasks>
|
|
279
|
+
- Implement responsive design
|
|
280
|
+
- Add dark/light theme
|
|
281
|
+
- Create loading states
|
|
282
|
+
- Add animations and transitions
|
|
283
|
+
- Implement toast notifications
|
|
284
|
+
</tasks>
|
|
285
|
+
</step>
|
|
286
|
+
|
|
287
|
+
<step number="5">
|
|
288
|
+
<title>Testing and Refinement</title>
|
|
289
|
+
<tasks>
|
|
290
|
+
- Test all user flows
|
|
291
|
+
- Fix edge cases
|
|
292
|
+
- Optimize performance
|
|
293
|
+
- Ensure accessibility
|
|
294
|
+
- Final UI polish
|
|
295
|
+
</tasks>
|
|
296
|
+
</step>
|
|
297
|
+
</implementation_steps>
|
|
298
|
+
|
|
299
|
+
<success_criteria>
|
|
300
|
+
<functionality>
|
|
301
|
+
- All features work as specified
|
|
302
|
+
- No console errors in browser
|
|
303
|
+
- Proper error handling throughout
|
|
304
|
+
- Data persists correctly in database
|
|
305
|
+
</functionality>
|
|
306
|
+
|
|
307
|
+
<user_experience>
|
|
308
|
+
- Intuitive navigation and workflows
|
|
309
|
+
- Responsive on all device sizes
|
|
310
|
+
- Fast load times (< 2s)
|
|
311
|
+
- Clear feedback for all actions
|
|
312
|
+
- Accessible (keyboard navigation, ARIA labels)
|
|
313
|
+
</user_experience>
|
|
314
|
+
|
|
315
|
+
<technical_quality>
|
|
316
|
+
- Clean, maintainable code structure
|
|
317
|
+
- Consistent coding style
|
|
318
|
+
- Proper separation of concerns
|
|
319
|
+
- Secure authentication
|
|
320
|
+
- Input validation and sanitization
|
|
321
|
+
</technical_quality>
|
|
322
|
+
|
|
323
|
+
<design_polish>
|
|
324
|
+
- Consistent visual design
|
|
325
|
+
- Smooth animations
|
|
326
|
+
- Professional appearance
|
|
327
|
+
- Both themes fully implemented
|
|
328
|
+
- No layout issues or overflow
|
|
329
|
+
</design_polish>
|
|
330
|
+
</success_criteria>
|
|
331
|
+
</project_specification>
|