PlatformThe Architect

The Architect

Native AI layer for natural language code queries. Ask questions about your codebase in plain English.

The Architect is Drok's native AI layer — a code intelligence system integrated directly into the platform. It is not a chatbot bolted onto a file browser. It is a semantic understanding engine that has read your code and can answer questions about it.

Natural Language Queries

Ask questions about your codebase in plain English:

Find the function that handles token refresh

The Architect returns the function. Not a search result page. Not a list of files that might contain the answer. The function itself, with its file path, line number, and surrounding context.

Query Examples

QueryWhat The Architect Returns
"Find the function that handles token refresh"The refresh_token function in src/auth/token.rs with full source
"How does the payment processing work?"A structured explanation tracing the flow from API endpoint to database
"What tests cover the authentication module?"A list of test files and functions that exercise auth code paths
"Where is the database connection configured?"The configuration file and relevant sections
"What would break if I changed this function signature?"All call sites and downstream dependencies

Code Understanding

The Architect builds a semantic model of your repository that goes beyond text search:

  • Call graph analysis — Understands which functions call which other functions
  • Type flow — Tracks how types propagate through your codebase
  • Module dependencies — Maps the dependency graph between modules
  • Pattern recognition — Identifies design patterns, architectural patterns, and anti-patterns

This semantic model is rebuilt incrementally on every push, so The Architect's understanding is always current.

Integration Points

Web Interface

The Architect is accessible from any repository page via the command palette (Ctrl+K / Cmd+K):

  1. Open the command palette
  2. Type your question in natural language
  3. The Architect responds with code, explanations, and navigation links

Merge Request Review

During code review, The Architect can:

  • Explain changes — "What does this merge request do?" produces a structured summary
  • Identify risks — Surface potential issues based on the semantic model
  • Suggest reviewers — Recommend team members based on code ownership and expertise

CLI

drok architect "Find all API endpoints that accept user input without validation"

The CLI returns results formatted for the terminal with syntax highlighting and file references.

Privacy and Data Handling

The Architect processes code within Drok's infrastructure:

  • No external transmission — Your code is not sent to third-party AI services
  • Organization-scoped — The Architect's model is scoped to your organization's repositories
  • Access-controlled — The Architect respects repository permissions. It will not reveal code from repositories a user cannot access
  • Audit-logged — All Architect queries are recorded in the organization audit log

Configuration

Enable or disable The Architect per repository or organization:

# Enable for a repository
drok repo edit my-repo --architect enabled
 
# Disable for an organization
drok org edit my-org --architect disabled

Indexing Control

Configure which files The Architect indexes:

# .drok/architect.yml
exclude:
  - "vendor/**"
  - "node_modules/**"
  - "*.generated.*"
  - "test/fixtures/**"
priority:
  - "src/**"
  - "lib/**"

Priority paths are indexed first and weighted more heavily in query results.