devloop 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- devloop-0.2.0/LICENSE +21 -0
- devloop-0.2.0/PKG-INFO +705 -0
- devloop-0.2.0/README.md +670 -0
- devloop-0.2.0/pyproject.toml +90 -0
- devloop-0.2.0/src/devloop/__init__.py +3 -0
- devloop-0.2.0/src/devloop/agents/__init__.py +33 -0
- devloop-0.2.0/src/devloop/agents/agent_health_monitor.py +105 -0
- devloop-0.2.0/src/devloop/agents/ci_monitor.py +237 -0
- devloop-0.2.0/src/devloop/agents/code_rabbit.py +248 -0
- devloop-0.2.0/src/devloop/agents/doc_lifecycle.py +374 -0
- devloop-0.2.0/src/devloop/agents/echo.py +24 -0
- devloop-0.2.0/src/devloop/agents/file_logger.py +46 -0
- devloop-0.2.0/src/devloop/agents/formatter.py +511 -0
- devloop-0.2.0/src/devloop/agents/git_commit_assistant.py +421 -0
- devloop-0.2.0/src/devloop/agents/linter.py +399 -0
- devloop-0.2.0/src/devloop/agents/performance_profiler.py +284 -0
- devloop-0.2.0/src/devloop/agents/security_scanner.py +322 -0
- devloop-0.2.0/src/devloop/agents/snyk.py +292 -0
- devloop-0.2.0/src/devloop/agents/test_runner.py +484 -0
- devloop-0.2.0/src/devloop/agents/type_checker.py +242 -0
- devloop-0.2.0/src/devloop/cli/__init__.py +1 -0
- devloop-0.2.0/src/devloop/cli/commands/__init__.py +1 -0
- devloop-0.2.0/src/devloop/cli/commands/custom_agents.py +144 -0
- devloop-0.2.0/src/devloop/cli/commands/feedback.py +161 -0
- devloop-0.2.0/src/devloop/cli/commands/summary.py +50 -0
- devloop-0.2.0/src/devloop/cli/main.py +430 -0
- devloop-0.2.0/src/devloop/cli/main_v1.py +144 -0
- devloop-0.2.0/src/devloop/collectors/__init__.py +17 -0
- devloop-0.2.0/src/devloop/collectors/base.py +55 -0
- devloop-0.2.0/src/devloop/collectors/filesystem.py +126 -0
- devloop-0.2.0/src/devloop/collectors/git.py +171 -0
- devloop-0.2.0/src/devloop/collectors/manager.py +159 -0
- devloop-0.2.0/src/devloop/collectors/process.py +221 -0
- devloop-0.2.0/src/devloop/collectors/system.py +195 -0
- devloop-0.2.0/src/devloop/core/__init__.py +21 -0
- devloop-0.2.0/src/devloop/core/agent.py +206 -0
- devloop-0.2.0/src/devloop/core/agent_template.py +498 -0
- devloop-0.2.0/src/devloop/core/amp_integration.py +166 -0
- devloop-0.2.0/src/devloop/core/auto_fix.py +224 -0
- devloop-0.2.0/src/devloop/core/config.py +272 -0
- devloop-0.2.0/src/devloop/core/context.py +0 -0
- devloop-0.2.0/src/devloop/core/context_store.py +530 -0
- devloop-0.2.0/src/devloop/core/contextual_feedback.py +311 -0
- devloop-0.2.0/src/devloop/core/custom_agent.py +439 -0
- devloop-0.2.0/src/devloop/core/debug_trace.py +289 -0
- devloop-0.2.0/src/devloop/core/event.py +105 -0
- devloop-0.2.0/src/devloop/core/event_store.py +316 -0
- devloop-0.2.0/src/devloop/core/feedback.py +311 -0
- devloop-0.2.0/src/devloop/core/learning.py +351 -0
- devloop-0.2.0/src/devloop/core/manager.py +219 -0
- devloop-0.2.0/src/devloop/core/performance.py +433 -0
- devloop-0.2.0/src/devloop/core/proactive_feedback.py +302 -0
- devloop-0.2.0/src/devloop/core/summary_formatter.py +159 -0
- devloop-0.2.0/src/devloop/core/summary_generator.py +275 -0
devloop-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 DevLoop Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
devloop-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,705 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: devloop
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Intelligent background agents for development workflow automation
|
|
5
|
+
License: MIT
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Keywords: agents,development,automation,code-quality,testing,linting,security,continuous-integration,devops
|
|
8
|
+
Author: DevLoop Contributors
|
|
9
|
+
Author-email: devloop@example.com
|
|
10
|
+
Requires-Python: >=3.11,<4.0
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
20
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
21
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
23
|
+
Classifier: Topic :: Utilities
|
|
24
|
+
Requires-Dist: aiofiles (>=23.2,<24.0)
|
|
25
|
+
Requires-Dist: psutil (>=5.9,<6.0)
|
|
26
|
+
Requires-Dist: pydantic (>=2.5,<3.0)
|
|
27
|
+
Requires-Dist: rich (>=13.7,<14.0)
|
|
28
|
+
Requires-Dist: typer (>=0.15,<1.0)
|
|
29
|
+
Requires-Dist: watchdog (>=3.0,<4.0)
|
|
30
|
+
Project-URL: Documentation, https://github.com/wioota/devloop#readme
|
|
31
|
+
Project-URL: Homepage, https://github.com/wioota/devloop
|
|
32
|
+
Project-URL: Repository, https://github.com/wioota/devloop
|
|
33
|
+
Description-Content-Type: text/markdown
|
|
34
|
+
|
|
35
|
+
# DevLoop
|
|
36
|
+
|
|
37
|
+
> **Intelligent background agents for development workflow automation** — automate code quality checks, testing, documentation, and more while you code.
|
|
38
|
+
|
|
39
|
+
[](https://www.python.org/downloads/)
|
|
40
|
+
[](#testing)
|
|
41
|
+
[](#status)
|
|
42
|
+
[](LICENSE)
|
|
43
|
+
|
|
44
|
+
## Status
|
|
45
|
+
|
|
46
|
+
✅ **PRODUCTION READY** — Full-featured development automation system. [View detailed implementation status →](./IMPLEMENTATION_STATUS.md)
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Features
|
|
51
|
+
|
|
52
|
+
DevLoop runs background agents that automatically:
|
|
53
|
+
|
|
54
|
+
- **🔍 Linting & Type Checking** — Detect issues as you code (mypy, custom linters)
|
|
55
|
+
- **📝 Code Formatting** — Auto-format files with Black, isort, and more
|
|
56
|
+
- **✅ Testing** — Run relevant tests on file changes
|
|
57
|
+
- **🔐 Security Scanning** — Find vulnerabilities with Bandit
|
|
58
|
+
- **📚 Documentation** — Keep docs in sync with code changes
|
|
59
|
+
- **⚡ Performance** — Track performance metrics and detect regressions
|
|
60
|
+
- **🎯 Git Integration** — Generate smart commit messages
|
|
61
|
+
- **🤖 Custom Agents** — Create no-code agents via builder pattern
|
|
62
|
+
- **📊 Learning System** — Automatically learn patterns and optimize behavior
|
|
63
|
+
- **🔄 Auto-fix** — Safely apply fixes (configurable safety levels)
|
|
64
|
+
|
|
65
|
+
All agents run **non-intrusively in the background**, respecting your workflow.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Quick Start
|
|
70
|
+
|
|
71
|
+
### Installation
|
|
72
|
+
|
|
73
|
+
**Prerequisites:** Python 3.11+, Poetry
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Clone the repository
|
|
77
|
+
git clone https://github.com/wioota/devloop
|
|
78
|
+
cd devloop
|
|
79
|
+
|
|
80
|
+
# Install poetry (if needed)
|
|
81
|
+
curl -sSL https://install.python-poetry.org | python3 -
|
|
82
|
+
|
|
83
|
+
# Install dependencies
|
|
84
|
+
poetry install
|
|
85
|
+
|
|
86
|
+
# Activate virtual environment
|
|
87
|
+
poetry shell
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Initialize & Run (Fully Automated)
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# 1. Initialize in your project (handles everything automatically)
|
|
94
|
+
devloop init /path/to/your/project
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
The `init` command automatically:
|
|
98
|
+
- ✅ Sets up .devloop directory and configuration
|
|
99
|
+
- ✅ Creates AGENTS.md and CODING_RULES.md
|
|
100
|
+
- ✅ Sets up git hooks (if git repo)
|
|
101
|
+
- ✅ Registers Amp integration (if in Amp)
|
|
102
|
+
- ✅ Configures commit/push discipline enforcement
|
|
103
|
+
- ✅ Verifies everything works
|
|
104
|
+
|
|
105
|
+
Then just:
|
|
106
|
+
```bash
|
|
107
|
+
# 2. Start watching for changes
|
|
108
|
+
cd /path/to/your/project
|
|
109
|
+
devloop watch .
|
|
110
|
+
|
|
111
|
+
# 3. Make code changes and watch agents respond
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**That's it!** No manual configuration needed. DevLoop will automatically monitor your project, run agents on file changes, and enforce commit discipline.
|
|
115
|
+
|
|
116
|
+
[View the installation automation details →](./INSTALLATION_AUTOMATION.md)
|
|
117
|
+
|
|
118
|
+
### Common Commands
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
# Watch a directory for changes
|
|
122
|
+
devloop watch .
|
|
123
|
+
|
|
124
|
+
# Show agent status and health
|
|
125
|
+
devloop status
|
|
126
|
+
|
|
127
|
+
# View current findings in Amp
|
|
128
|
+
/agent-summary # Recent findings
|
|
129
|
+
/agent-summary today # Today's findings
|
|
130
|
+
/agent-summary --agent linter --severity error
|
|
131
|
+
|
|
132
|
+
# Create a custom agent
|
|
133
|
+
devloop custom-create my_agent pattern_matcher
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
[View all CLI commands →](./docs/cli-commands.md)
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Architecture
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
File Changes → Collectors → Event Bus → Agents → Results
|
|
144
|
+
(Filesystem) (Git, Etc) (Pub/Sub) (8 built-in + custom)
|
|
145
|
+
↓
|
|
146
|
+
Context Store
|
|
147
|
+
(shared state)
|
|
148
|
+
↓
|
|
149
|
+
Findings & Metrics
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Core Components
|
|
153
|
+
|
|
154
|
+
| Component | Purpose |
|
|
155
|
+
|-----------|---------|
|
|
156
|
+
| **Event Bus** | Pub/sub system for agent coordination |
|
|
157
|
+
| **Collectors** | Monitor filesystem, git, process, system events |
|
|
158
|
+
| **Agents** | Process events and produce findings |
|
|
159
|
+
| **Context Store** | Shared development context |
|
|
160
|
+
| **CLI** | Command-line interface and Amp integration |
|
|
161
|
+
| **Config** | JSON-based configuration system |
|
|
162
|
+
|
|
163
|
+
[Read the full architecture guide →](./docs/architecture.md)
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Agents
|
|
168
|
+
|
|
169
|
+
DevLoop includes **11 built-in agents** out of the box:
|
|
170
|
+
|
|
171
|
+
### Code Quality
|
|
172
|
+
- **Linter Agent** — Runs linters on changed files
|
|
173
|
+
- **Formatter Agent** — Auto-formats code (Black, isort, etc.)
|
|
174
|
+
- **Type Checker Agent** — Background type checking (mypy)
|
|
175
|
+
- **Code Rabbit Agent** — AI-powered code analysis and insights
|
|
176
|
+
|
|
177
|
+
### Testing & Security
|
|
178
|
+
- **Test Runner Agent** — Runs relevant tests on changes
|
|
179
|
+
- **Security Scanner Agent** — Detects code vulnerabilities (Bandit)
|
|
180
|
+
- **Snyk Agent** — Scans dependencies for known vulnerabilities
|
|
181
|
+
- **Performance Profiler Agent** — Tracks performance metrics
|
|
182
|
+
|
|
183
|
+
### Development Workflow
|
|
184
|
+
- **Git Commit Assistant** — Suggests commit messages
|
|
185
|
+
- **CI Monitor Agent** — Tracks GitHub Actions status
|
|
186
|
+
- **Doc Lifecycle Agent** — Manages documentation organization
|
|
187
|
+
|
|
188
|
+
### Custom Agents
|
|
189
|
+
Create your own agents without writing code:
|
|
190
|
+
|
|
191
|
+
```python
|
|
192
|
+
from devloop.core.custom_agent import AgentBuilder, CustomAgentType
|
|
193
|
+
|
|
194
|
+
# Create a custom pattern matcher
|
|
195
|
+
config = (
|
|
196
|
+
AgentBuilder("todo_finder", CustomAgentType.PATTERN_MATCHER)
|
|
197
|
+
.with_description("Find TODO comments")
|
|
198
|
+
.with_triggers("file:created", "file:modified")
|
|
199
|
+
.with_config(patterns=[r"#\s*TODO:.*"])
|
|
200
|
+
.build()
|
|
201
|
+
)
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
[View agent documentation →](./docs/agents.md)
|
|
205
|
+
|
|
206
|
+
### Code Rabbit Integration
|
|
207
|
+
|
|
208
|
+
Code Rabbit Agent provides AI-powered code analysis with insights on code quality, style, and best practices.
|
|
209
|
+
|
|
210
|
+
**Setup:**
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
# 1. Install code-rabbit CLI
|
|
214
|
+
npm install -g @code-rabbit/cli
|
|
215
|
+
# or
|
|
216
|
+
pip install code-rabbit
|
|
217
|
+
|
|
218
|
+
# 2. Set your API key
|
|
219
|
+
export CODE_RABBIT_API_KEY="your-api-key-here"
|
|
220
|
+
|
|
221
|
+
# 3. Agent runs automatically on file changes
|
|
222
|
+
# Results appear in agent findings and context store
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
**Configuration:**
|
|
226
|
+
|
|
227
|
+
```json
|
|
228
|
+
{
|
|
229
|
+
"code-rabbit": {
|
|
230
|
+
"enabled": true,
|
|
231
|
+
"triggers": ["file:modified", "file:created"],
|
|
232
|
+
"config": {
|
|
233
|
+
"apiKey": "${CODE_RABBIT_API_KEY}",
|
|
234
|
+
"minSeverity": "warning",
|
|
235
|
+
"filePatterns": ["**/*.py", "**/*.js", "**/*.ts"]
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
**Features:**
|
|
242
|
+
- Real-time code analysis as you type
|
|
243
|
+
- AI-generated insights on code improvements
|
|
244
|
+
- Integration with DevLoop context store
|
|
245
|
+
- Configurable severity filtering
|
|
246
|
+
- Automatic debouncing to avoid excessive runs
|
|
247
|
+
|
|
248
|
+
### Snyk Integration
|
|
249
|
+
|
|
250
|
+
Snyk Agent provides security vulnerability scanning for project dependencies across multiple package managers.
|
|
251
|
+
|
|
252
|
+
**Setup:**
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
# 1. Install snyk CLI
|
|
256
|
+
npm install -g snyk
|
|
257
|
+
# or
|
|
258
|
+
brew install snyk
|
|
259
|
+
|
|
260
|
+
# 2. Authenticate with Snyk (creates ~/.snyk token)
|
|
261
|
+
snyk auth
|
|
262
|
+
|
|
263
|
+
# 3. Set your API token for DevLoop
|
|
264
|
+
export SNYK_TOKEN="your-snyk-token"
|
|
265
|
+
|
|
266
|
+
# 4. Agent runs automatically on dependency file changes
|
|
267
|
+
# Results appear in agent findings and context store
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
**Configuration:**
|
|
271
|
+
|
|
272
|
+
```json
|
|
273
|
+
{
|
|
274
|
+
"snyk": {
|
|
275
|
+
"enabled": true,
|
|
276
|
+
"triggers": ["file:modified", "file:created"],
|
|
277
|
+
"config": {
|
|
278
|
+
"apiToken": "${SNYK_TOKEN}",
|
|
279
|
+
"severity": "high",
|
|
280
|
+
"filePatterns": [
|
|
281
|
+
"**/package.json",
|
|
282
|
+
"**/requirements.txt",
|
|
283
|
+
"**/Gemfile",
|
|
284
|
+
"**/pom.xml",
|
|
285
|
+
"**/go.mod",
|
|
286
|
+
"**/Cargo.toml"
|
|
287
|
+
]
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
**Features:**
|
|
294
|
+
- Scans all major package managers (npm, pip, Ruby, Maven, Go, Rust)
|
|
295
|
+
- Detects known security vulnerabilities in dependencies
|
|
296
|
+
- Shows CVSS scores and fix availability
|
|
297
|
+
- Integration with DevLoop context store
|
|
298
|
+
- Configurable severity filtering (critical/high/medium/low)
|
|
299
|
+
- Automatic debouncing to avoid excessive scans
|
|
300
|
+
|
|
301
|
+
**Supported Package Managers:**
|
|
302
|
+
- **npm** / **yarn** / **pnpm** (JavaScript/Node.js)
|
|
303
|
+
- **pip** / **pipenv** / **poetry** (Python)
|
|
304
|
+
- **bundler** (Ruby)
|
|
305
|
+
- **maven** / **gradle** (Java)
|
|
306
|
+
- **go mod** (Go)
|
|
307
|
+
- **cargo** (Rust)
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## Configuration
|
|
312
|
+
|
|
313
|
+
Configure agent behavior in `.devloop/agents.json`:
|
|
314
|
+
|
|
315
|
+
```json
|
|
316
|
+
{
|
|
317
|
+
"global": {
|
|
318
|
+
"autonomousFixes": {
|
|
319
|
+
"enabled": true,
|
|
320
|
+
"safetyLevel": "safe_only"
|
|
321
|
+
},
|
|
322
|
+
"maxConcurrentAgents": 5,
|
|
323
|
+
"resourceLimits": {
|
|
324
|
+
"maxCpu": 25,
|
|
325
|
+
"maxMemory": "500MB"
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
"agents": {
|
|
329
|
+
"linter": {
|
|
330
|
+
"enabled": true,
|
|
331
|
+
"triggers": ["file:save", "git:pre-commit"],
|
|
332
|
+
"config": {
|
|
333
|
+
"debounce": 500,
|
|
334
|
+
"filePatterns": ["**/*.py"]
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
**Safety levels:**
|
|
342
|
+
- `safe_only` — Only fix whitespace/indentation
|
|
343
|
+
- `medium_risk` — Include import/formatting fixes
|
|
344
|
+
- `all` — Apply all fixes (use with caution)
|
|
345
|
+
|
|
346
|
+
[Full configuration reference →](./docs/configuration.md)
|
|
347
|
+
|
|
348
|
+
---
|
|
349
|
+
|
|
350
|
+
## CI/CD Integration
|
|
351
|
+
|
|
352
|
+
DevLoop includes GitHub Actions integration with automated security scanning.
|
|
353
|
+
|
|
354
|
+
### GitHub Actions Workflow
|
|
355
|
+
|
|
356
|
+
The default CI pipeline includes:
|
|
357
|
+
|
|
358
|
+
1. **Tests** — Run pytest on Python 3.11 & 3.12
|
|
359
|
+
2. **Lint** — Check code formatting (Black) and style (Ruff)
|
|
360
|
+
3. **Type Check** — Verify type safety with mypy
|
|
361
|
+
4. **Security (Bandit)** — Scan code for security issues
|
|
362
|
+
5. **Security (Snyk)** — Scan dependencies for vulnerabilities
|
|
363
|
+
|
|
364
|
+
### Setting Up Snyk in CI
|
|
365
|
+
|
|
366
|
+
To enable Snyk scanning in your CI pipeline:
|
|
367
|
+
|
|
368
|
+
**1. Get a Snyk API Token:**
|
|
369
|
+
```bash
|
|
370
|
+
# Create account at https://snyk.io
|
|
371
|
+
# Get token from https://app.snyk.io/account/
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
**2. Add token to GitHub secrets:**
|
|
375
|
+
```bash
|
|
376
|
+
# In your GitHub repository:
|
|
377
|
+
# Settings → Secrets and variables → Actions
|
|
378
|
+
# Add new secret: SNYK_TOKEN = your-token
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
**3. Snyk job runs automatically:**
|
|
382
|
+
- Scans all dependencies for known vulnerabilities
|
|
383
|
+
- Fails build if high/critical vulnerabilities found
|
|
384
|
+
- Uploads report as artifact for review
|
|
385
|
+
- Works with all supported package managers
|
|
386
|
+
|
|
387
|
+
**Configuration:**
|
|
388
|
+
- **Severity threshold:** high (fails on critical or high)
|
|
389
|
+
- **Supported managers:** npm, pip, Ruby, Maven, Go, Rust
|
|
390
|
+
- **Report:** `snyk-report.json` available as artifact
|
|
391
|
+
|
|
392
|
+
---
|
|
393
|
+
|
|
394
|
+
## Usage Examples
|
|
395
|
+
|
|
396
|
+
### Example 1: Auto-Format on Save
|
|
397
|
+
|
|
398
|
+
```bash
|
|
399
|
+
# Agent automatically runs Black, isort when you save a file
|
|
400
|
+
echo "x=1" > app.py # Auto-formatted to x = 1
|
|
401
|
+
|
|
402
|
+
# View findings
|
|
403
|
+
/agent-summary recent
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
### Example 2: Run Tests on Changes
|
|
407
|
+
|
|
408
|
+
```bash
|
|
409
|
+
# Test runner agent detects changed test files
|
|
410
|
+
# Automatically runs: pytest path/to/changed_test.py
|
|
411
|
+
|
|
412
|
+
# Or view all test results
|
|
413
|
+
/agent-summary --agent test-runner
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
### Example 3: Create Custom Pattern Matcher
|
|
417
|
+
|
|
418
|
+
```bash
|
|
419
|
+
# Create agent to find TODO comments
|
|
420
|
+
devloop custom-create find_todos pattern_matcher \
|
|
421
|
+
--description "Find TODO comments" \
|
|
422
|
+
--triggers file:created,file:modified
|
|
423
|
+
|
|
424
|
+
# List your custom agents
|
|
425
|
+
devloop custom-list
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
### Example 4: Learn & Optimize
|
|
429
|
+
|
|
430
|
+
```bash
|
|
431
|
+
# View learned patterns
|
|
432
|
+
devloop learning-insights --agent linter
|
|
433
|
+
|
|
434
|
+
# Get recommendations
|
|
435
|
+
devloop learning-recommendations linter
|
|
436
|
+
|
|
437
|
+
# Check performance data
|
|
438
|
+
devloop perf-summary --agent formatter
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
[More examples →](./examples/)
|
|
442
|
+
|
|
443
|
+
---
|
|
444
|
+
|
|
445
|
+
## Testing
|
|
446
|
+
|
|
447
|
+
```bash
|
|
448
|
+
# Run all tests
|
|
449
|
+
poetry run pytest
|
|
450
|
+
|
|
451
|
+
# Run with coverage report
|
|
452
|
+
poetry run pytest --cov=devloop
|
|
453
|
+
|
|
454
|
+
# Run specific test file
|
|
455
|
+
poetry run pytest tests/unit/agents/test_linter.py -v
|
|
456
|
+
|
|
457
|
+
# Run tests with output
|
|
458
|
+
poetry run pytest -v
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
**Current status:** ✅ 112+ tests passing
|
|
462
|
+
|
|
463
|
+
[View test strategy →](./docs/testing.md)
|
|
464
|
+
|
|
465
|
+
---
|
|
466
|
+
|
|
467
|
+
## Development
|
|
468
|
+
|
|
469
|
+
### Project Structure
|
|
470
|
+
|
|
471
|
+
```
|
|
472
|
+
devloop/
|
|
473
|
+
├── src/devloop/
|
|
474
|
+
│ ├── core/ # Event system, agents, context
|
|
475
|
+
│ ├── collectors/ # Event collectors
|
|
476
|
+
│ ├── agents/ # Built-in agents
|
|
477
|
+
│ └── cli/ # CLI interface
|
|
478
|
+
├── tests/ # Unit and integration tests
|
|
479
|
+
├── docs/ # Documentation
|
|
480
|
+
├── examples/ # Usage examples
|
|
481
|
+
└── pyproject.toml # Poetry configuration
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
### Adding a New Agent
|
|
485
|
+
|
|
486
|
+
1. Create `src/devloop/agents/my_agent.py`:
|
|
487
|
+
|
|
488
|
+
```python
|
|
489
|
+
from devloop.core.agent import Agent, AgentResult
|
|
490
|
+
from devloop.core.event import Event
|
|
491
|
+
|
|
492
|
+
class MyAgent(Agent):
|
|
493
|
+
async def handle(self, event: Event) -> AgentResult:
|
|
494
|
+
# Your logic here
|
|
495
|
+
return AgentResult(
|
|
496
|
+
agent_name=self.name,
|
|
497
|
+
success=True,
|
|
498
|
+
duration=0.1,
|
|
499
|
+
message="Processed successfully"
|
|
500
|
+
)
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
2. Register in `src/devloop/cli/main.py`
|
|
504
|
+
|
|
505
|
+
3. Add tests in `tests/unit/agents/test_my_agent.py`
|
|
506
|
+
|
|
507
|
+
[Developer guide →](./docs/development.md)
|
|
508
|
+
|
|
509
|
+
### Code Style
|
|
510
|
+
|
|
511
|
+
- **Formatter:** Black
|
|
512
|
+
- **Linter:** Ruff
|
|
513
|
+
- **Type Checker:** mypy
|
|
514
|
+
- **Python Version:** 3.11+
|
|
515
|
+
|
|
516
|
+
Run formatters:
|
|
517
|
+
```bash
|
|
518
|
+
poetry run black src tests
|
|
519
|
+
poetry run ruff check --fix src tests
|
|
520
|
+
poetry run mypy src
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
---
|
|
524
|
+
|
|
525
|
+
## Documentation
|
|
526
|
+
|
|
527
|
+
- **[Getting Started Guide](./docs/getting-started.md)** — Installation and basic usage
|
|
528
|
+
- **[Architecture Guide](./docs/architecture.md)** — System design and components
|
|
529
|
+
- **[Agent Reference](./docs/agents.md)** — All available agents
|
|
530
|
+
- **[Configuration Guide](./docs/configuration.md)** — Full config reference
|
|
531
|
+
- **[CLI Commands](./docs/cli-commands.md)** — Command reference
|
|
532
|
+
- **[Development Guide](./docs/development.md)** — Contributing guide
|
|
533
|
+
- **[Implementation Status](./IMPLEMENTATION_STATUS.md)** — What's implemented
|
|
534
|
+
- **[Learning & Optimization](./PHASE3_COMPLETE.md)** — Advanced features
|
|
535
|
+
|
|
536
|
+
---
|
|
537
|
+
|
|
538
|
+
## Design Principles
|
|
539
|
+
|
|
540
|
+
DevLoop follows these core principles:
|
|
541
|
+
|
|
542
|
+
✅ **Non-Intrusive** — Runs in background without blocking workflow
|
|
543
|
+
✅ **Event-Driven** — All actions triggered by observable events
|
|
544
|
+
✅ **Configurable** — Fine-grained control over agent behavior
|
|
545
|
+
✅ **Context-Aware** — Understands your project structure
|
|
546
|
+
✅ **Parallel** — Multiple agents run concurrently
|
|
547
|
+
✅ **Lightweight** — Respects system resources
|
|
548
|
+
|
|
549
|
+
[Read the full design spec →](./AGENTS.md)
|
|
550
|
+
|
|
551
|
+
---
|
|
552
|
+
|
|
553
|
+
## Troubleshooting
|
|
554
|
+
|
|
555
|
+
### Agents not running
|
|
556
|
+
|
|
557
|
+
```bash
|
|
558
|
+
# Check status
|
|
559
|
+
devloop status
|
|
560
|
+
|
|
561
|
+
# View logs
|
|
562
|
+
tail -f .devloop/agent.log
|
|
563
|
+
|
|
564
|
+
# Enable verbose mode
|
|
565
|
+
devloop watch . --verbose
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
### Performance issues
|
|
569
|
+
|
|
570
|
+
Check `.devloop/agents.json`:
|
|
571
|
+
|
|
572
|
+
```json
|
|
573
|
+
{
|
|
574
|
+
"global": {
|
|
575
|
+
"maxConcurrentAgents": 2,
|
|
576
|
+
"resourceLimits": {
|
|
577
|
+
"maxCpu": 10,
|
|
578
|
+
"maxMemory": "200MB"
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
```
|
|
583
|
+
|
|
584
|
+
### Custom agents not found
|
|
585
|
+
|
|
586
|
+
```bash
|
|
587
|
+
# Verify they exist
|
|
588
|
+
devloop custom-list
|
|
589
|
+
|
|
590
|
+
# Check storage
|
|
591
|
+
ls -la .devloop/custom_agents/
|
|
592
|
+
```
|
|
593
|
+
|
|
594
|
+
[Full troubleshooting guide →](./docs/troubleshooting.md)
|
|
595
|
+
|
|
596
|
+
---
|
|
597
|
+
|
|
598
|
+
## Performance
|
|
599
|
+
|
|
600
|
+
- **Memory:** ~50MB base + ~10MB per agent
|
|
601
|
+
- **CPU:** <5% idle, 10-25% when processing
|
|
602
|
+
- **Startup:** <1 second
|
|
603
|
+
- **Event latency:** <100ms typical
|
|
604
|
+
|
|
605
|
+
All operations are async and non-blocking.
|
|
606
|
+
|
|
607
|
+
---
|
|
608
|
+
|
|
609
|
+
## Roadmap
|
|
610
|
+
|
|
611
|
+
### Completed ✅
|
|
612
|
+
- Core agents: linting, formatting, testing, type checking
|
|
613
|
+
- Security & performance: vulnerability scanning, profiling
|
|
614
|
+
- Workflow automation: git integration, CI monitoring, documentation
|
|
615
|
+
- Custom agents: create your own without writing code
|
|
616
|
+
- Learning system: pattern recognition and optimization
|
|
617
|
+
|
|
618
|
+
### In Development 🚀
|
|
619
|
+
- Cloud pattern repository (opt-in)
|
|
620
|
+
- Agent composition and pipelines
|
|
621
|
+
- Community agent sharing
|
|
622
|
+
|
|
623
|
+
### Future 🔮
|
|
624
|
+
- Multi-project support
|
|
625
|
+
- Team coordination features
|
|
626
|
+
- LLM-powered agents
|
|
627
|
+
|
|
628
|
+
---
|
|
629
|
+
|
|
630
|
+
## Amp Integration
|
|
631
|
+
|
|
632
|
+
Using DevLoop in Amp? See [AMP_ONBOARDING.md](./AMP_ONBOARDING.md) for:
|
|
633
|
+
|
|
634
|
+
- Installation and registration checklist
|
|
635
|
+
- Required configuration
|
|
636
|
+
- Post-task verification workflow
|
|
637
|
+
- Troubleshooting guide
|
|
638
|
+
|
|
639
|
+
The commit/push discipline is automatically enforced via `.agents/verify-task-complete`.
|
|
640
|
+
|
|
641
|
+
---
|
|
642
|
+
|
|
643
|
+
## Contributing
|
|
644
|
+
|
|
645
|
+
Contributions welcome! Please read [CODING_RULES.md](./CODING_RULES.md) for:
|
|
646
|
+
|
|
647
|
+
- Code style guidelines
|
|
648
|
+
- Testing requirements
|
|
649
|
+
- Commit message format
|
|
650
|
+
- Pull request process
|
|
651
|
+
|
|
652
|
+
### Development Setup
|
|
653
|
+
|
|
654
|
+
```bash
|
|
655
|
+
git clone https://github.com/wioota/devloop
|
|
656
|
+
cd devloop
|
|
657
|
+
poetry install
|
|
658
|
+
poetry run pytest
|
|
659
|
+
```
|
|
660
|
+
|
|
661
|
+
### Running Tests
|
|
662
|
+
|
|
663
|
+
```bash
|
|
664
|
+
# All tests
|
|
665
|
+
poetry run pytest
|
|
666
|
+
|
|
667
|
+
# Specific test file
|
|
668
|
+
poetry run pytest tests/unit/agents/test_linter.py
|
|
669
|
+
|
|
670
|
+
# With coverage
|
|
671
|
+
poetry run pytest --cov=devloop
|
|
672
|
+
```
|
|
673
|
+
|
|
674
|
+
---
|
|
675
|
+
|
|
676
|
+
## License
|
|
677
|
+
|
|
678
|
+
DevLoop is released under the [MIT License](LICENSE).
|
|
679
|
+
|
|
680
|
+
This means you can freely use, modify, and distribute this software for any purpose, including commercial use, as long as you include the original copyright notice and license text.
|
|
681
|
+
|
|
682
|
+
---
|
|
683
|
+
|
|
684
|
+
## Support
|
|
685
|
+
|
|
686
|
+
- 📚 **Documentation:** [./docs/](./docs/)
|
|
687
|
+
- 🐛 **Issues:** [GitHub Issues](https://github.com/wioota/devloop/issues)
|
|
688
|
+
- 💬 **Discussions:** [GitHub Discussions](https://github.com/wioota/devloop/discussions)
|
|
689
|
+
- 🤝 **Contributing:** [CONTRIBUTING.md](./CODING_RULES.md)
|
|
690
|
+
|
|
691
|
+
---
|
|
692
|
+
|
|
693
|
+
## Acknowledgments
|
|
694
|
+
|
|
695
|
+
Built with:
|
|
696
|
+
- [Watchdog](https://github.com/gorakhargosh/watchdog) — File system monitoring
|
|
697
|
+
- [Typer](https://typer.tiangolo.com/) — CLI framework
|
|
698
|
+
- [Pydantic](https://docs.pydantic.dev/) — Data validation
|
|
699
|
+
- [Rich](https://rich.readthedocs.io/) — Terminal output
|
|
700
|
+
|
|
701
|
+
---
|
|
702
|
+
|
|
703
|
+
**Made with ❤️ by the DevLoop team**
|
|
704
|
+
|
|
705
|
+
|