|
1 | 1 | --- |
2 | 2 | name: stackctl-cli |
3 | | -description: Use this skill when helping agents answer stackctl CLI usage questions, choose source-valid stackctl commands, or avoid stale documented examples. |
| 3 | +description: Use this skill when a task involves the stackctl CLI, including managing Docker Swarm stacks, choosing source-valid commands, running operational workflows, answering usage questions, or avoiding stale documented examples. |
4 | 4 | --- |
5 | 5 |
|
6 | 6 | # stackctl CLI |
@@ -37,5 +37,28 @@ command behavior, flags, examples, or agent-facing guidance. |
37 | 37 | - Env files: `env list`, `create`, `diff`, `materialize`, `audit`. |
38 | 38 | - Shell integration: `completions`. |
39 | 39 |
|
40 | | -For full command facts, read `references/commands.md`. For source hierarchy, runtime facts, and |
41 | | -known stale docs, read `references/truth-model.md`. |
| 40 | +## Operational model |
| 41 | + |
| 42 | +stackctl manages Docker Swarm stacks through a four-stage pipeline: discover Compose files, generate |
| 43 | +canonical stack YAML, render `${VAR}` placeholders, and deploy via `docker stack deploy`. Different |
| 44 | +commands run different stages: |
| 45 | + |
| 46 | +- `up` runs all four stages in memory and deploys from a temp file. |
| 47 | +- `reload` runs all four stages, writes to disk, and deploys without teardown. |
| 48 | +- `generate` and `render` run early stages without deploying. |
| 49 | +- `sync` validates drift by comparing in-memory generation to committed files. |
| 50 | +- `plan <operation>` previews any operation without executing. |
| 51 | + |
| 52 | +## Task playbooks |
| 53 | + |
| 54 | +For task-oriented workflows (deploy, update, drift check, teardown, secrets, env scaffolding, |
| 55 | +diagnostics, previewing), read `references/playbooks.md`. It provides command chains, prerequisites, |
| 56 | +output interpretation, exit code guidance, and a decision tree mapping agent intents to commands. |
| 57 | + |
| 58 | +## References |
| 59 | + |
| 60 | +- `references/commands.md`: Full command, subcommand, option, argument, and caveat reference tables. |
| 61 | +- `references/playbooks.md`: Task-oriented operational workflows, decision tree, and exit code |
| 62 | + interpretation. |
| 63 | +- `references/truth-model.md`: Source hierarchy, runtime facts, config resolution, exit codes, and |
| 64 | + anti-hallucination controls. |
0 commit comments