Commit 13b5e74
authored
⚙️ [Maintenance]: Split module archetypes guidance (#66)
Module archetype guidance now documents Integration and Data modules
with flexible transport and Context patterns. The guidance clarifies
design choices for exposing or hiding transport abstractions, Context
functions for targeting environments, and the ConvertFrom/ConvertTo data
flow directions.
## New: Module archetype guidance
PSModule modules fall into two standardized archetypes. The new
Module-Types.md page documents:
- **Integration (API) modules**: Wrap external services via REST or
GraphQL. Commands map to resources and intents, not HTTP methods.
Transport abstractions (REST/GraphQL functions) may be private, public,
or combined with public Context depending on audience needs.
- **Data modules**: Convert between data format representations and
PowerShell objects. Conversion always flows through PSCustomObject as
the neutral pivot, with ConvertFrom and ConvertTo functions moving
bidirectionally.
## Changed: Transport abstraction is flexible, not prescriptive
Transport, REST methods, and GraphQL functions do not have to be
private. Modules now document three strategies:
- **Private transport** (common): Keep REST/GraphQL helpers private.
Public functions accept resolved inputs and typed objects. Follows
Dependency Inversion at the network boundary.
- **Public transport**: Expose REST or GraphQL functions for power users
or module composition.
- **Public Context**: Expose Context functions so users can configure
and target specific contexts and environments directly.
Module authors choose the strategy that best serves their audience.
## Changed: Context modules must expose functions and object types
The Context module provides on-disk storage for user data and secrets
organized by context and environment. Modules must expose functions and
object types so users can programmatically target specific contexts and
environments. Users need to select which environment or context their
functions operate against.
## Improved: ConvertFrom/ConvertTo data flow clarity
The verb vocabulary table now explicitly shows data flow directions:
- **ConvertFrom-<Format>**: Format-specific input → PSCustomObject
- **ConvertTo-<Format>**: PSCustomObject → Format-specific output
## Technical Details
- Added `src/docs/Modules/Module-Types.md` with Integration and Data
archetype guidance.
- Updated `src/docs/Modules/index.md` with module section links.
- Added cross-link from Repository-Defaults.md to module types.
- Updated site navigation in `src/zensical.toml`.
- Split from PR #61 to isolate module archetype guidance from README
policy and onboarding defaults.1 parent 24fb680 commit 13b5e74
4 files changed
Lines changed: 109 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
0 commit comments