Add the coreapp skill; fix /data ownership; deploy --recreate, shell <cmd>

skills/coreapp/SKILL.md teaches a Claude Code agent to make or port an
app for Federated Core: coreapp.toml, the needs, porting an existing app,
the deploy and test loop, troubleshooting, what isn't supported yet and
how to report back. update.sh links it into ~/.claude/skills/coreapp;
uninstall.sh removes the link. Rehearsed with a small app (memo-board)
ported by a fresh agent using only the skill.

The installer now gives /data to the image's user before starting the
container: Docker created it as root, so non-root apps couldn't write.
coreapp deploy --recreate always starts a new container (to test that
data survives); coreapp shell '<command>' runs one command without a
terminal.

PLAN.md: what would change on the Core to put the installer in
/federated/bin/coreapps/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 13:50:10 -07:00
co-authored by Claude Opus 5.5
parent b4d47fb1c5
commit fdb57d260d
8 changed files with 464 additions and 24 deletions
+24 -3
View File
@@ -141,6 +141,19 @@ On a machine you can rebuild (it removes the network every VM uses):
`~/.config/coreapp-dev`.
4. `bash install.sh` puts everything back.
## The skill
1. After `bash update.sh`, `~/.claude/skills/coreapp` is a link to
`skills/coreapp` in the clone; running it again changes nothing. With a
real folder already at that path, it says so and leaves it.
2. `uninstall.sh` removes the link (only if it points at a
`skills/coreapp`).
3. Rehearsal: give an agent a small app with the usual problems (listens on
127.0.0.1, keeps its files next to the code, a hard-coded secret) and the
task "make it run on our Core as a Coreapp and test it". It should read
the skill, write `coreapp.toml` and a Dockerfile, move state to `/data`,
use `APP_SECRET`, deploy, check, and report what it couldn't test.
## The installer (coreapps), off the Core
`coreapps manifest <dir>` checks a `coreapp.toml` without a Core. With a
@@ -184,12 +197,16 @@ The Core's own scripts trace secrets, so their output goes to
certificate can take a minute).
4. Change `www/index.html`, `coreapp deploy`: "Updating hello to 0.1.0",
the container is recreated, the page shows the change, `.env` is
unchanged. `coreapp deploy` again: "The Core already has this image."
unchanged. `coreapp deploy` again: "The Core already has this image.",
and the container is the same (`docker inspect -f '{{.Created}}'`);
`coreapp deploy --recreate`: a new container, same data.
5. Raise `version` to 0.2.0, `coreapp deploy`: "Updated"; the container
runs `:0.2.0`; `docker image ls localhost/coreapp/hello` on the Core lists
only 0.2.0.
6. `coreapp status` (address and port), `coreapp logs`, `coreapp shell`
(exit with `exit`), `coreapp list` (all apps installed by coreapps).
(exit with `exit`), `coreapp shell 'id; echo $APP_URL'` (prints both,
no terminal needed, also when piped), `coreapp list` (all apps installed
by coreapps).
7. `coreapp remove`, answering y: on the Core, `/federated/apps/hello`,
`/federated/services/hello`, the container and the image are gone, and
the catalog no longer lists `hello`.
@@ -200,7 +217,11 @@ The Core's own scripts trace secrets, so their output goes to
`coreapp-vm ssh /opt/coreapps/coreapps install <dir>` on a copy)
- with the app installed with `needs = ["postgres"]`, deploying with
`needs = []` ("drops needs postgres")
9. On a Core whose tier isn't enterprise, deploying a new app asks before
9. `/data` is writable by the app: with an image that runs as `nobody`
(the `--postgres`/`--sso` examples), `coreapp shell` then
`touch /data/x` works; on the Core, `/federated/apps/<name>/data` belongs
to uid 65534.
10. On a Core whose tier isn't enterprise, deploying a new app asks before
it's recorded as an add-on; answering no deploys nothing.
### With a database