@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.
Files changed (132) hide show
  1. package/.github/workflows/flows-app.yaml +95 -0
  2. package/AGENTS.md +112 -0
  3. package/LICENSE +201 -0
  4. package/README.md +246 -0
  5. package/bin/cli.mjs +55 -0
  6. package/ctx/AGENTS.md +44 -0
  7. package/ctx/README.md +24 -0
  8. package/ctx/adsm.json +5 -0
  9. package/ctx/agent/AGENTS.md +41 -0
  10. package/ctx/agent/flows/.img/flancer32-skill-adsm-ctx-github-flows.png +0 -0
  11. package/ctx/agent/flows/AGENTS.md +37 -0
  12. package/ctx/agent/flows/cfg/issues/labeled/accepted/profile.json +25 -0
  13. package/ctx/agent/flows/cfg/issues/labeled/accepted/prompt.md +104 -0
  14. package/ctx/agent/flows/cfg/issues/labeled/clarification-provided/profile.json +15 -0
  15. package/ctx/agent/flows/cfg/issues/labeled/clarification-provided/prompt.md +63 -0
  16. package/ctx/agent/flows/cfg/issues/opened/admission/profile.json +14 -0
  17. package/ctx/agent/flows/cfg/issues/opened/admission/prompt.md +110 -0
  18. package/ctx/agent/flows/cfg/profile.json +40 -0
  19. package/ctx/agent/flows/cfg/pull_request/closed/merged/profile.json +15 -0
  20. package/ctx/agent/flows/cfg/pull_request/closed/merged/prompt.md +41 -0
  21. package/ctx/agent/flows/cfg/pull_request/labeled/needs-fix/profile.json +25 -0
  22. package/ctx/agent/flows/cfg/pull_request/labeled/needs-fix/prompt.md +79 -0
  23. package/ctx/agent/flows/cfg/pull_request/labeled/ready-for-validation/profile.json +15 -0
  24. package/ctx/agent/flows/cfg/pull_request/labeled/ready-for-validation/prompt.md +72 -0
  25. package/ctx/agent/flows/cfg/pull_request/labeled/verified/profile.json +15 -0
  26. package/ctx/agent/flows/cfg/pull_request/labeled/verified/prompt.md +48 -0
  27. package/ctx/agent/flows/deployment.md +116 -0
  28. package/ctx/agent/flows/labels.md +108 -0
  29. package/ctx/agent/flows/overview.md +82 -0
  30. package/ctx/agent/prompt/cli/ai-intro.md +141 -0
  31. package/ctx/assets/.gitkeep +1 -0
  32. package/ctx/docs/AGENTS.md +121 -0
  33. package/ctx/docs/ai-intro.md +37 -0
  34. package/ctx/docs/architecture/AGENTS.md +98 -0
  35. package/ctx/docs/architecture/behavior.md +68 -0
  36. package/ctx/docs/architecture/checklists.md +48 -0
  37. package/ctx/docs/architecture/constraints.md +53 -0
  38. package/ctx/docs/architecture/constraints.skin.en.md +38 -0
  39. package/ctx/docs/architecture/decisions.md +118 -0
  40. package/ctx/docs/architecture/integration.md +31 -0
  41. package/ctx/docs/architecture/overview.md +76 -0
  42. package/ctx/docs/architecture/state.md +50 -0
  43. package/ctx/docs/architecture/structure.md +38 -0
  44. package/ctx/docs/architecture/supervision.md +71 -0
  45. package/ctx/docs/code/AGENTS.md +51 -0
  46. package/ctx/docs/code/overview.md +53 -0
  47. package/ctx/docs/code/testing.md +26 -0
  48. package/ctx/docs/environment/AGENTS.md +50 -0
  49. package/ctx/docs/environment/overview.md +33 -0
  50. package/ctx/docs/filesystem.md +44 -0
  51. package/ctx/docs/product/AGENTS.md +51 -0
  52. package/ctx/docs/product/domain.md +63 -0
  53. package/ctx/docs/product/domain.skin.en.md +40 -0
  54. package/ctx/docs/product/glossary.md +31 -0
  55. package/ctx/docs/product/overview.md +112 -0
  56. package/ctx/docs/product/overview.skin.en.md +38 -0
  57. package/ctx/docs/product/roles.md +17 -0
  58. package/ctx/docs/product/use-cases.md +15 -0
  59. package/jsconfig.json +12 -0
  60. package/migrations/README.md +9 -0
  61. package/package.json +33 -0
  62. package/skill/SKILL.md +47 -0
  63. package/skill/references/agents-hierarchy.md +45 -0
  64. package/skill/references/context-lifecycle.md +53 -0
  65. package/skill/references/design-questionnaire.md +44 -0
  66. package/skill/references/document-projections.md +290 -0
  67. package/skill/references/documentation-compression.md +117 -0
  68. package/skill/references/documentation-quality-audit.md +199 -0
  69. package/skill/references/orchestration-model.md +41 -0
  70. package/skill/references/specialized-skills.md +31 -0
  71. package/skill/references/upgrade-policy.md +19 -0
  72. package/skill/templates/AGENTS.md +120 -0
  73. package/skill/templates/ai/AGENTS.md +59 -0
  74. package/skill/templates/ctx/AGENTS.md +45 -0
  75. package/skill/templates/ctx/README.md +27 -0
  76. package/skill/templates/ctx/adsm.json +7 -0
  77. package/skill/templates/ctx/agent/AGENTS.md +36 -0
  78. package/skill/templates/ctx/assets/.gitkeep +1 -0
  79. package/skill/templates/ctx/docs/AGENTS.md +55 -0
  80. package/skill/templates/ctx/docs/ai-intro.md +53 -0
  81. package/skill/templates/ctx/docs/architecture/AGENTS.md +42 -0
  82. package/skill/templates/ctx/docs/architecture/behavior.md +38 -0
  83. package/skill/templates/ctx/docs/architecture/checklists.md +25 -0
  84. package/skill/templates/ctx/docs/architecture/constraints.md +36 -0
  85. package/skill/templates/ctx/docs/architecture/decisions.md +33 -0
  86. package/skill/templates/ctx/docs/architecture/integration.md +27 -0
  87. package/skill/templates/ctx/docs/architecture/overview.md +73 -0
  88. package/skill/templates/ctx/docs/architecture/state.md +52 -0
  89. package/skill/templates/ctx/docs/architecture/structure.md +32 -0
  90. package/skill/templates/ctx/docs/architecture/supervision.md +61 -0
  91. package/skill/templates/ctx/docs/code/AGENTS.md +35 -0
  92. package/skill/templates/ctx/docs/code/overview.md +21 -0
  93. package/skill/templates/ctx/docs/code/testing.md +13 -0
  94. package/skill/templates/ctx/docs/environment/AGENTS.md +34 -0
  95. package/skill/templates/ctx/docs/environment/overview.md +21 -0
  96. package/skill/templates/ctx/docs/filesystem.md +39 -0
  97. package/skill/templates/ctx/docs/product/AGENTS.md +38 -0
  98. package/skill/templates/ctx/docs/product/domain.md +77 -0
  99. package/skill/templates/ctx/docs/product/glossary.md +110 -0
  100. package/skill/templates/ctx/docs/product/overview.md +74 -0
  101. package/skill/templates/ctx/docs/product/roles.md +100 -0
  102. package/skill/templates/ctx/docs/product/use-cases.md +109 -0
  103. package/skill/templates/work/context/semantic-skin.md +27 -0
  104. package/skill/templates/work/report/documentation-compression.md +34 -0
  105. package/skill/templates/work/report/documentation-quality-audit.md +90 -0
  106. package/src/Bootstrap/Cli.mjs +62 -0
  107. package/src/Bootstrap.mjs +108 -0
  108. package/src/Design/Service.mjs +36 -0
  109. package/src/Init/Service.mjs +136 -0
  110. package/src/Shared/Constants.mjs +36 -0
  111. package/src/Shared/CopyDirectory.mjs +78 -0
  112. package/src/Shared/Metadata.mjs +30 -0
  113. package/src/Shared/Path.mjs +38 -0
  114. package/src/Skill/Installer.mjs +47 -0
  115. package/src/Upgrade/Service.mjs +44 -0
  116. package/src/Validate/Service.mjs +879 -0
  117. package/test/integration/.gitkeep +1 -0
  118. package/test/integration/cli-help.test.mjs +15 -0
  119. package/test/integration/cli-init-validate.test.mjs +223 -0
  120. package/test/integration/cli-install-skill.test.mjs +41 -0
  121. package/test/unit/Bootstrap/Cli.test.mjs +23 -0
  122. package/test/unit/Bootstrap.test.mjs +53 -0
  123. package/test/unit/Design/Service.test.mjs +11 -0
  124. package/test/unit/Init/Service.test.mjs +51 -0
  125. package/test/unit/Shared/Constants.test.mjs +21 -0
  126. package/test/unit/Shared/CopyDirectory.test.mjs +31 -0
  127. package/test/unit/Shared/Metadata.test.mjs +9 -0
  128. package/test/unit/Shared/Path.test.mjs +11 -0
  129. package/test/unit/Skill/Installer.test.mjs +20 -0
  130. package/test/unit/Upgrade/Service.test.mjs +13 -0
  131. package/test/unit/Validate/Service.test.mjs +760 -0
  132. package/types.d.ts +15 -0
@@ -0,0 +1,73 @@
1
+ # Architecture Overview
2
+
3
+ - Path: `ctx/docs/architecture/overview.md`
4
+ - Template Version: `20260702`
5
+ - Changed: `YYYYMMDD`
6
+
7
+ Keep this document short enough for fast supervision.
8
+
9
+ If the draft grows too large, move detail into `structure.md`, `behavior.md`, `state.md`, `integration.md`, `constraints.md`, `decisions.md`, `checklists.md`, or `supervision.md` and keep only the load-bearing overview here.
10
+
11
+ ## Purpose
12
+
13
+ Provide a compact entry point to the architecture level.
14
+
15
+ ## Architecture Role
16
+
17
+ Describe how this level translates product intent into stable engineering structure.
18
+
19
+ This level should answer briefly:
20
+
21
+ - what is structurally built;
22
+ - how the system behaves internally;
23
+ - where state is owned;
24
+ - what integrations exist;
25
+ - what constraints must not be violated;
26
+ - why key decisions were made;
27
+ - how human and agents supervise architectural consistency.
28
+
29
+ ## Architectural Style
30
+
31
+ Describe the stable architectural style or organizing principle of the system.
32
+
33
+ ## Major Areas
34
+
35
+ List the main architectural areas and explain what each area is responsible for.
36
+
37
+ Do not list source directories, classes, database tables, or endpoint inventories here.
38
+
39
+ ## Documentation Map
40
+
41
+ Use this level in the following navigation pattern:
42
+
43
+ - Read `structure.md` when the question is "what are the main architectural areas and boundaries?"
44
+ - Read `behavior.md` when the question is "how do those areas work together through major internal flows?"
45
+ - Read `checklists.md` when the question is "which fast human checks should I run before concluding that agent work drifted?"
46
+ - Read `state.md` when the question is "where is authoritative state owned, persisted, changed, and derived?"
47
+ - Read `integration.md` when the question is "which external systems and internal contract boundaries matter?"
48
+ - Read `constraints.md` when the question is "which architectural options are forbidden or non-negotiable?"
49
+ - Read `decisions.md` when the question is "why was this architecture chosen over other durable alternatives?"
50
+ - Read `supervision.md` when the question is "what may agents change, what requires approval, and what signals drift?"
51
+
52
+ ## Product Dependency
53
+
54
+ State explicitly that architecture depends on product documentation.
55
+
56
+ Product documentation defines what the product is.
57
+
58
+ Architecture documentation defines how that product is realized structurally.
59
+
60
+ The expected dependency is:
61
+
62
+ ```text
63
+ product
64
+ → architecture
65
+ → environment
66
+ → code
67
+ ```
68
+
69
+ Architecture must not redefine product meaning, invent missing product behavior, or normalize product contradictions silently.
70
+
71
+ ## Collaboration
72
+
73
+ Describe how one human and many agents use this architecture level as an operational interface.
@@ -0,0 +1,52 @@
1
+ # Architecture State
2
+
3
+ - Path: `ctx/docs/architecture/state.md`
4
+ - Template Version: `20260605`
5
+ - Changed: `YYYYMMDD`
6
+
7
+ ## Purpose
8
+
9
+ Describe state ownership and sources of truth.
10
+
11
+ ## Sources Of Truth
12
+
13
+ List the durable sources of truth that matter architecturally.
14
+
15
+ ## State Categories
16
+
17
+ Separate state into categories such as:
18
+
19
+ - authoritative durable state;
20
+ - temporary state;
21
+ - derived state.
22
+
23
+ Make clear which category is the source of truth and which categories are downstream reflections of it.
24
+
25
+ ## Ownership Boundaries
26
+
27
+ Describe the boundaries around:
28
+
29
+ - which state is authoritative;
30
+ - where persistence responsibility lives;
31
+ - where derived state comes from;
32
+ - which state areas must not be re-owned implicitly.
33
+
34
+ ## Ownership Rules
35
+
36
+ Describe:
37
+
38
+ - who owns each important state area;
39
+ - who may change it;
40
+ - who may authorize new state creation.
41
+
42
+ ## State Authority
43
+
44
+ Describe:
45
+
46
+ - who has authority to commit durable state change;
47
+ - how derived state stays traceable to authoritative state;
48
+ - how persistence responsibility is kept explicit.
49
+
50
+ ## Change Discipline
51
+
52
+ Make clear that agents must not introduce new persistent state owners or categories without updating architecture documents and obtaining human approval.
@@ -0,0 +1,32 @@
1
+ # Architecture Structure
2
+
3
+ - Path: `ctx/docs/architecture/structure.md`
4
+ - Template Version: `20260605`
5
+ - Changed: `YYYYMMDD`
6
+
7
+ ## Purpose
8
+
9
+ Describe the major architectural blocks, runtime areas, and responsibility boundaries.
10
+
11
+ ## Architectural Blocks
12
+
13
+ List the main architectural parts and the responsibility of each part.
14
+
15
+ This is not code structure.
16
+
17
+ Do not list:
18
+
19
+ - classes or modules;
20
+ - source directories as if they were architecture;
21
+ - database tables;
22
+ - endpoint inventories.
23
+
24
+ ## Responsibility Boundaries
25
+
26
+ Describe the stable boundaries between architectural areas and the authority each area holds.
27
+
28
+ ## Optional Expansion
29
+
30
+ If the project grows, deeper structure documents may be created under `structure/`.
31
+
32
+ Do not create those subdocuments unless they are justified by project scale.
@@ -0,0 +1,61 @@
1
+ # Architecture Supervision
2
+
3
+ - Path: `ctx/docs/architecture/supervision.md`
4
+ - Template Version: `20260702`
5
+ - Changed: `YYYYMMDD`
6
+
7
+ ## Purpose
8
+
9
+ Describe how one human and many agents supervise architecture-level consistency.
10
+
11
+ Use this document for durable supervision rules and approval boundaries.
12
+
13
+ Use `checklists.md` for short recurring human checks.
14
+
15
+ ## Human-Agent Supervision Principle
16
+
17
+ State that:
18
+
19
+ - humans own architectural direction and guardrails;
20
+ - agents operate within documented architectural boundaries;
21
+ - architecture documentation is the authoritative medium through which the human direction-setting loop and the agent refinement and execution-support loop coordinate at the architecture level;
22
+ - agents must surface architectural drift instead of silently resolving it;
23
+ - major architectural boundary changes require human approval.
24
+
25
+ ## Human Responsibilities
26
+
27
+ Describe the human role in setting direction, approving guardrails, and resolving architectural uncertainty.
28
+
29
+ ## Agent Responsibilities
30
+
31
+ Describe what agents may refine autonomously inside existing architecture boundaries.
32
+
33
+ State that agents should prefer updating documentation before code when a new architectural concept appears.
34
+
35
+ ## Mandatory Approval Cases
36
+
37
+ State which changes require human approval.
38
+
39
+ At minimum, cover:
40
+
41
+ - new architectural owners;
42
+ - new persistent state;
43
+ - new external integrations;
44
+ - new system boundaries.
45
+
46
+ ## Drift Signals
47
+
48
+ Describe the signals that indicate architecture and implementation are diverging.
49
+
50
+ ## Pre-Code Check Order
51
+
52
+ State which documents agents must check before code-oriented work.
53
+
54
+ The expected dependency is:
55
+
56
+ ```text
57
+ product
58
+ -> architecture
59
+ -> environment
60
+ -> code
61
+ ```
@@ -0,0 +1,35 @@
1
+ # Code Documentation
2
+
3
+ - Path: `ctx/docs/code/AGENTS.md`
4
+ - Template Version: `20260702`
5
+ - Changed: `YYYYMMDD`
6
+
7
+ ## Purpose
8
+
9
+ Defines the code documentation level.
10
+
11
+ Documents at this level map architecture into implementation constraints, source organization expectations, tests, and code-level invariants.
12
+
13
+ ## Level Map
14
+
15
+ - `AGENTS.md` — level definition for `ctx/docs/code/`.
16
+ - `overview.md` — product code boundary, code responsibilities, and code invariants.
17
+ - `testing.md` — test strategy, required checks, and validation expectations.
18
+
19
+ ## Level Boundary
20
+
21
+ Defines:
22
+
23
+ - Implementation mapping from architecture to code.
24
+ - Code-level invariants and source constraints.
25
+ - Test and validation expectations for implementation work.
26
+
27
+ Does NOT define:
28
+
29
+ - Product meaning, architecture ownership, or deployment environment facts.
30
+ - Runtime operations outside code-level constraints.
31
+ - Agent workflow behavior outside this documentation level.
32
+
33
+ ## Local Rules
34
+
35
+ - Preserve project-specific nested code subdirectories such as modules, packages, or test areas when they improve maintainability.
@@ -0,0 +1,21 @@
1
+ # Code Overview
2
+
3
+ - Path: `ctx/docs/code/overview.md`
4
+ - Template Version: `20260605`
5
+ - Changed: `YYYYMMDD`
6
+
7
+ ## Purpose
8
+
9
+ Describe the implementation boundary of the product at code level.
10
+
11
+ ## Code Structure
12
+
13
+ Summarize the major source branches and their responsibilities.
14
+
15
+ ## Engineering Constraints
16
+
17
+ Record stable code-level constraints, conventions, or layering rules.
18
+
19
+ ## Test Boundary
20
+
21
+ Describe where implementation verification lives and what kinds of tests exist.
@@ -0,0 +1,13 @@
1
+ # Testing Overview
2
+
3
+ - Path: `ctx/docs/code/testing.md`
4
+ - Template Version: `20260605`
5
+ - Changed: `YYYYMMDD`
6
+
7
+ ## Purpose
8
+
9
+ Describe the test boundary for the project.
10
+
11
+ ## Test Structure
12
+
13
+ List the main test layers, directories, and intended verification scope.
@@ -0,0 +1,34 @@
1
+ # Environment Documentation
2
+
3
+ - Path: `ctx/docs/environment/AGENTS.md`
4
+ - Template Version: `20260702`
5
+ - Changed: `YYYYMMDD`
6
+
7
+ ## Purpose
8
+
9
+ Defines the environment documentation level.
10
+
11
+ Documents at this level describe runtime assumptions, deployment context, infrastructural prerequisites, and operational constraints.
12
+
13
+ ## Level Map
14
+
15
+ - `AGENTS.md` — level definition for `ctx/docs/environment/`.
16
+ - `overview.md` — runtime assumptions, execution surfaces, external prerequisites, and operational constraints.
17
+
18
+ ## Level Boundary
19
+
20
+ Defines:
21
+
22
+ - Runtime and deployment context required for system operation.
23
+ - Environment assumptions and external prerequisites.
24
+ - Operational constraints that implementation and deployment must respect.
25
+
26
+ Does NOT define:
27
+
28
+ - Product meaning or architecture ownership.
29
+ - Source-level implementation details.
30
+ - Project-local agent workflow behavior.
31
+
32
+ ## Local Rules
33
+
34
+ - Preserve project-specific nested environment subdirectories such as deployment, runtime, or operations areas when they improve maintainability.
@@ -0,0 +1,21 @@
1
+ # Environment Overview
2
+
3
+ - Path: `ctx/docs/environment/overview.md`
4
+ - Template Version: `20260605`
5
+ - Changed: `YYYYMMDD`
6
+
7
+ ## Purpose
8
+
9
+ Describe the runtime and operational environment required by the system.
10
+
11
+ ## Runtime Model
12
+
13
+ Identify the main execution environments, hosts, runtimes, or operational domains.
14
+
15
+ ## External Dependencies
16
+
17
+ List required external systems or platform prerequisites.
18
+
19
+ ## Environment Constraints
20
+
21
+ Record stable environment-level constraints that the implementation must respect.
@@ -0,0 +1,39 @@
1
+ # Filesystem Structure
2
+
3
+ - Path: `ctx/docs/filesystem.md`
4
+ - Template Version: `20260605`
5
+ - Changed: `YYYYMMDD`
6
+
7
+ ## Purpose
8
+
9
+ Defines the declarative structure of the project repository at the top level only, listing root-level directories and root-level files and establishing repository boundaries as a navigation model.
10
+
11
+ This starter is not a completed repository map.
12
+
13
+ During context design, replace placeholder entries with the actual top-level repository directories and root-level files.
14
+
15
+ Do not keep optional examples or inferred technology directories unless they exist and carry project-specific meaning.
16
+
17
+ ## Root Structure
18
+
19
+ - `ctx/` — cognitive context containing project documentation, assets, and project-local agent materials.
20
+ - `{{top-level-directory}}/` — replace with an actual project directory and its project role.
21
+
22
+ ## Root Files
23
+
24
+ - `AGENTS.md` — root-level agent instructions.
25
+ - `{{root-file}}` — replace with an actual root-level file and its project role.
26
+
27
+ ## Scope Rule
28
+
29
+ This document must describe only top-level directories and root-level files of the repository.
30
+
31
+ Subdirectories must not be described here.
32
+
33
+ Lower-level structure must be described only by the corresponding `AGENTS.md` files within those directories.
34
+
35
+ ## Boundary Definition
36
+
37
+ - `ctx/` defines the system model and governs interpretation of the repository.
38
+ - Product implementation directories must be named here only after the project structure is known.
39
+ - Generated, dependency, cache, secret, and local tool directories must be omitted unless the project context explicitly governs them.
@@ -0,0 +1,38 @@
1
+ # Product Documentation
2
+
3
+ - Path: `ctx/docs/product/AGENTS.md`
4
+ - Template Version: `20260702`
5
+ - Changed: `YYYYMMDD`
6
+
7
+ ## Purpose
8
+
9
+ Defines the product documentation level.
10
+
11
+ Documents at this level describe the system as a product: its meaning, purpose, scope, domain language, user roles, product boundaries, and product-level invariants.
12
+
13
+ ## Level Map
14
+
15
+ - `AGENTS.md` — level definition for `ctx/docs/product/`.
16
+ - `domain.md` — product domain model; describes the product world, domain areas, business entities, ownership, and semantic relations, not storage structure.
17
+ - `glossary.md` — product terminology; defines stable product terms and prevents terminology drift.
18
+ - `overview.md` — entry point; defines product identity, scope, boundaries, and navigation, not a compressed full specification.
19
+ - `roles.md` — user role model; describes role categories, authority, permissions, ownership boundaries, and responsibility boundaries.
20
+ - `use-cases.md` — product use cases; describes user goals and expected outcomes, not UI, API, or implementation flows.
21
+
22
+ ## Level Boundary
23
+
24
+ Defines:
25
+
26
+ - Product identity, scope, and explicit exclusions.
27
+ - Product language, roles, and authority boundaries.
28
+ - Product-level user goals, expected outcomes, and durable invariants.
29
+
30
+ Does NOT define:
31
+
32
+ - Architectural structure, system decomposition, or integration boundaries.
33
+ - Execution environment, deployment topology, or code-level implementation constraints.
34
+ - Agent workflow behavior, repository operations, or methodological rules above this level.
35
+
36
+ ## Local Rules
37
+
38
+ - Preserve project-specific nested product subdirectories such as domain, roles, glossary, or use-case areas when they improve maintainability.
@@ -0,0 +1,77 @@
1
+ # Product Domain Model
2
+
3
+ - Path: `ctx/docs/product/domain.md`
4
+ - Template Version: `20260605`
5
+ - Changed: `YYYYMMDD`
6
+
7
+ ## Purpose
8
+
9
+ Describe the product world at the overview level.
10
+
11
+ This document defines product-world semantics only: what exists in the product world, why it matters, who owns it, and how major concepts relate to each other.
12
+
13
+ Detailed domain areas may be described in `ctx/docs/product/domain/`.
14
+
15
+ ## Level Boundary
16
+
17
+ Defines:
18
+
19
+ - major domain areas;
20
+ - core domain entities;
21
+ - ownership principles for domain objects;
22
+ - semantic relations between domain areas and entities;
23
+ - domain-level invariants.
24
+
25
+ Does NOT define:
26
+
27
+ - database tables, DTO fields, indexes, migrations, or persistence structure;
28
+ - API routes, request and response contracts, or transport protocols;
29
+ - UI screens, widgets, components, or user interaction mechanics;
30
+ - source code structure, modules, services, classes, or implementation algorithms;
31
+ - detailed role permissions and authority rules.
32
+
33
+ ## Domain Areas
34
+
35
+ List the major areas of the product world.
36
+
37
+ For each area, describe:
38
+
39
+ - purpose;
40
+ - ownership;
41
+ - primary entities;
42
+ - relation to other areas;
43
+ - detailed document, if it exists.
44
+
45
+ ## Core Domain Entities
46
+
47
+ List only the entities required for first-level understanding of the product world.
48
+
49
+ Do not describe all entities here.
50
+
51
+ Detailed entity models belong to dedicated domain-area documents.
52
+
53
+ ## Ownership Principles
54
+
55
+ Describe product-level ownership principles for domain objects.
56
+
57
+ Detailed authority and role permissions belong to `roles.md`.
58
+
59
+ ## Semantic Relations
60
+
61
+ Describe the most important relations between domain areas and core entities.
62
+
63
+ Focus on product meaning, not implementation structure.
64
+
65
+ ## Domain Invariants
66
+
67
+ List product-world rules that must remain true regardless of architecture, storage, UI, or code.
68
+
69
+ ## Domain Documentation Map
70
+
71
+ List detailed domain documents.
72
+
73
+ Example:
74
+
75
+ - `domain/identity.md` — identity and access domain.
76
+ - `domain/content.md` — content and publication domain.
77
+ - `domain/billing.md` — billing and credit domain.
@@ -0,0 +1,110 @@
1
+ # Product Glossary
2
+
3
+ - Path: `ctx/docs/product/glossary.md`
4
+ - Template Version: `20260605`
5
+ - Changed: `YYYYMMDD`
6
+
7
+ ## Purpose
8
+
9
+ Define stable product terminology.
10
+
11
+ This document defines product-language semantics only: what terms mean inside the product, which terms are preferred, which terms are prohibited or deprecated, and how terms relate to product domain, roles, and use cases.
12
+
13
+ Detailed glossary groups may be described in `ctx/docs/product/glossary/`.
14
+
15
+ ## Level Boundary
16
+
17
+ Defines:
18
+
19
+ - stable product terms;
20
+ - preferred names for product concepts;
21
+ - prohibited, deprecated, or ambiguous terms;
22
+ - synonym and naming rules;
23
+ - relations between terms;
24
+ - terminology-level invariants.
25
+
26
+ Does NOT define:
27
+
28
+ - database table names, column names, DTO names, or persistence naming rules;
29
+ - API route names, request fields, response fields, or transport naming rules;
30
+ - UI labels, button texts, menu names, or copywriting;
31
+ - source code identifiers, class names, service names, or module names;
32
+ - implementation-specific naming conventions.
33
+
34
+ ## Term Groups
35
+
36
+ List the major groups of product terminology.
37
+
38
+ Small projects may keep this structure light at first and use a compact list of core terms before splitting terminology into groups.
39
+
40
+ For each group, describe:
41
+
42
+ - purpose;
43
+ - related domain area;
44
+ - related roles or use cases;
45
+ - detailed document, if it exists.
46
+
47
+ ## Core Terms
48
+
49
+ List only the terms required for first-level understanding of the product language.
50
+
51
+ Do not describe the complete terminology catalog here when the product has many terms.
52
+
53
+ This document may start as a compact list of core terms and evolve into grouped terminology only when the product language grows.
54
+
55
+ Detailed term groups belong to dedicated glossary documents.
56
+
57
+ ## Term Format
58
+
59
+ When a term is defined in this document or in a detailed glossary document, use product-level language.
60
+
61
+ Recommended fields:
62
+
63
+ - preferred term;
64
+ - definition;
65
+ - context of use;
66
+ - related domain concepts;
67
+ - related roles;
68
+ - related use cases;
69
+ - allowed synonyms;
70
+ - prohibited synonyms;
71
+ - deprecated terms.
72
+
73
+ Do not include implementation identifiers unless the implementation identifier is intentionally the same product term.
74
+
75
+ ## Naming Principles
76
+
77
+ Describe product-level naming principles.
78
+
79
+ Clarify:
80
+
81
+ - how product terms are selected;
82
+ - when a term becomes stable;
83
+ - how ambiguous terms are resolved;
84
+ - how deprecated terms are handled;
85
+ - how terms should remain consistent across product documentation.
86
+
87
+ ## Terminology Relations
88
+
89
+ Describe important relations between terms.
90
+
91
+ Examples:
92
+
93
+ - broader and narrower terms;
94
+ - preferred term and synonym;
95
+ - current term and deprecated term;
96
+ - product term and external/common term.
97
+
98
+ ## Terminology Invariants
99
+
100
+ List terminology-level rules that must remain true regardless of architecture, storage, UI, or code.
101
+
102
+ ## Glossary Documentation Map
103
+
104
+ List detailed glossary documents.
105
+
106
+ Example:
107
+
108
+ - `glossary/domain.md` — domain terminology.
109
+ - `glossary/roles.md` — role terminology.
110
+ - `glossary/ai.md` — AI-related terminology.
@@ -0,0 +1,74 @@
1
+ # Product Overview
2
+
3
+ - Path: `ctx/docs/product/overview.md`
4
+ - Template Version: `20260702`
5
+ - Changed: `YYYYMMDD`
6
+
7
+ Keep this document short enough for fast orientation.
8
+
9
+ If the draft grows too large, move detail into `domain.md`, `roles.md`, `use-cases.md`, or `glossary.md` and keep only the load-bearing overview here.
10
+
11
+ ## Product Identity
12
+
13
+ Describe what kind of product this is, who it serves, and what durable user problem it solves.
14
+
15
+ This section defines the product as a whole, not its implementation or feature inventory.
16
+
17
+ ## Product Mission
18
+
19
+ Describe why the product exists and what stable product intention guides its development.
20
+
21
+ This section should express the product purpose, not the current backlog.
22
+
23
+ ## Product Scope
24
+
25
+ Define what the product is responsible for at the product level.
26
+
27
+ This section defines the product boundary, not a complete feature list.
28
+
29
+ ## Product Areas
30
+
31
+ Describe the major product knowledge areas.
32
+
33
+ This section should help the reader understand where detailed product knowledge belongs before reading `domain.md`, `roles.md`, `use-cases.md`, and `glossary.md`.
34
+
35
+ Do not treat this section as a compressed replacement for those documents.
36
+
37
+ ## Core Lifecycle
38
+
39
+ Describe the main lifecycle of product use from entry to useful result.
40
+
41
+ This section should provide orientation through the product, not a complete use-case catalog.
42
+
43
+ ## Product Boundaries
44
+
45
+ ### In Scope
46
+
47
+ List product-level responsibilities.
48
+
49
+ ### Out of Scope
50
+
51
+ List explicit exclusions and anti-goals.
52
+
53
+ This section is normative. It prevents agents from expanding the product in invalid directions.
54
+
55
+ ## MVP Boundary
56
+
57
+ Summarize the functional boundary of the current product version.
58
+
59
+ This section defines the current committed product shape, but must not replace detailed use cases or domain definitions.
60
+
61
+ ## Product Invariants
62
+
63
+ List product-level rules that must remain true across architecture, environment, code, and future product changes.
64
+
65
+ Use this section only for stable product constraints.
66
+
67
+ ## Documentation Map
68
+
69
+ Use this section as a navigation index for product knowledge.
70
+
71
+ - Read `domain.md` to understand the product world, domain areas, business entities, ownership, and semantic relations.
72
+ - Read `roles.md` to understand product participants, authority, permissions, ownership boundaries, and responsibility boundaries.
73
+ - Read `use-cases.md` to understand user goals, expected outcomes, and product-level usage scenarios.
74
+ - Read `glossary.md` to understand stable product terminology.