@kienha/anti-chaotic 1.0.2 → 1.0.6

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.
Files changed (40) hide show
  1. package/.agent/rules/{documentation.md → documents.md} +1 -1
  2. package/.agent/skills/backend-developer/SKILL.md +4 -14
  3. package/.agent/skills/business-analysis/SKILL.md +2 -4
  4. package/.agent/skills/designer/SKILL.md +36 -58
  5. package/.agent/skills/devops-engineer/SKILL.md +0 -9
  6. package/.agent/skills/frontend-developer/SKILL.md +17 -3
  7. package/.agent/skills/frontend-developer/react/SKILL.md +16 -12
  8. package/.agent/skills/lead-architect/SKILL.md +2 -2
  9. package/.agent/skills/rules-workflows/SKILL.md +22 -112
  10. package/.agent/skills/rules-workflows/assets/workflow-basic.md +112 -0
  11. package/.agent/skills/rules-workflows/references/orchestration-patterns.md +13 -3
  12. package/.agent/skills/rules-workflows/references/rules-guide.md +82 -65
  13. package/.agent/skills/rules-workflows/references/workflows-guide.md +95 -26
  14. package/.agent/skills/skill-creator/SKILL.md +18 -20
  15. package/.agent/skills/skill-creator/assets/skill-questionnaire.md +8 -0
  16. package/.agent/workflows/bootstrap.md +96 -0
  17. package/.agent/workflows/brainstorm.md +81 -0
  18. package/.agent/workflows/custom-behavior.md +64 -0
  19. package/.agent/workflows/documentation.md +123 -0
  20. package/.agent/workflows/implement-feature.md +146 -0
  21. package/.agent/workflows/ui-ux-design.md +70 -51
  22. package/README.md +55 -354
  23. package/bin/{ag.js → anti-chaotic.js} +17 -0
  24. package/package.json +5 -4
  25. package/.agent/skills/frontend-developer/references/react-next.md +0 -67
  26. package/.agent/skills/frontend-developer/references/react.md +0 -91
  27. package/.agent/skills/rules-workflows/assets/example-workflow.md +0 -37
  28. package/.agent/skills/rules-workflows/assets/templates/rule-project-context.md +0 -26
  29. package/.agent/skills/rules-workflows/assets/templates/workflow-agile-feature.md +0 -62
  30. package/.agent/skills/skill-creator/scripts/__pycache__/encoding_utils.cpython-312.pyc +0 -0
  31. package/.agent/skills/skill-creator/scripts/__pycache__/quick_validate.cpython-312.pyc +0 -0
  32. package/.agent/workflows/generate-docs-from-codebase.md +0 -335
  33. package/.agent/workflows/requirement-analysis.md +0 -336
  34. package/.agent/workflows/setup-codebase.md +0 -97
  35. package/.agent/workflows/workflow-rule-from-codebase.md +0 -43
  36. package/.agent/workflows/workflow-rule-from-feedback.md +0 -38
  37. /package/.agent/skills/rules-workflows/assets/{example-rule-always-on.md → rule-always-on.md} +0 -0
  38. /package/.agent/skills/rules-workflows/assets/{example-rule-glob.md → rule-glob.md} +0 -0
  39. /package/.agent/skills/rules-workflows/assets/{example-rule-manual.md → rule-manual.md} +0 -0
  40. /package/.agent/skills/rules-workflows/assets/{example-rule-model-decision.md → rule-model-decision.md} +0 -0
package/README.md CHANGED
@@ -9,12 +9,25 @@
9
9
 
10
10
  ## 🎯 Introduction
11
11
 
12
- **Anti-Chaotic** is a comprehensive **Agent Kit** for Antigravity, designed to standardize and optimize your software development workflow. It serves as a versatile toolkit rather than a rigid framework:
12
+ **Anti-Chaotic** is a comprehensive **Agent Kit** for Antigravity, designed to standardize and optimize your software development workflow.
13
13
 
14
- - 🧠 **12+ Multi-domain AI Skills** - From Product Manager, Business Analyst to Lead Architect, DevOps Engineer
15
- - 🔄 **5 Automated Workflows** - Pre-defined, reusable work processes
16
- - 📜 **Rules Engine** - A rule system that ensures AI Agents follow project standards
17
- - 📚 **References Library** - Documentation references for various technologies and frameworks
14
+ ### 🎯 Core Philosophy
15
+
16
+ > **Process over Speed**: This kit is designed for **development teams** and **collaborative environments**. It prioritizes robust processes, structure, and long-term maintainability over "fast shipping" or quick hacks. It aims to bring standard engineering practices to AI-assisted coding.
17
+
18
+ ### 🧩 Concepts
19
+
20
+ - **Skills = Knowledge**: What the agent knows (Best practices, languages, patterns).
21
+ - **Rules & Workflows = Process**: How the agent executes (Steps, restrictions, output formats).
22
+
23
+ _We encourage teams to customize these skills and define their own rules & workflows to align with their specific enterprise standards._
24
+
25
+ ### 📦 Components
26
+
27
+ - 🧠 **12+ Multi-domain AI Skills** - From Product Manager, Business Analyst to Lead Architect.
28
+ - 🔄 **6 Automated Workflows** - Pre-defined, reusable work processes.
29
+ - 📜 **Rules Engine** - A rule system that ensures AI Agents follow project standards.
30
+ - 📚 **References Library** - Documentation references for various technologies.
18
31
 
19
32
  ---
20
33
 
@@ -37,91 +50,63 @@
37
50
  | **rules-workflows** | Create and manage rules, workflows |
38
51
  | **skill-creator** | Create new skills for the framework |
39
52
 
40
- ### 🔄 Automated Workflows
41
-
42
- | Workflow | Description | Trigger |
43
- | ------------------------------ | --------------------------------------------- | ---------------------------- |
44
- | `/requirement-analysis` | Analyze requirements → PRD, SDD, User Stories | Starting a new project |
45
- | `/generate-docs-from-codebase` | Generate documentation from existing code | Project without docs |
46
- | `/ui-ux-design-from-doc` | Transform requirements → UI/UX design | After having PRD |
47
- | `/workflow-rule-from-codebase` | Create project rules from code | Onboarding to a project |
48
- | `/workflow-rule-from-feedback` | Update rules based on feedback | Fixing recurring AI mistakes |
49
-
50
53
  ### 📜 Smart Rules Engine
51
54
 
52
55
  - **Documentation Rules**: Standard document structure and formatting
53
56
  - **Clean Code Rules**: Coding standards and best practices
54
57
  - **Project Rules**: Project-specific conventions
55
58
 
59
+ > **ℹ️ Documentation & Tools**: The default generated documentation is optimized for **Obsidian**. If your team uses **Jira**, **GitHub**, or other tools, simply connect the relevant **MCP Server** and customize the `documents.md` rule to align the output format.
60
+
56
61
  ---
57
62
 
58
- ## 📁 Directory Structure
63
+ ## 🚀 Quick Start
59
64
 
60
- ```
61
- anti-chaotic/
62
- ├── .agent/
63
- │ ├── skills/ # 12 AI skills with detailed instructions
64
- │ │ ├── product-manager/
65
- │ │ ├── business-analysis/
66
- │ │ ├── lead-architect/
67
- │ │ ├── designer/
68
- │ │ ├── frontend-developer/
69
- │ │ ├── backend-developer/
70
- │ │ ├── devops-engineer/
71
- │ │ ├── qa-tester/
72
- │ │ ├── ai-engineer/
73
- │ │ ├── blockchain-engineer/
74
- │ │ ├── rules-workflows/
75
- │ │ └── skill-creator/
76
- │ ├── workflows/ # Automated workflows
77
- │ │ ├── requirement-analysis.md
78
- │ │ ├── generate-docs-from-codebase.md
79
- │ │ ├── ui-ux-design-from-doc.md
80
- │ │ ├── workflow-rule-from-codebase.md
81
- │ │ └── workflow-rule-from-feedback.md
82
- │ └── rules/ # Project & documentation rules
83
- │ ├── documentation.md
84
- │ └── clean-code.md
85
- ├── bin/ # CLI utilities
86
- ├── docs/ # Generated documentation
87
- └── README.md
88
- ```
65
+ ### 1. Recommended Setup (MCP Servers)
89
66
 
90
- ---
67
+ To achieve the best results, we highly recommend installing the following MCP (Model Context Protocol) servers:
91
68
 
92
- ## 🚀 Quick Start
69
+ - **[sequence-thinking](https://github.com/axiom-team/mcp-server-sequence-thinking)**: AI model for advanced problem breakdown and step-by-step reasoning.
70
+ - **[context7](https://github.com/axiom-team/mcp-server-context7)**: For managing and retrieving broad project context.
71
+
72
+ ### 2. Initialize in your project
93
73
 
94
- ### 1. Clone Repository
74
+ Run the following command in your project root to install the Agent Kit:
95
75
 
96
76
  ```bash
97
- git clone https://github.com/kienhaminh/anti-chaotic.git
98
- cd anti-chaotic
77
+ npx @kienha/anti-chaotic init
99
78
  ```
100
79
 
101
- ### 2. Install Dependencies
80
+ This will download the `.agent` folder containing all skills, rules, and workflows into your project.
102
81
 
103
- ```bash
104
- npm install
105
- ```
82
+ ### 3. Using the Agent Kit
106
83
 
107
- ### 3. Using the Framework
84
+ Once initialized, start a new chat with your AI IDE (Cursor, Windsurf, etc.) and reference the installed rules/workflows.
108
85
 
109
86
  #### Start a new project with AI:
110
87
 
111
88
  ```
112
- /requirement-analysis Create a sales management application for a fashion store
89
+ /brainstorm Create a sales management application for a fashion store
113
90
  ```
114
91
 
115
92
  #### Generate docs for an existing project:
116
93
 
117
94
  ```
118
- /generate-docs-from-codebase
95
+ /documentation
119
96
  ```
120
97
 
121
98
  #### Design UI from requirements:
122
99
 
123
100
  ```
124
- /ui-ux-design-from-doc docs/020-Requirements/PRD-YourProject.md
101
+ /ui-ux-design docs/020-Requirements/PRD-YourProject.md
102
+ ```
103
+
104
+ ### 4. Updating the Kit
105
+
106
+ To update your Agent Kit to the latest version:
107
+
108
+ ```bash
109
+ npx @kienha/anti-chaotic update
125
110
  ```
126
111
 
127
112
  ---
@@ -133,308 +118,35 @@ npm install
133
118
  **Method 1: Slash Command**
134
119
 
135
120
  ```
136
- /requirement-analysis [Your project description]
121
+ /brainstorm [Your project description]
137
122
  ```
138
123
 
139
124
  **Method 2: Direct Request**
140
125
 
141
126
  ```
142
- Please run the requirement-analysis workflow to analyze requirements for an e-commerce project
127
+ Please run the brainstorm workflow to analyze requirements for an e-commerce project
143
128
  ```
144
129
 
145
130
  **Method 3: File Reference**
146
131
 
147
132
  ```
148
- Read and execute the workflow at .agent/workflows/requirement-analysis.md
149
- ```
150
-
151
- ### Special Annotations
152
-
153
- | Annotation | Meaning |
154
- | -------------- | ---------------------------------------- |
155
- | `// turbo` | Auto-run this step without user approval |
156
- | `// turbo-all` | Auto-run ALL steps in the workflow |
157
-
158
- ---
159
-
160
- ## 🔗 Workflow Chaining
161
-
162
- Workflows can be chained together to create a complete process:
163
-
164
- ```
165
- ┌──────────────────────────────────────────────────────────────┐
166
- │ 🔄 FULL PROJECT LIFECYCLE │
167
- ├──────────────────────────────────────────────────────────────┤
168
- │ │
169
- │ 1. /requirement-analysis │
170
- │ │ │
171
- │ ▼ │
172
- │ 2. /ui-ux-design-from-doc (with the generated PRD) │
173
- │ │ │
174
- │ ▼ │
175
- │ 3. [Development Phase - implement code] │
176
- │ │ │
177
- │ ▼ │
178
- │ 4. /generate-docs-from-codebase │
179
- │ │ │
180
- │ ▼ │
181
- │ 5. /workflow-rule-from-feedback (if needed) │
182
- │ │
183
- └──────────────────────────────────────────────────────────────┘
133
+ Read and execute the workflow at .agent/workflows/brainstorm.md
184
134
  ```
185
135
 
186
136
  ---
187
137
 
188
138
  ## 🎓 Workflow Details
189
139
 
190
- ### `/requirement-analysis`
191
-
192
- > **Description**: Analyze requirements from raw ideas → complete documentation
193
-
194
- #### 🎯 When to Use?
195
-
196
- - Starting a new project from scratch
197
- - Converting ideas into technical documentation
198
- - Need to create PRD, SDD, Epics, User Stories
199
-
200
- #### 📊 Process Flow
201
-
202
- ```
203
- ┌─────────────────────────────────────────────────────┐
204
- │ Step 0: Clarification & Understanding (PM) │
205
- │ → Create clarification-questions.md │
206
- ├─────────────────────────────────────────────────────┤
207
- │ Step 1: Create Roadmap (PM) │
208
- │ → docs/010-Planning/Roadmap-{Project}.md │
209
- ├─────────────────────────────────────────────────────┤
210
- │ Step 2: Create PRD (PM) │
211
- │ → docs/020-Requirements/PRD-{Project}.md │
212
- ├─────────────────────────────────────────────────────┤
213
- │ Step 3: Create SDD (Architect) │
214
- │ → docs/030-Specs/Architecture/SDD-{...}.md │
215
- ├─────────────────────────────────────────────────────┤
216
- │ Step 4: Create Epics (BA) │
217
- │ → docs/022-User-Stories/Epics/*.md │
218
- ├─────────────────────────────────────────────────────┤
219
- │ Step 5: Create Use Cases (BA) │
220
- │ → docs/020-Requirements/Use-Cases/*.md │
221
- ├─────────────────────────────────────────────────────┤
222
- │ Step 6: Create User Stories (BA) │
223
- │ → docs/022-User-Stories/Backlog/*.md │
224
- ├─────────────────────────────────────────────────────┤
225
- │ Step 7: Create ADRs (Architect) - Optional │
226
- │ → docs/030-Specs/Architecture/ADR-*.md │
227
- ├─────────────────────────────────────────────────────┤
228
- │ Step 8: Finalize & Summary (PM) │
229
- │ → Update MOC files & Index │
230
- └─────────────────────────────────────────────────────┘
231
- ```
232
-
233
- #### 💡 Example
234
-
235
- ```
236
- /requirement-analysis Create a personal finance management app with features:
237
- - Income/expense tracking
238
- - Budget planning
239
- - Analytics reports
240
- - Bank synchronization
241
- ```
242
-
243
- ---
244
-
245
- ### `/generate-docs-from-codebase`
246
-
247
- > **Description**: Automatically generate documentation from an existing codebase
248
-
249
- #### 🎯 When to Use?
250
-
251
- - Onboarding to an existing project without documentation
252
- - Updating docs after significant code changes
253
- - Need to create API docs, schema docs, architecture overview
254
-
255
- #### 📊 Process Flow
256
-
257
- ```
258
- ┌─────────────────────────────────────────────────────┐
259
- │ Step 1: Codebase Discovery & Analysis │
260
- │ → Scan package.json, config files │
261
- │ → Analyze folder structure │
262
- ├─────────────────────────────────────────────────────┤
263
- │ Step 2: Determine Documentation Scope │
264
- │ → Choose: Architecture, API, Schema, etc. │
265
- ├─────────────────────────────────────────────────────┤
266
- │ Step 3: Generate System Architecture │
267
- │ → C4 diagrams, component relationships │
268
- ├─────────────────────────────────────────────────────┤
269
- │ Step 4: Generate API Documentation │
270
- │ → Endpoint specs, request/response schemas │
271
- ├─────────────────────────────────────────────────────┤
272
- │ Step 5: Generate Database Schema Documentation │
273
- │ → Entity descriptions, ERD diagram │
274
- ├─────────────────────────────────────────────────────┤
275
- │ Step 6: Generate MOC Files │
276
- │ → Index files for navigation │
277
- ├─────────────────────────────────────────────────────┤
278
- │ Step 7: Validation & Linking │
279
- │ → Check frontmatter, wiki-links │
280
- ├─────────────────────────────────────────────────────┤
281
- │ Step 8: Summary & Next Steps │
282
- │ → Report generated files │
283
- └─────────────────────────────────────────────────────┘
284
- ```
140
+ ## 🔄 Automated Workflows
285
141
 
286
- #### 💡 Example
287
-
288
- ```
289
- /generate-docs-from-codebase
290
-
291
- Or specify a specific scope:
292
- /generate-docs-from-codebase Only create API documentation and Database Schema
293
- ```
294
-
295
- ---
296
-
297
- ### `/ui-ux-design-from-doc`
298
-
299
- > **Description**: Transform requirements documents into UI/UX designs
300
-
301
- #### 🎯 When to Use?
302
-
303
- - Already have PRD/requirements and need interface design
304
- - Need to create a design system for the project
305
- - Want to quickly prototype main screens
306
-
307
- #### 📊 Process Flow
308
-
309
- ```
310
- ┌─────────────────────────────────────────────────────┐
311
- │ Step 1: Analyze Requirements │
312
- │ → Extract target audience, features │
313
- ├─────────────────────────────────────────────────────┤
314
- │ Step 2: Define Design System │
315
- │ → Typography, colors, spacing │
316
- ├─────────────────────────────────────────────────────┤
317
- │ Step 3: Map User Flows │
318
- │ → Critical paths, screen sequences │
319
- ├─────────────────────────────────────────────────────┤
320
- │ Step 4: Create Visual Artifacts │
321
- │ → Components, page layouts │
322
- ├─────────────────────────────────────────────────────┤
323
- │ Step 5: Verification │
324
- │ → Req check, usability check │
325
- └─────────────────────────────────────────────────────┘
326
- ```
327
-
328
- #### 💡 Example
329
-
330
- ```
331
- /ui-ux-design-from-doc docs/020-Requirements/PRD-ShopManagement.md
332
- ```
333
-
334
- ---
335
-
336
- ### `/workflow-rule-from-codebase`
337
-
338
- > **Description**: Analyze codebase to create project rules file
339
-
340
- #### 🎯 When to Use?
341
-
342
- - Newly joining an existing project
343
- - Want AI Agent to "learn" project conventions
344
- - Need to document coding standards
345
-
346
- #### 📊 Process Flow
347
-
348
- ```
349
- ┌─────────────────────────────────────────────────────┐
350
- │ Step 1: Discovery Scan │
351
- │ → Read config, analyze structure │
352
- ├─────────────────────────────────────────────────────┤
353
- │ Step 2: Synthesize Observations │
354
- │ → Tech stack, conventions, directories │
355
- ├─────────────────────────────────────────────────────┤
356
- │ Step 3: Create Project Rules │
357
- │ → .agent/rules/project-rules.md │
358
- ├─────────────────────────────────────────────────────┤
359
- │ Step 4: Write the File │
360
- │ → Save with standard format │
361
- ├─────────────────────────────────────────────────────┤
362
- │ Step 5: Validation │
363
- │ → Check alignment with package.json │
364
- └─────────────────────────────────────────────────────┘
365
- ```
366
-
367
- #### 💡 Example
368
-
369
- ```
370
- /workflow-rule-from-codebase
371
- ```
372
-
373
- ---
374
-
375
- ### `/workflow-rule-from-feedback`
376
-
377
- > **Description**: Create/update rules based on user feedback
378
-
379
- #### 🎯 When to Use?
380
-
381
- - Want AI Agent to remember a specific rule
382
- - Fixing mistakes that AI frequently makes
383
- - Adding preferences for the project
384
-
385
- #### 📊 Process Flow
386
-
387
- ```
388
- ┌─────────────────────────────────────────────────────┐
389
- │ Step 1: Analyze Feedback & Existing Rules │
390
- │ → Check conflicts, determine action │
391
- ├─────────────────────────────────────────────────────┤
392
- │ Step 2: Determine Target Rule File │
393
- │ → project-rules.md or new file? │
394
- ├─────────────────────────────────────────────────────┤
395
- │ Step 3: Update Project Content │
396
- │ → Append/update the rule │
397
- ├─────────────────────────────────────────────────────┤
398
- │ Step 4: Write the File │
399
- │ → Save changes │
400
- ├─────────────────────────────────────────────────────┤
401
- │ Step 5: Confirmation │
402
- │ → Notify user │
403
- └─────────────────────────────────────────────────────┘
404
- ```
405
-
406
- #### 💡 Example
407
-
408
- ```
409
- /workflow-rule-from-feedback Always use Zod for validation instead of Yup
410
-
411
- /workflow-rule-from-feedback Never use any type in TypeScript
412
- ```
413
-
414
- ---
415
-
416
- ## 💡 Tips & Best Practices
417
-
418
- ### ✅ Do's
419
-
420
- 1. **Read output carefully before approving** - Each step has a checkpoint for review
421
- 2. **Use artifacts for comments** - AI will create draft files for you to review first
422
- 3. **Provide complete context** - Describe requirements in detail from the start
423
- 4. **Chain workflows** - Combine multiple workflows for a complete process
424
-
425
- ### ❌ Don'ts
426
-
427
- 1. **Skip clarification step** - The clarification step is crucial
428
- 2. **Approve without reading** - Always review before confirming
429
- 3. **Run inappropriate workflows** - Choose the right workflow for the right use case
430
-
431
- ### 🔧 Troubleshooting
432
-
433
- | Issue | Solution |
434
- | -------------------------- | --------------------------------------------- |
435
- | Workflow doesn't run | Check slash command syntax |
436
- | Output has wrong format | Ensure `.agent/rules/documentation.md` exists |
437
- | AI asks too many questions | Provide more context in the initial request |
142
+ | Workflow | Description | Use Case |
143
+ | :----------------------- | :--------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------ |
144
+ | **`/bootstrap`** | Sets up project structure, installs dependencies, and configures environment based on architectural specs. | Start of Implementation Phase. |
145
+ | **`/brainstorm`** | Analyze ideas with the user and create preliminary high-level documents (Roadmap, PRD). | Start of a new project or feature when you only have a rough idea. |
146
+ | **`/custom-behavior`** | Safely customize Agent rules and workflows with impact analysis and user confirmation. | As needed to adjust Agent behavior or fix recurring mistakes. |
147
+ | **`/documentation`** | Generate comprehensive documentation (Architecture, API, Specs) from either Codebase or Requirements. | Onboarding to a legacy project OR creating detailed specs from PRD. |
148
+ | **`/implement-feature`** | Orchestrates feature implementation from specification to deployment. | After design and specs are ready, for actual coding and deployment. |
149
+ | **`/ui-ux-design`** | Transform requirements into comprehensive UI/UX design deliverables. | After requirements are finalized, before coding. |
438
150
 
439
151
  ---
440
152
 
@@ -452,15 +164,6 @@ We welcome all contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for detaile
452
164
 
453
165
  ---
454
166
 
455
- ## 📚 Additional Resources
456
-
457
- - **Documentation Rules**: `.agent/rules/documentation.md`
458
- - **Available Skills**: `.agent/skills/`
459
- - **Project Rules**: `.agent/rules/project-rules.md` (if exists)
460
- - **Agent Skills Specification**: [agentskills.io/specification](https://agentskills.io/specification)
461
-
462
- ---
463
-
464
167
  ## 📄 License
465
168
 
466
169
  This project is released under the [MIT License](LICENSE).
@@ -470,5 +173,3 @@ This project is released under the [MIT License](LICENSE).
470
173
  <p align="center">
471
174
  <b>Made with ❤️ for the AI-Driven Development Community</b>
472
175
  </p>
473
-
474
- > 💡 **Tip**: You can create new workflows by adding `.md` files in the `.agent/workflows/` directory following the same structure as existing workflows.
@@ -41,8 +41,25 @@ program
41
41
  .description("Update .agent configuration from GitHub")
42
42
  .action(async () => {
43
43
  const targetAgentDir = path.join(process.cwd(), ".agent");
44
+ const { default: inquirer } = await import("inquirer");
44
45
 
45
46
  try {
47
+ if (await fs.pathExists(targetAgentDir)) {
48
+ const { confirm } = await inquirer.prompt([
49
+ {
50
+ type: "confirm",
51
+ name: "confirm",
52
+ message: `Directory ${targetAgentDir} already exists. Do you want to overwrite it?`,
53
+ default: false,
54
+ },
55
+ ]);
56
+
57
+ if (!confirm) {
58
+ console.log(chalk.yellow("Operation cancelled by user."));
59
+ return;
60
+ }
61
+ }
62
+
46
63
  console.log(
47
64
  chalk.blue(`Updating Anti-Chaotic Agent Kit from ${REPO_URI}...`),
48
65
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kienha/anti-chaotic",
3
- "version": "1.0.2",
3
+ "version": "1.0.6",
4
4
  "description": "Anti-Chaotic - An agent kit for Antigravity to standardize the software development process",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
@@ -26,8 +26,8 @@
26
26
  "license": "ISC",
27
27
  "type": "commonjs",
28
28
  "bin": {
29
- "ag": "bin/ag.js",
30
- "anti-chaotic": "bin/ag.js"
29
+ "ac": "bin/anti-chaotic.js",
30
+ "anti-chaotic": "bin/anti-chaotic.js"
31
31
  },
32
32
  "files": [
33
33
  ".agent",
@@ -37,6 +37,7 @@
37
37
  "chalk": "^4.1.2",
38
38
  "commander": "^14.0.2",
39
39
  "fs-extra": "^11.3.3",
40
- "giget": "^2.0.0"
40
+ "giget": "^2.0.0",
41
+ "inquirer": "^13.2.0"
41
42
  }
42
43
  }
@@ -1,67 +0,0 @@
1
- # React & Next.js Architecture
2
-
3
- **Status**: Definitive Guide
4
- **Stack**: React 18+, Next.js App Router (14+)
5
-
6
- ## 🏗 Architecture: "Server-Centric" Design
7
-
8
- ### 1. The Separation: Server vs. Client
9
-
10
- - **Default to Server Components (RSC)**: All components are Server by default.
11
- - **Client Components**: Only use `'use client'` when you need:
12
- - Event listeners (`onClick`, `onChange`)
13
- - Hooks (`useState`, `useEffect`)
14
- - Browser-only APIs
15
-
16
- ### 2. File Structure (Feature-Sliced)
17
-
18
- ```
19
- app/
20
- ├── layout.tsx # Root layout
21
- ├── page.tsx # Home
22
- ├── (auth)/ # Route Group (doesn't affect URL)
23
- │ ├── login/
24
- │ │ └── page.tsx
25
- ├── _components/ # Shared UI
26
- └── features/ # Feature Modules
27
- ├── cart/
28
- │ ├── components/
29
- │ ├── hooks/
30
- │ └── actions.ts # Server Actions
31
- ```
32
-
33
- ## ⚡ Performance Patterns
34
-
35
- ### 1. Data Fetching
36
-
37
- - **No `useEffect`**: Fetch data directly in Server Components using `async/await`.
38
- - **Deduplication**: `fetch` is auto-memoized.
39
- - **Waterfalls**: Use `Promise.all` for parallel fetching, or use `<Suspense>` for streaming.
40
-
41
- ```tsx
42
- // ✅ GOOD: Streaming
43
- export default async function Page() {
44
- return (
45
- <Suspense fallback={<Skeleton />}>
46
- <UserFeed /> {/* Fetches its own data */}
47
- </Suspense>
48
- );
49
- }
50
- ```
51
-
52
- ### 2. Server Actions instead of API Routes
53
-
54
- - Colocate mutations with the feature code.
55
- - Use `useFormStatus` for pending states.
56
- - Use `useOptimistic` for instant UI updates.
57
-
58
- ### 3. Image Optimization
59
-
60
- - Required usage of `next/image`.
61
- - **sizes**: mandatory prop for responsive images. `sizes="(max-width: 768px) 100vw, 50vw"`.
62
-
63
- ## 🧪 Testing
64
-
65
- - **Unit**: Vitest/Jest for logic.
66
- - **Integration**: React Testing Library for Client Components.
67
- - **E2E**: Playwright for full flows.