[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-696836-105":59,"doc-detail-696836-en":130,"doc-similar-696836":191},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","harness-engineering-a-design-guide-to-claude-code","Harness Engineering - A Design Guide to Claude Code","","Harness Engineering: A Design Guide to Claude Code explains how to build controllable AI coding systems that remain reliable when execution goes wrong. The guide centers on a control-plane architecture—query loop, recovery, verification—so systems preserve order under failure. It covers layered harness layers, permission-first tool safety, context governance and memory indexing, error and recovery semantics, and multi-agent work with independent verification. Practical team adoption guidance supports safe reuse.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/harness-engineering-a-design-guide-to-claude-code/696836/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/harness-engineering-a-design-guide-to-claude-code/696836.png","ImageObject",300,407,{"name":92,"@type":93},"Kurz","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-26","2026-11-11",true,{"@type":102,"interactionType":103,"userInteractionCount":24},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What does harness engineering aim to improve in Claude Code-style systems?","Question",{"text":112,"@type":113},"It makes AI coding systems reliable by restoring execution order when things go wrong. The approach relies on a control-plane structure rather than speech smoothness.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"How does the guide distinguish a query loop from a single model invocation?",{"text":117,"@type":113},"It treats the query loop as the system’s governance over inputs, state, interrupts, and stop conditions. The model call is only one phase inside the broader loop.",{"name":119,"@type":110,"acceptedAnswer":120},"Why is verification emphasized in multi-agent work?",{"text":121,"@type":113},"Verification must be independent so implementation does not impersonate a solved problem. It applies not only to code, but also to memory and recommendations.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},696836,1794435025,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":24,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":129,"read_time":144,"preview_page_count":145,"preview_urls":146},2336478945635,"https://ap-avatar.wpscdn.com/davatar_6f874abed73319feea01a86fa6f0fab8","A GENT WAY / HARNE S S B OOK S  \n\n| CONTROL PLANE | LOOP | RECOVERY | Order first, cleverness later. |\n| --- | --- | --- | --- |\n| PERMISSIONS | INTERRUPTS | VERIFICATION | SYSTEM FIRST MODEL SECOND |\n|  |  |  |  |\n\nHarness Engineering  \nA Design Guide to Claude Code  \nA system is judged reliable not by how smoothly it speaks, but by how it restores order when execution goes wrong.  \nCONTROL PLANE / QUERY LOOP / RECOVERY / VERIFICATION  \nEngineering principles for controllable AI coding systems  \ndistilled from source-level runtime design [agentway.dev](agentway.dev)  \nFrom using agents to shipping an agent PoC  \n[https://agentway.dev](https://agentway.dev)  \n2026‑04‑01 ‧ rev fbf2b4  \nContents  \nIntroduction 1  \nPreface 3  \nChapter 1 Why Harness Engineering Matters 6  \n1.1 The core problem is keeping the model from going off script .. 6  \n1.2 Claude Code’s first harness layer: a constrained conversation system ............................. 6  \n1.3 The second harness layer: the agent depends on a continuous loop 7  \n1.4 The third harness layer: tool calls must obey scheduling discipline 8  \n1.5 The fourth harness layer: the most dangerous tool needs the strictest rules ......................... 9  \n1.6 The fifth harness layer: errors are part of the main path ..... 10  \n1.7 The first principle extractable from source ............ 10  \nChapter 2 Prompt Is Not Personality 12  \n2.1 Treating prompt as persona is a common misunderstanding .. 12  \n2.2 In source, Claude Code prompt is layered from the beginning .. 12  \n2.3 Prompt value is not text itself, but precedence structure ..... 13  \n2.4 Prompt is not static copy; it is connected to memory systems .. 14  \n2.5 A real control plane must include caching and compute cost .. 15  \n2.6 Users can override prompt, but cannot bypass this structure .. 16  \n2.7 Why prompt here is closer to constitution than dialogue lines .. 17  \n2.8 The second principle extractable from source .......... 17  \nChapter 3 Query Loop 19  \n3.1 To judge maturity, first ask whether the system has a loop .... 19  \n3.2 State is core business, not baggage ................ 19  \n3.3 The first duty of query loop is input governance ......... 22  \n3.4 Model invocation is one phase of the loop, not the loop itself .. 22  \n3.5 A heartbeat must handle interrupts, or it is just inertia ..... 23  \n3.6 A heartbeat must also recover, or it is fragile repetition ..... 24  \n3.7 Stop conditions cannot be singular, or failure and completion get  \n3.8 QueryEngine proves this belongs to conversation lifecycle .... 26  \n3.9 The third principle extractable from source ........... 29  \nChapter 4 Tools, Permissions, and Interrupts 30  \n4.1 Once models call tools, the nature of risk changes ........ 30  \n4.2 Tool orchestration is part of behavioral constitution ....... 30  \n4.3 A lot happens before a tool actually runs ............. 31  \n4.4 Permission comes before capability ............... 31  \n4.5 Permission results are runtime semantics, not booleans ..... 32  \n4.6 StreamingToolExecutor proves interrupt is first‑class semantics . 34  \n4.7 Why Bash is always more suspect than other tools ........ 37  \n4.8 Tool systems protect users and protect runtime itself ...... 37  \n4.9 The fourth principle extractable from source .......... 38  \nChapter 5 Context Governance 39  \n5.1 As context grows, systems develop a low‑level illusion ...... 39  \n5.2 The [CLAUDE.md](CLAUDE.md) system: long‑lived instructions cannot be mixed with ad hoc chat ........................ 39  \n[5.3](5.3 MEMORY.md)[ MEMORY.md](5.3 MEMORY.md) is an index, not a diary ................ 40  \n5.4 Session memory: short‑term continuity cannot be brute‑forced by chat logs .......................... 41  \n5.5 Autocompact: context governance is budget governance first .. 42  \n5.6 compactConversation() shows summaries must rebuild work‑ ing context ........................... 43  \n5.7 Context governance is about preserving work semantics ..... 45  \n5.8 The fifth principle extract","cbCaisxxR5FPnkg3","https://ap.wps.com/l/cbCaisxxR5FPnkg3","pdf",2849915,108,"English","# Introduction\n# Preface\n# Chapter 1 Why Harness Engineering Matters\n# Chapter 2 Prompt Is Not Personality\n# Chapter 3 Query Loop\n# Chapter 4 Tools, Permissions, and Interrupts\n# Chapter 5 Context Governance\n# Chapter 6 Errors and Recovery\n# Chapter 7 Multi‑Agent Work and Verification\n# Chapter 8 Team Adoption","[{\"question\":\"What does harness engineering aim to improve in Claude Code-style systems?\",\"answer\":\"It makes AI coding systems reliable by restoring execution order when things go wrong. The approach relies on a control-plane structure rather than speech smoothness.\"},{\"question\":\"How does the guide distinguish a query loop from a single model invocation?\",\"answer\":\"It treats the query loop as the system’s governance over inputs, state, interrupts, and stop conditions. The model call is only one phase inside the broader loop.\"},{\"question\":\"Why is verification emphasized in multi-agent work?\",\"answer\":\"Verification must be independent so implementation does not impersonate a solved problem. It applies not only to code, but also to memory and recommendations.\"}]","Harness Engineering - A Design Guide to Claude Code | PDF",272,11,[147,151,155,159,163,167,171,175,179,183,187],{"page_no":8,"url":148,"width":149,"height":150},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/4725544902b924ffb24c990786b299bf.webp",983,1390,{"page_no":14,"url":152,"width":153,"height":154},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/08b5d67155323e900995f524fcbc13a9.webp",982,1388,{"page_no":81,"url":156,"width":157,"height":158},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/e3cf906646c82e56eff4c96a4266e2cf.webp",981,1387,{"page_no":19,"url":160,"width":161,"height":162},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/6c6e1fce660771aaceac41a544a185fa.webp",980,1385,{"page_no":24,"url":164,"width":165,"height":166},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/85137d116c0b9351e8779212d7e6207b.webp",979,1384,{"page_no":29,"url":168,"width":169,"height":170},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/9444047fc190eebe98e8cafcd263b77b.webp",978,1383,{"page_no":34,"url":172,"width":173,"height":174},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/4dea8356a0865d88631e26c5ab5abfa4.webp",977,1381,{"page_no":39,"url":176,"width":177,"height":178},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/8a3868ad90a9f8cdb6427b1a6c0dd0f1.webp",976,1380,{"page_no":44,"url":180,"width":181,"height":182},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/257909681abd209f4086e97476ccb5fb.webp",975,1378,{"page_no":52,"url":184,"width":185,"height":186},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/0998b5f4237d2c7fbf785a6b629b50c7.webp",974,1377,{"page_no":145,"url":188,"width":189,"height":190},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/5df51dfb52720d203c104575d28b95b4.webp",973,1376,{"list":192,"token":66},[193,199,205,211,217,224,230,237,243,249],{"doc_id":194,"doc_title":195,"file_type":137,"home_preview_img_url":196,"slug":197,"view_count":24,"category_name":30,"create_tm":198},701367,"DATABASE MANAGEMENT SYSTEMS - Syllabus","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230012296305/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=7aVSxPNla7ONj6xm%2Bl97o7H%2BET8%3D","database-management-systems-syllabus",1794528023,{"doc_id":200,"doc_title":201,"file_type":137,"home_preview_img_url":202,"slug":203,"view_count":14,"category_name":30,"create_tm":204},732950,"Building an Agent Harness - How to Build Your Own","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031781394/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=3uPfWp%2F1vSYe%2FMdjde2t1PrCVxo%3D","building-an-agent-harness-how-to-build-your-own",1795383050,{"doc_id":206,"doc_title":207,"file_type":137,"home_preview_img_url":208,"slug":209,"view_count":19,"category_name":30,"create_tm":210},701754,"Image and Depth from a Conventional Camera with a Coded Aperture","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230012577889/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=JYn0qnY408UUTRY3UL9Io84GIFU%3D","image-and-depth-from-a-conventional-camera-with-a-coded-aperture",1794538823,{"doc_id":212,"doc_title":213,"file_type":137,"home_preview_img_url":214,"slug":215,"view_count":29,"category_name":30,"create_tm":216},657210,"ggalluvial - Layered Grammar for Alluvial Plots","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975390420/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=%2F8MfwbrovEOHYZTiAW8L%2Br08Kds%3D","ggalluvial-layered-grammar-for-alluvial-plots",1792975795,{"doc_id":218,"doc_title":219,"file_type":137,"home_preview_img_url":220,"slug":221,"view_count":222,"category_name":30,"create_tm":223},347582,"Software architecture patterns - overview and examples","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229911523258/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=tVh2cO44x2ZMSWDsCSqG6YUtj4s%3D","software-architecture-patterns-overview-and-examples",16,1790067839,{"doc_id":225,"doc_title":226,"file_type":137,"home_preview_img_url":227,"slug":228,"view_count":81,"category_name":30,"create_tm":229},701374,"DATABASE SYSTEMS - The Complete Book - Second Edition","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230012296412/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=6QmksYi0%2B40%2B%2Bv7Xxt1kbKo%2FpjY%3D","database-systems-the-complete-book-second-edition",1794528038,{"doc_id":231,"doc_title":232,"file_type":137,"home_preview_img_url":233,"slug":234,"view_count":235,"category_name":30,"create_tm":236},701572,"Building Production-Ready AI Agents with LlamaIndex - From First Query to Multi-Agent Systems - A Practical Guide for Python Developers","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011609397/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=0Eyvravw1kgtR3XGQRfUGp0ABaU%3D","building-production-ready-ai-agents-with-llamaindex-from-first-query-to-multi-agent-systems-a-practical-guide-for-python-developers",14,1794533229,{"doc_id":238,"doc_title":239,"file_type":137,"home_preview_img_url":240,"slug":241,"view_count":24,"category_name":30,"create_tm":242},696820,"Game Design - An Example of Game Design Practice","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230009178044/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=D1%2BkRD3pAcYjdJXRNA2cNhR%2Br7I%3D","game-design-an-example-of-game-design-practice",1794434914,{"doc_id":244,"doc_title":245,"file_type":137,"home_preview_img_url":246,"slug":247,"view_count":52,"category_name":30,"create_tm":248},489778,"MedhAMshaShOdhini - An Efficient Bilingual Search Engine Tool for Telugu Language","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229927067746/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=kGfba5pYD38jnI5KuXlR8ggHTqo%3D","medhamshashodhini-an-efficient-bilingual-search-engine-tool-for-telugu-language",1790827195,{"doc_id":250,"doc_title":251,"file_type":137,"home_preview_img_url":252,"slug":253,"view_count":81,"category_name":30,"create_tm":254},701375,"Database Management Systems - Part - Basics","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230012296572/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=Hn%2FR2Clz3JQONBuNgATWa52%2FuOA%3D","database-management-systems-part-basics",1794528042]