serpentstack 0.2.0 → 0.2.1
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/lib/commands/skills-init.js +10 -1
- package/lib/commands/stack-new.js +6 -1
- package/lib/utils/ui.js +10 -5
- package/package.json +1 -1
|
@@ -85,5 +85,14 @@ export async function skillsInit({ force = false } = {}) {
|
|
|
85
85
|
` ${dim('$')} ${bold('serpentstack skills persistent --create')}`,
|
|
86
86
|
]);
|
|
87
87
|
|
|
88
|
-
printPrompt(
|
|
88
|
+
printPrompt([
|
|
89
|
+
`Read .skills/generate-skills/SKILL.md and follow its instructions`,
|
|
90
|
+
`to generate project-specific skills for this codebase. Interview me`,
|
|
91
|
+
`about my architecture decisions — how I handle transactions, auth,`,
|
|
92
|
+
`error patterns, testing strategy, and deployment. Ask about the`,
|
|
93
|
+
`business domain too: what this app does, key user flows, and where`,
|
|
94
|
+
`agents are most likely to make mistakes. Write each skill as a`,
|
|
95
|
+
`SKILL.md with complete templates an agent can copy, not vague`,
|
|
96
|
+
`descriptions. Reference SKILL-AUTHORING.md for the format.`,
|
|
97
|
+
]);
|
|
89
98
|
}
|
|
@@ -92,5 +92,10 @@ export async function stackNew(name) {
|
|
|
92
92
|
`The agent reads ${bold('.skills/')} automatically.`,
|
|
93
93
|
]);
|
|
94
94
|
|
|
95
|
-
printPrompt(
|
|
95
|
+
printPrompt([
|
|
96
|
+
`Read .skills/scaffold/SKILL.md and add a Projects resource with`,
|
|
97
|
+
`full CRUD, JWT auth, and ownership enforcement. Follow the`,
|
|
98
|
+
`service/route/test/frontend patterns exactly as the skill`,
|
|
99
|
+
`describes. Run make verify when done to confirm everything passes.`,
|
|
100
|
+
], { hint: 'Try this prompt to verify your skills are working' });
|
|
96
101
|
}
|
package/lib/utils/ui.js
CHANGED
|
@@ -98,17 +98,22 @@ export function printBox(title, lines, { color = GREEN, icon = '\u25B6' } = {})
|
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
100
|
* Print a copyable prompt block that the user can paste into their IDE agent.
|
|
101
|
+
* Accepts a single string or an array of lines for multi-line prompts.
|
|
101
102
|
*/
|
|
102
|
-
export function printPrompt(prompt) {
|
|
103
|
-
const
|
|
103
|
+
export function printPrompt(promptLines, { hint = 'Copy this prompt and paste it into your IDE agent' } = {}) {
|
|
104
|
+
const lines = Array.isArray(promptLines) ? promptLines : [promptLines];
|
|
105
|
+
const maxLineLen = Math.max(...lines.map(l => stripAnsi(l).length));
|
|
106
|
+
const width = Math.min(Math.max(maxLineLen + 6, 50), 90);
|
|
104
107
|
const innerWidth = width - 2;
|
|
105
|
-
const pad = Math.max(0, innerWidth - stripAnsi(prompt).length - 2);
|
|
106
108
|
|
|
107
109
|
console.log();
|
|
108
110
|
console.log(` ${DIM}\u250C${'─'.repeat(innerWidth)}\u2510${RESET}`);
|
|
109
|
-
|
|
111
|
+
for (const line of lines) {
|
|
112
|
+
const pad = Math.max(0, innerWidth - stripAnsi(line).length - 2);
|
|
113
|
+
console.log(` ${DIM}\u2502${RESET} ${CYAN}${line}${RESET}${' '.repeat(pad)}${DIM}\u2502${RESET}`);
|
|
114
|
+
}
|
|
110
115
|
console.log(` ${DIM}\u2514${'─'.repeat(innerWidth)}\u2518${RESET}`);
|
|
111
|
-
console.log(` ${DIM}\u2191
|
|
116
|
+
console.log(` ${DIM}\u2191 ${hint}${RESET}`);
|
|
112
117
|
console.log();
|
|
113
118
|
}
|
|
114
119
|
|