@akanjs/cli 3.1.1-rc.9 → 3.1.2-rc.0
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-dyc45f5w.js +11 -0
- package/{CodeAgentRpcHost-9g27hmer.js → CodeAgentRpcHost-6dzfkvsc.js} +1 -1
- package/CodeAgentRpcListener-tcwrdvst.js +182 -0
- package/{CodeTui-z5vkm9ea.js → CodeTui-q55b2zrn.js} +25 -8
- package/TunnelShare-hdq9h1hr.js +14 -0
- package/agent.command-20zaqe60.js +49 -0
- package/akanCode.js +13 -8
- package/{application.command-wthg8nn9.js → application.command-nd0fshsk.js} +45 -12
- package/{applicationBuildRunner-t2r84sz6.js → applicationBuildRunner-s13x3zqb.js} +14 -10
- package/buildBatch.proc.js +7 -7
- package/{cloud.command-sz11hpre.js → cloud.command-8kbddsz9.js} +28 -19
- package/cloud.script-hgvvajm3.js +27 -0
- package/code.command-625bg8s8.js +345 -0
- package/commandManifest.json +1 -1
- package/{context.command-15j9b7c0.js → context.command-p6haqjay.js} +20 -18
- package/context.runner-rsnqnk9j.js +27 -0
- package/{dependencyScanner-3afj2vt1.js → dependencyScanner-78sq8m4q.js} +2 -2
- package/{devTui-q7k7bakd.js → devTui-evr3b35y.js} +1 -1
- package/{fileSys-wzzrntkw.js → fileSys-zpvt5gtf.js} +1 -1
- package/{guideline.command-snh85ctf.js → guideline.command-195g0h9a.js} +4 -4
- package/guidelines/agentRule/agentRule.instruction.md +22 -8
- package/guidelines/conventions/core.md +106 -0
- package/guidelines/conventions/rules/app.md +83 -0
- package/guidelines/conventions/rules/auth.md +46 -0
- package/guidelines/conventions/rules/config.md +60 -0
- package/guidelines/conventions/rules/constant.md +24 -0
- package/guidelines/conventions/rules/gates.md +32 -0
- package/guidelines/conventions/rules/layer.md +25 -0
- package/guidelines/conventions/rules/migration.md +27 -0
- package/guidelines/conventions/rules/module.md +90 -0
- package/guidelines/conventions/rules/page.md +56 -0
- package/guidelines/conventions/rules/sensitive.md +16 -0
- package/guidelines/conventions/rules/server.md +91 -0
- package/guidelines/conventions/rules/ssr.md +47 -0
- package/guidelines/conventions/rules/style.md +43 -0
- package/guidelines/conventions/rules/test.md +34 -0
- package/guidelines/conventions/rules/ts.md +95 -0
- package/guidelines/conventions/rules/tsx.md +76 -0
- package/guidelines/mcpRule/mcpRule.instruction.md +1 -1
- package/guidelines/pageRule/pageRule.instruction.md +8 -7
- package/guidelines/queryRule/queryRule.instruction.md +4 -0
- package/guidelines/runtimeRule/runtimeRule.instruction.md +35 -25
- package/guidelines/ssrRule/ssrRule.instruction.md +11 -10
- package/guidelines/transportRule/transportRule.instruction.md +5 -4
- package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +4 -4
- package/incrementalBuilder.proc.js +7 -7
- package/{index-301pdbzz.js → index-00a7j05x.js} +7 -7
- package/{index-js6geqjn.js → index-0j1t1h2b.js} +3 -1
- package/{index-6txx6a9p.js → index-1h2jc0x3.js} +154 -88
- package/{index-55j120r8.js → index-1qsd8ft1.js} +65 -145
- package/{index-9th4gszy.js → index-2mwjshz5.js} +233 -1271
- package/index-2nxk8wgs.js +266 -0
- package/{index-j9vyj3dj.js → index-2phm56a1.js} +49 -8
- package/index-35j83zkd.js +61 -0
- package/index-4am4dvmf.js +29 -0
- package/index-75y7bcz4.js +28 -0
- package/index-7apsdr5g.js +487 -0
- package/{index-42j4a8zq.js → index-84h43kg6.js} +8 -6
- package/index-9bv479q5.js +1 -0
- package/{index-3wypz6xj.js → index-9zy8479y.js} +11 -5
- package/{index-a5dhqkdr.js → index-a1vb3x7t.js} +273 -259
- package/{index-52w0fvh8.js → index-bns3wcpc.js} +15 -0
- package/index-cjmjvg4r.js +3622 -0
- package/{index-pcwzkdqb.js → index-defp4gmb.js} +1 -1
- package/index-ewbmfarf.js +1606 -0
- package/index-fbewhg4g.js +590 -0
- package/index-fhw7yq2d.js +653 -0
- package/{index-wcej7g4z.js → index-g500c5j9.js} +271 -105
- package/{index-74tjjsnc.js → index-g841cap9.js} +33 -37
- package/{index-2azahjaw.js → index-gr9thy79.js} +5 -5
- package/{index-4pf8g7ff.js → index-h7hehkw6.js} +3 -0
- package/{index-xjf5j657.js → index-hm0tn7qv.js} +1001 -91
- package/index-j6eeh5d7.js +138 -0
- package/{index-31es1yev.js → index-j7hwy56s.js} +108 -7
- package/{index-skk9zc1x.js → index-jc2zbwra.js} +2 -2
- package/{index-905qdgqp.js → index-khk05tsf.js} +1 -1
- package/{index-5nd1wtkv.js → index-p6x5b7hr.js} +1 -1
- package/{index-tvehn2sp.js → index-qd7xn2bk.js} +1 -1
- package/{index-a58emady.js → index-qw6814m4.js} +55 -17
- package/index-raz588b3.js +445 -0
- package/{index-at7bz0xq.js → index-s4nvxpzm.js} +2 -0
- package/{index-bt438yxm.js → index-sp0qsr7a.js} +116 -13
- package/{index-xb8809yb.js → index-sveq36gh.js} +40 -43
- package/{index-hmt54t45.js → index-t1t9wq9a.js} +4 -4
- package/index-t78230d7.js +191 -0
- package/index-tenw3mah.js +225 -0
- package/{index-qfp55x1y.js → index-tgqameyb.js} +4 -4
- package/{index-espk51ah.js → index-tp56652m.js} +6 -6
- package/index-w15mg3km.js +389 -0
- package/{index-dy0jx9ay.js → index-wwe9rsrx.js} +14 -0
- package/{index-2xcc2ax5.js → index-y4kcmbt2.js} +2 -2
- package/index-yf9wc28h.js +52 -0
- package/{index-0fz95kxe.js → index-zbrwnmf1.js} +9 -7
- package/{index-40brg4px.js → index-zttm13c3.js} +5 -5
- package/index.js +24 -23
- package/{library.command-gycrwhf1.js → library.command-63hgt9te.js} +4 -4
- package/{localRegistry.command-jtd8gaes.js → localRegistry.command-g3f8k25t.js} +46 -22
- package/{module.command-v6hgs1bc.js → module.command-r4sa2khp.js} +7 -6
- package/{package.command-shzpcfph.js → package.command-96eheyvd.js} +5 -5
- package/package.json +2 -2
- package/{page.command-ptxn5kqk.js → page.command-gs6d841d.js} +4 -4
- package/{pipeline.command-zz31pgax.js → pipeline.command-wdfvdbfj.js} +3 -3
- package/{primitive.command-a1vse91z.js → primitive.command-dfsv4mpe.js} +8 -7
- package/{projectTypecheck-2ztky9cf.js → projectTypecheck-kqj1t6hb.js} +1 -1
- package/{prompter-76k56b37.js → prompter-qrwx1p17.js} +2 -2
- package/quality.command-webzxee2.js +78 -0
- package/{repair.command-cvazbz99.js → repair.command-3r3j1xre.js} +7 -6
- package/{routeSourceValidator-6jd0q6r6.js → routeSourceValidator-4h947v7c.js} +13 -3
- package/{scalar.command-0acvyp26.js → scalar.command-e8y47j6d.js} +6 -5
- package/skills/akan-agent/SKILL.md +43 -0
- package/skills/akan-code/SKILL.md +38 -11
- package/skills/akan-debug/SKILL.md +41 -6
- package/skills/akan-deps/SKILL.md +1 -2
- package/skills/akan-err/SKILL.md +2 -1
- package/skills/akan-mcp/SKILL.md +40 -0
- package/skills/akan-page/SKILL.md +44 -0
- package/skills/akan-query/SKILL.md +39 -0
- package/skills/akan-runtime/SKILL.md +43 -0
- package/skills/akan-scaffold/SKILL.md +16 -6
- package/skills/akan-transport/SKILL.md +40 -0
- package/skills/akan-validate/SKILL.md +13 -11
- package/{subspace.command-822qx2bx.js → subspace.command-a1sf9n5a.js} +12 -10
- package/templates/__scalar/__model__/__model__.constant.ts +3 -5
- package/templates/__scalar/__model__/__model__.dictionary.ts +6 -5
- package/templates/__scalar/__model__/__model__.document.ts +3 -3
- package/templates/app/akan.config.ts +2 -3
- package/templates/app/env/env.client.ts +2 -4
- package/templates/app/env/env.client.type.ts +2 -3
- package/templates/app/env/env.server.ts +2 -3
- package/templates/app/lib/___appName__/__appName__.dictionary.ts +1 -2
- package/templates/app/lib/___appName__/__appName__.service.ts +3 -3
- package/templates/app/lib/___appName__/__appName__.signal.ts +5 -5
- package/templates/app/lib/___appName__/__appName__.store.ts +4 -6
- package/templates/app/lib/option.ts +2 -3
- package/templates/app/main.ts +2 -4
- package/templates/app/page/_index.tsx +3 -3
- package/templates/app/page/_layout.tsx +13 -10
- package/templates/appSample/lib/__scalar/workHistory/workHistory.constant.ts +1 -5
- package/templates/appSample/lib/__scalar/workHistory/workHistory.dictionary.ts +1 -1
- package/templates/appSample/lib/_noti/noti.signal.ts +1 -1
- package/templates/appSample/lib/task/Task.Template.tsx +2 -1
- package/templates/appSample/lib/task/Task.Unit.tsx +3 -2
- package/templates/appSample/lib/task/Task.Util.tsx +16 -4
- package/templates/appSample/lib/task/task.constant.ts +1 -5
- package/templates/appSample/lib/task/task.dictionary.ts +2 -8
- package/templates/appSample/lib/task/task.document.ts +1 -1
- package/templates/appSample/lib/task/task.signal.ts +14 -9
- package/templates/appSample/page/task/_index.tsx +2 -1
- package/templates/appSample/page/task/new.tsx +2 -1
- package/templates/appSample/srvkit/guards.ts +11 -0
- package/templates/appSample/ui/QuantityControl.tsx +5 -9
- package/templates/biomeForm.ts +144 -0
- package/templates/crudPages/[__model__Id]/edit/page.tsx +3 -3
- package/templates/crudPages/[__model__Id]/page.tsx +5 -5
- package/templates/crudPages/new/page.tsx +4 -3
- package/templates/crudPages/page.tsx +3 -3
- package/templates/crudSinglePage/page.tsx +9 -5
- package/templates/libRoot/akan.config.ts +2 -3
- package/templates/libRoot/lib/___libName__/__libName__.dictionary.ts +1 -2
- package/templates/libRoot/lib/___libName__/__libName__.service.ts +5 -4
- package/templates/libRoot/lib/___libName__/__libName__.signal.ts +6 -5
- package/templates/libRoot/lib/___libName__/__libName__.store.ts +5 -6
- package/templates/libRoot/lib/option.ts +1 -2
- package/templates/module/__Model__.Template.tsx +11 -10
- package/templates/module/__Model__.Unit.tsx +18 -5
- package/templates/module/__Model__.Util.tsx +9 -7
- package/templates/module/__Model__.View.tsx +9 -6
- package/templates/module/__Model__.Zone.tsx +25 -17
- package/templates/module/__model__.constant.ts +8 -9
- package/templates/module/__model__.dictionary.ts +16 -17
- package/templates/module/__model__.document.ts +6 -8
- package/templates/module/__model__.service.ts +3 -3
- package/templates/module/__model__.signal.ts +11 -10
- package/templates/module/__model__.store.ts +3 -5
- package/templates/service/__model__.dictionary.ts +5 -6
- package/templates/service/__model__.service.ts +3 -3
- package/templates/service/__model__.signal.ts +5 -4
- package/templates/service/__model__.store.ts +3 -5
- package/templates/workspaceRoot/.gitignore.template +4 -0
- package/templates/workspaceRoot/.vscode/settings.json.template +21 -21
- package/templates/workspaceRoot/AGENTS.md.template +4 -10
- package/{tunnel.command-ycmja19q.js → tunnel.command-dcb0wg93.js} +25 -13
- package/{typeChecker-px49mezc.js → typeChecker-j2jdnqsr.js} +1 -1
- package/typecheck.proc.js +6 -1
- package/verify.command-yyepccbh.js +93 -0
- package/{workflow.command-abb1d5xy.js → workflow.command-z5pg9ay0.js} +49 -14
- package/workspace.command-d7x5jttw.js +290 -0
- package/CodeAgent-8d5qs787.js +0 -9
- package/CodeAgentRpcListener-7p7z5dd7.js +0 -97
- package/TunnelShare-qkm8zp03.js +0 -14
- package/agent.command-ydftceda.js +0 -25
- package/cloud.script-nqevg5qw.js +0 -24
- package/code.command-9h3yrzhe.js +0 -167
- package/context.runner-8gg030b0.js +0 -25
- package/guidelines/conventions/conventions.instruction.md +0 -617
- package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +0 -291
- package/index-2mwc0g0d.js +0 -49
- package/index-4vgbysa0.js +0 -279
- package/index-7md2g9vw.js +0 -6
- package/index-b70zct19.js +0 -856
- package/index-c6eggbee.js +0 -123
- package/index-zzvvc845.js +0 -74
- package/quality.command-ah8qcakd.js +0 -1478
- package/templates/workspaceRoot/docs/AI-DEVELOPMENT.md.template +0 -69
- package/templates/workspaceRoot/docs/GENERATED.md.template +0 -55
- package/workspace.command-qm7cw29v.js +0 -521
package/index-c6eggbee.js
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
// pkgs/@akanjs/devkit/codeAgent/agent/akanCodeModel.ts
|
|
3
|
-
var akanCodeDefaultModel2 = { provider: "deepseek", id: "deepseek-flash" };
|
|
4
|
-
var catalogueMissesImages = new Set(["deepseek/deepseek-v4-flash"]);
|
|
5
|
-
var correctInputs = (model) => {
|
|
6
|
-
if (!model || model.input.includes("image"))
|
|
7
|
-
return model;
|
|
8
|
-
if (!catalogueMissesImages.has(`${model.provider}/${model.id}`))
|
|
9
|
-
return model;
|
|
10
|
-
return { ...model, input: [...model.input, "image"] };
|
|
11
|
-
};
|
|
12
|
-
var akanCodeModel2 = async (runtime, ref) => {
|
|
13
|
-
if (ref) {
|
|
14
|
-
const requested = runtime.getModel(ref.provider, ref.id);
|
|
15
|
-
if (!requested)
|
|
16
|
-
throw new Error(`Unknown model: ${ref.provider}/${ref.id}`);
|
|
17
|
-
if (!runtime.hasConfiguredAuth(ref.provider))
|
|
18
|
-
throw new Error(`No API key configured for ${ref.provider}. Set ${ref.provider.toUpperCase()}_API_KEY.`);
|
|
19
|
-
return correctInputs(requested);
|
|
20
|
-
}
|
|
21
|
-
const fallback = runtime.getModel(akanCodeDefaultModel2.provider, akanCodeDefaultModel2.id);
|
|
22
|
-
if (fallback && runtime.hasConfiguredAuth(fallback.provider))
|
|
23
|
-
return correctInputs(fallback);
|
|
24
|
-
return correctInputs((await runtime.getAvailable())[0]);
|
|
25
|
-
};
|
|
26
|
-
var akanCodeModelSupportsImages2 = (model) => !!model?.input.includes("image");
|
|
27
|
-
var akanCodeModelWarnings2 = (model, compactionFloor) => {
|
|
28
|
-
if (!model)
|
|
29
|
-
return [];
|
|
30
|
-
if (model.contextWindow >= compactionFloor)
|
|
31
|
-
return [];
|
|
32
|
-
return [
|
|
33
|
-
`${model.provider}/${model.id} declares a ${model.contextWindow}-token context window, below the ${compactionFloor} the compaction policy needs, so every turn will compact immediately. Check the model entry in ~/.akan/code/models.json.`
|
|
34
|
-
];
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
// pkgs/@akanjs/devkit/codeAgent/agent/CodeAgentStreamPrinter.ts
|
|
38
|
-
import { codeAgentEventLabel } from "akanjs/common";
|
|
39
|
-
import chalk from "chalk";
|
|
40
|
-
|
|
41
|
-
class CodeAgentStreamPrinter2 {
|
|
42
|
-
#options;
|
|
43
|
-
#write;
|
|
44
|
-
#streaming = false;
|
|
45
|
-
constructor(options = {}) {
|
|
46
|
-
this.#options = options;
|
|
47
|
-
this.#write = options.write ?? ((text) => process.stdout.write(text));
|
|
48
|
-
}
|
|
49
|
-
print(event) {
|
|
50
|
-
if (this.#options.json)
|
|
51
|
-
return this.#write(`${JSON.stringify(event)}
|
|
52
|
-
`);
|
|
53
|
-
switch (event.type) {
|
|
54
|
-
case "text_delta":
|
|
55
|
-
this.#streaming = true;
|
|
56
|
-
return this.#write(event.text);
|
|
57
|
-
case "thinking_delta":
|
|
58
|
-
if (!this.#options.thinking)
|
|
59
|
-
return;
|
|
60
|
-
this.#streaming = true;
|
|
61
|
-
return this.#write(chalk.dim(event.text));
|
|
62
|
-
case "tool_start":
|
|
63
|
-
return this.#line(chalk.cyan(`\u2192 ${event.tool.title}`));
|
|
64
|
-
case "tool_end":
|
|
65
|
-
return this.#line(CodeAgentStreamPrinter2.#toolEnd(event));
|
|
66
|
-
case "session":
|
|
67
|
-
return this.#line(chalk.dim(codeAgentEventLabel(event)));
|
|
68
|
-
case "turn_end":
|
|
69
|
-
if (event.stopReason === "truncated")
|
|
70
|
-
return this.#line(chalk.yellow(codeAgentEventLabel(event)));
|
|
71
|
-
return;
|
|
72
|
-
case "message":
|
|
73
|
-
case "tool_progress":
|
|
74
|
-
case "turn_start":
|
|
75
|
-
case "idle":
|
|
76
|
-
case "queue":
|
|
77
|
-
case "context":
|
|
78
|
-
case "subagent":
|
|
79
|
-
return;
|
|
80
|
-
case "question":
|
|
81
|
-
return this.#line(chalk.yellow(`? ${event.question.prompt}`));
|
|
82
|
-
case "approval":
|
|
83
|
-
return this.#line(chalk.yellow(`approve? ${event.request.summary}`));
|
|
84
|
-
case "notice":
|
|
85
|
-
return this.#line(CodeAgentStreamPrinter2.#notice(event.level, event.message));
|
|
86
|
-
case "error":
|
|
87
|
-
return this.#line(chalk.red(`error: ${event.message}`));
|
|
88
|
-
default:
|
|
89
|
-
return this.#line(chalk.dim(codeAgentEventLabel(event)));
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
finish() {
|
|
93
|
-
if (this.#streaming)
|
|
94
|
-
this.#write(`
|
|
95
|
-
`);
|
|
96
|
-
this.#streaming = false;
|
|
97
|
-
}
|
|
98
|
-
#line(text) {
|
|
99
|
-
if (this.#streaming)
|
|
100
|
-
this.#write(`
|
|
101
|
-
`);
|
|
102
|
-
this.#streaming = false;
|
|
103
|
-
this.#write(`${text}
|
|
104
|
-
`);
|
|
105
|
-
}
|
|
106
|
-
static #toolEnd(event) {
|
|
107
|
-
if (event.outcome === "ok")
|
|
108
|
-
return chalk.green(`\u2713 ${event.tool.title}`);
|
|
109
|
-
if (event.outcome === "blocked")
|
|
110
|
-
return chalk.yellow(`\u29B8 ${event.tool.title} \u2014 ${event.output}`);
|
|
111
|
-
return chalk.red(`\u2717 ${event.tool.title} \u2014 ${event.output.split(`
|
|
112
|
-
`)[0] ?? ""}`);
|
|
113
|
-
}
|
|
114
|
-
static #notice(level, message) {
|
|
115
|
-
if (level === "error")
|
|
116
|
-
return chalk.red(message);
|
|
117
|
-
if (level === "warning")
|
|
118
|
-
return chalk.yellow(message);
|
|
119
|
-
return chalk.dim(message);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export { akanCodeDefaultModel2, akanCodeModel2, akanCodeModelSupportsImages2, akanCodeModelWarnings2, CodeAgentStreamPrinter2 };
|
package/index-zzvvc845.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
getDirname2
|
|
4
|
-
} from "./index-52w0fvh8.js";
|
|
5
|
-
|
|
6
|
-
// pkgs/@akanjs/devkit/prompter.ts
|
|
7
|
-
import fsPromise from "fs/promises";
|
|
8
|
-
import { input, select } from "@inquirer/prompts";
|
|
9
|
-
class Prompter2 {
|
|
10
|
-
static async#getGuidelineRoot() {
|
|
11
|
-
const dirname = getDirname2(import.meta.url);
|
|
12
|
-
const candidates = [`${dirname}/guidelines`, `${dirname}/../cli/guidelines`];
|
|
13
|
-
for (const candidate of candidates) {
|
|
14
|
-
try {
|
|
15
|
-
await fsPromise.access(candidate);
|
|
16
|
-
return candidate;
|
|
17
|
-
} catch {}
|
|
18
|
-
}
|
|
19
|
-
return candidates[0];
|
|
20
|
-
}
|
|
21
|
-
static async selectGuideline() {
|
|
22
|
-
const guideNames = await Prompter2.listGuidelines();
|
|
23
|
-
return await select({
|
|
24
|
-
message: "Select a guideline",
|
|
25
|
-
choices: guideNames.map((name) => ({ name, value: name }))
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
static async listGuidelines() {
|
|
29
|
-
const guidelineRoot = await Prompter2.#getGuidelineRoot();
|
|
30
|
-
return (await fsPromise.readdir(guidelineRoot)).filter((name) => !name.startsWith("_")).sort();
|
|
31
|
-
}
|
|
32
|
-
static async getInstruction(guideName) {
|
|
33
|
-
const guideNames = await Prompter2.listGuidelines();
|
|
34
|
-
if (!guideNames.includes(guideName))
|
|
35
|
-
throw new Error(`Unknown guideline "${guideName}". Available: ${guideNames.join(", ")}`);
|
|
36
|
-
const guidelineRoot = await Prompter2.#getGuidelineRoot();
|
|
37
|
-
return await fsPromise.readFile(`${guidelineRoot}/${guideName}/${guideName}.instruction.md`, "utf-8");
|
|
38
|
-
}
|
|
39
|
-
static async getUpdateRequest(guideName) {
|
|
40
|
-
return await input({
|
|
41
|
-
message: `What do you want to update in ${guideName}?`
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
async makeTsFileUpdatePrompt({ context, request }) {
|
|
45
|
-
return `You are a senior developer writing TypeScript-based programs using Akan.js, an in-house framework. Here's an overview of the Akan.js framework:
|
|
46
|
-
${await this.getDocumentation("framework")}
|
|
47
|
-
Please understand the following background information, write code that meets the requirements, verify that it satisfies the validation conditions, and return the result.
|
|
48
|
-
|
|
49
|
-
# Code Style
|
|
50
|
-
- Use double quotes for all string literals in TypeScript/TSX code. Do not use single quotes.
|
|
51
|
-
|
|
52
|
-
# Background Information
|
|
53
|
-
\`\`\`markdown
|
|
54
|
-
${context}
|
|
55
|
-
\`\`\`
|
|
56
|
-
|
|
57
|
-
# Requirements
|
|
58
|
-
\`\`\`markdown
|
|
59
|
-
${request}
|
|
60
|
-
\`\`\`
|
|
61
|
-
`;
|
|
62
|
-
}
|
|
63
|
-
async getDocumentation(guideName) {
|
|
64
|
-
const guidelineRoot = await Prompter2.#getGuidelineRoot();
|
|
65
|
-
const filePath = `${guidelineRoot}/${guideName}/${guideName}.instruction.md`;
|
|
66
|
-
const document = await fsPromise.readFile(filePath, "utf-8");
|
|
67
|
-
return `\`\`\`markdown
|
|
68
|
-
${document}
|
|
69
|
-
\`\`\`
|
|
70
|
-
`;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export { Prompter2 };
|