agentme 0.5.0 → 0.6.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/.xdrs/agentme/edrs/application/003-javascript-project-tooling.md +27 -11
- package/.xdrs/agentme/edrs/application/010-golang-project-tooling.md +27 -18
- package/.xdrs/agentme/edrs/application/014-python-project-tooling.md +74 -34
- package/.xdrs/agentme/edrs/application/skills/001-create-javascript-project/SKILL.md +61 -19
- package/.xdrs/agentme/edrs/application/skills/003-create-golang-project/SKILL.md +19 -9
- package/.xdrs/agentme/edrs/application/skills/005-create-python-project/SKILL.md +146 -72
- package/.xdrs/agentme/edrs/devops/005-monorepo-structure.md +32 -5
- package/.xdrs/agentme/edrs/devops/skills/002-monorepo-setup/SKILL.md +57 -11
- package/.xdrs/agentme/edrs/index.md +1 -0
- package/.xdrs/agentme/edrs/principles/016-cross-language-module-structure.md +133 -0
- package/package.json +1 -1
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agentme-edr-016-cross-language-module-structure
|
|
3
|
+
description: Defines the baseline module-root structure, artifact locations, cache placement, README expectations, examples layout, and test folder conventions across languages. Use when creating or reviewing buildable modules.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# agentme-edr-016: Cross-language module structure
|
|
7
|
+
|
|
8
|
+
## Context and Problem Statement
|
|
9
|
+
|
|
10
|
+
The language-specific tooling EDRs currently describe similar module layouts in different ways, which causes drift in example placement, cache folders, README expectations, and test organization.
|
|
11
|
+
|
|
12
|
+
What baseline structure rules must every buildable module follow regardless of language?
|
|
13
|
+
|
|
14
|
+
## Decision Outcome
|
|
15
|
+
|
|
16
|
+
**Standardize every buildable module around its own folder root, with `dist/`, `.cache/`, sibling consumer examples, a module README, and predictable test locations.**
|
|
17
|
+
|
|
18
|
+
Language-specific EDRs may add ecosystem details, but they must not redefine these baseline folder responsibilities.
|
|
19
|
+
|
|
20
|
+
### Implementation Details
|
|
21
|
+
|
|
22
|
+
#### 1. Every buildable or publishable module MUST own its folder root
|
|
23
|
+
|
|
24
|
+
A module is the smallest independently buildable, testable, or publishable unit. It MUST live in its own folder and that folder MUST contain:
|
|
25
|
+
|
|
26
|
+
- a `Makefile` following [agentme-edr-008](../devops/008-common-targets.md)
|
|
27
|
+
- a `README.md` for the module itself
|
|
28
|
+
- all configuration files required to build, lint, test, package, or publish that module
|
|
29
|
+
- its generated `dist/` directory when the module produces distributable artifacts
|
|
30
|
+
- a module-local `.cache/` when tool caches are not intentionally shared with a parent aggregation root
|
|
31
|
+
|
|
32
|
+
Example module root:
|
|
33
|
+
|
|
34
|
+
```text
|
|
35
|
+
<module>/
|
|
36
|
+
├── Makefile
|
|
37
|
+
├── README.md
|
|
38
|
+
├── dist/
|
|
39
|
+
├── .cache/
|
|
40
|
+
└── ... language-specific sources and config ...
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
#### 2. Parent folders are aggregation roots, not hidden implementation buckets
|
|
44
|
+
|
|
45
|
+
Parent folders such as a repository root, an application folder, or `lib/` may aggregate multiple modules. They may also hold shared consumer examples or multi-module test harnesses.
|
|
46
|
+
|
|
47
|
+
They MUST keep the public aggregation obvious: deleting an aggregation folder should remove a coherent API surface or entry-point area, not scatter unrelated internal implementation across the repository.
|
|
48
|
+
|
|
49
|
+
Recommended aggregation pattern:
|
|
50
|
+
|
|
51
|
+
```text
|
|
52
|
+
<parent>/
|
|
53
|
+
├── <module-a>/
|
|
54
|
+
├── <module-b>/
|
|
55
|
+
├── examples/
|
|
56
|
+
├── tests_integration/
|
|
57
|
+
└── tests_benchmark/
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
#### 3. Build and publish outputs MUST go to `dist/`
|
|
61
|
+
|
|
62
|
+
Distributable outputs such as packages, wheels, archives, generated binaries, or packed example inputs MUST be written under the module's `dist/` folder.
|
|
63
|
+
|
|
64
|
+
`dist/` MUST be gitignored.
|
|
65
|
+
|
|
66
|
+
#### 4. Persistent tool caches MUST live under `.cache/`
|
|
67
|
+
|
|
68
|
+
Tool-generated caches and disposable machine-local state MUST be redirected into the nearest intended `.cache/` folder, either at monorepo level or module level.
|
|
69
|
+
|
|
70
|
+
Examples include:
|
|
71
|
+
|
|
72
|
+
- linter caches
|
|
73
|
+
- test runner caches
|
|
74
|
+
- transpiler incremental state
|
|
75
|
+
- formatter caches
|
|
76
|
+
- dependency-manager caches when local caching is desired
|
|
77
|
+
|
|
78
|
+
If a tool cannot natively choose its cache path, the module `Makefile` MUST wrap or clean that tool so persistent cache files do not remain scattered outside `.cache/` after standard targets run.
|
|
79
|
+
|
|
80
|
+
`.cache/` MUST be gitignored.
|
|
81
|
+
|
|
82
|
+
#### 5. Consumer examples MUST sit outside the module they exercise
|
|
83
|
+
|
|
84
|
+
Examples that demonstrate how to consume a library or reusable module MUST live in a sibling `examples/` folder under the nearest aggregation root, not inside the module folder itself.
|
|
85
|
+
|
|
86
|
+
Examples MUST exercise the module through its public distribution surface:
|
|
87
|
+
|
|
88
|
+
- use the package built into `dist/` when the ecosystem supports local packaged artifacts
|
|
89
|
+
- otherwise use the public module path or equivalent consumer-facing import surface, never relative source-file imports or direct references to internal implementation paths
|
|
90
|
+
|
|
91
|
+
Example:
|
|
92
|
+
|
|
93
|
+
```text
|
|
94
|
+
lib/
|
|
95
|
+
└── mymodule/
|
|
96
|
+
|
|
97
|
+
examples/
|
|
98
|
+
└── using-mymodule/
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
#### 6. Every module README MUST explain both usage and development
|
|
102
|
+
|
|
103
|
+
Each module MUST contain a `README.md` that shows how to use the module as a consumer.
|
|
104
|
+
|
|
105
|
+
The end of the README MUST also include short developer instructions for that module, covering at least the standard build, lint, and test entry points.
|
|
106
|
+
|
|
107
|
+
Repository-level READMEs may describe the workspace, but they do not replace the module README.
|
|
108
|
+
|
|
109
|
+
#### 7. Unit, integration, and benchmark tests use predictable locations
|
|
110
|
+
|
|
111
|
+
Unit tests SHOULD be co-located with the file they exercise when that is idiomatic and common for the language.
|
|
112
|
+
|
|
113
|
+
When co-location is uncommon or awkward for the ecosystem, unit tests SHOULD live under `<module>/tests/`.
|
|
114
|
+
|
|
115
|
+
Integration tests MUST live in one of these locations:
|
|
116
|
+
|
|
117
|
+
- `<module>/tests_integration/` when they cover one module
|
|
118
|
+
- `<parent>/tests_integration/` when they cover multiple sibling modules
|
|
119
|
+
|
|
120
|
+
Benchmark tests MUST live in one of these locations:
|
|
121
|
+
|
|
122
|
+
- co-located with the source when the language has a first-class benchmark convention there
|
|
123
|
+
- `<module>/tests_benchmark/` for module-specific harnesses or datasets
|
|
124
|
+
- `<parent>/tests_benchmark/` when they cover multiple sibling modules
|
|
125
|
+
|
|
126
|
+
#### 8. Module Makefiles MUST expose the shared target vocabulary
|
|
127
|
+
|
|
128
|
+
Every module `Makefile` MUST expose the common target names from [agentme-edr-008](../devops/008-common-targets.md). At minimum, modules MUST provide `build`, `lint`, and `test`, and SHOULD also provide `all`, `clean`, and `lint-fix` when meaningful.
|
|
129
|
+
|
|
130
|
+
## References
|
|
131
|
+
|
|
132
|
+
- [agentme-edr-005](../devops/005-monorepo-structure.md) - Monorepo aggregation and delegation rules
|
|
133
|
+
- [agentme-edr-008](../devops/008-common-targets.md) - Shared Makefile target names
|