@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.
Files changed (103) hide show
  1. package/AGENTS.md +105 -0
  2. package/LICENSE +21 -0
  3. package/README.md +66 -0
  4. package/bin/prompter.js +3 -0
  5. package/build.js +20 -0
  6. package/dist/cli/index.d.ts +2 -0
  7. package/dist/cli/index.d.ts.map +1 -0
  8. package/dist/cli/index.js +35 -0
  9. package/dist/cli/index.js.map +1 -0
  10. package/dist/commands/init.d.ts +10 -0
  11. package/dist/commands/init.d.ts.map +1 -0
  12. package/dist/commands/init.js +92 -0
  13. package/dist/commands/init.js.map +1 -0
  14. package/dist/commands/list.d.ts +9 -0
  15. package/dist/commands/list.d.ts.map +1 -0
  16. package/dist/commands/list.js +65 -0
  17. package/dist/commands/list.js.map +1 -0
  18. package/dist/commands/update.d.ts +4 -0
  19. package/dist/commands/update.d.ts.map +1 -0
  20. package/dist/commands/update.js +38 -0
  21. package/dist/commands/update.js.map +1 -0
  22. package/dist/core/config.d.ts +17 -0
  23. package/dist/core/config.d.ts.map +1 -0
  24. package/dist/core/config.js +33 -0
  25. package/dist/core/config.js.map +1 -0
  26. package/dist/core/configurators/slash/antigravity.d.ts +9 -0
  27. package/dist/core/configurators/slash/antigravity.d.ts.map +1 -0
  28. package/dist/core/configurators/slash/antigravity.js +19 -0
  29. package/dist/core/configurators/slash/antigravity.js.map +1 -0
  30. package/dist/core/configurators/slash/base.d.ts +19 -0
  31. package/dist/core/configurators/slash/base.d.ts.map +1 -0
  32. package/dist/core/configurators/slash/base.js +75 -0
  33. package/dist/core/configurators/slash/base.js.map +1 -0
  34. package/dist/core/configurators/slash/claude.d.ts +9 -0
  35. package/dist/core/configurators/slash/claude.d.ts.map +1 -0
  36. package/dist/core/configurators/slash/claude.js +19 -0
  37. package/dist/core/configurators/slash/claude.js.map +1 -0
  38. package/dist/core/configurators/slash/codex.d.ts +9 -0
  39. package/dist/core/configurators/slash/codex.d.ts.map +1 -0
  40. package/dist/core/configurators/slash/codex.js +19 -0
  41. package/dist/core/configurators/slash/codex.js.map +1 -0
  42. package/dist/core/configurators/slash/github-copilot.d.ts +9 -0
  43. package/dist/core/configurators/slash/github-copilot.d.ts.map +1 -0
  44. package/dist/core/configurators/slash/github-copilot.js +19 -0
  45. package/dist/core/configurators/slash/github-copilot.js.map +1 -0
  46. package/dist/core/configurators/slash/index.d.ts +9 -0
  47. package/dist/core/configurators/slash/index.d.ts.map +1 -0
  48. package/dist/core/configurators/slash/index.js +9 -0
  49. package/dist/core/configurators/slash/index.js.map +1 -0
  50. package/dist/core/configurators/slash/kilocode.d.ts +9 -0
  51. package/dist/core/configurators/slash/kilocode.d.ts.map +1 -0
  52. package/dist/core/configurators/slash/kilocode.js +19 -0
  53. package/dist/core/configurators/slash/kilocode.js.map +1 -0
  54. package/dist/core/configurators/slash/opencode.d.ts +9 -0
  55. package/dist/core/configurators/slash/opencode.d.ts.map +1 -0
  56. package/dist/core/configurators/slash/opencode.js +19 -0
  57. package/dist/core/configurators/slash/opencode.js.map +1 -0
  58. package/dist/core/configurators/slash/registry.d.ts +11 -0
  59. package/dist/core/configurators/slash/registry.d.ts.map +1 -0
  60. package/dist/core/configurators/slash/registry.js +37 -0
  61. package/dist/core/configurators/slash/registry.js.map +1 -0
  62. package/dist/core/templates/agents-template.d.ts +2 -0
  63. package/dist/core/templates/agents-template.d.ts.map +1 -0
  64. package/dist/core/templates/agents-template.js +34 -0
  65. package/dist/core/templates/agents-template.js.map +1 -0
  66. package/dist/core/templates/index.d.ts +4 -0
  67. package/dist/core/templates/index.d.ts.map +1 -0
  68. package/dist/core/templates/index.js +4 -0
  69. package/dist/core/templates/index.js.map +1 -0
  70. package/dist/core/templates/project-template.d.ts +2 -0
  71. package/dist/core/templates/project-template.d.ts.map +1 -0
  72. package/dist/core/templates/project-template.js +21 -0
  73. package/dist/core/templates/project-template.js.map +1 -0
  74. package/dist/core/templates/slash-command-templates.d.ts +7 -0
  75. package/dist/core/templates/slash-command-templates.d.ts.map +1 -0
  76. package/dist/core/templates/slash-command-templates.js +54 -0
  77. package/dist/core/templates/slash-command-templates.js.map +1 -0
  78. package/dist/index.d.ts +2 -0
  79. package/dist/index.d.ts.map +1 -0
  80. package/dist/index.js +2 -0
  81. package/dist/index.js.map +1 -0
  82. package/docs/product-spec.md +151 -0
  83. package/package.json +50 -0
  84. package/src/cli/index.ts +40 -0
  85. package/src/commands/init.ts +103 -0
  86. package/src/commands/list.ts +84 -0
  87. package/src/commands/update.ts +41 -0
  88. package/src/core/config.ts +43 -0
  89. package/src/core/configurators/slash/antigravity.ts +24 -0
  90. package/src/core/configurators/slash/base.ts +101 -0
  91. package/src/core/configurators/slash/claude.ts +24 -0
  92. package/src/core/configurators/slash/codex.ts +24 -0
  93. package/src/core/configurators/slash/github-copilot.ts +24 -0
  94. package/src/core/configurators/slash/index.ts +8 -0
  95. package/src/core/configurators/slash/kilocode.ts +24 -0
  96. package/src/core/configurators/slash/opencode.ts +24 -0
  97. package/src/core/configurators/slash/registry.ts +45 -0
  98. package/src/core/templates/agents-template.ts +33 -0
  99. package/src/core/templates/index.ts +3 -0
  100. package/src/core/templates/project-template.ts +20 -0
  101. package/src/core/templates/slash-command-templates.ts +58 -0
  102. package/src/index.ts +1 -0
  103. package/tsconfig.json +28 -0
package/AGENTS.md ADDED
@@ -0,0 +1,105 @@
1
+ # AGENTS — Project Knowledge Base
2
+ ## 1. šŸ“ Project Summary
3
+ Prompter CLI is a local-first developer tool that scaffolds and maintains AI workflow prompt templates. It initializes a `prompter/` workspace, generates slash-command templates for multiple AI coding tools, and lists enhanced prompts created by those workflows.
4
+
5
+ ## 2. 🧱 Tech Stack
6
+ - Language: TypeScript (ESM)
7
+ - Runtime: Node.js >= 20
8
+ - CLI Framework: `commander`
9
+ - Interactive Prompts: `@inquirer/prompts`
10
+ - Terminal Output: `chalk`
11
+ - Build: `tsc` via `build.js`
12
+ - Tests: `vitest` (configured, no tests present)
13
+
14
+ ## 3. šŸ—ļø Architecture Overview
15
+ - CLI entrypoint: `bin/prompter.js` → `dist/cli/index.js`.
16
+ - Commands: `init`, `update`, `list` implemented in `src/commands/`.
17
+ - Config and constants in `src/core/config.ts`.
18
+ - Template system in `src/core/templates/`, including slash-command bodies and project templates.
19
+ - Tool-specific workflow generation via configurators in `src/core/configurators/slash/`.
20
+ - Filesystem-only operations; no network or backend components.
21
+
22
+ ## 4. šŸ“ Folder Structure & Important Files
23
+ - `src/cli/index.ts`: CLI command definitions.
24
+ - `src/commands/init.ts`: initialization workflow and tool selection.
25
+ - `src/commands/update.ts`: update workflow files.
26
+ - `src/commands/list.ts`: list enhanced prompts.
27
+ - `src/core/config.ts`: constants, supported tools, prompter directory helpers.
28
+ - `src/core/templates/`: template bodies and markers for workflow files.
29
+ - `src/core/configurators/slash/`: tool-specific file paths and frontmatter.
30
+ - `bin/prompter.js`: production CLI entry.
31
+ - `docs/product-spec.md`: product specification reference.
32
+
33
+ ## 5. šŸ”‘ Core Business Logic & Domain Rules
34
+ - Initialization is idempotent: if `prompter/` exists, `prompter init` exits with a warning.
35
+ - Workflow files include managed markers: `<!-- prompter-managed-start -->` and `<!-- prompter-managed-end -->`.
36
+ - Updates only replace content between markers; missing markers are treated as errors.
37
+ - Enhanced prompts live at `prompter/<slug>/enhanced-prompt.md`.
38
+
39
+ ## 6. šŸ—‚ļø Data Models / Entities
40
+ - `ToolChoice`: tool selection metadata (name, id, availability, label).
41
+ - `EnhancedPrompt`: `{ id, path, createdAt }` derived from filesystem stats.
42
+
43
+ ## 7. 🧠 Domain Vocabulary / Glossary
44
+ - **Prompter**: the CLI tool.
45
+ - **Enhanced Prompt**: AI-generated specification saved to `prompter/<slug>/enhanced-prompt.md`.
46
+ - **Workflow File**: tool-specific slash-command template file.
47
+ - **Markers**: managed section boundaries for safe updates.
48
+
49
+ ## 8. šŸ‘„ Target Users & Personas
50
+ - Developers using AI coding assistants who want standardized prompt workflows.
51
+ - Team leads who need consistent prompt enhancement across repositories.
52
+
53
+ ## 9. ✨ UI/UX Principles
54
+ - Clear CLI output with status icons and colorized feedback.
55
+ - Minimal prompts; optional non-interactive operation via flags.
56
+
57
+ ## 10. šŸ”’ Security / Privacy Rules
58
+ - No authentication or authorization.
59
+ - Local filesystem only; no network calls.
60
+ - Avoid storing sensitive data in prompts unless repository policies allow it.
61
+
62
+ ## 11. šŸ¤– Coding Conventions & Standards
63
+ - ESM imports with explicit `.js` extensions in compiled paths.
64
+ - Strict TypeScript (`tsconfig.json` uses `strict: true`).
65
+ - Prefer small, focused modules and clear command boundaries.
66
+
67
+ ## 12. 🧩 Development Rules for AI Agents (must include rules: never invent endpoints/fields/models, match existing coding style and architecture, modify only necessary parts — never full rewrite, ask before executing risky changes, return diffs/patch format when editing)
68
+ - Never invent endpoints, fields, or models that do not exist in the repository.
69
+ - Match the existing coding style, module boundaries, and architecture.
70
+ - Modify only necessary parts; never do a full rewrite.
71
+ - Ask before executing risky or destructive changes.
72
+ - Return diffs/patch format when editing.
73
+
74
+ ## 13. šŸ—ŗļø Integration Map
75
+ - Supported AI tools and their workflow file paths:
76
+ - Antigravity: `.agent/workflows/prompter-enhance.md`
77
+ - Claude Code: `.claude/commands/prompter/enhance.md`
78
+ - Codex: `.codex/prompts/prompter-enhance.md`
79
+ - GitHub Copilot: `.github/prompts/prompter-enhance.md`
80
+ - OpenCode: `.opencode/prompts/prompter-enhance.md`
81
+ - Kilo Code: `.kilocode/workflows/prompter-enhance.md`
82
+
83
+ ## 14. šŸ—ŗļø Roadmap & Future Plans
84
+ - None documented in the repository.
85
+
86
+ ## 15. āš ļø Known Issues / Limitations
87
+ - No tests present despite vitest configuration.
88
+ - `prompter update` runs across all known tools, not just configured ones.
89
+ - Update requires markers; files missing markers cannot be updated.
90
+
91
+ ## 16. 🧪 Testing Strategy
92
+ - Intended test runner: `vitest` (no test files currently present).
93
+
94
+ ## 17. 🧯 Troubleshooting Guide
95
+ - If `prompter update` fails, verify the workflow file contains the managed markers.
96
+ - If `prompter list` is empty, ensure enhanced prompts exist at `prompter/<slug>/enhanced-prompt.md`.
97
+ - If `prompter init` says already initialized, remove or rename the existing `prompter/` directory only if safe.
98
+
99
+ ## 18. šŸ“ž Ownership / Responsibility Map
100
+ - Not specified; treat as repository owner-maintained.
101
+
102
+ ## ā³ Missing Information Needed
103
+ - Business roadmap, release plans, or milestones.
104
+ - Ownership contacts and support process.
105
+ - Any data retention or compliance requirements.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,66 @@
1
+ # Prompter
2
+
3
+ Enhance prompts directly in your AI coding workflow. Transform rough ideas into polished, professional-grade specifications.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g @prompter/cli
9
+ # or
10
+ pnpm add -g @prompter/cli
11
+ ```
12
+
13
+ ## Quick Start
14
+
15
+ ```bash
16
+ # Initialize Prompter in your project
17
+ cd my-project
18
+ prompter init
19
+
20
+ # Use the workflow in your AI assistant
21
+ /prompter-enhance Create a netflix homepage clone
22
+ ```
23
+
24
+ ## How It Works
25
+
26
+ 1. **Initialize** - Run `prompter init` to set up workflows for your AI tools
27
+ 2. **Enhance** - Use `/prompter-enhance` with a rough idea
28
+ 3. **Review** - Find the enhanced spec in `prompter/<slug>/enhanced-prompt.md`
29
+ 4. **Build** - Use the enhanced specification to guide implementation
30
+
31
+ ## Supported AI Tools
32
+
33
+ - **Antigravity** - `.agent/workflows/prompter-enhance.md`
34
+ - **Claude Code** - `.claude/commands/prompter/enhance.md`
35
+ - **Codex** - `.codex/prompts/prompter-enhance.md`
36
+ - **GitHub Copilot** - `.github/prompts/prompter-enhance.md`
37
+ - **OpenCode** - `.opencode/prompts/prompter-enhance.md`
38
+ - **Kilo Code** - `.kilocode/workflows/prompter-enhance.md`
39
+ - **Universal** - `AGENTS.md` for any AGENTS.md-compatible tool
40
+
41
+ ## Commands
42
+
43
+ ```bash
44
+ prompter init # Initialize Prompter in your project
45
+ prompter update # Update workflow files to latest version
46
+ prompter list # List all enhanced prompts
47
+ prompter list --json # Output as JSON
48
+ ```
49
+
50
+ ## Output Structure
51
+
52
+ ```
53
+ prompter/
54
+ ā”œā”€ā”€ project.md # Project context (edit this!)
55
+ ā”œā”€ā”€ <slug>/
56
+ │ └── enhanced-prompt.md # Enhanced specification
57
+ └── ...
58
+ ```
59
+
60
+ ## Configuration
61
+
62
+ Edit `prompter/project.md` to provide context about your project. This helps the AI assistant generate more relevant enhanced specifications.
63
+
64
+ ## License
65
+
66
+ MIT
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+
3
+ import('../dist/cli/index.js');
package/build.js ADDED
@@ -0,0 +1,20 @@
1
+ import { execSync } from 'child_process';
2
+ import { rmSync, existsSync } from 'fs';
3
+
4
+ console.log('šŸ”Ø Building Prompter...\n');
5
+
6
+ // Clean dist directory
7
+ if (existsSync('dist')) {
8
+ console.log('Cleaning dist directory...');
9
+ rmSync('dist', { recursive: true });
10
+ }
11
+
12
+ // Compile TypeScript
13
+ console.log('Compiling TypeScript...');
14
+ try {
15
+ execSync('npx tsc', { stdio: 'inherit' });
16
+ console.log('\nāœ… Build completed successfully!');
17
+ } catch (error) {
18
+ console.error('\nāŒ Build failed');
19
+ process.exit(1);
20
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,35 @@
1
+ import { Command } from 'commander';
2
+ import { InitCommand } from '../commands/init.js';
3
+ import { UpdateCommand } from '../commands/update.js';
4
+ import { ListCommand } from '../commands/list.js';
5
+ const program = new Command();
6
+ program
7
+ .name('prompter')
8
+ .description('Enhance prompts directly in your AI coding workflow')
9
+ .version('0.1.0');
10
+ program
11
+ .command('init')
12
+ .description('Initialize Prompter in your project')
13
+ .option('--tools <tools...>', 'Specify AI tools to configure (antigravity, claude, codex, github-copilot, opencode, kilocode)')
14
+ .option('--no-interactive', 'Run without interactive prompts')
15
+ .action(async (options) => {
16
+ const initCommand = new InitCommand();
17
+ await initCommand.execute(options);
18
+ });
19
+ program
20
+ .command('update')
21
+ .description('Update Prompter workflow files to latest version')
22
+ .action(async () => {
23
+ const updateCommand = new UpdateCommand();
24
+ await updateCommand.execute();
25
+ });
26
+ program
27
+ .command('list')
28
+ .description('List all enhanced prompts')
29
+ .option('--json', 'Output as JSON')
30
+ .action(async (options) => {
31
+ const listCommand = new ListCommand();
32
+ await listCommand.execute(options);
33
+ });
34
+ program.parse();
35
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,O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itOptions {
2
+ tools?: string[];
3
+ noInteractive?: boolean;
4
+ }
5
+ export declare class InitCommand {
6
+ execute(options?: InitOptions): Promise<void>;
7
+ private fileExists;
8
+ }
9
+ export {};
10
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAQA,UAAU,WAAW;IACjB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,qBAAa,WAAW;IACd,OAAO,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;YAgFzC,UAAU;CAQ3B"}
@@ -0,0 +1,92 @@
1
+ import { promises as fs } from 'fs';
2
+ import path from 'path';
3
+ import chalk from 'chalk';
4
+ import { checkbox } from '@inquirer/prompts';
5
+ import { PROMPTER_DIR, SUPPORTED_TOOLS, PrompterConfig } from '../core/config.js';
6
+ import { projectTemplate, agentsTemplate } from '../core/templates/index.js';
7
+ import { registry } from '../core/configurators/slash/index.js';
8
+ export class InitCommand {
9
+ async execute(options = {}) {
10
+ const projectPath = process.cwd();
11
+ console.log(chalk.blue('\nšŸš€ Initializing Prompter...\n'));
12
+ // Check if already initialized
13
+ if (await PrompterConfig.prompterDirExists(projectPath)) {
14
+ console.log(chalk.yellow('āš ļø Prompter is already initialized in this project.'));
15
+ console.log(chalk.gray(' Use `prompter update` to refresh workflow files.\n'));
16
+ return;
17
+ }
18
+ // Select tools
19
+ let selectedTools = [];
20
+ if (options.tools && options.tools.length > 0) {
21
+ selectedTools = options.tools;
22
+ }
23
+ else if (!options.noInteractive) {
24
+ try {
25
+ selectedTools = await checkbox({
26
+ message: 'Select AI tools to configure:',
27
+ choices: SUPPORTED_TOOLS.map(tool => ({
28
+ name: tool.name,
29
+ value: tool.value,
30
+ checked: tool.value === 'antigravity' // Default check Antigravity
31
+ }))
32
+ });
33
+ }
34
+ catch (error) {
35
+ // User cancelled
36
+ console.log(chalk.yellow('\nInitialization cancelled.'));
37
+ return;
38
+ }
39
+ }
40
+ // Create prompter directory
41
+ const prompterPath = await PrompterConfig.ensurePrompterDir(projectPath);
42
+ console.log(chalk.green('āœ“') + ` Created ${chalk.cyan(PROMPTER_DIR + '/')}`);
43
+ // Create project.md
44
+ const projectMdPath = path.join(prompterPath, 'project.md');
45
+ await fs.writeFile(projectMdPath, projectTemplate, 'utf-8');
46
+ console.log(chalk.green('āœ“') + ` Created ${chalk.cyan(PROMPTER_DIR + '/project.md')}`);
47
+ // Create AGENTS.md for universal support
48
+ const agentsMdPath = path.join(projectPath, 'AGENTS.md');
49
+ const agentsExists = await this.fileExists(agentsMdPath);
50
+ if (!agentsExists) {
51
+ await fs.writeFile(agentsMdPath, agentsTemplate, 'utf-8');
52
+ console.log(chalk.green('āœ“') + ` Created ${chalk.cyan('AGENTS.md')}`);
53
+ }
54
+ else {
55
+ console.log(chalk.gray(' AGENTS.md already exists, skipping'));
56
+ }
57
+ // Generate workflow files for selected tools
58
+ if (selectedTools.length > 0) {
59
+ console.log(chalk.blue('\nšŸ“ Creating workflow files...\n'));
60
+ for (const toolId of selectedTools) {
61
+ const configurator = registry.get(toolId);
62
+ if (configurator) {
63
+ try {
64
+ const files = await configurator.generateAll(projectPath);
65
+ for (const file of files) {
66
+ console.log(chalk.green('āœ“') + ` Created ${chalk.cyan(file)}`);
67
+ }
68
+ }
69
+ catch (error) {
70
+ console.log(chalk.red('āœ—') + ` Failed to create files for ${toolId}: ${error}`);
71
+ }
72
+ }
73
+ }
74
+ }
75
+ // Success message
76
+ console.log(chalk.green('\nāœ… Prompter initialized successfully!\n'));
77
+ console.log(chalk.blue('Next steps:'));
78
+ console.log(chalk.gray(' 1. Edit prompter/project.md to describe your project'));
79
+ console.log(chalk.gray(' 2. Use /prompter-enhance to transform prompts'));
80
+ console.log(chalk.gray(' 3. Run `prompter list` to see enhanced prompts\n'));
81
+ }
82
+ async fileExists(filePath) {
83
+ try {
84
+ await fs.access(filePath);
85
+ return true;
86
+ }
87
+ catch {
88
+ return false;
89
+ }
90
+ }
91
+ }
92
+ //# sourceMappingURL=init.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAOhE,MAAM,OAAO,WAAW;IACpB,KAAK,CAAC,OAAO,CAAC,UAAuB,EAAE;QACnC,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;QAElC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC,CAAC;QAE3D,+BAA+B;QAC/B,IAAI,MAAM,cAAc,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE,CAAC;YACtD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,sDAAsD,CAAC,CAAC,CAAC;YAClF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,uDAAuD,CAAC,CAAC,CAAC;YACjF,OAAO;QACX,CAAC;QAED,eAAe;QACf,IAAI,aAAa,GAAa,EAAE,CAAC;QAEjC,IAAI,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC5C,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC;QA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O,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC,CAAC;QACrE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;QACvC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAC,CAAC;QAClF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,iDAAiD,CAAC,CAAC,CAAC;QAC3E,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,oDAAoD,CAAC,CAAC,CAAC;IAClF,CAAC;IAEO,KAAK,CAAC,UAAU,CAAC,QAAgB;QACrC,IAAI,CAAC;YACD,MAAM,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC1B,OAAO,IAAI,CAAC;QAChB,CAAC;QAAC,MAAM,CAAC;YACL,OAAO,KAAK,CAAC;QACjB,CAAC;IACL,CAAC;CACJ"}
@@ -0,0 +1,9 @@
1
+ interface ListOptions {
2
+ json?: boolean;
3
+ }
4
+ export declare class ListCommand {
5
+ execute(options?: ListOptions): Promise<void>;
6
+ private scanPrompts;
7
+ }
8
+ export {};
9
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"AAKA,UAAU,WAAW;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAQD,qBAAa,WAAW;IACd,OAAO,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;YAuCzC,WAAW;CA4B5B"}
@@ -0,0 +1,65 @@
1
+ import { promises as fs } from 'fs';
2
+ import path from 'path';
3
+ import chalk from 'chalk';
4
+ import { PROMPTER_DIR, PrompterConfig } from '../core/config.js';
5
+ export class ListCommand {
6
+ async execute(options = {}) {
7
+ const projectPath = process.cwd();
8
+ // Check if initialized
9
+ if (!await PrompterConfig.prompterDirExists(projectPath)) {
10
+ if (options.json) {
11
+ console.log(JSON.stringify({ error: 'Prompter not initialized', prompts: [] }));
12
+ }
13
+ else {
14
+ console.log(chalk.red('āŒ Prompter is not initialized in this project.'));
15
+ console.log(chalk.gray(' Run `prompter init` first.\n'));
16
+ }
17
+ process.exitCode = 1;
18
+ return;
19
+ }
20
+ const prompterPath = path.join(projectPath, PROMPTER_DIR);
21
+ const prompts = await this.scanPrompts(prompterPath);
22
+ if (options.json) {
23
+ console.log(JSON.stringify(prompts, null, 2));
24
+ return;
25
+ }
26
+ if (prompts.length === 0) {
27
+ console.log(chalk.yellow('\nšŸ“­ No enhanced prompts found.\n'));
28
+ console.log(chalk.gray('Use /prompter-enhance to create one.\n'));
29
+ return;
30
+ }
31
+ console.log(chalk.blue(`\nšŸ“‹ Enhanced Prompts (${prompts.length}):\n`));
32
+ for (const prompt of prompts) {
33
+ console.log(chalk.green(' •') + ` ${chalk.cyan(prompt.id)}`);
34
+ console.log(chalk.gray(` ${prompt.path}`));
35
+ }
36
+ console.log();
37
+ }
38
+ async scanPrompts(prompterPath) {
39
+ const prompts = [];
40
+ try {
41
+ const entries = await fs.readdir(prompterPath, { withFileTypes: true });
42
+ for (const entry of entries) {
43
+ if (!entry.isDirectory() || entry.name.startsWith('.'))
44
+ continue;
45
+ const enhancedPromptPath = path.join(prompterPath, entry.name, 'enhanced-prompt.md');
46
+ try {
47
+ const stats = await fs.stat(enhancedPromptPath);
48
+ prompts.push({
49
+ id: entry.name,
50
+ path: path.join(PROMPTER_DIR, entry.name, 'enhanced-prompt.md'),
51
+ createdAt: stats.birthtime.toISOString()
52
+ });
53
+ }
54
+ catch {
55
+ // No enhanced-prompt.md in this directory, skip
56
+ }
57
+ }
58
+ }
59
+ catch (error) {
60
+ // Directory doesn't exist or can't be read
61
+ }
62
+ return prompts.sort((a, b) => a.id.localeCompare(b.id));
63
+ }
64
+ }
65
+ //# sourceMappingURL=list.js.map
@@ -0,0 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AC,IAAI,CAAC,kBAAkB,CAAC,CAAC;oBAChD,OAAO,CAAC,IAAI,CAAC;wBACT,EAAE,EAAE,KAAK,CAAC,IAAI;wBACd,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,IAAI,EAAE,oBAAoB,CAAC;wBAC/D,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE;qBAC3C,CAAC,CAAC;gBACP,CAAC;gBAAC,MAAM,CAAC;oBACL,gDAAgD;gBACpD,CAAC;YACL,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,2CAA2C;QAC/C,CAAC;QAED,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC5D,CAAC;CACJ"}
@@ -0,0 +1,4 @@
1
+ export declare class UpdateCommand {
2
+ execute(): Promise<void>;
3
+ }
4
+ //# sourceMappingURL=update.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAIA,qBAAa,aAAa;IAChB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAmCjC"}
@@ -0,0 +1,38 @@
1
+ import chalk from 'chalk';
2
+ import { PrompterConfig } from '../core/config.js';
3
+ import { registry } from '../core/configurators/slash/index.js';
4
+ export class UpdateCommand {
5
+ async execute() {
6
+ const projectPath = process.cwd();
7
+ console.log(chalk.blue('\nšŸ”„ Updating Prompter workflow files...\n'));
8
+ // Check if initialized
9
+ if (!await PrompterConfig.prompterDirExists(projectPath)) {
10
+ console.log(chalk.red('āŒ Prompter is not initialized in this project.'));
11
+ console.log(chalk.gray(' Run `prompter init` first.\n'));
12
+ process.exitCode = 1;
13
+ return;
14
+ }
15
+ let updatedCount = 0;
16
+ // Update workflow files for all tools
17
+ for (const configurator of registry.getAvailable()) {
18
+ try {
19
+ const files = await configurator.updateExisting(projectPath);
20
+ for (const file of files) {
21
+ console.log(chalk.green('āœ“') + ` Updated ${chalk.cyan(file)}`);
22
+ updatedCount++;
23
+ }
24
+ }
25
+ catch (error) {
26
+ console.log(chalk.red('āœ—') + ` Failed to update ${configurator.toolId}: ${error}`);
27
+ }
28
+ }
29
+ if (updatedCount === 0) {
30
+ console.log(chalk.yellow('āš ļø No workflow files found to update.'));
31
+ console.log(chalk.gray(' Run `prompter init` to create them.\n'));
32
+ }
33
+ else {
34
+ console.log(chalk.green(`\nāœ… Updated ${updatedCount} file(s).\n`));
35
+ }
36
+ }
37
+ }
38
+ //# sourceMappingURL=update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.js","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAEhE,MAAM,OAAO,aAAa;IACtB,KAAK,CAAC,OAAO;QACT,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;QAElC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAC,CAAC;QAEtE,uBAAuB;QACvB,IAAI,CAAC,MAAM,cAAc,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE,CAAC;YACvD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,gDAAgD,CAAC,CAAC,CAAC;YACzE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC,CAAC;YAC3D,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;YACrB,OAAO;QACX,CAAC;QAED,IAAI,YAAY,GAAG,CAAC,CAAC;QAErB,sCAAsC;QACtC,KAAK,MAAM,YAAY,IAAI,QAAQ,CAAC,YAAY,EAAE,EAAE,CAAC;YACjD,IAAI,CAAC;gBACD,MAAM,KAAK,GAAG,MAAM,YAAY,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;gBAC7D,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;oBACvB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,YAAY,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;oBAC/D,YAAY,EAAE,CAAC;gBACnB,CAAC;YACL,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,qBAAqB,YAAY,CAAC,MAAM,KAAK,KAAK,EAAE,CAAC,CAAC;YACvF,CAAC;QACL,CAAC;QAED,IAAI,YAAY,KAAK,CAAC,EAAE,CAAC;YACrB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,wCAAwC,CAAC,CAAC,CAAC;YACpE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC,CAAC;QACxE,CAAC;aAAM,CAAC;YACJ,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,eAAe,YAAY,aAAa,CAAC,CAAC,CAAC;QACvE,CAAC;IACL,CAAC;CACJ"}
@@ -0,0 +1,17 @@
1
+ export declare const PROMPTER_DIR = "prompter";
2
+ export declare const PROMPTER_MARKERS: {
3
+ start: string;
4
+ end: string;
5
+ };
6
+ export interface ToolChoice {
7
+ name: string;
8
+ value: string;
9
+ available: boolean;
10
+ successLabel: string;
11
+ }
12
+ export declare const SUPPORTED_TOOLS: ToolChoice[];
13
+ export declare class PrompterConfig {
14
+ static ensurePrompterDir(projectPath: string): Promise<string>;
15
+ static prompterDirExists(projectPath: string): Promise<boolean>;
16
+ }
17
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,aAAa,CAAC;AAEvC,eAAO,MAAM,gBAAgB;;;CAG5B,CAAC;AAEF,MAAM,WAAW,UAAU;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,eAAe,EAAE,UAAU,EAOvC,CAAC;AAEF,qBAAa,cAAc;WACV,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;WAMvD,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CASxE"}
@@ -0,0 +1,33 @@
1
+ import { promises as fs } from 'fs';
2
+ import path from 'path';
3
+ export const PROMPTER_DIR = 'prompter';
4
+ export const PROMPTER_MARKERS = {
5
+ start: '<!-- prompter-managed-start -->',
6
+ end: '<!-- prompter-managed-end -->'
7
+ };
8
+ export const SUPPORTED_TOOLS = [
9
+ { name: 'Antigravity', value: 'antigravity', available: true, successLabel: 'Antigravity' },
10
+ { name: 'Claude Code', value: 'claude', available: true, successLabel: 'Claude Code' },
11
+ { name: 'Codex', value: 'codex', available: true, successLabel: 'Codex' },
12
+ { name: 'GitHub Copilot', value: 'github-copilot', available: true, successLabel: 'GitHub Copilot' },
13
+ { name: 'OpenCode', value: 'opencode', available: true, successLabel: 'OpenCode' },
14
+ { name: 'Kilo Code', value: 'kilocode', available: true, successLabel: 'Kilo Code' }
15
+ ];
16
+ export class PrompterConfig {
17
+ static async ensurePrompterDir(projectPath) {
18
+ const prompterPath = path.join(projectPath, PROMPTER_DIR);
19
+ await fs.mkdir(prompterPath, { recursive: true });
20
+ return prompterPath;
21
+ }
22
+ static async prompterDirExists(projectPath) {
23
+ try {
24
+ const prompterPath = path.join(projectPath, PROMPTER_DIR);
25
+ await fs.access(prompterPath);
26
+ return true;
27
+ }
28
+ catch {
29
+ return false;
30
+ }
31
+ }
32
+ }
33
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC;AAEvC,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,KAAK,EAAE,iCAAiC;IACxC,GAAG,EAAE,+BAA+B;CACvC,CAAC;AASF,MAAM,CAAC,MAAM,eAAe,GAAiB;IACzC,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,aAAa,EAAE;IAC3F,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,aAAa,EAAE;IACtF,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE;IACzE,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,gBAAgB,EAAE;IACpG,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE;IAClF,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE;CACvF,CAAC;AAEF,MAAM,OAAO,cAAc;IACvB,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC,WAAmB;QAC9C,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;QAC1D,MAAM,EAAE,CAAC,KAAK,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAClD,OAAO,YAAY,CAAC;IACxB,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC,WAAmB;QAC9C,IAAI,CAAC;YACD,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;YAC1D,MAAM,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;YAC9B,OAAO,IAAI,CAAC;QAChB,CAAC;QAAC,MAAM,CAAC;YACL,OAAO,KAAK,CAAC;QACjB,CAAC;IACL,CAAC;CACJ"}
@@ -0,0 +1,9 @@
1
+ import { SlashCommandConfigurator } from './base.js';
2
+ import { SlashCommandId } from '../../templates/index.js';
3
+ export declare class AntigravityConfigurator extends SlashCommandConfigurator {
4
+ readonly toolId = "antigravity";
5
+ readonly isAvailable = true;
6
+ protected getRelativePath(id: SlashCommandId): string;
7
+ protected getFrontmatter(id: SlashCommandId): string | undefined;
8
+ }
9
+ //# sourceMappingURL=antigravity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"antigravity.d.ts","sourceRoot":"","sources":["../../../../src/core/configurators/slash/antigravity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAU1D,qBAAa,uBAAwB,SAAQ,wBAAwB;IACjE,QAAQ,CAAC,MAAM,iBAAiB;IAChC,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: '.agent/workflows/prompter-enhance.md'
4
+ };
5
+ const DESCRIPTIONS = {
6
+ enhance: 'Enhance a rough prompt into a professional specification'
7
+ };
8
+ export class AntigravityConfigurator extends SlashCommandConfigurator {
9
+ toolId = 'antigravity';
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=antigravity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"antigravity.js","sourceRoot":"","sources":["../../../../src/core/configurators/slash/antigravity.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,uBAAwB,SAAQ,wBAAwB;IACxD,MAAM,GAAG,aAAa,CAAC;IACvB,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"}