Spaces:
Sleeping
Sleeping
Commit Β·
c0a76c4
1
Parent(s): 83087ed
docs: refine CLAUDE.md and update WORKLOG
Browse files- Separate ingestion pipeline and query pipeline in architecture
- Fix config table headers (Config Path | Read By | Notes)
- Add paths.knowledge_base to config table
- Update project structure to include CLAUDE.md and docs/
- Add .get() rule to "Do NOT" section
- Update WORKLOG with documentation refinements
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Files changed (2)
- CLAUDE.md+10-4
- docs/WORKLOG.md+6
6 unmodified lines7891011121350 unmodified lines64656667686913 unmodified lines838485868788899091929394959697989943 unmodified lines1431441451461476 unmodified lines## Architecture- **Registry pattern**: LLM providers (`src/llm/`), search backends (`src/search/`), and file readers (`src/readers/`) each use a dict registry in their `__init__.py`. Adding a new provider/format = write one file + add one line to the registry.- **RAG pipeline**: ingest β chunk β embed (ChromaDB) β **query understanding** β retrieve β generate β verify (6-layer stack)- **Config**: `config.yaml` (generated by `setup.py` wizard) + `.env` (API keys, gitignored). Env vars override config values.## Key Design Decisions50 unmodified lines## Project Structure```βββ setup.py # Setup wizard β generates config.yaml + .envβββ ingest.py # Entry point: python ingest.pyβββ app_cli.py # CLI interface (Rich)13 unmodified linesβ βββ llm/ # Provider registry (openai, anthropic, gemini)β βββ search/ # Search backend registry (semantic_scholar, none)β βββ readers/ # File reader registry (15 extensions)βββ tests/ # pytest test suite (59 tests)βββ docs/plans/ # Design doc + implementation plan```## Config Field Names (IMPORTANT)The `config.yaml` must use these exact field names β the codebase reads them with `.get()`:| Section | Key | Used By ||---|---|---|| `paths.vector_db` | `src/ingest.py` | NOT `vector_store` || `web_search.backend` | `src/retriever.py` | NOT `provider` || `verification.max_iterations` | `src/verifier.py` | NOT `layers` || `verification.strict_mode` | `src/verifier.py` | boolean |43 unmodified lines- Allow the LLM to be called when no sources are retrieved (Layer 0)- Use `[N]` as a placeholder in prompts β the LLM copies it literally- Show chunk IDs (CHUNK-LOCAL-001) in user-facing references- Change config field names without updating ALL consumers + setup wizard + tests- Commit `.env` files or API keys6 unmodified lines789101112131450 unmodified lines6566676869707113 unmodified lines85868788899091929394959697989910010110210310443 unmodified lines1481491501511521536 unmodified lines## Architecture- **Registry pattern**: LLM providers (`src/llm/`), search backends (`src/search/`), and file readers (`src/readers/`) each use a dict registry in their `__init__.py`. Adding a new provider/format = write one file + add one line to the registry.- **Ingestion pipeline**: ingest β chunk β embed β store (ChromaDB)- **Query pipeline**: query understanding β retrieve β generate β verify (6-layer stack)- **Config**: `config.yaml` (generated by `setup.py` wizard) + `.env` (API keys, gitignored). Env vars override config values.## Key Design Decisions50 unmodified lines## Project Structure```βββ CLAUDE.md # Project instructions for Claude Codeβββ setup.py # Setup wizard β generates config.yaml + .envβββ ingest.py # Entry point: python ingest.pyβββ app_cli.py # CLI interface (Rich)13 unmodified linesβ βββ llm/ # Provider registry (openai, anthropic, gemini)β βββ search/ # Search backend registry (semantic_scholar, none)β βββ readers/ # File reader registry (15 extensions)βββ tests/ # pytest test suite (59 tests, 13 files)βββ docs/βββ WORKLOG.md # Development logβββ plans/ # Design docs + implementation plan```## Config Field Names (IMPORTANT)The `config.yaml` must use these exact field names β the codebase reads them with `.get()`:| Config Path | Read By | Notes ||---|---|---|| `paths.vector_db` | `src/ingest.py` | NOT `vector_store` || `paths.knowledge_base` | `src/ingest.py` | default `"knowledge_base"` || `web_search.backend` | `src/retriever.py` | NOT `provider` || `verification.max_iterations` | `src/verifier.py` | NOT `layers` || `verification.strict_mode` | `src/verifier.py` | boolean |43 unmodified lines- Allow the LLM to be called when no sources are retrieved (Layer 0)- Use `[N]` as a placeholder in prompts β the LLM copies it literally- Show chunk IDs (CHUNK-LOCAL-001) in user-facing references- Use direct dict access (`cfg["key"]`) for config β always use `.get()` with defaults- Change config field names without updating ALL consumers + setup wizard + tests- Commit `.env` files or API keys
308 unmodified lines309310311312313314308 unmodified lines- Committed CLAUDE.md, docs/plans/, and docs/WORKLOG.md to the git repo (previously only existed in working copy)- Fixed CLAUDE.md: `max_clarifications` now correctly lists both `app_cli.py` and `app_web.py` as consumers### Test Suite308 unmodified lines309310311312313314315316317318319320308 unmodified lines- Committed CLAUDE.md, docs/plans/, and docs/WORKLOG.md to the git repo (previously only existed in working copy)- Fixed CLAUDE.md: `max_clarifications` now correctly lists both `app_cli.py` and `app_web.py` as consumers- Refined CLAUDE.md:- Separated ingestion pipeline and query pipeline in architecture description- Fixed config table column headers (`Config Path | Read By | Notes`)- Added `paths.knowledge_base` to config table (was missing)- Updated project structure to include `CLAUDE.md` and `docs/`- Added `.get()` rule to "Do NOT" section to prevent future direct-access bugs### Test Suite
CLAUDE.md+10-4
docs/WORKLOG.md+6