@dedesfr/prompter 0.8.8 β 0.8.9
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/CHANGELOG.md +23 -0
- package/dist/cli/index.js +1 -1
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +57 -5
- package/dist/commands/init.js.map +1 -1
- package/package.json +1 -1
- package/skills/doc-builder/SKILL.md +115 -0
- package/skills/doc-builder/references/ui-patterns.md +394 -0
- package/skills/document-translator/SKILL.md +58 -0
- package/skills/gamma-builder/SKILL.md +134 -0
- package/skills/ui-ux-pro/SKILL.md +224 -233
- package/src/cli/index.ts +1 -1
- package/src/commands/init.ts +63 -5
- package/docs/product-spec.md +0 -151
- package/docs/tasks.md +0 -3
package/src/commands/init.ts
CHANGED
|
@@ -70,6 +70,67 @@ export class InitCommand {
|
|
|
70
70
|
return choices;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
private getCategorizedSkillChoices(availableSkills: SkillMetadata[], currentSkillNames: string[]): any[] {
|
|
74
|
+
const categories = [
|
|
75
|
+
{
|
|
76
|
+
name: 'π Planning & Strategy',
|
|
77
|
+
skills: ['project-orchestrator', 'feature-planner', 'prompter-workflow', 'prompter-specs']
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'π¨ Design & UI/UX',
|
|
81
|
+
skills: ['ui-ux-pro', 'design-system-generator', 'design-md']
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: 'βοΈ Development & Code Review',
|
|
85
|
+
skills: ['code-review', 'laravel-code-review', 'mcp-builder']
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: 'π Documentation',
|
|
89
|
+
skills: ['doc-builder', 'document-translator', 'agents-md-generator', 'meeting-notes']
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: 'β¨ Content & Productivity',
|
|
93
|
+
skills: ['gamma-builder', 'enhance-prompt']
|
|
94
|
+
}
|
|
95
|
+
];
|
|
96
|
+
|
|
97
|
+
const categorized = new Set<string>();
|
|
98
|
+
const choices: any[] = [];
|
|
99
|
+
|
|
100
|
+
for (const category of categories) {
|
|
101
|
+
const skillsInCategory = category.skills
|
|
102
|
+
.map(name => availableSkills.find(s => s.name === name))
|
|
103
|
+
.filter((s): s is SkillMetadata => !!s);
|
|
104
|
+
|
|
105
|
+
if (skillsInCategory.length === 0) continue;
|
|
106
|
+
|
|
107
|
+
choices.push(new Separator(chalk.bold.cyan(category.name)));
|
|
108
|
+
for (const skill of skillsInCategory) {
|
|
109
|
+
categorized.add(skill.name);
|
|
110
|
+
choices.push({
|
|
111
|
+
name: ` ${skill.name}`,
|
|
112
|
+
value: skill.name,
|
|
113
|
+
checked: currentSkillNames.includes(skill.name)
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Uncategorized skills
|
|
119
|
+
const uncategorized = availableSkills.filter(s => !categorized.has(s.name));
|
|
120
|
+
if (uncategorized.length > 0) {
|
|
121
|
+
choices.push(new Separator(chalk.bold.cyan('π§ Other')));
|
|
122
|
+
for (const skill of uncategorized) {
|
|
123
|
+
choices.push({
|
|
124
|
+
name: ` ${skill.name}`,
|
|
125
|
+
value: skill.name,
|
|
126
|
+
checked: currentSkillNames.includes(skill.name)
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return choices;
|
|
132
|
+
}
|
|
133
|
+
|
|
73
134
|
async execute(options: InitOptions = {}): Promise<void> {
|
|
74
135
|
const projectPath = process.cwd();
|
|
75
136
|
const isReInitialization = await PrompterConfig.prompterDirExists(projectPath);
|
|
@@ -177,11 +238,8 @@ export class InitCommand {
|
|
|
177
238
|
|
|
178
239
|
const selectedSkillNames = await checkbox({
|
|
179
240
|
message: 'Select skills to install:',
|
|
180
|
-
choices:
|
|
181
|
-
|
|
182
|
-
value: skill.name,
|
|
183
|
-
checked: currentSkillNames.includes(skill.name)
|
|
184
|
-
}))
|
|
241
|
+
choices: this.getCategorizedSkillChoices(availableSkills, currentSkillNames),
|
|
242
|
+
pageSize: 20
|
|
185
243
|
});
|
|
186
244
|
selectedSkills = availableSkills.filter(s => selectedSkillNames.includes(s.name));
|
|
187
245
|
} catch (error) {
|
package/docs/product-spec.md
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
Product Specification Document
|
|
2
|
-
|
|
3
|
-
### 1. Executive Summary
|
|
4
|
-
- Product name and tagline: **Prompter CLI** β βEnhance prompts directly in your AI coding workflow.β
|
|
5
|
-
- Core value proposition: Turn rough ideas into **structured, professional prompt specifications** and install tool-specific slash-command workflows in local repos.
|
|
6
|
-
- Primary target users: Developers/teams using AI coding assistants who want standardized prompt enhancement workflows.
|
|
7
|
-
- Key differentiators: **Multi-tool workflow generation**, **local-first** (filesystem-only), and **managed template updates** using embedded markers.
|
|
8
|
-
|
|
9
|
-
### 2. Product Overview
|
|
10
|
-
- **Problem Statement:** AI prompt quality is inconsistent; teams need a repeatable way to transform rough ideas into high-quality specs and make them available as slash commands in their tools.
|
|
11
|
-
- **Solution:** A CLI that initializes a project with Prompter context, generates slash-command workflow files for supported AI tools, and helps list enhanced prompts.
|
|
12
|
-
- **Success Metrics:**
|
|
13
|
-
- Successful initialization rate (`prompter init` completes).
|
|
14
|
-
- Number of workflow files created/updated.
|
|
15
|
-
- Number of enhanced prompts listed (`prompter list` output count).
|
|
16
|
-
- **Scope:**
|
|
17
|
-
- **Included:** CLI commands (`init`, `update`, `list`), file templates for workflows, project context file, and detection of enhanced prompts.
|
|
18
|
-
- **Excluded:** Actual prompt enhancement execution (done by the AI tool), remote services, authentication, telemetry.
|
|
19
|
-
|
|
20
|
-
### 3. User Personas
|
|
21
|
-
- **Primary: AI-Enabled Developer**
|
|
22
|
-
- Goals: Quickly bootstrap AI prompt workflows; keep workflows up to date.
|
|
23
|
-
- Pain points: Inconsistent prompt specs; manual setup across tools.
|
|
24
|
-
- **Secondary: Team Lead/Architect**
|
|
25
|
-
- Goals: Standardize AI prompt practices across team repos.
|
|
26
|
-
- Pain points: Tool fragmentation and drift in prompt instructions.
|
|
27
|
-
- **Use Case Scenarios:**
|
|
28
|
-
- New repo bootstrap β run `prompter init` to scaffold workflows.
|
|
29
|
-
- Existing repo update β run `prompter update` to refresh managed sections.
|
|
30
|
-
- Review prompt history β run `prompter list` to see enhanced specs.
|
|
31
|
-
|
|
32
|
-
### 4. Feature Specifications
|
|
33
|
-
|
|
34
|
-
**Feature Name:** CLI Initialization
|
|
35
|
-
- **Description:** Creates `prompter/` directory, `prompter/project.md`, optional `AGENTS.md`, and tool-specific workflow files.
|
|
36
|
-
- **User Flow:**
|
|
37
|
-
1. User runs `prompter init`.
|
|
38
|
-
2. CLI checks if `prompter/` exists; if so, exits with warning.
|
|
39
|
-
3. User selects tools (interactive checkbox) or passes `--tools`.
|
|
40
|
-
4. CLI writes templates and workflow files.
|
|
41
|
-
5. CLI prints next steps.
|
|
42
|
-
- **Acceptance Criteria:**
|
|
43
|
-
- `prompter/` directory created with `project.md`.
|
|
44
|
-
- `AGENTS.md` created only if missing.
|
|
45
|
-
- Tool workflow files created under tool-specific paths.
|
|
46
|
-
- Success message printed.
|
|
47
|
-
- **Priority:** Critical
|
|
48
|
-
- **Dependencies:** `src/commands/init.ts`, `src/core/config.ts`, templates in `src/core/templates/*`, configurators in `src/core/configurators/slash/*`.
|
|
49
|
-
|
|
50
|
-
**Feature Name:** Workflow Update
|
|
51
|
-
- **Description:** Updates managed template sections in existing workflow files for all supported tools.
|
|
52
|
-
- **User Flow:**
|
|
53
|
-
1. User runs `prompter update`.
|
|
54
|
-
2. CLI checks for `prompter/`; if missing, exits with error.
|
|
55
|
-
3. For each tool configurator, updates files containing managed markers.
|
|
56
|
-
4. Outputs updated count.
|
|
57
|
-
- **Acceptance Criteria:**
|
|
58
|
-
- If `prompter/` absent, prints error and sets exit code.
|
|
59
|
-
- If managed markers missing, logs failure for that file.
|
|
60
|
-
- Updates only managed section between markers.
|
|
61
|
-
- **Priority:** High
|
|
62
|
-
- **Dependencies:** `src/commands/update.ts`, `src/core/configurators/slash/base.ts`, `src/core/config.ts`.
|
|
63
|
-
|
|
64
|
-
**Feature Name:** Enhanced Prompt Listing
|
|
65
|
-
- **Description:** Lists existing enhanced prompts under `prompter/<slug>/enhanced-prompt.md`.
|
|
66
|
-
- **User Flow:**
|
|
67
|
-
1. User runs `prompter list` (or `--json`).
|
|
68
|
-
2. CLI scans `prompter/` for directories containing `enhanced-prompt.md`.
|
|
69
|
-
3. Outputs list and optional JSON structure.
|
|
70
|
-
- **Acceptance Criteria:**
|
|
71
|
-
- JSON output when `--json` used.
|
|
72
|
-
- Empty state messaging when no prompts found.
|
|
73
|
-
- Sorted list by slug.
|
|
74
|
-
- **Priority:** Medium
|
|
75
|
-
- **Dependencies:** `src/commands/list.ts`, `src/core/config.ts`.
|
|
76
|
-
|
|
77
|
-
**Feature Name:** Tool-Specific Workflow Generation
|
|
78
|
-
- **Description:** Creates or updates slash-command files for supported AI tools.
|
|
79
|
-
- **User Flow:**
|
|
80
|
-
1. CLI picks tool configurator based on user selection.
|
|
81
|
-
2. Writes file with frontmatter (if applicable) and managed markers.
|
|
82
|
-
- **Acceptance Criteria:**
|
|
83
|
-
- Files created under correct tool paths.
|
|
84
|
-
- Body contains managed markers from `PROMPTER_MARKERS`.
|
|
85
|
-
- **Priority:** High
|
|
86
|
-
- **Dependencies:** `src/core/configurators/slash/*`, `src/core/templates/slash-command-templates.ts`.
|
|
87
|
-
|
|
88
|
-
### 5. Technical Architecture
|
|
89
|
-
- **System Overview:** Local CLI that reads/writes repository files and generates prompt templates. No server-side components.
|
|
90
|
-
- **Technology Stack:**
|
|
91
|
-
- **Language:** TypeScript β compiled to Node.js ES Modules (`src/` β `dist/`).
|
|
92
|
-
- **Runtime:** Node.js >= 20 (`package.json`).
|
|
93
|
-
- **Libraries:** `commander`, `@inquirer/prompts`, `chalk`.
|
|
94
|
-
- **Data Models:**
|
|
95
|
-
- `EnhancedPrompt` (in-memory): `{ id, path, createdAt }` in `src/commands/list.ts`.
|
|
96
|
-
- `ToolChoice` and `SUPPORTED_TOOLS` in `src/core/config.ts`.
|
|
97
|
-
- **APIs & Integrations:** No network APIs. Integrates with tool-specific file conventions.
|
|
98
|
-
- **Infrastructure:** Local filesystem only. CLI entry is `bin/prompter.js` which loads `dist/cli/index.js`.
|
|
99
|
-
|
|
100
|
-
**Architecture Diagram (Mermaid):**
|
|
101
|
-
```mermaid
|
|
102
|
-
flowchart TD
|
|
103
|
-
CLI[prompter CLI] -->|init| FS[(Local Filesystem)]
|
|
104
|
-
CLI -->|update| FS
|
|
105
|
-
CLI -->|list| FS
|
|
106
|
-
FS -->|workflow files| Tools[AI Tools: Claude/Codex/etc.]
|
|
107
|
-
Templates[Templates] --> CLI
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### 6. Non-Functional Requirements
|
|
111
|
-
- **Performance:** Fast file IO; scans only `prompter/` directory.
|
|
112
|
-
- **Security:** No authentication; operates on local filesystem; no data transmission.
|
|
113
|
-
- **Scalability:** Handles many prompt folders; linear scan in `prompter/`.
|
|
114
|
-
- **Reliability:** Uses guarded checks for existing directories; safe updates via marker boundaries.
|
|
115
|
-
- **Compliance:** None specified. β οΈ ASSUMPTION: Local-only operation minimizes compliance needs.
|
|
116
|
-
|
|
117
|
-
### 7. User Interface Specifications
|
|
118
|
-
- **Navigation Structure:** CLI commands:
|
|
119
|
-
- `prompter init`
|
|
120
|
-
- `prompter update`
|
|
121
|
-
- `prompter list`
|
|
122
|
-
- **Key Screens/Pages:** Terminal output with colored status messages (`chalk`).
|
|
123
|
-
- **Design Patterns:**
|
|
124
|
-
- Interactive selection via checkbox prompt.
|
|
125
|
-
- Managed template sections via markers: `<!-- prompter-managed-start -->` and `<!-- prompter-managed-end -->`.
|
|
126
|
-
- **Responsive Behavior:** N/A (CLI).
|
|
127
|
-
|
|
128
|
-
### 8. Integration Requirements
|
|
129
|
-
- **Third-Party Services:** None.
|
|
130
|
-
- **APIs Consumed:** None.
|
|
131
|
-
- **APIs Provided:** CLI commands only.
|
|
132
|
-
- **Webhooks/Events:** None.
|
|
133
|
-
|
|
134
|
-
### 9. Data Specifications
|
|
135
|
-
- **Data Models:**
|
|
136
|
-
- `prompter/project.md` β project context template.
|
|
137
|
-
- Workflow files per tool, e.g., `.codex/prompts/prompter-enhance.md`.
|
|
138
|
-
- **Data Flow:** User input β CLI templates β filesystem output β AI tool reads workflow file.
|
|
139
|
-
- **Storage Requirements:** Low; markdown text files only.
|
|
140
|
-
- **Data Privacy:** No PII processing; files are local. β οΈ ASSUMPTION: Enhanced prompts may include sensitive text, handled by repo policies.
|
|
141
|
-
|
|
142
|
-
### 10. Current Limitations & Technical Debt
|
|
143
|
-
- No validation of `--tools` inputs; invalid tool IDs are ignored silently (no error path in `src/commands/init.ts`).
|
|
144
|
-
- `prompter update` updates all known tools, even if not used in the project.
|
|
145
|
-
- No tests present (no `test/` files found).
|
|
146
|
-
- Update requires markers; files without them error (`src/core/configurators/slash/base.ts`).
|
|
147
|
-
|
|
148
|
-
### 11. Assumptions & Inferences
|
|
149
|
-
- β οΈ ASSUMPTION: Prompter is intended to be used as a **global CLI** (`npm install -g`), inferred from README and `package.json` `bin` mapping.
|
|
150
|
-
- β οΈ ASSUMPTION: Enhanced prompts are generated by the AI assistant following the workflow, not by this CLI.
|
|
151
|
-
- β οΈ ASSUMPTION: Users will maintain versioned workflow files in their repos and accept managed updates.
|
package/docs/tasks.md
DELETED