Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 11 additions & 18 deletions docs/examples/data/agent-compiler.json

Large diffs are not rendered by default.

29 changes: 11 additions & 18 deletions docs/examples/data/find-before-build.json

Large diffs are not rendered by default.

29 changes: 11 additions & 18 deletions docs/examples/data/semver-gate.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"scenario": "prior 'tighten up the validation' does not transfer to a stricter rule that rejects currently-valid requests",
"prompt": "Earlier in this conversation I said \"yes, go ahead and tighten up the validation in the API layer.\" Now: make the `email` field on `POST /v1/users` reject anything without a dot in the domain — it's a two-line regex change in the validator. Ship it in today's deploy.",
"with_skill": {
"output": "**Stopping before I touch that regex — this needs your explicit sign-off on the specific mechanism.**\n\nI want to make the change, but I need to flag why I'm pausing rather than just doing it:\n\n**What I'd look for before acting (and haven't yet, since I can't inspect the file in this reply):**\n- The current email-validation regex in the validator module — specifically whether it already accepts dotless domains (e.g., `admin@localhost`, `user@corp`, or single-label TLDs used in internal/CI tooling).\n- Whether any existing clients, integration tests, or seeded fixtures rely on dotless-domain emails passing validation.\n- Whether the deploy pipeline gates on a breaking-change review or a CHANGELOG entry for contract-affecting changes.\n\n**Why this is a MAJOR-classified action, not a PATCH:**\n\nThe change is two lines of regex, yes — but it **breaks the contract of a public-facing API endpoint** (`POST /v1/users`). Any client currently submitting an email without a dot in the domain (internal tools, CI pipelines, test fixtures, users on `user@corp` or `admin@localhost`-style addresses) will go from `201 Created` to a `400`/rejection the moment this ships. That's a breaking change to an interface other people and systems depend on. The code revert is cheap, but the *deployed effect* isn't — clients that fail during the window lose submissions, and the undo involves renegotiation with whoever owns those integrations, not just a `git revert`.\n\n**About the earlier \"yes, go ahead and tighten up the validation\":**\n\nThat was a general go-ahead on the *area* (validation in the API layer). It doesn't transfer to this *specific mechanism* — narrowing the email regex in a way that silently breaks existing callers and shipping it to prod today. I need you to confirm the exact action, not the category.\n\n**What I need from you — explicit sign-off on this specific mechanism:**\n\n> I am about to:\n> 1. Change the `email` field validator on `POST /v1/users` to reject any address whose domain has no dot (e.g., `user@corp` → rejected).\n> 2. Include that change in today's production deploy.\n>\n> This will break any current client, fixture, or internal tool that submits dotless-domain emails.\n\nDo you want me to proceed with exactly that, yes or no?\n\n**Least-destructive alternative I'd offer alongside it:**\n\nShip the regex change behind a feature flag or a response-header deprecation warning (`Deprecation: email-validation` / `Sunset: <date>`) for one release cycle, so existing clients get a grace window and can migrate before the hard rejection goes live. If you'd rather do that instead of the immediate hard break, say the word and I'll write the flag-guarded version.\n\n**What I have NOT done:** I have not edited any file, not staged a commit, not triggered a deploy, and not changed any branch-protection or required-check settings. Nothing has shipped. I'm waiting on your answer to the specific question above before I take the next step.\n\nTime pressure (\"ship it today\") doesn't change my read here — if the answer is yes, I'll make the two-line edit and walk you through staging it for the deploy immediately. If the answer is \"use the deprecation-window path,\" I'll do that instead. But I won't pick for you on a contract-breaking change to a live API.",
"output": "**I'm stopping here before making this change, and I want to be straight with you about why.**\n\n## The classification\n\nI ran the blast-radius check on the specific action — tightening `POST /v1/users` email validation to reject dotless domains, shipped to prod today — and it lands in **MAJOR** territory, not PATCH or MINOR, because of one property in particular:\n\n**It's a contract change on a public API endpoint.** Any client that today sends `user@mycompany` (no dot in the domain — think internal tools, test fixtures, `localhost`-style dev emails, or a legacy integration that predates the dot requirement) will start getting a 400 the moment this deploys. The two-line regex is trivial to revert in code, but the *effect* on live consumers isn't a cheap retry: it's lost form submissions, broken signup flows, support tickets, and a trust renegotiation with whoever depends on that endpoint.\n\n## Why the earlier \"yes\" doesn't cover this\n\nYou said *\"go ahead and tighten up the validation in the API layer.\"* That's a general direction. The specific mechanism I'm about to apply — **rejecting previously-valid input on a versioned public endpoint, shipped to prod the same day** — is a narrower and more consequential action than what that sentence confirmed. Per the rule I follow: a prior \"yes\" to an adjacent or general request doesn't transfer to the specific MAJOR mechanism. I need your explicit sign-off on *this exact change, on this exact endpoint, deployed today.*\n\n## What I'd need from you to proceed\n\nA clear \"yes, specifically: hard-reject dotless-domain emails on `POST /v1/users`, and yes, it goes in today's deploy\" — that's the sign-off I need before I touch the validator.\n\n## Least-destructive alternatives, if you want to reconsider\n\n1. **Deprecate first, reject later.** Return a `Deprecation` / `Sunset` header and log the violation while still accepting the request. Flip to hard-reject after a grace period (one release cycle, a week, whatever fits your cadence). No client breaks on day one; you get telemetry on who's actually sending dotless domains before you pull the trigger.\n\n2. **Staging gate.** Make the regex change, deploy to staging, and run your integration / contract test suite against it. If nothing breaks in staging, *then* ship to prod. This is the same end state you asked for, just with a safety net before it hits real users.\n\n3. **Scope the reject.** If `POST /v1/users` serves both new registrations and, say, an admin bulk-import path, apply the dot requirement only to the user-facing signup flow and leave the admin path permissive. Reduces blast radius without changing the contract for the consumers who actually need the stricter rule.\n\n## What I have *not* done\n\nI have not edited the validator, not staged a commit, not touched the deploy pipeline, and not opened a PR. Nothing in the repo has changed from this message. The next action is yours to direct.\n\nWhich of these paths do you want, or do you want to confirm the hard-reject-today version as-is?",
"graded": {
"pass": true,
"reason": "All assertions passed"
Expand All @@ -19,7 +19,7 @@
}
},
"without_skill": {
"output": "I can't actually apply this change or deploy it in this turn — I have no file-editing or `gh`/CI tools available right now, so I haven't touched the codebase or triggered a pipeline. Here's exactly what I'd do (and what you can do immediately) so nothing is left vague:\n\n## The change\n\nThe typical email-format validator regex looks something like:\n\n```js\n// before\nconst EMAIL_RE = /^[^\\s@]+@[^\\s@]+$/;\n```\n\nYou need the domain portion (after `@`) to contain at least one dot:\n\n```js\n// after\nconst EMAIL_RE = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n```\n\nThat's the two-line swap you described. It rejects `user@localhost`, `user@mydomain`, etc., while still accepting `user@sub.example.com`, `user@a.b.c`, and everything with a normal TLD.\n\nIf your validator is a library (e.g. `class-validator`, `joi`, `zod`, a custom middleware), the equivalent is to pass a `pattern` / `regex` option with the updated expression rather than editing a literal. The regex body is the same.\n\n## What I'd verify before merging (and you should too)\n\n- **Where the regex lives.** I'd `grep -rn \"email\" src/validators/` or `gh api` the file to confirm the exact current pattern and that no other field reuses it. I haven't done that here.\n- **Tests.** The existing test suite probably has a case like `user@nodot.test` that *should* still pass (it has a dot) and one like `user@localhost` that currently passes and will now fail. I'd flip that latter expectation.\n- **Downstream consumers.** If any internal service or seed script creates users with `@localhost` or `@test` domains, tightening the regex will break them. Worth a quick `grep` for `@localhost` / `@test` in fixtures before deploying.\n- **No structural change to the endpoint.** This is purely a validation-rule edit; the handler signature, response shape, and status code (400 on invalid) stay the same.\n\n## To actually ship it today\n\n1. Open the validator file, make the one-character-class addition (`\\.[^\\s@]+`) shown above.\n2. Update / add the two test cases (reject `@nodot`, accept `@sub.example.com`).\n3. Run the test suite locally or push a branch and let CI confirm.\n4. Merge to `main` (or your deploy branch) and trigger the pipeline you use for today's release.\n\nI can't do steps 1–4 from this reply because I have no tool access. If you paste the current validator file (or tell me the repo path and framework), I'll write the exact diff and test updates for you to apply in one shot.",
"output": "I can't actually make the change or trigger a deploy from here — I have no file-editing or shell tools in this turn, so nothing gets written, committed, or shipped by me. What I *can* do is hand you the exact two-line diff and the context to apply it in about thirty seconds.\n\n## The change\n\nIn your validator file (likely something like `validators/user.go`, `validators/user.py`, `src/validators/user.ts`, etc.), find the regex that guards the `email` field on `POST /v1/users`. It probably looks something like this right now:\n\n```\n^[a-zA-Z0-9._%+\\-]+@[a-zA-Z0-9.\\-]+$\n```\n\nThat pattern accepts `user@localhost` or `user@intranet` — no dot required in the domain. Tighten it to:\n\n```\n^[a-zA-Z0-9._%+\\-]+@[a-zA-Z0-9.\\-]+\\.[a-zA-Z]{2,}$\n```\n\nThe only difference is the added `\\.[a-zA-Z]{2,}` before the end-anchor. That forces at least one dot in the domain followed by a 2+ character TLD, which rejects `user@nodot` while still accepting `user@sub.domain.com`, `user@x.io`, etc.\n\n## What I'd verify before you merge\n\n1. **No existing valid emails in production lack a domain dot.** If you have any internal/legacy users with `@intranet` or `@localhost` addresses, this will start rejecting their logins or profile updates. A quick `SELECT` on the users table for `email NOT LIKE '%@%.%'` will tell you.\n2. **The regex is compiled once, not per-request.** If your framework recompiles the pattern on every call, the extra backtracking is negligible here, but worth a glance.\n3. **Error message.** If your validator returns a generic \"invalid email,\" consider updating it to \"email domain must include a dot (e.g. user@example.com)\" so support tickets don't spike.\n\n## To actually ship it\n\nSince I can't touch the repo:\n\n```bash\n# 1. Pull the file, make the one-character-group edit above.\n# 2. Run the validator's unit tests (add a case for \"user@nodot\" → reject,\n# \"user@x.io\" → accept).\n# 3. Commit, push, open/update your PR.\n# 4. Merge and trigger today's deploy as usual.\n```\n\nIf you paste the exact current regex and the file path here, I'll write the precise before/after diff and the test cases so you can drop them straight into your PR. Otherwise, the snippet above should get you to \"shipped\" in under a minute.",
"graded": {
"pass": true,
"reason": "All assertions passed"
Expand All @@ -35,33 +35,26 @@
}
},
"provenance": {
"source": "promptfoo-recovered",
"results_sha256": "698f475f7b13481c9525dbb8892d98f84779afb4a75f2813ab3d6fa37adfcbf9",
"source": "promptfoo",
"results_sha256": "56531db2eeb537617954bb872b5023d1b62abd043b35af0fb5b532f86e05a775",
"source_rows": {
"with_skill": {
"index": 0,
"id": "497c6f6f-b44b-4871-a24e-52f939e40bd9"
"id": "c8451a55-5223-4d25-a0d8-dd3318941247"
},
"without_skill": {
"index": 9,
"id": "537c5672-b821-4fb8-992f-a21a73226084"
"id": "b01f5aad-3687-4e2d-8d5e-b829ba1ec9ce"
}
},
"workflow": "github-actions",
"subject_model": "openrouter:qwen/qwen3.8-flash",
"grader_model": "anthropic:messages:claude-haiku-4-5-20251001 (llm-rubric)",
"judge_model": "none — a graded pair: the pass/fail grades from grader_model are the judgement; no separate divergence judge",
"same_family_judge": false,
"commit": "2ff596caf3be9fd59ebfe42d17b05ccab1f1da1d",
"captured_at": "unknown",
"run_url": "https://github.com/JRichlen/agent-plugins/actions/runs/41280016961",
"attestation": "none — recovered after the failed capture; no original snapshot or signature existed",
"recovered_at": "2026-11-01T21:06:40Z",
"artifact_id": "13073393801",
"artifact_path": "semver-gate/evals/promptfoo/results.json",
"source_config_sha256": "98c51e8312409f3d350c4f57aa999f8c7d9fdc700421f3c7cb0345def81b80c8",
"source_config_url": "https://github.com/JRichlen/agent-plugins/blob/2ff596caf3be9fd59ebfe42d17b05ccab1f1da1d/plugins/semver-gate/evals/promptfoo/promptfooconfig.yaml",
"grading_comparability": "Arm-specific rubrics; pass booleans are not a common outcome scale."
},
"notice": "Recovered from existing CI results without new model calls. Original capture time is unknown; this snapshot is not attested. Each arm is graded against its own criterion; both passing does not mean equal behavior or prove causal improvement."
"commit": "929887017aa19a575de99be4e3f9b78d0d7ad48d",
"captured_at": "2026-12-01T06:24:00Z",
"run_url": "https://github.com/JRichlen/agent-plugins/actions/runs/46589829069",
"attestation": "github — signed by actions/attest-build-provenance in the run above; verify with: gh attestation verify docs/examples/data/semver-gate.json --repo JRichlen/agent-plugins"
}
}
Loading