@akanjs/cli 0.0.145 → 0.0.147

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 (34) hide show
  1. package/README.md +7 -26
  2. package/cjs/index.js +191 -28
  3. package/cjs/src/guidelines/componentRule/componentRule.instruction.md +3 -81
  4. package/cjs/src/guidelines/cssRule/cssRule.instruction.md +435 -0
  5. package/cjs/src/guidelines/docPageRule/docPageRule.instruction.md +389 -0
  6. package/cjs/src/guidelines/modelConstant/modelConstant.instruction.md +335 -752
  7. package/cjs/src/guidelines/modelStore/modelStore.instruction.md +2 -1
  8. package/cjs/src/guidelines/modelTemplate/modelTemplate.instruction.md +418 -391
  9. package/cjs/src/guidelines/modelUnit/modelUnit.instruction.md +0 -292
  10. package/cjs/src/guidelines/scalarModule/scalarModule.instruction.md +84 -0
  11. package/cjs/src/templates/app/main.js +1 -2
  12. package/esm/index.js +199 -36
  13. package/esm/src/guidelines/componentRule/componentRule.instruction.md +3 -81
  14. package/esm/src/guidelines/cssRule/cssRule.instruction.md +435 -0
  15. package/esm/src/guidelines/docPageRule/docPageRule.instruction.md +389 -0
  16. package/esm/src/guidelines/modelConstant/modelConstant.instruction.md +335 -752
  17. package/esm/src/guidelines/modelStore/modelStore.instruction.md +2 -1
  18. package/esm/src/guidelines/modelTemplate/modelTemplate.instruction.md +418 -391
  19. package/esm/src/guidelines/modelUnit/modelUnit.instruction.md +0 -292
  20. package/esm/src/guidelines/scalarModule/scalarModule.instruction.md +84 -0
  21. package/esm/src/templates/app/main.js +1 -2
  22. package/package.json +1 -1
  23. package/src/guideline/guideline.command.d.ts +3 -1
  24. package/src/guideline/guideline.prompt.d.ts +15 -1
  25. package/src/guideline/guideline.runner.d.ts +17 -3
  26. package/src/guideline/guideline.script.d.ts +8 -2
  27. package/src/guidelines/componentRule/componentRule.instruction.md +3 -81
  28. package/src/guidelines/cssRule/cssRule.instruction.md +435 -0
  29. package/src/guidelines/docPageRule/docPageRule.instruction.md +389 -0
  30. package/src/guidelines/modelConstant/modelConstant.instruction.md +335 -752
  31. package/src/guidelines/modelStore/modelStore.instruction.md +2 -1
  32. package/src/guidelines/modelTemplate/modelTemplate.instruction.md +418 -391
  33. package/src/guidelines/modelUnit/modelUnit.instruction.md +0 -292
  34. package/src/guidelines/scalarModule/scalarModule.instruction.md +84 -0
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # ⚡ AkanJS CLI
1
+ # ⚡ Akan.js CLI
2
2
 
3
- The official command-line interface for the AkanJS ecosystem, providing powerful development tools for creating, managing, and deploying modern web applications with ease.
3
+ The official command-line interface for the Akan.js ecosystem, providing powerful development tools for creating, managing, and deploying modern web applications with ease.
4
4
 
5
5
  ## 🚀 Get Started
6
6
 
@@ -42,7 +42,7 @@ akan set-llm
42
42
  # create module
43
43
  akan create-module
44
44
 
45
- # create scalar with ai (experimental)
45
+ # create scalar
46
46
  akan create-scalar
47
47
  ```
48
48
 
@@ -55,7 +55,7 @@ The `@akanjs/cli` is a comprehensive development toolkit that streamlines the en
55
55
  Complete workspace and project management:
56
56
 
57
57
  - **🚀 Project Initialization**
58
- - `create-workspace` - Create new AkanJS workspace with organization setup
58
+ - `create-workspace` - Create new Akan.js workspace with organization setup
59
59
  - `generate-mongo` - Generate MongoDB configuration and setup
60
60
  - `lint` / `lint-all` - Code linting with auto-fix capabilities
61
61
 
@@ -151,7 +151,7 @@ Seamless cloud services and AI integration:
151
151
  - `ask` - Interactive AI development assistance
152
152
 
153
153
  - **🚀 Deployment**
154
- - `deploy-akan` - Deploy to AkanJS cloud infrastructure
154
+ - `deploy-akan` - Deploy to Akan.js cloud infrastructure
155
155
  - `update` - Update CLI and cloud integrations
156
156
 
157
157
  ### 📦 **Package Operations** (`package`)
@@ -265,25 +265,6 @@ akan pull-database web-app --env debug --dump
265
265
  akan dbup
266
266
  ```
267
267
 
268
- ## 🏗️ Architecture
269
-
270
- The CLI follows a modular command structure:
271
-
272
- ```
273
- pkgs/@akanjs/cli/
274
- ├── src/
275
- │ ├── workspace/ # Workspace management commands
276
- │ ├── application/ # Application lifecycle commands
277
- │ ├── library/ # Library management commands
278
- │ ├── module/ # AI-powered module generation
279
- │ ├── page/ # Page scaffolding commands
280
- │ ├── package/ # NPM package operations
281
- │ ├── cloud/ # Cloud services integration
282
- │ └── templates/ # Code generation templates
283
- ├── index.ts # CLI entry point
284
- └── package.json # Dependencies and configuration
285
- ```
286
-
287
268
  ## 🤖 AI-Powered Development
288
269
 
289
270
  The CLI integrates advanced AI capabilities:
@@ -314,7 +295,7 @@ The CLI integrates advanced AI capabilities:
314
295
 
315
296
  ## 📄 License
316
297
 
317
- This project is part of the AkanJS ecosystem. See the main repository for license information.
298
+ This project is part of the Akan.js ecosystem. See the main repository for license information.
318
299
 
319
300
  ## 🔗 Related Packages
320
301
 
@@ -327,5 +308,5 @@ This project is part of the AkanJS ecosystem. See the main repository for licens
327
308
  ---
328
309
 
329
310
  <p align="center">
330
- <strong>Built with ❤️ by the AkanJS team</strong>
311
+ <strong>Built with ❤️ by the Akan.js team</strong>
331
312
  </p>
package/cjs/index.js CHANGED
@@ -1251,7 +1251,10 @@ ${errorMessages}`);
1251
1251
  ];
1252
1252
  const errors = diagnostics.filter((diagnostic) => diagnostic.category === ts3.DiagnosticCategory.Error);
1253
1253
  const warnings = diagnostics.filter((diagnostic) => diagnostic.category === ts3.DiagnosticCategory.Warning);
1254
- return { diagnostics, errors, warnings };
1254
+ const fileDiagnostics = diagnostics.filter((diagnostic) => diagnostic.file?.fileName === filePath);
1255
+ const fileErrors = fileDiagnostics.filter((diagnostic) => diagnostic.category === ts3.DiagnosticCategory.Error);
1256
+ const fileWarnings = fileDiagnostics.filter((diagnostic) => diagnostic.category === ts3.DiagnosticCategory.Warning);
1257
+ return { diagnostics, errors, warnings, fileDiagnostics, fileErrors, fileWarnings };
1255
1258
  }
1256
1259
  /**
1257
1260
  * Format diagnostics for console output
@@ -1678,9 +1681,9 @@ var Executor = class _Executor {
1678
1681
  typeCheck(filePath) {
1679
1682
  const path9 = this.getPath(filePath);
1680
1683
  const typeChecker = this.getTypeChecker();
1681
- const { diagnostics, errors, warnings } = typeChecker.check(path9);
1682
- const message = typeChecker.formatDiagnostics(diagnostics);
1683
- return { diagnostics, errors, warnings, message };
1684
+ const { fileDiagnostics, fileErrors, fileWarnings } = typeChecker.check(path9);
1685
+ const message = typeChecker.formatDiagnostics(fileDiagnostics);
1686
+ return { fileDiagnostics, fileErrors, fileWarnings, message };
1684
1687
  }
1685
1688
  getLinter() {
1686
1689
  this.linter ??= new Linter(this.cwdPath);
@@ -3105,7 +3108,7 @@ ${validate.map((v) => `- ${v}`).join("\n")}`;
3105
3108
  writes.map(async ({ filePath }) => {
3106
3109
  const typeCheckResult = executor.typeCheck(filePath);
3107
3110
  const lintResult = await executor.lint(filePath);
3108
- const needFix2 = !!typeCheckResult.errors.length || !!lintResult.errors.length;
3111
+ const needFix2 = !!typeCheckResult.fileErrors.length || !!lintResult.errors.length;
3109
3112
  return { filePath, typeCheckResult, lintResult, needFix: needFix2 };
3110
3113
  })
3111
3114
  );
@@ -3139,7 +3142,7 @@ ${fileCheck.lintResult.message}`
3139
3142
  throw new Error("Failed to create scalar");
3140
3143
  }
3141
3144
  #getTypescriptCodes(text) {
3142
- const codes = text.match(/```typescript([\s\S]*?)```/g);
3145
+ const codes = text.match(/```(typescript|tsx)([\s\S]*?)```/g);
3143
3146
  if (!codes)
3144
3147
  return [];
3145
3148
  const result = codes.map((code) => {
@@ -3264,6 +3267,9 @@ var Prompter = class {
3264
3267
  const content = await import_promises2.default.readFile(filePath, "utf-8");
3265
3268
  return content;
3266
3269
  }
3270
+ static async getUpdateRequest(guideName) {
3271
+ return await (0, import_prompts5.input)({ message: `What do you want to update in ${guideName}?` });
3272
+ }
3267
3273
  async makeTsFileUpdatePrompt({ context: context2, request }) {
3268
3274
  return `You are a senior developer writing TypeScript-based programs using Akan.js, an in-house framework. Here's an overview of the Akan.js framework:
3269
3275
  ${await this.getDocumentation("framework")}
@@ -5494,7 +5500,9 @@ var GuidelinePrompt = class extends Prompter {
5494
5500
  });
5495
5501
  const paths = [];
5496
5502
  for await (const path9 of matchingPaths) {
5497
- if (filterText && !import_fs12.default.readFileSync(path9, "utf-8").includes(filterText))
5503
+ const fileContent = import_fs12.default.readFileSync(path9, "utf-8");
5504
+ const textFilter = filterText ? new RegExp(filterText) : null;
5505
+ if (filterText && !textFilter?.test(fileContent))
5498
5506
  continue;
5499
5507
  paths.push(path9);
5500
5508
  }
@@ -5547,10 +5555,39 @@ ${guideJson.update.rules.map((rule) => `- ${rule}`).join("\n")}
5547
5555
 
5548
5556
  => Now, you need to write the file content here. Let's go.
5549
5557
  `;
5550
- return { request, writePath };
5558
+ return { guideJson, request, writePath };
5551
5559
  }
5552
- async requestUpdateDocumentPage(page) {
5553
- const writePath = `apps/angelo/app/${page}`;
5560
+ async requestUpdateInstruction(updateRequest) {
5561
+ const guideJson = await Prompter.getGuideJson(this.name);
5562
+ const resultPath = `${__dirname}/src/guidelines/${this.name}/${guideJson.update.filePath}`;
5563
+ const writePath = `${this.workspace.workspaceRoot}/pkgs/@akanjs/cli/src/guidelines/${this.name}/${guideJson.update.filePath}`;
5564
+ const isResultExists = this.workspace.exists(writePath);
5565
+ if (!isResultExists)
5566
+ throw new Error(`${guideJson.update.filePath} file does not exist. Please create it first.`);
5567
+ const existingResult = this.workspace.readFile(resultPath);
5568
+ const request = `
5569
+ I am a developer of akanjs framework, a full-stack framework for building web applications.
5570
+ I want to update a ${guideJson.update.filePath} file for ${guideJson.description}.
5571
+ This file is a programming guideline for Akan.js framwork users.
5572
+
5573
+ # ${guideJson.title} Workflow
5574
+ - 1. Read already-written ${guideJson.update.filePath} file.
5575
+ - 2. Write the updated file content of the ${guideJson.update.filePath} with the update request.
5576
+
5577
+ ## 1. Read already-written ${guideJson.update.filePath} file.
5578
+ \`\`\`markdown
5579
+ ${existingResult}
5580
+ \`\`\`
5581
+
5582
+ ## 2. Write the updated file content of the ${guideJson.update.filePath} with the update request.
5583
+ Request: ${updateRequest}
5584
+
5585
+ => Now, you need to write the file content here. Let's go.
5586
+ `;
5587
+ return { guideJson, request, writePath };
5588
+ }
5589
+ async requestCreateDocumentPage(page) {
5590
+ const writePath = `apps/angelo/app${page}`;
5554
5591
  if (!this.workspace.exists(writePath))
5555
5592
  this.workspace.writeFile(
5556
5593
  writePath,
@@ -5562,30 +5599,99 @@ ${guideJson.update.rules.map((rule) => `- ${rule}`).join("\n")}
5562
5599
  const instruction = await Prompter.getInstruction(this.name);
5563
5600
  const pageContent = this.workspace.getLocalFile(writePath);
5564
5601
  const request = `
5565
- \uB098\uB294 Akan.js \uD504\uB808\uC784\uC6CC\uD06C\uC5D0 \uB300\uD55C documentation \uC6F9\uC0AC\uC774\uD2B8\uB97C \uB9CC\uB4E4\uACE0 \uC788\uC5B4.
5602
+ I'm creating a documentation website for the Akan.js framework.
5566
5603
 
5567
- 1. Akan.js \uD504\uB808\uC784\uC6CC\uD06C\uC5D0 \uB300\uD55C \uAC1C\uC694
5604
+ 1. Overview of the Akan.js framework
5568
5605
  ${await this.getDocumentation("framework")}
5569
5606
 
5570
- \uB098\uB294 ${writePath}\uC5D0 \uC788\uB294 Next.js \uC11C\uBC84\uC0AC\uC774\uB4DC \uD398\uC774\uC9C0\uB97C \uC5C5\uB370\uC774\uD2B8\uD558\uB824\uACE0 \uD574.
5571
- \uC544\uB798\uB294 \uD604\uC7AC \uC791\uC131\uB41C \uD398\uC774\uC9C0\uC758 \uB0B4\uC6A9\uC774\uC57C.
5607
+ 2. Documentation page writing method
5608
+ ${await this.getDocumentation("docPageRule")}
5609
+
5610
+ 3. CSS rule with TailwindCSS and DaisyUI
5611
+ ${await this.getDocumentation("cssRule")}
5612
+
5613
+ I want to update the Next.js server-side page located at ${writePath}.
5614
+ Below is the content of the currently written page.
5615
+ \`\`\`tsx
5616
+ // File: ${writePath}
5617
+ ${pageContent.content}
5618
+ \`\`\`
5619
+
5620
+ Please update this page with the latest content below. A great design application is needed.
5621
+ ${instruction}
5622
+
5623
+ Please follow these CSS rules when writing:
5624
+ - Use tailwindcss
5625
+ - Use className from the daisyui library
5626
+
5627
+ Please return only the file result in the following format for easy parsing.
5628
+ \`\`\`tsx
5629
+ // File: ${writePath}
5630
+ ...pageContent
5631
+ \`\`\`
5632
+ `;
5633
+ return { request, writePath };
5634
+ }
5635
+ async requestUpdateDocumentPage(page, updateRequest) {
5636
+ const writePath = `apps/angelo/app${page}`;
5637
+ if (!this.workspace.exists(writePath))
5638
+ this.workspace.writeFile(
5639
+ writePath,
5640
+ `export default function Page() {
5641
+ return <div>No Content</div>;
5642
+ }
5643
+ `
5644
+ );
5645
+ const instruction = await Prompter.getInstruction(this.name);
5646
+ const pageContent = this.workspace.getLocalFile(writePath);
5647
+ const request = `
5648
+ I'm updating a documentation website for the Akan.js framework.
5649
+
5650
+ I want to update the Next.js server-side page located at ${writePath}.
5651
+ Below is the content of the currently written page. You should update stale infos and preserve the existing content.
5572
5652
  \`\`\`tsx
5573
5653
  // File: ${writePath}
5574
5654
  ${pageContent.content}
5575
5655
  \`\`\`
5576
5656
 
5577
- \uD574\uB2F9 \uD398\uC774\uC9C0\uC5D0 \uC544\uB798 \uB0B4\uC6A9\uC744 \uCD5C\uC2E0\uD654 \uD574\uC11C \uC5C5\uB370\uC774\uD2B8\uD574\uC918. \uADFC\uC0AC\uD55C \uB514\uC790\uC778\uC73C\uB85C \uC801\uC6A9\uC774 \uD544\uC694\uD574.
5657
+ The existing instruction is below.
5658
+ \`\`\`markdown
5578
5659
  ${instruction}
5660
+ \`\`\`
5579
5661
 
5580
- CSS\uADDC\uCE59\uC740 \uB2E4\uC74C\uC744 \uB530\uB77C\uC11C \uC791\uC131\uD574\uC918.
5581
- - tailwindcss\uB97C \uC0AC\uC6A9\uD560 \uAC83
5582
- - daisyui \uB77C\uC774\uBE0C\uB7EC\uB9AC\uC758 className\uC744 \uC0AC\uC6A9\uD560 \uAC83
5662
+ Please update this page with the request below.
5663
+ ${updateRequest}
5583
5664
 
5584
- \uD30C\uC2F1\uD558\uAE30 \uC27D\uAC8C \uD30C\uC77C \uACB0\uACFC\uB9CC \uB2E4\uC74C\uACFC \uAC19\uC740 \uD615\uC2DD\uC73C\uB85C \uBC18\uD658\uD574\uC918.
5665
+ Please return only the file result in the following format for easy parsing.
5585
5666
  \`\`\`tsx
5586
5667
  // File: ${writePath}
5587
5668
  ...pageContent
5588
5669
  \`\`\`
5670
+ `;
5671
+ return { request, writePath };
5672
+ }
5673
+ async requestReapplyInstruction(filePath) {
5674
+ const guideJson = await Prompter.getGuideJson(this.name);
5675
+ const writePath = `${this.workspace.workspaceRoot}/pkgs/@akanjs/cli/src/guidelines/${this.name}/${guideJson.update.filePath}`;
5676
+ if (!guideJson.page)
5677
+ throw new Error(`${this.name} does not have a page.`);
5678
+ const pagePath = `apps/angelo/app${guideJson.page}`;
5679
+ const pageFile = this.workspace.getLocalFile(pagePath);
5680
+ const request = `
5681
+ I want to apply information in the Next.js page to markdown instruction file.
5682
+
5683
+ Here's the newest information in the Next.js page.
5684
+ \`\`\`tsx
5685
+ // File: ${pagePath}
5686
+ ${pageFile.content}
5687
+ \`\`\`
5688
+
5689
+ Here's the existing instruction file.
5690
+ \`\`\`markdown
5691
+ ${await Prompter.getInstruction(this.name)}
5692
+ \`\`\`
5693
+
5694
+ Please update the instruction file with the information in the Next.js page.
5589
5695
  `;
5590
5696
  return { request, writePath };
5591
5697
  }
@@ -5596,18 +5702,44 @@ var GuidelineRunner = class {
5596
5702
  async generateInstruction(workspace, guideName) {
5597
5703
  const session = new AiSession("generateInstruction", { workspace, cacheKey: guideName });
5598
5704
  const prompt = new GuidelinePrompt(workspace, guideName);
5599
- const { request, writePath } = await prompt.requestCreateInstruction();
5705
+ const { guideJson, request, writePath } = await prompt.requestCreateInstruction();
5600
5706
  const guidelineContent = await session.editMarkdown(request);
5601
5707
  workspace.writeFile(writePath, guidelineContent);
5708
+ return { guideJson, session };
5602
5709
  }
5603
- async deployDocPages(workspace, guideName) {
5710
+ async updateInstruction(workspace, guideName, { updateRequest }) {
5711
+ const session = new AiSession("updateInstruction", { workspace, cacheKey: guideName });
5712
+ const prompt = new GuidelinePrompt(workspace, guideName);
5713
+ const { guideJson, request, writePath } = await prompt.requestUpdateInstruction(updateRequest);
5714
+ const guidelineContent = await session.editMarkdown(request);
5715
+ workspace.writeFile(writePath, guidelineContent);
5716
+ return { guideJson, session };
5717
+ }
5718
+ async generateDocument(workspace, guideName) {
5604
5719
  const session = new AiSession("deployDocPages", { workspace, cacheKey: guideName });
5605
5720
  const guideJson = await Prompter.getGuideJson(guideName);
5606
5721
  const prompt = new GuidelinePrompt(workspace, guideName);
5607
- const { request, writePath } = await prompt.requestUpdateDocumentPage(guideJson.page);
5722
+ if (!guideJson.page)
5723
+ return Promise.resolve({});
5724
+ const { request } = await prompt.requestCreateDocumentPage(guideJson.page);
5725
+ await session.writeTypescripts(request, workspace);
5726
+ }
5727
+ async updateDocument(workspace, guideName, { updateRequest, session }) {
5728
+ const guideJson = await Prompter.getGuideJson(guideName);
5729
+ if (!guideJson.page)
5730
+ throw new Error(`${guideName} does not have a page.`);
5731
+ const prompt = new GuidelinePrompt(workspace, guideName);
5732
+ const { request, writePath } = await prompt.requestUpdateDocumentPage(guideJson.page, updateRequest);
5733
+ const guidelineContent = await session.editMarkdown(request);
5734
+ workspace.writeFile(writePath, guidelineContent);
5735
+ }
5736
+ async reapplyInstruction(workspace, guideName) {
5737
+ const session = new AiSession("reapplyInstruction", { workspace, cacheKey: guideName });
5738
+ const guideJson = await Prompter.getGuideJson(guideName);
5739
+ const prompt = new GuidelinePrompt(workspace, guideName);
5740
+ const { request, writePath } = await prompt.requestReapplyInstruction(guideJson.update.filePath);
5608
5741
  const guidelineContent = await session.editMarkdown(request);
5609
5742
  workspace.writeFile(writePath, guidelineContent);
5610
- return Promise.resolve({});
5611
5743
  }
5612
5744
  };
5613
5745
 
@@ -5618,9 +5750,23 @@ var GuidelineScript = class {
5618
5750
  const guideName = name ?? await Prompter.selectGuideline();
5619
5751
  await this.#runner.generateInstruction(workspace, guideName);
5620
5752
  }
5621
- async deployDocPages(workspace, name = null) {
5753
+ async updateInstruction(workspace, name = null, updateRequest) {
5754
+ const guideName = name ?? await Prompter.selectGuideline();
5755
+ const { guideJson, session } = await this.#runner.updateInstruction(workspace, guideName, { updateRequest });
5756
+ if (guideJson.page)
5757
+ await this.updateDocument(workspace, guideName, { updateRequest, session });
5758
+ }
5759
+ async generateDocument(workspace, name = null) {
5622
5760
  const guideName = name ?? await Prompter.selectGuideline();
5623
- await this.#runner.deployDocPages(workspace, guideName);
5761
+ await this.#runner.generateDocument(workspace, guideName);
5762
+ }
5763
+ async updateDocument(workspace, name = null, { updateRequest, session }) {
5764
+ const guideName = name ?? await Prompter.selectGuideline();
5765
+ await this.#runner.updateDocument(workspace, guideName, { updateRequest, session });
5766
+ }
5767
+ async reapplyInstruction(workspace, name = null) {
5768
+ const guideName = name ?? await Prompter.selectGuideline();
5769
+ await this.#runner.reapplyInstruction(workspace, guideName);
5624
5770
  }
5625
5771
  };
5626
5772
 
@@ -5630,8 +5776,14 @@ var GuidelineCommand = class {
5630
5776
  async generateInstruction(name, workspace) {
5631
5777
  await this.guidelineScript.generateInstruction(workspace, name);
5632
5778
  }
5633
- async deployDocs(name, workspace) {
5634
- await this.guidelineScript.deployDocPages(workspace, name);
5779
+ async updateInstruction(name, request, workspace) {
5780
+ await this.guidelineScript.updateInstruction(workspace, name, request);
5781
+ }
5782
+ async generateDocument(name, workspace) {
5783
+ await this.guidelineScript.generateDocument(workspace, name);
5784
+ }
5785
+ async reapplyInstruction(name, workspace) {
5786
+ await this.guidelineScript.reapplyInstruction(workspace, name);
5635
5787
  }
5636
5788
  };
5637
5789
  __decorateClass([
@@ -5639,11 +5791,22 @@ __decorateClass([
5639
5791
  __decorateParam(0, Argument("name", { ask: "name of the instruction", nullable: true })),
5640
5792
  __decorateParam(1, Workspace())
5641
5793
  ], GuidelineCommand.prototype, "generateInstruction", 1);
5794
+ __decorateClass([
5795
+ Target.Public(),
5796
+ __decorateParam(0, Argument("name", { ask: "name of the instruction", nullable: true })),
5797
+ __decorateParam(1, Option("request", { ask: "What do you want to update?" })),
5798
+ __decorateParam(2, Workspace())
5799
+ ], GuidelineCommand.prototype, "updateInstruction", 1);
5800
+ __decorateClass([
5801
+ Target.Public(),
5802
+ __decorateParam(0, Argument("name", { ask: "name of the instruction", nullable: true })),
5803
+ __decorateParam(1, Workspace())
5804
+ ], GuidelineCommand.prototype, "generateDocument", 1);
5642
5805
  __decorateClass([
5643
5806
  Target.Public(),
5644
5807
  __decorateParam(0, Argument("name", { ask: "name of the instruction", nullable: true })),
5645
5808
  __decorateParam(1, Workspace())
5646
- ], GuidelineCommand.prototype, "deployDocs", 1);
5809
+ ], GuidelineCommand.prototype, "reapplyInstruction", 1);
5647
5810
  GuidelineCommand = __decorateClass([
5648
5811
  Commands()
5649
5812
  ], GuidelineCommand);
@@ -5,10 +5,9 @@
5
5
  1. [Component Architecture](#component-architecture)
6
6
  2. [Component Types](#component-types)
7
7
  3. [File Naming Conventions](#file-naming-conventions)
8
- 4. [CSS Rule with TailwindCSS and DaisyUI](#css-rule-with-tailwindcss-and-daisyui)
9
- 5. [Utility Functions](#utility-functions)
10
- 6. [Best Practices](#best-practices)
11
- 7. [Complete Examples](#complete-examples)
8
+ 4. [Utility Functions](#utility-functions)
9
+ 5. [Best Practices](#best-practices)
10
+ 6. [Complete Examples](#complete-examples)
12
11
 
13
12
  ---
14
13
 
@@ -248,83 +247,6 @@ Akan.js uses a strict naming convention to maintain consistency:
248
247
 
249
248
  ---
250
249
 
251
- ## CSS Rule with TailwindCSS and DaisyUI
252
-
253
- Akan.js uses TailwindCSS with DaisyUI for styling. Follow these guidelines:
254
-
255
- ### 1. Class Management
256
-
257
- Always use `clsx` for conditional and composite classes:
258
-
259
- ```tsx
260
- import { clsx } from "@akanjs/client";
261
-
262
- className={clsx(
263
- "base-classes",
264
- condition && "conditional-class",
265
- variant === "primary" ? "primary-class" : "secondary-class",
266
- className // Always include passed className for composition
267
- )}
268
- ```
269
-
270
- ### 2. Color System
271
-
272
- Use DaisyUI's theme colors instead of hardcoded values. This ensures theme consistency and dark/light mode compatibility:
273
-
274
- ```tsx
275
- // Good - uses theme colors
276
- className = "bg-primary text-base-100";
277
-
278
- // Bad - uses hardcoded colors
279
- className = "bg-[#C33C32] text-[#FFFFFF]";
280
- ```
281
-
282
- DaisyUI provides semantic colors:
283
-
284
- - `primary`, `secondary`, `accent` - Brand colors
285
- - `base-100` through `base-900` - Background/text variants
286
- - `info`, `success`, `warning`, `error` - Status colors
287
-
288
- ### 3. Responsive Design
289
-
290
- Use Tailwind's responsive prefixes:
291
-
292
- ```tsx
293
- <div className="flex-col md:flex-row">
294
- <div className="w-full md:w-1/2 lg:w-1/3">Responsive width</div>
295
- <div className="hidden lg:block">Only visible on large screens</div>
296
- </div>
297
- ```
298
-
299
- ### 4. Animation
300
-
301
- Use Tailwind animation classes with transitions:
302
-
303
- ```tsx
304
- <div className="transition-all duration-300 hover:scale-105">
305
- Hover effect
306
- </div>
307
-
308
- <div className="animate-pulse">Loading indicator</div>
309
- ```
310
-
311
- ### 5. Component Styling
312
-
313
- Use DaisyUI components for consistent UIs:
314
-
315
- ```tsx
316
- <button className="btn btn-primary btn-sm">Primary Button</button>
317
-
318
- <div className="card bg-base-200 shadow-md">
319
- <div className="card-body">
320
- <h2 className="card-title">Card Title</h2>
321
- <p>Card content</p>
322
- </div>
323
- </div>
324
- ```
325
-
326
- ---
327
-
328
250
  ## Utility Functions
329
251
 
330
252
  Akan.js provides several utility modules for common frontend tasks: