forge-orchestrator 0.1.0b1__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.
Files changed (131) hide show
  1. forge_orchestrator-0.1.0b1/CONTRIBUTING.md +89 -0
  2. forge_orchestrator-0.1.0b1/LICENSE +21 -0
  3. forge_orchestrator-0.1.0b1/MANIFEST.in +20 -0
  4. forge_orchestrator-0.1.0b1/PKG-INFO +150 -0
  5. forge_orchestrator-0.1.0b1/README.md +113 -0
  6. forge_orchestrator-0.1.0b1/docs/RELEASING.md +150 -0
  7. forge_orchestrator-0.1.0b1/docs/USER_GUIDE.md +1057 -0
  8. forge_orchestrator-0.1.0b1/forge.yaml +27 -0
  9. forge_orchestrator-0.1.0b1/pyproject.toml +69 -0
  10. forge_orchestrator-0.1.0b1/setup.cfg +4 -0
  11. forge_orchestrator-0.1.0b1/src/forge/__init__.py +5 -0
  12. forge_orchestrator-0.1.0b1/src/forge/adapters/__init__.py +1 -0
  13. forge_orchestrator-0.1.0b1/src/forge/adapters/antigravity.py +818 -0
  14. forge_orchestrator-0.1.0b1/src/forge/adapters/base.py +420 -0
  15. forge_orchestrator-0.1.0b1/src/forge/adapters/codex.py +142 -0
  16. forge_orchestrator-0.1.0b1/src/forge/adapters/opencode.py +662 -0
  17. forge_orchestrator-0.1.0b1/src/forge/adapters/registry.py +132 -0
  18. forge_orchestrator-0.1.0b1/src/forge/cli.py +1736 -0
  19. forge_orchestrator-0.1.0b1/src/forge/core/__init__.py +1 -0
  20. forge_orchestrator-0.1.0b1/src/forge/core/capabilities.py +157 -0
  21. forge_orchestrator-0.1.0b1/src/forge/core/config.py +982 -0
  22. forge_orchestrator-0.1.0b1/src/forge/core/context.py +25 -0
  23. forge_orchestrator-0.1.0b1/src/forge/core/events.py +37 -0
  24. forge_orchestrator-0.1.0b1/src/forge/core/git.py +864 -0
  25. forge_orchestrator-0.1.0b1/src/forge/core/knowledge.py +227 -0
  26. forge_orchestrator-0.1.0b1/src/forge/core/reconciler.py +310 -0
  27. forge_orchestrator-0.1.0b1/src/forge/core/role.py +75 -0
  28. forge_orchestrator-0.1.0b1/src/forge/core/run.py +82 -0
  29. forge_orchestrator-0.1.0b1/src/forge/core/stage.py +208 -0
  30. forge_orchestrator-0.1.0b1/src/forge/core/templates.py +694 -0
  31. forge_orchestrator-0.1.0b1/src/forge/dashboard/__init__.py +13 -0
  32. forge_orchestrator-0.1.0b1/src/forge/dashboard/app.py +318 -0
  33. forge_orchestrator-0.1.0b1/src/forge/dashboard/components/__init__.py +21 -0
  34. forge_orchestrator-0.1.0b1/src/forge/dashboard/components/artifact_view.py +123 -0
  35. forge_orchestrator-0.1.0b1/src/forge/dashboard/components/compare_view.py +141 -0
  36. forge_orchestrator-0.1.0b1/src/forge/dashboard/components/console_view.py +63 -0
  37. forge_orchestrator-0.1.0b1/src/forge/dashboard/components/footer.py +48 -0
  38. forge_orchestrator-0.1.0b1/src/forge/dashboard/components/header.py +59 -0
  39. forge_orchestrator-0.1.0b1/src/forge/dashboard/components/pkb_view.py +116 -0
  40. forge_orchestrator-0.1.0b1/src/forge/dashboard/components/tester_view.py +155 -0
  41. forge_orchestrator-0.1.0b1/src/forge/dashboard/components/timeline.py +69 -0
  42. forge_orchestrator-0.1.0b1/src/forge/dashboard/model.py +556 -0
  43. forge_orchestrator-0.1.0b1/src/forge/dashboard/state.py +79 -0
  44. forge_orchestrator-0.1.0b1/src/forge/prompts/__init__.py +1 -0
  45. forge_orchestrator-0.1.0b1/src/forge/prompts/builder.py +229 -0
  46. forge_orchestrator-0.1.0b1/src/forge/prompts/compiler.py +533 -0
  47. forge_orchestrator-0.1.0b1/src/forge/prompts/instruction.py +24 -0
  48. forge_orchestrator-0.1.0b1/src/forge/prompts/knowledge_projector.py +220 -0
  49. forge_orchestrator-0.1.0b1/src/forge/prompts/rendered_prompt.py +26 -0
  50. forge_orchestrator-0.1.0b1/src/forge/protocol/__init__.py +1 -0
  51. forge_orchestrator-0.1.0b1/src/forge/protocol/parser.py +196 -0
  52. forge_orchestrator-0.1.0b1/src/forge/protocol/report.py +38 -0
  53. forge_orchestrator-0.1.0b1/src/forge/protocol/validator.py +231 -0
  54. forge_orchestrator-0.1.0b1/src/forge/stages/__init__.py +16 -0
  55. forge_orchestrator-0.1.0b1/src/forge/stages/definition.py +336 -0
  56. forge_orchestrator-0.1.0b1/src/forge/stages/requirements.py +55 -0
  57. forge_orchestrator-0.1.0b1/src/forge/stages/result.py +39 -0
  58. forge_orchestrator-0.1.0b1/src/forge/stages/stage.py +610 -0
  59. forge_orchestrator-0.1.0b1/src/forge/storage/__init__.py +7 -0
  60. forge_orchestrator-0.1.0b1/src/forge/storage/knowledge.py +165 -0
  61. forge_orchestrator-0.1.0b1/src/forge/storage/run_lock.py +412 -0
  62. forge_orchestrator-0.1.0b1/src/forge/storage/run_manager.py +264 -0
  63. forge_orchestrator-0.1.0b1/src/forge/testing/__init__.py +56 -0
  64. forge_orchestrator-0.1.0b1/src/forge/testing/archetypes.py +99 -0
  65. forge_orchestrator-0.1.0b1/src/forge/testing/browser.py +420 -0
  66. forge_orchestrator-0.1.0b1/src/forge/testing/budget.py +104 -0
  67. forge_orchestrator-0.1.0b1/src/forge/testing/drivers/__init__.py +15 -0
  68. forge_orchestrator-0.1.0b1/src/forge/testing/drivers/api.py +168 -0
  69. forge_orchestrator-0.1.0b1/src/forge/testing/drivers/base.py +27 -0
  70. forge_orchestrator-0.1.0b1/src/forge/testing/drivers/cli.py +146 -0
  71. forge_orchestrator-0.1.0b1/src/forge/testing/drivers/library.py +123 -0
  72. forge_orchestrator-0.1.0b1/src/forge/testing/drivers/web.py +246 -0
  73. forge_orchestrator-0.1.0b1/src/forge/testing/engine.py +295 -0
  74. forge_orchestrator-0.1.0b1/src/forge/testing/evidence.py +191 -0
  75. forge_orchestrator-0.1.0b1/src/forge/testing/models.py +169 -0
  76. forge_orchestrator-0.1.0b1/src/forge/testing/planner.py +273 -0
  77. forge_orchestrator-0.1.0b1/src/forge/testing/report.py +202 -0
  78. forge_orchestrator-0.1.0b1/src/forge/testing/supervisor.py +277 -0
  79. forge_orchestrator-0.1.0b1/src/forge_orchestrator.egg-info/PKG-INFO +150 -0
  80. forge_orchestrator-0.1.0b1/src/forge_orchestrator.egg-info/SOURCES.txt +129 -0
  81. forge_orchestrator-0.1.0b1/src/forge_orchestrator.egg-info/dependency_links.txt +1 -0
  82. forge_orchestrator-0.1.0b1/src/forge_orchestrator.egg-info/entry_points.txt +2 -0
  83. forge_orchestrator-0.1.0b1/src/forge_orchestrator.egg-info/requires.txt +9 -0
  84. forge_orchestrator-0.1.0b1/src/forge_orchestrator.egg-info/top_level.txt +1 -0
  85. forge_orchestrator-0.1.0b1/tests/test_adapter_events.py +363 -0
  86. forge_orchestrator-0.1.0b1/tests/test_adapter_resolution.py +305 -0
  87. forge_orchestrator-0.1.0b1/tests/test_adapters_cli.py +278 -0
  88. forge_orchestrator-0.1.0b1/tests/test_antigravity_events.py +794 -0
  89. forge_orchestrator-0.1.0b1/tests/test_audit_findings_n01_n02_n03.py +404 -0
  90. forge_orchestrator-0.1.0b1/tests/test_audit_findings_remediation.py +528 -0
  91. forge_orchestrator-0.1.0b1/tests/test_audit_hardening_fixes.py +465 -0
  92. forge_orchestrator-0.1.0b1/tests/test_audit_release_remediation.py +421 -0
  93. forge_orchestrator-0.1.0b1/tests/test_audit_remediation_p1_p2.py +446 -0
  94. forge_orchestrator-0.1.0b1/tests/test_capabilities.py +504 -0
  95. forge_orchestrator-0.1.0b1/tests/test_codex_adapter.py +448 -0
  96. forge_orchestrator-0.1.0b1/tests/test_config.py +432 -0
  97. forge_orchestrator-0.1.0b1/tests/test_config_cli.py +207 -0
  98. forge_orchestrator-0.1.0b1/tests/test_critic.py +87 -0
  99. forge_orchestrator-0.1.0b1/tests/test_dashboard_phase1.py +461 -0
  100. forge_orchestrator-0.1.0b1/tests/test_dashboard_phase2_phase3.py +518 -0
  101. forge_orchestrator-0.1.0b1/tests/test_fixes.py +587 -0
  102. forge_orchestrator-0.1.0b1/tests/test_hardening.py +500 -0
  103. forge_orchestrator-0.1.0b1/tests/test_knowledge_cli.py +102 -0
  104. forge_orchestrator-0.1.0b1/tests/test_knowledge_e2e.py +169 -0
  105. forge_orchestrator-0.1.0b1/tests/test_knowledge_fact.py +184 -0
  106. forge_orchestrator-0.1.0b1/tests/test_knowledge_prompt_injection.py +138 -0
  107. forge_orchestrator-0.1.0b1/tests/test_knowledge_protocol.py +133 -0
  108. forge_orchestrator-0.1.0b1/tests/test_knowledge_reconciler.py +230 -0
  109. forge_orchestrator-0.1.0b1/tests/test_knowledge_store.py +125 -0
  110. forge_orchestrator-0.1.0b1/tests/test_lifecycle_invariants_adr017.py +166 -0
  111. forge_orchestrator-0.1.0b1/tests/test_opencode_events.py +740 -0
  112. forge_orchestrator-0.1.0b1/tests/test_p1_mixed_ownership_and_p2_scope.py +571 -0
  113. forge_orchestrator-0.1.0b1/tests/test_pipeline.py +156 -0
  114. forge_orchestrator-0.1.0b1/tests/test_planner.py +97 -0
  115. forge_orchestrator-0.1.0b1/tests/test_prompts.py +21 -0
  116. forge_orchestrator-0.1.0b1/tests/test_protocol.py +1390 -0
  117. forge_orchestrator-0.1.0b1/tests/test_protocol_robustness_adr016.py +228 -0
  118. forge_orchestrator-0.1.0b1/tests/test_reviewer_diff_first.py +237 -0
  119. forge_orchestrator-0.1.0b1/tests/test_run_locking.py +701 -0
  120. forge_orchestrator-0.1.0b1/tests/test_sec01_arch01.py +696 -0
  121. forge_orchestrator-0.1.0b1/tests/test_stage.py +152 -0
  122. forge_orchestrator-0.1.0b1/tests/test_stage_events.py +926 -0
  123. forge_orchestrator-0.1.0b1/tests/test_stage_order_and_critic.py +419 -0
  124. forge_orchestrator-0.1.0b1/tests/test_stage_validation.py +176 -0
  125. forge_orchestrator-0.1.0b1/tests/test_storage.py +42 -0
  126. forge_orchestrator-0.1.0b1/tests/test_tester_integration_audit.py +208 -0
  127. forge_orchestrator-0.1.0b1/tests/test_tester_stage.py +420 -0
  128. forge_orchestrator-0.1.0b1/tests/test_tester_v2.py +465 -0
  129. forge_orchestrator-0.1.0b1/tests/test_timeout_recovery.py +207 -0
  130. forge_orchestrator-0.1.0b1/tests/test_v1_final_remediation.py +330 -0
  131. forge_orchestrator-0.1.0b1/tests/test_v1_release_gate.py +257 -0
@@ -0,0 +1,89 @@
1
+ # Contributing to Forge
2
+
3
+ Thank you for contributing to Forge! Forge is an open-source, CLI-first multi-agent orchestration framework for autonomous software development. We welcome contributions from developers helping to fix bugs, improve documentation, and enhance functionality.
4
+
5
+ ## Development Setup
6
+
7
+ Forge requires Python 3.10 or higher and Git 2.25 or higher. Development and testing are conducted on Linux; for Windows contributors, WSL2 is the recommended environment (Native Windows is not supported due to process management requirements).
8
+
9
+ 1. Clone the repository:
10
+ ```bash
11
+ git clone https://github.com/Mathir14/Forge.git
12
+ cd Forge
13
+ ```
14
+
15
+ 2. Install Forge in editable mode with development dependencies:
16
+ ```bash
17
+ pip install -e ".[dev]"
18
+ ```
19
+
20
+ 3. Verify your installation:
21
+ ```bash
22
+ forge --version
23
+ forge doctor
24
+ ```
25
+
26
+ ## Repository Structure
27
+
28
+ - `src/`: Core source code for Forge, including the CLI, agent adapters, stage orchestration, protocol validation, storage, testing engine, and dashboard.
29
+ - `tests/`: Automated test suite containing unit, integration, and regression tests.
30
+ - `docs/`: Project documentation and user guides.
31
+ - `.github/`: GitHub Actions CI workflows, issue templates, and pull request configuration.
32
+
33
+ ## Development Workflow
34
+
35
+ 1. Create a topic branch:
36
+ ```bash
37
+ git checkout -b your-branch-name
38
+ ```
39
+ 2. Implement your changes.
40
+ 3. Run the test suite to verify changes and prevent regressions.
41
+ 4. Update documentation when behavior, commands, or configuration change.
42
+ 5. Open a pull request against the main branch with a clear description of your changes.
43
+
44
+ ## Testing
45
+
46
+ Forge uses `pytest` for automated testing. Run the test suite before submitting changes:
47
+
48
+ ```bash
49
+ # Run the complete test suite
50
+ pytest
51
+
52
+ # Run tests with verbose output
53
+ pytest -v
54
+
55
+ # Run a specific test module
56
+ pytest tests/test_config.py
57
+ ```
58
+
59
+ Ensure all tests pass before submitting a pull request.
60
+
61
+ ## Coding Guidelines
62
+
63
+ - **Small focused commits**: Keep commits atomic and focused on a single change with descriptive messages.
64
+ - **Readable code**: Write clear, readable Python code consistent with surrounding style and conventions.
65
+ - **Preserve backwards compatibility**: Maintain existing CLI behavior, configuration options, and storage formats when practical.
66
+ - **Add tests for new behaviour**: Accompany new features, bug fixes, and adapter updates with appropriate tests.
67
+ - **Keep documentation accurate**: Keep README, user guides, and docstrings aligned with any behavior or interface changes.
68
+
69
+ ## Pull Requests
70
+
71
+ When submitting a pull request:
72
+
73
+ - Describe the change and the rationale behind it.
74
+ - Reference any related issues (for example, `Fixes #123`).
75
+ - Keep pull requests focused on a single issue or feature.
76
+ - Ensure the test suite passes locally and CI checks pass.
77
+
78
+ ## Reporting Issues
79
+
80
+ If you encounter a bug, have a feature suggestion, or want to provide feedback, please open an issue on GitHub using our templates:
81
+
82
+ - **Bug Report**: For reproducible errors, broken commands, or unexpected behavior.
83
+ - **Feature Request**: For proposing additions or improvements.
84
+ - **Usability Feedback**: For sharing usability experiences and general workflow feedback.
85
+
86
+ ## Releases & Packaging
87
+
88
+ For maintainers managing package versions, PyPI publication, and Trusted Publishing workflows, refer to the [Release Guide](https://github.com/Mathir14/Forge/blob/master/docs/RELEASING.md).
89
+
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Forge 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.
@@ -0,0 +1,20 @@
1
+ # Include essential repository documentation and configuration
2
+ include README.md
3
+ include LICENSE
4
+ include CONTRIBUTING.md
5
+ include forge.yaml
6
+ recursive-include docs *
7
+
8
+ # Only exclude runtime state, repository configuration, caches, and build artifacts
9
+ prune .github
10
+ prune .forge
11
+ prune build
12
+ prune dist
13
+
14
+ global-exclude __pycache__
15
+ global-exclude *.py[cod]
16
+ global-exclude *.so
17
+ global-exclude .DS_Store
18
+ global-exclude *.swp *.swo *~
19
+ global-exclude .pytest_cache .pytest_cache/*
20
+ global-exclude .ruff_cache .ruff_cache/*
@@ -0,0 +1,150 @@
1
+ Metadata-Version: 2.4
2
+ Name: forge-orchestrator
3
+ Version: 0.1.0b1
4
+ Summary: CLI-first multi-agent orchestration framework
5
+ Author: Forge Contributors
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/Mathir14/Forge
8
+ Project-URL: Repository, https://github.com/Mathir14/Forge
9
+ Project-URL: Documentation, https://github.com/Mathir14/Forge/blob/master/docs/USER_GUIDE.md
10
+ Project-URL: Issues, https://github.com/Mathir14/Forge/issues
11
+ Keywords: ai,autonomous,cli,developer-tools,llm,multi-agent,orchestration,playwright,testing
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Classifier: Operating System :: MacOS
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Programming Language :: Python :: 3.14
23
+ Classifier: Topic :: Software Development :: Build Tools
24
+ Classifier: Topic :: Software Development :: Quality Assurance
25
+ Classifier: Topic :: Software Development :: Testing
26
+ Requires-Python: >=3.10
27
+ Description-Content-Type: text/markdown
28
+ License-File: LICENSE
29
+ Requires-Dist: click>=8.0.0
30
+ Requires-Dist: pyyaml>=6.0.0
31
+ Requires-Dist: rich>=13.0.0
32
+ Provides-Extra: dev
33
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
34
+ Provides-Extra: web
35
+ Requires-Dist: playwright>=1.30.0; extra == "web"
36
+ Dynamic: license-file
37
+
38
+ # Forge
39
+
40
+ Forge is an open-source, CLI-first multi-agent orchestration framework for autonomous, auditable software development. Designed for software engineers and development teams who want to incorporate AI coding agents into real codebases safely, Forge eliminates the risks of unconstrained single-model generation—such as silent bugs, architectural drift, and unverifiable claims—by organizing specialized local CLI agents into a disciplined engineering pipeline with strict separation of concerns, empirical runtime testing, adversarial diff-first review, and complete human-in-the-loop oversight.
41
+
42
+ ## Features
43
+
44
+ - **Multi-Role Engineering Pipeline**: Coordinates specialized roles in an auditable sequence: **Critic** (`00`), **Architect** (`01`), **Planner** (`02`), **Executor** (`03`), **Tester** (`04`), **Reviewer** (`05`), and post-execution **Critic** (`06`).
45
+ - **CLI-Native Agent Invocation**: Operates directly through installed developer CLI binaries (**OpenCode**, **Google Antigravity** / `agy`, and **OpenAI Codex**) as subprocesses without proprietary cloud API wrappers or token markups.
46
+ - **Empirical Black-Box Testing**: Evaluates running applications through real interfaces (Headless Chromium via Playwright, REST/GraphQL APIs, CLI binaries, Library imports) under process group supervision (`RuntimeSupervisor`), collecting viewport screenshots, telemetry logs, and executable reproduction scripts.
47
+ - **Diff-First Adversarial Review**: Change-centric quality gate where the Git diff is the primary review artifact. The Reviewer validates Executor claims against actual codebase changes and empirical test evidence before granting approval.
48
+ - **Autonomous Self-Repair Loop**: In `forge auto`, automatically iterates between the Executor, Tester, and Reviewer. If tests fail or changes are requested, structured issue feedback is fed back into subsequent implementation attempts until approved or retry limits are reached.
49
+ - **Interactive Checkpoints & Resumption**: Run interactively with step-by-step confirmation checkpoints (`forge run`) or resume any previous run seamlessly (`--run run-XXX`), automatically skipping already completed stages.
50
+ - **Project Knowledge Base (PKB)**: Automatically discovers and tracks persistent repository knowledge across runs in `.forge/knowledge/` (`architecture.yaml`, `features.yaml`, `decisions.yaml`, `unresolved.yaml`) with role-based permissions and human locking.
51
+ - **Terminal User Interface Dashboard**: Interactive terminal dashboard (`forge dashboard`) to monitor live runs or inspect historical runs with timeline navigation, streaming console output, stage artifacts, test evidence, and knowledge base browser.
52
+ - **Git Safety & Change Attribution**: Captures unified diffs with automatic filtering of `.forge/` runtime data and `.env*` secrets, intelligently attributing changes to avoid committing mixed-ownership files containing pre-existing user edits.
53
+ - **Process-Level Run Locking**: Kernel-backed exclusive run locking (`flock`) prevents concurrent process conflicts on the same run directory with automatic stale-lock recovery.
54
+
55
+ ## Requirements
56
+
57
+ - **Python**: `>= 3.10`
58
+ - **Git**: `>= 2.25` installed and available in `PATH`
59
+ - **Supported Agent CLIs** (at least one installed and authenticated):
60
+ - **OpenCode** (`opencode`)
61
+ - **Google Antigravity** (`agy` or `antigravity`)
62
+ - **OpenAI Codex** (`codex`)
63
+ - **Optional for Web Testing**:
64
+ - `playwright` (`pip install playwright && playwright install chromium`)
65
+
66
+ ## Platform Support
67
+
68
+ Forge is primarily developed and tested on Linux. For Windows users, WSL2 is the recommended environment.
69
+
70
+ | Platform | Status | Notes |
71
+ | :--- | :--- | :--- |
72
+ | **Linux** | Supported | Primary development and testing platform. |
73
+ | **WSL2** | Supported (Recommended for Windows) | Full compatibility with all pipeline stages and process supervision. |
74
+ | **macOS** | Supported | Compatible with POSIX process isolation and standard pipeline execution. |
75
+ | **Native Windows** | Not Supported | Forge relies on Linux/WSL-compatible process management for runtime supervision and testing. |
76
+
77
+ ## Installation
78
+
79
+ Install Forge from PyPI:
80
+
81
+ ```bash
82
+ pip install forge-orchestrator
83
+ ```
84
+
85
+ ### Development Installation
86
+
87
+ To contribute to Forge or install directly from the source repository:
88
+
89
+ ```bash
90
+ git clone https://github.com/Mathir14/Forge.git
91
+ cd Forge
92
+ pip install -e ".[dev]"
93
+ ```
94
+
95
+ Verify your installation:
96
+
97
+ ```bash
98
+ forge --version
99
+ forge doctor
100
+ ```
101
+
102
+ ## Quick Start
103
+
104
+ Get started with Forge in under 5 minutes:
105
+
106
+ ```bash
107
+ # 1. Initialize Forge prompt templates and configuration in your project
108
+ forge init
109
+
110
+ # 2. Check installed CLI tools, git state, and stage configurations
111
+ forge doctor
112
+
113
+ # 3. Perform a standalone codebase audit for technical debt and vulnerabilities
114
+ forge critic "Audit authentication system and error handling"
115
+
116
+ # 4. Implement a task with step-by-step confirmation checkpoints
117
+ forge run "Add /healthz JSON endpoint with uptime and git commit SHA"
118
+
119
+ # 5. Inspect the execution artifacts and timeline in the interactive dashboard
120
+ forge dashboard
121
+ ```
122
+
123
+ To run the pipeline completely unattended with autonomous self-repair:
124
+
125
+ ```bash
126
+ forge auto "Implement rate limiting middleware using token bucket algorithm" --auto-commit
127
+ ```
128
+
129
+ ## Supported Adapters
130
+
131
+ Forge connects to installed CLI tools using native adapters. View all registered adapters and their capabilities at any time using `forge adapters`:
132
+
133
+ | Adapter | Binary | Default Model | Prompt Transport | Core Capabilities |
134
+ | :--- | :--- | :--- | :--- | :--- |
135
+ | `opencode` | `opencode` | Provider default | `stdin` | `code_read`, `code_edit`, `shell`, `git`, `structured_output`, `custom_flags` |
136
+ | `antigravity` (`agy`) | `agy` or `antigravity` | `gemini-3.7-flash-high` | `-p` flag | `code_read`, `code_edit`, `shell`, `git`, `long_running`, `structured_output`, `custom_flags` |
137
+ | `codex` | `codex` | `gpt-5.6-terra` | `stdin` (`-`) | `code_read`, `code_edit`, `shell`, `git`, `long_running`, `structured_output`, `tool_calling`, `custom_flags` |
138
+
139
+ ## Documentation
140
+
141
+ For full operational details, configuration schemas, CLI command reference, testing engine guides, and troubleshooting workflows, consult the [Complete User Guide](https://github.com/Mathir14/Forge/blob/master/docs/USER_GUIDE.md).
142
+
143
+ ## Contributing
144
+
145
+ Contributions are welcome! Please read [CONTRIBUTING.md](https://github.com/Mathir14/Forge/blob/master/CONTRIBUTING.md) for guidelines on development environment setup, coding conventions, and submitting pull requests.
146
+
147
+ ## License
148
+
149
+ Forge is licensed under the [MIT License](https://github.com/Mathir14/Forge/blob/master/LICENSE).
150
+
@@ -0,0 +1,113 @@
1
+ # Forge
2
+
3
+ Forge is an open-source, CLI-first multi-agent orchestration framework for autonomous, auditable software development. Designed for software engineers and development teams who want to incorporate AI coding agents into real codebases safely, Forge eliminates the risks of unconstrained single-model generation—such as silent bugs, architectural drift, and unverifiable claims—by organizing specialized local CLI agents into a disciplined engineering pipeline with strict separation of concerns, empirical runtime testing, adversarial diff-first review, and complete human-in-the-loop oversight.
4
+
5
+ ## Features
6
+
7
+ - **Multi-Role Engineering Pipeline**: Coordinates specialized roles in an auditable sequence: **Critic** (`00`), **Architect** (`01`), **Planner** (`02`), **Executor** (`03`), **Tester** (`04`), **Reviewer** (`05`), and post-execution **Critic** (`06`).
8
+ - **CLI-Native Agent Invocation**: Operates directly through installed developer CLI binaries (**OpenCode**, **Google Antigravity** / `agy`, and **OpenAI Codex**) as subprocesses without proprietary cloud API wrappers or token markups.
9
+ - **Empirical Black-Box Testing**: Evaluates running applications through real interfaces (Headless Chromium via Playwright, REST/GraphQL APIs, CLI binaries, Library imports) under process group supervision (`RuntimeSupervisor`), collecting viewport screenshots, telemetry logs, and executable reproduction scripts.
10
+ - **Diff-First Adversarial Review**: Change-centric quality gate where the Git diff is the primary review artifact. The Reviewer validates Executor claims against actual codebase changes and empirical test evidence before granting approval.
11
+ - **Autonomous Self-Repair Loop**: In `forge auto`, automatically iterates between the Executor, Tester, and Reviewer. If tests fail or changes are requested, structured issue feedback is fed back into subsequent implementation attempts until approved or retry limits are reached.
12
+ - **Interactive Checkpoints & Resumption**: Run interactively with step-by-step confirmation checkpoints (`forge run`) or resume any previous run seamlessly (`--run run-XXX`), automatically skipping already completed stages.
13
+ - **Project Knowledge Base (PKB)**: Automatically discovers and tracks persistent repository knowledge across runs in `.forge/knowledge/` (`architecture.yaml`, `features.yaml`, `decisions.yaml`, `unresolved.yaml`) with role-based permissions and human locking.
14
+ - **Terminal User Interface Dashboard**: Interactive terminal dashboard (`forge dashboard`) to monitor live runs or inspect historical runs with timeline navigation, streaming console output, stage artifacts, test evidence, and knowledge base browser.
15
+ - **Git Safety & Change Attribution**: Captures unified diffs with automatic filtering of `.forge/` runtime data and `.env*` secrets, intelligently attributing changes to avoid committing mixed-ownership files containing pre-existing user edits.
16
+ - **Process-Level Run Locking**: Kernel-backed exclusive run locking (`flock`) prevents concurrent process conflicts on the same run directory with automatic stale-lock recovery.
17
+
18
+ ## Requirements
19
+
20
+ - **Python**: `>= 3.10`
21
+ - **Git**: `>= 2.25` installed and available in `PATH`
22
+ - **Supported Agent CLIs** (at least one installed and authenticated):
23
+ - **OpenCode** (`opencode`)
24
+ - **Google Antigravity** (`agy` or `antigravity`)
25
+ - **OpenAI Codex** (`codex`)
26
+ - **Optional for Web Testing**:
27
+ - `playwright` (`pip install playwright && playwright install chromium`)
28
+
29
+ ## Platform Support
30
+
31
+ Forge is primarily developed and tested on Linux. For Windows users, WSL2 is the recommended environment.
32
+
33
+ | Platform | Status | Notes |
34
+ | :--- | :--- | :--- |
35
+ | **Linux** | Supported | Primary development and testing platform. |
36
+ | **WSL2** | Supported (Recommended for Windows) | Full compatibility with all pipeline stages and process supervision. |
37
+ | **macOS** | Supported | Compatible with POSIX process isolation and standard pipeline execution. |
38
+ | **Native Windows** | Not Supported | Forge relies on Linux/WSL-compatible process management for runtime supervision and testing. |
39
+
40
+ ## Installation
41
+
42
+ Install Forge from PyPI:
43
+
44
+ ```bash
45
+ pip install forge-orchestrator
46
+ ```
47
+
48
+ ### Development Installation
49
+
50
+ To contribute to Forge or install directly from the source repository:
51
+
52
+ ```bash
53
+ git clone https://github.com/Mathir14/Forge.git
54
+ cd Forge
55
+ pip install -e ".[dev]"
56
+ ```
57
+
58
+ Verify your installation:
59
+
60
+ ```bash
61
+ forge --version
62
+ forge doctor
63
+ ```
64
+
65
+ ## Quick Start
66
+
67
+ Get started with Forge in under 5 minutes:
68
+
69
+ ```bash
70
+ # 1. Initialize Forge prompt templates and configuration in your project
71
+ forge init
72
+
73
+ # 2. Check installed CLI tools, git state, and stage configurations
74
+ forge doctor
75
+
76
+ # 3. Perform a standalone codebase audit for technical debt and vulnerabilities
77
+ forge critic "Audit authentication system and error handling"
78
+
79
+ # 4. Implement a task with step-by-step confirmation checkpoints
80
+ forge run "Add /healthz JSON endpoint with uptime and git commit SHA"
81
+
82
+ # 5. Inspect the execution artifacts and timeline in the interactive dashboard
83
+ forge dashboard
84
+ ```
85
+
86
+ To run the pipeline completely unattended with autonomous self-repair:
87
+
88
+ ```bash
89
+ forge auto "Implement rate limiting middleware using token bucket algorithm" --auto-commit
90
+ ```
91
+
92
+ ## Supported Adapters
93
+
94
+ Forge connects to installed CLI tools using native adapters. View all registered adapters and their capabilities at any time using `forge adapters`:
95
+
96
+ | Adapter | Binary | Default Model | Prompt Transport | Core Capabilities |
97
+ | :--- | :--- | :--- | :--- | :--- |
98
+ | `opencode` | `opencode` | Provider default | `stdin` | `code_read`, `code_edit`, `shell`, `git`, `structured_output`, `custom_flags` |
99
+ | `antigravity` (`agy`) | `agy` or `antigravity` | `gemini-3.7-flash-high` | `-p` flag | `code_read`, `code_edit`, `shell`, `git`, `long_running`, `structured_output`, `custom_flags` |
100
+ | `codex` | `codex` | `gpt-5.6-terra` | `stdin` (`-`) | `code_read`, `code_edit`, `shell`, `git`, `long_running`, `structured_output`, `tool_calling`, `custom_flags` |
101
+
102
+ ## Documentation
103
+
104
+ For full operational details, configuration schemas, CLI command reference, testing engine guides, and troubleshooting workflows, consult the [Complete User Guide](https://github.com/Mathir14/Forge/blob/master/docs/USER_GUIDE.md).
105
+
106
+ ## Contributing
107
+
108
+ Contributions are welcome! Please read [CONTRIBUTING.md](https://github.com/Mathir14/Forge/blob/master/CONTRIBUTING.md) for guidelines on development environment setup, coding conventions, and submitting pull requests.
109
+
110
+ ## License
111
+
112
+ Forge is licensed under the [MIT License](https://github.com/Mathir14/Forge/blob/master/LICENSE).
113
+
@@ -0,0 +1,150 @@
1
+ # Forge Production Staged Release Guide
2
+
3
+ This document details the production-grade, staged release process for `forge-orchestrator`.
4
+
5
+ ---
6
+
7
+ ## 1. Core Principles
8
+
9
+ - **Zero Local Publishing**: No developer publishes from local machines.
10
+ - **Zero API Tokens**: No API tokens or passwords are stored in GitHub Secrets.
11
+ - **Trusted Publishing (OIDC) Only**: Cryptographic, short-lived OpenID Connect token minting.
12
+ - **Single Build Guarantee**: Wheel and sdist are built once, validated once, uploaded to TestPyPI, and subsequently deployed to production PyPI. **Artifacts are never rebuilt between staging and production.**
13
+ - **Automatic Smoke Testing**: The pipeline automatically installs the freshly staged package from TestPyPI into a clean container and executes import and CLI diagnostics before requesting production approval.
14
+ - **Environment Gatekeeper**: Production PyPI publication requires explicit manual approval in GitHub by designated maintainers.
15
+ - **Automated GitHub Release**: Once PyPI publication succeeds, a GitHub Release is automatically published with release notes and distribution assets attached.
16
+
17
+ ---
18
+
19
+ ## 2. Release Architecture & Flow
20
+
21
+ ```
22
+ Developer
23
+ │
24
+ ├─ 1. Bump version in pyproject.toml & src/forge/__init__.py
25
+ ├─ 2. Commit changes
26
+ ├─ 3. Tag (e.g., git tag -a v0.1.0b1 -m "Release v0.1.0b1")
27
+ └─ 4. Push tag to GitHub
28
+ │
29
+ GitHub Actions (.github/workflows/release.yml)
30
+ │
31
+ ├─ Job 1: test-and-build
32
+ │ ├─ Validate version tag format (PEP 440)
33
+ │ ├─ Run full pytest suite (540+ tests)
34
+ │ ├─ Single Build: build wheel and sdist (python -m build)
35
+ │ ├─ Validate with twine check --strict dist/*
36
+ │ └─ Upload dist/ artifacts to workflow run storage
37
+ │
38
+ ├─ Job 2: publish-testpypi (Environment: testpypi)
39
+ │ ├─ Download dist/ artifacts
40
+ │ └─ Publish to TestPyPI via pypa/gh-action-pypi-publish (OIDC)
41
+ │
42
+ ├─ Job 3: smoke-test-testpypi
43
+ │ ├─ Poll and install forge-orchestrator FROM TestPyPI (20 attempts x 10s)
44
+ │ ├─ Verify import: python -c "import forge; print(forge.__version__)"
45
+ │ ├─ Verify: forge --version
46
+ │ ├─ Verify: forge --help
47
+ │ └─ Verify: forge doctor
48
+ │
49
+ ├─ Job 4: publish-pypi (Environment: pypi)
50
+ │ ├─ 🛑 PAUSES: Waits for maintainer review & approval
51
+ │ ├─ Download EXACT SAME dist/ artifacts (No Rebuild)
52
+ │ └─ Publish to Production PyPI via pypa/gh-action-pypi-publish (OIDC)
53
+ │
54
+ └─ Job 5: create-github-release
55
+ ├─ Download EXACT SAME dist/ artifacts
56
+ └─ Auto-publish GitHub Release with assets via gh release create
57
+ ```
58
+
59
+ ---
60
+
61
+ ## 3. One-Time Setup: PyPI & TestPyPI Trusted Publishing (OIDC)
62
+
63
+ ### A. Production PyPI Setup
64
+
65
+ 1. Log into your account at [pypi.org](https://pypi.org).
66
+ 2. If `forge-orchestrator` is not yet published:
67
+ - Go to [PyPI Publishing (Add Pending Publisher)](https://pypi.org/manage/account/publishing/).
68
+ - Select **GitHub**.
69
+ - **PyPI Project Name**: `forge-orchestrator`
70
+ - **Owner**: `Mathir14`
71
+ - **Repository name**: `Forge`
72
+ - **Workflow name**: `release.yml`
73
+ - **Environment name**: `pypi`
74
+ 3. If already registered:
75
+ - Go to **Project Settings** ➔ **Publishing** ➔ **Add a new publisher** with the above details.
76
+
77
+ ### B. TestPyPI Setup
78
+
79
+ 1. Log into your account at [test.pypi.org](https://test.pypi.org).
80
+ 2. Go to [TestPyPI Publishing (Add Pending Publisher)](https://test.pypi.org/manage/account/publishing/).
81
+ - Select **GitHub**.
82
+ - **PyPI Project Name**: `forge-orchestrator`
83
+ - **Owner**: `Mathir14`
84
+ - **Repository name**: `Forge`
85
+ - **Workflow name**: `release.yml`
86
+ - **Environment name**: `testpypi`
87
+
88
+ ### C. GitHub Repository Environments Setup
89
+
90
+ In the GitHub repository (`https://github.com/Mathir14/Forge`):
91
+
92
+ 1. Go to **Settings** ➔ **Environments**.
93
+ 2. Create environment `testpypi`:
94
+ - No approval restrictions needed (automated staging).
95
+ 3. Create environment `pypi`:
96
+ - Enable **Required reviewers**.
97
+ - Select authorized maintainers who must sign off before any production PyPI deployment.
98
+ - *(Optional)* Set **Deployment branches/tags** to `v*`.
99
+
100
+ ---
101
+
102
+ ## 4. Maintainer Release Process
103
+
104
+ To cut a new release:
105
+
106
+ ### Step 1: Bump Version & Validate Locally
107
+
108
+ Update the version in:
109
+ - `pyproject.toml` (e.g. `version = "0.1.0b1"`)
110
+ - `src/forge/__init__.py` (e.g. `__version__ = "0.1.0b1"`)
111
+
112
+ Run local tests to confirm:
113
+ ```bash
114
+ pytest
115
+ ```
116
+
117
+ ### Step 2: Commit and Tag
118
+
119
+ ```bash
120
+ git commit -am "chore: release v0.1.0b1"
121
+ git push origin master
122
+
123
+ git tag -a v0.1.0b1 -m "Release v0.1.0b1"
124
+ git push origin v0.1.0b1
125
+ ```
126
+
127
+ ### Step 3: Monitor Staged Release in GitHub Actions
128
+
129
+ 1. The `Staged Release` workflow triggers on the tag push.
130
+ 2. It validates the tag format, runs the full test suite, builds distributions, uploads to TestPyPI, and runs automated smoke tests.
131
+ 3. Once smoke tests succeed, the workflow pauses at `publish-pypi` with status `Waiting for review`.
132
+
133
+ ### Step 4: Approve Production Release
134
+
135
+ 1. In the GitHub Actions run page, review the TestPyPI smoke test logs.
136
+ 2. Click **Review deployments** ➔ Select `pypi` ➔ Click **Approve and deploy**.
137
+ 3. The exact same wheel and sdist files are immediately deployed to [pypi.org/p/forge-orchestrator](https://pypi.org/p/forge-orchestrator).
138
+ 4. GitHub Actions then automatically creates and publishes the GitHub Release with generated release notes and attached distribution assets.
139
+
140
+ ---
141
+
142
+ ## 5. PEP 440 Versioning Reference
143
+
144
+ | Release Phase | PEP 440 Version Format | Git Tag | Target |
145
+ | :--- | :--- | :--- | :--- |
146
+ | **Development** | `0.2.0.dev1` | `v0.2.0-dev1` | TestPyPI |
147
+ | **Alpha** | `0.2.0a1` | `v0.2.0a1` | TestPyPI / PyPI |
148
+ | **Beta** | `0.2.0b1` | `v0.2.0b1` | TestPyPI / PyPI |
149
+ | **Release Candidate** | `0.2.0rc1` | `v0.2.0rc1` | TestPyPI / PyPI |
150
+ | **Final / Stable** | `0.2.0` | `v0.2.0` | PyPI |