@akanjs/cli 3.1.1-rc.16 → 3.1.1-rc.18

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 (118) hide show
  1. package/.build-stamp +1 -1
  2. package/{CodeAgent-23ewzxqa.js → CodeAgent-fbcq8vks.js} +2 -2
  3. package/{CodeTui-kc99fk78.js → CodeTui-0626gxqd.js} +1 -1
  4. package/TunnelShare-2p24xxza.js +14 -0
  5. package/agent.command-hpza0pg9.js +46 -0
  6. package/akanCode.js +5 -3
  7. package/{application.command-bvfd1680.js → application.command-3a7q1hs2.js} +11 -10
  8. package/{applicationBuildRunner-4ajaesk1.js → applicationBuildRunner-s7yt71j4.js} +5 -5
  9. package/buildBatch.proc.js +6 -6
  10. package/{cloud.command-f2w40fyy.js → cloud.command-4vg0pcea.js} +15 -14
  11. package/cloud.script-nkmeyhet.js +25 -0
  12. package/{code.command-dbhhnahn.js → code.command-fbntb67p.js} +6 -6
  13. package/commandManifest.json +1 -1
  14. package/{context.command-yswjwv6y.js → context.command-31rm54v0.js} +18 -18
  15. package/context.runner-w01a32ph.js +26 -0
  16. package/{guideline.command-ztx6dkpk.js → guideline.command-cv3by2ng.js} +3 -3
  17. package/guidelines/conventions/core.md +104 -0
  18. package/guidelines/conventions/rules/app.md +83 -0
  19. package/guidelines/conventions/rules/auth.md +45 -0
  20. package/guidelines/conventions/rules/config.md +56 -0
  21. package/guidelines/conventions/rules/constant.md +24 -0
  22. package/guidelines/conventions/rules/gates.md +31 -0
  23. package/guidelines/conventions/rules/layer.md +25 -0
  24. package/guidelines/conventions/rules/migration.md +27 -0
  25. package/guidelines/conventions/rules/module.md +90 -0
  26. package/guidelines/conventions/rules/page.md +56 -0
  27. package/guidelines/conventions/rules/sensitive.md +16 -0
  28. package/guidelines/conventions/rules/server.md +86 -0
  29. package/guidelines/conventions/rules/ssr.md +47 -0
  30. package/guidelines/conventions/rules/style.md +43 -0
  31. package/guidelines/conventions/rules/test.md +34 -0
  32. package/guidelines/conventions/rules/ts.md +95 -0
  33. package/guidelines/conventions/rules/tsx.md +75 -0
  34. package/guidelines/mcpRule/mcpRule.instruction.md +1 -1
  35. package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +3 -3
  36. package/incrementalBuilder.proc.js +6 -6
  37. package/{index-xjwcp91m.js → index-05nxx4m5.js} +43 -12
  38. package/{index-k9k18vq9.js → index-0ht91675.js} +37 -59
  39. package/{index-er16p89s.js → index-0zwznvv1.js} +1 -1
  40. package/{index-76jwsm3g.js → index-0zyatd10.js} +2 -2
  41. package/{index-97fsvy66.js → index-12kzwak1.js} +3 -3
  42. package/{index-005dqc83.js → index-1dhf8ymv.js} +2 -2
  43. package/{index-00ke4phc.js → index-3gccwenr.js} +1 -1
  44. package/{index-2epb3wgh.js → index-3txrjt6n.js} +2 -2
  45. package/{index-7ndgffg4.js → index-57q1ayd2.js} +18 -1240
  46. package/index-5kh9scvs.js +514 -0
  47. package/index-5n5hds19.js +1246 -0
  48. package/{index-9sa6abze.js → index-6269mf2s.js} +10 -9
  49. package/{index-921cxqrd.js → index-64g9fsjy.js} +41 -12
  50. package/index-7zeb5r1p.js +653 -0
  51. package/{index-s4c2y5gs.js → index-8s8b4eba.js} +45 -4
  52. package/{index-4332q6yj.js → index-922k2zwq.js} +3 -3
  53. package/{index-m6qgr1rx.js → index-9ndw5d8j.js} +7 -7
  54. package/{index-xfp4dcnx.js → index-et6ce601.js} +1 -1
  55. package/{index-saj9cx3a.js → index-f5adsa58.js} +4 -4
  56. package/{index-vgt25eh1.js → index-fbewhg4g.js} +7 -32
  57. package/{index-ysyt782g.js → index-hm7x0c11.js} +4 -4
  58. package/{index-2p1brf5e.js → index-hvv5rnaq.js} +2 -2
  59. package/index-jje9qzyq.js +27 -0
  60. package/{index-rxse80x6.js → index-js1gj6f6.js} +12 -10
  61. package/{index-p2pahmsa.js → index-kjrvwzav.js} +3 -3
  62. package/index-m6r88hhr.js +3582 -0
  63. package/{index-mk391h0z.js → index-mt0wa941.js} +4 -4
  64. package/{index-m93qg20j.js → index-mwj9q2ya.js} +1 -1
  65. package/{index-5nd1wtkv.js → index-p6x5b7hr.js} +1 -1
  66. package/index-r2wedvqn.js +138 -0
  67. package/{index-gxj80jz7.js → index-rvynj5gz.js} +1 -1
  68. package/{index-m54n0v29.js → index-tdv66eah.js} +4 -4
  69. package/{index-vq77g679.js → index-w134p86k.js} +1 -1
  70. package/{index-deeskxjh.js → index-wfczhj1z.js} +14 -36
  71. package/{index-dy0jx9ay.js → index-wwe9rsrx.js} +14 -0
  72. package/{index-qx4r4cj2.js → index-x5ecanqh.js} +2 -2
  73. package/{index-nzfgyw3b.js → index-zre4m2ce.js} +4 -4
  74. package/index.js +23 -22
  75. package/{library.command-hmbkcwzw.js → library.command-sh70fyvy.js} +3 -3
  76. package/{localRegistry.command-sq5p4c9x.js → localRegistry.command-2nbyy84d.js} +14 -13
  77. package/{module.command-n4z29zcv.js → module.command-n0bmtzwy.js} +5 -5
  78. package/{package.command-20025dy3.js → package.command-7h9r51bz.js} +3 -3
  79. package/package.json +2 -2
  80. package/{page.command-q8fvpjer.js → page.command-vjtpfbb1.js} +3 -3
  81. package/{pipeline.command-8j97fq88.js → pipeline.command-c93se3ar.js} +2 -2
  82. package/{primitive.command-e5y6dqp1.js → primitive.command-a3075qp2.js} +6 -6
  83. package/{projectTypecheck-tbdye9k3.js → projectTypecheck-sf9xwaga.js} +1 -1
  84. package/{prompter-76k56b37.js → prompter-hgcta8pb.js} +1 -1
  85. package/quality.command-dw1y9hmy.js +76 -0
  86. package/{repair.command-dq1gckth.js → repair.command-tg57d8yt.js} +5 -5
  87. package/{scalar.command-5vwf152w.js → scalar.command-cwzge353.js} +4 -4
  88. package/skills/akan-agent/SKILL.md +36 -0
  89. package/skills/akan-debug/SKILL.md +3 -3
  90. package/skills/akan-deps/SKILL.md +1 -2
  91. package/skills/akan-mcp/SKILL.md +40 -0
  92. package/skills/akan-page/SKILL.md +44 -0
  93. package/skills/akan-query/SKILL.md +38 -0
  94. package/skills/akan-runtime/SKILL.md +40 -0
  95. package/skills/akan-scaffold/SKILL.md +16 -6
  96. package/skills/akan-transport/SKILL.md +40 -0
  97. package/skills/akan-validate/SKILL.md +13 -11
  98. package/{subspace.command-182be8vj.js → subspace.command-3h03c7kc.js} +8 -8
  99. package/templates/workspaceRoot/.gitignore.template +3 -0
  100. package/templates/workspaceRoot/AGENTS.md.template +4 -10
  101. package/{tunnel.command-bfzj7xkb.js → tunnel.command-czaz6ys4.js} +7 -7
  102. package/{typeChecker-px49mezc.js → typeChecker-j2jdnqsr.js} +1 -1
  103. package/typecheck.proc.js +6 -1
  104. package/verify.command-nzwhtz71.js +91 -0
  105. package/{workflow.command-3g53242s.js → workflow.command-srhky88x.js} +23 -13
  106. package/{workspace.command-h7399jwv.js → workspace.command-9stchcd2.js} +31 -29
  107. package/TunnelShare-dk2gw78d.js +0 -14
  108. package/agent.command-knp5j7bq.js +0 -25
  109. package/cloud.script-2r82sv0f.js +0 -24
  110. package/context.runner-c3wsh2jw.js +0 -26
  111. package/guidelines/conventions/conventions.instruction.md +0 -663
  112. package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +0 -291
  113. package/index-4t4qb8jg.js +0 -279
  114. package/index-hvg3esm0.js +0 -1844
  115. package/index-zzvvc845.js +0 -74
  116. package/quality.command-168pt5vm.js +0 -1788
  117. package/templates/workspaceRoot/docs/AI-DEVELOPMENT.md.template +0 -69
  118. package/templates/workspaceRoot/docs/GENERATED.md.template +0 -55
package/.build-stamp CHANGED
@@ -1 +1 @@
1
- 9bf641c8b229369b89856a905b865ca191fce5f2913b0b2b82a00fec24409ee1
1
+ b1e3e8e5ac4d93fe76926b9e88c99053be45d6f9445c2877f46b28f22356642a
@@ -1,8 +1,8 @@
1
1
  // @bun
2
2
  import {
3
3
  CodeAgent2
4
- } from "./index-k9k18vq9.js";
5
- import"./index-deeskxjh.js";
4
+ } from "./index-0ht91675.js";
5
+ import"./index-wfczhj1z.js";
6
6
  import"./index-7md2g9vw.js";
7
7
  export {
8
8
  CodeAgent2 as CodeAgent
@@ -5,7 +5,7 @@ import {
5
5
  McpTokenStore,
6
6
  McpSignIn,
7
7
  AkanCodeCompaction2
8
- } from "./index-deeskxjh.js";
8
+ } from "./index-wfczhj1z.js";
9
9
  import {
10
10
  CodeTuiLines2,
11
11
  CodeTuiAgents2,
@@ -0,0 +1,14 @@
1
+ // @bun
2
+ import {
3
+ TunnelShare2
4
+ } from "./index-et6ce601.js";
5
+ import"./index-0zyatd10.js";
6
+ import"./index-kjrvwzav.js";
7
+ import"./index-m9jj544v.js";
8
+ import"./index-1dhf8ymv.js";
9
+ import"./index-0zwznvv1.js";
10
+ import"./index-64g9fsjy.js";
11
+ import"./index-52w0fvh8.js";
12
+ export {
13
+ TunnelShare2 as TunnelShare
14
+ };
@@ -0,0 +1,46 @@
1
+ // @bun
2
+ import {
3
+ Workspace,
4
+ command
5
+ } from "./index-3gccwenr.js";
6
+ import"./index-52w0fvh8.js";
7
+ import"./index-64g9fsjy.js";
8
+ import"./index-r2wedvqn.js";
9
+ import"./index-hj6w4ka1.js";
10
+ import"./index-05nxx4m5.js";
11
+ import"./index-8s8b4eba.js";
12
+ import"./index-57q1ayd2.js";
13
+ import"./index-p6x5b7hr.js";
14
+ import"./index-kjrvwzav.js";
15
+ import"./index-w134p86k.js";
16
+ import"./index-m9jj544v.js";
17
+ import"./index-1dhf8ymv.js";
18
+ import"./index-0zwznvv1.js";
19
+ import"./index-m6r88hhr.js";
20
+ import"./index-62md4dwy.js";
21
+ import"./index-fbewhg4g.js";
22
+ import {
23
+ AgentScript
24
+ } from "./index-7zeb5r1p.js";
25
+ import"./index-5kh9scvs.js";
26
+ import"./index-mwj9q2ya.js";
27
+
28
+ // pkgs/@akanjs/cli/agent/agent.command.ts
29
+ class AgentCommand extends command("agent", [AgentScript], ({ public: target }) => ({
30
+ agent: target({ desc: "Install Akan agent rules for editors and coding agents", stdio: true }).arg("action", String, { desc: "install, or hook (run by Claude Code hooks)" }).arg("target", String, {
31
+ desc: "install: cursor, agents-md, claude, rules, skills, hooks, or all; hook: pre-edit, post-edit, stop",
32
+ nullable: true
33
+ }).option("force", Boolean, {
34
+ desc: "overwrite existing pointer files and generated files you took over",
35
+ default: false
36
+ }).option("check", Boolean, {
37
+ desc: "write nothing; exit 1 when install would create, change or remove a file",
38
+ default: false
39
+ }).with(Workspace).exec(async function(action, targetName, force, check, workspace) {
40
+ await this.agentScript.agent(workspace, action, targetName, { force, check });
41
+ })
42
+ })) {
43
+ }
44
+ export {
45
+ AgentCommand
46
+ };
package/akanCode.js CHANGED
@@ -28,7 +28,7 @@ import {
28
28
  CodeMailbox2,
29
29
  CodeSessionFork2,
30
30
  CodeAgent2
31
- } from "./index-k9k18vq9.js";
31
+ } from "./index-0ht91675.js";
32
32
  import {
33
33
  akanCodeDefaultModel2,
34
34
  akanCodeModel2,
@@ -38,9 +38,8 @@ import {
38
38
  } from "./index-c6eggbee.js";
39
39
  import {
40
40
  SubagentPool2,
41
- akanCodePaths2,
42
41
  AkanCodeCompaction2
43
- } from "./index-deeskxjh.js";
42
+ } from "./index-wfczhj1z.js";
44
43
  import"./index-7md2g9vw.js";
45
44
  import {
46
45
  CodeAgentRpcHost2
@@ -55,6 +54,9 @@ import {
55
54
  CodeTuiMarkdown2,
56
55
  CodeTuiParts2
57
56
  } from "./index-2mrn1mrg.js";
57
+ import {
58
+ akanCodePaths2
59
+ } from "./index-jje9qzyq.js";
58
60
  export {
59
61
  AkanCli2 as AkanCli,
60
62
  AkanCodeCompaction2 as AkanCodeCompaction,
@@ -7,19 +7,20 @@ import {
7
7
  Exec,
8
8
  Workspace,
9
9
  command
10
- } from "./index-00ke4phc.js";
10
+ } from "./index-3gccwenr.js";
11
11
  import"./index-52w0fvh8.js";
12
- import"./index-921cxqrd.js";
13
- import"./index-5nd1wtkv.js";
14
- import"./index-p2pahmsa.js";
15
- import"./index-vq77g679.js";
12
+ import"./index-64g9fsjy.js";
13
+ import"./index-p6x5b7hr.js";
14
+ import"./index-kjrvwzav.js";
15
+ import"./index-w134p86k.js";
16
16
  import"./index-m9jj544v.js";
17
- import"./index-005dqc83.js";
18
- import"./index-er16p89s.js";
19
- import"./index-2p1brf5e.js";
17
+ import"./index-1dhf8ymv.js";
18
+ import"./index-0zwznvv1.js";
19
+ import"./index-hvv5rnaq.js";
20
+ import"./index-57q1ayd2.js";
20
21
  import {
21
22
  ApplicationScript
22
- } from "./index-7ndgffg4.js";
23
+ } from "./index-5n5hds19.js";
23
24
  import"./index-7md2g9vw.js";
24
25
  import {
25
26
  writeOption,
@@ -28,7 +29,7 @@ import {
28
29
  allowLocalOption,
29
30
  publicEnvOption
30
31
  } from "./index-mdjc93e1.js";
31
- import"./index-m93qg20j.js";
32
+ import"./index-mwj9q2ya.js";
32
33
 
33
34
  // pkgs/@akanjs/cli/application/application.command.ts
34
35
  import { MigrationCommand } from "akanjs/server/migration/migrationCommand";
@@ -4,19 +4,19 @@ import {
4
4
  Spinner,
5
5
  ProjectTypecheck2,
6
6
  WorkspaceExecutor
7
- } from "./index-921cxqrd.js";
7
+ } from "./index-64g9fsjy.js";
8
8
  import"./index-52w0fvh8.js";
9
- import"./index-97fsvy66.js";
10
- import"./index-er16p89s.js";
9
+ import"./index-12kzwak1.js";
10
+ import"./index-0zwznvv1.js";
11
11
  import {
12
12
  AllRoutesBuilder,
13
13
  FontPruner,
14
14
  precompressArtifacts,
15
15
  SsrBaseArtifactBuilder
16
- } from "./index-mk391h0z.js";
16
+ } from "./index-mt0wa941.js";
17
17
  import {
18
18
  CsrArtifactBuilder
19
- } from "./index-005dqc83.js";
19
+ } from "./index-1dhf8ymv.js";
20
20
  import"./index-62md4dwy.js";
21
21
 
22
22
  // pkgs/@akanjs/devkit/applicationBuildRunner.ts
@@ -1,31 +1,31 @@
1
1
  // @bun
2
2
  import {
3
3
  ApplicationBuildReporter
4
- } from "./index-5nd1wtkv.js";
4
+ } from "./index-p6x5b7hr.js";
5
5
  import {
6
6
  resolveSsrPageEntriesForApp,
7
7
  WorkspaceExecutor,
8
8
  AppExecutor
9
- } from "./index-921cxqrd.js";
9
+ } from "./index-64g9fsjy.js";
10
10
  import {
11
11
  computeRouteSeedIndex,
12
12
  saveRouteSeedIndex,
13
13
  CsrDevBundler,
14
14
  SsrDevBundler
15
- } from "./index-97fsvy66.js";
15
+ } from "./index-12kzwak1.js";
16
16
  import"./index-52w0fvh8.js";
17
17
  import {
18
18
  ServerGraphFile,
19
19
  PagesBundleBuilder
20
- } from "./index-er16p89s.js";
20
+ } from "./index-0zwznvv1.js";
21
21
  import {
22
22
  CssCompiler,
23
23
  FontOptimizer,
24
24
  SsrBaseArtifactBuilder
25
- } from "./index-mk391h0z.js";
25
+ } from "./index-mt0wa941.js";
26
26
  import {
27
27
  CsrArtifactBuilder
28
- } from "./index-005dqc83.js";
28
+ } from "./index-1dhf8ymv.js";
29
29
  import"./index-62md4dwy.js";
30
30
 
31
31
  // pkgs/@akanjs/devkit/incrementalBuilder/buildBatch.proc.ts
@@ -3,27 +3,28 @@ import {
3
3
  App,
4
4
  Workspace,
5
5
  command
6
- } from "./index-00ke4phc.js";
6
+ } from "./index-3gccwenr.js";
7
7
  import"./index-52w0fvh8.js";
8
- import"./index-921cxqrd.js";
9
- import"./index-76jwsm3g.js";
8
+ import"./index-64g9fsjy.js";
9
+ import"./index-0zyatd10.js";
10
10
  import {
11
11
  PlatformTestRun
12
- } from "./index-nzfgyw3b.js";
13
- import"./index-p2pahmsa.js";
14
- import"./index-vq77g679.js";
12
+ } from "./index-zre4m2ce.js";
13
+ import"./index-kjrvwzav.js";
14
+ import"./index-w134p86k.js";
15
15
  import"./index-m9jj544v.js";
16
- import"./index-005dqc83.js";
17
- import"./index-er16p89s.js";
18
- import"./index-5nd1wtkv.js";
19
- import"./index-2p1brf5e.js";
20
- import"./index-7ndgffg4.js";
16
+ import"./index-1dhf8ymv.js";
17
+ import"./index-0zwznvv1.js";
18
+ import"./index-p6x5b7hr.js";
19
+ import"./index-hvv5rnaq.js";
20
+ import"./index-57q1ayd2.js";
21
+ import"./index-5n5hds19.js";
21
22
  import"./index-7md2g9vw.js";
22
23
  import"./index-tvehn2sp.js";
23
- import"./index-2epb3wgh.js";
24
+ import"./index-3txrjt6n.js";
24
25
  import {
25
26
  CloudScript2
26
- } from "./index-m6qgr1rx.js";
27
+ } from "./index-9ndw5d8j.js";
27
28
  import {
28
29
  writeOption,
29
30
  oneNativeTargetOption,
@@ -34,7 +35,7 @@ import {
34
35
  hostOption,
35
36
  subspaceOption
36
37
  } from "./index-mdjc93e1.js";
37
- import"./index-m93qg20j.js";
38
+ import"./index-mwj9q2ya.js";
38
39
 
39
40
  // pkgs/@akanjs/cli/cloud/cloud.command.ts
40
41
  var localRegistryUrl = () => process.env.AKAN_NPM_REGISTRY ?? "http://127.0.0.1:4873";
@@ -0,0 +1,25 @@
1
+ // @bun
2
+ import {
3
+ CloudScript2
4
+ } from "./index-9ndw5d8j.js";
5
+ import"./index-zre4m2ce.js";
6
+ import"./index-5n5hds19.js";
7
+ import"./index-hvv5rnaq.js";
8
+ import"./index-3txrjt6n.js";
9
+ import"./index-0zyatd10.js";
10
+ import"./index-57q1ayd2.js";
11
+ import"./index-mwj9q2ya.js";
12
+ import"./index-w134p86k.js";
13
+ import"./index-kjrvwzav.js";
14
+ import"./index-m9jj544v.js";
15
+ import"./index-3gccwenr.js";
16
+ import"./index-7md2g9vw.js";
17
+ import"./index-1dhf8ymv.js";
18
+ import"./index-p6x5b7hr.js";
19
+ import"./index-0zwznvv1.js";
20
+ import"./index-64g9fsjy.js";
21
+ import"./index-tvehn2sp.js";
22
+ import"./index-52w0fvh8.js";
23
+ export {
24
+ CloudScript2 as CloudScript
25
+ };
@@ -4,9 +4,9 @@ import {
4
4
  runner,
5
5
  script,
6
6
  command
7
- } from "./index-00ke4phc.js";
7
+ } from "./index-3gccwenr.js";
8
8
  import"./index-52w0fvh8.js";
9
- import"./index-921cxqrd.js";
9
+ import"./index-64g9fsjy.js";
10
10
  import {
11
11
  akanCodeDefaultModel2,
12
12
  CodeAgentStreamPrinter2
@@ -19,7 +19,7 @@ class CodeRunner extends runner("code") {
19
19
  async serve(options, listen) {
20
20
  await import("./consoleToStderr-h5bryj94.js");
21
21
  const [{ CodeAgent }, { CodeAgentRpcHost }, { CodeAgentRpcListener }] = await Promise.all([
22
- import("./CodeAgent-23ewzxqa.js"),
22
+ import("./CodeAgent-fbcq8vks.js"),
23
23
  import("./CodeAgentRpcHost-9g27hmer.js"),
24
24
  import("./CodeAgentRpcListener-7p7z5dd7.js")
25
25
  ]);
@@ -34,8 +34,8 @@ class CodeRunner extends runner("code") {
34
34
  }
35
35
  async tui(options, seed) {
36
36
  const [{ CodeAgent }, { CodeTui }] = await Promise.all([
37
- import("./CodeAgent-23ewzxqa.js"),
38
- import("./CodeTui-kc99fk78.js")
37
+ import("./CodeAgent-fbcq8vks.js"),
38
+ import("./CodeTui-0626gxqd.js")
39
39
  ]);
40
40
  const agentOptions = await CodeRunner.#agentOptions(options, false);
41
41
  let resume = options.resume;
@@ -67,7 +67,7 @@ class CodeRunner extends runner("code") {
67
67
  }
68
68
  }
69
69
  async run(prompt, options) {
70
- const { CodeAgent } = await import("./CodeAgent-23ewzxqa.js");
70
+ const { CodeAgent } = await import("./CodeAgent-fbcq8vks.js");
71
71
  const agent = await CodeAgent.create(await CodeRunner.#agentOptions(options, false));
72
72
  const printer = new CodeAgentStreamPrinter2({ json: options.json, thinking: options.thinking });
73
73
  agent.on((event) => printer.print(event));
@@ -1 +1 @@
1
- {"byCommand":{"create-workspace":"workspace","generate-agent-rules":"workspace","lint":"workspace","lint-all":"workspace","machine-keygen":"workspace","sync-all":"workspace","init":"workspace","agent":"agent","code":"code","create-application":"application","remove-application":"application","plan-slice":"application","sync":"application","script":"application","migrate":"application","create-migration":"application","console":"application","logs":"application","build":"application","b":"application","typecheck":"application","t":"application","test":"application","build-ios":"application","bi":"application","build-android":"application","ba":"application","build-desktop":"application","bd":"application","start":"application","s":"application","start-ios":"application","si":"application","start-android":"application","sa":"application","start-desktop":"application","sd":"application","release-ios":"application","release-android":"application","pack-update":"application","update-keygen":"application","publish-update":"application","dbup":"application","db-export":"application","db-import":"application","dbdown":"application","create-library":"library","remove-library":"library","sync-library":"library","library-status":"library","install-library":"library","start-registry":"localRegistry","reset-registry":"localRegistry","smoke-registry":"localRegistry","version":"package","create-package":"package","remove-package":"package","sync-package":"package","build-package":"package","verify-dist-package":"package","verify-akan-publish-packages":"package","create-module":"module","remove-module":"module","create-service":"module","create-view":"module","create-unit":"module","create-template":"module","create-crud-page":"page","context":"context","doctor":"context","mcp-install":"context","mcp":"context","mcp-call":"context","login":"cloud","logout":"cloud","deploy-akan":"cloud","test-platforms":"cloud","update":"cloud","push-update":"cloud","register-binary":"cloud","upload-secret":"cloud","list-secrets":"cloud","remove-secret":"cloud","download-env":"cloud","upload-env":"cloud","subspace":"subspace","guideline":"guideline","create-scalar":"scalar","remove-scalar":"scalar","create-ui":"primitive","add-field":"primitive","add-enum-field":"primitive","quality":"quality","repair":"repair","workflow":"workflow","pipeline":"pipeline","tunnel":"tunnel"}}
1
+ {"byCommand":{"create-workspace":"workspace","generate-agent-rules":"workspace","lint":"workspace","lint-all":"workspace","machine-keygen":"workspace","sync-all":"workspace","init":"workspace","agent":"agent","code":"code","create-application":"application","remove-application":"application","plan-slice":"application","sync":"application","script":"application","migrate":"application","create-migration":"application","console":"application","logs":"application","build":"application","b":"application","typecheck":"application","t":"application","test":"application","build-ios":"application","bi":"application","build-android":"application","ba":"application","build-desktop":"application","bd":"application","start":"application","s":"application","start-ios":"application","si":"application","start-android":"application","sa":"application","start-desktop":"application","sd":"application","release-ios":"application","release-android":"application","pack-update":"application","update-keygen":"application","publish-update":"application","dbup":"application","db-export":"application","db-import":"application","dbdown":"application","create-library":"library","remove-library":"library","sync-library":"library","library-status":"library","install-library":"library","start-registry":"localRegistry","reset-registry":"localRegistry","smoke-registry":"localRegistry","version":"package","create-package":"package","remove-package":"package","sync-package":"package","build-package":"package","verify-dist-package":"package","verify-akan-publish-packages":"package","create-module":"module","remove-module":"module","create-service":"module","create-view":"module","create-unit":"module","create-template":"module","create-crud-page":"page","context":"context","doctor":"context","mcp-install":"context","mcp":"context","mcp-call":"context","login":"cloud","logout":"cloud","deploy-akan":"cloud","test-platforms":"cloud","update":"cloud","push-update":"cloud","register-binary":"cloud","upload-secret":"cloud","list-secrets":"cloud","remove-secret":"cloud","download-env":"cloud","upload-env":"cloud","subspace":"subspace","guideline":"guideline","create-scalar":"scalar","remove-scalar":"scalar","create-ui":"primitive","add-field":"primitive","add-enum-field":"primitive","quality":"quality","verify":"verify","repair":"repair","workflow":"workflow","pipeline":"pipeline","tunnel":"tunnel"}}
@@ -2,29 +2,29 @@
2
2
  import {
3
3
  Workspace,
4
4
  command
5
- } from "./index-00ke4phc.js";
5
+ } from "./index-3gccwenr.js";
6
6
  import"./index-52w0fvh8.js";
7
- import"./index-921cxqrd.js";
7
+ import"./index-64g9fsjy.js";
8
8
  import"./index-hj6w4ka1.js";
9
- import"./index-xjwcp91m.js";
10
- import"./index-s4c2y5gs.js";
11
- import"./index-9sa6abze.js";
12
- import"./index-p2pahmsa.js";
13
- import"./index-vq77g679.js";
9
+ import"./index-05nxx4m5.js";
10
+ import"./index-8s8b4eba.js";
11
+ import"./index-6269mf2s.js";
12
+ import"./index-kjrvwzav.js";
13
+ import"./index-w134p86k.js";
14
14
  import"./index-m9jj544v.js";
15
- import"./index-005dqc83.js";
16
- import"./index-er16p89s.js";
17
- import"./index-zzvvc845.js";
18
- import"./index-4332q6yj.js";
19
- import"./index-gxj80jz7.js";
20
- import"./index-m54n0v29.js";
21
- import"./index-ysyt782g.js";
22
- import"./index-qx4r4cj2.js";
23
- import"./index-vgt25eh1.js";
24
- import"./index-rxse80x6.js";
15
+ import"./index-1dhf8ymv.js";
16
+ import"./index-0zwznvv1.js";
17
+ import"./index-r2wedvqn.js";
18
+ import"./index-922k2zwq.js";
19
+ import"./index-rvynj5gz.js";
20
+ import"./index-tdv66eah.js";
21
+ import"./index-hm7x0c11.js";
22
+ import"./index-x5ecanqh.js";
23
+ import"./index-fbewhg4g.js";
24
+ import"./index-js1gj6f6.js";
25
25
  import {
26
26
  ContextScript
27
- } from "./index-saj9cx3a.js";
27
+ } from "./index-f5adsa58.js";
28
28
 
29
29
  // pkgs/@akanjs/cli/context/context.command.ts
30
30
  class ContextCommand extends command("context", [ContextScript], ({ public: target }) => ({
@@ -0,0 +1,26 @@
1
+ // @bun
2
+ import {
3
+ ContextRunner2
4
+ } from "./index-6269mf2s.js";
5
+ import"./index-js1gj6f6.js";
6
+ import"./index-x5ecanqh.js";
7
+ import"./index-hm7x0c11.js";
8
+ import"./index-922k2zwq.js";
9
+ import"./index-tdv66eah.js";
10
+ import"./index-rvynj5gz.js";
11
+ import"./index-fbewhg4g.js";
12
+ import"./index-8s8b4eba.js";
13
+ import"./index-05nxx4m5.js";
14
+ import"./index-w134p86k.js";
15
+ import"./index-r2wedvqn.js";
16
+ import"./index-kjrvwzav.js";
17
+ import"./index-m9jj544v.js";
18
+ import"./index-3gccwenr.js";
19
+ import"./index-1dhf8ymv.js";
20
+ import"./index-0zwznvv1.js";
21
+ import"./index-64g9fsjy.js";
22
+ import"./index-hj6w4ka1.js";
23
+ import"./index-52w0fvh8.js";
24
+ export {
25
+ ContextRunner2 as ContextRunner
26
+ };
@@ -2,12 +2,12 @@
2
2
  import {
3
3
  script,
4
4
  command
5
- } from "./index-00ke4phc.js";
5
+ } from "./index-3gccwenr.js";
6
6
  import"./index-52w0fvh8.js";
7
- import"./index-921cxqrd.js";
7
+ import"./index-64g9fsjy.js";
8
8
  import {
9
9
  Prompter2
10
- } from "./index-zzvvc845.js";
10
+ } from "./index-r2wedvqn.js";
11
11
 
12
12
  // pkgs/@akanjs/cli/guideline/guideline.script.ts
13
13
  import { Logger } from "akanjs/common";
@@ -0,0 +1,104 @@
1
+ ## Akan.js
2
+
3
+ Akan.js is a full-stack TypeScript framework: business code written once reaches web, native apps, server, database
4
+ and infrastructure. A workspace is Bun-first: `apps/<app>` holds pages, domain modules, UI, env files and
5
+ `akan.config.ts`; `libs/<lib>` holds shared domain and utility code apps reuse.
6
+
7
+ ## Work Loop
8
+
9
+ 1. Read the module's `*.abstract.md` and its neighbours before changing it. Update the abstract when an invariant, a
10
+ workflow or public behaviour changes, never for a style-only edit.
11
+ 2. Prefer an Akan workflow to a hand edit: `akan workflow list` / `explain <name>` / `plan <name> … --out <plan>` /
12
+ `apply <plan>`, or the `list_workflows` / `plan_workflow` / `apply_workflow` tools of `akan mcp`. Split a
13
+ compound request into workflows applied in order (`create-module`, then `add-field`). Hand-edit only the owning
14
+ source file, and only when no workflow fits or apply reports manual action.
15
+ 3. Never hand-edit a generated file (listed below). After adding, renaming or deleting a file, run
16
+ `akan sync <app-or-lib>`.
17
+ 4. After editing, run `akan verify [<app-or-lib>]` once. It syncs, lints with fixes, typechecks, fast-builds and
18
+ checks SSR over what changed, and prints only what failed. Fix and rerun until it prints `verify ok`; never run
19
+ `akan lint`, `akan typecheck` and `akan build` one by one.
20
+ 5. Check an endpoint with a signal test (`akan test <app> [files]`), never raw HTTP against the dev server.
21
+ 6. Scaffolds take the target positionally (`akan create-module photo <app>`, `akan sync <app>`); only `add-field` and
22
+ `add-enum-field` take `--app` / `--module`.
23
+
24
+ ## Change Scope
25
+
26
+ - Change what the task needs and the files directly tied to it — no formatting-only diffs, no style rewrites nearby.
27
+ - Never revert or overwrite someone else's change in a dirty working tree.
28
+ - Follow the nearest established pattern; when two shapes disagree, follow the newer neighbour. A new abstraction must
29
+ remove real duplication — near-identical sibling modules are copied with changed literals, not parameterised.
30
+
31
+ ## Looks Wrong, Is Right — Do Not "Fix"
32
+
33
+ - Tailwind class order (`font-bold text-2xl text-foreground`) — Biome sorts it, `cn()` arguments included.
34
+ - `static name = "User";` on a guard class — `fetch` serializes it and the API explorer filters on it.
35
+ - `(this as unknown as RootStore).logout()` in a store — the sanctioned way to reach another store.
36
+ - `key={idx}` and short dependency arrays — `noArrayIndexKey` and `useExhaustiveDependencies` are off on purpose.
37
+ - Empty scaffold files, empty dictionary stages, the `// state` / `// action` markers — they mark where code goes.
38
+ - One-line re-export shims in a lib's `common/`, `webkit/`, `ui/` — the only legal path for a third-party package.
39
+ - `return await …save()` in a service; `as const` on every `enumOf(...)` array.
40
+ - Typos and transliterated terms in domain vocabulary — callers match on the name.
41
+
42
+ ## Rules That Break The Build
43
+
44
+ `akan verify` reports each through the check named in parentheses, and the bracketed path rule carries the full
45
+ contract. Path rules name their checks the same way.
46
+
47
+ - Throw `new Err("<module>.error.<key>")` with the key in the module dictionary's `.error({})`; never a raw `Error`
48
+ (`no-throw-raw-error`) [app].
49
+ - A third-party package reaches `page/**`, a barrel or a module file only through a lib re-export
50
+ (`no-import-external-library`) [app].
51
+ - Colors only from the semantic vocabulary (`bg-primary`, `text-foreground/70`) — no palette, arbitrary, daisyUI or
52
+ `style={{}}` colors (`no-raw-palette-class`, `no-arbitrary-color`, `no-daisyui-legacy-class`, `no-inline-color`)
53
+ [style].
54
+ - No `console.log` / `console.debug`, never `logger.log()` (`noConsole`, `no-deprecated-log-level`); server code logs
55
+ through `this.logger` [app].
56
+ - No `document.cookie`, `localStorage` or `sessionStorage` (`no-document-cookie`, `no-web-storage`) — `getCookie`,
57
+ `setCookie`, `storage`, `secretStorage` from `akanjs/client` [app].
58
+ - Client files never import server files and the reverse (`no-import-server-in-client`, `no-import-client-in-server`);
59
+ `import type` is legal everywhere [ssr].
60
+ - A server write leaves the browser only through a store action, one write per action or handler
61
+ (`akan.write.placement`, `akan.store.multi-write`, `akan.component.write-chain`); chained writes become one service
62
+ method behind one endpoint [gates].
63
+ - Every endpoint and named slice names its `guards`, `[Public]` when anonymous is the intent (`no-unguarded-endpoint`)
64
+ [auth].
65
+ - Never ask a list for more than 500 rows (`no-oversized-list-limit`) [module]; never call a hook conditionally, `st.*`
66
+ hooks included (`useHookAtTopLevel`, `no-conditional-st-hook`) [tsx].
67
+ - A file or component past its size limit fails (`akan.size.file`, `akan.size.component`), and `akan.baseline.json`
68
+ only shrinks (`akan.baseline.growth`) — never add or raise an entry [gates].
69
+ - Suppress a plugin diagnostic as `// biome-ignore lint/plugin: <reason>`; every suppression carries a reason [app].
70
+
71
+ ## Code Style
72
+
73
+ - `const` arrow functions over `function`; `interface` for shapes, `type` for unions; no non-null assertions
74
+ (`as unknown as T`, never `as any`); `#private`, but `private` in `*.{constant,document,service,store}.ts`.
75
+ - One class per file, named after it; TypeScript files are camelCase, component and convention files excepted.
76
+ - Identifiers, endpoint names and logs are English; everything a user reads goes through `l("model.field")` or
77
+ `l.trans({ en, ko })`, and dictionary entries are `[en, ko]` pairs.
78
+ - Comment only what the code cannot say (`akan verify` flags each new one as `akan.comment.added`) — a vendor quirk,
79
+ an infrastructure constraint, security reasoning, a domain field's meaning, a state transition, a rejected
80
+ alternative. Never restate code, label a section or add JSDoc; retire a symbol with
81
+ `/** @deprecated <what instead> */`.
82
+ - Server rendering is the default: `"use client"` only for a hook, an event handler, the store, a browser global or
83
+ a client-only package.
84
+
85
+ ## Where Code Goes
86
+
87
+ | Code | Place |
88
+ |---|---|
89
+ | A database-backed noun (User, Product) | `lib/<model>/` — `akan create-module <model> <app>` |
90
+ | A workflow or integration with no stored model | `lib/_<service>/` — `akan create-service <service> <app>` |
91
+ | An embedded value type (Address) | `lib/__scalar/<scalar>/` — `akan create-scalar <scalar> <app>` |
92
+ | A route | `page/` — `<route>.tsx`, `_index.tsx`, `_layout.tsx`, `[param]/` |
93
+ | A pure, isomorphic helper | `common/<name>.ts` (imports `akanjs/base` only, never throws) |
94
+ | A React hook, browser or native-bridge code | `webkit/use<Thing>.tsx` |
95
+ | An adapter, guard, or code touching `node:*`, `Bun`, env or a secret | `srvkit/<name>.ts` |
96
+ | JSX or a look not bound to one model | `ui/<Component>.tsx`, `ui/Recipe/<name>.ts` |
97
+ | The color theme | semantic token values in `page/styles.css` |
98
+ | An iOS, Android or desktop app | `native: { … }` in `akan.config.ts`; an owned plugin in `native/<id>/` |
99
+ | A change to the stored document shape | `akan create-migration <name> <app>` |
100
+
101
+ ## Secrets
102
+
103
+ Never print, summarise or commit secret values, credentials, tokens, private keys or `.env` contents; name env keys
104
+ with placeholders only. `AKAN_PUBLIC_*` values ship to the browser — never put a secret in one.
@@ -0,0 +1,83 @@
1
+ ---
2
+ description: Akan app and library code: the lint gates, sync allowlists and the warts not to copy.
3
+ paths:
4
+ - "{apps,libs}/**"
5
+ ---
6
+
7
+ # Akan App And Library Code
8
+
9
+ ## Rules Every File Obeys
10
+
11
+ `biome.json` extends `@akanjs/devkit/biome.base.json`, which scopes every grit plugin in `@akanjs/devkit/lint/`;
12
+ each plugin's header and diagnostic carry its full reasoning.
13
+
14
+ - **Never construct a raw `Error`** (`no-throw-raw-error`). Throw `new Err("<module>.error.<key>")` with the key
15
+ registered as `[en, ko]` in the module dictionary's `.error({})` — imported from `"../dict"` on the server, from
16
+ `"@libs/<lib>/client"` / `"@apps/<app>/client"` in UI. A `throw` is an error; a raw `Error` rejected, returned or
17
+ stored loses the key and status too (a warning for now). Exempt: tests, `*.constant.ts`, a root `native/` folder
18
+ (plugins throw `AkanNativeError`), `script/migration/**` (an operator reads its message), and `common/**` / `env/**`,
19
+ which have no legal `Err` import — keep throwing code out of them.
20
+ - **Never import a third-party package** (`no-import-external-library`) from `page/**`, any barrel, a module logic file
21
+ (`*.{constant,dictionary,document,service,signal,store}.ts`) or module component
22
+ (`*.{Template,Unit,Util,View,Zone}.tsx`) — re-export it through a lib first (one-line shims in a lib's `common/`,
23
+ `webkit/`, `ui/` are load-bearing). `*.signal.test.ts` / `*.service.test.ts` too, though they may import `node:*` and
24
+ `bun:*` (`no-import-external-library-in-test`).
25
+ - **No `console.log` / `console.debug`** (`noConsole`; only `assert`, `error`, `info`, `warn`; server code uses
26
+ `this.logger` or `new Logger("ClassName")`), and **never `logger.log()` / `Logger.log()`** (`no-deprecated-log-level`)
27
+ — it emits at `info` while reading like its own level; write `.info()`. The ladder is
28
+ `trace verbose debug info warn error`.
29
+ - **Never touch `document.cookie`, `localStorage` or `sessionStorage`** (`no-document-cookie`, `no-web-storage`) — a
30
+ native shell's page keeps no cookies on iOS, macOS and Linux, and Web Storage throws during SSR. Use `getCookie` /
31
+ `setCookie` / `removeCookie`, `storage`, `secretStorage` from `akanjs/client`. Browser APIs a WebView lacks
32
+ (`navigator.share`, `serviceWorker`, `Notification`, `geolocation`, `vibrate`) live in a `webkit/` hook behind
33
+ `isNativeApp()` (`no-web-only-api-outside-webkit`, a warning). Both in full: `runtimeRule`.
34
+ - **No deep imports past a barrel** (`no-deep-internal-import`), except cross-module constants (`../map/map.constant`).
35
+ - **Suppress a grit diagnostic as `lint/plugin`** (`// biome-ignore lint/plugin: <reason>`,
36
+ `// biome-ignore-all lint/plugin: <reason>`); bare `plugin:` does nothing. `pkgs/` is out of scope.
37
+ - **`biome.json` is strict JSON** — a comment breaks config resolution without an error (Biome falls back to
38
+ discovery and aborts on a nested config); rename it `biome.jsonc` to document a disabled rule.
39
+ - **`akan lint` prints up to 200 diagnostics** (`--max-diagnostics <n>`, `0` = all); Biome's own uncounted 20 reads
40
+ as progress when the mix merely changed.
41
+
42
+ ## Akan Sync Conventions
43
+
44
+ - App root files: `AGENTS.md`, `CLAUDE.md`, `akan.app.json`, `akan.baseline.json`, `akan.config.ts`, `client.ts`,
45
+ `main.ts`, `package.json`, `server.ts`, `tsconfig.json`, `tsconfig.tsbuildinfo`; folders: `.akan`, `common`, `env`,
46
+ `lib`, `native`, `page`, `plugin`, `private`, `public`, `script`, `secrets`, `srvkit`, `ui`, `webkit`. A Capacitor-era
47
+ `ios` / `android` / `mobile` folder or `capacitor.config.*` in an app root is refused as a leftover (native
48
+ projects live under `dist/native/<app>/<target>`).
49
+ - Lib root files: `AGENTS.md`, `CLAUDE.md`, `README.md`, `akan.baseline.json`, `akan.config.ts`, `akan.lib.json`,
50
+ `client.ts`, `index.ts`, `package.json`, `server.ts`, `tsconfig.json`, `tsconfig.spec.json`, `tsconfig.tsbuildinfo`;
51
+ folders: the app's minus `.akan`, `script`, `secrets` (no `main.ts` either — a lib is never booted).
52
+ - The allowlists' one source is `pkgs/@akanjs/devkit/workspaceLayout.ts`, read by `akan sync` (error), `akan doctor`
53
+ and `akan quality scan` — add an entry there and mirror it here.
54
+ - `apps/<app>/AGENTS.md` / `libs/<lib>/AGENTS.md` carry a generated `## Recipes In Scope` block between the
55
+ `akan:agent` markers — never hand-edit it (outside the markers is yours); `akan lint` fails when it is stale.
56
+ - `plugin/<name>.plugin.ts` declares an Akan plugin. No `apps/*/base` or `libs/*/base` — use `common/`.
57
+ - `lib/` root holds only `cnst.ts`, `db.ts`, `dict.ts`, `option.ts`, `sig.ts`, `srv.ts`, `st.ts`, `useClient.ts`,
58
+ `useServer.ts` — no hand-written file or test.
59
+ - Modules are `lib/<model>`, `lib/_<service>`, `lib/__scalar/<scalar>`; their UI files are
60
+ `<Model>.Template|Unit|Util|View|Zone.tsx`, `<Service>.Util|Zone.tsx`, `<Scalar>.Template|Unit.tsx`. A test is
61
+ named after the one file it covers, so `<model>.<topic>.signal.test.ts` is refused like `<model>.<topic>.signal.ts`.
62
+ - `ui/`, `webkit/`, `srvkit/`, `common/`, `plugin/` and module `index.ts` barrels are generated
63
+ (`export * from "./name";` per 1-depth entry, `export {};` when empty, so a stale one heals on sync;
64
+ `akan create-library` starts `common/`, `srvkit/`, `webkit/`, `ui/` with that empty barrel) — never hand-edit or
65
+ track them. **Never hand-write an
66
+ `index.tsx` / `.jsx` / `.mts` at those roots**: Bun resolves it before the generated `index.ts`, so new exports are
67
+ `undefined` at runtime (`akan sync` refuses it, `akan doctor` reports `facet-index-shadowed`); a namespace belongs
68
+ in `ui/<Folder>/index.tsx`.
69
+ - Sync writes barrels, module indexes and `akan.*.json` exactly as Biome prints them (`akan lint --no-fix` passes
70
+ right after a sync), so a lint diff in one is a generator bug — fix the generator.
71
+ - **`akan sync` owns package.json `dependencies`**: it adds imports at the root's version, realigns root-declared
72
+ entries, and drops unimported ones (logged); undeclared-at-root entries are kept with a warning. Keep a package no
73
+ TS file imports (a CSS `@plugin`, a runtime-only package) with `akan.keepDependencies`; `externalLibs` and
74
+ `trustedDependencies` always stay; devDependencies are realigned, never pruned. `akan install-library` lets the
75
+ root win — it adds only what the root lacks and warns when the lib wants a newer version.
76
+
77
+ ## Present In The Code — Do Not Imitate
78
+
79
+ Warts in older files — never copy them; when two shapes disagree, follow the newer neighbour: `children: any`
80
+ (use `ReactNode`); hard-coded API keys or secrets (they belong in `option.ts` or env); large commented-out blocks;
81
+ stale `// TODO: Implement …` above implemented methods; `{cond && <X/>}`, hard-coded Korean bypassing `l()`,
82
+ `window.alert(...)`; bare `/* eslint-disable */` blocks; raw palette grays like `text-gray-400`. A store reaching
83
+ another through `(this as unknown as RootStore)` is **not** a wart — it is the sanctioned way.