Reproducible environments and contributor commands¶
Prefer established command-line tools for the job: git for local Git work,
gh for GitHub, and glab for GitLab when available and authenticated as the
intended account. Use a connector or another authorized interface when it fits
available access. Working from the command line is a preference, not permission
to force credentials, change accounts, or bypass missing access.
Repository convention¶
Every repository maintains Docker setup for a reproducible development and, where applicable, runtime environment. Keep environment definitions in the repository: pinned base images and tool versions, dependency locks, and documented build targets. Docker defines the environment; Task defines project commands. Every repository with a development/tooling image, including documentation-only repositories, must publish that image. The development-container configuration must reference the published image by digest rather than installing a second, independently maintained toolchain. Until a repository publishes its image, CI uses the documented fallback environment, and the workflow names the issue that tracks publishing it.
A repository with a demo or quickstart must give a single docker run against
a released image that needs no install or build. The README keeps the manual
setup, including exact runtime versions.
Published images must be multi-arch, at least linux/amd64 and linux/arm64. An
image that is not must say why in its release notes and README, and link the
open issue that tracks adding the missing platforms. Version tags are immutable:
never re-tag or overwrite one. The release job must check that the tag is absent
before pushing (for example, docker buildx imagetools inspect IMAGE:TAG must
fail) and must not push latest or any moving tag. User-facing docs and demos
must reference the version tag, so Docker selects the host platform. Locks, CI
and development containers must pin the multi-arch index digest, not a
per-platform manifest digest.
Renovate keeps pins current: images, Actions, and tool versions. Each repository must require status checks that exercise real behaviour, not only lint, on its branch ruleset, and those checks must be strong enough that a green run shows the update is safe. The shared dependency policy automerges updates, including majors, under GitHub's configured merge rules, using a merge queue where required. Required status checks still gate the merge.
Documentation-only repositories need a tooling environment for linting, links, and tests, published as above. They do not need an invented application runtime or release image. For applications, keep a lean release target separate from the development target: share necessary base/build stages and locks, then copy only required outputs and runtime dependencies into the release image. Keep editors, test dependencies, and build tools in the development target unless execution actually needs them.
Use Compose for services, mounts, working directories, and local orchestration when needed. Keep source and dependency-volume ownership explicit so host and container runs do not leave unusable files. A development container attaches to that prepared environment; it is not a reason to require a nested Docker daemon.
Host entry points and commands inside the environment¶
Keep detailed ecosystem commands in one Taskfile. The existing language templates run directly inside a prepared environment, including a development container. A host Taskfile may delegate to Compose, which runs that same Taskfile in the repository tooling service. Do not have an inner task call the host wrapper again.
For this optional two-file layout, copy a language template to
Taskfile.runtime.yml and the host
wrapper to Taskfile.yml. Here, runtime
means the environment executing the tasks, not a production application. Supply
a Compose service named tooling that builds the development target, mounts
the checkout, sets its working directory to the project root, and provides Task
plus the language tools. These names are example choices.
| Execution context | Setup | Verification |
|---|---|---|
| Host with Docker and Compose | task setup |
task verify |
| Prepared environment | See commands below | See commands below |
Inside the prepared environment or development container:
task -t Taskfile.runtime.yml setup
task -t Taskfile.runtime.yml verify
The host wrapper runs disposable Compose containers; persistent dependency
volumes or the mounted checkout must retain setup results between commands.
Inside the prepared environment, invoke the detailed Taskfile or its native
commands directly. Do not assume Docker-in-Docker, a mounted Docker socket, or
privileged execution. If a project needs image builds from inside a container,
document and verify that separate capability explicitly. With a single direct
Taskfile, use the ordinary task setup and task verify commands in the
prepared environment instead.
Continuous integration jobs must run inside the published development image,
pinned by its multi-arch index digest (GitHub Actions container:), and use the
same detailed tasks, with provider configuration limited to orchestration. A job
that runs outside the image documents why in the workflow.
Shared Actions or reusable workflows still handle standard services such as
releases. Test the release image separately when one exists; passing
tooling-image checks does not establish that the shipped image runs correctly.
Bootstrap once, delegate project setup¶
The shared Docker-first host provides Docker, Compose, Buildx, Task, Git, and provider command-line clients. Repository containers supply the language runtime, package manager, and native build tools. A directly prepared environment still needs those project tools, but they are not common host requirements. Environments own PATH setup; do not assume shell profiles load in continuous integration.
Use the official Task installation guide. This repository uses Task 3.54.0 and Node 24 (at least 24.10.0), with npm. For an environment already providing npm, a pinned installation is:
npm install --prefix /your/writable/tool-directory @go-task/cli@3.54.0
Add that directory's node_modules/.bin to PATH using the environment's native
mechanism. On Windows, choose a writable Windows path. Verify task --version.
This is environment bootstrap, not a task that tries to install itself.
Then use the same project interface locally and in continuous integration:
| Command | Responsibility |
|---|---|
task setup |
Sync project tools/dependencies from committed locks |
task check |
Run native static checks without rewriting files |
task test |
Run the native test runner |
task verify |
Run check and test in sequence |
Setup should be safe to repeat: npm's clean install recreates node_modules;
uv's locked sync reconciles the project environment. Neither should rewrite the
lock as a side effect. A lock mismatch fails; update dependencies deliberately
with the native package manager and commit the resulting lock through a pull
request. Do not hide secrets, system installation, or security-setting changes
in setup.
Start with the language template¶
Select a published version tag of this repository, then copy the relevant Apache-2.0 Taskfile from that version into the consuming repository. Record the source tag, retain its license notice, and adapt its native commands. These are small starting points, not remote Taskfile dependencies or complete application scaffolds.
- Node/TypeScript Taskfile: provide
package.jsonandpackage-lock.json. Pin project tools in dev dependencies. Definecheckandtestnpm scripts using existing command-line tools. For TypeScript,checkcan invoke the lockedtsc --noEmit; tests should use the project's actual runner. The template'snpm cipermits package lifecycle scripts, which some native dependencies need. Use--ignore-scriptswhen the project supports it, as this repository does. - Python Taskfile: provide
pyproject.tomlanduv.lockwith Ruff and pytest in the default development group. The environment supplies uv and the Python version required by the project. Setup usesuv sync --locked; check/test use the installed tools without resyncing. Interpreter downloads are disabled so missing bootstrap tools fail explicitly rather than silently changing the environment.
For a new language, retain the same command names and delegate to its package manager, formatter/linter, and test runner. Add a template when a real repository needs it; do not reimplement those tools in Task or build a speculative matrix. See npm clean installs and uv locking/syncing.
Portability and continuous integration¶
Task's schema v3 provides the
common interface. Its embedded
shell does not make arbitrary
commands portable. Prefer native cross-platform command-line tools, Task
dir/env, and separate command entries. Avoid shell activation scripts,
Unix-only utilities, and operating-system-specific path separators in common
tasks. When an operating-system-specific command is needed, mark its
platforms and document the supported systems. Native dependencies can still
require platform-specific bootstrap tools.
Continuous integration must run inside the repository development/tooling image, pinned by its multi-arch index digest, and invoke the same setup and verification tasks. A runner that cannot use that image must document the reason and its equivalent prepared environment in the workflow, and verify the supported differences. Pinned shared Actions/reusable workflows continue to provide standard services such as releases. Do not add a parallel release engine to Task.
The initial templates and this repository's tasks were executed on Linux. Windows and macOS are intended targets, not verified by that run; test them when a consuming project claims support. Lockfiles may include platform-specific packages even when the Taskfile commands are identical.
Hosted development environments and verification limits¶
Provider configuration belongs with that provider's guidance. See GitHub Codespaces and GitLab Workspaces for their different configuration models. Sharing Docker definitions does not make the services interchangeable.
This repository now provides a tooling image and an optional shared host recipe. See its verification limits before claiming hosted provider support. No GitLab workspace adoption is included.
Tool help and generated reference¶
Follow tool-first usability: help and errors should teach the next useful action while preserving validation. The generated documentation fixture combines actual Click definitions, Task information, conceptual guides, and software test coverage in an HTML artifact. Its containerized Task commands and GitHub pipeline are optional starting points; they do not enable a public documentation site.
Observable behavior and feature coverage¶
Executable behavior-driven development (BDD) feature scenarios document observable behavior: setup, user action, and expected outcome. Adopt them incrementally for changed features where they help describe and verify the user contract; this does not require retrofitting every feature before a small change can proceed. Keep scenarios in the consuming project's existing test architecture and run them through Task and continuous integration. They should also guide an independent reviewer's manual exploration of the installed product. Do not encode private implementation details or create a second test framework solely for reporting.
Give features and scenarios stable names or identifiers. Link changed behavior to its scenarios and report each scenario's passed, failed, skipped, or untested status with the revision and CI run. Feature/scenario coverage is a traceable inventory of specified behavior and its execution, distinct from line coverage. State the inventory's scope and gaps; if reporting a percentage, name the denominator. Passing every listed scenario does not prove all behavior is covered.
Reusable, simple worlds¶
Prefer reusing an existing, small, granular versioned world across multiple capability scenarios when its geometry and conditions satisfy their requirements. Create a different world only when a scenario genuinely requires different geometry or conditions, and document why.
Express scenario-specific traversal, start, and destination choices separately from shared geometry by referencing neutral, declared world places rather than duplicating coordinates or building a universal scene language. For example, left-corner and right-corner scenarios can traverse the same corner world in opposite directions, with their verification manifests selecting the same immutable world identity, version, and digest once supported.
Reusing one simple world also reduces physical fixture construction: a single physical fixture built to match the simulated world can serve multiple scenarios. However, simulation does not certify physical behavior, and directional or sensor asymmetries on a robot can produce different outcomes between forward and reverse traversals.
Preserve released world content and historical run provenance: never edit existing released world directories in place. Note that the current world contract and world authoring instructions fix entrance, exit, and forward route roles, so reverse traversal is proposed guidance rather than delivered behavior. Implementation is tracked separately in worlds #24, left scenario #62, right scenario #63, and manifest proof #103.
Definition of done¶
For the development and release paths above, record evidence for each applicable item before calling the work complete:
- Docker setup and the development container reuse the intended tooling; direct Task commands work inside the prepared environment without a host-wrapper loop.
- Published images are multi-arch (amd64 and arm64) or link the tracking issue; version tags are never re-pushed; docs use the tag and locks/CI/devcontainers pin the index digest.
- Continuous integration runs those tasks inside the published image pinned by its multi-arch index digest, or the workflow documents why not, including the fallback and its tracking issue for repositories without a published image. An application release image is tested separately; documentation-only work verifies its tools.
- A demo or quickstart runs with a single
docker runagainst a released image; the README states exact runtime versions for manual setup. - The branch ruleset requires status checks that exercise real behaviour, strong enough that a green Renovate update is shown safe.
- Tests produce individual machine-readable results, such as JUnit XML. Publish them to the provider's check/test interface where supported, with identifiable passed, failed, and skipped cases and failure details. Uploading a report file alone is storage, not ingestion into that interface; verify the rendered cases.
- Link the run and its test/check view from the change's verification summary. Include counts and report/artifact links in the run summary. Retain the raw machine-readable reports with a documented retention period sufficient for review and diagnosis, within existing provider limits. Never include secrets.
- Where executable scenarios apply, link their inventory and visible CI results, including gaps and skipped scenarios, separately from line coverage. When independently reviewing installed behavior, link the review evidence; neither source tests nor coverage percentages replace that evidence.
- Generate reports and attempt summary publication, ingestion, and artifact upload even when tests fail. Keep the original failing test exit status and release gate: publisher success must never turn failed tests into passing verification. Missing, malformed, or incomplete reports and publishing failures are explicit completeness failures, not zero-test successes. Abrupt runner termination may prevent uploads; report that limit and retain available logs.
- Verify reporting with a passing run and a deliberately failing test in a safe test fixture. Confirm individual failures remain visible and the overall check still fails. Record unsupported provider features or restricted-fork publishing as explicit gaps, with the available summary and artifact evidence.
See GitHub reporting and GitLab reporting for ingestion and permissions. Historical trend aggregation is a separate capability requiring stable test identities and retained history; do not infer it from a successful single-run upload or claim it without verifying the chosen service.
The shared-host verification workflow adopts report publication for its own checks. Other consumers must verify their publishers separately; console output alone does not satisfy this requirement.
Documentation home · Docs: v9.15.0 · Version and source · Help / report an issue · License