@flancer32/skill-adsm-ctx 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +56 -40
- package/bin/adsm-ctx.mjs +1 -1
- package/package.json +5 -18
- package/skills/adsm-ctx/SKILL.md +72 -0
- package/{skill → skills/adsm-ctx}/references/agents-hierarchy.md +4 -2
- package/skills/adsm-ctx/references/context-evolution.md +59 -0
- package/{skill → skills/adsm-ctx}/references/context-lifecycle.md +20 -9
- package/{skill → skills/adsm-ctx}/references/design-questionnaire.md +3 -3
- package/{skill → skills/adsm-ctx}/references/document-projections.md +12 -10
- package/{skill → skills/adsm-ctx}/references/documentation-compression.md +5 -5
- package/{skill → skills/adsm-ctx}/references/documentation-quality-audit.md +6 -6
- package/{skill → skills/adsm-ctx}/references/orchestration-model.md +8 -6
- package/{skill → skills/adsm-ctx}/references/semantic-skins.md +3 -1
- package/{skill → skills/adsm-ctx}/references/specialized-skills.md +2 -2
- package/skills/adsm-ctx/references/testing-and-verification.md +12 -0
- package/skills/adsm-ctx/templates/AGENTS.md +23 -0
- package/skills/adsm-ctx/templates/ctx/AGENTS.md +46 -0
- package/{skill → skills/adsm-ctx}/templates/ctx/README.md +1 -1
- package/{skill → skills/adsm-ctx}/templates/ctx/adsm.json +1 -1
- package/skills/adsm-ctx/templates/ctx/agent/AGENTS.md +32 -0
- package/skills/adsm-ctx/templates/ctx/docs/AGENTS.md +64 -0
- package/{skill → skills/adsm-ctx}/templates/ctx/docs/code/testing.md +3 -1
- package/skills/adsm-ctx/templates/ctx/docs/verification/AGENTS.md +31 -0
- package/src/Cli/Command/Init.mjs +21 -5
- package/src/Cli/Command/InstallSkill.mjs +16 -5
- package/src/Cli/Command/Validate.mjs +17 -5
- package/src/Init/Service.mjs +26 -47
- package/src/Shared/Constants.mjs +4 -1
- package/src/Shared/CopyDirectory.mjs +9 -9
- package/src/Shared/Metadata.mjs +1 -1
- package/src/Skill/Installer.mjs +5 -5
- package/src/Validate/Service.mjs +159 -149
- package/types.d.ts +31 -4
- package/migrations/README.md +0 -13
- package/skill/SKILL.md +0 -48
- package/skill/references/upgrade-policy.md +0 -29
- package/skill/templates/AGENTS.md +0 -120
- package/skill/templates/ai/AGENTS.md +0 -59
- package/skill/templates/ctx/AGENTS.md +0 -45
- package/skill/templates/ctx/agent/AGENTS.md +0 -36
- package/skill/templates/ctx/docs/AGENTS.md +0 -58
- package/src/Cli/Command/Design.mjs +0 -17
- package/src/Cli/Command/Upgrade.mjs +0 -19
- package/src/Design/Service.mjs +0 -38
- package/src/Upgrade/Service.mjs +0 -44
- /package/{skill/templates/work → skills/adsm-ctx/assets}/context/semantic-skin.md +0 -0
- /package/{skill/templates/work → skills/adsm-ctx/assets}/report/documentation-compression.md +0 -0
- /package/{skill/templates/work → skills/adsm-ctx/assets}/report/documentation-quality-audit.md +0 -0
- /package/{skill → skills/adsm-ctx}/templates/ctx/assets/.gitkeep +0 -0
- /package/{skill → skills/adsm-ctx}/templates/ctx/docs/ai-intro.md +0 -0
- /package/{skill → skills/adsm-ctx}/templates/ctx/docs/architecture/AGENTS.md +0 -0
- /package/{skill → skills/adsm-ctx}/templates/ctx/docs/architecture/behavior.md +0 -0
- /package/{skill → skills/adsm-ctx}/templates/ctx/docs/architecture/checklists.md +0 -0
- /package/{skill → skills/adsm-ctx}/templates/ctx/docs/architecture/constraints.md +0 -0
- /package/{skill → skills/adsm-ctx}/templates/ctx/docs/architecture/decisions.md +0 -0
- /package/{skill → skills/adsm-ctx}/templates/ctx/docs/architecture/integration.md +0 -0
- /package/{skill → skills/adsm-ctx}/templates/ctx/docs/architecture/overview.md +0 -0
- /package/{skill → skills/adsm-ctx}/templates/ctx/docs/architecture/state.md +0 -0
- /package/{skill → skills/adsm-ctx}/templates/ctx/docs/architecture/structure.md +0 -0
- /package/{skill → skills/adsm-ctx}/templates/ctx/docs/architecture/supervision.md +0 -0
- /package/{skill → skills/adsm-ctx}/templates/ctx/docs/code/AGENTS.md +0 -0
- /package/{skill → skills/adsm-ctx}/templates/ctx/docs/code/overview.md +0 -0
- /package/{skill → skills/adsm-ctx}/templates/ctx/docs/environment/AGENTS.md +0 -0
- /package/{skill → skills/adsm-ctx}/templates/ctx/docs/environment/overview.md +0 -0
- /package/{skill → skills/adsm-ctx}/templates/ctx/docs/filesystem.md +0 -0
- /package/{skill → skills/adsm-ctx}/templates/ctx/docs/product/AGENTS.md +0 -0
- /package/{skill → skills/adsm-ctx}/templates/ctx/docs/product/domain.md +0 -0
- /package/{skill → skills/adsm-ctx}/templates/ctx/docs/product/glossary.md +0 -0
- /package/{skill → skills/adsm-ctx}/templates/ctx/docs/product/overview.md +0 -0
- /package/{skill → skills/adsm-ctx}/templates/ctx/docs/product/roles.md +0 -0
- /package/{skill → skills/adsm-ctx}/templates/ctx/docs/product/use-cases.md +0 -0
package/src/Init/Service.mjs
CHANGED
|
@@ -5,29 +5,8 @@
|
|
|
5
5
|
* @description Initializes the baseline ADSM context structure in a target project directory.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
const templateRoot = new URL("../../
|
|
9
|
-
const rootAgentsTemplate =
|
|
10
|
-
"# Root Level",
|
|
11
|
-
"",
|
|
12
|
-
"- Path: `AGENTS.md`",
|
|
13
|
-
"- Changed: `20260702`",
|
|
14
|
-
"",
|
|
15
|
-
"## Purpose",
|
|
16
|
-
"",
|
|
17
|
-
"Marks the repository root and points agents to the project cognitive context in `ctx/`.",
|
|
18
|
-
"",
|
|
19
|
-
"## Bootstrap Exception",
|
|
20
|
-
"",
|
|
21
|
-
"- `init` and other bootstrap operations may create the initial `ctx/` structure when it does not exist yet.",
|
|
22
|
-
"- This repository uses an ADSM-managed cognitive context.",
|
|
23
|
-
"- Use skill `adsm-ctx` for context validation, upgrades, and methodology rules.",
|
|
24
|
-
"",
|
|
25
|
-
"## Cognitive Context Entry",
|
|
26
|
-
"",
|
|
27
|
-
"- Read `ctx/AGENTS.md` before modifying project files after the context exists.",
|
|
28
|
-
"- Treat `ctx/` as the source of truth for project context after bootstrap is complete.",
|
|
29
|
-
"",
|
|
30
|
-
].join("\n");
|
|
8
|
+
const templateRoot = new URL("../../skills/adsm-ctx/templates/ctx/", import.meta.url);
|
|
9
|
+
const rootAgentsTemplate = new URL("../../skills/adsm-ctx/templates/AGENTS.md", import.meta.url);
|
|
31
10
|
|
|
32
11
|
export default class Service {
|
|
33
12
|
/**
|
|
@@ -42,9 +21,9 @@ export default class Service {
|
|
|
42
21
|
/**
|
|
43
22
|
* Creates baseline context structure in the target project.
|
|
44
23
|
*
|
|
45
|
-
* @param {object}
|
|
46
|
-
* @param {string}
|
|
47
|
-
* @returns {Promise<
|
|
24
|
+
* @param {object} deps
|
|
25
|
+
* @param {string} deps.targetPath
|
|
26
|
+
* @returns {Promise<Fl32_Skill_Adsm_Ctx_Init_Result>}
|
|
48
27
|
*/
|
|
49
28
|
this.execute = async function ({targetPath}) {
|
|
50
29
|
const projectRoot = pathService.resolve(targetPath);
|
|
@@ -70,18 +49,18 @@ export default class Service {
|
|
|
70
49
|
}
|
|
71
50
|
|
|
72
51
|
/**
|
|
73
|
-
* @param {object}
|
|
74
|
-
* @param {string
|
|
75
|
-
* @param {typeof import("node:fs")}
|
|
76
|
-
* @param {Fl32_Skill_Adsm_Ctx_Shared_Path}
|
|
77
|
-
* @param {string}
|
|
78
|
-
* @param {string
|
|
52
|
+
* @param {object} deps
|
|
53
|
+
* @param {Array<string>} deps.created
|
|
54
|
+
* @param {typeof import("node:fs")} deps.fs
|
|
55
|
+
* @param {Fl32_Skill_Adsm_Ctx_Shared_Path} deps.pathService
|
|
56
|
+
* @param {string} deps.projectRoot
|
|
57
|
+
* @param {Array<string>} deps.skipped
|
|
79
58
|
* @returns {void}
|
|
80
59
|
*/
|
|
81
60
|
function ensureRootAgents({created, fs, pathService, projectRoot, skipped}) {
|
|
82
61
|
const filePath = pathService.join(projectRoot, "AGENTS.md");
|
|
83
62
|
if (!fs.existsSync(filePath)) {
|
|
84
|
-
fs.writeFileSync(filePath, rootAgentsTemplate);
|
|
63
|
+
fs.writeFileSync(filePath, fs.readFileSync(rootAgentsTemplate, "utf8").replaceAll("YYYYMMDD", new Date().toISOString().slice(0, 10).replaceAll("-", "")));
|
|
85
64
|
created.push("AGENTS.md");
|
|
86
65
|
} else {
|
|
87
66
|
skipped.push("AGENTS.md");
|
|
@@ -89,11 +68,11 @@ function ensureRootAgents({created, fs, pathService, projectRoot, skipped}) {
|
|
|
89
68
|
}
|
|
90
69
|
|
|
91
70
|
/**
|
|
92
|
-
* @param {object}
|
|
93
|
-
* @param {string
|
|
94
|
-
* @param {typeof import("node:fs")}
|
|
95
|
-
* @param {Fl32_Skill_Adsm_Ctx_Shared_Path}
|
|
96
|
-
* @param {string}
|
|
71
|
+
* @param {object} deps
|
|
72
|
+
* @param {Array<string>} deps.created
|
|
73
|
+
* @param {typeof import("node:fs")} deps.fs
|
|
74
|
+
* @param {Fl32_Skill_Adsm_Ctx_Shared_Path} deps.pathService
|
|
75
|
+
* @param {string} deps.projectRoot
|
|
97
76
|
* @returns {void}
|
|
98
77
|
*/
|
|
99
78
|
function stampCreatedMarkdownDates({created, fs, pathService, projectRoot}) {
|
|
@@ -108,13 +87,13 @@ function stampCreatedMarkdownDates({created, fs, pathService, projectRoot}) {
|
|
|
108
87
|
}
|
|
109
88
|
|
|
110
89
|
/**
|
|
111
|
-
* @param {object}
|
|
112
|
-
* @param {string
|
|
113
|
-
* @param {typeof import("node:fs")}
|
|
114
|
-
* @param {Fl32_Skill_Adsm_Ctx_Shared_Metadata}
|
|
115
|
-
* @param {Fl32_Skill_Adsm_Ctx_Shared_Path}
|
|
116
|
-
* @param {string}
|
|
117
|
-
* @param {string
|
|
90
|
+
* @param {object} deps
|
|
91
|
+
* @param {Array<string>} deps.created
|
|
92
|
+
* @param {typeof import("node:fs")} deps.fs
|
|
93
|
+
* @param {Fl32_Skill_Adsm_Ctx_Shared_Metadata} deps.metadata
|
|
94
|
+
* @param {Fl32_Skill_Adsm_Ctx_Shared_Path} deps.pathService
|
|
95
|
+
* @param {string} deps.projectRoot
|
|
96
|
+
* @param {Array<string>} deps.skipped
|
|
118
97
|
* @returns {void}
|
|
119
98
|
*/
|
|
120
99
|
function writeMetadata({created, fs, metadata, pathService, projectRoot, skipped}) {
|
|
@@ -127,10 +106,10 @@ function writeMetadata({created, fs, metadata, pathService, projectRoot, skipped
|
|
|
127
106
|
}
|
|
128
107
|
}
|
|
129
108
|
|
|
130
|
-
export const __deps__ = Object.freeze({
|
|
109
|
+
export const __deps__ = Object.freeze({default: Object.freeze({
|
|
131
110
|
copyDirectory: "Fl32_Skill_Adsm_Ctx_Shared_CopyDirectory$",
|
|
132
111
|
fs: "node:fs",
|
|
133
112
|
metadata: "Fl32_Skill_Adsm_Ctx_Shared_Metadata$",
|
|
134
113
|
pathService: "Fl32_Skill_Adsm_Ctx_Shared_Path$",
|
|
135
114
|
url: "node:url",
|
|
136
|
-
});
|
|
115
|
+
})});
|
package/src/Shared/Constants.mjs
CHANGED
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
export default class Constants {
|
|
9
|
+
/** Initializes the supported context constants. */
|
|
9
10
|
constructor() {
|
|
10
11
|
this.CONTEXT_SCHEMA = "adsm-context";
|
|
11
|
-
this.CONTEXT_VERSION = "0.
|
|
12
|
+
this.CONTEXT_VERSION = "0.6";
|
|
12
13
|
this.VERIFICATION_CAPABILITY = "verification-layer";
|
|
13
14
|
this.CONTEXT_CAPABILITIES = Object.freeze([this.VERIFICATION_CAPABILITY]);
|
|
14
15
|
this.VERIFICATION_BLOCK = "verification";
|
|
@@ -23,6 +24,8 @@ export default class Constants {
|
|
|
23
24
|
"ctx/docs/architecture",
|
|
24
25
|
"ctx/docs/environment",
|
|
25
26
|
"ctx/docs/code",
|
|
27
|
+
"ctx/docs/verification",
|
|
28
|
+
"ctx/docs/verification/AGENTS.md",
|
|
26
29
|
"ctx/adsm.json",
|
|
27
30
|
"ctx/AGENTS.md",
|
|
28
31
|
"ctx/docs/AGENTS.md",
|
|
@@ -15,9 +15,9 @@ export default class CopyDirectory {
|
|
|
15
15
|
/**
|
|
16
16
|
* Copies a directory tree recursively.
|
|
17
17
|
*
|
|
18
|
-
* @param {object}
|
|
19
|
-
* @param {string}
|
|
20
|
-
* @param {string}
|
|
18
|
+
* @param {object} deps
|
|
19
|
+
* @param {string} deps.sourcePath
|
|
20
|
+
* @param {string} deps.targetPath
|
|
21
21
|
* @returns {void}
|
|
22
22
|
*/
|
|
23
23
|
this.execute = function ({sourcePath, targetPath}) {
|
|
@@ -36,12 +36,12 @@ export default class CopyDirectory {
|
|
|
36
36
|
/**
|
|
37
37
|
* Copies only missing directories and files from source to target.
|
|
38
38
|
*
|
|
39
|
-
* @param {object}
|
|
40
|
-
* @param {string
|
|
41
|
-
* @param {string}
|
|
42
|
-
* @param {string
|
|
43
|
-
* @param {string}
|
|
44
|
-
* @param {string}
|
|
39
|
+
* @param {object} deps
|
|
40
|
+
* @param {Array<string>} deps.created
|
|
41
|
+
* @param {string} deps.pathPrefix
|
|
42
|
+
* @param {Array<string>} deps.skipped
|
|
43
|
+
* @param {string} deps.sourcePath
|
|
44
|
+
* @param {string} deps.targetPath
|
|
45
45
|
* @returns {void}
|
|
46
46
|
*/
|
|
47
47
|
this.copyMissing = function ({created, pathPrefix, skipped, sourcePath, targetPath}) {
|
package/src/Shared/Metadata.mjs
CHANGED
package/src/Skill/Installer.mjs
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @description Installs the bundled skill payload into a target skills directory.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
const sourceRoot = new URL("../../
|
|
8
|
+
const sourceRoot = new URL("../../skills/adsm-ctx/", import.meta.url);
|
|
9
9
|
|
|
10
10
|
export default class Installer {
|
|
11
11
|
/**
|
|
@@ -19,8 +19,8 @@ export default class Installer {
|
|
|
19
19
|
/**
|
|
20
20
|
* Installs the skill payload.
|
|
21
21
|
*
|
|
22
|
-
* @param {object}
|
|
23
|
-
* @param {string}
|
|
22
|
+
* @param {object} deps
|
|
23
|
+
* @param {string} deps.targetRoot
|
|
24
24
|
* @returns {Promise<string>}
|
|
25
25
|
*/
|
|
26
26
|
this.execute = async function ({targetRoot}) {
|
|
@@ -39,9 +39,9 @@ export default class Installer {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
export const __deps__ = Object.freeze({
|
|
42
|
+
export const __deps__ = Object.freeze({default: Object.freeze({
|
|
43
43
|
copyDirectory: "Fl32_Skill_Adsm_Ctx_Shared_CopyDirectory$",
|
|
44
44
|
fs: "node:fs",
|
|
45
45
|
pathService: "Fl32_Skill_Adsm_Ctx_Shared_Path$",
|
|
46
46
|
url: "node:url",
|
|
47
|
-
});
|
|
47
|
+
})});
|