feat(12): folder management, file type presets, and include_types pipeline#113
Merged
RichardHightower merged 17 commits intomainfrom Feb 26, 2026
Merged
Conversation
…ntent Pipeline 41 requirements across 4 categories (Folder Management, File Type Presets, Chunk Eviction, Content Injection) mapped to Phases 12-14. Research complete with architecture patterns, pitfall analysis, and feature landscape. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…t and file type presets
- FolderRecord dataclass with folder_path, chunk_count, last_indexed, chunk_ids - FolderManager with asyncio.Lock + atomic temp-file-rename for safe writes - Path normalization via Path.resolve() on all inputs - initialize() loads existing JSONL on startup gracefully - add_folder(), remove_folder(), list_folders(), get_folder(), clear() operations - 13 tests covering init, add, remove, list, persistence, concurrency, corrupt lines - Fixed test_get_folder_normalizes_path to use absolute path (relative CWD mismatch)
- FILE_TYPE_PRESETS: 14 presets (python, javascript, typescript, go, rust, java, csharp, c, cpp, web, docs, code, text, pdf) - resolve_file_types(): deduplicates patterns, raises ValueError with valid presets on unknown name - list_presets(): returns copy of preset dict for display - FolderInfo, FolderListResponse, FolderDeleteRequest, FolderDeleteResponse models - Export new symbols from services/__init__.py and models/__init__.py - 26 tests covering all 14 presets, deduplication, error handling, list_presets
…metadata - StorageBackendProtocol.delete_by_metadata(where) method added to protocol - VectorStoreManager.delete_by_where(): two-step query+delete with empty-ID guard - ChromaBackend.delete_by_metadata(): delegates to VectorStoreManager.delete_by_where - PostgresBackend.delete_by_metadata(): DELETE...RETURNING with JSONB containment filter - Fixed MockCompleteBackend in test_protocol.py to implement delete_by_metadata - Auto-fixed ruff linting issues in folder_manager.py (unused Any import, open mode) - All 725 tests pass, mypy strict clean, ruff+black clean
- 12-01-SUMMARY.md: FolderManager, FileTypePresets, delete_by_metadata summary - STATE.md: advance to plan 02, add phase 12 decisions, record 35min execution
- Create GET /index/folders and DELETE /index/folders endpoints - Add FolderManager initialization in server lifespan (project + temp dir modes) - Wire FolderManager into IndexingService for post-indexing folder registration - Add include_types field to IndexRequest with preset resolution - Add delete_by_ids to StorageBackendProtocol (ChromaDB + PostgreSQL backends) - Add VectorStoreManager.delete_by_ids with empty-ID guard - Update IndexingService.reset() to clear FolderManager records - Update IndexingService.get_status() to use FolderManager for persistent folder list - Pass include_types through index.py router resolved_request construction - Add 31 new tests for folders API and include_types functionality
- Folders API router with GET/DELETE /index/folders - FolderManager wired into server lifespan and IndexingService - include_types field on IndexRequest with preset resolution - delete_by_ids protocol extension for targeted folder chunk removal - 756 tests passing, mypy strict clean Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add FolderInfo dataclass to DocServeClient - Add list_folders() and delete_folder() methods to DocServeClient - Add include_types param to DocServeClient.index() - Create folders command group (list, add, remove) with Rich table output - Create types command group (list) with hardcoded presets (local, no server) - Register folders_group and types_group in cli.py - Add 35 tests for folders and types CLI commands (all pass) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…mands - Add --include-type flag to index command for file type presets - Parse comma-separated presets and pass include_types to server - Show include types in Rich output when specified - Create agent-brain-folders.md plugin slash command - Create agent-brain-types.md plugin slash command Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove unused imports (pytest, FolderRecord, FolderInfo, Path) - Remove unused local variable assignment in test_folders_api.py - Fix unnecessary open mode parameter in test_folder_manager.py Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… slash commands Phase 12 Plan 03 complete. All 3 tasks done: - Task 1: DocServeClient extensions, folders/types CLI commands, 35 tests - Task 2: --include-type flag for index, plugin slash commands - Task 3: Full quality gate passes (756 server + 121 CLI tests) Phase 12 (Folder Management & File Type Presets) COMPLETE. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Thread include_types through the full JobRecord → job_worker → DocumentLoader pipeline where data was silently dropped at 3 breakpoints. Add early preset validation in API endpoints (HTTP 400 for unknown presets). Fix CLI test isolation for get_server_url() that leaked stale runtime.json state. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…aining phase 12 files Ignore .claude/agent-brain/ (server runtime state), tmp/, .tmp-*/ (manual test data), and *.bak files. Include remaining phase 12 docs, e2e scenario updates, and test file changes that were sitting unstaged. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
RichardHightower
added a commit
that referenced
this pull request
Mar 5, 2026
…ate todo - Move fix-include-types-pipeline-plumbing to done/ (resolved via PR #113) - Add new todo: update agent plugin and skills for Phase 12 features - Update STATE.md session continuity and pending todos Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
folders list/add/remove) and API (GET/DELETE /index/folders) for tracking and managing indexed folders with JSONL persistence across server restartspython,docs,code,web, etc.) that resolves to glob patterns, with CLItypes listcommand and--include-typeflag onindexinclude_typesthrough the full JobRecord → job_worker → DocumentLoader pipeline where data was silently dropped at 3 breakpoints. Added early preset validation (HTTP 400 for unknown presets)delete_by_metadata()to StorageBackendProtocol for folder removal across Chroma and Postgres backends.claude/agent-brain/), temp dirs (tmp/,.tmp-*/), and backup files (*.bak)Implementation (3 waves + gap closure)
services/folder_manager.py,models/folders.py,services/file_type_presets.py,storage/protocol.pyapi/routers/folders.py,services/indexing_service.py,api/main.py--include-typeflagcommands/folders.py,commands/types.py,client/api_client.pymodels/job.py,job_queue/job_service.py,job_queue/job_worker.py,indexing/document_loader.py,api/routers/index.pyTest plan
task before-pushpasses (format, lint, typecheck, all tests)🤖 Generated with Claude Code