Templates
New work is a copy, not a blank page. A template is the set of files a new
workspace starts from: an entry file, stage contracts, shared reference, and
{…} prompts where your own facts go. Templates are free, and every one is
read by a person before it is listed.
A template is instructions that agents will follow, so it is treated like a dependency:
- Every version is immutable and pinned. A version's digest covers its metadata and every byte of every file. A workspace records exactly which template, version and digest it was copied from.
- Nothing is listed unread. The curated catalog changes only through a reviewed change to MemoryRelay itself; a community template is listed only after the operator has read it.
- Copies are copies. A workspace keeps its files even if the template it came from is later delisted.
Browse the marketplace
In the app, open Library → Templates. Templates are grouped by shape (pipeline, umbrella, record library, knowledge bundle, context map, system map) and can be filtered by tag or searched. Each template's page shows its description, where it came from, and every file as written, so you can read what your agents will follow before you use it.
Every shape has a default: the generic starter from ICM Architect (MIT). Other templates are built from real workspaces, for example Embedded C++ library, an umbrella of fix, feature and release pipelines for a C++ library that ships to microcontrollers.
Start a workspace from a template
Choose Use this template, or pick one on the New workspace page: every
template is listed up front, with a search and the shapes as a filter; the six
generic starters appear as Blank pipeline, umbrella and so on. For a Git
workspace, templates that fit the repository you type come first ("Suggested
for owner/name"). For a workspace edited here, the files are copied into your
draft: fill in the {…} prompts, check the draft, and publish it as v1.
Two values are filled in when a template is copied:
| In the template | Becomes |
|---|---|
{{workspace_name}} | the workspace's name |
{{repository}} | the repository (owner/name), or "this repository" when there is none |
Single-brace text such as {Your release checklist} is left as written: it is
a prompt for you.
Make a repository ICM-ready
For a Git workspace whose folder is not ready
yet, Make it ICM-ready lists templates suggested for this repository
first, whether you adopt the repository (the template supplies the pipelines,
beside the instruction files the repository already has) or start from a
template in a folder. MemoryRelay lists the names of the files at the repository's root and
one folder down (never their contents) and matches them against what each
template says it fits, for example platformio.ini or library.json. Then
come all the templates for the shape you pick, and the generic starter.
The template's files and a generated icm.source.json go into your draft under
the source folder. You check it and open a pull request; a person merges it in
GitHub, and the next sync publishes v1.
Share your own
A person with admin on a workspace can share its live version as a template (Versions → Share as a template). Before submitting, generalise it:
- remove names of people, clients and teams, or turn them into
{…}prompts; - remove secrets: tokens, keys, passwords, connection strings;
- remove internal URLs and hostnames;
- keep the
{…}prompts so the next person knows what to write; - write the repository's own name as
{{repository}}.
Only a published version can be shared, never a draft, and restricted notes
are always left out. MemoryRelay refuses a submission that still contains
something shaped like a credential, one that names its repository instead of
using {{repository}}, and one whose copy would not pass the workspace checks.
Templates are licensed MIT or CC-BY-4.0.
Your submission waits for review; only you and the operator see it. You can follow it under Your submissions on the Templates page, including the reason if it is not listed.
API
Reading templates works with a signed-in session or any API key:
| Route | What it returns |
|---|---|
GET /v2/icm/templates?form=&tag=&q= | templates (summaries with digest, default_for_form, source) and defaults |
GET /v2/icm/templates/{slug}?version= | metadata, description and the file list |
GET /v2/icm/templates/{slug}/files/{path} | one file, as written |
GET /v2/icm/workspaces/{id}/source/template-suggestions | suggestions: [{slug, score, matched, form}] for a Git workspace |
GET /v2/icm/workspaces/{id}/source/scan | the same suggestions, with the workspaces and instruction files the repository holds |
Copying a template into a workspace, submitting one, and every review decision
are people's decisions: API keys are refused with human_only.
| Route | Who |
|---|---|
POST /v2/icm/workspaces/{id}/draft/from-template with {"template": "embedded-cpp-library"} | a publisher of the workspace |
POST /v2/icm/workspaces/{id}/source/make-ready with {"mode": "adopt", "template": "embedded-cpp-library"} | a publisher; admin when the source's folder changes |
POST /v2/icm/templates/submissions | an admin of the workspace |
POST /v2/icm/admin/templates/{id}/list, /reject, /delist | the operator |
from-template also accepts {"form": "pipeline"}, which copies that shape's
default. An unknown template, or a version that is not listed, is refused
before anything is written.