Retrieving Context in Factory
Learn how to efficiently bring context into your Factory workspace using @ commands, Codebase Explorer, and Code Search

Retrieve Context in Factory
Factory provides multiple ways to bring context into your workspace. Each method is optimized for different use cases and types of context.
@ Commands
@ Commands provide quick access to context directly from the chat interface. They’re perfect for bringing in specific pieces of information during your workflow.
Available Commands
@remote repo
@remote repo
Adds Remote Repository Project Overviews and dynamically retrieves relevant files and folders. @remote repo includes repository information, file structure, and folder overviews.
@local repo
@local repo
Adds Local Repository Project Overviews and dynamically retrieves relevant files and folders. Includes local repository information, file structure, and folder overviews. Enables Local File Sync
@file
@file
Adds specific files from your integrated repositories. @file includes file contents and history.
@ticket
@ticket
Retrieves Jira ticket information. @ticket includes ticket details, comments, and status.
@pull request
@pull request
Retrieves Pull Requests. @pull request includes PR description, changes, and discussions.
@google docs
@google docs
Adds Google Docs to your context. @google docs includes Google Docs contents.
@notion
@notion
Adds Notion Docs to your context. @notion includes Notion Docs, Databases, and Wikis.
Command Tips
Use Auto-completion
Type @ to see available commands and suggestions
Chain Commands
Combine multiple commands in one message for related context
Codebase Explorer
Codebase Explorer provides a visual way to navigate and select context from your repositories.
Key Features
Visual Navigation
Browse your codebase structure with an intuitive tree view
Smart Selection
Select files and folders with intelligent context summarization
Search Integration
Quickly find files and folders within your repositories
Context Preview
Preview file contents and context information before adding
Using Codebase Explorer
Access Explorer
Open Codebase Explorer from the context panel
Navigate Repositories
Browse through your connected repositories
Select Context
Choose files and folders to add to your context
Apply Changes
Confirm your selection to update your workspace context
Code Search
Code Search allows you to find and bring in specific code snippets and files across your entire codebase.
Search Features
Regex Search
Regex Search
Use powerful regex patterns to find exact code matches:
Filters
Filters
Narrow your search with filters:
-
file:
- Search specific file types -
repo:
- Search in specific repositories -
lang:
- Filter by programming language
Symbol Search
Symbol Search
Find specific code symbols:
Search Best Practices
Start Broad
Begin with general searches, then refine with filters
Use Wildcards
Utilize wildcards for flexible matching
Combine Filters
Mix filters for precise results
Check Context
Review search results before adding to context
Combining Retrieval Methods
Start with @ Commands
Quickly bring in known context
Use Explorer
Browse for related files and folders
Refine with Search
Find specific code snippets and references