Template questions¶
The application template's questions are in stackr's copier.yml, which the copier.yml at lattice's root includes, and its files in template/ (The application template). Answer them interactively, or with --defaults and --data NAME=VALUE.
Questions¶
| Question | Type | Default | Choices | Asked when | Help |
|---|---|---|---|---|---|
project_name |
str | My App |
always | The application's name, as people read it | |
project_slug |
str | {{ project_name.strip().lower() | regex_replace('[^a-z0-9]+', '-') | trim('-') }} |
always | Its slug: the Python distribution, the OpenTelemetry service and the Compose project | |
description |
str | An application on stackr. |
always | One line about what it does | |
libraries |
str | both |
artifactr, reflexr, both |
always | The libraries it uses |
evals |
bool | yes | always | Include evaluation with evalr (an evals/ directory and a starter experiment)? | |
bridge |
bool | yes | libraries == 'both' |
Bridge them with relayr (chats and artifacts become events for rules, and rules' runs act back as proposals and notices; with an incident timeline example)? | |
tracker |
str | none |
none, plane, vikunja |
libraries == 'both' and bridge |
A task tracker for relayr (rules' runs file items there, and people's changes come back as events; with a dead-letter example)? It runs beside the stack from stackr's recipe for it, with each tenant provisioned as stackr's tracker guide says. |
ui |
bool | yes | libraries in ['artifactr', 'both'] |
Include artifactr's forms and dashboards (the agent asks people forms and shows them dashboards in its chat; what they send is checked before it commits and, with the bridge, becomes an event for rules)? | |
native_files |
bool | yes | libraries in ['artifactr', 'both'] |
Include native files (Word, Excel, PowerPoint, PDF, CAD, 3D, image and design files kept as artifacts, each read and edited by its app's pinned CLI in a worker of its own with no route out, and by people in the app's browser build)? No app runs until FILES_CRAFTS names it: make up FILES="wordcraft gridcraft". Each builds an image from its pinned release. |
|
diagrams |
bool | yes | libraries in ['artifactr', 'both'] and native_files |
Include diagrams (Excalidraw's, which the agent draws from Mermaid or shapes and renders, in a worker of its own with no route out: headless Chromium)? They keep their images with native files'. The worker runs only with DIAGRAMS=on: make up DIAGRAMS=on. Each workspace switches diagrams on as an integration, off until then. |
|
access |
str | grantr |
grantr, none |
always | Who may do what |
portal |
bool | yes | access == 'grantr' |
Include portalr (an app UI to chat with the agents and see their work, and an admin UI for access, feedback, traces and spend)? It signs people in through a Supabase project, which the application is told of in PORTAL_SUPABASE_URL and PORTAL_SUPABASE_KEY: without one it is off. It adds a Bun build and a network fetch to the image. | |
hosting |
str | none |
none, host |
always | Where it is hosted, beside stackr's recipe for it (stackr RFC-0004) |
python_version |
str | 3.12 |
3.12, 3.13, 3.14 |
always | The Python version it runs on |
app_port |
int | 8800 |
always | The port it is published on, on this machine; the next five are its mini apps' and editors' |
Copier checks each answer: the name can't be empty; the slug is lowercase letters, digits and single dashes, starting with a letter, at most 30 characters, and not one of the libraries' names (artifactr, artifactr-ai, reflexr, evalr), which its package would shadow; and the port is from 1024 to 65535.
Derived values¶
These are computed from the answers, apart from libraries_path, which scripts/check-app, CI's Template job, sets to lattice's packages/ directory so that a generated application installs the libraries from the checkout (ADR-0018). They are never asked, and not recorded in .copier-answers.yml.
| Value | Type | Derived as |
|---|---|---|
libraries_path |
str | empty |
package_name |
str | {{ project_slug | replace('-', '_') }} |
use_artifactr |
bool | {{ libraries in ['artifactr', 'both'] }} |
use_reflexr |
bool | {{ libraries in ['reflexr', 'both'] }} |
use_relayr |
bool | {{ libraries == 'both' and bridge }} |
use_tracker |
bool | {{ libraries == 'both' and bridge and tracker != 'none' }} |
use_ui |
bool | {{ libraries in ['artifactr', 'both'] and ui }} |
use_files |
bool | {{ libraries in ['artifactr', 'both'] and native_files }} |
use_diagrams |
bool | {{ use_files and diagrams }} |
use_integrations |
bool | {{ use_ui or use_files or use_tracker }} |
crafts |
yaml | {'wordcraft': {'version': '0.11.0', 'type': 'WordDocument', 'editor': 5}, 'gridcraft': {'version': '0.8.0', 'type': 'Workbook', 'editor': 2}, 'deckcraft': {'version': '0.7.0', 'type': 'Presentation', 'no_editor': 'no host bridge'}, 'pdfcraft': {'version': '0.8.0', 'type': 'PdfDocument', 'editor': 3}, 'cadcraft': {'version': '0.8.0', 'type': 'Drawing', 'editor': 4}, 'photocraft': {'version': '0.9.0', 'type': 'LayeredImage', 'no_editor': 'no host bridge'}, 'vectorcraft': {'version': '0.12.0', 'type': 'VectorImage', 'no_editor': 'no host bridge'}, 'designcraft': {'version': '0.9.0', 'type': 'PageLayout', 'no_editor': 'no host bridge'}, 'figcraft': {'version': '0.6.0', 'type': 'Design', 'no_editor': 'no host bridge'}, 'filmcraft': {'version': '0.8.0', 'type': 'VideoProject', 'no_editor': 'no host bridge'}, 'effectcraft': {'version': '0.11.1', 'type': 'MotionGraphics', 'no_editor': 'no host bridge'}, 'soundcraft': {'version': '0.8.0', 'type': 'AudioSession', 'no_editor': 'no host bridge'}, 'freecad': {'version': '1.1.4', 'type': 'CadModel', 'no_editor': 'no browser build'}, 'blender': {'version': '5.2.2', 'type': 'Scene', 'no_editor': 'no browser build', 'platform': 'linux/amd64', 'memory': 4, 'packages': ['libx11-6', 'libxi6', 'libxxf86vm1', 'libxfixes3', 'libxrender1', 'libxkbcommon0', 'libsm6', 'libice6', 'libgl1', 'libegl1', 'libegl-mesa0', 'libgl1-mesa-dri'], 'source': 'https://download.blender.org/source/blender-5.2.2.tar.xz', 'source_sha256': '56a3b1ec97479ff24dce65d2f09f8a1895005cece279b701fe4fcf74bce3f77e'}} |
use_portal |
bool | {{ access == 'grantr' and portal }} |
| Copier setting | Value |
|---|---|
_subdirectory |
template |
_min_copier_version |
9.4 |
_answers_file |
.copier-answers.yml |
The files it generates¶
A file whose name ends in .jinja in template/ is rendered with the answers; any other is copied as it is. A name with {% if ... %} in it is generated only when its condition holds, and <package> is the package's name.
| File in the application | Generated when | How |
|---|---|---|
.copier-answers.yml |
always | rendered |
.devcontainer/compose.yaml |
always | rendered |
.devcontainer/devcontainer.json |
always | rendered |
.devcontainer/initialize.sh |
always | copied |
.devcontainer/post-create.sh |
always | copied |
.dockerignore |
always | copied |
.editorconfig |
always | copied |
.env.example |
always | rendered |
.github/dependabot.yml |
always | copied |
.github/workflows/ci.yml |
always | rendered |
.gitignore |
always | copied |
.pre-commit-config.yaml |
always | copied |
.python-version |
always | rendered |
Dockerfile |
always | rendered |
Makefile |
always | rendered |
README.md |
always | rendered |
compose.yaml |
always | rendered |
pyproject.toml |
always | rendered |
src/<package>/__init__.py |
always | rendered |
src/<package>/app.py |
always | rendered |
src/<package>/auth.py |
always | rendered |
src/<package>/database.py |
always | rendered |
src/<package>/gateway.py |
always | rendered |
src/<package>/py.typed |
always | copied |
src/<package>/redaction.py |
always | rendered |
src/<package>/scores.py |
always | rendered |
src/<package>/settings.py |
always | rendered |
src/<package>/telemetry.py |
always | rendered |
src/<package>/access.py |
access == 'grantr' |
rendered |
src/<package>/admin.py |
access == 'grantr' |
rendered |
src/<package>/collaboration.py |
use_artifactr |
rendered |
src/<package>/kinds.py |
use_artifactr |
rendered |
src/<package>/notes.py |
use_artifactr |
rendered |
src/<package>/files.py |
use_files |
rendered |
src/<package>/editor.py |
use_files and use_portal |
rendered |
src/<package>/portal.py |
use_portal |
rendered |
src/<package>/automation.py |
use_reflexr |
rendered |
src/<package>/tickets.py |
use_reflexr |
rendered |
src/<package>/bridge.py |
use_relayr |
rendered |
src/<package>/chat_rules.py |
use_relayr |
rendered |
src/<package>/incidents.py |
use_relayr |
rendered |
src/<package>/tracking.py |
use_tracker |
rendered |
stackr.env |
always | copied |
tests/conftest.py |
always | rendered |
tests/test_app.py |
always | rendered |
tests/test_auth.py |
always | rendered |
tests/test_redaction.py |
always | rendered |
tests/test_scores.py |
always | rendered |
tests/test_settings.py |
always | rendered |
tests/test_access.py |
access == 'grantr' |
rendered |
tests/test_admin.py |
access == 'grantr' |
rendered |
tests/test_evals.py |
evals |
rendered |
tests/test_collaboration.py |
use_artifactr |
rendered |
tests/test_kinds.py |
use_artifactr |
rendered |
tests/test_models.py |
use_artifactr |
rendered |
tests/test_diagrams.py |
use_diagrams |
rendered |
tests/test_files.py |
use_files |
rendered |
tests/test_portal.py |
use_portal |
rendered |
tests/test_automation.py |
use_reflexr |
rendered |
tests/test_bridge.py |
use_relayr |
rendered |
tests/test_chat_rules.py |
use_relayr |
rendered |
tests/test_tracking.py |
use_tracker |
rendered |
access.md |
access == 'grantr' |
rendered |
evals/__init__.py |
evals |
copied |
evals/__main__.py |
evals |
copied |
evals/experiments.py |
evals |
rendered |
deploy/host/compose.prod.yaml |
hosting == 'host' |
rendered |
scripts/craft |
use_files |
copied |
scripts/crafts/blender.sha256 |
use_files |
copied |
scripts/crafts/cadcraft.sha256 |
use_files |
copied |
scripts/crafts/deckcraft.sha256 |
use_files |
copied |
scripts/crafts/designcraft.sha256 |
use_files |
copied |
scripts/crafts/effectcraft.sha256 |
use_files |
copied |
scripts/crafts/figcraft.sha256 |
use_files |
copied |
scripts/crafts/filmcraft.sha256 |
use_files |
copied |
scripts/crafts/freecad.sha256 |
use_files |
copied |
scripts/crafts/gridcraft.sha256 |
use_files |
copied |
scripts/crafts/pdfcraft.sha256 |
use_files |
copied |
scripts/crafts/photocraft.sha256 |
use_files |
copied |
scripts/crafts/soundcraft.sha256 |
use_files |
copied |
scripts/crafts/vectorcraft.sha256 |
use_files |
copied |
scripts/crafts/wordcraft.sha256 |
use_files |
copied |
scripts/build-diagrams-worker.sh |
use_diagrams and use_files |
copied |
brand/README.md |
use_portal |
copied |
scripts/build-portal-ui.sh |
use_portal |
copied |
scripts/tailnet.sh |
use_portal |
copied |
The file¶
The whole file: copier.yml
# The application template (RFC-0001 phase 5, ADR-0011): a new application on artifactr,
# reflexr or both, wired to the stack's ports.
#
# uvx copier copy gh:alexnodeland/lattice my-app # from GitHub
# uvx copier copy path/to/lattice my-app # from a clone
# uvx copier update # later, in the application
#
# Copier takes the latest tag that parses as a version. lattice's tags carry their package's
# name (stackr-v0.1.0), and none parses, so Copier warns that it found no release and takes
# HEAD instead: main's, from GitHub. `--vcs-ref` names another revision.
#
# The template's files are in template/. Copier takes a repository, not a directory of one,
# so lattice's root copier.yml includes these questions and points Copier at template/.
_subdirectory: template
_min_copier_version: "9.4"
_answers_file: .copier-answers.yml
project_name:
type: str
help: The application's name, as people read it
default: My App
validator: >-
{% if not project_name.strip() %}The name can't be empty{% endif %}
project_slug:
type: str
help: >-
Its slug: the Python distribution, the OpenTelemetry service and the Compose project
default: >-
{{ project_name.strip().lower() | regex_replace('[^a-z0-9]+', '-') | trim('-') }}
validator: >-
{% if not (project_slug | regex_search('^[a-z][a-z0-9]*(-[a-z0-9]+)*$')) %}
Lowercase letters, digits and single dashes, starting with a letter
{% elif project_slug | length > 30 %}
At most 30 characters
{% elif project_slug in ['artifactr', 'artifactr-ai', 'reflexr', 'evalr'] %}
One of the libraries' names
{% endif %}
description:
type: str
help: One line about what it does
default: An application on stackr.
libraries:
type: str
help: The libraries it uses
choices:
artifactr (people and agents edit shared artifacts): artifactr
reflexr (rules over event streams run agents): reflexr
both, mounted side by side on one database: both
default: both
evals:
type: bool
help: Include evaluation with evalr (an evals/ directory and a starter experiment)?
default: true
bridge:
type: bool
help: >-
Bridge them with relayr (chats and artifacts become events for rules, and rules' runs act
back as proposals and notices; with an incident timeline example)?
default: true
when: "{{ libraries == 'both' }}"
tracker:
type: str
help: >-
A task tracker for relayr (rules' runs file items there, and people's changes come back as
events; with a dead-letter example)? It runs beside the stack from stackr's recipe for it,
with each tenant provisioned as stackr's tracker guide says.
choices:
none: none
plane (Plane's Community edition): plane
vikunja: vikunja
default: none
when: "{{ libraries == 'both' and bridge }}"
ui:
type: bool
help: >-
Include artifactr's forms and dashboards (the agent asks people forms and shows them dashboards
in its chat; what they send is checked before it commits and, with the bridge, becomes an
event for rules)?
default: true
when: "{{ libraries in ['artifactr', 'both'] }}"
native_files:
type: bool
help: >-
Include native files (Word, Excel, PowerPoint, PDF, CAD, 3D, image and design files kept as
artifacts, each read and edited by its app's pinned CLI in a worker of its own with no route
out, and by people in the app's browser build)? No app runs until FILES_CRAFTS names it:
`make up FILES="wordcraft gridcraft"`. Each builds an image from its pinned release.
default: true
when: "{{ libraries in ['artifactr', 'both'] }}"
diagrams:
type: bool
help: >-
Include diagrams (Excalidraw's, which the agent draws from Mermaid or shapes and renders, in a
worker of its own with no route out: headless Chromium)? They keep their images with native
files'. The worker runs only with DIAGRAMS=on: `make up DIAGRAMS=on`. Each workspace switches
diagrams on as an integration, off until then.
default: true
when: "{{ libraries in ['artifactr', 'both'] and native_files }}"
access:
type: str
help: Who may do what
choices:
grantr (tenants, members, roles and keys; the request names its tenant): grantr
none (any user of a tenant, named in their token, may do anything in it): none
default: grantr
portal:
type: bool
help: >-
Include portalr (an app UI to chat with the agents and see their work, and an admin UI for
access, feedback, traces and spend)? It signs people in through a Supabase project, which the
application is told of in PORTAL_SUPABASE_URL and PORTAL_SUPABASE_KEY: without one it is off.
It adds a Bun build and a network fetch to the image.
default: true
when: "{{ access == 'grantr' }}"
hosting:
type: str
help: Where it is hosted, beside stackr's recipe for it (stackr RFC-0004)
choices:
none (beside the stack on this machine only): none
host (a single host, behind stackr's edge): host
default: none
python_version:
type: str
help: The Python version it runs on
choices: ["3.12", "3.13", "3.14"]
default: "3.12"
app_port:
type: int
help: The port it is published on, on this machine; the next five are its mini apps' and editors'
default: 8800
validator: >-
{% if app_port < 1024 or app_port > 65530 %}Choose a port from 1024 to 65530: the next five are the
mini apps' (APPS_PORT) and native files' editors' (GRIDCRAFT_EDITOR_PORT, PDFCRAFT_EDITOR_PORT,
CADCRAFT_EDITOR_PORT, WORDCRAFT_EDITOR_PORT){% endif %}
# Never asked, and not recorded in the answers. The application installs the libraries from
# lattice at the commit the template is rendered from (ADR-0018), so `copier update` moves them
# with the template's code. libraries_path, a path to lattice's packages/, installs them from a
# checkout instead: scripts/check-app sets it, to check a library's change with the template's.
# The rest are derived from the answers.
libraries_path:
type: str
default: ""
when: false
package_name:
type: str
default: "{{ project_slug | replace('-', '_') }}"
when: false
use_artifactr:
type: bool
default: "{{ libraries in ['artifactr', 'both'] }}"
when: false
use_reflexr:
type: bool
default: "{{ libraries in ['reflexr', 'both'] }}"
when: false
use_relayr:
type: bool
default: "{{ libraries == 'both' and bridge }}"
when: false
use_tracker:
type: bool
default: "{{ libraries == 'both' and bridge and tracker != 'none' }}"
when: false
use_ui:
type: bool
default: "{{ libraries in ['artifactr', 'both'] and ui }}"
when: false
use_files:
type: bool
default: "{{ libraries in ['artifactr', 'both'] and native_files }}"
when: false
# Whether the application has diagrams, which keep their images in native files' store.
use_diagrams:
type: bool
default: "{{ use_files and diagrams }}"
when: false
# Whether the application asks lattice-core's port of integrations itself: forms and dashboards,
# native files' apps, or a tracker, are switched per workspace.
use_integrations:
type: bool
default: "{{ use_ui or use_files or use_tracker }}"
when: false
# The apps a worker runs (lattice RFC-0003): each one's release, as lattice's scripts/crafts pins
# it, which scripts/check-template holds this to; its native type; and, for an app whose browser
# build hands a file over, its editor's port: app_port and this; or else, no_editor, why it has
# none: "no browser build", or "no host bridge", a build with no `?host=parent` bridge to open a
# file in and hand its saves back (native files ADR-0010), which EffectCraft's and FilmCraft's
# JavaScript APIs don't either; scripts/check-template holds both to artifactr's registry. An app
# whose release is built for one platform names it; one whose CLI needs more address space than a
# worker's default 2 GiB names the GiB; one whose release links system libraries names their
# packages; and one whose licence asks for its source to be offered names where it is.
crafts:
type: yaml
default:
wordcraft: {version: "0.11.0", type: WordDocument, editor: 5}
gridcraft: {version: "0.8.0", type: Workbook, editor: 2}
deckcraft: {version: "0.7.0", type: Presentation, no_editor: "no host bridge"}
pdfcraft: {version: "0.8.0", type: PdfDocument, editor: 3}
cadcraft: {version: "0.8.0", type: Drawing, editor: 4}
photocraft: {version: "0.9.0", type: LayeredImage, no_editor: "no host bridge"}
vectorcraft: {version: "0.12.0", type: VectorImage, no_editor: "no host bridge"}
designcraft: {version: "0.9.0", type: PageLayout, no_editor: "no host bridge"}
figcraft: {version: "0.6.0", type: Design, no_editor: "no host bridge"}
filmcraft: {version: "0.8.0", type: VideoProject, no_editor: "no host bridge"}
effectcraft: {version: "0.11.1", type: MotionGraphics, no_editor: "no host bridge"}
soundcraft: {version: "0.8.0", type: AudioSession, no_editor: "no host bridge"}
freecad: {version: "1.1.4", type: CadModel, no_editor: "no browser build"}
blender:
version: "5.2.2"
type: Scene
no_editor: "no browser build"
platform: linux/amd64
memory: 4
# The X11 and GL libraries its tarball links, and Mesa, which draws its pages with no GPU.
packages:
[libx11-6, libxi6, libxxf86vm1, libxfixes3, libxrender1, libxkbcommon0, libsm6, libice6,
libgl1, libegl1, libegl-mesa0, libgl1-mesa-dri]
# GPL-3.0: its source, offered with it.
source: https://download.blender.org/source/blender-5.2.2.tar.xz
# Its SHA-256, which download.blender.org doesn't publish (its MD5 is 8fcb4420...): taken
# from the tarball on 2026-10-22, and named in the offer.
source_sha256: 56a3b1ec97479ff24dce65d2f09f8a1895005cece279b701fe4fcf74bce3f77e
when: false
use_portal:
type: bool
default: "{{ access == 'grantr' and portal }}"
when: false