| name | add-service |
| description | Guided checklist for safely adding a new platform service to AIXCL, preserving all invariants |
| compatibility | OpenCode, Claude Code |
| metadata | {"category":"platform","version":"1.1"} |
Skill: add-service
Purpose
Add a new operational service to the AIXCL platform stack, walking through
every required change in the correct order and flagging invariant risks.
When to Run
When a new operational service (monitoring, logging, automation, UI) is
being added to the stack.
Pre-Flight Checks
Before starting, confirm:
Step 1 -- Define the Service in docker-compose.yml
Add a service entry to services/docker-compose.yml.
Required fields:
<service-name>:
image: <registry>/<image>:<pinned-version>
container_name: <service-name>
network_mode: host
restart: unless-stopped
volumes:
- <named-volume>:/data
Rules:
Validate:
docker compose -f services/docker-compose.yml config > /dev/null
yamllint -c .yamllint.yml services/docker-compose.yml
Step 2 -- Add a Named Volume
Add the named volume to the volumes: section at the bottom of docker-compose.yml:
volumes:
<service-volume-name>:
Naming convention: aixcl-<service-name>-<purpose> (e.g., aixcl-grafana-data)
Step 3 -- Register in the Correct Profile(s)
Edit config/profiles/<profile>.env to add the service name to the active
service list for each profile that should include it.
Profile decision guide:
Step 4 -- Update Profile Documentation
Edit docs/architecture/governance/02_profiles.md to list the new service
under the correct profile's "Includes" section.
Step 5 -- Write a Service Contract (if significant)
For services that other services depend on, add a service contract:
- Runtime services:
docs/architecture/governance/service_contracts/runtime/<service>.md
- Build/operational services:
docs/architecture/governance/service_contracts/bld/<service>.md
Contract template:
# Service Contract: <service-name>
## Provides
- <what other services can depend on>
## Requires
- <what this service depends on>
## Invariants
- <things that must always be true about this service>
Step 6 -- Write or Mount an Entrypoint Script (if needed)
If the service needs custom startup logic:
- Create
scripts/runtime/<service>-entrypoint.sh
- Add
set -euo pipefail at the top
- Mount it read-only in the compose service:
volumes:
- ../scripts/runtime/<service>-entrypoint.sh:/<service>-entrypoint.sh:ro
entrypoint: ["/<service>-entrypoint.sh"]
Step 7 -- Run Validation
docker compose -f services/docker-compose.yml config > /dev/null
yamllint -c .yamllint.yml services/docker-compose.yml
bash scripts/checks/check-paths.sh
./scripts/checks/check-ai-elisions.sh --staged
Step 8 -- Commit and PR
git add services/docker-compose.yml config/profiles/ docs/ scripts/runtime/
git commit -m "feat: add <service-name> service
- Add compose service definition with host networking
- Register in <profile> profile
- Add entrypoint script
- Update profile documentation
Fixes #<issue-number>"
PR checklist:
Invariant Reminder
You MUST NOT:
- Use
latest image tags
- Use
network_mode: bridge or custom Docker networks
- Create a dependency from Ollama, OpenCode, or Postgres on the new service
- Skip profile registration (the CLI will not start the service without it)