Skip to content

wadayama/claude-code-macro-programming-en

Repository files navigation

Claude Code Natural Language Macro Programming Guide

🌏 日本語版も利用可能: Japanese documentation is available here (日本語ドキュメントはこちら)

A guide to building agent systems using Claude Code as a natural language interpreter.

This guide presents Natural Language Macro Programming that executes structured tasks using natural language as macro code, with LLM as interpreter.

While conventional programming requires computers to interpret programming languages with specific syntax, natural language macro programming enables:

  • Natural language and Markdown notation as program descriptions
  • Claude Code functioning as an interpreter that parses and executes these descriptions
  • Advanced control structures (Task tool, TODO tool, variable management, conditional branching, parallel execution) realized through natural language
  • Agent systems for automating and optimizing complex tasks

You can design agent behaviors using intuitive natural language and have Claude Code execute them.

Natural language macro programming provides high explainability, which is crucial for responsible AI development. The natural language descriptions make processing steps human-readable, ensuring execution transparency, auditability, and debuggability, thereby facilitating system verification and traceability.

⚡ Quick Start

Try variable storage and reference:

Store in variable:

"Create 3 haiku poems about spring and save to {{haiku}}"

Reference variable:

"Select the most beautiful one from {{haiku}} and refine it"

Execute these directly in Claude Code to experience natural language macro programming. (Note: CLAUDE.md macro definition is required)

🎯 10 Design Patterns

The core of natural language macro programming consists of 10 design patterns, systematically organized into 4 Basic Patterns and 6 Advanced Patterns.

📋 Basic 4 Patterns - macro.md

🚀 Advanced 6 Patterns - macro.md

🔧 Pattern Utilization and Integration

Structure: Combine Pattern 1-4 (Basic Patterns) and Pattern 5-10 (Advanced Patterns), along with Appendix (Specialized Technologies) to build practical systems.

Integration Effects: By combining multiple patterns, collaborative systems like the A.4 Haiku Generation Multi-Agent can be constructed.

📖 Appendix (Advanced Technologies) - Appendix.md

📚 Main Contents

  • macro.md - Main guide (10 design patterns + appendix references)
  • Appendix.md - Appendix (advanced technical elements and methodologies)
  • examples/ - Pattern-specific example collection
  • multi-haiku/ - Multi-agent haiku generation system (SQLite-based implementation example)
  • SQLite/ - SQLite-based variable management system implementation code and tools
  • haiku_direct.md - Practical example (haiku generation system)
  • CLAUDE.md - Macro definition file
  • debugger.md - Debug mode specification

📧 Contact

🛡️ License

MIT License - see LICENSE for details.

👥 Authors

  • Tadashi Wadayama - Project design and documentation

Last Updated: 2025-07-27
Author: Tadashi Wadayama (with assistance from Claude Code)
License: MIT License (2025)

About

A guide to building agent systems using Claude Code as a natural language interpreter.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages