kotonoha 0.4.0 → 0.4.2
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/CHANGELOG.md +47 -1
- package/README-ja.md +82 -4
- package/README.md +123 -6
- package/bin/kotonoha.js +4 -1
- package/package.json +8 -3
- package/skills/japanese-prose/scripts/invariants.py +24 -6
- package/skills/obsidian-bases/SKILL.md +140 -0
- package/skills/obsidian-bases/assets/templates/cards.base +8 -0
- package/skills/obsidian-bases/assets/templates/kanban.base +7 -0
- package/skills/obsidian-bases/assets/templates/list.base +8 -0
- package/skills/obsidian-bases/assets/templates/table.base +10 -0
- package/skills/obsidian-bases/references/execution-contract.json +246 -0
- package/skills/obsidian-bases/references/workflow.md +155 -0
- package/skills/obsidian-bases/scripts/check.cjs +690 -0
- package/skills/obsidian-bases/scripts/package-lock.json +104 -0
- package/skills/obsidian-bases/scripts/package.json +18 -0
- package/skills/obsidian-bases/scripts/verify.cjs +454 -0
- package/skills/obsidian-canvas/SKILL.md +134 -0
- package/skills/obsidian-canvas/assets/templates/comparison.canvas +11 -0
- package/skills/obsidian-canvas/assets/templates/mind-map.canvas +11 -0
- package/skills/obsidian-canvas/assets/templates/note-map.canvas +10 -0
- package/skills/obsidian-canvas/assets/templates/workflow.canvas +11 -0
- package/skills/obsidian-canvas/references/execution-contract.json +404 -0
- package/skills/obsidian-canvas/references/workflow.md +187 -0
- package/skills/obsidian-canvas/scripts/canvas.py +1479 -0
- package/skills/obsidian-canvas/scripts/canvas.py.lock +143 -0
- package/skills/obsidian-canvas/scripts/test_canvas.py +2047 -0
- package/skills/obsidian-canvas/scripts/test_canvas.py.lock +143 -0
- package/skills/obsidian-vault/SKILL.md +162 -0
- package/skills/obsidian-vault/references/execution-contract.json +479 -0
- package/skills/obsidian-vault/references/workflow.md +206 -0
- package/skills/obsidian-vault/scripts/test_vault.py +569 -0
- package/skills/obsidian-vault/scripts/test_vault.py.lock +143 -0
- package/skills/obsidian-vault/scripts/vault.py +1363 -0
- package/skills/obsidian-vault/scripts/vault.py.lock +143 -0
- package/skills/tech-writer/SKILL.md +26 -7
- package/skills/tech-writer/assets/templates/obsidian.md +37 -0
- package/skills/tech-writer/references/doctypes/obsidian.md +106 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
filters: 'file.inFolder("Tasks") && file.ext == "md"'
|
|
2
|
+
properties:
|
|
3
|
+
note.status:
|
|
4
|
+
displayName: Status
|
|
5
|
+
views:
|
|
6
|
+
- type: table
|
|
7
|
+
name: Task overview
|
|
8
|
+
order: [file.name, note.status, note.due, note.owner]
|
|
9
|
+
groupBy: {property: note.status, direction: ASC}
|
|
10
|
+
limit: 50
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$ref": "#/$defs/Request",
|
|
4
|
+
"title": "kotonoha Bases read-only validation contract",
|
|
5
|
+
"x-contract-version": 1,
|
|
6
|
+
"x-schema-validation": {"strict": true, "strictRequired": false, "allErrors": true, "allowUnionTypes": true, "ownProperties": true, "metadata": "Remove top-level x-* metadata before compiling; select the desired $defs entry through $ref. Conditional required properties are declared in the shared parent schemas."},
|
|
7
|
+
"x-runtime": {
|
|
8
|
+
"node": ">=18",
|
|
9
|
+
"dependencies": {"ajv": "8.20.0", "jsep": "1.4.0", "jsonc-parser": "3.3.1", "yaml": "2.9.1"},
|
|
10
|
+
"prepare": "npm ci --prefix <bases-dir>/scripts --ignore-scripts --no-audit --no-fund",
|
|
11
|
+
"prepare-offline": "npm ci --prefix <bases-dir>/scripts --offline --ignore-scripts --no-audit --no-fund",
|
|
12
|
+
"invoke": "node <bases-dir>/scripts/check.cjs --stdin",
|
|
13
|
+
"dependency-resolution": "Only scripts/node_modules; do not fall back to ancestor modules, NODE_PATH, downloads or npx.",
|
|
14
|
+
"vault_access": false,
|
|
15
|
+
"writes": false,
|
|
16
|
+
"expression_evaluation": false
|
|
17
|
+
},
|
|
18
|
+
"x-commands": {
|
|
19
|
+
"--stdin": {"input": "Request", "output": "Report", "stdin_max_bytes": 16777216},
|
|
20
|
+
"--help": {"input": null, "output": "Usage", "dependencies_required": false},
|
|
21
|
+
"other": "Missing, duplicate, abbreviated, positional and unknown arguments fail with invalid_input/1."
|
|
22
|
+
},
|
|
23
|
+
"x-limits": {
|
|
24
|
+
"document_bytes": 1048576,
|
|
25
|
+
"yaml_depth": 64,
|
|
26
|
+
"yaml_nodes": 10000,
|
|
27
|
+
"expression_chars": 4096,
|
|
28
|
+
"expression_nodes": 1024,
|
|
29
|
+
"expression_depth": 64,
|
|
30
|
+
"formulas": 256,
|
|
31
|
+
"diagnostics": 256,
|
|
32
|
+
"output_bytes": 1048576,
|
|
33
|
+
"policy": "Hard safety caps, disclosed before use; no unbounded override. Exceeding a cap prohibits saving and must be reported, not silently truncated."
|
|
34
|
+
},
|
|
35
|
+
"x-packaging": {
|
|
36
|
+
"lock": "scripts/package-lock.json is canonical and must be included byte-for-byte in the parent npm tarball and Skill installation.",
|
|
37
|
+
"exclude": "Exclude all nested node_modules from the parent package files list, the source Skill installer copy, and git tracking.",
|
|
38
|
+
"no-bootstrap": "Dependency preparation is explicit npm ci; check.cjs never prepares dependencies or writes a lockfile."
|
|
39
|
+
},
|
|
40
|
+
"x-expression": {
|
|
41
|
+
"ast": ["Literal", "Identifier", "ThisExpression", "MemberExpression", "CallExpression", "UnaryExpression", "BinaryExpression", "ArrayExpression"],
|
|
42
|
+
"unary": ["!", "+", "-"],
|
|
43
|
+
"binary": ["+", "-", "*", "/", "%", "==", "!=", ">", ">=", "<", "<=", "&&", "||"],
|
|
44
|
+
"global_calls": {"if": [2, 3], "today": [0, 0], "now": [0, 0], "date": [1, 1], "link": [1, 2], "list": [1, 1], "min": [2, 128], "max": [2, 128]},
|
|
45
|
+
"method_calls": {
|
|
46
|
+
"hasTag": [1, 128], "hasLink": [1, 1], "inFolder": [1, 1],
|
|
47
|
+
"contains": [1, 1], "lower": [0, 0], "trim": [0, 0],
|
|
48
|
+
"round": [0, 1], "toFixed": [1, 1], "mean": [0, 0],
|
|
49
|
+
"join": [1, 1], "unique": [0, 0]
|
|
50
|
+
},
|
|
51
|
+
"computed_members": "Literal string or nonnegative safe integer only; formula access requires a literal string. Dynamic indices are unsupported.",
|
|
52
|
+
"literal_types": ["string", "number", "boolean"],
|
|
53
|
+
"formula_references": "Walk accepted ASTs, not raw text. Collect formula.name and formula[\"name\"]. Bare note properties do not require declarations.",
|
|
54
|
+
"summary_context": "values is available only in custom summaries. mean() is admitted only on values in custom summaries from the pinned Bases syntax example, despite its omission from the pinned Functions index; no additional undocumented methods are inferred.",
|
|
55
|
+
"unsupported": "Unparsed expressions, other AST nodes/operators/calls/arities, nonfinite numeric literals, sparse arrays, optional chaining, dynamic call targets and dynamic indices prohibit saving. No eval or function invocation.",
|
|
56
|
+
"runtime_types": "Not inferred as proven from method names. Actual values, result sets and rendering are not evaluated."
|
|
57
|
+
},
|
|
58
|
+
"x-summary-names": ["Average", "Min", "Max", "Sum", "Range", "Median", "Stddev", "Earliest", "Latest", "Checked", "Unchecked", "Empty", "Filled", "Unique"],
|
|
59
|
+
"x-minimum-app": {"table": "1.9.0", "cards": "1.9.0", "list": "1.10.0", "kanban": "1.14.0"},
|
|
60
|
+
"x-issue-codes": {"$ref": "#/$defs/IssueCode"},
|
|
61
|
+
"x-result-policy": [
|
|
62
|
+
"Precedence: execution failure/1, known invalid/2, known insufficient version/4, unsupported or unknown version/3, complete/0. Do not run secondary version/reference checks when their prerequisites are unsupported.",
|
|
63
|
+
"Control/argument/UTF-8 input failure: failed/1; no document processing.",
|
|
64
|
+
"Unexpected execution failure: failed/1; do not expose raw exception or input.",
|
|
65
|
+
"Missing local dependency: not_performed/4.",
|
|
66
|
+
"Known invalid YAML/structure or unresolved formula/summary or formula cycle: not_performed/2.",
|
|
67
|
+
"Known insufficient declared application version: not_performed/4.",
|
|
68
|
+
"Unsupported content, resource exhaustion, or unknown application version: partial/3.",
|
|
69
|
+
"Complete supported static checks with only cautions: completed/0.",
|
|
70
|
+
"static_checks_passed is true only for completed/0 with at least one view; it never establishes authorization, actual application compatibility, proofreading approval, runtime results or successful saving.",
|
|
71
|
+
"Every report has read_only=true, authorization=not_assessed, write_status=not_requested, render_check=not_performed and expression_evaluation=not_performed."
|
|
72
|
+
],
|
|
73
|
+
"x-host-data-policy": "Do not repurpose source text or diagnostic names for public logs. Do not claim control of the host's own conversation or file retention. Read, model-input, write and external-copy permissions remain distinct.",
|
|
74
|
+
"x-processing-order": [
|
|
75
|
+
"Arguments/help, dependency availability, bounded strict UTF-8 JSON control, Request schema, document Unicode and source hash, document byte cap, YAML parse/features, YAML node/depth caps, local structure/value checks, supported expression/reference checks, application version, output caps.",
|
|
76
|
+
"Collect local known-invalid and unsupported findings in independently inspectable subtrees. Skip references whose definitions or expression AST are incomplete. Never invent missing-reference errors from an unsupported expression.",
|
|
77
|
+
"Run application-version checks only when structure and expression/reference validation are fully supported and no known-invalid issue exists. Therefore unknown content plus an old declared version reports unsupported/3 without a version issue; invalid plus old version reports invalid/2 without a version issue.",
|
|
78
|
+
"The View groupOrder/groupBy dependency is an initial-subset restriction: missing groupBy for a non-Kanban groupOrder is unsupported_value/3 at groupOrder. Kanban missing groupBy is missing_required/2 at groupBy. Do not expose duplicate Ajv condition errors.",
|
|
79
|
+
"Wrong scalar/container types, required type/name/groupBy for Kanban, direction outside ASC/DESC are known-invalid. Empty names/map keys/expressions/display names, nonpositive/out-of-subset integral limit, multi-key/empty filter operator objects, and groupOrder without groupBy on non-Kanban are unsupported_value/3. Unknown filter operator keys are unknown_key/3.",
|
|
80
|
+
"A merge mapping key << is unsupported_yaml_feature at root, even without an anchor. __proto__, constructor and prototype are ordinary owned data keys in user-name dictionaries and must never mutate prototypes; unknown top-level keys with those names are unknown_key/3.",
|
|
81
|
+
"Missing views or empty views is an operation constraint, not a YAML shape error. Evaluate it only for otherwise fully supported documents, after local structure/value/expression/reference checks: inspect returns no_views caution/0; create/edit/proofread returns missing_required/2, structure=supported. Do not emit no_views or this operation constraint when invalid/unsupported/resource issues already exist. Other known-invalid issues make structure=invalid. Unsupported content makes structure=unsupported unless invalid dominates.",
|
|
82
|
+
"Emit only the first YAML parser error by source offset, using root path and 1-based line/column; duplicate key uses duplicate_yaml_key, other parse errors invalid_yaml. Do not continue after this error. Unsupported document-wide YAML features similarly stop secondary checks.",
|
|
83
|
+
"For each duplicate view name after its first occurrence, emit one duplicate_view_name at the later name path with related containing only the first index as a decimal string. Three equal names produce issues at indexes 1 and 2, both related=[\"0\"]."
|
|
84
|
+
],
|
|
85
|
+
"x-early-report": {
|
|
86
|
+
"defaults": {
|
|
87
|
+
"schema_version": 1, "structure": "unprocessed", "source_sha256": null,
|
|
88
|
+
"static_checks_passed": false, "unprocessed": [],
|
|
89
|
+
"read_only": true, "authorization": "not_assessed", "write_status": "not_requested",
|
|
90
|
+
"render_check": "not_performed", "expression_evaluation": "not_performed",
|
|
91
|
+
"proofread_gate": "not_requested", "application_version": null,
|
|
92
|
+
"application_version_source": "user_declared"
|
|
93
|
+
},
|
|
94
|
+
"invalid_control": "status=failed, exit_code=1; exactly one invalid_input/input issue at [], line/column=null, related=[]. Applies to argument, UTF-8/JSON/Request/JSON-byte-cap failures.",
|
|
95
|
+
"dependency_failure": "status=not_performed, exit_code=4; exactly one dependency_missing/capability issue at [], line/column=null, related=[]. Applies before control parsing for a missing or wrong-pinned dependency.",
|
|
96
|
+
"runtime_failure": "status=failed, exit_code=1; exactly one runtime_error/runtime issue at [], line/column=null, related=[]. Clear partially computed report fields to defaults.",
|
|
97
|
+
"usage": "Exactly the Usage object; compact JSON plus one LF, exit 0, no standard input consumption or dependency loading."
|
|
98
|
+
},
|
|
99
|
+
"x-counting": {
|
|
100
|
+
"yaml_nodes": "Count each Scalar, Alias, YAMLMap and YAMLSeq once, including root, keys, values, scalar null and empty collections. Pair wrappers do not count. Traverse AST before conversion; YAML parser-produced null slots count as one scalar null.",
|
|
101
|
+
"yaml_depth": "Maximum nested collection count on a root-to-leaf path, with a root collection at 1. Scalars/keys do not increase depth.",
|
|
102
|
+
"expression_nodes": "Count AST objects with a type field, including callee/member/property identifier/literal nodes; array containers themselves do not count, holes are unsupported. Root node counts once.",
|
|
103
|
+
"expression_depth": "Maximum AST typed-node count on a root-to-leaf path, root=1. Count property/callee/argument child nodes. Parentheses do not add AST nodes/depth.",
|
|
104
|
+
"preparse_nesting": "Separate safety cap 64 on simultaneous unquoted (), [] delimiters, ignoring escaped characters in quoted strings. Above 64 gives limit_exceeded before jsep. AST depth is checked independently after parsing.",
|
|
105
|
+
"json_bytes": "Raw stdin bytes including whitespace; limit inclusive.",
|
|
106
|
+
"document_bytes": "Exact UTF-8 document bytes including BOM, comments, whitespace and CRLF; limit inclusive.",
|
|
107
|
+
"output_bytes": "Compact JSON.stringify(Report) plus exactly one LF, UTF-8 byte count. Construct Report properties in the order listed in Report.required; Issue properties code,category,path,line,column,related. No pretty printing.",
|
|
108
|
+
"diagnostics": "Exactly 256 collected distinct issues is allowed, including cautions. More than 256 or an oversized serialized report triggers the root fallback below. limit_exceeded itself is included in the final issue count.",
|
|
109
|
+
"cap_fallback": "If diagnostic/output caps overflow, replace issues with exactly one limit_exceeded/unsupported at [], line/column=null, related=[]; unprocessed=[[]], static_checks_passed=false. Preserve prior known-invalid dominance as structure=invalid, not_performed/2; otherwise structure=unsupported, partial/3. Preserve source hash and accepted request metadata. Do not copy oversized paths into the fallback.",
|
|
110
|
+
"parse_resource_failure": "Unexpected RangeError or parser resource failure yields runtime_error/1 with early defaults, not a claimed measured limit_exceeded. Explicitly measured caps alone produce limit_exceeded/3.",
|
|
111
|
+
"resource_paths": "Document bytes, YAML depth/nodes use []; formula count uses [formulas]; expression chars/nodes/depth/preparse nesting use the exact expression path. unprocessed contains exactly that path when the resource issue is the only issue.",
|
|
112
|
+
"resource_precedence": "Stop further document validation on Unicode, document bytes, parser/features, YAML node/depth or formula-count failure. Per-expression measured limit failures emit only limit_exceeded for that expression and skip its AST/reference checks. Formula names remain known. No missing-reference or version secondary issues are emitted after a resource failure."
|
|
113
|
+
},
|
|
114
|
+
"$defs": {
|
|
115
|
+
"Nonempty": {"type": "string", "minLength": 1},
|
|
116
|
+
"Path": {"type": "array", "items": {"oneOf": [{"type": "string"}, {"type": "integer", "minimum": 0}]}},
|
|
117
|
+
"Request": {
|
|
118
|
+
"type": "object",
|
|
119
|
+
"additionalProperties": false,
|
|
120
|
+
"required": ["schema_version", "intent", "document", "application_version"],
|
|
121
|
+
"properties": {
|
|
122
|
+
"schema_version": {"const": 1},
|
|
123
|
+
"intent": {"enum": ["inspect", "create", "edit", "proofread"]},
|
|
124
|
+
"document": {"type": "string"},
|
|
125
|
+
"application_version": {"oneOf": [{"type": "null"}, {"type": "string", "pattern": "^[0-9]{1,3}\\.[0-9]{1,3}(\\.[0-9]{1,3})?$"}]}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"Filter": {
|
|
129
|
+
"oneOf": [
|
|
130
|
+
{"$ref": "#/$defs/Nonempty"},
|
|
131
|
+
{
|
|
132
|
+
"type": "object", "minProperties": 1, "maxProperties": 1, "additionalProperties": false,
|
|
133
|
+
"properties": {
|
|
134
|
+
"and": {"type": "array", "items": {"$ref": "#/$defs/Filter"}},
|
|
135
|
+
"or": {"type": "array", "items": {"$ref": "#/$defs/Filter"}},
|
|
136
|
+
"not": {"type": "array", "items": {"$ref": "#/$defs/Filter"}}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
"ExpressionMap": {
|
|
142
|
+
"type": "object", "propertyNames": {"$ref": "#/$defs/Nonempty"},
|
|
143
|
+
"additionalProperties": {"$ref": "#/$defs/Nonempty"}
|
|
144
|
+
},
|
|
145
|
+
"SummaryAssignments": {
|
|
146
|
+
"type": "object", "propertyNames": {"$ref": "#/$defs/Nonempty"},
|
|
147
|
+
"additionalProperties": {"$ref": "#/$defs/Nonempty"}
|
|
148
|
+
},
|
|
149
|
+
"GroupBy": {
|
|
150
|
+
"type": "object", "additionalProperties": false,
|
|
151
|
+
"required": ["property"],
|
|
152
|
+
"properties": {"property": {"$ref": "#/$defs/Nonempty"}, "direction": {"enum": ["ASC", "DESC"]}}
|
|
153
|
+
},
|
|
154
|
+
"View": {
|
|
155
|
+
"type": "object", "additionalProperties": false, "required": ["type", "name"],
|
|
156
|
+
"properties": {
|
|
157
|
+
"type": {"enum": ["table", "cards", "list", "kanban"]},
|
|
158
|
+
"name": {"$ref": "#/$defs/Nonempty"},
|
|
159
|
+
"filters": {"$ref": "#/$defs/Filter"},
|
|
160
|
+
"order": {"type": "array", "items": {"$ref": "#/$defs/Nonempty"}},
|
|
161
|
+
"limit": {"type": "integer", "minimum": 1, "maximum": 1000000},
|
|
162
|
+
"groupBy": {"$ref": "#/$defs/GroupBy"},
|
|
163
|
+
"groupOrder": {"type": "array", "items": {"type": ["string", "number", "boolean", "null"]}},
|
|
164
|
+
"summaries": {"$ref": "#/$defs/SummaryAssignments"}
|
|
165
|
+
},
|
|
166
|
+
"allOf": [
|
|
167
|
+
{"if": {"properties": {"type": {"const": "kanban"}}, "required": ["type"]}, "then": {"required": ["groupBy"]}},
|
|
168
|
+
{"if": {"required": ["groupOrder"]}, "then": {"required": ["groupBy"]}}
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
"Document": {
|
|
172
|
+
"type": "object", "additionalProperties": false,
|
|
173
|
+
"properties": {
|
|
174
|
+
"filters": {"$ref": "#/$defs/Filter"},
|
|
175
|
+
"formulas": {"$ref": "#/$defs/ExpressionMap"},
|
|
176
|
+
"summaries": {"$ref": "#/$defs/ExpressionMap"},
|
|
177
|
+
"properties": {
|
|
178
|
+
"type": "object", "propertyNames": {"$ref": "#/$defs/Nonempty"},
|
|
179
|
+
"additionalProperties": {
|
|
180
|
+
"type": "object", "additionalProperties": false,
|
|
181
|
+
"properties": {"displayName": {"$ref": "#/$defs/Nonempty"}}
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"views": {"type": "array", "items": {"$ref": "#/$defs/View"}}
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"IssueCode": {
|
|
188
|
+
"enum": [
|
|
189
|
+
"invalid_input", "dependency_missing", "invalid_yaml", "duplicate_yaml_key",
|
|
190
|
+
"multiple_yaml_documents", "unsupported_yaml_feature", "unsupported_unicode",
|
|
191
|
+
"unsupported_number", "unsupported_value", "unknown_key", "invalid_type", "missing_required",
|
|
192
|
+
"invalid_enum", "unsupported_view", "unsupported_expression", "unsupported_operator",
|
|
193
|
+
"unsupported_function", "formula_missing", "formula_cycle", "summary_missing",
|
|
194
|
+
"application_version_unknown", "application_version_insufficient",
|
|
195
|
+
"duplicate_view_name", "no_views", "limit_exceeded", "runtime_error"
|
|
196
|
+
]
|
|
197
|
+
},
|
|
198
|
+
"Issue": {
|
|
199
|
+
"type": "object", "additionalProperties": false,
|
|
200
|
+
"required": ["code", "category", "path", "line", "column", "related"],
|
|
201
|
+
"properties": {
|
|
202
|
+
"code": {"$ref": "#/$defs/IssueCode"},
|
|
203
|
+
"category": {"enum": ["input", "format", "unsupported", "expression", "capability", "caution", "runtime"]},
|
|
204
|
+
"path": {"$ref": "#/$defs/Path"},
|
|
205
|
+
"line": {"type": ["integer", "null"], "minimum": 1},
|
|
206
|
+
"column": {"type": ["integer", "null"], "minimum": 1},
|
|
207
|
+
"related": {"type": "array", "items": {"type": "string"}}
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"Report": {
|
|
211
|
+
"type": "object", "additionalProperties": false,
|
|
212
|
+
"required": ["schema_version", "status", "exit_code", "structure", "source_sha256", "static_checks_passed", "issues", "unprocessed", "read_only", "authorization", "write_status", "render_check", "expression_evaluation", "proofread_gate", "application_version", "application_version_source"],
|
|
213
|
+
"properties": {
|
|
214
|
+
"schema_version": {"const": 1},
|
|
215
|
+
"status": {"enum": ["completed", "failed", "not_performed", "partial"]},
|
|
216
|
+
"exit_code": {"enum": [0, 1, 2, 3, 4]},
|
|
217
|
+
"structure": {"enum": ["supported", "invalid", "unsupported", "unprocessed"]},
|
|
218
|
+
"source_sha256": {"oneOf": [{"type": "null"}, {"type": "string", "pattern": "^[a-f0-9]{64}$"}]},
|
|
219
|
+
"static_checks_passed": {"type": "boolean"},
|
|
220
|
+
"issues": {"type": "array", "maxItems": 256, "items": {"$ref": "#/$defs/Issue"}},
|
|
221
|
+
"unprocessed": {"type": "array", "items": {"$ref": "#/$defs/Path"}},
|
|
222
|
+
"read_only": {"const": true},
|
|
223
|
+
"authorization": {"const": "not_assessed"},
|
|
224
|
+
"write_status": {"const": "not_requested"},
|
|
225
|
+
"render_check": {"const": "not_performed"},
|
|
226
|
+
"expression_evaluation": {"const": "not_performed"},
|
|
227
|
+
"proofread_gate": {"enum": ["not_requested", "external_required"]},
|
|
228
|
+
"application_version": {"type": ["string", "null"]},
|
|
229
|
+
"application_version_source": {"const": "user_declared"}
|
|
230
|
+
},
|
|
231
|
+
"allOf": [
|
|
232
|
+
{"if": {"properties": {"exit_code": {"const": 0}}}, "then": {"properties": {"status": {"const": "completed"}, "structure": {"const": "supported"}}}},
|
|
233
|
+
{"if": {"properties": {"exit_code": {"const": 1}}}, "then": {"properties": {"status": {"const": "failed"}, "structure": {"const": "unprocessed"}, "static_checks_passed": {"const": false}}}},
|
|
234
|
+
{"if": {"properties": {"exit_code": {"enum": [2, 4]}}}, "then": {"properties": {"status": {"const": "not_performed"}, "static_checks_passed": {"const": false}}}},
|
|
235
|
+
{"if": {"properties": {"exit_code": {"const": 3}}}, "then": {"properties": {"status": {"const": "partial"}, "static_checks_passed": {"const": false}}}},
|
|
236
|
+
{"if": {"properties": {"structure": {"const": "invalid"}}}, "then": {"properties": {"exit_code": {"const": 2}, "static_checks_passed": {"const": false}}}},
|
|
237
|
+
{"if": {"properties": {"structure": {"const": "unsupported"}}}, "then": {"properties": {"exit_code": {"const": 3}, "static_checks_passed": {"const": false}}}},
|
|
238
|
+
{"if": {"properties": {"static_checks_passed": {"const": true}}}, "then": {"properties": {"status": {"const": "completed"}, "exit_code": {"const": 0}, "structure": {"const": "supported"}, "source_sha256": {"type": "string", "pattern": "^[a-f0-9]{64}$"}}}}
|
|
239
|
+
]
|
|
240
|
+
},
|
|
241
|
+
"Usage": {
|
|
242
|
+
"type": "object", "additionalProperties": false, "required": ["usage", "read_only"],
|
|
243
|
+
"properties": {"usage": {"const": "node <bases-dir>/scripts/check.cjs --stdin"}, "read_only": {"const": true}}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# Bases workflow
|
|
2
|
+
|
|
3
|
+
Use this guide with the Skill's scope, byte-preservation and authority rules.
|
|
4
|
+
Standalone `.base` is YAML configuration over Vault files, not a separate
|
|
5
|
+
database. No Obsidian app, official CLI, MCP, Python or Vault storage API is
|
|
6
|
+
required for ordinary direct editing.
|
|
7
|
+
|
|
8
|
+
## Setup
|
|
9
|
+
|
|
10
|
+
Install only the requested Skill; existing installations require explicit
|
|
11
|
+
replacement authority. Do not overwrite local customizations without consent.
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
npx kotonoha install --skill obsidian-bases
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Installation copies authored assets and the canonical private lockfile, not
|
|
18
|
+
`node_modules`. Before dependency preparation explain the local installation
|
|
19
|
+
directory and possible package-registry traffic; get separate permission.
|
|
20
|
+
Use Node >=18 and the exact local scripts manifest/lock:
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
npm ci --prefix <bases-dir>/scripts --ignore-scripts --no-audit --no-fund
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
For an explicitly offline preparation use:
|
|
27
|
+
|
|
28
|
+
```text
|
|
29
|
+
npm ci --prefix <bases-dir>/scripts --offline --ignore-scripts --no-audit --no-fund
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
These are alternatives, not automatic fallbacks. A cache miss does not authorize
|
|
33
|
+
online installation. The checker never prepares dependencies. Missing or wrong
|
|
34
|
+
local dependencies return exit 4 even if a parent/global module is available.
|
|
35
|
+
`--help` works without them. The fixed versions and supported JSON schema live
|
|
36
|
+
in [execution-contract.json](execution-contract.json), not a second config.
|
|
37
|
+
|
|
38
|
+
## Examples and paths
|
|
39
|
+
|
|
40
|
+
Example: "In /absolute/Vault, read Tasks.base only. Rename view index 0 from Tasks
|
|
41
|
+
to Active tasks and save; keep everything else unchanged." This can authorize
|
|
42
|
+
the exact ordinary name edit without a mandatory plan or repeated approval.
|
|
43
|
+
"Propose a base" or "show the diff before saving" never authorizes saving.
|
|
44
|
+
|
|
45
|
+
Example: "Use /absolute/Vault/Views as the working directory; create reading.base
|
|
46
|
+
with Cards for Markdown files in Reading. Show the settings before saving."
|
|
47
|
+
Confirm actual folder/property names and application version without assuming
|
|
48
|
+
permission to inspect every matching note. An example filter is a proposed
|
|
49
|
+
display scope, not a host reading permission.
|
|
50
|
+
|
|
51
|
+
User workdir takes precedence; otherwise use cwd at request start. Resolve its
|
|
52
|
+
relative form from that start and relative targets from the selected workdir.
|
|
53
|
+
Preserve absolute and explicitly Vault-relative paths. A directory choice is
|
|
54
|
+
not Vault authority. If the target's existing parent or allowed scope is missing,
|
|
55
|
+
stop instead of creating directories or saving elsewhere. Never substitute
|
|
56
|
+
session-state copies for the target.
|
|
57
|
+
|
|
58
|
+
## Check exact text
|
|
59
|
+
|
|
60
|
+
Use strict UTF-8 byte access; BOM must not disappear, invalid bytes must not
|
|
61
|
+
become replacement characters. Capture raw SHA-256 independently. Send JSON
|
|
62
|
+
through stdin safely, never interpolate document text into shell commands:
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"schema_version": 1,
|
|
67
|
+
"intent": "inspect",
|
|
68
|
+
"document": "filters: 'file.ext == \"md\"'\nviews:\n - {type: table, name: Notes, order: [file.name]}\n",
|
|
69
|
+
"application_version": "1.14.0"
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
node <bases-dir>/scripts/check.cjs --stdin
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Use inspect for existing text and create/edit/proofread for the corresponding
|
|
78
|
+
candidate. The Report hash must match raw original bytes and exact candidate
|
|
79
|
+
write bytes respectively. No path, output-file, save, fix or evaluation flags
|
|
80
|
+
exist. The checker never reads a target or follows a formula's URL.
|
|
81
|
+
|
|
82
|
+
| Exit | Meaning | Action |
|
|
83
|
+
|---|---|---|
|
|
84
|
+
| 0 | Complete static processing; may contain cautions | Check static_checks_passed and every separate host/consent requirement |
|
|
85
|
+
| 1 | Invalid control or runtime failure | Not complete; no save |
|
|
86
|
+
| 2 | Known structure/reference problem or missing candidate views | Explain exact issues; no save |
|
|
87
|
+
| 3 | Unsupported feature, limit or unknown application version | Preserve original; diagnosis only |
|
|
88
|
+
| 4 | Local dependency or declared application capability insufficient | Report missing capability; no auto-install or save |
|
|
89
|
+
|
|
90
|
+
Reports always say read_only=true, authorization=not_assessed and
|
|
91
|
+
write_status=not_requested. They never certify saving, evaluation or rendering.
|
|
92
|
+
Non-parser issues identify a key/index path, not an invented source line;
|
|
93
|
+
YAML parser issues use 1-based line/column. Limit fallbacks explicitly retain
|
|
94
|
+
unprocessed root. A partial report is never all-file success.
|
|
95
|
+
|
|
96
|
+
## Supported edits and display consequences
|
|
97
|
+
|
|
98
|
+
Use `table.base`, `cards.base`, `list.base` and `kanban.base` from the sibling
|
|
99
|
+
assets/templates directory. They are independently authored proposals. Adapt
|
|
100
|
+
their scope/property names only with authority; do not claim they match real data.
|
|
101
|
+
Every view supports creation and name/display-order/filter edits. Kanban requires
|
|
102
|
+
its group property; group order and ASC/DESC can be intentionally edited.
|
|
103
|
+
Other minimum settings are defined in the contract; unknown extensions cause
|
|
104
|
+
whole-file editing refusal, even when only a known name would change.
|
|
105
|
+
|
|
106
|
+
`order` is display property order, not row sorting. Never infer undocumented
|
|
107
|
+
image, marker, sort or plugin keys. The expression subset is deliberately narrow:
|
|
108
|
+
unknown documented functions can still be unsupported in this checker.
|
|
109
|
+
Defined formula names and known property references are not proof of actual note
|
|
110
|
+
types; accepted ASTs are not executed.
|
|
111
|
+
|
|
112
|
+
Treat every filter/formulas change as potentially widening. Present the actual
|
|
113
|
+
before/after and save authority, without proving arbitrary set containment.
|
|
114
|
+
No filters means all Vault files when opened. Explain that before an unfiltered
|
|
115
|
+
creation or last-filter removal, and obtain authority for that exact content.
|
|
116
|
+
Global/view filters combine with AND. groupOrder can hide groups independently;
|
|
117
|
+
an empty groupOrder hides every group. Do not invent counts or reinterpret these
|
|
118
|
+
conditions as security controls.
|
|
119
|
+
|
|
120
|
+
## Save through host tools
|
|
121
|
+
|
|
122
|
+
Follow every numbered step in SKILL.md. Do not read forbidden paths to "verify"
|
|
123
|
+
them. Check authorized root-to-target identities, exact spelling, no symlinks,
|
|
124
|
+
no management paths, local regular files and preservable metadata. No xattrs or
|
|
125
|
+
multiple hard links; do not strip SELinux labels or other safety features.
|
|
126
|
+
|
|
127
|
+
Keep untouched bytes exactly, including comments, quoted values, key/view order,
|
|
128
|
+
spaces and CRLF. Do not round-trip YAML through a serializer. Duplicate names
|
|
129
|
+
need user-resolved index/content. A candidate that passes cannot repair an
|
|
130
|
+
unsupported/invalid original without changing the agreed scope.
|
|
131
|
+
|
|
132
|
+
Recheck current bytes and identity just before writing. Exclusive creation must
|
|
133
|
+
not overwrite an equivalent existing name. Edit only if the host can preserve
|
|
134
|
+
exact bytes, owner/group/modes. Re-read after saving; compare to validated bytes
|
|
135
|
+
and hashes. Tools that cannot verify these properties are insufficient.
|
|
136
|
+
|
|
137
|
+
On a possible partial write or readback mismatch, say the result is unknown.
|
|
138
|
+
Do not automatically retry, roll back, switch tools or report a fabricated CLI
|
|
139
|
+
receipt. Confirm the current target before requesting authority for remediation.
|
|
140
|
+
There is no CLI transaction/root lock/replay guard, and a final-check race remains.
|
|
141
|
+
|
|
142
|
+
## Proofreading and retention
|
|
143
|
+
|
|
144
|
+
Proofread selected name/displayName values only, through `japanese-prose`.
|
|
145
|
+
Obtain copy consent first: specify an external location, purpose, retention until
|
|
146
|
+
user deletion and cleanup of known files only. A workdir inside the Vault cannot
|
|
147
|
+
silently redirect copies to session storage. Ask for a suitable external place.
|
|
148
|
+
Keep immutable source bytes and a real nine-check semantic review for each
|
|
149
|
+
changed string; missing/stale/failed gates prohibit saving. Keep formula text,
|
|
150
|
+
identifiers, operators, numbers and all unselected spans unchanged.
|
|
151
|
+
|
|
152
|
+
Do not send source or diagnostic names to public logs, additional models or web
|
|
153
|
+
services without permission. Do not claim control over host conversation logs.
|
|
154
|
+
The caller's file tools and model must follow these instructions; no arbitrary
|
|
155
|
+
host sandbox or flawless semantic understanding is promised.
|