diff --git a/docs/maturity-and-projects.md b/docs/maturity-and-projects.md
index 3ee03d8..e0e95e4 100644
--- a/docs/maturity-and-projects.md
+++ b/docs/maturity-and-projects.md
@@ -161,9 +161,10 @@ member status `not-applied | applying | applied | stale | failed`).
### Templates
-A **project template** (`spec: project-template/v0.1`) is a project skeleton: goal, members, attribute sets and attributes that
-still need values. Instantiating a template creates a project file, records which template it came from, and shows which required
-attributes are still needed. Templates make a set of runbooks reusable as a product.
+A **project template** (`spec: project-template/v0.1`) is a project skeleton: members, attribute sets and attributes that
+still need values. Instantiating a template creates a project file with **its own name, description and goal**, records which template it
+came from, and shows which required attributes are still needed. Nothing of the template's own title, goal or description is copied into the
+project: a project is not a copy of its template, it only remembers where it came from. Templates make a set of runbooks reusable as a product.
### Modes
diff --git a/projects/trial-1/project.yaml b/projects/trial-1/project.yaml
new file mode 100644
index 0000000..5c1977a
--- /dev/null
+++ b/projects/trial-1/project.yaml
@@ -0,0 +1,30 @@
+spec: project/v0.1
+id: trial-1
+title: A watch at a lighthouse
+goal: The night watch is played through and its logbook entry is written and removed
+ again.
+attribute_sets:
+- harbour-defaults
+targets:
+ north-light:
+ title: The northern light
+ attributes:
+ weather: fog
+ south-light:
+ title: The southern light
+ attributes:
+ weather: clear
+runbooks:
+- pack: rtut.showcase-lighthouse
+ target: north-light
+- pack: rtut.example-hello
+ after:
+ - rtut.showcase-lighthouse
+environment: rehearsal
+template: lighthouse-watch
+attributes:
+ logdir:
+ requirement: optional
+ note: Scratch folder; must start with /tmp/rtut-
+ value: /tmp/rtut-trial-1
+ keeper: Dana
diff --git a/rtut/__main__.py b/rtut/__main__.py
index 281ceea..cdb59f7 100644
--- a/rtut/__main__.py
+++ b/rtut/__main__.py
@@ -78,8 +78,8 @@ def _project(a) -> int:
print(f"{tid}\ttemplate\t-\t{d.data.get('title', '')}")
return 0
if a.action == "new":
- path = J.instantiate(reg, a.name, a.extra, a.environment,
- dict(kv.split("=", 1) for kv in a.set))
+ path = J.instantiate(reg, a.name, a.extra, a.environment, dict(kv.split("=", 1) for kv in a.set),
+ title=a.title, description=a.description, goal=a.goal)
print(path); return 0
d = reg.projects.get(a.name)
if d is None:
@@ -154,6 +154,9 @@ def main(argv: list[str] | None = None) -> int:
sp.add_argument("--environment", "-e", default="")
sp.add_argument("--set", "-s", action="append", default=[], help="new: attribute=value")
sp.add_argument("--operator", "-o", default="")
+ sp.add_argument("--title", default=None, help="new: the project's own name (default: its id)")
+ sp.add_argument("--description", default="", help="new: what the project is")
+ sp.add_argument("--goal", default="", help="new: what should be true when it is done")
sp.add_argument("--target", default=None)
sp.add_argument("--mode", default="manual", choices=["manual", "auto-confirm"])
sp = sub.add_parser("score", help="how often each runbook was tried and how it went")
diff --git a/rtut/project.py b/rtut/project.py
index 3b82fb2..57c2b0f 100644
--- a/rtut/project.py
+++ b/rtut/project.py
@@ -212,8 +212,13 @@ def start_run(reg: Registry, doc: Doc, pack_id: str, operator: str, target: str
# ---- templates -----------------------------------------------------------------------------------------------
def instantiate(reg: Registry, template_id: str, project_id: str, environment: str,
- values: dict[str, str] | None = None, title: str | None = None, root: Path | None = None) -> Path:
- """Write projects/ {pill(d['environment'])} {pill(st['state'])}"
- f"{' from template ' + e(d['template']) + '' if d.get('template') else ''}
{e(d.data['description'])}" if d.data.get("description") else ""
+ prj.append(f"
{e(d['description'])}
") if d.get("goal"): - out.append(f"{e(d['goal'])}
") + out.append(f"Goal: {e(d['goal'])}
") # what is still needed needs: dict[str, list[str]] = {} for n in st["needs"]: @@ -204,6 +208,12 @@ def template_page(app, tid: str, msg: str = "") -> bytes | None: envs = "".join(f"" for x in R.ENVIRONMENTS) out.append("