Skip to content

Add Real-World Project: Codebase Q&A — Where Is X Implemented? - #275

Open
abderrahim-lectures wants to merge 1 commit into
mainfrom
add-codebase-qa
Open

Add Real-World Project: Codebase Q&A — Where Is X Implemented?#275
abderrahim-lectures wants to merge 1 commit into
mainfrom
add-codebase-qa

Conversation

@abderrahim-lectures

Copy link
Copy Markdown
Owner

Adds a new Real-World Projects lesson: Build a Codebase Q&A Tool — Where Is X Implemented? (backlog idea #18).

What's included

  • docs/projects/codebase-qa/index.md — full lesson in the house skeleton. Core idea: 'where is X implemented?' is two different questions, answered with two deliberately separate indexes — an exact ast-based symbol index (functions/classes/methods/imports + line numbers) and a semantic embedding index — plus a dispatcher that routes between them, falls through honestly, and grounds LLM answers in verifiable file:line citations.
  • docs/projects/codebase-qa/_category_.json
  • examples/codebase-qa/ — runnable tool: symbols.py, prepare_repo.py, build_index.py, retrieve.py, query.py (6-provider LLM support), a bundled sample_repo/ (tiny training pipeline), notebook.ipynb, README, pyproject/uv.lock.
  • Registration: src/data/projects.ts, docs/projects/index.mdx, src/pages/index.tsx (English only — i18n in a follow-up PR).

Verification

  • Pipeline tested end-to-end locally on the bundled sample: 5 symbols indexed with correct file:line; query.py "where is split_data defined?" returns the exact hit without an API key; a made-up symbol triggers the documented fallthrough; retrieval returns score-ranked chunks with citations.
  • Fixed a real dispatcher bug found during testing: 'where is X defined?' now strips trailing verbs so the symbol lookup actually matches.
  • npm run typecheck and npm run build pass (all 4 locales, no broken links).

Closes #274

New Real-World Project (backlog idea #18). Full lesson plus a runnable
tool that answers 'where is X defined?' with an exact ast symbol index
and 'how does X work?' with embedding search, grounding a free-tier LLM
in file:line citations.

Closes #274

Co-authored-by: deepseek-v4-flash-free <noreply@opencode.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Real-World Project: Codebase Q&A — Where Is X Implemented?

1 participant