ai-prompt-framework-helper 1.1.0 → 1.2.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/README.md +4 -3
- package/ai-prompt.js +34 -12
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# AI Prompt Framework Helper — CLI
|
|
2
2
|
|
|
3
|
-
> Interactive terminal assistant to build structured AI prompts using **APE**, **CO-STAR**, **RISEN** and **
|
|
3
|
+
> Interactive terminal assistant to build structured AI prompts using **APE**, **CO-STAR**, **RISEN**, **RTCCF** and **PRISM** frameworks. Works with any AI CLI — Claude, Gemini, llm, aichat, and more.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/ai-prompt-framework-helper)
|
|
6
6
|
[](./LICENSE)
|
|
@@ -54,6 +54,7 @@ ai-prompt | llm
|
|
|
54
54
|
| **CO-STAR** | Context · Objective · Style · Tone · Audience · Response | Copy, emails, content |
|
|
55
55
|
| **RISEN** | Role · Instructions · Steps · End Goal · Narrowing | Workflows, plans, execution |
|
|
56
56
|
| **RTCCF** | Role · Task · Context · Constraints · Format | Full project kickstart |
|
|
57
|
+
| **PRISM** | Purpose · Role · Input · Steps · Method | Analysis & data processing |
|
|
57
58
|
|
|
58
59
|
---
|
|
59
60
|
|
|
@@ -61,7 +62,7 @@ ai-prompt | llm
|
|
|
61
62
|
|
|
62
63
|
```
|
|
63
64
|
⬡ AI Prompt Framework Helper · CLI
|
|
64
|
-
by Marcos Castro ·
|
|
65
|
+
by Marcos Castro · github.com/marcoscv-work
|
|
65
66
|
|
|
66
67
|
✓ Detected AI CLIs: claude gemini
|
|
67
68
|
|
|
@@ -125,6 +126,6 @@ Use the same frameworks directly from any text field in your browser — ChatGPT
|
|
|
125
126
|
|
|
126
127
|
## Author
|
|
127
128
|
|
|
128
|
-
**Marcos Castro** · [
|
|
129
|
+
**Marcos Castro** · [github.com/marcoscv-work](https://github.com/marcoscv-work) · [marcoscv@gmail.com](mailto:marcoscv@gmail.com)
|
|
129
130
|
|
|
130
131
|
MIT License
|
package/ai-prompt.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
// ─── AI Prompt Framework Helper — CLI ────────────────────────────────────────
|
|
5
|
-
// Author : Marcos Castro · https://
|
|
5
|
+
// Author : Marcos Castro · https://github.com/marcoscv-work
|
|
6
6
|
// No external dependencies — requires only Node.js ≥ 16
|
|
7
7
|
// Usage : ai-prompt (interactive, select framework)
|
|
8
8
|
// ai-prompt ape (jump straight to APE)
|
|
@@ -118,6 +118,26 @@ const FRAMEWORKS = [
|
|
|
118
118
|
['F – Format', f.format],
|
|
119
119
|
].filter(([, v]) => v).map(([k, v]) => `${k}: ${v}`).join('\n\n'),
|
|
120
120
|
},
|
|
121
|
+
{
|
|
122
|
+
key: 'PRISM',
|
|
123
|
+
color: 'red',
|
|
124
|
+
fullName: 'Purpose · Role · Input · Steps · Method',
|
|
125
|
+
tip: 'Best when feeding content to the model: documents, data, feedback, code.',
|
|
126
|
+
fields: [
|
|
127
|
+
{ id: 'purpose', letter: 'P', label: 'Purpose', hint: 'What do you want to achieve with this analysis?', required: true },
|
|
128
|
+
{ id: 'role', letter: 'R', label: 'Role', hint: 'What role or expertise should the AI embody?', required: true },
|
|
129
|
+
{ id: 'input', letter: 'I', label: 'Input', hint: 'What data or content are you providing?', required: true },
|
|
130
|
+
{ id: 'steps', letter: 'S', label: 'Steps', hint: 'How should the model process the input? (optional)', required: false },
|
|
131
|
+
{ id: 'method', letter: 'M', label: 'Method', hint: 'How should the output be structured?', required: false },
|
|
132
|
+
],
|
|
133
|
+
build: (f) => [
|
|
134
|
+
['P – Purpose', f.purpose],
|
|
135
|
+
['R – Role', f.role],
|
|
136
|
+
['I – Input', f.input],
|
|
137
|
+
['S – Steps', f.steps],
|
|
138
|
+
['M – Method', f.method],
|
|
139
|
+
].filter(([, v]) => v).map(([k, v]) => `${k}: ${v}`).join('\n\n'),
|
|
140
|
+
},
|
|
121
141
|
];
|
|
122
142
|
|
|
123
143
|
// ─── Argument → framework resolver ───────────────────────────────────────────
|
|
@@ -127,6 +147,7 @@ const FW_ALIASES = {
|
|
|
127
147
|
'costar': 1, 'co-star': 1, 'co_star': 1,
|
|
128
148
|
'risen': 2,
|
|
129
149
|
'rtccf': 3,
|
|
150
|
+
'prism': 4,
|
|
130
151
|
};
|
|
131
152
|
|
|
132
153
|
function resolveFrameworkArg(arg) {
|
|
@@ -168,16 +189,17 @@ function box(lines, color = 'cyan') {
|
|
|
168
189
|
}
|
|
169
190
|
|
|
170
191
|
function header() {
|
|
171
|
-
const
|
|
172
|
-
|
|
173
|
-
'
|
|
174
|
-
'
|
|
175
|
-
'
|
|
176
|
-
'
|
|
177
|
-
'
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
192
|
+
const sep = co('gray', '─'.repeat(62));
|
|
193
|
+
console.log([
|
|
194
|
+
'',
|
|
195
|
+
' ' + sep,
|
|
196
|
+
' ' + co('magenta', ' _ ___') + ' ' + b('Prompt Framework Helper') + ' · CLI',
|
|
197
|
+
' ' + co('magenta', ' /_\\ |_ _|'),
|
|
198
|
+
' ' + co('magenta', ' / _ \\ | |') + ' ' + d('APE · CO-STAR · RISEN · RTCCF · PRISM'),
|
|
199
|
+
' ' + co('magenta', '/_/ \\_|___|') + ' ' + d('by Marcos Castro · github.com/marcoscv-work'),
|
|
200
|
+
' ' + sep,
|
|
201
|
+
'',
|
|
202
|
+
].join('\n'));
|
|
181
203
|
}
|
|
182
204
|
|
|
183
205
|
function sectionHeader(fw) {
|
|
@@ -383,7 +405,7 @@ async function main() {
|
|
|
383
405
|
fw = resolveFrameworkArg(arg);
|
|
384
406
|
if (!fw) {
|
|
385
407
|
console.error(co('red', ` Unknown framework: "${arg}"`));
|
|
386
|
-
console.error(d(' Valid options: ape · co-star · risen · rtccf\n'));
|
|
408
|
+
console.error(d(' Valid options: ape · co-star · risen · rtccf · prism\n'));
|
|
387
409
|
rl.close();
|
|
388
410
|
process.exit(1);
|
|
389
411
|
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-prompt-framework-helper",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Interactive CLI to build structured AI prompts using APE, CO-STAR, RISEN and
|
|
5
|
-
"author": "Marcos Castro <marcoscv@gmail.com> (https://
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"description": "Interactive CLI to build structured AI prompts using APE, CO-STAR, RISEN, RTCCF and PRISM frameworks. Works with Claude, Gemini, and any AI CLI.",
|
|
5
|
+
"author": "Marcos Castro <marcoscv@gmail.com> (https://github.com/marcoscv-work)",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/marcoscv-work/AI-Prompt-Framework-Helper#readme",
|
|
8
8
|
"repository": {
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"co-star",
|
|
36
36
|
"risen",
|
|
37
37
|
"rtccf",
|
|
38
|
+
"prism",
|
|
38
39
|
"claude",
|
|
39
40
|
"gemini",
|
|
40
41
|
"chatgpt",
|