@flancer32/skill-adsm-ctx 0.2.1 → 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.
Files changed (91) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +37 -14
  3. package/bin/adsm-ctx.mjs +44 -0
  4. package/package.json +65 -11
  5. package/skill/SKILL.md +2 -2
  6. package/skill/references/context-lifecycle.md +3 -3
  7. package/skill/references/document-projections.md +7 -65
  8. package/skill/references/documentation-quality-audit.md +22 -14
  9. package/skill/references/semantic-skins.md +65 -0
  10. package/skill/templates/work/context/semantic-skin.md +11 -22
  11. package/src/Cli/Command/Design.mjs +17 -0
  12. package/src/Cli/Command/Init.mjs +22 -0
  13. package/src/Cli/Command/InstallSkill.mjs +18 -0
  14. package/src/Cli/Command/Upgrade.mjs +19 -0
  15. package/src/Cli/Command/Validate.mjs +19 -0
  16. package/src/Shared/Constants.mjs +0 -4
  17. package/src/Validate/Service.mjs +14 -178
  18. package/types.d.ts +5 -2
  19. package/.github/workflows/flows-app.yaml +0 -95
  20. package/AGENTS.md +0 -112
  21. package/bin/cli.mjs +0 -55
  22. package/ctx/AGENTS.md +0 -44
  23. package/ctx/README.md +0 -24
  24. package/ctx/adsm.json +0 -5
  25. package/ctx/agent/AGENTS.md +0 -41
  26. package/ctx/agent/flows/.img/flancer32-skill-adsm-ctx-github-flows.png +0 -0
  27. package/ctx/agent/flows/AGENTS.md +0 -37
  28. package/ctx/agent/flows/cfg/issues/labeled/accepted/profile.json +0 -25
  29. package/ctx/agent/flows/cfg/issues/labeled/accepted/prompt.md +0 -104
  30. package/ctx/agent/flows/cfg/issues/labeled/clarification-provided/profile.json +0 -15
  31. package/ctx/agent/flows/cfg/issues/labeled/clarification-provided/prompt.md +0 -63
  32. package/ctx/agent/flows/cfg/issues/opened/admission/profile.json +0 -14
  33. package/ctx/agent/flows/cfg/issues/opened/admission/prompt.md +0 -110
  34. package/ctx/agent/flows/cfg/profile.json +0 -40
  35. package/ctx/agent/flows/cfg/pull_request/closed/merged/profile.json +0 -15
  36. package/ctx/agent/flows/cfg/pull_request/closed/merged/prompt.md +0 -41
  37. package/ctx/agent/flows/cfg/pull_request/labeled/needs-fix/profile.json +0 -25
  38. package/ctx/agent/flows/cfg/pull_request/labeled/needs-fix/prompt.md +0 -79
  39. package/ctx/agent/flows/cfg/pull_request/labeled/ready-for-validation/profile.json +0 -15
  40. package/ctx/agent/flows/cfg/pull_request/labeled/ready-for-validation/prompt.md +0 -72
  41. package/ctx/agent/flows/cfg/pull_request/labeled/verified/profile.json +0 -15
  42. package/ctx/agent/flows/cfg/pull_request/labeled/verified/prompt.md +0 -48
  43. package/ctx/agent/flows/deployment.md +0 -116
  44. package/ctx/agent/flows/labels.md +0 -108
  45. package/ctx/agent/flows/overview.md +0 -82
  46. package/ctx/agent/prompt/cli/ai-intro.md +0 -141
  47. package/ctx/assets/.gitkeep +0 -1
  48. package/ctx/docs/AGENTS.md +0 -121
  49. package/ctx/docs/ai-intro.md +0 -37
  50. package/ctx/docs/architecture/AGENTS.md +0 -98
  51. package/ctx/docs/architecture/behavior.md +0 -68
  52. package/ctx/docs/architecture/checklists.md +0 -48
  53. package/ctx/docs/architecture/constraints.md +0 -53
  54. package/ctx/docs/architecture/constraints.skin.en.md +0 -38
  55. package/ctx/docs/architecture/decisions.md +0 -118
  56. package/ctx/docs/architecture/integration.md +0 -31
  57. package/ctx/docs/architecture/overview.md +0 -76
  58. package/ctx/docs/architecture/state.md +0 -50
  59. package/ctx/docs/architecture/structure.md +0 -38
  60. package/ctx/docs/architecture/supervision.md +0 -71
  61. package/ctx/docs/code/AGENTS.md +0 -51
  62. package/ctx/docs/code/overview.md +0 -53
  63. package/ctx/docs/code/testing.md +0 -26
  64. package/ctx/docs/environment/AGENTS.md +0 -50
  65. package/ctx/docs/environment/overview.md +0 -33
  66. package/ctx/docs/filesystem.md +0 -44
  67. package/ctx/docs/product/AGENTS.md +0 -51
  68. package/ctx/docs/product/domain.md +0 -63
  69. package/ctx/docs/product/domain.skin.en.md +0 -40
  70. package/ctx/docs/product/glossary.md +0 -31
  71. package/ctx/docs/product/overview.md +0 -112
  72. package/ctx/docs/product/overview.skin.en.md +0 -38
  73. package/ctx/docs/product/roles.md +0 -17
  74. package/ctx/docs/product/use-cases.md +0 -15
  75. package/src/Bootstrap/Cli.mjs +0 -62
  76. package/src/Bootstrap.mjs +0 -108
  77. package/test/integration/.gitkeep +0 -1
  78. package/test/integration/cli-help.test.mjs +0 -15
  79. package/test/integration/cli-init-validate.test.mjs +0 -223
  80. package/test/integration/cli-install-skill.test.mjs +0 -41
  81. package/test/unit/Bootstrap/Cli.test.mjs +0 -23
  82. package/test/unit/Bootstrap.test.mjs +0 -53
  83. package/test/unit/Design/Service.test.mjs +0 -11
  84. package/test/unit/Init/Service.test.mjs +0 -51
  85. package/test/unit/Shared/Constants.test.mjs +0 -21
  86. package/test/unit/Shared/CopyDirectory.test.mjs +0 -31
  87. package/test/unit/Shared/Metadata.test.mjs +0 -9
  88. package/test/unit/Shared/Path.test.mjs +0 -11
  89. package/test/unit/Skill/Installer.test.mjs +0 -20
  90. package/test/unit/Upgrade/Service.test.mjs +0 -13
  91. package/test/unit/Validate/Service.test.mjs +0 -760
package/CHANGELOG.md ADDED
@@ -0,0 +1,14 @@
1
+ # Changelog
2
+
3
+ All notable changes to this package are documented in this file.
4
+
5
+ ## 0.3.0 - 2026-08-14
6
+
7
+ ### Changed
8
+
9
+ - Made global npm installation the canonical distribution for the Node.js runtime and agent skill payload.
10
+ - Added the public `adsm-ctx` executable, which launches this package through TeqFW explicit-host mode.
11
+ - Replaced documented `teq adsm-ctx:*` user commands with short `adsm-ctx` commands.
12
+ - Updated the bundled skill installation guidance and cognitive context to describe the version-matched payload workflow.
13
+
14
+ ### Dependencies
package/README.md CHANGED
@@ -4,7 +4,7 @@ Build and evolve project cognitive context for Agent-Driven Software Management
4
4
 
5
5
  ## Overview
6
6
 
7
- `@flancer32/skill-adsm-ctx` is a private ADSM skill package for initializing, designing, validating, auditing, compressing, and upgrading project cognitive context.
7
+ `@flancer32/skill-adsm-ctx` is an ADSM skill package for initializing, designing, validating, auditing, compressing, and upgrading project cognitive context.
8
8
 
9
9
  It manages the lifecycle of project context as its primary object. It does not define business requirements, backend architecture, browser architecture, deployment logic, or domain-specific documentation on its own.
10
10
 
@@ -49,32 +49,45 @@ This package does not:
49
49
  ## Requirements
50
50
 
51
51
  - Node.js with npm.
52
- - GitHub SSH access to the repository for global installation from GitHub.
52
+ - An agent skills root, normally `~/.agents/skills`.
53
53
 
54
- ## Global Installation
54
+ ## Installation And Update
55
55
 
56
- Install the package globally from GitHub:
56
+ Install the package globally once for the current user:
57
57
 
58
58
  ```sh
59
- npm install -g git+ssh://git@github.com/flancer32/skill-adsm-ctx.git
59
+ npm install --global @flancer32/skill-adsm-ctx
60
60
  ```
61
61
 
62
- This provides the CLI command:
62
+ Install its matching agent payload into the selected skills root:
63
63
 
64
64
  ```sh
65
- adsm-ctx
65
+ adsm-ctx install-skill "$HOME/.agents/skills"
66
+ ```
67
+
68
+ The command replaces only `$HOME/.agents/skills/adsm-ctx`; it does not modify other installed skills.
69
+
70
+ Verify the runtime and payload:
71
+
72
+ ```sh
73
+ adsm-ctx --help
74
+ test -f "$HOME/.agents/skills/adsm-ctx/SKILL.md"
66
75
  ```
67
76
 
68
- To install the skill payload for agent use:
77
+ To update, update the global npm package and reinstall its payload:
69
78
 
70
79
  ```sh
80
+ npm update --global @flancer32/skill-adsm-ctx
71
81
  adsm-ctx install-skill "$HOME/.agents/skills"
72
82
  ```
73
83
 
74
- This copies the payload to:
84
+ The npm package is the canonical distribution of both artifacts. Its public `adsm-ctx` launcher runs the package as an explicit TeqFW host; the `install-skill` command copies the version-matched `skill/` bundle. Do not copy only `SKILL.md` manually: the payload also needs its references and templates.
75
85
 
76
- ```text
77
- $HOME/.agents/skills/adsm-ctx
86
+ For a project-pinned CI or team workflow, install the package locally and invoke the same public launcher with npm:
87
+
88
+ ```sh
89
+ npm install --save-dev @flancer32/skill-adsm-ctx
90
+ npm exec -- adsm-ctx validate .
78
91
  ```
79
92
 
80
93
  ## CLI Usage
@@ -121,6 +134,12 @@ Install the bundled skill payload:
121
134
  adsm-ctx install-skill <skills-root>
122
135
  ```
123
136
 
137
+ Advanced TeqFW users may invoke the metadata-declared commands directly when `teq` is installed:
138
+
139
+ ```sh
140
+ teq --host @flancer32/skill-adsm-ctx adsm-ctx:validate .
141
+ ```
142
+
124
143
  ## Lifecycle Modes
125
144
 
126
145
  ### `init`
@@ -133,7 +152,7 @@ Provides guidance for classifying the project, choosing relevant documentation b
133
152
 
134
153
  ### `validate`
135
154
 
136
- Checks baseline paths, required documentation levels, required `AGENTS.md` files, metadata, body/skin projection shape, local markdown document links, and lightweight skin-shape heuristics. When the repository provides a deterministic validator, run it and report errors and warnings separately. Validation reports findings without modifying project content.
155
+ Checks baseline paths, required documentation levels, required `AGENTS.md` files, metadata, body/skin pairing, localized skin names, local markdown document links, and structural projection checks. When the repository provides a deterministic validator, run it and report errors and warnings separately. Validation reports findings without modifying project content.
137
156
 
138
157
  ### `quality-audit`
139
158
 
@@ -199,7 +218,7 @@ overview.skin.en.md
199
218
  overview.skin.ru.md
200
219
  ```
201
220
 
202
- Use lowercase ISO 639-1 codes (`en`, `ru`, `es`); add a regional tag only for a genuine regional distinction. `overview.skin.md` is invalid. All skins with the same basename form one group with the canonical document, and may adapt the presentation for people rather than be literal translations.
221
+ Use lowercase ISO 639-1 codes (`en`, `ru`, `es`); add a regional tag only for a genuine regional distinction. `overview.skin.md` is invalid. All skins with the same basename form one group with the canonical document, and may adapt the presentation for people rather than be literal translations. A skin uses a compact structure appropriate to its document type; its paired base is derived from the filename, so it does not need an `Agent Document` link.
203
222
 
204
223
  For `AGENTS.md` authoring, `Level Boundary` sections should stay compact and guardrail-oriented. They are intended to prevent likely scope drift, not to become exhaustive specifications.
205
224
 
@@ -228,7 +247,7 @@ When no specialized skill is available, this package should create only generic
228
247
  Run the CLI directly from the repository:
229
248
 
230
249
  ```sh
231
- node ./bin/cli.mjs --help
250
+ npm exec -- adsm-ctx --help
232
251
  ```
233
252
 
234
253
  Run the tests:
@@ -237,6 +256,10 @@ Run the tests:
237
256
  npm test
238
257
  ```
239
258
 
259
+ ## Changelog
260
+
261
+ See [CHANGELOG.md](CHANGELOG.md) for the prepared, unpublished 0.3.0 release notes.
262
+
240
263
  ## Status
241
264
 
242
265
  This repository contains a working skeleton intended as a foundation for future ADSM context lifecycle tooling.
@@ -0,0 +1,44 @@
1
+ #!/usr/bin/env node
2
+ // @ts-check
3
+
4
+ import {spawnSync} from "node:child_process";
5
+ import {createRequire} from "node:module";
6
+ import path from "node:path";
7
+ import processModule from "node:process";
8
+ import {fileURLToPath} from "node:url";
9
+
10
+ const require = createRequire(import.meta.url);
11
+ const packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
12
+ const teqPath = require.resolve("@teqfw/cli/bin/teq.mjs");
13
+ const hostName = "@flancer32/skill-adsm-ctx";
14
+ const commandNames = new Set(["init", "design", "validate", "upgrade", "install-skill"]);
15
+
16
+ const args = normalizeArgs(processModule.argv.slice(2));
17
+ const result = spawnSync(processModule.execPath, [
18
+ teqPath,
19
+ "--host", hostName,
20
+ "--host-root", packageRoot,
21
+ ...args,
22
+ ], {
23
+ cwd: processModule.cwd(),
24
+ env: processModule.env,
25
+ stdio: "inherit",
26
+ });
27
+
28
+ if (result.error) {
29
+ throw result.error;
30
+ }
31
+ processModule.exitCode = typeof result.status === "number" ? result.status : 1;
32
+
33
+ /**
34
+ * Maps the public command surface onto the metadata-declared TeqFW commands.
35
+ *
36
+ * @param {string[]} input
37
+ * @returns {string[]}
38
+ */
39
+ function normalizeArgs(input) {
40
+ if (input.length === 0 || input[0] === "--help" || input[0] === "-h") return ["help"];
41
+ if (input[0] === "--version" || input[0] === "-v") return ["version"];
42
+ if (commandNames.has(input[0])) return [`adsm-ctx:${input[0]}`, ...input.slice(1)];
43
+ return input;
44
+ }
package/package.json CHANGED
@@ -1,33 +1,87 @@
1
1
  {
2
2
  "name": "@flancer32/skill-adsm-ctx",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "Build and evolve project cognitive context for Agent-Driven Software Management (ADSM).",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "engines": {
8
8
  "node": ">=20"
9
9
  },
10
+ "types": "types.d.ts",
11
+ "files": [
12
+ "skill/",
13
+ "bin/",
14
+ "src/",
15
+ "migrations/",
16
+ "jsconfig.json",
17
+ "README.md",
18
+ "LICENSE",
19
+ "CHANGELOG.md",
20
+ "types.d.ts"
21
+ ],
10
22
  "bin": {
11
- "adsm-ctx": "bin/cli.mjs"
23
+ "adsm-ctx": "bin/adsm-ctx.mjs"
12
24
  },
13
- "types": "types.d.ts",
14
25
  "scripts": {
15
- "start": "node ./bin/cli.mjs",
16
- "install:skill": "node ./bin/cli.mjs install-skill \"$HOME/.agents/skills\"",
26
+ "start": "adsm-ctx",
27
+ "init": "adsm-ctx init",
28
+ "design": "adsm-ctx design",
29
+ "validate": "adsm-ctx validate",
30
+ "upgrade": "adsm-ctx upgrade",
31
+ "install:skill": "adsm-ctx install-skill \"$HOME/.agents/skills\"",
17
32
  "test:unit": "find test/unit -name '*.test.mjs' -print0 | xargs -0 -r node --test",
18
33
  "test:integration": "find test/integration -name '*.test.mjs' -print0 | xargs -0 -r node --test",
19
34
  "test": "npm run test:unit && npm run test:integration"
20
35
  },
21
36
  "dependencies": {
37
+ "@teqfw/cli": "^2.2.0",
22
38
  "@teqfw/di": ">=2.5.1 <3.0.0"
23
39
  },
24
40
  "teqfw": {
25
- "namespaces": [
26
- {
27
- "prefix": "Fl32_Skill_Adsm_Ctx_",
28
- "path": "./src",
29
- "ext": ".mjs"
41
+ "fw": {
42
+ "di": {
43
+ "namespaces": [
44
+ {
45
+ "prefix": "Fl32_Skill_Adsm_Ctx_",
46
+ "path": "./src",
47
+ "ext": ".mjs"
48
+ }
49
+ ]
50
+ },
51
+ "cli": {
52
+ "commands": [
53
+ {
54
+ "id": "adsm-ctx:init",
55
+ "summary": "Initialize an ADSM context.",
56
+ "arguments": [{"name": "target-path", "kind": "string", "description": "Project root; defaults to the current working directory."}],
57
+ "component": "Fl32_Skill_Adsm_Ctx_Cli_Command_Init$"
58
+ },
59
+ {
60
+ "id": "adsm-ctx:design",
61
+ "summary": "Show ADSM context design guidance.",
62
+ "arguments": [{"name": "target-path", "kind": "string", "description": "Project root; defaults to the current working directory."}],
63
+ "component": "Fl32_Skill_Adsm_Ctx_Cli_Command_Design$"
64
+ },
65
+ {
66
+ "id": "adsm-ctx:validate",
67
+ "summary": "Validate an ADSM context.",
68
+ "arguments": [{"name": "target-path", "kind": "string", "description": "Project root; defaults to the current working directory."}],
69
+ "component": "Fl32_Skill_Adsm_Ctx_Cli_Command_Validate$"
70
+ },
71
+ {
72
+ "id": "adsm-ctx:upgrade",
73
+ "summary": "Upgrade an ADSM context.",
74
+ "arguments": [{"name": "target-path", "kind": "string", "description": "Project root; defaults to the current working directory."}],
75
+ "component": "Fl32_Skill_Adsm_Ctx_Cli_Command_Upgrade$"
76
+ },
77
+ {
78
+ "id": "adsm-ctx:install-skill",
79
+ "summary": "Install the bundled agent skill payload.",
80
+ "arguments": [{"name": "skills-root", "kind": "string", "required": true, "description": "Directory that contains installed agent skills."}],
81
+ "component": "Fl32_Skill_Adsm_Ctx_Cli_Command_InstallSkill$"
82
+ }
83
+ ]
30
84
  }
31
- ]
85
+ }
32
86
  }
33
87
  }
package/skill/SKILL.md CHANGED
@@ -13,7 +13,7 @@ Humans own direction, accepted meaning, approval, and accountability. Agents ref
13
13
 
14
14
  1. Identify the target repository and the requested lifecycle mode.
15
15
  2. Read the applicable `AGENTS.md` hierarchy. If `ctx/` exists, read `ctx/AGENTS.md` and `ctx/docs/filesystem.md` before deeper context work.
16
- 3. Read [document-projections.md](references/document-projections.md) for any work under `ctx/docs/`.
16
+ 3. Read [document-projections.md](references/document-projections.md) for any work under `ctx/docs/`; for skin work, also read [semantic-skins.md](references/semantic-skins.md).
17
17
  4. Use the routing table below, then load only the references needed for the requested mode.
18
18
 
19
19
  ## Route The Request
@@ -30,7 +30,7 @@ Humans own direction, accepted meaning, approval, and accountability. Agents ref
30
30
  | `ctx/agent/`, templates, or generic ownership boundary | Load [orchestration-model.md](references/orchestration-model.md). |
31
31
  | Browser, backend, data, deployment, or concrete tool workflow | Load [specialized-skills.md](references/specialized-skills.md), then use a matching available specialized skill. |
32
32
 
33
- `install-skill` installs this payload into a skills root; it is not a lifecycle mode.
33
+ `adsm-ctx install-skill <skills-root>` installs this payload from the globally installed npm package into a skills root; it is not a lifecycle mode.
34
34
 
35
35
  ## Non-Negotiable Boundaries
36
36
 
@@ -1,7 +1,7 @@
1
1
  # Context Lifecycle
2
2
 
3
3
  - Path: `skill/references/context-lifecycle.md`
4
- - Changed: `20260715`
4
+ - Changed: `20260814`
5
5
 
6
6
  `adsm-ctx` manages six lifecycle modes for project cognitive context.
7
7
 
@@ -13,7 +13,7 @@ The skill manages generic lifecycle structure. It does not define a project's bu
13
13
 
14
14
  - `init` creates the baseline. Create the root `AGENTS.md`, `ctx/` baseline, starter documents, and `ctx/adsm.json` only where they are missing. Use `templates/ctx/`; create placeholders rather than project facts when context is unknown.
15
15
  - `design` shapes context for the actual project. Classify the project, choose justified generic branches and nested structure, decide whether semantic skins are needed, and route specializations. Use [design-questionnaire.md](design-questionnaire.md) and [specialized-skills.md](specialized-skills.md).
16
- - `validate` checks structural integrity without destructive edits. Check baseline paths, context metadata, the four top-level documentation levels, local `AGENTS.md` placement, document headers, agent/skin pairs, required skin structure, local document links, and `ctx/assets/**` exclusion.
16
+ - `validate` checks structural integrity without destructive edits. Check baseline paths, context metadata, the four top-level documentation levels, local `AGENTS.md` placement, document headers, agent/skin pairs, reversible skin naming, compactness, local document links, and `ctx/assets/**` exclusion.
17
17
  - `quality-audit` guides semantic documentation review. It is report-only by default; use [documentation-quality-audit.md](documentation-quality-audit.md) after validation.
18
18
  - `documentation-compression` guides controlled documentation rewrite that preserves accepted meaning. Use [documentation-compression.md](documentation-compression.md); do not treat it as an automatic semantic rewrite.
19
19
  - `upgrade` migrates context non-destructively. Read metadata first, preserve project-specific content, and use [upgrade-policy.md](upgrade-policy.md) for safe boundaries.
@@ -24,7 +24,7 @@ The lifecycle is iterative. A project may return to `design`, `validate`, `quali
24
24
 
25
25
  `documentation-compression` is an agent-guided rewrite mode. It is not a CLI semantic scoring command and must not change project meaning.
26
26
 
27
- The package-level `install-skill` command installs the skill payload into an agent skills root.
27
+ The package-level `adsm-ctx install-skill <skills-root>` command installs the version-matched skill payload into an agent skills root.
28
28
 
29
29
  It is not a context lifecycle mode.
30
30
 
@@ -1,7 +1,7 @@
1
1
  # Documentation Projections
2
2
 
3
3
  - Path: `skill/references/document-projections.md`
4
- - Changed: `20260715`
4
+ - Changed: `20260814`
5
5
 
6
6
  Use this reference whenever an agent initializes, designs, validates, audits, compresses, or upgrades ADSM documentation under `ctx/docs/`.
7
7
 
@@ -59,71 +59,15 @@ An agent document should reduce ambiguity and statistical guessing by making exp
59
59
 
60
60
  ## Semantic Skins
61
61
 
62
- A skin is a `*.skin.<lang>.md` document in the same directory as its matching agent document.
62
+ A skin is a `*.skin.<lang>.md` document beside its paired agent document.
63
63
 
64
- Pairing rule:
64
+ `name.md → name.skin.<lang>.md` and `name.skin.<lang>.md → name.md` are reversible pairing rules; an unmarked `name.skin.md` is invalid.
65
65
 
66
- ```text
67
- name.md
68
- name.skin.en.md
69
- name.skin.ru.md
70
- ```
71
-
72
- Use a lowercase ISO 639-1 language code such as `en`, `ru`, or `es`; use a regional tag only when a real regional distinction is needed. An unmarked `name.skin.md` is invalid.
73
-
74
- One agent document and all skins sharing its basename form one document group. A skin represents the same cognitive content for humans, but may reorganize or explain it for its named audience and is not required to be a literal translation.
75
-
76
- A skin is not a summary.
77
-
78
- A skin is a human-facing semantic layer.
79
-
80
- Its job is to help a human quickly restore the correct purpose, mental model, scope, and invariants of the same object described by the paired agent document.
81
-
82
- Skins should stay compact and easy to read during supervision.
83
-
84
- Recommended skin structure:
85
-
86
- ```md
87
- # <Title>
88
-
89
- ## Purpose
90
-
91
- One short sentence.
92
-
93
- ## Mental Model
94
-
95
- One or two short paragraphs.
96
-
97
- ## Scope
98
-
99
- Includes:
100
-
101
- - one to three items.
102
-
103
- Excludes:
104
-
105
- - one to three items.
106
-
107
- ## Invariants
108
-
109
- - normally no more than five to seven items.
110
-
111
- ## Agent Document
112
-
113
- `name.md`
114
- ```
115
-
116
- Equivalent section titles are acceptable when the meaning remains clear.
117
-
118
- Do not move detailed operational instructions, verification checklists, implementation workflows, or exhaustive inventories into skins.
119
-
120
- Skin compactness is guided first by section budgets and only second by total content words.
121
-
122
- For validation, content-word counting ignores headings and document metadata where practical, strips fenced code blocks, and counts the remaining prose and list text.
66
+ A skin is a compact skeletal human projection, not a summary or a second operational document. Its purpose is to preserve the documented object's semantic frame for human supervision.
123
67
 
124
- Deterministic validation treats up to 160 content words as normal, 161 through 240 content words as a warning range, and anything above 240 as an error.
68
+ Use type-appropriate structure rather than a fixed heading template. Do not add an `Agent Document` section: pairing is already unambiguous from the filename.
125
69
 
126
- Missing skins are acceptable unless the document is a key human-direction document where preserving human intent is especially important.
70
+ Read [semantic-skins.md](semantic-skins.md) for the projection model, structure examples, naming details, information-budget guidance, and review checklist.
127
71
 
128
72
  ## Read And Edit Behavior
129
73
 
@@ -256,11 +200,9 @@ Documentation quality audit should:
256
200
  Deterministic validation should:
257
201
 
258
202
  - require every `*.skin.<lang>.md` file to have a paired non-skin `*.md` document and an explicit valid language marker;
259
- - require the standard skin sections and the `Agent Document` reference;
260
- - require both `Includes:` and `Excludes:` blocks inside the skin `Scope` section;
203
+ - require an explicit valid language marker, reversible paired-base resolution, and no redundant `Agent Document` section;
261
204
  - verify local markdown document links under `ctx/docs/**`;
262
205
  - warn when a documentation level contains more than nine direct directories or more than nine direct ordinary files (excluding `AGENTS.md` and paired `*.skin.<lang>.md` files), and require an explicit `Documentation Capacity Exception` in that level's `AGENTS.md`;
263
- - measure skin compactness using only the content of `Purpose`, `Mental Model`, `Scope`, and `Invariants`; exclude metadata, headings, and `Agent Document`; count Unicode-aware words and meaningful list items only; warn above 160 words or 12 list items and fail above 240 words or 20 list items;
264
206
  - keep ordinary agent-document shape checks minimal instead of imposing a rigid body template.
265
207
 
266
208
  ## Compression Rules
@@ -1,7 +1,7 @@
1
1
  # Documentation Quality Audit
2
2
 
3
3
  - Path: `skill/references/documentation-quality-audit.md`
4
- - Changed: `20260708`
4
+ - Changed: `20260814`
5
5
 
6
6
  Use this reference when an agent must audit an existing documentation corpus as an ADSM cognitive context.
7
7
 
@@ -59,24 +59,32 @@ Apply the criteria according to the document's projection role:
59
59
 
60
60
  ### Skin Documents
61
61
 
62
- Review each `*.skin.<lang>.md` file as a human-facing semantic layer.
62
+ Review each `*.skin.<lang>.md` file as a compact skeletal human projection.
63
63
 
64
64
  Check whether:
65
65
 
66
- - the paired non-skin document exists when required;
67
- - both documents describe the same object;
68
- - the skin preserves purpose, mental model, scope, invariants, and a reference to the paired agent document;
69
- - the skin adds untracked requirements not present in the paired agent document;
70
- - the skin contradicts the paired agent document;
71
- - the skin stays compact, human-readable, and free of excessive operational detail.
66
+ - the paired non-skin document exists and both documents describe the same object;
67
+ - the skin preserves the main meaning and exposes the base document's load-bearing structure;
68
+ - boundaries, key constraints, and likely misreadings are retained;
69
+ - the structure suits the base document's type rather than following a fixed heading set;
70
+ - the skin adds no untracked requirements or facts and does not contradict the base;
71
+ - operational detail and redundant pairing navigation are excluded; and
72
+ - the skin remains small enough for human cognitive use.
72
73
 
73
- The review should answer:
74
+ ### Cognitive Information Budget
75
+
76
+ Use evidence from the skin and its paired base; do not claim universal cognitive limits. Check whether:
77
+
78
+ - one central thesis is identifiable after one reading;
79
+ - 3–5 meaningful chunks normally organize the frame, and more than 7 is justified by a shared reader schema;
80
+ - each block adds an irreducible distinction rather than formatting, repetition, navigation, or methodology noise;
81
+ - boundaries, key constraints, and dangerous misreadings survive compression;
82
+ - operational detail is excluded; and
83
+ - a longer skin (roughly 300–350 words) is justified by irreducible distinctions, while a shorter one has not made meaning ambiguous.
84
+
85
+ The ranges are editorial review prompts, not automatic pass/fail thresholds.
74
86
 
75
- - does the document work as a human-facing semantic layer;
76
- - does it preserve the same meaning as the paired agent document;
77
- - does it avoid operational overload;
78
- - does it add untracked requirements;
79
- - what must be changed.
87
+ The review should distinguish a meaningful skeletal projection from a short operational summary. See [semantic-skins.md](semantic-skins.md) for structure examples.
80
88
 
81
89
  ### Agent Documents
82
90
 
@@ -0,0 +1,65 @@
1
+ # Semantic Skins
2
+
3
+ - Path: `skill/references/semantic-skins.md`
4
+ - Changed: `20260814`
5
+
6
+ A semantic skin is a compact skeletal human projection of its paired agent document.
7
+
8
+ It lets a human recover the documented object's semantic frame without loading operational detail.
9
+
10
+ A skin is neither a mechanical summary nor a second operational specification.
11
+
12
+ ## Pairing And Naming
13
+
14
+ A skin is located beside its paired ordinary `*.md` agent document.
15
+
16
+ `name.md → name.skin.<language>.md`
17
+
18
+ `name.skin.<language>.md → name.md`
19
+
20
+ Use lowercase ISO 639-1 language codes such as `en`, `ru`, or `es`; add a regional tag only for a genuine distinction.
21
+
22
+ The reversible filename convention is the authoritative pairing navigation. Do not add an `Agent Document` section or a redundant link.
23
+
24
+ ## Projection Rule
25
+
26
+ State the purpose of the documented object, not the purpose of its file or skin.
27
+
28
+ Preserve the base document's load-bearing meaning: its decisive concepts, boundaries, constraints, relations, and likely misreadings.
29
+
30
+ Do not add requirements, facts, or decisions absent from the paired agent document. Do not reproduce verification steps, exhaustive inventories, implementation procedure, or agent-routing detail.
31
+
32
+ ## Information Budget
33
+
34
+ A skin has an information budget, not a universal word budget: a human should restore its semantic frame in one calm reading without loading operations.
35
+
36
+ A semantic chunk is one meaningful, mutually distinct unit needed to recover that frame. It is not a heading, list item, sentence, or word count.
37
+
38
+ As soft editorial prompts, prefer 3–5 chunks; more than 7 needs review unless readers share a strong schema. About 120–250 words is often suitable. 300–350 words needs a stated reason: irreducible distinctions, not verbosity. These ranges are not scientific limits and never drive automatic validation.
39
+
40
+ A longer skin is justified when omitting a load-bearing distinction would mislead. A shorter skin is insufficient when compression makes a required distinction ambiguous.
41
+
42
+ ## Choose The Skeleton
43
+
44
+ Use the cognitive form of the documented object rather than a universal heading set.
45
+
46
+ - overview or identity — purpose, mental model, boundaries, invariants;
47
+ - domain model — concepts, levels, key relations, constraints;
48
+ - decision — decision, rationale, consequences, rejected alternatives;
49
+ - process — goal, flow, inputs and outcomes, exceptions;
50
+ - reference or map — navigational structure, terms, governing rules.
51
+
52
+ Equivalent concise headings are valid. A skin need not use every suggested heading.
53
+
54
+ ## Creation And Review
55
+
56
+ Read every existing matching skin before changing its agent document.
57
+
58
+ When creating or reviewing a skin, verify that it:
59
+
60
+ - preserves the document's main meaning and load-bearing structure;
61
+ - retains boundaries, key constraints, and likely misreadings;
62
+ - uses a skeleton appropriate to the document type;
63
+ - adds no untracked facts or requirements and does not contradict its base;
64
+ - excludes operational detail and redundant navigation; and
65
+ - remains compact enough for human cognitive use.
@@ -1,27 +1,16 @@
1
- # <Title>
1
+ # <Document Title>
2
2
 
3
- ## Purpose
3
+ - Path: `ctx/docs/{{subdir}}/<name>.skin.<lang>.md`
4
+ - Changed: `YYYYMMDD`
4
5
 
5
- One short sentence.
6
+ Use a compact, type-appropriate skeleton that lets a human recover the documented object's meaning.
6
7
 
7
- ## Mental Model
8
+ Do not describe this file or skin. Do not include an `Agent Document` link: its paired base is derived from the filename.
8
9
 
9
- One or two short paragraphs that restore the human frame.
10
+ Choose only the relevant sections, for example:
10
11
 
11
- ## Scope
12
-
13
- Includes:
14
-
15
- - one to three items.
16
-
17
- Excludes:
18
-
19
- - one to three items.
20
-
21
- ## Invariants
22
-
23
- - normally no more than five to seven items.
24
-
25
- ## Agent Document
26
-
27
- `name.md`
12
+ - overview — purpose, mental model, boundaries, invariants;
13
+ - domain model — concepts, relations, constraints;
14
+ - decision — decision, rationale, consequences;
15
+ - process — goal, flow, outcomes, exceptions;
16
+ - reference — map, terms, governing rules.
@@ -0,0 +1,17 @@
1
+ // @ts-check
2
+
3
+ import processModule from "node:process";
4
+
5
+ /** @namespace Fl32_Skill_Adsm_Ctx_Cli_Command_Design */
6
+ export default class Design {
7
+ constructor({config, design}) {
8
+ this.id = "adsm-ctx:design";
9
+ this.summary = "Show ADSM context design guidance.";
10
+ this.lifetime = "finite";
11
+ this.execute = async function ({args}) {
12
+ processModule.stdout.write(`${await design.execute({targetPath: args["target-path"] ?? config.cwd})}\n`);
13
+ };
14
+ }
15
+ }
16
+
17
+ export const __deps__ = Object.freeze({default: Object.freeze({config: "TeqFw_Cli_Config$", design: "Fl32_Skill_Adsm_Ctx_Design_Service$"})});
@@ -0,0 +1,22 @@
1
+ // @ts-check
2
+
3
+ import processModule from "node:process";
4
+
5
+ /** @namespace Fl32_Skill_Adsm_Ctx_Cli_Command_Init */
6
+ export default class Init {
7
+ constructor({config, init}) {
8
+ this.id = "adsm-ctx:init";
9
+ this.summary = "Initialize an ADSM context.";
10
+ this.lifetime = "finite";
11
+ this.execute = async function ({args}) {
12
+ const result = await init.execute({targetPath: args["target-path"] ?? config.cwd});
13
+ processModule.stdout.write(`${formatInitReport(result)}\n`);
14
+ };
15
+ }
16
+ }
17
+
18
+ function formatInitReport(result) {
19
+ return [`Initialized ADSM context in ${result.ctxRoot}`, ...result.created.map((entry) => `Created: ${entry}`), ...result.skipped.map((entry) => `Skipped: ${entry}`)].join("\n");
20
+ }
21
+
22
+ export const __deps__ = Object.freeze({default: Object.freeze({config: "TeqFw_Cli_Config$", init: "Fl32_Skill_Adsm_Ctx_Init_Service$"})});
@@ -0,0 +1,18 @@
1
+ // @ts-check
2
+
3
+ import processModule from "node:process";
4
+
5
+ /** @namespace Fl32_Skill_Adsm_Ctx_Cli_Command_InstallSkill */
6
+ export default class InstallSkill {
7
+ constructor({installer}) {
8
+ this.id = "adsm-ctx:install-skill";
9
+ this.summary = "Install the bundled agent skill payload.";
10
+ this.lifetime = "finite";
11
+ this.execute = async function ({args}) {
12
+ const targetDir = await installer.execute({targetRoot: args["skills-root"]});
13
+ processModule.stdout.write(`Installed skill payload to ${targetDir}\n`);
14
+ };
15
+ }
16
+ }
17
+
18
+ export const __deps__ = Object.freeze({default: Object.freeze({installer: "Fl32_Skill_Adsm_Ctx_Skill_Installer$"})});