diff --git a/.changeset/calm-tools-explain.md b/.changeset/calm-tools-explain.md new file mode 100644 index 00000000..5ba29309 --- /dev/null +++ b/.changeset/calm-tools-explain.md @@ -0,0 +1,5 @@ +--- +"@perfect-abstractions/compose-cli": patch +--- + +Clarify CLI adapter and adapter test organization in the contributor documentation. diff --git a/website/docs/contribution/cli/code-style-guide.mdx b/website/docs/contribution/cli/code-style-guide.mdx index f5eb6334..594fe2eb 100644 --- a/website/docs/contribution/cli/code-style-guide.mdx +++ b/website/docs/contribution/cli/code-style-guide.mdx @@ -194,6 +194,7 @@ Use an adapter when a module needs to call an external tool, framework, library, - A pipeline should resolve adapter dependencies explicitly and pass them into the module. - Feature logic and validation should be handled in modules. - External communication and library-specific details should be handled in adapters. +- Organize adapters by interface. Keep the interface and every implementation of that contract in the same `I/` directory. - For stable dependencies that are unlikely to change often, such as basic CLI parsing or filesystem access, a module helper, module, or util may be more practical than adding an adapter. Example: diff --git a/website/docs/contribution/cli/testing.mdx b/website/docs/contribution/cli/testing.mdx index c6b9c415..dc2bb87a 100644 --- a/website/docs/contribution/cli/testing.mdx +++ b/website/docs/contribution/cli/testing.mdx @@ -13,7 +13,7 @@ Tests follow the same boundaries as the implementation: module behavior is teste ## Test Structure -The `cli/test` directory mirrors `cli/src`. Keep each feature's test, harness, and fixtures together. +The `cli/test` directory mirrors `cli/src`. Keep each feature's test, harness, and fixtures together. Organize adapter tests by interface, with the tests, harnesses, and fixtures for a contract under the same `I/` directory. ```text cli/test/