@flancer32/skill-adsm-ctx 0.2.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +45 -18
  3. package/bin/adsm-ctx.mjs +44 -0
  4. package/migrations/README.md +5 -1
  5. package/package.json +65 -11
  6. package/skill/SKILL.md +5 -4
  7. package/skill/references/context-lifecycle.md +14 -6
  8. package/skill/references/design-questionnaire.md +13 -1
  9. package/skill/references/document-projections.md +40 -80
  10. package/skill/references/documentation-compression.md +3 -2
  11. package/skill/references/documentation-quality-audit.md +37 -14
  12. package/skill/references/orchestration-model.md +4 -3
  13. package/skill/references/semantic-skins.md +65 -0
  14. package/skill/references/specialized-skills.md +5 -2
  15. package/skill/references/upgrade-policy.md +16 -6
  16. package/skill/templates/ctx/adsm.json +4 -1
  17. package/skill/templates/ctx/docs/AGENTS.md +3 -0
  18. package/skill/templates/ctx/docs/code/testing.md +4 -0
  19. package/skill/templates/work/context/semantic-skin.md +11 -22
  20. package/src/Cli/Command/Design.mjs +17 -0
  21. package/src/Cli/Command/Init.mjs +22 -0
  22. package/src/Cli/Command/InstallSkill.mjs +18 -0
  23. package/src/Cli/Command/Upgrade.mjs +19 -0
  24. package/src/Cli/Command/Validate.mjs +19 -0
  25. package/src/Design/Service.mjs +9 -7
  26. package/src/Shared/Constants.mjs +5 -5
  27. package/src/Shared/Metadata.mjs +1 -0
  28. package/src/Upgrade/Service.mjs +3 -3
  29. package/src/Validate/Service.mjs +217 -259
  30. package/types.d.ts +5 -2
  31. package/.github/workflows/flows-app.yaml +0 -95
  32. package/AGENTS.md +0 -112
  33. package/bin/cli.mjs +0 -55
  34. package/ctx/AGENTS.md +0 -44
  35. package/ctx/README.md +0 -24
  36. package/ctx/adsm.json +0 -5
  37. package/ctx/agent/AGENTS.md +0 -41
  38. package/ctx/agent/flows/.img/flancer32-skill-adsm-ctx-github-flows.png +0 -0
  39. package/ctx/agent/flows/AGENTS.md +0 -37
  40. package/ctx/agent/flows/cfg/issues/labeled/accepted/profile.json +0 -25
  41. package/ctx/agent/flows/cfg/issues/labeled/accepted/prompt.md +0 -104
  42. package/ctx/agent/flows/cfg/issues/labeled/clarification-provided/profile.json +0 -15
  43. package/ctx/agent/flows/cfg/issues/labeled/clarification-provided/prompt.md +0 -63
  44. package/ctx/agent/flows/cfg/issues/opened/admission/profile.json +0 -14
  45. package/ctx/agent/flows/cfg/issues/opened/admission/prompt.md +0 -110
  46. package/ctx/agent/flows/cfg/profile.json +0 -40
  47. package/ctx/agent/flows/cfg/pull_request/closed/merged/profile.json +0 -15
  48. package/ctx/agent/flows/cfg/pull_request/closed/merged/prompt.md +0 -41
  49. package/ctx/agent/flows/cfg/pull_request/labeled/needs-fix/profile.json +0 -25
  50. package/ctx/agent/flows/cfg/pull_request/labeled/needs-fix/prompt.md +0 -79
  51. package/ctx/agent/flows/cfg/pull_request/labeled/ready-for-validation/profile.json +0 -15
  52. package/ctx/agent/flows/cfg/pull_request/labeled/ready-for-validation/prompt.md +0 -72
  53. package/ctx/agent/flows/cfg/pull_request/labeled/verified/profile.json +0 -15
  54. package/ctx/agent/flows/cfg/pull_request/labeled/verified/prompt.md +0 -48
  55. package/ctx/agent/flows/deployment.md +0 -116
  56. package/ctx/agent/flows/labels.md +0 -108
  57. package/ctx/agent/flows/overview.md +0 -82
  58. package/ctx/agent/prompt/cli/ai-intro.md +0 -141
  59. package/ctx/assets/.gitkeep +0 -1
  60. package/ctx/docs/AGENTS.md +0 -121
  61. package/ctx/docs/ai-intro.md +0 -37
  62. package/ctx/docs/architecture/AGENTS.md +0 -98
  63. package/ctx/docs/architecture/behavior.md +0 -68
  64. package/ctx/docs/architecture/checklists.md +0 -48
  65. package/ctx/docs/architecture/constraints.md +0 -53
  66. package/ctx/docs/architecture/constraints.skin.en.md +0 -38
  67. package/ctx/docs/architecture/decisions.md +0 -118
  68. package/ctx/docs/architecture/integration.md +0 -31
  69. package/ctx/docs/architecture/overview.md +0 -76
  70. package/ctx/docs/architecture/state.md +0 -50
  71. package/ctx/docs/architecture/structure.md +0 -38
  72. package/ctx/docs/architecture/supervision.md +0 -71
  73. package/ctx/docs/code/AGENTS.md +0 -51
  74. package/ctx/docs/code/overview.md +0 -53
  75. package/ctx/docs/code/testing.md +0 -26
  76. package/ctx/docs/environment/AGENTS.md +0 -50
  77. package/ctx/docs/environment/overview.md +0 -33
  78. package/ctx/docs/filesystem.md +0 -44
  79. package/ctx/docs/product/AGENTS.md +0 -51
  80. package/ctx/docs/product/domain.md +0 -63
  81. package/ctx/docs/product/domain.skin.en.md +0 -40
  82. package/ctx/docs/product/glossary.md +0 -31
  83. package/ctx/docs/product/overview.md +0 -112
  84. package/ctx/docs/product/overview.skin.en.md +0 -38
  85. package/ctx/docs/product/roles.md +0 -17
  86. package/ctx/docs/product/use-cases.md +0 -15
  87. package/src/Bootstrap/Cli.mjs +0 -62
  88. package/src/Bootstrap.mjs +0 -108
  89. package/test/integration/.gitkeep +0 -1
  90. package/test/integration/cli-help.test.mjs +0 -15
  91. package/test/integration/cli-init-validate.test.mjs +0 -223
  92. package/test/integration/cli-install-skill.test.mjs +0 -41
  93. package/test/unit/Bootstrap/Cli.test.mjs +0 -23
  94. package/test/unit/Bootstrap.test.mjs +0 -53
  95. package/test/unit/Design/Service.test.mjs +0 -11
  96. package/test/unit/Init/Service.test.mjs +0 -51
  97. package/test/unit/Shared/Constants.test.mjs +0 -21
  98. package/test/unit/Shared/CopyDirectory.test.mjs +0 -31
  99. package/test/unit/Shared/Metadata.test.mjs +0 -9
  100. package/test/unit/Shared/Path.test.mjs +0 -11
  101. package/test/unit/Skill/Installer.test.mjs +0 -20
  102. package/test/unit/Upgrade/Service.test.mjs +0 -13
  103. package/test/unit/Validate/Service.test.mjs +0 -760
@@ -1,108 +0,0 @@
1
- # Workflow Labels
2
-
3
- - Path: `ctx/agent/flows/labels.md`
4
- - Changed: `20260610`
5
-
6
- ## Label Rules
7
-
8
- - Current workflow labels mark active processing state.
9
- - Terminal outcome labels classify the final result of a closed issue.
10
- - One open issue or Pull Request should have at most one current workflow `adsm:*` label.
11
- - A closed issue should keep exactly one terminal outcome `adsm:*` label.
12
- - Comments explain decisions; labels trigger the next event-driven stage.
13
- - Issue labels and Pull Request labels do not imply that transitions stay on the same object.
14
- - When a stage applies the next workflow label, it must first remove stale current workflow `adsm:*` labels from that same current object and keep unrelated labels unchanged.
15
- - When a terminal outcome label is applied, stale current workflow labels must be removed from that issue.
16
- - `adsm:needs-clarification` blocks issue-side progress until trusted human input is provided.
17
- - `adsm:needs-fix` blocks Pull Request-side progress until another fix iteration is delivered.
18
-
19
- ## Current Workflow Labels
20
-
21
- | Label | Applies To | Stage Trigger | Valid Previous States | Valid Next States | Class |
22
- | ----------------------------- | ------------ | --------------------------------------------------------------------------- | --------------------------------------------------------------- | -------------------------------------------------------------------------- | ---------------- |
23
- | `adsm:accepted` | Issue | `issues.labeled` via `issueLabelAdded=adsm:accepted` | `issues.opened`, `adsm:clarification-provided` | Pull Request `adsm:ready-for-validation`, issue `adsm:needs-clarification` | Transitional |
24
- | `adsm:needs-clarification` | Issue | none; manual blocking state only | `issues.opened`, `adsm:clarification-provided`, `adsm:accepted` | `adsm:clarification-provided`, `adsm:answered`, `adsm:rejected` | Blocking, manual |
25
- | `adsm:clarification-provided` | Issue | `issues.labeled` via `issueLabelAdded=adsm:clarification-provided` | `adsm:needs-clarification` | `adsm:accepted`, `adsm:answered`, `adsm:needs-clarification`, `adsm:rejected` | Transitional |
26
- | `adsm:ready-for-validation` | Pull Request | `pull_request.labeled` via `pullRequestLabelAdded=adsm:ready-for-validation` | none, `adsm:needs-fix` | `adsm:verified`, `adsm:needs-fix` | Transitional |
27
- | `adsm:verified` | Pull Request | `pull_request.labeled` via `pullRequestLabelAdded=adsm:verified` | `adsm:ready-for-validation` | merged | Transitional |
28
- | `adsm:needs-fix` | Pull Request | `pull_request.labeled` via `pullRequestLabelAdded=adsm:needs-fix` | `adsm:ready-for-validation` | `adsm:ready-for-validation` | Blocking |
29
-
30
- ## Terminal Outcome Labels
31
-
32
- | Label | Applies To | Stage Trigger | Valid Previous States | Valid Next States | Class |
33
- | ---------------- | ---------- | --------------------------- | --------------------------------------------------------- | ----------------- | ---------------- |
34
- | `adsm:answered` | Issue | none; terminal outcome only | `issues.opened`, `adsm:needs-clarification`, `adsm:clarification-provided` | none | Terminal outcome |
35
- | `adsm:rejected` | Issue | none; terminal outcome only | `issues.opened`, `adsm:needs-clarification`, `adsm:clarification-provided` | none | Terminal outcome |
36
- | `adsm:completed` | Issue | none; terminal outcome only | merged Pull Request finalization | none | Terminal outcome |
37
-
38
- ## State Notes
39
-
40
- - `adsm:accepted` is used only when the issue requires repository changes that must be delivered through a Pull Request.
41
- - `adsm:answered` is used when the issue is fully completed by an issue comment and repository changes are not required.
42
- - `adsm:rejected` is used when the issue is outside this repository boundary or must not be executed.
43
- - `adsm:needs-clarification` is used when the workflow cannot safely continue without trusted human input.
44
- - `adsm:clarification-provided` is a resume marker and must replace, not accompany, `adsm:needs-clarification`.
45
- - Validation comments for `adsm:ready-for-validation` must record the chosen state and the current Pull Request head SHA.
46
- - `adsm:verified` is merge permission, not proof of merge completion.
47
- - Merge completion is detected by `pull_request.closed` with `pullRequestMerged=true`.
48
- - `adsm:completed` is used after a linked Pull Request is merged, finalization posts the closing summary, and the source issue is closed.
49
-
50
- ## Repository Label Setup
51
-
52
- Create the current workflow labels and terminal outcome labels in the repository with:
53
-
54
- ```bash
55
- gh label create "adsm:accepted" \
56
- --repo "flancer32/skill-adsm-ctx" \
57
- --color "0E8A16" \
58
- --description "Issue accepted for repository changes through a Pull Request." \
59
- --force
60
-
61
- gh label create "adsm:answered" \
62
- --repo "flancer32/skill-adsm-ctx" \
63
- --color "0E8A16" \
64
- --description "Issue answered without repository changes." \
65
- --force
66
-
67
- gh label create "adsm:rejected" \
68
- --repo "flancer32/skill-adsm-ctx" \
69
- --color "B60205" \
70
- --description "Issue rejected as out of scope or unsuitable." \
71
- --force
72
-
73
- gh label create "adsm:completed" \
74
- --repo "flancer32/skill-adsm-ctx" \
75
- --color "0E8A16" \
76
- --description "Issue completed after a linked Pull Request was merged." \
77
- --force
78
-
79
- gh label create "adsm:needs-clarification" \
80
- --repo "flancer32/skill-adsm-ctx" \
81
- --color "C2E0C6" \
82
- --description "Issue waits for trusted user clarification." \
83
- --force
84
-
85
- gh label create "adsm:clarification-provided" \
86
- --repo "flancer32/skill-adsm-ctx" \
87
- --color "1D76DB" \
88
- --description "Clarification added and ready for issue re-evaluation." \
89
- --force
90
-
91
- gh label create "adsm:ready-for-validation" \
92
- --repo "flancer32/skill-adsm-ctx" \
93
- --color "5319E7" \
94
- --description "Pull Request ready for validation." \
95
- --force
96
-
97
- gh label create "adsm:verified" \
98
- --repo "flancer32/skill-adsm-ctx" \
99
- --color "0E8A16" \
100
- --description "Pull Request validated and safe to merge." \
101
- --force
102
-
103
- gh label create "adsm:needs-fix" \
104
- --repo "flancer32/skill-adsm-ctx" \
105
- --color "E99695" \
106
- --description "Pull Request requires another fix iteration." \
107
- --force
108
- ```
@@ -1,82 +0,0 @@
1
- # GitHub Flows Workflow
2
-
3
- - Path: `ctx/agent/flows/overview.md`
4
- - Changed: `20260610`
5
-
6
- ## Purpose
7
-
8
- This workflow turns trusted GitHub issues in `flancer32/skill-adsm-ctx` into either terminal issue answers or reviewed repository changes through Pull Requests.
9
-
10
- The workflow is private, label-driven, and agent-executed through `github-flows`.
11
-
12
- ## Private Project Assumptions
13
-
14
- - The repository is private and operated by three trusted users only.
15
- - Workflow routing accepts events only from `flancer64`, `viktor-gusev`, and `adsm-agentess`.
16
- - Repository changes are implemented directly in this repository, including `ctx/` when the issue requires context updates.
17
- - The checked-out repository is the only workflow context source. The workflow uses the repository-local `ctx/` directory and does not fetch or mount context from another repository during runtime.
18
- - The workflow uses native GitHub events as stage boundaries and does not model cross-event state inside `github-flows`.
19
-
20
- ## Trigger Model
21
-
22
- `github-flows` provides package-owned trigger attributes:
23
-
24
- - `event`
25
- - `repository`
26
- - `action`
27
- - `actorLogin`
28
-
29
- This workflow also depends on host-provided event attributes:
30
-
31
- - `sizeLess10K`
32
- - `sizeLess100K`
33
- - `sizeLess1M`
34
- - `sizeLess2M`
35
- - `issueLabelAdded`
36
- - `issueLabelRemoved`
37
- - `issueAuthorRequestedNoAgent`
38
- - `pullRequestLabelAdded`
39
- - `pullRequestLabelRemoved`
40
- - `pullRequestMerged`
41
-
42
- These extra attributes are part of the host application contract, not the package-owned base schema.
43
-
44
- ## Processing Model
45
-
46
- ![GitHub Flows Workflow](./.img/flancer32-skill-adsm-ctx-github-flows.png)
47
-
48
- The workflow starts from a source issue. Admission may result in repository-change processing, answer-only completion, rejection, or clarification. Current workflow labels drive active processing. Terminal outcome labels classify closed issues. `adsm:accepted` means repository changes are required; it starts implementation that creates a Pull Request. `adsm:answered` means the issue is completed by a comment and no repository changes are required. `adsm:rejected` means the issue is closed as out of scope or unsuitable. `adsm:completed` means the issue is closed after the linked Pull Request is merged and finalization finishes. Clarification stays on the issue, while fix iterations stay on the Pull Request.
49
-
50
- Cross-object transitions:
51
-
52
- - `adsm:accepted` is an issue label. Its successful implementation outcome is not another issue label. It is a new Pull Request labeled `adsm:ready-for-validation`.
53
- - `adsm:answered` and `adsm:rejected` are issue outcome labels only. They are terminal and do not create a branch or Pull Request.
54
- - `adsm:ready-for-validation`, `adsm:needs-fix`, and `adsm:verified` are Pull Request labels only.
55
- - After a merged Pull Request is detected, finalization returns to the linked source issue, posts the closing summary there, applies `adsm:completed`, and closes that issue.
56
-
57
- ## Workflow Rules
58
-
59
- - An issue is an input request, not a specification.
60
- - Admission for `issues.opened` is intentionally minimal in this private workflow.
61
- - Admission should first decide whether the issue belongs to this repository.
62
- - If the issue belongs to this repository, admission should choose `adsm:answered` when a comment fully resolves it without repository changes, and `adsm:accepted` only when repository changes are required.
63
- - `adsm:rejected` is used when the issue does not belong to this repository or must not be executed.
64
- - `adsm:needs-clarification` is used when the workflow cannot safely continue without trusted human input.
65
- - Comments provide evidence; labels drive transitions.
66
- - Validation evidence on Pull Requests must record both the validation state and the current Pull Request head SHA.
67
- - Agents must not push directly to `main`.
68
- - Repository implementation must happen on a dedicated branch and must be delivered through a Pull Request.
69
-
70
- ## Agent Policy
71
-
72
- - `issues.opened`, `issues.labeled: adsm:clarification-provided`, `pull_request.labeled: adsm:ready-for-validation`, `pull_request.labeled: adsm:verified`, and `pull_request.closed` run with `gpt-5.4` and `model_reasoning_effort=medium`.
73
- - `issues.labeled: adsm:accepted` and `pull_request.labeled: adsm:needs-fix` run with `gpt-5.4-mini` and `model_reasoning_effort=low`.
74
- - The policy is encoded in `execution.handler.args` inside the profile fragments. The shared root defines the medium-reasoning command; implementation and fix fragments override it with the low-reasoning command.
75
-
76
- ## End States
77
-
78
- A successful run ends in one of two ways:
79
-
80
- - the issue is answered by comment only, labeled `adsm:answered`, and closed without a branch or Pull Request;
81
- - the issue is rejected, labeled `adsm:rejected`, and closed without a branch or Pull Request;
82
- - a reviewed Pull Request is merged into `main`, a final source-issue comment links that Pull Request and summarizes the outcome, the source issue is labeled `adsm:completed`, and the linked source issue is closed.
@@ -1,141 +0,0 @@
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.
@@ -1 +0,0 @@
1
-
@@ -1,121 +0,0 @@
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.
@@ -1,37 +0,0 @@
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.
@@ -1,98 +0,0 @@
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.
@@ -1,68 +0,0 @@
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.