@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
package/CHANGELOG.md ADDED
@@ -0,0 +1,30 @@
1
+ # Changelog
2
+
3
+ All notable changes to this package are documented in this file.
4
+
5
+ ## 0.4.0 - 2026-09-23
6
+
7
+ ### Added
8
+
9
+ - Added optional, capability-based Verification Layer support, with specifications grouped by the primary product, architecture, environment, or code target.
10
+ - Added validation for verification block structure, populated categories, metadata capabilities, and adoption without a declared capability; older and unadopted contexts remain valid.
11
+ - Added guidance for verification evidence, re-verification, Responsible Context, and the Software Evolution Loop across the bundled skill and project context.
12
+
13
+ ### Changed
14
+
15
+ - Kept the four ordered declarative documentation levels and defined `verification/` as an optional cross-cutting block rather than another authority level.
16
+ - Raised the context metadata baseline to `0.2.0` and updated initialization templates to advertise `verification-layer` without creating empty scaffolding.
17
+ - Updated design, validation, upgrade, audit, and documentation guidance to preserve existing contexts and require explicit, durable verification specifications before adoption.
18
+ - Reconciled product and architecture documents, semantic skins, README, and tests around the boundary between declarative context and operational evidence.
19
+ - Clarified that the package does not execute tests, collect monitoring data, persist feedback state, or coordinate distributed incidents; refreshed the dependency lockfile.
20
+
21
+ ## 0.3.0 - 2026-08-14
22
+
23
+ ### Changed
24
+
25
+ - Made global npm installation the canonical distribution for the Node.js runtime and agent skill payload.
26
+ - Added the public `adsm-ctx` executable, which launches this package through TeqFW explicit-host mode.
27
+ - Replaced documented `teq adsm-ctx:*` user commands with short `adsm-ctx` commands.
28
+ - Updated the bundled skill installation guidance and cognitive context to describe the version-matched payload workflow.
29
+
30
+ ### 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
 
@@ -14,7 +14,8 @@ The package includes:
14
14
 
15
15
  - the `adsm-ctx` CLI for lifecycle operations;
16
16
  - the `adsm-ctx` skill payload for AI agents;
17
- - reusable `ctx/` templates for bootstrapping ADSM-compatible projects.
17
+ - reusable `ctx/` templates for bootstrapping ADSM-compatible projects;
18
+ - optional Verification Layer documentation lifecycle support;
18
19
  - working templates for agent-produced reports.
19
20
 
20
21
  ## Purpose
@@ -26,7 +27,8 @@ Use this package when you need to:
26
27
  - validate whether an existing context follows expected ADSM structure;
27
28
  - audit a documentation corpus against ADSM documentation quality criteria;
28
29
  - compress a documentation corpus while preserving accepted project meaning;
29
- - upgrade a context when ADSM conventions evolve.
30
+ - upgrade a context when ADSM conventions evolve;
31
+ - design, validate, audit, or compress an optional cross-cutting Verification Layer.
30
32
 
31
33
  This package acts as an orchestration layer. It provides generic structure, lifecycle guidance, validation, documentation quality audit guidance, documentation compression guidance, and upgrade entry points. When project-specific context is required, it should direct the agent to use specialized skills when they are available.
32
34
 
@@ -49,32 +51,45 @@ This package does not:
49
51
  ## Requirements
50
52
 
51
53
  - Node.js with npm.
52
- - GitHub SSH access to the repository for global installation from GitHub.
54
+ - An agent skills root, normally `~/.agents/skills`.
53
55
 
54
- ## Global Installation
56
+ ## Installation And Update
55
57
 
56
- Install the package globally from GitHub:
58
+ Install the package globally once for the current user:
57
59
 
58
60
  ```sh
59
- npm install -g git+ssh://git@github.com/flancer32/skill-adsm-ctx.git
61
+ npm install --global @flancer32/skill-adsm-ctx
60
62
  ```
61
63
 
62
- This provides the CLI command:
64
+ Install its matching agent payload into the selected skills root:
63
65
 
64
66
  ```sh
65
- adsm-ctx
67
+ adsm-ctx install-skill "$HOME/.agents/skills"
66
68
  ```
67
69
 
68
- To install the skill payload for agent use:
70
+ The command replaces only `$HOME/.agents/skills/adsm-ctx`; it does not modify other installed skills.
71
+
72
+ Verify the runtime and payload:
69
73
 
70
74
  ```sh
75
+ adsm-ctx --help
76
+ test -f "$HOME/.agents/skills/adsm-ctx/SKILL.md"
77
+ ```
78
+
79
+ To update, update the global npm package and reinstall its payload:
80
+
81
+ ```sh
82
+ npm update --global @flancer32/skill-adsm-ctx
71
83
  adsm-ctx install-skill "$HOME/.agents/skills"
72
84
  ```
73
85
 
74
- This copies the payload to:
86
+ 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
87
 
76
- ```text
77
- $HOME/.agents/skills/adsm-ctx
88
+ For a project-pinned CI or team workflow, install the package locally and invoke the same public launcher with npm:
89
+
90
+ ```sh
91
+ npm install --save-dev @flancer32/skill-adsm-ctx
92
+ npm exec -- adsm-ctx validate .
78
93
  ```
79
94
 
80
95
  ## CLI Usage
@@ -121,11 +136,17 @@ Install the bundled skill payload:
121
136
  adsm-ctx install-skill <skills-root>
122
137
  ```
123
138
 
139
+ Advanced TeqFW users may invoke the metadata-declared commands directly when `teq` is installed:
140
+
141
+ ```sh
142
+ teq --host @flancer32/skill-adsm-ctx adsm-ctx:validate .
143
+ ```
144
+
124
145
  ## Lifecycle Modes
125
146
 
126
147
  ### `init`
127
148
 
128
- Creates the minimal ADSM-compatible context structure, starter documents, and `ctx/adsm.json` metadata.
149
+ Creates the minimal ADSM-compatible context structure, starter documents, and `ctx/adsm.json` metadata. The metadata advertises the `verification-layer` convention capability, but initialization does not create `ctx/docs/verification/` or empty categories.
129
150
 
130
151
  ### `design`
131
152
 
@@ -133,7 +154,7 @@ Provides guidance for classifying the project, choosing relevant documentation b
133
154
 
134
155
  ### `validate`
135
156
 
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.
157
+ Checks baseline paths, required declarative documentation levels, optional Verification Layer structure when adopted, required `AGENTS.md` files, metadata, body/skin pairing, localized skin names, redundant `Agent Document` sections in skins, local markdown document links, and other formal structural projection checks. It does not score semantic-skin length, cognitive load, or human readability; those belong to `quality-audit`. Validation reports findings without modifying project content.
137
158
 
138
159
  ### `quality-audit`
139
160
 
@@ -149,7 +170,7 @@ The default compression corpus is `ctx/docs/`. Operational context such as `ctx/
149
170
 
150
171
  ### `upgrade`
151
172
 
152
- Reads context metadata and reports or applies non-destructive migrations when available. The initial implementation provides the migration mechanism and reports when no migrations apply.
173
+ Checks whether context metadata exists and reports that no automatic migrations are available. Verification Layer adoption remains optional and non-destructive: upgrade does not create verification scaffolding. The command remains the entry point for future explicit migrations.
153
174
 
154
175
  ## Workflow
155
176
 
@@ -176,6 +197,8 @@ product
176
197
 
177
198
  Use the architecture level once product meaning is clear enough to define stable engineering guardrails.
178
199
 
200
+ `ctx/docs/verification/` is optional and cross-cutting. It is not a fifth declarative level. Create it only when a durable verification specification exists; place that specification below the category of the declaration it primarily evaluates.
201
+
179
202
  The bundled architecture templates expect these top-level documents:
180
203
 
181
204
  - `overview.md`
@@ -199,7 +222,7 @@ overview.skin.en.md
199
222
  overview.skin.ru.md
200
223
  ```
201
224
 
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.
225
+ 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
226
 
204
227
  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
228
 
@@ -228,7 +251,7 @@ When no specialized skill is available, this package should create only generic
228
251
  Run the CLI directly from the repository:
229
252
 
230
253
  ```sh
231
- node ./bin/cli.mjs --help
254
+ npm exec -- adsm-ctx --help
232
255
  ```
233
256
 
234
257
  Run the tests:
@@ -237,6 +260,10 @@ Run the tests:
237
260
  npm test
238
261
  ```
239
262
 
263
+ ## Changelog
264
+
265
+ See [CHANGELOG.md](CHANGELOG.md) for the prepared, unpublished 0.4.0 release notes.
266
+
240
267
  ## Status
241
268
 
242
269
  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
+ }
@@ -1,9 +1,13 @@
1
1
  # Migrations
2
2
 
3
- This directory is reserved for future context migrations.
3
+ This directory is reserved for explicit context migrations. The `verification-layer` convention is capability-based and optional: it does not require a migration, `ctx/docs/verification/`, empty categories, or placeholder specifications. `adsm-ctx upgrade` therefore preserves existing contexts and reports that no automatic migrations are available.
4
4
 
5
5
  Each migration should be:
6
6
 
7
7
  - versioned;
8
8
  - non-destructive by default;
9
9
  - explicit about prerequisites and post-upgrade manual steps.
10
+
11
+ ## Verification Layer Compatibility
12
+
13
+ Contexts without `capabilities`, with context version `0.1.0`, or without `ctx/docs/verification/` remain valid. A project may add a structurally complete Verification Layer when it has a durable specification; it should then advertise the `verification-layer` capability in `ctx/adsm.json`. Malformed adopted structure is a validation error, while absence is not.
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.4.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
@@ -22,6 +22,7 @@ Humans own direction, accepted meaning, approval, and accountability. Agents ref
22
22
  | --- | --- |
23
23
  | `init` baseline | [context-lifecycle.md](references/context-lifecycle.md); use the `templates/ctx/` baseline. |
24
24
  | `design` or new branch | [context-lifecycle.md](references/context-lifecycle.md), [design-questionnaire.md](references/design-questionnaire.md), and [specialized-skills.md](references/specialized-skills.md). |
25
+ | Verification Layer or Software Evolution Loop | [document-projections.md](references/document-projections.md), [context-lifecycle.md](references/context-lifecycle.md), [documentation-quality-audit.md](references/documentation-quality-audit.md), and [specialized-skills.md](references/specialized-skills.md). |
25
26
  | `validate` structure | [context-lifecycle.md](references/context-lifecycle.md), [document-projections.md](references/document-projections.md), and the repository-provided deterministic validator when available. Report errors and warnings separately. |
26
27
  | `quality-audit` | Run `validate` first; then load [documentation-quality-audit.md](references/documentation-quality-audit.md). Report findings; do not rewrite project meaning. |
27
28
  | `documentation-compression` | Load [documentation-compression.md](references/documentation-compression.md). Rewrite only with authorization and preserve accepted meaning. |
@@ -30,7 +31,7 @@ Humans own direction, accepted meaning, approval, and accountability. Agents ref
30
31
  | `ctx/agent/`, templates, or generic ownership boundary | Load [orchestration-model.md](references/orchestration-model.md). |
31
32
  | Browser, backend, data, deployment, or concrete tool workflow | Load [specialized-skills.md](references/specialized-skills.md), then use a matching available specialized skill. |
32
33
 
33
- `install-skill` installs this payload into a skills root; it is not a lifecycle mode.
34
+ `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
35
 
35
36
  ## Non-Negotiable Boundaries
36
37
 
@@ -39,9 +40,9 @@ Humans own direction, accepted meaning, approval, and accountability. Agents ref
39
40
  - Read a matching `*.skin.<lang>.md` before editing its agent document. Report projection drift or a required human decision instead of silently changing skin-controlled meaning.
40
41
  - Keep `ctx/agent/` project-local: install only its boundary `AGENTS.md`; do not impose tool-specific structure, labels, prompts, roles, or executable profiles.
41
42
  - Keep assets under `ctx/assets/**`; they may illustrate, but never define, authoritative meaning.
42
- - Use only the four ADSM top-level documentation levels under `ctx/docs/`; allow justified nested project structure within them.
43
+ - Preserve the four ordered declarative documentation levels under `ctx/docs/`: `product`, `architecture`, `environment`, and `code`. Allow an optional cross-cutting `verification/` block only as defined in [document-projections.md](references/document-projections.md); it is never a fifth level.
43
44
  - 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; an intentional excess must be stated explicitly in that level's `AGENTS.md`.
44
45
 
45
46
  ## Completion
46
47
 
47
- Finish with explicit validation results, specialization gaps, human decisions, and any preserved project-specific content. Use the relevant templates under `templates/ctx/` for initialization and `templates/work/` only when a working report is requested.
48
+ Finish with explicit validation results, Verification Layer adoption state when relevant, specialization gaps, human decisions, and any preserved project-specific content. Use the relevant templates under `templates/ctx/` for initialization and `templates/work/` only when a working report is requested.
@@ -1,7 +1,7 @@
1
1
  # Context Lifecycle
2
2
 
3
3
  - Path: `skill/references/context-lifecycle.md`
4
- - Changed: `20260715`
4
+ - Changed: `20260917`
5
5
 
6
6
  `adsm-ctx` manages six lifecycle modes for project cognitive context.
7
7
 
@@ -13,10 +13,10 @@ 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 formal structural integrity without destructive edits. Check baseline paths, context metadata, the four declarative documentation levels, optional Verification Layer adoption, local `AGENTS.md` placement, document headers, agent/skin pairs, reversible skin naming, redundant `Agent Document` sections, local document links, and `ctx/assets/**` exclusion. Do not score semantic compactness, cognitive load, or word counts.
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
- - `upgrade` migrates context non-destructively. Read metadata first, preserve project-specific content, and use [upgrade-policy.md](upgrade-policy.md) for safe boundaries.
19
+ - `upgrade` is the non-destructive migration entry point. The current implementation checks for metadata and reports that no automatic migrations are available; preserve project-specific content and use [upgrade-policy.md](upgrade-policy.md) when explicit migrations exist.
20
20
 
21
21
  The lifecycle is iterative. A project may return to `design`, `validate`, `quality-audit`, `documentation-compression`, and `upgrade` many times after initialization.
22
22
 
@@ -24,24 +24,32 @@ 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
 
31
31
  All lifecycle modes that operate on `ctx/docs/` use the documentation projection model in [document-projections.md](document-projections.md).
32
32
 
33
- The lifecycle must preserve ADSM's four top-level documentation levels under `ctx/docs/` while allowing project-specific nested subdirectories inside those levels.
33
+ The lifecycle must preserve ADSM's four ordered declarative documentation levels under `ctx/docs/` while allowing project-specific nested subdirectories inside them and an optional cross-cutting Verification Layer as defined in [document-projections.md](document-projections.md).
34
34
 
35
35
  Validation, audit, compression, and upgrade work must recognize agent documents, semantic skins, agent/skin pairs, orphan skins, projection drift, and `ctx/assets/**` as non-authoritative artifact space.
36
36
 
37
37
  When a repository provides a deterministic validation command, validation work must discover and run it. Report errors and warnings separately; warning-only output is not a clean result. Clear structural errors before a quality audit.
38
38
 
39
+ ## Verification Layer And Software Evolution
40
+
41
+ Verification defines the relation between an accepted declaration and a bounded observation of reality. A signal may arise from an active check, passive runtime observation, or an external report. It becomes an observation only after enough context identifies what was observed, against which applicable expectation, and in what relevant state.
42
+
43
+ An observation supports an assessment such as conformity, deviation, ambiguity, contradiction, or insufficient evidence. A deviation is not a cause. Localization hypotheses remain revisable until targeted evidence supports them. A Responsible Context advances the loop within its authority; resolution feedback alone does not close it. Where closure is required, obtain a new applicable re-verification of the relevant original expectation.
44
+
45
+ The Software Evolution Loop is broader than Verification. Architecture defines boundaries and ownership; supervision defines acceptable uncertainty and required independence; project-local workflow owns routing and operational feedback state; specialized skills provide concrete verification, monitoring, transport, or distributed feedback procedures. `adsm-ctx` provides methodology and documentation lifecycle support, not a runtime coordination system.
46
+
39
47
  ## Shared Boundaries
40
48
 
41
49
  - Establish product meaning before architecture, then architecture before environment or code constraints. Lower levels refine but do not create upstream meaning.
42
50
  - Keep `ctx/docs/filesystem.md` limited to root-level repository navigation. Describe lower structure only in the appropriate local `AGENTS.md` files.
43
51
  - Preserve project-local materials under `ctx/agent/`; this skill defines only its boundary `AGENTS.md` and never invents tool instructions, workflows, labels, events, prompts, profiles, or agent roles.
44
- - Use only `product/`, `architecture/`, `environment/`, and `code/` as ADSM top-level documentation levels. Nested structure within them remains project-specific.
52
+ - Use only `product/`, `architecture/`, `environment/`, and `code/` as ordered ADSM declarative levels. `verification/` may be an optional cross-cutting documentation block, never a fifth level; nested structure remains project-specific.
45
53
  - Keep each documentation level within nine direct directories and nine direct ordinary files, excluding `AGENTS.md` and paired `*.skin.<lang>.md` files, where practical. When a level deliberately exceeds either value, its local `AGENTS.md` must explicitly record a `Documentation Capacity Exception` and the reason.
46
54
  - Place visual, generated, rendered, and auxiliary artifacts under `ctx/assets/**`; they cannot introduce authoritative project meaning.
47
55
  - Read a matching semantic skin before changing its agent document. Report projection drift or a required human decision when a change would alter skin-controlled meaning.
@@ -1,7 +1,7 @@
1
1
  # Design Questionnaire
2
2
 
3
3
  - Path: `skill/references/design-questionnaire.md`
4
- - Changed: `20260610`
4
+ - Changed: `20260917`
5
5
 
6
6
  Use this questionnaire at the start of `design` mode to classify the project and decide which specialized ADSM skills may be relevant.
7
7
 
@@ -42,3 +42,15 @@ Use this questionnaire at the start of `design` mode to classify the project and
42
42
  - If the project includes a browser-based web application, look for a browser documentation skill such as `skill-adsm-doc-web-browser`.
43
43
  - If the project includes other specialized areas, choose the matching skill when available.
44
44
  - If a relevant specialized skill is unavailable, still create the justified ADSM structure, preserve any project-defined semantics, and record the missing specialization as a gap instead of inventing unsupported details.
45
+
46
+ ## Verification Questions
47
+
48
+ 11. Which declared outcomes, boundaries, conditions, or code properties have high practical consequence if wrong?
49
+ 12. Which broad observations provide useful early detection, and which blind spots need narrower diagnostics?
50
+ 13. Which signals may arrive actively, passively, or from external reporters, and what provenance is available?
51
+ 14. Which observations can the current agent perform directly, and which require another Responsible Context, human action, or specialized tooling?
52
+ 15. Does supervision require independent evidence or an independent actor for any concern?
53
+
54
+ ## Verification Design Guidance
55
+
56
+ Do not create `ctx/docs/verification/` merely because these questions were asked. When a durable specification is justified, place it under the category of its primary declaration target, link secondary targets instead of duplicating it, and route concrete test execution, monitoring, signal transport, or distributed feedback work to a specialized skill or project-local design.