Add layered environment model and taskfile composition rules
Fold two overlapping local skills (scripts-shell, shell-scripts-module) into this one, keeping only what it did not already cover. - Add references/environment-model.md: the three-layer .env selector model, why set -a dot-sourcing beats export $(grep|xargs), tracked samples, the no-re-sourcing rule for module readers, and the deployment boundary (repo-presence is not git-tracked is not deployed). - Extend references/taskfile.md with the one-env-driven-task rule (no :default pairs) and composing commands through the task surface. - Add the lifecycle-hook module type to references/module-patterns.md. - Keep this skill's _moduleExampleV1_ naming as canonical; the retired skills' HL_V1_ and double-underscore dialects were not carried over. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,14 @@ others.
|
||||
| Shared foundation with public commands | Yes | Optional / no | `base` |
|
||||
| Feature module | Yes | Usually yes | `kube`, `github`, `data-migration` |
|
||||
| Wrapper around an external CLI | Yes | Usually yes | `helm`, `openshift`, `github` |
|
||||
| Lifecycle hook | Yes | No | `devbox` (an `on-init-hook`) |
|
||||
|
||||
A **lifecycle hook** module is invoked by external tooling at a fixed moment — a devbox init
|
||||
hook, a container entrypoint, a git hook — rather than by an operator. It keeps `api/` because
|
||||
the tool calls that path directly, and skips `Taskfile.yml` because nobody runs it by hand.
|
||||
Its implementation commonly branches per platform (`-install-dependencies-osx.sh`,
|
||||
`-install-dependencies-linux-ubuntu.sh`), one file per branch, sourced from `--index-api.sh`
|
||||
like any other implementation file.
|
||||
|
||||
Pick the type before creating any file — it decides whether `api/` and `Taskfile.yml` exist at
|
||||
all, and adding them later means reworking every consumer that has already started sourcing
|
||||
|
||||
Reference in New Issue
Block a user