Build intelligent agent workflows using Agentic Engineering, MCP, hooks, and delivery automation
Daniel Vaughan

#OpenAI
#CLI
#Codex
#MCP
#CI/CD
#Kernel
🚀 یک راهنمای کامل برای Codex CLI؛ از Prompting و فایل AGENTS.md گرفته تا MCP، Hookها، Skillها، Sub-Agentها، Orchestration، CI/CD، Security و دیپلوی در محیطهای Enterprise، همراه با تمرینهای عملی.
✨ ویژگیهای کلیدی
🧠 از اصول پایه شروع میکنی و قدمبهقدم به ورکفلوهای پروداکشن و استفاده Agentic در مقیاس تیم میرسی
🛠️ Patternهای اثباتشده برای Orchestration، Code Review، Migration، Testing و تحویل از طریق CI/CD رو به کار میگیری
🔐 Sessionهای Agent رو با Approval Modeها، Sandboxing در سطح Kernel و Practiceهای امنیتی مقاومتر میکنی
📘 توضیح کتاب
🤖 کتاب Agentic Coding with OpenAI Codex CLI یک راهنمای جامع برای توسعه Agentic AI با Agent کدنویسی خط فرمان OpenAI است. در شش پارت، از اصول پایه به سمت ورکفلوهای پروداکشن و استفاده در مقیاس تیم حرکت میکنی؛ از Prompting و پیکربندی AGENTS.md گرفته تا Approval Modeها، Sandboxing در سطح Kernel، انتخاب Model، مدیریت Context و Cost، MCP Serverها، Hookها، Skillها، Sub-Agentها و Orchestration، Worktreeها، یکپارچهسازی CI/CD، Security Hardening و دیپلوی Enterprise.
🧩 فصلهای بعدی سراغ Debugging و Testing ورکفلوهای Agentic، Code Review با AI، راهنماهای مهندسی عملی برای Codebase Migration، Backend، Frontend و Infrastructure as Code میرن و در ادامه تصویر بزرگتر رو بررسی میکنن؛ از Benchmarkها و ابزارهای رقیب گرفته تا Harness Engineering و نحوه ساختاردهی یک تیم Agentic Engineering.
👨💻 چه یک دولوپر مستقل باشی که میخواد خروجی خودش رو چند برابر کنه و چه Engineering Leadی که قصد داره ورکفلوهای Agentic رو در سطح تیم پیادهسازی کنه، این کتاب مدلهای ذهنی و تکنیکهای عملی لازم برای کار موثر با AI Coding Agentها رو در اختیارت میذاره.
🧪 کتاب از تجربههای دنیای واقعی و بینشهای کامیونیتی استفاده میکنه و هر فصل شامل Learning Objectiveها، مثالهای حلشده و تمرینهای عملی است.
🎯 چیزهایی که یاد میگیری
⚙️ Codex CLI رو راهاندازی و Authenticate میکنی و یاد میگیری چطور Promptهای موثر بنویسی
📝 Ruleهای فایل AGENTS.md رو مینویسی و Patternهایی رو به کار میگیری که از اشتباههای رایج جلوگیری میکنن
🔐 Approval Modeها، Sandboxing در سطح Kernel و Trust Boundaryهای مناسب رو انتخاب میکنی
🧠 Model Selection، Reasoning Effort، Context Windowها و Cost رو مدیریت میکنی
🔌 Agent رو با MCP Serverها، Hookها و Skillها گسترش میدی
🤝 Sub-Agentها، Multi-Agent Orchestration و Worktreeها رو با هم هماهنگ میکنی
🚀 Codex رو با CI/CD، Security Hardening و Enterprise Deployment یکپارچه میکنی
💻 از Codex برای Code Review، Migration، Backend، Frontend و Infrastructure as Code استفاده میکنی
👤 این کتاب برای چه کسانیه؟
💻 این کتاب برای Software Developerهاییه که با Terminal راحت هستن و میخوان از AI Agentها برای کار مهندسی واقعی استفاده کنن، نه فقط برای گرفتن پیشنهادهای پراکنده کد.
🏗️ Tech Leadها و Engineering Managerهایی که دنبال یک فریمورک برای پذیرش امن Agentic Coding در مقیاس تیم یا Enterprise هستن هم از این کتاب استفاده زیادی میبرن.
⚙️ DevOps Practitionerها و Architectهایی که به یکپارچهسازی ورکفلوهای Agentic با Delivery Pipelineها علاقه دارن هم مخاطب این کتاب هستن.
📌 داشتن کمی تجربه با Version Control و ابزارهای Command Line فرض شده، اما هیچ دانش قبلی درباره Codex CLI لازم نیست.
📖 فهرست مطالب
پارت ۱. مبانی
فصل ۱. Codex CLI چیست؟
فصل ۲. شروع کار با Codex CLI
فصل ۳. Prompting موثر در Codex CLI
فصل ۴. AGENTS.md. Patternها و Pitfallها
پارت ۲. Guardrailها
فصل ۵. Approval Modeها و Trust Boundaryها
فصل ۶. Model Selection و Reasoning Effort
فصل ۷. مدیریت Context Window
فصل ۸. MCP. استفاده و ارائه سرویس
فصل ۹. Hookها. کنترل چرخه عمر Agent
پارت ۳. مقیاسدهی
فصل ۱۰. اکوسیستم Skillها. استفاده و نوشتن Skill
فصل ۱۱. Sub-Agentها و اجرای موازی
فصل ۱۲. Patternهای Multi-Agent Orchestration
فصل ۱۳. Worktreeها و اجرای ایزوله
فصل ۱۴. مدیریت هزینه و استراتژی Quota
فصل ۱۵. یکپارچهسازی CI/CD
پارت ۴. پروداکشن
فصل ۱۶. Security Hardening
فصل ۱۷. Enterprise Deployment
فصل ۱۸. دیباگ و تشخیص Failureهای Agent
فصل ۱۹. استراتژی Testing و Evaluation برای Agentic Workflowها
پارت ۵. راهنماهای عملی
فصل ۲۰. Code Review با AI
فصل ۲۱. Codebase Migration و Modernisation
فصل ۲۲. Backend Engineering
فصل ۲۳. Frontend Engineering
فصل ۲۴. Infrastructure as Code
پارت ۶. تصویر بزرگتر
فصل ۲۵. Benchmarkها و پرفورمنس دنیای واقعی
فصل ۲۶. ابزارهای رقیب و زمان مناسب استفاده از هر کدوم
فصل ۲۷. Harness Engineering برای Agentهای طولانیمدت
فصل ۲۸. Agentic Engineering Pod
👤 درباره نویسنده
👨💼 دنیل وان Programme Director در HCLTech AI Labs است و در پروژههای Enterprise Delivery، Research و Engineering فعالیت میکنه.
💻 او از Codex CLI در Codebaseهای پروداکشن، پروژههای Greenfield، CI Pipelineها و توسعه Local استفاده میکنه و دیدگاهی کاملا عملی از Agentic Engineering رو وارد این کتاب کرده.
Comprehensive guide to Codex CLI: prompting, AGENTS.md, MCP, hooks, skills, sub-agents, orchestration, CI/CD, security, and enterprise deployment, with exercises
Agentic Coding with OpenAI Codex CLI is a comprehensive guide to agentic AI development with OpenAI's command-line coding agent. Across six parts, you'll move from first principles to production workflows and team-scale practice: prompting and AGENTS.md configuration, approval modes and kernel-level sandboxing, model selection, context and cost management, MCP servers, hooks, skills, sub-agents and orchestration, worktrees, CI/CD integration, security hardening, and enterprise deployment.
Later chapters cover debugging and testing agentic workflows, AI code review, practical engineering guides (codebase migration, backend, frontend, and infrastructure as code), and the bigger picture: benchmarks, competing tools, harness engineering, and how to structure an agentic engineering team.
Whether you're a solo developer looking to multiply your output or an engineering lead rolling out agentic workflows across a team, this book gives you the mental models and practical techniques to work effectively with AI coding agents.
It draws on real-world experience and community insights, and every chapter includes learning objectives, worked examples, and hands-on exercises.
This book is for software developers who are comfortable in a terminal and want to use AI agents for real engineering work rather than isolated code suggestions. It is also useful for tech leads and engineering managers who need a framework for adopting agentic coding safely at team or enterprise scale. DevOps practitioners and architects interested in integrating agent workflows into delivery pipelines will also find it relevant. Some experience with version control and command-line tools is assumed; no prior knowledge of Codex CLI is required.
Table of Contents
Part 1. Grounding
Chapter 1. What Is Codex CLI?
Chapter 2. Getting Started with Codex CLI
Chapter 3. Prompting Codex CLI Effectively
Chapter 4. AGENTS.md: Patterns and Pitfalls
Part 2. Guardrails
Chapter 5. Approval Modes and Trust Boundaries
Chapter 6. Model Selection and Reasoning Effort
Chapter 7. Context Window Management
Chapter 8. MCP: Consuming and Serving
Chapter 9. Hooks: Intercepting the Agent Lifecycle
Part 3. Scaling Up
Chapter 10. The Skills Ecosystem: Using and Writing Skills
Chapter 11. Sub-Agents and Parallel Execution
Chapter 12. Multi-Agent Orchestration Patterns
Chapter 13. Worktrees and Isolated Execution
Chapter 14. Cost Management and Quota Strategy
Chapter 15. CI/CD Integration
Part 4. Production
Chapter 16. Security Hardening
Chapter 17. Enterprise Deployment
Chapter 18. Debugging and Diagnosing Agent Failures
Chapter 19. Testing and Evaluation Strategy for Agentic Workflows
Part 5. Practitioner Guides
Chapter 20. AI Code Review
Chapter 21. Codebase Migration and Modernisation
Chapter 22. Backend Engineering
Chapter 23. Frontend Engineering
Chapter 24. Infrastructure as Code
Part 6. The Bigger Picture
Chapter 25. Benchmarks and Real-World Performance
Chapter 26. Competing Tools and When to Use Each
Chapter 27. Harness Engineering for Long-Running Agents
Chapter 28. The Agentic Engineering Pod
About the Author
Daniel Vaughan is Programme Director at HCLTech AI Labs, where he works across enterprise delivery, research, and engineering teams. He uses Codex CLI across production codebases, greenfield projects, CI pipelines, and local development, bringing a practitioner's view of agentic engineering to this book.









