ai-forge-cli 0.3.0 → 0.3.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.
|
@@ -76,11 +76,11 @@ var add_feature_default = defineCommand({
|
|
|
76
76
|
// Route files
|
|
77
77
|
{
|
|
78
78
|
templatePath: "feature/routes/index.tsx.hbs",
|
|
79
|
-
destPath: join(cwd, "
|
|
79
|
+
destPath: join(cwd, "src/routes", name, "index.tsx")
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
templatePath: "feature/routes/$id.tsx.hbs",
|
|
83
|
-
destPath: join(cwd, "
|
|
83
|
+
destPath: join(cwd, "src/routes", name, "$id.tsx")
|
|
84
84
|
}
|
|
85
85
|
];
|
|
86
86
|
for (const file of files) {
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,7 @@ var main = defineCommand({
|
|
|
20
20
|
},
|
|
21
21
|
subCommands: {
|
|
22
22
|
init: () => import("./init-OYJP5QCZ.js").then((m) => m.default),
|
|
23
|
-
"add:feature": () => import("./add-feature-
|
|
23
|
+
"add:feature": () => import("./add-feature-MU65GMUK.js").then((m) => m.default),
|
|
24
24
|
check: () => import("./check-B4VHLFHH.js").then((m) => m.default),
|
|
25
25
|
version: () => import("./version-VO3LHLDO.js").then((m) => m.default)
|
|
26
26
|
},
|
|
@@ -1,93 +1,51 @@
|
|
|
1
1
|
# CLAUDE.md
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Stack
|
|
4
|
+
TanStack Start + Convex + Tailwind v4 + shadcn/ui + Biome
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
## IMPORTANT: Use Forge CLI for Features
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
## Trigger Words → Action
|
|
12
|
-
|
|
13
|
-
| User says | You run |
|
|
14
|
-
|-----------|---------|
|
|
15
|
-
| "add feature", "create feature", "build feature" | `forge add:feature <name>` |
|
|
16
|
-
| "add X with Y" (any domain entity) | `forge add:feature <name>` |
|
|
17
|
-
| "new page for X" | `forge add:feature <name>` |
|
|
18
|
-
| "build X functionality" | `forge add:feature <name>` |
|
|
19
|
-
|
|
20
|
-
## File Creation Rules
|
|
21
|
-
|
|
22
|
-
DO NOT create these files manually:
|
|
23
|
-
- `src/features/**/*` (forge creates the structure)
|
|
24
|
-
- `convex/features/**/*` (forge creates the structure)
|
|
25
|
-
- `app/routes/<feature>/**/*` (forge creates the structure)
|
|
26
|
-
|
|
27
|
-
ONLY the forge CLI creates these. You fill them in after.
|
|
28
|
-
|
|
29
|
-
## What You CAN Create Manually
|
|
30
|
-
|
|
31
|
-
- Files inside existing feature component folders (after forge created them)
|
|
32
|
-
- `src/components/*` (shared UI)
|
|
33
|
-
- `src/lib/*` (utilities)
|
|
34
|
-
- `src/hooks/*` (global hooks)
|
|
8
|
+
BEFORE building any feature, YOU MUST run:
|
|
9
|
+
```bash
|
|
10
|
+
forge add:feature <name>
|
|
11
|
+
```
|
|
35
12
|
|
|
36
|
-
|
|
13
|
+
This scaffolds the complete vertical slice:
|
|
14
|
+
- `src/features/<name>/` (components, hooks)
|
|
15
|
+
- `convex/features/<name>/` (schema, queries, mutations)
|
|
16
|
+
- `src/routes/<name>/` (route pages)
|
|
37
17
|
|
|
38
|
-
|
|
18
|
+
NEVER create these paths manually. Edit the scaffolded files instead.
|
|
39
19
|
|
|
40
|
-
|
|
41
|
-
```
|
|
42
|
-
Run: forge add:feature comments
|
|
43
|
-
Edit: convex/features/comments/schema.ts (add fields for comments + replies)
|
|
44
|
-
Edit: convex/features/comments/queries.ts (add queries)
|
|
45
|
-
Edit: convex/features/comments/mutations.ts (add mutations)
|
|
46
|
-
Edit: src/features/comments/hooks.ts (add/modify hooks)
|
|
47
|
-
Create: src/features/comments/components/CommentCard.tsx
|
|
48
|
-
Create: src/features/comments/components/CommentList.tsx
|
|
49
|
-
Create: src/features/comments/components/ReplyForm.tsx
|
|
50
|
-
Update: src/features/comments/components/index.ts (add exports)
|
|
51
|
-
Edit: app/routes/comments/index.tsx (wire up components)
|
|
52
|
-
```
|
|
20
|
+
The ONLY route you may create directly is `src/routes/index.tsx` (homepage).
|
|
53
21
|
|
|
54
|
-
##
|
|
22
|
+
## Commands
|
|
55
23
|
|
|
56
|
-
Before finishing ANY task, run:
|
|
57
24
|
```bash
|
|
58
|
-
|
|
25
|
+
pnpm dev # Start dev server
|
|
26
|
+
npx convex dev # Start Convex backend
|
|
27
|
+
pnpm lint # Check with Biome
|
|
28
|
+
forge check # Validate architecture (run before finishing)
|
|
59
29
|
```
|
|
60
|
-
If it fails, fix ALL issues before responding to the user.
|
|
61
30
|
|
|
62
|
-
##
|
|
31
|
+
## Architecture
|
|
63
32
|
|
|
64
33
|
```
|
|
65
|
-
|
|
66
|
-
src/features/ →
|
|
67
|
-
src/components/ → Shared UI only
|
|
68
|
-
src/lib/ →
|
|
69
|
-
convex/features/ → Backend mirrors
|
|
34
|
+
src/routes/ → Thin route files (import from features, no logic)
|
|
35
|
+
src/features/ → Feature code (components/, hooks.ts)
|
|
36
|
+
src/components/ → Shared UI only
|
|
37
|
+
src/lib/ → Utilities
|
|
38
|
+
convex/features/ → Backend (mirrors src/features/)
|
|
70
39
|
```
|
|
71
40
|
|
|
72
41
|
## Rules
|
|
73
42
|
|
|
74
|
-
1.
|
|
75
|
-
2.
|
|
76
|
-
3.
|
|
77
|
-
4. **Components in components/**: All feature components in `src/features/<name>/components/`
|
|
78
|
-
5. **Mirror structure**: Every `src/features/X` has `convex/features/X`
|
|
79
|
-
|
|
80
|
-
## Stack Quick Reference
|
|
81
|
-
|
|
82
|
-
- **Data fetching**: Use hooks from `src/features/<name>/hooks.ts` (they wrap Convex)
|
|
83
|
-
- **Mutations**: Use mutation hooks from `src/features/<name>/hooks.ts`
|
|
84
|
-
- **UI primitives**: Import from `~/components/ui/*` (shadcn)
|
|
85
|
-
- **Styling**: Tailwind classes only, no CSS files
|
|
86
|
-
- **Forms**: react-hook-form + zod for validation
|
|
43
|
+
1. Routes are thin wrappers - no business logic, just imports and renders
|
|
44
|
+
2. No cross-feature imports (`src/features/X` cannot import from `src/features/Y`)
|
|
45
|
+
3. Each `src/features/X` has matching `convex/features/X`
|
|
87
46
|
|
|
88
|
-
##
|
|
47
|
+
## Quick Reference
|
|
89
48
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
| `forge check` | BEFORE completing any task |
|
|
49
|
+
- **Data/Mutations**: Use hooks from `src/features/<name>/hooks.ts`
|
|
50
|
+
- **UI Components**: Import from `~/components/ui/*` (shadcn)
|
|
51
|
+
- **Styling**: Tailwind classes only
|
package/package.json
CHANGED
|
@@ -1,93 +1,51 @@
|
|
|
1
1
|
# CLAUDE.md
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Stack
|
|
4
|
+
TanStack Start + Convex + Tailwind v4 + shadcn/ui + Biome
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
## IMPORTANT: Use Forge CLI for Features
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
## Trigger Words → Action
|
|
12
|
-
|
|
13
|
-
| User says | You run |
|
|
14
|
-
|-----------|---------|
|
|
15
|
-
| "add feature", "create feature", "build feature" | `forge add:feature <name>` |
|
|
16
|
-
| "add X with Y" (any domain entity) | `forge add:feature <name>` |
|
|
17
|
-
| "new page for X" | `forge add:feature <name>` |
|
|
18
|
-
| "build X functionality" | `forge add:feature <name>` |
|
|
19
|
-
|
|
20
|
-
## File Creation Rules
|
|
21
|
-
|
|
22
|
-
DO NOT create these files manually:
|
|
23
|
-
- `src/features/**/*` (forge creates the structure)
|
|
24
|
-
- `convex/features/**/*` (forge creates the structure)
|
|
25
|
-
- `app/routes/<feature>/**/*` (forge creates the structure)
|
|
26
|
-
|
|
27
|
-
ONLY the forge CLI creates these. You fill them in after.
|
|
28
|
-
|
|
29
|
-
## What You CAN Create Manually
|
|
30
|
-
|
|
31
|
-
- Files inside existing feature component folders (after forge created them)
|
|
32
|
-
- `src/components/*` (shared UI)
|
|
33
|
-
- `src/lib/*` (utilities)
|
|
34
|
-
- `src/hooks/*` (global hooks)
|
|
8
|
+
BEFORE building any feature, YOU MUST run:
|
|
9
|
+
```bash
|
|
10
|
+
forge add:feature <name>
|
|
11
|
+
```
|
|
35
12
|
|
|
36
|
-
|
|
13
|
+
This scaffolds the complete vertical slice:
|
|
14
|
+
- `src/features/<name>/` (components, hooks)
|
|
15
|
+
- `convex/features/<name>/` (schema, queries, mutations)
|
|
16
|
+
- `src/routes/<name>/` (route pages)
|
|
37
17
|
|
|
38
|
-
|
|
18
|
+
NEVER create these paths manually. Edit the scaffolded files instead.
|
|
39
19
|
|
|
40
|
-
|
|
41
|
-
```
|
|
42
|
-
Run: forge add:feature comments
|
|
43
|
-
Edit: convex/features/comments/schema.ts (add fields for comments + replies)
|
|
44
|
-
Edit: convex/features/comments/queries.ts (add queries)
|
|
45
|
-
Edit: convex/features/comments/mutations.ts (add mutations)
|
|
46
|
-
Edit: src/features/comments/hooks.ts (add/modify hooks)
|
|
47
|
-
Create: src/features/comments/components/CommentCard.tsx
|
|
48
|
-
Create: src/features/comments/components/CommentList.tsx
|
|
49
|
-
Create: src/features/comments/components/ReplyForm.tsx
|
|
50
|
-
Update: src/features/comments/components/index.ts (add exports)
|
|
51
|
-
Edit: app/routes/comments/index.tsx (wire up components)
|
|
52
|
-
```
|
|
20
|
+
The ONLY route you may create directly is `src/routes/index.tsx` (homepage).
|
|
53
21
|
|
|
54
|
-
##
|
|
22
|
+
## Commands
|
|
55
23
|
|
|
56
|
-
Before finishing ANY task, run:
|
|
57
24
|
```bash
|
|
58
|
-
|
|
25
|
+
pnpm dev # Start dev server
|
|
26
|
+
npx convex dev # Start Convex backend
|
|
27
|
+
pnpm lint # Check with Biome
|
|
28
|
+
forge check # Validate architecture (run before finishing)
|
|
59
29
|
```
|
|
60
|
-
If it fails, fix ALL issues before responding to the user.
|
|
61
30
|
|
|
62
|
-
##
|
|
31
|
+
## Architecture
|
|
63
32
|
|
|
64
33
|
```
|
|
65
|
-
|
|
66
|
-
src/features/ →
|
|
67
|
-
src/components/ → Shared UI only
|
|
68
|
-
src/lib/ →
|
|
69
|
-
convex/features/ → Backend mirrors
|
|
34
|
+
src/routes/ → Thin route files (import from features, no logic)
|
|
35
|
+
src/features/ → Feature code (components/, hooks.ts)
|
|
36
|
+
src/components/ → Shared UI only
|
|
37
|
+
src/lib/ → Utilities
|
|
38
|
+
convex/features/ → Backend (mirrors src/features/)
|
|
70
39
|
```
|
|
71
40
|
|
|
72
41
|
## Rules
|
|
73
42
|
|
|
74
|
-
1.
|
|
75
|
-
2.
|
|
76
|
-
3.
|
|
77
|
-
4. **Components in components/**: All feature components in `src/features/<name>/components/`
|
|
78
|
-
5. **Mirror structure**: Every `src/features/X` has `convex/features/X`
|
|
79
|
-
|
|
80
|
-
## Stack Quick Reference
|
|
81
|
-
|
|
82
|
-
- **Data fetching**: Use hooks from `src/features/<name>/hooks.ts` (they wrap Convex)
|
|
83
|
-
- **Mutations**: Use mutation hooks from `src/features/<name>/hooks.ts`
|
|
84
|
-
- **UI primitives**: Import from `~/components/ui/*` (shadcn)
|
|
85
|
-
- **Styling**: Tailwind classes only, no CSS files
|
|
86
|
-
- **Forms**: react-hook-form + zod for validation
|
|
43
|
+
1. Routes are thin wrappers - no business logic, just imports and renders
|
|
44
|
+
2. No cross-feature imports (`src/features/X` cannot import from `src/features/Y`)
|
|
45
|
+
3. Each `src/features/X` has matching `convex/features/X`
|
|
87
46
|
|
|
88
|
-
##
|
|
47
|
+
## Quick Reference
|
|
89
48
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
| `forge check` | BEFORE completing any task |
|
|
49
|
+
- **Data/Mutations**: Use hooks from `src/features/<name>/hooks.ts`
|
|
50
|
+
- **UI Components**: Import from `~/components/ui/*` (shadcn)
|
|
51
|
+
- **Styling**: Tailwind classes only
|