@flancer32/skill-adsm-ctx 0.2.1
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/.github/workflows/flows-app.yaml +95 -0
- package/AGENTS.md +112 -0
- package/LICENSE +201 -0
- package/README.md +246 -0
- package/bin/cli.mjs +55 -0
- package/ctx/AGENTS.md +44 -0
- package/ctx/README.md +24 -0
- package/ctx/adsm.json +5 -0
- package/ctx/agent/AGENTS.md +41 -0
- package/ctx/agent/flows/.img/flancer32-skill-adsm-ctx-github-flows.png +0 -0
- package/ctx/agent/flows/AGENTS.md +37 -0
- package/ctx/agent/flows/cfg/issues/labeled/accepted/profile.json +25 -0
- package/ctx/agent/flows/cfg/issues/labeled/accepted/prompt.md +104 -0
- package/ctx/agent/flows/cfg/issues/labeled/clarification-provided/profile.json +15 -0
- package/ctx/agent/flows/cfg/issues/labeled/clarification-provided/prompt.md +63 -0
- package/ctx/agent/flows/cfg/issues/opened/admission/profile.json +14 -0
- package/ctx/agent/flows/cfg/issues/opened/admission/prompt.md +110 -0
- package/ctx/agent/flows/cfg/profile.json +40 -0
- package/ctx/agent/flows/cfg/pull_request/closed/merged/profile.json +15 -0
- package/ctx/agent/flows/cfg/pull_request/closed/merged/prompt.md +41 -0
- package/ctx/agent/flows/cfg/pull_request/labeled/needs-fix/profile.json +25 -0
- package/ctx/agent/flows/cfg/pull_request/labeled/needs-fix/prompt.md +79 -0
- package/ctx/agent/flows/cfg/pull_request/labeled/ready-for-validation/profile.json +15 -0
- package/ctx/agent/flows/cfg/pull_request/labeled/ready-for-validation/prompt.md +72 -0
- package/ctx/agent/flows/cfg/pull_request/labeled/verified/profile.json +15 -0
- package/ctx/agent/flows/cfg/pull_request/labeled/verified/prompt.md +48 -0
- package/ctx/agent/flows/deployment.md +116 -0
- package/ctx/agent/flows/labels.md +108 -0
- package/ctx/agent/flows/overview.md +82 -0
- package/ctx/agent/prompt/cli/ai-intro.md +141 -0
- package/ctx/assets/.gitkeep +1 -0
- package/ctx/docs/AGENTS.md +121 -0
- package/ctx/docs/ai-intro.md +37 -0
- package/ctx/docs/architecture/AGENTS.md +98 -0
- package/ctx/docs/architecture/behavior.md +68 -0
- package/ctx/docs/architecture/checklists.md +48 -0
- package/ctx/docs/architecture/constraints.md +53 -0
- package/ctx/docs/architecture/constraints.skin.en.md +38 -0
- package/ctx/docs/architecture/decisions.md +118 -0
- package/ctx/docs/architecture/integration.md +31 -0
- package/ctx/docs/architecture/overview.md +76 -0
- package/ctx/docs/architecture/state.md +50 -0
- package/ctx/docs/architecture/structure.md +38 -0
- package/ctx/docs/architecture/supervision.md +71 -0
- package/ctx/docs/code/AGENTS.md +51 -0
- package/ctx/docs/code/overview.md +53 -0
- package/ctx/docs/code/testing.md +26 -0
- package/ctx/docs/environment/AGENTS.md +50 -0
- package/ctx/docs/environment/overview.md +33 -0
- package/ctx/docs/filesystem.md +44 -0
- package/ctx/docs/product/AGENTS.md +51 -0
- package/ctx/docs/product/domain.md +63 -0
- package/ctx/docs/product/domain.skin.en.md +40 -0
- package/ctx/docs/product/glossary.md +31 -0
- package/ctx/docs/product/overview.md +112 -0
- package/ctx/docs/product/overview.skin.en.md +38 -0
- package/ctx/docs/product/roles.md +17 -0
- package/ctx/docs/product/use-cases.md +15 -0
- package/jsconfig.json +12 -0
- package/migrations/README.md +9 -0
- package/package.json +33 -0
- package/skill/SKILL.md +47 -0
- package/skill/references/agents-hierarchy.md +45 -0
- package/skill/references/context-lifecycle.md +53 -0
- package/skill/references/design-questionnaire.md +44 -0
- package/skill/references/document-projections.md +290 -0
- package/skill/references/documentation-compression.md +117 -0
- package/skill/references/documentation-quality-audit.md +199 -0
- package/skill/references/orchestration-model.md +41 -0
- package/skill/references/specialized-skills.md +31 -0
- package/skill/references/upgrade-policy.md +19 -0
- package/skill/templates/AGENTS.md +120 -0
- package/skill/templates/ai/AGENTS.md +59 -0
- package/skill/templates/ctx/AGENTS.md +45 -0
- package/skill/templates/ctx/README.md +27 -0
- package/skill/templates/ctx/adsm.json +7 -0
- package/skill/templates/ctx/agent/AGENTS.md +36 -0
- package/skill/templates/ctx/assets/.gitkeep +1 -0
- package/skill/templates/ctx/docs/AGENTS.md +55 -0
- package/skill/templates/ctx/docs/ai-intro.md +53 -0
- package/skill/templates/ctx/docs/architecture/AGENTS.md +42 -0
- package/skill/templates/ctx/docs/architecture/behavior.md +38 -0
- package/skill/templates/ctx/docs/architecture/checklists.md +25 -0
- package/skill/templates/ctx/docs/architecture/constraints.md +36 -0
- package/skill/templates/ctx/docs/architecture/decisions.md +33 -0
- package/skill/templates/ctx/docs/architecture/integration.md +27 -0
- package/skill/templates/ctx/docs/architecture/overview.md +73 -0
- package/skill/templates/ctx/docs/architecture/state.md +52 -0
- package/skill/templates/ctx/docs/architecture/structure.md +32 -0
- package/skill/templates/ctx/docs/architecture/supervision.md +61 -0
- package/skill/templates/ctx/docs/code/AGENTS.md +35 -0
- package/skill/templates/ctx/docs/code/overview.md +21 -0
- package/skill/templates/ctx/docs/code/testing.md +13 -0
- package/skill/templates/ctx/docs/environment/AGENTS.md +34 -0
- package/skill/templates/ctx/docs/environment/overview.md +21 -0
- package/skill/templates/ctx/docs/filesystem.md +39 -0
- package/skill/templates/ctx/docs/product/AGENTS.md +38 -0
- package/skill/templates/ctx/docs/product/domain.md +77 -0
- package/skill/templates/ctx/docs/product/glossary.md +110 -0
- package/skill/templates/ctx/docs/product/overview.md +74 -0
- package/skill/templates/ctx/docs/product/roles.md +100 -0
- package/skill/templates/ctx/docs/product/use-cases.md +109 -0
- package/skill/templates/work/context/semantic-skin.md +27 -0
- package/skill/templates/work/report/documentation-compression.md +34 -0
- package/skill/templates/work/report/documentation-quality-audit.md +90 -0
- package/src/Bootstrap/Cli.mjs +62 -0
- package/src/Bootstrap.mjs +108 -0
- package/src/Design/Service.mjs +36 -0
- package/src/Init/Service.mjs +136 -0
- package/src/Shared/Constants.mjs +36 -0
- package/src/Shared/CopyDirectory.mjs +78 -0
- package/src/Shared/Metadata.mjs +30 -0
- package/src/Shared/Path.mjs +38 -0
- package/src/Skill/Installer.mjs +47 -0
- package/src/Upgrade/Service.mjs +44 -0
- package/src/Validate/Service.mjs +879 -0
- package/test/integration/.gitkeep +1 -0
- package/test/integration/cli-help.test.mjs +15 -0
- package/test/integration/cli-init-validate.test.mjs +223 -0
- package/test/integration/cli-install-skill.test.mjs +41 -0
- package/test/unit/Bootstrap/Cli.test.mjs +23 -0
- package/test/unit/Bootstrap.test.mjs +53 -0
- package/test/unit/Design/Service.test.mjs +11 -0
- package/test/unit/Init/Service.test.mjs +51 -0
- package/test/unit/Shared/Constants.test.mjs +21 -0
- package/test/unit/Shared/CopyDirectory.test.mjs +31 -0
- package/test/unit/Shared/Metadata.test.mjs +9 -0
- package/test/unit/Shared/Path.test.mjs +11 -0
- package/test/unit/Skill/Installer.test.mjs +20 -0
- package/test/unit/Upgrade/Service.test.mjs +13 -0
- package/test/unit/Validate/Service.test.mjs +760 -0
- package/types.d.ts +15 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Generate AI Intro
|
|
2
|
+
|
|
3
|
+
- Path: `ctx/agent/prompt/cli/ai-intro.md`
|
|
4
|
+
- Changed: `20260422`
|
|
5
|
+
|
|
6
|
+
## Purpose
|
|
7
|
+
|
|
8
|
+
Defines the prompt for generating `ctx/docs/ai-intro.md` in ADSM projects when the agent works in CLI mode with direct access to the project files.
|
|
9
|
+
|
|
10
|
+
The prompt is intended for agents such as Codex or Claude that can inspect repository content before writing the target document.
|
|
11
|
+
|
|
12
|
+
## Prompt Role
|
|
13
|
+
|
|
14
|
+
This prompt defines the expected purpose, scope, structure, and size of `ctx/docs/ai-intro.md`.
|
|
15
|
+
|
|
16
|
+
It is not a template for the final document text. It is a declarative task definition that tells the agent what kind of document must be produced.
|
|
17
|
+
|
|
18
|
+
## Prompt
|
|
19
|
+
|
|
20
|
+
Generate the document `ctx/docs/ai-intro.md`.
|
|
21
|
+
|
|
22
|
+
Assume that the project follows the common ADSM structure. General ADSM and TeqFW conventions are already defined elsewhere and do not need to be restated in detail unless they are necessary to position this specific project.
|
|
23
|
+
|
|
24
|
+
Before writing, inspect the project files that define public and private project identity. Use the repository content as the source of truth. Prefer project-specific documents and published product materials over assumptions.
|
|
25
|
+
|
|
26
|
+
The generated `ctx/docs/ai-intro.md` must be the first project-specific reading for AI agents entering the repository. Its role is to position the project in the broader software landscape rather than to explain the internal architecture in detail.
|
|
27
|
+
|
|
28
|
+
The document must answer the following questions:
|
|
29
|
+
|
|
30
|
+
- what kind of software product this project is;
|
|
31
|
+
- which problem space it addresses;
|
|
32
|
+
- what role it plays relative to adjacent classes of systems;
|
|
33
|
+
- who the primary audience or users of the project are;
|
|
34
|
+
- which technologies, platforms, and runtime assumptions define its technical family;
|
|
35
|
+
- which methodological base shapes the project;
|
|
36
|
+
- which distinctions make this project different from superficially similar tools;
|
|
37
|
+
- what the project must not be confused with.
|
|
38
|
+
|
|
39
|
+
The generated document must not duplicate `ctx/docs/AGENTS.md`. It must not restate level structure, hierarchy rules, mandatory-constraint language, or other context-governance mechanics except where a brief reference is necessary to position the project. The generated document must complement `ctx/docs/AGENTS.md`, not compete with it.
|
|
40
|
+
|
|
41
|
+
The generated document must also avoid detailed explanation of internal architecture, component decomposition, directory maps, execution pipelines, configuration schema, or implementation contracts. Those concerns belong to the specialized documents under `ctx/docs/`.
|
|
42
|
+
|
|
43
|
+
The generated document must remain declarative. It must describe identity, role, boundaries, and classification. Procedural instructions, workflows, and step-by-step reading guides must be absent or minimal.
|
|
44
|
+
|
|
45
|
+
## Source Basis
|
|
46
|
+
|
|
47
|
+
The generated document should be derived from the project's own artifacts, including where relevant:
|
|
48
|
+
|
|
49
|
+
- `ctx/docs/` for normative project meaning;
|
|
50
|
+
- `README.md`;
|
|
51
|
+
- published documentation under `docs/`;
|
|
52
|
+
- agent-facing published documentation under `ai/`;
|
|
53
|
+
- package metadata such as `package.json`;
|
|
54
|
+
- other repository-level materials that define the public role of the project.
|
|
55
|
+
|
|
56
|
+
Project-specific facts must be taken from the repository rather than inferred from generic ADSM expectations.
|
|
57
|
+
|
|
58
|
+
## Output Purpose
|
|
59
|
+
|
|
60
|
+
The generated `ctx/docs/ai-intro.md` must give an AI agent fast orientation before deeper reading.
|
|
61
|
+
|
|
62
|
+
After reading it, the agent should understand:
|
|
63
|
+
|
|
64
|
+
- what kind of thing this repository defines in the world of software;
|
|
65
|
+
- where the project sits relative to libraries, applications, frameworks, platforms, and automation systems;
|
|
66
|
+
- what technical and methodological family the project belongs to;
|
|
67
|
+
- which architectural misclassifications would lead to incorrect implementation decisions.
|
|
68
|
+
|
|
69
|
+
The document is an orientation layer, not a detailed specification.
|
|
70
|
+
|
|
71
|
+
## Output Constraints
|
|
72
|
+
|
|
73
|
+
The generated document must:
|
|
74
|
+
|
|
75
|
+
- use the standard document attribute block directly under the title;
|
|
76
|
+
- use the canonical path `ctx/docs/ai-intro.md`;
|
|
77
|
+
- follow the declarative style used by the cognitive context;
|
|
78
|
+
- use only relative links to other documents;
|
|
79
|
+
- remain readable as a compact introduction rather than a full survey.
|
|
80
|
+
|
|
81
|
+
The generated document must not:
|
|
82
|
+
|
|
83
|
+
- duplicate `ctx/docs/AGENTS.md`;
|
|
84
|
+
- redefine product, architecture, environment, or code contracts already defined in specialized documents;
|
|
85
|
+
- become a repository map;
|
|
86
|
+
- become an implementation walkthrough;
|
|
87
|
+
- become an onboarding checklist;
|
|
88
|
+
- become a marketing text;
|
|
89
|
+
- become a generic explanation of ADSM or TeqFW detached from the current project.
|
|
90
|
+
|
|
91
|
+
## Volume Constraints
|
|
92
|
+
|
|
93
|
+
The generated document should usually be between `700` and `1100` words.
|
|
94
|
+
|
|
95
|
+
Recommended target size is `800` to `1000` words.
|
|
96
|
+
|
|
97
|
+
The document should be shortened if it starts repeating statements better defined elsewhere. It should be expanded only when the project has unusual positioning that cannot be understood within a smaller text.
|
|
98
|
+
|
|
99
|
+
## Recommended Structure
|
|
100
|
+
|
|
101
|
+
The generated document should normally include sections equivalent to the following:
|
|
102
|
+
|
|
103
|
+
1. `Purpose`
|
|
104
|
+
2. `Project Type`
|
|
105
|
+
3. `Problem Space`
|
|
106
|
+
4. `Product Role In The Ecosystem`
|
|
107
|
+
5. `Primary Audience`
|
|
108
|
+
6. `Technology Base`
|
|
109
|
+
7. `Methodological Base`
|
|
110
|
+
8. `Distinguishing Characteristics`
|
|
111
|
+
9. `What This Project Is Not`
|
|
112
|
+
10. `External Reading Angle`
|
|
113
|
+
11. `Boundary`
|
|
114
|
+
|
|
115
|
+
Section titles may vary slightly if the project requires different wording, but the same informational shape must be preserved.
|
|
116
|
+
|
|
117
|
+
## Section Intent
|
|
118
|
+
|
|
119
|
+
The generated sections should satisfy the following intentions:
|
|
120
|
+
|
|
121
|
+
- `Purpose` states why `ai-intro.md` exists.
|
|
122
|
+
- `Project Type` classifies the product at the highest level.
|
|
123
|
+
- `Problem Space` states the narrow problem the project solves.
|
|
124
|
+
- `Product Role In The Ecosystem` positions it relative to neighboring software categories.
|
|
125
|
+
- `Primary Audience` identifies who uses or integrates the project.
|
|
126
|
+
- `Technology Base` identifies language, platform, packaging, runtime, and major technical assumptions.
|
|
127
|
+
- `Methodological Base` identifies the project-governing method or architectural family only insofar as it helps classify the project.
|
|
128
|
+
- `Distinguishing Characteristics` states the project choices that matter most for identity.
|
|
129
|
+
- `What This Project Is Not` prevents common misclassification.
|
|
130
|
+
- `External Reading Angle` points to a few high-value follow-up documents using relative links only.
|
|
131
|
+
- `Boundary` states what the document does not define.
|
|
132
|
+
|
|
133
|
+
## Acceptance Model
|
|
134
|
+
|
|
135
|
+
The generated `ctx/docs/ai-intro.md` is valid when it:
|
|
136
|
+
|
|
137
|
+
- gives a correct high-level picture of the project;
|
|
138
|
+
- remains specific to the current repository;
|
|
139
|
+
- avoids restating internal documentation structure in detail;
|
|
140
|
+
- helps an AI agent classify the project correctly before reading deeper documents;
|
|
141
|
+
- preserves declarative style and compact scope.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Project Documentation
|
|
2
|
+
|
|
3
|
+
- Path: `ctx/docs/AGENTS.md`
|
|
4
|
+
- Changed: `20260813`
|
|
5
|
+
|
|
6
|
+
## Purpose
|
|
7
|
+
|
|
8
|
+
Defines the structure of project-level declarative documentation organized by ADSM levels.
|
|
9
|
+
|
|
10
|
+
Documents at this level describe the system as a design object, including meaning, structure, environment, and implementation constraints.
|
|
11
|
+
|
|
12
|
+
## Level Map
|
|
13
|
+
|
|
14
|
+
- `architecture/` — structural form of the system, architectural entities, boundaries, and interaction model.
|
|
15
|
+
- `code/` — engineering invariants governing how architecture is expressed in source code.
|
|
16
|
+
- `environment/` — runtime environment and infrastructural prerequisites required for system operation.
|
|
17
|
+
- `product/` — system meaning, domain entities, and product-level invariants.
|
|
18
|
+
- `AGENTS.md` — level definition for `ctx/docs/`.
|
|
19
|
+
- `ai-intro.md` — entry document for AI agents that positions the project in the broader software landscape and gives initial project understanding.
|
|
20
|
+
- `filesystem.md` — declarative description of top-level repository directories and root-level files, defining repository boundaries and serving as a navigation map.
|
|
21
|
+
|
|
22
|
+
## Level Boundary
|
|
23
|
+
|
|
24
|
+
Defines:
|
|
25
|
+
|
|
26
|
+
- System meaning and domain intent through the documentation dependency chain rooted in `product`.
|
|
27
|
+
- System realization guardrails through `architecture`, `environment`, and `code`.
|
|
28
|
+
- Mandatory declarative constraints that bound any valid implementation.
|
|
29
|
+
|
|
30
|
+
All statements defined at this level and below are mandatory constraints for any valid implementation.
|
|
31
|
+
|
|
32
|
+
Violation of these constraints constitutes an incorrect result, regardless of functional correctness.
|
|
33
|
+
|
|
34
|
+
Does NOT define:
|
|
35
|
+
|
|
36
|
+
- Agent operations, workflow execution, or prompt-routing assets under `ctx/agent/`.
|
|
37
|
+
- Concrete implementation artifacts such as `src/`, `bin/`, `test/`, or other product files.
|
|
38
|
+
- Ad hoc task instructions that bypass or override the documentation dependency order.
|
|
39
|
+
|
|
40
|
+
## Documentation Rules
|
|
41
|
+
|
|
42
|
+
- Use explicit line breaks to keep each durable statement easy to scan.
|
|
43
|
+
- Keep agent documents dense, explicit, and maintainable.
|
|
44
|
+
- Keep skin documents compact, human-readable, and easy to supervise.
|
|
45
|
+
- Split large agent-document areas into natural nested subdocuments instead of over-compressing them for human readability.
|
|
46
|
+
- Preserve project-specific nested subdirectories under the four top-level documentation levels.
|
|
47
|
+
- Keep each documentation level to no more than nine direct directories and nine direct ordinary files, excluding `AGENTS.md` and all matching `*.skin.<lang>.md` files, where practical.
|
|
48
|
+
- When a level deliberately exceeds either value, its `AGENTS.md` must include a `## Documentation Capacity Exception` section that states the exception and its reason.
|
|
49
|
+
|
|
50
|
+
## Level Order
|
|
51
|
+
|
|
52
|
+
Documentation levels form a strict dependency order:
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
product
|
|
56
|
+
↓
|
|
57
|
+
architecture
|
|
58
|
+
↓
|
|
59
|
+
environment
|
|
60
|
+
↓
|
|
61
|
+
code
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
`architecture` translates product intent into stable engineering structure.
|
|
65
|
+
|
|
66
|
+
Lower levels may refine but must not redefine statements established at higher levels.
|
|
67
|
+
|
|
68
|
+
Lower levels may increase explicitness, constraint, and operational precision, but must not introduce new meaning absent from higher levels.
|
|
69
|
+
|
|
70
|
+
They must not add new product capabilities, invariants, authority, or semantic boundaries unless those are first named upstream.
|
|
71
|
+
|
|
72
|
+
## Documentation As A Cognitive Interface
|
|
73
|
+
|
|
74
|
+
Project documentation is the cognitive interface through which humans and agents cooperate across the documentation levels.
|
|
75
|
+
|
|
76
|
+
- It communicates human goals, constraints, and decisions to agents.
|
|
77
|
+
- It communicates agent findings, inconsistencies, and refinements back to humans.
|
|
78
|
+
- It connects the human direction-setting and result-evaluation loop with the agent refinement and execution-support loop.
|
|
79
|
+
- It must keep agent documents precise for agent execution and skin documents concise for human semantic control.
|
|
80
|
+
- It must support the full dependency order from product through architecture, environment, and code.
|
|
81
|
+
|
|
82
|
+
## Project Versus Skill Responsibility
|
|
83
|
+
|
|
84
|
+
Documents under `ctx/docs/` should primarily govern project development rather than explain or enforce ADSM on their own.
|
|
85
|
+
|
|
86
|
+
- Project documentation should define product meaning, architecture, constraints, decisions, and other load-bearing project knowledge.
|
|
87
|
+
- The skill should enforce ADSM structure, document-shape discipline, audit criteria, and compression rules.
|
|
88
|
+
- When a project document can either explain ADSM or help govern the project, prefer the project-governing content and leave ADSM conformance work to the skill.
|
|
89
|
+
|
|
90
|
+
## Documentation Projection Model
|
|
91
|
+
|
|
92
|
+
Documents under `ctx/docs/` are agent-facing operational context documents by default and are written in English unless a more specific rule applies.
|
|
93
|
+
|
|
94
|
+
Human-facing semantic skins use the explicit `*.skin.<lang>.md` suffix, with lowercase ISO 639-1 language codes such as `en`, `ru`, or `es`.
|
|
95
|
+
|
|
96
|
+
An unmarked `*.skin.md` file is invalid. One agent document and all skins with the same basename and directory form one document group.
|
|
97
|
+
|
|
98
|
+
Agents must read every matching skin before changing its matching agent document.
|
|
99
|
+
|
|
100
|
+
If a requested agent-document change would violate a skin, report a human decision instead of silently rewriting meaning.
|
|
101
|
+
|
|
102
|
+
If an agent document and its skin conflict, treat the conflict as projection drift and request a human decision before changing controlled meaning.
|
|
103
|
+
|
|
104
|
+
`overview.md` has no methodology-level status; it is an ordinary agent document unless paired with one or more `overview.skin.<lang>.md` files.
|
|
105
|
+
|
|
106
|
+
`AGENTS.md` files remain short local reading, editing, and routing instructions for agents.
|
|
107
|
+
|
|
108
|
+
`AGENTS.md` files are not full documentation artifacts and must not replace agent documents or semantic skins.
|
|
109
|
+
|
|
110
|
+
Visual, generated, rendered, or auxiliary artifacts belong under `ctx/assets/**` and must not introduce authoritative project meaning.
|
|
111
|
+
|
|
112
|
+
## Document Attributes
|
|
113
|
+
|
|
114
|
+
Documents under `ctx/docs/` use:
|
|
115
|
+
|
|
116
|
+
```md
|
|
117
|
+
- Path: `ctx/docs/{{subdir}}/file.md`
|
|
118
|
+
- Changed: `YYYYMMDD`
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
All stable documents use `Path` and `Changed` attributes.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# AI Introduction
|
|
2
|
+
|
|
3
|
+
- Path: `ctx/docs/ai-intro.md`
|
|
4
|
+
- Changed: `20260702`
|
|
5
|
+
|
|
6
|
+
## Purpose
|
|
7
|
+
|
|
8
|
+
Introduces this repository to an AI agent as a skill product whose responsibility is managing ADSM project cognitive context lifecycle.
|
|
9
|
+
|
|
10
|
+
## Repository Identity
|
|
11
|
+
|
|
12
|
+
This repository provides a generic orchestration skill for ADSM context lifecycle work.
|
|
13
|
+
|
|
14
|
+
It helps initialize, design, validate, audit, compress, and upgrade project cognitive context.
|
|
15
|
+
|
|
16
|
+
## Project Boundary
|
|
17
|
+
|
|
18
|
+
This repository does not define the business or architecture of an external product.
|
|
19
|
+
|
|
20
|
+
Its product is the skill package itself:
|
|
21
|
+
|
|
22
|
+
- CLI tooling in `bin/` and `src/`
|
|
23
|
+
- skill payload in `skill/`
|
|
24
|
+
- reusable context templates in `skill/templates/ctx/`
|
|
25
|
+
- working skill templates in `skill/templates/work/`
|
|
26
|
+
- repository cognitive context in `ctx/`
|
|
27
|
+
|
|
28
|
+
Documentation quality audit and documentation compression are agent-guided skill capabilities, not CLI commands.
|
|
29
|
+
|
|
30
|
+
Do not treat `ctx/agent/` as part of the ADSM methodology baseline beyond its boundary file `skill/templates/ctx/agent/AGENTS.md`.
|
|
31
|
+
|
|
32
|
+
## Reading Order
|
|
33
|
+
|
|
34
|
+
1. Read `ctx/docs/filesystem.md` for repository boundaries.
|
|
35
|
+
2. Read `ctx/docs/product/overview.md` for product meaning and scope.
|
|
36
|
+
3. Read `ctx/docs/code/overview.md` for product-code boundaries.
|
|
37
|
+
4. Read `skill/SKILL.md` when working as an agent using the packaged skill.
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Architecture Documentation
|
|
2
|
+
|
|
3
|
+
- Path: `ctx/docs/architecture/AGENTS.md`
|
|
4
|
+
- Changed: `20260715`
|
|
5
|
+
|
|
6
|
+
## Purpose
|
|
7
|
+
|
|
8
|
+
Defines the architecture documentation level.
|
|
9
|
+
|
|
10
|
+
Documents at this level translate product intent into stable engineering structure, behavior, state ownership, integration boundaries, architectural constraints, durable decisions, and supervision rules.
|
|
11
|
+
|
|
12
|
+
## Level Map
|
|
13
|
+
|
|
14
|
+
- `AGENTS.md` — level definition for `ctx/docs/architecture/`.
|
|
15
|
+
- `behavior.md` — major internal lifecycle flows and architectural processing behavior.
|
|
16
|
+
- `checklists.md` — supervision and diagnosis checklists for reviewing agent behavior against architecture expectations.
|
|
17
|
+
- `constraints.md` — non-negotiable architectural restrictions and trust boundaries.
|
|
18
|
+
- `decisions.md` — durable architecture decisions, rejected alternatives, and reasoning.
|
|
19
|
+
- `integration.md` — external integrations and major internal contracts between architectural areas.
|
|
20
|
+
- `overview.md` — architectural style, major areas, and architecture-level orientation.
|
|
21
|
+
- `state.md` — state ownership, sources of truth, derived state, and state-changing authority.
|
|
22
|
+
- `structure.md` — major architectural blocks, runtime areas, and responsibility boundaries.
|
|
23
|
+
- `supervision.md` — human-agent supervision rules, approval boundaries, and drift signals.
|
|
24
|
+
|
|
25
|
+
## Architecture Knowledge Model
|
|
26
|
+
|
|
27
|
+
Architecture knowledge is organized as one coordinated model rather than a set of isolated notes.
|
|
28
|
+
|
|
29
|
+
Each document answers a different architectural question, and the set is intended to be read together:
|
|
30
|
+
|
|
31
|
+
- `structure.md` — what is structurally built.
|
|
32
|
+
- `behavior.md` — how the system behaves internally.
|
|
33
|
+
- `checklists.md` — how a human quickly checks whether agent work remained inside architecture guardrails.
|
|
34
|
+
- `state.md` — where authoritative state is owned, changed, and derived.
|
|
35
|
+
- `integration.md` — what integrations and internal contracts exist.
|
|
36
|
+
- `constraints.md` — what must not be violated.
|
|
37
|
+
- `decisions.md` — why durable architectural choices were made.
|
|
38
|
+
- `supervision.md` — how human and agents govern architectural consistency.
|
|
39
|
+
- `overview.md` — architecture-level orientation.
|
|
40
|
+
|
|
41
|
+
If an agent document grows too large to maintain, move operational detail into a natural architecture subdocument or nested subdirectory.
|
|
42
|
+
|
|
43
|
+
## Local Rules
|
|
44
|
+
|
|
45
|
+
- Preserve nested architecture subdirectories when they improve maintainability.
|
|
46
|
+
|
|
47
|
+
## Level Boundary
|
|
48
|
+
|
|
49
|
+
Defines:
|
|
50
|
+
|
|
51
|
+
- Major architectural areas, system boundaries, and integration surfaces.
|
|
52
|
+
- Internal behavior, state ownership, and authority distribution.
|
|
53
|
+
- Durable architectural constraints, decisions, and supervision rules.
|
|
54
|
+
|
|
55
|
+
Does NOT define:
|
|
56
|
+
|
|
57
|
+
- Product meaning such as roles, domain entities, or use-case outcomes.
|
|
58
|
+
- Deployment procedures, operational workflow routing, or environment-specific runbooks.
|
|
59
|
+
- Source-level implementation details such as files, classes, tables, DTOs, or endpoint definitions.
|
|
60
|
+
|
|
61
|
+
## Relationship To Product
|
|
62
|
+
|
|
63
|
+
Architecture depends on product documentation and refines it. It is not an independent source of product truth.
|
|
64
|
+
|
|
65
|
+
The dependency order is:
|
|
66
|
+
|
|
67
|
+
```text
|
|
68
|
+
product
|
|
69
|
+
→ architecture
|
|
70
|
+
→ environment
|
|
71
|
+
→ code
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Product documentation defines what the product is.
|
|
75
|
+
|
|
76
|
+
Architecture documentation defines how that product is realized structurally.
|
|
77
|
+
|
|
78
|
+
Architecture may refine product intent into engineering structure, but must not redefine:
|
|
79
|
+
|
|
80
|
+
- what the product is;
|
|
81
|
+
- who product roles are;
|
|
82
|
+
- which domain entities exist;
|
|
83
|
+
- which product outcomes matter.
|
|
84
|
+
|
|
85
|
+
Architecture may add engineering precision, constraints, and internal mechanisms, but must not add new product meaning.
|
|
86
|
+
|
|
87
|
+
Architecture must not invent new product behavior or silently resolve product contradictions.
|
|
88
|
+
|
|
89
|
+
If an architectural concept becomes load-bearing for a product capability, invariant, authority boundary, or semantic boundary, that concept must be named in product documentation first.
|
|
90
|
+
|
|
91
|
+
When product knowledge is missing or contradictory, architecture documents must expose the gap and escalate it instead of creating implicit meaning.
|
|
92
|
+
|
|
93
|
+
## Authoring Rules
|
|
94
|
+
|
|
95
|
+
- Keep agent documents dense, explicit, and maintainable.
|
|
96
|
+
- Prefer declarative statements over implementation detail.
|
|
97
|
+
- Respect the dependency order during analysis and change planning.
|
|
98
|
+
- Do not introduce new architectural owners, new persistent state, new external integrations, or new system boundaries without corresponding document updates and human approval.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Architecture Behavior
|
|
2
|
+
|
|
3
|
+
- Path: `ctx/docs/architecture/behavior.md`
|
|
4
|
+
- Changed: `20260708`
|
|
5
|
+
|
|
6
|
+
## Purpose
|
|
7
|
+
|
|
8
|
+
Defines how the skill behaves internally across its major lifecycle flows.
|
|
9
|
+
|
|
10
|
+
## Core Flows
|
|
11
|
+
|
|
12
|
+
- `init` creates a baseline cognitive context, writes starter documentation, and establishes metadata for later supervision.
|
|
13
|
+
- `design` turns product-level intent into justified context branches, including architecture-level structure when the project needs it, and preserves project-defined workflow semantics when organizing workflow documentation.
|
|
14
|
+
- `validate` checks that declared context structure exists and remains mechanically readable by verifying required paths, metadata headers, deterministic agent/skin projection rules, local markdown document links, and lightweight skin-shape heuristics without rewriting project meaning or downgrading project workflow semantics to template placeholders.
|
|
15
|
+
- `quality-audit` guides an agent through evidence-backed review of a documentation corpus against ADSM documentation quality criteria, using a reference prompt and a working report template rather than CLI semantic scoring.
|
|
16
|
+
- `documentation-compression` guides an agent through controlled rewrite of `ctx/docs/` to reduce redundancy and attention cost while preserving accepted project meaning.
|
|
17
|
+
- `upgrade` applies or reports non-destructive migrations while preserving project-specific content.
|
|
18
|
+
- `install-skill` installs the current `skill/` payload into a caller-provided skills root; it supports agent availability and is not a context lifecycle mode.
|
|
19
|
+
|
|
20
|
+
## Architectural Processing
|
|
21
|
+
|
|
22
|
+
The product operates through a documentation-first loop:
|
|
23
|
+
|
|
24
|
+
1. read declared context and repository state;
|
|
25
|
+
2. determine the applicable lifecycle mode;
|
|
26
|
+
3. apply structure, checks, or migration logic;
|
|
27
|
+
4. report gaps, contradictions, or specialization needs explicitly.
|
|
28
|
+
|
|
29
|
+
Documentation quality audit follows the same documentation-first loop, but its output is an audit report rather than direct context mutation.
|
|
30
|
+
|
|
31
|
+
`validate` is the deterministic pre-lint stage for `ctx/docs/**`.
|
|
32
|
+
|
|
33
|
+
It should be run before semantic audit or compression-oriented review.
|
|
34
|
+
|
|
35
|
+
Documentation compression follows the same documentation-first loop, but its output is a semantically conservative rewrite plus a compression report.
|
|
36
|
+
|
|
37
|
+
The audit separates:
|
|
38
|
+
|
|
39
|
+
- editorial fixes that preserve meaning;
|
|
40
|
+
- cross-document consistency fixes;
|
|
41
|
+
- upstream documentation gaps;
|
|
42
|
+
- human decisions required before documentation can be corrected.
|
|
43
|
+
|
|
44
|
+
Compression may apply editorial rewrites directly when authority is clear. It must report non-editorial uncertainty instead of resolving it.
|
|
45
|
+
|
|
46
|
+
Validation findings separate:
|
|
47
|
+
|
|
48
|
+
- hard structural failures such as missing paired agent documents, missing required skin sections, broken local markdown links, or missing `Includes:` / `Excludes:` blocks;
|
|
49
|
+
- heuristic supervision warnings such as skin compactness threshold overrun;
|
|
50
|
+
- semantic review concerns that remain outside deterministic validation and therefore belong to documentation quality audit.
|
|
51
|
+
|
|
52
|
+
## Drift Handling
|
|
53
|
+
|
|
54
|
+
When a new architectural concept appears, the expected sequence is:
|
|
55
|
+
|
|
56
|
+
1. update product or architecture documentation;
|
|
57
|
+
2. confirm supervision boundaries;
|
|
58
|
+
3. change downstream environment or code artifacts.
|
|
59
|
+
|
|
60
|
+
The architecture level must not be bypassed by direct code invention.
|
|
61
|
+
|
|
62
|
+
## Escalation Rules
|
|
63
|
+
|
|
64
|
+
- Missing product meaning must be surfaced to the human.
|
|
65
|
+
- Documentation quality findings that require product or architecture decisions must be reported as human decision points, not resolved by invention.
|
|
66
|
+
- Documentation compression must not invent, weaken, generalize, or silently delete project-specific knowledge.
|
|
67
|
+
- Missing specialized skill coverage must be reported as a specialization gap, not treated as a reason to erase or invalidate project-defined workflow semantics.
|
|
68
|
+
- Contradictions between templates, repository context, and implementation must be treated as drift.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Architecture Checklists
|
|
2
|
+
|
|
3
|
+
- Path: `ctx/docs/architecture/checklists.md`
|
|
4
|
+
- Changed: `20260813`
|
|
5
|
+
|
|
6
|
+
## Purpose
|
|
7
|
+
|
|
8
|
+
Provides short recurring document checklists for supervision, diagnosis, and acceptance of architecture-level agent work.
|
|
9
|
+
|
|
10
|
+
This file remains an agent-facing operational context document.
|
|
11
|
+
|
|
12
|
+
Human-controlled semantic control belongs in a matching `checklists.skin.en.md` file if such control is needed.
|
|
13
|
+
|
|
14
|
+
## Drift Diagnosis Checklist
|
|
15
|
+
|
|
16
|
+
Use this checklist when an agent appears to be working in the wrong architectural direction.
|
|
17
|
+
|
|
18
|
+
- Is the agent working inside the documented product and architecture boundaries?
|
|
19
|
+
- Does the change stay inside declared architecture boundaries?
|
|
20
|
+
- Does the change introduce a new owner, major area, integration, trust boundary, or durable state?
|
|
21
|
+
- Does the change depend on product meaning that is not explicitly documented upstream?
|
|
22
|
+
- Did the agent treat template guidance as if it overruled project-specific meaning?
|
|
23
|
+
- Did the agent choose a direction that `constraints.md` already forbids?
|
|
24
|
+
|
|
25
|
+
## Approval Checklist
|
|
26
|
+
|
|
27
|
+
Use this checklist before allowing architecture expansion.
|
|
28
|
+
|
|
29
|
+
- Is the proposed expansion named explicitly in product documentation where required?
|
|
30
|
+
- Is the new boundary or owner documented in the appropriate architecture file?
|
|
31
|
+
- Is the approval need already declared in `constraints.md` or `supervision.md`?
|
|
32
|
+
- Does the change increase human supervision burden in a durable way?
|
|
33
|
+
- Is the expansion being justified by real product need rather than by agent convenience?
|
|
34
|
+
|
|
35
|
+
## Compression Safety Checklist
|
|
36
|
+
|
|
37
|
+
Use this checklist before accepting compression of architecture documents.
|
|
38
|
+
|
|
39
|
+
- Does the rewrite preserve the same authoritative meaning?
|
|
40
|
+
- Did any precise rule become a vague summary?
|
|
41
|
+
- Was any durable decision, exclusion, or boundary removed because it looked repetitive?
|
|
42
|
+
- Did the rewrite keep one authoritative home for each load-bearing meaning?
|
|
43
|
+
- Can a human still scan the control documents quickly after compression?
|
|
44
|
+
|
|
45
|
+
## Related Documents
|
|
46
|
+
|
|
47
|
+
- Read `constraints.md` next for forbidden directions and approval boundaries.
|
|
48
|
+
- Read `supervision.md` when the question is about ownership of correction and escalation.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Architecture Constraints
|
|
2
|
+
|
|
3
|
+
- Path: `ctx/docs/architecture/constraints.md`
|
|
4
|
+
- Changed: `20260813`
|
|
5
|
+
|
|
6
|
+
## Purpose
|
|
7
|
+
|
|
8
|
+
Defines non-negotiable architectural restrictions for this skill product.
|
|
9
|
+
|
|
10
|
+
## Core Constraints
|
|
11
|
+
|
|
12
|
+
- The product remains generic and orchestration-oriented.
|
|
13
|
+
- Product knowledge precedes architecture, architecture precedes environment, and environment precedes code.
|
|
14
|
+
- New architectural concepts are documented before code-level realization.
|
|
15
|
+
- Templates remain project-neutral and must not guess domain-specific implementation.
|
|
16
|
+
- The root `AGENTS.md` template must prevent agents from reading, loading, printing, searching for, or exposing secret-bearing project data, including `.env` files; non-secret example templates may describe configuration shape only.
|
|
17
|
+
- Template-level workflow constraints must not be reinterpreted as limits on project-defined workflow semantics.
|
|
18
|
+
- Validation, quality audit, and upgrade reporting remain non-destructive by default.
|
|
19
|
+
- Documentation compression may rewrite `ctx/docs/` for density only when accepted meaning and authority are preserved.
|
|
20
|
+
- Architecture agent documents remain dense, explicit, and maintainable.
|
|
21
|
+
- Semantic skins remain short enough for frequent supervision and correction in live human-agent dialogue.
|
|
22
|
+
|
|
23
|
+
## Boundary Constraints
|
|
24
|
+
|
|
25
|
+
- Architecture must not redefine product roles, product use cases, or product domain entities.
|
|
26
|
+
- Architecture must not introduce code structure as if it were architecture structure.
|
|
27
|
+
- Architecture must not require project-specific technologies unless the project documentation states them explicitly.
|
|
28
|
+
- Architecture must not downgrade project workflow documents to template-neutral content merely because specialized skill support is absent.
|
|
29
|
+
- Architecture must not treat the absence of a specialized skill as evidence that project-defined workflow semantics are invalid.
|
|
30
|
+
- Architecture must not allow documentation compression to replace precise project rules with vague summaries.
|
|
31
|
+
- Architecture must not hide new persistent state, external integrations, or system boundaries behind implementation changes.
|
|
32
|
+
- Architecture must not treat a control-oriented agent document as a semantic skin unless a matching `*.skin.<lang>.md` file exists.
|
|
33
|
+
- Architecture must not impose a rigid internal tree under `ctx/docs/product/`, `ctx/docs/architecture/`, `ctx/docs/environment/`, or `ctx/docs/code/`.
|
|
34
|
+
|
|
35
|
+
## Change Constraints
|
|
36
|
+
|
|
37
|
+
The following changes require corresponding architecture-document updates and explicit human approval:
|
|
38
|
+
|
|
39
|
+
- new architectural owners;
|
|
40
|
+
- new persistent state;
|
|
41
|
+
- new external integrations;
|
|
42
|
+
- new trust boundaries;
|
|
43
|
+
- new major system areas.
|
|
44
|
+
|
|
45
|
+
## Review Use
|
|
46
|
+
|
|
47
|
+
Use this document when the question is:
|
|
48
|
+
|
|
49
|
+
- "Which architectural direction was forbidden here?"
|
|
50
|
+
- "Did the agent expand the product beyond its declared structural boundary?"
|
|
51
|
+
- "Does this change require approval before any implementation or deeper analysis continues?"
|
|
52
|
+
|
|
53
|
+
If `constraints.skin.en.md` exists, read it before changing this document.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Architecture Constraints Skin
|
|
2
|
+
|
|
3
|
+
- Path: `ctx/docs/architecture/constraints.skin.en.md`
|
|
4
|
+
- Changed: `20260813`
|
|
5
|
+
|
|
6
|
+
## Purpose
|
|
7
|
+
|
|
8
|
+
This skin preserves the non-negotiable architectural restrictions that keep the skill generic, non-destructive, and context-preserving.
|
|
9
|
+
|
|
10
|
+
## Mental Model
|
|
11
|
+
|
|
12
|
+
Architecture may refine structure and control surfaces, but it must not expand product meaning or relax supervision-critical restrictions.
|
|
13
|
+
|
|
14
|
+
## Scope
|
|
15
|
+
|
|
16
|
+
Includes:
|
|
17
|
+
|
|
18
|
+
- non-negotiable architectural restrictions;
|
|
19
|
+
- non-destructive reporting expectations;
|
|
20
|
+
- preservation of accepted meaning during compression.
|
|
21
|
+
|
|
22
|
+
Excludes:
|
|
23
|
+
|
|
24
|
+
- detailed code-module layout;
|
|
25
|
+
- project-specific workflow semantics;
|
|
26
|
+
- implementation-only optimizations.
|
|
27
|
+
|
|
28
|
+
## Invariants
|
|
29
|
+
|
|
30
|
+
- The product remains generic, orchestration-oriented, and protects secret-bearing project data from agent exposure.
|
|
31
|
+
- Validation, quality audit, and upgrade reporting remain non-destructive by default.
|
|
32
|
+
- Documentation compression must preserve accepted meaning and skin-controlled meaning.
|
|
33
|
+
- Project-specific workflow semantics must not be downgraded because specialized skill support is absent.
|
|
34
|
+
- Control-oriented `*.md` files remain agent documents; semantic control belongs in matching `*.skin.<lang>.md` files when needed.
|
|
35
|
+
|
|
36
|
+
## Agent Document
|
|
37
|
+
|
|
38
|
+
`constraints.md`
|