Skip to content

Publish gate · task 4

The 30-question test

Thirty fictional questions, written the way reps ask, each tied to the approved line a good answer must contain. An answer counts as on method only if it contains that line word for word (ignoring case, spacing and punctuation) or quotes the right source line exactly. Naming the method is not enough. Publishing is blocked below 24/30, if the score drops from the last approved run, or if more questions get a wrong approved line.

The answer bank never contains the test questions or near copies of them: a unit test checks it, and the publish build runs the unit tests. With the copies removed the suite still scores 28/30.

Gate decision

Answer bank first, then line retrieval

28/30

answers fully on method

  • Passed:At or above the threshold (24/30)
  • Passed:Same or better than the last approved score (28)
  • Passed:No more wrong-line answers than last time (0)

Gate: publish allowed

Scored when this page was built. Re-run calls /api/eval, which runs every question through the live coach code.

Each change, measured

Same questions, same scorer, three versions of the pipeline. Select one to see its answers.

Beyond the 30: held-out phrasings and questions to decline

A reviewer wrote these after the bank was built; nothing in the bank was copied from them. They show how the coach behaves on wording it has not seen. Not answering is fine here; a wrong approved line is the failure that counts.

Held-out phrasings
24/45 on method
11 asked which one (10 offered the right line) · 10 declined · 0 wrong line
Should be declined
21/21 declined
Off-topic and near-miss questions · 0 answered with a line

Every question and answer

  • Q01The prospect says our price is way too high. What do I say?

    On methodContains OBJ-1.2 word for word

    Answer bank · OBJ-1.2 · expected OBJ-1.2

  • Q02They told me there's no budget for this until next year.

    On methodContains OBJ-2.2 word for word

    Answer bank · OBJ-2.2 · expected OBJ-2.2

  • Q03Customer keeps asking me to just email over some info.

    On methodContains OBJ-3.2 word for word

    Answer bank · OBJ-3.2 · expected OBJ-3.2

  • Q04We're good, we already work with someone for that.

    On methodContains OBJ-4.2 word for word

    Retrieval · OBJ-4.2 · expected OBJ-4.2

  • Q05She needs to run it by her boss before anything happens.

    On methodContains OBJ-5.2 word for word

    Answer bank · OBJ-5.2 · expected OBJ-5.2

  • Q06He told me to call him back next quarter.

    On methodContains OBJ-6.2 word for word

    Answer bank · OBJ-6.2 · expected OBJ-6.2

  • Q07They tried a tool like ours two years ago and it failed.

    On methodContains OBJ-7.2 word for word

    Answer bank · OBJ-7.2 · expected OBJ-7.2

  • Q08A competitor quoted them a lower number than us.

    On methodContains OBJ-8.2 word for word

    Answer bank · OBJ-8.2 · expected OBJ-8.2

  • Q09She said she wants to sleep on it.

    DeclinedDeclined: no approved line returned

    Declined · – · expected OBJ-9.2

  • Q10Cold call, and the guy says he's not interested.

    On methodContains OBJ-10.2 word for word

    Answer bank · OBJ-10.2 · expected OBJ-10.2

  • Q11They're locked into a contract with another company until spring.

    On methodContains OBJ-11.2 word for word

    Answer bank · OBJ-11.2 · expected OBJ-11.2

  • Q12Guy picked up and said bad time, he's slammed.

    On methodContains OBJ-12.2 word for word

    Answer bank · OBJ-12.2 · expected OBJ-12.2

  • Q13What should my follow-up email say after a first call?

    On methodContains EML-1.2 word for word

    Answer bank · EML-1.2 · expected EML-1.2

  • Q14Prospect has gone dark since the demo. What now?

    DeclinedDeclined: no approved line returned

    Declined · – · expected EML-3.2

  • Q15I sent a proposal last week and heard nothing back.

    On methodContains EML-4.2 word for word

    Answer bank · EML-4.2 · expected EML-4.2

  • Q16How do I reply when someone emails asking for pricing?

    On methodContains EML-7.2 word for word

    Answer bank · EML-7.2 · expected EML-7.2

  • Q17What's a good way to open a cold call?

    On methodContains OPN-1.2 word for word

    Answer bank · OPN-1.2 · expected OPN-1.2

  • Q18The receptionist asks what the call is regarding.

    On methodContains OPN-2.2 word for word

    Answer bank · OPN-2.2 · expected OPN-2.2

  • Q19How do I ask for the next step at the end of a meeting?

    On methodContains CLS-1.2 word for word

    Answer bank · CLS-1.2 · expected CLS-1.2

  • Q20The buyer is pushing hard for a discount.

    On methodContains CLS-4.2 word for word

    Answer bank · CLS-4.2 · expected CLS-4.2

  • Q21What do I write in a recap email after a demo?

    On methodContains EML-2.2 word for word

    Retrieval · EML-2.2 · expected EML-2.2

  • Q22Write a first email to a prospect who has never heard of us.

    On methodContains EML-5.2 word for word

    Retrieval · EML-5.2 · expected EML-5.2

  • Q23How do I ask a customer to introduce me to someone they know?

    On methodContains EML-6.2 word for word

    Retrieval · EML-6.2 · expected EML-6.2

  • Q24What should I say when I get their voicemail?

    On methodContains OPN-3.2 word for word

    Retrieval · OPN-3.2 · expected OPN-3.2

  • Q25What discovery question shows what doing nothing will cost them?

    On methodContains OPN-4.2 word for word

    Retrieval · OPN-4.2 · expected OPN-4.2

  • Q26How do I find out who else is involved in the decision?

    On methodContains OPN-5.2 word for word

    Retrieval · OPN-5.2 · expected OPN-5.2

  • Q27How do I confirm who does what before we hang up?

    On methodContains CLS-2.2 word for word

    Retrieval · CLS-2.2 · expected CLS-2.2

  • Q28Email to confirm tomorrow's meeting.

    On methodContains EML-8.2 word for word

    Retrieval · EML-8.2 · expected EML-8.2

  • Q29pirce is to hihg they say

    On methodContains OBJ-1.2 word for word

    Answer bank · OBJ-1.2 · expected OBJ-1.2

  • Q30They like it, but money is tight and their boss decides.

    On methodContains OBJ-2.2 word for word

    Answer bank · OBJ-2.2 · expected OBJ-2.2

Run it before every publish

On Replit

Replit runs the [deployment] build command from .replit before it publishes. Putting the test in that command means a failing score fails the build, so pressing Publish cannot ship it.

.replit
# The publish gate, as it would sit in the coach's own .replit.
# Replit runs [deployment] build before every publish. If any step fails
# (a unit test, the build, or the 30-question test), nothing is published.
run = "pnpm dev"

[deployment]
build = "pnpm install --frozen-lockfile && pnpm test && pnpm build && pnpm eval --threshold 24 --baseline eval/baseline.json"
run = "pnpm start"

A GitHub Actions workflow that runs the same checks on every pull request is an optional extra. In this demo repo it runs on every push to main; its deploy step only runs by hand and skips itself when no deploy token is set.

See the workflow file
.github/workflows/publish-gate.yml
name: Publish gate

on:
  pull_request:
  push:
    branches: [main]
  workflow_dispatch:

concurrency:
  group: publish-gate-${{ github.ref }}
  cancel-in-progress: true

jobs:
  gate:
    name: Checks and the 30-question test
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - uses: actions/checkout@v4
      - uses: pnpm/action-setup@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22
          cache: pnpm
      - run: pnpm install --frozen-lockfile
      - run: pnpm lint
      - run: pnpm typecheck
      - run: pnpm test
      - run: pnpm build
      - name: The 30-question test against the built app
        run: |
          pnpm start &
          for i in $(seq 1 30); do curl -fs "http://localhost:3203/api/ask?q=ping" >/dev/null && break; sleep 1; done
          pnpm eval --url http://localhost:3203 --threshold 24 --baseline eval/baseline.json

  publish:
    name: Publish (run by hand)
    needs: gate
    # Only when started by hand on main, so a push never tries to deploy.
    if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main'
    runs-on: ubuntu-latest
    env:
      VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
      VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
      VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
    steps:
      - uses: actions/checkout@v4
      - name: No deploy token set
        if: env.VERCEL_TOKEN == ''
        run: echo "VERCEL_TOKEN is not set, so there is nothing to deploy to. The gate above still ran."
      - name: Deploy only after the gate passed
        if: env.VERCEL_TOKEN != ''
        run: npx vercel@53 deploy --prod --yes --token "$VERCEL_TOKEN"

From the command line

pnpm eval
Runs the 30 questions, the held-out phrasings and the decline set in-process. Exits 0 when the gate passes.
pnpm eval --url http://localhost:3203
The same questions against a running build over HTTP, the way a publish step would.
pnpm eval --pipeline paraphrase-no-guard
A bad change on purpose: the score drops and the command exits 1.
pnpm eval --update-baseline
Records a new approved run, only when the gate passes.

Exit codes: 0 when the gate passes, 1 when it blocks, 2 for a typo in the options or a missing baseline file. A typo never turns a check off.

The 2 misses are real gaps, not noise: “She said she wants to sleep on it.” and “Prospect has gone dark since the demo. What now?” use idioms the bank does not cover yet, so the coach declines instead of guessing. The fix is a new phrasing for the trainer to approve, then a re-run.

With the real model

This demo's answers are fixed, so every run scores the same. With your model in the loop, three things change:

  • It spends the reps' budget. One run is 30 × 15,000 = 450,000 tokens: about 15 minutes of an assumed 30,000-token-per-minute limit (4.5 minutes with smaller prompts). Send it through the retry queue on a separate key or project, or off-peak, so it cannot starve live reps.
  • Answers can vary run to run. Use temperature 0 for the test, and ask each off-method question once more before blocking (--recheck), so one unlucky sample does not stop a good publish.
  • The key must be there at build time. On Replit, the deployment's secrets need to be available to the build step that runs the test.