Skip to content

feat: embed Markdown User Guide and AGENTS.md in agent-facing distributions - #10638

Open
osvaldomcc wants to merge 2 commits into
codeigniter4:4.8from
osvaldomcc:feat/distribute-agent-docs
Open

osvaldomcc wants to merge 2 commits into
codeigniter4:4.8from
osvaldomcc:feat/distribute-agent-docs

Conversation

@osvaldomcc

Copy link
Copy Markdown

Description

  • Add a job step to the framework distribution workflow that builds the User Guide as Markdown with sphinx-markdown-builder and embeds it into system/Docs, so coding agents get version-matched documentation alongside the distributed framework.
  • Ship �dmin/framework/AGENTS.md to the appstarter repository root on release, pointing agents to the embedded docs.

No framework runtime code is touched; changes are limited to GitHub Actions workflow, the deploy script, and Sphinx build requirements.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication) — no PHP code changed
  • Unit testing, with >80% coverage — no PHP code changed; covered by the workflow's est -f ./source/system/Docs/index.md verification step
  • User guide updated — no public API/behavior change; CI and release tooling only
  • Conforms to style guide

@carson-codeigniter4 carson-codeigniter4 Bot added 4.8 PRs that target the `4.8` branch. github_actions Pull requests that update Github_actions code labels Oct 15, 2026

@michalsn michalsn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. I don't see a clear benefit to shipping the entire User Guide with every framework installation. Could you clarify:

  • How much does this increase the package and download size?
  • Why convert to Markdown instead of distributing the existing RST sources?
  • What concrete problem does this solve for coding agents?

My take is that AGENTS.md shouldn't be included in every appstarter project. Application owners should decide which instructions apply to agents working on their projects.

@osvaldomcc

osvaldomcc commented Oct 19, 2026 via email

Copy link
Copy Markdown
Author

@michalsn

Copy link
Copy Markdown
Member

Thanks for clarifying. I understand the value of version-matched documentation, and the size measurements help. The Next.js results are encouraging, but I'd like to see examples of CodeIgniter tasks where bundled documentation improves the outcome enough to justify including it by default.

I would prefer an opt-in way to install the matching docs and agent instructions. Omitting AGENTS.md doesn't address the package-size concern, since the documentation would still be installed for everyone.

I would also like to hear what other maintainers think about this before we decide on it.

@osvaldomcc

osvaldomcc commented Oct 19, 2026 via email

Copy link
Copy Markdown
Author

@paulbalandan

Copy link
Copy Markdown
Member

Thanks for the figures, but I would agree with @michalsn to bundling the docs opt-in. In #10133, it was discussed moving the user guide to Markdown using codeigniter4/docs-update. Once that happens, the versioned docs for agents can come for free as the markdown artifacts are already there.

Issues I'm seeing here:

  • An RST-to-Markdown conversion every build is like converting blindly given the issues with php-domain directives. An example output of conversion on PHP-heavy docs would be nice.
  • Adding the step before the deploy step risks blocking a release on a failed docs build.
  • The wording of AGENTS.md is strongly worded that implies every version has BC breaks. A patch release should not have compatibility breaks.
  • The placement in system/Docs which only appears in releases but not at source does not sit well with me.

If any, completing the docs migration would be a better path.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.8 PRs that target the `4.8` branch. github_actions Pull requests that update Github_actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants