@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.
- package/CHANGELOG.md +14 -0
- package/README.md +37 -14
- package/bin/adsm-ctx.mjs +44 -0
- package/package.json +65 -11
- package/skill/SKILL.md +2 -2
- package/skill/references/context-lifecycle.md +3 -3
- package/skill/references/document-projections.md +7 -65
- package/skill/references/documentation-quality-audit.md +22 -14
- package/skill/references/semantic-skins.md +65 -0
- package/skill/templates/work/context/semantic-skin.md +11 -22
- package/src/Cli/Command/Design.mjs +17 -0
- package/src/Cli/Command/Init.mjs +22 -0
- package/src/Cli/Command/InstallSkill.mjs +18 -0
- package/src/Cli/Command/Upgrade.mjs +19 -0
- package/src/Cli/Command/Validate.mjs +19 -0
- package/src/Shared/Constants.mjs +0 -4
- package/src/Validate/Service.mjs +14 -178
- package/types.d.ts +5 -2
- package/.github/workflows/flows-app.yaml +0 -95
- package/AGENTS.md +0 -112
- package/bin/cli.mjs +0 -55
- package/ctx/AGENTS.md +0 -44
- package/ctx/README.md +0 -24
- package/ctx/adsm.json +0 -5
- package/ctx/agent/AGENTS.md +0 -41
- package/ctx/agent/flows/.img/flancer32-skill-adsm-ctx-github-flows.png +0 -0
- package/ctx/agent/flows/AGENTS.md +0 -37
- package/ctx/agent/flows/cfg/issues/labeled/accepted/profile.json +0 -25
- package/ctx/agent/flows/cfg/issues/labeled/accepted/prompt.md +0 -104
- package/ctx/agent/flows/cfg/issues/labeled/clarification-provided/profile.json +0 -15
- package/ctx/agent/flows/cfg/issues/labeled/clarification-provided/prompt.md +0 -63
- package/ctx/agent/flows/cfg/issues/opened/admission/profile.json +0 -14
- package/ctx/agent/flows/cfg/issues/opened/admission/prompt.md +0 -110
- package/ctx/agent/flows/cfg/profile.json +0 -40
- package/ctx/agent/flows/cfg/pull_request/closed/merged/profile.json +0 -15
- package/ctx/agent/flows/cfg/pull_request/closed/merged/prompt.md +0 -41
- package/ctx/agent/flows/cfg/pull_request/labeled/needs-fix/profile.json +0 -25
- package/ctx/agent/flows/cfg/pull_request/labeled/needs-fix/prompt.md +0 -79
- package/ctx/agent/flows/cfg/pull_request/labeled/ready-for-validation/profile.json +0 -15
- package/ctx/agent/flows/cfg/pull_request/labeled/ready-for-validation/prompt.md +0 -72
- package/ctx/agent/flows/cfg/pull_request/labeled/verified/profile.json +0 -15
- package/ctx/agent/flows/cfg/pull_request/labeled/verified/prompt.md +0 -48
- package/ctx/agent/flows/deployment.md +0 -116
- package/ctx/agent/flows/labels.md +0 -108
- package/ctx/agent/flows/overview.md +0 -82
- package/ctx/agent/prompt/cli/ai-intro.md +0 -141
- package/ctx/assets/.gitkeep +0 -1
- package/ctx/docs/AGENTS.md +0 -121
- package/ctx/docs/ai-intro.md +0 -37
- package/ctx/docs/architecture/AGENTS.md +0 -98
- package/ctx/docs/architecture/behavior.md +0 -68
- package/ctx/docs/architecture/checklists.md +0 -48
- package/ctx/docs/architecture/constraints.md +0 -53
- package/ctx/docs/architecture/constraints.skin.en.md +0 -38
- package/ctx/docs/architecture/decisions.md +0 -118
- package/ctx/docs/architecture/integration.md +0 -31
- package/ctx/docs/architecture/overview.md +0 -76
- package/ctx/docs/architecture/state.md +0 -50
- package/ctx/docs/architecture/structure.md +0 -38
- package/ctx/docs/architecture/supervision.md +0 -71
- package/ctx/docs/code/AGENTS.md +0 -51
- package/ctx/docs/code/overview.md +0 -53
- package/ctx/docs/code/testing.md +0 -26
- package/ctx/docs/environment/AGENTS.md +0 -50
- package/ctx/docs/environment/overview.md +0 -33
- package/ctx/docs/filesystem.md +0 -44
- package/ctx/docs/product/AGENTS.md +0 -51
- package/ctx/docs/product/domain.md +0 -63
- package/ctx/docs/product/domain.skin.en.md +0 -40
- package/ctx/docs/product/glossary.md +0 -31
- package/ctx/docs/product/overview.md +0 -112
- package/ctx/docs/product/overview.skin.en.md +0 -38
- package/ctx/docs/product/roles.md +0 -17
- package/ctx/docs/product/use-cases.md +0 -15
- package/src/Bootstrap/Cli.mjs +0 -62
- package/src/Bootstrap.mjs +0 -108
- package/test/integration/.gitkeep +0 -1
- package/test/integration/cli-help.test.mjs +0 -15
- package/test/integration/cli-init-validate.test.mjs +0 -223
- package/test/integration/cli-install-skill.test.mjs +0 -41
- package/test/unit/Bootstrap/Cli.test.mjs +0 -23
- package/test/unit/Bootstrap.test.mjs +0 -53
- package/test/unit/Design/Service.test.mjs +0 -11
- package/test/unit/Init/Service.test.mjs +0 -51
- package/test/unit/Shared/Constants.test.mjs +0 -21
- package/test/unit/Shared/CopyDirectory.test.mjs +0 -31
- package/test/unit/Shared/Metadata.test.mjs +0 -9
- package/test/unit/Shared/Path.test.mjs +0 -11
- package/test/unit/Skill/Installer.test.mjs +0 -20
- package/test/unit/Upgrade/Service.test.mjs +0 -13
- package/test/unit/Validate/Service.test.mjs +0 -760
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import test from 'node:test';
|
|
2
|
-
import assert from 'node:assert/strict';
|
|
3
|
-
|
|
4
|
-
import Constants from '../../../src/Shared/Constants.mjs';
|
|
5
|
-
|
|
6
|
-
test('Constants publish required baseline markers', () => {
|
|
7
|
-
const constants = new Constants();
|
|
8
|
-
assert.equal(constants.CONTEXT_SCHEMA, 'adsm-context');
|
|
9
|
-
assert.equal(constants.CONTEXT_VERSION, '0.1.0');
|
|
10
|
-
assert.equal(constants.SKIN_WORD_WARN, 160);
|
|
11
|
-
assert.equal(constants.SKIN_WORD_ERROR, 240);
|
|
12
|
-
assert.equal(constants.SKIN_LIST_WARN, 12);
|
|
13
|
-
assert.equal(constants.SKIN_LIST_ERROR, 20);
|
|
14
|
-
assert.equal(constants.DOC_LEVEL_MAX_DIRECTORIES, 9);
|
|
15
|
-
assert.equal(constants.DOC_LEVEL_MAX_FILES, 9);
|
|
16
|
-
assert.ok(constants.REQUIRED_PATHS.includes('ctx/adsm.json'));
|
|
17
|
-
assert.deepEqual(constants.DOC_LEVELS, ['product', 'architecture', 'environment', 'code']);
|
|
18
|
-
assert.ok(constants.REQUIRED_PATHS.includes('ctx/docs/architecture'));
|
|
19
|
-
assert.equal(constants.REQUIRED_PATHS.includes('ctx/docs/product/overview.md'), false);
|
|
20
|
-
assert.equal(constants.REQUIRED_PATHS.includes('ctx/docs/filesystem.md'), false);
|
|
21
|
-
});
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import test from 'node:test';
|
|
2
|
-
import assert from 'node:assert/strict';
|
|
3
|
-
|
|
4
|
-
import CopyDirectory from '../../../src/Shared/CopyDirectory.mjs';
|
|
5
|
-
|
|
6
|
-
test('CopyDirectory copies only missing files', () => {
|
|
7
|
-
const copied = [];
|
|
8
|
-
const fs = {
|
|
9
|
-
existing: new Set(['/target', '/target/exists.txt']),
|
|
10
|
-
existsSync(path) { return this.existing.has(path); },
|
|
11
|
-
mkdirSync(path) { this.existing.add(path); },
|
|
12
|
-
readdirSync(path) {
|
|
13
|
-
if (path === '/source') {
|
|
14
|
-
return [
|
|
15
|
-
{name: 'exists.txt', isDirectory: () => false},
|
|
16
|
-
{name: 'missing.txt', isDirectory: () => false},
|
|
17
|
-
];
|
|
18
|
-
}
|
|
19
|
-
return [];
|
|
20
|
-
},
|
|
21
|
-
copyFileSync(source, target) { copied.push({source, target}); this.existing.add(target); },
|
|
22
|
-
};
|
|
23
|
-
const service = new CopyDirectory({fs, pathService: {join: (...parts) => parts.join('/')}});
|
|
24
|
-
const created = [];
|
|
25
|
-
const skipped = [];
|
|
26
|
-
service.copyMissing({created, skipped, pathPrefix: 'ctx', sourcePath: '/source', targetPath: '/target'});
|
|
27
|
-
|
|
28
|
-
assert.deepEqual(copied, [{source: '/source/missing.txt', target: '/target/missing.txt'}]);
|
|
29
|
-
assert.ok(created.includes('ctx/missing.txt'));
|
|
30
|
-
assert.ok(skipped.includes('ctx/exists.txt'));
|
|
31
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import test from 'node:test';
|
|
2
|
-
import assert from 'node:assert/strict';
|
|
3
|
-
|
|
4
|
-
import Metadata from '../../../src/Shared/Metadata.mjs';
|
|
5
|
-
|
|
6
|
-
test('Metadata creates baseline payload without hardcoded date field', () => {
|
|
7
|
-
const metadata = new Metadata({constants: {CONTEXT_SCHEMA: 'adsm-context', CONTEXT_VERSION: '0.1.0'}});
|
|
8
|
-
assert.deepEqual(metadata.create(), {schema: 'adsm-context', version: '0.1.0'});
|
|
9
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import test from 'node:test';
|
|
2
|
-
import assert from 'node:assert/strict';
|
|
3
|
-
|
|
4
|
-
import PathService from '../../../src/Shared/Path.mjs';
|
|
5
|
-
|
|
6
|
-
test('Path service delegates resolve and join', () => {
|
|
7
|
-
const path = {resolve: (value) => `/root/${value}`, join: (...parts) => parts.join('/')};
|
|
8
|
-
const service = new PathService({path});
|
|
9
|
-
assert.equal(service.resolve('demo'), '/root/demo');
|
|
10
|
-
assert.equal(service.join('a', 'b'), 'a/b');
|
|
11
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import test from 'node:test';
|
|
2
|
-
import assert from 'node:assert/strict';
|
|
3
|
-
|
|
4
|
-
import Installer from '../../../src/Skill/Installer.mjs';
|
|
5
|
-
|
|
6
|
-
test('Installer removes target and copies skill payload', async () => {
|
|
7
|
-
const removed = [];
|
|
8
|
-
const copied = [];
|
|
9
|
-
const installer = new Installer({
|
|
10
|
-
copyDirectory: {execute: (params) => copied.push(params)},
|
|
11
|
-
fs: {rmSync: (target, options) => removed.push({target, options})},
|
|
12
|
-
pathService: {join: (...parts) => parts.join('/'), resolve: (value) => `/abs/${value}`},
|
|
13
|
-
url: {fileURLToPath: () => '/repo/skill'},
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
const result = await installer.execute({targetRoot: 'skills'});
|
|
17
|
-
assert.equal(result, '/abs/skills/adsm-ctx');
|
|
18
|
-
assert.deepEqual(removed[0], {target: '/abs/skills/adsm-ctx', options: {recursive: true, force: true}});
|
|
19
|
-
assert.deepEqual(copied[0], {sourcePath: '/repo/skill', targetPath: '/abs/skills/adsm-ctx'});
|
|
20
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import test from 'node:test';
|
|
2
|
-
import assert from 'node:assert/strict';
|
|
3
|
-
|
|
4
|
-
import Service from '../../../src/Upgrade/Service.mjs';
|
|
5
|
-
|
|
6
|
-
test('Upgrade service reports missing metadata', async () => {
|
|
7
|
-
const service = new Service({
|
|
8
|
-
fs: {existsSync: () => false},
|
|
9
|
-
pathService: {join: (...parts) => parts.join('/'), resolve: (value) => value},
|
|
10
|
-
});
|
|
11
|
-
const result = await service.execute({targetPath: '/project'});
|
|
12
|
-
assert.equal(result.ok, false);
|
|
13
|
-
});
|