AI Assistant
Ask questions about your codebase in natural language.
Overview
The ArchiCore AI Assistant understands your codebase and can answer questions like:
- "How does the authentication system work?"
- "What would break if I changed UserService?"
- "Where is the payment processing logic?"
- "Explain the data flow for order creation"
Using the Assistant
Web Interface
- Select a project
- Type your question in the chat panel
- Get an answer with code references
CLI
Just type your question in interactive mode:
> How does user authentication work?
The authentication system in this project uses JWT tokens.
Here's how it works:
1. **Login Flow** (src/auth/login.ts)
- User submits email/password
- Credentials validated against database
- JWT token generated with user ID
2. **Token Validation** (src/middleware/auth.ts)
- authMiddleware() extracts token from header
- Token verified using JWT_SECRET
- User attached to request object
3. **Session Management** (src/services/session.ts)
- Sessions stored in Redis
- 7-day expiration by default
- Refresh token support
Key files:
- src/auth/login.ts:45-78
- src/middleware/auth.ts:12-34
- src/services/session.ts:23-56
API
curl -X POST https://api.archicore.io/api/v1/projects/:id/ask \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"question": "How does authentication work?"}'
Question Types
Architecture Questions
> What is the overall architecture of this project?
> How are the modules organized?
> What design patterns are used?
Code Flow Questions
> What happens when a user places an order?
> How does data flow from API to database?
> Trace the request lifecycle for /api/users
Impact Questions
> What would break if I changed UserService?
> Which files depend on the database module?
> What tests cover the payment logic?
Location Questions
> Where is the email sending logic?
> Which file handles user registration?
> Find the rate limiting middleware
Explanation Questions
> Explain what processOrder() does
> Why does this function use recursion?
> What's the purpose of the cache layer?
Tips for Better Answers
Be Specific
❌ "How does it work?"
✓ "How does the user registration process work?"
Provide Context
❌ "Why is this slow?"
✓ "Why might the getProducts() function in src/api/products.ts be slow?"
Ask Follow-ups
> How does authentication work?
[Answer about JWT tokens...]
> Can you show me the code for token validation?
[Shows specific code...]
> What happens if the token is expired?
[Explains token refresh flow...]
Language Support
The assistant responds in the same language as your question:
> Как работает аутентификация?
Система аутентификации использует JWT токены...
Limitations
The AI assistant:
- Only knows indexed code - Run
/indexfirst - Cannot execute code - Only analyzes static code
- May have outdated info - Re-index after changes
- Focuses on your project - Won't discuss external libraries in detail
Privacy
- Questions are processed by AI models
- Your code context is sent for analysis
- No code is stored permanently
- See Privacy Policy for details