Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
b04dd53
Create EPIC_NON_HTML_PAGES.md
emmadesilva Jul 13, 2026
a4987a0
Add agent instructions for epic-driven development
emmadesilva Jul 13, 2026
1c9ef87
Add support for declaring non-HTML output file extensions on pages
emmadesilva Jul 13, 2026
76ac215
Add unit tests for output file extension behavior
emmadesilva Jul 13, 2026
d37fbeb
Add feature tests for non-HTML in-memory page output
emmadesilva Jul 13, 2026
4ef8368
Add release notes for non-HTML page output support
emmadesilva Jul 13, 2026
1d5b3d7
Include declared non-HTML output file extensions in route keys
emmadesilva Jul 13, 2026
6806699
Document PR 1 decisions in the epic and refine release notes
emmadesilva Jul 13, 2026
1c9c462
Build documentation
emmadesilva Jul 13, 2026
9932365
Rename page source file extension API to sourceExtension
emmadesilva Jul 13, 2026
46af211
Rename the output file extension API to outputExtension
emmadesilva Jul 13, 2026
fc167b2
Expand the output path extension rule into an explicit conditional
emmadesilva Jul 13, 2026
002a55c
Describe the explicit output extension allowlist by its behavior
emmadesilva Jul 13, 2026
8f01ff8
Inline the route key output extension handling
emmadesilva Jul 13, 2026
3f3fc33
Build documentation for the renamed extension APIs
emmadesilva Jul 13, 2026
a7be01b
Document the extension API rename and seed the upgrade script rules
emmadesilva Jul 13, 2026
717ebcb
Record the PR 1 review outcomes in the epic
emmadesilva Jul 13, 2026
5571e15
Fix the swapped source and output directory setter docblocks
emmadesilva Jul 13, 2026
79ecd50
Test subclass customization of the explicit output extensions
emmadesilva Jul 13, 2026
3323167
Generalize the output directory docblock beyond HTML output
emmadesilva Jul 13, 2026
c89989f
Cover overridden method declarations in the extension rename migration
emmadesilva Jul 13, 2026
3f8b372
Append the output extension to the completed route key
emmadesilva Jul 13, 2026
a0f566c
Validate declared output extensions
emmadesilva Jul 13, 2026
b2fc7c8
Fail fast for page classes using the renamed v2 extension API
emmadesilva Jul 13, 2026
d1241d8
Reject redirect source paths that cannot produce a working redirect
emmadesilva Jul 13, 2026
daeb169
Cover named arguments in the extension rename migration rule
emmadesilva Jul 13, 2026
5f0e460
Test discoverable page class with distinct source and output extensions
emmadesilva Jul 13, 2026
7f7ea98
Update stale epic note on redirect paths with non-HTML extensions
emmadesilva Jul 13, 2026
4a0d11f
Resolve registered routes before proxying static assets in the dev se…
emmadesilva Jul 13, 2026
48510e5
Test route-first resolution against matching and missing static assets
emmadesilva Jul 13, 2026
5603b42
Document realtime compiler route-first resolution in epic and release…
emmadesilva Jul 13, 2026
1755807
Revise non-HTML pages epic scope
emmadesilva Jul 13, 2026
c2c02b6
Revise the epic for changed scope
emmadesilva Jul 13, 2026
9393ac6
Update EPIC_NON_HTML_PAGES.md
emmadesilva Jul 13, 2026
d05cec2
Add page-level sitemap inclusion control via showInSitemap()
emmadesilva Jul 13, 2026
02961fa
Add showInSitemap to the page unit test contract
emmadesilva Jul 13, 2026
8c1ee9c
Test sitemap exclusions for front matter, non-HTML pages, and search …
emmadesilva Jul 13, 2026
2b14693
Document the sitemap inclusion policy in the epic and release notes
emmadesilva Jul 13, 2026
a7d4ccc
Use filter_var to parse sitemap front matter boolean
emmadesilva Jul 13, 2026
3c89b81
Test that quoted false front matter excludes pages from the sitemap
emmadesilva Jul 13, 2026
f2e93ac
Fix test setup
emmadesilva Jul 13, 2026
76e8be4
Generate documentation
emmadesilva Jul 13, 2026
cd74011
Add SitemapPage registered through core extension page discovery
emmadesilva Jul 13, 2026
93d95a1
Convert the sitemap from a post-build task to the registered page
emmadesilva Jul 13, 2026
923a5c6
Update tests for the sitemap build task to page conversion
emmadesilva Jul 13, 2026
9b0013b
Test the sitemap page registration, customization, and serving paths
emmadesilva Jul 13, 2026
bc78248
Add release notes and upgrade guide for the sitemap page conversion
emmadesilva Jul 13, 2026
56acac1
Record PR 5 part A decisions and implementation notes in the epic
emmadesilva Jul 13, 2026
dbe5575
Disable sitemap generation in tests asserting exact default collections
emmadesilva Jul 13, 2026
cc10240
Add RssFeedPage registered through core extension page discovery
emmadesilva Jul 13, 2026
1343c00
Convert the RSS feed from a post-build task to the registered page
emmadesilva Jul 13, 2026
42606f6
Update tests for the RSS feed build task to page conversion
emmadesilva Jul 13, 2026
10f3d9e
Test the RSS feed page registration, customization, and serving paths
emmadesilva Jul 13, 2026
32fd359
Add release notes, upgrade guide, and epic notes for the RSS feed pag…
emmadesilva Jul 13, 2026
1dd9a15
Disable RSS feed generation in tests asserting exact default collections
emmadesilva Jul 13, 2026
b853f85
Fail the sitemap and RSS commands with the unmet condition instead of…
emmadesilva Jul 13, 2026
f7e2bb3
Update command tests for the removed generation fallbacks
emmadesilva Jul 13, 2026
179a87e
Document the revised sitemap and RSS command guard semantics
emmadesilva Jul 13, 2026
d678013
Cover the SimpleXML fallback skip reason in both XML build commands
emmadesilva Jul 13, 2026
f5cc972
Replace the dynamic skip reasons with a static error message
emmadesilva Jul 13, 2026
163f890
Document the generic command guard message revision
emmadesilva Jul 13, 2026
709b2d4
Update CLAUDE.md
emmadesilva Jul 13, 2026
cc2bcdc
Add a generated robots.txt page
emmadesilva Jul 13, 2026
199c827
Adapt existing tests to the generated robots.txt page
emmadesilva Jul 13, 2026
fb3b7bf
Test the generated robots.txt page
emmadesilva Jul 13, 2026
64ebea7
Add release notes and upgrade guidance for the generated robots.txt
emmadesilva Jul 13, 2026
70b546e
Mark PR 6 as implemented in the non-HTML pages epic
emmadesilva Jul 13, 2026
0a82afb
Validate that configured robots.txt disallow rules are strings
emmadesilva Jul 13, 2026
63bf75d
Document robots.txt disallow entries as rule values, not paths
emmadesilva Jul 13, 2026
40dc813
Create LLMS_TXT_RESEARCH.md
emmadesilva Jul 13, 2026
50a80ba
Add page-level llms.txt inclusion policy
emmadesilva Jul 13, 2026
3962af6
Add a generated llms.txt page
emmadesilva Jul 13, 2026
f40d2a7
Test the generated llms.txt page
emmadesilva Jul 13, 2026
4f35e82
Adapt existing tests to the generated llms.txt page
emmadesilva Jul 13, 2026
03384fd
Add release notes and upgrade guidance for the generated llms.txt
emmadesilva Jul 13, 2026
c5e33b7
Mark PR 7 as implemented in the non-HTML pages epic
emmadesilva Jul 13, 2026
89d4db8
Guard the llms.txt section config against drifting from the generator…
emmadesilva Jul 13, 2026
8fa254e
Derive llms.txt inclusion from sitemap inclusion instead of a new pag…
emmadesilva Jul 13, 2026
00ad993
Move the llms.txt sections from config into the generator
emmadesilva Jul 13, 2026
0ad0537
List pages in llms.txt based on their sitemap inclusion
emmadesilva Jul 13, 2026
180506c
Escape Markdown syntax in llms.txt link labels and pin the page ordering
emmadesilva Jul 13, 2026
82bcb71
Cover the generator override for pages excluded from the sitemap
emmadesilva Jul 13, 2026
ef8651c
Improve test clarity
emmadesilva Jul 13, 2026
067af67
Revert "Create LLMS_TXT_RESEARCH.md"
emmadesilva Jul 14, 2026
3e3a3a9
Add exact-path in-memory file pages
emmadesilva Jul 14, 2026
8bde4eb
Document exact-path in-memory files
emmadesilva Jul 14, 2026
cb322dd
Validate exact in-memory page paths
emmadesilva Jul 14, 2026
d546ff8
Rename exact output path tests
emmadesilva Jul 14, 2026
6f44459
Document exact-path in-memory pages
emmadesilva Jul 14, 2026
644b5ae
Reject ambiguous exact output paths
emmadesilva Jul 14, 2026
cc76369
Make in-memory output semantics class-level
emmadesilva Jul 14, 2026
0d07fbf
Document class-level non-HTML page output
emmadesilva Jul 14, 2026
59c65c2
Record class-level output path design decision
emmadesilva Jul 14, 2026
e01bee1
Test static and instance output path symmetry
emmadesilva Jul 14, 2026
a91ed95
Infer in-memory output paths from identifiers
emmadesilva Jul 14, 2026
4d56d2e
Document inferred in-memory output formats
emmadesilva Jul 14, 2026
b922e03
Build documentation
emmadesilva Jul 14, 2026
1f1d2ba
Remove unnecessary code comments
emmadesilva Jul 14, 2026
847ecb7
Remove overengineered subclasses
emmadesilva Jul 14, 2026
abd9d3e
Remove overzealous config validation
emmadesilva Jul 14, 2026
15d1e0a
Remove repeated runtime validation on static properties
emmadesilva Jul 14, 2026
8dfd6f7
Remove the boot-time legacy API guard
emmadesilva Jul 14, 2026
d791067
Ensure spec is up to date
emmadesilva Jul 14, 2026
3e2a623
Use lazy contents for generated pages
emmadesilva Jul 17, 2026
71ffcd1
Build documentation
emmadesilva Jul 17, 2026
bd2cb96
Hide non-HTML pages from navigation by default
emmadesilva Jul 17, 2026
366426e
Merge pull request #2557 from hydephp/v3/non-html-pages-hide-from-nav…
emmadesilva Jul 17, 2026
fb86679
Remove narrating generated page comments
emmadesilva Jul 18, 2026
5a8608a
Remove empty test class comment
emmadesilva Jul 18, 2026
b597d90
Centralize generated page registration
emmadesilva Jul 18, 2026
458a8ce
Add planned test
emmadesilva Jul 18, 2026
052a688
Document generated non-HTML pages
emmadesilva Jul 20, 2026
9e26a6a
Update generated page command documentation
emmadesilva Jul 20, 2026
f653146
Complete non-HTML pages epic
emmadesilva Jul 20, 2026
b0b603d
Merge pull request #2559 from hydephp/v3/non-html-pages-documentation
emmadesilva Jul 20, 2026
0f5059d
Default llms.txt to disabled
emmadesilva Jul 26, 2026
214f0ea
Update llms.txt tests for the opt-in default
emmadesilva Jul 26, 2026
31037ec
Document the llms.txt default-off reversal
emmadesilva Jul 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ This serves two purposes:
- Raw HTML in Markdown is now enabled by default. Set `markdown.allow_html` to `false` when compiling untrusted or unreviewed Markdown to strip potentially unsafe HTML tags.
- `InMemoryPage` now requires callers to select either `contents` or `view`; configuring both throws an `InvalidArgumentException` instead of silently giving contents precedence.
- `InMemoryPage` now treats an empty string as an omitted `view`, matching the existing compile-time behavior and allowing literal contents to be used with an empty view value.
- Pages with non-HTML output paths are now excluded from automatic navigation by default. Set `navigation.visible: true` or `navigation.hidden: false` to include one explicitly.

### Deprecated
- for changes that will be removed in upcoming releases.
Expand Down
90 changes: 90 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Agent instructions for the HydePHP monorepo

This is the hydephp/develop monorepo. Framework code lives in `packages/framework`,
shared test utilities in `packages/testing`, the dev server in `packages/realtime-compiler`.
We are developing HydePHP v3; the main branch for PRs is `2.x`.

## Epic-driven workflow

- Multi-PR efforts are specified in epic documents at the repo root (like
`EPIC_NON_HTML_PAGES.md`). The epic is the source of truth: before implementing,
re-read the relevant PR section and design decisions; after implementing, check the
diff against them line by line.
- Deviations from the design and decisions the epic left open MUST be written back
into the epic in the same PR, and implemented sections marked (like "✅ Implemented").
- Before deviating, verify it is a *good* deviation: check side effects against the
rest of the epic (later PRs, design decisions) so the change doesn't drift from the
overall design. Also watch for silent under-delivery — implementing a design rule
only for the cases the current PR exercises will break later PRs that rely on it.
- Work on the epic happens in `v3/<epic-name>-*` branches off the epic base branch.
Check `git branch --list 'v3/*'` and the epic's status annotations (which may only
exist on PR branches) before assuming a PR is unimplemented.

## Commits

- Make atomic commits as you go: one logical change per commit (implementation,
tests, docs/release notes separately when they are separable). Do not batch a
whole PR into one commit at the end.

## Testing

The goal is full confidence: feature tests give 100% coverage by exercising all user
paths end-to-end (e.g. register a page, run the real `build` command, assert the
output file), and unit tests cover every code unit.

- Run suites with `vendor/bin/pest --testsuite FeatureFramework|UnitFramework|FeatureHyde`.
Use `--filter` for targeted runs. Run `php monorepo/HydeStan/run.php` before finishing.
- Every public method on page classes is part of the `BaseHydePageUnitTest` contract
(`packages/testing/src/Common/`): adding public API to `HydePage` means adding an
abstract test there and implementing it in all page unit tests in
`packages/framework/tests/Unit/Pages/`. `TestAllPageTypesHaveUnitTestsTest` enforces
one unit test class per page class.
- The suites read the real project root and pollute the working tree: they delete
`_media/app.css` and leave untracked junk (`_assets/`, `_docs/docs.md`, `_docs/index.md`,
`_pages/root.md`, `_pages/root1.md`, `_posts/my-new-post.md`, `_media/app.js`, `_site/`).
Dozens of environmental failures follow from that state — they are not regressions.
Restore with `git checkout -- _media/app.css` and delete the junk between runs.
- To prove a change introduces no regressions: run the suite at HEAD, then
`git checkout HEAD~N -- packages` (pre-change baseline), clean the tree, re-run,
and diff the sorted `FAILED` lines. Identical lists means no regressions. Restore
with `git checkout HEAD -- packages`. Don't pipe long pest runs through `tail` —
redirect to a file and grep it.
- Known pre-existing failure: `FeaturedImageUnitTest` on PHP 8.5 (`MediaFile::findHash()`).

## Release notes and docs

- Add release-notes entries to `HYDEPHP_V3_PLANNING.md` and upgrade steps to
`UPGRADE.md` as part of the PR that makes the change.
- Breaking-change notes must describe realistic impact. If the note describes a
scenario nobody would plausibly be in (like relying on double-extension output
such as `data.json.html`), say that no real impact is expected instead of
prescribing a migration.

## Code comments

If you catch yourself writing a code comment, stop and think about why. A comment is
usually a smell that the code is doing something weird — step back and look at what
you are actually trying to do before reaching for a comment. Comments are only for:

1. Adding better type support (docblocks, `@param`/`@var` annotations).
2. Documenting public APIs.
3. Explaining why unusual-looking code has to be that way, when there is no other option.

Never write comments that narrate what the next line does, where code came from, or
why a change is correct — that belongs in the PR description, not the code.

## Developer Experience

HydePHP treats Developer Experience as a design constraint, not a layer of polish added after a feature works. The framework exists to make creating content-focused websites feel simple without taking away the power developers expect from Laravel. Its guiding promise is that users should be able to begin with Markdown and sensible defaults, while retaining the freedom to use Blade, customize the frontend, replace conventions, or extend the build process when their project demands it.

The default path should therefore be the shortest path. A common task should work without configuration, manual registration, or knowledge of internal architecture. HydePHP favors convention over configuration, automatic discovery, appropriate default layouts, generated navigation, scaffolding commands, and ready-to-use frontend assets. Configuration and extension points are still important, but they should remain optional until the user has a reason to reach for them. A new feature is aligned with HydePHP when its basic use feels obvious and its advanced use remains possible.

HydePHP also aims to reuse mental models its users already know. APIs should follow Laravel conventions where practical, and features should compose naturally with familiar tools such as collections, facades, Blade components, console commands, configuration files, service providers, and lifecycle callbacks. Naming should describe what an operation does rather than expose how Hyde implements it. Before inventing a new abstraction, an agent should look for the closest existing HydePHP or Laravel pattern and extend that vocabulary consistently.

Good Developer Experience includes the failure path. HydePHP should validate assumptions early, produce actionable error messages, and avoid letting mistakes silently reach the generated site. Recent work on the asset and data systems reflects this approach through automatic validation, clearer exception handling, syntax checking, and helpers that remove repetitive filesystem work. Commands should explain what they are doing, generated files should be predictable, and errors should tell the developer what needs to change.

Performance and feedback speed matter as well. Improvements such as realtime compilation, Vite integration, hot module replacement, intelligent caching, and faster document processing are Developer Experience features because they shorten the distance between an edit and a trustworthy result. Agents should avoid unnecessary work in normal builds, preserve deterministic output, and prefer lazy or cached computation where it reduces repeated cost without making behavior harder to understand.

Finally, a feature is not complete when its implementation compiles. HydePHP requires focused changes, tests that demonstrate the intended behavior, and documentation for changes users can observe. Backward compatibility and the appropriate release branch must also be considered. Tests protect the experience from regression, while documentation confirms that the public API can be explained clearly. When an API is difficult to test or document, that is often evidence that it is also difficult to use.

An AI coding agent working on HydePHP should evaluate every feature with a simple standard: does this make the common case joyful, preserve control for advanced users, behave like the rest of the Laravel ecosystem, fail helpfully, and remain understandable through tests and documentation? The most Hyde-like implementation is rarely the one with the most options or abstractions. It is the one that removes the most friction while introducing the least surprise.
Loading
Loading