@akanjs/cli 3.0.0-alpha.2 → 3.0.0-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.build-stamp +1 -1
- package/README.ko.md +1 -1
- package/README.md +1 -1
- package/{abstractCompactor-e5yq60qz.js → abstractCompactor-20e0cwbs.js} +2 -2
- package/{agent.command-yv00p0s0.js → agent.command-rwkzxp5h.js} +8 -7
- package/{application.command-0qsczf4k.js → application.command-256kb89w.js} +6 -5
- package/{applicationBuildRunner-ct2pxyvw.js → applicationBuildRunner-7gnfz7ww.js} +6 -7
- package/{applicationReleasePackager-gg8ccbeh.js → applicationReleasePackager-93nzdfsy.js} +1 -1
- package/buildBatch.proc.js +5 -4
- package/{capacitorApp-4r9sm3qg.js → capacitorApp-q8j5fsyj.js} +29 -26
- package/{cloud.command-dxfv18sa.js → cloud.command-nf3hwrqv.js} +10 -9
- package/{context.command-8d9e3k6b.js → context.command-cxhznb92.js} +16 -15
- package/{dependencyScanner-f6grrep3.js → dependencyScanner-rbs2407b.js} +1 -1
- package/getDirname-ka11hm7e.js +8 -0
- package/{guideline.command-3jbkxzh6.js → guideline.command-8hvqd21e.js} +7 -6
- package/guidelines/conventions/conventions.generate.json +25 -0
- package/guidelines/conventions/conventions.instruction.md +909 -0
- package/guidelines/cssRule/cssRule.instruction.md +7 -0
- package/guidelines/framework/framework.instruction.md +1 -0
- package/guidelines/workspaceOnboarding/workspaceOnboarding.generate.json +24 -0
- package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +972 -0
- package/incrementalBuilder.proc.js +4 -3
- package/index-1577bej2.js +7 -0
- package/{index-1pvex4az.js → index-2gja8hqt.js} +13 -13
- package/{index-2q1f5j9k.js → index-4d30h52j.js} +3 -3
- package/{index-8hsbnyes.js → index-9bwhn99r.js} +5 -3
- package/{index-t3723f99.js → index-9e5tk85e.js} +86 -17
- package/{index-e16gnn26.js → index-a31wqqae.js} +13 -10
- package/{index-nm6wghb6.js → index-bv4f7dda.js} +6 -6
- package/{index-rzwcpcc3.js → index-daxfkf9r.js} +1 -1
- package/{index-ej426mcr.js → index-ewnssrss.js} +37 -6
- package/{index-yzmhasdb.js → index-gcfaehrb.js} +8 -8
- package/{index-a00jg8x8.js → index-gnbq9gjc.js} +49 -32
- package/{index-pyt2b4nw.js → index-hg0qvhmx.js} +152 -241
- package/{index-tdbas9r0.js → index-j37qq1f2.js} +1 -1
- package/{index-7c6k4yvg.js → index-kqxgymh9.js} +15 -7
- package/{index-ec09pws3.js → index-m82smx4n.js} +4 -4
- package/{index-rh16j3c7.js → index-qnv0aqmm.js} +12 -8
- package/{index-bbkek1bp.js → index-rnqk559q.js} +1 -1
- package/{index-hgna5rjy.js → index-scn3prb2.js} +142 -65
- package/{index-0cj2zxbm.js → index-sh01r3pm.js} +1 -1
- package/{index-zasydjxd.js → index-w1a16c42.js} +9 -11
- package/{index-bekddz9q.js → index-wvkgs5sw.js} +4 -4
- package/{index-mr5s7mqd.js → index-x34wfyzw.js} +3 -3
- package/{index-k95xkh4p.js → index-xnan3a0m.js} +8 -4
- package/index.js +20 -19
- package/{library.command-ebdj1vnm.js → library.command-1399w0n2.js} +5 -4
- package/{localRegistry.command-gb178ne8.js → localRegistry.command-y5c91pbh.js} +9 -8
- package/{module.command-9c1bnsx4.js → module.command-qtyhk1m1.js} +9 -8
- package/{package.command-t93p4jkj.js → package.command-f8090yy2.js} +5 -4
- package/package.json +3 -4
- package/{page.command-k3k0meh2.js → page.command-cjf93cyj.js} +5 -4
- package/{primitive.command-de6nktdt.js → primitive.command-am2xjbgn.js} +10 -9
- package/{quality.command-z5kth2wa.js → quality.command-kxh7w9yy.js} +11 -41
- package/{recipeScanner-tghkzrrt.js → recipeScanner-zrzev25x.js} +3 -3
- package/{repair.command-ehf2g112.js → repair.command-varzs4ry.js} +7 -6
- package/{routeSourceValidator-cncd92fv.js → routeSourceValidator-7fycdqyv.js} +3 -39
- package/{scalar.command-7a2jtv33.js → scalar.command-0ag0zp8h.js} +8 -7
- package/templates/app/page/styles.css.template +3 -3
- package/templates/appSample/srvkit/AuthGuard.ts +9 -5
- package/templates/appSample/srvkit/SessionInternalArg.ts +4 -3
- package/templates/crudPages/[__model__Id]/edit/page.tsx +1 -1
- package/templates/crudPages/new/page.tsx +1 -1
- package/templates/crudSinglePage/page.tsx +1 -1
- package/templates/lib/db.ts +1 -1
- package/templates/lib/dict.ts +1 -1
- package/templates/lib/sig.ts +1 -1
- package/templates/lib/srv.ts +6 -2
- package/templates/lib/useClient.ts +9 -3
- package/templates/module/__Model__.Util.tsx +1 -1
- package/templates/module/__Model__.Zone.tsx +3 -5
- package/templates/workspaceRoot/AGENTS.md.template +0 -955
- package/templates/workspaceRoot/CLAUDE.md.template +19 -0
- package/templates/workspaceRoot/biome.json.template +4 -198
- package/templates/workspaceRoot/docs/AI-DEVELOPMENT.md.template +4 -1
- package/{typeChecker-kravn7ns.js → typeChecker-g6bh0xfv.js} +1 -1
- package/typecheck.proc.js +1 -1
- package/{workflow.command-e0tt0vk2.js → workflow.command-ex77wvdb.js} +15 -14
- package/{workspace.command-fpda0evj.js → workspace.command-atxnxxea.js} +69 -51
- package/templates/workspaceRoot/.cursor/rules/akan-page-routing.mdc.template +0 -43
- package/templates/workspaceRoot/.cursor/rules/akan-sync-conventions.mdc.template +0 -33
- package/templates/workspaceRoot/.cursor/rules/application-test-commands.mdc.template +0 -16
- package/templates/workspaceRoot/.cursor/rules/change-scope.mdc.template +0 -12
- package/templates/workspaceRoot/.cursor/rules/client-server-boundaries.mdc.template +0 -18
- package/templates/workspaceRoot/.cursor/rules/coding-comments.mdc.template +0 -25
- package/templates/workspaceRoot/.cursor/rules/coding-style.mdc.template +0 -44
- package/templates/workspaceRoot/.cursor/rules/domain-module-conventions.mdc.template +0 -17
- package/templates/workspaceRoot/.cursor/rules/format-lint.mdc.template +0 -12
- package/templates/workspaceRoot/.cursor/rules/lint-enforced-rules.mdc.template +0 -18
- package/templates/workspaceRoot/.cursor/rules/module-file-playbook.mdc.template +0 -61
- package/templates/workspaceRoot/.cursor/rules/naming-conventions.mdc.template +0 -15
- package/templates/workspaceRoot/.cursor/rules/react-component-style.mdc.template +0 -21
- package/templates/workspaceRoot/.cursor/rules/repo-overview.mdc.template +0 -17
- package/templates/workspaceRoot/.cursor/rules/scalar-modeling.mdc.template +0 -58
- package/templates/workspaceRoot/.cursor/rules/secrets-and-env.mdc.template +0 -13
- package/templates/workspaceRoot/.cursor/rules/service-signal-conventions.mdc.template +0 -83
- package/templates/workspaceRoot/.cursor/rules/srvkit-adapters-and-guards.mdc.template +0 -50
- package/templates/workspaceRoot/.cursor/rules/ssr-first.mdc.template +0 -59
- package/templates/workspaceRoot/.cursor/rules/typescript-imports.mdc.template +0 -16
- /package/{index-r24hmh0q.js → index-yb2wsc7f.js} +0 -0
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
import {
|
|
3
3
|
workflowRunArtifactPath,
|
|
4
4
|
workflowSyncDir
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-daxfkf9r.js";
|
|
6
6
|
import {
|
|
7
7
|
AppExecutor,
|
|
8
|
-
LibExecutor
|
|
9
|
-
|
|
8
|
+
LibExecutor,
|
|
9
|
+
appRootAllowedDirs,
|
|
10
|
+
appRootAllowedFiles,
|
|
11
|
+
extractBlockVersion,
|
|
12
|
+
isScannedAppRootEntry,
|
|
13
|
+
readDevkitVersion
|
|
14
|
+
} from "./index-scn3prb2.js";
|
|
10
15
|
import {
|
|
11
16
|
collectRecipeSources,
|
|
12
17
|
findInlineRecipeDuplicates,
|
|
@@ -121,7 +126,9 @@ var validationCommands = [
|
|
|
121
126
|
"akan typecheck <app-name>",
|
|
122
127
|
"akan test <app-or-lib-or-pkg>",
|
|
123
128
|
"akan build <app-name>",
|
|
124
|
-
"akan doctor --strict --format json"
|
|
129
|
+
"akan doctor --strict --format json",
|
|
130
|
+
"akan quality scan [--format json]",
|
|
131
|
+
"akan quality ssr [--format json]"
|
|
125
132
|
];
|
|
126
133
|
var unknownGeneratedFilesFreshness = {
|
|
127
134
|
status: "unknown",
|
|
@@ -150,33 +157,6 @@ var moduleShapeFiles = (module) => {
|
|
|
150
157
|
];
|
|
151
158
|
};
|
|
152
159
|
var constantFieldNames = (content) => [...content.matchAll(/\b([A-Za-z_$][\w$]*)\s*:\s*field\(/g)].map((match) => match[1]).filter(Boolean);
|
|
153
|
-
var appRootAllowFiles = new Set([
|
|
154
|
-
"AGENTS.md",
|
|
155
|
-
"CLAUDE.md",
|
|
156
|
-
"akan.app.json",
|
|
157
|
-
"akan.config.ts",
|
|
158
|
-
"capacitor.config.ts",
|
|
159
|
-
"client.ts",
|
|
160
|
-
"main.ts",
|
|
161
|
-
"package.json",
|
|
162
|
-
"server.ts",
|
|
163
|
-
"tsconfig.json"
|
|
164
|
-
]);
|
|
165
|
-
var appRootAllowDirs = new Set([
|
|
166
|
-
".akan",
|
|
167
|
-
"android",
|
|
168
|
-
"common",
|
|
169
|
-
"env",
|
|
170
|
-
"ios",
|
|
171
|
-
"lib",
|
|
172
|
-
"page",
|
|
173
|
-
"private",
|
|
174
|
-
"public",
|
|
175
|
-
"script",
|
|
176
|
-
"srvkit",
|
|
177
|
-
"ui",
|
|
178
|
-
"webkit"
|
|
179
|
-
]);
|
|
180
160
|
var safeReadDir = async (dirPath) => {
|
|
181
161
|
try {
|
|
182
162
|
return (await readdir(dirPath, { withFileTypes: true })).sort((a, b) => a.name.localeCompare(b.name));
|
|
@@ -389,6 +369,29 @@ class AkanContextAnalyzer {
|
|
|
389
369
|
validationCommands
|
|
390
370
|
};
|
|
391
371
|
}
|
|
372
|
+
static async#agentGuideDrift(workspace) {
|
|
373
|
+
const installed = await readDevkitVersion();
|
|
374
|
+
if (!installed)
|
|
375
|
+
return null;
|
|
376
|
+
const content = await safeReadText(path.join(workspace.workspaceRoot, "AGENTS.md"));
|
|
377
|
+
if (content === null)
|
|
378
|
+
return null;
|
|
379
|
+
const stamped = extractBlockVersion(content);
|
|
380
|
+
if (stamped === installed)
|
|
381
|
+
return null;
|
|
382
|
+
const hint = "Re-render the AGENTS.md managed block from the installed framework release.";
|
|
383
|
+
if (!stamped)
|
|
384
|
+
return {
|
|
385
|
+
code: "agent-guide-unstamped",
|
|
386
|
+
message: `AGENTS.md carries no generated-version stamp, so its conventions may predate @akanjs/devkit ${installed}`,
|
|
387
|
+
hint
|
|
388
|
+
};
|
|
389
|
+
return {
|
|
390
|
+
code: "agent-guide-stale",
|
|
391
|
+
message: `AGENTS.md was generated by @akanjs/devkit ${stamped}, but ${installed} is installed`,
|
|
392
|
+
hint
|
|
393
|
+
};
|
|
394
|
+
}
|
|
392
395
|
static async doctor(workspace, {
|
|
393
396
|
strict = false,
|
|
394
397
|
runIdOrPlan = null,
|
|
@@ -404,7 +407,9 @@ class AkanContextAnalyzer {
|
|
|
404
407
|
for (const app of context.apps) {
|
|
405
408
|
const appPath = path.join(workspace.workspaceRoot, app.path);
|
|
406
409
|
for (const entry of await safeReadDir(appPath)) {
|
|
407
|
-
|
|
410
|
+
if (!isScannedAppRootEntry(entry.name))
|
|
411
|
+
continue;
|
|
412
|
+
const allowed = entry.isDirectory() ? appRootAllowedDirs.has(entry.name) : appRootAllowedFiles.has(entry.name);
|
|
408
413
|
if (!allowed) {
|
|
409
414
|
const action = repairAction("module-shape", `akan repair module-shape --app ${app.name}`, "Review app root shape and remove or move the unknown entry.", false);
|
|
410
415
|
diagnostics.push({
|
|
@@ -418,6 +423,18 @@ class AkanContextAnalyzer {
|
|
|
418
423
|
}
|
|
419
424
|
}
|
|
420
425
|
}
|
|
426
|
+
const agentDrift = await AkanContextAnalyzer.#agentGuideDrift(workspace);
|
|
427
|
+
if (agentDrift) {
|
|
428
|
+
const action = repairAction("generated", "akan agent install agents-md", agentDrift.hint, true);
|
|
429
|
+
diagnostics.push({
|
|
430
|
+
severity: "warning",
|
|
431
|
+
code: agentDrift.code,
|
|
432
|
+
path: "AGENTS.md",
|
|
433
|
+
message: agentDrift.message,
|
|
434
|
+
repairActions: [action]
|
|
435
|
+
});
|
|
436
|
+
repairActions.push(action);
|
|
437
|
+
}
|
|
421
438
|
for (const sys of [...context.apps, ...context.libs]) {
|
|
422
439
|
for (const module of sys.modules) {
|
|
423
440
|
if (!module.abstract.exists) {
|