@dedesfr/prompter 0.1.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/AGENTS.md +105 -0
- package/LICENSE +21 -0
- package/README.md +66 -0
- package/bin/prompter.js +3 -0
- package/build.js +20 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +35 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/commands/init.d.ts +10 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +92 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/list.d.ts +9 -0
- package/dist/commands/list.d.ts.map +1 -0
- package/dist/commands/list.js +65 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/update.d.ts +4 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +38 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/core/config.d.ts +17 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +33 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/configurators/slash/antigravity.d.ts +9 -0
- package/dist/core/configurators/slash/antigravity.d.ts.map +1 -0
- package/dist/core/configurators/slash/antigravity.js +19 -0
- package/dist/core/configurators/slash/antigravity.js.map +1 -0
- package/dist/core/configurators/slash/base.d.ts +19 -0
- package/dist/core/configurators/slash/base.d.ts.map +1 -0
- package/dist/core/configurators/slash/base.js +75 -0
- package/dist/core/configurators/slash/base.js.map +1 -0
- package/dist/core/configurators/slash/claude.d.ts +9 -0
- package/dist/core/configurators/slash/claude.d.ts.map +1 -0
- package/dist/core/configurators/slash/claude.js +19 -0
- package/dist/core/configurators/slash/claude.js.map +1 -0
- package/dist/core/configurators/slash/codex.d.ts +9 -0
- package/dist/core/configurators/slash/codex.d.ts.map +1 -0
- package/dist/core/configurators/slash/codex.js +19 -0
- package/dist/core/configurators/slash/codex.js.map +1 -0
- package/dist/core/configurators/slash/github-copilot.d.ts +9 -0
- package/dist/core/configurators/slash/github-copilot.d.ts.map +1 -0
- package/dist/core/configurators/slash/github-copilot.js +19 -0
- package/dist/core/configurators/slash/github-copilot.js.map +1 -0
- package/dist/core/configurators/slash/index.d.ts +9 -0
- package/dist/core/configurators/slash/index.d.ts.map +1 -0
- package/dist/core/configurators/slash/index.js +9 -0
- package/dist/core/configurators/slash/index.js.map +1 -0
- package/dist/core/configurators/slash/kilocode.d.ts +9 -0
- package/dist/core/configurators/slash/kilocode.d.ts.map +1 -0
- package/dist/core/configurators/slash/kilocode.js +19 -0
- package/dist/core/configurators/slash/kilocode.js.map +1 -0
- package/dist/core/configurators/slash/opencode.d.ts +9 -0
- package/dist/core/configurators/slash/opencode.d.ts.map +1 -0
- package/dist/core/configurators/slash/opencode.js +19 -0
- package/dist/core/configurators/slash/opencode.js.map +1 -0
- package/dist/core/configurators/slash/registry.d.ts +11 -0
- package/dist/core/configurators/slash/registry.d.ts.map +1 -0
- package/dist/core/configurators/slash/registry.js +37 -0
- package/dist/core/configurators/slash/registry.js.map +1 -0
- package/dist/core/templates/agents-template.d.ts +2 -0
- package/dist/core/templates/agents-template.d.ts.map +1 -0
- package/dist/core/templates/agents-template.js +34 -0
- package/dist/core/templates/agents-template.js.map +1 -0
- package/dist/core/templates/index.d.ts +4 -0
- package/dist/core/templates/index.d.ts.map +1 -0
- package/dist/core/templates/index.js +4 -0
- package/dist/core/templates/index.js.map +1 -0
- package/dist/core/templates/project-template.d.ts +2 -0
- package/dist/core/templates/project-template.d.ts.map +1 -0
- package/dist/core/templates/project-template.js +21 -0
- package/dist/core/templates/project-template.js.map +1 -0
- package/dist/core/templates/slash-command-templates.d.ts +7 -0
- package/dist/core/templates/slash-command-templates.d.ts.map +1 -0
- package/dist/core/templates/slash-command-templates.js +54 -0
- package/dist/core/templates/slash-command-templates.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/docs/product-spec.md +151 -0
- package/package.json +50 -0
- package/src/cli/index.ts +40 -0
- package/src/commands/init.ts +103 -0
- package/src/commands/list.ts +84 -0
- package/src/commands/update.ts +41 -0
- package/src/core/config.ts +43 -0
- package/src/core/configurators/slash/antigravity.ts +24 -0
- package/src/core/configurators/slash/base.ts +101 -0
- package/src/core/configurators/slash/claude.ts +24 -0
- package/src/core/configurators/slash/codex.ts +24 -0
- package/src/core/configurators/slash/github-copilot.ts +24 -0
- package/src/core/configurators/slash/index.ts +8 -0
- package/src/core/configurators/slash/kilocode.ts +24 -0
- package/src/core/configurators/slash/opencode.ts +24 -0
- package/src/core/configurators/slash/registry.ts +45 -0
- package/src/core/templates/agents-template.ts +33 -0
- package/src/core/templates/index.ts +3 -0
- package/src/core/templates/project-template.ts +20 -0
- package/src/core/templates/slash-command-templates.ts +58 -0
- package/src/index.ts +1 -0
- package/tsconfig.json +28 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SlashCommandId } from '../../templates/index.js';
|
|
2
|
+
export interface SlashCommandTarget {
|
|
3
|
+
id: SlashCommandId;
|
|
4
|
+
path: string;
|
|
5
|
+
kind: 'slash';
|
|
6
|
+
}
|
|
7
|
+
export declare abstract class SlashCommandConfigurator {
|
|
8
|
+
abstract readonly toolId: string;
|
|
9
|
+
abstract readonly isAvailable: boolean;
|
|
10
|
+
getTargets(): SlashCommandTarget[];
|
|
11
|
+
generateAll(projectPath: string): Promise<string[]>;
|
|
12
|
+
updateExisting(projectPath: string): Promise<string[]>;
|
|
13
|
+
protected abstract getRelativePath(id: SlashCommandId): string;
|
|
14
|
+
protected abstract getFrontmatter(id: SlashCommandId): string | undefined;
|
|
15
|
+
protected getBody(id: SlashCommandId): string;
|
|
16
|
+
protected updateBody(filePath: string, body: string): Promise<void>;
|
|
17
|
+
private fileExists;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/core/configurators/slash/base.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAmB,MAAM,0BAA0B,CAAC;AAG3E,MAAM,WAAW,kBAAkB;IAC/B,EAAE,EAAE,cAAc,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,CAAC;CACjB;AAID,8BAAsB,wBAAwB;IAC1C,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAEvC,UAAU,IAAI,kBAAkB,EAAE;IAQ5B,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IA6BnD,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAe5D,SAAS,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,EAAE,cAAc,GAAG,MAAM;IAC9D,SAAS,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS;IAEzE,SAAS,CAAC,OAAO,CAAC,EAAE,EAAE,cAAc,GAAG,MAAM;cAI7B,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;YAgB3D,UAAU;CAQ3B"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { promises as fs } from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { TemplateManager } from '../../templates/index.js';
|
|
4
|
+
import { PROMPTER_MARKERS } from '../../config.js';
|
|
5
|
+
const ALL_COMMANDS = ['enhance'];
|
|
6
|
+
export class SlashCommandConfigurator {
|
|
7
|
+
getTargets() {
|
|
8
|
+
return ALL_COMMANDS.map((id) => ({
|
|
9
|
+
id,
|
|
10
|
+
path: this.getRelativePath(id),
|
|
11
|
+
kind: 'slash'
|
|
12
|
+
}));
|
|
13
|
+
}
|
|
14
|
+
async generateAll(projectPath) {
|
|
15
|
+
const createdOrUpdated = [];
|
|
16
|
+
for (const target of this.getTargets()) {
|
|
17
|
+
const body = this.getBody(target.id);
|
|
18
|
+
const filePath = path.join(projectPath, target.path);
|
|
19
|
+
// Ensure directory exists
|
|
20
|
+
await fs.mkdir(path.dirname(filePath), { recursive: true });
|
|
21
|
+
if (await this.fileExists(filePath)) {
|
|
22
|
+
await this.updateBody(filePath, body);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
const frontmatter = this.getFrontmatter(target.id);
|
|
26
|
+
const sections = [];
|
|
27
|
+
if (frontmatter) {
|
|
28
|
+
sections.push(frontmatter.trim());
|
|
29
|
+
}
|
|
30
|
+
sections.push(`${PROMPTER_MARKERS.start}\n${body}\n${PROMPTER_MARKERS.end}`);
|
|
31
|
+
const content = sections.join('\n') + '\n';
|
|
32
|
+
await fs.writeFile(filePath, content, 'utf-8');
|
|
33
|
+
}
|
|
34
|
+
createdOrUpdated.push(target.path);
|
|
35
|
+
}
|
|
36
|
+
return createdOrUpdated;
|
|
37
|
+
}
|
|
38
|
+
async updateExisting(projectPath) {
|
|
39
|
+
const updated = [];
|
|
40
|
+
for (const target of this.getTargets()) {
|
|
41
|
+
const filePath = path.join(projectPath, target.path);
|
|
42
|
+
if (await this.fileExists(filePath)) {
|
|
43
|
+
const body = this.getBody(target.id);
|
|
44
|
+
await this.updateBody(filePath, body);
|
|
45
|
+
updated.push(target.path);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return updated;
|
|
49
|
+
}
|
|
50
|
+
getBody(id) {
|
|
51
|
+
return TemplateManager.getSlashCommandBody(id).trim();
|
|
52
|
+
}
|
|
53
|
+
async updateBody(filePath, body) {
|
|
54
|
+
const content = await fs.readFile(filePath, 'utf-8');
|
|
55
|
+
const startIndex = content.indexOf(PROMPTER_MARKERS.start);
|
|
56
|
+
const endIndex = content.indexOf(PROMPTER_MARKERS.end);
|
|
57
|
+
if (startIndex === -1 || endIndex === -1 || endIndex <= startIndex) {
|
|
58
|
+
throw new Error(`Missing Prompter markers in ${filePath}`);
|
|
59
|
+
}
|
|
60
|
+
const before = content.slice(0, startIndex + PROMPTER_MARKERS.start.length);
|
|
61
|
+
const after = content.slice(endIndex);
|
|
62
|
+
const updatedContent = `${before}\n${body}\n${after}`;
|
|
63
|
+
await fs.writeFile(filePath, updatedContent, 'utf-8');
|
|
64
|
+
}
|
|
65
|
+
async fileExists(filePath) {
|
|
66
|
+
try {
|
|
67
|
+
await fs.access(filePath);
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
catch {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../src/core/configurators/slash/base.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
+
import { SlashCommandId } from '../../templates/index.js';
|
|
3
|
+
export declare class ClaudeConfigurator extends SlashCommandConfigurator {
|
|
4
|
+
readonly toolId = "claude";
|
|
5
|
+
readonly isAvailable = true;
|
|
6
|
+
protected getRelativePath(id: SlashCommandId): string;
|
|
7
|
+
protected getFrontmatter(id: SlashCommandId): string | undefined;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=claude.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../../../src/core/configurators/slash/claude.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAU1D,qBAAa,kBAAmB,SAAQ,wBAAwB;IAC5D,QAAQ,CAAC,MAAM,YAAY;IAC3B,QAAQ,CAAC,WAAW,QAAQ;IAE5B,SAAS,CAAC,eAAe,CAAC,EAAE,EAAE,cAAc,GAAG,MAAM;IAIrD,SAAS,CAAC,cAAc,CAAC,EAAE,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS;CAInE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
+
const FILE_PATHS = {
|
|
3
|
+
enhance: '.claude/commands/prompter/enhance.md'
|
|
4
|
+
};
|
|
5
|
+
const DESCRIPTIONS = {
|
|
6
|
+
enhance: 'Enhance a rough prompt into a professional specification'
|
|
7
|
+
};
|
|
8
|
+
export class ClaudeConfigurator extends SlashCommandConfigurator {
|
|
9
|
+
toolId = 'claude';
|
|
10
|
+
isAvailable = true;
|
|
11
|
+
getRelativePath(id) {
|
|
12
|
+
return FILE_PATHS[id];
|
|
13
|
+
}
|
|
14
|
+
getFrontmatter(id) {
|
|
15
|
+
// Claude Code uses the filename as the command name
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=claude.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude.js","sourceRoot":"","sources":["../../../../src/core/configurators/slash/claude.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAGrD,MAAM,UAAU,GAAmC;IAC/C,OAAO,EAAE,sCAAsC;CAClD,CAAC;AAEF,MAAM,YAAY,GAAmC;IACjD,OAAO,EAAE,0DAA0D;CACtE,CAAC;AAEF,MAAM,OAAO,kBAAmB,SAAQ,wBAAwB;IACnD,MAAM,GAAG,QAAQ,CAAC;IAClB,WAAW,GAAG,IAAI,CAAC;IAElB,eAAe,CAAC,EAAkB;QACxC,OAAO,UAAU,CAAC,EAAE,CAAC,CAAC;IAC1B,CAAC;IAES,cAAc,CAAC,EAAkB;QACvC,oDAAoD;QACpD,OAAO,SAAS,CAAC;IACrB,CAAC;CACJ"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
+
import { SlashCommandId } from '../../templates/index.js';
|
|
3
|
+
export declare class CodexConfigurator extends SlashCommandConfigurator {
|
|
4
|
+
readonly toolId = "codex";
|
|
5
|
+
readonly isAvailable = true;
|
|
6
|
+
protected getRelativePath(id: SlashCommandId): string;
|
|
7
|
+
protected getFrontmatter(id: SlashCommandId): string | undefined;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=codex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../../../src/core/configurators/slash/codex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAU1D,qBAAa,iBAAkB,SAAQ,wBAAwB;IAC3D,QAAQ,CAAC,MAAM,WAAW;IAC1B,QAAQ,CAAC,WAAW,QAAQ;IAE5B,SAAS,CAAC,eAAe,CAAC,EAAE,EAAE,cAAc,GAAG,MAAM;IAIrD,SAAS,CAAC,cAAc,CAAC,EAAE,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS;CAInE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
+
const FILE_PATHS = {
|
|
3
|
+
enhance: '.codex/prompts/prompter-enhance.md'
|
|
4
|
+
};
|
|
5
|
+
const DESCRIPTIONS = {
|
|
6
|
+
enhance: 'Enhance a rough prompt into a professional specification'
|
|
7
|
+
};
|
|
8
|
+
export class CodexConfigurator extends SlashCommandConfigurator {
|
|
9
|
+
toolId = 'codex';
|
|
10
|
+
isAvailable = true;
|
|
11
|
+
getRelativePath(id) {
|
|
12
|
+
return FILE_PATHS[id];
|
|
13
|
+
}
|
|
14
|
+
getFrontmatter(id) {
|
|
15
|
+
const description = DESCRIPTIONS[id];
|
|
16
|
+
return `---\ndescription: ${description}\n---`;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=codex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex.js","sourceRoot":"","sources":["../../../../src/core/configurators/slash/codex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAGrD,MAAM,UAAU,GAAmC;IAC/C,OAAO,EAAE,oCAAoC;CAChD,CAAC;AAEF,MAAM,YAAY,GAAmC;IACjD,OAAO,EAAE,0DAA0D;CACtE,CAAC;AAEF,MAAM,OAAO,iBAAkB,SAAQ,wBAAwB;IAClD,MAAM,GAAG,OAAO,CAAC;IACjB,WAAW,GAAG,IAAI,CAAC;IAElB,eAAe,CAAC,EAAkB;QACxC,OAAO,UAAU,CAAC,EAAE,CAAC,CAAC;IAC1B,CAAC;IAES,cAAc,CAAC,EAAkB;QACvC,MAAM,WAAW,GAAG,YAAY,CAAC,EAAE,CAAC,CAAC;QACrC,OAAO,qBAAqB,WAAW,OAAO,CAAC;IACnD,CAAC;CACJ"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
+
import { SlashCommandId } from '../../templates/index.js';
|
|
3
|
+
export declare class GithubCopilotConfigurator extends SlashCommandConfigurator {
|
|
4
|
+
readonly toolId = "github-copilot";
|
|
5
|
+
readonly isAvailable = true;
|
|
6
|
+
protected getRelativePath(id: SlashCommandId): string;
|
|
7
|
+
protected getFrontmatter(id: SlashCommandId): string | undefined;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=github-copilot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-copilot.d.ts","sourceRoot":"","sources":["../../../../src/core/configurators/slash/github-copilot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAU1D,qBAAa,yBAA0B,SAAQ,wBAAwB;IACnE,QAAQ,CAAC,MAAM,oBAAoB;IACnC,QAAQ,CAAC,WAAW,QAAQ;IAE5B,SAAS,CAAC,eAAe,CAAC,EAAE,EAAE,cAAc,GAAG,MAAM;IAIrD,SAAS,CAAC,cAAc,CAAC,EAAE,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS;CAInE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
+
const FILE_PATHS = {
|
|
3
|
+
enhance: '.github/prompts/prompter-enhance.md'
|
|
4
|
+
};
|
|
5
|
+
const DESCRIPTIONS = {
|
|
6
|
+
enhance: 'Enhance a rough prompt into a professional specification'
|
|
7
|
+
};
|
|
8
|
+
export class GithubCopilotConfigurator extends SlashCommandConfigurator {
|
|
9
|
+
toolId = 'github-copilot';
|
|
10
|
+
isAvailable = true;
|
|
11
|
+
getRelativePath(id) {
|
|
12
|
+
return FILE_PATHS[id];
|
|
13
|
+
}
|
|
14
|
+
getFrontmatter(id) {
|
|
15
|
+
const description = DESCRIPTIONS[id];
|
|
16
|
+
return `---\ndescription: ${description}\n---`;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=github-copilot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-copilot.js","sourceRoot":"","sources":["../../../../src/core/configurators/slash/github-copilot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAGrD,MAAM,UAAU,GAAmC;IAC/C,OAAO,EAAE,qCAAqC;CACjD,CAAC;AAEF,MAAM,YAAY,GAAmC;IACjD,OAAO,EAAE,0DAA0D;CACtE,CAAC;AAEF,MAAM,OAAO,yBAA0B,SAAQ,wBAAwB;IAC1D,MAAM,GAAG,gBAAgB,CAAC;IAC1B,WAAW,GAAG,IAAI,CAAC;IAElB,eAAe,CAAC,EAAkB;QACxC,OAAO,UAAU,CAAC,EAAE,CAAC,CAAC;IAC1B,CAAC;IAES,cAAc,CAAC,EAAkB;QACvC,MAAM,WAAW,GAAG,YAAY,CAAC,EAAE,CAAC,CAAC;QACrC,OAAO,qBAAqB,WAAW,OAAO,CAAC;IACnD,CAAC;CACJ"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { SlashCommandConfigurator } from './base.js';
|
|
2
|
+
export { ConfiguratorRegistry, registry } from './registry.js';
|
|
3
|
+
export { AntigravityConfigurator } from './antigravity.js';
|
|
4
|
+
export { ClaudeConfigurator } from './claude.js';
|
|
5
|
+
export { CodexConfigurator } from './codex.js';
|
|
6
|
+
export { GithubCopilotConfigurator } from './github-copilot.js';
|
|
7
|
+
export { OpenCodeConfigurator } from './opencode.js';
|
|
8
|
+
export { KiloCodeConfigurator } from './kilocode.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/configurators/slash/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { SlashCommandConfigurator } from './base.js';
|
|
2
|
+
export { ConfiguratorRegistry, registry } from './registry.js';
|
|
3
|
+
export { AntigravityConfigurator } from './antigravity.js';
|
|
4
|
+
export { ClaudeConfigurator } from './claude.js';
|
|
5
|
+
export { CodexConfigurator } from './codex.js';
|
|
6
|
+
export { GithubCopilotConfigurator } from './github-copilot.js';
|
|
7
|
+
export { OpenCodeConfigurator } from './opencode.js';
|
|
8
|
+
export { KiloCodeConfigurator } from './kilocode.js';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/configurators/slash/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
+
import { SlashCommandId } from '../../templates/index.js';
|
|
3
|
+
export declare class KiloCodeConfigurator extends SlashCommandConfigurator {
|
|
4
|
+
readonly toolId = "kilocode";
|
|
5
|
+
readonly isAvailable = true;
|
|
6
|
+
protected getRelativePath(id: SlashCommandId): string;
|
|
7
|
+
protected getFrontmatter(id: SlashCommandId): string | undefined;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=kilocode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kilocode.d.ts","sourceRoot":"","sources":["../../../../src/core/configurators/slash/kilocode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAU1D,qBAAa,oBAAqB,SAAQ,wBAAwB;IAC9D,QAAQ,CAAC,MAAM,cAAc;IAC7B,QAAQ,CAAC,WAAW,QAAQ;IAE5B,SAAS,CAAC,eAAe,CAAC,EAAE,EAAE,cAAc,GAAG,MAAM;IAIrD,SAAS,CAAC,cAAc,CAAC,EAAE,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS;CAInE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
+
const FILE_PATHS = {
|
|
3
|
+
enhance: '.kilocode/workflows/prompter-enhance.md'
|
|
4
|
+
};
|
|
5
|
+
const DESCRIPTIONS = {
|
|
6
|
+
enhance: 'Enhance a rough prompt into a professional specification'
|
|
7
|
+
};
|
|
8
|
+
export class KiloCodeConfigurator extends SlashCommandConfigurator {
|
|
9
|
+
toolId = 'kilocode';
|
|
10
|
+
isAvailable = true;
|
|
11
|
+
getRelativePath(id) {
|
|
12
|
+
return FILE_PATHS[id];
|
|
13
|
+
}
|
|
14
|
+
getFrontmatter(id) {
|
|
15
|
+
const description = DESCRIPTIONS[id];
|
|
16
|
+
return `---\ndescription: ${description}\n---`;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=kilocode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kilocode.js","sourceRoot":"","sources":["../../../../src/core/configurators/slash/kilocode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAGrD,MAAM,UAAU,GAAmC;IAC/C,OAAO,EAAE,yCAAyC;CACrD,CAAC;AAEF,MAAM,YAAY,GAAmC;IACjD,OAAO,EAAE,0DAA0D;CACtE,CAAC;AAEF,MAAM,OAAO,oBAAqB,SAAQ,wBAAwB;IACrD,MAAM,GAAG,UAAU,CAAC;IACpB,WAAW,GAAG,IAAI,CAAC;IAElB,eAAe,CAAC,EAAkB;QACxC,OAAO,UAAU,CAAC,EAAE,CAAC,CAAC;IAC1B,CAAC;IAES,cAAc,CAAC,EAAkB;QACvC,MAAM,WAAW,GAAG,YAAY,CAAC,EAAE,CAAC,CAAC;QACrC,OAAO,qBAAqB,WAAW,OAAO,CAAC;IACnD,CAAC;CACJ"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
+
import { SlashCommandId } from '../../templates/index.js';
|
|
3
|
+
export declare class OpenCodeConfigurator extends SlashCommandConfigurator {
|
|
4
|
+
readonly toolId = "opencode";
|
|
5
|
+
readonly isAvailable = true;
|
|
6
|
+
protected getRelativePath(id: SlashCommandId): string;
|
|
7
|
+
protected getFrontmatter(id: SlashCommandId): string | undefined;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=opencode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opencode.d.ts","sourceRoot":"","sources":["../../../../src/core/configurators/slash/opencode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAU1D,qBAAa,oBAAqB,SAAQ,wBAAwB;IAC9D,QAAQ,CAAC,MAAM,cAAc;IAC7B,QAAQ,CAAC,WAAW,QAAQ;IAE5B,SAAS,CAAC,eAAe,CAAC,EAAE,EAAE,cAAc,GAAG,MAAM;IAIrD,SAAS,CAAC,cAAc,CAAC,EAAE,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS;CAInE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
+
const FILE_PATHS = {
|
|
3
|
+
enhance: '.opencode/prompts/prompter-enhance.md'
|
|
4
|
+
};
|
|
5
|
+
const DESCRIPTIONS = {
|
|
6
|
+
enhance: 'Enhance a rough prompt into a professional specification'
|
|
7
|
+
};
|
|
8
|
+
export class OpenCodeConfigurator extends SlashCommandConfigurator {
|
|
9
|
+
toolId = 'opencode';
|
|
10
|
+
isAvailable = true;
|
|
11
|
+
getRelativePath(id) {
|
|
12
|
+
return FILE_PATHS[id];
|
|
13
|
+
}
|
|
14
|
+
getFrontmatter(id) {
|
|
15
|
+
const description = DESCRIPTIONS[id];
|
|
16
|
+
return `---\ndescription: ${description}\n---`;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=opencode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opencode.js","sourceRoot":"","sources":["../../../../src/core/configurators/slash/opencode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAGrD,MAAM,UAAU,GAAmC;IAC/C,OAAO,EAAE,uCAAuC;CACnD,CAAC;AAEF,MAAM,YAAY,GAAmC;IACjD,OAAO,EAAE,0DAA0D;CACtE,CAAC;AAEF,MAAM,OAAO,oBAAqB,SAAQ,wBAAwB;IACrD,MAAM,GAAG,UAAU,CAAC;IACpB,WAAW,GAAG,IAAI,CAAC;IAElB,eAAe,CAAC,EAAkB;QACxC,OAAO,UAAU,CAAC,EAAE,CAAC,CAAC;IAC1B,CAAC;IAES,cAAc,CAAC,EAAkB;QACvC,MAAM,WAAW,GAAG,YAAY,CAAC,EAAE,CAAC,CAAC;QACrC,OAAO,qBAAqB,WAAW,OAAO,CAAC;IACnD,CAAC;CACJ"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SlashCommandConfigurator } from './base.js';
|
|
2
|
+
export declare class ConfiguratorRegistry {
|
|
3
|
+
private configurators;
|
|
4
|
+
constructor();
|
|
5
|
+
get(toolId: string): SlashCommandConfigurator | undefined;
|
|
6
|
+
getAll(): SlashCommandConfigurator[];
|
|
7
|
+
getAvailable(): SlashCommandConfigurator[];
|
|
8
|
+
getToolIds(): string[];
|
|
9
|
+
}
|
|
10
|
+
export declare const registry: ConfiguratorRegistry;
|
|
11
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/core/configurators/slash/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAQrD,qBAAa,oBAAoB;IAC7B,OAAO,CAAC,aAAa,CAAoD;;IAkBzE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,wBAAwB,GAAG,SAAS;IAIzD,MAAM,IAAI,wBAAwB,EAAE;IAIpC,YAAY,IAAI,wBAAwB,EAAE;IAI1C,UAAU,IAAI,MAAM,EAAE;CAGzB;AAED,eAAO,MAAM,QAAQ,sBAA6B,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AntigravityConfigurator } from './antigravity.js';
|
|
2
|
+
import { ClaudeConfigurator } from './claude.js';
|
|
3
|
+
import { CodexConfigurator } from './codex.js';
|
|
4
|
+
import { GithubCopilotConfigurator } from './github-copilot.js';
|
|
5
|
+
import { OpenCodeConfigurator } from './opencode.js';
|
|
6
|
+
import { KiloCodeConfigurator } from './kilocode.js';
|
|
7
|
+
export class ConfiguratorRegistry {
|
|
8
|
+
configurators = new Map();
|
|
9
|
+
constructor() {
|
|
10
|
+
const antigravity = new AntigravityConfigurator();
|
|
11
|
+
const claude = new ClaudeConfigurator();
|
|
12
|
+
const codex = new CodexConfigurator();
|
|
13
|
+
const githubCopilot = new GithubCopilotConfigurator();
|
|
14
|
+
const opencode = new OpenCodeConfigurator();
|
|
15
|
+
const kilocode = new KiloCodeConfigurator();
|
|
16
|
+
this.configurators.set(antigravity.toolId, antigravity);
|
|
17
|
+
this.configurators.set(claude.toolId, claude);
|
|
18
|
+
this.configurators.set(codex.toolId, codex);
|
|
19
|
+
this.configurators.set(githubCopilot.toolId, githubCopilot);
|
|
20
|
+
this.configurators.set(opencode.toolId, opencode);
|
|
21
|
+
this.configurators.set(kilocode.toolId, kilocode);
|
|
22
|
+
}
|
|
23
|
+
get(toolId) {
|
|
24
|
+
return this.configurators.get(toolId);
|
|
25
|
+
}
|
|
26
|
+
getAll() {
|
|
27
|
+
return Array.from(this.configurators.values());
|
|
28
|
+
}
|
|
29
|
+
getAvailable() {
|
|
30
|
+
return this.getAll().filter(c => c.isAvailable);
|
|
31
|
+
}
|
|
32
|
+
getToolIds() {
|
|
33
|
+
return Array.from(this.configurators.keys());
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export const registry = new ConfiguratorRegistry();
|
|
37
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/core/configurators/slash/registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAErD,MAAM,OAAO,oBAAoB;IACrB,aAAa,GAA0C,IAAI,GAAG,EAAE,CAAC;IAEzE;QACI,MAAM,WAAW,GAAG,IAAI,uBAAuB,EAAE,CAAC;QAClD,MAAM,MAAM,GAAG,IAAI,kBAAkB,EAAE,CAAC;QACxC,MAAM,KAAK,GAAG,IAAI,iBAAiB,EAAE,CAAC;QACtC,MAAM,aAAa,GAAG,IAAI,yBAAyB,EAAE,CAAC;QACtD,MAAM,QAAQ,GAAG,IAAI,oBAAoB,EAAE,CAAC;QAC5C,MAAM,QAAQ,GAAG,IAAI,oBAAoB,EAAE,CAAC;QAE5C,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QACxD,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC9C,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAC5C,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QAC5D,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAClD,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACtD,CAAC;IAED,GAAG,CAAC,MAAc;QACd,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IAED,MAAM;QACF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC;IACnD,CAAC;IAED,YAAY;QACR,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;IACpD,CAAC;IAED,UAAU;QACN,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC;IACjD,CAAC;CACJ;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const agentsTemplate = "# Prompter Workflow\n\nThis project uses Prompter to enhance rough prompts into professional specifications.\n\n## Available Commands\n\n- `/prompter-enhance` - Transform a rough idea into a comprehensive specification\n\n## How It Works\n\n1. Invoke `/prompter-enhance` with your rough idea (e.g., \"Create a todo app\")\n2. The AI will enhance your prompt into a detailed specification\n3. The enhanced specification is saved to `prompter/<slug>/enhanced-prompt.md`\n4. Use the enhanced specification to guide implementation\n\n## Output Location\n\nEnhanced prompts are saved in the `prompter/` directory:\n\n```\nprompter/\n\u251C\u2500\u2500 project.md # Project context (edit this!)\n\u251C\u2500\u2500 todo-app/\n\u2502 \u2514\u2500\u2500 enhanced-prompt.md # Enhanced specification\n\u2514\u2500\u2500 ...\n```\n\n## Tips\n\n- Edit `prompter/project.md` to provide context about your project\n- Be specific in your initial prompt for better results\n- Review and refine the enhanced specification before implementing\n";
|
|
2
|
+
//# sourceMappingURL=agents-template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents-template.d.ts","sourceRoot":"","sources":["../../../src/core/templates/agents-template.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,uhCAgC1B,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export const agentsTemplate = `# Prompter Workflow
|
|
2
|
+
|
|
3
|
+
This project uses Prompter to enhance rough prompts into professional specifications.
|
|
4
|
+
|
|
5
|
+
## Available Commands
|
|
6
|
+
|
|
7
|
+
- \`/prompter-enhance\` - Transform a rough idea into a comprehensive specification
|
|
8
|
+
|
|
9
|
+
## How It Works
|
|
10
|
+
|
|
11
|
+
1. Invoke \`/prompter-enhance\` with your rough idea (e.g., "Create a todo app")
|
|
12
|
+
2. The AI will enhance your prompt into a detailed specification
|
|
13
|
+
3. The enhanced specification is saved to \`prompter/<slug>/enhanced-prompt.md\`
|
|
14
|
+
4. Use the enhanced specification to guide implementation
|
|
15
|
+
|
|
16
|
+
## Output Location
|
|
17
|
+
|
|
18
|
+
Enhanced prompts are saved in the \`prompter/\` directory:
|
|
19
|
+
|
|
20
|
+
\`\`\`
|
|
21
|
+
prompter/
|
|
22
|
+
├── project.md # Project context (edit this!)
|
|
23
|
+
├── todo-app/
|
|
24
|
+
│ └── enhanced-prompt.md # Enhanced specification
|
|
25
|
+
└── ...
|
|
26
|
+
\`\`\`
|
|
27
|
+
|
|
28
|
+
## Tips
|
|
29
|
+
|
|
30
|
+
- Edit \`prompter/project.md\` to provide context about your project
|
|
31
|
+
- Be specific in your initial prompt for better results
|
|
32
|
+
- Review and refine the enhanced specification before implementing
|
|
33
|
+
`;
|
|
34
|
+
//# sourceMappingURL=agents-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents-template.js","sourceRoot":"","sources":["../../../src/core/templates/agents-template.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgC7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/templates/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/templates/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const projectTemplate = "# Project Context\n\nThis file provides context about your project for the Prompter workflow.\n\n## Project Overview\n\n<!-- Describe your project here -->\n\n## Technology Stack\n\n<!-- List your preferred technologies -->\n\n## Conventions\n\n<!-- Document any coding conventions or preferences -->\n\n## Notes\n\n<!-- Any additional context that should influence prompt enhancement -->\n";
|
|
2
|
+
//# sourceMappingURL=project-template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-template.d.ts","sourceRoot":"","sources":["../../../src/core/templates/project-template.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,2YAmB3B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export const projectTemplate = `# Project Context
|
|
2
|
+
|
|
3
|
+
This file provides context about your project for the Prompter workflow.
|
|
4
|
+
|
|
5
|
+
## Project Overview
|
|
6
|
+
|
|
7
|
+
<!-- Describe your project here -->
|
|
8
|
+
|
|
9
|
+
## Technology Stack
|
|
10
|
+
|
|
11
|
+
<!-- List your preferred technologies -->
|
|
12
|
+
|
|
13
|
+
## Conventions
|
|
14
|
+
|
|
15
|
+
<!-- Document any coding conventions or preferences -->
|
|
16
|
+
|
|
17
|
+
## Notes
|
|
18
|
+
|
|
19
|
+
<!-- Any additional context that should influence prompt enhancement -->
|
|
20
|
+
`;
|
|
21
|
+
//# sourceMappingURL=project-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-template.js","sourceRoot":"","sources":["../../../src/core/templates/project-template.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;CAmB9B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type SlashCommandId = 'enhance';
|
|
2
|
+
export declare const slashCommandBodies: Record<SlashCommandId, string>;
|
|
3
|
+
export declare function getSlashCommandBody(id: SlashCommandId): string;
|
|
4
|
+
export declare class TemplateManager {
|
|
5
|
+
static getSlashCommandBody(id: SlashCommandId): string;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=slash-command-templates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slash-command-templates.d.ts","sourceRoot":"","sources":["../../../src/core/templates/slash-command-templates.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,SAAS,CAAC;AA6CvC,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAE7D,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,cAAc,GAAG,MAAM,CAE9D;AAED,qBAAa,eAAe;IACxB,MAAM,CAAC,mBAAmB,CAAC,EAAE,EAAE,cAAc,GAAG,MAAM;CAGzD"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
const enhanceWorkflow = `## MUST FOLLOW
|
|
2
|
+
- Response Language: {User Request Language}
|
|
3
|
+
|
|
4
|
+
## INPUT PROCESSING
|
|
5
|
+
- The user's primary input is their written message
|
|
6
|
+
- If USER_PROVIDED_ATTACHMENT_TEXT contains extracted content from an uploaded file, treat it as reference material that supplements the user's message
|
|
7
|
+
- Integrate the attachment content context where relevant
|
|
8
|
+
- If the user references "this file", "the document", "the code", or similar terms AND USER_PROVIDED_ATTACHMENT_TEXT is present, incorporate that content directly into the enhanced prompt structure
|
|
9
|
+
|
|
10
|
+
## YOUR ROLE
|
|
11
|
+
You are a PROMPT ENHANCER. Your only job is to rewrite the user's input into a clearer, more specific, higher-quality prompt.
|
|
12
|
+
|
|
13
|
+
## STRICT OUTPUT RULES
|
|
14
|
+
- Output ONLY the enhanced prompt text
|
|
15
|
+
- Do NOT ask the user questions
|
|
16
|
+
- Do NOT start a conversation
|
|
17
|
+
- Do NOT include explanations, bullet points, headings, lead-in phrases, or quotes
|
|
18
|
+
- Do NOT refuse. Do NOT say you can't proceed
|
|
19
|
+
- Do NOT mention policies or limitations
|
|
20
|
+
- Never output anything except a rewritten prompt
|
|
21
|
+
|
|
22
|
+
## MISSING INFO HANDLING
|
|
23
|
+
- If the user input is missing details (e.g., code not provided), you MUST still produce an enhanced prompt
|
|
24
|
+
- Embed requests for the missing details INSIDE the enhanced prompt itself (e.g., "Use the code below: …" / "If code is not provided, ask me to paste it"), but do not ask the user directly as the assistant
|
|
25
|
+
|
|
26
|
+
## QUALITY REQUIREMENTS
|
|
27
|
+
- Preserve the user's intent
|
|
28
|
+
- Add helpful constraints, context, and success criteria
|
|
29
|
+
- Specify desired output structure, depth, and focus
|
|
30
|
+
- Keep it concise but complete
|
|
31
|
+
|
|
32
|
+
## WORKFLOW STEPS
|
|
33
|
+
1. Read the user's input (and any attachment content if present)
|
|
34
|
+
2. Generate a unique, URL-friendly slug from the input (lowercase, hyphen-separated)
|
|
35
|
+
3. Create the directory \`prompter/<slug>/\` if it doesn't exist
|
|
36
|
+
4. Generate the enhanced prompt following all rules above
|
|
37
|
+
5. Save the enhanced prompt to \`prompter/<slug>/enhanced-prompt.md\`
|
|
38
|
+
6. Report the saved file path
|
|
39
|
+
|
|
40
|
+
## REFERENCE
|
|
41
|
+
- Use \`prompter list\` to see existing enhanced prompts
|
|
42
|
+
- Read \`prompter/project.md\` for project context and conventions`;
|
|
43
|
+
export const slashCommandBodies = {
|
|
44
|
+
enhance: enhanceWorkflow
|
|
45
|
+
};
|
|
46
|
+
export function getSlashCommandBody(id) {
|
|
47
|
+
return slashCommandBodies[id];
|
|
48
|
+
}
|
|
49
|
+
export class TemplateManager {
|
|
50
|
+
static getSlashCommandBody(id) {
|
|
51
|
+
return getSlashCommandBody(id);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=slash-command-templates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slash-command-templates.js","sourceRoot":"","sources":["../../../src/core/templates/slash-command-templates.ts"],"names":[],"mappings":"AAEA,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mEAyC2C,CAAC;AAEpE,MAAM,CAAC,MAAM,kBAAkB,GAAmC;IAC9D,OAAO,EAAE,eAAe;CAC3B,CAAC;AAEF,MAAM,UAAU,mBAAmB,CAAC,EAAkB;IAClD,OAAO,kBAAkB,CAAC,EAAE,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,OAAO,eAAe;IACxB,MAAM,CAAC,mBAAmB,CAAC,EAAkB;QACzC,OAAO,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;CACJ"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|