[{"data":1,"prerenderedAt":1391},["ShallowReactive",2],{"page-\u002Fv1\u002Fadopt\u002Fapply\u002Fcodeigniter-full":3},{"id":4,"title":5,"body":6,"description":1384,"extension":1385,"meta":1386,"navigation":858,"path":1387,"seo":1388,"stem":1389,"__hash__":1390},"content\u002Fv1\u002Fadopt\u002Fapply\u002Fcodeigniter-full.md","CodeIgniter one-shot apply (full architecture)",{"type":7,"value":8,"toc":1341},"minimark",[9,14,58,61,66,73,128,133,143,145,149,161,163,167,171,182,186,192,205,209,301,308,312,318,322,379,383,390,443,473,477,519,539,543,551,555,561,565,571,575,586,590,599,601,605,674,688,809,813,828,832,937,940,944,959,963,979,981,985,992,996,1003,1010,1017,1021,1025,1027,1031,1034,1036,1040,1042,1046,1051,1054,1060,1064,1135,1139,1168,1172,1237,1241,1261,1265,1279,1283,1299,1303,1311,1315,1326,1330,1337],[10,11,13],"h1",{"id":12},"modular-hexagonal-ddd-one-shot-apply-codeigniter","Modular Hexagonal DDD — ONE-SHOT APPLY (codeigniter)",[15,16,17],"blockquote",{},[18,19,20,24,25,28,29,32,33,37,32,40,43,44,32,47,50,53,54,57],"p",{},[21,22,23],"strong",{},"Self-contained."," An AI agent should fetch ",[21,26,27],{},"this file only"," and execute it.\n",[21,30,31],{},"Core version:"," ",[34,35,36],"code",{},"1.0.0-draft",[21,38,39],{},"Short HTML entry:",[34,41,42],{},"\u002Fcodeigniter"," · ",[21,45,46],{},"This file:",[34,48,49],{},"\u002Fapply\u002Fcodeigniter.full.md",[21,51,52],{},"AI-neutral:"," assistant files are optional; architecture does not require any AI vendor.\n",[21,55,56],{},"Host baseline researched:"," see Part C header (versions as of 2026-08).",[59,60],"hr",{},[62,63,65],"h2",{"id":64},"_0-agent-mandate","0. Agent mandate",[18,67,68,69,72],{},"You are bootstrapping a ",[21,70,71],{},"codeigniter application repository"," (not the docs site).",[74,75,76,80,87,98,104,121],"ol",{},[77,78,79],"li",{},"Treat this document as the complete working standard for this session.",[77,81,82,83,86],{},"Execute ",[21,84,85],{},"Part D"," in order after reading Parts A–C.",[77,88,89,90,93,94,97],{},"When writing module code, obey ",[21,91,92],{},"Part B (Core)"," and ",[21,95,96],{},"Part C (host)",".",[77,99,100,103],{},[21,101,102],{},"Do not create a git commit"," unless the human explicitly asks.",[77,105,106,107,110,111,110,114,110,117,120],{},"Rename illustrative contexts ",[34,108,109],{},"Ordering",", ",[34,112,113],{},"Warehouse",[34,115,116],{},"Directory",[34,118,119],{},"Identity"," to the human’s domains.",[77,122,123,124,127],{},"If AI vendor is ",[34,125,126],{},"none",", skip Part E.",[129,130,132],"h3",{"id":131},"programmer-prompt","Programmer prompt",[134,135,141],"pre",{"className":136,"code":138,"language":139,"meta":140},[137],"language-text","Apply Modular Hexagonal DDD from \u003CORIGIN>\u002Fapply\u002Fcodeigniter.full.md\nAI assistant: \u003Ccursor|claude|gemini|copilot|generic|none>\nBounded contexts: \u003Clist>\nDo not commit unless I ask.\n","text","",[34,142,138],{"__ignoreMap":140},[59,144],{},[10,146,148],{"id":147},"part-a-design-test","Part A — Design test",[15,150,151],{},[18,152,153,154,93,157,160],{},"If the peer module is deleted and replaced by HTTP, does this module’s ",[21,155,156],{},"Application",[21,158,159],{},"Domain"," still compile?",[59,162],{},[10,164,166],{"id":165},"part-b-complete-core-architecture","Part B — Complete Core architecture",[62,168,170],{"id":169},"b1-purpose","B1. Purpose",[18,172,173,174,177,178,181],{},"Build applications as ",[21,175,176],{},"replaceable bounded-context modules"," using Hexagonal Architecture (ports & adapters) + DDD. This docs site is the ",[21,179,180],{},"sole canon","; consuming repos keep thin pointers, not a forked essay.",[62,183,185],{"id":184},"b2-module-layout-must","B2. Module layout (MUST)",[134,187,190],{"className":188,"code":189,"language":139,"meta":140},[137],"{Module}\u002F\n  Application\u002F     # UseCases, Application DTO, Providers \u002F composition root\n  Domain\u002F          # Entities, Ports, Events, Enums, Domain DTOs\n  Infrastructure\u002F  # Persistence adapters, ExternalServices (ACL), Config, listeners\n  UI\u002F              # Controllers, Routes, validation, admin UI, console\nShared\u002F            # Promoted technical ports\u002Fadapters only (after promote rule)\n",[34,191,189],{"__ignoreMap":140},[18,193,194,195,110,198,201,202],{},"Host roots vary (",[34,196,197],{},"app\u002FModules",[34,199,200],{},"src\u002FModules",", packages). ",[21,203,204],{},"Roles do not.",[62,206,208],{"id":207},"b3-strictness-ladder-must","B3. Strictness ladder (MUST)",[210,211,212,231],"table",{},[213,214,215],"thead",{},[216,217,218,222,225,228],"tr",{},[219,220,221],"th",{},"Strictness",[219,223,224],{},"Area",[219,226,227],{},"Allowed",[219,229,230],{},"Forbidden",[232,233,234,250,269,285],"tbody",{},[216,235,236,240,244,247],{},[237,238,239],"td",{},"Hardest",[237,241,242],{},[21,243,159],{},[237,245,246],{},"Own Domain types + Shared kernel ports",[237,248,249],{},"Other modules; host facades\u002Fhelpers; ORM; framework traits on Domain Events",[216,251,252,255,260,263],{},[237,253,254],{},"Strict",[237,256,257],{},[21,258,259],{},"Application Use Cases \u002F App DTOs",[237,261,262],{},"Own Domain + Shared ports",[237,264,265,266],{},"Facades, ORM, foreign Application\u002FDomain, peer ",[34,267,268],{},"*ModuleInterface",[216,270,271,274,279,282],{},[237,272,273],{},"Relaxed",[237,275,276],{},[21,277,278],{},"Composition root",[237,280,281],{},"Container binds, routes, config merge",[237,283,284],{},"Business rules",[216,286,287,290,295,298],{},[237,288,289],{},"Outer",[237,291,292],{},[21,293,294],{},"Infrastructure & UI",[237,296,297],{},"Framework, ORM, HTTP, ACL adapters, admin",[237,299,300],{},"Leaking ORM\u002Fforeign Domain into Domain\u002FUse Cases",[18,302,303,304,307],{},"Dependency direction: ",[21,305,306],{},"Domain ← Application ← Infrastructure\u002FUI",". Ports in Domain; adapters in Infrastructure.",[62,309,311],{"id":310},"b4-golden-flow-must","B4. Golden flow (MUST)",[134,313,316],{"className":314,"code":315,"language":139,"meta":140},[137],"UI → Application DTO → first-level *UseCase::__invoke\n  → Domain (Entity \u002F Domain service)\n  → Domain Port\n  → Infrastructure adapter (ORM \u002F ACL \u002F HTTP)\n  → back as Entity \u002F result\n  → UI presents\n",[34,317,315],{"__ignoreMap":140},[62,319,321],{"id":320},"b5-use-cases-dtos-must","B5. Use Cases & DTOs (MUST)",[323,324,325,335,349,356,366,373,376],"ul",{},[77,326,327,328,331,332,97],{},"First-level: ",[34,329,330],{},"Application\u002FUseCases\u002F{Capability}\u002FSomethingUseCase"," with single public ",[34,333,334],{},"__invoke",[77,336,337,338,32,341,344,345,348],{},"Nested helpers: ",[21,339,340],{},"no",[34,342,343],{},"UseCase"," suffix; ",[21,346,347],{},"not"," called from UI.",[77,350,351,352,355],{},"Mirror ",[34,353,354],{},"{Capability}\u002F"," for DTOs and Ports.",[77,357,358,359,362,363,97],{},"ACL need ports: ",[34,360,361],{},"Domain\u002FPorts\u002FAcl\u002F",". Module façades: ",[34,364,365],{},"Domain\u002FPorts\u002FModule\u002F",[77,367,368,369,372],{},"Never create a literal ",[34,370,371],{},"Feature\u002F"," directory.",[77,374,375],{},"Application DTO = UI\u002FCLI input. Domain DTO = intra-module only.",[77,377,378],{},"Other modules never call Use Cases — only ACL \u002F Events.",[62,380,382],{"id":381},"b6-cross-module-bridges-must","B6. Cross-module bridges (MUST)",[18,384,385,386,389],{},"Application\u002FDomain of A ",[21,387,388],{},"never"," import Application\u002FDomain of B.",[210,391,392,402],{},[213,393,394],{},[216,395,396,399],{},[219,397,398],{},"Need",[219,400,401],{},"Bridge",[232,403,404,425],{},[216,405,406,412],{},[237,407,408,409],{},"Peer answer ",[21,410,411],{},"now",[237,413,414,417,418,421,422],{},[21,415,416],{},"Sync ACL",": local ",[34,419,420],{},"{Need}PortInterface"," → Infra ACL adapter → thin peer ",[34,423,424],{},"{This}ModuleInterface",[216,426,427,433],{},[237,428,429,430],{},"Peer reacts ",[21,431,432],{},"later",[237,434,435,438,439,442],{},[21,436,437],{},"Async Domain Event"," → consumer Infra ",[21,440,441],{},"translation listener"," → inbound Use Case",[323,444,445,452,470],{},[77,446,447,448,451],{},"Mapping only in ACL adapter; façades thin + HTTP-mappable; Prefer ACL ",[21,449,450],{},"validate before"," local commit.",[77,453,454,455,458,459,462,463,462,466,469],{},"Events: pure Domain class; Shared ",[34,456,457],{},"EventDispatcherInterface","; ",[34,460,461],{},"eventId"," + ",[34,464,465],{},"occurredAt",[34,467,468],{},"schemaVersion"," + rich happy-path payload; idempotent consumers; no Domain re-fetch on happy path; prefer outbox.",[77,471,472],{},"No cross-module write transaction. Reports: ACL reads or owned projections.",[62,474,476],{"id":475},"b7-shared-promote-rule-must","B7. Shared promote rule (MUST)",[210,478,479,489],{},[213,480,481],{},[216,482,483,486],{},[219,484,485],{},"Situation",[219,487,488],{},"Where",[232,490,491,499,507],{},[216,492,493,496],{},[237,494,495],{},"Tech used by one module",[237,497,498],{},"That module’s Infrastructure",[216,500,501,504],{},[237,502,503],{},"Same tech used by ≥2 modules",[237,505,506],{},"Promote to Shared",[216,508,509,516],{},[237,510,511,512,515],{},"Cross-module ",[21,513,514],{},"business"," concept",[237,517,518],{},"Never Shared — ACL \u002F Events",[18,520,521,522,110,525,110,528,110,530,110,533,110,536,97],{},"Typical Shared: ",[34,523,524],{},"DomainException",[34,526,527],{},"DatabaseTransactionInterface",[34,529,457],{},[34,531,532],{},"ClockInterface",[34,534,535],{},"ConfigReaderInterface",[34,537,538],{},"Ensure",[62,540,542],{"id":541},"b8b9-persistence-ui-must","B8–B9. Persistence & UI (MUST)",[323,544,545,548],{},[77,546,547],{},"Map persistence records ↔ Domain Entities in Infrastructure; never leak ORM into Use Cases\u002FDomain.",[77,549,550],{},"UI: authorize → DTO → Use Case → present.",[62,552,554],{"id":553},"b10-decision-tree","B10. Decision tree",[134,556,559],{"className":557,"code":558,"language":139,"meta":140},[137],"Only this module? → Golden flow\nNeed peer now? → ACL\nPeer later? → Event\nMulti-step? → Orchestration (still ACL+Events)\nReport across contexts? → Projection \u002F ACL read\nTech in 2+ modules? → Shared\nBusiness in 2+ modules? → ACL\u002FEvents — never Shared\n",[34,560,558],{"__ignoreMap":140},[62,562,564],{"id":563},"b11-anti-patterns","B11. Anti-patterns",[18,566,567,568,570],{},"Peer imports in Use Cases; god façades; thin-ID events; Shared business enums; ORM in Domain; Entity extends ORM; literal ",[34,569,371],{},"; cross-module DB TX; ORM joins across modules for policy.",[62,572,574],{"id":573},"b12-examples","B12. Examples",[18,576,577,110,579,110,581,110,583,585],{},[34,578,109],{},[34,580,113],{},[34,582,116],{},[34,584,119],{}," only — rename to your domains.",[62,587,589],{"id":588},"b13-quality-assertions","B13. Quality assertions",[18,591,592,593,595,596,598],{},"Boundary tests must fail CI if: foreign Application\u002FDomain imports; peer ",[34,594,268],{}," in Use Cases; ORM\u002Ffacades in Domain\u002FUse Cases; literal ",[34,597,371],{}," folders. Also: behaviour tests, formatter, static analysis, event idempotency.",[59,600],{},[10,602,604],{"id":603},"part-c-codeigniter-host-mapping","Part C — CodeIgniter host mapping",[210,606,607,615],{},[213,608,609],{},[216,610,611,613],{},[219,612],{},[219,614],{},[232,616,617,634,650,662],{},[216,618,619,624],{},[237,620,621],{},[21,622,623],{},"Target",[237,625,626,629,630,633],{},[21,627,628],{},"CodeIgniter 4.7.x"," (e.g. 4.7.4 as of 2026-07; PHP ",[21,631,632],{},"8.1+",", check release notes)",[216,635,636,641],{},[237,637,638],{},[21,639,640],{},"Docs",[237,642,643,649],{},[644,645,646],"a",{"href":646,"rel":647},"https:\u002F\u002Fcodeigniter4.github.io\u002FCodeIgniter4\u002F",[648],"nofollow"," · Modules: user guide “Code Modules”",[216,651,652,657],{},[237,653,654],{},[21,655,656],{},"Package",[237,658,659],{},[34,660,661],{},"codeigniter4\u002Fframework",[216,663,664,669],{},[237,665,666],{},[21,667,668],{},"Adapter HTML",[237,670,671],{},[34,672,673],{},"\u003CORIGIN>\u002Fv1\u002Fadapters\u002Fcodeigniter",[18,675,676,677,680,681,684,685,97],{},"CI4 supports ",[21,678,679],{},"PSR-4 modules"," via ",[34,682,683],{},"app\u002FConfig\u002FAutoload.php"," and Composer. Prefer a module folder per BC with Core layers — do not put Domain logic in stock ",[34,686,687],{},"app\u002FModels",[210,689,690,700],{},[213,691,692],{},[216,693,694,697],{},[219,695,696],{},"Core",[219,698,699],{},"CodeIgniter 4.7 place",[232,701,702,721,734,756,771,779,787],{},[216,703,704,707],{},[237,705,706],{},"Module root",[237,708,709,710,713,714,717,718],{},"e.g. ",[34,711,712],{},"modules\u002F{Module}\u002F"," or ",[34,715,716],{},"app\u002FModules\u002F{Module}\u002F"," registered in Autoload ",[34,719,720],{},"$psr4",[216,722,723,726],{},[237,724,725],{},"Shared",[237,727,728,713,731],{},[34,729,730],{},"modules\u002FShared\u002F",[34,732,733],{},"app\u002FShared\u002F",[216,735,736,738],{},[237,737,278],{},[237,739,740,741,744,745,748,749,752,753],{},"Module ",[34,742,743],{},"Config\u002FServices.php"," extending ",[34,746,747],{},"CodeIgniter\\Config\\BaseService"," (auto-discovered) + ",[34,750,751],{},"app\u002FConfig\u002FServices.php"," — ",[21,754,755],{},"factories only",[216,757,758,761],{},[237,759,760],{},"Persistence",[237,762,763,766,767,770],{},[34,764,765],{},"Infrastructure\u002FPersistence\u002F"," — CI Models \u002F Query Builder ",[21,768,769],{},"only here","; map to Domain Entities",[216,772,773,776],{},[237,774,775],{},"ACL adapter",[237,777,778],{},"Infra class returned from Services factory bound to local port",[216,780,781,784],{},[237,782,783],{},"Translation listener",[237,785,786],{},"CLI Command \u002F queued job (if using a queue lib) in Infra → inbound Use Case",[216,788,789,792],{},[237,790,791],{},"UI",[237,793,794,795,713,798,32,801,804,805,808],{},"Module Controllers under ",[34,796,797],{},"UI\u002FHttp",[34,799,800],{},"Controllers",[21,802,803],{},"inside module namespace","; explicit routes in ",[34,806,807],{},"Config\u002FRoutes.php"," (auto-routing legacy off by default)",[129,810,812],{"id":811},"models-quarantine","Models quarantine",[323,814,815,821],{},[77,816,817,820],{},[34,818,819],{},"CodeIgniter\\Model"," subclasses are Infrastructure persistence details.",[77,822,823,824,827],{},"Use Cases receive Domain Entities via repository ports — never ",[34,825,826],{},"model('X')"," inside Use Cases.",[129,829,831],{"id":830},"services-composition","Services (composition)",[134,833,837],{"className":834,"code":835,"language":836,"meta":140,"style":140},"language-php shiki shiki-themes github-light github-dark","\u002F\u002F modules\u002FOrdering\u002FConfig\u002FServices.php\nnamespace Modules\\Ordering\\Config;\n\nuse CodeIgniter\\Config\\BaseService;\n\nclass Services extends BaseService\n{\n    public static function warehouseAvailabilityPort($getShared = true)\n    {\n        return static::getSharedInstance('warehouseAvailabilityPort', static function () {\n            return new \\Modules\\Ordering\\Infrastructure\\ExternalServices\\WarehouseAvailabilityAclAdapter(\n                Services::warehouseModule() \u002F\u002F peer façade from Warehouse module Services\n            );\n        });\n    }\n}\n","php",[34,838,839,847,853,860,866,871,877,883,889,895,901,907,913,919,925,931],{"__ignoreMap":140},[840,841,844],"span",{"class":842,"line":843},"line",1,[840,845,846],{},"\u002F\u002F modules\u002FOrdering\u002FConfig\u002FServices.php\n",[840,848,850],{"class":842,"line":849},2,[840,851,852],{},"namespace Modules\\Ordering\\Config;\n",[840,854,856],{"class":842,"line":855},3,[840,857,859],{"emptyLinePlaceholder":858},true,"\n",[840,861,863],{"class":842,"line":862},4,[840,864,865],{},"use CodeIgniter\\Config\\BaseService;\n",[840,867,869],{"class":842,"line":868},5,[840,870,859],{"emptyLinePlaceholder":858},[840,872,874],{"class":842,"line":873},6,[840,875,876],{},"class Services extends BaseService\n",[840,878,880],{"class":842,"line":879},7,[840,881,882],{},"{\n",[840,884,886],{"class":842,"line":885},8,[840,887,888],{},"    public static function warehouseAvailabilityPort($getShared = true)\n",[840,890,892],{"class":842,"line":891},9,[840,893,894],{},"    {\n",[840,896,898],{"class":842,"line":897},10,[840,899,900],{},"        return static::getSharedInstance('warehouseAvailabilityPort', static function () {\n",[840,902,904],{"class":842,"line":903},11,[840,905,906],{},"            return new \\Modules\\Ordering\\Infrastructure\\ExternalServices\\WarehouseAvailabilityAclAdapter(\n",[840,908,910],{"class":842,"line":909},12,[840,911,912],{},"                Services::warehouseModule() \u002F\u002F peer façade from Warehouse module Services\n",[840,914,916],{"class":842,"line":915},13,[840,917,918],{},"            );\n",[840,920,922],{"class":842,"line":921},14,[840,923,924],{},"        });\n",[840,926,928],{"class":842,"line":927},15,[840,929,930],{},"    }\n",[840,932,934],{"class":842,"line":933},16,[840,935,936],{},"}\n",[18,938,939],{},"Prefer constructor injection into controllers from a thin factory — avoid service locator sprawl inside Domain.",[129,941,943],{"id":942},"events","Events",[323,945,946,956],{},[77,947,948,949,952,953,955],{},"CI4 Events\u002F",[34,950,951],{},"Triggers"," may wrap Shared ",[34,954,457],{}," in Infra.",[77,957,958],{},"Cross-module: translation listener in consumer module; rich payload + idempotency.",[129,960,962],{"id":961},"tooling","Tooling",[323,964,965,972],{},[77,966,967,968,971],{},"PHPUnit (shipped); PHPStan; ",[34,969,970],{},"spark"," CLI for generators — generated classes must land in correct layer.",[77,973,974,975,978],{},"Keep ",[34,976,977],{},"app\u002FConfig\u002FModules.php"," discovery tuned so Composer packages are not over-scanned.",[59,980],{},[10,982,984],{"id":983},"part-d-apply-procedure-codeigniter","Part D — Apply procedure (CodeIgniter)",[62,986,988,989,991],{"id":987},"d1-confirm-codeigniter4framework-47","D1 — Confirm ",[34,990,661],{}," ^4.7",[62,993,995],{"id":994},"d2-readme-with-one-shot-url-module-psr-4-roots","D2 — README with one-shot URL + module PSR-4 roots",[62,997,999,1000],{"id":998},"d3d5-roadmap-prd-aiarchitecturefullmd","D3–D5 — ROADMAP \u002F PRD \u002F ",[34,1001,1002],{},".ai\u002F...\u002FARCHITECTURE.full.md",[62,1004,1006,1007,1009],{"id":1005},"d6-register-namespaces-in-appconfigautoloadphp-composerjson","D6 — Register namespaces in ",[34,1008,683],{}," + composer.json",[62,1011,1013,1014,1016],{"id":1012},"d7-first-module-configservicesphp-routes","D7 — First module + ",[34,1015,743],{}," + routes",[62,1018,1020],{"id":1019},"d8-tests-asserting-no-model-usage-in-applicationdomain","D8 — Tests asserting no Model usage in Application\u002FDomain",[62,1022,1024],{"id":1023},"d9-part-e-no-commit-unless-asked","D9 — Part E — no commit unless asked",[59,1026],{},[10,1028,1030],{"id":1029},"part-f-sketch","Part F — Sketch",[18,1032,1033],{},"Controller → PlaceOrderUseCase → availability port (Services) → Warehouse façade; event consumer Command in Warehouse module.",[59,1035],{},[10,1037,1039],{"id":1038},"part-g-done-checklist-standard","Part G — Done checklist (standard)",[59,1041],{},[10,1043,1045],{"id":1044},"part-e-assistant-files-optional","Part E — Assistant files (optional)",[18,1047,1048,1049,97],{},"Skip if AI vendor is ",[34,1050,126],{},[18,1052,1053],{},"Create shared folder:",[134,1055,1058],{"className":1056,"code":1057,"language":139,"meta":140},[137],".ai\u002Fmodular-hexagonal-ddd\u002F\n  ARCHITECTURE.full.md   # copy of the host one-shot you fetched\n  RULES.core.md\n  SKILL.md\n  CHECKLIST.md\n  codeigniter-host.md         # host-only notes from Part C\n",[34,1059,1057],{"__ignoreMap":140},[129,1061,1063],{"id":1062},"e0-rulescoremd","E0 — RULES.core.md",[134,1065,1069],{"className":1066,"code":1067,"language":1068,"meta":140,"style":140},"language-markdown shiki shiki-themes github-light github-dark","# Modular Hexagonal DDD — Core rules\nCanon: \u003CORIGIN>\u002Fv1\u002Fcore (1.0.0-draft)\nOne-shot: \u003CORIGIN>\u002Fapply\u002Fcodeigniter.full.md\nLocal: .ai\u002Fmodular-hexagonal-ddd\u002FARCHITECTURE.full.md\n\n1. Domain hardest: no host framework, ORM, other modules.\n2. Use Cases: own Domain + Shared ports only.\n3. Cross-module: ACL or Domain Events only.\n4. Thin façades; rich events (eventId, schemaVersion); idempotent consumers.\n5. No cross-module write TX; ACL validate-before-commit.\n6. Shared = technical ≥2 modules only.\n7. *UseCase + __invoke; no literal Feature\u002F folders.\n8. Design test: peer→HTTP, Application\u002FDomain still compile.\n","markdown",[34,1070,1071,1076,1081,1086,1091,1095,1100,1105,1110,1115,1120,1125,1130],{"__ignoreMap":140},[840,1072,1073],{"class":842,"line":843},[840,1074,1075],{},"# Modular Hexagonal DDD — Core rules\n",[840,1077,1078],{"class":842,"line":849},[840,1079,1080],{},"Canon: \u003CORIGIN>\u002Fv1\u002Fcore (1.0.0-draft)\n",[840,1082,1083],{"class":842,"line":855},[840,1084,1085],{},"One-shot: \u003CORIGIN>\u002Fapply\u002Fcodeigniter.full.md\n",[840,1087,1088],{"class":842,"line":862},[840,1089,1090],{},"Local: .ai\u002Fmodular-hexagonal-ddd\u002FARCHITECTURE.full.md\n",[840,1092,1093],{"class":842,"line":868},[840,1094,859],{"emptyLinePlaceholder":858},[840,1096,1097],{"class":842,"line":873},[840,1098,1099],{},"1. Domain hardest: no host framework, ORM, other modules.\n",[840,1101,1102],{"class":842,"line":879},[840,1103,1104],{},"2. Use Cases: own Domain + Shared ports only.\n",[840,1106,1107],{"class":842,"line":885},[840,1108,1109],{},"3. Cross-module: ACL or Domain Events only.\n",[840,1111,1112],{"class":842,"line":891},[840,1113,1114],{},"4. Thin façades; rich events (eventId, schemaVersion); idempotent consumers.\n",[840,1116,1117],{"class":842,"line":897},[840,1118,1119],{},"5. No cross-module write TX; ACL validate-before-commit.\n",[840,1121,1122],{"class":842,"line":903},[840,1123,1124],{},"6. Shared = technical ≥2 modules only.\n",[840,1126,1127],{"class":842,"line":909},[840,1128,1129],{},"7. *UseCase + __invoke; no literal Feature\u002F folders.\n",[840,1131,1132],{"class":842,"line":915},[840,1133,1134],{},"8. Design test: peer→HTTP, Application\u002FDomain still compile.\n",[129,1136,1138],{"id":1137},"e1-skillmd","E1 — SKILL.md",[134,1140,1142],{"className":1066,"code":1141,"language":1068,"meta":140,"style":140},"---\nname: modular-hexagonal-ddd\ndescription: Enforce Modular Hexagonal DDD. Modules, ACL, Events, Shared, Use Cases.\n---\nFollow .ai\u002Fmodular-hexagonal-ddd\u002FARCHITECTURE.full.md\n",[34,1143,1144,1149,1154,1159,1163],{"__ignoreMap":140},[840,1145,1146],{"class":842,"line":843},[840,1147,1148],{},"---\n",[840,1150,1151],{"class":842,"line":849},[840,1152,1153],{},"name: modular-hexagonal-ddd\n",[840,1155,1156],{"class":842,"line":855},[840,1157,1158],{},"description: Enforce Modular Hexagonal DDD. Modules, ACL, Events, Shared, Use Cases.\n",[840,1160,1161],{"class":842,"line":862},[840,1162,1148],{},[840,1164,1165],{"class":842,"line":868},[840,1166,1167],{},"Follow .ai\u002Fmodular-hexagonal-ddd\u002FARCHITECTURE.full.md\n",[129,1169,1171],{"id":1170},"e2-checklistmd","E2 — CHECKLIST.md",[134,1173,1175],{"className":1066,"code":1174,"language":1068,"meta":140,"style":140},"- [ ] First-level *UseCase entry\n- [ ] App DTO → __invoke\n- [ ] I\u002FO via Domain ports\n- [ ] No ORM\u002Ffacades in Application\u002FDomain\n- [ ] Sync peer → local ACL port → thin façade\n- [ ] Async → rich event + translation listener → inbound UC\n- [ ] Idempotent eventId\n- [ ] No cross-module DB TX\n- [ ] No foreign Application\u002FDomain imports\n- [ ] Shared only technical ≥2\n- [ ] No Feature\u002F directories\n- [ ] Replaceability test = yes\n",[34,1176,1177,1182,1187,1192,1197,1202,1207,1212,1217,1222,1227,1232],{"__ignoreMap":140},[840,1178,1179],{"class":842,"line":843},[840,1180,1181],{},"- [ ] First-level *UseCase entry\n",[840,1183,1184],{"class":842,"line":849},[840,1185,1186],{},"- [ ] App DTO → __invoke\n",[840,1188,1189],{"class":842,"line":855},[840,1190,1191],{},"- [ ] I\u002FO via Domain ports\n",[840,1193,1194],{"class":842,"line":862},[840,1195,1196],{},"- [ ] No ORM\u002Ffacades in Application\u002FDomain\n",[840,1198,1199],{"class":842,"line":868},[840,1200,1201],{},"- [ ] Sync peer → local ACL port → thin façade\n",[840,1203,1204],{"class":842,"line":873},[840,1205,1206],{},"- [ ] Async → rich event + translation listener → inbound UC\n",[840,1208,1209],{"class":842,"line":879},[840,1210,1211],{},"- [ ] Idempotent eventId\n",[840,1213,1214],{"class":842,"line":885},[840,1215,1216],{},"- [ ] No cross-module DB TX\n",[840,1218,1219],{"class":842,"line":891},[840,1220,1221],{},"- [ ] No foreign Application\u002FDomain imports\n",[840,1223,1224],{"class":842,"line":897},[840,1225,1226],{},"- [ ] Shared only technical ≥2\n",[840,1228,1229],{"class":842,"line":903},[840,1230,1231],{},"- [ ] No Feature\u002F directories\n",[840,1233,1234],{"class":842,"line":909},[840,1235,1236],{},"- [ ] Replaceability test = yes\n",[129,1238,1240],{"id":1239},"e3-cursor","E3 — Cursor",[323,1242,1243,1249,1255],{},[77,1244,1245,1248],{},[34,1246,1247],{},".cursor\u002Frules\u002Fmodular-hexagonal-ddd.mdc"," ← E0 + path to ARCHITECTURE.full.md",[77,1250,1251,1254],{},[34,1252,1253],{},".cursor\u002Frules\u002Fcodeigniter-host.mdc"," ← Part C summary",[77,1256,1257,1260],{},[34,1258,1259],{},".cursor\u002Fskills\u002Fmodular-hexagonal-ddd\u002FSKILL.md"," ← E1",[129,1262,1264],{"id":1263},"e4-claude","E4 — Claude",[323,1266,1267,1273],{},[77,1268,1269,1272],{},[34,1270,1271],{},"CLAUDE.md"," ← pointer to ARCHITECTURE.full.md + E0",[77,1274,1275,1276],{},"Shared ",[34,1277,1278],{},".ai\u002Fmodular-hexagonal-ddd\u002F*",[129,1280,1282],{"id":1281},"e5-gemini","E5 — Gemini",[323,1284,1285,1294],{},[77,1286,1287,713,1290,1293],{},[34,1288,1289],{},"GEMINI.md",[34,1291,1292],{},".gemini\u002Finstructions.md"," ← pointer + E0",[77,1295,1275,1296],{},[34,1297,1298],{},".ai\u002F*",[129,1300,1302],{"id":1301},"e6-github-copilot","E6 — GitHub Copilot",[323,1304,1305],{},[77,1306,1307,1310],{},[34,1308,1309],{},".github\u002Fcopilot-instructions.md"," ← E0 + short host section",[129,1312,1314],{"id":1313},"e7-generic","E7 — Generic",[323,1316,1317],{},[77,1318,1319,1322,1323],{},[34,1320,1321],{},"AGENTS.md"," pointing at ",[34,1324,1325],{},".ai\u002Fmodular-hexagonal-ddd\u002FARCHITECTURE.full.md",[129,1327,1329],{"id":1328},"e8-multiple-vendors","E8 — Multiple vendors",[18,1331,1332,1333,1336],{},"One shared ",[34,1334,1335],{},".ai\u002Fmodular-hexagonal-ddd\u002F","; vendor entry files only point to it.",[1338,1339,1340],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":140,"searchDepth":849,"depth":849,"links":1342},[1343,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1363,1365,1366,1368,1370,1372,1373],{"id":64,"depth":849,"text":65,"children":1344},[1345],{"id":131,"depth":855,"text":132},{"id":169,"depth":849,"text":170},{"id":184,"depth":849,"text":185},{"id":207,"depth":849,"text":208},{"id":310,"depth":849,"text":311},{"id":320,"depth":849,"text":321},{"id":381,"depth":849,"text":382},{"id":475,"depth":849,"text":476},{"id":541,"depth":849,"text":542},{"id":553,"depth":849,"text":554},{"id":563,"depth":849,"text":564},{"id":573,"depth":849,"text":574},{"id":588,"depth":849,"text":589,"children":1358},[1359,1360,1361,1362],{"id":811,"depth":855,"text":812},{"id":830,"depth":855,"text":831},{"id":942,"depth":855,"text":943},{"id":961,"depth":855,"text":962},{"id":987,"depth":849,"text":1364},"D1 — Confirm codeigniter4\u002Fframework ^4.7",{"id":994,"depth":849,"text":995},{"id":998,"depth":849,"text":1367},"D3–D5 — ROADMAP \u002F PRD \u002F .ai\u002F...\u002FARCHITECTURE.full.md",{"id":1005,"depth":849,"text":1369},"D6 — Register namespaces in app\u002FConfig\u002FAutoload.php + composer.json",{"id":1012,"depth":849,"text":1371},"D7 — First module + Config\u002FServices.php + routes",{"id":1019,"depth":849,"text":1020},{"id":1023,"depth":849,"text":1024,"children":1374},[1375,1376,1377,1378,1379,1380,1381,1382,1383],{"id":1062,"depth":855,"text":1063},{"id":1137,"depth":855,"text":1138},{"id":1170,"depth":855,"text":1171},{"id":1239,"depth":855,"text":1240},{"id":1263,"depth":855,"text":1264},{"id":1281,"depth":855,"text":1282},{"id":1301,"depth":855,"text":1302},{"id":1313,"depth":855,"text":1314},{"id":1328,"depth":855,"text":1329},"Self-contained Modular Hexagonal DDD + CodeIgniter 4.7 apply playbook for AI agents.","md",{},"\u002Fv1\u002Fadopt\u002Fapply\u002Fcodeigniter-full",{"title":5,"description":1384},"v1\u002Fadopt\u002Fapply\u002Fcodeigniter-full","443HMQZIe59NfLcIpsarD3D7rtNJJMAu26PjSazTDoQ",1786241410128]