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.
Files changed (84) hide show
  1. package/.claude/commands/check-code.md +32 -0
  2. package/.claude/commands/checkpoint.md +40 -0
  3. package/.claude/commands/create-spec.md +613 -0
  4. package/.claude/commands/expand-project.md +234 -0
  5. package/.claude/commands/gsd-to-autoforge-spec.md +10 -0
  6. package/.claude/commands/review-pr.md +75 -0
  7. package/.claude/templates/app_spec.template.txt +331 -0
  8. package/.claude/templates/coding_prompt.template.md +265 -0
  9. package/.claude/templates/initializer_prompt.template.md +354 -0
  10. package/.claude/templates/testing_prompt.template.md +146 -0
  11. package/.env.example +64 -0
  12. package/LICENSE.md +676 -0
  13. package/README.md +423 -0
  14. package/agent.py +444 -0
  15. package/api/__init__.py +10 -0
  16. package/api/database.py +536 -0
  17. package/api/dependency_resolver.py +449 -0
  18. package/api/migration.py +156 -0
  19. package/auth.py +83 -0
  20. package/autoforge_paths.py +315 -0
  21. package/autonomous_agent_demo.py +293 -0
  22. package/bin/autoforge.js +3 -0
  23. package/client.py +607 -0
  24. package/env_constants.py +27 -0
  25. package/examples/OPTIMIZE_CONFIG.md +230 -0
  26. package/examples/README.md +531 -0
  27. package/examples/org_config.yaml +172 -0
  28. package/examples/project_allowed_commands.yaml +139 -0
  29. package/lib/cli.js +791 -0
  30. package/mcp_server/__init__.py +1 -0
  31. package/mcp_server/feature_mcp.py +988 -0
  32. package/package.json +53 -0
  33. package/parallel_orchestrator.py +1800 -0
  34. package/progress.py +247 -0
  35. package/prompts.py +427 -0
  36. package/pyproject.toml +17 -0
  37. package/rate_limit_utils.py +132 -0
  38. package/registry.py +614 -0
  39. package/requirements-prod.txt +14 -0
  40. package/security.py +959 -0
  41. package/server/__init__.py +17 -0
  42. package/server/main.py +261 -0
  43. package/server/routers/__init__.py +32 -0
  44. package/server/routers/agent.py +177 -0
  45. package/server/routers/assistant_chat.py +327 -0
  46. package/server/routers/devserver.py +309 -0
  47. package/server/routers/expand_project.py +239 -0
  48. package/server/routers/features.py +746 -0
  49. package/server/routers/filesystem.py +514 -0
  50. package/server/routers/projects.py +524 -0
  51. package/server/routers/schedules.py +356 -0
  52. package/server/routers/settings.py +127 -0
  53. package/server/routers/spec_creation.py +357 -0
  54. package/server/routers/terminal.py +453 -0
  55. package/server/schemas.py +593 -0
  56. package/server/services/__init__.py +36 -0
  57. package/server/services/assistant_chat_session.py +496 -0
  58. package/server/services/assistant_database.py +304 -0
  59. package/server/services/chat_constants.py +57 -0
  60. package/server/services/dev_server_manager.py +557 -0
  61. package/server/services/expand_chat_session.py +399 -0
  62. package/server/services/process_manager.py +657 -0
  63. package/server/services/project_config.py +475 -0
  64. package/server/services/scheduler_service.py +683 -0
  65. package/server/services/spec_chat_session.py +502 -0
  66. package/server/services/terminal_manager.py +756 -0
  67. package/server/utils/__init__.py +1 -0
  68. package/server/utils/process_utils.py +134 -0
  69. package/server/utils/project_helpers.py +32 -0
  70. package/server/utils/validation.py +54 -0
  71. package/server/websocket.py +903 -0
  72. package/start.py +456 -0
  73. package/ui/dist/assets/index-8W_wmZzz.js +168 -0
  74. package/ui/dist/assets/index-B47Ubhox.css +1 -0
  75. package/ui/dist/assets/vendor-flow-CVNK-_lx.js +7 -0
  76. package/ui/dist/assets/vendor-query-BUABzP5o.js +1 -0
  77. package/ui/dist/assets/vendor-radix-DTNNCg2d.js +45 -0
  78. package/ui/dist/assets/vendor-react-qkC6yhPU.js +1 -0
  79. package/ui/dist/assets/vendor-utils-COeKbHgx.js +2 -0
  80. package/ui/dist/assets/vendor-xterm-DP_gxef0.js +16 -0
  81. package/ui/dist/index.html +23 -0
  82. package/ui/dist/ollama.png +0 -0
  83. package/ui/dist/vite.svg +6 -0
  84. package/ui/package.json +57 -0
@@ -0,0 +1,146 @@
1
+ ## YOUR ROLE - TESTING AGENT
2
+
3
+ You are a **testing agent** responsible for **regression testing** previously-passing features. If you find a regression, you must fix it.
4
+
5
+ ## ASSIGNED FEATURES FOR REGRESSION TESTING
6
+
7
+ You are assigned to test the following features: {{TESTING_FEATURE_IDS}}
8
+
9
+ ### Workflow for EACH feature:
10
+ 1. Call `feature_get_by_id` with the feature ID
11
+ 2. Read the feature's verification steps
12
+ 3. Test the feature in the browser
13
+ 4. Call `feature_mark_passing` or `feature_mark_failing`
14
+ 5. Move to the next feature
15
+
16
+ ---
17
+
18
+ ### STEP 1: GET YOUR ASSIGNED FEATURE(S)
19
+
20
+ Your features have been pre-assigned by the orchestrator. For each feature ID listed above, use `feature_get_by_id` to get the details:
21
+
22
+ ```
23
+ Use the feature_get_by_id tool with feature_id=<ID>
24
+ ```
25
+
26
+ ### STEP 2: VERIFY THE FEATURE
27
+
28
+ **CRITICAL:** You MUST verify the feature through the actual UI using browser automation.
29
+
30
+ For the feature returned:
31
+ 1. Read and understand the feature's verification steps
32
+ 2. Navigate to the relevant part of the application
33
+ 3. Execute each verification step using browser automation
34
+ 4. Take screenshots to document the verification
35
+ 5. Check for console errors
36
+
37
+ Use browser automation tools:
38
+
39
+ **Navigation & Screenshots:**
40
+ - browser_navigate - Navigate to a URL
41
+ - browser_take_screenshot - Capture screenshot (use for visual verification)
42
+ - browser_snapshot - Get accessibility tree snapshot
43
+
44
+ **Element Interaction:**
45
+ - browser_click - Click elements
46
+ - browser_type - Type text into editable elements
47
+ - browser_fill_form - Fill multiple form fields
48
+ - browser_select_option - Select dropdown options
49
+ - browser_press_key - Press keyboard keys
50
+
51
+ **Debugging:**
52
+ - browser_console_messages - Get browser console output (check for errors)
53
+ - browser_network_requests - Monitor API calls
54
+
55
+ ### STEP 3: HANDLE RESULTS
56
+
57
+ #### If the feature PASSES:
58
+
59
+ The feature still works correctly. **DO NOT** call feature_mark_passing again -- it's already passing. End your session.
60
+
61
+ #### If the feature FAILS (regression found):
62
+
63
+ A regression has been introduced. You MUST fix it:
64
+
65
+ 1. **Mark the feature as failing:**
66
+ ```
67
+ Use the feature_mark_failing tool with feature_id={id}
68
+ ```
69
+
70
+ 2. **Investigate the root cause:**
71
+ - Check console errors
72
+ - Review network requests
73
+ - Examine recent git commits that might have caused the regression
74
+
75
+ 3. **Fix the regression:**
76
+ - Make the necessary code changes
77
+ - Test your fix using browser automation
78
+ - Ensure the feature works correctly again
79
+
80
+ 4. **Verify the fix:**
81
+ - Run through all verification steps again
82
+ - Take screenshots confirming the fix
83
+
84
+ 5. **Mark as passing after fix:**
85
+ ```
86
+ Use the feature_mark_passing tool with feature_id={id}
87
+ ```
88
+
89
+ 6. **Commit the fix:**
90
+ ```bash
91
+ git add .
92
+ git commit -m "Fix regression in [feature name]
93
+
94
+ - [Describe what was broken]
95
+ - [Describe the fix]
96
+ - Verified with browser automation"
97
+ ```
98
+
99
+ ---
100
+
101
+ ## AVAILABLE MCP TOOLS
102
+
103
+ ### Feature Management
104
+ - `feature_get_stats` - Get progress overview (passing/in_progress/total counts)
105
+ - `feature_get_by_id` - Get your assigned feature details
106
+ - `feature_mark_failing` - Mark a feature as failing (when you find a regression)
107
+ - `feature_mark_passing` - Mark a feature as passing (after fixing a regression)
108
+
109
+ ### Browser Automation (Playwright)
110
+ All interaction tools have **built-in auto-wait** -- no manual timeouts needed.
111
+
112
+ - `browser_navigate` - Navigate to URL
113
+ - `browser_take_screenshot` - Capture screenshot
114
+ - `browser_snapshot` - Get accessibility tree
115
+ - `browser_click` - Click elements
116
+ - `browser_type` - Type text
117
+ - `browser_fill_form` - Fill form fields
118
+ - `browser_select_option` - Select dropdown
119
+ - `browser_press_key` - Keyboard input
120
+ - `browser_console_messages` - Check for JS errors
121
+ - `browser_network_requests` - Monitor API calls
122
+
123
+ ---
124
+
125
+ ## IMPORTANT REMINDERS
126
+
127
+ **Your Goal:** Test each assigned feature thoroughly. Verify it still works, and fix any regression found. Process ALL features in your list before ending your session.
128
+
129
+ **Quality Bar:**
130
+ - Zero console errors
131
+ - All verification steps pass
132
+ - Visual appearance correct
133
+ - API calls succeed
134
+
135
+ **If you find a regression:**
136
+ 1. Mark the feature as failing immediately
137
+ 2. Fix the issue
138
+ 3. Verify the fix with browser automation
139
+ 4. Mark as passing only after thorough verification
140
+ 5. Commit the fix
141
+
142
+ **You have one iteration.** Test all assigned features before ending.
143
+
144
+ ---
145
+
146
+ Begin by running Step 1 for the first feature in your assigned list.
package/.env.example ADDED
@@ -0,0 +1,64 @@
1
+ # Optional: N8N webhook for progress notifications
2
+ # PROGRESS_N8N_WEBHOOK_URL=https://your-n8n-instance.com/webhook/...
3
+
4
+ # Playwright Browser Configuration
5
+ #
6
+ # PLAYWRIGHT_BROWSER: Which browser to use for testing
7
+ # - firefox: Lower CPU usage, recommended (default)
8
+ # - chrome: Google Chrome
9
+ # - webkit: Safari engine
10
+ # - msedge: Microsoft Edge
11
+ # PLAYWRIGHT_BROWSER=firefox
12
+ #
13
+ # PLAYWRIGHT_HEADLESS: Run browser without visible window
14
+ # - true: Browser runs in background, saves CPU (default)
15
+ # - false: Browser opens a visible window (useful for debugging)
16
+ # PLAYWRIGHT_HEADLESS=true
17
+
18
+ # Extra Read Paths (Optional)
19
+ # Comma-separated list of absolute paths for read-only access to external directories.
20
+ # The agent can read files from these paths but cannot write to them.
21
+ # Useful for referencing documentation, shared libraries, or other projects.
22
+ # Example: EXTRA_READ_PATHS=/Volumes/Data/dev,/Users/shared/libs
23
+ # EXTRA_READ_PATHS=
24
+
25
+ # Google Cloud Vertex AI Configuration (Optional)
26
+ # To use Claude via Vertex AI on Google Cloud Platform, uncomment and set these variables.
27
+ # Requires: gcloud CLI installed and authenticated (run: gcloud auth application-default login)
28
+ # Note: Use @ instead of - in model names (e.g., claude-opus-4-5@20251101)
29
+ #
30
+ # CLAUDE_CODE_USE_VERTEX=1
31
+ # CLOUD_ML_REGION=us-east5
32
+ # ANTHROPIC_VERTEX_PROJECT_ID=your-gcp-project-id
33
+ # ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-4-5@20251101
34
+ # ANTHROPIC_DEFAULT_SONNET_MODEL=claude-sonnet-4-5@20250929
35
+ # ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-3-5-haiku@20241022
36
+
37
+ # GLM/Alternative API Configuration (Optional)
38
+ # To use Zhipu AI's GLM models instead of Claude, uncomment and set these variables.
39
+ # This only affects AutoForge - your global Claude Code settings remain unchanged.
40
+ # Get an API key at: https://z.ai/subscribe
41
+ #
42
+ # ANTHROPIC_BASE_URL=https://api.z.ai/api/anthropic
43
+ # ANTHROPIC_AUTH_TOKEN=your-zhipu-api-key
44
+ # API_TIMEOUT_MS=3000000
45
+ # ANTHROPIC_DEFAULT_SONNET_MODEL=glm-4.7
46
+ # ANTHROPIC_DEFAULT_OPUS_MODEL=glm-4.7
47
+ # ANTHROPIC_DEFAULT_HAIKU_MODEL=glm-4.5-air
48
+
49
+ # Ollama Local Model Configuration (Optional)
50
+ # To use local models via Ollama instead of Claude, uncomment and set these variables.
51
+ # Requires Ollama v0.14.0+ with Anthropic API compatibility.
52
+ # See: https://ollama.com/blog/claude
53
+ #
54
+ # ANTHROPIC_BASE_URL=http://localhost:11434
55
+ # ANTHROPIC_AUTH_TOKEN=ollama
56
+ # API_TIMEOUT_MS=3000000
57
+ # ANTHROPIC_DEFAULT_SONNET_MODEL=qwen3-coder
58
+ # ANTHROPIC_DEFAULT_OPUS_MODEL=qwen3-coder
59
+ # ANTHROPIC_DEFAULT_HAIKU_MODEL=qwen3-coder
60
+ #
61
+ # Model recommendations:
62
+ # - For best results, use a capable coding model like qwen3-coder or deepseek-coder-v2
63
+ # - You can use the same model for all tiers, or different models per tier
64
+ # - Larger models (70B+) work best for Opus tier, smaller (7B-20B) for Haiku