patchpilots 0.2.0 → 0.2.1

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.
Files changed (2) hide show
  1. package/README.md +55 -61
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -32,7 +32,7 @@ Built for solo developers and hobby projects — when you don't have a team to r
32
32
  ## Install
33
33
 
34
34
  ```bash
35
- npx patchpilots review ./src
35
+ npx patchpilots audit ./src
36
36
  ```
37
37
 
38
38
  Or install globally:
@@ -41,17 +41,35 @@ Or install globally:
41
41
  npm install -g patchpilots
42
42
  ```
43
43
 
44
+ ## The Killer Feature
45
+
46
+ **`patchpilots audit`** — run all 7 agents in one command. No other tool does this.
47
+
48
+ ```bash
49
+ npx patchpilots audit ./src --write
50
+ ```
51
+
52
+ ```
53
+ 🧠 Planner → 🔍 Reviewer → 🔒 Security → ✨ Coder → 🧪 Tester → 📝 Docs
54
+ ```
55
+
56
+ One command gives you: an implementation plan, code review, security audit, auto-fixes, unit tests, and documentation. Skip what you don't need:
57
+
58
+ ```bash
59
+ npx patchpilots audit ./src --skip plan,docs --write
60
+ ```
61
+
44
62
  ## The Crew
45
63
 
46
64
  | Agent | Command | What it does |
47
65
  |-------|---------|--------------|
66
+ | 🎯 Orchestrator | `patchpilots audit` | Runs the full pipeline in one command |
48
67
  | 🧠 Planner | `patchpilots plan` | Analyzes codebase and breaks down work into tasks |
49
68
  | 🔍 Reviewer | `patchpilots review` | Finds bugs, security issues, and code smells |
50
69
  | ✨ Coder | `patchpilots improve` | Fixes code based on review findings (diff-based patches) |
51
70
  | 🧪 Tester | `patchpilots test` | Generates unit tests for your source files |
52
71
  | 📝 Docs | `patchpilots docs` | Generates JSDoc/TSDoc documentation |
53
72
  | 🔒 Security | `patchpilots security` | OWASP Top 10 audit, secrets detection, auth analysis |
54
- | 🎯 Orchestrator | (coordinates) | Manages the pipeline between agents |
55
73
 
56
74
  ## Quick start
57
75
 
@@ -63,27 +81,35 @@ echo '{"apiKey": "sk-ant-..."}' > ~/.patchpilots.json
63
81
  # Option 2: Environment variable
64
82
  export ANTHROPIC_API_KEY=your-key-here
65
83
 
66
- # Review code
67
- npx patchpilots review ./src
68
-
69
- # Generate an implementation plan
70
- npx patchpilots plan ./src --task "add authentication"
84
+ # Run the full audit
85
+ npx patchpilots audit ./src --write
71
86
 
72
- # Review and fix code
87
+ # Or run individual agents:
88
+ npx patchpilots review ./src
89
+ npx patchpilots security ./src
73
90
  npx patchpilots improve ./src --write
74
-
75
- # Generate unit tests
76
91
  npx patchpilots test ./src --write
77
-
78
- # Generate documentation
79
92
  npx patchpilots docs ./src --write
80
-
81
- # Run a security audit
82
- npx patchpilots security ./src
93
+ npx patchpilots plan ./src --task "add authentication"
83
94
  ```
84
95
 
85
96
  ## CLI commands
86
97
 
98
+ ### `patchpilots audit <path>`
99
+
100
+ Runs all agents in sequence: plan → review → security → improve → test → docs.
101
+
102
+ | Option | Description |
103
+ |--------|-------------|
104
+ | `--write` | Apply patches and write tests/docs to disk |
105
+ | `--backup` | Create `.bak` files before patching |
106
+ | `--skip <agents>` | Skip agents (comma-separated: `plan,test,docs`) |
107
+ | `--severity <level>` | Minimum severity for review findings |
108
+ | `--framework <name>` | Test framework (default: `vitest`) |
109
+ | `--json` | Output raw JSON |
110
+ | `--verbose` | Show per-agent token usage |
111
+ | `-m, --model <model>` | Claude model to use |
112
+
87
113
  ### `patchpilots review <path>`
88
114
 
89
115
  Analyzes your code and reports findings grouped by file, color-coded by severity.
@@ -172,23 +198,12 @@ TypeScript, JavaScript, JSX/TSX, Python, Go, Rust, Java, Ruby, PHP, C/C++, C#, S
172
198
 
173
199
  ## Powered by Claude API
174
200
 
175
- ### Structured outputs
176
- Every agent response is **guaranteed** to match its Zod schema via JSON schema enforcement. No regex JSON extraction, no prayer-based parsing — the API enforces the schema.
177
-
178
- ### Adaptive thinking
179
- Agents use Claude's adaptive thinking mode for deeper reasoning. The Reviewer agent thinks through code logic before flagging issues, catching bugs that a surface-level scan would miss.
180
-
181
- ### Streaming
182
- Responses are streamed in real-time. No hanging on long requests, no timeouts. Use `--verbose` to see thinking progress as it happens.
183
-
184
- ### Prompt caching
185
- System prompts are cached via Claude's `cache_control` — repeat runs against the same project cost ~90% less on the cached portion.
186
-
187
- ### Cost tracking
188
- Every run shows a cost summary with per-agent token usage and estimated USD cost.
189
-
190
- ### Diff-based patches
191
- The Coder agent returns search-and-replace patches instead of full file content, dramatically reducing token usage and enabling fixes on large files.
201
+ - **Structured outputs** — guaranteed schema compliance via JSON schema enforcement
202
+ - **Adaptive thinking** deeper reasoning catches bugs a surface scan misses
203
+ - **Streaming** — real-time response delivery, no timeouts
204
+ - **Prompt caching** — ~90% cost savings on repeat runs
205
+ - **Cost tracking** per-agent token usage and USD estimate after every run
206
+ - **Diff-based patches** — search-and-replace instead of full files, works on large codebases
192
207
 
193
208
  ## Architecture
194
209
 
@@ -202,46 +217,25 @@ class MyAgent extends BaseAgent<MyOutputType> {
202
217
  }
203
218
  ```
204
219
 
205
- Adding a new agent is one file + three methods. The orchestrator handles coordination, streaming, error handling, and output formatting.
206
-
207
- ### Error handling
208
-
209
- The LLM client uses typed Anthropic SDK exceptions:
210
- - `RateLimitError` — automatic retry with backoff
211
- - `AuthenticationError` — clear message about API key
212
- - `APIError` — surfaced with status code and details
213
-
214
- ## Tech stack
215
-
216
- - TypeScript + Node.js
217
- - Claude API (`@anthropic-ai/sdk`)
218
- - Structured outputs (JSON schema) — guaranteed schema compliance
219
- - Adaptive thinking — deeper code analysis
220
- - Streaming — real-time response delivery
221
- - Diff-based patches — efficient code fixes
222
- - Prompt caching — cost optimization
223
- - Commander (CLI) + Chalk (terminal formatting) + Zod (validation)
220
+ Adding a new agent is one file + three methods.
224
221
 
225
222
  ## Roadmap
226
223
 
227
224
  ### Done
228
225
  - [x] 7 AI agents: Planner, Reviewer, Coder, Tester, Docs, Security, Orchestrator
229
- - [x] Structured outputs with Zod schemas
230
- - [x] Adaptive thinking for deeper code analysis
231
- - [x] Streaming with real-time progress
232
- - [x] Prompt caching (~90% cost savings on repeat runs)
233
- - [x] Cost tracking (per-agent token usage and USD estimate)
234
- - [x] Global config (`~/.patchpilots.json`)
226
+ - [x] `patchpilots audit` full pipeline in one command
227
+ - [x] Structured outputs, adaptive thinking, streaming
228
+ - [x] Prompt caching + cost tracking
235
229
  - [x] Diff-based Coder output (patches instead of full files)
230
+ - [x] Global config + per-project config
236
231
  - [x] Published to npm (`npx patchpilots`)
237
- - [x] HTML, CSS, SCSS, Vue, Svelte file support
232
+ - [x] 18 file types supported
238
233
 
239
234
  ### Next up
240
- - [x] **Security agent** — OWASP Top 10, secrets detection, input validation, auth pattern analysis
241
- - [ ] **Parallel file review** — review files in batches instead of one giant prompt
242
235
  - [ ] **GitHub Action** — auto-review PRs and post findings as comments
243
- - [x] **`patchpilots audit`**full pipeline: plan → review security improve test → docs in one command
236
+ - [ ] **Parallel file review** — review in batches instead of one giant prompt
244
237
  - [ ] **Smart model routing** — Haiku for Docs/Tester, Sonnet for Reviewer/Coder
238
+ - [ ] **Custom agents** — define your own agents via config
245
239
  - [ ] **Designer agent** — generate CSS, design tokens, and component markup
246
240
 
247
241
  ## License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchpilots",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "A team of AI agents that reviews and improves your code automatically",
5
5
  "type": "module",
6
6
  "bin": {