@flancer32/skill-adsm-ctx 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +37 -14
- package/bin/adsm-ctx.mjs +44 -0
- package/package.json +65 -11
- package/skill/SKILL.md +2 -2
- package/skill/references/context-lifecycle.md +3 -3
- package/skill/references/document-projections.md +7 -65
- package/skill/references/documentation-quality-audit.md +22 -14
- package/skill/references/semantic-skins.md +65 -0
- package/skill/templates/work/context/semantic-skin.md +11 -22
- package/src/Cli/Command/Design.mjs +17 -0
- package/src/Cli/Command/Init.mjs +22 -0
- package/src/Cli/Command/InstallSkill.mjs +18 -0
- package/src/Cli/Command/Upgrade.mjs +19 -0
- package/src/Cli/Command/Validate.mjs +19 -0
- package/src/Shared/Constants.mjs +0 -4
- package/src/Validate/Service.mjs +14 -178
- package/types.d.ts +5 -2
- package/.github/workflows/flows-app.yaml +0 -95
- package/AGENTS.md +0 -112
- package/bin/cli.mjs +0 -55
- package/ctx/AGENTS.md +0 -44
- package/ctx/README.md +0 -24
- package/ctx/adsm.json +0 -5
- package/ctx/agent/AGENTS.md +0 -41
- package/ctx/agent/flows/.img/flancer32-skill-adsm-ctx-github-flows.png +0 -0
- package/ctx/agent/flows/AGENTS.md +0 -37
- package/ctx/agent/flows/cfg/issues/labeled/accepted/profile.json +0 -25
- package/ctx/agent/flows/cfg/issues/labeled/accepted/prompt.md +0 -104
- package/ctx/agent/flows/cfg/issues/labeled/clarification-provided/profile.json +0 -15
- package/ctx/agent/flows/cfg/issues/labeled/clarification-provided/prompt.md +0 -63
- package/ctx/agent/flows/cfg/issues/opened/admission/profile.json +0 -14
- package/ctx/agent/flows/cfg/issues/opened/admission/prompt.md +0 -110
- package/ctx/agent/flows/cfg/profile.json +0 -40
- package/ctx/agent/flows/cfg/pull_request/closed/merged/profile.json +0 -15
- package/ctx/agent/flows/cfg/pull_request/closed/merged/prompt.md +0 -41
- package/ctx/agent/flows/cfg/pull_request/labeled/needs-fix/profile.json +0 -25
- package/ctx/agent/flows/cfg/pull_request/labeled/needs-fix/prompt.md +0 -79
- package/ctx/agent/flows/cfg/pull_request/labeled/ready-for-validation/profile.json +0 -15
- package/ctx/agent/flows/cfg/pull_request/labeled/ready-for-validation/prompt.md +0 -72
- package/ctx/agent/flows/cfg/pull_request/labeled/verified/profile.json +0 -15
- package/ctx/agent/flows/cfg/pull_request/labeled/verified/prompt.md +0 -48
- package/ctx/agent/flows/deployment.md +0 -116
- package/ctx/agent/flows/labels.md +0 -108
- package/ctx/agent/flows/overview.md +0 -82
- package/ctx/agent/prompt/cli/ai-intro.md +0 -141
- package/ctx/assets/.gitkeep +0 -1
- package/ctx/docs/AGENTS.md +0 -121
- package/ctx/docs/ai-intro.md +0 -37
- package/ctx/docs/architecture/AGENTS.md +0 -98
- package/ctx/docs/architecture/behavior.md +0 -68
- package/ctx/docs/architecture/checklists.md +0 -48
- package/ctx/docs/architecture/constraints.md +0 -53
- package/ctx/docs/architecture/constraints.skin.en.md +0 -38
- package/ctx/docs/architecture/decisions.md +0 -118
- package/ctx/docs/architecture/integration.md +0 -31
- package/ctx/docs/architecture/overview.md +0 -76
- package/ctx/docs/architecture/state.md +0 -50
- package/ctx/docs/architecture/structure.md +0 -38
- package/ctx/docs/architecture/supervision.md +0 -71
- package/ctx/docs/code/AGENTS.md +0 -51
- package/ctx/docs/code/overview.md +0 -53
- package/ctx/docs/code/testing.md +0 -26
- package/ctx/docs/environment/AGENTS.md +0 -50
- package/ctx/docs/environment/overview.md +0 -33
- package/ctx/docs/filesystem.md +0 -44
- package/ctx/docs/product/AGENTS.md +0 -51
- package/ctx/docs/product/domain.md +0 -63
- package/ctx/docs/product/domain.skin.en.md +0 -40
- package/ctx/docs/product/glossary.md +0 -31
- package/ctx/docs/product/overview.md +0 -112
- package/ctx/docs/product/overview.skin.en.md +0 -38
- package/ctx/docs/product/roles.md +0 -17
- package/ctx/docs/product/use-cases.md +0 -15
- package/src/Bootstrap/Cli.mjs +0 -62
- package/src/Bootstrap.mjs +0 -108
- package/test/integration/.gitkeep +0 -1
- package/test/integration/cli-help.test.mjs +0 -15
- package/test/integration/cli-init-validate.test.mjs +0 -223
- package/test/integration/cli-install-skill.test.mjs +0 -41
- package/test/unit/Bootstrap/Cli.test.mjs +0 -23
- package/test/unit/Bootstrap.test.mjs +0 -53
- package/test/unit/Design/Service.test.mjs +0 -11
- package/test/unit/Init/Service.test.mjs +0 -51
- package/test/unit/Shared/Constants.test.mjs +0 -21
- package/test/unit/Shared/CopyDirectory.test.mjs +0 -31
- package/test/unit/Shared/Metadata.test.mjs +0 -9
- package/test/unit/Shared/Path.test.mjs +0 -11
- package/test/unit/Skill/Installer.test.mjs +0 -20
- package/test/unit/Upgrade/Service.test.mjs +0 -13
- package/test/unit/Validate/Service.test.mjs +0 -760
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# Architecture Supervision
|
|
2
|
-
|
|
3
|
-
- Path: `ctx/docs/architecture/supervision.md`
|
|
4
|
-
- Changed: `20260813`
|
|
5
|
-
|
|
6
|
-
## Purpose
|
|
7
|
-
|
|
8
|
-
Defines how one human and many agents supervise architecture-level consistency.
|
|
9
|
-
|
|
10
|
-
## Human-Agent Supervision Principle
|
|
11
|
-
|
|
12
|
-
Humans own architectural direction and guardrails.
|
|
13
|
-
|
|
14
|
-
Agents operate within documented architectural boundaries and perform the default operating work.
|
|
15
|
-
|
|
16
|
-
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.
|
|
17
|
-
|
|
18
|
-
Agents must surface architectural drift instead of silently resolving it.
|
|
19
|
-
|
|
20
|
-
Major architectural boundary changes require human approval.
|
|
21
|
-
|
|
22
|
-
## Human Responsibilities
|
|
23
|
-
|
|
24
|
-
- own architectural direction and guardrails;
|
|
25
|
-
- read semantic skins and relevant control documents frequently enough to detect drift early;
|
|
26
|
-
- approve new boundaries, persistent state, and integrations;
|
|
27
|
-
- resolve contradictions that architecture cannot settle from existing product knowledge.
|
|
28
|
-
|
|
29
|
-
## Agent Responsibilities
|
|
30
|
-
|
|
31
|
-
- refine architecture documents within existing boundaries;
|
|
32
|
-
- prefer documentation updates before code when new architectural concepts appear;
|
|
33
|
-
- detect and report architectural drift;
|
|
34
|
-
- audit documentation corpora against declared ADSM documentation quality criteria when requested;
|
|
35
|
-
- compress documentation corpora only when accepted meaning, authority homes, and scope boundaries are clear;
|
|
36
|
-
- keep template-level workflow guidance separate from project-level workflow meaning;
|
|
37
|
-
- check product and architecture documents before code-oriented work.
|
|
38
|
-
|
|
39
|
-
## Mandatory Approval Cases
|
|
40
|
-
|
|
41
|
-
Human approval is required for:
|
|
42
|
-
|
|
43
|
-
- new architectural owners;
|
|
44
|
-
- new persistent state;
|
|
45
|
-
- new external integrations;
|
|
46
|
-
- new trust boundaries;
|
|
47
|
-
- new major system areas;
|
|
48
|
-
- changes that resolve documentation quality findings by adding product meaning, architecture boundaries, or authority rules absent from existing context.
|
|
49
|
-
- compression changes that require choosing between contradictory meanings or deleting unclear project-specific knowledge.
|
|
50
|
-
|
|
51
|
-
## Drift Signals
|
|
52
|
-
|
|
53
|
-
Architectural drift is present when:
|
|
54
|
-
|
|
55
|
-
- implementation introduces concepts absent from product or architecture documentation;
|
|
56
|
-
- architecture contradicts product roles, use cases, or domain entities;
|
|
57
|
-
- template-level workflow guidance is applied as if it overruled project-defined workflow semantics;
|
|
58
|
-
- documentation quality audit findings identify unresolved contradiction, missing upstream meaning, or duplicated authority across context documents;
|
|
59
|
-
- documentation compression removes, weakens, or generalizes accepted project-specific meaning;
|
|
60
|
-
- an agent document contradicts its matching semantic skin;
|
|
61
|
-
- new durable state appears without declared ownership;
|
|
62
|
-
- new integrations or boundaries appear only in code or environment artifacts.
|
|
63
|
-
|
|
64
|
-
## Pre-Code Check Order
|
|
65
|
-
|
|
66
|
-
Before code-oriented work, agents should check:
|
|
67
|
-
|
|
68
|
-
1. `ctx/docs/product/overview.md` and related product documents for meaning and scope;
|
|
69
|
-
2. matching `*.skin.<lang>.md` files where they exist;
|
|
70
|
-
3. `ctx/docs/architecture/*.md` and nested architecture documents for structure, behavior, state, integrations, constraints, decisions, and supervision;
|
|
71
|
-
4. downstream environment and code documents for realization rules.
|
package/ctx/docs/code/AGENTS.md
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# Code Documentation
|
|
2
|
-
|
|
3
|
-
- Path: `ctx/docs/code/AGENTS.md`
|
|
4
|
-
- Changed: `20260708`
|
|
5
|
-
|
|
6
|
-
## Purpose
|
|
7
|
-
|
|
8
|
-
Defines the code documentation level.
|
|
9
|
-
|
|
10
|
-
Documents at this level translate architecture intent into source-level engineering invariants: what counts as product code, how architecture is expressed in implementation, and how code is tested.
|
|
11
|
-
|
|
12
|
-
## Level Map
|
|
13
|
-
|
|
14
|
-
- `AGENTS.md` — level definition for `ctx/docs/code/`.
|
|
15
|
-
- `overview.md` — product code boundary, code responsibilities, and code invariants.
|
|
16
|
-
- `testing.md` — test boundary, required coverage areas, and testing conventions.
|
|
17
|
-
|
|
18
|
-
## Level Boundary
|
|
19
|
-
|
|
20
|
-
Defines:
|
|
21
|
-
|
|
22
|
-
- Product code boundary — what files and directories constitute executable or consumable product artifacts.
|
|
23
|
-
- Code invariants — rules that govern how architecture is expressed in implementation.
|
|
24
|
-
- Testing conventions — test structure, coverage expectations, and verification scope.
|
|
25
|
-
|
|
26
|
-
Does NOT define:
|
|
27
|
-
|
|
28
|
-
- Product meaning, domain entities, or use-case outcomes.
|
|
29
|
-
- Architecture ownership, system boundaries, or integration contracts.
|
|
30
|
-
- Deployment topology, runtime environment, or operational runbooks.
|
|
31
|
-
|
|
32
|
-
## Relationship To Upstream Levels
|
|
33
|
-
|
|
34
|
-
Code depends on architecture and environment documentation.
|
|
35
|
-
|
|
36
|
-
The dependency order is:
|
|
37
|
-
|
|
38
|
-
```text
|
|
39
|
-
product
|
|
40
|
-
→ architecture
|
|
41
|
-
→ environment
|
|
42
|
-
→ code
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Code may refine realization details but must not redefine architecture structure, introduce new persistent state, create new external integrations, or bypass documented constraints.
|
|
46
|
-
|
|
47
|
-
Code invariants must remain consistent with architecture decisions and environment assumptions.
|
|
48
|
-
|
|
49
|
-
## Local Rules
|
|
50
|
-
|
|
51
|
-
- Preserve nested code subdirectories when they improve maintainability.
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# Code Overview
|
|
2
|
-
|
|
3
|
-
- Path: `ctx/docs/code/overview.md`
|
|
4
|
-
- Changed: `20260715`
|
|
5
|
-
|
|
6
|
-
## Purpose
|
|
7
|
-
|
|
8
|
-
Defines what counts as product code in this repository.
|
|
9
|
-
|
|
10
|
-
## Product Code Boundary
|
|
11
|
-
|
|
12
|
-
Product code includes both executable JavaScript and agent-consumed documentation artifacts.
|
|
13
|
-
|
|
14
|
-
Product code includes:
|
|
15
|
-
|
|
16
|
-
- `bin/` as the CLI entry points;
|
|
17
|
-
- `src/` as lifecycle implementation modules;
|
|
18
|
-
- `skill/SKILL.md` as the operational skill artifact;
|
|
19
|
-
- `skill/references/` as supporting guidance consumed by agents;
|
|
20
|
-
- `skill/templates/ctx/` as reusable initialization assets;
|
|
21
|
-
- `skill/templates/work/` as working templates for agent-produced operational outputs.
|
|
22
|
-
|
|
23
|
-
## Code Responsibilities
|
|
24
|
-
|
|
25
|
-
- `bin/` exposes the CLI entry surface only.
|
|
26
|
-
- `src/` implements CLI-backed lifecycle behavior, filesystem operations, deterministic documentation lint for `ctx/docs/**`, and upgrade logic.
|
|
27
|
-
- `skill/` defines the installable agent payload that must be copied as a coherent bundle.
|
|
28
|
-
|
|
29
|
-
## Service Control Files
|
|
30
|
-
|
|
31
|
-
`AGENTS.md` files are service control files consumed by agents during project work.
|
|
32
|
-
|
|
33
|
-
They are not the originating specification for their own format or hierarchy.
|
|
34
|
-
|
|
35
|
-
Local directory rules are described in the corresponding `AGENTS.md` file for each directory.
|
|
36
|
-
|
|
37
|
-
The skill and code consume and operationalize those local routing instructions directly from the applicable `AGENTS.md` hierarchy.
|
|
38
|
-
|
|
39
|
-
For this product, implementation-level handling of `AGENTS.md` must preserve these rules:
|
|
40
|
-
|
|
41
|
-
- `AGENTS.md` files are interpreted as operational instructions within already-declared product and architecture boundaries;
|
|
42
|
-
- hierarchy resolution is derived from repository structure and upstream documentation rules, not invented ad hoc by the skill;
|
|
43
|
-
- when a context-side `AGENTS.md` uses `Level Boundary`, that section is shaped as a compact guardrail rather than an exhaustive specification;
|
|
44
|
-
- validation logic may check `AGENTS.md` structure and placement, but must treat `ctx/docs` as the authoritative source of those requirements.
|
|
45
|
-
- validation logic may apply deterministic checks to semantic skins, but it must not impose a rigid template on ordinary agent documents.
|
|
46
|
-
|
|
47
|
-
## Code Invariants
|
|
48
|
-
|
|
49
|
-
- `install-skill` installs the current contents of `skill/` into the target skills root as one payload.
|
|
50
|
-
- Repository self-context under `ctx/` and reusable starter context under `skill/templates/ctx/` are separate artifacts and must not be treated as interchangeable.
|
|
51
|
-
- Lifecycle commands must prefer declared context and template state over inferred project-specific assumptions.
|
|
52
|
-
- Deterministic validation may reject structural documentation defects, including undocumented documentation-level capacity exceptions, and assess semantic skins from the content of `Purpose`, `Mental Model`, `Scope`, and `Invariants` only: warn above 160 Unicode-aware words or 10 meaningful list items, and fail above 220 words or 14 items. Semantic document quality remains outside CLI validation.
|
|
53
|
-
- Code changes that expand durable state, external integrations, or architectural boundaries require prior documentation updates.
|
package/ctx/docs/code/testing.md
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# Testing Overview
|
|
2
|
-
|
|
3
|
-
- Path: `ctx/docs/code/testing.md`
|
|
4
|
-
- Changed: `20260715`
|
|
5
|
-
|
|
6
|
-
## Purpose
|
|
7
|
-
|
|
8
|
-
Defines the test boundary for this repository.
|
|
9
|
-
|
|
10
|
-
## Test Boundary
|
|
11
|
-
|
|
12
|
-
- `test/unit/` contains targeted isolated coverage for selected modules and helpers; it does not yet mirror `src/`.
|
|
13
|
-
- `test/integration/` verifies composed runtime behavior through CLI scenarios and observable lifecycle invariants.
|
|
14
|
-
|
|
15
|
-
## Current Coverage
|
|
16
|
-
|
|
17
|
-
- Unit coverage currently exists for bootstrap-level behavior.
|
|
18
|
-
- Unit coverage now also exercises deterministic validation logic for document metadata, agent/skin pairs, skin structure checks, `Scope` block checks, local markdown link checks, Unicode-aware semantic skin compactness thresholds, and documentation-level capacity exceptions.
|
|
19
|
-
- Integration coverage currently exercises end-to-end CLI behavior for `init`, `validate`, and `install-skill`.
|
|
20
|
-
- Installation-oriented tests verify observable installed payload structure rather than only internal helper calls.
|
|
21
|
-
|
|
22
|
-
## Coverage Intent
|
|
23
|
-
|
|
24
|
-
- Unit tests should cover lifecycle services, shared helpers, CLI parsing, and skill-installation wiring in isolation.
|
|
25
|
-
- Validation tests should distinguish blocking structural errors from non-blocking heuristic warnings.
|
|
26
|
-
- Tests that exercise `AGENTS.md` handling should verify that validation and initialization follow requirements declared in `ctx/docs` rather than treating `AGENTS.md` as the source of its own specification.
|
|
@@ -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.
|
package/ctx/docs/filesystem.md
DELETED
|
@@ -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.
|