@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,50 +0,0 @@
1
- # Environment Documentation
2
-
3
- - Path: `ctx/docs/environment/AGENTS.md`
4
- - Changed: `20260708`
5
-
6
- ## Purpose
7
-
8
- Defines the environment documentation level.
9
-
10
- Documents at this level describe the runtime environment, infrastructural prerequisites, and operational assumptions required for system operation.
11
-
12
- ## Level Map
13
-
14
- - `AGENTS.md` — level definition for `ctx/docs/environment/`.
15
- - `overview.md` — runtime assumptions, execution surfaces, external prerequisites, and operational constraints.
16
-
17
- ## Level Boundary
18
-
19
- Defines:
20
-
21
- - Runtime environment assumptions — language runtime, filesystem model, and execution surfaces.
22
- - External prerequisites — required tooling, minimum versions, and expected infrastructure.
23
- - Operational constraints — conditions under which the system must remain valid regardless of deployment context.
24
-
25
- Does NOT define:
26
-
27
- - Product meaning, domain entities, or use-case outcomes.
28
- - Architecture structure, system boundaries, or state ownership.
29
- - Source-level implementation details, testing conventions, or code invariants.
30
-
31
- ## Relationship To Upstream Levels
32
-
33
- Environment depends on architecture documentation and feeds into code.
34
-
35
- The dependency order is:
36
-
37
- ```text
38
- product
39
- → architecture
40
- → environment
41
- → code
42
- ```
43
-
44
- Environment may add operational precision and constraints but must not redefine architecture structure or introduce new product capabilities.
45
-
46
- Code-level documents must respect environment assumptions as non-negotiable prerequisites.
47
-
48
- ## Local Rules
49
-
50
- - Preserve nested environment subdirectories when they improve maintainability.
@@ -1,33 +0,0 @@
1
- # Environment Overview
2
-
3
- - Path: `ctx/docs/environment/overview.md`
4
- - Changed: `20260702`
5
-
6
- ## Purpose
7
-
8
- Defines the runtime environment assumptions for this repository.
9
-
10
- ## Runtime Assumptions
11
-
12
- - Node.js executes the CLI, lifecycle logic, and automated tests.
13
- - The package operates on local filesystem paths in the current repository or in explicitly provided target directories.
14
- - The package must not depend on hardcoded absolute paths at runtime.
15
-
16
- ## Execution Surfaces
17
-
18
- - local CLI execution runs through `node` and the installed `adsm-ctx` entry point;
19
- - package installation provides the CLI and bundled `skill/` payload to the host machine;
20
- - agent-skill installation copies the packaged skill payload into the inter-agent skills root under `~/.agents/skills`;
21
- - repository automation runs against a checked-out repository and uses the repository-local `ctx/` as its context source.
22
-
23
- ## External Prerequisites
24
-
25
- - Node.js `>=20` is required by the package contract.
26
- - npm is the expected package-installation surface for local development and global installation.
27
- - The repository is expected to be available as a writable working tree when lifecycle commands or workflow automation modify files.
28
-
29
- ## Operational Environment Constraints
30
-
31
- - Runtime behavior must remain valid whether the repository is executed from a developer checkout or from a globally installed package.
32
- - Installation and validation flows must work with relative target paths supplied by the caller.
33
- - Automation assumptions that depend on concrete tools, events, labels, or trusted actors belong to project-local materials under `ctx/agent/` rather than to the ADSM baseline.
@@ -1,44 +0,0 @@
1
- # Filesystem Structure
2
-
3
- - Path: `ctx/docs/filesystem.md`
4
- - Changed: `20260707`
5
-
6
- ## Purpose
7
-
8
- Defines the declarative structure of the skill repository at the top level only and establishes repository boundaries as a navigation model.
9
-
10
- ## Root Structure
11
-
12
- - `.github/` — GitHub automation definitions, including the workflow that publishes `github-flows` application configuration.
13
- - `bin/` — executable entry points for local lifecycle tooling.
14
- - `ctx/` — cognitive context containing declarative documentation for this repository itself.
15
- - `migrations/` — future migration definitions for context upgrades.
16
- - `skill/` — installable skill payload consumed by agents.
17
- - `src/` — implementation logic for CLI-backed lifecycle operations and shared helpers.
18
- - `test/` — executable tests for CLI and lifecycle behavior.
19
-
20
- ## Root Files
21
-
22
- - `.gitignore` — version-control exclusion rules.
23
- - `AGENTS.md` — root-level ADSM invariants.
24
- - `jsconfig.json` — JavaScript language-service configuration.
25
- - `LICENSE` — license definition.
26
- - `README.md` — public human-facing documentation for the package.
27
- - `package-lock.json` — npm dependency lockfile.
28
- - `package.json` — package metadata, scripts, and CLI registration.
29
- - `types.d.ts` — project-local type declarations.
30
-
31
- ## Scope Rule
32
-
33
- This document describes only top-level directories and root-level files.
34
-
35
- Subdirectory structure, including anything inside `ctx/`, must be described in the corresponding lower-level documentation and service-control files when needed.
36
-
37
- `AGENTS.md` files may describe local operational boundaries, but the normative rules for their structure belong to the declarative documentation under `ctx/docs/`.
38
-
39
- ## Product Boundary
40
-
41
- - `skill/` and `src/` are product artifacts of this repository.
42
- - `skill/templates/ctx/` is the reusable template baseline installed into other projects.
43
- - `skill/templates/work/` contains working templates for agent operations and is not installed into project `ctx/` by default.
44
- - `ctx/` documents this repository as a skill product.
@@ -1,51 +0,0 @@
1
- # Product Documentation
2
-
3
- - Path: `ctx/docs/product/AGENTS.md`
4
- - Changed: `20260708`
5
-
6
- ## Purpose
7
-
8
- Defines the product documentation level.
9
-
10
- Documents at this level describe the system as a product: its meaning, purpose, scope, domain language, user roles, product boundaries, and product-level invariants.
11
-
12
- ## Level Map
13
-
14
- - `AGENTS.md` — level definition for `ctx/docs/product/`.
15
- - `domain.md` — product domain model; describes the product world, domain areas, business entities, ownership, and semantic relations, not storage structure.
16
- - `glossary.md` — product terminology; defines stable product terms and prevents terminology drift.
17
- - `overview.md` — product identity, scope, boundaries, and product-level orientation.
18
- - `roles.md` — user role model; describes role categories, authority, permissions, ownership boundaries, and responsibility boundaries.
19
- - `use-cases.md` — product use cases; describes user goals and expected outcomes, not UI, API, or implementation flows.
20
-
21
- ## Product Knowledge Model
22
-
23
- Product knowledge is organized through complementary agent documents:
24
-
25
- - `domain.md` — the product world.
26
- - `roles.md` — product participants and authority.
27
- - `use-cases.md` — user goals and expected outcomes.
28
- - `glossary.md` — product language.
29
- - `overview.md` — product identity, scope, and boundaries.
30
-
31
- Together these models provide the primary understanding of the product.
32
-
33
- If an agent document grows too large to maintain, move operational detail into a natural product subdocument or nested subdirectory.
34
-
35
- ## Local Rules
36
-
37
- - Preserve nested product subdirectories when they improve maintainability.
38
-
39
- ## Level Boundary
40
-
41
- Defines:
42
-
43
- - Product identity, scope, and explicit exclusions.
44
- - Product language, roles, and authority boundaries.
45
- - Product-level user goals, expected outcomes, and durable invariants.
46
-
47
- Does NOT define:
48
-
49
- - Architectural structure, system decomposition, or integration boundaries.
50
- - Execution environment, deployment topology, or code-level implementation constraints.
51
- - Agent workflow behavior, repository operations, or methodological rules above this level.
@@ -1,63 +0,0 @@
1
- # Product Domain
2
-
3
- - Path: `ctx/docs/product/domain.md`
4
- - Changed: `20260813`
5
-
6
- ## Domain Purpose
7
-
8
- The domain of this product is ADSM project cognitive context lifecycle management.
9
-
10
- The skill manages the structure, validation, audit, compression, upgrade, and agent-facing guidance for project cognitive context without inventing project-specific product meaning.
11
-
12
- ## Core Domain Objects
13
-
14
- - **ADSM context** — the project cognitive context mounted under `ctx/`; it is the durable communication medium between humans and agents.
15
- - **Skill payload** — the installable `skill/` bundle consumed by an agent skill host as `adsm-ctx`.
16
- - **Skills root** — the caller-provided directory under which `install-skill` installs the bundled skill payload.
17
- - **Documentation level** — one of the four top-level documentation branches under `ctx/docs/`: `product/`, `architecture/`, `environment/`, and `code/`.
18
- - **Project-specific nested substructure** — directories and documents inside a documentation level; it is chosen by the project and is not fixed by ADSM.
19
- - **Agent document** — an ordinary `*.md` file under `ctx/docs/**`; it contains operational project knowledge in a form optimized for agent interpretation and maintenance.
20
- - **Semantic skin** — a short `*.skin.<lang>.md` file under `ctx/docs/**`; it captures human-facing semantic invariants for the matching agent document.
21
- - **Agent/skin pair** — an agent document and skin with the same basename in the same directory, such as `domain.md` and `domain.skin.en.md`.
22
- - **Projection drift** — conflict between an agent document and its skin, an orphan skin without a matching agent document, or an artifact that introduces authoritative meaning not present in agent or skin documents.
23
- - **AGENTS.md local routing file** — a short service-control file that tells agents how to read, edit, and route work in its local directory scope.
24
- - **ctx/assets artifact space** — the place for visual, generated, rendered, or auxiliary artifacts that may illustrate meaning but must not define authoritative project knowledge.
25
- - **Lifecycle mode** — a skill operation such as `init`, `design`, `validate`, `quality-audit`, `documentation-compression`, or `upgrade`.
26
- - **Human decision / escalation** — a required human intervention when an agent detects projection drift, missing upstream meaning, a skin conflict, or an unsafe change in controlled meaning.
27
-
28
- ## Core Relations
29
-
30
- - An ADSM context contains project-facing documentation under `ctx/docs/` and project-local agent materials under `ctx/agent/`.
31
- - The skill payload is installed separately from initialized project context and must remain a coherent copy of `skill/`.
32
- - The skills root is an external installation target and is not a project cognitive context.
33
- - `ctx/docs/` contains exactly four top-level documentation levels by ADSM convention: `product/`, `architecture/`, `environment/`, and `code/`.
34
- - Each documentation level may contain project-specific nested substructure when that improves maintainability.
35
- - Agent documents carry operational detail by default.
36
- - Skins govern matching agent documents only when human semantic control is needed.
37
- - Agents must read a matching skin before changing its matching agent document.
38
- - An agent-document change that violates its skin requires a human decision.
39
- - Assets may support agent and skin documents visually, but those documents remain the source of authoritative meaning.
40
- - `AGENTS.md` routes local agent behavior; it does not replace agent documents, skins, or product meaning.
41
-
42
- ## Lifecycle Behavior
43
-
44
- - `init` creates a minimal ADSM-compatible context baseline.
45
- - `design` shapes documentation levels and project-specific substructure without guessing project meaning.
46
- - `validate` reports structural and deterministic projection-model findings, including lightweight document-shape and local-link checks for `ctx/docs/**`, without destructive edits.
47
- - `quality-audit` evaluates agent documents, skins, and their alignment against ADSM quality criteria.
48
- - `documentation-compression` rewrites agent documents for density only when accepted meaning and skin-controlled meaning are preserved.
49
- - `upgrade` migrates existing contexts to current conventions while preserving project-specific content.
50
- - `install-skill` installs the current skill payload into a caller-provided skills root; it is a package-support operation, not a context lifecycle mode.
51
-
52
- ## Domain Invariants
53
-
54
- - The skill remains generic and orchestration-oriented.
55
- - ADSM defines the four top-level documentation levels, not a rigid internal tree below them.
56
- - Ordinary `*.md` files are agent-facing operational context documents by default.
57
- - `*.skin.<lang>.md` files are optional semantic control surfaces, not summaries.
58
- - Deterministic validation may require paired agent documents, required skin sections, `Scope` subblocks, valid local markdown links, and compactness thresholds for skins.
59
- - `overview.md` has no special methodology-level status.
60
- - `README.md` is not required inside `ctx/docs/`.
61
- - `agents-files.md` is not required.
62
- - Human decisions are required when agents would need to invent project meaning, weaken a skin, or silently resolve projection drift.
63
- - Skill payload installation must not alter a target project's `ctx/` content.
@@ -1,40 +0,0 @@
1
- # Product Domain Skin
2
-
3
- - Path: `ctx/docs/product/domain.skin.en.md`
4
- - Changed: `20260813`
5
-
6
- ## Purpose
7
-
8
- This skin preserves the stable domain objects and relations for ADSM context lifecycle management.
9
-
10
- ## Mental Model
11
-
12
- ADSM context uses agent-facing operational documents by default, while optional skins preserve the human semantic frame for selected key documents.
13
-
14
- ## Scope
15
-
16
- Includes:
17
-
18
- - the stable domain objects and relations behind the ADSM context lifecycle;
19
- - the distinction between agent documents, skins, assets, and `AGENTS.md` routing files;
20
- - the optional nature of `*.skin.<lang>.md` pairing.
21
-
22
- Excludes:
23
-
24
- - low-level implementation behavior;
25
- - validation internals;
26
- - CLI command wording.
27
-
28
- ## Invariants
29
-
30
- - ADSM context uses agent-facing operational documents by default.
31
- - ADSM defines four top-level documentation levels: `product/`, `architecture/`, `environment/`, and `code/`.
32
- - Humans control meaning through optional matching `*.skin.<lang>.md` files.
33
- - Agent documents carry operational detail; skins control semantic invariants.
34
- - Project-specific nested substructure is allowed inside each documentation level.
35
- - `AGENTS.md` files are local routing files, not full documentation artifacts.
36
- - `ctx/assets/**` contains artifacts that illustrate meaning but do not define it.
37
-
38
- ## Agent Document
39
-
40
- `domain.md`
@@ -1,31 +0,0 @@
1
- # Product Glossary
2
-
3
- - Path: `ctx/docs/product/glossary.md`
4
- - Changed: `20260813`
5
-
6
- ## Terms
7
-
8
- - **ADSM** — Agent-Driven Software Management.
9
- - **Agent External Context** — the reserved `ctx/agent/` branch used for project-local materials about tools, relationships, or routines that sit outside ADSM methodology.
10
- - **Agent Skill Host** — the environment that loads installed agent skill payloads.
11
- - **Bootstrap Marker** — the minimal text left in installed project-facing templates to identify the context as ADSM-managed and direct agents to skill `adsm-ctx` for validation and methodology rules.
12
- - **Cognitive Context** — the declarative project context mounted under `ctx/`.
13
- - **Agent Document** — an ordinary `*.md` document under `ctx/docs/**`; agent documents are optimized primarily for agent routing, interpretation, and execution without guessing.
14
- - **Agent/Skin Pair** — an agent document and its matching semantic skin in the same directory with the same basename, such as `domain.md` and `domain.skin.en.md`.
15
- - **Documentation Compression** — agent-performed controlled rewrite of a project documentation corpus that reduces attention cost while preserving accepted project meaning.
16
- - **Documentation Quality Audit** — agent-performed review of a documentation corpus against ADSM documentation quality criteria, producing evidence-backed findings rather than automatic semantic scoring.
17
- - **Documentation Quality Criterion** — one of the ADSM corpus quality dimensions used during documentation quality audit: declarativity, consistency, completeness, connectedness, density, compactness, non-redundancy, or absence of obvious descriptions.
18
- - **Projection Drift** — a conflict between an agent document and matching skin, an orphan skin without a matching agent document, or an asset that introduces meaning not present in agent or skin documents.
19
- - **Semantic Skin** — a short `*.skin.<lang>.md` document that acts as a human-facing semantic control surface for the matching agent document.
20
- - **Human Supervisor** — the human role that sets goals and guardrails, reviews outcomes, and intervenes when agent work drifts from expected product or architecture boundaries.
21
- - **Lifecycle Mode** — one of `init`, `design`, `validate`, `quality-audit`, `documentation-compression`, or `upgrade`.
22
- - **Specialized Skill** — a separate skill that may help produce or refine a domain-specific context branch, but is not the only valid source of project-specific semantics.
23
- - **Skill Payload** — the bundled contents of `skill/` installed into an agent skill host as `adsm-ctx`.
24
- - **Skills Root** — the caller-provided installation root under which the skill payload is installed.
25
- - **Specialization Gap** — a required context area for which no specialized skill is available.
26
- - **Audit Finding** — a documented discovery produced during a documentation quality audit, including criterion, severity, location, issue, evidence, impact, suggested action, and decision status.
27
- - **Working Report Template** — an agent-facing output template used during skill operations such as audit, compression, and validation and not installed into project `ctx/` by default.
28
- - **Context Template** — a reusable starter artifact from `skill/templates/ctx/` that provides the baseline cognitive-context structure for downstream projects while keeping ADSM methodology in the skill and references rather than in project-facing template text.
29
- - **Validation Finding** — a documented structural discrepancy produced during context validation, reporting missing or malformed expected files against the ADSM baseline.
30
- - **Migration** — a controlled, non-destructive transformation of project cognitive context from one convention version to another, preserving project-specific content.
31
- - **Specialization Support** — the capability to detect, route toward, or integrate with specialized skills for project-specific documentation branches.
@@ -1,112 +0,0 @@
1
- # Product Overview
2
-
3
- - Path: `ctx/docs/product/overview.md`
4
- - Changed: `20260708`
5
-
6
- ## Product Identity
7
-
8
- This product is an ADSM skill package for building and evolving project cognitive context.
9
-
10
- It serves a human-and-agent working group in which agents perform most lifecycle work and humans set guardrails, inspect results, and correct drift.
11
-
12
- ## Product Mission
13
-
14
- Provide a generic, reusable foundation for project cognitive context management without inventing project-specific knowledge.
15
-
16
- ## Product Scope
17
-
18
- The product is responsible for:
19
-
20
- - creating baseline context structure;
21
- - installing the bundled skill payload into a configured agent skills root;
22
- - providing reusable product-level and architecture-level templates with only minimal ADSM bootstrap markers;
23
- - validating structural conformance and lightweight deterministic document shape under `ctx/docs/`;
24
- - guiding agent-performed quality audits of documentation corpora against ADSM documentation quality criteria;
25
- - guiding agent-performed documentation compression of `ctx/docs/` corpora without changing accepted project meaning;
26
- - guiding context design and upgrade decisions;
27
- - reserving the `ctx/agent/` boundary file while leaving project-local tool materials outside the ADSM baseline.
28
-
29
- This scope is intentionally stated as stable product orientation, with operational detail left to the matching domain, roles, use-case, and glossary documents.
30
-
31
- ## Product Areas
32
-
33
- - lifecycle tooling;
34
- - skill payload installation;
35
- - agent-facing guidance and routing documents;
36
- - audit and compression guidance;
37
- - reusable product and architecture context templates;
38
- - semantic control surfaces for high-level orientation and drift diagnosis;
39
- - reserved boundary support for `ctx/agent/`;
40
- - repository self-documentation.
41
-
42
- ## Core Lifecycle
43
-
44
- The primary lifecycle is:
45
-
46
- 1. initialize baseline context;
47
- 2. design project-specific structure;
48
- 3. validate the resulting context;
49
- 4. audit documentation quality when corpus-level supervision is needed;
50
- 5. compress documentation when accepted meaning is stable but attention cost is high;
51
- 6. upgrade the context when conventions evolve.
52
-
53
- Operationally, agents perform most of this lifecycle work. Humans intervene mainly to set boundaries, approve expansion, and correct unexpected agent interpretation.
54
-
55
- Skill payload installation is a package-support capability that enables agents to use this lifecycle guidance.
56
-
57
- It is not itself a context lifecycle mode.
58
-
59
- ## Product Boundaries
60
-
61
- ### In Scope
62
-
63
- - generic ADSM context lifecycle management;
64
- - installation of the bundled `skill/` payload into a caller-provided agent skills root;
65
- - minimal template markers that identify an installed context as ADSM-managed and point agents to skill `adsm-ctx` for validation and methodology rules;
66
- - agent guidance for documentation quality audit and controlled documentation compression;
67
- - structural management of the `ctx/agent/` boundary file without prescribing project-local subdirectories;
68
- - orchestration toward specialized skills;
69
- - non-destructive structure validation and upgrade support.
70
-
71
- ### Out of Scope
72
-
73
- - product-specific requirements definition;
74
- - embedding detailed ADSM conformance rules directly into downstream project-facing templates;
75
- - automatic semantic scoring or automatic semantic correction of project documentation quality;
76
- - changing project meaning during documentation compression;
77
- - authoritative tool-specific instructions, workflow meaning, event semantics, or project-specific flow rules;
78
- - specialized browser, backend, data, or deployment documentation logic;
79
- - implementation of business-domain documentation as guessed content.
80
-
81
- ## MVP Boundary
82
-
83
- The current version provides a working skeleton with executable CLI commands, bundled skill installation, bundled templates, baseline validation, documentation quality audit guidance, documentation compression guidance, and upgrade hooks.
84
-
85
- The documentation quality audit and documentation compression capabilities are agent-guidance capabilities, not CLI validation capabilities.
86
-
87
- `validate` is the deterministic preflight for the documentation corpus.
88
-
89
- It may reject structural defects such as broken pairing, missing required skin sections, missing `Scope` subblocks, or broken local markdown links, and it may emit heuristic warnings when a semantic skin grows beyond compact supervision thresholds.
90
-
91
- ## Product Invariants
92
-
93
- - Project cognitive context is the main managed object.
94
- - The skill must remain generic and orchestration-oriented.
95
- - Agents perform the default operating work; humans provide guardrails and correction.
96
- - Project documents should govern the project itself; ADSM conformance checking belongs to the skill.
97
- - `AGENTS.md` files are service control files for agent work inside a project and must not act as the originating specification for ADSM rules about themselves.
98
- - Installed project-facing templates may contain only the minimal ADSM bootstrap signal needed to identify the context and route validation to skill `adsm-ctx`.
99
- - The skill defines only the `ctx/agent/` boundary file; project-local tool materials under that branch remain outside the ADSM baseline.
100
- - Skill payload installation copies the current `skill/` bundle as a coherent agent-consumed payload and must not modify project context.
101
- - Documentation quality audits must report evidence-backed findings and must not silently invent or correct project meaning.
102
- - Deterministic validation may check skin structure and compactness heuristics, but ordinary agent documents remain minimally constrained.
103
- - Documentation compression must preserve accepted project meaning while reducing attention cost.
104
- - Specialized skills may help formulate tool-specific semantics, but they are optional support rather than the only valid source of such semantics.
105
- - Missing specialization must be reported, not guessed around.
106
-
107
- ## Related Bodies
108
-
109
- - Read `domain.md` for the product domain boundary.
110
- - Read `roles.md` for participating roles.
111
- - Read `use-cases.md` for lifecycle-oriented user goals.
112
- - Read `glossary.md` for stable terminology.
@@ -1,38 +0,0 @@
1
- # Product Overview Skin
2
-
3
- - Path: `ctx/docs/product/overview.skin.en.md`
4
- - Changed: `20260813`
5
-
6
- ## Purpose
7
-
8
- This skin preserves the high-level product identity of the skill package as a generic ADSM context lifecycle product.
9
-
10
- ## Mental Model
11
-
12
- The product manages cognitive-context lifecycle rules and guidance, not a downstream business domain.
13
-
14
- ## Scope
15
-
16
- Includes:
17
-
18
- - product identity, mission, and scope boundaries;
19
- - the generic and orchestration-oriented character of the skill;
20
- - the role split between humans and agents.
21
-
22
- Excludes:
23
-
24
- - detailed lifecycle mechanics;
25
- - internal implementation structure;
26
- - project-specific consumer-domain semantics.
27
-
28
- ## Invariants
29
-
30
- - The product manages project cognitive context, not an external consumer project.
31
- - Agents do default lifecycle work; humans set guardrails, inspect outcomes, and correct drift.
32
- - The skill must remain generic and must not invent project-specific business or architecture meaning.
33
- - Installed project-facing templates keep only minimal ADSM bootstrap signals.
34
- - `overview.md` is an agent document, not a required human entry frame by methodology.
35
-
36
- ## Agent Document
37
-
38
- `overview.md`
@@ -1,17 +0,0 @@
1
- # Product Roles
2
-
3
- - Path: `ctx/docs/product/roles.md`
4
- - Changed: `20260702`
5
-
6
- ## Roles
7
-
8
- - **Human Supervisor** — defines goals, sets guardrails, reviews outcomes, and intervenes when agent work drifts from expected product or architecture boundaries.
9
- - **Agent** — performs most lifecycle work inside declared ADSM boundaries, including analysis, structure changes, audits, and controlled documentation compression.
10
- - **Developer** — maintains implementation and repository mechanics needed for the product to operate as a skill package.
11
- - **Context Maintainer** — evolves templates, validation rules, documentation quality audit guidance, documentation compression guidance, and upgrade conventions.
12
-
13
- ## Authority Pattern
14
-
15
- - The human supervisor owns direction, acceptance, and boundary expansion.
16
- - The agent owns default operational execution inside documented boundaries.
17
- - The developer and context maintainer may be the same human, but their responsibilities remain distinct from the autonomous agent role.
@@ -1,15 +0,0 @@
1
- # Product Use Cases
2
-
3
- - Path: `ctx/docs/product/use-cases.md`
4
- - Changed: `20260708`
5
-
6
- ## Use Cases
7
-
8
- - Initialize cognitive context in a repository so agents have a baseline `ctx/` structure, metadata, and local routing files.
9
- - Install the bundled skill payload into a caller-provided skills root so an agent skill host can load `adsm-ctx`.
10
- - Assess whether an existing repository has the required ADSM baseline, documentation levels, metadata, and projection shape.
11
- - Audit an existing documentation corpus against ADSM documentation quality criteria and produce evidence-backed findings.
12
- - Compress an existing `ctx/docs/` corpus while preserving accepted project meaning and skin-controlled meaning in matching agent documents.
13
- - Define or revise the reserved `ctx/agent/` boundary while leaving project-local tool materials outside the ADSM baseline.
14
- - Route documentation work toward specialized skills when project-specific context requires narrower expertise.
15
- - Upgrade a context when conventions or template structure change while preserving project-specific content.
@@ -1,62 +0,0 @@
1
- // @ts-check
2
-
3
- /**
4
- * @namespace Fl32_Skill_Adsm_Ctx_Bootstrap_Cli
5
- * @description Parses CLI arguments for the ADSM context lifecycle application.
6
- */
7
-
8
- const usage = [
9
- "Usage: adsm-ctx <command> [target-path]",
10
- "Commands:",
11
- " init [target-path]",
12
- " design [target-path]",
13
- " validate [target-path]",
14
- " upgrade [target-path]",
15
- " install-skill <skills-root>",
16
- " --help",
17
- ].join("\n");
18
-
19
- export default class Cli {
20
- /**
21
- * @param {object} deps
22
- * @param {Fl32_Skill_Adsm_Ctx_Shared_Path} deps.pathService
23
- */
24
- constructor({pathService}) {
25
- /**
26
- * Parses CLI arguments.
27
- *
28
- * @param {object} params
29
- * @param {string[]} params.cliArgs
30
- * @param {string} params.projectRoot
31
- * @returns {{
32
- * command?: string,
33
- * errors: string[],
34
- * helpRequested: boolean,
35
- * targetPath: string,
36
- * usage: string
37
- * }}
38
- */
39
- this.parse = function ({cliArgs = [], projectRoot}) {
40
- const [command, targetArg] = cliArgs;
41
- const errors = [];
42
- const helpRequested = !command || command === "--help" || command === "-h";
43
- const targetPath = targetArg ? pathService.resolve(targetArg) : projectRoot;
44
-
45
- if (!helpRequested) {
46
- const supported = new Set(["init", "design", "validate", "upgrade", "install-skill"]);
47
- if (!supported.has(command)) {
48
- errors.push(`Unknown command: ${command}`);
49
- }
50
- if (command === "install-skill" && !targetArg) {
51
- errors.push("Usage: adsm-ctx install-skill <skills-root>");
52
- }
53
- }
54
-
55
- return {command, errors, helpRequested, targetPath, usage};
56
- };
57
- }
58
- }
59
-
60
- export const __deps__ = Object.freeze({
61
- pathService: "Fl32_Skill_Adsm_Ctx_Shared_Path$",
62
- });