Skip to content

Commit f4bde02

Browse files
committed
chore: Add project configuration and documentation
1 parent 419062d commit f4bde02

File tree

5 files changed

+626
-1
lines changed

5 files changed

+626
-1
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: 327 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,327 @@
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: "typescript-sdk"
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+
export:
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: 8192
208+
max_concurrent_tools: 5
209+
optimization:
210+
enabled: true
211+
model: ""
212+
min_messages: 50
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+
scm:
234+
pr_create:
235+
prompt: ""
236+
base_branch: main
237+
branch_prefix: ""
238+
model: ""
239+
cleanup:
240+
return_to_base: true
241+
delete_local_branch: false
242+
storage:
243+
enabled: true
244+
type: sqlite
245+
sqlite:
246+
path: .infer/conversations.db
247+
postgres:
248+
host: localhost
249+
port: 5432
250+
database: infer_conversations
251+
username: ""
252+
password: ""
253+
ssl_mode: prefer
254+
redis:
255+
host: localhost
256+
port: 6379
257+
password: ""
258+
db: 0
259+
conversation:
260+
title_generation:
261+
enabled: true
262+
model: ""
263+
system_prompt: |-
264+
Generate a concise conversation title based on the messages provided.
265+
266+
REQUIREMENTS:
267+
- MUST be under 50 characters total
268+
- MUST be descriptive and capture the main topic
269+
- MUST use title case
270+
- NO quotes, colons, or special characters
271+
- Focus on the primary subject or task discussed
272+
273+
EXAMPLES:
274+
- "React Component Testing"
275+
- "Database Migration Setup"
276+
- "API Error Handling"
277+
- "Docker Configuration"
278+
279+
Respond with ONLY the title, no quotes or explanation.
280+
batch_size: 10
281+
interval: 0
282+
chat:
283+
theme: tokyo-night
284+
a2a:
285+
enabled: true
286+
cache:
287+
enabled: true
288+
ttl: 300
289+
task:
290+
status_poll_seconds: 5
291+
polling_strategy: exponential
292+
initial_poll_interval_sec: 2
293+
max_poll_interval_sec: 60
294+
backoff_multiplier: 2
295+
background_monitoring: true
296+
completed_task_retention: 5
297+
tools:
298+
query_agent:
299+
enabled: true
300+
require_approval: false
301+
query_task:
302+
enabled: true
303+
require_approval: false
304+
submit_task:
305+
enabled: true
306+
require_approval: false
307+
download_artifacts:
308+
enabled: true
309+
download_dir: /tmp/downloads
310+
timeout_seconds: 30
311+
require_approval: false
312+
init:
313+
prompt: |-
314+
Please analyze this project and generate a comprehensive AGENTS.md file. Start by using the Tree tool to understand the project structure.
315+
Use your available tools to examine configuration files, documentation, build systems, and development workflow.
316+
Focus on creating actionable documentation that will help other AI agents understand how to work effectively with this project.
317+
318+
The AGENTS.md file should include:
319+
- Project overview and main technologies
320+
- Architecture and structure
321+
- Development environment setup
322+
- Key commands (build, test, lint, run)
323+
- Testing instructions
324+
- Project conventions and coding standards
325+
- Important files and configurations
326+
327+
Write the AGENTS.md file to the project root when you have gathered enough information.

.markdownlint.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"line-length": {
3+
"line_length": 120
4+
},
5+
"no-inline-html": false
6+
}

0 commit comments

Comments
 (0)