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/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 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 }