From 8d2ca1edf89ac7769a4280b85e8e52603ea109eb Mon Sep 17 00:00:00 2001 From: monkut Date: Tue, 28 Apr 2026 15:47:02 +0900 Subject: [PATCH 1/2] :bug: Add verify-before-asserting-existence rule to plan prompt (closes #95) --- askcc/definitions.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/askcc/definitions.py b/askcc/definitions.py index a2b8c7e..0bc880e 100644 --- a/askcc/definitions.py +++ b/askcc/definitions.py @@ -123,8 +123,16 @@ Read relevant source files, tests, and config before planning. Do not speculate about unopened code. +Verify before asserting existence: for every symbol you propose to add (model field, function, \ +class, setting, file), first `grep -n '' ` or Read the target file to confirm \ +absence. Never write " does not currently exist" or propose `AddField` / "create new \ +" steps based on issue text alone. If grep finds the symbol, the step becomes "modify \ +existing", and any migration must NOT include `AddField` for an already-present column. + Your plan must include: -1. Current state — what exists today related to the issue. +1. Current state — what exists today related to the issue. Cite `file:line` for each existing \ +symbol referenced; for any symbol you claim is missing, cite the negative grep result \ +(e.g. `grep -n 'foo' models.py → no match`). 2. Step-by-step implementation tasks, each referencing specific files and functions. 3. Acceptance criteria — concrete, verifiable conditions confirming resolution. \ Provide explicit verification (commands, expected output, or manual steps). From 7934c77a0f7b64fddb80ed788bdad080195871c8 Mon Sep 17 00:00:00 2001 From: monkut Date: Tue, 28 Apr 2026 16:05:57 +0900 Subject: [PATCH 2/2] :art: Generalize plan-prompt change-existence check per review --- askcc/definitions.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/askcc/definitions.py b/askcc/definitions.py index 0bc880e..a9bb51a 100644 --- a/askcc/definitions.py +++ b/askcc/definitions.py @@ -123,11 +123,9 @@ Read relevant source files, tests, and config before planning. Do not speculate about unopened code. -Verify before asserting existence: for every symbol you propose to add (model field, function, \ -class, setting, file), first `grep -n '' ` or Read the target file to confirm \ -absence. Never write " does not currently exist" or propose `AddField` / "create new \ -" steps based on issue text alone. If grep finds the symbol, the step becomes "modify \ -existing", and any migration must NOT include `AddField` for an already-present column. +For any change proposal, assert that the change does not already exist. Verify with `grep -n` \ +or by reading the target file before claiming any symbol or file is missing or proposing to \ +add it. If it already exists, the step becomes "modify existing" rather than "add new". Your plan must include: 1. Current state — what exists today related to the issue. Cite `file:line` for each existing \