musubi-cli 0.1.0 → 0.3.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.
@@ -0,0 +1,81 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "musubi.schema.json",
4
+ "title": "musubi.json",
5
+ "description": "The musubi declaration next to a skill's SKILL.md: the content the skill provides and the content it follows.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["musubi"],
9
+ "properties": {
10
+ "$schema": {
11
+ "type": "string",
12
+ "description": "Where editors find this schema."
13
+ },
14
+ "musubi": {
15
+ "const": "2026-11-20",
16
+ "description": "The date of the musubi definition this file follows."
17
+ },
18
+ "provides": {
19
+ "type": "object",
20
+ "description": "Content this skill provides, by name.",
21
+ "propertyNames": { "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$" },
22
+ "additionalProperties": { "$ref": "#/$defs/provided" }
23
+ },
24
+ "follows": {
25
+ "type": "object",
26
+ "description": "Content this skill follows, by <skill>/<content>.",
27
+ "propertyNames": { "pattern": "^[a-z0-9]+(-[a-z0-9]+)*/[a-z0-9]+(-[a-z0-9]+)*$" },
28
+ "additionalProperties": { "$ref": "#/$defs/followed" }
29
+ }
30
+ },
31
+ "$defs": {
32
+ "provided": {
33
+ "type": "object",
34
+ "additionalProperties": false,
35
+ "required": ["version", "file"],
36
+ "properties": {
37
+ "version": {
38
+ "type": "string",
39
+ "description": "MAJOR.MINOR.PATCH. Raise MAJOR when a following skill can break.",
40
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
41
+ },
42
+ "file": {
43
+ "type": "string",
44
+ "minLength": 1,
45
+ "description": "The content file, relative to the skill folder."
46
+ },
47
+ "check": {
48
+ "type": "string",
49
+ "pattern": "\\.json$",
50
+ "description": "A JSON rules file, relative to the skill folder, that musubi check applies to the examples of following skills."
51
+ }
52
+ }
53
+ },
54
+ "followed": {
55
+ "type": "object",
56
+ "additionalProperties": false,
57
+ "required": ["version", "integrity"],
58
+ "properties": {
59
+ "version": {
60
+ "type": "string",
61
+ "description": "The versions this skill accepts: ^X.Y.Z, ~X.Y.Z, or X.Y.Z.",
62
+ "pattern": "^[\\^~]?(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
63
+ },
64
+ "integrity": {
65
+ "type": "string",
66
+ "description": "The fingerprint of the content at the last check.",
67
+ "pattern": "^sha256-[A-Za-z0-9+/]{43}=$"
68
+ },
69
+ "examples": {
70
+ "type": "array",
71
+ "description": "Files of this skill that the provider's check is applied to.",
72
+ "items": { "type": "string", "minLength": 1 }
73
+ },
74
+ "optional": {
75
+ "type": "boolean",
76
+ "description": "true when this skill also runs without the provider: it reads the content only when the provider is installed, and musubi check skips the follow when it is not."
77
+ }
78
+ }
79
+ }
80
+ }
81
+ }
@@ -0,0 +1,68 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "check.schema.json",
4
+ "title": "musubi check rules",
5
+ "description": "The rules a provider skill's check holds. musubi check reads them and never runs provider code.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["musubi", "rules"],
9
+ "properties": {
10
+ "$schema": { "type": "string" },
11
+ "musubi": { "const": "2026-11-21" },
12
+ "rules": {
13
+ "type": "array",
14
+ "minItems": 1,
15
+ "items": {
16
+ "oneOf": [
17
+ {
18
+ "type": "object",
19
+ "additionalProperties": false,
20
+ "required": ["kind", "headings"],
21
+ "properties": {
22
+ "kind": { "const": "headings" },
23
+ "headings": {
24
+ "type": "array",
25
+ "minItems": 1,
26
+ "description": "Heading lines that must appear, in this order. Other headings may come between them.",
27
+ "items": { "type": "string", "minLength": 1 }
28
+ }
29
+ }
30
+ },
31
+ {
32
+ "type": "object",
33
+ "additionalProperties": false,
34
+ "required": ["kind", "text"],
35
+ "properties": {
36
+ "kind": { "const": "forbid" },
37
+ "text": {
38
+ "type": "array",
39
+ "minItems": 1,
40
+ "description": "Text that must not remain outside code blocks.",
41
+ "items": { "type": "string", "minLength": 1 }
42
+ }
43
+ }
44
+ },
45
+ {
46
+ "type": "object",
47
+ "additionalProperties": false,
48
+ "required": ["kind", "heading", "columns"],
49
+ "properties": {
50
+ "kind": { "const": "table-columns" },
51
+ "heading": {
52
+ "type": "string",
53
+ "minLength": 1,
54
+ "description": "The heading line whose first table is checked."
55
+ },
56
+ "columns": {
57
+ "type": "array",
58
+ "minItems": 1,
59
+ "description": "Columns the table must have. It may have more.",
60
+ "items": { "type": "string", "minLength": 1 }
61
+ }
62
+ }
63
+ }
64
+ ]
65
+ }
66
+ }
67
+ }
68
+ }
@@ -0,0 +1,98 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "musubi.schema.json",
4
+ "title": "musubi.json",
5
+ "description": "The musubi declaration next to a skill's SKILL.md: the content the skill provides and the content it follows.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["musubi"],
9
+ "properties": {
10
+ "$schema": {
11
+ "type": "string",
12
+ "description": "Where editors find this schema."
13
+ },
14
+ "musubi": {
15
+ "const": "2026-11-21",
16
+ "description": "The date of the musubi definition this file follows."
17
+ },
18
+ "provides": {
19
+ "type": "object",
20
+ "description": "Content this skill provides, by name.",
21
+ "propertyNames": { "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$" },
22
+ "additionalProperties": { "$ref": "#/$defs/provided" }
23
+ },
24
+ "follows": {
25
+ "type": "object",
26
+ "description": "Content this skill follows, by <skill>/<content>.",
27
+ "propertyNames": { "pattern": "^[a-z0-9]+(-[a-z0-9]+)*/[a-z0-9]+(-[a-z0-9]+)*$" },
28
+ "additionalProperties": { "$ref": "#/$defs/followed" }
29
+ }
30
+ },
31
+ "$defs": {
32
+ "provided": {
33
+ "type": "object",
34
+ "additionalProperties": false,
35
+ "required": ["version", "file"],
36
+ "properties": {
37
+ "version": {
38
+ "type": "string",
39
+ "description": "MAJOR.MINOR.PATCH. Raise MAJOR when a following skill can break.",
40
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
41
+ },
42
+ "file": {
43
+ "type": "string",
44
+ "minLength": 1,
45
+ "description": "The content file, relative to the skill folder."
46
+ },
47
+ "check": {
48
+ "type": "string",
49
+ "pattern": "\\.json$",
50
+ "description": "A JSON rules file, relative to the skill folder, that musubi check applies to the examples of following skills."
51
+ }
52
+ }
53
+ },
54
+ "followed": {
55
+ "type": "object",
56
+ "additionalProperties": false,
57
+ "required": ["version", "integrity"],
58
+ "properties": {
59
+ "version": {
60
+ "type": "string",
61
+ "description": "The versions this skill accepts: ^X.Y.Z, ~X.Y.Z, or X.Y.Z.",
62
+ "pattern": "^[\\^~]?(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
63
+ },
64
+ "integrity": {
65
+ "type": "string",
66
+ "description": "The fingerprint of the content at the last check.",
67
+ "pattern": "^sha256-[A-Za-z0-9+/]{43}=$"
68
+ },
69
+ "examples": {
70
+ "type": "array",
71
+ "description": "Files of this skill that the provider's check is applied to.",
72
+ "items": { "type": "string", "minLength": 1 }
73
+ },
74
+ "optional": {
75
+ "type": "boolean",
76
+ "description": "true when this skill also runs without the provider: it reads the content only when the provider is installed, and musubi check skips the follow when it is not."
77
+ },
78
+ "when": {
79
+ "type": "object",
80
+ "description": "When musubi install installs the provider of this optional follow without the user naming it: when a language the user gives with --lang has the same primary language as one of languages.",
81
+ "additionalProperties": false,
82
+ "required": ["languages"],
83
+ "properties": {
84
+ "languages": {
85
+ "type": "array",
86
+ "description": "Language tags such as ja or ja-JP.",
87
+ "minItems": 1,
88
+ "items": { "type": "string", "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8})*$" }
89
+ }
90
+ }
91
+ }
92
+ },
93
+ "dependentSchemas": {
94
+ "when": { "required": ["optional"], "properties": { "optional": { "const": true } } }
95
+ }
96
+ }
97
+ }
98
+ }