PERN Template Guide
This file is specific to the pern template.
hackctl Context
- This template is scaffolded by
hackctl create --template pern. hackctl startreads service definitions fromhackctl.config.json.hackctl shareusesshare.defaultServiceandshare.defaultPortfromhackctl.config.json.hackctl deployreads the templatedeployblock and currently expectsruntime: pm2withmode: dev.hackctl statusandhackctl destroyread saved deploy metadata from.hackctl/deploy.json.
hackctl.config.json Contract
- Keep the schema URL as
https://hackctl.dev/schemas/hackctl.config.v1.json. - Keep both services aligned with real directories and commands:
frontend->cwd: frontend,run: npm run dev,port: 3000backend->cwd: backend,run: npm run dev,port: 5000,envFile: backend/.env
- Keep the deploy block aligned with the current remote contract:
runtime: pm2mode: dev
- If service names, ports, or folder layout change, update
hackctl.config.jsonandREADME.mdtogether. - Frontend API calls should remain on relative
/api/*paths, with proxy target controlled by env.
Runtime State
hackctl startandhackctl sharewrite local runtime data to.hackctl/state.json.hackctl deploywrites remote deploy metadata to.hackctl/deploy.json..hackctl/must stay gitignored.- Never commit
.hackctl/state.json,.hackctl/deploy.json, or other local runtime artifacts.
AI Guidance Files
AGENTS.mdis the canonical guidance file.CLAUDE.mdandGEMINI.mdshould remain lightweight pointers to this file.- Keep guidance grounded in shipped behavior for this template.