create-sdd-project 0.1.1

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 (59) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +204 -0
  3. package/bin/cli.js +44 -0
  4. package/lib/config.js +106 -0
  5. package/lib/generator.js +313 -0
  6. package/lib/wizard.js +224 -0
  7. package/package.json +41 -0
  8. package/template/.claude/agents/backend-developer.md +60 -0
  9. package/template/.claude/agents/backend-planner.md +65 -0
  10. package/template/.claude/agents/code-review-specialist.md +65 -0
  11. package/template/.claude/agents/database-architect.md +68 -0
  12. package/template/.claude/agents/frontend-developer.md +68 -0
  13. package/template/.claude/agents/frontend-planner.md +65 -0
  14. package/template/.claude/agents/production-code-validator.md +102 -0
  15. package/template/.claude/agents/qa-engineer.md +70 -0
  16. package/template/.claude/agents/spec-creator.md +72 -0
  17. package/template/.claude/commands/.gitkeep +0 -0
  18. package/template/.claude/hooks/quick-scan.sh +111 -0
  19. package/template/.claude/settings.json +29 -0
  20. package/template/.claude/skills/bug-workflow/SKILL.md +108 -0
  21. package/template/.claude/skills/development-workflow/SKILL.md +194 -0
  22. package/template/.claude/skills/development-workflow/references/branching-strategy.md +59 -0
  23. package/template/.claude/skills/development-workflow/references/complexity-guide.md +89 -0
  24. package/template/.claude/skills/development-workflow/references/failure-handling.md +174 -0
  25. package/template/.claude/skills/development-workflow/references/pr-template.md +80 -0
  26. package/template/.claude/skills/development-workflow/references/sprint-init-template.md +82 -0
  27. package/template/.claude/skills/development-workflow/references/ticket-template.md +71 -0
  28. package/template/.claude/skills/development-workflow/references/workflow-example.md +87 -0
  29. package/template/.claude/skills/project-memory/SKILL.md +152 -0
  30. package/template/.claude/skills/project-memory/references/bugs_template.md +41 -0
  31. package/template/.claude/skills/project-memory/references/decisions_template.md +67 -0
  32. package/template/.claude/skills/project-memory/references/key_facts_template.md +81 -0
  33. package/template/.env.example +17 -0
  34. package/template/.gemini/agents/backend-developer.md +31 -0
  35. package/template/.gemini/agents/backend-planner.md +34 -0
  36. package/template/.gemini/agents/code-review-specialist.md +44 -0
  37. package/template/.gemini/agents/database-architect.md +35 -0
  38. package/template/.gemini/agents/frontend-developer.md +31 -0
  39. package/template/.gemini/agents/frontend-planner.md +34 -0
  40. package/template/.gemini/agents/production-code-validator.md +32 -0
  41. package/template/.gemini/agents/qa-engineer.md +23 -0
  42. package/template/.gemini/agents/spec-creator.md +24 -0
  43. package/template/.gemini/settings.json +5 -0
  44. package/template/.gemini/styles/default.md +19 -0
  45. package/template/AGENTS.md +67 -0
  46. package/template/CLAUDE.md +19 -0
  47. package/template/GEMINI.md +10 -0
  48. package/template/ai-specs/specs/backend-standards.mdc +214 -0
  49. package/template/ai-specs/specs/base-standards.mdc +157 -0
  50. package/template/ai-specs/specs/documentation-standards.mdc +68 -0
  51. package/template/ai-specs/specs/frontend-standards.mdc +226 -0
  52. package/template/docs/project_notes/bugs.md +18 -0
  53. package/template/docs/project_notes/decisions.md +18 -0
  54. package/template/docs/project_notes/key_facts.md +52 -0
  55. package/template/docs/project_notes/pending-improvements.md +50 -0
  56. package/template/docs/project_notes/sprint-0-tracker.md +66 -0
  57. package/template/docs/specs/api-spec.yaml +114 -0
  58. package/template/docs/specs/ui-components.md +77 -0
  59. package/template/docs/tickets/.gitkeep +0 -0
@@ -0,0 +1,68 @@
1
+ ---
2
+ description: Standards for technical documentation and AI specification files. Covers documentation structure, update processes, language rules, and feedback integration.
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # Documentation Standards
7
+
8
+ ## General Rules
9
+
10
+ - **ALWAYS WRITE IN ENGLISH**, including comments and explanations. This applies to creating new documentation, updating existing documentation, and inline code comments.
11
+
12
+ ## Technical Documentation
13
+
14
+ Before making any commit, review which technical documentation should be updated.
15
+
16
+ ### Update Process
17
+
18
+ 1. Review all recent changes in the codebase
19
+ 2. Identify which documentation files need updates:
20
+ - Data model changes → `docs/specs/api-spec.yaml`
21
+ - API changes → `docs/specs/api-spec.yaml`
22
+ - Library/migration changes → `ai-specs/specs/*-standards.mdc`
23
+ - UI component changes → `docs/specs/ui-components.md`
24
+ - Configuration changes → `docs/project_notes/key_facts.md`
25
+ 3. Update each affected documentation file in English
26
+ 4. Maintain consistency with existing documentation structure
27
+ 5. Verify all changes are accurately reflected
28
+
29
+ ### Documentation Files
30
+
31
+ | File | Update When |
32
+ |------|-------------|
33
+ | `docs/specs/api-spec.yaml` | API endpoints or schemas change |
34
+ | `docs/specs/ui-components.md` | Component hierarchy or props change |
35
+ | `ai-specs/specs/backend-standards.mdc` | Backend patterns or deps change |
36
+ | `ai-specs/specs/frontend-standards.mdc` | Frontend patterns or deps change |
37
+ | `docs/project_notes/key_facts.md` | Configuration or infrastructure changes |
38
+ | `docs/project_notes/decisions.md` | Architectural decisions are made |
39
+ | `docs/project_notes/bugs.md` | Bugs are found and fixed |
40
+
41
+ ## AI Specifications
42
+
43
+ AI specs are documents that instruct AI agents how to behave, plan, code, and document.
44
+
45
+ ### Learning from Feedback
46
+
47
+ The AI should:
48
+ - Learn from user feedback, guidance, and suggestions
49
+ - Identify opportunities to improve existing development rules
50
+ - Keep assistance aligned with evolving project needs
51
+ - Incorporate feedback into the operational framework
52
+
53
+ ### Update Protocol
54
+
55
+ When user feedback suggests a rule update:
56
+ 1. Identify the specific rule or section to modify
57
+ 2. Connect the proposed change to the user feedback
58
+ 3. Propose the change and wait for explicit approval
59
+ 4. Apply the modification only after approval
60
+ 5. Confirm the update was made
61
+
62
+ ### Anti-Patterns to Avoid
63
+
64
+ - **Skipping Approval**: Never apply rule changes without user review
65
+ - **Unlinked Proposals**: Always connect changes to specific feedback
66
+ - **Scope Creep**: Update one rule at a time, matching feedback scope
67
+ - **Unprompted Changes**: Only update rules when driven by feedback
68
+ - **Missing Confirmation**: Always notify after successful updates
@@ -0,0 +1,226 @@
1
+ ---
2
+ description: Frontend development standards, best practices, and conventions. Covers component architecture, state management, UI/UX guidelines, and testing practices.
3
+ globs: ["frontend/**/*.{ts,tsx}", "frontend/tsconfig.json", "frontend/jest.config.*", "frontend/package.json"]
4
+ alwaysApply: true
5
+ ---
6
+
7
+ <!-- CONFIG: This file defaults to Next.js/React/Tailwind/Radix UI/Zustand. Adjust for your stack. -->
8
+
9
+ # Frontend Standards
10
+
11
+ ## Technology Stack
12
+
13
+ - **Framework**: Next.js (App Router) with React
14
+ - **Language**: TypeScript (strict mode)
15
+ - **Styling**: Tailwind CSS
16
+ - **Components**: Radix UI primitives (shadcn/ui pattern)
17
+ - **State Management**: Zustand (client-side state)
18
+ - **Testing**: Jest + React Testing Library (unit), Playwright (e2e)
19
+
20
+ ## Project Structure
21
+
22
+ ```
23
+ frontend/
24
+ ├── app/ # Next.js App Router pages
25
+ │ ├── layout.tsx # Root layout
26
+ │ ├── page.tsx # Home page
27
+ │ └── (routes)/ # Route groups
28
+ ├── components/ # UI components
29
+ │ ├── ui/ # Primitive UI components (Button, Input, etc.)
30
+ │ └── (features)/ # Feature-specific components
31
+ ├── lib/ # Utilities and services
32
+ │ ├── api/ # API client and types
33
+ │ └── utils.ts # General utilities
34
+ ├── stores/ # Zustand stores
35
+ ├── public/ # Static assets
36
+ └── __tests__/ # Test utilities and fixtures
37
+ ```
38
+
39
+ ## Naming Conventions
40
+
41
+ - **Components**: PascalCase (`UserCard.tsx`, `ProductList.tsx`)
42
+ - **Variables/Functions**: camelCase (`handleSubmit`, `isLoading`)
43
+ - **Constants**: UPPER_SNAKE_CASE (`API_BASE_URL`, `MAX_ITEMS`)
44
+ - **Types/Interfaces**: PascalCase (`UserProps`, `CartItem`)
45
+ - **Hooks**: camelCase with `use` prefix (`useAuth`, `useCartStore`)
46
+ - **CSS classes**: kebab-case via Tailwind utilities
47
+ - **Test files**: `ComponentName.test.tsx`
48
+
49
+ ## Component Conventions
50
+
51
+ ### Functional Components Only
52
+ ```typescript
53
+ type UserCardProps = {
54
+ user: User;
55
+ onClick: (user: User) => void;
56
+ };
57
+
58
+ export function UserCard({ user, onClick }: UserCardProps) {
59
+ return (
60
+ <div className="rounded-lg border p-4" onClick={() => onClick(user)}>
61
+ <h3>{user.name}</h3>
62
+ </div>
63
+ );
64
+ }
65
+ ```
66
+
67
+ ### Client vs. Server Components
68
+ - Default to Server Components (no directive needed)
69
+ - Add `'use client'` only when using hooks, event handlers, or browser APIs
70
+ - Keep client components as small as possible
71
+
72
+ ### Props
73
+ - Define TypeScript types for all props
74
+ - Use destructuring
75
+ - Include default values where appropriate
76
+
77
+ ## State Management
78
+
79
+ ### Zustand Stores
80
+ ```typescript
81
+ import { create } from 'zustand';
82
+ import { persist } from 'zustand/middleware';
83
+
84
+ type CartStore = {
85
+ items: CartItem[];
86
+ addItem: (item: CartItem) => void;
87
+ removeItem: (id: string) => void;
88
+ };
89
+
90
+ export const useCartStore = create<CartStore>()(
91
+ persist(
92
+ (set) => ({
93
+ items: [],
94
+ addItem: (item) => set((s) => ({ items: [...s.items, item] })),
95
+ removeItem: (id) => set((s) => ({ items: s.items.filter((i) => i.id !== id) })),
96
+ }),
97
+ { name: 'cart-storage' }
98
+ )
99
+ );
100
+ ```
101
+
102
+ ### Hydration Pattern
103
+ When using `persist` with `skipHydration: true`, components must call `store.persist.rehydrate()` on mount.
104
+
105
+ ### Loading and Error States
106
+ Always handle all three states for async operations:
107
+ ```typescript
108
+ const [data, setData] = useState<Data | null>(null);
109
+ const [isLoading, setIsLoading] = useState(true);
110
+ const [error, setError] = useState<string | null>(null);
111
+ ```
112
+
113
+ ## Service Layer
114
+
115
+ Centralize API calls in service files:
116
+
117
+ ```typescript
118
+ // lib/api/userService.ts
119
+ import { apiClient } from './apiClient';
120
+
121
+ export const userService = {
122
+ async list(): Promise<User[]> {
123
+ const response = await apiClient.get('/users');
124
+ return response.data;
125
+ },
126
+
127
+ async getById(id: string): Promise<User> {
128
+ const response = await apiClient.get(`/users/${id}`);
129
+ return response.data;
130
+ },
131
+ };
132
+ ```
133
+
134
+ ## API Types
135
+
136
+ <!-- CONFIG: If using shared Zod schemas, import from @project/shared. If using OpenAPI code generation, uncomment the generate:api script below. -->
137
+
138
+ Import shared types from the `shared/` workspace (see base-standards.mdc § Shared Types):
139
+
140
+ ```typescript
141
+ import { UserSchema } from '@project/shared';
142
+ import type { User } from '@project/shared';
143
+ ```
144
+
145
+ If your project uses OpenAPI code generation instead, configure `npm run generate:api` in `package.json`.
146
+
147
+ ## UI Patterns
148
+
149
+ ### Radix UI Primitives
150
+ Import from the `radix-ui` package (single package, not scoped):
151
+ ```typescript
152
+ import { Select as SelectPrimitive } from "radix-ui";
153
+ ```
154
+
155
+ ### Form Handling
156
+ - Use controlled components
157
+ - Implement blur validation with touched tracking
158
+ - Disable submit during loading
159
+ - Show clear error messages
160
+
161
+ ### Success Feedback
162
+ For mutating actions that don't redirect:
163
+ ```typescript
164
+ const [successMessage, setSuccessMessage] = useState<string | null>(null);
165
+ // After action: set message, auto-dismiss with setTimeout (5s)
166
+ ```
167
+
168
+ ### Admin Page Pattern
169
+ Page (state management) → Table component (display) → Dialog (actions)
170
+
171
+ ## Testing Standards
172
+
173
+ ### React Testing Library
174
+ ```typescript
175
+ import { render, screen } from '@testing-library/react';
176
+ import userEvent from '@testing-library/user-event';
177
+
178
+ describe('UserCard', () => {
179
+ it('should display user name', () => {
180
+ render(<UserCard user={mockUser} onClick={jest.fn()} />);
181
+ expect(screen.getByText('John Doe')).toBeInTheDocument();
182
+ });
183
+
184
+ it('should call onClick when clicked', async () => {
185
+ const user = userEvent.setup();
186
+ const onClick = jest.fn();
187
+ render(<UserCard user={mockUser} onClick={onClick} />);
188
+
189
+ await user.click(screen.getByText('John Doe'));
190
+ expect(onClick).toHaveBeenCalledWith(mockUser);
191
+ });
192
+ });
193
+ ```
194
+
195
+ ### Test Patterns
196
+ - Test user interactions, NOT implementation details
197
+ - Mock services and stores at the module level
198
+ - Use `jest.mock()` with **relative paths** (not `@/` aliases)
199
+ - Mock Radix UI portals (Select, Dialog, Sheet) with native HTML in tests
200
+ - Test loading states, error states, and empty states
201
+ - Use test fixtures for consistent mock data
202
+
203
+ ### Test Fixtures
204
+ Create factory functions for test data:
205
+ ```typescript
206
+ // testing/fixtures.ts
207
+ export function createUser(overrides?: Partial<User>): User {
208
+ return { id: '1', name: 'Test User', email: 'test@example.com', ...overrides };
209
+ }
210
+ ```
211
+
212
+ ## Performance
213
+
214
+ - Lazy load components when appropriate
215
+ - Memoize expensive calculations with `useMemo`
216
+ - Use `useCallback` for stable function references
217
+ - Optimize images with Next.js `<Image>` component
218
+ - Code split at route level
219
+
220
+ ## Accessibility
221
+
222
+ - Include `aria-label` for interactive elements
223
+ - Use semantic HTML elements
224
+ - Ensure keyboard navigation
225
+ - Provide alt text for images
226
+ - Test with screen reader basics
@@ -0,0 +1,18 @@
1
+ # Bug Log
2
+
3
+ Track bugs with their solutions for future reference. Focus on recurring issues, tricky bugs, and lessons learned.
4
+
5
+ ## Format
6
+
7
+ ```markdown
8
+ ### YYYY-MM-DD — Brief Bug Description
9
+
10
+ - **Issue**: What went wrong (symptoms, error messages)
11
+ - **Root Cause**: Why it happened
12
+ - **Solution**: How it was fixed
13
+ - **Prevention**: How to avoid in future
14
+ ```
15
+
16
+ ---
17
+
18
+ <!-- Add bug entries below this line -->
@@ -0,0 +1,18 @@
1
+ # Architectural Decisions
2
+
3
+ Track important technical decisions with context, so future sessions understand WHY things are the way they are.
4
+
5
+ ## Format
6
+
7
+ ```markdown
8
+ ### ADR-XXX: Decision Title (YYYY-MM-DD)
9
+
10
+ **Context:** Why the decision was needed
11
+ **Decision:** What was chosen
12
+ **Alternatives Considered:** Options and why rejected
13
+ **Consequences:** Benefits and trade-offs
14
+ ```
15
+
16
+ ---
17
+
18
+ <!-- Add ADR entries below this line -->
@@ -0,0 +1,52 @@
1
+ # Key Project Facts
2
+
3
+ Quick reference for project configuration, infrastructure details, and important URLs.
4
+
5
+ ## Security Warning
6
+
7
+ **DO NOT store in this file:** Passwords, API keys, secret tokens, private keys.
8
+ **SAFE to store:** Hostnames, ports, project IDs, public URLs, architecture notes.
9
+
10
+ ---
11
+
12
+ ## Project Configuration
13
+
14
+ - **Project Name**: [Your project name]
15
+ - **Repository**: [URL]
16
+ - **Primary Language**: TypeScript
17
+ - **Branching Strategy**: github-flow <!-- Options: github-flow | gitflow — See .claude/skills/development-workflow/references/branching-strategy.md -->
18
+
19
+ ## Technology Stack
20
+
21
+ - **Backend**: [Framework, runtime, version]
22
+ - **Frontend**: [Framework, version]
23
+ - **Database**: [Type, host, port]
24
+ - **ORM**: [Name, version]
25
+
26
+ ## Local Development
27
+
28
+ - **Backend Port**: [e.g., 3010]
29
+ - **Frontend Port**: [e.g., 3000]
30
+ - **Database Port**: [e.g., 5432]
31
+ - **API Base URL**: [e.g., http://localhost:3010/api]
32
+
33
+ ## Infrastructure
34
+
35
+ - **CI/CD**: [e.g., GitHub Actions]
36
+ - **Frontend Hosting**: [e.g., Vercel]
37
+ - **Backend Hosting**: [e.g., Render]
38
+ - **Database Hosting**: [e.g., Neon, Supabase, RDS]
39
+
40
+ ## Important URLs
41
+
42
+ - **Production**: [URL]
43
+ - **Staging**: [URL]
44
+ - **API Docs**: [URL]
45
+
46
+ ## Reusable Components
47
+
48
+ ### Backend
49
+ - [List key services, middleware, validators as you build them]
50
+
51
+ ### Frontend
52
+ - [List key components, hooks, stores as you build them]
@@ -0,0 +1,50 @@
1
+ # Pending Template Improvements
2
+
3
+ Documented on 2026-02-23 for future sessions.
4
+
5
+ ---
6
+
7
+ ## P1: Agent Teams Readiness (Impact: HIGH, Effort: MEDIUM)
8
+
9
+ **What**: Prepare the template to leverage Claude Code's Agent Teams feature (experimental) — a lead agent coordinates multiple teammate agents working in parallel on isolated worktrees.
10
+
11
+ **Why**: Currently, all work is sequential (one agent at a time). Agent Teams would enable parallel execution of independent tasks (e.g., backend + frontend of the same feature simultaneously).
12
+
13
+ **What to do**:
14
+ 1. **Isolation guide**: Document how to use `git worktree` so each teammate works in an isolated copy
15
+ 2. **Parallelism guide**: Add a section to `base-standards.mdc` or a new reference file defining which tasks can safely run in parallel (e.g., backend + frontend of same ticket) vs which must be sequential (e.g., shared types → then backend/frontend)
16
+ 3. **Coordination protocol**: Define how the lead agent splits work, assigns to teammates, and merges results
17
+ 4. **Skill updates**: Modify `development-workflow/SKILL.md` to support a "parallel mode" for Standard/Complex tasks where Step 4 (Implement) can fork into parallel teammates
18
+
19
+ **Prerequisites**: Agent Teams must be stable (currently experimental). Test with a real project first.
20
+
21
+ ---
22
+
23
+ ## ~~P2: Quality Gate Hooks~~ — DONE (2026-02-23)
24
+
25
+ Implemented as:
26
+ - `.claude/settings.json` — Quick scan hook (SubagentStop) + compaction recovery hook (SessionStart)
27
+ - `.claude/hooks/quick-scan.sh` — Fast grep-based scan (no API calls, ~2s)
28
+ - `.claude/settings.local.json` — Notification hooks (permission_prompt, idle_prompt, Stop)
29
+ - Documented in `AGENTS.md` § Automated Hooks
30
+
31
+ ---
32
+
33
+ ## P3: PM Agent + L5 Autonomous (Impact: HIGH, Effort: HIGH)
34
+
35
+ **What**: Create a `project-manager` agent that can substitute the human in most workflow decisions, enabling a new "L5 Fully Autonomous" level where the AI drives the entire sprint.
36
+
37
+ **Why**: Currently, autonomy levels top out at L4 (all checkpoints auto-approved). But the human still decides WHAT to build and in what order. A PM agent could read the sprint tracker, prioritize tasks, and orchestrate the full workflow autonomously.
38
+
39
+ **What to do**:
40
+ 1. **Create `pm-agent.md`**: Reads sprint tracker, selects next task, invokes the workflow skill, reviews results, and decides whether to proceed or flag for human review
41
+ 2. **Add L5 Autonomous**: New autonomy level where the PM agent drives. Human only reviews at sprint boundaries (sprint planning + sprint review)
42
+ 3. **Guard rails**: Define what the PM agent CANNOT do autonomously (e.g., delete data, change architecture, skip tests)
43
+ 4. **Sprint planning integration**: PM agent proposes sprint backlog from a product backlog, human approves
44
+ 5. **Escalation protocol**: When the PM agent encounters ambiguity or risk, it pauses and asks the human
45
+
46
+ **Prerequisites**: Template must be battle-tested at L3-L4 first. Agent Teams (P1) would multiply the PM agent's effectiveness.
47
+
48
+ ---
49
+
50
+ *Delete entries from this file as they are implemented.*
@@ -0,0 +1,66 @@
1
+ # Sprint 0 Tracker
2
+
3
+ **Period:** [YYYY-MM-DD] to [YYYY-MM-DD]
4
+ **Goal:** Project setup and infrastructure
5
+ **Progress:** 0/0 tasks (0%)
6
+
7
+ ---
8
+
9
+ ## Active Session
10
+
11
+ > **Read this section first** when starting a new session or after context compaction. Provides instant context recovery.
12
+
13
+ **Last Updated:** —
14
+
15
+ | Field | Value |
16
+ |-------|-------|
17
+ | **Current Task** | None |
18
+ | **Step** | — |
19
+ | **Branch** | — |
20
+ | **Complexity** | — |
21
+ | **Ticket** | — |
22
+
23
+ **Context:** _No active work._
24
+
25
+ **Next Actions:**
26
+ 1. —
27
+
28
+ **Open Questions:** _None._
29
+
30
+ **Auto-Approved Decisions (this session):**
31
+
32
+ | Step | Decision | Rationale |
33
+ |------|----------|-----------|
34
+ | — | — | — |
35
+
36
+ ---
37
+
38
+ ## Tasks
39
+
40
+ ### Backend
41
+
42
+ | # | Task | Status | Notes |
43
+ |---|------|--------|-------|
44
+ | B0.1 | [Task description] | ⬚ | |
45
+
46
+ ### Frontend
47
+
48
+ | # | Task | Status | Notes |
49
+ |---|------|--------|-------|
50
+ | F0.1 | [Task description] | ⬚ | |
51
+
52
+ **Status Legend:** ⬚ Pending | 🔄 In Progress | ✅ Complete | ⏸️ Blocked | ❌ Cancelled
53
+
54
+ ---
55
+
56
+ ## Completion Log
57
+
58
+ | Date | Task | Commit | Notes |
59
+ |------|------|--------|-------|
60
+ | | | | |
61
+
62
+ ---
63
+
64
+ ## Sprint Notes
65
+
66
+ - Sprint initialized. Replace tasks above with your actual Sprint 0 backlog.
@@ -0,0 +1,114 @@
1
+ openapi: 3.0.3
2
+ info:
3
+ title: Project API
4
+ description: |
5
+ API specification for the project.
6
+ Update this file BEFORE implementing new endpoints.
7
+ version: 0.1.0
8
+
9
+ servers:
10
+ - url: http://localhost:3010/api
11
+ description: Local development
12
+
13
+ # CONFIG: Add your API paths below
14
+
15
+ paths:
16
+ /health:
17
+ get:
18
+ summary: Health check
19
+ operationId: healthCheck
20
+ tags:
21
+ - System
22
+ responses:
23
+ '200':
24
+ description: Service is healthy
25
+ content:
26
+ application/json:
27
+ schema:
28
+ type: object
29
+ properties:
30
+ status:
31
+ type: string
32
+ example: ok
33
+ timestamp:
34
+ type: string
35
+ format: date-time
36
+
37
+ components:
38
+ schemas:
39
+ # CONFIG: Add your schemas below
40
+
41
+ ErrorResponse:
42
+ type: object
43
+ required:
44
+ - success
45
+ - error
46
+ properties:
47
+ success:
48
+ type: boolean
49
+ example: false
50
+ error:
51
+ type: object
52
+ required:
53
+ - message
54
+ - code
55
+ properties:
56
+ message:
57
+ type: string
58
+ code:
59
+ type: string
60
+ details:
61
+ type: array
62
+ items:
63
+ type: object
64
+
65
+ SuccessResponse:
66
+ type: object
67
+ required:
68
+ - success
69
+ - data
70
+ properties:
71
+ success:
72
+ type: boolean
73
+ example: true
74
+ data:
75
+ type: object
76
+ message:
77
+ type: string
78
+
79
+ PaginatedResponse:
80
+ type: object
81
+ required:
82
+ - success
83
+ - data
84
+ - pagination
85
+ properties:
86
+ success:
87
+ type: boolean
88
+ example: true
89
+ data:
90
+ type: array
91
+ items:
92
+ type: object
93
+ pagination:
94
+ type: object
95
+ required:
96
+ - page
97
+ - pageSize
98
+ - totalItems
99
+ - totalPages
100
+ properties:
101
+ page:
102
+ type: integer
103
+ pageSize:
104
+ type: integer
105
+ totalItems:
106
+ type: integer
107
+ totalPages:
108
+ type: integer
109
+
110
+ securitySchemes:
111
+ BearerAuth:
112
+ type: http
113
+ scheme: bearer
114
+ bearerFormat: JWT
@@ -0,0 +1,77 @@
1
+ # UI Component Specification
2
+
3
+ Define component hierarchies, props, state, and interactions BEFORE implementing.
4
+
5
+ <!-- CONFIG: Adjust component library references to match your stack -->
6
+
7
+ ## Format
8
+
9
+ For each component, specify:
10
+
11
+ ```markdown
12
+ ### ComponentName
13
+
14
+ **Type**: Page | Layout | Feature | Primitive
15
+ **Client**: Yes/No (needs 'use client')
16
+
17
+ **Props:**
18
+ | Prop | Type | Required | Default | Description |
19
+ |------|------|----------|---------|-------------|
20
+ | name | string | Yes | — | User display name |
21
+
22
+ **State:**
23
+ - `isLoading: boolean` — Loading state for async operations
24
+ - `error: string | null` — Error message
25
+
26
+ **Interactions:**
27
+ - Click submit → calls `onSubmit(formData)`
28
+ - Form validation → on blur + on submit
29
+
30
+ **Loading/Error/Empty States:**
31
+ - Loading: Skeleton placeholder
32
+ - Error: Alert with retry button
33
+ - Empty: Message with CTA
34
+ ```
35
+
36
+ ---
37
+
38
+ ## Component Hierarchy
39
+
40
+ <!-- Add your component tree here as you design the UI -->
41
+
42
+ ```
43
+ App
44
+ ├── Layout
45
+ │ ├── Header
46
+ │ │ ├── Logo
47
+ │ │ └── Navigation
48
+ │ ├── Main (page content)
49
+ │ └── Footer
50
+ └── Pages
51
+ └── [Define pages as you plan them]
52
+ ```
53
+
54
+ ---
55
+
56
+ ## Shared UI Primitives
57
+
58
+ List the primitive components available in your project (e.g., from shadcn/ui):
59
+
60
+ - **Button** — Primary, secondary, outline, ghost variants
61
+ - **Input** — Text input with label and error state
62
+ - **Card** — Container with header, content, footer
63
+ - **Dialog** — Modal overlay
64
+ - **Table** — Data table with sorting and pagination
65
+ - **Select** — Dropdown selection
66
+ - **Badge** — Status indicators
67
+ - **Alert** — Feedback messages (success, error, warning, info)
68
+
69
+ ---
70
+
71
+ ## Pages
72
+
73
+ <!-- Define each page's component composition as you design them -->
74
+
75
+ ---
76
+
77
+ *Update this file BEFORE implementing new components or pages.*
File without changes