Chapter 03
Artifacts
An artifact is something you talk about with the session and that stays: a roadmap, the project sheet, a document, a page. It lives as a file in the project and is shown in a tab on the right. Different CLIs work on the same artifact one after the other, because the data lives in the project and not in a session.
Opening and creating
- The + in the tab bar on the right lists the artifacts of the project and creates a new one with New artifact.
- In the address line you can type a URL, the name of an artifact or the path of a file in the project.
- The session opens tabs with
coop zeigenand jumps to a place while doing so.
The types
Typed artifacts separate data from presentation. The session changes the data file; the view reloads by itself.
| Type | What for |
|---|---|
| Project sheet | The authoritative place for rules, facts, decisions and open points. Every session receives it in the briefing. |
| Roadmap | Milestones and items with state, acceptance criteria and dependencies. A session starts from every item. |
| Document | A Markdown file of the project, set for reading. Every place can be addressed by file and line. |
| Questionnaire | Several questions from the session at once, each with a proposal. The answers go back together. |
| Variant choice | Two or three drafts side by side: choose and give a reason. |
| Review | Findings with severity, location and state. A session starts from every finding. |
| Handover | State, open points and next step at the end of a session. The next session reads the newest open one in the briefing; click away what is done with Done. |
| Web preview | A running page, such as a dev server, as a tab for marking and showing. |
| Free artifact | Your own HTML in the artifact folder when no type fits. |
| Design system | Assigns a design system to the project and shows its colours, type, measures and components. |
The roadmap
You change the state of an item in the view, the session with coop roadmap status. Only you set “done”: when the session reports an item as done, that is a proposal you confirm. When you change something in the view, the session working on the roadmap is told.
Design systems
A design system is a folder of its own outside the projects: tokens.json, tokens.css, a README.md as the brand book and components under components/<Name>/, each with README.md and preview.html, plus fonts and icons. Several projects can use the same system.
- Under Settings, Collection folders of design systems (one per line) names the folders that hold the systems. Every subfolder with
tokens.jsonis a system. - Assign: choose the type Design system under New artifact and pick the system. A session does it with
coop artefakt neu designsystem "<Name>" --system <id>;coop design listelists the systems. - The tab shows the colours per theme, the type styles with a sample, the measures and every component with its preview and guide.
- Detach from project in the tab (or
coop artefakt loesen <id>) removes the assignment from the project. The folder of the system stays untouched. - Every session in the project learns from its briefing where the system is and where tokens and components are. The project names only the id of the system; only the deck knows where it lives.
- The component previews run isolated like foreign content.
The deck itself follows the design system NeonCipher: the interface, the views of the types and the page for the phone take their colours and fonts from its tokens. Night, Dusk and Day in the settings are the system's themes night, dusk and day; dusk is a muted second night in grey, blue and green. The switch in the header shows the current theme and cycles through all three.
Connecting your own services (connector)
An artifact of type Web preview shows a page served by a service of your own, for example a CAD cockpit at http://127.0.0.1:8740. Normally the page can only be marked. Once the artifact registers, the page talks to the deck:
- Link in the bar above an artifact remembers its state for the session that is in front. When that session comes to the front again later, the deck brings the artifact to the front and restores the state. If the page has reported a reference, the deck jumps to that reference; otherwise it loads the remembered address. A second click on Linked removes the link. This works for every artifact, also without registering, but then only through the address.
- A session steers the page with
coop zeigen <artifact> --ref "<reference>". - If the page offers its own “feedback” or “send view”, that only fills in the deck's feedback: text, references as marks and an image if wanted. You see the page image there and can leave it out. It is sent only when you click Send. It goes to the session in front, or to the one you choose.
Registering: add the following to .coop/artefakte/<id>/artefakt.json: "konnektor": { "version": 1, "refs": "<prefix>:" }. Only a page from the same origin (scheme, host, port) as the artifact's url gets answers. The deck checks this on every call.
In the page there is window.coopDeck. Outside the deck it is missing, so always check for it:
| Call | Effect |
|---|---|
await coopDeck.bereit() |
{ version, projekt, artefakt, sitzung: {id, titel, verknuepft} | null, thema: night|dusk|day, sichtbar }, or null if the page is not registered |
coopDeck.on(name, fn) |
events: springe {ref} (jump), sitzung {id, titel, verknuepft} (on every change of the session in front), thema {thema} (theme), sichtbar {sichtbar} (visible). A jump that arrives before on('springe') is delivered later |
coopDeck.bezug(ref, label) |
“This is what I am showing.” Call it when the state changes. The reference is opaque text of up to 4000 characters |
coopDeck.verknuepfen() |
same as the Link button |
coopDeck.rueckmeldung({ text, refs: [{ref, label}], bild }) |
fills in the feedback; bild (image) as data:image/png;base64,…. Only while the tab is in front |
coopDeck.hinweis(text) |
a banner above the view, at most three at a time |
Every call returns a promise and never throws; if the page is not registered, it returns false. Computing stays in the service: the deck only provides focus, references, feedback and the theme.
Foreign content
Free artifacts, project files and the HTML of variants count as content of the project and therefore as foreign. They run sandboxed and cannot reach the interface of the deck. More in Data and security.