pi-webui
AGENTS.md9 starsChanged 3 months agoMITView on GitHub
This project is expected to run locally using split systemd user services: When working on this project, assume the session runtime owner is long-lived and separate from the autoreloading UI/API process. Browser disconnects and UI/API restarts should not stop active Pi sessions. If you make changes that affect src/server/sessiond.ts, session runtime ownership, the session daemon protocol, or any code path only loaded by the session daemon, inform the user that a manual restart of the session daemon is needed. Changes…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository6 other files it gives its agents.
- changeset-changelogSkill
- code-quality-architectureSkill
- documentation-guideSkill
- npm-release-via-github-actionsSkill
- testing-guideSkill
- relaySkill
The file
We split this AGENTS.md into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
When working on this project, assume the session runtime owner is long-lived and separate from the autoreloading UI/API process.
- Very specific: line 10
If you make changes that affect src/server/sessiond.ts, session runtime ownership, the session daemon protocol, or any code path only …
- Very specific: line 28
Put installation variants, troubleshooting, configuration details, operational behavior, architecture, edge cases, and exhaustive …
- Very specific: line 30
Use .agents/skills/documentation-guide/SKILL.md whenever writing, modifying, reviewing, or planning user-facing documentation.
- Distinctive: line 36
Use that skill whenever writing, modifying, reviewing, or planning tests, closing coverage gaps, triaging test failures, or creating test …
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent Notes
This project is expected to run locally using split systemd user services:
pi-webui-sessiond.servicerunsnpm run start:sessiondin non-autoreload, non-auto-restart mode.pi-webui-ui-dev.serviceruns the web/API and Vite UI in dev autoreload mode withnpm run dev:webandnpm run dev:client.
When working on this project, assume the session runtime owner is long-lived and separate from the autoreloading UI/API process. Browser disconnects and UI/API restarts should not stop active Pi sessions.
If you make changes that affect src/server/sessiond.ts, session runtime ownership, the session daemon protocol, or any code path only loaded by the session daemon, inform the user that a manual restart of the session daemon is needed.
Changes to the web/API/UI side generally only require the pi-webui-ui-dev.service autoreload/restart path.
Publication policy
Publishing to npm is allowed through the standard GitHub Actions release workflow. Use .agents/skills/npm-release-via-github-actions/SKILL.md for the full release process. Do not run npm publish locally; always route publishing through GitHub Releases triggering the publish workflow.
Security-audit exception policy
IGNORED.md is the canonical project policy and register for a narrowly scoped upstream-only, non-bundled dependency-audit exception. A Security Auditor may mark a security gate as pass with documented exception only after verifying every condition in that file and the PM records approval and evidence in the release handoff.
The exception never applies to secrets, PI WEBUI source findings, direct or production dependency findings, dependency-path changes introduced by the release candidate, or findings not specifically registered in IGNORED.md. It does not waive the upstream Pi package's security obligations. Do not create a GitHub Release or publish to npm until the Security Auditor has recorded this evidence and the PM has approved the documented exception.
Documentation boundaries
README.md is a concise landing page and quick start. Keep it focused on what PI WEBUI is, basic requirements, the shortest supported install path, essential commands, the core model, and links to detailed documentation.
Put installation variants, troubleshooting, configuration details, operational behavior, architecture, edge cases, and exhaustive explanations under docs/. Avoid duplicating detailed documentation in the README; link to its canonical location instead.
Use .agents/skills/documentation-guide/SKILL.md whenever writing, modifying, reviewing, or planning user-facing documentation.
Testing guidance
Project-specific testing rules live in .agents/skills/testing-guide/SKILL.md.
Use that skill whenever writing, modifying, reviewing, or planning tests, closing coverage gaps, triaging test failures, or creating test helpers/harnesses. Keep detailed testing conventions there rather than growing this top-level orientation file.
Client application URL convention
- Build PI WEBUI-owned browser paths as application-relative references without a leading slash, for example
api/...andpi-webui-plugins/.... - Encode every dynamic path segment with
encodeURIComponent; encode query values, usingURLSearchParamsfor multi-field queries. - Resolve each reference exactly once at the browser boundary: ordinary JSON HTTP paths go to
request(), direct browser APIs receive URLs from helpers backed byresolveAppUrl(), and WebSockets useresolveAppWebSocketUrl(). - Name helpers returning unresolved application references with a
Pathsuffix and helpers returning browser-ready absolute values with aUrlsuffix. - Plugin module references must go through
resolvePluginModuleUrl(). Its leading-slash handling is the documented rolling-compatibility exception; do not introduce other leading-root app references. - Pre-JavaScript HTML assets use Vite
%BASE_URL%; PWA manifest references stay./-relative. External links, data URLs, and module-relative plugin assets are not application paths. - To assess deviations, search production client code for raw
fetch,WebSocket,XMLHttpRequest, URL-bearing DOM attributes, and leading/apior/pi-webui-pluginsliterals. Every app-owned result must follow one of the boundaries above. - Published nested deployments require a canonical trailing slash; the reverse proxy must redirect a slashless prefix before serving the app.
Configuration conventions
$PI_WEBUI_DATA_DIR(~/.pi-webuiby default) contains PI WEBUI-managed state such asprojects.jsonandmachines.json; do not treat it as the user-editable config API.- Global user/machine config lives at
$PI_WEBUI_CONFIGor~/.config/pi-webui/config.json. - Project-local PI WEBUI core config should use one commit-able file:
<project>/.pi-webui/config.json. - Core features should add keys to these config files, not create one project file per feature.
- Plugins may own separate project config files, such as
.pi-webui/tasks.json.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

