@akanjs/cli 3.0.0-alpha.46 → 3.0.0-alpha.48
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/{application.command-cfx525a9.js → application.command-5w691e89.js} +1 -1
- package/{applicationBuildRunner-7gnfz7ww.js → applicationBuildRunner-0xjav921.js} +1 -1
- package/buildBatch.proc.js +1 -1
- package/{cloud.command-4mkbvey2.js → cloud.command-dq0mvj11.js} +3 -3
- package/guidelines/agentRule/agentRule.generate.json +31 -0
- package/guidelines/agentRule/agentRule.instruction.md +400 -0
- package/guidelines/conventions/conventions.instruction.md +163 -665
- package/guidelines/mcpRule/mcpRule.generate.json +25 -0
- package/guidelines/mcpRule/mcpRule.instruction.md +164 -0
- package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +41 -375
- package/{index-3h0d06v8.js → index-2kjyh1jb.js} +1 -1
- package/{index-xc6bbz6e.js → index-awt2gttt.js} +2 -2
- package/{index-yay1fd05.js → index-hnysajy8.js} +1 -1
- package/{index-hg0qvhmx.js → index-wr999y03.js} +2 -0
- package/index.js +4 -4
- package/{localRegistry.command-tet9rxqb.js → localRegistry.command-mp3yc9gg.js} +2 -2
- package/package.json +2 -2
- package/templates/workspaceRoot/docs/AI-DEVELOPMENT.md.template +10 -14
- package/templates/workspaceRoot/docs/GENERATED.md.template +12 -10
- package/{workspace.command-f2966kvr.js → workspace.command-zkhcjsj2.js} +3 -3
|
@@ -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
|
|
|
@@ -11,11 +11,11 @@ import"./index-ss469dec.js";
|
|
|
11
11
|
import"./index-4z05haak.js";
|
|
12
12
|
import {
|
|
13
13
|
CloudScript
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-awt2gttt.js";
|
|
15
15
|
import {
|
|
16
16
|
getLatestPackageVersion,
|
|
17
17
|
getNpmRegistryUrl
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-2kjyh1jb.js";
|
|
19
19
|
import {
|
|
20
20
|
PackageScript
|
|
21
21
|
} from "./index-7zd96bng.js";
|
|
@@ -31,7 +31,7 @@ import"./index-5em412h5.js";
|
|
|
31
31
|
import"./index-j37qq1f2.js";
|
|
32
32
|
import {
|
|
33
33
|
ApplicationScript
|
|
34
|
-
} from "./index-
|
|
34
|
+
} from "./index-hnysajy8.js";
|
|
35
35
|
import {
|
|
36
36
|
LibraryScript
|
|
37
37
|
} from "./index-6bs24rb4.js";
|