This document defines the merge contract for official templates in this repository.
If a template does not meet these requirements, it should not be merged.
- Official templates are currently web-first.
- Official templates must support the shipped CLI workflow:
hackctl create,hackctl start,hackctl share, and the currenthackctl deploycontract. - Near-term official templates are Node and npm based.
- Official templates in this phase implement the same Todo app shape.
Each template must include:
- root
hackctl.config.json - root
.gitignorewith.hackctl/ .env.examplecoverage for required environment variables- template-local
README.md - root
AGENTS.mdas canonical agent instructions - root
CLAUDE.mdthat points toAGENTS.md - root
GEMINI.mdthat points toAGENTS.md - curated skills in
.agents/skills/*/SKILL.md
- Must be valid JSON and use this schema URL:
https://hackctl.dev/schemas/hackctl.config.v1.json
- Must include
name,template,services,share, anddeploy. servicesmust be an ordered array with valid service definitions:name,cwd,run,port(optionalenvFile)
share.defaultServicemust point to an existing service.share.defaultPortmust be valid and align with the intended public entrypoint.deploy.runtimeis required.deploy.modeshould be present; current official templates usedev.- Current supported official deploy values are:
runtime: pm2mode: dev
- Service run commands must be npm based (
npm run ...). - Template must run on Node 20+ and npm 10+.
- Do not require pnpm, yarn, bun, or Docker for the default local path.
- Current remote deploy path assumes PM2 can run the template using the same npm scripts defined in
services[].run.
For templates that use Supabase:
- Include
supabase/config.tomlat the template root. - Include tracked SQL migrations under
supabase/migrations/. - README must document the login/link/migration/push flow and reference the migration path.
AGENTS.mdis the single source of truth for agent workflow and project constraints.CLAUDE.mdandGEMINI.mdmust stay thin pointer files that direct tools toAGENTS.md.- Curated skills must be committed in
.agents/skills/*/SKILL.md. - Skill selection should be stack-aware (for example,
*-supabasetemplates include at least one Supabase-focused skill). - Skills should come from reputable, maintained sources and stay intentionally small.
- Frontend API calls should use relative
/api/*paths. - Frontend development proxy target must be env driven, not hardcoded.
- Do not require
/api/healthfor merge. - Future
deploy.mode: prodrequirement: the full app must be reachable through one public service and one public port. - For split frontend/backend templates like MERN and PERN, prod mode should let the backend serve built frontend assets or provide an equivalent single-entrypoint path.
- Templates must implement CRUD for a Todo entity.
- Todo entity contract:
id,title,completed,createdAt
- Shared API route contract:
GET /api/todosPOST /api/todosPUT /api/todos/:idDELETE /api/todos/:id
- Due dates are out of scope for the standardized Todo templates.
- Tailwind CSS is required for all official templates.
- The Todo page layout and visual structure should remain consistent across templates.
- Never commit secrets.
- Never commit generated dependency directories (for example
node_modules/). - Local testing artifacts are allowed only when ignored and untracked.
- README must include quick start steps.
- README must list service ports and basic run commands.
- README must explain env setup and API routing expectations.
.env.exampleshould include clear variable names and usable example values.- README should document the current deploy runtime and mode when the template ships with deploy support.
Template PRs should confirm all of the following:
- Template meets every requirement in
TEMPLATE.md. -
hackctl.config.jsonmatches the schema URL and structure. -
hackctl.config.jsonincludesdeploy.runtimeanddeploy.modewith the current supported official values. -
.gitignoreincludes.hackctl/. - Template includes
AGENTS.md,CLAUDE.md, andGEMINI.mdwithAGENTS.mdas source of truth. - Template includes curated
.agents/skills/*/SKILL.mdentries;*-supabasetemplates include a Supabase-focused skill. - Frontend
/apirouting and env-driven proxy behavior are in place. - Supabase templates include
supabase/migrationsand a documenteddb pushworkflow. - No secrets or generated artifacts are included in the diff.
- Template README and env examples are updated.