@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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Documentation Projections
|
|
2
2
|
|
|
3
|
-
- Path: `
|
|
4
|
-
- Changed: `
|
|
3
|
+
- Path: `skills/adsm-ctx/references/document-projections.md`
|
|
4
|
+
- Changed: `20261024`
|
|
5
5
|
|
|
6
|
-
Use this reference whenever an agent initializes, designs, validates, audits, compresses, or
|
|
6
|
+
Use this reference whenever an agent initializes, designs, validates, audits, compresses, or evolves ADSM documentation under `ctx/docs/`.
|
|
7
7
|
|
|
8
8
|
## Core Model
|
|
9
9
|
|
|
@@ -100,7 +100,7 @@ Projection drift includes:
|
|
|
100
100
|
|
|
101
101
|
Validation should report structural drift such as orphan skins.
|
|
102
102
|
|
|
103
|
-
Audit, compression, and
|
|
103
|
+
Audit, compression, and evolution work should report semantic drift when it can be evidenced from the documents.
|
|
104
104
|
|
|
105
105
|
## Documentation Levels And Verification Layer
|
|
106
106
|
|
|
@@ -120,9 +120,11 @@ Their meanings remain:
|
|
|
120
120
|
- `environment` — accepted runtime and deployment conditions;
|
|
121
121
|
- `code` — accepted implementation and engineering constraints.
|
|
122
122
|
|
|
123
|
-
`ctx/docs/verification/` is
|
|
123
|
+
`ctx/docs/verification/` is a mandatory cross-cutting documentation block. It relates declarations to observations of reality, but is not a fifth refinement level and does not change declaration authority.
|
|
124
124
|
|
|
125
|
-
|
|
125
|
+
For the distinction between project testing and product verification, evidence limits, and npm command conventions, see [testing-and-verification.md](testing-and-verification.md).
|
|
126
|
+
|
|
127
|
+
Require the block in schema `0.6`, even when it contains only `AGENTS.md`. 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.
|
|
126
128
|
|
|
127
129
|
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.
|
|
128
130
|
|
|
@@ -202,7 +204,7 @@ Do not use `AGENTS.md` as a replacement for agent documents or skins.
|
|
|
202
204
|
|
|
203
205
|
Documentation quality audit should:
|
|
204
206
|
|
|
205
|
-
- recursively include ordinary `*.md` agent documents under the four declarative levels and under
|
|
207
|
+
- recursively include ordinary `*.md` agent documents under the four declarative levels and under the mandatory `verification/` block;
|
|
206
208
|
- classify `*.skin.<lang>.md` files as human-facing semantic skins;
|
|
207
209
|
- detect agent/skin document groups by same basename and directory;
|
|
208
210
|
- report orphan skins;
|
|
@@ -217,7 +219,7 @@ Deterministic validation should:
|
|
|
217
219
|
- require every `*.skin.<lang>.md` file to have a paired non-skin `*.md` document and an explicit valid language marker;
|
|
218
220
|
- require an explicit valid language marker, reversible paired-base resolution, and no redundant `Agent Document` section;
|
|
219
221
|
- verify local markdown document links under `ctx/docs/**`;
|
|
220
|
-
-
|
|
222
|
+
- require `ctx/docs/verification/AGENTS.md`, accept an AGENTS-only root, and require recognized primary-target categories with at least one durable specification in every created category;
|
|
221
223
|
- keep verification category placement and evidence sufficiency as semantic audit work rather than claiming them from directory shape;
|
|
222
224
|
- 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`;
|
|
223
225
|
- keep ordinary agent-document shape checks minimal instead of imposing a rigid body template.
|
|
@@ -238,9 +240,9 @@ When compressing an agent document with a matching skin, preserve the skin's pur
|
|
|
238
240
|
|
|
239
241
|
When an agent document contains human-facing semantic framing that should be preserved independently for human supervision, recommend extracting a matching skin unless the human has not authorized that migration.
|
|
240
242
|
|
|
241
|
-
##
|
|
243
|
+
## Evolution Rules
|
|
242
244
|
|
|
243
|
-
|
|
245
|
+
Follow [the agent evolution procedure](context-evolution.md). Deterministic CLI checks do not change context or metadata. Agent evolution should:
|
|
244
246
|
|
|
245
247
|
- preserve existing agent documents and project-specific nested subdirectories;
|
|
246
248
|
- add or recommend skins only where human semantic control is clear;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Documentation Compression
|
|
2
2
|
|
|
3
|
-
- Path: `
|
|
4
|
-
- Changed: `
|
|
3
|
+
- Path: `skills/adsm-ctx/references/documentation-compression.md`
|
|
4
|
+
- Changed: `20261024`
|
|
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
|
|
|
@@ -16,7 +16,7 @@ Compress the project cognitive documentation corpus under `ctx/docs/`.
|
|
|
16
16
|
Follow this method:
|
|
17
17
|
|
|
18
18
|
1. Read the applicable `AGENTS.md` hierarchy from the repository root to the target documentation scope. For the default scope, this means the hierarchy from the repository root to `ctx/docs/`.
|
|
19
|
-
2. Read
|
|
19
|
+
2. Read [document-projections.md](document-projections.md) from this installed skill for agent/skin classification and projection drift rules.
|
|
20
20
|
3. Use `ctx/docs/` as the default corpus unless the human explicitly provides another scope.
|
|
21
21
|
4. Exclude operational context outside `ctx/docs/` by default, including `ctx/agent/`, workflow configuration, prompt assets, generated reports, runtime materials, and `ctx/assets/**`.
|
|
22
22
|
5. Treat ordinary `*.md` files as agent-facing operational context documents and `*.skin.<lang>.md` files as human-facing semantic skins.
|
|
@@ -28,13 +28,13 @@ Follow this method:
|
|
|
28
28
|
11. Avoid inventing, weakening, generalizing, or silently deleting project-specific knowledge.
|
|
29
29
|
12. Update `Changed` attributes for every modified context document.
|
|
30
30
|
13. Report non-editorial uncertainty and skin contradictions as human decisions instead of resolving them by rewrite.
|
|
31
|
-
14. Use
|
|
31
|
+
14. Use [the compression report template](../assets/report/documentation-compression.md) as the report structure when a file report is requested.
|
|
32
32
|
|
|
33
33
|
## Corpus Selection
|
|
34
34
|
|
|
35
35
|
The default corpus is `ctx/docs/`.
|
|
36
36
|
|
|
37
|
-
Documentation compression is intended for declarative project documentation under the four ADSM levels: product, architecture, environment, and code, plus
|
|
37
|
+
Documentation compression is intended for declarative project documentation under the four ADSM levels: product, architecture, environment, and code, plus the mandatory 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
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Documentation Quality Audit
|
|
2
2
|
|
|
3
|
-
- Path: `
|
|
4
|
-
- Changed: `
|
|
3
|
+
- Path: `skills/adsm-ctx/references/documentation-quality-audit.md`
|
|
4
|
+
- Changed: `20261024`
|
|
5
5
|
|
|
6
6
|
Use this reference when an agent must audit an existing documentation corpus as an ADSM cognitive context.
|
|
7
7
|
|
|
@@ -16,8 +16,8 @@ Audit the documentation corpus of this project against the ADSM documentation qu
|
|
|
16
16
|
Follow this method:
|
|
17
17
|
|
|
18
18
|
1. Read the applicable `AGENTS.md` hierarchy from the repository root to `ctx/docs/`, unless the user explicitly gives another documentation scope.
|
|
19
|
-
2. Read
|
|
20
|
-
3. Identify the audit corpus under `ctx/docs/`, including nested documentation under `product/`, `architecture/`, `environment/`, and `
|
|
19
|
+
2. Read [document-projections.md](document-projections.md) from this installed skill for agent/skin classification and projection drift rules.
|
|
20
|
+
3. Identify the audit corpus under `ctx/docs/`, including nested documentation under `product/`, `architecture/`, `environment/`, `code/`, and the mandatory cross-cutting `verification/` boundary.
|
|
21
21
|
4. Classify ordinary `*.md` files as agent-facing operational context documents, `*.skin.<lang>.md` files as human-facing semantic skins, and `AGENTS.md` files as local agent routing instructions.
|
|
22
22
|
5. Build a compact documentation map that shows source-of-truth agent documents, refinement relationships, agent/skin pairs, orphan skins, projection drift, and duplicated responsibility areas.
|
|
23
23
|
6. Evaluate the corpus against the eight ADSM documentation quality criteria and the projection-specific checks below after deterministic validation is clean or warning-only.
|
|
@@ -25,7 +25,7 @@ Follow this method:
|
|
|
25
25
|
8. Report only evidence-backed findings, with file references and the violated criterion.
|
|
26
26
|
9. Separate findings that can be fixed editorially from findings that require cross-document synchronization, upstream documentation changes, projection-drift resolution, or human decisions.
|
|
27
27
|
10. Do not invent missing product facts, architecture boundaries, authority rules, workflow semantics, or implementation behavior.
|
|
28
|
-
11. Use
|
|
28
|
+
11. Use [the audit report template](../assets/report/documentation-quality-audit.md) as the report structure when a file report is requested.
|
|
29
29
|
|
|
30
30
|
## Corpus Selection
|
|
31
31
|
|
|
@@ -208,7 +208,7 @@ The audit may propose correction order and candidate edits, but it must distingu
|
|
|
208
208
|
|
|
209
209
|
## Verification Layer Review
|
|
210
210
|
|
|
211
|
-
|
|
211
|
+
Include mandatory `ctx/docs/verification/` in the default corpus; an AGENTS-only root contains no specifications to audit. Review it as cross-cutting specification documentation, not a fifth declarative level and not an evidence or incident archive.
|
|
212
212
|
|
|
213
213
|
Check whether each durable specification:
|
|
214
214
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Orchestration Model
|
|
2
2
|
|
|
3
|
-
- Path: `
|
|
4
|
-
- Changed: `
|
|
3
|
+
- Path: `skills/adsm-ctx/references/orchestration-model.md`
|
|
4
|
+
- Changed: `20261024`
|
|
5
5
|
|
|
6
6
|
This skill is a router and baseline manager.
|
|
7
7
|
|
|
@@ -11,7 +11,7 @@ It is responsible for:
|
|
|
11
11
|
- the agent/skin documentation projection model;
|
|
12
12
|
- lifecycle guidance;
|
|
13
13
|
- baseline validation;
|
|
14
|
-
-
|
|
14
|
+
- agent-driven evolution guidance and read-only Deterministic CLI checks;
|
|
15
15
|
- Verification Layer documentation lifecycle support and structural validation;
|
|
16
16
|
- the reserved boundary definition for `ctx/agent/`.
|
|
17
17
|
|
|
@@ -20,9 +20,11 @@ It is not responsible for inventing specialized technical or domain documentatio
|
|
|
20
20
|
For `ctx/agent/`, this skill may:
|
|
21
21
|
|
|
22
22
|
- install only `ctx/agent/AGENTS.md` as the boundary file;
|
|
23
|
-
-
|
|
23
|
+
- explain that this branch is part of project cognitive context while its project-specific workflows are outside the reusable ADSM baseline;
|
|
24
24
|
- preserve project-local materials that humans or agents maintain there for concrete tools or relationships.
|
|
25
25
|
|
|
26
|
+
Operational materials organize authorized work within accepted declarations in `ctx/docs/` and applicable supervision constraints. They do not independently establish product or architecture authority or override human approval and escalation requirements. Preserve existing local materials and maintain navigation against the actual filesystem; add structure only for concrete project needs.
|
|
27
|
+
|
|
26
28
|
For `ctx/agent/`, this skill must not:
|
|
27
29
|
|
|
28
30
|
- define or require a template-managed subdirectory structure;
|
|
@@ -33,10 +35,10 @@ When specialization is needed, the agent should use a matching available skill a
|
|
|
33
35
|
|
|
34
36
|
Concrete tool-facing materials belong to project-local documentation, explicit human instruction, or an external specialized skill when one is available and relevant.
|
|
35
37
|
|
|
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
|
|
38
|
+
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 mandatory cross-cutting documentation rather than a fifth level.
|
|
37
39
|
|
|
38
40
|
## Template Boundary
|
|
39
41
|
|
|
40
42
|
`templates/ctx/` is the reusable initialization baseline. It may establish generic structure, starter documents, and the `ctx/agent/AGENTS.md` boundary, but it must not add project-specific facts or detailed ADSM methodology to project-facing documents.
|
|
41
43
|
|
|
42
|
-
Keep only the minimal bootstrap signal needed to identify an ADSM context and route methodology work to this skill. Use `
|
|
44
|
+
Keep only the minimal bootstrap signal needed to identify an ADSM context and route methodology work to this skill. Use `assets/` only as working material for agent operations; do not install those reports or optional semantic-skin patterns into project context by default.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Semantic Skins
|
|
2
2
|
|
|
3
|
-
- Path: `
|
|
3
|
+
- Path: `skills/adsm-ctx/references/semantic-skins.md`
|
|
4
4
|
- Changed: `20260814`
|
|
5
5
|
|
|
6
6
|
A semantic skin is a compact skeletal human projection of its paired agent document.
|
|
@@ -63,3 +63,5 @@ When creating or reviewing a skin, verify that it:
|
|
|
63
63
|
- adds no untracked facts or requirements and does not contradict its base;
|
|
64
64
|
- excludes operational detail and redundant navigation; and
|
|
65
65
|
- remains compact enough for human cognitive use.
|
|
66
|
+
|
|
67
|
+
Use the [semantic-skin asset](../assets/context/semantic-skin.md) as an optional authoring pattern for authorized work. It is not an initialization template and does not determine the output location; place the resulting skin beside its paired project document.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Specialized Skills
|
|
2
2
|
|
|
3
|
-
- Path: `
|
|
3
|
+
- Path: `skills/adsm-ctx/references/specialized-skills.md`
|
|
4
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.
|
|
@@ -30,5 +30,5 @@ Specialized skills must preserve ADSM's documentation projection model:
|
|
|
30
30
|
- ordinary `*.md` files under `ctx/docs/**` are agent-facing operational context documents;
|
|
31
31
|
- `*.skin.<lang>.md` files are human-facing semantic skins for matching agent documents;
|
|
32
32
|
- nested subdirectories inside the four declarative documentation levels are allowed;
|
|
33
|
-
-
|
|
33
|
+
- the mandatory `ctx/docs/verification/` boundary remains cross-cutting; specifications use a primary declaration target rather than the mechanism or specialized skill that obtains evidence;
|
|
34
34
|
- visual, generated, rendered, and auxiliary artifacts belong under `ctx/assets/**`.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Project Testing And Product Verification
|
|
2
|
+
|
|
3
|
+
- Path: `skills/adsm-ctx/references/testing-and-verification.md`
|
|
4
|
+
- Changed: `20261104`
|
|
5
|
+
|
|
6
|
+
Project testing checks technical health and engineering conventions of the project and its artifacts, such as context structure, types, module conventions, dependency boundaries, and packaging. A passing project check is not evidence that the product satisfies all its declared requirements. In particular, structural context validation cannot establish semantic correctness.
|
|
7
|
+
|
|
8
|
+
Product verification assesses a declared product property or behavior through bounded observations guided by applicable specifications under `ctx/docs/verification/`. Specifications identify the target, applicable state, approach, and interpretation limits; actual evidence and its provenance remain separate. Explain what each scenario establishes and what it does not: a controlled collaborator can support a bounded contract check, but does not prove live interoperability. The Verification Layer is cross-cutting and cannot redefine accepted product meaning.
|
|
9
|
+
|
|
10
|
+
Choose checks proportionally to the change and risk. Include focused negative tests when security or failure boundaries change. The same test mechanism can contribute to either concern when its target and evidence are explicit; test level alone does not decide the distinction. Humans and accepted project context determine required guarantees. Projects own their scenarios, mechanisms, and evidence; do not invent them in generic templates.
|
|
11
|
+
|
|
12
|
+
For npm projects, `npm test` should be a very fast local project smoke check: no network, temporary installations, or end-to-end scenarios. Use focused `test:*` commands where useful for other project checks. Use `npm run verify` for product verification and optional `verify:*` commands for selected scopes; document their coverage, prerequisites, skips, and limits. Do not prescribe a universal suite or mandatory end-to-end setup. These are npm conventions, not requirements to use npm in other ecosystems; keep existing contexts intact and evolve project commands only within the authorized scope.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Root Level
|
|
2
|
+
|
|
3
|
+
- Path: `AGENTS.md`
|
|
4
|
+
- Template Version: `20261024`
|
|
5
|
+
- Changed: `YYYYMMDD`
|
|
6
|
+
|
|
7
|
+
## Boundary
|
|
8
|
+
|
|
9
|
+
This file controls repository work. `ctx/` owns project meaning and is authoritative for product and implementation decisions; consult `ctx/AGENTS.md` and task-relevant context for design or code changes. If implementation conflicts with accepted context, follow the context and report any proposed change to accepted meaning for human approval rather than silently rewriting it. Read navigation documents only when needed and avoid rereading unchanged instructions within a session. Use the `adsm-ctx` skill when available for context lifecycle work.
|
|
10
|
+
|
|
11
|
+
`ctx/` may be part of this repository or a separately mounted repository. Detect its Git boundary before editing, preserve separate histories, and never remove, replace, relocate, or unmount it. If absent, create `ctx/` only when bootstrap is within the assigned scope. Deeper `AGENTS.md` files refine local rules without overriding root invariants.
|
|
12
|
+
|
|
13
|
+
A task may cover multiple repositories. Coordinate affected contracts and consumers, verify their integration, and keep each Git history separate. Do not expand into unrelated repositories. The human defines scope and approves changes to accepted meaning.
|
|
14
|
+
|
|
15
|
+
## Development Policy
|
|
16
|
+
|
|
17
|
+
Default to Rapid Evolution by Default, Reliability by Requirement: deliver the essential happy path for fast feedback, fail visibly on unexpected conditions, and avoid speculative defenses and backward compatibility unless required. Verify essential contracts and increase verification when risk or observed defects justify it. Accepted context defines the target; humans determine acceptable risk and may strengthen or replace this default. Preserve security, integrity, and explicit invariants. Consult the `adsm-ctx` skill for the policy.
|
|
18
|
+
|
|
19
|
+
## Efficient Execution
|
|
20
|
+
|
|
21
|
+
Classify the task before reading context or running checks. Git-only work needs Git-state checks, not product-context scans or tests. For code or context changes, inspect only relevant owners; run deterministic checks chosen by changed responsibility and risk. Capture verbose output outside the model context and inspect logs on failure or when evidence is needed. Report results, omitted coverage, and material risks concisely.
|
|
22
|
+
|
|
23
|
+
Do not modify, replace, delete, or relocate this file without explicit human instruction. Do not read, search, or expose secret-bearing files or credentials; non-secret examples may describe configuration shape. If a secret is accidentally exposed, do not repeat it; notify the human that it should be rotated or revoked.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Cognitive Context
|
|
2
|
+
|
|
3
|
+
- Path: `ctx/AGENTS.md`
|
|
4
|
+
- Template Version: `20261024`
|
|
5
|
+
- Changed: `YYYYMMDD`
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
This directory contains the project's cognitive context.
|
|
10
|
+
|
|
11
|
+
`docs/` holds authoritative project definitions, `agent/` holds project-local agent operations, and `assets/` holds non-authoritative supporting materials.
|
|
12
|
+
|
|
13
|
+
Keep generic ADSM methodology outside the project context.
|
|
14
|
+
|
|
15
|
+
## Level Map
|
|
16
|
+
|
|
17
|
+
- `agent/` — project-local agent and tool materials.
|
|
18
|
+
- `assets/` — visual, generated, and auxiliary documentation assets.
|
|
19
|
+
- `docs/` — authoritative project documentation and constraints.
|
|
20
|
+
- `AGENTS.md` — context boundary and navigation rules.
|
|
21
|
+
- `README.md` — introductory context information.
|
|
22
|
+
- `adsm.json` — context metadata and versioning.
|
|
23
|
+
|
|
24
|
+
## Level Boundary
|
|
25
|
+
|
|
26
|
+
Defines:
|
|
27
|
+
|
|
28
|
+
- The boundary of the project's cognitive context.
|
|
29
|
+
- Separation of authoritative documentation, agent operations, and supporting assets.
|
|
30
|
+
- Navigation to the appropriate context branch.
|
|
31
|
+
|
|
32
|
+
Does NOT define:
|
|
33
|
+
|
|
34
|
+
- Product, architecture, environment, or code meaning; these belong under `docs/`.
|
|
35
|
+
- Project-local agent workflows; these belong under `agent/`.
|
|
36
|
+
- Generic ADSM methodology; use the `adsm-ctx` skill when available.
|
|
37
|
+
|
|
38
|
+
## Local Reading Map
|
|
39
|
+
|
|
40
|
+
- For initial project orientation, read `docs/ai-intro.md` when needed.
|
|
41
|
+
- For repository topology, consult `docs/filesystem.md`.
|
|
42
|
+
- For product, architecture, environment, or code work, follow `docs/AGENTS.md` and read only task-relevant documentation.
|
|
43
|
+
- For project-local agent operations, follow `agent/AGENTS.md`.
|
|
44
|
+
- For context lifecycle work, use the `adsm-ctx` skill when available.
|
|
45
|
+
|
|
46
|
+
Read `README.md` only when additional orientation is needed. Avoid rereading unchanged context within a session.
|
|
@@ -15,7 +15,7 @@ Detailed ADSM validation and methodology rules are intentionally kept out of thi
|
|
|
15
15
|
## Entry Points
|
|
16
16
|
|
|
17
17
|
- Read `AGENTS.md` for cognitive-context structure and governance rules.
|
|
18
|
-
- Use skill `adsm-ctx` when you need ADSM validation,
|
|
18
|
+
- Use skill `adsm-ctx` when you need ADSM validation, evolution, or methodology guidance.
|
|
19
19
|
- Read `docs/filesystem.md` for the top-level repository map.
|
|
20
20
|
- Read `docs/` for declarative project documentation.
|
|
21
21
|
- Read `agent/` only when working with repository-local agent operations or workflow assets.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Agent Operations
|
|
2
|
+
|
|
3
|
+
- Path: `ctx/agent/AGENTS.md`
|
|
4
|
+
- Template Version: `20261024`
|
|
5
|
+
- Changed: `YYYYMMDD`
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
This branch holds project-specific operational materials used by agents and their tools, such as instructions, prompts, workflow definitions, reports, or tool documentation. These are optional examples, not required document types or directories.
|
|
10
|
+
|
|
11
|
+
## Level Map
|
|
12
|
+
|
|
13
|
+
- `AGENTS.md` — agent operations boundary and local navigation.
|
|
14
|
+
|
|
15
|
+
## Level Boundary
|
|
16
|
+
|
|
17
|
+
Defines:
|
|
18
|
+
|
|
19
|
+
- The project-local home for organizing and performing authorized agent work.
|
|
20
|
+
- A project-specific structure beneath this branch; only this file belongs to the reusable initialization baseline.
|
|
21
|
+
|
|
22
|
+
Does NOT define:
|
|
23
|
+
|
|
24
|
+
- Authoritative product, architecture, environment, or code declarations; these belong under `ctx/docs/`.
|
|
25
|
+
- A standard workflow, tool choice, agent role, or required operational subdirectory.
|
|
26
|
+
|
|
27
|
+
## Working Rules
|
|
28
|
+
|
|
29
|
+
- Follow the applicable `AGENTS.md` hierarchy and task-relevant materials listed in the Level Map before acting.
|
|
30
|
+
- Keep operational instructions consistent with accepted declarations in `ctx/docs/` and applicable supervision constraints. They cannot grant authority to change accepted meaning or bypass approval and escalation requirements; surface conflicts to the human.
|
|
31
|
+
- Preserve existing project-specific materials. Add materials only for concrete project needs, without speculative directory scaffolding.
|
|
32
|
+
- Keep the Level Map synchronized with the actual filesystem, listing directories first and sorting each group alphabetically. Follow local instructions in the relevant subdirectory.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Project Documentation
|
|
2
|
+
|
|
3
|
+
- Path: `ctx/docs/AGENTS.md`
|
|
4
|
+
- Template Version: `20261024`
|
|
5
|
+
- Changed: `YYYYMMDD`
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
This directory contains authoritative project declarations and navigation documents.
|
|
10
|
+
|
|
11
|
+
ADSM defines four ordered declarative levels: product → architecture → environment → code. Lower levels refine upstream meaning without redefining it. Accepted declarations constrain every valid implementation.
|
|
12
|
+
|
|
13
|
+
A mandatory cross-cutting Verification Layer relates declarations to bounded observations of reality. It is not a fifth declarative level and does not establish independent authority over project meaning.
|
|
14
|
+
|
|
15
|
+
## Level Map
|
|
16
|
+
|
|
17
|
+
- `architecture/` — system structure, behavior, state ownership, and integration boundaries.
|
|
18
|
+
- `code/` — implementation constraints and engineering conventions.
|
|
19
|
+
- `environment/` — runtime conditions, infrastructure, and deployment constraints.
|
|
20
|
+
- `product/` — product meaning, domain, roles, and expected outcomes.
|
|
21
|
+
- `verification/` — durable verification specifications; cross-cutting, outside the authority chain.
|
|
22
|
+
- `AGENTS.md` — documentation boundary and working rules.
|
|
23
|
+
- `ai-intro.md` — initial project orientation for agents.
|
|
24
|
+
- `filesystem.md` — top-level repository navigation.
|
|
25
|
+
|
|
26
|
+
Keep this map aligned with the actual project structure. Add optional branches only when adopted.
|
|
27
|
+
|
|
28
|
+
## Level Boundary
|
|
29
|
+
|
|
30
|
+
Defines:
|
|
31
|
+
|
|
32
|
+
- Accepted project declarations and their dependency order.
|
|
33
|
+
- Rules for reading, refining, and maintaining declarative knowledge.
|
|
34
|
+
- Boundaries between declarations, verification specifications, and supporting materials.
|
|
35
|
+
|
|
36
|
+
Does NOT define:
|
|
37
|
+
|
|
38
|
+
- Agent operations and workflows under `ctx/agent/`.
|
|
39
|
+
- Executable product artifacts, runtime state, or operational evidence.
|
|
40
|
+
- Generic ADSM methodology; use the `adsm-ctx` skill when available.
|
|
41
|
+
|
|
42
|
+
## Local Reading Map
|
|
43
|
+
|
|
44
|
+
- For unfamiliar projects, consult `ai-intro.md`.
|
|
45
|
+
- For repository topology, consult `filesystem.md` when needed.
|
|
46
|
+
- For project declarations, follow the relevant level's `AGENTS.md` and read its task-relevant documents.
|
|
47
|
+
- For lower-level changes, consult the upstream declarations needed to establish their meaning and constraints.
|
|
48
|
+
- For Verification Layer work, follow `verification/AGENTS.md`.
|
|
49
|
+
- For context lifecycle, validation, audit, compression, or evolution, use the `adsm-ctx` skill when available.
|
|
50
|
+
|
|
51
|
+
Avoid unnecessary full-context scans and repeated reading of unchanged documents.
|
|
52
|
+
|
|
53
|
+
## Documentation Rules
|
|
54
|
+
|
|
55
|
+
- Preserve the authority order: product → architecture → environment → code. Report missing or conflicting upstream meaning rather than inventing or silently changing it downstream.
|
|
56
|
+
- Keep each durable declaration in its appropriate authoritative document. Preserve consistency across dependent levels.
|
|
57
|
+
- Ordinary `*.md` documents are agent-facing and written in English by default. Optional `*.skin.<lang>.md` files provide human-facing semantic projections.
|
|
58
|
+
- Before editing an agent document, read all matching skins. Preserve their meaning and invariants; report projection drift or required human decisions instead of silently resolving conflicts.
|
|
59
|
+
- Keep documents explicit, focused, and maintainable. Preserve meaningful nested structure and do not sacrifice requirements or precision for brevity.
|
|
60
|
+
- Keep each declarative level within nine direct directories and nine direct ordinary files where practical, excluding `AGENTS.md` and matching skins. Record intentional excess under `## Documentation Capacity Exception` in that level's `AGENTS.md`.
|
|
61
|
+
- Require `verification/AGENTS.md`; the root may contain only this file. Create primary-target categories only for actual durable specifications.
|
|
62
|
+
- Place verification specifications under their primary declarative targets and link secondary declarations. Keep specifications distinct from actual evidence and operational feedback state. Neither evidence nor assessments may redefine accepted meaning.
|
|
63
|
+
- Keep visual, generated, rendered, and auxiliary artifacts under `ctx/assets/**`; they must not introduce authoritative project meaning.
|
|
64
|
+
- Maintain `Path` and `Changed` attributes in stable documents. Delegate detailed methodology and lifecycle procedures to the `adsm-ctx` skill.
|
|
@@ -14,4 +14,6 @@ List the main test layers, directories, and intended verification scope.
|
|
|
14
14
|
|
|
15
15
|
## Verification Target Boundary
|
|
16
16
|
|
|
17
|
-
Keep executable test organization, framework conventions, fixtures, and isolation in this code-level document. When a project
|
|
17
|
+
Keep executable test organization, framework conventions, fixtures, and isolation in this code-level document. When a project adds a durable specification under the mandatory `ctx/docs/verification/` boundary, that specification states the observed declared expectation and primary target; the executable mechanism remains governed here.
|
|
18
|
+
|
|
19
|
+
Distinguish project health checks from product verification and document each command's scope and limits. Apply the `adsm-ctx` skill's testing and verification guidance to the project's ecosystem and risk.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Verification Layer
|
|
2
|
+
|
|
3
|
+
- Path: `ctx/docs/verification/AGENTS.md`
|
|
4
|
+
- Changed: `20261024`
|
|
5
|
+
|
|
6
|
+
## Purpose
|
|
7
|
+
|
|
8
|
+
This mandatory cross-cutting boundary holds durable verification specifications. It is not a fifth declarative authority level. Product → architecture → environment → code remains the ordered hierarchy; humans control accepted meaning.
|
|
9
|
+
|
|
10
|
+
## Level Map
|
|
11
|
+
|
|
12
|
+
- `AGENTS.md` — verification boundary and local routing.
|
|
13
|
+
|
|
14
|
+
## Navigation And Editing
|
|
15
|
+
|
|
16
|
+
The root may contain only `AGENTS.md` when no specifications exist. Create `product/`, `architecture/`, `environment/`, or `code/` only when an actual durable specification belongs there. Route each specification by its primary declarative target, linking secondary targets rather than duplicating it. Preserve useful project-specific nesting and add local routing instructions as needed.
|
|
17
|
+
|
|
18
|
+
Read applicable declarations and matching semantic skins before editing. Preserve traceability, applicability, interpretation bounds, and blind spots. Escalate conflicting accepted meaning to the human.
|
|
19
|
+
|
|
20
|
+
## Level Boundary
|
|
21
|
+
|
|
22
|
+
Defines:
|
|
23
|
+
|
|
24
|
+
- The home and primary-target routing of durable verification specifications.
|
|
25
|
+
- Specification applicability, traceability, and interpretation limits.
|
|
26
|
+
|
|
27
|
+
Does NOT define:
|
|
28
|
+
|
|
29
|
+
- A fifth declarative authority level or changes to accepted declarations.
|
|
30
|
+
- Actual observations, evidence records, or operational feedback state; keep these outside this boundary.
|
|
31
|
+
- Verification coverage or runtime correctness merely from structural conformance.
|
package/src/Cli/Command/Init.mjs
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @namespace Fl32_Skill_Adsm_Ctx_Cli_Command_Init
|
|
5
|
+
* @description Initializes project context via the CLI.
|
|
6
|
+
*/
|
|
6
7
|
export default class Init {
|
|
7
|
-
|
|
8
|
+
/**
|
|
9
|
+
* @param {object} deps
|
|
10
|
+
* @param {Fl32_Skill_Adsm_Ctx_Cli_Config} deps.config
|
|
11
|
+
* @param {Fl32_Skill_Adsm_Ctx_Init_Service} deps.init
|
|
12
|
+
* @param {typeof import("node:process")} deps.processModule
|
|
13
|
+
*/
|
|
14
|
+
constructor({config, init, processModule}) {
|
|
8
15
|
this.id = "adsm-ctx:init";
|
|
9
16
|
this.summary = "Initialize an ADSM context.";
|
|
10
17
|
this.lifetime = "finite";
|
|
18
|
+
/**
|
|
19
|
+
* @param {object} deps
|
|
20
|
+
* @param {Record<string, string>} deps.args
|
|
21
|
+
* @returns {Promise<void>}
|
|
22
|
+
*/
|
|
11
23
|
this.execute = async function ({args}) {
|
|
12
24
|
const result = await init.execute({targetPath: args["target-path"] ?? config.cwd});
|
|
13
25
|
processModule.stdout.write(`${formatInitReport(result)}\n`);
|
|
@@ -15,8 +27,12 @@ export default class Init {
|
|
|
15
27
|
}
|
|
16
28
|
}
|
|
17
29
|
|
|
30
|
+
/**
|
|
31
|
+
* @param {Fl32_Skill_Adsm_Ctx_Init_Result} result
|
|
32
|
+
* @returns {string}
|
|
33
|
+
*/
|
|
18
34
|
function formatInitReport(result) {
|
|
19
35
|
return [`Initialized ADSM context in ${result.ctxRoot}`, ...result.created.map((entry) => `Created: ${entry}`), ...result.skipped.map((entry) => `Skipped: ${entry}`)].join("\n");
|
|
20
36
|
}
|
|
21
37
|
|
|
22
|
-
export const __deps__ = Object.freeze({default: Object.freeze({config: "TeqFw_Cli_Config$", init: "Fl32_Skill_Adsm_Ctx_Init_Service$"})});
|
|
38
|
+
export const __deps__ = Object.freeze({default: Object.freeze({processModule: "node:process", config: "TeqFw_Cli_Config$", init: "Fl32_Skill_Adsm_Ctx_Init_Service$"})});
|
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @namespace Fl32_Skill_Adsm_Ctx_Cli_Command_InstallSkill
|
|
5
|
+
* @description Installs the skill payload via the CLI.
|
|
6
|
+
*/
|
|
6
7
|
export default class InstallSkill {
|
|
7
|
-
|
|
8
|
+
/**
|
|
9
|
+
* @param {object} deps
|
|
10
|
+
* @param {Fl32_Skill_Adsm_Ctx_Skill_Installer} deps.installer
|
|
11
|
+
* @param {typeof import("node:process")} deps.processModule
|
|
12
|
+
*/
|
|
13
|
+
constructor({installer, processModule}) {
|
|
8
14
|
this.id = "adsm-ctx:install-skill";
|
|
9
15
|
this.summary = "Install the bundled agent skill payload.";
|
|
10
16
|
this.lifetime = "finite";
|
|
17
|
+
/**
|
|
18
|
+
* @param {object} deps
|
|
19
|
+
* @param {Record<string, string>} deps.args
|
|
20
|
+
* @returns {Promise<void>}
|
|
21
|
+
*/
|
|
11
22
|
this.execute = async function ({args}) {
|
|
12
23
|
const targetDir = await installer.execute({targetRoot: args["skills-root"]});
|
|
13
24
|
processModule.stdout.write(`Installed skill payload to ${targetDir}\n`);
|
|
@@ -15,4 +26,4 @@ export default class InstallSkill {
|
|
|
15
26
|
}
|
|
16
27
|
}
|
|
17
28
|
|
|
18
|
-
export const __deps__ = Object.freeze({default: Object.freeze({installer: "Fl32_Skill_Adsm_Ctx_Skill_Installer$"})});
|
|
29
|
+
export const __deps__ = Object.freeze({default: Object.freeze({processModule: "node:process", installer: "Fl32_Skill_Adsm_Ctx_Skill_Installer$"})});
|
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @namespace Fl32_Skill_Adsm_Ctx_Cli_Command_Validate
|
|
5
|
+
* @description Validates project context via the CLI.
|
|
6
|
+
*/
|
|
6
7
|
export default class Validate {
|
|
7
|
-
|
|
8
|
+
/**
|
|
9
|
+
* @param {object} deps
|
|
10
|
+
* @param {Fl32_Skill_Adsm_Ctx_Cli_Config} deps.config
|
|
11
|
+
* @param {typeof import("node:process")} deps.processModule
|
|
12
|
+
* @param {Fl32_Skill_Adsm_Ctx_Validate_Service} deps.validate
|
|
13
|
+
*/
|
|
14
|
+
constructor({config, processModule, validate}) {
|
|
8
15
|
this.id = "adsm-ctx:validate";
|
|
9
16
|
this.summary = "Validate an ADSM context.";
|
|
10
17
|
this.lifetime = "finite";
|
|
18
|
+
/**
|
|
19
|
+
* @param {object} deps
|
|
20
|
+
* @param {Record<string, string>} deps.args
|
|
21
|
+
* @returns {Promise<void>}
|
|
22
|
+
*/
|
|
11
23
|
this.execute = async function ({args}) {
|
|
12
24
|
const result = await validate.execute({targetPath: args["target-path"] ?? config.cwd});
|
|
13
25
|
processModule.stdout.write(`${validate.format({result})}\n`);
|
|
@@ -16,4 +28,4 @@ export default class Validate {
|
|
|
16
28
|
}
|
|
17
29
|
}
|
|
18
30
|
|
|
19
|
-
export const __deps__ = Object.freeze({default: Object.freeze({config: "TeqFw_Cli_Config$", validate: "Fl32_Skill_Adsm_Ctx_Validate_Service$"})});
|
|
31
|
+
export const __deps__ = Object.freeze({default: Object.freeze({processModule: "node:process", config: "TeqFw_Cli_Config$", validate: "Fl32_Skill_Adsm_Ctx_Validate_Service$"})});
|