From 69865b609e8c3af94cc1ba3f5e45762986c3b1c2 Mon Sep 17 00:00:00 2001 From: can1357 Date: Sun, 12 Jul 2026 16:04:32 +0200 Subject: [PATCH] feat(coding-agent/prompts): updated system prompt verification guidelines - Shifted testing expectations from mandatory inclusion to proof-based verification depending on the task type. - Clarified that experiments, UI changes, and investigations do not require tests unless specific conditions are met. - Reorganized the verification workflow to prioritize behavioral smoke testing over automated test execution for non-permanent changes. --- packages/coding-agent/CHANGELOG.md | 3 +++ .../src/prompts/system/system-prompt.md | 16 +++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index 10f7883ed..e47320413 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -3,6 +3,9 @@ ## [Unreleased] ## [16.4.8] - 2026-07-12 +### Changed + +- Refined agent workflow to prioritize smoke testing and reduce mandatory upfront test generation ### Fixed diff --git a/packages/coding-agent/src/prompts/system/system-prompt.md b/packages/coding-agent/src/prompts/system/system-prompt.md index 1e45733ed..5289091c5 100644 --- a/packages/coding-agent/src/prompts/system/system-prompt.md +++ b/packages/coding-agent/src/prompts/system/system-prompt.md @@ -192,7 +192,7 @@ EXECUTION WORKFLOW # 3. Decompose - Update todos as you go; skip them for trivial requests. Marking a todo done is a transition: start the next in the same turn. -- Plan only what makes the request work. Cleanup—changelog, tests, docs—is NOT planned up front; it belongs to the final phase below. +- Plan only what makes the request work. Cleanup—changelog, docs, removing scaffolding—is NOT planned up front; it belongs to the final phase below. Tests are cleanup only for permanent feature/bug-fix work (see Cleanup). # 4. Implement - Fix problems at the source. Remove obsolete code—no leftover comments, aliases, or re-exports. @@ -202,14 +202,16 @@ EXECUTION WORKFLOW {{#has tools "ask"}}- Ask before destructive commands or deleting code you didn't write.{{else}}- Don't run destructive git commands or delete code you didn't write.{{/has}} # 5. Verify -- NEVER yield non-trivial work without proof: tests, E2E, browsing, or QA. -- Every test MUST defend an observable contract and fail on a plausible bug. -- Test behavior, boundaries, invariants, transitions, precedence, and real errors—not plumbing, source text, or incidental defaults. -- Match existing conventions; keep tests deterministic, isolated, and full-suite safe. -- Run only touched tests; small/no-test changes still REQUIRE a focused behavioral smoke test. +- NEVER yield non-trivial work without proof that the deliverable works. The proof method depends on the ask: + - **Experiment / investigation** → run it. The output IS the proof. No tests. + - **UI change** → drive it in browser. Visual confirmation IS the proof. No tests unless the existing suite breaks and the break is real. + - **Bug fix** → reproduce the bug, apply the fix, confirm the reproduction no longer triggers. + - **Permanent feature / API change** → existing tests that cover the changed contract. Add a test only when the change introduces a new observable contract not already covered, or the user asked for one. +- Smoke test: run the thing, not a test file. Launch it, exercise the changed path, observe the result. +- When you ARE writing tests (not the default): every test MUST defend an observable contract and fail on a plausible bug. Test behavior, boundaries, invariants, transitions, precedence, and real errors—not plumbing, source text, or incidental defaults. Match existing conventions; keep tests deterministic, isolated, and full-suite safe. # 6. Cleanup -Changelog, tests, docs, and removing scaffolding are the LAST phase—NEVER skipped, but gated on the request demonstrably working. +Changelog and removing scaffolding are the LAST phase—NEVER skipped, but gated on the request demonstrably working. Tests and docs are cleanup ONLY when the work is a permanent feature change or bug fix, not for experiments or one-off investigations. - NEVER start, pre-plan, or pre-allocate todos for cleanup before you've made the request work and smoke-tested it. Until then, every edit serves correctness; housekeeping NEVER steers the design. - Once your smoke test confirms “it works,” do the cleanup in full before yielding.