zlh-grind/CONSTRAINTS.md

44 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Constraints zlh-grind
This repository is strictly for *decision tracking*, *constraints*, and *ground rules*.
It is not an implementation repo.
---
## Execution model constraints
- zlh-agent executes installer logic as **embedded scripts**.
- Embedded scripts must not rely on filesystem-relative paths (`$0`, `dirname`, etc.).
- Any shared logic must be executed in the **same shell session** as its callers.
---
## Installer contract constraints
- Installers must be:
- deterministic
- artifact-driven
- idempotent
- strict (`set -euo pipefail`)
- All runtime installers require explicit environment projection:
- `RUNTIME_VERSION` is mandatory
- artifact naming may be customized via `ARCHIVE_PREFIX`
- Installers must not parse JSON or agent state files.
---
## Responsibility boundaries
- API declares *intent* (runtime, version, container type).
- Agent translates intent into:
- environment variables
- filesystem operations
- installer execution order
- Installers perform no orchestration or decision-making.
---
## Anti-patterns (explicitly forbidden)
- Mega-installers that handle multiple runtimes via branching logic
- Package-managerbased installs (apt, nvm, pyenv, sdkman)
- Weakening installer strictness to accommodate agent bugs
---