@akanjs/cli 3.0.0-alpha.3 → 3.0.0-alpha.31

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 (105) hide show
  1. package/.build-stamp +1 -1
  2. package/README.ko.md +1 -1
  3. package/README.md +1 -1
  4. package/{abstractCompactor-e5yq60qz.js → abstractCompactor-20e0cwbs.js} +2 -2
  5. package/{agent.command-yv00p0s0.js → agent.command-e835fjem.js} +8 -7
  6. package/{application.command-0qsczf4k.js → application.command-sjtbk6tr.js} +6 -5
  7. package/{applicationBuildRunner-ct2pxyvw.js → applicationBuildRunner-7gnfz7ww.js} +6 -7
  8. package/{applicationReleasePackager-gg8ccbeh.js → applicationReleasePackager-93nzdfsy.js} +1 -1
  9. package/buildBatch.proc.js +5 -4
  10. package/{capacitorApp-4r9sm3qg.js → capacitorApp-qv7g3dp2.js} +29 -26
  11. package/{cloud.command-dxfv18sa.js → cloud.command-y0e4eyqz.js} +10 -9
  12. package/{context.command-8d9e3k6b.js → context.command-vn87jb08.js} +16 -15
  13. package/{dependencyScanner-f6grrep3.js → dependencyScanner-rbs2407b.js} +1 -1
  14. package/getDirname-ka11hm7e.js +8 -0
  15. package/{guideline.command-3jbkxzh6.js → guideline.command-s4hn2bsy.js} +7 -6
  16. package/guidelines/conventions/conventions.generate.json +25 -0
  17. package/guidelines/conventions/conventions.instruction.md +986 -0
  18. package/guidelines/cssRule/cssRule.instruction.md +7 -0
  19. package/guidelines/framework/framework.instruction.md +1 -0
  20. package/guidelines/workspaceOnboarding/workspaceOnboarding.generate.json +24 -0
  21. package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +972 -0
  22. package/incrementalBuilder.proc.js +6 -5
  23. package/{index-1pvex4az.js → index-0h212yqe.js} +13 -13
  24. package/index-1577bej2.js +7 -0
  25. package/{index-k95xkh4p.js → index-33zce8gt.js} +8 -4
  26. package/{index-2q1f5j9k.js → index-3dp7x6rc.js} +3 -3
  27. package/{index-7c6k4yvg.js → index-73rnbwgg.js} +15 -7
  28. package/{index-e16gnn26.js → index-8d2sv6pw.js} +13 -13
  29. package/{index-hgna5rjy.js → index-8vkkm7v0.js} +124 -65
  30. package/{index-bekddz9q.js → index-9jsnb4vw.js} +4 -4
  31. package/{index-nm6wghb6.js → index-becx1t0k.js} +6 -6
  32. package/{index-a00jg8x8.js → index-g9e2fhw2.js} +49 -32
  33. package/{index-pyt2b4nw.js → index-hg0qvhmx.js} +152 -241
  34. package/{index-tdbas9r0.js → index-j37qq1f2.js} +1 -1
  35. package/{index-ej426mcr.js → index-k6fvbcj1.js} +37 -6
  36. package/{index-yzmhasdb.js → index-mykmf6wd.js} +8 -8
  37. package/{index-t3723f99.js → index-mz5jtaq7.js} +86 -17
  38. package/{index-8hsbnyes.js → index-n706txcv.js} +5 -3
  39. package/{index-bbkek1bp.js → index-qc0tnhs2.js} +1 -1
  40. package/{index-rh16j3c7.js → index-qnv0aqmm.js} +12 -8
  41. package/{index-0cj2zxbm.js → index-sh01r3pm.js} +1 -1
  42. package/{index-zasydjxd.js → index-t71zvmt9.js} +9 -11
  43. package/{index-rzwcpcc3.js → index-tsmjxph2.js} +1 -1
  44. package/{index-ec09pws3.js → index-x33gnap3.js} +4 -4
  45. package/{index-mr5s7mqd.js → index-xyrb7pk5.js} +3 -3
  46. package/index.js +20 -19
  47. package/{library.command-ebdj1vnm.js → library.command-v5cyaw9t.js} +5 -4
  48. package/{localRegistry.command-gb178ne8.js → localRegistry.command-53t758pt.js} +9 -8
  49. package/{module.command-9c1bnsx4.js → module.command-pq6w84xg.js} +9 -8
  50. package/{package.command-t93p4jkj.js → package.command-qkcs60ts.js} +5 -4
  51. package/package.json +3 -4
  52. package/{page.command-k3k0meh2.js → page.command-qj5bfnh9.js} +5 -4
  53. package/{primitive.command-de6nktdt.js → primitive.command-bw0nes6x.js} +10 -9
  54. package/{quality.command-z5kth2wa.js → quality.command-f8drhx6c.js} +11 -41
  55. package/{recipeScanner-tghkzrrt.js → recipeScanner-zrzev25x.js} +3 -3
  56. package/{repair.command-ehf2g112.js → repair.command-mzwtejpk.js} +7 -6
  57. package/{routeSourceValidator-cncd92fv.js → routeSourceValidator-7fycdqyv.js} +3 -39
  58. package/{scalar.command-7a2jtv33.js → scalar.command-rm6k3c65.js} +8 -7
  59. package/templates/app/env/env.server.debug.ts.template +1 -5
  60. package/templates/app/env/env.server.develop.ts.template +1 -5
  61. package/templates/app/env/env.server.local.ts.template +1 -5
  62. package/templates/app/env/env.server.main.ts.template +1 -5
  63. package/templates/app/page/styles.css.template +3 -3
  64. package/templates/appSample/srvkit/AuthGuard.ts +9 -5
  65. package/templates/appSample/srvkit/SessionInternalArg.ts +4 -3
  66. package/templates/crudPages/[__model__Id]/edit/page.tsx +1 -1
  67. package/templates/crudPages/new/page.tsx +1 -1
  68. package/templates/crudSinglePage/page.tsx +1 -1
  69. package/templates/env/_env.server.type.ts +7 -5
  70. package/templates/lib/db.ts +1 -1
  71. package/templates/lib/dict.ts +1 -1
  72. package/templates/lib/sig.ts +1 -1
  73. package/templates/lib/srv.ts +6 -2
  74. package/templates/lib/useClient.ts +9 -3
  75. package/templates/module/__Model__.Util.tsx +1 -1
  76. package/templates/module/__Model__.Zone.tsx +3 -5
  77. package/templates/workspaceRoot/AGENTS.md.template +0 -963
  78. package/templates/workspaceRoot/CLAUDE.md.template +19 -0
  79. package/templates/workspaceRoot/biome.json.template +4 -198
  80. package/templates/workspaceRoot/docs/AI-DEVELOPMENT.md.template +4 -1
  81. package/{typeChecker-kravn7ns.js → typeChecker-g6bh0xfv.js} +1 -1
  82. package/typecheck.proc.js +1 -1
  83. package/{workflow.command-e0tt0vk2.js → workflow.command-g2cgcgxn.js} +15 -14
  84. package/{workspace.command-fpda0evj.js → workspace.command-f7jerqb2.js} +69 -51
  85. package/templates/workspaceRoot/.cursor/rules/akan-page-routing.mdc.template +0 -43
  86. package/templates/workspaceRoot/.cursor/rules/akan-sync-conventions.mdc.template +0 -33
  87. package/templates/workspaceRoot/.cursor/rules/application-test-commands.mdc.template +0 -16
  88. package/templates/workspaceRoot/.cursor/rules/change-scope.mdc.template +0 -12
  89. package/templates/workspaceRoot/.cursor/rules/client-server-boundaries.mdc.template +0 -18
  90. package/templates/workspaceRoot/.cursor/rules/coding-comments.mdc.template +0 -25
  91. package/templates/workspaceRoot/.cursor/rules/coding-style.mdc.template +0 -44
  92. package/templates/workspaceRoot/.cursor/rules/domain-module-conventions.mdc.template +0 -17
  93. package/templates/workspaceRoot/.cursor/rules/format-lint.mdc.template +0 -12
  94. package/templates/workspaceRoot/.cursor/rules/lint-enforced-rules.mdc.template +0 -18
  95. package/templates/workspaceRoot/.cursor/rules/module-file-playbook.mdc.template +0 -61
  96. package/templates/workspaceRoot/.cursor/rules/naming-conventions.mdc.template +0 -15
  97. package/templates/workspaceRoot/.cursor/rules/react-component-style.mdc.template +0 -21
  98. package/templates/workspaceRoot/.cursor/rules/repo-overview.mdc.template +0 -17
  99. package/templates/workspaceRoot/.cursor/rules/scalar-modeling.mdc.template +0 -58
  100. package/templates/workspaceRoot/.cursor/rules/secrets-and-env.mdc.template +0 -13
  101. package/templates/workspaceRoot/.cursor/rules/service-signal-conventions.mdc.template +0 -83
  102. package/templates/workspaceRoot/.cursor/rules/srvkit-adapters-and-guards.mdc.template +0 -50
  103. package/templates/workspaceRoot/.cursor/rules/ssr-first.mdc.template +0 -59
  104. package/templates/workspaceRoot/.cursor/rules/typescript-imports.mdc.template +0 -16
  105. /package/{index-r24hmh0q.js → index-yb2wsc7f.js} +0 -0
@@ -55,6 +55,13 @@ Screen code is invariant — a plain `<Button variant="primary">` never changes.
55
55
  - Switching themes is toggling the `data-theme` attribute. Keep every token defined in both the dark and light blocks.
56
56
  - Radius uses `rounded-box` (cards/modals), `rounded-field` (buttons/inputs), `rounded-selector` (toggles/checkboxes).
57
57
 
58
+ ## Lib-Owned Tokens (`libs/<lib>/ui/tokens.css`)
59
+ - A lib that needs colors of its own — vendor brand colors pinned by someone else's guide (Kakao `#fee500`, Naver `#1ec800`), fixed in-game surfaces — declares them **once** in `libs/<lib>/ui/tokens.css`. Never copy the block into each app's stylesheet.
60
+ - The file is collected automatically: every app whose page graph reaches that lib compiles it, ordered **ahead of** the app's own stylesheets, so the app wins on any variable both declare. There is nothing to import and no sync step to remember; two libs both declaring one variable resolve in lib-name order, so do not rely on that.
61
+ - Declare plain custom properties under `:root`, not a Tailwind `@theme` extension: the color vocabulary is closed per stylesheet, so `bg-kakao` would generate no CSS. Reference them as `bg-[var(--kakao)]` / `text-[var(--kakao-foreground)]`, which `no-arbitrary-color` allows by design (a `var()` reference is not an arbitrary color literal).
62
+ - Theme-following colors still belong to the app: a lib token is for a color that must **not** change with `data-theme`.
63
+ - An `@import` the CSS pipeline cannot resolve fails the build; it is never dropped. A stylesheet under `page/` that no route imports is compiled by nothing and warns at build time.
64
+
58
65
  ## Codegen Rules
59
66
  - Do not hardcode hex or raw-palette colors (`bg-red-500`, `#ff0000`); use semantic tokens.
60
67
  - Do not put inline color literals in `style={{ }}`; use token classes.
@@ -26,6 +26,7 @@ Use this as the compact framework context for AI codegen. It should explain how
26
26
  When a request implies a distinct look and feel, do not stop at colors — customize both the theme and, when needed, the components.
27
27
 
28
28
  - **Theme (`apps/<app>/page/styles.css`).** The app imports Tailwind and `akanjs/ui/styles.css`, then overrides semantic token *values* per theme under `:root, [data-theme="dark"]` and `[data-theme="light"]` (`--background`, `--foreground`, `--primary`, `--muted`, `--border`, … each with a `-foreground` pair for text). The framework maps them to Tailwind color names, so `bg-primary` / `text-foreground` follow the `data-theme` attribute; corner rounding uses `--radius-box` / `--radius-field`. Fetch `get_guideline` with `cssRule` for the full token set before a deep theme pass.
29
+ - **Lib tokens (`libs/<lib>/ui/tokens.css`).** Colors a lib's own components pin — a vendor brand color, a fixed surface — are declared once there as plain `:root` custom properties and compiled into every app that reaches the lib, ahead of the app's stylesheets. Reference them as `bg-[var(--kakao)]`; never copy the block into each app.
29
30
  - **Components (`page/**/_overrides.tsx`).** When a default `akanjs/ui` component (Button, Modal, Table, Input, Select, …) is too restrictive for the design, re-skin it per route instead of forking, wrapping, or fighting it with utility classes. Write a drop-in replacement in `apps/<app>/ui/` typed against the slot contract (`AkanModalComponent`, or `AkanUiOverrides["<Slot>"]`), composing the framework's headless parts, then bind it in a `page/**/_overrides.tsx` manifest with a single `export default override({ Slot: BrandComponent })`. Overrides cascade down the route tree like layouts (closest ancestor wins). Fetch `get_guideline` with `componentRule` and read the `references/ui/customize` docs page for the slot list and patterns.
30
31
 
31
32
  ## Review Checklist
@@ -0,0 +1,24 @@
1
+ {
2
+ "title": "Workspace Onboarding",
3
+ "description": "Product-workspace orientation — layout, decision matrix, workflow recipes, and query gotchas",
4
+ "group": "core",
5
+ "codegenPriority": 2,
6
+ "deprecated": false,
7
+ "scans": [],
8
+ "update": {
9
+ "filePath": "./workspaceOnboarding.instruction.md",
10
+ "contents": [
11
+ "workspace layout and generated files",
12
+ "agent workflow and common commands",
13
+ "where-do-I-put-this decision matrix",
14
+ "workflow recipes",
15
+ "modeling and query gotchas"
16
+ ],
17
+ "rules": [
18
+ "Use current Akan APIs only",
19
+ "Write for someone building a product on Akan, not for someone changing Akan",
20
+ "Refer to the app as <%= appName %>; the renderer substitutes the workspace's first app",
21
+ "Do not repeat a rule that the conventions guideline already states"
22
+ ]
23
+ }
24
+ }