fix: prevent discuss prompt loop and refresh star history link
This commit is contained in:
parent
0d251d9707
commit
97f27f17ce
3 changed files with 48 additions and 2 deletions
|
|
@ -412,7 +412,13 @@ Use expensive models where quality matters (planning, complex execution) and che
|
|||
|
||||
## Star History
|
||||
|
||||
[](https://star-history.com/#gsd-build/GSD-2&Date)
|
||||
<a href="https://star-history.com/#glittercowboy/get-shit-done&Date">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=glittercowboy/get-shit-done&type=Date&theme=dark" />
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=glittercowboy/get-shit-done&type=Date" />
|
||||
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=glittercowboy/get-shit-done&type=Date" />
|
||||
</picture>
|
||||
</a>
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
{{preamble}}
|
||||
|
||||
Say exactly: "What's the vision?" — nothing else. Wait for the user's answer.
|
||||
Ask: "What's the vision?" once, and then use whatever the user replies with as the vision input to continue.
|
||||
|
||||
Special handling: if the user message is not a project description (for example, they ask about status, branch state, or other clarifications), treat it as the vision input and proceed with discussion logic instead of repeating "What's the vision?".
|
||||
|
||||
## Discussion Phase
|
||||
|
||||
|
|
|
|||
38
src/resources/extensions/gsd/tests/discuss-prompt.test.ts
Normal file
38
src/resources/extensions/gsd/tests/discuss-prompt.test.ts
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
import { readFileSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
|
||||
let passed = 0;
|
||||
let failed = 0;
|
||||
|
||||
function assert(condition: boolean, message: string): void {
|
||||
if (condition) passed++;
|
||||
else {
|
||||
failed++;
|
||||
console.error(` FAIL: ${message}`);
|
||||
}
|
||||
}
|
||||
|
||||
const promptPath = join(process.cwd(), 'src/resources/extensions/gsd/prompts/discuss.md');
|
||||
const discussPrompt = readFileSync(promptPath, 'utf-8');
|
||||
|
||||
console.log('\n=== discuss prompt: resilient vision framing ===');
|
||||
{
|
||||
const hardenedPattern = /Say exactly:\s*"What's the vision\?"/;
|
||||
assert(!hardenedPattern.test(discussPrompt), 'prompt no longer uses exact-verbosity lock');
|
||||
assert(
|
||||
discussPrompt.includes('Ask: "What\'s the vision?" once'),
|
||||
'prompt asks for vision exactly once',
|
||||
);
|
||||
assert(
|
||||
discussPrompt.includes('Special handling'),
|
||||
'prompt documents special handling for non-vision user messages',
|
||||
);
|
||||
assert(
|
||||
discussPrompt.includes('instead of repeating "What\'s the vision?"'),
|
||||
'prompt forbids repeating the vision question',
|
||||
);
|
||||
}
|
||||
|
||||
console.log(`\nResults: ${passed} passed, ${failed} failed`);
|
||||
if (failed > 0) process.exit(1);
|
||||
console.log('All tests passed ✓');
|
||||
Loading…
Add table
Reference in a new issue