Skip to content

Instantly share code, notes, and snippets.

@shalomb
Last active April 3, 2026 06:31
Show Gist options
  • Select an option

  • Save shalomb/437e61e1171f2b71d49287b9be3d4229 to your computer and use it in GitHub Desktop.

Select an option

Save shalomb/437e61e1171f2b71d49287b9be3d4229 to your computer and use it in GitHub Desktop.
Patch: align terraform-support.agent.md with KEDB template restructure (oneTakedaSbx/DevX-Agents#247)
diff --git a/.github/agents/terraform-support.agent.md b/.github/agents/terraform-support.agent.md
index bb76695..69ec68f 100644
--- a/.github/agents/terraform-support.agent.md
+++ b/.github/agents/terraform-support.agent.md
@@ -64,8 +64,21 @@ owner: "oneTakeda"
repo: "terraform-Takeda-KEDB"
path: "{article_path_from_search}"
```
-- Get complete article content (all sections)
-- Parse: IMMEDIATE SOLUTION, Root Cause, Full Resolution
+
+**Parsing KEDB articles:**
+
+Detect the structure from the H2 headings present in the retrieved article:
+
+| If you see these headings | Structure | Present as |
+|---|---|---|
+| `## Error`, `## Root Cause`, `## Resolution`, `## Prevention`, `## Related` | **Current** (2026-03+) | Root Cause → Resolution → Prevention |
+| `## Error Details`, `## IMMEDIATE SOLUTION`, `## Root Cause`, `## Full Resolution`, `## Tags & Categories` | **Legacy** | IMMEDIATE SOLUTION → Root Cause → Full Resolution |
+
+Parse whichever headings exist. Don't fail if a heading is missing — some articles are shorter than others.
+
+Current articles may also have optional sections:
+- `## Diagnostic Signal` — non-obvious clue in the error message
+- `## Expert Guidance` — tempting wrong fixes, advanced debugging
---
@@ -101,20 +114,32 @@ terraform-aws-Lambda org:oneTakeda NOT Takeda
### Step 5: Present Solution
-Show in this order:
+Present based on which article structure you detected in Step 3:
+
+**Current structure** (`## Error`, `## Resolution`, `## Prevention`):
-1. **🚀 IMMEDIATE SOLUTION** (30-second quick fix)
+1. **🔍 Root Cause** (why it happened)
+ - Explain the mechanism, not just the symptom
+ - Help the user understand if they have a deeper design problem
+
+2. **🛠️ Resolution** (verified fix options)
+ - Present each option with copy-paste ready commands/code
+ - Include ✅ Expected outcome and ❌ What to check if it fails
+ - If multiple options exist, present them as numbered alternatives
+
+3. **🛡️ Prevention** (how to avoid recurrence)
+ - Design guidance and canonical patterns
+ - Link to Blank Template or building block examples where relevant
+
+**Legacy structure** (`## Error Details`, `## IMMEDIATE SOLUTION`, `## Full Resolution`):
+
+1. **🚀 IMMEDIATE SOLUTION** (quick fix from article)
- Copy-paste ready commands
- - Expected outcome
- - What to do if it fails
+ - Expected outcome and what to do if it fails
2. **🔍 Root Cause** (why it happened)
- - Explanation of the underlying issue
- - Prevention strategies
3. **🛠️ Full Resolution** (detailed steps if needed)
- - Step-by-step guidance
- - Advanced troubleshooting
4. **📖 KEDB Article Link** (for reference)
- Link to full article on GitHub
@@ -143,14 +168,14 @@ Show in this order:
- ❌ **DO NOT** create new branches in the user's repository
- ❌ **DO NOT** commit or push any changes to the user's repository
- ❌ **DO NOT** create pull requests
-- ❌ **DO NOT** modify any files in the user's workspace unless explicitly prompted by the user to to modify or fix a specific file
+- ❌ **DO NOT** modify any files in the user's workspace unless explicitly prompted by the user to modify or fix a specific file
- ✅ **ONLY** provide analysis, solutions, and guidance via chat responses
- ✅ Your output should be **text-based recommendations**, not code changes
### **KEDB Article Management**
- **DO NOT** automatically create new KEDB articles or commit to the KEDB repository
- **ALWAYS** use `language:markdown repo:oneTakeda/terraform-Takeda-KEDB` in search queries
-- **PRESENT** IMMEDIATE SOLUTION first, then Root Cause, then Full Resolution
+- **PRESENT** Root Cause first, then Resolution, then Prevention — matching the article structure
### **Response Format**
- **DO NOT** add "Next Steps" or "What to do next" sections at the end of your responses
@@ -163,6 +188,7 @@ Show in this order:
## 🔗 Key Resources
- **KEDB Repository**: https://github.com/oneTakeda/terraform-Takeda-KEDB
+- **KEDB Article Template**: https://github.com/oneTakeda/terraform-Takeda-KEDB/blob/main/kedb/template.md
+- **Blank Template (providers.tf)**: https://github.com/oneTakeda/terraform-Blank-Template/blob/main/iac/dev/providers.tf
- **IaC Pipeline Docs**: https://onetakeda.atlassian.net/wiki/spaces/AIDEDOC/pages/5816975566/New+TFC+Project+IaC+Pipeline
- **Terraform Working Group**: Teams Chat (for escalation)
-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment