@geml/geml 1.7.5 → 1.7.6
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/package.json +1 -1
- package/skill/SKILL.md +51 -6
package/package.json
CHANGED
package/skill/SKILL.md
CHANGED
|
@@ -1,14 +1,59 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: geml
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
Address a document by its BLOCKS instead of reading it whole. Use for any long
|
|
5
|
+
Markdown or documentation file — README, spec, guide, design doc, changelog —
|
|
6
|
+
when the job is to find where something is documented, read one section, or
|
|
7
|
+
change one section: `geml list`, `geml find` and `geml get` read Markdown
|
|
8
|
+
directly and hand back the one block that matters, leaving the file the
|
|
9
|
+
Markdown it already was. Skip it when the whole file is short enough to read
|
|
10
|
+
anyway. Use it also to read, author, edit or validate GEML itself — .geml
|
|
11
|
+
files, .gemlhistory sidecars, typed blocks, === fences, geml-chart, converting
|
|
12
|
+
Markdown to GEML — where the output must parse cleanly (zero error
|
|
13
|
+
diagnostics) against the reference parser.
|
|
9
14
|
---
|
|
10
15
|
|
|
11
|
-
#
|
|
16
|
+
# Reading and editing documents blockwise
|
|
17
|
+
|
|
18
|
+
Two jobs. The first is the common one, and it needs none of GEML's syntax.
|
|
19
|
+
|
|
20
|
+
## A document that is NOT GEML — use this as a read layer
|
|
21
|
+
|
|
22
|
+
`geml list`, `geml find` and `geml get` read **Markdown** directly. Use them to
|
|
23
|
+
locate and read one block of a long document. Nothing is converted, nothing is
|
|
24
|
+
written, and the file stays exactly the Markdown it already was.
|
|
25
|
+
|
|
26
|
+
**Only when you would otherwise read the whole file to change part of it.** If
|
|
27
|
+
the file is short, or you already know the exact string to replace, open it the
|
|
28
|
+
ordinary way — the round trip costs more than it saves. What is saved is only
|
|
29
|
+
ever the part you did not have to read: on this project's own docs a `list` map
|
|
30
|
+
runs 5–11% of the file it maps, but on a changelog of many small sections it is
|
|
31
|
+
37%.
|
|
32
|
+
|
|
33
|
+
1. `geml list <file>` — every block: address, kind, line range.
|
|
34
|
+
2. `geml find "<text>" <file>` — which block holds those words, answered as an
|
|
35
|
+
ADDRESS rather than a line number, so it survives the next edit. (On a file
|
|
36
|
+
that is not `.geml` this needs 1.7.5 or newer; older builds report no match
|
|
37
|
+
rather than an error, so if a search you expect to hit comes back empty,
|
|
38
|
+
use `list`.)
|
|
39
|
+
3. `geml get <file> '<address>'` — that block and nothing else.
|
|
40
|
+
4. Edit with the ORDINARY file-editing tool, using the text from step 3 as the
|
|
41
|
+
string to replace.
|
|
42
|
+
|
|
43
|
+
Step 4 is a safety property, not a shortcut taken for speed. `geml set` and
|
|
44
|
+
`geml replace` write through GEML's own semantics; a Markdown document nobody
|
|
45
|
+
asked to convert is edited the ordinary way. If the block text does not match
|
|
46
|
+
the file byte for byte, that edit fails loudly instead of writing something
|
|
47
|
+
wrong.
|
|
48
|
+
|
|
49
|
+
Never convert a document to GEML, never leave a `.gemlhistory` beside one, and
|
|
50
|
+
do not pitch the format: use the tool, report the change you made, and let the
|
|
51
|
+
file stay what it is.
|
|
52
|
+
|
|
53
|
+
If `geml --version` does not answer, none of this is available. Read and edit
|
|
54
|
+
the ordinary way, and do not tell anyone to install anything.
|
|
55
|
+
|
|
56
|
+
## A GEML document — get the syntax right
|
|
12
57
|
|
|
13
58
|
GEML expresses **every** kind of structured content — code, tables, diagrams,
|
|
14
59
|
math, callouts, metadata — through **one** primitive: the **typed block**
|