<< All versions

Skill v1.0.0

LLM-judged scan90/100
nuetzliches/devstack/devstack-config
──Details
PublishedOctober 21, 2026 at 01:31 PM
Content Hashsha256:a7d79e52f3ba0584...
Git SHAf4102d181585
──Files
Files (1 file, 7.1 KB)
SKILL.md7.1 KBactive
SKILL.md · 113 lines · 7.1 KB

version: "1.0.0" name: devstack-config description: "Edits this repository's devstack stack file ({{devstack:stack_file}}): adding or changing a service, a Compose group, a command or a group; watch paths, health checks, background workers, promotion holds, environment from Compose, placeholders. Validates every change with devstack check and knows that a running daemon does not reload the file. Use it whenever {{devstack:stack_file}} is created or touched, e.g. \"add the worker to devstack\", \"devstack should restart X when Y changes\", \"add a seed command\", \"the service needs variable Z\", \"why does the candidate not switch\", \"set up devstack for this repo\". For running the stack, use the skill devstack."


<!-- {{devstack:marker}} -->

devstack-config: change the stack file

The reference for every key is [docs/stack-file.md]({{devstack:docs_url}}/stack-file.md) (this skill names the rules that are easy to get wrong; the reference has the details). A complete example: examples/devstack.toml.

Workflow

  1. Read the current {{devstack:stack_file}} and, for the part you change, the

matching section of the reference.

  1. Change the file. Keep its order and comment style; say why in a comment

when a value is not obvious (a timeout, an ignored variable, a hold).

  1. devstack check (and devstack check --compose when a Compose group, a

compose = {…} reference or an env file changed). Fix until it is clean; it reports every problem at once.

  1. If you used a key newer than [stack] requires, raise requires.
  2. A running daemon does not reload the file. Tell the user it applies with

devstack down + devstack up, and ask before restarting a stack others may be using. devstack status shows "the stack file changed" until then.

  1. After the restart, verify the change itself (devstack status, the service's

log, the health URL), not only that the stack came up.

devstack schema prints the JSON Schema of the file for editors. A repository without a stack file starts from devstack init (a draft with TODOs).

Rules that are easy to get wrong

  • Unknown keys are errors. No key is ignored silently; read the error, do

not work around it.

  • `watch` vs `restart_on`. Built services (build + run) get watch: a

change becomes a candidate that replaces the running instance once healthy. Dev servers (kind = "devserver") reload themselves and get restart_on only for files their hot reload ignores (tsconfig.json, angular.json). A pattern that names only file types (src/**/*.cs) misses a folder that is moved into place; src/Api/** sees it.

  • Health should mean ready. devstack switches traffic to a candidate when

health answers 2xx. Point it at a readiness endpoint that checks what the service needs (its database), not at a bare liveness probe; the timeout covers a cold start.

  • Background workers run once. While a candidate starts beside the main

instance, only one of them may run schedulers and queue consumers: put their switches into [services.<name>.workers] env = { X = "{is_main}" }, not into env.

  • Lanes have their own containers. A worktree runs as a lane with its

ports moved ([lanes] port_step) and its own Compose project, so its database is its own and needs no {lane_suffix}; services that hold nothing per lane (a telemetry dashboard, a fake SMTP server) can stay shared: [compose.<group>] shared = ["mailbox"]. A dev server's run needs {port} to run in a lane.

  • A lane's worktree has no `node_modules`: the lane runs from a copy,

where prepare installs. When git hooks need it (npx eslint in a pre-commit hook), prepare.link = ["web/node_modules"] links it into the worktree; .gitignore then needs node_modules without a trailing slash.

  • Lanes on other machines (devstack up --on <node>) run in a Linux

container: [lanes] image (a toolchain image) or [lanes] dockerfile. Files git ignores do not go there unless [lanes] sync names them (a dev certificate); prepare installs what the copy lacks (npm ci). [lanes] share says whom such a lane is shared with by default.

  • A purpose gets a profile, not a second stack file (ADR-0041).

[profiles.<name>] changes how the stack runs for an acceptance run or a light review: workers, data = "fresh", env with the tree's addresses, autostart, per service kind = "static" with build and output, and the suite as command. Each profile is checked as the stack it makes; add requires = "0.11.0" to [stack].

  • Hot reload is opt-in per session. [services.<name>.hot_reload] with

the watcher's run (dotnet watch run --non-interactive) only makes devstack hot-reload <name> on possible; the service still builds by default. Built services only.

  • Schema changes wait. Paths that mean "this build needs a migration" go

into promote = { hold_if_changed = [...] }; such a candidate waits for devstack promote instead of switching.

  • Environment from Compose. compose = { group, service } gives the native

process the container's environment with host names rewritten (rewrite_hosts). When the Compose service describes a deployment rather than this dev process, use inherit = false with an ignore list: then devstack check --compose reports every new variable of the deployment the stack file does not handle.

  • Ports. port is the fixed port users and other services see. Behind the

proxy the process listens on {port} (an internal one), so its listen address must come from {port}, never from the fixed number.

  • Container links in the dashboard default to http://localhost:<port> per

published port; set urls = { <service> = "https://localhost:9443/ui" } (or "" for none) in the Compose group where that is wrong.

  • Paths are relative to the repository root; use {repo} where a process

needs an absolute one. Generated directories (bin, obj, node_modules, target, .git, .devstack) never count as changes. Compose files, env files and [lanes] dockerfile must stay inside the repository (no absolute path, no ..).

  • Placeholders only where they have a value: {port} needs port,

{artifact} needs build; build and output know only {repo} and ${VAR}; cwd and prepare take none. devstack check names each.

  • Jobs end: a kind = "job" counts as failed after 30 minutes unless it

sets timeout = "…"; give a long seed or migration one.

  • Commands with side effects (deleting data, resetting state) get a

confirm text. Steps run in order; one action per step.

  • Secrets do not belong in the stack file. Use ${VAR} and an env file that

is not committed (stack.env_files), with a committed .env.example beside it.

When the stack file is not enough

If devstack lacks something this repository needs (a key, a placeholder, a behaviour), do not bend the file around it: ask the user for permission to open an issue in nuetzliches/devstack (see the skill devstack, section 7, and keep the project's names out of it).

All versionsv1.0.1 →