mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-17 04:45:33 -08:00
Offer Skip on two of Diagnose's opening questions
AI Assisted
This commit is contained in:
1 parent
9583b68a2e
commit
e963513a8a
3 files changed
+12
-3
No files matched your search
@@ -536,3 +536,12 @@ test("prefs: Help and the readme name every tab and section, and the dialog's un
|
|||||||
assert.ok(!new RegExp(`class="[^"]*\\b${cls}\\b[^"]*"`).test(html), `index.html has no .${cls} left`);
|
assert.ok(!new RegExp(`class="[^"]*\\b${cls}\\b[^"]*"`).test(html), `index.html has no .${cls} left`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("Diagnose's opening cards: only What is wrong is required", () => {
|
||||||
|
const notes = fs.readFileSync(path.join(ROOT, "src", "web-console", "notes", "diagnose.md"), "utf8");
|
||||||
|
const batch = JSON.parse(notes.match(/```jsonc\n(.*)\n```/)[1]);
|
||||||
|
const required = Object.fromEntries(batch.items.map((item) => [item.id, item.required !== false]));
|
||||||
|
assert.deepEqual(required, { bug: true, expected: false, "see-it": false });
|
||||||
|
const prompt = fs.readFileSync(path.join(ROOT, "src", "plan2code-diagnose.md"), "utf8");
|
||||||
|
assert.match(prompt, /the last two `"required":false`/, "the prompt says the last two cards are optional");
|
||||||
|
});
|
||||||
@@ -57,7 +57,7 @@ Keep with you: the reproduction, any bisect, the cause judgment and every questi
|
|||||||
|
|
||||||
### Step 1: The Bug
|
### Step 1: The Bug
|
||||||
|
|
||||||
A typed argument is the report; ask only for what it leaves out. Otherwise ask in one batch (console: three `text` cards, the first with a placeholder example of a real report, no `"templates"`):
|
A typed argument is the report; ask only for what it leaves out. Otherwise ask in one batch (console: three `text` cards, the first with a placeholder example of a real report, the last two `"required":false`, no `"templates"`):
|
||||||
|
|
||||||
> "1. **What is wrong?** The bug, in a sentence or two.
|
> "1. **What is wrong?** The bug, in a sentence or two.
|
||||||
> 2. **Expected vs actual:** what should happen, and what happens instead.
|
> 2. **Expected vs actual:** what should happen, and what happens instead.
|
||||||
|
|||||||
@@ -5,10 +5,10 @@
|
|||||||
An argument that already describes the bug skips the cards it answers. Otherwise one `--wait` batch, no `templates`:
|
An argument that already describes the bug skips the cards it answers. Otherwise one `--wait` batch, no `templates`:
|
||||||
|
|
||||||
```jsonc
|
```jsonc
|
||||||
{"title":"Diagnose a bug","headline":{"stage":"The bug","cleared":0,"total":3},"items":[{"id":"bug","kind":"text","title":"What is wrong","body":"The bug, in a sentence or two."},{"id":"expected","kind":"text","title":"Expected and actual","body":"What should happen, and what happens instead."},{"id":"see-it","kind":"text","title":"How to see it","body":"The steps, command, page or input that shows it, and since when if known."}]}
|
{"title":"Diagnose a bug","headline":{"stage":"The bug","cleared":0,"total":3},"items":[{"id":"bug","kind":"text","title":"What is wrong","body":"The bug, in a sentence or two."},{"id":"expected","kind":"text","title":"Expected and actual","required":false,"body":"What should happen, and what happens instead."},{"id":"see-it","kind":"text","title":"How to see it","required":false,"body":"The steps, command, page or input that shows it, and since when if known."}]}
|
||||||
```
|
```
|
||||||
|
|
||||||
A follow-up the answers leave open is a new card with a new id.
|
A follow-up the answers leave open is a new card with a new id. A skipped card is no answer: work from the rest, never guess the missing steps, and ask again when you cannot show someone else the bug without it.
|
||||||
|
|
||||||
## The cause
|
## The cause
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user