@synap-core/workspace-templates 0.24.0 → 0.25.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/README.md +29 -45
- package/automations/bookmark-enrichment.catalog.json +16 -0
- package/automations/github-pr-events.catalog.json +18 -0
- package/automations/ship-a-change-checks-green.catalog.json +18 -0
- package/automations/ship-a-change-checks-red.catalog.json +18 -0
- package/automations/ship-a-change-deployed.catalog.json +18 -0
- package/automations/ship-a-change-pr-merged.catalog.json +18 -0
- package/automations/ship-a-change-pr-opened.catalog.json +18 -0
- package/automations/url-bookmark-capture.catalog.json +17 -0
- package/dist/index.js +1164 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/bookmark-enrichment.catalog.json +16 -0
- package/skills/mapping-the-server.catalog.json +18 -0
- package/skills/routing-to-channels.catalog.json +16 -0
- package/src/builder-dev-playbooks.template.test.ts +66 -0
- package/src/builder.yaml +767 -0
- package/src/templates.ts +1164 -0
package/package.json
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apiVersion": "synap/v1",
|
|
3
|
+
"kind": "skill",
|
|
4
|
+
"meta": {
|
|
5
|
+
"slug": "bookmark-enrichment",
|
|
6
|
+
"name": "Bookmark enrichment",
|
|
7
|
+
"description": "Enrich a saved bookmark from the page it points to: read the link, extract its title and description, classify it, and link it to what your pod already knows.",
|
|
8
|
+
"tags": [
|
|
9
|
+
"skill",
|
|
10
|
+
"bookmarks",
|
|
11
|
+
"enrichment"
|
|
12
|
+
],
|
|
13
|
+
"isPublic": true
|
|
14
|
+
},
|
|
15
|
+
"dependencies": []
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apiVersion": "synap/v1",
|
|
3
|
+
"kind": "skill",
|
|
4
|
+
"meta": {
|
|
5
|
+
"slug": "mapping-the-server",
|
|
6
|
+
"name": "Mapping the server",
|
|
7
|
+
"description": "Read a Discord server's structure (categories, channels, members) and propose one reviewable graph of clients, partners, companies, people and channel bindings, accepted in a single move.",
|
|
8
|
+
"tags": [
|
|
9
|
+
"skill",
|
|
10
|
+
"discord",
|
|
11
|
+
"crm",
|
|
12
|
+
"onboarding"
|
|
13
|
+
],
|
|
14
|
+
"isPublic": false,
|
|
15
|
+
"owner": "template-owner"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": []
|
|
18
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apiVersion": "synap/v1",
|
|
3
|
+
"kind": "skill",
|
|
4
|
+
"meta": {
|
|
5
|
+
"slug": "routing-to-channels",
|
|
6
|
+
"name": "Routing to channels",
|
|
7
|
+
"description": "Route a message to the right channel, and create a channel, room or thread when one is warranted.",
|
|
8
|
+
"tags": [
|
|
9
|
+
"skill",
|
|
10
|
+
"channels",
|
|
11
|
+
"messaging"
|
|
12
|
+
],
|
|
13
|
+
"isPublic": true
|
|
14
|
+
},
|
|
15
|
+
"dependencies": []
|
|
16
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The dev playbooks of the Builder template (decision d05, founder
|
|
3
|
+
* instruction 2026-11-05): Build a change, Fix a bug, Investigate, Review a
|
|
4
|
+
* change, Maintain, Fix main red. They ship as DRAFTS with NO activators, so a pod
|
|
5
|
+
* that installs the template gets them off, and a person turns each on
|
|
6
|
+
* (a later template update keeps the pod's own draft/active choice).
|
|
7
|
+
*
|
|
8
|
+
* "Fix a bug" binds to `issue`, a CORE kind the pod seeds on every pod
|
|
9
|
+
* (ensure-system-profiles.ts / ensure-system-lifecycles.ts); Builder declares it
|
|
10
|
+
* to match that seed, so the lifecycle below must not drift from it.
|
|
11
|
+
*/
|
|
12
|
+
import { describe, expect, it } from "vitest";
|
|
13
|
+
import { getWorkspaceTemplate } from "./templates.js";
|
|
14
|
+
|
|
15
|
+
const DEV_PLAYBOOKS = ["Build a change", "Fix a bug", "Investigate", "Review a change", "Maintain", "Fix main red"] as const;
|
|
16
|
+
|
|
17
|
+
type Stage = { key: string; subjectStatus?: string };
|
|
18
|
+
type Playbook = {
|
|
19
|
+
name: string;
|
|
20
|
+
status?: string;
|
|
21
|
+
activators?: unknown;
|
|
22
|
+
stages?: Stage[];
|
|
23
|
+
subjectProfile?: { profileSlug?: string; statusProperty?: string; activators?: unknown };
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const playbooks = (getWorkspaceTemplate("builder-workspace")?.playbooks ?? []) as Playbook[];
|
|
27
|
+
const find = (name: string) => playbooks.find((p) => p.name === name);
|
|
28
|
+
|
|
29
|
+
describe("builder dev playbooks", () => {
|
|
30
|
+
it.each(DEV_PLAYBOOKS)("%s is present, a draft, with no activator", (name) => {
|
|
31
|
+
const pb = find(name);
|
|
32
|
+
expect(pb, `${name} missing from builder.yaml`).toBeDefined();
|
|
33
|
+
expect(pb?.status).toBe("draft");
|
|
34
|
+
expect(pb?.activators).toBeUndefined();
|
|
35
|
+
expect(pb?.subjectProfile?.activators).toBeUndefined();
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it.each(DEV_PLAYBOOKS)("%s names a statusProperty wherever a stage moves a status", (name) => {
|
|
39
|
+
const pb = find(name);
|
|
40
|
+
const moves = (pb?.stages ?? []).some((s) => s.subjectStatus);
|
|
41
|
+
if (moves) expect(pb?.subjectProfile?.statusProperty).toBeTruthy();
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it("Fix a bug works the core `issue` kind through its declared lifecycle", () => {
|
|
45
|
+
const pb = find("Fix a bug");
|
|
46
|
+
expect(pb?.subjectProfile?.profileSlug).toBe("issue");
|
|
47
|
+
expect(pb?.subjectProfile?.statusProperty).toBe("issueStatus");
|
|
48
|
+
const issue = (getWorkspaceTemplate("builder-workspace")?.profiles ?? []).find((p) => p.slug === "issue") as
|
|
49
|
+
| { lifecycle?: { property: string; options: { key: string; category: string }[] } }
|
|
50
|
+
| undefined;
|
|
51
|
+
expect(issue?.lifecycle?.property).toBe("issueStatus");
|
|
52
|
+
expect(issue?.lifecycle?.options.map((o) => [o.key, o.category])).toEqual([
|
|
53
|
+
["open", "open"],
|
|
54
|
+
["investigating", "active"],
|
|
55
|
+
["fixed", "done"],
|
|
56
|
+
["wont_fix", "lost"],
|
|
57
|
+
]);
|
|
58
|
+
for (const s of pb?.stages ?? []) {
|
|
59
|
+
if (s.subjectStatus) expect(["open", "investigating", "fixed", "wont_fix"]).toContain(s.subjectStatus);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it("each name is declared once", () => {
|
|
64
|
+
for (const name of DEV_PLAYBOOKS) expect(playbooks.filter((p) => p.name === name)).toHaveLength(1);
|
|
65
|
+
});
|
|
66
|
+
});
|