@akanjs/cli 3.0.0-alpha.4 → 3.0.0-alpha.41

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 (108) hide show
  1. package/.build-stamp +1 -1
  2. package/README.ko.md +1 -1
  3. package/README.md +1 -1
  4. package/{abstractCompactor-rk6twzvj.js → abstractCompactor-20e0cwbs.js} +3 -3
  5. package/{agent.command-jfz8yfwy.js → agent.command-e835fjem.js} +9 -8
  6. package/{application.command-mxyqtd6p.js → application.command-sjtbk6tr.js} +7 -6
  7. package/{applicationBuildRunner-cwk52sb7.js → applicationBuildRunner-7gnfz7ww.js} +7 -8
  8. package/{applicationReleasePackager-yrrhbkv3.js → applicationReleasePackager-93nzdfsy.js} +2 -2
  9. package/buildBatch.proc.js +6 -5
  10. package/{capacitorApp-j357ak1g.js → capacitorApp-qv7g3dp2.js} +29 -28
  11. package/{cloud.command-f87dwe52.js → cloud.command-y0e4eyqz.js} +11 -10
  12. package/{context.command-z5bf8bn7.js → context.command-vn87jb08.js} +17 -16
  13. package/{dependencyScanner-f6grrep3.js → dependencyScanner-rbs2407b.js} +1 -1
  14. package/getDirname-ka11hm7e.js +8 -0
  15. package/{guideline.command-1m1ctar3.js → guideline.command-s4hn2bsy.js} +7 -6
  16. package/guidelines/conventions/conventions.generate.json +25 -0
  17. package/guidelines/conventions/conventions.instruction.md +1193 -0
  18. package/guidelines/cssRule/cssRule.instruction.md +7 -0
  19. package/guidelines/framework/framework.instruction.md +1 -0
  20. package/guidelines/ssrRule/ssrRule.generate.json +31 -0
  21. package/guidelines/ssrRule/ssrRule.instruction.md +108 -0
  22. package/guidelines/workspaceOnboarding/workspaceOnboarding.generate.json +24 -0
  23. package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +972 -0
  24. package/incrementalBuilder.proc.js +7 -6
  25. package/{index-1s71fwrq.js → index-0h212yqe.js} +13 -13
  26. package/index-1577bej2.js +7 -0
  27. package/{index-e3qskyt2.js → index-33zce8gt.js} +8 -4
  28. package/{index-csqk9z5j.js → index-3dp7x6rc.js} +3 -3
  29. package/{index-cn24dcqn.js → index-73rnbwgg.js} +15 -7
  30. package/{index-tq1y56tp.js → index-8d2sv6pw.js} +39 -16
  31. package/{index-jtm86byd.js → index-8vkkm7v0.js} +125 -66
  32. package/{index-r4w8cry5.js → index-9jsnb4vw.js} +4 -4
  33. package/{index-ybybkec0.js → index-becx1t0k.js} +6 -6
  34. package/{index-4yp06pn1.js → index-g9e2fhw2.js} +49 -32
  35. package/{index-cap2k2ch.js → index-hg0qvhmx.js} +152 -241
  36. package/{index-xwgm94zr.js → index-j37qq1f2.js} +1 -1
  37. package/{index-n0z3f2xg.js → index-k6fvbcj1.js} +37 -6
  38. package/{index-6pz1j0zj.js → index-mxvakhsm.js} +6 -2
  39. package/{index-vhv3xnjz.js → index-mykmf6wd.js} +8 -8
  40. package/{index-y0k42k04.js → index-mz5jtaq7.js} +1 -1
  41. package/{index-jk9q6pse.js → index-n706txcv.js} +5 -3
  42. package/{index-hjzr8ja1.js → index-qc0tnhs2.js} +1 -1
  43. package/{index-rh16j3c7.js → index-qnv0aqmm.js} +12 -8
  44. package/{index-3pgtw35d.js → index-sh01r3pm.js} +2 -2
  45. package/{index-xj8bks3p.js → index-t71zvmt9.js} +9 -11
  46. package/{index-4zgs8g1w.js → index-tsmjxph2.js} +1 -1
  47. package/{index-fmgbwsr5.js → index-x33gnap3.js} +4 -4
  48. package/{index-b978vs2e.js → index-xyrb7pk5.js} +3 -3
  49. package/index.js +21 -20
  50. package/{library.command-pwfx8dx2.js → library.command-v5cyaw9t.js} +6 -5
  51. package/{localRegistry.command-r4zjx5py.js → localRegistry.command-53t758pt.js} +10 -9
  52. package/{module.command-0t3ewata.js → module.command-pq6w84xg.js} +10 -9
  53. package/{package.command-7hmkxvpa.js → package.command-qkcs60ts.js} +6 -5
  54. package/package.json +3 -4
  55. package/{page.command-st6r4s0q.js → page.command-qj5bfnh9.js} +6 -5
  56. package/{primitive.command-1qkxpzsn.js → primitive.command-bw0nes6x.js} +11 -10
  57. package/{quality.command-hy5vt1bh.js → quality.command-g1s2wt8b.js} +532 -87
  58. package/{recipeScanner-tghkzrrt.js → recipeScanner-zrzev25x.js} +3 -3
  59. package/{repair.command-nakkq2zp.js → repair.command-mzwtejpk.js} +8 -7
  60. package/{routeSourceValidator-cncd92fv.js → routeSourceValidator-7fycdqyv.js} +3 -39
  61. package/{scalar.command-fjq272gs.js → scalar.command-rm6k3c65.js} +9 -8
  62. package/templates/app/env/env.server.debug.ts.template +1 -5
  63. package/templates/app/env/env.server.develop.ts.template +1 -5
  64. package/templates/app/env/env.server.local.ts.template +1 -5
  65. package/templates/app/env/env.server.main.ts.template +1 -5
  66. package/templates/app/page/styles.css.template +3 -3
  67. package/templates/appSample/srvkit/AuthGuard.ts +9 -5
  68. package/templates/appSample/srvkit/SessionInternalArg.ts +4 -3
  69. package/templates/crudPages/[__model__Id]/edit/page.tsx +1 -1
  70. package/templates/crudPages/new/page.tsx +1 -1
  71. package/templates/crudSinglePage/page.tsx +1 -1
  72. package/templates/env/_env.server.type.ts +7 -5
  73. package/templates/lib/db.ts +4 -2
  74. package/templates/lib/dict.ts +1 -1
  75. package/templates/lib/sig.ts +1 -1
  76. package/templates/lib/srv.ts +6 -2
  77. package/templates/lib/useClient.ts +9 -3
  78. package/templates/module/__Model__.Util.tsx +1 -1
  79. package/templates/module/__Model__.Zone.tsx +3 -5
  80. package/templates/workspaceRoot/AGENTS.md.template +0 -831
  81. package/templates/workspaceRoot/CLAUDE.md.template +19 -0
  82. package/templates/workspaceRoot/biome.json.template +4 -217
  83. package/{typeChecker-kravn7ns.js → typeChecker-g6bh0xfv.js} +1 -1
  84. package/typecheck.proc.js +1 -1
  85. package/{workflow.command-jswbgk90.js → workflow.command-g2cgcgxn.js} +16 -15
  86. package/{workspace.command-h9wwcjpt.js → workspace.command-f7jerqb2.js} +70 -52
  87. package/templates/libRoot/base/baseLogic.ts +0 -14
  88. package/templates/libRoot/base/index.ts +0 -8
  89. package/templates/workspaceRoot/.cursor/rules/akan-page-routing.mdc.template +0 -43
  90. package/templates/workspaceRoot/.cursor/rules/akan-sync-conventions.mdc.template +0 -33
  91. package/templates/workspaceRoot/.cursor/rules/application-test-commands.mdc.template +0 -16
  92. package/templates/workspaceRoot/.cursor/rules/change-scope.mdc.template +0 -12
  93. package/templates/workspaceRoot/.cursor/rules/client-server-boundaries.mdc.template +0 -17
  94. package/templates/workspaceRoot/.cursor/rules/coding-comments.mdc.template +0 -25
  95. package/templates/workspaceRoot/.cursor/rules/coding-style.mdc.template +0 -44
  96. package/templates/workspaceRoot/.cursor/rules/domain-module-conventions.mdc.template +0 -17
  97. package/templates/workspaceRoot/.cursor/rules/format-lint.mdc.template +0 -12
  98. package/templates/workspaceRoot/.cursor/rules/lint-enforced-rules.mdc.template +0 -18
  99. package/templates/workspaceRoot/.cursor/rules/module-file-playbook.mdc.template +0 -61
  100. package/templates/workspaceRoot/.cursor/rules/naming-conventions.mdc.template +0 -15
  101. package/templates/workspaceRoot/.cursor/rules/react-component-style.mdc.template +0 -21
  102. package/templates/workspaceRoot/.cursor/rules/repo-overview.mdc.template +0 -17
  103. package/templates/workspaceRoot/.cursor/rules/scalar-modeling.mdc.template +0 -58
  104. package/templates/workspaceRoot/.cursor/rules/secrets-and-env.mdc.template +0 -13
  105. package/templates/workspaceRoot/.cursor/rules/service-signal-conventions.mdc.template +0 -83
  106. package/templates/workspaceRoot/.cursor/rules/srvkit-adapters-and-guards.mdc.template +0 -50
  107. package/templates/workspaceRoot/.cursor/rules/typescript-imports.mdc.template +0 -16
  108. /package/{index-r24hmh0q.js → index-yb2wsc7f.js} +0 -0
@@ -1,3 +1,22 @@
1
1
  # <%= repoName %> — Claude Code Guide
2
2
 
3
3
  @AGENTS.md
4
+
5
+ ## Comments — Overrides Your Default
6
+
7
+ Write **no comments** unless the comment passes the test below. This is the rule agents break most often here, so it
8
+ is repeated outside the guide: a diff that adds a comment the test rejects is a diff to redo.
9
+
10
+ Before typing `//`, `/*`, or a doc block, ask — **does this sentence carry a fact that is nowhere in the code?**
11
+
12
+ - Restates the identifier, the signature, or the line under it → delete it.
13
+ - Labels a section (`// helpers`, `// state`) or narrates a step (`// fetch the user`, `// then save`) → delete it.
14
+ - JSDoc on an ordinary function, or a why/how preamble on ordinary logic → delete it.
15
+ - Explains the edit you just made, for whoever reads the diff → say it in your reply, not in the file.
16
+ - Names a vendor or protocol quirk, an infrastructure constraint, a library gotcha, security reasoning, a math
17
+ derivation, a domain field's business meaning, a state transition, or why an obvious alternative was rejected →
18
+ keep it, one line.
19
+
20
+ That keep-list is exact — `Comments` in the guide is the full version. "It aids readability" and "this logic is
21
+ subtle" are not on it: rename or split the code instead. When you edit an existing file, match its density; if the
22
+ surrounding code carries none, your diff carries none.
@@ -1,234 +1,21 @@
1
1
  {
2
- "$schema": "https://biomejs.dev/schemas/2.5.2/schema.json",
3
- "vcs": {
4
- "enabled": true,
5
- "clientKind": "git",
6
- "useIgnoreFile": false
7
- },
2
+ "$schema": "https://biomejs.dev/schemas/2.5.8/schema.json",
3
+ "extends": ["@akanjs/devkit/biome.base.json"],
8
4
  "files": {
9
5
  "includes": [
10
6
  "**/*.ts",
11
7
  "**/*.tsx",
12
8
  "**/*.json",
13
9
  "**/*.jsonc",
14
- "!**/env.client.local.ts",
15
- "!**/env.client.debug.ts",
16
- "!**/env.client.develop.ts",
17
- "!**/env.client.main.ts",
18
- "!**/env.client.testing.ts",
19
- "!**/env.server.local.ts",
20
- "!**/env.server.develop.ts",
21
- "!**/env.server.main.ts",
22
- "!**/env.server.testing.ts",
23
- "!**/env.server.type.ts",
24
- "!apps/*/lib/cnst.ts",
25
- "!apps/*/lib/dict.ts",
26
- "!apps/*/lib/db.ts",
27
- "!apps/*/lib/srv.ts",
28
- "!apps/*/lib/st.ts",
29
- "!apps/*/lib/sig.ts",
30
- "!apps/*/lib/useClient.ts",
31
- "!apps/*/lib/useServer.ts",
32
- "!apps/*/client.ts",
33
- "!apps/*/server.ts",
34
- "!apps/*/lib/*/index.tsx",
35
- "!libs/*/lib/cnst.ts",
36
- "!libs/*/lib/dict.ts",
37
- "!libs/*/lib/db.ts",
38
- "!libs/*/lib/srv.ts",
39
- "!libs/*/lib/st.ts",
40
- "!libs/*/lib/sig.ts",
41
- "!libs/*/lib/useClient.ts",
42
- "!libs/*/lib/useServer.ts",
43
- "!libs/*/client.ts",
44
- "!libs/*/server.ts",
45
- "!libs/*/index.ts",
46
- "!libs/*/lib/*/index.tsx",
47
10
  "!infra/master/createRecords.ts",
48
11
  "!pkgs/contract/env.ts",
49
12
  "!!**/node_modules",
50
13
  "!!**/dist",
51
14
  "!!**/.akan",
15
+ "!!**/.claude",
52
16
  "!!**/dump",
53
17
  "!!**/local",
54
18
  "!!**/ios/DerivedData"
55
19
  ]
56
- },
57
- "formatter": {
58
- "enabled": true,
59
- "indentStyle": "space",
60
- "indentWidth": 2,
61
- "lineWidth": 120
62
- },
63
- "linter": {
64
- "enabled": true,
65
- "rules": {
66
- "preset": "recommended",
67
- "suspicious": {
68
- "noConsole": {
69
- "level": "error",
70
- "options": {
71
- "allow": ["assert", "error", "info", "warn"]
72
- }
73
- },
74
- "noArrayIndexKey": "off",
75
- "noShadowRestrictedNames": "off",
76
- "noUnnecessaryConditions": {
77
- "level": "error"
78
- }
79
- },
80
- "correctness": {
81
- "noUnusedFunctionParameters": "off",
82
- "noUnusedImports": {
83
- "level": "error",
84
- "fix": "safe"
85
- },
86
- "useParseIntRadix": "off",
87
- "useExhaustiveDependencies": "off",
88
- "useHookAtTopLevel": "off"
89
- },
90
- "nursery": {
91
- "useSortedClasses": {
92
- "level": "error",
93
- "fix": "safe",
94
- "options": {
95
- "attributes": ["classList"],
96
- "functions": ["clsx", "cn"]
97
- }
98
- }
99
- },
100
- "a11y": "off",
101
- "complexity": {
102
- "noStaticOnlyClass": "off"
103
- },
104
- "style": {
105
- "useTemplate": {
106
- "level": "warn",
107
- "fix": "safe"
108
- }
109
- }
110
- },
111
- "domains": {
112
- "project": "recommended",
113
- "react": "recommended",
114
- "test": "recommended",
115
- "types": "all"
116
- }
117
- },
118
- "javascript": {
119
- "parser": {
120
- "unsafeParameterDecoratorsEnabled": true
121
- },
122
- "formatter": {
123
- "quoteStyle": "double"
124
- }
125
- },
126
- "assist": {
127
- "enabled": true,
128
- "actions": {
129
- "source": {
130
- "organizeImports": "on"
131
- }
132
- }
133
- },
134
- "overrides": [
135
- {
136
- "includes": [
137
- "apps/**/*.ts",
138
- "apps/**/*.tsx",
139
- "libs/**/*.ts",
140
- "libs/**/*.tsx",
141
- "!**/*.test.ts",
142
- "!**/*.test.tsx",
143
- "!**/*.spec.ts",
144
- "!**/*.spec.tsx",
145
- "!**/*.constant.ts",
146
- "!**/common/**"
147
- ],
148
- "plugins": ["./node_modules/@akanjs/devkit/lint/no-throw-raw-error.grit"]
149
- },
150
- {
151
- "includes": ["**/page/**/*.ts", "**/page/**/*.tsx", "**/*.Unit.tsx", "**/*.View.tsx"],
152
- "plugins": [
153
- "./node_modules/@akanjs/devkit/lint/no-import-client-functions.grit",
154
- "./node_modules/@akanjs/devkit/lint/no-use-client-in-server.grit"
155
- ]
156
- },
157
- {
158
- "includes": ["**/page/**/*.ts", "**/page/**/*.tsx"],
159
- "plugins": ["./node_modules/@akanjs/devkit/lint/non-scalar-props-restricted.grit"]
160
- },
161
- {
162
- "includes": ["**/*.constant.ts", "**/*.document.ts", "**/*.service.ts", "**/*.store.ts"],
163
- "plugins": ["./node_modules/@akanjs/devkit/lint/no-js-private-class-method.grit"]
164
- },
165
- {
166
- "includes": ["**/*.signal.ts"],
167
- "plugins": ["./node_modules/@akanjs/devkit/lint/no-redeclare-predefined-endpoint.grit"]
168
- },
169
- {
170
- "includes": [
171
- "**/*.constant.ts",
172
- "**/*.dictionary.ts",
173
- "**/*.document.ts",
174
- "**/*.service.ts",
175
- "**/*.signal.ts",
176
- "**/*.store.ts",
177
- "**/*.Template.tsx",
178
- "**/*.Unit.tsx",
179
- "**/*.Util.tsx",
180
- "**/*.View.tsx",
181
- "**/*.Zone.tsx"
182
- ],
183
- "plugins": ["./node_modules/@akanjs/devkit/lint/no-deep-internal-import.grit"]
184
- },
185
- {
186
- "includes": [
187
- "**/page/**/*.ts",
188
- "**/page/**/*.tsx",
189
- "**/index.ts",
190
- "**/index.tsx",
191
- "**/cnst.ts",
192
- "**/db.ts",
193
- "**/dict.ts",
194
- "**/option.ts",
195
- "**/sig.ts",
196
- "**/srv.ts",
197
- "**/st.ts",
198
- "**/*.constant.ts",
199
- "**/*.dictionary.ts",
200
- "**/*.document.ts",
201
- "**/*.service.ts",
202
- "**/*.signal.ts",
203
- "**/*.signal.test.ts",
204
- "**/*.service.test.ts",
205
- "**/*.store.ts",
206
- "**/*.Template.tsx",
207
- "**/*.Unit.tsx",
208
- "**/*.Util.tsx",
209
- "**/*.View.tsx",
210
- "**/*.Zone.tsx"
211
- ],
212
- "plugins": ["./node_modules/@akanjs/devkit/lint/no-import-external-library.grit"]
213
- },
214
- {
215
- "includes": [
216
- "apps/**/*.ts",
217
- "apps/**/*.tsx",
218
- "libs/**/*.ts",
219
- "libs/**/*.tsx",
220
- "!**/*.test.ts",
221
- "!**/*.test.tsx",
222
- "!**/*.spec.ts",
223
- "!**/*.spec.tsx"
224
- ],
225
- "plugins": [
226
- "./node_modules/@akanjs/devkit/lint/no-raw-palette-class.grit",
227
- "./node_modules/@akanjs/devkit/lint/no-arbitrary-color.grit",
228
- "./node_modules/@akanjs/devkit/lint/no-daisyui-legacy-class.grit",
229
- "./node_modules/@akanjs/devkit/lint/no-inline-color.grit",
230
- "./node_modules/@akanjs/devkit/lint/no-interpolated-arbitrary-class.grit"
231
- ]
232
- }
233
- ]
20
+ }
234
21
  }
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  TypeChecker
4
4
  } from "./index-wnp7hwq7.js";
5
- import"./index-r24hmh0q.js";
5
+ import"./index-yb2wsc7f.js";
6
6
  export {
7
7
  TypeChecker
8
8
  };
package/typecheck.proc.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  TypeChecker
4
4
  } from "./index-wnp7hwq7.js";
5
- import"./index-r24hmh0q.js";
5
+ import"./index-yb2wsc7f.js";
6
6
 
7
7
  // pkgs/@akanjs/devkit/typecheck/typecheck.proc.ts
8
8
  import { Logger } from "akanjs/common";
@@ -1,34 +1,35 @@
1
1
  // @bun
2
2
  import {
3
3
  WorkflowRunner
4
- } from "./index-csqk9z5j.js";
4
+ } from "./index-3dp7x6rc.js";
5
+ import {
6
+ ScalarScript
7
+ } from "./index-x33gnap3.js";
5
8
  import {
6
9
  PrimitiveScript
7
- } from "./index-r4w8cry5.js";
10
+ } from "./index-9jsnb4vw.js";
8
11
  import {
9
12
  ModuleScript
10
- } from "./index-vhv3xnjz.js";
11
- import"./index-hjzr8ja1.js";
12
- import {
13
- ScalarScript
14
- } from "./index-fmgbwsr5.js";
13
+ } from "./index-mykmf6wd.js";
15
14
  import"./index-ss469dec.js";
16
- import"./index-3pgtw35d.js";
17
- import"./index-4yp06pn1.js";
15
+ import"./index-qc0tnhs2.js";
16
+ import"./index-sh01r3pm.js";
17
+ import"./index-g9e2fhw2.js";
18
18
  import {
19
19
  createWorkflowStepRegistry
20
- } from "./index-4zgs8g1w.js";
21
- import"./index-xwgm94zr.js";
20
+ } from "./index-tsmjxph2.js";
21
+ import"./index-j37qq1f2.js";
22
22
  import {
23
23
  Workspace,
24
24
  command,
25
25
  script
26
- } from "./index-jk9q6pse.js";
27
- import"./index-jtm86byd.js";
28
- import"./index-6pz1j0zj.js";
26
+ } from "./index-n706txcv.js";
27
+ import"./index-8vkkm7v0.js";
28
+ import"./index-mxvakhsm.js";
29
29
  import"./index-xys926f2.js";
30
+ import"./index-1577bej2.js";
30
31
  import"./index-67546d0j.js";
31
- import"./index-r24hmh0q.js";
32
+ import"./index-yb2wsc7f.js";
32
33
 
33
34
  // pkgs/@akanjs/cli/workflow/workflow.script.ts
34
35
  import { Logger } from "akanjs/common";
@@ -1,48 +1,48 @@
1
1
  // @bun
2
2
  import {
3
3
  ContextScript
4
- } from "./index-1s71fwrq.js";
5
- import"./index-b978vs2e.js";
6
- import"./index-csqk9z5j.js";
7
- import"./index-r4w8cry5.js";
8
- import"./index-vhv3xnjz.js";
9
- import"./index-hjzr8ja1.js";
4
+ } from "./index-0h212yqe.js";
5
+ import"./index-xyrb7pk5.js";
6
+ import"./index-3dp7x6rc.js";
7
+ import"./index-x33gnap3.js";
8
+ import"./index-9jsnb4vw.js";
9
+ import"./index-mykmf6wd.js";
10
+ import"./index-ss469dec.js";
11
+ import"./index-qc0tnhs2.js";
10
12
  import {
11
13
  CloudScript
12
- } from "./index-ybybkec0.js";
14
+ } from "./index-becx1t0k.js";
13
15
  import {
14
16
  getLatestPackageVersion,
15
17
  getNpmRegistryUrl
16
- } from "./index-xj8bks3p.js";
18
+ } from "./index-t71zvmt9.js";
17
19
  import {
18
20
  PackageScript
19
- } from "./index-e3qskyt2.js";
20
- import"./index-fmgbwsr5.js";
21
- import"./index-ss469dec.js";
22
- import"./index-y0k42k04.js";
21
+ } from "./index-33zce8gt.js";
22
+ import"./index-mz5jtaq7.js";
23
23
  import {
24
24
  GlobalConfig
25
- } from "./index-3pgtw35d.js";
25
+ } from "./index-sh01r3pm.js";
26
26
  import {
27
27
  AgentScript
28
- } from "./index-n0z3f2xg.js";
29
- import"./index-4yp06pn1.js";
30
- import"./index-4zgs8g1w.js";
31
- import"./index-xwgm94zr.js";
28
+ } from "./index-k6fvbcj1.js";
29
+ import"./index-g9e2fhw2.js";
30
+ import"./index-tsmjxph2.js";
31
+ import"./index-j37qq1f2.js";
32
32
  import {
33
33
  ApplicationScript
34
- } from "./index-tq1y56tp.js";
35
- import"./index-76rn3g2c.js";
34
+ } from "./index-8d2sv6pw.js";
36
35
  import {
37
36
  LibraryScript
38
- } from "./index-cn24dcqn.js";
37
+ } from "./index-73rnbwgg.js";
38
+ import"./index-76rn3g2c.js";
39
39
  import {
40
40
  Exec,
41
41
  Workspace,
42
42
  command,
43
43
  runner,
44
44
  script
45
- } from "./index-jk9q6pse.js";
45
+ } from "./index-n706txcv.js";
46
46
  import"./index-fgc8r6dj.js";
47
47
  import {
48
48
  ThemeValidator,
@@ -59,29 +59,30 @@ import {
59
59
  collectScopeRecipeSources,
60
60
  extractAgentBlock,
61
61
  renderScopeAgentBlock
62
- } from "./index-jtm86byd.js";
63
- import"./index-6pz1j0zj.js";
62
+ } from "./index-8vkkm7v0.js";
63
+ import"./index-mxvakhsm.js";
64
64
  import {
65
65
  collectRecipeSources,
66
66
  scanRecipes
67
67
  } from "./index-xys926f2.js";
68
+ import"./index-1577bej2.js";
68
69
  import"./index-46tjzh6s.js";
69
70
  import {
70
71
  FileSys
71
72
  } from "./index-67546d0j.js";
72
- import"./index-r24hmh0q.js";
73
-
74
- // pkgs/@akanjs/cli/workspace/workspace.script.ts
75
- import path2 from "path";
76
- import { Logger } from "akanjs/common";
73
+ import"./index-yb2wsc7f.js";
77
74
 
78
75
  // pkgs/@akanjs/cli/workspace/workspace.runner.ts
79
76
  import path from "path";
77
+
78
+ // pkgs/@akanjs/devkit/biomeBase.ts
79
+ var biomeVersion = "2.5.8";
80
+
81
+ // pkgs/@akanjs/cli/workspace/workspace.runner.ts
80
82
  var defaultWorkspacePeerDependencies = new Set([
81
83
  "@react-spring/web",
82
84
  "@use-gesture/react",
83
85
  "chance",
84
- "croner",
85
86
  "react",
86
87
  "react-dom",
87
88
  "react-icons",
@@ -93,6 +94,7 @@ var defaultWorkspacePeerDependencies = new Set([
93
94
  "tailwindcss",
94
95
  "typescript"
95
96
  ]);
97
+ var defaultMaxDiagnostics = 200;
96
98
 
97
99
  class WorkspaceRunner extends runner("workspace") {
98
100
  async generateAgentRules(workspace, { overwrite = false, cursorRules = true } = {}) {
@@ -113,17 +115,14 @@ class WorkspaceRunner extends runner("workspace") {
113
115
  dict,
114
116
  overwrite
115
117
  }));
116
- if (!cursorRules)
117
- return created;
118
- return [
119
- ...created,
120
- ...await workspace.applyTemplate({
118
+ if (cursorRules)
119
+ created.push(...await workspace.applyTemplate({
121
120
  basePath: ".cursor/rules",
122
121
  template: "workspaceRoot/.cursor/rules/akan.mdc.template",
123
122
  dict,
124
123
  overwrite
125
- })
126
- ];
124
+ }));
125
+ return created;
127
126
  }
128
127
  async createWorkspace(repoName, appName, {
129
128
  dirname = ".",
@@ -137,10 +136,7 @@ class WorkspaceRunner extends runner("workspace") {
137
136
  const normalizedRegistryUrl = registryUrl ? getNpmRegistryUrl(registryUrl) : undefined;
138
137
  const workspace = WorkspaceExecutor.fromRoot({ workspaceRoot, repoName });
139
138
  const templateSpinner = workspace.spinning(`Creating workspace template files in ${dirname}/${repoName}...`);
140
- const [latestBiomeVersion, latestTypesBunVersion] = await Promise.all([
141
- getLatestPackageVersion("@biomejs/biome", "latest", normalizedRegistryUrl),
142
- getLatestPackageVersion("@types/bun", "latest", normalizedRegistryUrl)
143
- ]);
139
+ const latestTypesBunVersion = await getLatestPackageVersion("@types/bun", "latest", normalizedRegistryUrl);
144
140
  await workspace.applyTemplate({
145
141
  basePath: ".",
146
142
  template: "workspaceRoot",
@@ -164,7 +160,7 @@ class WorkspaceRunner extends runner("workspace") {
164
160
  },
165
161
  devDependencies: {
166
162
  ...rootPackageJson.devDependencies,
167
- "@biomejs/biome": latestBiomeVersion,
163
+ "@biomejs/biome": biomeVersion,
168
164
  "@types/bun": latestTypesBunVersion,
169
165
  "@akanjs/devkit": akanVersion,
170
166
  ...typescript ? { typescript } : {}
@@ -236,17 +232,28 @@ class WorkspaceRunner extends runner("workspace") {
236
232
  }
237
233
  throw new Error(`[workspace] failed to locate akanjs package.json from ${import.meta.dir}`);
238
234
  }
239
- async lint(exec, workspace, { fix = true } = {}) {
235
+ async lint(exec, workspace, { fix = true, maxDiagnostics = defaultMaxDiagnostics } = {}) {
236
+ const configPath = await WorkspaceRunner.resolveBiomeConfigPath(workspace);
240
237
  await workspace.spawn("./node_modules/.bin/biome", [
241
238
  "check",
242
239
  ...fix ? ["--write"] : [],
243
240
  "--no-errors-on-unmatched",
241
+ `--max-diagnostics=${maxDiagnostics > 0 ? maxDiagnostics : "none"}`,
242
+ ...configPath ? ["--config-path", configPath] : [],
244
243
  exec.cwdPath
245
244
  ]);
246
245
  await this.#enforceStyleContract(exec);
247
246
  await this.#enforceRecipeGate(exec);
248
247
  await this.#enforceAgentsIndex(exec);
249
248
  }
249
+ static async resolveBiomeConfigPath(workspace) {
250
+ for (const fileName of ["biome.json", "biome.jsonc"]) {
251
+ const configPath = path.join(workspace.workspaceRoot, fileName);
252
+ if (await Bun.file(configPath).exists())
253
+ return configPath;
254
+ }
255
+ return null;
256
+ }
250
257
  async#enforceAgentsIndex(exec) {
251
258
  if (!(exec instanceof SysExecutor))
252
259
  return;
@@ -314,6 +321,8 @@ AKAN_PUBLIC_LOG_LEVEL=debug
314
321
  }
315
322
 
316
323
  // pkgs/@akanjs/cli/workspace/workspace.script.ts
324
+ import path2 from "path";
325
+ import { Logger } from "akanjs/common";
317
326
  class WorkspaceScript extends script("workspace", [
318
327
  WorkspaceRunner,
319
328
  ApplicationScript,
@@ -372,30 +381,33 @@ class WorkspaceScript extends script("workspace", [
372
381
  async generateAgentRules(workspace, { overwrite = false, cursorRules = true } = {}) {
373
382
  const spinner = workspace.spinning("Generating agent rules...");
374
383
  const files = await this.workspaceRunner.generateAgentRules(workspace, { overwrite, cursorRules });
384
+ if (files.some((file) => file.filePath.endsWith("AGENTS.md")))
385
+ await this.agentScript.agent(workspace, "install", "agents-md", { force: overwrite });
375
386
  spinner.succeed(`Agent rules ready (${files.length} file${files.length === 1 ? "" : "s"})`);
376
387
  }
377
- async lint(exec, workspace, { fix = true } = {}) {
388
+ async lint(exec, workspace, { fix = true, maxDiagnostics } = {}) {
378
389
  if (exec instanceof AppExecutor)
379
390
  await this.applicationScript.sync(exec);
380
391
  else if (exec instanceof LibExecutor)
381
392
  await this.libraryScript.syncLibrary(exec);
382
393
  const spinner = workspace.spinning(`Linting${fix ? " with fix" : ""}...`);
383
394
  try {
384
- await this.workspaceRunner.lint(exec, workspace, { fix });
395
+ await this.workspaceRunner.lint(exec, workspace, { fix, maxDiagnostics });
385
396
  spinner.succeed("Lint completed with no errors");
386
397
  } catch (error) {
387
398
  spinner.fail("Lint failed with errors");
388
399
  throw error;
389
400
  }
390
401
  }
391
- async lintAll(workspace, { fix = true } = {}) {
402
+ async lintAll(workspace, { fix = true, maxDiagnostics } = {}) {
392
403
  const [appNames, libNames, pkgNames] = await workspace.getExecs();
404
+ const options = { fix, maxDiagnostics };
393
405
  await Promise.all(appNames.map((appName) => this.applicationScript.sync(AppExecutor.from(workspace, appName))));
394
406
  await Promise.all(libNames.map((libName) => this.libraryScript.syncLibrary(LibExecutor.from(workspace, libName))));
395
407
  await Promise.all([
396
- ...appNames.map((appName) => this.workspaceRunner.lint(AppExecutor.from(workspace, appName), workspace, { fix })),
397
- ...libNames.map((libName) => this.workspaceRunner.lint(LibExecutor.from(workspace, libName), workspace, { fix })),
398
- ...pkgNames.filter((pkgName) => pkgName !== "contract").map((pkgName) => this.workspaceRunner.lint(PkgExecutor.from(workspace, pkgName), workspace, { fix }))
408
+ ...appNames.map((appName) => this.workspaceRunner.lint(AppExecutor.from(workspace, appName), workspace, options)),
409
+ ...libNames.map((libName) => this.workspaceRunner.lint(LibExecutor.from(workspace, libName), workspace, options)),
410
+ ...pkgNames.filter((pkgName) => pkgName !== "contract").map((pkgName) => this.workspaceRunner.lint(PkgExecutor.from(workspace, pkgName), workspace, options))
399
411
  ]);
400
412
  }
401
413
  async syncAll(workspace) {
@@ -477,11 +489,17 @@ class WorkspaceCommand extends command("workspace", [WorkspaceScript], ({ public
477
489
  }).option("overwrite", Boolean, { desc: "Overwrite existing agent rule files", default: false }).option("cursorRules", Boolean, { desc: "Generate .cursor/rules/akan.mdc", default: true }).with(Workspace).exec(async function(overwrite, cursorRules, workspace) {
478
490
  await this.workspaceScript.generateAgentRules(workspace, { overwrite, cursorRules });
479
491
  }),
480
- lint: target({ desc: "Lint and fix code in a specific app/lib/pkg" }).with(Exec).option("fix", Boolean, { default: true }).with(Workspace).exec(async function(exec, fix, workspace) {
481
- await this.workspaceScript.lint(exec, workspace, { fix });
492
+ lint: target({ desc: "Lint and fix code in a specific app/lib/pkg" }).with(Exec).option("fix", Boolean, { default: true }).option("maxDiagnostics", Number, {
493
+ desc: "How many diagnostics Biome prints before truncating (0 for no limit)",
494
+ default: defaultMaxDiagnostics
495
+ }).with(Workspace).exec(async function(exec, fix, maxDiagnostics, workspace) {
496
+ await this.workspaceScript.lint(exec, workspace, { fix, maxDiagnostics });
482
497
  }),
483
- lintAll: target({ desc: "Lint and fix code in all apps and libraries" }).option("fix", Boolean, { default: true }).with(Workspace).exec(async function(fix, workspace) {
484
- await this.workspaceScript.lintAll(workspace, { fix });
498
+ lintAll: target({ desc: "Lint and fix code in all apps and libraries" }).option("fix", Boolean, { default: true }).option("maxDiagnostics", Number, {
499
+ desc: "How many diagnostics Biome prints before truncating (0 for no limit)",
500
+ default: defaultMaxDiagnostics
501
+ }).with(Workspace).exec(async function(fix, maxDiagnostics, workspace) {
502
+ await this.workspaceScript.lintAll(workspace, { fix, maxDiagnostics });
485
503
  }),
486
504
  syncAll: target({ desc: "Sync dependencies and configuration for all apps and libraries" }).with(Workspace).exec(async function(workspace) {
487
505
  await this.workspaceScript.syncAll(workspace);
@@ -1,14 +0,0 @@
1
- interface Dict {
2
- libName: string;
3
- }
4
- export default function getContent(scanInfo: null, dict: Dict) {
5
- return `
6
- // 현 디렉토리에서는 프로젝트 내 전체적으로 사용되는 로직을 구현하며, 따라서 백/프론트 비의존적인 pure js 코드만 구현 가능합니다.
7
- // common폴더와 다른점은, base 코드는 시스템 전체에서 import되어 사용되므로, 가장 핵심적인 로직과 추상화된 기능만 구현해야합니다.
8
- // @${dict.libName}/base에서는 서버/클라이언트 관련 라이브러리(@*/server, @*/server, @*/client, @*/client)를 모두 import할 수 없으며, @*/base 라이브러리만 import 가능합니다.
9
-
10
- export const someBaseLogic = () => {
11
- //
12
- };
13
- `;
14
- }
@@ -1,8 +0,0 @@
1
- interface Dict {
2
- [key: string]: string;
3
- }
4
- export default function getContent(scanInfo: null, dict: Dict = {}) {
5
- return `
6
- export * from "./baseLogic";
7
- `;
8
- }
@@ -1,43 +0,0 @@
1
- ---
2
- description: Akan page routing conventions
3
- globs: apps/**/page/**/*.{ts,tsx,js,jsx}
4
- alwaysApply: false
5
- ---
6
-
7
- # Akan Page Routing
8
-
9
- - `apps/<app>/page` may contain route modules only. Do not add helper logic or component-only files there.
10
- - Route source files under `page/` must use `.tsx`. Do not add `logic.ts`, `.js`, or `.jsx` files under `page/`.
11
- - Route pages use `_index.tsx`; layouts use `_layout.tsx`.
12
- - Reserved `_*.tsx` route filenames are limited to `_index.tsx` and `_layout.tsx`; do not add files like `_Component.tsx` or `_helper.tsx`.
13
- - Page filenames must not start with an uppercase letter. Move helper components like `Component.tsx` to app `ui`, `common`, or `lib` instead.
14
- - Dynamic segments use `[id]`; route groups use directories like `(user)`, `(public)`, `(tab)`, or `(detail)`.
15
- - Page modules should usually export `default`, `pageConfig`, `head`, `generateHead`, or `Loading`.
16
- - Prefer `export default function Page` or `export default async function Page` for page components.
17
- - Before changing route behavior, check nearby routes for the expected pattern.
18
-
19
- ## Page Body Shape
20
-
21
- ```tsx
22
- interface PageProps {
23
- params: { taskId: string };
24
- }
25
-
26
- export default async function Page({ params }: PageProps) {
27
- const { l } = usePage();
28
- getSelf({ unauthorize: "/signin" });
29
- const { taskId } = params;
30
- const [{ task }] = await Promise.all([fetch.viewTask(taskId)]);
31
- return <Task.View.General task={task} />;
32
- }
33
-
34
- export const pageConfig = { transition: "stack" } satisfies PageConfig;
35
- ```
36
-
37
- - There is no `loader=` / `render=` page prop. Pages are `export default async function Page`.
38
- - Declare `interface PageProps { params: {...}; searchParams?: {...} }` immediately above the default export.
39
- - Body order: `usePage()`, auth, destructure params, fetch, return.
40
- - Run independent fetches through `Promise.all`, even when there is only one.
41
- - Gate auth at `_layout.tsx`; repeating `getSelf({ unauthorize: "/signin" })` in the page is fine and common.
42
- - Keep `async` even when nothing is awaited — it marks a real server page.
43
- - No `useState`, no `useEffect`, and no comments in page files.