AI-assisted code generation using Plan-Do-Check-Act methodology with strict TDD discipline. Benefits developers by ensuring disciplined, iterative code development. Connects to Claude for AI assistance and integrates with existing development workflows.
git clone https://github.com/kenjudy/pdca-code-generation-process.gitThe pdca-code-generation-process skill enforces structured, iterative code development through Plan-Do-Check-Act phases combined with Test-Driven Development discipline. It implements explicit human-AI role separation with mandatory STOP gates, ensuring humans remain actively engaged and accountable throughout the coding workflow. The skill includes a built-in learning loop that sharpens itself after each cycle by proposing specific improvements to its own reference files. This approach directly addresses research findings showing that unsupervised AI code generation leads to quality degradation, duplicated code, and slower delivery. Engineers and developers can install this as a Claude skill for consistent workflow integration across all coding sessions, or use it with beads for cross-session task continuity on multi-day features.
["Identify a specific coding problem or feature to implement in your project","Use the prompt template to generate TDD-compliant code with clear PDCA documentation","Run the generated tests to verify the initial implementation (Check phase)","Iterate by modifying the prompt to address failing tests or add new requirements","Integrate the final code into your project and add to version control","Tip: Use Claude's inline code execution to test snippets before full implementation","Tip: For complex systems, break the problem into smaller functions and test each component","Tip: Review the PDCA comments to understand the evolution of the solution"]
Implementing features with strict test-driven development discipline
Complex multi-day coding projects requiring cross-session continuity
Team standardization of AI-assisted development practices
Maintaining code quality and reducing technical debt in AI-supported workflows
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/kenjudy/pdca-code-generation-processCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Generate a Python function to [SOLVE_PROBLEM] using Test-Driven Development (TDD) with the following steps: 1) Write a failing test for [REQUIREMENT] using unittest or pytest. 2) Implement the minimal code to pass the test. 3) Refactor to improve code quality while keeping tests passing. 4) Add edge case tests for [EDGE_CASES]. Use the Plan-Do-Check-Act (PDCA) cycle to document iterations in comments. Include type hints and docstrings. Example structure: ```python # Plan: [DESCRIBE_PLAN] # Do: [IMPLEMENTATION] # Check: [TEST_RESULTS] # Act: [REFACTORING] ```
```python
import unittest
from typing import List
# Plan: Implement a function to filter even numbers from a list while handling edge cases like empty lists and non-integer values.
# Do: Initial implementation with basic test coverage
def filter_even_numbers(numbers: List[int]) -> List[int]:
"""Filters even numbers from a list.
Args:
numbers: List of integers to filter
Returns:
List containing only even numbers
"""
return [n for n in numbers if n % 2 == 0]
# Check: Run initial tests
class TestFilterEvenNumbers(unittest.TestCase):
def test_basic_case(self):
self.assertEqual(filter_even_numbers([1, 2, 3, 4]), [2, 4])
def test_empty_list(self):
self.assertEqual(filter_even_numbers([]), [])
def test_no_evens(self):
self.assertEqual(filter_even_numbers([1, 3, 5]), [])
def test_non_integer_input(self):
with self.assertRaises(TypeError):
filter_even_numbers([1, 'a', 3])
if __name__ == '__main__':
unittest.main()
# Act: Refactor to handle edge cases better and add type checking
from typing import Union, List
def filter_even_numbers(numbers: List[Union[int, float]]) -> List[int]:
"""Filters even numbers from a list with improved type handling.
Args:
numbers: List of numbers to filter
Returns:
List containing only even integers
Raises:
TypeError: If input contains non-numeric values
"""
if not all(isinstance(n, (int, float)) for n in numbers):
raise TypeError("All elements must be numeric")
return [int(n) for n in numbers if n % 2 == 0]
# Plan-Do-Check-Act Cycle Summary:
# Plan: Implement robust even number filtering with type safety
# Do: Added type checking and conversion to integers
# Check: All tests pass including edge cases
# Act: Improved error handling and documentation
```AI assistant built for thoughtful, nuanced conversation
IronCalc is a spreadsheet engine and ecosystem
ITIL-aligned IT service management platform
Customer feedback management made simple
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan