@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.
Files changed (91) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +37 -14
  3. package/bin/adsm-ctx.mjs +44 -0
  4. package/package.json +65 -11
  5. package/skill/SKILL.md +2 -2
  6. package/skill/references/context-lifecycle.md +3 -3
  7. package/skill/references/document-projections.md +7 -65
  8. package/skill/references/documentation-quality-audit.md +22 -14
  9. package/skill/references/semantic-skins.md +65 -0
  10. package/skill/templates/work/context/semantic-skin.md +11 -22
  11. package/src/Cli/Command/Design.mjs +17 -0
  12. package/src/Cli/Command/Init.mjs +22 -0
  13. package/src/Cli/Command/InstallSkill.mjs +18 -0
  14. package/src/Cli/Command/Upgrade.mjs +19 -0
  15. package/src/Cli/Command/Validate.mjs +19 -0
  16. package/src/Shared/Constants.mjs +0 -4
  17. package/src/Validate/Service.mjs +14 -178
  18. package/types.d.ts +5 -2
  19. package/.github/workflows/flows-app.yaml +0 -95
  20. package/AGENTS.md +0 -112
  21. package/bin/cli.mjs +0 -55
  22. package/ctx/AGENTS.md +0 -44
  23. package/ctx/README.md +0 -24
  24. package/ctx/adsm.json +0 -5
  25. package/ctx/agent/AGENTS.md +0 -41
  26. package/ctx/agent/flows/.img/flancer32-skill-adsm-ctx-github-flows.png +0 -0
  27. package/ctx/agent/flows/AGENTS.md +0 -37
  28. package/ctx/agent/flows/cfg/issues/labeled/accepted/profile.json +0 -25
  29. package/ctx/agent/flows/cfg/issues/labeled/accepted/prompt.md +0 -104
  30. package/ctx/agent/flows/cfg/issues/labeled/clarification-provided/profile.json +0 -15
  31. package/ctx/agent/flows/cfg/issues/labeled/clarification-provided/prompt.md +0 -63
  32. package/ctx/agent/flows/cfg/issues/opened/admission/profile.json +0 -14
  33. package/ctx/agent/flows/cfg/issues/opened/admission/prompt.md +0 -110
  34. package/ctx/agent/flows/cfg/profile.json +0 -40
  35. package/ctx/agent/flows/cfg/pull_request/closed/merged/profile.json +0 -15
  36. package/ctx/agent/flows/cfg/pull_request/closed/merged/prompt.md +0 -41
  37. package/ctx/agent/flows/cfg/pull_request/labeled/needs-fix/profile.json +0 -25
  38. package/ctx/agent/flows/cfg/pull_request/labeled/needs-fix/prompt.md +0 -79
  39. package/ctx/agent/flows/cfg/pull_request/labeled/ready-for-validation/profile.json +0 -15
  40. package/ctx/agent/flows/cfg/pull_request/labeled/ready-for-validation/prompt.md +0 -72
  41. package/ctx/agent/flows/cfg/pull_request/labeled/verified/profile.json +0 -15
  42. package/ctx/agent/flows/cfg/pull_request/labeled/verified/prompt.md +0 -48
  43. package/ctx/agent/flows/deployment.md +0 -116
  44. package/ctx/agent/flows/labels.md +0 -108
  45. package/ctx/agent/flows/overview.md +0 -82
  46. package/ctx/agent/prompt/cli/ai-intro.md +0 -141
  47. package/ctx/assets/.gitkeep +0 -1
  48. package/ctx/docs/AGENTS.md +0 -121
  49. package/ctx/docs/ai-intro.md +0 -37
  50. package/ctx/docs/architecture/AGENTS.md +0 -98
  51. package/ctx/docs/architecture/behavior.md +0 -68
  52. package/ctx/docs/architecture/checklists.md +0 -48
  53. package/ctx/docs/architecture/constraints.md +0 -53
  54. package/ctx/docs/architecture/constraints.skin.en.md +0 -38
  55. package/ctx/docs/architecture/decisions.md +0 -118
  56. package/ctx/docs/architecture/integration.md +0 -31
  57. package/ctx/docs/architecture/overview.md +0 -76
  58. package/ctx/docs/architecture/state.md +0 -50
  59. package/ctx/docs/architecture/structure.md +0 -38
  60. package/ctx/docs/architecture/supervision.md +0 -71
  61. package/ctx/docs/code/AGENTS.md +0 -51
  62. package/ctx/docs/code/overview.md +0 -53
  63. package/ctx/docs/code/testing.md +0 -26
  64. package/ctx/docs/environment/AGENTS.md +0 -50
  65. package/ctx/docs/environment/overview.md +0 -33
  66. package/ctx/docs/filesystem.md +0 -44
  67. package/ctx/docs/product/AGENTS.md +0 -51
  68. package/ctx/docs/product/domain.md +0 -63
  69. package/ctx/docs/product/domain.skin.en.md +0 -40
  70. package/ctx/docs/product/glossary.md +0 -31
  71. package/ctx/docs/product/overview.md +0 -112
  72. package/ctx/docs/product/overview.skin.en.md +0 -38
  73. package/ctx/docs/product/roles.md +0 -17
  74. package/ctx/docs/product/use-cases.md +0 -15
  75. package/src/Bootstrap/Cli.mjs +0 -62
  76. package/src/Bootstrap.mjs +0 -108
  77. package/test/integration/.gitkeep +0 -1
  78. package/test/integration/cli-help.test.mjs +0 -15
  79. package/test/integration/cli-init-validate.test.mjs +0 -223
  80. package/test/integration/cli-install-skill.test.mjs +0 -41
  81. package/test/unit/Bootstrap/Cli.test.mjs +0 -23
  82. package/test/unit/Bootstrap.test.mjs +0 -53
  83. package/test/unit/Design/Service.test.mjs +0 -11
  84. package/test/unit/Init/Service.test.mjs +0 -51
  85. package/test/unit/Shared/Constants.test.mjs +0 -21
  86. package/test/unit/Shared/CopyDirectory.test.mjs +0 -31
  87. package/test/unit/Shared/Metadata.test.mjs +0 -9
  88. package/test/unit/Shared/Path.test.mjs +0 -11
  89. package/test/unit/Skill/Installer.test.mjs +0 -20
  90. package/test/unit/Upgrade/Service.test.mjs +0 -13
  91. package/test/unit/Validate/Service.test.mjs +0 -760
@@ -1,37 +0,0 @@
1
- # AI Introduction
2
-
3
- - Path: `ctx/docs/ai-intro.md`
4
- - Changed: `20260702`
5
-
6
- ## Purpose
7
-
8
- Introduces this repository to an AI agent as a skill product whose responsibility is managing ADSM project cognitive context lifecycle.
9
-
10
- ## Repository Identity
11
-
12
- This repository provides a generic orchestration skill for ADSM context lifecycle work.
13
-
14
- It helps initialize, design, validate, audit, compress, and upgrade project cognitive context.
15
-
16
- ## Project Boundary
17
-
18
- This repository does not define the business or architecture of an external product.
19
-
20
- Its product is the skill package itself:
21
-
22
- - CLI tooling in `bin/` and `src/`
23
- - skill payload in `skill/`
24
- - reusable context templates in `skill/templates/ctx/`
25
- - working skill templates in `skill/templates/work/`
26
- - repository cognitive context in `ctx/`
27
-
28
- Documentation quality audit and documentation compression are agent-guided skill capabilities, not CLI commands.
29
-
30
- Do not treat `ctx/agent/` as part of the ADSM methodology baseline beyond its boundary file `skill/templates/ctx/agent/AGENTS.md`.
31
-
32
- ## Reading Order
33
-
34
- 1. Read `ctx/docs/filesystem.md` for repository boundaries.
35
- 2. Read `ctx/docs/product/overview.md` for product meaning and scope.
36
- 3. Read `ctx/docs/code/overview.md` for product-code boundaries.
37
- 4. Read `skill/SKILL.md` when working as an agent using the packaged skill.
@@ -1,98 +0,0 @@
1
- # Architecture Documentation
2
-
3
- - Path: `ctx/docs/architecture/AGENTS.md`
4
- - Changed: `20260715`
5
-
6
- ## Purpose
7
-
8
- Defines the architecture documentation level.
9
-
10
- Documents at this level translate product intent into stable engineering structure, behavior, state ownership, integration boundaries, architectural constraints, durable decisions, and supervision rules.
11
-
12
- ## Level Map
13
-
14
- - `AGENTS.md` — level definition for `ctx/docs/architecture/`.
15
- - `behavior.md` — major internal lifecycle flows and architectural processing behavior.
16
- - `checklists.md` — supervision and diagnosis checklists for reviewing agent behavior against architecture expectations.
17
- - `constraints.md` — non-negotiable architectural restrictions and trust boundaries.
18
- - `decisions.md` — durable architecture decisions, rejected alternatives, and reasoning.
19
- - `integration.md` — external integrations and major internal contracts between architectural areas.
20
- - `overview.md` — architectural style, major areas, and architecture-level orientation.
21
- - `state.md` — state ownership, sources of truth, derived state, and state-changing authority.
22
- - `structure.md` — major architectural blocks, runtime areas, and responsibility boundaries.
23
- - `supervision.md` — human-agent supervision rules, approval boundaries, and drift signals.
24
-
25
- ## Architecture Knowledge Model
26
-
27
- Architecture knowledge is organized as one coordinated model rather than a set of isolated notes.
28
-
29
- Each document answers a different architectural question, and the set is intended to be read together:
30
-
31
- - `structure.md` — what is structurally built.
32
- - `behavior.md` — how the system behaves internally.
33
- - `checklists.md` — how a human quickly checks whether agent work remained inside architecture guardrails.
34
- - `state.md` — where authoritative state is owned, changed, and derived.
35
- - `integration.md` — what integrations and internal contracts exist.
36
- - `constraints.md` — what must not be violated.
37
- - `decisions.md` — why durable architectural choices were made.
38
- - `supervision.md` — how human and agents govern architectural consistency.
39
- - `overview.md` — architecture-level orientation.
40
-
41
- If an agent document grows too large to maintain, move operational detail into a natural architecture subdocument or nested subdirectory.
42
-
43
- ## Local Rules
44
-
45
- - Preserve nested architecture subdirectories when they improve maintainability.
46
-
47
- ## Level Boundary
48
-
49
- Defines:
50
-
51
- - Major architectural areas, system boundaries, and integration surfaces.
52
- - Internal behavior, state ownership, and authority distribution.
53
- - Durable architectural constraints, decisions, and supervision rules.
54
-
55
- Does NOT define:
56
-
57
- - Product meaning such as roles, domain entities, or use-case outcomes.
58
- - Deployment procedures, operational workflow routing, or environment-specific runbooks.
59
- - Source-level implementation details such as files, classes, tables, DTOs, or endpoint definitions.
60
-
61
- ## Relationship To Product
62
-
63
- Architecture depends on product documentation and refines it. It is not an independent source of product truth.
64
-
65
- The dependency order is:
66
-
67
- ```text
68
- product
69
- → architecture
70
- → environment
71
- → code
72
- ```
73
-
74
- Product documentation defines what the product is.
75
-
76
- Architecture documentation defines how that product is realized structurally.
77
-
78
- Architecture may refine product intent into engineering structure, but must not redefine:
79
-
80
- - what the product is;
81
- - who product roles are;
82
- - which domain entities exist;
83
- - which product outcomes matter.
84
-
85
- Architecture may add engineering precision, constraints, and internal mechanisms, but must not add new product meaning.
86
-
87
- Architecture must not invent new product behavior or silently resolve product contradictions.
88
-
89
- If an architectural concept becomes load-bearing for a product capability, invariant, authority boundary, or semantic boundary, that concept must be named in product documentation first.
90
-
91
- When product knowledge is missing or contradictory, architecture documents must expose the gap and escalate it instead of creating implicit meaning.
92
-
93
- ## Authoring Rules
94
-
95
- - Keep agent documents dense, explicit, and maintainable.
96
- - Prefer declarative statements over implementation detail.
97
- - Respect the dependency order during analysis and change planning.
98
- - Do not introduce new architectural owners, new persistent state, new external integrations, or new system boundaries without corresponding document updates and human approval.
@@ -1,68 +0,0 @@
1
- # Architecture Behavior
2
-
3
- - Path: `ctx/docs/architecture/behavior.md`
4
- - Changed: `20260708`
5
-
6
- ## Purpose
7
-
8
- Defines how the skill behaves internally across its major lifecycle flows.
9
-
10
- ## Core Flows
11
-
12
- - `init` creates a baseline cognitive context, writes starter documentation, and establishes metadata for later supervision.
13
- - `design` turns product-level intent into justified context branches, including architecture-level structure when the project needs it, and preserves project-defined workflow semantics when organizing workflow documentation.
14
- - `validate` checks that declared context structure exists and remains mechanically readable by verifying required paths, metadata headers, deterministic agent/skin projection rules, local markdown document links, and lightweight skin-shape heuristics without rewriting project meaning or downgrading project workflow semantics to template placeholders.
15
- - `quality-audit` guides an agent through evidence-backed review of a documentation corpus against ADSM documentation quality criteria, using a reference prompt and a working report template rather than CLI semantic scoring.
16
- - `documentation-compression` guides an agent through controlled rewrite of `ctx/docs/` to reduce redundancy and attention cost while preserving accepted project meaning.
17
- - `upgrade` applies or reports non-destructive migrations while preserving project-specific content.
18
- - `install-skill` installs the current `skill/` payload into a caller-provided skills root; it supports agent availability and is not a context lifecycle mode.
19
-
20
- ## Architectural Processing
21
-
22
- The product operates through a documentation-first loop:
23
-
24
- 1. read declared context and repository state;
25
- 2. determine the applicable lifecycle mode;
26
- 3. apply structure, checks, or migration logic;
27
- 4. report gaps, contradictions, or specialization needs explicitly.
28
-
29
- Documentation quality audit follows the same documentation-first loop, but its output is an audit report rather than direct context mutation.
30
-
31
- `validate` is the deterministic pre-lint stage for `ctx/docs/**`.
32
-
33
- It should be run before semantic audit or compression-oriented review.
34
-
35
- Documentation compression follows the same documentation-first loop, but its output is a semantically conservative rewrite plus a compression report.
36
-
37
- The audit separates:
38
-
39
- - editorial fixes that preserve meaning;
40
- - cross-document consistency fixes;
41
- - upstream documentation gaps;
42
- - human decisions required before documentation can be corrected.
43
-
44
- Compression may apply editorial rewrites directly when authority is clear. It must report non-editorial uncertainty instead of resolving it.
45
-
46
- Validation findings separate:
47
-
48
- - hard structural failures such as missing paired agent documents, missing required skin sections, broken local markdown links, or missing `Includes:` / `Excludes:` blocks;
49
- - heuristic supervision warnings such as skin compactness threshold overrun;
50
- - semantic review concerns that remain outside deterministic validation and therefore belong to documentation quality audit.
51
-
52
- ## Drift Handling
53
-
54
- When a new architectural concept appears, the expected sequence is:
55
-
56
- 1. update product or architecture documentation;
57
- 2. confirm supervision boundaries;
58
- 3. change downstream environment or code artifacts.
59
-
60
- The architecture level must not be bypassed by direct code invention.
61
-
62
- ## Escalation Rules
63
-
64
- - Missing product meaning must be surfaced to the human.
65
- - Documentation quality findings that require product or architecture decisions must be reported as human decision points, not resolved by invention.
66
- - Documentation compression must not invent, weaken, generalize, or silently delete project-specific knowledge.
67
- - Missing specialized skill coverage must be reported as a specialization gap, not treated as a reason to erase or invalidate project-defined workflow semantics.
68
- - Contradictions between templates, repository context, and implementation must be treated as drift.
@@ -1,48 +0,0 @@
1
- # Architecture Checklists
2
-
3
- - Path: `ctx/docs/architecture/checklists.md`
4
- - Changed: `20260813`
5
-
6
- ## Purpose
7
-
8
- Provides short recurring document checklists for supervision, diagnosis, and acceptance of architecture-level agent work.
9
-
10
- This file remains an agent-facing operational context document.
11
-
12
- Human-controlled semantic control belongs in a matching `checklists.skin.en.md` file if such control is needed.
13
-
14
- ## Drift Diagnosis Checklist
15
-
16
- Use this checklist when an agent appears to be working in the wrong architectural direction.
17
-
18
- - Is the agent working inside the documented product and architecture boundaries?
19
- - Does the change stay inside declared architecture boundaries?
20
- - Does the change introduce a new owner, major area, integration, trust boundary, or durable state?
21
- - Does the change depend on product meaning that is not explicitly documented upstream?
22
- - Did the agent treat template guidance as if it overruled project-specific meaning?
23
- - Did the agent choose a direction that `constraints.md` already forbids?
24
-
25
- ## Approval Checklist
26
-
27
- Use this checklist before allowing architecture expansion.
28
-
29
- - Is the proposed expansion named explicitly in product documentation where required?
30
- - Is the new boundary or owner documented in the appropriate architecture file?
31
- - Is the approval need already declared in `constraints.md` or `supervision.md`?
32
- - Does the change increase human supervision burden in a durable way?
33
- - Is the expansion being justified by real product need rather than by agent convenience?
34
-
35
- ## Compression Safety Checklist
36
-
37
- Use this checklist before accepting compression of architecture documents.
38
-
39
- - Does the rewrite preserve the same authoritative meaning?
40
- - Did any precise rule become a vague summary?
41
- - Was any durable decision, exclusion, or boundary removed because it looked repetitive?
42
- - Did the rewrite keep one authoritative home for each load-bearing meaning?
43
- - Can a human still scan the control documents quickly after compression?
44
-
45
- ## Related Documents
46
-
47
- - Read `constraints.md` next for forbidden directions and approval boundaries.
48
- - Read `supervision.md` when the question is about ownership of correction and escalation.
@@ -1,53 +0,0 @@
1
- # Architecture Constraints
2
-
3
- - Path: `ctx/docs/architecture/constraints.md`
4
- - Changed: `20260813`
5
-
6
- ## Purpose
7
-
8
- Defines non-negotiable architectural restrictions for this skill product.
9
-
10
- ## Core Constraints
11
-
12
- - The product remains generic and orchestration-oriented.
13
- - Product knowledge precedes architecture, architecture precedes environment, and environment precedes code.
14
- - New architectural concepts are documented before code-level realization.
15
- - Templates remain project-neutral and must not guess domain-specific implementation.
16
- - The root `AGENTS.md` template must prevent agents from reading, loading, printing, searching for, or exposing secret-bearing project data, including `.env` files; non-secret example templates may describe configuration shape only.
17
- - Template-level workflow constraints must not be reinterpreted as limits on project-defined workflow semantics.
18
- - Validation, quality audit, and upgrade reporting remain non-destructive by default.
19
- - Documentation compression may rewrite `ctx/docs/` for density only when accepted meaning and authority are preserved.
20
- - Architecture agent documents remain dense, explicit, and maintainable.
21
- - Semantic skins remain short enough for frequent supervision and correction in live human-agent dialogue.
22
-
23
- ## Boundary Constraints
24
-
25
- - Architecture must not redefine product roles, product use cases, or product domain entities.
26
- - Architecture must not introduce code structure as if it were architecture structure.
27
- - Architecture must not require project-specific technologies unless the project documentation states them explicitly.
28
- - Architecture must not downgrade project workflow documents to template-neutral content merely because specialized skill support is absent.
29
- - Architecture must not treat the absence of a specialized skill as evidence that project-defined workflow semantics are invalid.
30
- - Architecture must not allow documentation compression to replace precise project rules with vague summaries.
31
- - Architecture must not hide new persistent state, external integrations, or system boundaries behind implementation changes.
32
- - Architecture must not treat a control-oriented agent document as a semantic skin unless a matching `*.skin.<lang>.md` file exists.
33
- - Architecture must not impose a rigid internal tree under `ctx/docs/product/`, `ctx/docs/architecture/`, `ctx/docs/environment/`, or `ctx/docs/code/`.
34
-
35
- ## Change Constraints
36
-
37
- The following changes require corresponding architecture-document updates and explicit human approval:
38
-
39
- - new architectural owners;
40
- - new persistent state;
41
- - new external integrations;
42
- - new trust boundaries;
43
- - new major system areas.
44
-
45
- ## Review Use
46
-
47
- Use this document when the question is:
48
-
49
- - "Which architectural direction was forbidden here?"
50
- - "Did the agent expand the product beyond its declared structural boundary?"
51
- - "Does this change require approval before any implementation or deeper analysis continues?"
52
-
53
- If `constraints.skin.en.md` exists, read it before changing this document.
@@ -1,38 +0,0 @@
1
- # Architecture Constraints Skin
2
-
3
- - Path: `ctx/docs/architecture/constraints.skin.en.md`
4
- - Changed: `20260813`
5
-
6
- ## Purpose
7
-
8
- This skin preserves the non-negotiable architectural restrictions that keep the skill generic, non-destructive, and context-preserving.
9
-
10
- ## Mental Model
11
-
12
- Architecture may refine structure and control surfaces, but it must not expand product meaning or relax supervision-critical restrictions.
13
-
14
- ## Scope
15
-
16
- Includes:
17
-
18
- - non-negotiable architectural restrictions;
19
- - non-destructive reporting expectations;
20
- - preservation of accepted meaning during compression.
21
-
22
- Excludes:
23
-
24
- - detailed code-module layout;
25
- - project-specific workflow semantics;
26
- - implementation-only optimizations.
27
-
28
- ## Invariants
29
-
30
- - The product remains generic, orchestration-oriented, and protects secret-bearing project data from agent exposure.
31
- - Validation, quality audit, and upgrade reporting remain non-destructive by default.
32
- - Documentation compression must preserve accepted meaning and skin-controlled meaning.
33
- - Project-specific workflow semantics must not be downgraded because specialized skill support is absent.
34
- - Control-oriented `*.md` files remain agent documents; semantic control belongs in matching `*.skin.<lang>.md` files when needed.
35
-
36
- ## Agent Document
37
-
38
- `constraints.md`
@@ -1,118 +0,0 @@
1
- # Architecture Decisions
2
-
3
- - Path: `ctx/docs/architecture/decisions.md`
4
- - Changed: `20260813`
5
-
6
- ## Purpose
7
-
8
- Records durable architecture decisions for the skill product.
9
-
10
- ## A1. Generic Orchestration First
11
-
12
- Decision:
13
- The skill stays generic and manages cognitive-context lifecycle rather than project-specific implementation domains.
14
-
15
- Rejected alternative:
16
- Encode browser, backend, deployment, or domain-specific architecture directly into the baseline skill.
17
-
18
- Reasoning:
19
- Project specialization belongs in dedicated skills or project context, not in the generic lifecycle baseline.
20
-
21
- ## A2. Architecture Is A Separate Level
22
-
23
- Decision:
24
- Architecture remains a distinct documentation level between product and environment.
25
-
26
- Rejected alternative:
27
- Fold structural guidance into product documents or jump directly from product documents to code-oriented constraints.
28
-
29
- Reasoning:
30
- The working group needs a stable place for engineering boundaries, state ownership, integrations, and supervision rules.
31
-
32
- ## A3. Live Context And Installed Templates Stay Separate
33
-
34
- Decision:
35
- This repository's own `ctx/` documents the product, while `skill/templates/ctx/` provides reusable starter context for other projects.
36
-
37
- Rejected alternative:
38
- Treat the repository context and the installable template payload as the same artifact.
39
-
40
- Reasoning:
41
- The product needs self-documentation and reusable output, but those artifacts serve different consumers and change for different reasons.
42
-
43
- ## A4. Documentation Precedes Structural Change
44
-
45
- Decision:
46
- New architectural concepts are documented before downstream code or environment changes.
47
-
48
- Rejected alternative:
49
- Allow architecture to emerge only from implementation diffs.
50
-
51
- Reasoning:
52
- ADSM uses documentation as an operational interface; architecture drift must be visible before it is encoded.
53
-
54
- ## A5. Boundary Expansion Requires Human Approval
55
-
56
- Decision:
57
- Agents may refine architecture inside existing guardrails, but expanding owners, persistent state, integrations, or system boundaries requires human approval.
58
-
59
- Rejected alternative:
60
- Permit autonomous architectural expansion when implementation seems straightforward.
61
-
62
- Reasoning:
63
- Those changes alter the supervision burden and must remain under human control.
64
-
65
- ## A6. Documentation Quality Audit Is Agent-Guided
66
-
67
- Decision:
68
- Documentation quality audit is implemented as agent guidance over the declarative project documentation corpus under `ctx/docs/`, not as CLI semantic scoring.
69
-
70
- Rejected alternative:
71
- Encode documentation quality scoring as an automatic CLI validation command over the whole cognitive context.
72
-
73
- Reasoning:
74
- The quality criteria require semantic reading, evidence-backed findings, and separation of editorial issues from missing human decisions. Operational context such as agent workflows, prompts, and runtime configuration may exist under `ctx/`, but it is not part of the default documentation quality corpus.
75
-
76
- ## A7. Documentation Compression Is Controlled Rewrite
77
-
78
- Decision:
79
- Documentation compression is implemented as agent guidance over the declarative project documentation corpus under `ctx/docs/`, not as automatic semantic scoring or broad context rewriting.
80
-
81
- Rejected alternative:
82
- Let compression freely summarize the whole cognitive context or treat operational context as part of the default corpus.
83
-
84
- Reasoning:
85
- Compression changes text directly and therefore needs stronger authority discipline than audit. The default scope remains `ctx/docs/`, and accepted project meaning must be preserved while redundancy and low-density wording are reduced.
86
-
87
- ## A8. Agent/Skin Projection Defines Document Control
88
-
89
- Decision:
90
- Documents under `ctx/docs/**` are agent-facing operational context documents by default, and human semantic control is expressed through optional matching `*.skin.<lang>.md` files.
91
-
92
- Rejected alternative:
93
- Use document metadata markers as the primary semantic-control mechanism.
94
-
95
- Reasoning:
96
- The working model of this product is one human and many agents. Agent-first is the normal operating mode, but human control needs a stronger semantic projection than a metadata marker. A `*.skin.<lang>.md` file provides an explicit control surface for the matching agent document without turning that document into a human-oriented summary.
97
-
98
- ## A9. The Skill Enforces ADSM Discipline
99
-
100
- Decision:
101
- Project documentation templates should focus on governing a project, while ADSM conformance rules are enforced by the skill itself.
102
-
103
- Rejected alternative:
104
- Embed most ADSM discipline directly into project-facing document templates and make project documents explain the methodology to themselves.
105
-
106
- Reasoning:
107
- Project cognitive context should spend attention on product and architecture control, not on repeated methodological self-description. Installed templates should carry only the minimal bootstrap signal that the context follows ADSM and that structural validation belongs to skill `adsm-ctx`. The skill is the correct place for template discipline, audit logic, compression rules, and other ADSM conformance checks.
108
-
109
- ## A10. `AGENTS.md` Is A Control Surface, Not A Spec Origin
110
-
111
- Decision:
112
- `AGENTS.md` files are service control files for agent work. Their own requirements originate in declarative documents under `ctx/docs/`, then are operationalized by the skill.
113
-
114
- Rejected alternative:
115
- Let `AGENTS.md` files define the normative rules for the `AGENTS.md` hierarchy, structure, and authoring format by themselves.
116
-
117
- Reasoning:
118
- Allowing `AGENTS.md` to legislate its own format mixes specification with execution control. The specification layer must stay in `ctx/docs/`; the skill may then detail and validate it; individual `AGENTS.md` files only execute that already-declared model in local project work.
@@ -1,31 +0,0 @@
1
- # Architecture Integration
2
-
3
- - Path: `ctx/docs/architecture/integration.md`
4
- - Changed: `20260707`
5
-
6
- ## Purpose
7
-
8
- Defines the major integration boundaries of the skill product.
9
-
10
- ## External Integrations
11
-
12
- - local project filesystem — target of context initialization, validation, and upgrade work;
13
- - package installation environment — distribution surface for the CLI and reusable templates;
14
- - agent skill host — installation target for the bundled skill payload;
15
- - source-control workflow — durable channel for reviewing and propagating template changes.
16
-
17
- ## Internal Contracts
18
-
19
- - lifecycle operations consume declared repository context before making structure decisions;
20
- - reusable templates provide the baseline artifact set for initialized projects;
21
- - skill installation connects the CLI `install-skill` command, the source `skill/` payload, and the caller-provided skills root;
22
- - documentation quality audit guidance connects the source prompt in `skill/references/documentation-quality-audit.md`, the working report template in `skill/templates/work/report/`, and agent-produced audit reports;
23
- - documentation compression guidance connects the source prompt in `skill/references/documentation-compression.md`, the working report template in `skill/templates/work/report/`, and agent-produced compression reports;
24
- - repository `ctx/` documents the product and governs changes to templates and implementation;
25
- - specialization routing hands project-specific architecture work to dedicated skills when they exist.
26
-
27
- ## Integration Boundaries
28
-
29
- - This document defines contract surfaces, not endpoint schemas or DTOs.
30
- - External integrations must remain explicit in architecture before they appear in implementation.
31
- - New integrations that affect project boundaries require supervision updates and human approval.
@@ -1,76 +0,0 @@
1
- # Architecture Overview
2
-
3
- - Path: `ctx/docs/architecture/overview.md`
4
- - Changed: `20260708`
5
-
6
- ## Purpose
7
-
8
- Defines architecture-level orientation for this skill product.
9
-
10
- ## Architecture Role
11
-
12
- At this level, product intent is translated into stable engineering structure.
13
-
14
- This level answers:
15
-
16
- - what is structurally built;
17
- - how the system behaves internally;
18
- - where state is owned;
19
- - what integrations exist;
20
- - what constraints must not be violated;
21
- - why key architectural decisions were made;
22
- - how human and agents supervise architectural consistency.
23
-
24
- This document answers those questions briefly and identifies the related architecture documents that hold more detail.
25
-
26
- ## Architectural Style
27
-
28
- The product uses a documentation-first lifecycle architecture with separate surfaces for lifecycle execution, guidance, reusable templates, and supervision.
29
-
30
- ## Major Areas
31
-
32
- - lifecycle orchestration for `init`, `design`, `validate`, `quality-audit`, `documentation-compression`, and `upgrade`;
33
- - skill payload installation for agent skill hosts;
34
- - agent-facing audit and compression guidance;
35
- - semantic-skin-ready control surfaces for orientation, constraints, and checklists;
36
- - reusable product-level and architecture-level context templates;
37
- - reserved `ctx/agent/` boundary for project-local materials outside ADSM methodology;
38
- - repository context that governs the package itself;
39
- - migration and validation boundaries that preserve project-specific content;
40
- - specialization routing boundary.
41
-
42
- ## Related Bodies
43
-
44
- - Read `structure.md` when the question is "what are the main architectural areas and boundaries?"
45
- - Read `behavior.md` when the question is "how do those areas work together through major internal flows?"
46
- - Read `checklists.md` when the question is "which fast human checks should I run before concluding that agent work drifted?"
47
- - Read `state.md` when the question is "where is authoritative state owned, persisted, changed, and derived?"
48
- - Read `integration.md` when the question is "which external systems and internal contract boundaries matter?"
49
- - Read `constraints.md` when the question is "which architectural options are forbidden or non-negotiable?"
50
- - Read `decisions.md` when the question is "why was this architecture chosen over other durable alternatives?"
51
- - Read `supervision.md` when the question is "what may agents change, what requires approval, and what signals drift?"
52
-
53
- ## Product Dependency
54
-
55
- This level depends on product documentation.
56
-
57
- Product documentation defines what this skill is and what it is responsible for.
58
-
59
- Architecture defines how that product intent is realized structurally.
60
-
61
- The expected dependency is:
62
-
63
- ```text
64
- product
65
- → architecture
66
- → environment
67
- → code
68
- ```
69
-
70
- Architecture must not redefine product meaning, invent missing product behavior, or normalize product contradictions silently.
71
-
72
- ## Human-Agent Use
73
-
74
- The architecture level is an operational interface between one human and many agents.
75
-
76
- The human owns direction and guardrails. Agents may refine architecture within those guardrails and must report drift instead of deciding past the declared boundary.
@@ -1,50 +0,0 @@
1
- # Architecture State
2
-
3
- - Path: `ctx/docs/architecture/state.md`
4
- - Changed: `20260707`
5
-
6
- ## Purpose
7
-
8
- Defines state ownership and sources of truth for the skill product.
9
-
10
- ## Sources Of Truth
11
-
12
- - `ctx/` is the declarative source of truth for this repository as a product.
13
- - `skill/` is the source of truth for the installed agent skill payload.
14
- - `skill/templates/ctx/` is the source of truth for installed starter context artifacts and their minimal ADSM bootstrap markers.
15
- - `skill/templates/work/` is the source of truth for working templates used by agents during skill operations.
16
- - `ctx/adsm.json` is the durable metadata source for context versioning and upgrade eligibility.
17
-
18
- ## State Categories
19
-
20
- - authoritative durable state — versioned context documents, templates, metadata, and repository content that define the product and its reusable baseline;
21
- - derived state — installed copies, validation findings, and generated reports that are produced from authoritative durable state;
22
- - transient state — process-local execution data used during a command or agent run.
23
-
24
- ## Ownership Boundaries
25
-
26
- - `ctx/` owns the declared meaning and architectural rules of this repository as a product.
27
- - `skill/` owns the installable agent-consumed skill payload.
28
- - `skill/templates/ctx/` owns the reusable baseline to be installed into downstream projects, including the minimal markers that route structural validation back to the skill.
29
- - `skill/templates/work/` owns reusable working output structures that are not installed into project `ctx/` by default.
30
- - `ctx/adsm.json` owns durable context-version metadata and upgrade eligibility.
31
-
32
- Derived and transient state may reflect those sources, but they do not replace them as sources of truth.
33
-
34
- ## Ownership Rules
35
-
36
- - The human owns product direction, architectural guardrails, and approval for boundary expansion.
37
- - Agents may refine durable documentation within existing boundaries.
38
- - Agents must not create new persistent state categories or new state owners without updating architecture documents and obtaining human approval.
39
-
40
- ## State Authority
41
-
42
- - Authoritative state may be changed only through deliberate repository updates under the declared supervision model.
43
- - Derived state may be regenerated, but must stay traceable to an authoritative source.
44
- - Persistence responsibility must stay explicit whenever durable state is introduced or reorganized.
45
-
46
- ## State Change Discipline
47
-
48
- - Product documents establish meaning.
49
- - Architecture documents establish ownership and authority.
50
- - Environment and code documents may refine realization details without taking ownership away from architecture.
@@ -1,38 +0,0 @@
1
- # Architecture Structure
2
-
3
- - Path: `ctx/docs/architecture/structure.md`
4
- - Changed: `20260707`
5
-
6
- ## Purpose
7
-
8
- Defines the major architectural blocks and responsibility boundaries of the skill product.
9
-
10
- ## Architectural Blocks
11
-
12
- - lifecycle orchestration surface — exposes the `init`, `design`, `validate`, `quality-audit`, `documentation-compression`, and `upgrade` capabilities as the main system behavior boundary;
13
- - skill payload installation surface — copies the current `skill/` bundle into a caller-provided skills root as the `adsm-ctx` payload;
14
- - `AGENTS.md` control surface — provides the service-control hierarchy used by agents during project work, while remaining subordinate to the declarative specifications in `ctx/docs/`;
15
- - reusable template bundle — provides starter `ctx/` artifacts for downstream projects, including product and architecture documentation templates with only minimal ADSM bootstrap markers;
16
- - documentation quality audit guidance boundary — provides the agent-facing audit prompt and working report template for evaluating documentation corpora without adding CLI-based semantic scoring;
17
- - documentation compression guidance boundary — provides the agent-facing rewrite prompt and working report template for reducing `ctx/docs/` corpus size without changing accepted project meaning;
18
- - `ctx/agent/` boundary definition — provides only the reserved branch boundary file for project-local materials that sit outside ADSM methodology;
19
- - repository self-documentation — keeps the skill product governed by its own cognitive context;
20
- - migration and validation boundary — checks structural conformance and applies safe convention upgrades;
21
- - specialization routing boundary — identifies when project-specific skills must take over narrower documentation branches.
22
-
23
- ## Responsibility Boundaries
24
-
25
- - Product documentation defines the meaning and scope of the skill.
26
- - Architecture defines stable engineering areas and their contracts.
27
- - `AGENTS.md` files carry operational control inside those declared boundaries but do not define the boundaries on their own.
28
- - Environment defines runtime prerequisites.
29
- - Code defines implementation of the declared structure.
30
-
31
- ## Structural Exclusions
32
-
33
- This document does not list:
34
-
35
- - source files or directories as architecture blocks;
36
- - classes, functions, or modules;
37
- - database tables or DTOs;
38
- - endpoint-level API details.