From 90db570c2164605c3efa76e463bb1206b3a66652 Mon Sep 17 00:00:00 2001 From: Peter Guy Date: Tue, 1 Sep 2026 16:37:43 -0700 Subject: [PATCH 1/2] clarify the scripted nature of the model --- README.md | 2 +- model.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d2e52f3..6217c87 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ A small Go HTTP service that answers questions about a sample repository by asking a model to call code-search and file-reading tools. -The included model is deterministic. It keeps the exercise reproducible and removes the need for API keys, while preserving the control flow of a tool-using agent. +The included model (`scriptedModel`) is a deterministic test double. Its scripted responses keep the exercise reproducible and remove the need for API keys while preserving the control flow of a tool-using agent. It is not intended to simulate or be improved as a language model; focus on the agent harness and its behavior around the model boundary. The candidate is required to use an agentic coding assistant (Amp, Claude Code, Codex, Cursor, etc.) during the interview. diff --git a/model.go b/model.go index 563e774..2a1aacc 100644 --- a/model.go +++ b/model.go @@ -28,12 +28,12 @@ func (u *usage) add(other usage) { u.CostUSD += other.CostUSD } -// demoModel stands in for a hosted model so the interview is deterministic and -// does not require credentials. Its responses exercise the same model boundary -// as a production implementation. -type demoModel struct{} +// scriptedModel stands in for a hosted model so the interview is deterministic +// and does not require credentials. +// Its responses exercise the same model boundary as a production implementation. +type scriptedModel struct{} -func (demoModel) next(ctx context.Context, question string, results []toolResult) (modelResponse, error) { +func (scriptedModel) next(ctx context.Context, question string, results []toolResult) (modelResponse, error) { if err := ctx.Err(); err != nil { return modelResponse{}, err } From 3bfb4a30987c2ff49b91cf0bb3e105d302a3bd74 Mon Sep 17 00:00:00 2001 From: Peter Guy Date: Tue, 1 Sep 2026 16:43:21 -0700 Subject: [PATCH 2/2] ...must save before committing... --- agent_test.go | 2 +- main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/agent_test.go b/agent_test.go index b6d4c68..a727de9 100644 --- a/agent_test.go +++ b/agent_test.go @@ -6,7 +6,7 @@ import ( ) func TestAgentAnswersAfterOneToolCall(t *testing.T) { - agent := newAgent(demoModel{}, newTools("sample-repo")) + agent := newAgent(scriptedModel{}, newTools("sample-repo")) result, err := agent.run(context.Background(), "Where is ErrUnauthorized defined?") if err != nil { diff --git a/main.go b/main.go index 7ef8ed7..626d578 100644 --- a/main.go +++ b/main.go @@ -23,7 +23,7 @@ func main() { log.Fatalf("resolve root: %v", err) } - agent := newAgent(demoModel{}, newTools(absRoot)) + agent := newAgent(scriptedModel{}, newTools(absRoot)) mux := http.NewServeMux() mux.HandleFunc("POST /answer", func(w http.ResponseWriter, r *http.Request) { var req answerRequest