Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/calm-tools-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@perfect-abstractions/compose-cli": patch
---

Clarify CLI adapter and adapter test organization in the contributor documentation.
1 change: 1 addition & 0 deletions website/docs/contribution/cli/code-style-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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<AdapterName>/` 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:
Expand Down
2 changes: 1 addition & 1 deletion website/docs/contribution/cli/testing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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<AdapterName>/` directory.

```text
cli/test/
Expand Down
Loading