@builderos/create-agent-os 0.0.2
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 +39 -0
- package/bin/cli.js +133 -0
- package/package.json +40 -0
- package/src/template/App.tsx +68 -0
- package/src/template/agent-os/commands/create-tasks/1-get-spec-requirements.md +19 -0
- package/src/template/agent-os/commands/create-tasks/2-create-tasks-list.md +234 -0
- package/src/template/agent-os/commands/create-tasks/create-tasks.md +254 -0
- package/src/template/agent-os/commands/design-screen/design-screen.md +32 -0
- package/src/template/agent-os/commands/design-shell/design-shell.md +34 -0
- package/src/template/agent-os/commands/design-tokens/design-tokens.md +36 -0
- package/src/template/agent-os/commands/export-product/export-product.md +44 -0
- package/src/template/agent-os/commands/implement-tasks/1-determine-tasks.md +13 -0
- package/src/template/agent-os/commands/implement-tasks/2-implement-tasks.md +63 -0
- package/src/template/agent-os/commands/implement-tasks/3-verify-implementation.md +113 -0
- package/src/template/agent-os/commands/implement-tasks/implement-tasks.md +207 -0
- package/src/template/agent-os/commands/initialize-design/initialize-design.md +54 -0
- package/src/template/agent-os/commands/orchestrate-tasks/orchestrate-tasks.md +180 -0
- package/src/template/agent-os/commands/plan-product/1-product-concept.md +53 -0
- package/src/template/agent-os/commands/plan-product/2-create-mission.md +78 -0
- package/src/template/agent-os/commands/plan-product/3-create-roadmap.md +73 -0
- package/src/template/agent-os/commands/plan-product/4-create-tech-stack.md +46 -0
- package/src/template/agent-os/commands/plan-product/plan-product.md +241 -0
- package/src/template/agent-os/commands/sample-data/sample-data.md +51 -0
- package/src/template/agent-os/commands/scaffold-implementation/scaffold-implementation.md +36 -0
- package/src/template/agent-os/commands/screenshot-design/screenshot-design.md +21 -0
- package/src/template/agent-os/commands/shape-spec/1-initialize-spec.md +95 -0
- package/src/template/agent-os/commands/shape-spec/2-shape-spec.md +300 -0
- package/src/template/agent-os/commands/shape-spec/shape-spec.md +40 -0
- package/src/template/agent-os/commands/write-spec/write-spec.md +134 -0
- package/src/template/agent-os/config.yml +13 -0
- package/src/template/agent-os/product/mission.md +29 -0
- package/src/template/agent-os/product/roadmap.md +9 -0
- package/src/template/agent-os/product/tech-stack.md +14 -0
- package/src/template/agent-os/specs/README.md +1 -0
- package/src/template/agent-os/standards/backend/api.md +10 -0
- package/src/template/agent-os/standards/backend/migrations.md +9 -0
- package/src/template/agent-os/standards/backend/models.md +10 -0
- package/src/template/agent-os/standards/backend/queries.md +9 -0
- package/src/template/agent-os/standards/frontend/accessibility.md +10 -0
- package/src/template/agent-os/standards/frontend/components.md +11 -0
- package/src/template/agent-os/standards/frontend/css.md +7 -0
- package/src/template/agent-os/standards/frontend/responsive.md +11 -0
- package/src/template/agent-os/standards/global/coding-style.md +10 -0
- package/src/template/agent-os/standards/global/commenting.md +5 -0
- package/src/template/agent-os/standards/global/conventions.md +11 -0
- package/src/template/agent-os/standards/global/error-handling.md +9 -0
- package/src/template/agent-os/standards/global/tech-stack.md +31 -0
- package/src/template/agent-os/standards/global/validation.md +11 -0
- package/src/template/agent-os/standards/testing/test-writing.md +9 -0
- package/src/template/agent-os-ui/README.md +73 -0
- package/src/template/agent-os-ui/package-lock.json +5028 -0
- package/src/template/agent-os-ui/package.json +52 -0
- package/src/template/agent-os-ui/postcss.config.js +6 -0
- package/src/template/agent-os-ui/src/components/AgentShell.tsx +31 -0
- package/src/template/agent-os-ui/src/components/AgentSidebar.tsx +65 -0
- package/src/template/agent-os-ui/src/components/GuidanceCard.tsx +75 -0
- package/src/template/agent-os-ui/src/components/MarkdownViewer.tsx +25 -0
- package/src/template/agent-os-ui/src/components/PromptButton.tsx +28 -0
- package/src/template/agent-os-ui/src/components/StatusItem.tsx +45 -0
- package/src/template/agent-os-ui/src/components/ThemeToggle.tsx +72 -0
- package/src/template/agent-os-ui/src/index.ts +11 -0
- package/src/template/agent-os-ui/src/style.css +3 -0
- package/src/template/agent-os-ui/tailwind.config.js +50 -0
- package/src/template/agent-os-ui/tsconfig.json +33 -0
- package/src/template/agent-os-ui/vite.config.ts +32 -0
- package/src/template/control-center/backend/backend.log +2 -0
- package/src/template/control-center/backend/index.js +228 -0
- package/src/template/control-center/backend/package-lock.json +951 -0
- package/src/template/control-center/backend/package.json +19 -0
- package/src/template/control-center/frontend/README.md +73 -0
- package/src/template/control-center/frontend/eslint.config.js +23 -0
- package/src/template/control-center/frontend/index.html +21 -0
- package/src/template/control-center/frontend/package-lock.json +5752 -0
- package/src/template/control-center/frontend/package.json +42 -0
- package/src/template/control-center/frontend/public/runtime-config.json +11 -0
- package/src/template/control-center/frontend/public/vite.svg +1 -0
- package/src/template/control-center/frontend/src/App.css +42 -0
- package/src/template/control-center/frontend/src/App.tsx +738 -0
- package/src/template/control-center/frontend/src/assets/react.svg +1 -0
- package/src/template/control-center/frontend/src/components/ThemeToggle.tsx +64 -0
- package/src/template/control-center/frontend/src/components/ui/ToastContext.tsx +81 -0
- package/src/template/control-center/frontend/src/index.css +194 -0
- package/src/template/control-center/frontend/src/main.tsx +14 -0
- package/src/template/control-center/frontend/src/vite-env.d.ts +1 -0
- package/src/template/control-center/frontend/tsconfig.app.json +28 -0
- package/src/template/control-center/frontend/tsconfig.json +7 -0
- package/src/template/control-center/frontend/tsconfig.node.json +26 -0
- package/src/template/control-center/frontend/vite.config.ts +22 -0
- package/src/template/design/.claude/commands/design-os/data-model.md +122 -0
- package/src/template/design/.claude/commands/design-os/design-screen.md +309 -0
- package/src/template/design/.claude/commands/design-os/design-shell.md +238 -0
- package/src/template/design/.claude/commands/design-os/design-tokens.md +166 -0
- package/src/template/design/.claude/commands/design-os/export-product.md +1105 -0
- package/src/template/design/.claude/commands/design-os/product-roadmap.md +121 -0
- package/src/template/design/.claude/commands/design-os/product-vision.md +99 -0
- package/src/template/design/.claude/commands/design-os/sample-data.md +263 -0
- package/src/template/design/.claude/commands/design-os/screenshot-design.md +112 -0
- package/src/template/design/.claude/commands/design-os/shape-section.md +138 -0
- package/src/template/design/.claude/skills/frontend-design/SKILL.md +42 -0
- package/src/template/design/.github/CODE_OF_CONDUCT.md +5 -0
- package/src/template/design/.github/CONTRIBUTING.md +51 -0
- package/src/template/design/.github/ISSUE_TEMPLATE/config.yml +22 -0
- package/src/template/design/.github/PULL_REQUEST_TEMPLATE.md +20 -0
- package/src/template/design/.github/SECURITY.yml +5 -0
- package/src/template/design/.github/SUPPORT.md +19 -0
- package/src/template/design/.github/workflows/pr-decline.yml +135 -0
- package/src/template/design/.github/workflows/stale.yml +25 -0
- package/src/template/design/CHANGELOG.md +13 -0
- package/src/template/design/LICENSE +21 -0
- package/src/template/design/README.md +54 -0
- package/src/template/design/agents.md +218 -0
- package/src/template/design/claude.md +1 -0
- package/src/template/design/components.json +22 -0
- package/src/template/design/docs/codebase-implementation.md +153 -0
- package/src/template/design/docs/design-section.md +135 -0
- package/src/template/design/docs/export.md +149 -0
- package/src/template/design/docs/getting-started.md +59 -0
- package/src/template/design/docs/index.md +56 -0
- package/src/template/design/docs/product-planning.md +113 -0
- package/src/template/design/docs/requirements.md +22 -0
- package/src/template/design/docs/usage.md +62 -0
- package/src/template/design/eslint.config.js +23 -0
- package/src/template/design/index.html +21 -0
- package/src/template/design/package-lock.json +5473 -0
- package/src/template/design/package.json +47 -0
- package/src/template/design/product-plan.zip +0 -0
- package/src/template/design/public/vite.svg +1 -0
- package/src/template/design/src/assets/react.svg +1 -0
- package/src/template/design/src/components/AppLayout.tsx +95 -0
- package/src/template/design/src/components/DataCard.tsx +139 -0
- package/src/template/design/src/components/DataModelPage.tsx +120 -0
- package/src/template/design/src/components/DesignPage.tsx +284 -0
- package/src/template/design/src/components/EmptyState.tsx +155 -0
- package/src/template/design/src/components/ExportPage.tsx +344 -0
- package/src/template/design/src/components/NextPhaseButton.tsx +33 -0
- package/src/template/design/src/components/PhaseNav.tsx +152 -0
- package/src/template/design/src/components/PhaseWarningBanner.tsx +81 -0
- package/src/template/design/src/components/ProductOverviewCard.tsx +102 -0
- package/src/template/design/src/components/ProductPage.tsx +97 -0
- package/src/template/design/src/components/ScreenDesignPage.tsx +370 -0
- package/src/template/design/src/components/ScreenDesignsCard.tsx +49 -0
- package/src/template/design/src/components/SectionPage.tsx +256 -0
- package/src/template/design/src/components/SectionsCard.tsx +47 -0
- package/src/template/design/src/components/SectionsPage.tsx +181 -0
- package/src/template/design/src/components/ShellCard.tsx +85 -0
- package/src/template/design/src/components/ShellDesignPage.tsx +242 -0
- package/src/template/design/src/components/SpecCard.tsx +121 -0
- package/src/template/design/src/components/StepIndicator.tsx +75 -0
- package/src/template/design/src/components/ThemeToggle.tsx +86 -0
- package/src/template/design/src/components/ui/ToastContext.tsx +81 -0
- package/src/template/design/src/components/ui/avatar.tsx +53 -0
- package/src/template/design/src/components/ui/badge.tsx +46 -0
- package/src/template/design/src/components/ui/button.tsx +60 -0
- package/src/template/design/src/components/ui/card.tsx +92 -0
- package/src/template/design/src/components/ui/collapsible.tsx +48 -0
- package/src/template/design/src/components/ui/dialog.tsx +143 -0
- package/src/template/design/src/components/ui/dropdown-menu.tsx +255 -0
- package/src/template/design/src/components/ui/input.tsx +21 -0
- package/src/template/design/src/components/ui/label.tsx +22 -0
- package/src/template/design/src/components/ui/progress.tsx +24 -0
- package/src/template/design/src/components/ui/scroll-area.tsx +18 -0
- package/src/template/design/src/components/ui/select.tsx +67 -0
- package/src/template/design/src/components/ui/separator.tsx +28 -0
- package/src/template/design/src/components/ui/sheet.tsx +137 -0
- package/src/template/design/src/components/ui/skeleton.tsx +13 -0
- package/src/template/design/src/components/ui/switch.tsx +46 -0
- package/src/template/design/src/components/ui/table.tsx +116 -0
- package/src/template/design/src/components/ui/tabs.tsx +64 -0
- package/src/template/design/src/index.css +284 -0
- package/src/template/design/src/lib/data-model-loader.ts +91 -0
- package/src/template/design/src/lib/design-system-loader.ts +101 -0
- package/src/template/design/src/lib/product-loader.ts +221 -0
- package/src/template/design/src/lib/router.tsx +52 -0
- package/src/template/design/src/lib/section-loader.ts +272 -0
- package/src/template/design/src/lib/shell-loader.ts +175 -0
- package/src/template/design/src/lib/utils.ts +6 -0
- package/src/template/design/src/main.tsx +15 -0
- package/src/template/design/src/sections/.gitkeep +0 -0
- package/src/template/design/src/sections/ai-orchestration-engine-oai/OrchestrationEngine.tsx +348 -0
- package/src/template/design/src/sections/core-platform-shell/AppShell.tsx +403 -0
- package/src/template/design/src/sections/gemini-live-integration/GeminiIntegration.tsx +332 -0
- package/src/template/design/src/sections/interactive-2d-canvas/WhiteboardCanvas.tsx +334 -0
- package/src/template/design/src/sections/participation-equity-tracker/EquityTracker.tsx +383 -0
- package/src/template/design/src/sections/persistent-memory-system/PersistentMemory.tsx +308 -0
- package/src/template/design/src/sections/real-time-communication-layer/VideoSession.tsx +342 -0
- package/src/template/design/src/sections/visual-intelligence-agents/VisualAgents.tsx +311 -0
- package/src/template/design/src/types/product.ts +97 -0
- package/src/template/design/src/types/section.ts +33 -0
- package/src/template/design/tsconfig.app.json +34 -0
- package/src/template/design/tsconfig.json +13 -0
- package/src/template/design/tsconfig.node.json +26 -0
- package/src/template/design/vite.config.ts +18 -0
- package/src/template/package.json +27 -0
- package/src/template/vite.config.ts +16 -0
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
Now that you've initialized the folder for this new spec, proceed with the research phase.
|
|
2
|
+
|
|
3
|
+
Follow these instructions for researching this spec's requirements:
|
|
4
|
+
|
|
5
|
+
# Spec Research
|
|
6
|
+
|
|
7
|
+
## Core Responsibilities
|
|
8
|
+
|
|
9
|
+
1. **Read Initial Idea**: Load the raw idea from initialization.md
|
|
10
|
+
2. **Analyze Product Context**: Understand product mission, roadmap, and how this feature fits
|
|
11
|
+
3. **Ask Clarifying Questions**: Generate targeted questions WITH visual asset request AND reusability check
|
|
12
|
+
4. **Process Answers**: Analyze responses and any provided visuals
|
|
13
|
+
5. **Ask Follow-ups**: Based on answers and visual analysis if needed
|
|
14
|
+
6. **Save Requirements**: Document the requirements you've gathered to a single file named: `[spec-path]/planning/requirements.md`
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
### Step 1: Read Initial Idea
|
|
19
|
+
|
|
20
|
+
Read the raw idea from `[spec-path]/planning/initialization.md` to understand what the user wants to build.
|
|
21
|
+
|
|
22
|
+
### Step 2: Analyze Product Context
|
|
23
|
+
|
|
24
|
+
Before generating questions, understand the broader product context:
|
|
25
|
+
|
|
26
|
+
1. **Read Product Mission**: Load `agent-os/product/mission.md` to understand:
|
|
27
|
+
- The product's overall mission and purpose
|
|
28
|
+
- Target users and their primary use cases
|
|
29
|
+
- Core problems the product aims to solve
|
|
30
|
+
- How users are expected to benefit
|
|
31
|
+
|
|
32
|
+
2. **Read Product Roadmap**: Load `agent-os/product/roadmap.md` to understand:
|
|
33
|
+
- Features and capabilities already completed
|
|
34
|
+
- The current state of the product
|
|
35
|
+
- Where this new feature fits in the broader roadmap
|
|
36
|
+
- Related features that might inform or constrain this work
|
|
37
|
+
|
|
38
|
+
3. **Read Product Tech Stack**: Load `agent-os/product/tech-stack.md` to understand:
|
|
39
|
+
- Technologies and frameworks in use
|
|
40
|
+
- Technical constraints and capabilities
|
|
41
|
+
- Libraries and tools available
|
|
42
|
+
|
|
43
|
+
This context will help you:
|
|
44
|
+
- Ask more relevant and contextual questions
|
|
45
|
+
- Identify existing features that might be reused or referenced
|
|
46
|
+
- Ensure the feature aligns with product goals
|
|
47
|
+
- Understand user needs and expectations
|
|
48
|
+
|
|
49
|
+
### Step 3: Generate First Round of Questions WITH Visual Request AND Reusability Check
|
|
50
|
+
|
|
51
|
+
Based on the initial idea, generate 4-8 targeted, NUMBERED questions that explore requirements while suggesting reasonable defaults.
|
|
52
|
+
|
|
53
|
+
**CRITICAL: Always include the visual asset request AND reusability question at the END of your questions.**
|
|
54
|
+
|
|
55
|
+
**Question generation guidelines:**
|
|
56
|
+
- Start each question with a number
|
|
57
|
+
- Propose sensible assumptions based on best practices
|
|
58
|
+
- Frame questions as "I'm assuming X, is that correct?"
|
|
59
|
+
- Make it easy for users to confirm or provide alternatives
|
|
60
|
+
- Include specific suggestions they can say yes/no to
|
|
61
|
+
- Always end with an open question about exclusions
|
|
62
|
+
|
|
63
|
+
**Required output format:**
|
|
64
|
+
```
|
|
65
|
+
Based on your idea for [spec name], I have some clarifying questions:
|
|
66
|
+
|
|
67
|
+
1. I assume [specific assumption]. Is that correct, or [alternative]?
|
|
68
|
+
2. I'm thinking [specific approach]. Should we [alternative]?
|
|
69
|
+
3. [Continue with numbered questions...]
|
|
70
|
+
[Last numbered question about exclusions]
|
|
71
|
+
|
|
72
|
+
**Existing Code Reuse:**
|
|
73
|
+
Are there existing features in your codebase with similar patterns we should reference? For example:
|
|
74
|
+
- Similar interface elements or UI components to re-use
|
|
75
|
+
- Comparable page layouts or navigation patterns
|
|
76
|
+
- Related backend logic or service objects
|
|
77
|
+
- Existing models or controllers with similar functionality
|
|
78
|
+
|
|
79
|
+
Please provide file/folder paths or names of these features if they exist.
|
|
80
|
+
|
|
81
|
+
**Visual Assets Request:**
|
|
82
|
+
Do you have any design mockups, wireframes, or screenshots that could help guide the development?
|
|
83
|
+
|
|
84
|
+
If yes, please place them in: `[spec-path]/planning/visuals/`
|
|
85
|
+
|
|
86
|
+
Use descriptive file names like:
|
|
87
|
+
- homepage-mockup.png
|
|
88
|
+
- dashboard-wireframe.jpg
|
|
89
|
+
- lofi-form-layout.png
|
|
90
|
+
- mobile-view.png
|
|
91
|
+
- existing-ui-screenshot.png
|
|
92
|
+
|
|
93
|
+
Please answer the questions above and let me know if you've added any visual files or can point to similar existing features.
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**OUTPUT these questions to the orchestrator and STOP - wait for user response.**
|
|
97
|
+
|
|
98
|
+
### Step 4: Process Answers and MANDATORY Visual Check
|
|
99
|
+
|
|
100
|
+
After receiving user's answers from the orchestrator:
|
|
101
|
+
|
|
102
|
+
1. Store the user's answers for later documentation
|
|
103
|
+
|
|
104
|
+
2. **MANDATORY: Check for visual assets regardless of user's response:**
|
|
105
|
+
|
|
106
|
+
**CRITICAL**: You MUST run the following bash command even if the user says "no visuals" or doesn't mention visuals (Users often add files without mentioning them):
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
# List all files in visuals folder - THIS IS MANDATORY
|
|
110
|
+
ls -la [spec-path]/planning/visuals/ 2>/dev/null | grep -E '\.(png|jpg|jpeg|gif|svg|pdf)$' || echo "No visual files found"
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
3. IF visual files are found (bash command returns filenames):
|
|
114
|
+
- Use Read tool to analyze EACH visual file found
|
|
115
|
+
- Note key design elements, patterns, and user flows
|
|
116
|
+
- Document observations for each file
|
|
117
|
+
- Check filenames for low-fidelity indicators (lofi, lo-fi, wireframe, sketch, rough, etc.)
|
|
118
|
+
|
|
119
|
+
4. IF user provided paths or names of similar features:
|
|
120
|
+
- Make note of these paths/names for spec-writer to reference
|
|
121
|
+
- DO NOT explore them yourself (to save time), but DO document their names for future reference by the spec-writer.
|
|
122
|
+
|
|
123
|
+
### Step 5: Generate Follow-up Questions (if needed)
|
|
124
|
+
|
|
125
|
+
Determine if follow-up questions are needed based on:
|
|
126
|
+
|
|
127
|
+
**Visual-triggered follow-ups:**
|
|
128
|
+
- If visuals were found but user didn't mention them: "I found [filename(s)] in the visuals folder. Let me analyze these for the specification."
|
|
129
|
+
- If filenames contain "lofi", "lo-fi", "wireframe", "sketch", or "rough": "I notice you've provided [filename(s)] which appear to be wireframes/low-fidelity mockups. Should we treat these as layout and structure guides rather than exact design specifications, using our application's existing styling instead?"
|
|
130
|
+
- If visuals show features not discussed in answers
|
|
131
|
+
- If there are discrepancies between answers and visuals
|
|
132
|
+
|
|
133
|
+
**Reusability follow-ups:**
|
|
134
|
+
- If user didn't provide similar features but the spec seems common: "This seems like it might share patterns with existing features. Could you point me to any similar forms/pages/logic in your app?"
|
|
135
|
+
- If provided paths seem incomplete you can ask something like: "You mentioned [feature]. Are there any service objects or backend logic we should also reference?"
|
|
136
|
+
|
|
137
|
+
**User's Answers-triggered follow-ups:**
|
|
138
|
+
- Vague requirements need clarification
|
|
139
|
+
- Missing technical details
|
|
140
|
+
- Unclear scope boundaries
|
|
141
|
+
|
|
142
|
+
**If follow-ups needed, OUTPUT to orchestrator:**
|
|
143
|
+
```
|
|
144
|
+
Based on your answers [and the visual files I found], I have a few follow-up questions:
|
|
145
|
+
|
|
146
|
+
1. [Specific follow-up question]
|
|
147
|
+
2. [Another follow-up if needed]
|
|
148
|
+
|
|
149
|
+
Please provide these additional details.
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Then STOP and wait for responses.**
|
|
153
|
+
|
|
154
|
+
### Step 6: Save Complete Requirements
|
|
155
|
+
|
|
156
|
+
After all questions are answered, record ALL gathered information to ONE FILE at this location with this name: `[spec-path]/planning/requirements.md`
|
|
157
|
+
|
|
158
|
+
Use the following structure and do not deviate from this structure when writing your gathered information to `requirements.md`. Include ONLY the items specified in the following structure:
|
|
159
|
+
|
|
160
|
+
```markdown
|
|
161
|
+
# Spec Requirements: [Spec Name]
|
|
162
|
+
|
|
163
|
+
## Initial Description
|
|
164
|
+
[User's original spec description from initialization.md]
|
|
165
|
+
|
|
166
|
+
## Requirements Discussion
|
|
167
|
+
|
|
168
|
+
### First Round Questions
|
|
169
|
+
|
|
170
|
+
**Q1:** [First question asked]
|
|
171
|
+
**Answer:** [User's answer]
|
|
172
|
+
|
|
173
|
+
**Q2:** [Second question asked]
|
|
174
|
+
**Answer:** [User's answer]
|
|
175
|
+
|
|
176
|
+
[Continue for all questions]
|
|
177
|
+
|
|
178
|
+
### Existing Code to Reference
|
|
179
|
+
[Based on user's response about similar features]
|
|
180
|
+
|
|
181
|
+
**Similar Features Identified:**
|
|
182
|
+
- Feature: [Name] - Path: `[path provided by user]`
|
|
183
|
+
- Components to potentially reuse: [user's description]
|
|
184
|
+
- Backend logic to reference: [user's description]
|
|
185
|
+
|
|
186
|
+
[If user provided no similar features]
|
|
187
|
+
No similar existing features identified for reference.
|
|
188
|
+
|
|
189
|
+
### Follow-up Questions
|
|
190
|
+
[If any were asked]
|
|
191
|
+
|
|
192
|
+
**Follow-up 1:** [Question]
|
|
193
|
+
**Answer:** [User's answer]
|
|
194
|
+
|
|
195
|
+
## Visual Assets
|
|
196
|
+
|
|
197
|
+
### Files Provided:
|
|
198
|
+
[Based on actual bash check, not user statement]
|
|
199
|
+
- `filename.png`: [Description of what it shows from your analysis]
|
|
200
|
+
- `filename2.jpg`: [Key elements observed from your analysis]
|
|
201
|
+
|
|
202
|
+
### Visual Insights:
|
|
203
|
+
- [Design patterns identified]
|
|
204
|
+
- [User flow implications]
|
|
205
|
+
- [UI components shown]
|
|
206
|
+
- [Fidelity level: high-fidelity mockup / low-fidelity wireframe]
|
|
207
|
+
|
|
208
|
+
[If bash check found no files]
|
|
209
|
+
No visual assets provided.
|
|
210
|
+
|
|
211
|
+
## Requirements Summary
|
|
212
|
+
|
|
213
|
+
### Functional Requirements
|
|
214
|
+
- [Core functionality based on answers]
|
|
215
|
+
- [User actions enabled]
|
|
216
|
+
- [Data to be managed]
|
|
217
|
+
|
|
218
|
+
### Reusability Opportunities
|
|
219
|
+
- [Components that might exist already based on user's input]
|
|
220
|
+
- [Backend patterns to investigate]
|
|
221
|
+
- [Similar features to model after]
|
|
222
|
+
|
|
223
|
+
### Scope Boundaries
|
|
224
|
+
**In Scope:**
|
|
225
|
+
- [What will be built]
|
|
226
|
+
|
|
227
|
+
**Out of Scope:**
|
|
228
|
+
- [What won't be built]
|
|
229
|
+
- [Future enhancements mentioned]
|
|
230
|
+
|
|
231
|
+
### Technical Considerations
|
|
232
|
+
- [Integration points mentioned]
|
|
233
|
+
- [Existing system constraints]
|
|
234
|
+
- [Technology preferences stated]
|
|
235
|
+
- [Similar code patterns to follow]
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### Step 7: Output Completion
|
|
239
|
+
|
|
240
|
+
Return to orchestrator:
|
|
241
|
+
|
|
242
|
+
```
|
|
243
|
+
Requirements research complete!
|
|
244
|
+
|
|
245
|
+
✅ Processed [X] clarifying questions
|
|
246
|
+
✅ Visual check performed: [Found and analyzed Y files / No files found]
|
|
247
|
+
✅ Reusability opportunities: [Identified Z similar features / None identified]
|
|
248
|
+
✅ Requirements documented comprehensively
|
|
249
|
+
|
|
250
|
+
Requirements saved to: `[spec-path]/planning/requirements.md`
|
|
251
|
+
|
|
252
|
+
Ready for specification creation.
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
## Important Constraints
|
|
256
|
+
|
|
257
|
+
- **MANDATORY**: Always run bash command to check visuals folder after receiving user answers
|
|
258
|
+
- DO NOT write technical specifications for development. Just record your findings from information gathering to this single file: `[spec-path]/planning/requirements.md`.
|
|
259
|
+
- Visual check is based on actual file(s) found via bash, NOT user statements
|
|
260
|
+
- Check filenames for low-fidelity indicators and clarify design intent if found
|
|
261
|
+
- Ask about existing similar features to promote code reuse
|
|
262
|
+
- Keep follow-ups minimal (1-3 questions max)
|
|
263
|
+
- Save user's exact answers, not interpretations
|
|
264
|
+
- Document all visual findings including fidelity level
|
|
265
|
+
- Document paths to similar features for spec-writer to reference
|
|
266
|
+
- OUTPUT questions and STOP to wait for orchestrator to relay responses
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
## Display confirmation and next step
|
|
270
|
+
|
|
271
|
+
Once you've completed your research and documented it, output the following message:
|
|
272
|
+
|
|
273
|
+
```
|
|
274
|
+
✅ I have documented this spec's research and requirements in `agent-os/specs/[this-spec]/planning`.
|
|
275
|
+
|
|
276
|
+
Next step: Run the command, `1-create-spec.md`.
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
After all steps complete, inform the user:
|
|
280
|
+
|
|
281
|
+
```
|
|
282
|
+
Spec initialized successfully!
|
|
283
|
+
|
|
284
|
+
✅ Spec folder created: `[spec-path]`
|
|
285
|
+
✅ Requirements gathered
|
|
286
|
+
✅ Visual assets: [Found X files / No files provided]
|
|
287
|
+
|
|
288
|
+
👉 Run `/write-spec` to create the spec.md document.
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
## User Standards & Preferences Compliance
|
|
292
|
+
|
|
293
|
+
IMPORTANT: Ensure that your research questions and insights are ALIGNED and DOES NOT CONFLICT with the user's preferences and standards as detailed in the following files:
|
|
294
|
+
|
|
295
|
+
@agent-os/standards/global/coding-style.md
|
|
296
|
+
@agent-os/standards/global/commenting.md
|
|
297
|
+
@agent-os/standards/global/conventions.md
|
|
298
|
+
@agent-os/standards/global/error-handling.md
|
|
299
|
+
@agent-os/standards/global/tech-stack.md
|
|
300
|
+
@agent-os/standards/global/validation.md
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# COMMAND: Shape Section Spec
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
Create the technical specification (`spec.md`) for a specific product section.
|
|
5
|
+
|
|
6
|
+
## Prerequisites
|
|
7
|
+
- `design/product/product-roadmap.md` must exist.
|
|
8
|
+
- You must know the **Section Title** and **Section ID**.
|
|
9
|
+
|
|
10
|
+
## Instructions
|
|
11
|
+
|
|
12
|
+
### Step 1: Analyze Context
|
|
13
|
+
- Read `design/product/product-roadmap.md` to understand where this section fits.
|
|
14
|
+
- Read `design/product/product-overview.md` to understand the overall product context.
|
|
15
|
+
|
|
16
|
+
### Step 2: Create Spec File
|
|
17
|
+
Create `design/product/sections/[section-id]/spec.md`.
|
|
18
|
+
|
|
19
|
+
Format:
|
|
20
|
+
```markdown
|
|
21
|
+
# [Section Title] Specification
|
|
22
|
+
|
|
23
|
+
## Overview
|
|
24
|
+
[A clear, concise description of what this section does and its purpose.]
|
|
25
|
+
|
|
26
|
+
## User Flows
|
|
27
|
+
- [User Action] -> [System Response] -> [Next Step]
|
|
28
|
+
- [User Action] -> [System Response]
|
|
29
|
+
|
|
30
|
+
## UI Requirements
|
|
31
|
+
- [Requirement 1: e.g., A list of items with sortable columns]
|
|
32
|
+
- [Requirement 2: e.g., A primary action button in the top right]
|
|
33
|
+
- [Requirement 3]
|
|
34
|
+
|
|
35
|
+
## Configuration
|
|
36
|
+
- shell: true (or false if this is a standalone public page like login)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Step 3: Verification
|
|
40
|
+
- Output: "Spec for '[Section Title]' created! You can now view it in Design OS."
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
Now that we've initiated and planned the details for a new spec, we will now proceed with drafting the specification document, following these instructions:
|
|
2
|
+
|
|
3
|
+
# Spec Writing
|
|
4
|
+
|
|
5
|
+
## Core Responsibilities
|
|
6
|
+
|
|
7
|
+
1. **Analyze Requirements**: Load and analyze requirements and visual assets thoroughly
|
|
8
|
+
2. **Search for Reusable Code**: Find reusable components and patterns in existing codebase
|
|
9
|
+
3. **Create Specification**: Write comprehensive specification document
|
|
10
|
+
|
|
11
|
+
## Workflow
|
|
12
|
+
|
|
13
|
+
### Step 1: Analyze Requirements and Context
|
|
14
|
+
|
|
15
|
+
Read and understand all inputs and THINK HARD:
|
|
16
|
+
```bash
|
|
17
|
+
# Read the requirements document
|
|
18
|
+
cat agent-os/specs/[current-spec]/planning/requirements.md
|
|
19
|
+
|
|
20
|
+
# Check for visual assets
|
|
21
|
+
ls -la agent-os/specs/[current-spec]/planning/visuals/ 2>/dev/null | grep -v "^total" | grep -v "^d"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Parse and analyze:
|
|
25
|
+
- User's feature description and goals
|
|
26
|
+
- Requirements gathered by spec-shaper
|
|
27
|
+
- Visual mockups or screenshots (if present)
|
|
28
|
+
- Any constraints or out-of-scope items mentioned
|
|
29
|
+
|
|
30
|
+
### Step 2: Search for Reusable Code
|
|
31
|
+
|
|
32
|
+
Before creating specifications, search the codebase for existing patterns and components that can be reused.
|
|
33
|
+
|
|
34
|
+
Based on the feature requirements, identify relevant keywords and search for:
|
|
35
|
+
- Similar features or functionality
|
|
36
|
+
- Existing UI components that match your needs
|
|
37
|
+
- Models, services, or controllers with related logic
|
|
38
|
+
- API patterns that could be extended
|
|
39
|
+
- Database structures that could be reused
|
|
40
|
+
|
|
41
|
+
Use appropriate search tools and commands for the project's technology stack to find:
|
|
42
|
+
- Components that can be reused or extended
|
|
43
|
+
- Patterns to follow from similar features
|
|
44
|
+
- Naming conventions used in the codebase
|
|
45
|
+
- Architecture patterns already established
|
|
46
|
+
|
|
47
|
+
Document your findings for use in the specification.
|
|
48
|
+
|
|
49
|
+
### Step 3: Create Core Specification
|
|
50
|
+
|
|
51
|
+
Write the main specification to `agent-os/specs/[current-spec]/spec.md`.
|
|
52
|
+
|
|
53
|
+
DO NOT write actual code in the spec.md document. Just describe the requirements clearly and concisely.
|
|
54
|
+
|
|
55
|
+
Keep it short and include only essential information for each section.
|
|
56
|
+
|
|
57
|
+
Follow this structure exactly when creating the content of `spec.md`:
|
|
58
|
+
|
|
59
|
+
```markdown
|
|
60
|
+
# Specification: [Feature Name]
|
|
61
|
+
|
|
62
|
+
## Goal
|
|
63
|
+
[1-2 sentences describing the core objective]
|
|
64
|
+
|
|
65
|
+
## User Stories
|
|
66
|
+
- As a [user type], I want to [action] so that [benefit]
|
|
67
|
+
- [repeat for up to 2 max additional user stories]
|
|
68
|
+
|
|
69
|
+
## Specific Requirements
|
|
70
|
+
|
|
71
|
+
**Specific requirement name**
|
|
72
|
+
- [Up to 8 CONCISE sub-bullet points to clarify specific sub-requirements, design or architectual decisions that go into this requirement, or the technical approach to take when implementing this requirement]
|
|
73
|
+
|
|
74
|
+
[repeat for up to a max of 10 specific requirements]
|
|
75
|
+
|
|
76
|
+
## Visual Design
|
|
77
|
+
[If mockups provided]
|
|
78
|
+
|
|
79
|
+
**`planning/visuals/[filename]`**
|
|
80
|
+
- [up to 8 CONCISE bullets describing specific UI elements found in this visual to address when building]
|
|
81
|
+
|
|
82
|
+
[repeat for each file in the `planning/visuals` folder]
|
|
83
|
+
|
|
84
|
+
## Existing Code to Leverage
|
|
85
|
+
|
|
86
|
+
**Code, component, or existing logic found**
|
|
87
|
+
- [up to 5 bullets that describe what this existing code does and how it should be re-used or replicated when building this spec]
|
|
88
|
+
|
|
89
|
+
[repeat for up to 5 existing code areas]
|
|
90
|
+
|
|
91
|
+
## Out of Scope
|
|
92
|
+
- [up to 10 concise descriptions of specific features that are out of scope and MUST NOT be built in this spec]
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Important Constraints
|
|
96
|
+
|
|
97
|
+
1. **Always search for reusable code** before specifying new components
|
|
98
|
+
2. **Reference visual assets** when available
|
|
99
|
+
3. **Do NOT write actual code** in the spec
|
|
100
|
+
4. **Keep each section short**, with clear, direct, skimmable specifications
|
|
101
|
+
5. **Do NOT deviate from the template above** and do not add additional sections
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
## Display confirmation and next step
|
|
105
|
+
|
|
106
|
+
Display the following message to the user:
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
The spec has been created at `agent-os/specs/[this-spec]/spec.md`.
|
|
110
|
+
|
|
111
|
+
Review it closely to ensure everything aligns with your vision and requirements.
|
|
112
|
+
|
|
113
|
+
Next step: Run the command, 2-create-tasks-list.md
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## User Standards & Preferences Compliance
|
|
117
|
+
|
|
118
|
+
IMPORTANT: Ensure that the specification document's content is ALIGNED and DOES NOT CONFLICT with the user's preferences and standards as detailed in the following files:
|
|
119
|
+
|
|
120
|
+
@agent-os/standards/backend/api.md
|
|
121
|
+
@agent-os/standards/backend/migrations.md
|
|
122
|
+
@agent-os/standards/backend/models.md
|
|
123
|
+
@agent-os/standards/backend/queries.md
|
|
124
|
+
@agent-os/standards/frontend/accessibility.md
|
|
125
|
+
@agent-os/standards/frontend/components.md
|
|
126
|
+
@agent-os/standards/frontend/css.md
|
|
127
|
+
@agent-os/standards/frontend/responsive.md
|
|
128
|
+
@agent-os/standards/global/coding-style.md
|
|
129
|
+
@agent-os/standards/global/commenting.md
|
|
130
|
+
@agent-os/standards/global/conventions.md
|
|
131
|
+
@agent-os/standards/global/error-handling.md
|
|
132
|
+
@agent-os/standards/global/tech-stack.md
|
|
133
|
+
@agent-os/standards/global/validation.md
|
|
134
|
+
@agent-os/standards/testing/test-writing.md
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
version: 2.1.1
|
|
2
|
+
last_compiled: 2025-12-19 14:03:25
|
|
3
|
+
|
|
4
|
+
# ================================================
|
|
5
|
+
# Compiled with the following settings:
|
|
6
|
+
#
|
|
7
|
+
# To change these settings, run ~/agent-os/scripts/project-update.sh to re-compile your project with the new settings.
|
|
8
|
+
# ================================================
|
|
9
|
+
profile: default
|
|
10
|
+
claude_code_commands: true
|
|
11
|
+
use_claude_code_subagents: true
|
|
12
|
+
agent_os_commands: true
|
|
13
|
+
standards_as_claude_code_skills: false
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Product Mission
|
|
2
|
+
|
|
3
|
+
## Pitch
|
|
4
|
+
[Your Product Name] is a **[Category/Platform]** that helps **[Target Audience]** **[Solve Key Problem]**
|
|
5
|
+
by providing **[Unique Value Proposition/Solution]**.
|
|
6
|
+
|
|
7
|
+
## Users
|
|
8
|
+
|
|
9
|
+
### Primary Customers
|
|
10
|
+
- **[Customer Segment 1]**: [Description]
|
|
11
|
+
- **[Customer Segment 2]**: [Description]
|
|
12
|
+
|
|
13
|
+
### User Personas
|
|
14
|
+
**[Persona Name]** (Age)
|
|
15
|
+
- **Role:** [Role]
|
|
16
|
+
- **Context:** [Context]
|
|
17
|
+
- **Pain Points:** [Pain Points]
|
|
18
|
+
- **Goals:** [Legacy Goals]
|
|
19
|
+
|
|
20
|
+
## The Problem
|
|
21
|
+
[Describe the problem your product solves]
|
|
22
|
+
|
|
23
|
+
## Differentiators
|
|
24
|
+
- **[Differentiator 1]**: [Description]
|
|
25
|
+
- **[Differentiator 2]**: [Description]
|
|
26
|
+
|
|
27
|
+
## Key Features
|
|
28
|
+
- **[Feature 1]**: [Description]
|
|
29
|
+
- **[Feature 2]**: [Description]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Tech Stack
|
|
2
|
+
|
|
3
|
+
## Core
|
|
4
|
+
- **Frontend**: React, Vite, TailwindCSS
|
|
5
|
+
- **Backend**: Node.js, Express (if applicable)
|
|
6
|
+
- **Database**: [Database choice]
|
|
7
|
+
|
|
8
|
+
## Infrastructure
|
|
9
|
+
- **Hosting**: [Hosting provider]
|
|
10
|
+
- **CI/CD**: [Pipeline tool]
|
|
11
|
+
|
|
12
|
+
## Tools
|
|
13
|
+
- **Design**: Figma
|
|
14
|
+
- **Planning**: Agent OS
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Specs
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
## API endpoint standards and conventions
|
|
2
|
+
|
|
3
|
+
- **RESTful Design**: Follow REST principles with clear resource-based URLs and appropriate HTTP methods (GET, POST, PUT, PATCH, DELETE)
|
|
4
|
+
- **Consistent Naming**: Use consistent, lowercase, hyphenated or underscored naming conventions for endpoints across the API
|
|
5
|
+
- **Versioning**: Implement API versioning strategy (URL path or headers) to manage breaking changes without disrupting existing clients
|
|
6
|
+
- **Plural Nouns**: Use plural nouns for resource endpoints (e.g., `/users`, `/products`) for consistency
|
|
7
|
+
- **Nested Resources**: Limit nesting depth to 2-3 levels maximum to keep URLs readable and maintainable
|
|
8
|
+
- **Query Parameters**: Use query parameters for filtering, sorting, pagination, and search rather than creating separate endpoints
|
|
9
|
+
- **HTTP Status Codes**: Return appropriate, consistent HTTP status codes that accurately reflect the response (200, 201, 400, 404, 500, etc.)
|
|
10
|
+
- **Rate Limiting Headers**: Include rate limit information in response headers to help clients manage their usage
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
## Database migration best practices
|
|
2
|
+
|
|
3
|
+
- **Reversible Migrations**: Always implement rollback/down methods to enable safe migration reversals
|
|
4
|
+
- **Small, Focused Changes**: Keep each migration focused on a single logical change for clarity and easier troubleshooting
|
|
5
|
+
- **Zero-Downtime Deployments**: Consider deployment order and backwards compatibility for high-availability systems
|
|
6
|
+
- **Separate Schema and Data**: Keep schema changes separate from data migrations for better rollback safety
|
|
7
|
+
- **Index Management**: Create indexes on large tables carefully, using concurrent options when available to avoid locks
|
|
8
|
+
- **Naming Conventions**: Use clear, descriptive names that indicate what the migration does
|
|
9
|
+
- **Version Control**: Always commit migrations to version control and never modify existing migrations after deployment
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
## Database model best practices
|
|
2
|
+
|
|
3
|
+
- **Clear Naming**: Use singular names for models and plural for tables following your framework's conventions
|
|
4
|
+
- **Timestamps**: Include created and updated timestamps on all tables for auditing and debugging
|
|
5
|
+
- **Data Integrity**: Use database constraints (NOT NULL, UNIQUE, foreign keys) to enforce data rules at the database level
|
|
6
|
+
- **Appropriate Data Types**: Choose data types that match the data's purpose and size requirements
|
|
7
|
+
- **Indexes on Foreign Keys**: Index foreign key columns and other frequently queried fields for performance
|
|
8
|
+
- **Validation at Multiple Layers**: Implement validation at both model and database levels for defense in depth
|
|
9
|
+
- **Relationship Clarity**: Define relationships clearly with appropriate cascade behaviors and naming conventions
|
|
10
|
+
- **Avoid Over-Normalization**: Balance normalization with practical query performance needs
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
## Database query best practices
|
|
2
|
+
|
|
3
|
+
- **Prevent SQL Injection**: Always use parameterized queries or ORM methods; never interpolate user input into SQL strings
|
|
4
|
+
- **Avoid N+1 Queries**: Use eager loading or joins to fetch related data in a single query instead of multiple queries
|
|
5
|
+
- **Select Only Needed Data**: Request only the columns you need rather than using SELECT * for better performance
|
|
6
|
+
- **Index Strategic Columns**: Index columns used in WHERE, JOIN, and ORDER BY clauses for query optimization
|
|
7
|
+
- **Use Transactions for Related Changes**: Wrap related database operations in transactions to maintain data consistency
|
|
8
|
+
- **Set Query Timeouts**: Implement timeouts to prevent runaway queries from impacting system performance
|
|
9
|
+
- **Cache Expensive Queries**: Cache results of complex or frequently-run queries when appropriate
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
## UI accessibility best practices
|
|
2
|
+
|
|
3
|
+
- **Semantic HTML**: Use appropriate HTML elements (nav, main, button, etc.) that convey meaning to assistive technologies
|
|
4
|
+
- **Keyboard Navigation**: Ensure all interactive elements are accessible via keyboard with visible focus indicators
|
|
5
|
+
- **Color Contrast**: Maintain sufficient contrast ratios (4.5:1 for normal text) and don't rely solely on color to convey information
|
|
6
|
+
- **Alternative Text**: Provide descriptive alt text for images and meaningful labels for all form inputs
|
|
7
|
+
- **Screen Reader Testing**: Test and verify that all views are accessible on screen reading devices.
|
|
8
|
+
- **ARIA When Needed**: Use ARIA attributes to enhance complex components when semantic HTML isn't sufficient
|
|
9
|
+
- **Logical Heading Structure**: Use heading levels (h1-h6) in proper order to create a clear document outline
|
|
10
|
+
- **Focus Management**: Manage focus appropriately in dynamic content, modals, and single-page applications
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
## UI component best practices
|
|
2
|
+
|
|
3
|
+
- **Single Responsibility**: Each component should have one clear purpose and do it well
|
|
4
|
+
- **Reusability**: Design components to be reused across different contexts with configurable props
|
|
5
|
+
- **Composability**: Build complex UIs by combining smaller, simpler components rather than monolithic structures
|
|
6
|
+
- **Clear Interface**: Define explicit, well-documented props with sensible defaults for ease of use
|
|
7
|
+
- **Encapsulation**: Keep internal implementation details private and expose only necessary APIs
|
|
8
|
+
- **Consistent Naming**: Use clear, descriptive names that indicate the component's purpose and follow team conventions
|
|
9
|
+
- **State Management**: Keep state as local as possible; lift it up only when needed by multiple components
|
|
10
|
+
- **Minimal Props**: Keep the number of props manageable; if a component needs many props, consider composition or splitting it
|
|
11
|
+
- **Documentation**: Document component usage, props, and provide examples for easier adoption by team members
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
## CSS best practices
|
|
2
|
+
|
|
3
|
+
- **Consistent Methodology**: Apply and stick to the project's consistent CSS methodology (Tailwind, BEM, utility classes, CSS modules, etc.) across the entire project
|
|
4
|
+
- **Avoid Overriding Framework Styles**: Work with your framework's patterns rather than fighting against them with excessive overrides
|
|
5
|
+
- **Maintain Design System**: Establish and document design tokens (colors, spacing, typography) for consistency
|
|
6
|
+
- **Minimize Custom CSS**: Leverage framework utilities and components to reduce custom CSS maintenance burden
|
|
7
|
+
- **Performance Considerations**: Optimize for production with CSS purging/tree-shaking to remove unused styles
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
## Responsive design best practices
|
|
2
|
+
|
|
3
|
+
- **Mobile-First Development**: Start with mobile layout and progressively enhance for larger screens
|
|
4
|
+
- **Standard Breakpoints**: Consistently use standard breakpoints across the application (e.g., mobile, tablet, desktop)
|
|
5
|
+
- **Fluid Layouts**: Use percentage-based widths and flexible containers that adapt to screen size
|
|
6
|
+
- **Relative Units**: Prefer rem/em units over fixed pixels for better scalability and accessibility
|
|
7
|
+
- **Test Across Devices**: Test and verify UI changes across multiple screen sizes from mobile to tablet to desktop screen sizes and ensure a balanced, user-friendly viewing and reading experience on all
|
|
8
|
+
- **Touch-Friendly Design**: Ensure tap targets are appropriately sized (minimum 44x44px) for mobile users
|
|
9
|
+
- **Performance on Mobile**: Optimize images and assets for mobile network conditions and smaller screens
|
|
10
|
+
- **Readable Typography**: Maintain readable font sizes across all breakpoints without requiring zoom
|
|
11
|
+
- **Content Priority**: Show the most important content first on smaller screens through thoughtful layout decisions
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
## Coding style best practices
|
|
2
|
+
|
|
3
|
+
- **Consistent Naming Conventions**: Establish and follow naming conventions for variables, functions, classes, and files across the codebase
|
|
4
|
+
- **Automated Formatting**: Maintain consistent code style (indenting, line breaks, etc.)
|
|
5
|
+
- **Meaningful Names**: Choose descriptive names that reveal intent; avoid abbreviations and single-letter variables except in narrow contexts
|
|
6
|
+
- **Small, Focused Functions**: Keep functions small and focused on a single task for better readability and testability
|
|
7
|
+
- **Consistent Indentation**: Use consistent indentation (spaces or tabs) and configure your editor/linter to enforce it
|
|
8
|
+
- **Remove Dead Code**: Delete unused code, commented-out blocks, and imports rather than leaving them as clutter
|
|
9
|
+
- **Backward compatibility only when required:** Unless specifically instructed otherwise, assume you do not need to write additional code logic to handle backward compatibility.
|
|
10
|
+
- **DRY Principle**: Avoid duplication by extracting common logic into reusable functions or modules
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
## Code commenting best practices
|
|
2
|
+
|
|
3
|
+
- **Self-Documenting Code**: Write code that explains itself through clear structure and naming
|
|
4
|
+
- **Minimal, helpful comments**: Add concise, minimal comments to explain large sections of code logic.
|
|
5
|
+
- **Don't comment changes or fixes**: Do not leave code comments that speak to recent or temporary changes or fixes. Comments should be evergreen informational texts that are relevant far into the future.
|