@flancer32/skill-adsm-ctx 0.2.1 → 0.4.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 (103) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +45 -18
  3. package/bin/adsm-ctx.mjs +44 -0
  4. package/migrations/README.md +5 -1
  5. package/package.json +65 -11
  6. package/skill/SKILL.md +5 -4
  7. package/skill/references/context-lifecycle.md +14 -6
  8. package/skill/references/design-questionnaire.md +13 -1
  9. package/skill/references/document-projections.md +40 -80
  10. package/skill/references/documentation-compression.md +3 -2
  11. package/skill/references/documentation-quality-audit.md +37 -14
  12. package/skill/references/orchestration-model.md +4 -3
  13. package/skill/references/semantic-skins.md +65 -0
  14. package/skill/references/specialized-skills.md +5 -2
  15. package/skill/references/upgrade-policy.md +16 -6
  16. package/skill/templates/ctx/adsm.json +4 -1
  17. package/skill/templates/ctx/docs/AGENTS.md +3 -0
  18. package/skill/templates/ctx/docs/code/testing.md +4 -0
  19. package/skill/templates/work/context/semantic-skin.md +11 -22
  20. package/src/Cli/Command/Design.mjs +17 -0
  21. package/src/Cli/Command/Init.mjs +22 -0
  22. package/src/Cli/Command/InstallSkill.mjs +18 -0
  23. package/src/Cli/Command/Upgrade.mjs +19 -0
  24. package/src/Cli/Command/Validate.mjs +19 -0
  25. package/src/Design/Service.mjs +9 -7
  26. package/src/Shared/Constants.mjs +5 -5
  27. package/src/Shared/Metadata.mjs +1 -0
  28. package/src/Upgrade/Service.mjs +3 -3
  29. package/src/Validate/Service.mjs +217 -259
  30. package/types.d.ts +5 -2
  31. package/.github/workflows/flows-app.yaml +0 -95
  32. package/AGENTS.md +0 -112
  33. package/bin/cli.mjs +0 -55
  34. package/ctx/AGENTS.md +0 -44
  35. package/ctx/README.md +0 -24
  36. package/ctx/adsm.json +0 -5
  37. package/ctx/agent/AGENTS.md +0 -41
  38. package/ctx/agent/flows/.img/flancer32-skill-adsm-ctx-github-flows.png +0 -0
  39. package/ctx/agent/flows/AGENTS.md +0 -37
  40. package/ctx/agent/flows/cfg/issues/labeled/accepted/profile.json +0 -25
  41. package/ctx/agent/flows/cfg/issues/labeled/accepted/prompt.md +0 -104
  42. package/ctx/agent/flows/cfg/issues/labeled/clarification-provided/profile.json +0 -15
  43. package/ctx/agent/flows/cfg/issues/labeled/clarification-provided/prompt.md +0 -63
  44. package/ctx/agent/flows/cfg/issues/opened/admission/profile.json +0 -14
  45. package/ctx/agent/flows/cfg/issues/opened/admission/prompt.md +0 -110
  46. package/ctx/agent/flows/cfg/profile.json +0 -40
  47. package/ctx/agent/flows/cfg/pull_request/closed/merged/profile.json +0 -15
  48. package/ctx/agent/flows/cfg/pull_request/closed/merged/prompt.md +0 -41
  49. package/ctx/agent/flows/cfg/pull_request/labeled/needs-fix/profile.json +0 -25
  50. package/ctx/agent/flows/cfg/pull_request/labeled/needs-fix/prompt.md +0 -79
  51. package/ctx/agent/flows/cfg/pull_request/labeled/ready-for-validation/profile.json +0 -15
  52. package/ctx/agent/flows/cfg/pull_request/labeled/ready-for-validation/prompt.md +0 -72
  53. package/ctx/agent/flows/cfg/pull_request/labeled/verified/profile.json +0 -15
  54. package/ctx/agent/flows/cfg/pull_request/labeled/verified/prompt.md +0 -48
  55. package/ctx/agent/flows/deployment.md +0 -116
  56. package/ctx/agent/flows/labels.md +0 -108
  57. package/ctx/agent/flows/overview.md +0 -82
  58. package/ctx/agent/prompt/cli/ai-intro.md +0 -141
  59. package/ctx/assets/.gitkeep +0 -1
  60. package/ctx/docs/AGENTS.md +0 -121
  61. package/ctx/docs/ai-intro.md +0 -37
  62. package/ctx/docs/architecture/AGENTS.md +0 -98
  63. package/ctx/docs/architecture/behavior.md +0 -68
  64. package/ctx/docs/architecture/checklists.md +0 -48
  65. package/ctx/docs/architecture/constraints.md +0 -53
  66. package/ctx/docs/architecture/constraints.skin.en.md +0 -38
  67. package/ctx/docs/architecture/decisions.md +0 -118
  68. package/ctx/docs/architecture/integration.md +0 -31
  69. package/ctx/docs/architecture/overview.md +0 -76
  70. package/ctx/docs/architecture/state.md +0 -50
  71. package/ctx/docs/architecture/structure.md +0 -38
  72. package/ctx/docs/architecture/supervision.md +0 -71
  73. package/ctx/docs/code/AGENTS.md +0 -51
  74. package/ctx/docs/code/overview.md +0 -53
  75. package/ctx/docs/code/testing.md +0 -26
  76. package/ctx/docs/environment/AGENTS.md +0 -50
  77. package/ctx/docs/environment/overview.md +0 -33
  78. package/ctx/docs/filesystem.md +0 -44
  79. package/ctx/docs/product/AGENTS.md +0 -51
  80. package/ctx/docs/product/domain.md +0 -63
  81. package/ctx/docs/product/domain.skin.en.md +0 -40
  82. package/ctx/docs/product/glossary.md +0 -31
  83. package/ctx/docs/product/overview.md +0 -112
  84. package/ctx/docs/product/overview.skin.en.md +0 -38
  85. package/ctx/docs/product/roles.md +0 -17
  86. package/ctx/docs/product/use-cases.md +0 -15
  87. package/src/Bootstrap/Cli.mjs +0 -62
  88. package/src/Bootstrap.mjs +0 -108
  89. package/test/integration/.gitkeep +0 -1
  90. package/test/integration/cli-help.test.mjs +0 -15
  91. package/test/integration/cli-init-validate.test.mjs +0 -223
  92. package/test/integration/cli-install-skill.test.mjs +0 -41
  93. package/test/unit/Bootstrap/Cli.test.mjs +0 -23
  94. package/test/unit/Bootstrap.test.mjs +0 -53
  95. package/test/unit/Design/Service.test.mjs +0 -11
  96. package/test/unit/Init/Service.test.mjs +0 -51
  97. package/test/unit/Shared/Constants.test.mjs +0 -21
  98. package/test/unit/Shared/CopyDirectory.test.mjs +0 -31
  99. package/test/unit/Shared/Metadata.test.mjs +0 -9
  100. package/test/unit/Shared/Path.test.mjs +0 -11
  101. package/test/unit/Skill/Installer.test.mjs +0 -20
  102. package/test/unit/Upgrade/Service.test.mjs +0 -13
  103. package/test/unit/Validate/Service.test.mjs +0 -760
@@ -1,7 +1,7 @@
1
1
  # Documentation Projections
2
2
 
3
3
  - Path: `skill/references/document-projections.md`
4
- - Changed: `20260715`
4
+ - Changed: `20260917`
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.
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.
102
67
 
103
- Excludes:
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.
104
69
 
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.
123
-
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.
125
-
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
 
@@ -158,9 +102,9 @@ Validation should report structural drift such as orphan skins.
158
102
 
159
103
  Audit, compression, and upgrade work should report semantic drift when it can be evidenced from the documents.
160
104
 
161
- ## Documentation Levels And Substructure
105
+ ## Documentation Levels And Verification Layer
162
106
 
163
- ADSM defines only four top-level documentation levels under `ctx/docs/`:
107
+ ADSM defines exactly four ordered declarative documentation levels under `ctx/docs/`:
164
108
 
165
109
  ```text
166
110
  ctx/docs/product/
@@ -169,32 +113,47 @@ ctx/docs/environment/
169
113
  ctx/docs/code/
170
114
  ```
171
115
 
172
- Their meanings:
116
+ Their meanings remain:
117
+
118
+ - `product` — accepted product meaning;
119
+ - `architecture` — accepted engineering structure;
120
+ - `environment` — accepted runtime and deployment conditions;
121
+ - `code` — accepted implementation and engineering constraints.
122
+
123
+ `ctx/docs/verification/` is an optional cross-cutting documentation block. It relates declarations to observations of reality, but is not a fifth refinement level and does not change declaration authority.
173
124
 
174
- - `product` — product meaning;
175
- - `architecture` — engineering structure;
176
- - `environment` — runtime and deployment context;
177
- - `code` — implementation mapping.
125
+ Create the block only when the project has a durable verification specification. Its root requires `AGENTS.md`; direct categories are optional `product/`, `architecture/`, `environment/`, and `code/`. Create a category only when a durable specification exists beneath it. Do not initialize empty categories or placeholder specifications.
178
126
 
179
- ADSM may provide baseline templates and recommendations, but it must not impose a rigid internal subtree inside those levels.
127
+ A verification specification has one canonical home selected by its **primary verification target**: the declaration or bounded declaration group whose truth it chiefly evaluates. It may link to secondary declarations, executable tests, monitors, environments, dependencies, and other contexts. Mechanism, test framework, source path, CI job, endpoint, reporting context, and current Responsible Context do not determine placement.
180
128
 
181
- Project-specific nested subdirectories are allowed and should be used when they improve maintainability.
129
+ A specification should state, when relevant:
130
+
131
+ - the primary target and traceability to its declaration;
132
+ - the expected observable corridor;
133
+ - approach and acquisition mode;
134
+ - applicability and prerequisites;
135
+ - bounded interpretation, reach, and blind spots;
136
+ - lifecycle role and follow-up, including re-verification when required; and
137
+ - available access or authority for obtaining the observation.
138
+
139
+ A verification specification is durable documentation. An evidence record records an actual observation and its provenance. Operational Feedback State retains unresolved routing or continuation state. Do not confuse either operational object with a declaration or durable verification specification.
140
+
141
+ Project-specific nesting by risk area, product area, subsystem, use case, integration, or operational surface is allowed inside a primary-target category. It must preserve one canonical specification.
182
142
 
183
143
  Valid examples:
184
144
 
185
145
  ```text
186
146
  ctx/docs/product/domain/ingress.md
187
- ctx/docs/product/domain/memory.md
188
147
  ctx/docs/architecture/runtime/agent-execution.md
189
148
  ctx/docs/environment/deployment/vps.md
190
149
  ctx/docs/code/modules/orchestrator.md
150
+ ctx/docs/verification/product/authentication.md
151
+ ctx/docs/verification/architecture/boundaries/adapter-isolation.md
191
152
  ```
192
153
 
193
- Flat files remain allowed when suitable.
194
-
195
- Do not require flat prefixed names such as `domain-ingress.md` when nested directories are clearer.
154
+ Flat files remain allowed when suitable. Do not require flat prefixed names when nested directories are clearer.
196
155
 
197
- Each of the four documentation levels should contain no more than nine direct subdirectories and no more than nine direct ordinary files. The service-control file `AGENTS.md` and all matching `*.skin.<lang>.md` files are excluded, so an agent document and all of its skins count as one document group. This is a maintainability recommendation, not a reason to collapse meaningful structure.
156
+ Each of the four declarative levels should contain no more than nine direct subdirectories and nine direct ordinary files. The service-control file `AGENTS.md` and all matching `*.skin.<lang>.md` files are excluded, so an agent document and all of its skins count as one document group. This is a maintainability recommendation, not a reason to collapse meaningful structure.
198
157
 
199
158
  When a level deliberately exceeds either value, its own `AGENTS.md` must include a `## Documentation Capacity Exception` section that explicitly records the intentional exception and its reason. Deterministic validation warns about the exceeded recommendation and reports an error when this explicit local declaration is absent.
200
159
 
@@ -243,7 +202,7 @@ Do not use `AGENTS.md` as a replacement for agent documents or skins.
243
202
 
244
203
  Documentation quality audit should:
245
204
 
246
- - recursively include ordinary `*.md` agent documents under the four top-level documentation levels;
205
+ - recursively include ordinary `*.md` agent documents under the four declarative levels and under an adopted `verification/` block;
247
206
  - classify `*.skin.<lang>.md` files as human-facing semantic skins;
248
207
  - detect agent/skin document groups by same basename and directory;
249
208
  - report orphan skins;
@@ -256,11 +215,11 @@ Documentation quality audit should:
256
215
  Deterministic validation should:
257
216
 
258
217
  - 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;
218
+ - require an explicit valid language marker, reversible paired-base resolution, and no redundant `Agent Document` section;
261
219
  - verify local markdown document links under `ctx/docs/**`;
220
+ - accept absence of `ctx/docs/verification/`, but when it is present require its `AGENTS.md`, recognized primary-target category directories, and at least one durable specification in every created category;
221
+ - keep verification category placement and evidence sufficiency as semantic audit work rather than claiming them from directory shape;
262
222
  - 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
223
  - keep ordinary agent-document shape checks minimal instead of imposing a rigid body template.
265
224
 
266
225
  ## Compression Rules
@@ -288,3 +247,4 @@ Upgrades should:
288
247
  - report orphan skins and agent/skin conflicts;
289
248
  - avoid introducing required `README.md` files inside `ctx/docs/`;
290
249
  - keep assets under `ctx/assets/**`.
250
+ - preserve primary verification target, applicability, reach, blind spots, and the distinction between specification and evidence when verification documentation is in scope.
@@ -1,7 +1,7 @@
1
1
  # Documentation Compression
2
2
 
3
3
  - Path: `skill/references/documentation-compression.md`
4
- - Changed: `20260708`
4
+ - Changed: `20260917`
5
5
 
6
6
  Use this reference when an agent must compress an existing ADSM cognitive documentation corpus while preserving accepted project meaning.
7
7
 
@@ -34,7 +34,7 @@ Follow this method:
34
34
 
35
35
  The default corpus is `ctx/docs/`.
36
36
 
37
- Documentation compression is intended for declarative project documentation: product, architecture, environment, code, and other project documentation levels under `ctx/docs/`.
37
+ Documentation compression is intended for declarative project documentation under the four ADSM levels: product, architecture, environment, and code, plus an adopted optional Verification Layer when it is in scope.
38
38
 
39
39
  Do not include operational context outside `ctx/docs/` by default, including `ctx/agent/`, generated reports, prompt assets, workflow configuration, runtime materials, `ctx/assets/**`, or other agent-operation artifacts.
40
40
 
@@ -77,6 +77,7 @@ Safe compression may:
77
77
  Safe compression preserves:
78
78
 
79
79
  - product intent and scope;
80
+ - verification primary targets, applicable bounds, blind spots, and the distinction between durable specification, actual evidence, and operational feedback state;
80
81
  - domain terms and relationships;
81
82
  - role and authority boundaries;
82
83
  - architecture boundaries and decisions;
@@ -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: `20260917`
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.
74
84
 
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.
85
+ The ranges are editorial review prompts, not automatic pass/fail thresholds.
86
+
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
 
@@ -197,3 +205,18 @@ The audit must not:
197
205
  - mark a corpus incomplete merely because it does not document out-of-scope concerns.
198
206
 
199
207
  The audit may propose correction order and candidate edits, but it must distinguish proposals from accepted project knowledge.
208
+
209
+ ## Verification Layer Review
210
+
211
+ When `ctx/docs/verification/` exists, include it in the default corpus. Review it as cross-cutting specification documentation, not a fifth declarative level and not an evidence or incident archive.
212
+
213
+ Check whether each durable specification:
214
+
215
+ - names a primary verification target and links to the authoritative declaration;
216
+ - states an observable expectation and applicable state or prerequisites;
217
+ - distinguishes observation method from the declaration being evaluated;
218
+ - identifies reach, blind spots, and limits on the conclusion;
219
+ - avoids duplicated specifications for the same expectation; and
220
+ - distinguishes detection, localization, resolution feedback, and re-verification.
221
+
222
+ Report a human decision when supervision, acceptable uncertainty, required independence, Responsible Context routing, evidence retention, or operational feedback-state ownership is missing. Do not infer these policies from test framework, directory name, issue tracker, or a passing result.
@@ -1,7 +1,7 @@
1
1
  # Orchestration Model
2
2
 
3
3
  - Path: `skill/references/orchestration-model.md`
4
- - Changed: `20260715`
4
+ - Changed: `20260917`
5
5
 
6
6
  This skill is a router and baseline manager.
7
7
 
@@ -12,9 +12,10 @@ It is responsible for:
12
12
  - lifecycle guidance;
13
13
  - baseline validation;
14
14
  - migration entry points;
15
+ - Verification Layer documentation lifecycle support and structural validation;
15
16
  - the reserved boundary definition for `ctx/agent/`.
16
17
 
17
- It is not responsible for inventing specialized technical or domain documentation.
18
+ It is not responsible for inventing specialized technical or domain documentation, executing verification, receiving signals, persisting evidence or Operational Feedback State, or coordinating distributed feedback loops.
18
19
 
19
20
  For `ctx/agent/`, this skill may:
20
21
 
@@ -32,7 +33,7 @@ When specialization is needed, the agent should use a matching available skill a
32
33
 
33
34
  Concrete tool-facing materials belong to project-local documentation, explicit human instruction, or an external specialized skill when one is available and relevant.
34
35
 
35
- Specialized skills may add project-specific nested documentation under the four top-level `ctx/docs` levels, but they must preserve agent/skin pairing rules and keep artifacts under `ctx/assets/**`.
36
+ Specialized skills may add project-specific nested documentation under the four declarative `ctx/docs` levels and may implement concrete verification methods or project-local feedback procedures. They must preserve agent/skin pairing rules, keep artifacts under `ctx/assets/**`, and treat `verification/` as optional cross-cutting documentation rather than a fifth level.
36
37
 
37
38
  ## Template Boundary
38
39
 
@@ -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,7 +1,7 @@
1
1
  # Specialized Skills
2
2
 
3
3
  - Path: `skill/references/specialized-skills.md`
4
- - Changed: `20260708`
4
+ - Changed: `20260917`
5
5
 
6
6
  Use specialized skills when the project context requires knowledge that should not live in this generic lifecycle skill.
7
7
 
@@ -11,6 +11,8 @@ Examples of specialization signals:
11
11
  - backend application architecture;
12
12
  - data or persistence modeling;
13
13
  - deployment and runtime environment design;
14
+ - browser, backend, data, security, monitoring, or other concrete verification methods;
15
+ - signal transport, external-report handling, or distributed feedback procedures;
14
16
  - tool-specific agent instructions or workflow design for a concrete execution engine or host platform.
15
17
 
16
18
  Tool-specific specialization signals include:
@@ -27,5 +29,6 @@ Specialized skills must preserve ADSM's documentation projection model:
27
29
 
28
30
  - ordinary `*.md` files under `ctx/docs/**` are agent-facing operational context documents;
29
31
  - `*.skin.<lang>.md` files are human-facing semantic skins for matching agent documents;
30
- - nested subdirectories inside the four top-level documentation levels are allowed;
32
+ - nested subdirectories inside the four declarative documentation levels are allowed;
33
+ - an adopted `ctx/docs/verification/` block remains cross-cutting; specifications use a primary declaration target rather than the mechanism or specialized skill that obtains evidence;
31
34
  - visual, generated, rendered, and auxiliary artifacts belong under `ctx/assets/**`.
@@ -1,19 +1,29 @@
1
1
  # Upgrade Policy
2
2
 
3
3
  - Path: `skill/references/upgrade-policy.md`
4
- - Changed: `20260708`
4
+ - Changed: `20260917`
5
5
 
6
6
  Upgrades must be non-destructive by default.
7
7
 
8
+ ## Verification Layer Compatibility
9
+
10
+ The `verification-layer` context convention capability is optional. Existing contexts without `capabilities`, with context version `0.1.0`, or without `ctx/docs/verification/` remain valid.
11
+
12
+ Safe adoption may add `"verification-layer"` to `ctx/adsm.json` and add a structurally complete verification block only when the project has a real durable specification. It must not create `verification/`, empty categories, placeholder specifications, or copied specifications merely because an upgrade ran.
13
+
14
+ Partial adoption is valid. Structural validation distinguishes absence from malformed adoption. An adopted block requires its root `AGENTS.md`; each created primary-target category must be a directory containing a durable specification. Unknown or unsupported categories and malformed capability metadata are validation findings.
15
+
16
+ ## General Upgrade Boundaries
17
+
8
18
  Safe upgrade behavior includes:
9
19
 
10
- - adding missing files and directories;
11
- - updating metadata when the migration rules are explicit;
12
- - preserving project-authored content unless replacement is proven safe.
20
+ - adding missing files and directories only when migration rules explicitly require them;
21
+ - updating metadata when rules are explicit;
22
+ - preserving project-authored content unless replacement is proven safe;
13
23
  - detecting agent/skin pairs, orphan skins, and projection drift according to `skill/references/document-projections.md`;
14
- - preserving project-specific nested subdirectories under `ctx/docs/product/`, `ctx/docs/architecture/`, `ctx/docs/environment/`, and `ctx/docs/code/`;
24
+ - preserving project-specific nested subdirectories and adopted verification specifications;
15
25
  - keeping visual, generated, rendered, and auxiliary artifacts under `ctx/assets/**`.
16
26
 
17
27
  Unsafe cases should be reported for manual follow-up instead of applied automatically.
18
28
 
19
- Upgrade must not introduce required `README.md` files inside `ctx/docs/` and must not automatically rewrite human-controlled skins when agent/skin meaning is unclear.
29
+ Upgrade must not introduce required `README.md` files inside `ctx/docs/`, automatically rewrite human-controlled skins when meaning is unclear, or claim that adoption provides verification coverage or runtime conformity.
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "schema": "adsm-context",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
+ "capabilities": [
5
+ "verification-layer"
6
+ ],
4
7
  "notes": [
5
8
  "Initial context created from the canonical adsm-ctx template set."
6
9
  ]
@@ -21,6 +21,7 @@ The installed template should describe the project, not restate detailed ADSM me
21
21
  - `code/` — code-level constraints and testing guidance.
22
22
  - `environment/` — runtime and infrastructure assumptions.
23
23
  - `product/` — product meaning, roles, and use cases.
24
+ - `verification/` — optional cross-cutting verification specifications; create it only with a real durable specification.
24
25
  - `AGENTS.md` — entry note for `ctx/docs/`.
25
26
  - `ai-intro.md` — compact agent orientation for the concrete project.
26
27
  - `filesystem.md` — top-level repository map.
@@ -31,6 +32,7 @@ Defines:
31
32
 
32
33
  - The declarative documentation boundary for the project.
33
34
  - The documentation dependency chain from product to code.
35
+ - The optional Verification Layer as a cross-cutting relation, never a fifth declarative level.
34
36
  - The local entry points used to orient agents within `ctx/docs/`.
35
37
 
36
38
  Does NOT define:
@@ -50,6 +52,7 @@ Does NOT define:
50
52
  - Read a matching skin before changing an agent document.
51
53
  - Report a human decision if a requested agent-document change would violate the matching skin.
52
54
  - Keep project-specific nested subdirectories inside `product/`, `architecture/`, `environment/`, and `code/` when they improve maintainability.
55
+ - Create `verification/` only when it contains a durable specification. Its root requires `AGENTS.md`; create primary-target categories only on demand.
53
56
  - Keep each documentation level to no more than nine direct directories and nine direct ordinary files, excluding `AGENTS.md` and paired `*.skin.<lang>.md` files, where practical.
54
57
  - When a level deliberately exceeds either value, add a `## Documentation Capacity Exception` section to that level's `AGENTS.md` that states the exception and its reason.
55
58
  - Put visual, generated, rendered, or auxiliary artifacts under `ctx/assets/**`.
@@ -11,3 +11,7 @@ Describe the test boundary for the project.
11
11
  ## Test Structure
12
12
 
13
13
  List the main test layers, directories, and intended verification scope.
14
+
15
+ ## Verification Target Boundary
16
+
17
+ Keep executable test organization, framework conventions, fixtures, and isolation in this code-level document. When a project adopts `ctx/docs/verification/`, its durable specification states the observed declared expectation and primary target; the executable mechanism remains governed here.
@@ -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$"})});
@@ -0,0 +1,19 @@
1
+ // @ts-check
2
+
3
+ import processModule from "node:process";
4
+
5
+ /** @namespace Fl32_Skill_Adsm_Ctx_Cli_Command_Upgrade */
6
+ export default class Upgrade {
7
+ constructor({config, upgrade}) {
8
+ this.id = "adsm-ctx:upgrade";
9
+ this.summary = "Upgrade an ADSM context.";
10
+ this.lifetime = "finite";
11
+ this.execute = async function ({args}) {
12
+ const result = await upgrade.execute({targetPath: args["target-path"] ?? config.cwd});
13
+ processModule.stdout.write(`${result.message}\n`);
14
+ if (!result.ok) throw new Error(result.message);
15
+ };
16
+ }
17
+ }
18
+
19
+ export const __deps__ = Object.freeze({default: Object.freeze({config: "TeqFw_Cli_Config$", upgrade: "Fl32_Skill_Adsm_Ctx_Upgrade_Service$"})});
@@ -0,0 +1,19 @@
1
+ // @ts-check
2
+
3
+ import processModule from "node:process";
4
+
5
+ /** @namespace Fl32_Skill_Adsm_Ctx_Cli_Command_Validate */
6
+ export default class Validate {
7
+ constructor({config, validate}) {
8
+ this.id = "adsm-ctx:validate";
9
+ this.summary = "Validate an ADSM context.";
10
+ this.lifetime = "finite";
11
+ this.execute = async function ({args}) {
12
+ const result = await validate.execute({targetPath: args["target-path"] ?? config.cwd});
13
+ processModule.stdout.write(`${validate.format({result})}\n`);
14
+ if (!result.ok) throw new Error("ADSM context validation failed.");
15
+ };
16
+ }
17
+ }
18
+
19
+ export const __deps__ = Object.freeze({default: Object.freeze({config: "TeqFw_Cli_Config$", validate: "Fl32_Skill_Adsm_Ctx_Validate_Service$"})});