@akanjs/cli 3.0.0-beta.9 → 3.0.1
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/CodeAgent-zfab7pkn.js +9 -0
- package/CodeAgentRpcHost-p7h6n2hp.js +7 -0
- package/CodeAgentRpcListener-7p7z5dd7.js +97 -0
- package/CodeTui-0zhnr0pw.js +1457 -0
- package/README.ko.md +83 -28
- package/README.md +70 -27
- package/TunnelShare-cwh9ezsm.js +9 -0
- package/{agent.command-0q17pnrs.js → agent.command-aja6z9mn.js} +8 -9
- package/akanCode.js +102 -0
- package/application.command-049ehgx3.js +246 -0
- package/{applicationBuildRunner-kxwbssgn.js → applicationBuildRunner-75n5rpwp.js} +121 -77
- package/buildBatch.proc.js +120 -32
- package/cloud.command-gw4kqxt8.js +95 -0
- package/cloud.script-c723cpcb.js +20 -0
- package/code.command-x9t6z5nw.js +154 -0
- package/commandManifest.json +1 -1
- package/consoleToStderr-h5bryj94.js +7 -0
- package/context.command-yfbe1rtd.js +48 -0
- package/context.runner-erfe68j5.js +21 -0
- package/{dependencyScanner-shs82ynp.js → dependencyScanner-06z2dmrr.js} +2 -2
- package/{devTui-m1atgkc9.js → devTui-q7k7bakd.js} +122 -40
- package/fileSys-wzzrntkw.js +9 -0
- package/guideline.command-kq9gp690.js +42 -0
- package/guidelines/agentRule/agentRule.instruction.md +154 -26
- package/guidelines/conventions/conventions.instruction.md +138 -48
- package/guidelines/mcpRule/mcpRule.instruction.md +7 -5
- package/guidelines/queryRule/queryRule.instruction.md +21 -7
- package/guidelines/runtimeRule/runtimeRule.instruction.md +291 -6
- package/guidelines/ssrRule/ssrRule.instruction.md +4 -2
- package/guidelines/transportRule/transportRule.instruction.md +10 -8
- package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +20 -0
- package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +66 -3
- package/incrementalBuilder.proc.js +564 -109
- package/{index-2tv3fdx4.js → index-150s07n8.js} +1230 -1459
- package/{index-vyvre9en.js → index-25fvrxmy.js} +6 -2
- package/{index-kcxmv48c.js → index-2ahj896a.js} +45 -79
- package/index-2wc41k5w.js +49 -0
- package/index-3hx1z96c.js +87 -0
- package/{index-q0y2jq9j.js → index-52w0fvh8.js} +21 -4
- package/{index-04bk599g.js → index-5g4rkrvt.js} +10 -17
- package/index-5pvxf7z0.js +53 -0
- package/index-5q14pwzd.js +69 -0
- package/{index-vxtad5bd.js → index-66yspb67.js} +5 -8
- package/index-7md2g9vw.js +6 -0
- package/index-7p4c0yer.js +1058 -0
- package/{index-d43r08tf.js → index-8b639zes.js} +77 -150
- package/{index-ktb5njgy.js → index-8kvy8qb4.js} +49 -99
- package/index-94s080qm.js +266 -0
- package/index-9dp031by.js +12 -0
- package/{index-0g7r8xz3.js → index-a37by9hn.js} +114 -232
- package/{index-k2j1hc4r.js → index-b95yhqjr.js} +12 -12
- package/{index-3d9y066c.js → index-bjwxs904.js} +9 -8
- package/{index-2xp0kfkt.js → index-br8pkrk1.js} +37 -25
- package/index-c14nsvnv.js +700 -0
- package/index-c6eggbee.js +123 -0
- package/index-d2242ksy.js +99 -0
- package/{index-92zztqy1.js → index-dy0jx9ay.js} +2 -17
- package/{index-a64esmtb.js → index-fkvb79qe.js} +523 -1022
- package/index-h54yj9wr.js +1119 -0
- package/{index-by5gpp8x.js → index-hj6w4ka1.js} +2 -1
- package/{index-y6n8nmny.js → index-kn5d4jmg.js} +75 -203
- package/index-m3xsb1ms.js +4300 -0
- package/{index-gyd220p2.js → index-mb59b8x0.js} +554 -577
- package/{index-j9yhg404.js → index-mzjb6zp4.js} +4 -7
- package/index-p6pbz9n5.js +25 -0
- package/{index-sj5vxr8f.js → index-qe71g4ze.js} +983 -898
- package/index-rfcz04w9.js +187 -0
- package/{index-hwkygn9s.js → index-senscydg.js} +331 -36
- package/{index-ffvk10zz.js → index-vs8mefhy.js} +107 -241
- package/index-wa5jbxj1.js +760 -0
- package/index-y5ga5w9t.js +2729 -0
- package/{index-9077wzd2.js → index-y7hx1ygz.js} +43 -26
- package/{index-h7yw2z9n.js → index-zzvvc845.js} +8 -14
- package/index.js +23 -22
- package/{library.command-qzzbj6d8.js → library.command-keqjevpp.js} +4 -5
- package/{localRegistry.command-vyrgg4xw.js → localRegistry.command-pydeq5zf.js} +23 -43
- package/{module.command-rq5hq3ax.js → module.command-dkrnqx3v.js} +8 -12
- package/{package.command-d9hd6v9n.js → package.command-wmc0ys5y.js} +6 -7
- package/package.json +15 -7
- package/{page.command-126d56te.js → page.command-tf3erhrv.js} +4 -5
- package/{primitive.command-taxd1538.js → primitive.command-7hqpegj4.js} +9 -23
- package/prompter-76k56b37.js +8 -0
- package/{quality.command-6gsna0a3.js → quality.command-8122axq3.js} +205 -377
- package/{recipeScanner-fpagtgc1.js → recipeScanner-4b69ybe0.js} +1 -1
- package/{repair.command-tq2dgy72.js → repair.command-mcy12h0n.js} +11 -35
- package/{routeSourceValidator-apyqw7wk.js → routeSourceValidator-7ycnfz0e.js} +0 -6
- package/{scalar.command-3bcmrrkv.js → scalar.command-vvvbzttc.js} +7 -11
- package/skills/akan-code/SKILL.md +130 -0
- package/skills/akan-debug/SKILL.md +42 -0
- package/skills/akan-deps/SKILL.md +50 -0
- package/skills/akan-err/SKILL.md +39 -0
- package/skills/akan-module/SKILL.md +45 -0
- package/skills/akan-scaffold/SKILL.md +76 -0
- package/skills/akan-scalar/SKILL.md +52 -0
- package/skills/akan-service/SKILL.md +34 -0
- package/skills/akan-store/SKILL.md +67 -0
- package/skills/akan-ui/SKILL.md +63 -0
- package/skills/akan-validate/SKILL.md +44 -0
- package/{subspace.command-eddzqpx3.js → subspace.command-pzvqfy5h.js} +53 -62
- package/templates/__scalar/__model__/__model__.abstract.md.template +8 -0
- package/templates/app/page/_index.tsx +257 -258
- package/templates/app/page/_layout.tsx +5 -1
- package/templates/app/page/_overrides.tsx +12 -0
- package/templates/app/page/styles.css.template +316 -14
- package/templates/app/public/apple-touch-icon.png +0 -0
- package/templates/app/public/favicon.ico +0 -0
- package/templates/app/public/jelly/cloud.webp +0 -0
- package/templates/app/public/jelly/comet.webp +0 -0
- package/templates/app/public/jelly/moon.webp +0 -0
- package/templates/app/public/jelly/planet.webp +0 -0
- package/templates/app/public/jelly/rocket.webp +0 -0
- package/templates/app/public/jelly/star.webp +0 -0
- package/templates/app/public/jelly/sugar.webp +0 -0
- package/templates/app/public/logo.png +0 -0
- package/templates/app/ui/Recipe/index.ts +9 -0
- package/templates/app/ui/Recipe/jellyButton.ts +63 -0
- package/templates/appSample/lib/__scalar/workHistory/workHistory.abstract.ts +8 -39
- package/templates/appSample/lib/_noti/noti.abstract.ts +6 -29
- package/templates/appSample/lib/task/Task.Unit.tsx +1 -1
- package/templates/appSample/lib/task/Task.Util.tsx +10 -13
- package/templates/appSample/lib/task/Task.View.tsx +2 -2
- package/templates/appSample/lib/task/Task.Zone.tsx +5 -2
- package/templates/appSample/lib/task/task.abstract.ts +12 -32
- package/templates/appSample/lib/task/task.signal.spec.ts +1 -15
- package/templates/appSample/lib/task/task.signal.test.ts +15 -1
- package/templates/appSample/lib/task/task.signal.ts +10 -8
- package/templates/appSample/page/task/[taskId]/_index.tsx +6 -6
- package/templates/appSample/page/task/[taskId]/edit.tsx +5 -4
- package/templates/appSample/page/task/_index.tsx +4 -3
- package/templates/appSample/page/task/_layout.tsx +1 -1
- package/templates/appSample/page/task/new.tsx +5 -4
- package/templates/appSample/srvkit/{AuthGuard.ts → guards.ts} +7 -4
- package/templates/appSample/srvkit/{SessionInternalArg.ts → internalArgs.ts} +6 -4
- package/templates/appSample/ui/GlobalLoading.tsx +2 -1
- package/templates/appSample/ui/QuantityControl.tsx +3 -3
- package/templates/client.ts +7 -30
- package/templates/crudPages/[__model__Id]/edit/page.tsx +2 -1
- package/templates/crudPages/[__model__Id]/page.tsx +2 -1
- package/templates/crudPages/new/page.tsx +2 -1
- package/templates/crudPages/page.tsx +2 -1
- package/templates/crudSinglePage/page.tsx +2 -1
- package/templates/lib/__lib/lib.dictionary.ts +0 -2
- package/templates/lib/__lib/lib.document.ts +0 -2
- package/templates/lib/sig.ts +8 -30
- package/templates/localDev/docker-compose.yaml.template +3 -14
- package/templates/module/__model__.signal.ts +12 -4
- package/templates/pkgRoot/tsconfig.json.template +2 -7
- package/templates/server.ts +1 -3
- package/templates/service/__model__.abstract.md.template +8 -0
- package/templates/workspaceRoot/.gitignore.template +0 -1
- package/templates/workspaceRoot/AGENTS.md.template +6 -0
- package/templates/workspaceRoot/package.json.template +1 -3
- package/tunnel.command-82zz5xnq.js +129 -0
- package/{typeChecker-3xgrzc2v.js → typeChecker-px49mezc.js} +1 -1
- package/typecheck.proc.js +1 -1
- package/workflow.command-y8x3kgjv.js +79 -0
- package/{workspace.command-06wvstgr.js → workspace.command-jvsb7brc.js} +79 -109
- package/abstractCompactor-gmkc0z8j.js +0 -102
- package/application.command-18y0s485.js +0 -204
- package/applicationReleasePackager-4yasxwv9.js +0 -244
- package/capacitorApp-36rbr858.js +0 -12
- package/cloud.command-av97ndh6.js +0 -94
- package/cloud.script-cm11xjdz.js +0 -20
- package/context.command-5v37ef3n.js +0 -81
- package/devTuiView-0hc2emhe.js +0 -9
- package/getDirname-dr3jz1xg.js +0 -7
- package/guideline.command-4pz9g1rt.js +0 -360
- package/guidelines/agentRule/agentRule.generate.json +0 -31
- package/guidelines/componentRule/componentRule.generate.json +0 -31
- package/guidelines/conventions/conventions.generate.json +0 -25
- package/guidelines/cssRule/cssRule.generate.json +0 -31
- package/guidelines/docPageRule/docPageRule.generate.json +0 -31
- package/guidelines/docPageRule/docPageRule.instruction.md +0 -25
- package/guidelines/docSyncRule/docSyncRule.generate.json +0 -31
- package/guidelines/docSyncRule/docSyncRule.instruction.md +0 -25
- package/guidelines/enumConstant/enumConstant.generate.json +0 -31
- package/guidelines/enumConstant/enumConstant.instruction.md +0 -28
- package/guidelines/fieldRule/fieldRule.generate.json +0 -31
- package/guidelines/framework/framework.generate.json +0 -32
- package/guidelines/mcpRule/mcpRule.generate.json +0 -35
- package/guidelines/modelConstant/modelConstant.generate.json +0 -32
- package/guidelines/modelDictionary/modelDictionary.generate.json +0 -32
- package/guidelines/modelDocument/modelDocument.generate.json +0 -31
- package/guidelines/modelService/modelService.generate.json +0 -31
- package/guidelines/modelSignal/modelSignal.generate.json +0 -31
- package/guidelines/modelStore/modelStore.generate.json +0 -31
- package/guidelines/modelTemplate/modelTemplate.generate.json +0 -31
- package/guidelines/modelUnit/modelUnit.generate.json +0 -31
- package/guidelines/modelUtil/modelUtil.generate.json +0 -31
- package/guidelines/modelView/modelView.generate.json +0 -31
- package/guidelines/modelZone/modelZone.generate.json +0 -31
- package/guidelines/moduleCodegen/moduleCodegen.generate.json +0 -31
- package/guidelines/moduleCodegen/moduleCodegen.instruction.md +0 -28
- package/guidelines/moduleOverview/moduleOverview.generate.json +0 -31
- package/guidelines/queryRule/queryRule.generate.json +0 -31
- package/guidelines/recipeRule/recipeRule.generate.json +0 -31
- package/guidelines/runtimeRule/runtimeRule.generate.json +0 -25
- package/guidelines/scalarConstant/scalarConstant.generate.json +0 -32
- package/guidelines/scalarDictionary/scalarDictionary.generate.json +0 -32
- package/guidelines/scalarModule/scalarModule.generate.json +0 -31
- package/guidelines/sharedUiUsage/sharedUiUsage.generate.json +0 -31
- package/guidelines/sharedUiUsage/sharedUiUsage.instruction.md +0 -25
- package/guidelines/ssrRule/ssrRule.generate.json +0 -31
- package/guidelines/transportRule/transportRule.generate.json +0 -31
- package/guidelines/utilUiUsage/utilUiUsage.generate.json +0 -31
- package/guidelines/utilUiUsage/utilUiUsage.instruction.md +0 -25
- package/guidelines/workspaceOnboarding/workspaceOnboarding.generate.json +0 -24
- package/guidelines/workspaceRecipes/workspaceRecipes.generate.json +0 -33
- package/index-47pj3aee.js +0 -76
- package/index-5ystnsd5.js +0 -841
- package/index-6wwzs1bc.js +0 -7
- package/index-a17x49vg.js +0 -229
- package/index-m0xccmmm.js +0 -228
- package/index-meh558jy.js +0 -65
- package/index-rtxxan88.js +0 -471
- package/index-te54x9zm.js +0 -338
- package/index-w8kmx1b6.js +0 -2176
- package/index-wt7qrtd4.js +0 -1516
- package/templates/__scalar/__model__/__model__.abstract.md +0 -28
- package/templates/module/__model__.abstract.md +0 -28
- package/templates/service/__model__.abstract.md +0 -28
- package/templates/workspaceRoot/patches/react-dom@19.2.7.patch.template +0 -62
- package/workflow.command-gtdnzvbz.js +0 -108
package/cloud.script-cm11xjdz.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
CloudScript2
|
|
4
|
-
} from "./index-2xp0kfkt.js";
|
|
5
|
-
import"./index-rtxxan88.js";
|
|
6
|
-
import"./index-sj5vxr8f.js";
|
|
7
|
-
import"./index-j9yhg404.js";
|
|
8
|
-
import"./index-vxtad5bd.js";
|
|
9
|
-
import"./index-9077wzd2.js";
|
|
10
|
-
import"./index-te54x9zm.js";
|
|
11
|
-
import"./index-m0xccmmm.js";
|
|
12
|
-
import"./index-0g7r8xz3.js";
|
|
13
|
-
import"./index-hwkygn9s.js";
|
|
14
|
-
import"./index-2tv3fdx4.js";
|
|
15
|
-
import"./index-6wwzs1bc.js";
|
|
16
|
-
import"./index-kcxmv48c.js";
|
|
17
|
-
import"./index-q0y2jq9j.js";
|
|
18
|
-
export {
|
|
19
|
-
CloudScript2 as CloudScript
|
|
20
|
-
};
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
Workspace,
|
|
4
|
-
command
|
|
5
|
-
} from "./index-0g7r8xz3.js";
|
|
6
|
-
import"./index-q0y2jq9j.js";
|
|
7
|
-
import"./index-2tv3fdx4.js";
|
|
8
|
-
import"./index-6wwzs1bc.js";
|
|
9
|
-
import"./index-by5gpp8x.js";
|
|
10
|
-
import"./index-gyd220p2.js";
|
|
11
|
-
import"./index-ktb5njgy.js";
|
|
12
|
-
import {
|
|
13
|
-
ContextScript
|
|
14
|
-
} from "./index-y6n8nmny.js";
|
|
15
|
-
import"./index-wt7qrtd4.js";
|
|
16
|
-
import"./index-h7yw2z9n.js";
|
|
17
|
-
import"./index-04bk599g.js";
|
|
18
|
-
import"./index-ffvk10zz.js";
|
|
19
|
-
import"./index-m0xccmmm.js";
|
|
20
|
-
import"./index-te54x9zm.js";
|
|
21
|
-
import"./index-5ystnsd5.js";
|
|
22
|
-
import"./index-vyvre9en.js";
|
|
23
|
-
import"./index-d43r08tf.js";
|
|
24
|
-
import"./index-a17x49vg.js";
|
|
25
|
-
|
|
26
|
-
// pkgs/@akanjs/cli/context/context.command.ts
|
|
27
|
-
class ContextCommand extends command("context", [ContextScript], ({ public: target }) => ({
|
|
28
|
-
context: target({ desc: "Print agent-readable Akan workspace context" }).option("format", String, {
|
|
29
|
-
desc: "output format",
|
|
30
|
-
default: "markdown",
|
|
31
|
-
enum: ["markdown", "json"]
|
|
32
|
-
}).option("app", String, { desc: "app name to include", nullable: true }).option("module", String, { desc: "module name to include with abstract content", nullable: true }).with(Workspace).exec(async function(format, app, module, workspace) {
|
|
33
|
-
await this.contextScript.context(workspace, { format, app, module });
|
|
34
|
-
}),
|
|
35
|
-
doctor: target({ desc: "Report Akan workspace convention diagnostics" }).option("format", String, {
|
|
36
|
-
desc: "output format",
|
|
37
|
-
default: "text",
|
|
38
|
-
enum: ["text", "json"]
|
|
39
|
-
}).option("strict", Boolean, { desc: "treat recommended conventions as errors", default: false }).option("ios", Boolean, {
|
|
40
|
-
desc: "report iOS/mobile config diagnostics (placeholder bundle ids, etc.)",
|
|
41
|
-
default: false
|
|
42
|
-
}).with(Workspace).exec(async function(format, strict, ios, workspace) {
|
|
43
|
-
await this.contextScript.doctor(workspace, { format, strict, ios });
|
|
44
|
-
}),
|
|
45
|
-
mcpInstall: target({ desc: "Install the Akan MCP server config for Cursor, Claude Code, and Codex" }).arg("target", String, { desc: "cursor, claude, codex, or all", nullable: true }).option("force", Boolean, { desc: "overwrite an existing Akan MCP server entry", default: false }).option("mode", String, {
|
|
46
|
-
desc: "MCP permission mode",
|
|
47
|
-
default: "apply",
|
|
48
|
-
enum: ["readonly", "plan", "apply"]
|
|
49
|
-
}).with(Workspace).exec(async function(targetName, force, mode, workspace) {
|
|
50
|
-
await this.contextScript.mcpInstall(workspace, targetName, {
|
|
51
|
-
force,
|
|
52
|
-
mode
|
|
53
|
-
});
|
|
54
|
-
}),
|
|
55
|
-
mcp: target({ desc: "Start the Akan MCP server over stdio", stdio: true }).option("mode", String, {
|
|
56
|
-
desc: "MCP permission mode",
|
|
57
|
-
default: "readonly",
|
|
58
|
-
enum: ["readonly", "plan", "apply"]
|
|
59
|
-
}).with(Workspace).exec(async function(mode, workspace) {
|
|
60
|
-
await this.contextScript.mcp(workspace, { mode });
|
|
61
|
-
}),
|
|
62
|
-
mcpCall: target({ desc: "Call one Akan MCP tool for debugging without stdio JSON-RPC" }).arg("tool", String, { desc: "MCP tool name" }).option("mode", String, {
|
|
63
|
-
desc: "MCP permission mode",
|
|
64
|
-
default: "readonly",
|
|
65
|
-
enum: ["readonly", "plan", "apply"]
|
|
66
|
-
}).option("args", String, { desc: "JSON object to pass as MCP tool arguments", nullable: true }).option("format", String, {
|
|
67
|
-
desc: "output format",
|
|
68
|
-
default: "json",
|
|
69
|
-
enum: ["json"]
|
|
70
|
-
}).with(Workspace).exec(async function(tool, mode, args, format, workspace) {
|
|
71
|
-
await this.contextScript.mcpCall(workspace, tool, {
|
|
72
|
-
mode,
|
|
73
|
-
args,
|
|
74
|
-
format
|
|
75
|
-
});
|
|
76
|
-
})
|
|
77
|
-
})) {
|
|
78
|
-
}
|
|
79
|
-
export {
|
|
80
|
-
ContextCommand
|
|
81
|
-
};
|
package/devTuiView-0hc2emhe.js
DELETED
package/getDirname-dr3jz1xg.js
DELETED
|
@@ -1,360 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
Workspace,
|
|
4
|
-
runner,
|
|
5
|
-
script,
|
|
6
|
-
command
|
|
7
|
-
} from "./index-0g7r8xz3.js";
|
|
8
|
-
import {
|
|
9
|
-
FileSys
|
|
10
|
-
} from "./index-q0y2jq9j.js";
|
|
11
|
-
import"./index-2tv3fdx4.js";
|
|
12
|
-
import {
|
|
13
|
-
getDirname2
|
|
14
|
-
} from "./index-6wwzs1bc.js";
|
|
15
|
-
import {
|
|
16
|
-
Prompter
|
|
17
|
-
} from "./index-h7yw2z9n.js";
|
|
18
|
-
import"./index-m0xccmmm.js";
|
|
19
|
-
import {
|
|
20
|
-
AiSession
|
|
21
|
-
} from "./index-te54x9zm.js";
|
|
22
|
-
|
|
23
|
-
// pkgs/@akanjs/cli/guideline/guideline.script.ts
|
|
24
|
-
import { Logger } from "akanjs/common";
|
|
25
|
-
|
|
26
|
-
// pkgs/@akanjs/cli/guideline/guideline.prompt.ts
|
|
27
|
-
import { randomPicks } from "akanjs/common";
|
|
28
|
-
|
|
29
|
-
class GuidelinePrompt extends Prompter {
|
|
30
|
-
workspace;
|
|
31
|
-
name;
|
|
32
|
-
constructor(workspace, name) {
|
|
33
|
-
super();
|
|
34
|
-
this.workspace = workspace;
|
|
35
|
-
this.name = name;
|
|
36
|
-
}
|
|
37
|
-
#resolveDocsPagePath(page) {
|
|
38
|
-
if (page.startsWith("apps/"))
|
|
39
|
-
return page;
|
|
40
|
-
if (page.endsWith(".tsx"))
|
|
41
|
-
return page;
|
|
42
|
-
return `apps/akan/page${page}`;
|
|
43
|
-
}
|
|
44
|
-
async#getScanFilePaths(matchPattern, { avoidDirs = ["node_modules", ".next"], filterText } = {}) {
|
|
45
|
-
const glob = new Bun.Glob(matchPattern);
|
|
46
|
-
const paths = [];
|
|
47
|
-
for await (const path of glob.scan({ cwd: this.workspace.workspaceRoot, absolute: true })) {
|
|
48
|
-
if (avoidDirs.some((dir) => path.includes(dir)))
|
|
49
|
-
continue;
|
|
50
|
-
const fileContent = await FileSys.readText(path);
|
|
51
|
-
const textFilter = filterText ? new RegExp(filterText) : null;
|
|
52
|
-
if (filterText && !textFilter?.test(fileContent))
|
|
53
|
-
continue;
|
|
54
|
-
paths.push(path);
|
|
55
|
-
}
|
|
56
|
-
return paths;
|
|
57
|
-
}
|
|
58
|
-
async requestCreateInstruction() {
|
|
59
|
-
const guideJson = await Prompter.getGuideJson(this.name);
|
|
60
|
-
const scanFiles = [];
|
|
61
|
-
for (const scan of guideJson.scans) {
|
|
62
|
-
const scanFilePaths = await this.#getScanFilePaths(scan.path, { filterText: scan.filterText });
|
|
63
|
-
const targetFilePaths = scan.sample ? randomPicks(scanFilePaths, scan.sample) : scanFilePaths;
|
|
64
|
-
const scanResult = await Promise.all(targetFilePaths.map(async (filePath) => ({ ...scan, ...await this.workspace.getLocalFile(filePath) })));
|
|
65
|
-
scanFiles.push(...scanResult);
|
|
66
|
-
}
|
|
67
|
-
const resultPath = `${getDirname2(import.meta.url)}/../guidelines/${this.name}/${guideJson.update.filePath}`;
|
|
68
|
-
const writePath = `${this.workspace.workspaceRoot}/pkgs/@akanjs/cli/guidelines/${this.name}/${guideJson.update.filePath}`;
|
|
69
|
-
const isResultExists = await this.workspace.exists(writePath);
|
|
70
|
-
const existingResult = isResultExists ? await this.workspace.readFile(resultPath) : null;
|
|
71
|
-
const request = `
|
|
72
|
-
I am a developer of akanjs framework, a full-stack framework for building web applications.
|
|
73
|
-
I want to generate a ${guideJson.update.filePath} file for ${guideJson.description}.
|
|
74
|
-
This file is a programming guideline for Akan.js framwork users.
|
|
75
|
-
|
|
76
|
-
# ${guideJson.title} Workflow
|
|
77
|
-
- 1. Explore target files in ${guideJson.scans.map((scan) => scan.path).join(", ")}.
|
|
78
|
-
- 2. Read already-written ${guideJson.update.filePath} file if exists. There can be some outdated information, so you need to update the file and add new information, make it more accurate and more detailed.
|
|
79
|
-
- 3. Write the updated file content of the ${guideJson.update.filePath}. It should include the contents of ${guideJson.update.contents.join(",")}, and any other helpful information and contents for guiding. Also, you can rearrange the contents if you think it's more helpful.
|
|
80
|
-
|
|
81
|
-
## 1. Explore target files in ${guideJson.scans.map((scan) => scan.path).join(", ")}.
|
|
82
|
-
${scanFiles.map(({ type, description, filePath, content, sample }) => `
|
|
83
|
-
\`\`\`${filePath.endsWith(".tsx") ? "tsx" : "typescript"}
|
|
84
|
-
// File: ${filePath}
|
|
85
|
-
// Type: ${type}${sample ? " (sample)" : ""}
|
|
86
|
-
// Desc: ${description}
|
|
87
|
-
${content}
|
|
88
|
-
\`\`\`
|
|
89
|
-
`).join(`
|
|
90
|
-
`)}
|
|
91
|
-
|
|
92
|
-
## 2. Read already-written ${guideJson.update.filePath} file if exists. There can be some outdated information, so you need to update the file and add new information, make it more accurate and more detailed.
|
|
93
|
-
${existingResult ? `\`\`\`markdown
|
|
94
|
-
${existingResult}
|
|
95
|
-
\`\`\`` : "- No existing guideline file."}
|
|
96
|
-
|
|
97
|
-
## 3. Write the updated file content of the ${guideJson.update.filePath}. It should include the contents of ${guideJson.update.contents.join(",")}, and any other helpful information and contents for guiding. Also, you can rearrange the contents if you think it's more helpful.
|
|
98
|
-
|
|
99
|
-
Here's the last rules for writing the file content:
|
|
100
|
-
${guideJson.update.rules.map((rule) => `- ${rule}`).join(`
|
|
101
|
-
`)}
|
|
102
|
-
|
|
103
|
-
=> Now, you need to write the file content here. Let's go.
|
|
104
|
-
`;
|
|
105
|
-
return { guideJson, request, writePath };
|
|
106
|
-
}
|
|
107
|
-
async requestUpdateInstruction(updateRequest) {
|
|
108
|
-
const guideJson = await Prompter.getGuideJson(this.name);
|
|
109
|
-
const resultPath = `${getDirname2(import.meta.url)}/../guidelines/${this.name}/${guideJson.update.filePath}`;
|
|
110
|
-
const writePath = `${this.workspace.workspaceRoot}/pkgs/@akanjs/cli/guidelines/${this.name}/${guideJson.update.filePath}`;
|
|
111
|
-
const isResultExists = await this.workspace.exists(writePath);
|
|
112
|
-
if (!isResultExists)
|
|
113
|
-
throw new Error(`${guideJson.update.filePath} file does not exist. Please create it first.`);
|
|
114
|
-
const existingResult = await this.workspace.readFile(resultPath);
|
|
115
|
-
const request = `
|
|
116
|
-
I am a developer of akanjs framework, a full-stack framework for building web applications.
|
|
117
|
-
I want to update a ${guideJson.update.filePath} file for ${guideJson.description}.
|
|
118
|
-
This file is a programming guideline for Akan.js framwork users.
|
|
119
|
-
|
|
120
|
-
# ${guideJson.title} Workflow
|
|
121
|
-
- 1. Read already-written ${guideJson.update.filePath} file.
|
|
122
|
-
- 2. Write the updated file content of the ${guideJson.update.filePath} with the update request.
|
|
123
|
-
|
|
124
|
-
## 1. Read already-written ${guideJson.update.filePath} file.
|
|
125
|
-
\`\`\`markdown
|
|
126
|
-
${existingResult}
|
|
127
|
-
\`\`\`
|
|
128
|
-
|
|
129
|
-
## 2. Write the updated file content of the ${guideJson.update.filePath} with the update request.
|
|
130
|
-
Request: ${updateRequest}
|
|
131
|
-
|
|
132
|
-
=> Now, you need to write the file content here. Let's go.
|
|
133
|
-
`;
|
|
134
|
-
return { guideJson, request, writePath };
|
|
135
|
-
}
|
|
136
|
-
async requestCreateDocumentPage(page) {
|
|
137
|
-
const writePath = this.#resolveDocsPagePath(page);
|
|
138
|
-
if (!await this.workspace.exists(writePath))
|
|
139
|
-
await this.workspace.writeFile(writePath, `import { page } from "akanjs/client";
|
|
140
|
-
|
|
141
|
-
export default page().render(() => {
|
|
142
|
-
return <div>No Content</div>;
|
|
143
|
-
});
|
|
144
|
-
`);
|
|
145
|
-
const instruction = await Prompter.getInstruction(this.name);
|
|
146
|
-
const pageContent = await this.workspace.getLocalFile(writePath);
|
|
147
|
-
const request = `
|
|
148
|
-
I'm creating a documentation website for the Akan.js framework.
|
|
149
|
-
|
|
150
|
-
1. Overview of the Akan.js framework
|
|
151
|
-
${await this.getDocumentation("framework")}
|
|
152
|
-
|
|
153
|
-
2. Documentation page writing method
|
|
154
|
-
${await this.getDocumentation("docPageRule")}
|
|
155
|
-
|
|
156
|
-
3. CSS rule with TailwindCSS and akanjs/ui primitives (semantic tokens; no daisyui)
|
|
157
|
-
${await this.getDocumentation("cssRule")}
|
|
158
|
-
|
|
159
|
-
I want to update the Next.js server-side page located at ${writePath}.
|
|
160
|
-
Below is the content of the currently written page.
|
|
161
|
-
\`\`\`tsx
|
|
162
|
-
// File: ${writePath}
|
|
163
|
-
${pageContent.content}
|
|
164
|
-
\`\`\`
|
|
165
|
-
|
|
166
|
-
Please update this page with the latest content below. A great design application is needed.
|
|
167
|
-
${instruction}
|
|
168
|
-
|
|
169
|
-
Please follow these CSS rules when writing:
|
|
170
|
-
- Use tailwindcss with the semantic design tokens (bg-background, text-foreground, bg-primary, text-muted-foreground, border-border, \u2026)
|
|
171
|
-
- Use akanjs/ui primitives (Button, Badge, Input, Field, \u2026) instead of raw daisyui classes; do not use daisyui
|
|
172
|
-
|
|
173
|
-
Please return only the file result in the following format for easy parsing.
|
|
174
|
-
\`\`\`tsx
|
|
175
|
-
// File: ${writePath}
|
|
176
|
-
...pageContent
|
|
177
|
-
\`\`\`
|
|
178
|
-
`;
|
|
179
|
-
return { request, writePath };
|
|
180
|
-
}
|
|
181
|
-
async requestUpdateDocumentPage(page, updateRequest) {
|
|
182
|
-
const writePath = this.#resolveDocsPagePath(page);
|
|
183
|
-
if (!await this.workspace.exists(writePath))
|
|
184
|
-
await this.workspace.writeFile(writePath, `import { page } from "akanjs/client";
|
|
185
|
-
|
|
186
|
-
export default page().render(() => {
|
|
187
|
-
return <div>No Content</div>;
|
|
188
|
-
});
|
|
189
|
-
`);
|
|
190
|
-
const instruction = await Prompter.getInstruction(this.name);
|
|
191
|
-
const pageContent = await this.workspace.getLocalFile(writePath);
|
|
192
|
-
const request = `
|
|
193
|
-
I'm updating a documentation website for the Akan.js framework.
|
|
194
|
-
|
|
195
|
-
I want to update the Next.js server-side page located at ${writePath}.
|
|
196
|
-
Below is the content of the currently written page. You should update stale infos and preserve the existing content.
|
|
197
|
-
\`\`\`tsx
|
|
198
|
-
// File: ${writePath}
|
|
199
|
-
${pageContent.content}
|
|
200
|
-
\`\`\`
|
|
201
|
-
|
|
202
|
-
The existing instruction is below.
|
|
203
|
-
\`\`\`markdown
|
|
204
|
-
${instruction}
|
|
205
|
-
\`\`\`
|
|
206
|
-
|
|
207
|
-
Please update this page with the request below.
|
|
208
|
-
${updateRequest}
|
|
209
|
-
|
|
210
|
-
Please return only the file result in the following format for easy parsing.
|
|
211
|
-
\`\`\`tsx
|
|
212
|
-
// File: ${writePath}
|
|
213
|
-
...pageContent
|
|
214
|
-
\`\`\`
|
|
215
|
-
`;
|
|
216
|
-
return { request, writePath };
|
|
217
|
-
}
|
|
218
|
-
async requestReapplyInstruction(filePath) {
|
|
219
|
-
const guideJson = await Prompter.getGuideJson(this.name);
|
|
220
|
-
const writePath = `${this.workspace.workspaceRoot}/pkgs/@akanjs/cli/guidelines/${this.name}/${guideJson.update.filePath}`;
|
|
221
|
-
if (!guideJson.page)
|
|
222
|
-
throw new Error(`${this.name} does not have a page.`);
|
|
223
|
-
const pagePath = this.#resolveDocsPagePath(guideJson.page);
|
|
224
|
-
const pageFile = await this.workspace.getLocalFile(pagePath);
|
|
225
|
-
const request = `
|
|
226
|
-
I want to apply information in the Next.js page to markdown instruction file.
|
|
227
|
-
|
|
228
|
-
Here's the newest information in the Next.js page.
|
|
229
|
-
\`\`\`tsx
|
|
230
|
-
// File: ${pagePath}
|
|
231
|
-
${pageFile.content}
|
|
232
|
-
\`\`\`
|
|
233
|
-
|
|
234
|
-
Here's the existing instruction file.
|
|
235
|
-
\`\`\`markdown
|
|
236
|
-
${await Prompter.getInstruction(this.name)}
|
|
237
|
-
\`\`\`
|
|
238
|
-
|
|
239
|
-
Please update the instruction file with the information in the Next.js page.
|
|
240
|
-
`;
|
|
241
|
-
return { request, writePath };
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
// pkgs/@akanjs/cli/guideline/guideline.runner.ts
|
|
246
|
-
class GuidelineRunner extends runner("guideline") {
|
|
247
|
-
async generateInstruction(workspace, guideName) {
|
|
248
|
-
const session = new AiSession("generateInstruction", { workspace, cacheKey: guideName });
|
|
249
|
-
const prompt = new GuidelinePrompt(workspace, guideName);
|
|
250
|
-
const { guideJson, request, writePath } = await prompt.requestCreateInstruction();
|
|
251
|
-
const guidelineContent = await session.editMarkdown(request);
|
|
252
|
-
await workspace.writeFile(writePath, guidelineContent);
|
|
253
|
-
return { guideJson, session };
|
|
254
|
-
}
|
|
255
|
-
async updateInstruction(workspace, guideName, { updateRequest }) {
|
|
256
|
-
const session = new AiSession("updateInstruction", { workspace, cacheKey: guideName });
|
|
257
|
-
const prompt = new GuidelinePrompt(workspace, guideName);
|
|
258
|
-
const { guideJson, request, writePath } = await prompt.requestUpdateInstruction(updateRequest);
|
|
259
|
-
const guidelineContent = await session.editMarkdown(request);
|
|
260
|
-
await workspace.writeFile(writePath, guidelineContent);
|
|
261
|
-
return { guideJson, session };
|
|
262
|
-
}
|
|
263
|
-
async generateDocument(workspace, guideName) {
|
|
264
|
-
const session = new AiSession("deployDocPages", { workspace, cacheKey: guideName });
|
|
265
|
-
const guideJson = await Prompter.getGuideJson(guideName);
|
|
266
|
-
const prompt = new GuidelinePrompt(workspace, guideName);
|
|
267
|
-
if (!guideJson.page)
|
|
268
|
-
return Promise.resolve({});
|
|
269
|
-
const { request } = await prompt.requestCreateDocumentPage(guideJson.page);
|
|
270
|
-
await session.writeTypescripts(request, workspace);
|
|
271
|
-
}
|
|
272
|
-
async updateDocument(workspace, guideName, { updateRequest, session }) {
|
|
273
|
-
const guideJson = await Prompter.getGuideJson(guideName);
|
|
274
|
-
if (!guideJson.page)
|
|
275
|
-
throw new Error(`${guideName} does not have a page.`);
|
|
276
|
-
const prompt = new GuidelinePrompt(workspace, guideName);
|
|
277
|
-
const { request, writePath } = await prompt.requestUpdateDocumentPage(guideJson.page, updateRequest);
|
|
278
|
-
const guidelineContent = await session.editMarkdown(request);
|
|
279
|
-
await workspace.writeFile(writePath, guidelineContent);
|
|
280
|
-
}
|
|
281
|
-
async reapplyInstruction(workspace, guideName) {
|
|
282
|
-
const session = new AiSession("reapplyInstruction", { workspace, cacheKey: guideName });
|
|
283
|
-
const guideJson = await Prompter.getGuideJson(guideName);
|
|
284
|
-
const prompt = new GuidelinePrompt(workspace, guideName);
|
|
285
|
-
const { request, writePath } = await prompt.requestReapplyInstruction(guideJson.update.filePath);
|
|
286
|
-
const guidelineContent = await session.editMarkdown(request);
|
|
287
|
-
await workspace.writeFile(writePath, guidelineContent);
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
// pkgs/@akanjs/cli/guideline/guideline.script.ts
|
|
292
|
-
class GuidelineScript extends script("guideline", [GuidelineRunner]) {
|
|
293
|
-
async guideline(action, name = null, format = "markdown") {
|
|
294
|
-
if (action === "list") {
|
|
295
|
-
const guidelines = await Prompter.listGuidelines();
|
|
296
|
-
Logger.rawLog(format === "json" ? JSON.stringify({ guidelines }, null, 2) : guidelines.join(`
|
|
297
|
-
`));
|
|
298
|
-
return;
|
|
299
|
-
}
|
|
300
|
-
if (action === "show") {
|
|
301
|
-
if (!name)
|
|
302
|
-
throw new Error("Guideline name is required. Example: akan guideline show framework");
|
|
303
|
-
const [instruction, guideJson] = await Promise.all([Prompter.getInstruction(name), Prompter.getGuideJson(name)]);
|
|
304
|
-
Logger.rawLog(format === "json" ? JSON.stringify({ name, instruction, guideJson }, null, 2) : instruction);
|
|
305
|
-
return;
|
|
306
|
-
}
|
|
307
|
-
throw new Error(`Unknown guideline action: ${action}. Use "list" or "show".`);
|
|
308
|
-
}
|
|
309
|
-
async generateInstruction(workspace, name = null) {
|
|
310
|
-
const guideName = name ?? await Prompter.selectGuideline();
|
|
311
|
-
await this.guidelineRunner.generateInstruction(workspace, guideName);
|
|
312
|
-
}
|
|
313
|
-
async updateInstruction(workspace, name = null, updateRequest) {
|
|
314
|
-
const guideName = name ?? await Prompter.selectGuideline();
|
|
315
|
-
const { guideJson, session } = await this.guidelineRunner.updateInstruction(workspace, guideName, {
|
|
316
|
-
updateRequest
|
|
317
|
-
});
|
|
318
|
-
if (guideJson.page)
|
|
319
|
-
await this.updateDocument(workspace, guideName, { updateRequest, session });
|
|
320
|
-
}
|
|
321
|
-
async generateDocument(workspace, name = null) {
|
|
322
|
-
const guideName = name ?? await Prompter.selectGuideline();
|
|
323
|
-
await this.guidelineRunner.generateDocument(workspace, guideName);
|
|
324
|
-
}
|
|
325
|
-
async updateDocument(workspace, name = null, { updateRequest, session }) {
|
|
326
|
-
const guideName = name ?? await Prompter.selectGuideline();
|
|
327
|
-
await this.guidelineRunner.updateDocument(workspace, guideName, { updateRequest, session });
|
|
328
|
-
}
|
|
329
|
-
async reapplyInstruction(workspace, name = null) {
|
|
330
|
-
const guideName = name ?? await Prompter.selectGuideline();
|
|
331
|
-
await this.guidelineRunner.reapplyInstruction(workspace, guideName);
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
// pkgs/@akanjs/cli/guideline/guideline.command.ts
|
|
336
|
-
class GuidelineCommand extends command("guideline", [GuidelineScript], ({ public: target }) => ({
|
|
337
|
-
guideline: target({ desc: "List or show Akan AI guideline instructions" }).arg("action", String, { desc: "list or show" }).arg("name", String, { desc: "guideline name for show", nullable: true }).option("format", String, {
|
|
338
|
-
desc: "output format",
|
|
339
|
-
default: "markdown",
|
|
340
|
-
enum: ["markdown", "json"]
|
|
341
|
-
}).exec(async function(action, name, format) {
|
|
342
|
-
await this.guidelineScript.guideline(action, name, format);
|
|
343
|
-
}),
|
|
344
|
-
generateInstruction: target({ devOnly: true, desc: "Generate AI development guideline/instruction for your project" }).arg("name", String, { ask: "name of the instruction", nullable: true }).with(Workspace).exec(async function(name, workspace) {
|
|
345
|
-
await this.guidelineScript.generateInstruction(workspace, name);
|
|
346
|
-
}),
|
|
347
|
-
updateInstruction: target({ devOnly: true, desc: "Update existing AI guideline/instruction" }).arg("name", String, { ask: "name of the instruction", nullable: true }).option("request", String, { ask: "What do you want to update?" }).with(Workspace).exec(async function(name, request, workspace) {
|
|
348
|
-
await this.guidelineScript.updateInstruction(workspace, name, request);
|
|
349
|
-
}),
|
|
350
|
-
generateDocument: target({ devOnly: true, desc: "Generate documentation from guideline/instruction" }).arg("name", String, { ask: "name of the instruction", nullable: true }).with(Workspace).exec(async function(name, workspace) {
|
|
351
|
-
await this.guidelineScript.generateDocument(workspace, name);
|
|
352
|
-
}),
|
|
353
|
-
reapplyInstruction: target({ devOnly: true, desc: "Re-apply guideline/instruction to codebase" }).arg("name", String, { ask: "name of the instruction", nullable: true }).with(Workspace).exec(async function(name, workspace) {
|
|
354
|
-
await this.guidelineScript.reapplyInstruction(workspace, name);
|
|
355
|
-
})
|
|
356
|
-
})) {
|
|
357
|
-
}
|
|
358
|
-
export {
|
|
359
|
-
GuidelineCommand
|
|
360
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "In-Page Agent Rule",
|
|
3
|
-
"description": "How an akan screen exposes itself to an in-page agent — st.tool, subscribed keys, built-ins, and the chat",
|
|
4
|
-
"group": "core",
|
|
5
|
-
"codegenPriority": 4,
|
|
6
|
-
"deprecated": false,
|
|
7
|
-
"scans": [
|
|
8
|
-
{
|
|
9
|
-
"type": "example",
|
|
10
|
-
"description": "Components publishing an agent tool beside the control that already performs the action",
|
|
11
|
-
"path": "{apps,libs}/*/**/*.tsx",
|
|
12
|
-
"sample": 4
|
|
13
|
-
}
|
|
14
|
-
],
|
|
15
|
-
"update": {
|
|
16
|
-
"filePath": "./agentRule.instruction.md",
|
|
17
|
-
"contents": [
|
|
18
|
-
"what a declaration publishes",
|
|
19
|
-
"mounting the chat",
|
|
20
|
-
"publishing a tool",
|
|
21
|
-
"forms and reading state",
|
|
22
|
-
"built-in tools"
|
|
23
|
-
],
|
|
24
|
-
"rules": [
|
|
25
|
-
"Use current Akan APIs only",
|
|
26
|
-
"State the rule before the reason, and keep the reason to one clause",
|
|
27
|
-
"Never describe a store class as an exposure surface — only st.tool and subscribed keys publish",
|
|
28
|
-
"Keep it workspace-neutral — no app or repo names"
|
|
29
|
-
]
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Component Rule",
|
|
3
|
-
"description": "Shared component implementation rules",
|
|
4
|
-
"group": "core",
|
|
5
|
-
"docsSource": "apps/akan/page/(docs)/references/ui/overview.tsx",
|
|
6
|
-
"codegenPriority": 3,
|
|
7
|
-
"deprecated": false,
|
|
8
|
-
"scans": [
|
|
9
|
-
{
|
|
10
|
-
"type": "docs",
|
|
11
|
-
"description": "Current docs source for Component Rule",
|
|
12
|
-
"path": "apps/akan/page/(docs)/references/ui/overview.tsx"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"type": "example",
|
|
16
|
-
"description": "Existing Akan implementation examples",
|
|
17
|
-
"path": "{apps,libs}/*/lib/**/*.ts",
|
|
18
|
-
"sample": 4
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"update": {
|
|
22
|
-
"filePath": "./componentRule.instruction.md",
|
|
23
|
-
"contents": ["purpose", "file ownership", "current API patterns", "codegen rules", "validation checklist"],
|
|
24
|
-
"rules": [
|
|
25
|
-
"Use current Akan APIs only",
|
|
26
|
-
"Keep output parseable for codegen",
|
|
27
|
-
"Include ownership boundaries and review checklist"
|
|
28
|
-
]
|
|
29
|
-
},
|
|
30
|
-
"page": "apps/akan/page/(docs)/references/ui/overview.tsx"
|
|
31
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Workspace Conventions",
|
|
3
|
-
"description": "The tool-neutral Akan convention set rendered into every workspace AGENTS.md managed block",
|
|
4
|
-
"group": "core",
|
|
5
|
-
"codegenPriority": 1,
|
|
6
|
-
"deprecated": false,
|
|
7
|
-
"scans": [],
|
|
8
|
-
"update": {
|
|
9
|
-
"filePath": "./conventions.instruction.md",
|
|
10
|
-
"contents": [
|
|
11
|
-
"change scope",
|
|
12
|
-
"lint-enforced rules",
|
|
13
|
-
"coding style and comments",
|
|
14
|
-
"client/server boundaries and SSR",
|
|
15
|
-
"domain module, service, signal, and scalar conventions",
|
|
16
|
-
"page routing, sync layout, and layer placement"
|
|
17
|
-
],
|
|
18
|
-
"rules": [
|
|
19
|
-
"Use current Akan APIs only",
|
|
20
|
-
"State the rule and the reason it exists, never restate a type signature",
|
|
21
|
-
"Name the .grit rule that enforces a rule wherever one does",
|
|
22
|
-
"Keep it workspace-neutral — no app or repo names, since every workspace renders this file"
|
|
23
|
-
]
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "CSS Rule",
|
|
3
|
-
"description": "Tailwind and akanjs/ui (semantic token) styling rules",
|
|
4
|
-
"group": "core",
|
|
5
|
-
"docsSource": "apps/akan/page/(docs)/docs/arch/css.tsx",
|
|
6
|
-
"codegenPriority": 3,
|
|
7
|
-
"deprecated": false,
|
|
8
|
-
"scans": [
|
|
9
|
-
{
|
|
10
|
-
"type": "docs",
|
|
11
|
-
"description": "Current docs source for CSS Rule",
|
|
12
|
-
"path": "apps/akan/page/(docs)/docs/arch/css.tsx"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"type": "example",
|
|
16
|
-
"description": "Existing Akan implementation examples",
|
|
17
|
-
"path": "{apps,libs}/*/lib/**/*.ts",
|
|
18
|
-
"sample": 4
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"update": {
|
|
22
|
-
"filePath": "./cssRule.instruction.md",
|
|
23
|
-
"contents": ["purpose", "file ownership", "current API patterns", "codegen rules", "validation checklist"],
|
|
24
|
-
"rules": [
|
|
25
|
-
"Use current Akan APIs only",
|
|
26
|
-
"Keep output parseable for codegen",
|
|
27
|
-
"Include ownership boundaries and review checklist"
|
|
28
|
-
]
|
|
29
|
-
},
|
|
30
|
-
"page": "apps/akan/page/(docs)/docs/arch/css.tsx"
|
|
31
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Docs Page Rule",
|
|
3
|
-
"description": "Docs page writing rules",
|
|
4
|
-
"group": "core",
|
|
5
|
-
"docsSource": "apps/akan/page/(docs)/cheatsheet/dev/docs.tsx",
|
|
6
|
-
"codegenPriority": 3,
|
|
7
|
-
"deprecated": false,
|
|
8
|
-
"scans": [
|
|
9
|
-
{
|
|
10
|
-
"type": "docs",
|
|
11
|
-
"description": "Current docs source for Docs Page Rule",
|
|
12
|
-
"path": "apps/akan/page/(docs)/cheatsheet/dev/docs.tsx"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"type": "example",
|
|
16
|
-
"description": "Existing Akan implementation examples",
|
|
17
|
-
"path": "{apps,libs}/*/lib/**/*.ts",
|
|
18
|
-
"sample": 4
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"update": {
|
|
22
|
-
"filePath": "./docPageRule.instruction.md",
|
|
23
|
-
"contents": ["purpose", "file ownership", "current API patterns", "codegen rules", "validation checklist"],
|
|
24
|
-
"rules": [
|
|
25
|
-
"Use current Akan APIs only",
|
|
26
|
-
"Keep output parseable for codegen",
|
|
27
|
-
"Include ownership boundaries and review checklist"
|
|
28
|
-
]
|
|
29
|
-
},
|
|
30
|
-
"page": "apps/akan/page/(docs)/cheatsheet/dev/docs.tsx"
|
|
31
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Docs Page Rule Guideline
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
Use this when generating or updating Akan docs pages under the current docs route tree.
|
|
5
|
-
|
|
6
|
-
## Ownership
|
|
7
|
-
- Docs pages live under `apps/akan/page/(docs)`.
|
|
8
|
-
- Pages use `Docs`, `Code`, `Scroll`, and app localization helpers used by nearby pages.
|
|
9
|
-
- A docs page should teach one concept with examples, alerts, and navigation anchors.
|
|
10
|
-
|
|
11
|
-
## Current Akan Patterns
|
|
12
|
-
- Use current route groups: docs, conventions, references, cheatsheet, and plugins.
|
|
13
|
-
- Prefer concise sections with code snippets and practical rules.
|
|
14
|
-
- Use Mermaid only when it clarifies architecture or flow.
|
|
15
|
-
|
|
16
|
-
## Codegen Rules
|
|
17
|
-
- Do not write docs for removed route paths.
|
|
18
|
-
- Do not generate placeholder pages when source docs already exist.
|
|
19
|
-
- Do not include implementation claims that are not backed by code or nearby docs.
|
|
20
|
-
|
|
21
|
-
## Review Checklist
|
|
22
|
-
- The instruction points to current docs pages, not removed docs routes.
|
|
23
|
-
- Generated examples use current Akan builder APIs and scanner-friendly filenames.
|
|
24
|
-
- The output contract tells the model which file paths to return.
|
|
25
|
-
- The guide avoids broad framework essays when a concrete file rule is better.
|