ai-forge-cli 0.3.3 → 0.3.4

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.
@@ -99,6 +99,31 @@ var componentLocationValidator = {
99
99
  };
100
100
  }
101
101
  };
102
+ var componentSubdirValidator = {
103
+ name: "Component subdirectories",
104
+ async validate(cwd) {
105
+ const errors = [];
106
+ const warnings = [];
107
+ const subdirs = await fg2("src/components/*/", {
108
+ cwd,
109
+ onlyDirectories: true,
110
+ ignore: ["src/components/ui"]
111
+ });
112
+ for (const dir of subdirs) {
113
+ warnings.push({
114
+ file: dir,
115
+ message: "Subdirectory in src/components/ - consider using a feature for page-specific components"
116
+ });
117
+ }
118
+ return {
119
+ rule: this.name,
120
+ passed: true,
121
+ // Warnings don't fail the check
122
+ errors,
123
+ warnings
124
+ };
125
+ }
126
+ };
102
127
  var hookLocationValidator = {
103
128
  name: "Hook locations",
104
129
  async validate(cwd) {
@@ -308,6 +333,7 @@ var featureParityValidator = {
308
333
  var validators = [
309
334
  featureStructureValidator,
310
335
  componentLocationValidator,
336
+ componentSubdirValidator,
311
337
  hookLocationValidator,
312
338
  thinRoutesValidator,
313
339
  crossFeatureValidator,
package/dist/index.js CHANGED
@@ -21,7 +21,7 @@ var main = defineCommand({
21
21
  subCommands: {
22
22
  init: () => import("./init-OYJP5QCZ.js").then((m) => m.default),
23
23
  "add:feature": () => import("./add-feature-MU65GMUK.js").then((m) => m.default),
24
- check: () => import("./check-7FR4TAME.js").then((m) => m.default),
24
+ check: () => import("./check-YMGJNKME.js").then((m) => m.default),
25
25
  version: () => import("./version-VO3LHLDO.js").then((m) => m.default)
26
26
  },
27
27
  run({ args }) {
@@ -33,11 +33,21 @@ forge check # Validate architecture (run before finishing)
33
33
  ```
34
34
  src/routes/ → Thin route files (import from features, no logic)
35
35
  src/features/ → Feature code (components/, hooks.ts)
36
- src/components/ Shared UI only
36
+ src/components/ui/ shadcn primitives only
37
+ src/components/ → Truly shared components (Header, Footer, Logo)
37
38
  src/lib/ → Utilities
38
39
  convex/features/ → Backend (mirrors src/features/)
39
40
  ```
40
41
 
42
+ ## Where Components Go
43
+
44
+ - `src/components/ui/*` → shadcn primitives (Button, Card, Dialog)
45
+ - `src/components/*.tsx` → Truly shared components used across multiple pages
46
+ - `src/features/<name>/components/` → Page-specific components
47
+
48
+ **IMPORTANT:** NO subdirectories in `src/components/` except `ui/`.
49
+ If you need 3+ components for a page, create a feature with `forge add:feature`.
50
+
41
51
  ## Rules
42
52
 
43
53
  1. Routes are thin wrappers - no business logic, just imports and renders
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-forge-cli",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "TypeScript stack scaffolding & enforcement CLI for TanStack Start + Convex",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -33,11 +33,21 @@ forge check # Validate architecture (run before finishing)
33
33
  ```
34
34
  src/routes/ → Thin route files (import from features, no logic)
35
35
  src/features/ → Feature code (components/, hooks.ts)
36
- src/components/ Shared UI only
36
+ src/components/ui/ shadcn primitives only
37
+ src/components/ → Truly shared components (Header, Footer, Logo)
37
38
  src/lib/ → Utilities
38
39
  convex/features/ → Backend (mirrors src/features/)
39
40
  ```
40
41
 
42
+ ## Where Components Go
43
+
44
+ - `src/components/ui/*` → shadcn primitives (Button, Card, Dialog)
45
+ - `src/components/*.tsx` → Truly shared components used across multiple pages
46
+ - `src/features/<name>/components/` → Page-specific components
47
+
48
+ **IMPORTANT:** NO subdirectories in `src/components/` except `ui/`.
49
+ If you need 3+ components for a page, create a feature with `forge add:feature`.
50
+
41
51
  ## Rules
42
52
 
43
53
  1. Routes are thin wrappers - no business logic, just imports and renders