diagram-to-iac 1.0.3__tar.gz → 1.0.5__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 (76) hide show
  1. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/PKG-INFO +95 -78
  2. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/README.md +90 -74
  3. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/pyproject.toml +2 -2
  4. diagram_to_iac-1.0.5/src/diagram_to_iac/actions/supervisor_entry.py +278 -0
  5. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/agents/git_langgraph/agent.py +60 -28
  6. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/agents/supervisor_langgraph/agent.py +362 -33
  7. diagram_to_iac-1.0.5/src/diagram_to_iac/agents/supervisor_langgraph/github_listener.py +433 -0
  8. diagram_to_iac-1.0.5/src/diagram_to_iac/core/registry.py +674 -0
  9. diagram_to_iac-1.0.5/src/diagram_to_iac/services/commenter.py +589 -0
  10. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/tools/llm_utils/__init__.py +3 -1
  11. diagram_to_iac-1.0.5/src/diagram_to_iac/tools/llm_utils/grok_driver.py +71 -0
  12. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/tools/llm_utils/router.py +220 -30
  13. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac.egg-info/PKG-INFO +95 -78
  14. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac.egg-info/SOURCES.txt +4 -0
  15. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac.egg-info/requires.txt +4 -3
  16. diagram_to_iac-1.0.3/src/diagram_to_iac/actions/supervisor_entry.py +0 -116
  17. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/setup.cfg +0 -0
  18. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/__init__.py +0 -0
  19. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/actions/__init__.py +0 -0
  20. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/actions/git_entry.py +0 -0
  21. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/actions/terraform_agent_entry.py +0 -0
  22. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/agents/__init__.py +0 -0
  23. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/agents/demonstrator_langgraph/__init__.py +0 -0
  24. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/agents/demonstrator_langgraph/agent.py +0 -0
  25. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/agents/git_langgraph/__init__.py +0 -0
  26. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/agents/git_langgraph/pr.py +0 -0
  27. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/agents/hello_langgraph/__init__.py +0 -0
  28. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/agents/hello_langgraph/agent.py +0 -0
  29. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/agents/policy_agent/__init__.py +0 -0
  30. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/agents/policy_agent/agent.py +0 -0
  31. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/agents/policy_agent/integration_example.py +0 -0
  32. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/agents/policy_agent/tools/__init__.py +0 -0
  33. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/agents/policy_agent/tools/tfsec_tool.py +0 -0
  34. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/agents/shell_langgraph/__init__.py +0 -0
  35. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/agents/shell_langgraph/agent.py +0 -0
  36. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/agents/shell_langgraph/detector.py +0 -0
  37. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/agents/supervisor_langgraph/__init__.py +0 -0
  38. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/agents/supervisor_langgraph/demonstrator.py +0 -0
  39. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/agents/supervisor_langgraph/guards.py +0 -0
  40. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/agents/supervisor_langgraph/pat_loop.py +0 -0
  41. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/agents/supervisor_langgraph/router.py +0 -0
  42. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/agents/terraform_langgraph/__init__.py +0 -0
  43. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/agents/terraform_langgraph/agent.py +0 -0
  44. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/agents/terraform_langgraph/parser.py +0 -0
  45. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/cli.py +0 -0
  46. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/core/__init__.py +0 -0
  47. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/core/agent_base.py +0 -0
  48. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/core/config_loader.py +0 -0
  49. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/core/enhanced_memory.py +0 -0
  50. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/core/errors.py +0 -0
  51. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/core/issue_tracker.py +0 -0
  52. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/core/memory.py +0 -0
  53. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/r2d.py +0 -0
  54. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/services/__init__.py +0 -0
  55. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/services/observability.py +0 -0
  56. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/services/step_summary.py +0 -0
  57. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/tools/__init__.py +0 -0
  58. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/tools/api_utils.py +0 -0
  59. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/tools/git/__init__.py +0 -0
  60. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/tools/git/git.py +0 -0
  61. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/tools/hello/__init__.py +0 -0
  62. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/tools/hello/cal_utils.py +0 -0
  63. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/tools/hello/text_utils.py +0 -0
  64. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/tools/llm_utils/anthropic_driver.py +0 -0
  65. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/tools/llm_utils/base_driver.py +0 -0
  66. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/tools/llm_utils/gemini_driver.py +0 -0
  67. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/tools/llm_utils/openai_driver.py +0 -0
  68. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/tools/sec_utils.py +0 -0
  69. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/tools/shell/__init__.py +0 -0
  70. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/tools/shell/shell.py +0 -0
  71. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/tools/text_utils.py +0 -0
  72. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac/tools/tf/terraform.py +0 -0
  73. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac.egg-info/dependency_links.txt +0 -0
  74. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac.egg-info/entry_points.txt +0 -0
  75. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/src/diagram_to_iac.egg-info/top_level.txt +0 -0
  76. {diagram_to_iac-1.0.3 → diagram_to_iac-1.0.5}/tests/test_devops_in_a_box.py +0 -0
@@ -1,21 +1,22 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: diagram-to-iac
3
- Version: 1.0.3
3
+ Version: 1.0.5
4
4
  Summary: Convert architecture diagrams into IaC modules
5
5
  Author-email: vindpro <admin@vindpro.com>
6
6
  Description-Content-Type: text/markdown
7
- Requires-Dist: anthropic==0.54.0
7
+ Requires-Dist: anthropic==0.55.0
8
8
  Requires-Dist: google_api_python_client==2.173.0
9
9
  Requires-Dist: langchain_anthropic==0.3.15
10
10
  Requires-Dist: langchain-core<1.0.0,>=0.3.62
11
11
  Requires-Dist: langchain_google_genai==2.1.5
12
- Requires-Dist: langchain_openai==0.3.24
12
+ Requires-Dist: langchain_openai==0.3.25
13
13
  Requires-Dist: langgraph==0.4.8
14
- Requires-Dist: openai==1.90.0
14
+ Requires-Dist: openai==1.91.0
15
15
  Requires-Dist: protobuf>=5.27.0
16
16
  Requires-Dist: pydantic==2.11.7
17
17
  Requires-Dist: PyYAML==6.0.2
18
18
  Requires-Dist: Requests==2.32.4
19
+ Requires-Dist: typing_extensions==4.14.0
19
20
  Requires-Dist: GitPython<4.0,>=3.1
20
21
 
21
22
  # diagram-to-iac
@@ -28,27 +29,39 @@ An automated DevOps-in-a-Box system that intelligently handles complete Repo-to-
28
29
 
29
30
  The **R2D (Repo-to-Deployment) Action** is a self-healing, Terraform-first DevOps automation solution that lives inside a single GitHub Action. When you supply any repository URL, our SupervisorAgent marshals specialized agents to handle the complete deployment workflow.
30
31
 
31
- ### Quick Start with GitHub Actions
32
+ ### 🎯 2-Minute Quick Start
33
+
34
+ **Step 1:** Add the unified workflow to your repository:
32
35
 
33
36
  ```yaml
34
- name: Deploy Infrastructure
37
+ # .github/workflows/r2d-unified.yml
38
+ name: R2D - DevOps in a Box
35
39
  on:
36
- push:
37
- branches: [main]
40
+ issues:
41
+ types: [opened, edited]
42
+ pull_request:
43
+ types: [closed]
44
+ workflow_dispatch:
45
+ inputs:
46
+ repo_url:
47
+ description: 'Repository URL to deploy'
48
+ required: false
49
+ type: string
38
50
 
39
51
  jobs:
40
- deploy:
41
- runs-on: ubuntu-latest
42
- steps:
43
- - name: Deploy with R2D
44
- uses: amartyamandal/diagram-to-iac/.github/actions/r2d@v1
45
- with:
46
- repo: ${{ github.server_url }}/${{ github.repository }}
47
- env:
48
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49
- TF_CLOUD_TOKEN: ${{ secrets.TF_CLOUD_TOKEN }}
52
+ r2d-deploy:
53
+ uses: amartyamandal/diagram-to-iac/.github/workflows/r2d-unified.yml@main
54
+ secrets: inherit
55
+ with:
56
+ repo_url: ${{ inputs.repo_url || github.server_url }}/${{ github.repository }}
50
57
  ```
51
58
 
59
+ **Step 2:** Configure your secrets (see [complete guide](docs/R2D_USER_GUIDE.md))
60
+
61
+ **Step 3:** Trigger deployment via issue, PR merge, or manual run
62
+
63
+ > 📚 **[Complete Setup Guide](docs/R2D_USER_GUIDE.md)** - Everything you need in one place!
64
+
52
65
  ### Key Features
53
66
 
54
67
  - **🤖 Self-Healing**: Automatically creates GitHub Issues for errors and suggests fixes
@@ -167,89 +180,93 @@ In GitHub Actions, the following artifacts are automatically collected:
167
180
 
168
181
  ## 🔧 GitHub Actions Usage
169
182
 
170
- Add the R2D action to your workflow for automated infrastructure deployment:
183
+ The R2D system now uses a **unified workflow** that handles all deployment scenarios automatically. This replaces the previous multiple workflow files with a single, intelligent solution.
184
+
185
+ ### ⚡ Simple Setup (Recommended)
171
186
 
172
- ### Basic Setup
187
+ Add this single workflow file to get all R2D capabilities:
173
188
 
174
189
  ```yaml
175
- name: Deploy Infrastructure
190
+ # .github/workflows/r2d-unified.yml
191
+ name: R2D - DevOps in a Box
176
192
  on:
177
- push:
178
- branches: [main]
193
+ issues:
194
+ types: [opened, edited]
195
+ pull_request:
196
+ types: [closed]
197
+ workflow_dispatch:
198
+ inputs:
199
+ repo_url:
200
+ description: 'Repository URL to deploy'
201
+ required: false
202
+ type: string
179
203
 
180
204
  jobs:
181
- deploy:
182
- runs-on: ubuntu-latest
183
- steps:
184
- - name: Deploy with R2D
185
- uses: amartyamandal/diagram-to-iac/.github/actions/r2d@v1
186
- with:
187
- repo: ${{ github.server_url }}/${{ github.repository }}
188
- env:
189
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
190
- TF_CLOUD_TOKEN: ${{ secrets.TF_CLOUD_TOKEN }}
205
+ r2d-deploy:
206
+ uses: amartyamandal/diagram-to-iac/.github/workflows/r2d-unified.yml@main
207
+ secrets: inherit
208
+ with:
209
+ repo_url: ${{ inputs.repo_url || github.server_url }}/${{ github.repository }}
191
210
  ```
192
211
 
193
- ### Advanced Configuration
212
+ ### 🎮 Multiple Ways to Deploy
194
213
 
195
- ```yaml
196
- - name: Deploy with Custom Settings
197
- uses: amartyamandal/diagram-to-iac/.github/actions/r2d@v1
198
- with:
199
- repo: 'https://github.com/my-org/infrastructure'
200
- package_version: 'v2.1.0'
201
- dry_run: 'false'
202
- branch_name: 'deploy-prod'
203
- thread_id: 'prod-deployment-001'
204
- env:
205
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
206
- TF_CLOUD_TOKEN: ${{ secrets.TF_CLOUD_TOKEN }}
207
- OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
208
- ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
209
- ```
214
+ - **📝 Issue-based**: Create an issue with "deploy" in title/body
215
+ - **🔀 PR merge**: Automatic deployment when PRs are merged
216
+ - **🎯 Manual**: Use workflow_dispatch with optional custom repo URL
217
+ - **🔒 External repos**: Deploy any accessible repository
210
218
 
211
- ### Required Secrets
219
+ ### 📋 Required Secrets
212
220
 
213
- Configure these in your repository settings:
221
+ Configure these in your repository settings → Secrets and variables → Actions:
214
222
 
215
223
  | Secret | Description | Required |
216
224
  |--------|-------------|----------|
217
225
  | `GITHUB_TOKEN` | GitHub API access (auto-provided) | ✅ Yes |
218
- | `TF_CLOUD_TOKEN` | Terraform Cloud API token | ✅ Yes |
219
- | `OPENAI_API_KEY` | OpenAI API key | ❌ Optional |
220
- | `ANTHROPIC_API_KEY` | Claude API key | ❌ Optional |
221
- | `GOOGLE_API_KEY` | Gemini API key | ❌ Optional |
226
+ | `TF_CLOUD_TOKEN` | Terraform Cloud workspace token | ✅ Yes |
227
+ | `OPENAI_API_KEY` | OpenAI API key for AI features | ❌ Optional |
228
+ | `ANTHROPIC_API_KEY` | Claude API key for AI features | ❌ Optional |
222
229
 
223
- ### Example Workflows
230
+ > 📚 **[Complete Setup Guide](docs/R2D_USER_GUIDE.md)** includes examples, troubleshooting, and advanced configurations.
224
231
 
225
- See [`.github/actions/r2d/examples/`](.github/actions/r2d/examples/) for complete workflow examples:
232
+ ## 📈 Observability & Monitoring
226
233
 
227
- - **Basic Deployment**: Simple push-to-deploy workflow
228
- - **Multi-Environment**: Deploy to dev/staging/prod with approvals
229
- - **PR Validation**: Validate infrastructure changes in pull requests
230
- - **Drift Detection**: Scheduled infrastructure drift monitoring
231
- - **External Repository**: Deploy from external repositories
234
+ After each workflow run, comprehensive artifacts are generated:
232
235
 
236
+ - **📊 Step Summary Dashboard**: `step-summary.md` with Terraform changes, security findings, and metrics
237
+ - **📋 Structured Logs**: JSONL format in `logs/` directory for analysis
238
+ - **🔍 GitHub Integration**: Automatic issue creation and PR suggestions
239
+ - **📦 Artifacts**: Plans, reports, and logs uploaded as GitHub Actions artifacts
233
240
 
234
- After each workflow run, a Markdown dashboard is generated at `step-summary.md`
235
- showing a high level overview of Terraform modules, resource changes and tfsec
236
- findings. The dashboard is derived from the JSONL logs and can be viewed
237
- directly in the repository or uploaded as a build artifact.
241
+ ## 🧪 Development & Testing
238
242
 
243
+ For local development and testing:
239
244
 
245
+ ```bash
246
+ # Install development dependencies
247
+ pip install -e .[dev]
240
248
 
241
- This repository provides a container action that runs the `SupervisorAgent` on the current repository. Add the action to a workflow as shown below:
249
+ # Run the CLI locally
250
+ diagram-to-iac https://github.com/user/repo --dry-run
242
251
 
243
- ```yaml
244
- jobs:
245
- supervisor:
246
- runs-on: ubuntu-latest
247
- steps:
248
- - uses: actions/checkout@v4
249
- - name: Run Supervisor Agent
250
- uses: ./.github/actions/supervisor
251
- env:
252
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
252
+ # Run tests
253
+ pytest
253
254
  ```
254
255
 
255
- The action reads `GITHUB_REPOSITORY` and `GITHUB_TOKEN` automatically to clone the repository and execute the agent.
256
+ ## 📚 Documentation
257
+
258
+ ## 📚 Documentation
259
+
260
+ - **[R2D User Guide](docs/R2D_USER_GUIDE.md)** - Complete setup and usage guide
261
+ - **[Migration Guide](docs/MIGRATION_GUIDE.md)** - Migrate from old workflows to unified approach
262
+ - **[Container Action](.github/actions/r2d/)** - Technical details of the container action
263
+ - **[Agent Architecture](src/diagram_to_iac/agents/)** - How the AI agents work together
264
+ - **[Simplification Summary](docs/SIMPLIFICATION_COMPLETION_SUMMARY.md)** - What changed in the unified approach
265
+
266
+ ## 🤝 Contributing
267
+
268
+ This project follows strict coding standards and security practices. See the development guidelines in the repository for contribution instructions.
269
+
270
+ ---
271
+
272
+ > **"One container, many minds—zero manual toil."** 🤖
@@ -8,27 +8,39 @@ An automated DevOps-in-a-Box system that intelligently handles complete Repo-to-
8
8
 
9
9
  The **R2D (Repo-to-Deployment) Action** is a self-healing, Terraform-first DevOps automation solution that lives inside a single GitHub Action. When you supply any repository URL, our SupervisorAgent marshals specialized agents to handle the complete deployment workflow.
10
10
 
11
- ### Quick Start with GitHub Actions
11
+ ### 🎯 2-Minute Quick Start
12
+
13
+ **Step 1:** Add the unified workflow to your repository:
12
14
 
13
15
  ```yaml
14
- name: Deploy Infrastructure
16
+ # .github/workflows/r2d-unified.yml
17
+ name: R2D - DevOps in a Box
15
18
  on:
16
- push:
17
- branches: [main]
19
+ issues:
20
+ types: [opened, edited]
21
+ pull_request:
22
+ types: [closed]
23
+ workflow_dispatch:
24
+ inputs:
25
+ repo_url:
26
+ description: 'Repository URL to deploy'
27
+ required: false
28
+ type: string
18
29
 
19
30
  jobs:
20
- deploy:
21
- runs-on: ubuntu-latest
22
- steps:
23
- - name: Deploy with R2D
24
- uses: amartyamandal/diagram-to-iac/.github/actions/r2d@v1
25
- with:
26
- repo: ${{ github.server_url }}/${{ github.repository }}
27
- env:
28
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29
- TF_CLOUD_TOKEN: ${{ secrets.TF_CLOUD_TOKEN }}
31
+ r2d-deploy:
32
+ uses: amartyamandal/diagram-to-iac/.github/workflows/r2d-unified.yml@main
33
+ secrets: inherit
34
+ with:
35
+ repo_url: ${{ inputs.repo_url || github.server_url }}/${{ github.repository }}
30
36
  ```
31
37
 
38
+ **Step 2:** Configure your secrets (see [complete guide](docs/R2D_USER_GUIDE.md))
39
+
40
+ **Step 3:** Trigger deployment via issue, PR merge, or manual run
41
+
42
+ > 📚 **[Complete Setup Guide](docs/R2D_USER_GUIDE.md)** - Everything you need in one place!
43
+
32
44
  ### Key Features
33
45
 
34
46
  - **🤖 Self-Healing**: Automatically creates GitHub Issues for errors and suggests fixes
@@ -147,89 +159,93 @@ In GitHub Actions, the following artifacts are automatically collected:
147
159
 
148
160
  ## 🔧 GitHub Actions Usage
149
161
 
150
- Add the R2D action to your workflow for automated infrastructure deployment:
162
+ The R2D system now uses a **unified workflow** that handles all deployment scenarios automatically. This replaces the previous multiple workflow files with a single, intelligent solution.
163
+
164
+ ### ⚡ Simple Setup (Recommended)
151
165
 
152
- ### Basic Setup
166
+ Add this single workflow file to get all R2D capabilities:
153
167
 
154
168
  ```yaml
155
- name: Deploy Infrastructure
169
+ # .github/workflows/r2d-unified.yml
170
+ name: R2D - DevOps in a Box
156
171
  on:
157
- push:
158
- branches: [main]
172
+ issues:
173
+ types: [opened, edited]
174
+ pull_request:
175
+ types: [closed]
176
+ workflow_dispatch:
177
+ inputs:
178
+ repo_url:
179
+ description: 'Repository URL to deploy'
180
+ required: false
181
+ type: string
159
182
 
160
183
  jobs:
161
- deploy:
162
- runs-on: ubuntu-latest
163
- steps:
164
- - name: Deploy with R2D
165
- uses: amartyamandal/diagram-to-iac/.github/actions/r2d@v1
166
- with:
167
- repo: ${{ github.server_url }}/${{ github.repository }}
168
- env:
169
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
170
- TF_CLOUD_TOKEN: ${{ secrets.TF_CLOUD_TOKEN }}
184
+ r2d-deploy:
185
+ uses: amartyamandal/diagram-to-iac/.github/workflows/r2d-unified.yml@main
186
+ secrets: inherit
187
+ with:
188
+ repo_url: ${{ inputs.repo_url || github.server_url }}/${{ github.repository }}
171
189
  ```
172
190
 
173
- ### Advanced Configuration
191
+ ### 🎮 Multiple Ways to Deploy
174
192
 
175
- ```yaml
176
- - name: Deploy with Custom Settings
177
- uses: amartyamandal/diagram-to-iac/.github/actions/r2d@v1
178
- with:
179
- repo: 'https://github.com/my-org/infrastructure'
180
- package_version: 'v2.1.0'
181
- dry_run: 'false'
182
- branch_name: 'deploy-prod'
183
- thread_id: 'prod-deployment-001'
184
- env:
185
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
186
- TF_CLOUD_TOKEN: ${{ secrets.TF_CLOUD_TOKEN }}
187
- OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
188
- ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
189
- ```
193
+ - **📝 Issue-based**: Create an issue with "deploy" in title/body
194
+ - **🔀 PR merge**: Automatic deployment when PRs are merged
195
+ - **🎯 Manual**: Use workflow_dispatch with optional custom repo URL
196
+ - **🔒 External repos**: Deploy any accessible repository
190
197
 
191
- ### Required Secrets
198
+ ### 📋 Required Secrets
192
199
 
193
- Configure these in your repository settings:
200
+ Configure these in your repository settings → Secrets and variables → Actions:
194
201
 
195
202
  | Secret | Description | Required |
196
203
  |--------|-------------|----------|
197
204
  | `GITHUB_TOKEN` | GitHub API access (auto-provided) | ✅ Yes |
198
- | `TF_CLOUD_TOKEN` | Terraform Cloud API token | ✅ Yes |
199
- | `OPENAI_API_KEY` | OpenAI API key | ❌ Optional |
200
- | `ANTHROPIC_API_KEY` | Claude API key | ❌ Optional |
201
- | `GOOGLE_API_KEY` | Gemini API key | ❌ Optional |
205
+ | `TF_CLOUD_TOKEN` | Terraform Cloud workspace token | ✅ Yes |
206
+ | `OPENAI_API_KEY` | OpenAI API key for AI features | ❌ Optional |
207
+ | `ANTHROPIC_API_KEY` | Claude API key for AI features | ❌ Optional |
202
208
 
203
- ### Example Workflows
209
+ > 📚 **[Complete Setup Guide](docs/R2D_USER_GUIDE.md)** includes examples, troubleshooting, and advanced configurations.
204
210
 
205
- See [`.github/actions/r2d/examples/`](.github/actions/r2d/examples/) for complete workflow examples:
211
+ ## 📈 Observability & Monitoring
206
212
 
207
- - **Basic Deployment**: Simple push-to-deploy workflow
208
- - **Multi-Environment**: Deploy to dev/staging/prod with approvals
209
- - **PR Validation**: Validate infrastructure changes in pull requests
210
- - **Drift Detection**: Scheduled infrastructure drift monitoring
211
- - **External Repository**: Deploy from external repositories
213
+ After each workflow run, comprehensive artifacts are generated:
212
214
 
215
+ - **📊 Step Summary Dashboard**: `step-summary.md` with Terraform changes, security findings, and metrics
216
+ - **📋 Structured Logs**: JSONL format in `logs/` directory for analysis
217
+ - **🔍 GitHub Integration**: Automatic issue creation and PR suggestions
218
+ - **📦 Artifacts**: Plans, reports, and logs uploaded as GitHub Actions artifacts
213
219
 
214
- After each workflow run, a Markdown dashboard is generated at `step-summary.md`
215
- showing a high level overview of Terraform modules, resource changes and tfsec
216
- findings. The dashboard is derived from the JSONL logs and can be viewed
217
- directly in the repository or uploaded as a build artifact.
220
+ ## 🧪 Development & Testing
218
221
 
222
+ For local development and testing:
219
223
 
224
+ ```bash
225
+ # Install development dependencies
226
+ pip install -e .[dev]
220
227
 
221
- This repository provides a container action that runs the `SupervisorAgent` on the current repository. Add the action to a workflow as shown below:
228
+ # Run the CLI locally
229
+ diagram-to-iac https://github.com/user/repo --dry-run
222
230
 
223
- ```yaml
224
- jobs:
225
- supervisor:
226
- runs-on: ubuntu-latest
227
- steps:
228
- - uses: actions/checkout@v4
229
- - name: Run Supervisor Agent
230
- uses: ./.github/actions/supervisor
231
- env:
232
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
231
+ # Run tests
232
+ pytest
233
233
  ```
234
234
 
235
- The action reads `GITHUB_REPOSITORY` and `GITHUB_TOKEN` automatically to clone the repository and execute the agent.
235
+ ## 📚 Documentation
236
+
237
+ ## 📚 Documentation
238
+
239
+ - **[R2D User Guide](docs/R2D_USER_GUIDE.md)** - Complete setup and usage guide
240
+ - **[Migration Guide](docs/MIGRATION_GUIDE.md)** - Migrate from old workflows to unified approach
241
+ - **[Container Action](.github/actions/r2d/)** - Technical details of the container action
242
+ - **[Agent Architecture](src/diagram_to_iac/agents/)** - How the AI agents work together
243
+ - **[Simplification Summary](docs/SIMPLIFICATION_COMPLETION_SUMMARY.md)** - What changed in the unified approach
244
+
245
+ ## 🤝 Contributing
246
+
247
+ This project follows strict coding standards and security practices. See the development guidelines in the repository for contribution instructions.
248
+
249
+ ---
250
+
251
+ > **"One container, many minds—zero manual toil."** 🤖
@@ -4,11 +4,11 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "diagram-to-iac"
7
- version = "1.0.3"
7
+ version = "1.0.5"
8
8
  description = "Convert architecture diagrams into IaC modules"
9
9
  readme = "README.md"
10
10
  authors = [{ name="vindpro", email="admin@vindpro.com" }]
11
- dependencies = ["anthropic==0.54.0", "google_api_python_client==2.173.0", "langchain_anthropic==0.3.15", "langchain-core>=0.3.62,<1.0.0", "langchain_google_genai==2.1.5", "langchain_openai==0.3.24", "langgraph==0.4.8", "openai==1.90.0", "protobuf>=5.27.0", "pydantic==2.11.7", "PyYAML==6.0.2", "Requests==2.32.4", "GitPython>=3.1,<4.0"] # ← always overwritten by update_deps.py
11
+ dependencies = ["anthropic==0.55.0", "google_api_python_client==2.173.0", "langchain_anthropic==0.3.15", "langchain-core>=0.3.62,<1.0.0", "langchain_google_genai==2.1.5", "langchain_openai==0.3.25", "langgraph==0.4.8", "openai==1.91.0", "protobuf>=5.27.0", "pydantic==2.11.7", "PyYAML==6.0.2", "Requests==2.32.4", "typing_extensions==4.14.0", "GitPython>=3.1,<4.0"] # ← always overwritten by update_deps.py
12
12
 
13
13
 
14
14