kaide 1.0.1 → 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/README.md CHANGED
@@ -4,6 +4,25 @@
4
4
 
5
5
  > **Kaide** (Etymology: Turkish): A fundamental rule, principle, or base that provides structural integrity. The name cleverly embeds **AI** (K**ai**de), reflecting its core mission.
6
6
 
7
+ ## Getting Started
8
+
9
+ ### Installation & Setup
10
+
11
+ 1. Run the CLI to automatically install the configuration files:
12
+
13
+ ```bash
14
+ npx kaide
15
+ ```
16
+ 2. (Recommended) For maximum adherence, point your AI tool to your identity in **Settings/Project Rules**:
17
+
18
+ > **Adhere to `AGENTS.md` for persona/planning and `docs/` for architectural constitutions.**
19
+
20
+ ### Usage Workflow
21
+ This kit follows a **Plan-First Protocol**:
22
+ - **Initialize:** Ask the AI to read the rules: `Read all .mdc files and AGENTS.md.`
23
+ - **Plan:** Propose a feature: `I want to build a [Feature Name]. Create an architectural plan.`
24
+ - **Execute:** After approving the plan, the AI will generate code following the strict constraints of the relevant `.mdc` files.
25
+
7
26
  ## The Problem We Solve
8
27
 
9
28
  **Kaide** provides the missing governance layer to turn AI from a simple coder into a high-level Staff Engineer.
@@ -28,21 +47,6 @@ The system operates on a **Three-Layer Governance** model:
28
47
  - **Optimized for Modern Tech:** Seamless support for Next.js and TanStack Start for world-class web applications.
29
48
  - **Performance-First:** Built-in rules for LCP optimization, CLS prevention, and maximum efficiency.
30
49
 
31
- ## Getting Started
32
-
33
- ### Installation & Setup
34
-
35
- 1. Copy the `.cursor/rules/` folder, `docs/` directory, and `AGENTS.md` file to your project root.
36
- 2. (Recommended) For maximum adherence, point your AI tool to your identity in **Settings/Project Rules**:
37
-
38
- > **Adhere to `AGENTS.md` for persona/planning and `docs/` for architectural constitutions.**
39
-
40
- ### Usage Workflow
41
- This kit follows a **Plan-First Protocol**:
42
- - **Initialize:** Ask the AI to read the rules: `Read all .mdc files and AGENTS.md.`
43
- - **Plan:** Propose a feature: `I want to build a [Feature Name]. Create an architectural plan.`
44
- - **Execute:** After approving the plan, the AI will generate code following the strict constraints of the relevant `.mdc` files.
45
-
46
50
  ## LLM Agnostic Usage
47
51
  While optimized for Cursor (`.mdc`), **Kaide** is built on pure Markdown and works with any "Agentic" AI (Claude Code, Windsurf, GitHub Copilot CLI, etc.):
48
52
  - All `.mdc` files are standard Markdown. No conversion is needed.
@@ -60,4 +64,4 @@ While optimized for Cursor (`.mdc`), **Kaide** is built on pure Markdown and wor
60
64
  ## Security & Performance
61
65
  - **Zero Inline Script:** Strictly enforced CSP compliance.
62
66
  - **Locked Boundaries:** Server-only logic is isolated from client bundles.
63
- - **Optimized Assets:** Automatic enforcement of modern formats and performance patterns for peak scores.
67
+ - **Optimized Assets:** Automatic enforcement of modern formats and performance patterns for peak scores.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kaide",
3
- "version": "1.0.1",
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