kaide 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kaide",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "AI-native architecture kit for modern React. High-discipline protocols for autonomous agents.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -9,12 +9,13 @@ alwaysApply: false
9
9
 
10
10
  - **Route Definition:** Always use `createFileRoute`. Path MUST strictly match the file system location.
11
11
  - **Component Scope:** Keep route files thin. Only orchestrate routing and data. Move UI and business logic to `src/features`.
12
+ - **Nested Layouts:** Use the `<Outlet />` component in parent routes to render child routes. If a route has children, the parent component MUST render `<Outlet />`.
12
13
  - **Data Loading:** Fetch all route-level data in `loader`. Consume via `Route.useLoaderData` or `useSuspenseQuery`.
13
14
  - **Guards:** Put auth, redirects, and preconditions in `beforeLoad`.
14
- - **Hydration:** For Next.js RSC, use dehydrate(queryClient) pattern. For Start, use loader prefetching.
15
+ - **Hydration:** Rely on loader prefetching for data hydration. Do not use Next.js-specific patterns like manual dehydration.
15
16
  - **Server Functions:** Wrap all backend-only logic in standalone `serverFn`. Functions MUST act as a bridge to the API layer; keep database orchestration and business logic inside src/features/api or helpers.
16
17
  - **Search Params:** Validate all search params with `validateSearch` using a Zod schema. Never trust raw search values.
17
- - **i18n Implementation:** Use `paraglide-js` for translations. Import messages from `@/paraglide/messages`.
18
+ - **i18n Implementation:** Use `paraglide-js` for translations. Follow the patterns defined in `i18n.mdc`.
18
19
  - **Error Handling:** Provide `errorComponent` for failure states. Handle expected errors in the loader.
19
20
  - **Loading UI:** Provide `pendingComponent` for async states when needed.
20
21
  - **Not Found:** Provide `notFoundComponent` for missing resources.
@@ -7,7 +7,7 @@ alwaysApply: false
7
7
  # Testing Guide (Pragmatic)
8
8
 
9
9
  ## Principles
10
- - **Value over Coverage:** Focus on testing complex business logic in `features/logic`. Skip simple UI components unless critical.
10
+ - **Value over Coverage:** Focus on testing complex business logic in `features/[feature]`. Skip simple UI components unless critical.
11
11
  - [cite_start]**Behavior Testing:** Focus on user outcomes (Arrange-Act-Assert)[cite: 3].
12
12
 
13
13
  ## Tech Stack