@catheadowl/md-tools 0.0.0-stage → 0.2.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/LICENSE +21 -0
- package/README.md +94 -2
- package/cli/config.mjs +86 -0
- package/cli/doc-link.mjs +145 -0
- package/cli/kernel.mjs +86 -0
- package/cli/normalize.mjs +91 -0
- package/cli/rename.mjs +390 -0
- package/conformance/cases.json +55 -0
- package/lib/gate-check.d.ts +87 -0
- package/lib/gate-check.js +233 -0
- package/lib/index.d.ts +8 -0
- package/lib/index.js +8 -0
- package/lib/links/anchors.d.ts +43 -0
- package/lib/links/anchors.js +93 -0
- package/lib/links/cli.d.ts +33 -0
- package/lib/links/cli.js +86 -0
- package/lib/links/git.d.ts +156 -0
- package/lib/links/git.js +329 -0
- package/lib/links/index.d.ts +33 -0
- package/lib/links/index.js +25 -0
- package/lib/links/markdown.d.ts +127 -0
- package/lib/links/markdown.js +253 -0
- package/lib/links/normalize.d.ts +40 -0
- package/lib/links/normalize.js +102 -0
- package/lib/links/rebase.d.ts +24 -0
- package/lib/links/rebase.js +44 -0
- package/lib/links/rename.d.ts +257 -0
- package/lib/links/rename.js +864 -0
- package/lib/links/resolve.d.ts +145 -0
- package/lib/links/resolve.js +297 -0
- package/lib/links/scheme.d.ts +115 -0
- package/lib/links/scheme.js +209 -0
- package/lib/links/textual.d.ts +26 -0
- package/lib/links/textual.js +144 -0
- package/lib/measure/count.d.ts +47 -0
- package/lib/measure/count.js +91 -0
- package/lib/measure/document.d.ts +105 -0
- package/lib/measure/document.js +173 -0
- package/lib/measure/index.d.ts +22 -0
- package/lib/measure/index.js +18 -0
- package/lib/measure/sections.d.ts +38 -0
- package/lib/measure/sections.js +37 -0
- package/lib/measure/structure.d.ts +53 -0
- package/lib/measure/structure.js +186 -0
- package/package.json +82 -4
- package/skills/md-tools/SKILL.md +42 -0
- package/skills/md-tools/references/freeze.md +17 -0
- package/skills/md-tools/references/payload.md +28 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: md-tools declared freeze policy — manifest.yml archived declarations as the single policy source; narrow read pinning, replace-not-union flags, and fail-loud behavior for broken carriers
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Declared freeze policy (details)
|
|
6
|
+
|
|
7
|
+
Any directory whose `manifest.yml` declares `archived: true` is frozen history. Picked up automatically — no flags, no extra file.
|
|
8
|
+
|
|
9
|
+
- `doc-link` exempts frozen files as sources: it does not report their outbound links, because frozen content is read-only and its rotting links are not actionable findings.
|
|
10
|
+
- Active files remain checked when they link to targets inside a frozen tree; freezing a target does not exempt incoming references.
|
|
11
|
+
- `doc-rename` treats frozen files as read-only.
|
|
12
|
+
|
|
13
|
+
The read is narrowly pinned: only `manifest.yml`, a YAML mapping, `schema_version: 1`, and a boolean `archived` are recognized — anything else is ignored.
|
|
14
|
+
|
|
15
|
+
A declaration that is unparseable, not a mapping, wrong schema, or a non-boolean `archived` fails loudly: one-line diagnosis naming the file, exit 1. A broken carrier of the frozen fact must not silently drop the policy.
|
|
16
|
+
|
|
17
|
+
`--frozen <dirName>` (repeatable) **replaces** the declared policy for one run (not a union). `--no-manifest-freeze` skips manifest reading entirely. Repos without manifests need zero configuration.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: md-tools skill payload contract — the install unit, version stamps, refresh reconciliation and conflict handling (canonical home; the SKILL.md face carries only the short core)
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Payload & reconciliation (details)
|
|
6
|
+
|
|
7
|
+
This file is the canonical home of the payload contract; the SKILL.md face
|
|
8
|
+
carries only the short core pointing here. It rides along on every copy of
|
|
9
|
+
the subtree. Tool-owned frontmatter keys of this payload: `name`,
|
|
10
|
+
`description` (an author extending the tool-owned set declares it here, not
|
|
11
|
+
in frontmatter comments — frontmatter stays pure keys).
|
|
12
|
+
|
|
13
|
+
**Payload & reconciliation.** The skill root — the directory containing
|
|
14
|
+
SKILL.md — is the whole install unit: copy or link the subtree as-is;
|
|
15
|
+
sibling files (e.g. `references/`) ride along. Method and destination are
|
|
16
|
+
the installing agent's choice; the package never writes an agent directory.
|
|
17
|
+
When installing a copy, stamp it with the shipped tree's version (frontmatter
|
|
18
|
+
`metadata.payload-version`; update the stamp on refresh). On refresh,
|
|
19
|
+
everything in the subtree follows the shipped tree — body, files, and
|
|
20
|
+
tool-owned frontmatter (`name`, `description`, plus any keys the author
|
|
21
|
+
declares tool-owned) — except operator-reserved frontmatter keys (invocation
|
|
22
|
+
policy such as `disable-model-invocation`, and every key not declared
|
|
23
|
+
tool-owned), which belong to the host and survive refresh. A tool-owned key
|
|
24
|
+
that differs while `metadata.payload-version` equals the shipped tree's
|
|
25
|
+
version was changed locally: ask the operator; if you cannot ask (unattended
|
|
26
|
+
dispatch), stop and report without writing. After an upgrade, re-locate the
|
|
27
|
+
shipped tree (the package README records the path) and compare before
|
|
28
|
+
reconciling.
|