← David Deutsch

FoF David Deutsch projects — AI Agent Skills

Four AI Agent Skills for exploring David Deutsch’s interviews with QRAG QRAG stands for Question Retrieval Augmented Generation. Focus on Foundations indexes questions and answers extracted from interviews, meetings, and books in a vector database. Semantic search finds relevant Q&A by meaning, rather than only by matching keywords, and returns quoted source passages with source links. The qrag-search skill retrieves those passages without generating an AI answer. The qrag-ask skill and web chat also give the retrieved passages to an AI model to synthesize an answer, with the direct quotes available for checking. Browse Transcripts to read the source material. An AI answer is a synthesis, not a verbatim statement by the original speaker. QRAG is open source. Point an AI agent to the public repository to ask questions about how it works, with explanations tailored to your background and interests.
https://github.com/randalljam/fof-mono-public
. Scan the summaries, then open any skill to read its instructions before downloading.

Download AI Agent Skills ZIP

Skill qrag-search

Semantic search the extracted question-and-answer vector database (QRAG QRAG stands for Question Retrieval Augmented Generation. Focus on Foundations indexes questions and answers extracted from interviews, meetings, and books in a vector database. Semantic search finds relevant Q&A by meaning, rather than only by matching keywords, and returns quoted source passages with source links. The qrag-search skill retrieves those passages without generating an AI answer. The qrag-ask skill and web chat also give the retrieved passages to an AI model to synthesize an answer, with the direct quotes available for checking. Browse Transcripts to read the source material. An AI answer is a synthesis, not a verbatim statement by the original speaker. QRAG is open source. Point an AI agent to the public repository to ask questions about how it works, with explanations tailored to your background and interests.
https://github.com/randalljam/fof-mono-public
). Retrieve quoted passages and timestamped sources without an AI answer.

Read the skill instructions

Vector search over a corpus of interview transcripts (David Deutsch by default). Returns the questions closest to yours that were actually put to the speaker, each with the answer given, the source transcript, and a timestamped link.

This is retrieval only: no AI model writes anything, nothing is billed, and no account is needed.

When to use

  • "What did Deutsch say about X?", "Find the quote where he talks about Y", "Did he ever discuss Z?"
  • Checking a claim about his views against the record before repeating it.
  • Gathering cited passages to reason over yourself. If the user wants a synthesized answer written by the QRAG service, use skills/qrag/qrag-ask/README.md instead.

Setup

skills/qrag/_shared/references/setup.md — check fof-qrag status once per session.

Procedure

  1. Phrase the query as a question someone might have asked the speaker. The index is built from interview questions, so "Why are good explanations hard to vary?" retrieves far better than keywords like "explanations hard-to-vary".
  2. Run the search:
fof-qrag search "Why are good explanations hard to vary?" --json

Options: -n 20 for more passages (2–50, default 10); --from 2015-01-01 --to 2020-12-31 to limit by interview date (give both); --corpus fda-town-halls for another corpus. 3. Read the result:

  • match.quality — good (the corpus contains essentially this question), partial, or none (nothing on point; sources are loosely related at best). match.max_similarity is the number behind it. Say so rather than stretching weak matches.
  • sources[] — question, answer, source (transcript filename), timestamp (markdown link that opens the recording at that moment), stars (editor rating 0–5 of how good the passage is), similarity.
  1. Try one or two rephrasings if the best similarity is low; different wordings of a question surface different passages.
  2. To read around a passage, pass its source to the transcripts skill: fof-qrag transcripts excerpt "<source>" (skills/qrag/qrag-transcripts/README.md).

Reporting results

  • Quote the answer text as given and attach its timestamp link and source title, so the user can hear it in context.
  • The answer text is a lightly cleaned rendering of speech, not a published essay. Attribute it as something said in that interview on that date.
  • Distinguish clearly between what the passages say and your own summary or inference.
  • Prefer passages with more stars when several say similar things.

Failure modes

code Meaning What to do
PRIVACY_CONSENT_REQUIRED The user has not accepted the privacy notice Ask the user; see setup
QUESTION_TOO_LONG Over 500 characters Shorten to the core question
BAD_DATE_RANGE One date without the other, or wrong format Give both as YYYY-MM-DD
SEARCH_FAILED / NETWORK_UNREACHABLE Service or network problem Retry once, then report the message
View SKILL.md entry point
---
name: qrag-search
description: "Search what David Deutsch (or another Focus on Foundations corpus) actually said: finds the closest questions ever put to the speaker and returns the verbatim-derived answers with source transcript and timestamped link. Free, no AI call. Use for 'what did Deutsch say about X', finding quotes, or checking a claim against the record."
---

# qrag-search

Follow the procedure in README.md in this folder. Install the fof-qrag command using references/setup.md. Repository references to skills/qrag/_shared/references/setup.md mean references/setup.md here; references to skills/qrag/<name>/README.md mean the sibling skill folder <name>.

Skill qrag-ask

Get an AI answer grounded in interview passages, with citations and follow-up questions in a saved conversation.

Read the skill instructions

Full QRAG: search the corpus, then have the Focus on Foundations service write an answer grounded in the retrieved passages. Supports follow-up questions in a saved conversation.

Each answer is a paid AI call on Focus on Foundations' account. Use it when a synthesized answer is wanted; use skills/qrag/qrag-search/README.md when cited passages are enough.

When to use

  • The user asks a question about the speaker's ideas and wants an explained answer, not just quotes.
  • A follow-up that depends on the previous answer ("how does that relate to fallibilism?").
  • Not for bulk or automated querying: one deliberate question at a time. For many lookups, search instead.

Setup

skills/qrag/_shared/references/setup.md — check fof-qrag status once per session.

Procedure

  1. Ask:
fof-qrag ask "Why does Deutsch say optimism is a duty?" --json

The call usually takes 10–60 seconds; progress goes to stderr. Same options as search: -n, --from/--to, --corpus. 2. Read the result: ai_answer, sources[] (the passages the answer was grounded in — same fields as search), match, model, cost_usd, and conversation (conversation_id, title, exchanges). 3. Follow up in the same conversation so earlier turns are sent as context (the service uses the last 12 messages):

fof-qrag ask "How does that connect to his view of problems?" -c last --json

-c takes a conversation id, a unique id prefix, or last. Without -c every question starts a new conversation. 4. Use --no-save for a one-off the user does not want kept (nothing is stored locally or synced). 5. Model choice. Without --model the standard model answers — use it by default. An account with special access may have more (fof-qrag access status lists them): fof-qrag ask "..." --model gpt-6-astra. Signed-in AI calls draw on the person's shared lifetime website allowance, so use one only when the user asks for it, and never in a loop. Astra can take a few minutes. 6. Review or export earlier work: fof-qrag conversations list, fof-qrag conversations show last, fof-qrag conversations export last --out answer.md.

Reporting results

  • Present the AI answer as the QRAG service's synthesis, and cite the sources with their timestamp links. The sources are the evidence; the AI answer is an interpretation of them.
  • If match.quality is partial or none, the answer leans on general background rather than on-point passages — tell the user.
  • Mention the cost only if the user asks or is making many calls.

When the AI answer is refused

Focus on Foundations controls who may make paid calls. A refusal exits with code 3 in text mode or 1 in JSON mode, prints the reason, and still returns the search results (search_results in MCP and CLI JSON, printed passages in CLI text mode) — use them.

code Meaning What to do
LLM_ACCESS_DENIED AI answers need a signed-in account with access Tell the user; fof-qrag login, then fof-qrag access status (skills/qrag/qrag-account/README.md)
LLM_QUOTA_EXCEEDED This month's separate AI-request count limit is used up Report it; continue with search
LLM_SPEND_CAP_REACHED The shared lifetime website allowance is used up Continue with search; do not retry as a guest or with another model
MODEL_NOT_ALLOWED The account cannot use that model Use a model from fof-qrag access status, or none
LLM_TIMEOUT / LLM_FAILED Model or service problem Retry once; then report
Do not try to work around a refusal (other environments, other accounts, repeated retries).
View SKILL.md entry point
---
name: qrag-ask
description: "Ask the Focus on Foundations QRAG a question and get an AI answer grounded in retrieved interview passages, with citations, follow-up questions in a saved conversation, and cost shown. Makes a paid AI call; use qrag-search when quotes alone are enough."
---

# qrag-ask

Follow the procedure in README.md in this folder. Install the fof-qrag command using references/setup.md. Repository references to skills/qrag/_shared/references/setup.md mean references/setup.md here; references to skills/qrag/<name>/README.md mean the sibling skill folder <name>.

Skill qrag-transcripts

Find interviews, read public excerpts, and access full transcripts when your account has permission.

Read the skill instructions

List the transcripts behind the corpus, read the public excerpts, and — for invited collaborators with special access — read full transcripts.

Two tiers

Tier What it is Who can read it
Excerpt The top-rated passages of each transcript: verbatim passages (transcript) or extracted question-and-answer blocks (qa). The same material the website shows. Anyone
Full The complete transcript: vrb verbatim, read readability-edited, qa all extracted Q&A. A signed-in account that Focus on Foundations has given transcript access (by email; there is no code to enter) and that has accepted the transcript terms — or anyone signed in, for a transcript whose rights holder has openly released it (release: open)
The service decides access. This skill never works around a refusal.

When to use

  • "Which interviews are in the corpus?", "Find the 2018 conversation with …", "Show me more of that interview."
  • Reading around a passage that skills/qrag/qrag-search/README.md found: pass the result's source filename straight in.

Setup

skills/qrag/_shared/references/setup.md — check fof-qrag status once per session.

Procedure

  1. Find the transcript. Words from the title and a date range both filter:
fof-qrag transcripts list popper --json
fof-qrag transcripts list --from 2018-01-01 --to 2019-12-31 --json

Each row has id, name, date, youtube, page. With --access (needs sign-in) rows also carry full: {release, available, formats}. 2. Read the public excerpt. The reference can be an id, a unique fragment of the title, or a source filename from a search result:

fof-qrag transcripts excerpt "2011-08-01_KERA Think Radio with Krys Boyd_qafixed.md"
fof-qrag transcripts excerpt 2011-08-01-kera-think-radio-with-krys-boyd --kind qa
  1. Read the full transcript only when the user asks for it and excerpts are not enough:
fof-qrag transcripts full 2011-08-01-kera-think-radio-with-krys-boyd --format vrb --out kera.md

Transcripts are long (often 50,000+ characters). Write to a file with --out and read the part you need, rather than printing the whole text into the conversation. 4. Transcript format: a ## metadata header (links, length), then ### transcript with speaker-labelled blocks whose timestamps link into the recording, or ### qa with QUESTION / TIMESTAMP / ANSWER / TOPICS / STARS blocks.

Copyright rules for full transcripts

Full transcripts are copyrighted by their rights holders and are shared with selected collaborators for private research and study. Every full transcript comes back with a notice; honor it:

  • Quote short passages with attribution and the timestamp link. Do not reproduce a full transcript, or a substantial part of one, in any output, file, post or document meant for other people.
  • Do not upload full transcripts to other services, datasets, or shared folders.
  • Summaries, analysis and short quotation are fine.
  • A transcript with release: open has been released by its rights holder; its notice states the terms. Excerpts are already public.

When full access is refused

code Meaning What to do
NOT_SIGNED_IN Full transcripts need an account The user runs fof-qrag login
TRANSCRIPT_ACCESS_REQUIRED The account has no transcript access Full transcripts are for invited collaborators. The user can ask with fof-qrag access request (skills/qrag/qrag-account/README.md). Offer the excerpt meanwhile
TERMS_REQUIRED The transcript terms changed since the user accepted The user runs fof-qrag access terms --accept
TRANSCRIPT_NOT_FOUND No full transcript is published under that id Check the id with transcripts list --access
ACCOUNTS_UNAVAILABLE / NOT_CONFIGURED This environment has no account or access service yet Excerpts still work; report it
View SKILL.md entry point
---
name: qrag-transcripts
description: "Browse and read the transcripts behind the QRAG corpus: list and filter transcripts, read the public top-passage excerpts, and read full transcripts when the user's account has been given transcript access. Covers the copyright rules for full text."
---

# qrag-transcripts

Follow the procedure in README.md in this folder. Install the fof-qrag command using references/setup.md. Repository references to skills/qrag/_shared/references/setup.md mean references/setup.md here; references to skills/qrag/<name>/README.md mean the sibling skill folder <name>.

Skill qrag-account

Set up the toolkit, sign in, choose local or synced conversations, and check access and usage allowances.

Read the skill instructions

Help a user set up the fof-qrag toolkit and choose how their conversations are stored: local only, or synced with their Focus on Foundations account. Also covers special access (extra AI models, full transcripts) and the shared lifetime allowance.

Several steps here involve the user's credentials or their agreement to terms. Those are the user's to do, in their own terminal. Your part is to explain, to run the read-only checks, and to run sync when asked.

When to use

  • First-time setup, or any QRAG skill reported PRIVACY_CONSENT_REQUIRED, NOT_SIGNED_IN, TRANSCRIPT_ACCESS_REQUIRED, TERMS_REQUIRED or LLM_ACCESS_DENIED.
  • "Sync my conversations with the website", "Do I have special access?", "Are my chats private?", "How much of my allowance is left?"

Setup

skills/qrag/_shared/references/setup.md — start with fof-qrag status --json.

What is stored where

Mode Conversations The account service sees
Local only (default) Files in ~/.fof-qrag/conversations/, owner-readable only Nothing. No account needed
Synced Local files plus a copy in the user's Focus on Foundations account; the website's conversation history shows them and vice versa The conversation text, unless encryption is on
Independently of this, the hosted services log each question and answer (with a keyed hash of the IP address) to operate and improve the service — that is what the privacy notice covers. fof-qrag ask --no-save keeps an exchange out of the user's own history; it does not change service logging.

Procedures

Accept the privacy notice (user decision)

Tell the user what it covers (above) and where to read it (<site>/privacy/ from fof-qrag status). They run fof-qrag init, or instruct you to run fof-qrag init --accept-privacy. Never accept without being told to.

Sign in (user does this)

fof-qrag login                 # email + password, or leave the password blank for an emailed code
fof-qrag login --email-code    # emailed one-time code only

Accounts are created on the website. Tokens are kept in ~/.fof-qrag/credentials.json (owner-readable only); the password is never stored. fof-qrag logout revokes and deletes them. If status says accounts are not available in this environment, only local mode applies there for now.

Sync conversations

fof-qrag sync --dry-run --json   # show what would move
fof-qrag sync                    # two-way: newer copy wins
fof-qrag config set sync auto    # optional: push after every answer

Sync never deletes on its own. If a conversation was deleted on one side it is reported (removed_in_account, removed_locally); fof-qrag sync --prune carries the deletion across. Confirm with the user before --prune or fof-qrag conversations delete.

Special access

There is no code to enter. Focus on Foundations grants special access to an email address; an account with that verified address simply has it. It can unlock additional AI models, full transcripts, or both. Everyday use — search, standard AI answers, public excerpts — does not need it.

  • Check: fof-qrag access status says "You have special access." or not, and lists the models and lifetime website allowance.
  • Ask for it (the user's decision; it sends their address and a short message to Focus on Foundations): fof-qrag access request --message "who I am and what I'd like to use it for". One request per address per day is accepted; do not repeat it.
  • Full transcripts additionally need the user to accept the transcript terms of use once — copyright acknowledgement and no publishing without permission: fof-qrag access terms --accept. Do not run that for the user with --accept-terms; agreeing to terms is theirs to do.

Check access and allowance

fof-qrag access status --json

access.specialAccess, access.allowedModels (standard model first), access.spend {period, scope, usedUsd, capUsd}, access.transcriptsFull, access.llm, access.termsAccepted, and policy (what Focus on Foundations currently requires). The allowance defaults to $1.00 total across paid website features, with period: "lifetime" and scope: "account"; it never resets monthly. When it is used up, signed-in paid calls stop on every model. Continue with search or ask Focus on Foundations for a higher limit; never drop the account ticket to bypass the cap.

Encryption (opt-in, early)

fof-qrag config set encryption aesgcm-pbkdf2-v1 encrypts conversations with a passphrase (FOF_QRAG_PASSPHRASE, or prompted) before they are written or synced, so nobody with database access can read them. Tell the user the current limits before they turn it on: the website cannot display encrypted conversations yet, and a lost passphrase cannot be recovered. It needs the optional cryptography package.

Failure modes

code Meaning What to do
SIGN_IN_FAILED Wrong email, password or code The user retries; password reset is on the website
TOO_MANY_ATTEMPTS Sign-in attempts are rate limited Wait; do not loop
TOO_MANY_REQUESTS A special-access request from this address is already waiting Nothing to do; do not resend
LLM_SPEND_CAP_REACHED The shared lifetime website allowance is used up Continue with search; ask Focus on Foundations for a higher limit
MODEL_NOT_ALLOWED The account cannot use that model fof-qrag access status lists what it can use
CHILD_ACCOUNT Child accounts cannot hold transcript or AI-answer access A guardian account is needed
CONVERSATION_TOO_LARGE Over the 300 KB per-conversation sync limit It stays local; start a new conversation
DECRYPT_FAILED / PASSPHRASE_REQUIRED Wrong or missing passphrase The user supplies it; it cannot be reset
View SKILL.md entry point
---
name: qrag-account
description: "Set up and manage the fof-qrag toolkit for a user: privacy consent, local-only versus account-synced conversations, signing in, syncing with the Focus on Foundations website, checking or requesting special access (extra AI models, full transcripts), the monthly allowance, and conversation encryption."
---

# qrag-account

Follow the procedure in README.md in this folder. Install the fof-qrag command using references/setup.md. Repository references to skills/qrag/_shared/references/setup.md mean references/setup.md here; references to skills/qrag/<name>/README.md mean the sibling skill folder <name>.

Download & setup

Download four ready-to-use AI Agent Skills for searching, asking questions, reading transcripts, and managing your account. Each folder includes a SKILL.md entry point and setup instructions.

Extract the four folders into your AI Agent’s skills directory, such as ~/.claude/skills for Claude Code or ~/.codex/skills for Codex. The skills use the QRAG CLI QRAG stands for Question Retrieval Augmented Generation. Focus on Foundations indexes questions and answers extracted from interviews, meetings, and books in a vector database. Semantic search finds relevant Q&A by meaning, rather than only by matching keywords, and returns quoted source passages with source links. The qrag-search skill retrieves those passages without generating an AI answer. The qrag-ask skill and web chat also give the retrieved passages to an AI model to synthesize an answer, with the direct quotes available for checking. Browse Transcripts to read the source material. An AI answer is a synthesis, not a verbatim statement by the original speaker. QRAG is open source. Point an AI agent to the public repository to ask questions about how it works, with explanations tailored to your background and interests.
https://github.com/randalljam/fof-mono-public
. If it is already installed, you can also run:

fof-qrag skills install --target ~/.claude/skills
Skills ZIP checksum (SHA256)b4e5cbe782352b5bb105bc67f9c05872007b355b853b930f70dfe2d4d097bed9
Read the shared setup reference

Every QRAG skill drives the fof-qrag command line tool. This file is the one place that says how to get it; install options, settings and environment variables are documented in apps/qrag/toolkit/README.md.

Check

fof-qrag status

If that prints a status block, the tool is ready. Read two lines of it:

  • Privacy notice: NOT accepted — the hosted services will refuse until the user accepts. Ask the user; do not accept on their behalf. They run fof-qrag init (interactive) or tell you to run fof-qrag init --accept-privacy.
  • Account: not signed in — fine for search, AI answers (while open) and public excerpts. Sign-in is only needed for sync, special-access models, full transcripts, and AI answers once Focus on Foundations gates them.

If the command is missing

Inside a clone of the repository, no install is needed:

.venv/bin/python3 apps/qrag/toolkit/run_qrag.py status      # any Python 3.10+ works; the tool is standard-library only

Anywhere else, open the Deutsch toolkit download and installation guide. It provides the current package ZIP, checksum, and copyable pipx installation commands. No repository access is needed. The website package includes these skills, so fof-qrag skills install --target ~/.claude/skills works offline after installation. To install the skills by hand, use the skills ZIP and copy its four skill folders into your agent’s skills directory. In the skill procedures, read fof-qrag as whichever of these forms works on this machine.

Conventions for agents

  • Add --json for machine-readable output; errors then come back as {"error", "code", "hint"}. The hint is the next step — relay it.
  • Progress lines go to stderr; stdout is clean for parsing.
  • Never put a password or passphrase on a command line you construct. Sign-in, requesting special access and accepting terms are done by the user, or on their explicit instruction.
  • --corpus selects another corpus (deutsch is the default): fda-town-halls, pv-evacuation, sovereign-child.