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