← 所有消息

A manual that writes itself

Include the manual resource and your app gets a page at /manual describing itself. Nothing to configure.

It comes from the Phlo POS product layer, where the same question kept arriving from a different direction: what exactly is running on this machine, and what changed last week? A hand-written answer is stale the moment it is written, and the honest answer already exists in three places nobody reads together.

So the page reads all three. It renders data/app.md as the description, reflects the live source for the routes, models and resources actually present, and reads the git log for what changed recently. An optional AI summary sits on top, keyed on the description so it costs nothing per visit; without an AI key the rest of the page is unaffected.

The part that took a design decision is layers. An app built on a product layer should document that layer as its own section, but the framework underneath must stay invisible, or every manual would open with a description of Phlo. A layer appears only when it carries a layer.json in its repo root and a heading in its README. The engine does not, which is exactly why it stays out.

The page is standalone: inline CSS, no JavaScript, no layout, and every render is stored as data/manual.html so the last state survives without the app. Put the route behind your auth gate and add manual to release.exclude, because a manual carrying the source does not belong on a customer server.

Engine, unreleased. See the manual resource.

我们使用必要的cookie来使该网站正常工作。在您的许可下,我们还使用分析工具来改善网站。