Agent Wealth HubFree public resources
中文 EN العربية

Take a coding Agent change from context to verification

Give the coding Agent a reproducible function, expected behavior, failing input, and test command. Ask it to inspect code and tests before editing.

Reviewed · 2026-10-15 · Content updated · 2026-10-15

Direct answer

Give the coding Agent a reproducible function, expected behavior, failing input, and test command. Ask it to inspect code and tests before editing. Example: normalize(row) trims name and lowercases email. Missing or null email must stay null; present email is normalized. Test missing, null, blank, and valid values.

Decision

Give the coding Agent a reproducible function, expected behavior, failing input, and test command. Ask it to inspect code and tests before editing.

Worked example

Example: normalize(row) trims name and lowercases email. Missing or null email must stay null; present email is normalized. Test missing, null, blank, and valid values.

Failure checks

Run focused tests and repository validation yourself. Review unrelated diff changes. Until commands run, mark tests planned; a patch suggestion is not verification.

Offline example and Agent acceptance workflow

Compare the example input with the result and acceptance checks.

Input text

Local deterministic example: review this existing function against four input classes. It already meets the stated behavior; no code change is needed.

def normalize(row):
    email = row.get("email")
    return {"name": row["name"].strip(),
            "email": email.strip().lower() if isinstance(email, str) else None}

cases = [
    ({"name": " A "}, None),
    ({"name": " A ", "email": None}, None),
    ({"name": " A ", "email": "   "}, ""),
    ({"name": " A ", "email": " A@EXAMPLE.TEST "}, "a@example.test"),
]
assert [normalize(row)["email"] for row, _ in cases] == [expected for _, expected in cases]

Prompt for an Agent interface you already use

Review the supplied normalize function; do not change files. Return JSON fields decision, behavior, test_cases, verification_status. Check missing email, null, whitespace-only, and mixed-case email; state “no change needed” if the implementation already matches. Mark any unrun tests as planned, not run.

Expected result

{
  "behavior": "missing/null -> None; blank -> empty string; present -> trimmed lowercase",
  "test_cases": "missing; null; whitespace-only; mixed-case email",
  "verification_status": "planned, not run",
  "decision": "no change needed; supplied implementation matches the stated behavior"
}

Review checklist

Selected resources

OpenAI Docs: verify against official sources

Why it is included: Use OpenAI Docs MCP for product guides and API shapes, and the Codex manual route for Codex-specific answers.

When it does not fit: Generic Python behavior does not need OpenAI product documentation.

openai/skills · skills/.curated/openai-docs/SKILL.md · 2026-10-14

Systematic debugging: find evidence before fixing causes

Why it is included: Reproduce, trace data flow, and inspect boundaries before choosing a repair.

When it does not fit: When the expected behavior is already clear and no unexplained failure exists, implement and test directly.

obra/superpowers · skills/systematic-debugging/SKILL.md · 2026-10-14

Test-driven development: use Red-Green-Refactor

Why it is included: Write a failing behavior test first, then implement minimally and refactor.

When it does not fit: It does not replace deciding the blank-email policy; define that behavior before writing the test.

obra/superpowers · skills/test-driven-development/SKILL.md · 2026-10-14

Verification before completion: run checks before reporting

Why it is included: Define and run the complete check that supports any claim that work is fixed or done.

When it does not fit: Verification guidance cannot replace the focused tests for the four email cases.

obra/superpowers · skills/verification-before-completion/SKILL.md · 2026-10-14

Python pytest: verify behavior and boundaries with isolated tests

Why it is included: Organize unit/integration tests, fixtures, mocks, parametrization, and async coverage.

When it does not fit: Use a browser-testing resource only when the changed behavior appears in a web UI.

wshobson/agents · plugins/python-development/skills/python-testing-patterns/SKILL.md · 2026-10-14

Test agent orchestration with a deterministic mock model

Why it is included: Verify application-owned tool dispatch, handoffs, and output handling without calling a live model service.

When it does not fit: Mock-model tests do not measure the quality of a real model response.

openai/openai-agents-python · docs/testing.md · 2026-10-14

Sources and review dates