- task-discipline: require explicit target platform/language before implementation - go-api: bounded context deadline on every outbound network/DB call - controls-selection: visible busy state for any control triggering such a call - import-export: enumerate real format variants before writing a parser - app-binary: embedded assets do not hot-reload; verify rebuild before diagnosing Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Application Binary Pattern Notes
This file keeps examples and rollout snippets. The normative rules live in contract.md.
Host Layout
Default application root:
/appdata/<appname>/
Example:
scp bin/myservice user@host:/appdata/myservice/myservice
scp docker-compose.yml user@host:/appdata/myservice/docker-compose.yml
ssh user@host "mkdir -p /appdata/myservice"
ssh user@host "cd /appdata/myservice && docker compose up -d"
Embedded Resources
Typical embedded assets:
- HTML templates
- static JS/CSS/icons
config.template.yaml- DB migrations
Config Template Example
# <appname> configuration
# Generated on first run. Edit as needed.
server:
port: 8080
database:
host: localhost
port: 5432
user: ""
password: ""
dbname: ""
First-Run Behavior
Start
-> config missing
-> create directory
-> write template
-> print config path
-> exit 0
Expected message:
Config created: ~/.config/<appname>/config.yaml
Edit the file and restart the application.
Build Examples
Without CGO:
CGO_ENABLED=0 go build -ldflags="-s -w" -o bin/<appname> ./cmd/<appname>
With CGO where required:
CGO_ENABLED=1 go build -ldflags="-s -w" -o bin/<appname> ./cmd/<appname>