@akanjs/cli 3.0.0-alpha.8 → 3.0.0-alpha.81
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/.build-stamp +1 -1
- package/README.ko.md +1 -1
- package/README.md +1 -1
- package/{abstractCompactor-e5yq60qz.js → abstractCompactor-pwc6d6yk.js} +3 -5
- package/{agent.command-pggr92jj.js → agent.command-180hh0ye.js} +11 -12
- package/{application.command-692yap1d.js → application.command-4fq5pmdd.js} +59 -35
- package/{applicationBuildRunner-ha3y8ew8.js → applicationBuildRunner-tavpx3fv.js} +22 -20
- package/{applicationReleasePackager-gg8ccbeh.js → applicationReleasePackager-ktjt0erc.js} +8 -9
- package/buildBatch.proc.js +12 -13
- package/capacitorApp-kwa67kzs.js +12 -0
- package/{cloud.command-wqfsyzv2.js → cloud.command-wm3mtfve.js} +15 -17
- package/commandManifest.json +1 -1
- package/{context.command-9bxtdn0w.js → context.command-dk2m2sjx.js} +19 -22
- package/dependencyScanner-c64m6fxp.js +8 -0
- package/getDirname-dr3jz1xg.js +7 -0
- package/{guideline.command-nfqahxex.js → guideline.command-w6ddv13r.js} +16 -17
- package/guidelines/agentRule/agentRule.generate.json +31 -0
- package/guidelines/agentRule/agentRule.instruction.md +525 -0
- package/guidelines/conventions/conventions.generate.json +25 -0
- package/guidelines/conventions/conventions.instruction.md +847 -0
- package/guidelines/cssRule/cssRule.instruction.md +7 -0
- package/guidelines/framework/framework.generate.json +3 -2
- package/guidelines/framework/framework.instruction.md +1 -9
- package/guidelines/mcpRule/mcpRule.generate.json +25 -0
- package/guidelines/mcpRule/mcpRule.instruction.md +217 -0
- package/guidelines/queryRule/queryRule.generate.json +31 -0
- package/guidelines/queryRule/queryRule.instruction.md +143 -0
- package/guidelines/runtimeRule/runtimeRule.generate.json +25 -0
- package/guidelines/runtimeRule/runtimeRule.instruction.md +176 -0
- package/guidelines/ssrRule/ssrRule.instruction.md +49 -5
- package/guidelines/transportRule/transportRule.generate.json +31 -0
- package/guidelines/transportRule/transportRule.instruction.md +60 -0
- package/guidelines/workspaceOnboarding/workspaceOnboarding.generate.json +24 -0
- package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +263 -0
- package/guidelines/workspaceRecipes/workspaceRecipes.generate.json +33 -0
- package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +402 -0
- package/incrementalBuilder.proc.js +21 -22
- package/{index-4hek879p.js → index-1kzsn94d.js} +1 -1
- package/{index-p3f4q532.js → index-1tgp56ke.js} +31 -30
- package/index-3d9y066c.js +76 -0
- package/{index-76rn3g2c.js → index-47pj3aee.js} +4 -4
- package/{index-gex7c8kd.js → index-5n0hf8r9.js} +65 -38
- package/{index-mssqn2sq.js → index-5y7qba1c.js} +79 -33
- package/index-6wwzs1bc.js +7 -0
- package/{index-wnp7hwq7.js → index-92zztqy1.js} +7 -7
- package/{index-fgc8r6dj.js → index-a5vmm6x4.js} +3 -1
- package/{index-azv0xjb5.js → index-a8h184wr.js} +15 -11
- package/{index-67546d0j.js → index-ayy5ecax.js} +1 -1
- package/{index-xhgtkekh.js → index-b2nt0w0k.js} +27 -27
- package/{index-xys926f2.js → index-by5gpp8x.js} +4 -4
- package/{index-bz2sfzzt.js → index-cd5x18qh.js} +32 -32
- package/{index-bjpxzr6s.js → index-ctphds8v.js} +1 -1
- package/{index-w6wbb612.js → index-dq6wq1tv.js} +94 -61
- package/{index-6rhabeev.js → index-ft1sfjz0.js} +36 -25
- package/{index-7myvn0f0.js → index-h7yw2z9n.js} +7 -7
- package/{index-5pmx7bkg.js → index-j9vnq8tr.js} +18 -18
- package/{index-vg0sj9nc.js → index-k1n0h7dk.js} +840 -201
- package/{index-vtj3zps1.js → index-k86zc21w.js} +57 -57
- package/{index-5dw57f0d.js → index-m7e0f1sy.js} +155 -76
- package/index-m9c7k0gm.js +159 -0
- package/{index-46tjzh6s.js → index-mfm35dhh.js} +29 -29
- package/{index-xjd3rqzj.js → index-n68jx79w.js} +6 -15
- package/{index-ztpw544k.js → index-qcracvc9.js} +8 -8
- package/{index-2c3e2xh8.js → index-saheq2bs.js} +4 -4
- package/{index-gmy45vz2.js → index-v0s24t8j.js} +14 -14
- package/{index-0cj2zxbm.js → index-wet2ytnr.js} +12 -11
- package/{index-j9cxndc0.js → index-x23688ar.js} +12 -7
- package/{index-a1e0j63x.js → index-xxe90kqy.js} +58 -25
- package/{index-js368gk9.js → index-ypvdw8nr.js} +13 -13
- package/{index-qb61h0k7.js → index-z3c9mmw4.js} +1098 -1360
- package/index.js +22 -24
- package/{library.command-md9715jz.js → library.command-wpedct6c.js} +11 -9
- package/{localRegistry.command-exkbamyj.js → localRegistry.command-gk773cte.js} +20 -22
- package/{module.command-w5aaddxk.js → module.command-8n4kct3e.js} +13 -15
- package/{package.command-yfkrcy0z.js → package.command-fcbd0b1d.js} +8 -9
- package/package.json +5 -7
- package/{page.command-echbavp4.js → page.command-x4379grq.js} +7 -8
- package/{primitive.command-9fbhspw2.js → primitive.command-8etmnqhq.js} +13 -15
- package/{quality.command-3pnt9yep.js → quality.command-hfx7z8yr.js} +226 -104
- package/recipeScanner-fpagtgc1.js +11 -0
- package/{repair.command-carj4vax.js → repair.command-j0fs5qkz.js} +12 -13
- package/{routeSourceValidator-e4jmbfcx.js → routeSourceValidator-ze6x894c.js} +0 -2
- package/{scalar.command-51ryzypc.js → scalar.command-2emk89eh.js} +11 -13
- package/subspace.command-3w3s1zas.js +714 -0
- package/templates/app/env/env.client.debug.ts.template +1 -5
- package/templates/app/env/env.client.develop.ts.template +1 -5
- package/templates/app/env/env.client.local.ts.template +1 -5
- package/templates/app/env/env.client.main.ts.template +1 -5
- package/templates/app/env/env.client.testing.ts.template +1 -5
- package/templates/app/env/env.client.type.ts +2 -6
- package/templates/app/env/env.server.debug.ts.template +1 -5
- package/templates/app/env/env.server.develop.ts.template +1 -5
- package/templates/app/env/env.server.local.ts.template +1 -5
- package/templates/app/env/env.server.main.ts.template +1 -5
- package/templates/app/main.ts +3 -1
- package/templates/appSample/lib/task/task.signal.ts +11 -6
- package/templates/appSample/srvkit/AuthGuard.ts +9 -5
- package/templates/appSample/srvkit/SessionInternalArg.ts +4 -3
- package/templates/crudPages/[__model__Id]/edit/page.tsx +6 -6
- package/templates/crudPages/[__model__Id]/page.tsx +10 -13
- package/templates/crudPages/new/page.tsx +6 -6
- package/templates/crudPages/page.tsx +9 -9
- package/templates/crudSinglePage/page.tsx +11 -7
- package/templates/env/_env.server.type.ts +7 -5
- package/templates/lib/db.ts +1 -1
- package/templates/lib/dict.ts +1 -1
- package/templates/lib/sig.ts +1 -1
- package/templates/lib/srv.ts +6 -2
- package/templates/module/__Model__.Util.tsx +1 -1
- package/templates/module/__Model__.Zone.tsx +3 -5
- package/templates/module/__model__.dictionary.ts +4 -1
- package/templates/module/__model__.signal.ts +2 -3
- package/templates/module/__model__.store.ts +1 -2
- package/templates/workspaceRoot/.gitignore.template +0 -1
- package/templates/workspaceRoot/AGENTS.md.template +4 -972
- package/templates/workspaceRoot/CLAUDE.md.template +19 -0
- package/templates/workspaceRoot/biome.json.template +4 -244
- package/templates/workspaceRoot/docs/AI-DEVELOPMENT.md.template +10 -14
- package/templates/workspaceRoot/docs/GENERATED.md.template +12 -10
- package/templates/workspaceRoot/package.json.template +2 -4
- package/typeChecker-3xgrzc2v.js +7 -0
- package/typecheck.proc.js +4 -5
- package/{workflow.command-91wmvm8k.js → workflow.command-cvpmzwjg.js} +21 -23
- package/{workspace.command-wa10mfd9.js → workspace.command-4ztb4fdh.js} +108 -91
- package/capacitorApp-p0z5yab2.js +0 -60
- package/dependencyScanner-f6grrep3.js +0 -9
- package/index-mxvakhsm.js +0 -66
- package/index-r24hmh0q.js +0 -4
- package/recipeScanner-tghkzrrt.js +0 -12
- package/templates/workspaceRoot/.cursor/rules/akan-page-routing.mdc.template +0 -43
- package/templates/workspaceRoot/.cursor/rules/akan-sync-conventions.mdc.template +0 -34
- package/templates/workspaceRoot/.cursor/rules/application-test-commands.mdc.template +0 -16
- package/templates/workspaceRoot/.cursor/rules/change-scope.mdc.template +0 -12
- package/templates/workspaceRoot/.cursor/rules/client-server-boundaries.mdc.template +0 -18
- package/templates/workspaceRoot/.cursor/rules/coding-comments.mdc.template +0 -25
- package/templates/workspaceRoot/.cursor/rules/coding-style.mdc.template +0 -44
- package/templates/workspaceRoot/.cursor/rules/domain-module-conventions.mdc.template +0 -17
- package/templates/workspaceRoot/.cursor/rules/format-lint.mdc.template +0 -12
- package/templates/workspaceRoot/.cursor/rules/lint-enforced-rules.mdc.template +0 -19
- package/templates/workspaceRoot/.cursor/rules/module-file-playbook.mdc.template +0 -62
- package/templates/workspaceRoot/.cursor/rules/naming-conventions.mdc.template +0 -15
- package/templates/workspaceRoot/.cursor/rules/react-component-style.mdc.template +0 -21
- package/templates/workspaceRoot/.cursor/rules/repo-overview.mdc.template +0 -17
- package/templates/workspaceRoot/.cursor/rules/scalar-modeling.mdc.template +0 -99
- package/templates/workspaceRoot/.cursor/rules/secrets-and-env.mdc.template +0 -13
- package/templates/workspaceRoot/.cursor/rules/service-signal-conventions.mdc.template +0 -83
- package/templates/workspaceRoot/.cursor/rules/srvkit-adapters-and-guards.mdc.template +0 -50
- package/templates/workspaceRoot/.cursor/rules/ssr-first.mdc.template +0 -59
- package/templates/workspaceRoot/.cursor/rules/typescript-imports.mdc.template +0 -16
- package/typeChecker-kravn7ns.js +0 -8
- /package/{index-0wae5ebk.js → index-meh558jy.js} +0 -0
- /package/{index-ss469dec.js → index-nz8prx9g.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,261 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://biomejs.dev/schemas/2.5.
|
|
3
|
-
"
|
|
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
|
-
"!apps/akan/env/**"
|
|
148
|
-
],
|
|
149
|
-
"plugins": ["./node_modules/@akanjs/devkit/lint/no-throw-raw-error.grit"]
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
"includes": ["**/page/**/*.ts", "**/page/**/*.tsx", "**/*.Unit.tsx", "**/*.View.tsx"],
|
|
153
|
-
"plugins": [
|
|
154
|
-
"./node_modules/@akanjs/devkit/lint/no-import-client-functions.grit",
|
|
155
|
-
"./node_modules/@akanjs/devkit/lint/no-use-client-in-server.grit"
|
|
156
|
-
]
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
"includes": ["**/page/**/*.ts", "**/page/**/*.tsx"],
|
|
160
|
-
"plugins": ["./node_modules/@akanjs/devkit/lint/non-scalar-props-restricted.grit"]
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
"includes": ["**/*.constant.ts", "**/*.document.ts", "**/*.service.ts", "**/*.store.ts"],
|
|
164
|
-
"plugins": ["./node_modules/@akanjs/devkit/lint/no-js-private-class-method.grit"]
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
"includes": ["**/*.store.ts"],
|
|
168
|
-
"plugins": ["./node_modules/@akanjs/devkit/lint/no-return-in-store-action.grit"]
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
"includes": ["**/*.signal.ts"],
|
|
172
|
-
"plugins": ["./node_modules/@akanjs/devkit/lint/no-redeclare-predefined-endpoint.grit"]
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
"includes": [
|
|
176
|
-
"**/ui/**/*.ts",
|
|
177
|
-
"**/ui/**/*.tsx",
|
|
178
|
-
"**/webkit/**/*.ts",
|
|
179
|
-
"**/webkit/**/*.tsx",
|
|
180
|
-
"**/common/**/*.ts",
|
|
181
|
-
"**/page/**/*.tsx",
|
|
182
|
-
"**/*.constant.ts",
|
|
183
|
-
"**/*.store.ts",
|
|
184
|
-
"**/*.Template.tsx",
|
|
185
|
-
"**/*.Unit.tsx",
|
|
186
|
-
"**/*.Util.tsx",
|
|
187
|
-
"**/*.View.tsx",
|
|
188
|
-
"**/*.Zone.tsx",
|
|
189
|
-
"!**/*.test.ts",
|
|
190
|
-
"!**/*.test.tsx",
|
|
191
|
-
"!**/*.spec.ts",
|
|
192
|
-
"!**/*.spec.tsx"
|
|
193
|
-
],
|
|
194
|
-
"plugins": ["./node_modules/@akanjs/devkit/lint/no-bang-comment-in-client.grit"]
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
"includes": [
|
|
198
|
-
"**/*.constant.ts",
|
|
199
|
-
"**/*.dictionary.ts",
|
|
200
|
-
"**/*.document.ts",
|
|
201
|
-
"**/*.service.ts",
|
|
202
|
-
"**/*.signal.ts",
|
|
203
|
-
"**/*.store.ts",
|
|
204
|
-
"**/*.Template.tsx",
|
|
205
|
-
"**/*.Unit.tsx",
|
|
206
|
-
"**/*.Util.tsx",
|
|
207
|
-
"**/*.View.tsx",
|
|
208
|
-
"**/*.Zone.tsx"
|
|
209
|
-
],
|
|
210
|
-
"plugins": ["./node_modules/@akanjs/devkit/lint/no-deep-internal-import.grit"]
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
"includes": [
|
|
214
|
-
"**/page/**/*.ts",
|
|
215
|
-
"**/page/**/*.tsx",
|
|
216
|
-
"**/index.ts",
|
|
217
|
-
"**/index.tsx",
|
|
218
|
-
"**/cnst.ts",
|
|
219
|
-
"**/db.ts",
|
|
220
|
-
"**/dict.ts",
|
|
221
|
-
"**/option.ts",
|
|
222
|
-
"**/sig.ts",
|
|
223
|
-
"**/srv.ts",
|
|
224
|
-
"**/st.ts",
|
|
225
|
-
"**/*.constant.ts",
|
|
226
|
-
"**/*.dictionary.ts",
|
|
227
|
-
"**/*.document.ts",
|
|
228
|
-
"**/*.service.ts",
|
|
229
|
-
"**/*.signal.ts",
|
|
230
|
-
"**/*.signal.test.ts",
|
|
231
|
-
"**/*.service.test.ts",
|
|
232
|
-
"**/*.store.ts",
|
|
233
|
-
"**/*.Template.tsx",
|
|
234
|
-
"**/*.Unit.tsx",
|
|
235
|
-
"**/*.Util.tsx",
|
|
236
|
-
"**/*.View.tsx",
|
|
237
|
-
"**/*.Zone.tsx"
|
|
238
|
-
],
|
|
239
|
-
"plugins": ["./node_modules/@akanjs/devkit/lint/no-import-external-library.grit"]
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
"includes": [
|
|
243
|
-
"apps/**/*.ts",
|
|
244
|
-
"apps/**/*.tsx",
|
|
245
|
-
"libs/**/*.ts",
|
|
246
|
-
"libs/**/*.tsx",
|
|
247
|
-
"!**/*.test.ts",
|
|
248
|
-
"!**/*.test.tsx",
|
|
249
|
-
"!**/*.spec.ts",
|
|
250
|
-
"!**/*.spec.tsx"
|
|
251
|
-
],
|
|
252
|
-
"plugins": [
|
|
253
|
-
"./node_modules/@akanjs/devkit/lint/no-raw-palette-class.grit",
|
|
254
|
-
"./node_modules/@akanjs/devkit/lint/no-arbitrary-color.grit",
|
|
255
|
-
"./node_modules/@akanjs/devkit/lint/no-daisyui-legacy-class.grit",
|
|
256
|
-
"./node_modules/@akanjs/devkit/lint/no-inline-color.grit",
|
|
257
|
-
"./node_modules/@akanjs/devkit/lint/no-interpolated-arbitrary-class.grit"
|
|
258
|
-
]
|
|
259
|
-
}
|
|
260
|
-
]
|
|
20
|
+
}
|
|
261
21
|
}
|
|
@@ -47,25 +47,21 @@ See `docs/GENERATED.md` for the generated file list.
|
|
|
47
47
|
|
|
48
48
|
## House Style
|
|
49
49
|
|
|
50
|
-
`AGENTS.md` holds the full style guide. The rules
|
|
50
|
+
`AGENTS.md` holds the full style guide, and `akan lint` enforces most of it. The four rules that surprise people,
|
|
51
|
+
because the failure is silent rather than an error:
|
|
51
52
|
|
|
52
53
|
- **Never hand-order Tailwind classes** — the linter sorts them, including inside `cn()`, and its output looks
|
|
53
|
-
unnatural on purpose.
|
|
54
|
+
unnatural on purpose. Do not reorder it back.
|
|
54
55
|
- **Never use a colour outside the semantic vocabulary** — `bg-red-500`, `bg-[#3b82f6]` and `text-base-content`
|
|
55
56
|
compile to no CSS at all, so the element renders unstyled with no error. Use `bg-primary`, `text-foreground/70`
|
|
56
57
|
and the other tokens defined in `page/*/styles.css`.
|
|
57
|
-
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
-
|
|
64
|
-
`className?: string` first. No `React.FC`, no non-null assertions, no `as any`.
|
|
65
|
-
- `cond ? <X/> : null`, never `{cond && <X/>}` — the latter renders the string `"false"` in a className context.
|
|
66
|
-
- Put display and predicate logic on the `Light<Model>` constant class; keep document chain methods
|
|
67
|
-
validate → mutate → `return this` without `save()`; keep services to load → chain → save.
|
|
68
|
-
- Do not narrate code in comments. Do document vendor quirks, infrastructure constraints, and security reasoning.
|
|
58
|
+
- **`cond ? <X/> : null`, never `{cond && <X/>}`** — the latter renders the string `"false"` in a className context.
|
|
59
|
+
- **Never wrap a form setter in a pass-through arrow** — `onChange={st.do.setXOnY}` publishes the field to agents
|
|
60
|
+
and E2E selectors; `onChange={(v) => st.do.setXOnY(v)}` runs identically and publishes nothing.
|
|
61
|
+
|
|
62
|
+
Two more that are hard errors: **never `throw new Error`** (throw `new Err("<module>.error.<key>")` with an
|
|
63
|
+
`[en, ko]` dictionary entry), and **never import a third-party package** from a page, a barrel, or a module file —
|
|
64
|
+
re-export it through a one-line shim in the lib's `common/`, `webkit/`, or `ui/` first.
|
|
69
65
|
|
|
70
66
|
## Abstract Documents
|
|
71
67
|
|
|
@@ -9,20 +9,21 @@ sync or build can overwrite local changes.
|
|
|
9
9
|
| --- | --- |
|
|
10
10
|
| `apps/*/client.ts` | App-wide client entrypoint for generated fetch, store, and client runtime exports. |
|
|
11
11
|
| `apps/*/server.ts` | App-wide server entrypoint for generated server, service, signal, database, and dictionary exports. |
|
|
12
|
+
| `libs/*/client.ts`, `libs/*/server.ts`, `libs/*/index.ts` | The same entrypoints for a library. |
|
|
12
13
|
|
|
13
|
-
##
|
|
14
|
+
## Module Barrels (apps and libs alike)
|
|
14
15
|
|
|
15
16
|
| File | Purpose |
|
|
16
17
|
| --- | --- |
|
|
17
|
-
| `apps/*/lib/cnst.ts` | Re-exports constants and model shapes from module `*.constant.ts` files. |
|
|
18
|
-
| `apps/*/lib/db.ts` | Re-exports database models from module `*.document.ts` files. |
|
|
19
|
-
| `apps/*/lib/dict.ts` | Re-exports dictionaries from module `*.dictionary.ts` files. |
|
|
20
|
-
| `apps/*/lib/srv.ts` | Re-exports services from module `*.service.ts` files. |
|
|
21
|
-
| `apps/*/lib/sig.ts` | Re-exports endpoints, slices, and internals from module `*.signal.ts` files. |
|
|
22
|
-
| `apps/*/lib/st.ts` | Re-exports stores from module `*.store.ts` files. |
|
|
23
|
-
| `apps/*/lib/useClient.ts` | Client-safe generated imports for fetch, message, signal, and store usage. |
|
|
24
|
-
| `apps/*/lib/useServer.ts` | Server-safe generated imports for service, database, signal, and dictionary usage. |
|
|
25
|
-
| `apps/*/lib/**/index.ts` | Per-module generated barrel files. |
|
|
18
|
+
| `{apps,libs}/*/lib/cnst.ts` | Re-exports constants and model shapes from module `*.constant.ts` files. |
|
|
19
|
+
| `{apps,libs}/*/lib/db.ts` | Re-exports database models from module `*.document.ts` files. |
|
|
20
|
+
| `{apps,libs}/*/lib/dict.ts` | Re-exports dictionaries from module `*.dictionary.ts` files. |
|
|
21
|
+
| `{apps,libs}/*/lib/srv.ts` | Re-exports services from module `*.service.ts` files. |
|
|
22
|
+
| `{apps,libs}/*/lib/sig.ts` | Re-exports endpoints, slices, and internals from module `*.signal.ts` files. |
|
|
23
|
+
| `{apps,libs}/*/lib/st.ts` | Re-exports stores from module `*.store.ts` files. |
|
|
24
|
+
| `{apps,libs}/*/lib/useClient.ts` | Client-safe generated imports for fetch, message, signal, and store usage. |
|
|
25
|
+
| `{apps,libs}/*/lib/useServer.ts` | Server-safe generated imports for service, database, signal, and dictionary usage. |
|
|
26
|
+
| `{apps,libs}/*/lib/**/index.ts` | Per-module generated barrel files. |
|
|
26
27
|
|
|
27
28
|
## Shared Surface Barrels
|
|
28
29
|
|
|
@@ -32,6 +33,7 @@ sync or build can overwrite local changes.
|
|
|
32
33
|
| `*/webkit/index.ts` | Re-exports webkit/browser helper files. |
|
|
33
34
|
| `*/srvkit/index.ts` | Re-exports server-kit helper files. |
|
|
34
35
|
| `*/common/index.ts` | Re-exports common helper files. |
|
|
36
|
+
| `*/plugin/index.ts` | Re-exports `<name>.plugin.ts` declarations. |
|
|
35
37
|
|
|
36
38
|
## How To Change Generated Output
|
|
37
39
|
|
|
@@ -31,8 +31,6 @@
|
|
|
31
31
|
"dependencies": {},
|
|
32
32
|
"devDependencies": {},
|
|
33
33
|
"patchedDependencies": {
|
|
34
|
-
"react-dom@19.2.7": "patches/react-dom@19.2.7.patch"
|
|
35
|
-
"zod@3.25.76": "patches/zod@3.25.76.patch",
|
|
36
|
-
"zod@4.4.3": "patches/zod@4.4.3.patch"
|
|
34
|
+
"react-dom@19.2.7": "patches/react-dom@19.2.7.patch"
|
|
37
35
|
}
|
|
38
|
-
}
|
|
36
|
+
}
|
package/typecheck.proc.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-r24hmh0q.js";
|
|
3
|
+
TypeChecker2
|
|
4
|
+
} from "./index-92zztqy1.js";
|
|
6
5
|
|
|
7
6
|
// pkgs/@akanjs/devkit/typecheck/typecheck.proc.ts
|
|
8
7
|
import { Logger } from "akanjs/common";
|
|
@@ -12,7 +11,7 @@ try {
|
|
|
12
11
|
const cwdPath = process.env.AKAN_TYPECHECK_CWD;
|
|
13
12
|
if (!cwdPath)
|
|
14
13
|
throw new Error("AKAN_TYPECHECK_CWD is required");
|
|
15
|
-
const typeChecker = new
|
|
14
|
+
const typeChecker = new TypeChecker2({ cwdPath });
|
|
16
15
|
const { fileDiagnostics, fileErrors, fileWarnings } = typeChecker.check(filePath);
|
|
17
16
|
const message = typeChecker.formatDiagnostics(fileDiagnostics);
|
|
18
17
|
Logger.rawLog(JSON.stringify({
|
|
@@ -26,7 +25,7 @@ try {
|
|
|
26
25
|
const configPath = process.env.AKAN_TYPECHECK_TSCONFIG;
|
|
27
26
|
if (!configPath)
|
|
28
27
|
throw new Error("AKAN_TYPECHECK_TSCONFIG is required");
|
|
29
|
-
const result =
|
|
28
|
+
const result = TypeChecker2.checkProject(configPath);
|
|
30
29
|
if (result.errors.length > 0) {
|
|
31
30
|
console.error(result.message);
|
|
32
31
|
process.exit(1);
|
|
@@ -1,34 +1,32 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Workspace,
|
|
4
|
+
script,
|
|
5
|
+
command
|
|
6
|
+
} from "./index-ft1sfjz0.js";
|
|
7
|
+
import"./index-k1n0h7dk.js";
|
|
8
|
+
import"./index-ayy5ecax.js";
|
|
9
|
+
import"./index-6wwzs1bc.js";
|
|
5
10
|
import {
|
|
6
|
-
|
|
7
|
-
} from "./index-
|
|
11
|
+
createWorkflowStepRegistry
|
|
12
|
+
} from "./index-saheq2bs.js";
|
|
13
|
+
import"./index-wet2ytnr.js";
|
|
8
14
|
import {
|
|
9
15
|
ModuleScript
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-
|
|
16
|
+
} from "./index-k86zc21w.js";
|
|
17
|
+
import"./index-1kzsn94d.js";
|
|
18
|
+
import"./index-h7yw2z9n.js";
|
|
12
19
|
import {
|
|
13
|
-
|
|
14
|
-
} from "./index-
|
|
15
|
-
import"./index-ss469dec.js";
|
|
16
|
-
import"./index-0cj2zxbm.js";
|
|
17
|
-
import"./index-mssqn2sq.js";
|
|
20
|
+
PrimitiveScript
|
|
21
|
+
} from "./index-cd5x18qh.js";
|
|
18
22
|
import {
|
|
19
|
-
|
|
20
|
-
} from "./index-
|
|
21
|
-
import"./index-
|
|
23
|
+
ScalarScript
|
|
24
|
+
} from "./index-v0s24t8j.js";
|
|
25
|
+
import"./index-by5gpp8x.js";
|
|
26
|
+
import"./index-5y7qba1c.js";
|
|
22
27
|
import {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
script
|
|
26
|
-
} from "./index-6rhabeev.js";
|
|
27
|
-
import"./index-vg0sj9nc.js";
|
|
28
|
-
import"./index-mxvakhsm.js";
|
|
29
|
-
import"./index-xys926f2.js";
|
|
30
|
-
import"./index-67546d0j.js";
|
|
31
|
-
import"./index-r24hmh0q.js";
|
|
28
|
+
WorkflowRunner
|
|
29
|
+
} from "./index-j9vnq8tr.js";
|
|
32
30
|
|
|
33
31
|
// pkgs/@akanjs/cli/workflow/workflow.script.ts
|
|
34
32
|
import { Logger } from "akanjs/common";
|