Repository navigation
feat(rag): dedicated library vector tier and valkey symbol cache store - #83
Merged
Merged
Conversation
…utine observability audit
…ication lifecycle
There was a problem hiding this comment.
🟡 Changes recommended
The new CLI commands and vector store have verified runtime/behavior gaps (Qdrant collection creation API mismatch, missing method indexing, and commands not wiring Qdrant/embedder/Valkey for non-exact/real indexing paths).
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Introduces a dedicated “library” RAG tier that separates third-party library API contracts and doc chunks from workspace code/docs vectors, adds a Valkey-backed symbol cache, and exposes new CLI ingestion/query commands to index and retrieve library symbols.
Changes:
- Adds
LibraryVectorStoreto index/search a new Qdrant collection (devops_libraries) and optionally cache symbol signatures in Valkey. - Introduces
devops ai ingest index-librariesanddevops ai ingest query-libraryCLI commands plus help text and generated docs. - Hardens agent/routine-task guidance around mandatory defect filing and observability/log review.
File summaries
| File | Description |
|---|---|
| tests/test_library_vector_tier.py | New unit/CLI tests covering the library vector tier behaviors and commands. |
| src/devops_cli/models/library.py | Adds LibrarySearchResult model for typed search results. |
| src/devops_cli/lang/en/help.py | Adds CLI help strings for the new ingest subcommands/options. |
| src/devops_cli/config/defaults.py | Adds defaults for the libraries collection name and Valkey symbol TTL. |
| src/devops_cli/commands/ai_ingest.py | Adds index-libraries / query-library commands and local contract loading/rendering helpers. |
| src/devops_cli/ai/rag/library_store.py | Implements the LibraryVectorStore indexing, lookup, and semantic search logic. |
| src/devops_cli/ai/rag/init.py | Exposes LibraryVectorStore from the devops_cli.ai.rag package. |
| src/devops_cli/ai/library/init.py | Re-exports LibraryVectorStore from the devops_cli.ai.library package. |
| src/devops_cli/ai/knowledge_base/devops_cli/tasks/github_project_management.md | Updates KB guidance with mandatory defect/incident tracking procedure. |
| docs/ROUTINE_TASKS.md | Adds routine-task steps for telemetry/log/trace review and defect filing expectations. |
| docs/commands/ai.md | Adds generated command docs for the new ingest subcommands. |
| docs/CLI_REFERENCE.md | Adds generated CLI reference entries for the new ingest subcommands. |
| docs/agent/task.md | Updates agent task tracking to include the new library vector tier work. |
| AGENTS.md | Adds/expands mandatory defect filing and telemetry/log review guidance. |
Review details
- Files reviewed: 16/16 changed files
- Comments generated: 5
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…stmcp and agent instructions
…rioritize milestones
3 tasks
Merged
dan-petty
added a commit
that referenced
this pull request
Sep 10, 2026
* chore(release): initialize release/v0.2.14 branch and configure Dependabot * fix(docs): scrub private configuration values, internal hostnames, and homelab references * feat(ai): dynamic package introspection and multi-source docs ingestion engine (#82) * feat(ai): add dynamic package introspection and multi-source docs ingestion engine * fix(ai): enforce fully-qualified symbol index and dedicated error codes for library ingestion * fix(ai): filter built-in descriptors from class method extraction * feat(rag): dedicated library vector tier and valkey symbol cache store (#83) * feat(rag): dedicated library vector tier, valkey symbol cache, and routine observability audit * docs(roadmap): define v0.2.16 and v0.2.17 milestones for sandbox application lifecycle * feat(gh): integrate github pages, issues, projects, and views with fastmcp and agent instructions * docs(roadmap): enrich task context, technical specifications, and reprioritize milestones * docs: compact v0.1 release documentation and codify automated compaction policy * fix(rag): address code review feedback on library store and CLI client wiring * feat(gh): enhance project sync with rest resolution, rate-limit guards, and issue reconciliation * refactor(security): consolidate in-place security checks into canonical submodules * feat(gh): add pr review threads management and project custom fields reconciler * feat(ai): add ast prompt grounding and fastmcp library intelligence tools - Filter out private submodules and __main__ in package introspection to eliminate CLI execution hazard (Fixes #84). - Expose FastMCP library intelligence tools (ai_ingest_library, ai_query_library, ai_inspect_symbol) and resource://libraries/indexed dynamic resource (Closes #80). - Implement import-driven AST prompt grounding and API contract injection in review pipeline (Closes #78). - Add comprehensive contract, regression, and injection unit tests and sync roadmap. * feat(ai): integrate tree-sitter multilingual ast engine and library drift auditor Implement polyglot concrete syntax tree parsing, S-expression AST query execution, and cross-file code graph synthesis for Python, TypeScript, Go, Rust, Java, and HCL with zero-crash fallback parsers. Expose CLI commands `devops ai ast parse` and `devops ai ast graph`, add `--multilingual` support to `devops ai repomap`, and register FastMCP tools `ai_ast_parse` and `ai_ast_graph`. Implement workspace library API drift and deprecation usage auditor `devops ai audit-library-usage` comparing AST call sites against indexed library contracts to detect removed methods, unknown attributes, unrecognized kwargs, and deprecated calls. Flatten nesting depth to satisfy architectural invariant gates. Closes #74 Closes #79 * feat(ai): integrate ai context packing and symbol-pruned prompt synthesizer Implement `ContextPacker` in `src/devops_cli/ai/context_packer.py` to rank imported symbols, strip unreferenced private methods/docstrings, and skeletonize function/class bodies with ellipsis while preserving public interfaces, parameters, defaults, and type annotations. Expose CLI command `devops ai pack-context` and FastMCP tool `ai_pack_context`, and integrate context packing into `_collect_linked_snippets` in the review pipeline. Enforce strict cyclomatic complexity <= 10 and nesting depth <= 2. Closes #85 * feat(rag): autonomous rag index drift detection and auto-reindexing engine Closes #81 * chore(release): bump version to v0.2.14 * fix(docs): align jekyll configuration file naming to _config.yaml * fix(review): remediate copilot findings and enhance project tracking instructions - Harden security sanitizer with -p= and --token= sensitive argument prefixes - Implement non-mutating thread-safe DNS resolution with fail-closed non-public IP validation - Scope docs ingester chunk slugs to file relative paths, mask credentials in errors, and support multi-page crawling - Fully qualify introspected function and class symbol signatures and filter private submodules - Namespace Valkey cache keys and Qdrant vector point IDs with package qualification - Integrate Tree-Sitter native CST parsing fallback and S-expression query filtering - Disambiguate AST call graph edges against symbol bodies to prevent parameter shadowing - Enforce valid Python AST pruning under context budgets without arbitrary string truncation - Support module-level imports and alias attribute lookups in library drift auditor - Forward multi-label filters in GitHub client and paginate review threads via GraphQL - Align project custom field inference with declarative taxonomy label mappings - Enhance agent instructions, routine tasks, and knowledge base for proactive project bootstrap and card tracking
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 of Changes
devops_libraries): Segregates third-party library API contracts, symbol signatures, and ingested doc chunks from workspace code vectors (devops_code) and general documentation (devops_docs).symbol:<qualname>) storing full JSON-serialized signatures (FunctionSignature,ClassSignature) with configurable 7-day TTL (DEFAULT_VALKEY_SYMBOL_TTL_SECONDS).LibraryVectorStore):ensure_collection_exists(): Verifies and creates isolateddevops_librariescollection in Qdrant with cosine metric.index_contract(contract): Extracts functions, classes, methods, embeds signatures, upserts to Qdrant, and populates Valkey cache.index_doc_chunks(chunks, package_name): Embeds and indexes doc chunks.lookup_symbol(symbol, package): Checks Valkey L1 cache, with fallback to local JSON contract files (.data/libraries/*.json).search(query, package, top_k): Dense vector semantic search returning typedLibrarySearchResultmodels.devops ai ingest index-libraries [--dir <path>] [--dry-run] [--format table|json]: Indexes local library contracts into Qdrant and Valkey.devops ai ingest query-library <query> [--package <pkg>] [--exact] [--top-k <k>] [--format table|json]: Executes exact symbol lookup or semantic API search.devopsCLI.Issue Linkage
Closes #77
Quality & Invariant Verification
tests/test_library_vector_tier.pypass cleanly.devops scan complexity.mypy --strict.ruff formatand linted withruff check.devops docs generate --sync-readme.devops ci.