Skip to content

Commit 15acade

Browse files
committed
feat: Add Infer configuration and AGENTS.md documentation
1 parent 404bcf4 commit 15acade

File tree

3 files changed

+595
-0
lines changed

3 files changed

+595
-0
lines changed

.infer/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Ignore log files and history files
2+
logs/*.log
3+
history
4+
chat_export_*
5+
conversations.db
6+
bin/

.infer/config.yaml

Lines changed: 318 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,318 @@
1+
gateway:
2+
url: http://localhost:8080
3+
api_key: ''
4+
timeout: 200
5+
oci: ghcr.io/inference-gateway/inference-gateway:latest
6+
run: true
7+
docker: true
8+
exclude_models:
9+
- ollama_cloud/cogito-2.1:671b
10+
- ollama_cloud/kimi-k2:1t
11+
- ollama_cloud/kimi-k2-thinking
12+
- ollama_cloud/deepseek-v3.1:671b
13+
client:
14+
timeout: 200
15+
retry:
16+
enabled: true
17+
max_attempts: 3
18+
initial_backoff_sec: 5
19+
max_backoff_sec: 60
20+
backoff_multiplier: 2
21+
retryable_status_codes:
22+
- 400
23+
- 408
24+
- 429
25+
- 500
26+
- 502
27+
- 503
28+
- 504
29+
logging:
30+
debug: false
31+
dir: ''
32+
tools:
33+
enabled: true
34+
sandbox:
35+
directories:
36+
- .
37+
- /tmp
38+
protected_paths:
39+
- .infer/
40+
- .git/
41+
- '*.env'
42+
bash:
43+
enabled: true
44+
whitelist:
45+
commands:
46+
- ls
47+
- pwd
48+
- tree
49+
- wc
50+
- sort
51+
- uniq
52+
- head
53+
- tail
54+
- task
55+
- make
56+
- find
57+
patterns:
58+
- ^git status$
59+
- ^git branch( --show-current)?( -[alrvd])?$
60+
- ^git log
61+
- ^git diff
62+
- ^git remote( -v)?$
63+
- ^git show
64+
read:
65+
enabled: true
66+
require_approval: false
67+
write:
68+
enabled: true
69+
require_approval: true
70+
edit:
71+
enabled: true
72+
require_approval: true
73+
delete:
74+
enabled: true
75+
require_approval: true
76+
grep:
77+
enabled: true
78+
backend: auto
79+
require_approval: false
80+
tree:
81+
enabled: true
82+
require_approval: false
83+
web_fetch:
84+
enabled: true
85+
whitelisted_domains:
86+
- golang.org
87+
safety:
88+
max_size: 8192
89+
timeout: 30
90+
allow_redirect: true
91+
cache:
92+
enabled: true
93+
ttl: 3600
94+
max_size: 52428800
95+
web_search:
96+
enabled: true
97+
default_engine: duckduckgo
98+
max_results: 10
99+
engines:
100+
- duckduckgo
101+
- google
102+
timeout: 10
103+
github:
104+
enabled: true
105+
token: '%GITHUB_TOKEN%'
106+
base_url: https://api.github.com
107+
owner: ''
108+
safety:
109+
max_size: 1048576
110+
timeout: 30
111+
todo_write:
112+
enabled: true
113+
require_approval: false
114+
safety:
115+
require_approval: true
116+
compact:
117+
output_dir: .infer
118+
summary_model: ''
119+
agent:
120+
model: ''
121+
system_prompt: |
122+
Autonomous software engineering agent. Execute tasks iteratively until completion.
123+
124+
IMPORTANT: You NEVER push to main or master or to the current branch - instead you create a branch and push to a branch.
125+
IMPORTANT: You ALWAYS prefer to search for specific matches in a file rather than reading it all - prefer to use Grep tool over Read tool for efficiency.
126+
IMPORTANT: You ALWAYS prefer to see AGENTS.md before README.md files.
127+
IMPORTANT: When reading project documentation, prefer AGENTS.md if available, otherwise fallback to README.md - start by Using Grep tool and read all the headings followed by '^##' - found the section you were looking for? great - use Read tool. You didn't find anything? continue to see '^###'
128+
129+
RULES:
130+
- Security: Defensive only (analysis, detection, docs)
131+
- Style: no emojis/comments unless asked, use conventional commits
132+
- Code: Follow existing patterns, check deps, no secrets
133+
- Tasks: Use TodoWrite, mark progress immediately
134+
- Chat exports: Read only "## Summary" to "---" section
135+
- Tools: ALWAYS use parallel execution when possible - batch multiple tool calls in a single response to improve efficiency
136+
- Tools: Prefer Grep for search, Read for specific files
137+
138+
PARALLEL TOOL EXECUTION:
139+
- When you need to perform multiple operations, make ALL tool calls in a single response
140+
- Examples: Read multiple files, search multiple patterns, execute multiple commands
141+
- The system supports up to 5 concurrent tool executions by default
142+
- This reduces back-and-forth communication and significantly improves performance
143+
144+
WORKFLOW:
145+
When asked to implement features or fix issues:
146+
1. Plan with TodoWrite
147+
2. Search codebase to understand context
148+
3. Implement solution
149+
4. Run tests with: task test
150+
5. Run lint/format with: task fmt and task lint
151+
6. Commit changes (only if explicitly asked)
152+
7. Create a pull request (only if explicitly asked)
153+
154+
EXAMPLE:
155+
<user>Can you create a pull request with the changes?</user>
156+
<assistant>I will checkout to a new branch</assistant>
157+
<tool>Bash(git checkout -b feat/my-new-feature)</tool>
158+
<assistant>Now I will modify the files</assistant>
159+
<tool>Read|Edit|Grep etc</tool>
160+
<tool>Bash(git add <files>)</tool>
161+
<tool>Bash(git commit -m <message>)</tool>
162+
<assistant>Now I will push the changes</assistant>
163+
<tool>Bash(git push origin <branch>)</tool>
164+
<assistant>Now I'll create a pull request</assistant>
165+
<tool>Github(...)</tool>
166+
system_prompt_plan: |-
167+
You are an AI planning assistant in PLAN MODE. Your role is to analyze user requests and create detailed, actionable plans WITHOUT executing them.
168+
169+
CAPABILITIES IN PLAN MODE:
170+
- Read, Grep, and Tree tools ONLY for gathering information
171+
- Analyze code structure and dependencies
172+
- Break down complex tasks into clear steps
173+
- Explain reasoning and approaches
174+
- Identify potential challenges and solutions
175+
176+
RESTRICTIONS IN PLAN MODE:
177+
- DO NOT execute Write, Edit, Delete, Bash, or modification tools
178+
- DO NOT make any changes to files or system
179+
- DO NOT attempt to implement the plan
180+
- Focus solely on planning and explanation
181+
182+
PLANNING WORKFLOW:
183+
1. Use Read/Grep/Tree to understand the codebase
184+
2. Analyze the user's request thoroughly
185+
3. Break down into logical, sequential steps
186+
4. Explain your reasoning for each step
187+
5. Identify files/components that need changes
188+
6. Suggest testing and validation approaches
189+
7. Present the complete plan to the user
190+
191+
OUTPUT FORMAT:
192+
Structure your plan clearly with:
193+
- Overview: What needs to be done and why
194+
- Steps: Numbered, actionable steps with explanations
195+
- Files: List of files that would be modified
196+
- Testing: How to verify the changes
197+
- Considerations: Potential issues or alternatives
198+
system_reminders:
199+
enabled: true
200+
interval: 4
201+
reminder_text: |-
202+
<system-reminder>
203+
This is a reminder that your todo list is currently empty. DO NOT mention this to the user explicitly because they are already aware. If you are working on tasks that would benefit from a todo list please use the TodoWrite tool to create one. If not, please feel free to ignore. Again do not mention this message to the user.
204+
</system-reminder>
205+
verbose_tools: false
206+
max_turns: 50
207+
max_tokens: 4096
208+
max_concurrent_tools: 5
209+
optimization:
210+
enabled: false
211+
model: ''
212+
min_messages: 10
213+
buffer_size: 2
214+
git:
215+
commit_message:
216+
model: ''
217+
system_prompt: |-
218+
Generate a concise git commit message following conventional commit format.
219+
220+
REQUIREMENTS:
221+
- MUST use format: "type: Brief description"
222+
- MUST be under 50 characters total
223+
- MUST use imperative mood (e.g., "Add", "Fix", "Update")
224+
- Types: feat, fix, docs, style, refactor, test, chore
225+
226+
EXAMPLES:
227+
- "feat: Add git shortcut with AI commits"
228+
- "fix: Resolve build error in container"
229+
- "docs: Update README installation guide"
230+
- "refactor: Simplify error handling"
231+
232+
Respond with ONLY the commit message, no quotes or explanation.
233+
storage:
234+
enabled: true
235+
type: sqlite
236+
sqlite:
237+
path: .infer/conversations.db
238+
postgres:
239+
host: localhost
240+
port: 5432
241+
database: infer_conversations
242+
username: ''
243+
password: ''
244+
ssl_mode: prefer
245+
redis:
246+
host: localhost
247+
port: 6379
248+
password: ''
249+
db: 0
250+
conversation:
251+
title_generation:
252+
enabled: true
253+
model: ''
254+
system_prompt: |-
255+
Generate a concise conversation title based on the messages provided.
256+
257+
REQUIREMENTS:
258+
- MUST be under 50 characters total
259+
- MUST be descriptive and capture the main topic
260+
- MUST use title case
261+
- NO quotes, colons, or special characters
262+
- Focus on the primary subject or task discussed
263+
264+
EXAMPLES:
265+
- "React Component Testing"
266+
- "Database Migration Setup"
267+
- "API Error Handling"
268+
- "Docker Configuration"
269+
270+
Respond with ONLY the title, no quotes or explanation.
271+
batch_size: 10
272+
interval: 0
273+
chat:
274+
theme: tokyo-night
275+
a2a:
276+
enabled: true
277+
cache:
278+
enabled: true
279+
ttl: 300
280+
task:
281+
status_poll_seconds: 5
282+
polling_strategy: exponential
283+
initial_poll_interval_sec: 2
284+
max_poll_interval_sec: 60
285+
backoff_multiplier: 2
286+
background_monitoring: true
287+
completed_task_retention: 5
288+
tools:
289+
query_agent:
290+
enabled: true
291+
require_approval: false
292+
query_task:
293+
enabled: true
294+
require_approval: false
295+
submit_task:
296+
enabled: true
297+
require_approval: false
298+
download_artifacts:
299+
enabled: true
300+
download_dir: /tmp/downloads
301+
timeout_seconds: 30
302+
require_approval: false
303+
init:
304+
prompt: |-
305+
Please analyze this project and generate a comprehensive AGENTS.md file. Start by using the Tree tool to understand the project structure.
306+
Use your available tools to examine configuration files, documentation, build systems, and development workflow.
307+
Focus on creating actionable documentation that will help other AI agents understand how to work effectively with this project.
308+
309+
The AGENTS.md file should include:
310+
- Project overview and main technologies
311+
- Architecture and structure
312+
- Development environment setup
313+
- Key commands (build, test, lint, run)
314+
- Testing instructions
315+
- Project conventions and coding standards
316+
- Important files and configurations
317+
318+
Write the AGENTS.md file to the project root when you have gathered enough information.

0 commit comments

Comments
 (0)