From 50e8318e11f9381145098f6d47263fa24fe733df Mon Sep 17 00:00:00 2001 From: Osvaldo Castillo Date: Wed, 14 Oct 2026 16:38:58 -0400 Subject: [PATCH 1/2] feat: ship AGENTS.md in framework and appstarter distributions Add admin/framework/AGENTS.md so the framework distribution includes managed agent instructions pointing at system/Docs, and copy the same file into the appstarter root during deploy so both install channels (zip and Composer) get it. --- .github/scripts/deploy-appstarter | 3 +++ admin/framework/AGENTS.md | 7 +++++++ 2 files changed, 10 insertions(+) create mode 100644 admin/framework/AGENTS.md diff --git a/.github/scripts/deploy-appstarter b/.github/scripts/deploy-appstarter index 86d7bad2241a..634d2f1e25e9 100644 --- a/.github/scripts/deploy-appstarter +++ b/.github/scripts/deploy-appstarter @@ -29,6 +29,9 @@ done # Copy repo-specific files cp -Rf ${SOURCE}/admin/starter/. ./ +# Reuse the framework AGENTS.md at the project root +cp -Rf ${SOURCE}/admin/framework/AGENTS.md ./AGENTS.md + # Commit the changes git add . git commit -m "Release ${RELEASE}" diff --git a/admin/framework/AGENTS.md b/admin/framework/AGENTS.md new file mode 100644 index 000000000000..4e3927bef312 --- /dev/null +++ b/admin/framework/AGENTS.md @@ -0,0 +1,7 @@ + + +## This is NOT the CodeIgniter you know + +This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `system/Docs/` (framework distribution) or `vendor/codeigniter4/framework/system/Docs/` (app starter installed via Composer) before writing any code. Heed deprecation notices. + + From 8129f0bd63d44cef80eec772fc4e42eb8e5ca7bd Mon Sep 17 00:00:00 2001 From: Osvaldo Castillo Date: Wed, 14 Oct 2026 16:39:10 -0400 Subject: [PATCH 2/2] feat: embed user guide as Markdown in system/Docs for coding agents Convert the Sphinx user guide to Markdown in the framework release job (excluding _static, changelogs and images) and embed it in system/Docs before the distribution is assembled, giving agents version-matched docs for both manual downloads and Composer installs. --- .github/workflows/deploy-distributables.yml | 24 +++++++++++++++++++++ user_guide_src/requirements.txt | 1 + 2 files changed, 25 insertions(+) diff --git a/.github/workflows/deploy-distributables.yml b/.github/workflows/deploy-distributables.yml index 1eeb86f772cb..e6a85f3b7302 100644 --- a/.github/workflows/deploy-distributables.yml +++ b/.github/workflows/deploy-distributables.yml @@ -66,6 +66,30 @@ jobs: - name: Chmod run: chmod +x ./source/.github/scripts/deploy-framework + - name: Setup Python + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3861523e4b97 # v7.0.0 + with: + python-version: '3.12' + + - name: Install Sphinx + run: | + python -m pip install --upgrade pip + pip install -r ./source/user_guide_src/requirements.txt + + # Convert the User Guide to Markdown so coding agents get + # version-matched docs embedded in system/Docs + - name: Build Markdown Docs for agents + run: sphinx-build -b markdown -D exclude_patterns=_static/*,changelogs/*,images/* source build/markdown + working-directory: ./source/user_guide_src + + - name: Embed Markdown Docs into system/Docs + run: | + mkdir -p ./source/system/Docs + cp -Rf ./source/user_guide_src/build/markdown/. ./source/system/Docs/ + + - name: Verify embedded docs + run: test -f ./source/system/Docs/index.md + - name: Deploy env: PUSH_TOKEN: ${{ secrets.ACCESS_TOKEN }} diff --git a/user_guide_src/requirements.txt b/user_guide_src/requirements.txt index caf5a68f9a1c..dd51dfb17c03 100644 --- a/user_guide_src/requirements.txt +++ b/user_guide_src/requirements.txt @@ -1,4 +1,5 @@ sphinx>=8.0.0,<9.0.0 +sphinx-markdown-builder>=0.6.0 sphinxcontrib-phpdomain>=0.11.0 docutils>=0.19 sphinx-rtd-theme>=3.0.0