Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"ext-posix": "*",
"ctx/module-research": "^1.0",
"ctx/module-config-templates": "^1.0",
"ctx/mcp-server": "^1.6.0",
"ctx/mcp-server": "^1.7.0",
"league/html-to-markdown": "^5.1",
"php-mcp/schema": "dev-main as 1.0",
"psr/log": "^3.0",
Expand Down
54 changes: 39 additions & 15 deletions context.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,60 @@ import:
- url: https://gist.githubusercontent.com/butschster/29e84fb9c976ac837181141f88049a35/raw/ed38539950f8c9c45ca8c67f9e026a837c97bc66/01-dev-prompts.yaml
type: url

# context.yaml
rag:
servers:
default:
driver: qdrant
endpoint_url: ${RAG_QDRANT_ENDPOINT:-http://qdrant.home.local}
api_key: ${RAG_QDRANT_API_KEY:-}
embeddings_dimension: 1536
embeddings_distance: Cosine

collections:
default:
server: default
collection: ${RAG_COLLECTION:-intruforce_knowledge}
description: "Project knowledge base"

vectorizer:
platform: openai
model: text-embedding-3-small
api_key: ${OPENAI_API_KEY}

transformer:
chunk_size: 1000
overlap: 200

tools:
- id: ctx-docs
description: 'CTX docs'
type: http
schema:
type: object
properties:
query:
type: string
description: "Question or task to get documentation for"
requests:
- url: "https://context7.com/api/v2/context"
method: "GET"
query:
libraryId: "/context-hub/generator"
type: "txt"
query: "{{query}}"
name: CTX docs search
type: rag
description: |
Search the project knowledge base for documentation, code explanations, and insights.
Use this when you need to find previously stored information about the codebase.
collection: default
operations: [ search ]

projects:
- name: ctx-mcp-server
description: MCP server library
- name: ctx-docs
description: Docs for CTX
- name: mcp-schema
path: vendor/php-mcp/schema
description: PHP DTOs for the MCP specification

exclude:
patterns:
- ".env*"
- "*cache"
paths:
- ".claude"
- ".context"
- ".build"
- ".researches"
- "runtime"

documents:
- description: 'Project structure overview'
Expand Down
102 changes: 102 additions & 0 deletions docs/example/config/rag-custom-tools.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Custom RAG Tools Example
#
# Define AI-friendly tools with meaningful names and descriptions
# that help the AI understand when and why to use each tool.

rag:
servers:
default:
driver: qdrant
endpoint_url: ${RAG_QDRANT_ENDPOINT:-http://localhost:6333}

collections:
project-docs:
server: default
collection: project_documentation

architecture:
server: default
collection: architecture_decisions

conventions:
server: default
collection: coding_conventions

vectorizer:
platform: openai
model: text-embedding-3-small
api_key: ${OPENAI_API_KEY}

# Custom RAG tools with meaningful names for AI
tools:
# Documentation tools
- id: find-documentation
type: rag
description: |
Search project documentation for guides, tutorials, and how-to articles.
Use this when you need to understand:
- How to use a feature
- Setup instructions
- Configuration options
- Best practices for using the project
collection: project-docs
operations: [search]

- id: save-documentation
type: rag
description: |
Store documentation, guides, or explanations about project features.
Use this after discovering or documenting:
- How a feature works
- Setup procedures
- Configuration guides
collection: project-docs
operations: [store]

# Architecture tools
- id: understand-architecture
type: rag
description: |
Search architecture decisions and design patterns.
Use this when you need to understand:
- Why code is structured a certain way
- Design decisions and their rationale
- System boundaries and responsibilities
- Integration patterns between components
collection: architecture
operations: [search]

- id: document-architecture
type: rag
description: |
Store architecture decisions, patterns, and design rationale.
Use this after making or discovering:
- Important design decisions
- New patterns in the codebase
- System integration approaches
collection: architecture
operations: [store]

# Conventions tools
- id: check-conventions
type: rag
description: |
Search coding conventions and style guidelines.
Use this BEFORE writing code to ensure:
- Naming conventions are followed
- Code style matches project standards
- Patterns are consistent with existing code
collection: conventions
operations: [search]

- id: record-convention
type: rag
description: |
Store coding conventions and guidelines discovered in the codebase.
Use this when you identify:
- Naming patterns
- Code organization rules
- Testing conventions
- Documentation standards
collection: conventions
operations: [store]
Loading
Loading