claude-orchestration 1.0.2 → 1.0.3
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/package.json
CHANGED
|
@@ -37,39 +37,3 @@ If React indicators are present → use `workflows/react/` directory
|
|
|
37
37
|
- Workflows are process guidance, not rigid scripts
|
|
38
38
|
- Read the workflow file before starting, adapt steps as needed
|
|
39
39
|
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
## React Architecture Rules
|
|
43
|
-
|
|
44
|
-
All React workflows MUST follow these rules. Violations block merge.
|
|
45
|
-
|
|
46
|
-
### Structure
|
|
47
|
-
- **Feature-based**: Organize by feature, not by type
|
|
48
|
-
- **No barrels**: NEVER use `index.ts` to re-export from a folder
|
|
49
|
-
- **Entry naming**: Main file MUST match folder name (`Button/Button.tsx`, not `Button/index.tsx`)
|
|
50
|
-
- **Colocation**: Keep related files together (component, hooks, types, tests, styles)
|
|
51
|
-
|
|
52
|
-
### File Structure
|
|
53
|
-
```
|
|
54
|
-
features/
|
|
55
|
-
auth/
|
|
56
|
-
auth.tsx # Entry point (matches folder name)
|
|
57
|
-
auth.hooks.ts # Feature-specific hooks
|
|
58
|
-
auth.types.ts # Feature-specific types
|
|
59
|
-
auth.test.tsx # Feature tests
|
|
60
|
-
components/
|
|
61
|
-
LoginForm/
|
|
62
|
-
LoginForm.tsx # Component entry (matches folder name)
|
|
63
|
-
LoginForm.test.tsx
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Import Convention
|
|
67
|
-
```tsx
|
|
68
|
-
// CORRECT: Direct imports
|
|
69
|
-
import { LoginForm } from '@/features/auth/components/LoginForm/LoginForm'
|
|
70
|
-
import { useAuth } from '@/features/auth/auth.hooks'
|
|
71
|
-
|
|
72
|
-
// WRONG: Barrel imports - NEVER do this
|
|
73
|
-
import { LoginForm } from '@/features/auth/components'
|
|
74
|
-
import { useAuth } from '@/features/auth'
|
|
75
|
-
```
|
|
@@ -29,15 +29,12 @@ MUST answer:
|
|
|
29
29
|
**Components:**
|
|
30
30
|
- Function components only
|
|
31
31
|
- `useState`/`useReducer` for local state
|
|
32
|
-
- `useTransition` for non-urgent updates
|
|
33
|
-
- `useDeferredValue` for expensive computations
|
|
34
|
-
- `Suspense` for lazy-loaded components
|
|
35
32
|
|
|
36
33
|
**Hooks:**
|
|
37
34
|
- Extract reusable logic into custom hooks
|
|
38
35
|
- Components handle rendering; hooks handle logic
|
|
39
36
|
- Name descriptively: `useAuthState`, `useFormValidation`
|
|
40
|
-
- Place in `{feature}.
|
|
37
|
+
- Place in `hooks/{feature}/{hookName}.ts`
|
|
41
38
|
|
|
42
39
|
**State:**
|
|
43
40
|
- Lift state only as high as necessary
|