aiblueprint-cli 1.4.11 → 1.4.13
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-code-config/scripts/.claude/commands/fix-on-my-computer.md +87 -0
- package/claude-code-config/scripts/command-validator/CLAUDE.md +112 -0
- package/claude-code-config/scripts/command-validator/src/__tests__/validator.test.ts +62 -111
- package/claude-code-config/scripts/command-validator/src/cli.ts +5 -3
- package/claude-code-config/scripts/command-validator/src/lib/security-rules.ts +3 -4
- package/claude-code-config/scripts/command-validator/src/lib/types.ts +1 -0
- package/claude-code-config/scripts/command-validator/src/lib/validator.ts +47 -317
- package/claude-code-config/scripts/statusline/CLAUDE.md +29 -7
- package/claude-code-config/scripts/statusline/README.md +89 -1
- package/claude-code-config/scripts/statusline/defaults.json +75 -0
- package/claude-code-config/scripts/statusline/src/index.ts +101 -24
- package/claude-code-config/scripts/statusline/src/lib/config-types.ts +100 -0
- package/claude-code-config/scripts/statusline/src/lib/config.ts +21 -0
- package/claude-code-config/scripts/statusline/src/lib/context.ts +32 -11
- package/claude-code-config/scripts/statusline/src/lib/formatters.ts +360 -22
- package/claude-code-config/scripts/statusline/src/lib/git.ts +100 -0
- package/claude-code-config/scripts/statusline/src/lib/render-pure.ts +177 -0
- package/claude-code-config/scripts/statusline/src/lib/types.ts +11 -0
- package/claude-code-config/scripts/statusline/statusline.config.json +93 -0
- package/claude-code-config/skills/claude-memory/SKILL.md +689 -0
- package/claude-code-config/skills/claude-memory/references/comprehensive-example.md +175 -0
- package/claude-code-config/skills/claude-memory/references/project-patterns.md +334 -0
- package/claude-code-config/skills/claude-memory/references/prompting-techniques.md +411 -0
- package/claude-code-config/skills/claude-memory/references/section-templates.md +347 -0
- package/claude-code-config/skills/create-slash-commands/SKILL.md +1110 -0
- package/claude-code-config/skills/create-slash-commands/references/arguments.md +273 -0
- package/claude-code-config/skills/create-slash-commands/references/patterns.md +947 -0
- package/claude-code-config/skills/create-slash-commands/references/prompt-examples.md +656 -0
- package/claude-code-config/skills/create-slash-commands/references/tool-restrictions.md +389 -0
- package/claude-code-config/skills/create-subagents/SKILL.md +425 -0
- package/claude-code-config/skills/create-subagents/references/context-management.md +567 -0
- package/claude-code-config/skills/create-subagents/references/debugging-agents.md +714 -0
- package/claude-code-config/skills/create-subagents/references/error-handling-and-recovery.md +502 -0
- package/claude-code-config/skills/create-subagents/references/evaluation-and-testing.md +374 -0
- package/claude-code-config/skills/create-subagents/references/orchestration-patterns.md +591 -0
- package/claude-code-config/skills/create-subagents/references/subagents.md +599 -0
- package/claude-code-config/skills/create-subagents/references/writing-subagent-prompts.md +513 -0
- package/dist/cli.js +20 -3
- package/package.json +1 -1
- package/claude-code-config/commands/apex.md +0 -109
- package/claude-code-config/commands/tasks/run-task.md +0 -220
- package/claude-code-config/commands/utils/watch-ci.md +0 -47
- package/claude-code-config/scripts/command-validator/biome.json +0 -29
- package/claude-code-config/scripts/command-validator/bun.lockb +0 -0
- package/claude-code-config/scripts/command-validator/package.json +0 -27
- package/claude-code-config/scripts/command-validator/vitest.config.ts +0 -7
- package/claude-code-config/scripts/hook-post-file.ts +0 -162
- package/claude-code-config/scripts/statusline/biome.json +0 -34
- package/claude-code-config/scripts/statusline/bun.lockb +0 -0
- package/claude-code-config/scripts/statusline/fixtures/test-input.json +0 -25
- package/claude-code-config/scripts/statusline/package.json +0 -19
- package/claude-code-config/scripts/statusline/statusline.config.ts +0 -25
- package/claude-code-config/scripts/statusline/test.ts +0 -20
- package/claude-code-config/scripts/validate-command.js +0 -712
- package/claude-code-config/scripts/validate-command.readme.md +0 -283
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
<comprehensive_example>
|
|
2
|
+
This is a full-featured CLAUDE.md example for a production SaaS application. Use as inspiration, adapting to your specific project.
|
|
3
|
+
|
|
4
|
+
```markdown
|
|
5
|
+
# Thumbnail.io - AI Thumbnail Generator
|
|
6
|
+
|
|
7
|
+
## About
|
|
8
|
+
AI-powered YouTube thumbnail generator SaaS. Users create thumbnails via text prompts, reference persons, and inspiration images.
|
|
9
|
+
|
|
10
|
+
## Tech Stack
|
|
11
|
+
- **Framework**: Next.js 15 with App Router
|
|
12
|
+
- **Language**: TypeScript (strict mode)
|
|
13
|
+
- **Styling**: TailwindCSS v4 + shadcn/ui
|
|
14
|
+
- **Database**: PostgreSQL with Prisma ORM
|
|
15
|
+
- **Auth**: Better Auth with organization support
|
|
16
|
+
- **Email**: React Email with Resend
|
|
17
|
+
- **Payments**: Stripe (subscriptions + credits)
|
|
18
|
+
- **Testing**: Vitest (unit), Playwright (e2e)
|
|
19
|
+
- **Package Manager**: pnpm
|
|
20
|
+
|
|
21
|
+
## Directory Structure
|
|
22
|
+
```
|
|
23
|
+
app/ # Next.js App Router pages
|
|
24
|
+
src/
|
|
25
|
+
├── components/ # UI components (shadcn in ui/, custom in nowts/)
|
|
26
|
+
├── features/ # Feature modules with actions, queries, schemas
|
|
27
|
+
├── lib/ # Utilities and configurations
|
|
28
|
+
├── hooks/ # Custom React hooks
|
|
29
|
+
emails/ # React Email templates
|
|
30
|
+
prisma/ # Database schema and migrations
|
|
31
|
+
e2e/ # End-to-end tests
|
|
32
|
+
__tests__/ # Unit tests
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Key Features
|
|
36
|
+
- **Editor**: `@/features/editor/` - Main thumbnail generation
|
|
37
|
+
- **Persons**: `@/features/person/` - Reference person management
|
|
38
|
+
- **Credits**: `@/features/credits/` - Usage-based credit system
|
|
39
|
+
- **Forms**: `@/features/form/tanstack-form.tsx` - TanStack Form setup
|
|
40
|
+
|
|
41
|
+
## Commands
|
|
42
|
+
|
|
43
|
+
### Development
|
|
44
|
+
- `pnpm dev` - Start development server with Turbopack
|
|
45
|
+
- `pnpm build` - Build application
|
|
46
|
+
- `pnpm ts` - TypeScript type checking
|
|
47
|
+
- `pnpm lint` - ESLint with auto-fix
|
|
48
|
+
- `pnpm clean` - Lint + type check + format
|
|
49
|
+
|
|
50
|
+
### Testing
|
|
51
|
+
**CRITICAL - Always use CI commands:**
|
|
52
|
+
- `pnpm test:ci` - Unit tests (non-interactive)
|
|
53
|
+
- `pnpm test:e2e:ci` - E2E tests (headless)
|
|
54
|
+
|
|
55
|
+
**NEVER use interactive commands:**
|
|
56
|
+
- ~~`pnpm test`~~ - Interactive mode breaks Claude Code
|
|
57
|
+
- ~~`pnpm test:e2e`~~ - Interactive mode breaks Claude Code
|
|
58
|
+
|
|
59
|
+
### Database
|
|
60
|
+
- `pnpm prisma:seed` - Seed database
|
|
61
|
+
- `pnpm better-auth:migrate` - Generate auth schema
|
|
62
|
+
|
|
63
|
+
## Code Conventions
|
|
64
|
+
|
|
65
|
+
### TypeScript
|
|
66
|
+
- Use `type` over `interface` (enforced by ESLint)
|
|
67
|
+
- No enums - use maps instead
|
|
68
|
+
- Strict mode - no `any` types
|
|
69
|
+
- Prefer `??` over `||`
|
|
70
|
+
|
|
71
|
+
### React/Next.js
|
|
72
|
+
- Prefer Server Components over Client Components
|
|
73
|
+
- Use `"use client"` only for Web API access
|
|
74
|
+
- Wrap client components in `Suspense` with fallback
|
|
75
|
+
- **ALWAYS** use `PageProps<"/route/path">` for page components
|
|
76
|
+
|
|
77
|
+
### Forms
|
|
78
|
+
**CRITICAL - Use TanStack Form for ALL forms:**
|
|
79
|
+
|
|
80
|
+
```tsx
|
|
81
|
+
import { Form, useForm } from "@/features/form/tanstack-form";
|
|
82
|
+
|
|
83
|
+
const form = useForm({
|
|
84
|
+
schema: MySchema,
|
|
85
|
+
defaultValues: { field: "" },
|
|
86
|
+
onSubmit: async (values) => { /* handle */ },
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
return (
|
|
90
|
+
<Form form={form}>
|
|
91
|
+
<form.AppField name="field">
|
|
92
|
+
{(field) => (
|
|
93
|
+
<field.Field>
|
|
94
|
+
<field.Label>Label</field.Label>
|
|
95
|
+
<field.Content>
|
|
96
|
+
<field.Input placeholder="..." />
|
|
97
|
+
<field.Message />
|
|
98
|
+
</field.Content>
|
|
99
|
+
</field.Field>
|
|
100
|
+
)}
|
|
101
|
+
</form.AppField>
|
|
102
|
+
<form.SubmitButton>Submit</form.SubmitButton>
|
|
103
|
+
</Form>
|
|
104
|
+
);
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**NEVER use React Hook Form directly.**
|
|
108
|
+
|
|
109
|
+
### Server Actions
|
|
110
|
+
- Suffix files with `.action.ts`
|
|
111
|
+
- Use `@src/lib/actions/safe-actions.ts` for all actions
|
|
112
|
+
- Use `resolveActionResult` helper for mutations
|
|
113
|
+
|
|
114
|
+
### API Routes
|
|
115
|
+
- All routes in `/app/api` MUST use `@src/lib/zod-route.ts`
|
|
116
|
+
- All HTTP requests MUST use `@src/lib/up-fetch.ts` (never raw `fetch`)
|
|
117
|
+
|
|
118
|
+
### Authentication
|
|
119
|
+
- Server: `getUser()` (optional) or `getRequiredUser()` (required)
|
|
120
|
+
- Client: `useSession()` from auth-client.ts
|
|
121
|
+
- Organization: `getCurrentOrgCache()`
|
|
122
|
+
|
|
123
|
+
## Styling Preferences
|
|
124
|
+
- Use typography components from `@src/components/ui/typography.tsx`
|
|
125
|
+
- Prefer `flex flex-col gap-4` over `space-y-4`
|
|
126
|
+
- Use Card component from `@src/components/ui/card.tsx`
|
|
127
|
+
- Never use emojis (prefer Lucide icons)
|
|
128
|
+
- Never use gradients unless explicitly requested
|
|
129
|
+
|
|
130
|
+
## TypeScript Imports
|
|
131
|
+
- `@/*` → `@src`
|
|
132
|
+
- `@email/*` → `@emails`
|
|
133
|
+
- `@app/*` → `@app`
|
|
134
|
+
|
|
135
|
+
## Workflow
|
|
136
|
+
|
|
137
|
+
### Before Editing Files
|
|
138
|
+
🚨 **CRITICAL** 🚨
|
|
139
|
+
**Read at least 3 files** before editing:
|
|
140
|
+
1. Similar files (understand patterns)
|
|
141
|
+
2. Imported dependencies (understand APIs)
|
|
142
|
+
|
|
143
|
+
### Debugging
|
|
144
|
+
- Add logs at each step
|
|
145
|
+
- Ask user to send logs for debugging
|
|
146
|
+
|
|
147
|
+
## Important Files
|
|
148
|
+
- `src/lib/auth.ts` - Auth configuration
|
|
149
|
+
- `src/features/dialog-manager/` - Global dialog system
|
|
150
|
+
- `src/features/form/tanstack-form.tsx` - Form setup (**CRITICAL**)
|
|
151
|
+
- `src/lib/actions/safe-actions.ts` - Server action utilities
|
|
152
|
+
- `src/lib/zod-route.ts` - API route utilities
|
|
153
|
+
- `src/site-config.ts` - Site configuration
|
|
154
|
+
|
|
155
|
+
## Database
|
|
156
|
+
- Main schema: `prisma/schema/schema.prisma`
|
|
157
|
+
- Auth schema: `prisma/schema/better-auth.prisma` (auto-generated)
|
|
158
|
+
- All queries must include `tenant_id` for multi-tenant support
|
|
159
|
+
```
|
|
160
|
+
</comprehensive_example>
|
|
161
|
+
|
|
162
|
+
<usage_notes>
|
|
163
|
+
This example demonstrates:
|
|
164
|
+
|
|
165
|
+
- Clear tech stack documentation
|
|
166
|
+
- Directory structure visualization
|
|
167
|
+
- Critical command distinctions (CI vs interactive)
|
|
168
|
+
- Specific code patterns with examples
|
|
169
|
+
- Emphasis on critical rules
|
|
170
|
+
- File location references
|
|
171
|
+
- Workflow requirements
|
|
172
|
+
- Import path conventions
|
|
173
|
+
|
|
174
|
+
Adapt sections to match your project's actual structure and conventions.
|
|
175
|
+
</usage_notes>
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
<project_patterns>
|
|
2
|
+
CLAUDE.md patterns optimized for specific project types.
|
|
3
|
+
|
|
4
|
+
<nextjs_app_router>
|
|
5
|
+
```markdown
|
|
6
|
+
# [Project Name] - Next.js App Router
|
|
7
|
+
|
|
8
|
+
## Tech Stack
|
|
9
|
+
- Next.js 15 with App Router
|
|
10
|
+
- TypeScript (strict mode)
|
|
11
|
+
- TailwindCSS + shadcn/ui
|
|
12
|
+
- [Database solution]
|
|
13
|
+
|
|
14
|
+
## Commands
|
|
15
|
+
- `pnpm dev` - Start dev server
|
|
16
|
+
- `pnpm build` - Production build
|
|
17
|
+
- `pnpm lint` - Check code
|
|
18
|
+
- `pnpm test:ci` - Run tests
|
|
19
|
+
|
|
20
|
+
## Directory Structure
|
|
21
|
+
```
|
|
22
|
+
app/
|
|
23
|
+
├── (auth)/ # Auth routes
|
|
24
|
+
├── (dashboard)/ # Dashboard routes
|
|
25
|
+
├── api/ # API routes
|
|
26
|
+
└── layout.tsx # Root layout
|
|
27
|
+
src/
|
|
28
|
+
├── components/ # UI components
|
|
29
|
+
├── lib/ # Utilities
|
|
30
|
+
└── hooks/ # React hooks
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Conventions
|
|
34
|
+
|
|
35
|
+
### Components
|
|
36
|
+
- Prefer Server Components
|
|
37
|
+
- Use `"use client"` only for interactivity
|
|
38
|
+
- Keep components under 300 lines
|
|
39
|
+
|
|
40
|
+
### Data Fetching
|
|
41
|
+
- Server Components: Direct database access
|
|
42
|
+
- Client Components: TanStack Query
|
|
43
|
+
- Mutations: Server Actions
|
|
44
|
+
|
|
45
|
+
### File Naming
|
|
46
|
+
- `page.tsx` - Route pages
|
|
47
|
+
- `layout.tsx` - Layouts
|
|
48
|
+
- `loading.tsx` - Loading states
|
|
49
|
+
- `error.tsx` - Error boundaries
|
|
50
|
+
|
|
51
|
+
## Important
|
|
52
|
+
- **NEVER** use `use client` for data fetching
|
|
53
|
+
- Always add `loading.tsx` for async pages
|
|
54
|
+
- Use `generateMetadata` for SEO
|
|
55
|
+
```
|
|
56
|
+
</nextjs_app_router>
|
|
57
|
+
|
|
58
|
+
<nextjs_pages_router>
|
|
59
|
+
```markdown
|
|
60
|
+
# [Project Name] - Next.js Pages Router
|
|
61
|
+
|
|
62
|
+
## Tech Stack
|
|
63
|
+
- Next.js 14 with Pages Router
|
|
64
|
+
- TypeScript
|
|
65
|
+
- TailwindCSS
|
|
66
|
+
|
|
67
|
+
## Commands
|
|
68
|
+
- `pnpm dev` - Development
|
|
69
|
+
- `pnpm build` - Production build
|
|
70
|
+
- `pnpm test` - Run tests
|
|
71
|
+
|
|
72
|
+
## Directory Structure
|
|
73
|
+
```
|
|
74
|
+
pages/
|
|
75
|
+
├── api/ # API routes
|
|
76
|
+
├── _app.tsx # App wrapper
|
|
77
|
+
├── _document.tsx # Document
|
|
78
|
+
└── index.tsx # Home page
|
|
79
|
+
src/
|
|
80
|
+
├── components/ # Components
|
|
81
|
+
├── lib/ # Utilities
|
|
82
|
+
└── hooks/ # Hooks
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Data Fetching
|
|
86
|
+
- `getServerSideProps` - SSR data
|
|
87
|
+
- `getStaticProps` - SSG data
|
|
88
|
+
- `useSWR` or TanStack Query - Client data
|
|
89
|
+
|
|
90
|
+
## API Routes
|
|
91
|
+
- Located in `pages/api/`
|
|
92
|
+
- Use `NextApiRequest` and `NextApiResponse` types
|
|
93
|
+
```
|
|
94
|
+
</nextjs_pages_router>
|
|
95
|
+
|
|
96
|
+
<react_vite>
|
|
97
|
+
```markdown
|
|
98
|
+
# [Project Name] - React + Vite
|
|
99
|
+
|
|
100
|
+
## Tech Stack
|
|
101
|
+
- React 18 + TypeScript
|
|
102
|
+
- Vite for bundling
|
|
103
|
+
- TailwindCSS
|
|
104
|
+
- TanStack Query
|
|
105
|
+
|
|
106
|
+
## Commands
|
|
107
|
+
- `pnpm dev` - Start dev server
|
|
108
|
+
- `pnpm build` - Production build
|
|
109
|
+
- `pnpm preview` - Preview build
|
|
110
|
+
- `pnpm test` - Run tests
|
|
111
|
+
|
|
112
|
+
## Directory Structure
|
|
113
|
+
```
|
|
114
|
+
src/
|
|
115
|
+
├── components/ # UI components
|
|
116
|
+
├── features/ # Feature modules
|
|
117
|
+
├── hooks/ # Custom hooks
|
|
118
|
+
├── lib/ # Utilities
|
|
119
|
+
├── routes/ # Route components
|
|
120
|
+
└── main.tsx # Entry point
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Conventions
|
|
124
|
+
- Functional components only
|
|
125
|
+
- Custom hooks for logic reuse
|
|
126
|
+
- TanStack Query for server state
|
|
127
|
+
- Zustand for client state
|
|
128
|
+
```
|
|
129
|
+
</react_vite>
|
|
130
|
+
|
|
131
|
+
<node_express>
|
|
132
|
+
```markdown
|
|
133
|
+
# [Project Name] - Node.js API
|
|
134
|
+
|
|
135
|
+
## Tech Stack
|
|
136
|
+
- Node.js + Express
|
|
137
|
+
- TypeScript
|
|
138
|
+
- PostgreSQL + Prisma
|
|
139
|
+
- Jest for testing
|
|
140
|
+
|
|
141
|
+
## Commands
|
|
142
|
+
- `pnpm dev` - Start with hot reload
|
|
143
|
+
- `pnpm build` - Compile TypeScript
|
|
144
|
+
- `pnpm start` - Start production
|
|
145
|
+
- `pnpm test` - Run tests
|
|
146
|
+
|
|
147
|
+
## Directory Structure
|
|
148
|
+
```
|
|
149
|
+
src/
|
|
150
|
+
├── controllers/ # Route handlers
|
|
151
|
+
├── middleware/ # Express middleware
|
|
152
|
+
├── models/ # Data models
|
|
153
|
+
├── routes/ # Route definitions
|
|
154
|
+
├── services/ # Business logic
|
|
155
|
+
├── utils/ # Helpers
|
|
156
|
+
└── index.ts # Entry point
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Conventions
|
|
160
|
+
- Controllers handle HTTP only
|
|
161
|
+
- Services contain business logic
|
|
162
|
+
- Middleware for cross-cutting concerns
|
|
163
|
+
- Always validate input with Zod
|
|
164
|
+
|
|
165
|
+
## Error Handling
|
|
166
|
+
- Use custom error classes
|
|
167
|
+
- Central error middleware
|
|
168
|
+
- Always return consistent error format
|
|
169
|
+
```
|
|
170
|
+
</node_express>
|
|
171
|
+
|
|
172
|
+
<python_fastapi>
|
|
173
|
+
```markdown
|
|
174
|
+
# [Project Name] - Python FastAPI
|
|
175
|
+
|
|
176
|
+
## Tech Stack
|
|
177
|
+
- Python 3.11+
|
|
178
|
+
- FastAPI
|
|
179
|
+
- SQLAlchemy + PostgreSQL
|
|
180
|
+
- Pytest
|
|
181
|
+
|
|
182
|
+
## Commands
|
|
183
|
+
- `uvicorn main:app --reload` - Development
|
|
184
|
+
- `pytest` - Run tests
|
|
185
|
+
- `ruff check .` - Lint
|
|
186
|
+
- `ruff format .` - Format
|
|
187
|
+
|
|
188
|
+
## Directory Structure
|
|
189
|
+
```
|
|
190
|
+
app/
|
|
191
|
+
├── api/ # Route handlers
|
|
192
|
+
├── core/ # Config, security
|
|
193
|
+
├── db/ # Database models
|
|
194
|
+
├── schemas/ # Pydantic models
|
|
195
|
+
├── services/ # Business logic
|
|
196
|
+
└── main.py # Entry point
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
## Conventions
|
|
200
|
+
- Pydantic for validation
|
|
201
|
+
- Dependency injection for services
|
|
202
|
+
- Async where beneficial
|
|
203
|
+
- Type hints everywhere
|
|
204
|
+
```
|
|
205
|
+
</python_fastapi>
|
|
206
|
+
|
|
207
|
+
<monorepo_turborepo>
|
|
208
|
+
```markdown
|
|
209
|
+
# [Project Name] - Turborepo Monorepo
|
|
210
|
+
|
|
211
|
+
## Tech Stack
|
|
212
|
+
- Turborepo for build orchestration
|
|
213
|
+
- pnpm workspaces
|
|
214
|
+
- TypeScript
|
|
215
|
+
|
|
216
|
+
## Commands
|
|
217
|
+
- `pnpm install` - Install all deps
|
|
218
|
+
- `pnpm dev` - Start all apps
|
|
219
|
+
- `pnpm build` - Build all packages
|
|
220
|
+
- `pnpm test` - Test all packages
|
|
221
|
+
- `pnpm --filter web dev` - Start specific app
|
|
222
|
+
|
|
223
|
+
## Directory Structure
|
|
224
|
+
```
|
|
225
|
+
apps/
|
|
226
|
+
├── web/ # Main frontend
|
|
227
|
+
├── api/ # Backend API
|
|
228
|
+
└── admin/ # Admin panel
|
|
229
|
+
packages/
|
|
230
|
+
├── ui/ # Shared components
|
|
231
|
+
├── config/ # Shared config
|
|
232
|
+
├── types/ # Shared types
|
|
233
|
+
└── utils/ # Shared utilities
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
## Package Development
|
|
237
|
+
- Changes to `packages/*` require rebuild
|
|
238
|
+
- Use `pnpm --filter` for targeted commands
|
|
239
|
+
- Shared types in `packages/types`
|
|
240
|
+
|
|
241
|
+
## Conventions
|
|
242
|
+
- Each app has its own CLAUDE.md
|
|
243
|
+
- Root CLAUDE.md for universal rules
|
|
244
|
+
- Keep packages focused and minimal
|
|
245
|
+
```
|
|
246
|
+
</monorepo_turborepo>
|
|
247
|
+
|
|
248
|
+
<cli_tool>
|
|
249
|
+
```markdown
|
|
250
|
+
# [Tool Name] - CLI Tool
|
|
251
|
+
|
|
252
|
+
## Tech Stack
|
|
253
|
+
- TypeScript
|
|
254
|
+
- Commander.js for CLI
|
|
255
|
+
- Chalk for colors
|
|
256
|
+
|
|
257
|
+
## Commands
|
|
258
|
+
- `pnpm dev` - Watch mode
|
|
259
|
+
- `pnpm build` - Compile
|
|
260
|
+
- `pnpm link` - Link globally
|
|
261
|
+
- `[tool-name] --help` - Show help
|
|
262
|
+
|
|
263
|
+
## Directory Structure
|
|
264
|
+
```
|
|
265
|
+
src/
|
|
266
|
+
├── commands/ # CLI commands
|
|
267
|
+
├── lib/ # Core logic
|
|
268
|
+
├── utils/ # Helpers
|
|
269
|
+
└── index.ts # Entry point
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
## Adding Commands
|
|
273
|
+
1. Create command in `src/commands/`
|
|
274
|
+
2. Register in `src/index.ts`
|
|
275
|
+
3. Add tests in `__tests__/`
|
|
276
|
+
|
|
277
|
+
## Output Conventions
|
|
278
|
+
- Use chalk for colors
|
|
279
|
+
- Errors to stderr
|
|
280
|
+
- Progress with ora spinners
|
|
281
|
+
```
|
|
282
|
+
</cli_tool>
|
|
283
|
+
|
|
284
|
+
<library_package>
|
|
285
|
+
```markdown
|
|
286
|
+
# [Library Name] - npm Package
|
|
287
|
+
|
|
288
|
+
## Tech Stack
|
|
289
|
+
- TypeScript
|
|
290
|
+
- tsup for bundling
|
|
291
|
+
- Vitest for testing
|
|
292
|
+
|
|
293
|
+
## Commands
|
|
294
|
+
- `pnpm build` - Build package
|
|
295
|
+
- `pnpm test` - Run tests
|
|
296
|
+
- `pnpm dev` - Watch mode
|
|
297
|
+
- `pnpm publish` - Publish to npm
|
|
298
|
+
|
|
299
|
+
## Directory Structure
|
|
300
|
+
```
|
|
301
|
+
src/
|
|
302
|
+
├── index.ts # Main exports
|
|
303
|
+
├── utils/ # Internal helpers
|
|
304
|
+
└── types.ts # Type definitions
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
## Publishing Checklist
|
|
308
|
+
1. Update version in package.json
|
|
309
|
+
2. Run tests: `pnpm test`
|
|
310
|
+
3. Build: `pnpm build`
|
|
311
|
+
4. Publish: `pnpm publish`
|
|
312
|
+
|
|
313
|
+
## Conventions
|
|
314
|
+
- Export types alongside functions
|
|
315
|
+
- Document with JSDoc
|
|
316
|
+
- Maintain backwards compatibility
|
|
317
|
+
```
|
|
318
|
+
</library_package>
|
|
319
|
+
</project_patterns>
|
|
320
|
+
|
|
321
|
+
<customization_notes>
|
|
322
|
+
<adapt_sections>
|
|
323
|
+
Each pattern is a starting point. Adapt by:
|
|
324
|
+
|
|
325
|
+
1. Removing irrelevant sections
|
|
326
|
+
2. Adding project-specific conventions
|
|
327
|
+
3. Adjusting commands for your setup
|
|
328
|
+
4. Including critical architectural decisions
|
|
329
|
+
</adapt_sections>
|
|
330
|
+
|
|
331
|
+
<keep_minimal>
|
|
332
|
+
Even for complex projects, aim for under 150 lines. Move detailed documentation to separate files and link from CLAUDE.md.
|
|
333
|
+
</keep_minimal>
|
|
334
|
+
</customization_notes>
|