autoforge-ai 0.1.0
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.
- package/.claude/commands/check-code.md +32 -0
- package/.claude/commands/checkpoint.md +40 -0
- package/.claude/commands/create-spec.md +613 -0
- package/.claude/commands/expand-project.md +234 -0
- package/.claude/commands/gsd-to-autoforge-spec.md +10 -0
- package/.claude/commands/review-pr.md +75 -0
- package/.claude/templates/app_spec.template.txt +331 -0
- package/.claude/templates/coding_prompt.template.md +265 -0
- package/.claude/templates/initializer_prompt.template.md +354 -0
- package/.claude/templates/testing_prompt.template.md +146 -0
- package/.env.example +64 -0
- package/LICENSE.md +676 -0
- package/README.md +423 -0
- package/agent.py +444 -0
- package/api/__init__.py +10 -0
- package/api/database.py +536 -0
- package/api/dependency_resolver.py +449 -0
- package/api/migration.py +156 -0
- package/auth.py +83 -0
- package/autoforge_paths.py +315 -0
- package/autonomous_agent_demo.py +293 -0
- package/bin/autoforge.js +3 -0
- package/client.py +607 -0
- package/env_constants.py +27 -0
- package/examples/OPTIMIZE_CONFIG.md +230 -0
- package/examples/README.md +531 -0
- package/examples/org_config.yaml +172 -0
- package/examples/project_allowed_commands.yaml +139 -0
- package/lib/cli.js +791 -0
- package/mcp_server/__init__.py +1 -0
- package/mcp_server/feature_mcp.py +988 -0
- package/package.json +53 -0
- package/parallel_orchestrator.py +1800 -0
- package/progress.py +247 -0
- package/prompts.py +427 -0
- package/pyproject.toml +17 -0
- package/rate_limit_utils.py +132 -0
- package/registry.py +614 -0
- package/requirements-prod.txt +14 -0
- package/security.py +959 -0
- package/server/__init__.py +17 -0
- package/server/main.py +261 -0
- package/server/routers/__init__.py +32 -0
- package/server/routers/agent.py +177 -0
- package/server/routers/assistant_chat.py +327 -0
- package/server/routers/devserver.py +309 -0
- package/server/routers/expand_project.py +239 -0
- package/server/routers/features.py +746 -0
- package/server/routers/filesystem.py +514 -0
- package/server/routers/projects.py +524 -0
- package/server/routers/schedules.py +356 -0
- package/server/routers/settings.py +127 -0
- package/server/routers/spec_creation.py +357 -0
- package/server/routers/terminal.py +453 -0
- package/server/schemas.py +593 -0
- package/server/services/__init__.py +36 -0
- package/server/services/assistant_chat_session.py +496 -0
- package/server/services/assistant_database.py +304 -0
- package/server/services/chat_constants.py +57 -0
- package/server/services/dev_server_manager.py +557 -0
- package/server/services/expand_chat_session.py +399 -0
- package/server/services/process_manager.py +657 -0
- package/server/services/project_config.py +475 -0
- package/server/services/scheduler_service.py +683 -0
- package/server/services/spec_chat_session.py +502 -0
- package/server/services/terminal_manager.py +756 -0
- package/server/utils/__init__.py +1 -0
- package/server/utils/process_utils.py +134 -0
- package/server/utils/project_helpers.py +32 -0
- package/server/utils/validation.py +54 -0
- package/server/websocket.py +903 -0
- package/start.py +456 -0
- package/ui/dist/assets/index-8W_wmZzz.js +168 -0
- package/ui/dist/assets/index-B47Ubhox.css +1 -0
- package/ui/dist/assets/vendor-flow-CVNK-_lx.js +7 -0
- package/ui/dist/assets/vendor-query-BUABzP5o.js +1 -0
- package/ui/dist/assets/vendor-radix-DTNNCg2d.js +45 -0
- package/ui/dist/assets/vendor-react-qkC6yhPU.js +1 -0
- package/ui/dist/assets/vendor-utils-COeKbHgx.js +2 -0
- package/ui/dist/assets/vendor-xterm-DP_gxef0.js +16 -0
- package/ui/dist/index.html +23 -0
- package/ui/dist/ollama.png +0 -0
- package/ui/dist/vite.svg +6 -0
- package/ui/package.json +57 -0
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
# How to Optimize Your allowed_commands.yaml
|
|
2
|
+
|
|
3
|
+
## The Problem
|
|
4
|
+
|
|
5
|
+
Your config might have redundant commands like this:
|
|
6
|
+
|
|
7
|
+
```yaml
|
|
8
|
+
commands:
|
|
9
|
+
- name: flutter
|
|
10
|
+
- name: flutter* # ← This already covers EVERYTHING below!
|
|
11
|
+
- name: flutter test # ← Redundant
|
|
12
|
+
- name: flutter test --coverage # ← Redundant
|
|
13
|
+
- name: flutter build apk # ← Redundant
|
|
14
|
+
- name: flutter build ios # ← Redundant
|
|
15
|
+
# ... 20+ more flutter commands
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**Result:** 65 commands when you only need ~10-15
|
|
19
|
+
|
|
20
|
+
## How Wildcards Work
|
|
21
|
+
|
|
22
|
+
When you have `flutter*`, it matches:
|
|
23
|
+
- ✅ `flutter` (the base command)
|
|
24
|
+
- ✅ `flutter test`
|
|
25
|
+
- ✅ `flutter test --coverage`
|
|
26
|
+
- ✅ `flutter build apk`
|
|
27
|
+
- ✅ `flutter build ios`
|
|
28
|
+
- ✅ `flutter run`
|
|
29
|
+
- ✅ **ANY command starting with "flutter"**
|
|
30
|
+
|
|
31
|
+
**You don't need to list every subcommand separately!**
|
|
32
|
+
|
|
33
|
+
## Example: GOD-APP Optimization
|
|
34
|
+
|
|
35
|
+
### Before (65 commands)
|
|
36
|
+
```yaml
|
|
37
|
+
commands:
|
|
38
|
+
# Flutter
|
|
39
|
+
- name: flutter
|
|
40
|
+
- name: flutter*
|
|
41
|
+
- name: flutter test
|
|
42
|
+
- name: flutter test --coverage
|
|
43
|
+
- name: flutter test --exclude-tags=golden,integration
|
|
44
|
+
- name: flutter test --tags=golden
|
|
45
|
+
- name: flutter test --tags=golden --update-goldens
|
|
46
|
+
- name: flutter test --verbose
|
|
47
|
+
- name: flutter drive
|
|
48
|
+
- name: flutter test integration_test/
|
|
49
|
+
- name: flutter build apk
|
|
50
|
+
- name: flutter build apk --debug
|
|
51
|
+
- name: flutter build apk --release
|
|
52
|
+
- name: flutter build appbundle
|
|
53
|
+
- name: flutter build ios
|
|
54
|
+
- name: flutter build ios --debug
|
|
55
|
+
- name: flutter build ipa
|
|
56
|
+
- name: flutter build web
|
|
57
|
+
- name: flutter pub get
|
|
58
|
+
- name: flutter pub upgrade
|
|
59
|
+
- name: flutter doctor
|
|
60
|
+
- name: flutter clean
|
|
61
|
+
# ... and more
|
|
62
|
+
|
|
63
|
+
# Dart
|
|
64
|
+
- name: dart
|
|
65
|
+
- name: dartfmt
|
|
66
|
+
- name: dartanalyzer
|
|
67
|
+
- name: dart format
|
|
68
|
+
- name: dart analyze
|
|
69
|
+
- name: dart fix
|
|
70
|
+
- name: dart pub
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### After (15 commands) ✨
|
|
74
|
+
```yaml
|
|
75
|
+
commands:
|
|
76
|
+
# Flutter & Dart (wildcards cover all subcommands)
|
|
77
|
+
- name: flutter*
|
|
78
|
+
description: All Flutter SDK commands
|
|
79
|
+
|
|
80
|
+
- name: dart*
|
|
81
|
+
description: All Dart language tools
|
|
82
|
+
|
|
83
|
+
# Testing tools
|
|
84
|
+
- name: patrol
|
|
85
|
+
description: Patrol integration testing (if needed separately)
|
|
86
|
+
|
|
87
|
+
# Coverage tools
|
|
88
|
+
- name: lcov
|
|
89
|
+
description: Code coverage tool
|
|
90
|
+
|
|
91
|
+
- name: genhtml
|
|
92
|
+
description: Generate HTML coverage reports
|
|
93
|
+
|
|
94
|
+
# Android tools
|
|
95
|
+
- name: adb*
|
|
96
|
+
description: Android Debug Bridge commands
|
|
97
|
+
|
|
98
|
+
- name: gradle*
|
|
99
|
+
description: Gradle build system
|
|
100
|
+
|
|
101
|
+
# iOS tools (macOS only)
|
|
102
|
+
- name: xcrun*
|
|
103
|
+
description: Xcode developer tools
|
|
104
|
+
|
|
105
|
+
- name: xcodebuild
|
|
106
|
+
description: Xcode build system
|
|
107
|
+
|
|
108
|
+
- name: simctl
|
|
109
|
+
description: iOS Simulator control
|
|
110
|
+
|
|
111
|
+
- name: ios-deploy
|
|
112
|
+
description: Deploy to iOS devices
|
|
113
|
+
|
|
114
|
+
# Project scripts
|
|
115
|
+
- name: ./scripts/*.sh
|
|
116
|
+
description: All project build/test scripts
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**Reduced from 65 → 15 commands (77% reduction!)**
|
|
120
|
+
|
|
121
|
+
## Optimization Checklist
|
|
122
|
+
|
|
123
|
+
For each group of commands, ask:
|
|
124
|
+
|
|
125
|
+
### ❓ "Do I have the base command AND a wildcard?"
|
|
126
|
+
```yaml
|
|
127
|
+
# Bad (redundant)
|
|
128
|
+
- name: flutter
|
|
129
|
+
- name: flutter*
|
|
130
|
+
|
|
131
|
+
# Good (just the wildcard)
|
|
132
|
+
- name: flutter*
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
The wildcard already matches the base command!
|
|
136
|
+
|
|
137
|
+
### ❓ "Am I listing subcommands individually?"
|
|
138
|
+
```yaml
|
|
139
|
+
# Bad (verbose)
|
|
140
|
+
- name: flutter test
|
|
141
|
+
- name: flutter test --coverage
|
|
142
|
+
- name: flutter build apk
|
|
143
|
+
- name: flutter run
|
|
144
|
+
|
|
145
|
+
# Good (one wildcard)
|
|
146
|
+
- name: flutter*
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### ❓ "Can I group multiple scripts?"
|
|
150
|
+
```yaml
|
|
151
|
+
# If you can't use wildcards for scripts, at least group them logically
|
|
152
|
+
- name: ./scripts/test.sh
|
|
153
|
+
- name: ./scripts/build.sh
|
|
154
|
+
- name: ./scripts/integration_test.sh
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
These are fine - scripts need explicit paths. But if you have 20+ scripts, consider if they're all necessary.
|
|
158
|
+
|
|
159
|
+
## Common Wildcards
|
|
160
|
+
|
|
161
|
+
| Instead of... | Use... | Covers |
|
|
162
|
+
|---------------|--------|--------|
|
|
163
|
+
| flutter, flutter test, flutter build, flutter run | `flutter*` | All flutter commands |
|
|
164
|
+
| dart, dart format, dart analyze, dart pub | `dart*` | All dart commands |
|
|
165
|
+
| npm, npm install, npm run, npm test | `npm*` | All npm commands |
|
|
166
|
+
| cargo, cargo build, cargo test, cargo run | `cargo*` | All cargo commands |
|
|
167
|
+
| git, git status, git commit, git push | Just `git` | Git is in global defaults |
|
|
168
|
+
|
|
169
|
+
## When NOT to Optimize
|
|
170
|
+
|
|
171
|
+
Keep separate entries when:
|
|
172
|
+
1. **Different base commands:** `swift` and `swiftc` are different (though `swift*` covers both)
|
|
173
|
+
2. **Documentation clarity:** Sometimes listing helps future developers understand what's needed
|
|
174
|
+
3. **Argument restrictions (Phase 3):** If you'll add argument validation later
|
|
175
|
+
|
|
176
|
+
## Quick Optimization Script
|
|
177
|
+
|
|
178
|
+
To see what you can reduce:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
# Count commands by prefix
|
|
182
|
+
grep "^ - name:" .autoforge/allowed_commands.yaml | \
|
|
183
|
+
sed 's/^ - name: //' | \
|
|
184
|
+
cut -d' ' -f1 | \
|
|
185
|
+
sort | uniq -c | sort -rn
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
If you see multiple commands with the same prefix, use a wildcard!
|
|
189
|
+
|
|
190
|
+
## UI Feedback (Future Enhancement)
|
|
191
|
+
|
|
192
|
+
Great suggestion! Here's what a UI could show:
|
|
193
|
+
|
|
194
|
+
```
|
|
195
|
+
⚠️ Config Optimization Available
|
|
196
|
+
|
|
197
|
+
Your config has 65 commands. We detected opportunities to reduce it:
|
|
198
|
+
|
|
199
|
+
• 25 flutter commands → Use flutter* (saves 24 entries)
|
|
200
|
+
• 8 dart commands → Use dart* (saves 7 entries)
|
|
201
|
+
• 12 adb commands → Use adb* (saves 11 entries)
|
|
202
|
+
|
|
203
|
+
[Optimize Automatically] [Keep As-Is]
|
|
204
|
+
|
|
205
|
+
Potential reduction: 65 → 23 commands
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Or during config editing:
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
📊 Command Usage Stats
|
|
212
|
+
|
|
213
|
+
flutter* : 25 subcommands detected
|
|
214
|
+
dart* : 8 subcommands detected
|
|
215
|
+
./scripts/*.sh : 7 scripts detected
|
|
216
|
+
|
|
217
|
+
💡 Tip: Using wildcards covers all subcommands automatically
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
**This would be a great addition to Phase 3 or beyond!**
|
|
221
|
+
|
|
222
|
+
## Your GOD-APP Optimization
|
|
223
|
+
|
|
224
|
+
Here's what you could do:
|
|
225
|
+
|
|
226
|
+
**Current:** 65 commands (exceeds 50 limit, config rejected!)
|
|
227
|
+
|
|
228
|
+
**Optimized:** ~15 commands using wildcards
|
|
229
|
+
|
|
230
|
+
Would you like me to create an optimized version of your GOD-APP config?
|