Devin AI Prompts
Relevant source files
The following files were used as context for generating this wiki page:
Devin is an experienced software engineer AI agent designed to work autonomously or collaboratively within a codebase. The system prompts governing Devin define its operational boundaries, its ability to handle user queries by finding relevant code, and its specialized role in technical documentation generation through a "DeepWiki" mode.
Within the project, these prompts establish a framework where Devin acts as a persistent agent that can explore git history, analyze code constructs, and provide cited technical answers based strictly on the current codebase context.
Sources: Devin AI/DeepWiki Prompt.txt:1-12, Devin AI/Prompt.txt:1-10
Core Agent Identity and Capabilities
Devin is characterized as a professional software engineer with a specific set of capabilities and limitations regarding codebase interaction.
- Primary Function: Handling user queries by locating relevant code and answering in the specific context of that code.
- Git Integration: Access to git history and git blame information to understand how code evolved.
- Contextual Reasoning: Devin is instructed to avoid speculation and only provide answers supported by the provided context or information discoverable via tools.
- Capability Constraints: Devin cannot look at external links or GitHub PRs and does not have access to git history beyond the blame data of visible snippets.
Sources: Devin AI/DeepWiki Prompt.txt:5-20, Devin AI/DeepWiki Prompt.txt:45-50
DeepWiki Documentation Mode
A specialized prompt configuration exists for generating technical wiki pages (DeepWiki). In this mode, Devin acts as a technical writer and software architect.
Operational Workflow
The documentation process follows a strict hierarchy of operations to ensure technical accuracy and proper citation.
The diagram above illustrates the sequential logic Devin follows when transforming codebase context into a technical wiki.
Sources: Devin AI/DeepWiki Prompt.txt:1-10, Devin AI/DeepWiki Prompt.txt:55-75
Response Structure Requirements
Technical wiki outputs must adhere to a standardized Markdown format to maintain consistency and professional quality.
| Component | Requirement | Format/Source |
|---|---|---|
| Summary | Brief finding overview | 2-3 sentences at start |
| Headings | Main and Subsections | Use ## and ### (No #) |
| Code Refs | Explicit identifiers | Wrapped in backticks (e.g., func) |
| Citations | Mandatory for every claim | <cite> XML tags with repo/path/line |
| Visuals | Architectural/Flow views | Mermaid diagrams (No colors) |
| Notes | Context disambiguation | Concise section at the end |
Sources: Devin AI/DeepWiki Prompt.txt:30-40, Devin AI/DeepWiki Prompt.txt:75-90
Citation and Verification Logic
A critical feature of the Devin system prompts is the enforcement of a granular citation system. This system ensures that every technical claim is backed by a specific line range in the codebase.
- Sentence-Level Citation: Every single sentence and claim must end in a
<cite/>tag. - Granularity Control: Citations should span at most 5 lines of code and should point to function/class headers rather than entire code blocks.
- Salience: If a specific line range isn't available, the agent must inform the user rather than inventing a citation.
Citation Format
<cite repo="REPO_NAME" path="FILE_PATH" start="START_LINE" end="END_LINE" />
Sources: Devin AI/DeepWiki Prompt.txt:55-75
Task and Tool Management
Devin uses a structured approach to task execution, similar to other agentic tools like Amp or Claude Code, utilizing internal "Todos" and progress tracking.
The sequence diagram shows how Devin manages multi-phase work by breaking goals into logical, verifiable steps.
Sources: Amp/claude-4-sonnet.yaml:250-280, Qoder/prompt.txt:40-60 (Contextually relevant agentic behavior supported by project patterns)
Summary
The Devin AI Prompts define a high-precision autonomous agent specialized in technical analysis and documentation. By enforcing a strict "DeepWiki" workflow, the system ensures that all technical output is grounded in codebase reality through mandatory XML-based citations and professional Markdown formatting. Devin represents a bridge between raw code exploration and structured architectural knowledge.