Scout / Documentation

Current runtime, from request to release.

These docs describe the Scout engine as it exists inside ProjectHub Recruiter Alpha today. They separate released production behavior from integrated development behavior and historical records. Source code and current runtime configuration take precedence when older prose describes a superseded model or path.

Production modelLlama 3.1 8B Fast
RetrievalLocal BM25 + contextual RRF
Response contract15 seconds end to end
Docs verified againstmaster 7d011708 · develop e74ac22b · same tree
No documentation section matches that filter.
01 / Overview

What these docs describe.

Scout is the intelligence and orchestration layer currently used by ProjectHub Recruiter Alpha. The public implementation combines deterministic query/state/evidence handling with a generative language layer and post-generation factual validation.

Current production reference: the released runtime uses Cloudflare Workers AI with @cf/meta/llama-3.1-8b-instruct-fast for normal generation, while retrieval, session handling, evidence selection, tools, validation, telemetry, and persistence run in ProjectHub's backend process.

Evidence order

ProjectHub has moved quickly enough that some checked-in reports describe earlier Ollama-only phases. This documentation uses the following precedence when sources disagree:

  1. Executable source and current runtime configuration.
  2. Production runtime facts in data/scout-runtime-knowledge.json.
  3. Current master/develop documentation when it matches the code it describes.
  4. Dated QA, qualification, and handoff reports as historical evidence only.
September 15 released source: PR #31 integrated semantic-reliability and tenant-portability into develop@e74ac22b; PR #32 promoted the exact tree 92b4d149 to master@7d011708. The released runtime includes structured semantic query plans, canonical identity precedence, answer obligations/completeness checks, proposition-scoped validation, and empty-KB portability coverage. Deterministic verification reached 1452/1452 tests and Recall@6 1.000.
September 5 released source: production b071e4e4 and protected integration 4f5ee971 have different Git ancestry but the same Git tree a0066cc8. ProjectHub-dev records 4f5ee971 as its staging source. PR #29 used an ancestry-preserving release commit rather than forcing the conflicting direct develop→master PR #25.
Historical development note: the September 5 discourse branch described below was an intermediate post-release checkpoint. Its conversation-state ideas were subsequently expanded through later integration work; the current released source is the September 15 tree documented above.
02 / Current scope

What is shipped and what is not.

Released application

ProjectHub Recruiter Alpha

Answers from Bradley Matera's verified professional information and can explain Scout's own runtime. The public widget is the concrete production use of Scout today.

Released Core foundation

Tenant-neutral Scout Core

Empty/no-KB behavior, canonical identity resolution, structured semantic planning, and portable entity/property handling are now part of the released runtime. Formal domain-package contracts, reusable workflow packages, and self-service installation remain productization work.

Not currently represented as shipped: a public npm package, generic customer SDK, multi-tenant API-key product, arbitrary business domain installer, or self-service customer knowledge-package system.

The architecture is being pushed toward portability, but these docs describe the implementation that can be inspected and tested now rather than the intended end state.

03 / Quickstart

Run the current public implementation.

The released browser widget is a single JavaScript artifact hosted on GitHub Pages. Embedding it loads the ProjectHub UI and connects recruiter-style questions to the ProjectHub backend.

HTML / current public widget
<script src="https://bradleymatera.github.io/ProjectHub/ProjectHub.js"></script>
This is ProjectHub's production embed, not a generic Scout installer. It carries the current recruiter application behavior and knowledge contract.

Local repository quickstart

Shell
git clone https://github.com/BradleyMatera/ProjectHub.git
cd ProjectHub
npm ci
npm test
npm run eval-retrieval
npm run build
node --check server-gemini.js
04 / Architecture

Runtime boundaries.

Scout does not send an entire knowledge base to a model and hope the model behaves. Deterministic backend stages prepare the request and evidence first; the model is used for language generation inside that boundary.

Scout request pipeline from browser widget through Express API, query understanding, BM25 and RRF retrieval, response contracts, model generation, validation, and telemetry.
System overview. This diagram is a visual summary; the request-lifecycle text and linked source files below define the exact current behavior.
Browser widgetVanilla JavaScript UI hosted from GitHub Pages creates the session and sends the user's message/history to the backend.
Express APIApplies CORS, request-size limits, chat rate limiting, deadline handling, knowledge loading, and build/runtime instrumentation.
Control or substantive routingConversation-control intents can bypass normal retrieval. Substantive questions continue into query understanding and evidence retrieval.
Query understanding + BM25/RRFNormalizes the question, protects terms, handles typos/context, and retrieves verified chunks locally.
Response contract + toolsCreates semantic answer constraints and, when needed, executes allowlisted read-only evidence tools.
GenerationCurrent production generation is routed to Cloudflare Workers AI. The model receives bounded evidence and response instructions rather than unrestricted application state.
Validation / repairGenerated claims are checked against evidence and semantic constraints. Invalid output is repaired or rejected rather than silently accepted.
Reply + telemetryThe response includes provider/model/provenance information and records retrieval/generation/latency/accounting data used by diagnostics.
05 / Request lifecycle

How one message is processed.

Validate input and apply request controls./api/chat is rate-limited by IP. JSON bodies are capped by Express and messages are bounded before deeper processing.
Load verified knowledge and recent context.The backend uses bundled recruiter knowledge plus server-owned state and recent sanitized turns.
Classify response policy.Greetings, thanks, profile updates/queries, help, small talk and similar conversational-control turns can take a compact fact-free route.
Resolve the substantive query.For evidence-bearing questions, query understanding normalizes and rewrites the message using recent context.
Retrieve up to ten candidates.The current RAG-first server path requests BM25/RRF evidence candidates before invoking the generative agent.
Build semantic constraints.The response contract establishes intent, fact state, answer polarity, evidence strength, claim ceiling, boundaries, and forbidden claims.
Generate, validate, and optionally repair.Generation runs inside the request deadline. Validation must accept the answer before it is shaped for the final response.
Persist short-lived conversation state and telemetry.The backend updates session state, response cache where eligible, topic/provider metrics, and the result's provenance metadata.
Deadline: current runtime facts and server health configuration use a 15,000 ms request contract, with the model generation timeout kept inside that envelope.
06 / Retrieval

Local lexical retrieval before generation.

Verified application knowledge is flattened into searchable RAG chunks. Okapi BM25 scores those chunks locally. Context-bearing questions can combine literal, expanded, and rewritten query views using Reciprocal Rank Fusion.

Scout retrieval pipeline from structured knowledge to RAG chunks, tokenization, BM25 ranking, RRF fusion, and the selected evidence pack, including the BM25 and RRF equations.
Retrieval overview. BM25 and RRF are deterministic information-retrieval algorithms, not neural-network inference. The Learn Scout guide contains the full worked math and implementation limitations.
Index

BM25

Lexical relevance scoring over bundled verified knowledge. No hosted vector database is required for the current corpus.

Context

Query understanding

Normalizes input, protects technology terms, corrects common typos, classifies intent, and can rewrite follow-ups.

Fusion

RRF

Contextual follow-ups can fuse multiple BM25 rankings; standalone queries can retain direct BM25 when it ranks better.

Reproduce the retrieval benchmark

Shell
npm run test:retrieval
npm run eval-retrieval

The checked-in 40-query golden set has a documented Recall@6 of 1.000 and MRR@6 of 0.971. CI independently rejects a retrieval run if Recall@6 falls below 0.90. Treat the benchmark as a scoped retrieval measurement, not as an end-to-end answer-accuracy percentage.

07 / Session state

Conversation context is server-owned.

The current runtime does not rely only on raw transcript text. It maintains structured session state so follow-ups can refer to previously discussed projects, roles, comparisons, names, and unresolved references.

Scout server-owned session state storing active context and recent turns so a follow-up reference can be resolved to the current project or entity.
Illustrative follow-up. Names and questions in the diagram are examples; the state fields, TTL, and resolver behavior are documented in the surrounding section and source.
StatePurpose
Recent turnsFive recent compact/sanitized user and assistant turns are used for bounded conversational context.
Topic / intentTracks what the conversation is about so short follow-ups are not interpreted in isolation.
Projects / comparisonsMaintains active and comparison entities for phrases such as “that project” or “the other one.”
Job / role contextPreserves the requested role or job context for fit/evidence questions.
User profile stateConversation-control intents can commit visitor name/profile state before generation.
Unresolved referencesAllows the runtime to distinguish a missing referent from evidence that actually says “no.”
State is not evidence. Conversation state tells Scout what a user is referring to; verified knowledge and tool/retrieval evidence determine whether a factual claim is supported.
Integrated September 15: the discourse-frame work previously tracked as feat/generic-conversation-sets@cddb3bc (server-owned discourse frames, generated clarification, CLARIFICATION control mode) shipped through PR #31 and is in production master@7d011708.
08 / Response contracts

Semantic constraints before prose.

A response contract describes what an answer is allowed to mean before the final language is generated. This is separate from style or phrasing.

Scout response-contract pipeline showing request intent, TRUE FALSE UNKNOWN fact state, required entities, claim ceiling, read-only evidence tools, answer shape, and the bounded model packet.
Response-planning overview. A contract narrows what generation is supposed to say; it does not replace post-generation validation or guarantee correctness by itself.
Fact state

TRUE / FALSE / UNKNOWN

Open-world claims are not supposed to become false simply because the knowledge base does not contain evidence for them.

Direct answer

Polarity

Captures answer direction such as YES, NO, MIXED, FIT, PARTIAL_FIT, NOT_FIT, or UNKNOWN where applicable.

Evidence rules

Strength and boundaries

Ranks relevant facts, identifies required entities, and carries important limitations the answer must preserve.

Claim controls

Ceilings / forbidden claims

Constrains seniority, unsupported relationships, false premises, and other claims that must not survive generation.

Why UNKNOWN matters: “there is no verified evidence that he worked at Company X” is different from “he never worked at Company X.” The strict-correction work in the repository exists because older paths sometimes collapsed that distinction.
09 / Evidence tools

Allowlisted, read-only functions.

The current tool layer gathers structured evidence. It does not expose arbitrary shell execution or write access to external business systems.

ToolCurrent purpose
search_portfolioSearch verified projects, experience, skills, and certifications for recruiter evidence.
get_projectReturn verified details for one named project.
compare_projectsCompare two to four verified projects by purpose, technology, category, and public URL.
match_roleMatch a role or pasted job description against verified skills, experience, projects, and gaps.
get_candidate_profileReturn a selected verified profile section without exposing private/sensitive profile data.
get_skill_evidenceClassify evidence for whether a technology or skill is directly supported, adjacent, or unknown.
build_recruiter_briefAssemble a structured recruiter-facing brief from verified data.
Tool output is enrichment. In the current RAG-first integrated path, structured tools can add evidence but do not replace retrieval as the primary answer context.
10 / Inference

Swappable generation behind one router.

The generative boundary lives behind lib/local-model-router.js. Application orchestration calls the router rather than coding directly against one provider.

PathStatusBehavior
Cloudflare Workers AIProductionNormal production generation using @cf/meta/llama-3.1-8b-instruct-fast.
OllamaDev / evalCurrent local development/evaluation model is qwen2.5:1.5b.
Cloudflare → Ollama fallbackGatedDisabled by default when Cloudflare is primary. Requires explicit fallback enablement and SCOUT_OLLAMA_QUALIFIED=true.
Browser WebGPU generationExperimentalClient packet/validation routes exist for experimentation; browser-side generation is not the production primary path.

Cloudflare allocation behavior

The current provider adapter records a Workers AI free allocation of 10,000 neurons/day. That is a shared account allocation, not a per-user allowance. The adapter recognizes allocation exhaustion and does not silently switch to paid-only models.

No “unlimited AI” claim: Scout is engineered to fit current free allocations for the public deployment, but model usage is measurable and provider limits can be exhausted or changed.
Current released generation settings: normal RAG/LITE generation passes temperature 0 with top-p 0.9. The Cloudflare adapter also defaults to temperature 0. Cloudflare-primary Ollama fallback remains disabled by default and requires explicit fallback enablement plus SCOUT_OLLAMA_QUALIFIED=true.
Exact-model accounting: Scout uses @cf/meta/llama-3.1-8b-instruct-fast. Cloudflare does not publish a token-to-neuron rate for that exact identifier on its current pricing table. Token-derived neuron usage is therefore unknown / unverified unless the provider supplies actual neuron usage. The published 4,119 / 34,868 rates belong to @cf/meta/llama-3.1-8b-instruct-fp8-fast.
11 / Validation

Generated text is not accepted just because the model returned it.

Scout checks the generated reply against retrieved/structured evidence and the response contract. The validator is responsible for rejecting unsupported factual content, not for making the prose sound nicer.

Scout validation pipeline checking generated text for entity, number, relationship, polarity, provenance, whole-token skill evidence, and other claim constraints before pass, repair, or rejection.
Validation overview. Individual validators and failure reasons evolve on develop; the linked validator source and current gate reports remain the authority for exact checks.
Grounding

Entities and numbers

Checks named entities and numeric claims against the evidence supplied to the answer path.

Relationships

Project / technology provenance

Prevents a real technology from being attached to the wrong project or experience merely because both exist somewhere in the corpus.

Semantics

Polarity and negation

Checks whether generated meaning matches TRUE/FALSE/UNKNOWN evidence and expected answer direction.

Boundaries

Overclaim / seniority

Rejects inflated titles, unsupported experience levels, and prohibited claim patterns.

Recovery

Repair attempt

Invalid primary generation can be sent through a constrained repair path. Repair is still validated before acceptance.

Failure

Typed technical error

If reliable generative output cannot be produced, the server can return an INFERENCE_UNAVAILABLE / TECHNICAL_ERROR result rather than inventing a factual answer.

Prose provenance

proseSourceMeaning
MODEL_GENERATIONThe visible conversational answer was generated by the configured model from bounded context and passed the runtime checks.
DIRECT_KBCanonical verified knowledge supplied a direct answer path without model-authored prose for that response.
TECHNICAL_ERRORThe infrastructure/generation path could not produce a reliable answer. This is an error state, not evidence about the user or domain.
12 / Widget

Browser integration.

The current ProjectHub frontend is deliberately lightweight: vanilla JavaScript source modules are assembled into one embeddable ProjectHub.js artifact. The widget owns UI/session behavior; the backend remains authoritative for knowledge retrieval, evidence, inference, validation, and structured state.

Source modules

data.js · utils.js · logic.js · ui.js

The committed single-file artifact is checked in CI to make sure it matches these source modules.

Hosting

GitHub Pages

The public widget is served from the ProjectHub GitHub Pages deployment; staging uses the ProjectHub-dev mirror.

Released September widget behavior: initialization is guarded against duplicate/reentrant setup and can roll back partial DOM/listener setup before retry. The composer stays usable while Scout replies; a submitted follow-up can queue; auto-scroll follows only when the user was already near the bottom.
13 / API

Current application interface.

The production ProjectHub backend is reachable at https://projecthub-chat.bradleymatera.dev. These endpoints describe the current application implementation; they are not a public multi-tenant API-key/SLA product.

Method / routePurpose
GET /Basic service identity/status.
GET /health/liveLiveness probe. Confirms the process is alive.
GET /health/readyReadiness probe. Returns ready only after the model path and knowledge are verified/loaded.
GET /healthDetailed runtime/build/provider/state/telemetry snapshot.
POST /api/chatMain conversation endpoint used by the widget.
POST /api/client-packetExperimental browser-local mode: prepares a client-safe evidence packet and temporary run ID.
POST /api/client-validateExperimental browser-local mode: validates a browser-generated answer against the same server-held evidence.
GET /api/chat-logOperational chat-log view used by current backend diagnostics.

Chat request

JSON
{
  "message": "Which project best demonstrates AWS experience?",
  "sessionId": "per-tab-session-id",
  "history": [
    {
      "user": "What is Bradley strongest at?",
      "assistant": "..."
    }
  ]
}

Response fields to inspect

JSON / abbreviated
{
  "ok": true,
  "reply": "...",
  "provider": "cloudflare",
  "model": "@cf/meta/llama-3.1-8b-instruct-fast",
  "proseSource": "MODEL_GENERATION",
  "pipeline": ["..."],
  "contract": {
    "intent": "...",
    "directAnswer": "...",
    "factState": "..."
  },
  "agent": {
    "retrievalCandidates": [],
    "selectedEvidence": [],
    "generationCalls": []
  },
  "sessionMemory": {
    "turns": 5,
    "retained": true
  }
}
Exact response shape is implementation-level and can evolve. Consumers should not infer factual correctness from HTTP 200 alone; inspect ok, proseSource, provider/model, contract, and failure fields.
Open full API page
14 / Telemetry

Inspect what produced the answer.

The runtime exposes enough metadata to distinguish retrieval, generation, validation, model/provider use, build provenance, and usage accounting.

SignalWhat it tells you
Build sourceRepository, branch, and commit recorded by deployment/build provenance.
Provider / modelWhich inference backend/model was configured or actually called.
Generation callsAttempt index/type, success, accepted state, model, tokens, actual neurons when supplied, and an exact-model estimate only when a verified rate exists.
Retrieval candidatesEvidence candidates considered before final selection.
Selected evidenceThe smaller evidence set passed into the RAG synthesis path.
ValidationValidator verdict/outcome and repair/failure information.
LatencyProvider and total request timings used to enforce/inspect the response contract.
Cost ledgerOptional accounting of LLM-adjacent events, token usage, provider-reported neuron usage when available, exact-model estimates when verified, unknown/unpriced markers when not verified, and response egress when enabled.
Shell / health
curl https://projecthub-chat.bradleymatera.dev/health
curl https://projecthub-chat.bradleymatera.dev/health/live
curl https://projecthub-chat.bradleymatera.dev/health/ready
15 / Configuration

Runtime controls.

Production secrets are not committed. The table below documents the important configuration surfaces visible in the current source. Defaults can differ between development examples and deployed production environment values.

VariableMeaningCurrent/source default
PORTExpress port.3000
HOSTBind host.127.0.0.1
KNOWLEDGE_FILEBundled knowledge JSON path.data/recruiter-knowledge.json
ALLOWED_ORIGINSComma-separated browser origins accepted by CORS.Environment-specific
RATE_LIMIT_MAXMaximum chat requests per minute per IP.20
USE_BM25_RETRIEVALEnable local BM25 retrieval.Enabled unless set to false
SCOUT_AGENT_MODESelects lite/full/legacy execution mode. Release work targets lite mode.Deployment-configured
SCOUT_INFERENCE_PROVIDERcloudflare, ollama, or auto.auto in router
CLOUDFLARE_ACCOUNT_IDWorkers AI account ID.Required for Cloudflare path
CLOUDFLARE_API_TOKENWorkers AI API token.Required for Cloudflare path
CLOUDFLARE_MODELWorkers AI model name.@cf/meta/llama-3.1-8b-instruct-fast
OLLAMA_URLLocal/container Ollama endpoint.http://localhost:11434
OLLAMA_MODELLocal development/eval model.qwen2.5:1.5b in router
SCOUT_OLLAMA_PRODUCTION_FALLBACK_ENABLEDExplicitly opts Cloudflare-primary runtime into Ollama emergency fallback.Disabled
SCOUT_OLLAMA_QUALIFIEDSecond gate required before production Ollama fallback can be used.Disabled
REQUEST_DEADLINE_MSEnd-to-end request deadline.15000
GEN_TIMEOUT_MSGeneration timeout inside the request envelope.12500
COST_TRACKEREnable cost/usage ledger persistence.Off unless true
FEATURE_PREVIEW_ENABLEDExpose the private preview static route on the preview environment.Off unless true
Do not copy the development example into production without review. The repository's example env file still contains settings from earlier local-model development phases. Use current router/server source and deployment configuration as the authority for production.
16 / Local development

Run Scout from the repository.

Cloudflare-backed development

.env / example values only
PORT=3000
HOST=127.0.0.1
SCOUT_AGENT_MODE=lite
SCOUT_INFERENCE_PROVIDER=cloudflare
CLOUDFLARE_ACCOUNT_ID=your-account-id
CLOUDFLARE_API_TOKEN=your-api-token
CLOUDFLARE_MODEL=@cf/meta/llama-3.1-8b-instruct-fast
REQUEST_DEADLINE_MS=15000
GEN_TIMEOUT_MS=12500
USE_BM25_RETRIEVAL=true
RATE_LIMIT_MAX=20

Ollama development/evaluation

Shell + .env
ollama pull qwen2.5:1.5b

# .env
SCOUT_AGENT_MODE=lite
SCOUT_INFERENCE_PROVIDER=ollama
OLLAMA_URL=http://127.0.0.1:11434
OLLAMA_MODEL=qwen2.5:1.5b
REQUEST_DEADLINE_MS=15000
USE_BM25_RETRIEVAL=true

Start and inspect

Shell
node server-gemini.js

curl http://127.0.0.1:3000/health/live
curl http://127.0.0.1:3000/health/ready
curl http://127.0.0.1:3000/health
Never commit .env. Cloudflare account IDs/tokens and any other secrets belong in the deployment environment or local ignored files.
17 / Docker

Production-parity container testing.

The repository includes a Docker path intended to make backend/inference testing reproducible without relying on whatever happens to be installed on the host.

Shell
docker compose up --build -d

curl http://localhost:3000/health

docker compose run --rm test-runner npm test
Deployment transition: the canonical release spec says the existing SCP-style deploy-gcp.sh path is legacy and is intended to be replaced by qualified Docker image deployment. Do not describe the migration as already complete.
18 / Tests and evals

Commands that can be rerun.

The documentation avoids turning one historic score into a general quality claim. The useful part is the checked-in test/eval surface and the commands needed to reproduce a result.

CommandCoverage
npm testNode unit test suite under test/**/*.test.js.
npm run test:retrievalBM25, query-understanding, and RRF unit tests.
npm run eval-retrieval40-query golden retrieval evaluation.
npm run eval:local-apiAPI acceptance/evaluation runner against a configured local target.
npm run eval:scoutScout evaluation harness.
npm run eval:toolsTool-selection evaluation.
npm run eval:conversationConversation behavior evaluation.
npm run eval:production-conversationsPython production-conversation regression harness.
npm run buildVite/analytics build freshness.
node --check server-gemini.jsServer syntax check.

CI checks on develop / pull requests

  • Production dependency audit at high severity.
  • Analytics build and committed bundle freshness.
  • ProjectHub.js bundle freshness against source modules.
  • Server/workspace/analytics syntax checks.
  • Cost-ledger and retrieval unit tests.
  • Retrieval evaluation plus a Recall@6 ≥ 0.90 gate.
  • Knowledge JSON parse/required-key validation.
  • Committed secret-pattern scan.
  • Staging-routing guard.
Historical scorer correction: older qualification runs that reported 114/115 and 40/40 were later invalidated as release gates after false positives were found in the raw answers. They are retained as history, not advertised as current accuracy.
September 5 released-tree verificationRecorded resultScope
Local test suite1019/1019Release-hardening tree; zero skipped in PR evidence.
Retrieval Recall@61.000Released-tree retrieval verification.
Retrieval MRR@60.942Released-tree retrieval verification.
Phase 7/8 live gate94/132 turns · 21/33 conversationsDated pre-release run at 4d39995.
Inference-unavailable outcomes14/38 remaining failuresObserved failure category in that dated run; not proof of external root cause.
Development evidence: the branch handoff reports 12 discourse tests and a green full suite without an exact total. This site has not reproduced that run. The 1019/1019 result above belongs to the released tree. The branch remains unmerged and has an acknowledged thin-evidence recovery failure.
19 / Release flow

Source, staging, production.

Scout release model separating production master, integration develop, staging ProjectHub-dev, and release gates including unit tests, retrieval evaluation, API evaluation, browser QA, and conversation regression.
Release-model overview. Branch SHAs and gate results change frequently, so this diagram intentionally shows the process while the live source snapshot and changelog report current values.
EnvironmentSourceFrontend / backend
Feature previewClean feat/* branchSSH-tunneled private preview; loopback-only development service.
Development stagingProjectHub:develop mirrored to ProjectHub-dev:mainbradleymatera.github.io/ProjectHub-dev/ + dev.projecthub-chat.bradleymatera.dev
ProductionProjectHub:masterbradleymatera.github.io/ProjectHub/ + projecthub-chat.bradleymatera.dev

Required sequence

  1. Branch from current develop.
  2. Run the checks appropriate to the change.
  3. Use private preview for backend/agent work when applicable.
  4. Open a PR to develop; required CI must pass.
  5. Deploy/mirror development staging and verify the actual staging frontend/backend.
  6. Open a reviewed release PR into master. The September 5 release used a master-parented commit carrying the qualified develop tree.
  7. Deploy/verify production backend, then publish the production frontend.
  8. Record and verify the released source commit.

Minimum acceptance

Shell
npm test
npm run build
node --check server-gemini.js
git diff --check

# Retrieval / conversation changes
npm run eval-retrieval
PROJECTHUB_API_URL=http://127.0.0.1:<port> npm run eval:local-api
python3 test-production-conversations.py \
  --url http://127.0.0.1:<port>/api/chat \
  --delay 2.5
No direct feature-to-production shortcut. The canonical spec requires staging and a release PR; local passing tests do not authorize production publication.
September 15 released source: PR #31 integrated semantic-reliability and tenant-portability into develop@e74ac22b; PR #32 promoted the exact tree 92b4d149 to master@7d011708. ProjectHub-dev main 201beb9c records e74ac22b as its staging source.
September 5 released source: production b071e4e4 and protected integration 4f5ee971 have different Git ancestry but the same Git tree a0066cc8. ProjectHub-dev records 4f5ee971 as its staging source. PR #29 used an ancestry-preserving release commit rather than forcing the conflicting direct develop→master PR #25.
Release-vs-runtime boundary: GitHub proves the source release and staging provenance recorded above. External production backend/frontend deployment checks are separate operational evidence and should not be inferred solely from the merge commit.
Integrated September 15: the discourse-frame work previously tracked as feat/generic-conversation-sets@cddb3bc (server-owned discourse frames, generated clarification, CLARIFICATION control mode) shipped through PR #31 and is in production master@7d011708.
20 / Troubleshooting

Start with the failing stage.

SymptomCheck firstLikely area
/health/ready returns 503Inspect modelVerified and knowledgeReady.Provider/model health or knowledge load.
INFERENCE_UNAVAILABLEInspect provider/model, generation attempts, deadline, and Cloudflare/Ollama health.Generation/provider path. Do not treat as a factual answer.
Cloudflare 429 / allocation errorInspect provider error type and daily neuron usage.Free allocation/rate capacity.
Correct topic, wrong fact relationshipInspect selected evidence + grounding validator result.Evidence selection, relationship/provenance validation.
Follow-up loses referentInspect session state, rewritten query, and recent-turn input.Conversation resolver / query understanding.
“No” when evidence is merely absentInspect factState, directAnswer, response policy, and contract.Open-world UNKNOWN handling.
Retrieval quality dropsRun npm run eval-retrieval and inspect changed query/chunk logic.BM25, query understanding, RRF, knowledge chunks.
Widget changes not reflectedRun build/CI bundle freshness check.ProjectHub.js source/artifact mismatch.
Staging looks like productionInspect staging source marker and routing rules.Mirror/deployment provenance.

Useful diagnostic commands

Shell
npm test
npm run eval-retrieval
node --check server-gemini.js
curl http://127.0.0.1:3000/health
curl http://127.0.0.1:3000/health/ready
21 / Limits

Current boundaries.

  • Domain: the shipped application is scoped to Bradley Matera's verified professional information and Scout's own runtime, not arbitrary world knowledge.
  • Commercial packaging: the released Core already supports empty/no-KB operation; the generalized domain-package system and self-service installation remain productization goals, not released features.
  • Inference allocation: the public production path depends on external Cloudflare Workers AI allocation/capacity.
  • Application rate control: the current server defaults to 20 chat requests per minute per IP unless deployment configuration overrides it.
  • Deadline: requests are bounded; slow/unavailable inference can return a typed technical error instead of an answer.
  • Browser inference: WebGPU/client-local work is experimental and is not the normal production generation path.
  • State: conversation state is intentionally bounded rather than acting as permanent personal memory.
  • Docs/version drift: dated QA/handoff files can describe historical runtime phases; check executable source and current runtime facts before treating them as current configuration.
  • No public SLA/API-key platform: the current backend routes document the implementation used by ProjectHub. A generalized customer API product is not claimed here.
Expected behavior when evidence is unavailable: Scout should distinguish UNKNOWN from FALSE and should not invent a claim merely to avoid saying that verified information is unavailable.
Known source-truth debt: current executable provider/accounting code is exact-model and null-safe, but data/scout-runtime-knowledge.json is still marked lastVerified: 2026-08-21 and retains the superseded sentence assigning 4,119 / 34,868 to Scout's normal -fast model. This site treats that sentence as stale and follows executable provider/accounting code instead.
22 / Source map

Where each behavior lives.

PathResponsibility
server-gemini.jsExpress API, request lifecycle, deadlines, knowledge loading, state integration, response shaping, telemetry and operational routes.
lib/rag-chunks.jsFlattens verified knowledge into retrieval chunks.
lib/query-understanding.jsNormalization, typo handling, protected terms, intent/context rewrite.
lib/bm25.jsOkapi BM25 lexical retrieval.
lib/rrf.jsContextual reciprocal-rank fusion.
lib/session-state.jsStructured server-owned conversation state.
lib/response-policy.jsConversation-control and substantive response policy classification.
lib/response-contract.jsIntent, fact state, polarity, boundaries, claim ceilings and semantic answer constraints.
lib/agent-tools.jsAllowlisted read-only evidence tools.
lib/rag-agent.jsRAG-first generation, evidence selection, tool enrichment, repair and generation accounting.
lib/local-model-router.jsInference provider abstraction and Cloudflare/Ollama routing/fallback gates.
lib/cloudflare-provider.jsWorkers AI REST adapter, model restrictions, usage/neuron accounting and provider errors.
lib/grounding-validator.jsGrounding, relationship, provenance, semantic and overclaim validation.
data/scout-runtime-knowledge.jsonCurrent production-facing facts about Scout's runtime/model/provider/cost controls.
data/eval-golden.jsonRetrieval golden set used by the checked-in evaluator.
.github/workflows/test.ymlAutomated build, audit, syntax, retrieval, knowledge, secret and staging checks.
PROJECTHUB-DEVELOPMENT-AND-RELEASE-SPEC.mdCanonical release environments, promotion sequence, acceptance and rollback process.
Need the history rather than the current behavior? Use the Changelog and dated reports in the repository. Those records are intentionally kept separate from the current runtime description.