the finances skeleton — repo, prefix and permission key, before any feature

Published empty on purpose: identity is the expensive part to change later, the
feature is the cheap part to add. One route, two placeholder panels, no tables and
no sidecar.
This commit is contained in:
2026-08-27 17:28:00 +01:00
commit 6e88d849e7
10 changed files with 222 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
# AGENTS.md
Guidance for a coding agent working on **this plugin's own repository**. `CLAUDE.md` beside it only
points here — the two harnesses discover different filenames and one set of instructions has to reach
both.
**This is not what the plugin is.** `README.md` answers that. This file answers "I have to change
something in here — what will I break?"
## Where you are
A plugin repository, cloned into `~/officer-dev/plugins/finances`, its own git remote. It is **not** part
of the platform's repository, and `platform/plugins/finances` is a different thing — that is where this
plugin gets INSTALLED, by the installer cloning it from gitea. Never edit there; the next install
overwrites it.
## What must not change without knowing why
- **Permission key `finances`** — stored as the subject of every grant. Renaming it is a data change.
- **Panel keys** (`finances-overview`, `finances-detail`) — a user's stored layout names them.
- **`appName`** — the directory name IS the id: route segment, table prefix, sidecar suffix, install key.
## Adding tables
There are none yet. When there are, `db/schema.ts`, every table name prefixed `finances_`, and
`bun db:push` from the platform repo. Uninstall never drops a table; deleting this directory and running
`db:push` does.
## Verifying
From the platform repo, which is where the toolchain lives:
```bash
bunx tsgo
bun run plugins:check
bunx prettier --write <the files you touched>
```
A change in `api/` or `web/` needs `pm2 restart officer`. A manifest change needs it too — manifests are
read once per server process.