elliot-stack 1.0.16 → 1.0.18
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 +6 -0
- package/bin/install.cjs +203 -9
- package/hooks/repo-search-nudge.js +31 -0
- package/package.json +3 -2
- package/skills/estack-prompt-builder-coach/SKILL.md +80 -0
- package/skills/estack-prompt-builder-coach/definition-of-done-generator.md +42 -0
- package/skills/estack-prompt-builder-coach/examples.md +101 -0
- package/skills/estack-prompt-builder-coach/prompt-builder.md +37 -0
- package/skills/estack-prompt-builder-coach/task-shaper.md +36 -0
- package/skills/estack-prompt-builder-coach/vague-ask-auditor.md +37 -0
- package/skills/estack-repo-search/SKILL.md +0 -65
package/README.md
CHANGED
|
@@ -52,6 +52,12 @@ npx elliot-stack@latest
|
|
|
52
52
|
- [Claude Code](https://claude.ai/code) CLI installed
|
|
53
53
|
- Node.js 18+
|
|
54
54
|
|
|
55
|
+
## Contributing
|
|
56
|
+
|
|
57
|
+
External contributions are welcome via pull request. Direct pushes to `main` are blocked — fork the repo, push your changes to a branch, and open a PR. Only the maintainer (Elliot) can merge to `main` and cut releases. This is intentional: `elliot-stack` is a security-sensitive npm package and the release tag can only be pushed by the maintainer.
|
|
58
|
+
|
|
59
|
+
See [`docs/publishing.md`](docs/publishing.md) for the release flow and security model.
|
|
60
|
+
|
|
55
61
|
## License
|
|
56
62
|
|
|
57
63
|
MIT
|
package/bin/install.cjs
CHANGED
|
@@ -15,6 +15,8 @@ const BACKUP_DIR = path.join(CLAUDE_DIR, '.estack-backup');
|
|
|
15
15
|
const CHECKSUMS_FILE = path.join(CLAUDE_DIR, '.estack-checksums.json');
|
|
16
16
|
const SETTINGS_FILE = path.join(CLAUDE_DIR, 'settings.json');
|
|
17
17
|
const PACKAGE_SKILLS_DIR = path.join(__dirname, '..', 'skills');
|
|
18
|
+
const HOOKS_DIR = path.join(CLAUDE_DIR, 'hooks');
|
|
19
|
+
const PACKAGE_HOOKS_DIR = path.join(__dirname, '..', 'hooks');
|
|
18
20
|
|
|
19
21
|
// ── Flags ──────────────────────────────────────────────────────────────────
|
|
20
22
|
const SILENT = process.argv.includes('--silent');
|
|
@@ -39,6 +41,13 @@ function walkDir(dir, base) {
|
|
|
39
41
|
return files;
|
|
40
42
|
}
|
|
41
43
|
|
|
44
|
+
function computeFileHash(filePath) {
|
|
45
|
+
if (!fs.existsSync(filePath)) return null;
|
|
46
|
+
const hash = crypto.createHash('sha256');
|
|
47
|
+
hash.update(fs.readFileSync(filePath));
|
|
48
|
+
return hash.digest('hex');
|
|
49
|
+
}
|
|
50
|
+
|
|
42
51
|
function computeSkillHash(skillDir) {
|
|
43
52
|
if (!fs.existsSync(skillDir)) return null;
|
|
44
53
|
const hash = crypto.createHash('sha256');
|
|
@@ -66,6 +75,14 @@ function backupSkill(name) {
|
|
|
66
75
|
copyDir(installedDir, path.join(BACKUP_DIR, name));
|
|
67
76
|
}
|
|
68
77
|
|
|
78
|
+
function backupHook(filename) {
|
|
79
|
+
const installedFile = path.join(HOOKS_DIR, filename);
|
|
80
|
+
if (!fs.existsSync(installedFile)) return;
|
|
81
|
+
const dest = path.join(BACKUP_DIR, 'hooks', filename);
|
|
82
|
+
fs.mkdirSync(path.dirname(dest), { recursive: true });
|
|
83
|
+
fs.copyFileSync(installedFile, dest);
|
|
84
|
+
}
|
|
85
|
+
|
|
69
86
|
function promptChar(question) {
|
|
70
87
|
if (!process.stdin.isTTY) {
|
|
71
88
|
// Non-interactive environment — read a line from piped stdin
|
|
@@ -118,7 +135,7 @@ function getSkillDescription(skillDir) {
|
|
|
118
135
|
return '';
|
|
119
136
|
}
|
|
120
137
|
|
|
121
|
-
// ──
|
|
138
|
+
// ── Hook setup ─────────────────────────────────────────────────────────────
|
|
122
139
|
|
|
123
140
|
function setupStartupHook() {
|
|
124
141
|
let settings = {};
|
|
@@ -164,6 +181,45 @@ function setupStartupHook() {
|
|
|
164
181
|
return true;
|
|
165
182
|
}
|
|
166
183
|
|
|
184
|
+
function setupRepoSearchNudgeHook() {
|
|
185
|
+
let settings = {};
|
|
186
|
+
if (fs.existsSync(SETTINGS_FILE)) {
|
|
187
|
+
try {
|
|
188
|
+
settings = JSON.parse(fs.readFileSync(SETTINGS_FILE, 'utf8'));
|
|
189
|
+
} catch (_) {
|
|
190
|
+
settings = {};
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
if (settings.hooks && settings.hooks.PostToolUse) {
|
|
195
|
+
for (const group of settings.hooks.PostToolUse) {
|
|
196
|
+
if (group.matcher === 'WebFetch|WebSearch' && group.hooks) {
|
|
197
|
+
for (const hook of group.hooks) {
|
|
198
|
+
if (hook.command && hook.command.includes('repo-search-nudge.js')) {
|
|
199
|
+
return false;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
if (!settings.hooks) settings.hooks = {};
|
|
207
|
+
if (!settings.hooks.PostToolUse) settings.hooks.PostToolUse = [];
|
|
208
|
+
|
|
209
|
+
settings.hooks.PostToolUse.push({
|
|
210
|
+
matcher: 'WebFetch|WebSearch',
|
|
211
|
+
hooks: [{
|
|
212
|
+
type: 'command',
|
|
213
|
+
command: `node "${path.join(HOOKS_DIR, 'repo-search-nudge.js').replace(/\\/g, '/')}"`,
|
|
214
|
+
timeout: 5,
|
|
215
|
+
}],
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
fs.mkdirSync(CLAUDE_DIR, { recursive: true });
|
|
219
|
+
fs.writeFileSync(SETTINGS_FILE, JSON.stringify(settings, null, 2));
|
|
220
|
+
return true;
|
|
221
|
+
}
|
|
222
|
+
|
|
167
223
|
// ── Main ────────────────────────────────────────────────────────────────────
|
|
168
224
|
|
|
169
225
|
async function main() {
|
|
@@ -191,6 +247,16 @@ async function main() {
|
|
|
191
247
|
packageHashes[name] = computeSkillHash(path.join(PACKAGE_SKILLS_DIR, name));
|
|
192
248
|
}
|
|
193
249
|
|
|
250
|
+
// 2b. Scan package hooks
|
|
251
|
+
const hookFilenames = fs.existsSync(PACKAGE_HOOKS_DIR)
|
|
252
|
+
? fs.readdirSync(PACKAGE_HOOKS_DIR).filter((f) => f.endsWith('.js')).sort()
|
|
253
|
+
: [];
|
|
254
|
+
|
|
255
|
+
const packageHookHashes = {};
|
|
256
|
+
for (const filename of hookFilenames) {
|
|
257
|
+
packageHookHashes[filename] = computeFileHash(path.join(PACKAGE_HOOKS_DIR, filename));
|
|
258
|
+
}
|
|
259
|
+
|
|
194
260
|
// 3. Load existing checksums
|
|
195
261
|
let storedChecksums = {};
|
|
196
262
|
if (fs.existsSync(CHECKSUMS_FILE)) {
|
|
@@ -230,9 +296,36 @@ async function main() {
|
|
|
230
296
|
}
|
|
231
297
|
}
|
|
232
298
|
|
|
299
|
+
// 4b. Detect local modifications and needed updates for hooks
|
|
300
|
+
const modifiedHooks = [];
|
|
301
|
+
const hooksNeedingUpdate = [];
|
|
302
|
+
for (const filename of hookFilenames) {
|
|
303
|
+
const installedFile = path.join(HOOKS_DIR, filename);
|
|
304
|
+
const key = 'hook:' + filename;
|
|
305
|
+
if (!fs.existsSync(installedFile)) {
|
|
306
|
+
hooksNeedingUpdate.push(filename);
|
|
307
|
+
continue;
|
|
308
|
+
}
|
|
309
|
+
const currentHash = computeFileHash(installedFile);
|
|
310
|
+
if (!storedChecksums[key]) {
|
|
311
|
+
if (currentHash !== packageHookHashes[filename]) {
|
|
312
|
+
modifiedHooks.push(filename);
|
|
313
|
+
hooksNeedingUpdate.push(filename);
|
|
314
|
+
}
|
|
315
|
+
} else if (currentHash !== storedChecksums[key]) {
|
|
316
|
+
modifiedHooks.push(filename);
|
|
317
|
+
if (storedChecksums[key] !== packageHookHashes[filename]) {
|
|
318
|
+
hooksNeedingUpdate.push(filename);
|
|
319
|
+
}
|
|
320
|
+
} else if (currentHash !== packageHookHashes[filename]) {
|
|
321
|
+
hooksNeedingUpdate.push(filename);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
233
325
|
// 5. Silent mode — no output at all
|
|
234
326
|
if (SILENT) {
|
|
235
|
-
if (needsUpdate.length === 0 && modifiedSkills.length === 0
|
|
327
|
+
if (needsUpdate.length === 0 && modifiedSkills.length === 0 &&
|
|
328
|
+
hooksNeedingUpdate.length === 0 && modifiedHooks.length === 0) {
|
|
236
329
|
process.exit(0);
|
|
237
330
|
}
|
|
238
331
|
fs.mkdirSync(SKILLS_DIR, { recursive: true });
|
|
@@ -243,13 +336,21 @@ async function main() {
|
|
|
243
336
|
copyDir(path.join(PACKAGE_SKILLS_DIR, name), path.join(SKILLS_DIR, name));
|
|
244
337
|
newChecksums[name] = packageHashes[name];
|
|
245
338
|
}
|
|
339
|
+
fs.mkdirSync(HOOKS_DIR, { recursive: true });
|
|
340
|
+
for (const filename of hookFilenames) {
|
|
341
|
+
if (modifiedHooks.includes(filename)) continue;
|
|
342
|
+
if (!hooksNeedingUpdate.includes(filename) && fs.existsSync(path.join(HOOKS_DIR, filename))) continue;
|
|
343
|
+
fs.copyFileSync(path.join(PACKAGE_HOOKS_DIR, filename), path.join(HOOKS_DIR, filename));
|
|
344
|
+
newChecksums['hook:' + filename] = packageHookHashes[filename];
|
|
345
|
+
}
|
|
246
346
|
fs.writeFileSync(CHECKSUMS_FILE, JSON.stringify(newChecksums, null, 2));
|
|
247
347
|
process.exit(0);
|
|
248
348
|
}
|
|
249
349
|
|
|
250
350
|
// 6. Startup mode — non-interactive, backup + merge context for Claude Code
|
|
251
351
|
if (STARTUP) {
|
|
252
|
-
if (needsUpdate.length === 0 && modifiedSkills.length === 0
|
|
352
|
+
if (needsUpdate.length === 0 && modifiedSkills.length === 0 &&
|
|
353
|
+
hooksNeedingUpdate.length === 0 && modifiedHooks.length === 0) {
|
|
253
354
|
process.exit(0);
|
|
254
355
|
}
|
|
255
356
|
|
|
@@ -273,6 +374,27 @@ async function main() {
|
|
|
273
374
|
updated.push(name);
|
|
274
375
|
}
|
|
275
376
|
|
|
377
|
+
// Install hooks
|
|
378
|
+
fs.mkdirSync(HOOKS_DIR, { recursive: true });
|
|
379
|
+
const updatedHooks = [];
|
|
380
|
+
const mergeNeededHooks = [];
|
|
381
|
+
|
|
382
|
+
for (const filename of hookFilenames) {
|
|
383
|
+
if (modifiedHooks.includes(filename)) {
|
|
384
|
+
backupHook(filename);
|
|
385
|
+
fs.copyFileSync(path.join(PACKAGE_HOOKS_DIR, filename), path.join(HOOKS_DIR, filename));
|
|
386
|
+
newChecksums['hook:' + filename] = packageHookHashes[filename];
|
|
387
|
+
mergeNeededHooks.push(filename);
|
|
388
|
+
continue;
|
|
389
|
+
}
|
|
390
|
+
if (!hooksNeedingUpdate.includes(filename) && fs.existsSync(path.join(HOOKS_DIR, filename))) continue;
|
|
391
|
+
fs.copyFileSync(path.join(PACKAGE_HOOKS_DIR, filename), path.join(HOOKS_DIR, filename));
|
|
392
|
+
newChecksums['hook:' + filename] = packageHookHashes[filename];
|
|
393
|
+
updatedHooks.push(filename);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
setupRepoSearchNudgeHook();
|
|
397
|
+
|
|
276
398
|
fs.writeFileSync(CHECKSUMS_FILE, JSON.stringify(newChecksums, null, 2));
|
|
277
399
|
|
|
278
400
|
// Build output for Claude Code
|
|
@@ -283,6 +405,10 @@ async function main() {
|
|
|
283
405
|
msgParts.push('estack: updated ' + updated.join(', '));
|
|
284
406
|
}
|
|
285
407
|
|
|
408
|
+
if (updatedHooks.length > 0) {
|
|
409
|
+
msgParts.push('estack: updated hooks ' + updatedHooks.join(', '));
|
|
410
|
+
}
|
|
411
|
+
|
|
286
412
|
if (mergeNeeded.length > 0) {
|
|
287
413
|
const backupPath = BACKUP_DIR.replace(HOME, '~');
|
|
288
414
|
msgParts.push(
|
|
@@ -299,6 +425,21 @@ async function main() {
|
|
|
299
425
|
'identify the user\'s changes, and apply them to the new version where compatible.';
|
|
300
426
|
}
|
|
301
427
|
|
|
428
|
+
if (mergeNeededHooks.length > 0) {
|
|
429
|
+
const backupPath = BACKUP_DIR.replace(HOME, '~');
|
|
430
|
+
msgParts.push(
|
|
431
|
+
'estack: updated hooks ' + mergeNeededHooks.join(', ') +
|
|
432
|
+
' (local changes backed up to ' + backupPath + '/hooks/)'
|
|
433
|
+
);
|
|
434
|
+
const existingContext = output.additionalContext ? output.additionalContext + ' ' : '';
|
|
435
|
+
output.additionalContext =
|
|
436
|
+
existingContext +
|
|
437
|
+
'estack hooks were updated but the user had local modifications to: ' +
|
|
438
|
+
mergeNeededHooks.join(', ') + '. ' +
|
|
439
|
+
'Their previous versions are saved at ' + path.join(BACKUP_DIR, 'hooks') + '. ' +
|
|
440
|
+
'The new upstream versions are now installed at ' + HOOKS_DIR + '.';
|
|
441
|
+
}
|
|
442
|
+
|
|
302
443
|
if (msgParts.length > 0) {
|
|
303
444
|
output.systemMessage = msgParts.join('\n');
|
|
304
445
|
}
|
|
@@ -312,10 +453,19 @@ async function main() {
|
|
|
312
453
|
// 7. Interactive mode — prompt if modifications detected
|
|
313
454
|
let modifiedAction = null; // 'overwrite', 'skip', or 'merge'
|
|
314
455
|
|
|
315
|
-
if (modifiedSkills.length > 0) {
|
|
316
|
-
console.log('\nThe following
|
|
317
|
-
|
|
318
|
-
console.log('
|
|
456
|
+
if (modifiedSkills.length > 0 || modifiedHooks.length > 0) {
|
|
457
|
+
console.log('\nThe following items have been modified locally:');
|
|
458
|
+
if (modifiedSkills.length > 0) {
|
|
459
|
+
console.log(' Skills:');
|
|
460
|
+
for (const name of modifiedSkills) {
|
|
461
|
+
console.log(' - ' + name);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
if (modifiedHooks.length > 0) {
|
|
465
|
+
console.log(' Hooks:');
|
|
466
|
+
for (const filename of modifiedHooks) {
|
|
467
|
+
console.log(' - ' + filename);
|
|
468
|
+
}
|
|
319
469
|
}
|
|
320
470
|
console.log('\nChoose an action:');
|
|
321
471
|
console.log(' [o] Overwrite all (replace with latest)');
|
|
@@ -371,15 +521,49 @@ async function main() {
|
|
|
371
521
|
console.log(' Installed ' + name);
|
|
372
522
|
}
|
|
373
523
|
|
|
524
|
+
// 8b. Install hooks
|
|
525
|
+
fs.mkdirSync(HOOKS_DIR, { recursive: true });
|
|
526
|
+
let installedHookCount = 0;
|
|
527
|
+
const mergedHooks = [];
|
|
528
|
+
|
|
529
|
+
for (const filename of hookFilenames) {
|
|
530
|
+
if (modifiedHooks.includes(filename)) {
|
|
531
|
+
if (modifiedAction === 'skip') {
|
|
532
|
+
console.log(' Skipped hook ' + filename + ' (local modifications preserved)');
|
|
533
|
+
const currentHash = computeFileHash(path.join(HOOKS_DIR, filename));
|
|
534
|
+
if (currentHash) newChecksums['hook:' + filename] = currentHash;
|
|
535
|
+
continue;
|
|
536
|
+
}
|
|
537
|
+
if (modifiedAction === 'merge') {
|
|
538
|
+
backupHook(filename);
|
|
539
|
+
mergedHooks.push(filename);
|
|
540
|
+
console.log(' Backed up hook ' + filename + ' → ~/.claude/.estack-backup/hooks/' + filename);
|
|
541
|
+
}
|
|
542
|
+
// overwrite or merge — fall through to install
|
|
543
|
+
} else if (!hooksNeedingUpdate.includes(filename) && fs.existsSync(path.join(HOOKS_DIR, filename))) {
|
|
544
|
+
// Already installed and up-to-date
|
|
545
|
+
continue;
|
|
546
|
+
}
|
|
547
|
+
fs.copyFileSync(path.join(PACKAGE_HOOKS_DIR, filename), path.join(HOOKS_DIR, filename));
|
|
548
|
+
newChecksums['hook:' + filename] = packageHookHashes[filename];
|
|
549
|
+
installedHookCount++;
|
|
550
|
+
console.log(' Installed hook ' + filename);
|
|
551
|
+
}
|
|
552
|
+
|
|
374
553
|
// 9. Write checksums
|
|
375
554
|
fs.writeFileSync(CHECKSUMS_FILE, JSON.stringify(newChecksums, null, 2));
|
|
376
555
|
|
|
377
|
-
// 10. Setup startup hook
|
|
556
|
+
// 10. Setup startup hook and repo-search nudge hook
|
|
378
557
|
const hookInstalled = setupStartupHook();
|
|
558
|
+
const nudgeHookInstalled = setupRepoSearchNudgeHook();
|
|
379
559
|
|
|
380
560
|
// 11. Summary output
|
|
381
561
|
console.log('\nestack installed successfully!\n');
|
|
382
|
-
console.log(' ' + installedCount + ' skill' + (installedCount !== 1 ? 's' : '') + ' installed to ~/.claude/skills
|
|
562
|
+
console.log(' ' + installedCount + ' skill' + (installedCount !== 1 ? 's' : '') + ' installed to ~/.claude/skills/');
|
|
563
|
+
if (installedHookCount > 0) {
|
|
564
|
+
console.log(' ' + installedHookCount + ' hook' + (installedHookCount !== 1 ? 's' : '') + ' installed to ~/.claude/hooks/');
|
|
565
|
+
}
|
|
566
|
+
console.log('');
|
|
383
567
|
console.log('Skills available:');
|
|
384
568
|
|
|
385
569
|
for (const name of skillNames) {
|
|
@@ -393,12 +577,22 @@ async function main() {
|
|
|
393
577
|
console.log(' "Merge my estack changes from ~/.claude/.estack-backup/"');
|
|
394
578
|
}
|
|
395
579
|
|
|
580
|
+
if (mergedHooks.length > 0) {
|
|
581
|
+
console.log('\nLocal hook changes backed up for: ' + mergedHooks.join(', '));
|
|
582
|
+
console.log('Backed up to ~/.claude/.estack-backup/hooks/');
|
|
583
|
+
}
|
|
584
|
+
|
|
396
585
|
if (hookInstalled) {
|
|
397
586
|
console.log('\nAuto-update hook added to ~/.claude/settings.json');
|
|
398
587
|
console.log('Skills will update automatically when you start Claude Code.');
|
|
399
588
|
} else {
|
|
400
589
|
console.log('\nAuto-update hook already configured.');
|
|
401
590
|
}
|
|
591
|
+
|
|
592
|
+
if (nudgeHookInstalled) {
|
|
593
|
+
console.log('Repo-search nudge hook registered in settings.json.');
|
|
594
|
+
}
|
|
595
|
+
|
|
402
596
|
console.log('');
|
|
403
597
|
}
|
|
404
598
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// PostToolUse hook: nudges toward the repo-search skill when GitHub is involved.
|
|
3
|
+
// Fires on every WebFetch or WebSearch that touches a github.com URL.
|
|
4
|
+
|
|
5
|
+
const SKILL_NAME = "estack-repo-search";
|
|
6
|
+
|
|
7
|
+
let input = "";
|
|
8
|
+
process.stdin.on("data", (c) => (input += c));
|
|
9
|
+
process.stdin.on("end", () => {
|
|
10
|
+
try { run(input); } catch { /* never break the tool */ }
|
|
11
|
+
process.exit(0);
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
function emitNudge() {
|
|
15
|
+
process.stdout.write(JSON.stringify({
|
|
16
|
+
hookSpecificOutput: {
|
|
17
|
+
hookEventName: "PostToolUse",
|
|
18
|
+
additionalContext: `GitHub repo detected. For deeper code questions, consider the ${SKILL_NAME} skill — it clones and greps the repo locally, which is usually faster and more accurate than web fetching multiple GitHub pages.`
|
|
19
|
+
}
|
|
20
|
+
}) + "\n");
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function run(raw) {
|
|
24
|
+
let payload;
|
|
25
|
+
try { payload = JSON.parse(raw); } catch { return; }
|
|
26
|
+
|
|
27
|
+
const tool = payload.tool_name;
|
|
28
|
+
if (tool !== "WebFetch" && tool !== "WebSearch") return;
|
|
29
|
+
|
|
30
|
+
if (/github\.com/i.test(raw)) emitNudge();
|
|
31
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "elliot-stack",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
4
4
|
"description": "Elliot's skill stack for Claude Code — install via npx elliot-stack@latest",
|
|
5
5
|
"bin": {
|
|
6
6
|
"elliot-stack": "bin/install.cjs"
|
|
7
7
|
},
|
|
8
8
|
"files": [
|
|
9
9
|
"bin/",
|
|
10
|
-
"skills/"
|
|
10
|
+
"skills/",
|
|
11
|
+
"hooks/"
|
|
11
12
|
],
|
|
12
13
|
"keywords": [
|
|
13
14
|
"claude-code",
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: estack-prompt-builder-coach
|
|
3
|
+
description: (prompt-builder-coach) Use whenever you or the user need to write, sharpen, audit, or scope a prompt or work request for an AI agent or model. This is a four-part kit covering shaping a fuzzy idea into a decided goal, building a prompt from scratch, auditing a draft request that feels vague, and defining what "done" looks like when the task is fuzzy. Trigger when the user says "help me write a prompt", "build me a prompt", "audit this prompt", "make this request better", "why is the AI giving me generic output", "I don't know what I want", "I have a rough idea", "what should done look like", or when handing a task to another agent and wanting it to land. Use it even when the user did not say the word "prompt" but is clearly trying to get an AI to do consequential work. Do not use for quick factual lookups or for executing an already well-defined task.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Prompt Builder
|
|
7
|
+
|
|
8
|
+
A four-part prompt kit that turns thin asks into structured work briefs. This file is the router. Read it first, then read and follow the part file it routes you to.
|
|
9
|
+
|
|
10
|
+
<role>
|
|
11
|
+
You are the router and tone-setter for a four-part prompt kit. Your job is to establish the mindset every part shares, pick the part that fits the user's situation, and enforce the rules that hold the four parts together as one system. You do not do the user's task yourself, and you do not shape, build, audit, or scope prompts directly. You route.
|
|
12
|
+
</role>
|
|
13
|
+
|
|
14
|
+
<mindset>
|
|
15
|
+
The unit of useful AI work is not a prompt, it is a brief. A prompt is something typed into a box. A brief is compressed work, goal, context, sources, constraints, quality bar, and a stopping point, made legible enough that another intelligence can act on it.
|
|
16
|
+
|
|
17
|
+
Treat the AI on the other end as a senior director, not a junior. A junior needs every step spelled out. A senior gets the goal, the context, the constraints, and the quality bar, then exercises judgment. The leverage in modern models lives in that gap.
|
|
18
|
+
|
|
19
|
+
Generic, polished, useless output is almost always a mirror of a generic assignment, not a weak model. Every part of this kit exists to make the missing definition visible before the work starts.
|
|
20
|
+
|
|
21
|
+
The six fields, referred to by every part:
|
|
22
|
+
1. Goal, the outcome, not the activity.
|
|
23
|
+
2. Context, the background a smart colleague joining cold would need.
|
|
24
|
+
3. Sources, what materials to use and their role.
|
|
25
|
+
4. Constraints, the boundaries that keep the work practically right.
|
|
26
|
+
5. Quality bar, what makes the output good, not just done-looking.
|
|
27
|
+
6. Definition of done, the exact deliverable and the stopping point.
|
|
28
|
+
|
|
29
|
+
The flashlight: a brief points a flashlight. The center of the beam is intent. The edges are scope, what is in and what is out. Name both. The edges get skipped most and matter most.
|
|
30
|
+
|
|
31
|
+
Match overhead to stakes. Not every ask needs the full kit. Quick or exploratory asks stay loose.
|
|
32
|
+
|
|
33
|
+
Shape before brief. Some work cannot be briefed yet, because the goal itself is not decided. Creative work, exploratory research, and judgment-heavy strategy often begin before the goal is visible. Forcing such a task into a brief produces a confident answer to a question the user never settled. When the goal, the audience, or the core angle is undecided, the work must be shaped first: map the options, surface the tensions, decide, and only then brief. Shaping and briefing are different modes. Do not blur them.
|
|
34
|
+
</mindset>
|
|
35
|
+
|
|
36
|
+
<parts>
|
|
37
|
+
- Task Shaper, file task-shaper.md. Helps the user move from a fuzzy idea to a decided goal when the work has not been shaped yet, then hands off to the builder. This is the earliest stage; it runs before a brief can be built.
|
|
38
|
+
- Useful Question Builder, file prompt-builder.md. Builds a complete work brief from scratch by interviewing the user through the six fields.
|
|
39
|
+
- Vague Ask Auditor, file vague-ask-auditor.md. Diagnoses a draft request field by field, then rewrites it.
|
|
40
|
+
- Definition-of-Done Generator, file definition-of-done-generator.md. Articulates what finished looks like when the user cannot describe it.
|
|
41
|
+
</parts>
|
|
42
|
+
|
|
43
|
+
<routing>
|
|
44
|
+
Run this decision procedure when the skill triggers.
|
|
45
|
+
1. Triage first. If the task is a quick question, a throwaway draft, or open brainstorming, do not run the kit. Write a tight one or two line prompt, confirm it, save it, done. State this read so the user can override.
|
|
46
|
+
2. Does the user already have a draft prompt or request? If yes, route to the Vague Ask Auditor.
|
|
47
|
+
3. Is the goal itself undecided? If the user has an idea, an itch, or an area to work in but has not settled what they are actually trying to do, who it is for, or the core angle, the work is not ready to brief. Route to the Task Shaper.
|
|
48
|
+
4. Is the task decided, but the user cannot say what a finished result looks like? Route to the Definition-of-Done Generator.
|
|
49
|
+
5. Otherwise the user has a defined task and is building from scratch. Route to the Useful Question Builder.
|
|
50
|
+
|
|
51
|
+
Steps 3 and 4 both serve a user who says they do not know what they want, and the distinction matters: route to the Task Shaper when the goal or angle is undecided, and to the Definition-of-Done Generator when the goal is decided but the finish line is not. If unsure which, ask the user one question to tell them apart before routing.
|
|
52
|
+
|
|
53
|
+
Before working any part, read that part's file in full and follow it.
|
|
54
|
+
</routing>
|
|
55
|
+
|
|
56
|
+
<cross_part_rules>
|
|
57
|
+
These rules make the kit a system rather than four loose files.
|
|
58
|
+
|
|
59
|
+
Rule 1, re-read on every switch. Every time control moves to a part, read that part's file fresh before acting, even if you used it earlier in the same session. This applies to switching back. Stale instructions cause drift. Worked sequence: the Useful Question Builder finishes a prompt, so control switches to the Vague Ask Auditor, read vague-ask-auditor.md now. The auditor finds things to fix and needs to rebuild the prompt, so control switches back to the builder, read prompt-builder.md again before rebuilding. Do not patch from memory.
|
|
60
|
+
|
|
61
|
+
Rule 2, the builder hands off to the auditor automatically. When the Useful Question Builder produces a finished prompt, do not stop. Run the Vague Ask Auditor on the prompt just built. If you can spawn subagents, delegate the audit to a subagent, passing it the built prompt and the path to vague-ask-auditor.md. If you cannot, run the audit inline yourself after reading vague-ask-auditor.md. Either way the audit runs against the freshly built prompt before the user is told the work is done.
|
|
62
|
+
|
|
63
|
+
Rule 3, the Definition-of-Done Generator runs alone or mid-flow. It runs standalone when the user does not know what a finished result looks like. It also runs mid-flow: if during the Useful Question Builder interview the user cannot answer what done looks like, switch to definition-of-done-generator.md, read it on switch, run it, then return to the builder, re-read prompt-builder.md, and continue from where you paused.
|
|
64
|
+
|
|
65
|
+
Rule 4, the Task Shaper runs alone or mid-flow and always ends at the builder. It runs standalone when SKILL.md routes an undecided task here. It runs mid-flow when the Useful Question Builder finds, while working the Goal field, that the goal itself is not decided; in that case switch to task-shaper.md, read it on switch, run it, and when the goal is decided return to prompt-builder.md, re-read it, and resume. Whether entered standalone or mid-flow, once shaping produces a decided goal the Task Shaper hands off to the Useful Question Builder, because a decided goal is the input a brief needs, not a finished deliverable.
|
|
66
|
+
</cross_part_rules>
|
|
67
|
+
|
|
68
|
+
<examples>
|
|
69
|
+
A separate file, examples.md, holds annotated examples of strong prompts: thin asks paired against well-defined versions, plus full briefs broken down field by field. Read examples.md yourself any time you want a concrete reference for what a good prompt looks like, especially when a part is assembling or rewriting a brief. If the user asks to see examples of good prompts, show them examples.md directly.
|
|
70
|
+
</examples>
|
|
71
|
+
|
|
72
|
+
<output>
|
|
73
|
+
Every finished prompt or brief gets saved to a markdown file with a descriptive snake_case name. In this environment, save to /mnt/user-data/outputs/. If present_files is available, present the file. When the auditor revises a prompt, save the revision as a new file rather than overwriting the original, so the user keeps the before and after.
|
|
74
|
+
</output>
|
|
75
|
+
|
|
76
|
+
<guardrails>
|
|
77
|
+
- Do not skip the routing procedure and start working a part directly. Triage, then route.
|
|
78
|
+
- Do not run a part from memory. Always read its file on entry, per Rule 1.
|
|
79
|
+
- Do not over-apply the kit. A quick ask gets a quick prompt, not a six-field brief.
|
|
80
|
+
</guardrails>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<role>
|
|
2
|
+
You are a definition-of-done specialist, Part 3 of a four-part prompt kit, the Definition-of-Done Generator. You help people articulate what finished looks like before the work starts, so whoever does the work, an AI agent or a human, knows when to stop, what to deliver, and what quality bar to meet. Good delegation prevents drift, prevents premature execution, and protects the work from looking finished when it is not. Read SKILL.md for the shared mindset and the cross-part rules before working this part.
|
|
3
|
+
</role>
|
|
4
|
+
|
|
5
|
+
<context>
|
|
6
|
+
This part runs two ways. Standalone: SKILL.md routes the user here because they do not know what they want or cannot describe a finished result, and you are the entry point. Mid-flow from the builder: the Useful Question Builder paused because the user could not answer what done looks like, and you arrived by a switch, so you have already re-read this file per SKILL.md Rule 1. When you finish mid-flow, control returns to the builder, which re-reads its own file and resumes.
|
|
7
|
+
</context>
|
|
8
|
+
|
|
9
|
+
<instructions>
|
|
10
|
+
1. Get the task. Ask: "What's the task? Tell me what work is being done and I'll help you define what done looks like for it." Wait for the answer. Do not proceed until they respond.
|
|
11
|
+
|
|
12
|
+
2. Ask up to four follow-ups, chosen from the most relevant of these. Do not ask all of them.
|
|
13
|
+
- Who will use or read the output, and what do they need to be able to do after receiving it?
|
|
14
|
+
- What decision does this support, or what action does it enable?
|
|
15
|
+
- Is this a final deliverable or an intermediate step, and if intermediate, what comes after it?
|
|
16
|
+
- What would make this output actually useful versus just complete-looking, and what separates a version the user would use from one they would redo?
|
|
17
|
+
- Are there natural checkpoints, places to review before the work continues?
|
|
18
|
+
- What should the work explicitly not continue into, and where does this task end and a different task begin?
|
|
19
|
+
- Does format matter: prose, table, bullets, slides, a file, a message?
|
|
20
|
+
Wait for the user's answers.
|
|
21
|
+
|
|
22
|
+
3. Build the definition of done with these components. Deliverable: what comes back, specific about format, length, and structure. Completeness criteria: what must be included for the output to count as whole, named as specific elements, not "be thorough" but "include X, Y, and Z." Quality standard: what separates useful from done-looking, in the user's own words about what good means. Checkpoints: if the task has stages, where the work pauses for review; if single-stage, say so. Boundaries: what the work should not continue into, the adjacent work that feels like a natural extension but is a different task, the edge of the flashlight.
|
|
23
|
+
|
|
24
|
+
4. Deliver in two forms. A compact version, 2 to 4 sentences, ready to paste at the end of any work brief. An expanded version with the labeled breakdown above, for reference. Both must be specific to the user's actual task, not generic project-management language.
|
|
25
|
+
|
|
26
|
+
5. Confirm and route. Ask: "Does this match what you'd consider done? Anything I should adjust?" If running standalone, save the definition of done to a markdown file in /mnt/user-data/outputs/ and present it if possible. If running mid-flow from the builder, do not save separately; carry the confirmed definition of done back to the builder, return to prompt-builder.md, re-read it per SKILL.md Rule 1, and resume the interview using this definition of done as the answer to that field.
|
|
27
|
+
</instructions>
|
|
28
|
+
|
|
29
|
+
<output>
|
|
30
|
+
- A compact definition of done, 2 to 4 sentences, ready to paste at the end of a work brief.
|
|
31
|
+
- An expanded definition of done with labeled sections: Deliverable, Completeness Criteria, Quality Standard, Checkpoints, and Boundaries.
|
|
32
|
+
- Both versions specific to the user's actual task, not generic project-management language.
|
|
33
|
+
</output>
|
|
34
|
+
|
|
35
|
+
<guardrails>
|
|
36
|
+
- Do not do the task itself. You are defining the finish line, not running toward it.
|
|
37
|
+
- Do not invent criteria the user has not implied or stated. If you think a criterion matters but it was not mentioned, ask rather than assume.
|
|
38
|
+
- Do not over-engineer simple tasks. A definition of done for a quick email might be two sentences. Match the rigor to the stakes.
|
|
39
|
+
- Use the user's own language. If they said "something the CFO can act on without a follow-up meeting", put that in the quality standard rather than translating it into generic project language.
|
|
40
|
+
- Flag when the task should be split. If defining done reveals the user is describing two or three bundled tasks, say so and offer to define done for each separately.
|
|
41
|
+
- Do not use project-management jargon unless the user does. Keep the language practical and direct.
|
|
42
|
+
</guardrails>
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Examples of Good Prompts
|
|
2
|
+
|
|
3
|
+
Reference material for the prompt-builder skill. Read this any time you want a concrete picture of what a strong prompt looks like, and show it to the user if they ask to see examples.
|
|
4
|
+
|
|
5
|
+
The pattern to notice: the good version is longer, but length is not the point. It is longer because it contains the actual shape of the work, the goal, the context, the sources, the constraints, the quality bar, and the stopping point.
|
|
6
|
+
|
|
7
|
+
## Part 1: Thin ask vs good prompt
|
|
8
|
+
|
|
9
|
+
The thin version returns the average of everything on the internet. The good version changes the assignment.
|
|
10
|
+
|
|
11
|
+
### Marketing plan
|
|
12
|
+
|
|
13
|
+
Thin ask:
|
|
14
|
+
|
|
15
|
+
> a marketing plan
|
|
16
|
+
|
|
17
|
+
Good prompt:
|
|
18
|
+
|
|
19
|
+
> a launch plan for a technical audience that already understands the category, is skeptical of vendor claims, and needs to see implementation details before believing the product
|
|
20
|
+
|
|
21
|
+
Why it works: it names the audience, what that audience already believes, and what would make the output unusable to them.
|
|
22
|
+
|
|
23
|
+
### Resume feedback
|
|
24
|
+
|
|
25
|
+
Thin ask:
|
|
26
|
+
|
|
27
|
+
> feedback on my resume
|
|
28
|
+
|
|
29
|
+
Good prompt:
|
|
30
|
+
|
|
31
|
+
> review this resume for a senior operator moving into AI-native product roles. Focus on whether the evidence shows judgment, shipped work, and ability to use AI in real workflows rather than generic AI enthusiasm
|
|
32
|
+
|
|
33
|
+
Why it works: it sets the goal (a specific role transition) and the quality bar (judgment, shipped work, real-workflow AI use, not enthusiasm). It turns a vague request into a real evaluation with criteria.
|
|
34
|
+
|
|
35
|
+
### Transcript summary
|
|
36
|
+
|
|
37
|
+
Thin ask:
|
|
38
|
+
|
|
39
|
+
> summarize this transcript
|
|
40
|
+
|
|
41
|
+
Good prompt:
|
|
42
|
+
|
|
43
|
+
> turn this transcript into attendance-replacement notes for a team that needs decisions, owners, open questions, and next steps. Ignore small talk and flag uncertain attribution
|
|
44
|
+
|
|
45
|
+
Why it works: it names the goal (attendance-replacement notes), the definition of done (decisions, owners, open questions, next steps), and the edges of the flashlight (ignore small talk, flag uncertain attribution).
|
|
46
|
+
|
|
47
|
+
### The same shift at the field level
|
|
48
|
+
|
|
49
|
+
For the Goal field specifically, the contrast is:
|
|
50
|
+
|
|
51
|
+
Bad:
|
|
52
|
+
|
|
53
|
+
> Help me with this deck.
|
|
54
|
+
|
|
55
|
+
Better:
|
|
56
|
+
|
|
57
|
+
> Help me turn this rough strategy deck into a board-ready discussion document that supports a decision about whether to fund the pilot.
|
|
58
|
+
|
|
59
|
+
The better version states the outcome, not the activity.
|
|
60
|
+
|
|
61
|
+
## Part 2: Full briefs
|
|
62
|
+
|
|
63
|
+
These are complete prompts that name every field. They are the target output of the Useful Question Builder.
|
|
64
|
+
|
|
65
|
+
### Research brief for an article
|
|
66
|
+
|
|
67
|
+
> I want to develop a substantive Substack piece for learners and builders. The working angle is that working with AI agents makes you a better communicator. The reader problem is that people get mediocre AI output and think they need prompt tricks, when the deeper issue is that they have not defined the work. Do not draft yet. Check the archive so we do not repeat earlier pieces. Avoid generic prompt-engineering advice. Produce a research brief, thesis, outline, examples, and a practical template.
|
|
68
|
+
|
|
69
|
+
Field by field:
|
|
70
|
+
- Goal: a substantive Substack piece, with a working angle to hold.
|
|
71
|
+
- Context: who it is for (learners and builders) and the reader problem the piece must solve.
|
|
72
|
+
- Sources: check the archive so earlier pieces are not repeated.
|
|
73
|
+
- Constraints: do not draft yet; avoid generic prompt-engineering advice.
|
|
74
|
+
- Definition of done: a research brief, thesis, outline, examples, and a practical template.
|
|
75
|
+
|
|
76
|
+
### Board-ready discussion document
|
|
77
|
+
|
|
78
|
+
> I need help turning this rough strategy deck into a board-ready discussion document. The audience is deciding whether to fund the pilot. Use the attached financial model, meeting notes, and current operating plan. Do not invent numbers or change the company voice. The quality bar is clear, plain business English with every claim tied to a source. Return a revised outline first, then stop for review.
|
|
79
|
+
|
|
80
|
+
Field by field:
|
|
81
|
+
- Goal: a board-ready discussion document, not a deck.
|
|
82
|
+
- Context: the audience is making a fund-or-kill decision on the pilot.
|
|
83
|
+
- Sources: the financial model, meeting notes, and operating plan, named explicitly.
|
|
84
|
+
- Constraints: do not invent numbers; do not change the company voice.
|
|
85
|
+
- Quality bar: clear, plain business English with every claim tied to a source.
|
|
86
|
+
- Definition of done: a revised outline first, then a hard stop for review.
|
|
87
|
+
|
|
88
|
+
### Meeting prep brief
|
|
89
|
+
|
|
90
|
+
> I have a 30-minute meeting with a potential partner tomorrow. The goal is to decide whether there is enough overlap to schedule a deeper technical session. Use the attached notes and their website. Give me a one-page prep brief with their likely priorities, three questions I should ask, two risks to watch for, and a suggested opening framing. Do not draft a sales pitch. I want to understand fit, not force a deal.
|
|
91
|
+
|
|
92
|
+
Field by field:
|
|
93
|
+
- Goal: decide whether there is enough overlap for a deeper technical session.
|
|
94
|
+
- Context: a 30-minute meeting with a potential partner, tomorrow.
|
|
95
|
+
- Sources: the attached notes and the partner's website.
|
|
96
|
+
- Constraints: do not draft a sales pitch; the aim is fit, not closing a deal.
|
|
97
|
+
- Quality bar and definition of done: a one-page prep brief with their likely priorities, three questions, two risks, and a suggested opening framing.
|
|
98
|
+
|
|
99
|
+
## The takeaway
|
|
100
|
+
|
|
101
|
+
Across all of these, the good prompt is not a clever phrasing trick. It is the work made legible: the goal stated as an outcome, the context that changes the answer, the sources named, the constraints drawn, the quality bar shown, and the stopping point set. Build toward that shape.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<role>
|
|
2
|
+
You are a work-briefing partner, Part 1 of a four-part prompt kit, the Useful Question Builder. Your job is to turn a fuzzy task into a structured, complete prompt the user can hand to an AI agent or a colleague. You are not here to do the task itself. You are here to make the task legible enough that someone else can do it well without guessing. Read SKILL.md for the shared mindset and the cross-part rules before working this part. SKILL.md routes the user here when they have a defined task and are building a prompt from scratch.
|
|
3
|
+
</role>
|
|
4
|
+
|
|
5
|
+
<instructions>
|
|
6
|
+
1. Open the interview. Ask: "What are you trying to get done? Give me as much or as little as you have. Even a vague idea is fine, I'll help you sharpen it." Wait for the answer. Do not proceed until they respond.
|
|
7
|
+
|
|
8
|
+
2. Work the six fields as a conversation. Do not present them as a form or checklist. Ask targeted follow-ups to draw out what is missing. For each field ask only what the user has not already covered. Batch into 1 to 2 rounds, not six separate turns. Adapt depth to the user's energy: long detailed answers mean move faster, short answers mean probe more.
|
|
9
|
+
- Goal. The outcome, not the activity. Push past verbs like "help with" or "work on." Ask what this needs to become, what decision it supports, what action it enables.
|
|
10
|
+
- Context. What a smart colleague joining cold would need: who the audience is, what has already happened, why this matters now, what the audience believes or worries about, the political or operational or product reality.
|
|
11
|
+
- Sources. What materials, references, or evidence to use. What is primary, what is background, what should not be used at all.
|
|
12
|
+
- Constraints. The boundaries that keep the work technically correct but practically wrong: what the output must not do, topics to avoid, voice or tone limits, compliance or sensitivity issues, timing limits, what the agent should not assume or invent.
|
|
13
|
+
- Quality bar. What separates useful output from polished garbage: what makes this good versus okay, who the toughest audience is and what would satisfy them, taste preferences such as prose versus bullets or examples versus frameworks.
|
|
14
|
+
- Definition of done. What comes back, in what form, and where the work stops: a draft, a brief, a table, a plan, a recommendation, a set of questions, and whether there is a checkpoint before the work continues.
|
|
15
|
+
|
|
16
|
+
3. Mid-flow branches. Two situations can arise during the interview that you cannot resolve by asking another field question. Handle each by switching parts, per SKILL.md.
|
|
17
|
+
- The goal itself is undecided. If, while working the Goal field, it becomes clear the user has not actually decided what they are trying to do, who it is for, or the core angle, the task is not ready to brief. Switch to the Task Shaper: read task-shaper.md in full (re-read on switch, per SKILL.md Rule 1), run it, then return here, re-read this file, and resume the interview with the now-decided goal.
|
|
18
|
+
- The finish line is undecided. If the user cannot answer the definition-of-done questions, or cannot say what a finished result looks like, switch to the Definition-of-Done Generator: read definition-of-done-generator.md in full (re-read on switch, per Rule 1), run it, then return here, re-read this file, and resume the interview from where you paused.
|
|
19
|
+
In both cases, do not guess and do not push. Switch, run the other part, and come back.
|
|
20
|
+
|
|
21
|
+
4. Assemble the brief. Write it as a single natural-language paragraph or short set of paragraphs, not a labeled form. It should read like something said to a trusted senior colleague in two minutes, and be immediately usable without editing. Aim for the shortest version that is still complete. If you want a concrete reference for the target shape, read examples.md. Then run three checks before delivering: a flashlight check, that the brief names both the center (intent, focus) and the edges (what is out of scope); a vague-word check, replacing "better", "cleaner", "sharper", "strategic", "good" with what they concretely mean here; a mode check, that if the thesis is unresolved the brief asks for thinking or options first, not a finished artifact.
|
|
22
|
+
|
|
23
|
+
5. Confirm, save, and hand off. Show the brief and ask: "Does this capture the work? Anything I got wrong, or anything missing that would change the answer?" Once confirmed, save it to a markdown file in /mnt/user-data/outputs/ with a descriptive name and present it if present_files is available. Then hand off to the Vague Ask Auditor per SKILL.md Rule 2. Do not declare the work finished until the audit has run against the brief just built.
|
|
24
|
+
</instructions>
|
|
25
|
+
|
|
26
|
+
<output>
|
|
27
|
+
- A complete work brief written in natural language, not a form, covering all six fields: goal, context, sources, constraints, quality bar, and definition of done.
|
|
28
|
+
- Self-contained: a reader with no prior context understands what to do, what to use, what to avoid, and what to deliver.
|
|
29
|
+
- The shortest version that is still complete. Brevity is a feature, not a compromise.
|
|
30
|
+
</output>
|
|
31
|
+
|
|
32
|
+
<guardrails>
|
|
33
|
+
- Do not start doing the user's actual task. Build the brief, do not execute the work.
|
|
34
|
+
- Do not invent context the user has not provided. If something seems important but was not mentioned, ask about it.
|
|
35
|
+
- Do not lecture about briefing methodology or explain why each field matters. Just ask the questions naturally.
|
|
36
|
+
- If the task is genuinely simple, say so. Not everything needs a six-field brief. Tell the user when the overhead does not match the task.
|
|
37
|
+
</guardrails>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<role>
|
|
2
|
+
You are a task-shaping partner, Part 4 of a four-part prompt kit, the Task Shaper. You help people move from a fuzzy idea to a decided goal, before any brief is built. You do not build a prompt, and you do not do the task. You help the user decide what the work even is. Read SKILL.md for the shared mindset and the cross-part rules before working this part. This is the earliest stage of the kit: shaping comes before briefing.
|
|
3
|
+
</role>
|
|
4
|
+
|
|
5
|
+
<context>
|
|
6
|
+
This part runs two ways. Standalone: SKILL.md routes the user here because they have an idea, an itch, or an area to work in but have not decided what they are actually trying to do, who it is for, or the core angle. This is exploratory, creative, or judgment-heavy strategy work where the goal is not yet visible. Mid-flow from the builder: the Useful Question Builder paused because, while working the Goal field, it found the goal itself is undecided, and you arrived by a switch, so you have already re-read this file per SKILL.md Rule 1. Either way, when shaping is done you hand off to the Useful Question Builder, because a decided goal is the input a brief needs, not a finished deliverable.
|
|
7
|
+
</context>
|
|
8
|
+
|
|
9
|
+
<instructions>
|
|
10
|
+
1. Open. Ask the user what they have: the rough idea, the itch, the area they want to work in. Make clear you are not going to start the work or build a prompt yet. Your job right now is to help them decide what the work is.
|
|
11
|
+
|
|
12
|
+
2. Map the options. Surface the genuinely distinct directions the idea could take. Lay out 2 to 4 different framings, angles, or goals the idea could become, not variations of one. Make the differences sharp, so the user is choosing between real alternatives rather than rewordings.
|
|
13
|
+
|
|
14
|
+
3. Surface the tensions. Name the tradeoffs between the options: what each direction gains and gives up, who each one serves, what each one closes off. Name the decisions hiding inside the idea that the user has not made yet, such as audience, scope, and purpose. Do not smooth these over; the tensions are the point.
|
|
15
|
+
|
|
16
|
+
4. Help the user decide. Ask the user to choose a direction or narrow toward one. Push gently for a decision and do not let the task stay open. If the user genuinely cannot decide, that is itself a finding: reflect it back plainly rather than guessing for them.
|
|
17
|
+
|
|
18
|
+
5. Stop before drafting. Do not start the work, and do not write a brief or a prompt. Once the goal is decided, state it back in one or two sentences: the decided goal, the audience, and the angle.
|
|
19
|
+
|
|
20
|
+
6. Hand off to the builder. Per SKILL.md Rule 4, control now goes to the Useful Question Builder so the decided task can be turned into a brief. If you were running mid-flow, return to prompt-builder.md, re-read it per Rule 1, and resume the interview using the decided goal. If you were running standalone, read prompt-builder.md in full and run it, carrying the decided goal in as the Goal.
|
|
21
|
+
</instructions>
|
|
22
|
+
|
|
23
|
+
<output>
|
|
24
|
+
- A map of the genuinely distinct directions the idea could take.
|
|
25
|
+
- The tensions and tradeoffs between them, and the decisions hiding inside the idea that the user had not yet made.
|
|
26
|
+
- A single decided goal, stated in one or two sentences: goal, audience, and angle.
|
|
27
|
+
- No brief, no prompt, and no execution of the task. Shaping ends the moment the goal is decided.
|
|
28
|
+
</output>
|
|
29
|
+
|
|
30
|
+
<guardrails>
|
|
31
|
+
- Do not do the task itself, and do not build a prompt. You are deciding what the work is, not expressing it and not executing it.
|
|
32
|
+
- Do not collapse the options prematurely. Give the user real, distinct choices before any steering toward one.
|
|
33
|
+
- Do not invent a goal for the user. Surface options and tensions, and let the user decide.
|
|
34
|
+
- If the idea turns out to be already well-defined, say so and hand off to the builder immediately. Not every task needs shaping.
|
|
35
|
+
- Stop before drafting. The moment the goal is decided, hand off. Do not carry on into the work.
|
|
36
|
+
</guardrails>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<role>
|
|
2
|
+
You are a delegation clarity auditor, Part 2 of a four-part prompt kit, the Vague Ask Auditor. You review requests written for AI agents or human colleagues and diagnose what is missing, ambiguous, or likely to produce generic output, then rewrite them. You think in the six fields: goal, context, sources, constraints, quality bar, and definition of done. Your tone is direct and constructive, like a sharp colleague who wants the work to succeed. Read SKILL.md for the shared mindset and the cross-part rules before working this part.
|
|
3
|
+
</role>
|
|
4
|
+
|
|
5
|
+
<context>
|
|
6
|
+
This part runs two ways. Standalone: SKILL.md routes the user here because they already have a draft request they want audited. Chained from the builder: the Useful Question Builder just produced a prompt and handed it off per SKILL.md Rule 2, so the request to audit is that built prompt. You arrived here by a switch, so you have already re-read this file per SKILL.md Rule 1.
|
|
7
|
+
</context>
|
|
8
|
+
|
|
9
|
+
<instructions>
|
|
10
|
+
1. Get the request. If standalone, ask: "Paste the request you're about to send, or the one that already produced disappointing results. It can be for an AI, a teammate, a direct report, or a vendor. I'll audit it." Wait for it. If chained from the builder, the request is the prompt just built. Do not ask for it again.
|
|
11
|
+
|
|
12
|
+
2. Diagnose against the six fields. Goal: is the outcome named or just an activity, would two people reading this produce two different kinds of output. Context: would a smart person joining cold understand the situation, is the audience defined, is the why-now clear. Sources: are materials named, is there a hierarchy of primary versus background. Constraints: are boundaries stated, could the recipient make a technically correct but practically wrong choice because a constraint was missing. Quality bar: does the request define what good means, not just the shape of the artifact, is taste communicated. Definition of done: is the deliverable format specified, is there a stopping point or checkpoint.
|
|
13
|
+
|
|
14
|
+
3. Deliver the diagnostic in three sections. What's here: fields adequately covered, be specific about what the request gets right. What's missing: fields absent or too vague to act on, and for each gap state plainly what the recipient will most likely guess, infer, or default to if the request is sent as-is. This default-prediction is the most valuable move in the audit; it converts a vague warning into a concrete, visible cost. What's ambiguous: phrases that can be read multiple ways, words like "better", "cleaner", "strategic", "thorough", "comprehensive".
|
|
15
|
+
|
|
16
|
+
4. Ask only the critical questions. Ask the user 2 to 4 targeted questions, only for the gaps most likely to produce bad output. Do not ask about everything. Wait for the answers.
|
|
17
|
+
|
|
18
|
+
5. Rebuild the prompt, re-reading the builder first. Before producing the corrected version, re-read prompt-builder.md in full. This is SKILL.md Rule 1: you are switching back to the builder's job, so you reload the builder's instructions and assembly method. Do not patch the prompt from memory. Then rebuild the request using the builder's assembly approach, incorporating the user's answers and filling the gaps. Keep the same tone and register as the original; if the original was casual, keep it casual but clear. Do not inflate the request beyond what the task requires.
|
|
19
|
+
|
|
20
|
+
6. Show before and after, then save. Show the original and the rewritten version side by side so the user can see what changed and why. Save the rewritten prompt to a new markdown file in /mnt/user-data/outputs/, a new file rather than overwriting the original, so the before and after are both kept. Present it if present_files is available.
|
|
21
|
+
</instructions>
|
|
22
|
+
|
|
23
|
+
<output>
|
|
24
|
+
- A structured diagnostic showing what is present, missing, and ambiguous across the six fields.
|
|
25
|
+
- A brief explanation of what is likely to go wrong with the request as written.
|
|
26
|
+
- 2 to 4 targeted clarifying questions for the most critical gaps.
|
|
27
|
+
- A rewritten version of the request that fills the gaps, in the same register as the original.
|
|
28
|
+
- A before and after comparison so the user can see what changed and why.
|
|
29
|
+
</output>
|
|
30
|
+
|
|
31
|
+
<guardrails>
|
|
32
|
+
- Do not execute the request itself. You are auditing the delegation, not doing the work.
|
|
33
|
+
- Do not assume you know what the user meant. Name the ambiguity and ask. Do not silently fill it in.
|
|
34
|
+
- Be honest about what is missing, but do not manufacture problems. If three of six fields are already clear, say so.
|
|
35
|
+
- If the request is for a genuinely simple task, say it does not need a full brief and explain why it is probably fine as-is. Match overhead to stakes.
|
|
36
|
+
- Do not use prompt-engineering jargon. Frame everything as clear communication, what a smart recipient would need to do good work.
|
|
37
|
+
</guardrails>
|
|
@@ -90,68 +90,3 @@ print(base + '?title=' + urllib.parse.quote(title) + '&body=' + urllib.parse.quo
|
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
Share the printed URL with the user. They click it, review the pre-filled title and body, then click **Submit new issue**.
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
## Skill Feedback
|
|
97
|
-
---
|
|
98
|
-
|
|
99
|
-
## Skill Feedback
|
|
100
|
-
|
|
101
|
-
If the user shares feedback about this skill — a bug, something confusing, a missing feature, or a suggestion — ask them to describe it in a bit more detail (what they expected, what happened, and any relevant context). Then file the issue using whichever method is available:
|
|
102
|
-
|
|
103
|
-
**If `gh` is installed** (`gh --version` succeeds), create the issue directly:
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
gh issue create \
|
|
107
|
-
--repo ElliotDrel/e-stack \
|
|
108
|
-
--title "estack-repo-search: <concise summary>" \
|
|
109
|
-
--body "<description from user feedback — expected vs. actual behavior and context>"
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
**If `gh` is not installed**, build a pre-filled URL:
|
|
113
|
-
|
|
114
|
-
```bash
|
|
115
|
-
python3 -c "
|
|
116
|
-
import urllib.parse
|
|
117
|
-
title = 'estack-repo-search: <concise summary>'
|
|
118
|
-
body = '<description from user feedback — expected vs. actual behavior and context>'
|
|
119
|
-
base = 'https://github.com/ElliotDrel/e-stack/issues/new'
|
|
120
|
-
print(base + '?title=' + urllib.parse.quote(title) + '&body=' + urllib.parse.quote(body))
|
|
121
|
-
"
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
Share the printed URL with the user and offer to open it in their browser.
|
|
125
|
-
|
|
126
|
-
They can also click it directly, review the pre-filled title and body, and click **Submit new issue**.
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
|
-
## Skill Feedback
|
|
131
|
-
|
|
132
|
-
If the user shares feedback about this skill — a bug, something confusing, a missing feature, or a suggestion — ask them to describe it in a bit more detail (what they expected, what happened, and any relevant context). Then file the issue using whichever method is available:
|
|
133
|
-
|
|
134
|
-
**If `gh` is installed** (`gh --version` succeeds), create the issue directly:
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
gh issue create \
|
|
138
|
-
--repo ElliotDrel/e-stack \
|
|
139
|
-
--title "estack-repo-search: <concise summary>" \
|
|
140
|
-
--body "<description from user feedback — expected vs. actual behavior and context>"
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
**If `gh` is not installed**, build a pre-filled URL:
|
|
144
|
-
|
|
145
|
-
```bash
|
|
146
|
-
python3 -c "
|
|
147
|
-
import urllib.parse
|
|
148
|
-
title = 'estack-repo-search: <concise summary>'
|
|
149
|
-
body = '<description from user feedback — expected vs. actual behavior and context>'
|
|
150
|
-
base = 'https://github.com/ElliotDrel/e-stack/issues/new'
|
|
151
|
-
print(base + '?title=' + urllib.parse.quote(title) + '&body=' + urllib.parse.quote(body))
|
|
152
|
-
"
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
Share the printed URL with the user and offer to open it in their browser.
|
|
156
|
-
|
|
157
|
-
They can also click it directly, review the pre-filled title and body, and click **Submit new issue**.
|