gcf-aif-ext 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 +41 -0
- package/commands/gcf.js +173 -0
- package/extension.json +24 -0
- package/hooks/pre-commit.js +91 -0
- package/injections/commit-status.md +6 -0
- package/injections/plan-context.md +8 -0
- package/injections/review-pillars.md +7 -0
- package/lib/anchors.js +109 -0
- package/lib/audit-core.js +102 -0
- package/lib/context.js +77 -0
- package/lib/frontmatter.js +26 -0
- package/lib/gcf-paths.js +60 -0
- package/lib/git.js +19 -0
- package/lib/id.js +42 -0
- package/lib/index-gen.js +51 -0
- package/lib/linter.js +61 -0
- package/lib/playtest-list.js +13 -0
- package/lib/safe-path.js +71 -0
- package/lib/transitions.js +30 -0
- package/lib/validate-card.js +48 -0
- package/lib/verdict-fs.js +126 -0
- package/node_modules/cnlp-kit/CHANGELOG.md +625 -0
- package/node_modules/cnlp-kit/LICENSE +21 -0
- package/node_modules/cnlp-kit/README.md +242 -0
- package/node_modules/cnlp-kit/bin/cnlp.js +334 -0
- package/node_modules/cnlp-kit/cnlp-format.md +470 -0
- package/node_modules/cnlp-kit/package.json +40 -0
- package/node_modules/cnlp-kit/profiles/adr.md +129 -0
- package/node_modules/cnlp-kit/profiles/api.md +87 -0
- package/node_modules/cnlp-kit/profiles/concept.md +70 -0
- package/node_modules/cnlp-kit/profiles/docset.md +103 -0
- package/node_modules/cnlp-kit/profiles/guide.md +51 -0
- package/node_modules/cnlp-kit/profiles/profile.md +69 -0
- package/node_modules/cnlp-kit/profiles/reference.md +61 -0
- package/node_modules/cnlp-kit/profiles/skill.md +75 -0
- package/node_modules/cnlp-kit/profiles/task.md +65 -0
- package/node_modules/cnlp-kit/quality-rules.md +69 -0
- package/node_modules/cnlp-kit/skills/cnlp-docset/SKILL.md +73 -0
- package/node_modules/cnlp-kit/skills/cnlp-migrate/SKILL.md +64 -0
- package/node_modules/cnlp-kit/src/cnlp.js +534 -0
- package/node_modules/cnlp-kit/src/config.js +352 -0
- package/node_modules/yaml/LICENSE +13 -0
- package/node_modules/yaml/README.md +172 -0
- package/node_modules/yaml/bin.mjs +11 -0
- package/node_modules/yaml/browser/dist/compose/compose-collection.js +88 -0
- package/node_modules/yaml/browser/dist/compose/compose-doc.js +43 -0
- package/node_modules/yaml/browser/dist/compose/compose-node.js +109 -0
- package/node_modules/yaml/browser/dist/compose/compose-scalar.js +86 -0
- package/node_modules/yaml/browser/dist/compose/composer.js +219 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-map.js +115 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +198 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +49 -0
- package/node_modules/yaml/browser/dist/compose/resolve-end.js +37 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +207 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +226 -0
- package/node_modules/yaml/browser/dist/compose/resolve-props.js +146 -0
- package/node_modules/yaml/browser/dist/compose/util-contains-newline.js +34 -0
- package/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +26 -0
- package/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +15 -0
- package/node_modules/yaml/browser/dist/compose/util-map-includes.js +13 -0
- package/node_modules/yaml/browser/dist/doc/Document.js +335 -0
- package/node_modules/yaml/browser/dist/doc/anchors.js +71 -0
- package/node_modules/yaml/browser/dist/doc/applyReviver.js +55 -0
- package/node_modules/yaml/browser/dist/doc/createNode.js +88 -0
- package/node_modules/yaml/browser/dist/doc/directives.js +176 -0
- package/node_modules/yaml/browser/dist/errors.js +57 -0
- package/node_modules/yaml/browser/dist/index.js +17 -0
- package/node_modules/yaml/browser/dist/log.js +11 -0
- package/node_modules/yaml/browser/dist/nodes/Alias.js +118 -0
- package/node_modules/yaml/browser/dist/nodes/Collection.js +147 -0
- package/node_modules/yaml/browser/dist/nodes/Node.js +38 -0
- package/node_modules/yaml/browser/dist/nodes/Pair.js +36 -0
- package/node_modules/yaml/browser/dist/nodes/Scalar.js +24 -0
- package/node_modules/yaml/browser/dist/nodes/YAMLMap.js +144 -0
- package/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +113 -0
- package/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +63 -0
- package/node_modules/yaml/browser/dist/nodes/identity.js +36 -0
- package/node_modules/yaml/browser/dist/nodes/toJS.js +37 -0
- package/node_modules/yaml/browser/dist/parse/cst-scalar.js +214 -0
- package/node_modules/yaml/browser/dist/parse/cst-stringify.js +61 -0
- package/node_modules/yaml/browser/dist/parse/cst-visit.js +97 -0
- package/node_modules/yaml/browser/dist/parse/cst.js +98 -0
- package/node_modules/yaml/browser/dist/parse/lexer.js +721 -0
- package/node_modules/yaml/browser/dist/parse/line-counter.js +39 -0
- package/node_modules/yaml/browser/dist/parse/parser.js +975 -0
- package/node_modules/yaml/browser/dist/public-api.js +102 -0
- package/node_modules/yaml/browser/dist/schema/Schema.js +37 -0
- package/node_modules/yaml/browser/dist/schema/common/map.js +17 -0
- package/node_modules/yaml/browser/dist/schema/common/null.js +15 -0
- package/node_modules/yaml/browser/dist/schema/common/seq.js +17 -0
- package/node_modules/yaml/browser/dist/schema/common/string.js +14 -0
- package/node_modules/yaml/browser/dist/schema/core/bool.js +19 -0
- package/node_modules/yaml/browser/dist/schema/core/float.js +43 -0
- package/node_modules/yaml/browser/dist/schema/core/int.js +38 -0
- package/node_modules/yaml/browser/dist/schema/core/schema.js +23 -0
- package/node_modules/yaml/browser/dist/schema/json/schema.js +62 -0
- package/node_modules/yaml/browser/dist/schema/tags.js +96 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +58 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +26 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +46 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +71 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +67 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +74 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +78 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +39 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +93 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +101 -0
- package/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +146 -0
- package/node_modules/yaml/browser/dist/stringify/stringify.js +129 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +153 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyComment.js +20 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +85 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +25 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyPair.js +150 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyString.js +336 -0
- package/node_modules/yaml/browser/dist/util.js +11 -0
- package/node_modules/yaml/browser/dist/visit.js +233 -0
- package/node_modules/yaml/browser/index.js +5 -0
- package/node_modules/yaml/browser/package.json +3 -0
- package/node_modules/yaml/dist/cli.d.ts +8 -0
- package/node_modules/yaml/dist/cli.mjs +201 -0
- package/node_modules/yaml/dist/compose/compose-collection.d.ts +11 -0
- package/node_modules/yaml/dist/compose/compose-collection.js +90 -0
- package/node_modules/yaml/dist/compose/compose-doc.d.ts +7 -0
- package/node_modules/yaml/dist/compose/compose-doc.js +45 -0
- package/node_modules/yaml/dist/compose/compose-node.d.ts +29 -0
- package/node_modules/yaml/dist/compose/compose-node.js +112 -0
- package/node_modules/yaml/dist/compose/compose-scalar.d.ts +5 -0
- package/node_modules/yaml/dist/compose/compose-scalar.js +88 -0
- package/node_modules/yaml/dist/compose/composer.d.ts +63 -0
- package/node_modules/yaml/dist/compose/composer.js +224 -0
- package/node_modules/yaml/dist/compose/resolve-block-map.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-block-map.js +117 -0
- package/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +11 -0
- package/node_modules/yaml/dist/compose/resolve-block-scalar.js +200 -0
- package/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-block-seq.js +51 -0
- package/node_modules/yaml/dist/compose/resolve-end.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-end.js +39 -0
- package/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -0
- package/node_modules/yaml/dist/compose/resolve-flow-collection.js +209 -0
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +10 -0
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +228 -0
- package/node_modules/yaml/dist/compose/resolve-props.d.ts +23 -0
- package/node_modules/yaml/dist/compose/resolve-props.js +148 -0
- package/node_modules/yaml/dist/compose/util-contains-newline.d.ts +2 -0
- package/node_modules/yaml/dist/compose/util-contains-newline.js +36 -0
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +2 -0
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.js +28 -0
- package/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +3 -0
- package/node_modules/yaml/dist/compose/util-flow-indent-check.js +17 -0
- package/node_modules/yaml/dist/compose/util-map-includes.d.ts +4 -0
- package/node_modules/yaml/dist/compose/util-map-includes.js +15 -0
- package/node_modules/yaml/dist/doc/Document.d.ts +141 -0
- package/node_modules/yaml/dist/doc/Document.js +337 -0
- package/node_modules/yaml/dist/doc/anchors.d.ts +24 -0
- package/node_modules/yaml/dist/doc/anchors.js +76 -0
- package/node_modules/yaml/dist/doc/applyReviver.d.ts +9 -0
- package/node_modules/yaml/dist/doc/applyReviver.js +57 -0
- package/node_modules/yaml/dist/doc/createNode.d.ts +17 -0
- package/node_modules/yaml/dist/doc/createNode.js +90 -0
- package/node_modules/yaml/dist/doc/directives.d.ts +49 -0
- package/node_modules/yaml/dist/doc/directives.js +178 -0
- package/node_modules/yaml/dist/errors.d.ts +21 -0
- package/node_modules/yaml/dist/errors.js +62 -0
- package/node_modules/yaml/dist/index.d.ts +25 -0
- package/node_modules/yaml/dist/index.js +50 -0
- package/node_modules/yaml/dist/log.d.ts +3 -0
- package/node_modules/yaml/dist/log.js +19 -0
- package/node_modules/yaml/dist/nodes/Alias.d.ts +29 -0
- package/node_modules/yaml/dist/nodes/Alias.js +120 -0
- package/node_modules/yaml/dist/nodes/Collection.d.ts +73 -0
- package/node_modules/yaml/dist/nodes/Collection.js +151 -0
- package/node_modules/yaml/dist/nodes/Node.d.ts +53 -0
- package/node_modules/yaml/dist/nodes/Node.js +40 -0
- package/node_modules/yaml/dist/nodes/Pair.d.ts +22 -0
- package/node_modules/yaml/dist/nodes/Pair.js +39 -0
- package/node_modules/yaml/dist/nodes/Scalar.d.ts +47 -0
- package/node_modules/yaml/dist/nodes/Scalar.js +27 -0
- package/node_modules/yaml/dist/nodes/YAMLMap.d.ts +53 -0
- package/node_modules/yaml/dist/nodes/YAMLMap.js +147 -0
- package/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +60 -0
- package/node_modules/yaml/dist/nodes/YAMLSeq.js +115 -0
- package/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +4 -0
- package/node_modules/yaml/dist/nodes/addPairToJSMap.js +65 -0
- package/node_modules/yaml/dist/nodes/identity.d.ts +23 -0
- package/node_modules/yaml/dist/nodes/identity.js +53 -0
- package/node_modules/yaml/dist/nodes/toJS.d.ts +29 -0
- package/node_modules/yaml/dist/nodes/toJS.js +39 -0
- package/node_modules/yaml/dist/options.d.ts +350 -0
- package/node_modules/yaml/dist/parse/cst-scalar.d.ts +64 -0
- package/node_modules/yaml/dist/parse/cst-scalar.js +218 -0
- package/node_modules/yaml/dist/parse/cst-stringify.d.ts +8 -0
- package/node_modules/yaml/dist/parse/cst-stringify.js +63 -0
- package/node_modules/yaml/dist/parse/cst-visit.d.ts +39 -0
- package/node_modules/yaml/dist/parse/cst-visit.js +99 -0
- package/node_modules/yaml/dist/parse/cst.d.ts +109 -0
- package/node_modules/yaml/dist/parse/cst.js +112 -0
- package/node_modules/yaml/dist/parse/lexer.d.ts +87 -0
- package/node_modules/yaml/dist/parse/lexer.js +723 -0
- package/node_modules/yaml/dist/parse/line-counter.d.ts +22 -0
- package/node_modules/yaml/dist/parse/line-counter.js +41 -0
- package/node_modules/yaml/dist/parse/parser.d.ts +84 -0
- package/node_modules/yaml/dist/parse/parser.js +980 -0
- package/node_modules/yaml/dist/public-api.d.ts +44 -0
- package/node_modules/yaml/dist/public-api.js +107 -0
- package/node_modules/yaml/dist/schema/Schema.d.ts +17 -0
- package/node_modules/yaml/dist/schema/Schema.js +39 -0
- package/node_modules/yaml/dist/schema/common/map.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/map.js +19 -0
- package/node_modules/yaml/dist/schema/common/null.d.ts +4 -0
- package/node_modules/yaml/dist/schema/common/null.js +17 -0
- package/node_modules/yaml/dist/schema/common/seq.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/seq.js +19 -0
- package/node_modules/yaml/dist/schema/common/string.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/string.js +16 -0
- package/node_modules/yaml/dist/schema/core/bool.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/bool.js +21 -0
- package/node_modules/yaml/dist/schema/core/float.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/float.js +47 -0
- package/node_modules/yaml/dist/schema/core/int.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/int.js +42 -0
- package/node_modules/yaml/dist/schema/core/schema.d.ts +1 -0
- package/node_modules/yaml/dist/schema/core/schema.js +25 -0
- package/node_modules/yaml/dist/schema/json/schema.d.ts +2 -0
- package/node_modules/yaml/dist/schema/json/schema.js +64 -0
- package/node_modules/yaml/dist/schema/json-schema.d.ts +69 -0
- package/node_modules/yaml/dist/schema/tags.d.ts +48 -0
- package/node_modules/yaml/dist/schema/tags.js +99 -0
- package/node_modules/yaml/dist/schema/types.d.ts +92 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +2 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.js +70 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +7 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.js +29 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +4 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/float.js +50 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +5 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/int.js +76 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +9 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.js +71 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +22 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.js +77 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +10 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +82 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.js +41 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +28 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/set.js +96 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +6 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
- package/node_modules/yaml/dist/stringify/foldFlowLines.d.ts +34 -0
- package/node_modules/yaml/dist/stringify/foldFlowLines.js +151 -0
- package/node_modules/yaml/dist/stringify/stringify.d.ts +21 -0
- package/node_modules/yaml/dist/stringify/stringify.js +132 -0
- package/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +17 -0
- package/node_modules/yaml/dist/stringify/stringifyCollection.js +155 -0
- package/node_modules/yaml/dist/stringify/stringifyComment.d.ts +10 -0
- package/node_modules/yaml/dist/stringify/stringifyComment.js +24 -0
- package/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +4 -0
- package/node_modules/yaml/dist/stringify/stringifyDocument.js +87 -0
- package/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +2 -0
- package/node_modules/yaml/dist/stringify/stringifyNumber.js +27 -0
- package/node_modules/yaml/dist/stringify/stringifyPair.d.ts +3 -0
- package/node_modules/yaml/dist/stringify/stringifyPair.js +152 -0
- package/node_modules/yaml/dist/stringify/stringifyString.d.ts +9 -0
- package/node_modules/yaml/dist/stringify/stringifyString.js +338 -0
- package/node_modules/yaml/dist/test-events.d.ts +4 -0
- package/node_modules/yaml/dist/test-events.js +134 -0
- package/node_modules/yaml/dist/util.d.ts +16 -0
- package/node_modules/yaml/dist/util.js +28 -0
- package/node_modules/yaml/dist/visit.d.ts +102 -0
- package/node_modules/yaml/dist/visit.js +236 -0
- package/node_modules/yaml/package.json +97 -0
- package/node_modules/yaml/util.js +2 -0
- package/package.json +54 -0
- package/profiles/card.md +65 -0
- package/profiles/pillars.md +31 -0
- package/profiles/system.md +56 -0
- package/schemas/card.schema.json +30 -0
- package/skills/gcf-adopt/SKILL.md +41 -0
- package/skills/gcf-audit/SKILL.md +27 -0
- package/skills/gcf-card/SKILL.md +35 -0
- package/skills/gcf-debate/SKILL.md +33 -0
- package/skills/gcf-ingest/SKILL.md +38 -0
- package/skills/gcf-init/SKILL.md +32 -0
- package/skills/gcf-verdict/SKILL.md +32 -0
- package/skills/gcf-vision/SKILL.md +33 -0
- package/templates/PILLARS.md +8 -0
- package/templates/backlog.md +4 -0
- package/templates/card.md +34 -0
- package/templates/cnlp.config.json +8 -0
- package/templates/config.yml +8 -0
- package/templates/system.md +22 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cnlp-docset
|
|
3
|
+
description: Write the documentation of a library as a CNL-P document set — the index carrying one whole working program, the concept, API and task pages, and the closed catalog of everything the library offers.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
mode: cnlp_docset_authoring
|
|
7
|
+
|
|
8
|
+
purpose:
|
|
9
|
+
- write the documentation of 1 library as a CNL-P document set, so an agent loads 1 page at a time instead of loading everything to answer anything
|
|
10
|
+
- aim at accuracy: fewer wrong calls written against the library, and cost is what falls out of that rather than what drives it
|
|
11
|
+
- keep the catalog complete, so a reader tells a capability the library lacks from one the set left out
|
|
12
|
+
- work from whatever the operator found, in any mix, and state on every page what that page rests on
|
|
13
|
+
|
|
14
|
+
inputs:
|
|
15
|
+
- sources: every repository, specification, document and example the operator supplies for 1 library, in any mix
|
|
16
|
+
- source_weight: what a source proves, from 1 the strongest to 5 the weakest, which decides where a contract comes from
|
|
17
|
+
- weight 1: the declarations read from the library source
|
|
18
|
+
- weight 2: a specification the library publishes for a machine to read
|
|
19
|
+
- weight 3: the prose documentation the library publishes for a person to read
|
|
20
|
+
- weight 4: the examples and the tests the library ships
|
|
21
|
+
- weight 5: a file derived from a source nobody here read, such as a vendor dump of the documentation
|
|
22
|
+
- output_directory: where the set is written; its name is the name of the set, and it holds the set and nothing else
|
|
23
|
+
|
|
24
|
+
preconditions:
|
|
25
|
+
- `npx cnlp print format --path` resolves, whether the operator installed the kit globally or as a dependency of some project
|
|
26
|
+
- `npx cnlp check <output_directory>` reaches the set by path: a produced set carries no config file, and it needs no project around it
|
|
27
|
+
- every source sits at a fixed revision or a fixed version, so every page states what 1 release says
|
|
28
|
+
|
|
29
|
+
scope:
|
|
30
|
+
- act on the output directory the operator named, and write the index, the concept pages, the API pages and the task pages under it
|
|
31
|
+
- write nothing else into that directory: a set is documentation handed to whoever asked for it, and a config, a dependency or a skill copy there belongs to a project rather than to a set
|
|
32
|
+
- leave every other set alone: a package that corrects another package states the correction in its own index, and edits no page of the set it corrects
|
|
33
|
+
- stop at authoring: a repository that will hold this set among its own documents runs `npx cnlp init` and names it in `docsets:`, which is adoption and not this skill's work
|
|
34
|
+
|
|
35
|
+
forbidden_behaviors:
|
|
36
|
+
- do not invent a signature, a parameter or a default: read each one from the source that states it
|
|
37
|
+
- do not state a contract at a weight its source does not carry: a claim read in prose stays a claim read in prose, and writing it as a declaration tells the reader it came from one
|
|
38
|
+
- do not drop a capability from the catalog: a capability with no record gets invented again, or found in the source and called anyway
|
|
39
|
+
- do not mark a record `covered` before its page exists: the value is held to its vocabulary and not to the truth, so `covered` with no page sends the reader nowhere
|
|
40
|
+
- do not mark a capability `avoid` on judgment alone: that is a claim about the library, and a wrong one steers a reader away from the call the task needed
|
|
41
|
+
- do not write a second example on an API page: a compositional example is a task page
|
|
42
|
+
- do not write 1 page per member: a group of overloads is 1 page, because a reader picks between them once
|
|
43
|
+
- do not name the library inside a packaged profile: a vocabulary of your own goes in `custom_sections:` of a local copy of that profile
|
|
44
|
+
|
|
45
|
+
outputs:
|
|
46
|
+
- 1 document set: the index, the concept pages, the API pages and the task pages
|
|
47
|
+
- the catalog as the closed list of the library's capabilities, every record at `covered`, `source` or `avoid`
|
|
48
|
+
- a report: the capabilities carrying a page, the ones left at `source`, the weight the set rests on, and the regions `excluded:` names with their reasons
|
|
49
|
+
|
|
50
|
+
workflow:
|
|
51
|
+
1. run `npx cnlp print format` and read it in full, §9 included: it states what a page reference is, and which of its rules a review holds rather than the checker
|
|
52
|
+
2. read the `docset`, `concept`, `api` and `task` profiles through `npx cnlp print <name>`: their `note:` keys carry the reason behind each block, and the rules and the values are read together
|
|
53
|
+
3. list every source the operator supplied and name the weight each one carries: the strongest weight in that list bounds what every page below claims, so report it before writing anything
|
|
54
|
+
4. run the clone or the install command each source needs, at a fixed revision, and record the library, the version and the revision in `identity:`
|
|
55
|
+
5. fill `derived_from:` in `identity:` with those sources and their weights, so a reader tells a set written from declarations from a set written from prose
|
|
56
|
+
6. list every capability of the library, taking each one from the strongest source that states it: a source at weight 3 or below covers what its author chose to cover, so a capability it omits is a capability still to find
|
|
57
|
+
7. fill `catalog:` with 1 record per capability, every one at `status: source`, `read:` naming where to read it — the file, or the document and the anchor inside it
|
|
58
|
+
8. pick the type names of the set's running example once, before any page: every example on every page uses them, so a reader assembling several pages gets 1 program instead of fragments
|
|
59
|
+
9. write `canonical_use:` as 1 complete working use of the library, carrying every load-bearing element, because a reader holding only the index writes the common case from it
|
|
60
|
+
10. map each part of `canonical_use:` onto the page owning its detail, in `walkthrough:`
|
|
61
|
+
11. write the concept pages next: an API page points back to an invariant instead of restating it, so the model exists before the pages resting on it
|
|
62
|
+
12. write 1 API page per capability, and state the pick between its symbols in `choose:`
|
|
63
|
+
13. write 1 task page per goal a reader arrives with, and put the multi-call composition there
|
|
64
|
+
14. update each catalog record to `covered` as its page lands, and fill `excluded:` with every whole region the set leaves out, each with its reason
|
|
65
|
+
15. fill `companions:` when another package extends this library, and `overrides:` when this package corrects a page of the set it extends
|
|
66
|
+
16. run `npx cnlp check <output_directory>` and fix what it reports: it resolves every reference in the set, and reports a page no other page reaches
|
|
67
|
+
17. read the finished set for the rules no check reaches: 1 fact stated on 1 page, 1 running example across the set, 1 page per routed name, and the keys a status implies
|
|
68
|
+
18. report the capabilities covered, the ones left at `source`, the weight the set rests on, and any defect the reading turned up in the library itself
|
|
69
|
+
|
|
70
|
+
invocation:
|
|
71
|
+
- Claude Code: `/cnlp-docset <sources> <output-directory>`, once this folder sits in `.claude/skills/`
|
|
72
|
+
- Codex: `$cnlp-docset <sources> <output-directory>`, once this folder sits in its skills directory
|
|
73
|
+
- any other agent: read `skills/cnlp-docset/SKILL.md` and follow it; the body is the instruction
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cnlp-migrate
|
|
3
|
+
description: Convert a repository's technical documents to the CNL-P format — group them by kind, author or copy the profile each kind is held to, then rewrite each body into its blocks without changing what any document says.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
mode: cnlp_migration
|
|
7
|
+
|
|
8
|
+
purpose:
|
|
9
|
+
- rewrite existing documents into CNL-P, so a reader stops inferring which sentence is intent, which is policy, and which is a step
|
|
10
|
+
- author or copy the profile of every kind of document in the corpus, and rewrite no body until it exists
|
|
11
|
+
- carry every rule across unchanged: a format migration is not a redesign
|
|
12
|
+
|
|
13
|
+
inputs:
|
|
14
|
+
- documents_directory
|
|
15
|
+
- optional_single_document
|
|
16
|
+
|
|
17
|
+
preconditions:
|
|
18
|
+
- `cnlp-kit` is a dependency of this repository and `npx cnlp print format --path` resolves
|
|
19
|
+
- `cnlp.config.json` names the corpus; `npx cnlp init` writes the entries the repository's own layout already supports
|
|
20
|
+
- the working tree is clean, so the rewrite is reviewable as its own diff
|
|
21
|
+
|
|
22
|
+
scope:
|
|
23
|
+
- act on the document bodies 1 corpus entry maps to, and on the local copy of the profile that entry names
|
|
24
|
+
- leave frontmatter alone wherever a runtime parses it: a skill's `name` and `description` drive discovery and routing
|
|
25
|
+
|
|
26
|
+
forbidden_behaviors:
|
|
27
|
+
- do not invent a rule the source never stated
|
|
28
|
+
- do not drop a rule silently: state every deliberate drop with its reason
|
|
29
|
+
- do not add a block the profile does not declare: edit the profile first, or put the content in a declared block
|
|
30
|
+
- do not change what a document says while changing how it reads
|
|
31
|
+
- do not hold 2 kinds of document to 1 profile: a block 1 kind needs and another cannot use is 2 profiles wearing 1 name
|
|
32
|
+
- do not resolve a contradiction found in the source prose: report it, because it is a decision the operator owns
|
|
33
|
+
|
|
34
|
+
outputs:
|
|
35
|
+
- 1 profile per kind of document in the corpus, in the directory `cnlp.config.json` names, its `custom_sections` filled from the inventory
|
|
36
|
+
- `cnlp.config.json` carrying 1 corpus entry per kind
|
|
37
|
+
- the rewritten bodies, 1 commit per document or 1 per batch, as the operator prefers
|
|
38
|
+
- per document: the rules carried in, the rules dropped with their reasons, the size delta and its cause
|
|
39
|
+
|
|
40
|
+
workflow:
|
|
41
|
+
1. run `npx cnlp print format` and read it in full: the rules live there, and a profile declares values against them rather than rules of its own
|
|
42
|
+
2. list every document to convert, and group them by kind: 1 kind is 1 profile and 1 corpus entry
|
|
43
|
+
3. read the packaged profile nearest each kind through `npx cnlp print <name>`, and compare what it declares against the documents in hand
|
|
44
|
+
4. write a profile for any kind no packaged profile fits, against `profiles/profile.md`: a new kind of document is 1 new profile and no change to the checker
|
|
45
|
+
5. copy every packaged profile the corpus uses into the directory `profiles:` names, so the vocabulary filled below survives an upgrade of the package
|
|
46
|
+
6. list every top-level `key:` those documents already use, and every recurring idea that is prose today
|
|
47
|
+
7. map each name onto a declared block, or onto a custom section name, applying the placement rule in the standard
|
|
48
|
+
8. fill `custom_sections:` in each copied profile with the names that survive, and delete its `- none` line
|
|
49
|
+
9. stop and ask when a name has no home: a new block changes the profile, which is the operator's decision
|
|
50
|
+
10. update `cnlp.config.json` with 1 corpus entry per kind, and run `npx cnlp check` to verify every entry matches a file
|
|
51
|
+
11. pick a single document and carry it through steps 12 to 17 before touching the rest
|
|
52
|
+
12. list the source's rules, including the ones buried in a subordinate clause
|
|
53
|
+
13. rewrite the body into the profile's blocks, 1 idea per line, in the declared order
|
|
54
|
+
14. tick each listed rule against the result, and state every deliberate drop with its reason
|
|
55
|
+
15. name any rule in the result that has no origin in the source: that is an addition, not a migration
|
|
56
|
+
16. measure the size and state the cause of any growth, per the migration procedure in the standard
|
|
57
|
+
17. run `npx cnlp check` and fix what it reports
|
|
58
|
+
18. repeat steps 12 to 17 for each remaining document, kind by kind
|
|
59
|
+
19. report per document: rules in, rules dropped, size delta, and the judgment calls left open
|
|
60
|
+
|
|
61
|
+
invocation:
|
|
62
|
+
- Claude Code: `/cnlp-migrate <documents-directory>`, once this folder sits in `.claude/skills/`
|
|
63
|
+
- Codex: `$cnlp-migrate <documents-directory>`, once this folder sits in its skills directory
|
|
64
|
+
- any other agent: read `skills/cnlp-migrate/SKILL.md` and follow it; the body is the instruction
|