@synap-core/workspace-templates 0.69.0 → 0.70.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/design-system.template.test.ts +15 -2
- package/src/design-system.yaml +36 -25
- package/src/templates.ts +9 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synap-core/workspace-templates",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.70.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Canonical workspace definitions — YAML source + typed exports for browser, backend, CLI, and marketplace",
|
|
6
6
|
"license": "PolyForm-Noncommercial-1.0.0",
|
|
@@ -14,7 +14,11 @@
|
|
|
14
14
|
* is, which app, which brand identity), each a stage-end ask of one field,
|
|
15
15
|
* and no other stage asks;
|
|
16
16
|
* 4. the storybook.sync parameters the setup names are the verb's own
|
|
17
|
-
* (`STORYBOOK_VERB_PARAMETERS`), so the text cannot drift from the door
|
|
17
|
+
* (`STORYBOOK_VERB_PARAMETERS`), so the text cannot drift from the door;
|
|
18
|
+
* 5. the run it tells to run storybook.sync is GIVEN it: a run gets
|
|
19
|
+
* run_capability only for what its `tools` declare (schema/run-tools.ts
|
|
20
|
+
* `runToolNames`); five stages make it a long run, which creates no
|
|
21
|
+
* automation and hands nothing to a computer, so its text asks neither.
|
|
18
22
|
*
|
|
19
23
|
* Not covered: the install on a pod (CP + backend), whether the pod raises
|
|
20
24
|
* each endAsk at the end of its stage, and the run's resolution of the names.
|
|
@@ -26,12 +30,13 @@ import {
|
|
|
26
30
|
STORYBOOK_VERB_PARAMETERS,
|
|
27
31
|
} from "@synap-core/types/storybook";
|
|
28
32
|
import { getWorkspaceTemplate } from "./templates.js";
|
|
33
|
+
import { RUN_CAPABILITY_TOOL, runClassOf, runToolNames } from "../schema/run-tools.ts";
|
|
29
34
|
|
|
30
35
|
const pack = getWorkspaceTemplate("design-system")!;
|
|
31
36
|
|
|
32
37
|
type EndAsk = { label: string; ask: { mode: string; form?: { fields: { key: string }[] } } };
|
|
33
38
|
type Stage = { key: string; goal: string; endAsk?: EndAsk };
|
|
34
|
-
type Pb = { name: string; goalTemplate: string; stages: Stage[] };
|
|
39
|
+
type Pb = { name: string; goalTemplate: string; executor?: string; tools?: string[]; stages: Stage[] };
|
|
35
40
|
type Dep = { slug: string; kind: string; relation: string };
|
|
36
41
|
|
|
37
42
|
const deps = (pack as unknown as { dependencies: Dep[] }).dependencies;
|
|
@@ -84,4 +89,12 @@ describe("Design system pack", () => {
|
|
|
84
89
|
}
|
|
85
90
|
expect(setup.goalTemplate).toMatch(/brand identity goes only to storybook\.sync/);
|
|
86
91
|
});
|
|
92
|
+
|
|
93
|
+
it("gives its run storybook.sync: the run's tools carry run_capability", () => {
|
|
94
|
+
const cls = runClassOf(setup);
|
|
95
|
+
expect(cls).toBe("long");
|
|
96
|
+
expect(runToolNames(cls)).not.toContain(RUN_CAPABILITY_TOOL);
|
|
97
|
+
expect(runToolNames(cls, setup.tools ?? [])).toContain(RUN_CAPABILITY_TOOL);
|
|
98
|
+
expect(setup.tools).toContain(STORYBOOK_CAPABILITY_KEY);
|
|
99
|
+
});
|
|
87
100
|
});
|
package/src/design-system.yaml
CHANGED
|
@@ -24,13 +24,21 @@
|
|
|
24
24
|
# (`optionsFrom`); there is no subject before the app is named, so "which app"
|
|
25
25
|
# and "which brand identity" are answered by name and the run resolves them.
|
|
26
26
|
#
|
|
27
|
+
# WHAT A RUN CAN DO. Five stages make it a LONG run: the pod's core tools
|
|
28
|
+
# (reads, create_entity as a proposal, its own update_run and post_in_room)
|
|
29
|
+
# plus, for its declared `tools: [storybook]`, run_capability
|
|
30
|
+
# (schema/run-tools.ts). It creates no automation and hands nothing to a
|
|
31
|
+
# computer, so its text asks for neither: it names what only the person (or
|
|
32
|
+
# their computer) does.
|
|
33
|
+
#
|
|
27
34
|
# THE SYNC SCHEDULE. The storybook sync kind is not ticked by the pod
|
|
28
|
-
# (`scheduled: false`, backend storybook-sync.ts)
|
|
29
|
-
# automation holding one person's url and ids (`apply-time-placeholder`)
|
|
30
|
-
#
|
|
31
|
-
#
|
|
32
|
-
# computer
|
|
33
|
-
#
|
|
35
|
+
# (`scheduled: false`, backend storybook-sync.ts), a package cannot carry an
|
|
36
|
+
# automation holding one person's url and ids (`apply-time-placeholder`), and
|
|
37
|
+
# no verb creates an automation. So a URL source is re-synced only by an
|
|
38
|
+
# automation the person turns on (the run names it), and a computer source by
|
|
39
|
+
# that computer's build, upload and sync after each push. The brand identity
|
|
40
|
+
# lives only on the sync SOURCE's config (the contract): storybook.sync stores
|
|
41
|
+
# it there, never on the mirrored records.
|
|
34
42
|
|
|
35
43
|
meta:
|
|
36
44
|
slug: design-system
|
|
@@ -74,24 +82,27 @@ playbooks:
|
|
|
74
82
|
they belong to) and list the apps and brand identities by name, so the
|
|
75
83
|
next answers can name one. APP: resolve the app the person named (an
|
|
76
84
|
existing devplane_app first; never a second record for one that exists;
|
|
77
|
-
a new one is
|
|
78
|
-
project). BRAND: resolve the brand identity they named
|
|
79
|
-
Brand space); none named: the source carries none.
|
|
80
|
-
https URL → run storybook.sync with url, appId and
|
|
81
|
-
computer →
|
|
82
|
-
|
|
83
|
-
file,
|
|
84
|
-
appId and brandIdentityId
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
for a
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
a new one is proposed with create_entity, filed into the person's
|
|
86
|
+
project). BRAND: resolve the brand identity they named
|
|
87
|
+
(brand-identity, Brand space); none named: the source carries none.
|
|
88
|
+
CONNECT: a public https URL → run storybook.sync with url, appId and
|
|
89
|
+
brandIdentityId; a computer → the build and upload run on the person's
|
|
90
|
+
computer, not in this run: when they uploaded a
|
|
91
|
+
synap.storybook-bundle/v1 file, run storybook.sync with its
|
|
92
|
+
bundleFileId, appId and brandIdentityId; until then, write the three
|
|
93
|
+
values that computer's agent passes and stop. The first run of a source
|
|
94
|
+
is ONE import proposal the person approves; never write the records
|
|
95
|
+
yourself. KEEP CURRENT: the pod does not re-sync a Storybook on its own;
|
|
96
|
+
for a URL, name the daily automation the person turns on (one
|
|
97
|
+
storybook.sync step with the same three values); for a computer, the
|
|
98
|
+
same build, upload and sync run after each push to the app's main. The
|
|
99
|
+
brand identity goes only to storybook.sync (the source's config), never
|
|
100
|
+
onto the records.
|
|
91
101
|
# No activator: a manual activator fires on a subject, and this setup has
|
|
92
102
|
# none (the app is its second answer). It is started by name
|
|
93
103
|
# (run_playbook), by the person or an agent they ask.
|
|
94
104
|
executor: is-agent
|
|
105
|
+
tools: [storybook]
|
|
95
106
|
status: active
|
|
96
107
|
stages:
|
|
97
108
|
- key: where
|
|
@@ -133,7 +144,7 @@ playbooks:
|
|
|
133
144
|
- key: brand
|
|
134
145
|
name: Which brand identity
|
|
135
146
|
category: started
|
|
136
|
-
goal: Resolve the app the person named (an existing devplane_app first, never a twin; a new one
|
|
147
|
+
goal: Resolve the app the person named (an existing devplane_app first, never a twin; a new one proposed with create_entity, filed into their project). Ask nothing yourself; when your turn ends the pod asks which brand identity the Storybook expresses.
|
|
137
148
|
criteria:
|
|
138
149
|
- key: app-resolved-once
|
|
139
150
|
statement: The named app resolves to exactly one devplane_app, an existing one or one proposed in this run; no second record of an existing app was created.
|
|
@@ -155,10 +166,10 @@ playbooks:
|
|
|
155
166
|
- key: connect
|
|
156
167
|
name: Connect and first sync
|
|
157
168
|
category: started
|
|
158
|
-
goal: "Resolve the brand identity the person named (brand-identity in the Brand space; empty: none). A URL: run storybook.sync with url, appId and brandIdentityId. A computer:
|
|
169
|
+
goal: "Resolve the brand identity the person named (brand-identity in the Brand space; empty: none). A URL: run storybook.sync with url, appId and brandIdentityId. A computer: the build and upload run on the person's computer, not in this run; with an uploaded synap.storybook-bundle/v1 file, run storybook.sync with its bundleFileId, appId and brandIdentityId; without one yet, write the values the computer's agent passes and stop. The first run is one import proposal for the person; a refused or failed sync is reported with its reason, never retried blindly."
|
|
159
170
|
criteria:
|
|
160
171
|
- key: sync-ran-with-answers
|
|
161
|
-
statement: storybook.sync ran once with the person's source (url, or a bundle file a computer uploaded), the resolved appId and, when one was named, the brandIdentityId, and its import proposal is filed or its refusal is reported with the reason.
|
|
172
|
+
statement: storybook.sync ran once with the person's source (url, or a bundle file a computer uploaded), the resolved appId and, when one was named, the brandIdentityId, and its import proposal is filed or its refusal is reported with the reason; or, for a computer with no bundle uploaded yet, the run wrote the values its agent passes.
|
|
162
173
|
check: { kind: judge }
|
|
163
174
|
- key: brand-only-on-source
|
|
164
175
|
statement: The brand identity was passed to storybook.sync only; no mirrored record was written by hand.
|
|
@@ -166,8 +177,8 @@ playbooks:
|
|
|
166
177
|
- key: keep-current
|
|
167
178
|
name: Keep it current
|
|
168
179
|
category: completed
|
|
169
|
-
goal: "A URL:
|
|
180
|
+
goal: "A URL: name the daily automation the person turns on to keep it current (one storybook.sync step with the same url, appId and brandIdentityId): the pod does not re-sync a Storybook on its own. A computer: say that its build, upload and sync run after each push to the app's main. Then say how the weekly review of changed components is turned on (the schedule of Review a UI component is installed paused)."
|
|
170
181
|
criteria:
|
|
171
182
|
- key: sync-kept-current
|
|
172
|
-
statement: For a URL
|
|
183
|
+
statement: For a URL the answer names the daily storybook.sync automation with the same three values; for a computer it names the push that triggers the build, upload and sync.
|
|
173
184
|
check: { kind: judge }
|
package/src/templates.ts
CHANGED
|
@@ -18029,8 +18029,11 @@ const DATA = {
|
|
|
18029
18029
|
{
|
|
18030
18030
|
"name": "Set up a design system",
|
|
18031
18031
|
"description": "Connect one app's Storybook to the pod in three questions asked one at a time: where the Storybook is (a public URL, or a computer that builds and uploads it), which app or project it belongs to, and which brand identity it expresses. Ends with the first sync's import proposal filed for the person and the sync kept current.",
|
|
18032
|
-
"goalTemplate": "Set up the design system of one app on this pod. Load the designing-with-real-components skill first. The pod asks the person three things, one per stage, when your turn ends that stage: never ask them yourself and never ask two at once. WHERE: read what the pod already has (the apps, the brand identities, any ui-component records and the app they belong to) and list the apps and brand identities by name, so the next answers can name one. APP: resolve the app the person named (an existing devplane_app first; never a second record for one that exists; a new one is
|
|
18032
|
+
"goalTemplate": "Set up the design system of one app on this pod. Load the designing-with-real-components skill first. The pod asks the person three things, one per stage, when your turn ends that stage: never ask them yourself and never ask two at once. WHERE: read what the pod already has (the apps, the brand identities, any ui-component records and the app they belong to) and list the apps and brand identities by name, so the next answers can name one. APP: resolve the app the person named (an existing devplane_app first; never a second record for one that exists; a new one is proposed with create_entity, filed into the person's project). BRAND: resolve the brand identity they named (brand-identity, Brand space); none named: the source carries none. CONNECT: a public https URL → run storybook.sync with url, appId and brandIdentityId; a computer → the build and upload run on the person's computer, not in this run: when they uploaded a synap.storybook-bundle/v1 file, run storybook.sync with its bundleFileId, appId and brandIdentityId; until then, write the three values that computer's agent passes and stop. The first run of a source is ONE import proposal the person approves; never write the records yourself. KEEP CURRENT: the pod does not re-sync a Storybook on its own; for a URL, name the daily automation the person turns on (one storybook.sync step with the same three values); for a computer, the same build, upload and sync run after each push to the app's main. The brand identity goes only to storybook.sync (the source's config), never onto the records.",
|
|
18033
18033
|
"executor": "is-agent",
|
|
18034
|
+
"tools": [
|
|
18035
|
+
"storybook"
|
|
18036
|
+
],
|
|
18034
18037
|
"status": "active",
|
|
18035
18038
|
"stages": [
|
|
18036
18039
|
{
|
|
@@ -18089,7 +18092,7 @@ const DATA = {
|
|
|
18089
18092
|
"key": "brand",
|
|
18090
18093
|
"name": "Which brand identity",
|
|
18091
18094
|
"category": "started",
|
|
18092
|
-
"goal": "Resolve the app the person named (an existing devplane_app first, never a twin; a new one
|
|
18095
|
+
"goal": "Resolve the app the person named (an existing devplane_app first, never a twin; a new one proposed with create_entity, filed into their project). Ask nothing yourself; when your turn ends the pod asks which brand identity the Storybook expresses.",
|
|
18093
18096
|
"criteria": [
|
|
18094
18097
|
{
|
|
18095
18098
|
"key": "app-resolved-once",
|
|
@@ -18124,11 +18127,11 @@ const DATA = {
|
|
|
18124
18127
|
"key": "connect",
|
|
18125
18128
|
"name": "Connect and first sync",
|
|
18126
18129
|
"category": "started",
|
|
18127
|
-
"goal": "Resolve the brand identity the person named (brand-identity in the Brand space; empty: none). A URL: run storybook.sync with url, appId and brandIdentityId. A computer:
|
|
18130
|
+
"goal": "Resolve the brand identity the person named (brand-identity in the Brand space; empty: none). A URL: run storybook.sync with url, appId and brandIdentityId. A computer: the build and upload run on the person's computer, not in this run; with an uploaded synap.storybook-bundle/v1 file, run storybook.sync with its bundleFileId, appId and brandIdentityId; without one yet, write the values the computer's agent passes and stop. The first run is one import proposal for the person; a refused or failed sync is reported with its reason, never retried blindly.",
|
|
18128
18131
|
"criteria": [
|
|
18129
18132
|
{
|
|
18130
18133
|
"key": "sync-ran-with-answers",
|
|
18131
|
-
"statement": "storybook.sync ran once with the person's source (url, or a bundle file a computer uploaded), the resolved appId and, when one was named, the brandIdentityId, and its import proposal is filed or its refusal is reported with the reason.",
|
|
18134
|
+
"statement": "storybook.sync ran once with the person's source (url, or a bundle file a computer uploaded), the resolved appId and, when one was named, the brandIdentityId, and its import proposal is filed or its refusal is reported with the reason; or, for a computer with no bundle uploaded yet, the run wrote the values its agent passes.",
|
|
18132
18135
|
"check": {
|
|
18133
18136
|
"kind": "judge"
|
|
18134
18137
|
}
|
|
@@ -18146,11 +18149,11 @@ const DATA = {
|
|
|
18146
18149
|
"key": "keep-current",
|
|
18147
18150
|
"name": "Keep it current",
|
|
18148
18151
|
"category": "completed",
|
|
18149
|
-
"goal": "A URL:
|
|
18152
|
+
"goal": "A URL: name the daily automation the person turns on to keep it current (one storybook.sync step with the same url, appId and brandIdentityId): the pod does not re-sync a Storybook on its own. A computer: say that its build, upload and sync run after each push to the app's main. Then say how the weekly review of changed components is turned on (the schedule of Review a UI component is installed paused).",
|
|
18150
18153
|
"criteria": [
|
|
18151
18154
|
{
|
|
18152
18155
|
"key": "sync-kept-current",
|
|
18153
|
-
"statement": "For a URL
|
|
18156
|
+
"statement": "For a URL the answer names the daily storybook.sync automation with the same three values; for a computer it names the push that triggers the build, upload and sync.",
|
|
18154
18157
|
"check": {
|
|
18155
18158
|
"kind": "judge"
|
|
18156
18159
|
}
|