diff --git a/.claudecode.json b/.claudecode.json new file mode 100644 index 00000000..924e3a02 --- /dev/null +++ b/.claudecode.json @@ -0,0 +1,3 @@ +{ + "prompt": "When making commits, always follow the Conventional Commits specification (e.g., fix: or feat:). Keep summaries under 50 characters." +} diff --git a/calc.py b/calc.py new file mode 100644 index 00000000..d7167795 --- /dev/null +++ b/calc.py @@ -0,0 +1,8 @@ +def divide_numbers(a, b): + # Intentional Bug: This will crash if b is 0 instead of returning a safe fallback + return a / b + +if __name__ == "__main__": + print("Result:", divide_numbers(10, 2)) + print("Testing edge case with zero:") + print("Result:", divide_numbers(10, 0)) diff --git a/git_agent_workflow.sh b/git_agent_workflow.sh new file mode 100644 index 00000000..5b9a6101 --- /dev/null +++ b/git_agent_workflow.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +echo "🚀 Starting automated Git workflow agent..." + +# 1. Create a new descriptive feature branch safely +git checkout -b feature/fix-calculator-edge-case + +# 2. Call Claude Code to inspect our branch changes and generate a PR description +echo "🤖 Calling Claude to draft our PR description..." +claude -p "Look at the git diff between this branch and main. Generate a clear, markdown-formatted Pull Request summary explaining what bug was fixed and why." > PR_DESCRIPTION.md + +echo "✅ Workflow complete! PR template generated in PR_DESCRIPTION.md"