Repository navigation
Testing agent: command-line verification for non-web projects - #333
zwanski-start wants to merge 1 commit into
Conversation
…utoForgeAI#136) The testing agent prompt only described browser automation, so CLI tools, scripts, libraries and API-only services were verified poorly. STEP 2 now routes web UI features to Playwright (2A) and non-UI features to a bash workflow (2B): plan success criteria, build input fixtures, write a repeatable scenario script that simulates user input, capture exit code / stdout / stderr / side effects, and judge strictly (including invalid input and swallowed errors). The coding prompt gets a short matching note, and a v1->v2 migration updates existing projects' testing_prompt.md when its STEP 2 is the unmodified browser-only text (customized prompts are left alone). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🔍 QA report: ✅ PassedTester: Dennis (cubefarm agent, in a fresh session) · Round: 1 · Author: Guido The testing prompt now has a command-line verification path (STEP 2B) that covers all five steps from issue #136: plan success criteria, make errors visible, run from bash, simulate user input, collect exit code/stdout/stderr/side effects. The v1→v2 migration correctly upgrades real v1 project prompts (and the v0→v1→v2 chain), is idempotent and leaves customised prompts alone. Lint, the new prompt tests and the security tests pass; the mypy errors and pytest failures are the same on master. Gap that doesn't block the merge: migrated v1 projects keep browser-only wording in STEP 3 and don't get the new AVAILABLE TOOLS bash section.
🧪 Commands run
No browser screenshots were taken in this round. Posted by cubefarm · merges automatically once GitHub's checks pass |
Summary
Testing agents only knew how to verify features through the browser, so projects that are run from bash (CLIs, scripts, data pipelines, libraries, API-only services) got weak regression testing. This PR teaches the testing agent a command-line verification workflow that follows the steps proposed in the issue.
.claude/templates/testing_prompt.template.mdSTEP 2 now starts by deciding how the feature is used:
0. Plan success criteria before running anything: command, simulated input, expected exit code, stdout/stderr, side effects, and at least one invalid or edge-case input.
tests/feature_<id>_test.sh, started withbash …. The default allowlist includesbash, but notprintf,diffortimeoutas top-level commands..claude/templates/coding_prompt.template.mdA short "No browser UI?" note in STEP 5 tells coding agents to verify the same way and save the scenario script, so testing agents can rerun it later. YOLO mode still removes the whole of STEP 5 as before.
prompts.py: v1 → v2 migrationExisting projects keep their copied
testing_prompt.md, soCURRENT_MIGRATION_VERSIONgoes up to 2 and a new_migrate_v1_to_v2runs on agent start:_CLI_TESTING_STEP2). Customized prompts are not touched.Verification
test_prompts.py(7 tests): template content, migration of an unmodified v1 prompt, no-op on a second run, current template left unchanged, customized STEP 2 preserved, and the end-to-endmigrate_project_to_currentversion bump.python -m pytest test_prompts.py→ 7 passed.ruff check .→ clean.python test_security.py→ all pass.Assumptions / notes
app_spec.txtand the feature's steps, which also covers mixed projects (for example a CLI that also serves a dashboard). Doing it in the prompt avoids guessing the project type wrongly.security.py) alone. Running the scenario throughbash script.shuses the existing allowedbashentry. Projects still need their interpreter (python, cargo, …) available as they already do today.Closes #136
🤖 Generated with Claude Code