agentme 0.25.0 → 0.26.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/.filedist-package.yml +1 -1
- package/.xdrs/agentme/edrs/application/003-javascript-project-tooling.md +4 -4
- package/.xdrs/agentme/edrs/application/010-golang-project-tooling.md +4 -4
- package/.xdrs/agentme/edrs/application/014-python-project-tooling.md +10 -10
- package/.xdrs/agentme/edrs/application/018-ai-llm-development-standards.md +1 -1
- package/.xdrs/agentme/edrs/application/019-ai-agents-development-standards.md +10 -10
- package/.xdrs/agentme/edrs/application/021-ai-workflow-development-standards.md +10 -13
- package/.xdrs/agentme/edrs/application/025-ai-agent-xdrs-knowledge-layer.md +1 -1
- package/.xdrs/agentme/edrs/application/026-pragmatic-hexagonal-architecture.md +9 -5
- package/.xdrs/agentme/edrs/application/028-ai-eval-standards.md +3 -3
- package/.xdrs/agentme/edrs/application/029-ai-workflow-naming-conventions.md +1 -1
- package/.xdrs/agentme/edrs/application/030-ai-test-types-taxonomy.md +7 -5
- package/.xdrs/agentme/edrs/devops/005-monorepo-structure.md +27 -25
- package/.xdrs/agentme/edrs/devops/006-github-pipelines.md +5 -5
- package/.xdrs/agentme/edrs/devops/008-common-targets.md +34 -34
- package/.xdrs/agentme/edrs/devops/017-tool-execution-and-scripting.md +1 -1
- package/.xdrs/agentme/edrs/devops/027-environment-variable-configuration.md +10 -10
- package/.xdrs/agentme/edrs/governance/013-contributing-guide-requirements.md +35 -9
- package/.xdrs/agentme/edrs/observability/011-service-health-check-endpoint.md +1 -1
- package/.xdrs/agentme/edrs/principles/002-coding-best-practices.md +3 -3
- package/.xdrs/agentme/edrs/principles/004-unit-test-requirements.md +10 -8
- package/.xdrs/agentme/edrs/principles/007-project-quality-standards.md +25 -25
- package/.xdrs/agentme/edrs/principles/009-error-handling.md +1 -1
- package/.xdrs/agentme/edrs/principles/012-continuous-xdr-enrichment.md +27 -9
- package/.xdrs/agentme/edrs/principles/016-cross-language-module-structure.md +1 -1
- package/.xdrs/agentme/edrs/principles/022-secrets-management.md +32 -30
- package/.xdrs/agentme/edrs/principles/023-coding-abstraction-practices.md +4 -4
- package/package.json +2 -2
|
@@ -23,18 +23,18 @@ Standardizing both the target names and the execution chain removes per-project
|
|
|
23
23
|
|
|
24
24
|
#### 01-every-project-must-have-root-makefile
|
|
25
25
|
|
|
26
|
-
The project root
|
|
26
|
+
The project root MUST contain a single authoritative `Makefile` that exposes the standard target names defined in rule 3. Developers and CI pipelines MUST invoke routine actions through this `Makefile`, MUST NOT call underlying tools directly in documentation, CI, or daily workflow commands.
|
|
27
27
|
|
|
28
28
|
`make <target>` is the shared contract across projects and languages.
|
|
29
29
|
|
|
30
|
-
- The root `Makefile`
|
|
31
|
-
- The root `Makefile`
|
|
32
|
-
- Reverse-compatibility wrappers are allowed when an ecosystem expects them, but they
|
|
30
|
+
- The root `Makefile` MUST be the entry point for both developers and pipelines.
|
|
31
|
+
- The root `Makefile` MUST expose at minimum the common targets defined in this XDR.
|
|
32
|
+
- Reverse-compatibility wrappers are allowed when an ecosystem expects them, but they MUST stay trivial.
|
|
33
33
|
- Allowed: `package.json` script `"test": "make test"`
|
|
34
34
|
- Not allowed: `make test` -> `npm run test` -> tool command
|
|
35
|
-
- Project logic
|
|
35
|
+
- Project logic MUST NOT live in npm scripts, Mise tasks, shell wrappers, or other secondary runners when the same logic belongs in the `Makefile`.
|
|
36
36
|
|
|
37
|
-
*Why:* The project entry point
|
|
37
|
+
*Why:* The project entry point MUST stay language-agnostic and obvious. A developer SHOULD be able to inspect the `Makefile` and immediately see which real tool commands will run.
|
|
38
38
|
|
|
39
39
|
#### 02-makefile-recipes-must-use-mise
|
|
40
40
|
|
|
@@ -47,10 +47,10 @@ make <target>
|
|
|
47
47
|
-> explicit tool command
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
- The `setup` target
|
|
51
|
-
- Routine targets such as `build`, `lint`, `test`, `run`, and `publish`
|
|
52
|
-
- Each Makefile recipe
|
|
53
|
-
- Makefile recipes
|
|
50
|
+
- The `setup` target MUST run `mise install` and any small project-specific bootstrap needed before normal targets work.
|
|
51
|
+
- Routine targets such as `build`, `lint`, `test`, `run`, and `publish` MUST be invoked as `make <target>` by both contributors and CI.
|
|
52
|
+
- Each Makefile recipe MUST call the real underlying command through `mise exec --`, following [agentme-edr-017](017-tool-execution-and-scripting.md).
|
|
53
|
+
- Makefile recipes MUST NOT add extra script layers such as `npm run`, `pnpm run`, `yarn run`, `mise run`, `mise tasks`, or shell aliases when those layers only forward to another command.
|
|
54
54
|
- Calling the actual tool is allowed even when that tool itself launches another program as part of its normal interface.
|
|
55
55
|
- Allowed: `mise exec -- pnpm exec eslint ./src`
|
|
56
56
|
- Allowed: `mise exec -- go test -cover ./...`
|
|
@@ -66,7 +66,7 @@ make <target>
|
|
|
66
66
|
|
|
67
67
|
#### 03-standard-target-groups-and-names
|
|
68
68
|
|
|
69
|
-
Targets are organized into five lifecycle groups. Projects
|
|
69
|
+
Targets are organized into five lifecycle groups. Projects MUST use these names unchanged. Extensions are allowed (see rule 5) but the core names MUST NOT be repurposed.
|
|
70
70
|
|
|
71
71
|
##### Developer group
|
|
72
72
|
|
|
@@ -150,28 +150,6 @@ The prefix convention ensures developers can infer the purpose of any target wit
|
|
|
150
150
|
|
|
151
151
|
---
|
|
152
152
|
|
|
153
|
-
#### 09-ai-project-dev-targets
|
|
154
|
-
|
|
155
|
-
AI-based projects (LLM, Agent, and Workflow tiers as defined in [agentme-edr-018](../application/018-ai-llm-development-standards.md)) MUST expose a `dev-mlflow` target that starts a local MLflow tracking server for development inspection.
|
|
156
|
-
|
|
157
|
-
**Example implementation:**
|
|
158
|
-
|
|
159
|
-
```makefile
|
|
160
|
-
dev-mlflow:
|
|
161
|
-
mise exec -- mlflow ui --host 0.0.0.0 --port 5000
|
|
162
|
-
open http://localhost:5000/
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
---
|
|
166
|
-
|
|
167
|
-
#### 08-default-targets-must-only-include-offline-subtargets
|
|
168
|
-
|
|
169
|
-
`make all`, `make test`, and `make lint` **MUST** include every subtarget that runs **offline** — meaning it requires no external credentials, no running servers, no paid APIs, and no environment-specific configuration outside the repository.
|
|
170
|
-
|
|
171
|
-
Subtargets that require external dependencies (e.g., `test-integration` against a live database, `test-e2e` against a staging environment, `lint-api` against a remote schema registry) **MUST** exist as named targets so developers can invoke them explicitly, but **MUST NOT** be invoked from `all`, `test`, or `lint`.
|
|
172
|
-
|
|
173
|
-
---
|
|
174
|
-
|
|
175
153
|
#### 06-monorepo-usage
|
|
176
154
|
|
|
177
155
|
In a monorepo, each module has its own `Makefile` with its own `build`, `lint`, `test`, and `deploy` targets scoped to that module. Parent-level Makefiles (at the application or repo root) delegate to child Makefiles in sequence. The parent Makefile **SHOULD** call `$(MAKE) -C <child> <target>` directly, while each child `Makefile` runs its actual tool commands through `mise exec --`.
|
|
@@ -195,7 +173,7 @@ A developer can run `make test` at the repo root to test everything, or `cd modu
|
|
|
195
173
|
|
|
196
174
|
#### 07-quick-reference
|
|
197
175
|
|
|
198
|
-
Any project following this EDR
|
|
176
|
+
Any project following this EDR MUST support the following actions through the root `Makefile`.
|
|
199
177
|
|
|
200
178
|
```sh
|
|
201
179
|
# install the pinned toolchain and project bootstrap
|
|
@@ -238,6 +216,28 @@ make clean
|
|
|
238
216
|
make all
|
|
239
217
|
```
|
|
240
218
|
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
#### 08-default-targets-must-only-include-offline-subtargets
|
|
222
|
+
|
|
223
|
+
`make all`, `make test`, and `make lint` **MUST** include every subtarget that runs **offline** — meaning it requires no external credentials, no running servers, no paid APIs, and no environment-specific configuration outside the repository.
|
|
224
|
+
|
|
225
|
+
Subtargets that require external dependencies (e.g., `test-integration` against a live database, `test-e2e` against a staging environment, `lint-api` against a remote schema registry) **MUST** exist as named targets so developers can invoke them explicitly, but **MUST NOT** be invoked from `all`, `test`, or `lint`.
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
#### 09-ai-project-dev-targets
|
|
230
|
+
|
|
231
|
+
AI-based projects (LLM, Agent, and Workflow tiers as defined in [agentme-edr-018](../application/018-ai-llm-development-standards.md)) MUST expose a `dev-mlflow` target that starts a local MLflow tracking server for development inspection.
|
|
232
|
+
|
|
233
|
+
**Example implementation:**
|
|
234
|
+
|
|
235
|
+
```makefile
|
|
236
|
+
dev-mlflow:
|
|
237
|
+
mise exec -- mlflow ui --host 0.0.0.0 --port 5000
|
|
238
|
+
open http://localhost:5000/
|
|
239
|
+
```
|
|
240
|
+
|
|
241
241
|
## Considered Options
|
|
242
242
|
|
|
243
243
|
* (REJECTED) **Language-native entry points only** - Use `npm run`, `python -m`, `go run`, and similar tool-specific commands directly as the standard surface
|
|
@@ -24,7 +24,7 @@ This keeps local development and CI aligned, reduces indirection, and lets contr
|
|
|
24
24
|
- Every project MUST use a root `Makefile` as the authoritative entry point for developer and pipeline commands.
|
|
25
25
|
- The target names in that `Makefile` MUST follow [agentme-edr-008](008-common-targets.md).
|
|
26
26
|
- CI pipelines MUST run `make <target>` from the relevant root instead of calling language-specific scripts such as `npm run`, `pnpm run`, shell wrappers, or secondary task runners.
|
|
27
|
-
- A Makefile target MUST execute the real operation through `mise exec --` before invoking the tool itself, so it
|
|
27
|
+
- A Makefile target MUST execute the real operation through `mise exec --` before invoking the tool itself, so it MUST use the version pinned in `.mise.toml`. Avoid intermediate script layers that hide the actual command.
|
|
28
28
|
- Every Makefile target MUST start by echoing a concise summary of the target and folder or context, using fewer than 10 words. When delegating to another Makefile, echo the child path and delegated target before invoking it.
|
|
29
29
|
- Direct delegation to another Makefile is allowed when traversing repo, app, or module boundaries, for example `$(MAKE) -C lib build`.
|
|
30
30
|
- Calling the actual tool binary through its native executable launcher is allowed when that is the direct command under `mise exec --`, for example `mise exec -- pnpm exec eslint ./src`, `mise exec -- uv run ty check`, `mise exec -- go test`, or `mise exec -- npx -y monotag`.
|
|
@@ -17,15 +17,15 @@ How should projects manage environment variable configuration and CLI invocation
|
|
|
17
17
|
|
|
18
18
|
## Decision Outcome
|
|
19
19
|
|
|
20
|
-
**Use YAML config files for CLI invocation configuration with multiple attributes; use `.env` files to supply environment variables to spawned processes and to hold uncommitted values referenced by config files. Load `.env` exclusively at process launch time —
|
|
20
|
+
**Use YAML config files for CLI invocation configuration with multiple attributes; use `.env` files to supply environment variables to spawned processes and to hold uncommitted values referenced by config files. Load `.env` exclusively at process launch time — MUST NOT be loaded inside application code.**
|
|
21
21
|
|
|
22
|
-
Secrets (API keys, passwords, tokens)
|
|
22
|
+
Secrets (API keys, passwords, tokens) MUST NOT be placed in `.env` files. Those are handled by [agentme-edr-022](../principles/022-secrets-management.md).
|
|
23
23
|
|
|
24
24
|
### Details
|
|
25
25
|
|
|
26
26
|
#### 01-when-to-use-dotenv
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
A `.env` file MUST be used when either of the following is true:
|
|
29
29
|
|
|
30
30
|
1. **Spawned process needs env vars** — the project launches a process (a deployable service, background worker, or shell script) that reads configuration from OS environment variables such as port numbers or API endpoint URLs.
|
|
31
31
|
2. **Value must not be committed** — a configuration value used in a YAML config file (see rule 07) is environment-specific or sensitive enough to exclude from version control. In that case, store the value in `.env` and reference it from the YAML file using env var substitution (see rule 08).
|
|
@@ -43,13 +43,13 @@ FEATURE_FLAG_NEW_UI=false
|
|
|
43
43
|
|
|
44
44
|
#### 02-dotenv-not-committed
|
|
45
45
|
|
|
46
|
-
`.env`
|
|
46
|
+
`.env` MUST be listed in `.gitignore` and MUST NOT be committed to the repository. It is intended for local use in standalone projects and libraries that do not have a formal deployment pipeline.
|
|
47
47
|
|
|
48
48
|
---
|
|
49
49
|
|
|
50
50
|
#### 03-dotenv-example-committed
|
|
51
51
|
|
|
52
|
-
A `.env.example` file
|
|
52
|
+
A `.env.example` file MUST be committed alongside `.env`. It contains all the same variable names with placeholder or illustrative values — no real URLs, credentials, or server names. This file documents what configuration is expected without exposing real values.
|
|
53
53
|
|
|
54
54
|
Example `.env.example`:
|
|
55
55
|
```
|
|
@@ -62,7 +62,7 @@ FEATURE_FLAG_NEW_UI=false
|
|
|
62
62
|
|
|
63
63
|
#### 04-stage-specific-dotenv-committed
|
|
64
64
|
|
|
65
|
-
Stage-specific overrides
|
|
65
|
+
Stage-specific overrides MUST use the naming convention `.env.[stage]` (e.g., `.env.production`, `.env.staging`, `.env.test`). These files may be committed to the repository because they carry deployment-stage configuration rather than local developer configuration. They are used during deployment pipelines where the stage is known and explicit.
|
|
66
66
|
|
|
67
67
|
The generic `.env` must still not be committed. The distinction is: `.env` is for local, ad-hoc, standalone use; `.env.[stage]` is for deployment pipelines with a defined environment identity.
|
|
68
68
|
|
|
@@ -70,7 +70,7 @@ The generic `.env` must still not be committed. The distinction is: `.env` is fo
|
|
|
70
70
|
|
|
71
71
|
#### 05-load-in-makefile-before-processes
|
|
72
72
|
|
|
73
|
-
When `.env` defines variables consumed by shell scripts or spawned processes, the Makefile
|
|
73
|
+
When `.env` defines variables consumed by shell scripts or spawned processes, the Makefile MUST load and export them before invoking those processes. Use the following pattern at the top of the relevant Makefile or in a shared include:
|
|
74
74
|
|
|
75
75
|
```makefile
|
|
76
76
|
ifneq (,$(wildcard .env))
|
|
@@ -85,7 +85,7 @@ This ensures all variables in `.env` are available as environment variables to e
|
|
|
85
85
|
|
|
86
86
|
#### 06-no-application-level-dotenv-loading
|
|
87
87
|
|
|
88
|
-
Applications
|
|
88
|
+
Applications MUST NOT load `.env` files directly inside their own code using dotenv libraries or equivalent mechanisms. Configuration must enter the process exclusively as OS-level environment variables, set before the process is launched (by the Makefile, a shell script, CI, or a container runtime).
|
|
89
89
|
|
|
90
90
|
Prohibited patterns:
|
|
91
91
|
|
|
@@ -114,7 +114,7 @@ This rule prevents two parallel loading paths — OS env and file-based env —
|
|
|
114
114
|
|
|
115
115
|
#### 07-cli-adapters-use-yaml-config
|
|
116
116
|
|
|
117
|
-
CLI adapters with multiple configuration attributes
|
|
117
|
+
CLI adapters with multiple configuration attributes MUST use a YAML config file rather than env vars or flags for those attributes. This applies whenever configuration is nested, repetitive, or too verbose for flags alone.
|
|
118
118
|
|
|
119
119
|
The CLI layer is responsible for loading and parsing the YAML file and passing the resolved values to the application layer. The application layer must not read the config file directly.
|
|
120
120
|
|
|
@@ -131,7 +131,7 @@ max_retries: 3
|
|
|
131
131
|
|
|
132
132
|
#### 08-env-var-substitution-in-config-files
|
|
133
133
|
|
|
134
|
-
When a YAML config file contains a value that
|
|
134
|
+
When a YAML config file contains a value that MUST NOT be committed (such as a real endpoint URL, a username, or any other environment-specific value), that value must be expressed as an environment variable reference using `${VAR_NAME}` syntax, and the actual value must be defined in `.env`.
|
|
135
135
|
|
|
136
136
|
This keeps the YAML file committable while keeping the environment-specific value out of the repository.
|
|
137
137
|
|
|
@@ -21,15 +21,41 @@ Projects MUST keep a `CONTRIBUTING.md` file at the repository root. The file MUS
|
|
|
21
21
|
|
|
22
22
|
### Details
|
|
23
23
|
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
-
|
|
24
|
+
#### 01-contributing-md-is-required
|
|
25
|
+
|
|
26
|
+
Every project MUST have a root `CONTRIBUTING.md` file at the repository root. The file MUST explain where bugs, feature discussions, and code changes belong so contributors follow a predictable workflow before opening pull requests.
|
|
27
|
+
|
|
28
|
+
#### 02-guide-must-direct-bug-reports-to-issues
|
|
29
|
+
|
|
30
|
+
The guide MUST direct bug reports to issues.
|
|
31
|
+
|
|
32
|
+
#### 03-guide-must-route-feature-discussions-to-issues
|
|
33
|
+
|
|
34
|
+
The guide MUST direct feature ideas and feature discussions to issues before implementation starts.
|
|
35
|
+
|
|
36
|
+
#### 04-guide-must-require-pull-requests
|
|
37
|
+
|
|
38
|
+
The guide MUST state that fixes and features are contributed through pull requests.
|
|
39
|
+
|
|
40
|
+
#### 05-guide-must-require-feature-branches
|
|
41
|
+
|
|
42
|
+
The guide MUST state that pull requests come from feature branches targeting `main`.
|
|
43
|
+
|
|
44
|
+
#### 06-guide-must-require-conventional-comments
|
|
45
|
+
|
|
46
|
+
The guide MUST ask reviewers and contributors to use [Conventional Comments](https://conventionalcomments.org/) for review feedback.
|
|
47
|
+
|
|
48
|
+
#### 07-guide-must-ask-for-small-pull-requests
|
|
49
|
+
|
|
50
|
+
The guide MUST ask contributors to keep pull requests small enough to keep review and discussion focused.
|
|
51
|
+
|
|
52
|
+
#### 08-scaffolding-should-create-contributing-md
|
|
53
|
+
|
|
54
|
+
Project scaffolding skills SHOULD create the file by default when they initialize a repository.
|
|
55
|
+
|
|
56
|
+
#### 09-content-should-be-concise
|
|
57
|
+
|
|
58
|
+
The content SHOULD stay concise and practical; do not turn `CONTRIBUTING.md` into a duplicate of `README.md`.
|
|
33
59
|
|
|
34
60
|
## Considered Options
|
|
35
61
|
|
|
@@ -45,7 +45,7 @@ All services **MUST** expose a `GET /health` endpoint that validates external de
|
|
|
45
45
|
|
|
46
46
|
- `health` (required): overall state — `OK`, `WARNING`, or `ERROR`
|
|
47
47
|
- `latencyMs` (required): total milliseconds to run all checks
|
|
48
|
-
- `message` (required): human-readable summary;
|
|
48
|
+
- `message` (required): human-readable summary; MUST NOT expose credentials, internal IPs, or stack traces
|
|
49
49
|
|
|
50
50
|
**Dependency validation rules:**
|
|
51
51
|
|
|
@@ -46,7 +46,7 @@ src/
|
|
|
46
46
|
|
|
47
47
|
#### 02-apply-template-method-pattern
|
|
48
48
|
|
|
49
|
-
When a function's main logic contains well-defined sections and **any individual section exceeds ~20 lines**,
|
|
49
|
+
When a function's main logic contains well-defined sections and **any individual section exceeds ~20 lines**, each section MUST be extracted into its own named function. The outer function becomes an orchestrator that calls the extracted helpers in sequence.
|
|
50
50
|
|
|
51
51
|
**Example (Python):**
|
|
52
52
|
|
|
@@ -110,13 +110,13 @@ Every change to a public interface, behavior, or configuration option MUST be re
|
|
|
110
110
|
|
|
111
111
|
#### 05-declare-types-in-file-where-used
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
Types used in only **one** file MUST be declared in that same file. Move a type to a shared module only when it is referenced in two or more files.
|
|
114
114
|
|
|
115
115
|
---
|
|
116
116
|
|
|
117
117
|
#### 06-keep-test-files-next-to-source
|
|
118
118
|
|
|
119
|
-
Where the language ecosystem supports it (e.g. JavaScript/TypeScript, Go, Rust),
|
|
119
|
+
Where the language ecosystem supports it (e.g. JavaScript/TypeScript, Go, Rust), test files MUST be placed **beside** the source file they cover and use a consistent naming convention rather than mirroring the source tree in a separate `tests/` folder.
|
|
120
120
|
|
|
121
121
|
**Recommended naming conventions:**
|
|
122
122
|
|
|
@@ -15,12 +15,14 @@ What unit testing practices should be followed to ensure tests are meaningful, r
|
|
|
15
15
|
|
|
16
16
|
## Decision Outcome
|
|
17
17
|
|
|
18
|
-
**Every test
|
|
18
|
+
**Every test MUST assert behavior, run offline without external dependencies, enforce 80% coverage, centralize shared setup, and prefer real code over mocks.**
|
|
19
19
|
|
|
20
20
|
### Details
|
|
21
21
|
|
|
22
22
|
#### 01-must-have-at-least-one-assertion-per-test
|
|
23
23
|
|
|
24
|
+
Every test MUST have at least one assertion that validates the expected behavior.
|
|
25
|
+
|
|
24
26
|
```typescript
|
|
25
27
|
// bad — no assertion; passes even when code is broken
|
|
26
28
|
it("processes the order", () => { processOrder(mockOrder); });
|
|
@@ -36,7 +38,7 @@ it("processes the order and returns a confirmation id", () => {
|
|
|
36
38
|
|
|
37
39
|
#### 02-must-run-offline
|
|
38
40
|
|
|
39
|
-
Unit tests
|
|
41
|
+
Unit tests MUST NOT depend on any external resources: no network calls, no running databases, no external APIs, no file system paths outside the repo. Tests MUST pass with only static code available.
|
|
40
42
|
|
|
41
43
|
```typescript
|
|
42
44
|
// bad — hits a real HTTP endpoint
|
|
@@ -64,13 +66,13 @@ export default defineConfig({
|
|
|
64
66
|
});
|
|
65
67
|
```
|
|
66
68
|
|
|
67
|
-
Builds that miss the threshold
|
|
69
|
+
Builds that miss the threshold MUST NOT be merged.
|
|
68
70
|
|
|
69
71
|
---
|
|
70
72
|
|
|
71
73
|
#### 04-must-place-test-files-alongside-source
|
|
72
74
|
|
|
73
|
-
Test files
|
|
75
|
+
Test files MUST live next to the source file they test, in the same directory, following the convention of the language/framework:
|
|
74
76
|
|
|
75
77
|
| Language | Pattern | Example |
|
|
76
78
|
|----------|---------|-------|
|
|
@@ -83,7 +85,7 @@ src/mymodule/group1/file1.ts ← source
|
|
|
83
85
|
src/mymodule/group1/file1.test.ts ← test (same directory)
|
|
84
86
|
```
|
|
85
87
|
|
|
86
|
-
**Exception — separate test folder:** When the framework makes co-location impractical (e.g. Python's common `tests/` convention), or when the community strongly favors a separate folder, a dedicated test root (e.g. `tests/`) is allowed. In that case the test folder
|
|
88
|
+
**Exception — separate test folder:** When the framework makes co-location impractical (e.g. Python's common `tests/` convention), or when the community strongly favors a separate folder, a dedicated test root (e.g. `tests/`) is allowed. In that case the test folder MUST mirror the source folder structure exactly:
|
|
87
89
|
|
|
88
90
|
```
|
|
89
91
|
src/mymodule/group1/file1.py ← source
|
|
@@ -96,7 +98,7 @@ Do not flatten or reorganize paths when using a separate test folder.
|
|
|
96
98
|
|
|
97
99
|
#### 05-should-extract-shared-setup
|
|
98
100
|
|
|
99
|
-
When setup logic is repeated across two or more test files,
|
|
101
|
+
When setup logic is repeated across two or more test files, it SHOULD be centralized (`src/test-utils/`, `internal/testutil/`, `tests/conftest.py`).
|
|
100
102
|
|
|
101
103
|
```typescript
|
|
102
104
|
// src/test-utils/order-factory.ts
|
|
@@ -109,9 +111,9 @@ export function makeOrder(overrides: Partial<Order> = {}): Order {
|
|
|
109
111
|
|
|
110
112
|
#### 06-should-avoid-mocks
|
|
111
113
|
|
|
112
|
-
|
|
114
|
+
Tests SHOULD use the lowest-cost alternative that exercises real behavior:
|
|
113
115
|
|
|
114
|
-
1. **Real implementation** —
|
|
116
|
+
1. **Real implementation** — MUST be preferred
|
|
115
117
|
2. **In-memory / lightweight fake** — e.g. in-memory DB, stub HTTP server
|
|
116
118
|
3. **Recorded fixture** — replay captured real responses
|
|
117
119
|
4. **Mock / stub** — only for external APIs, irreversible operations, or hardware I/O
|
|
@@ -15,15 +15,15 @@ What minimum quality standards must every project in the organization meet to en
|
|
|
15
15
|
|
|
16
16
|
## Decision Outcome
|
|
17
17
|
|
|
18
|
-
Every project
|
|
18
|
+
Every project MUST meet the minimum quality standards: a Getting Started section in its README, unit tests that run on every release, compliance with workspace XDRs, active linting enforcement, a structure that is clear to new developers, and — for libraries and utilities — a runnable examples folder verified on every test run. Integration tests are advised but not required. Projects with statistical models MUST have evaluation targets with performance thresholds.
|
|
19
19
|
|
|
20
|
-
These standards form a non-negotiable baseline. Individual projects may raise the bar but
|
|
20
|
+
These standards form a non-negotiable baseline. Individual projects may raise the bar but MUST NOT fall below it.
|
|
21
21
|
|
|
22
22
|
### Details
|
|
23
23
|
|
|
24
24
|
#### 01-readme-must-have-getting-started
|
|
25
25
|
|
|
26
|
-
`README.md`
|
|
26
|
+
`README.md` MUST include a **Getting Started** section in the first 20 lines with the minimal steps to install and use the project.
|
|
27
27
|
|
|
28
28
|
**Required content:**
|
|
29
29
|
- Installation or setup command(s)
|
|
@@ -52,14 +52,14 @@ myFunction({ input: "value" });
|
|
|
52
52
|
|
|
53
53
|
#### 02-unit-tests-must-run-on-every-release
|
|
54
54
|
|
|
55
|
-
A unit test suite
|
|
55
|
+
A unit test suite MUST run automatically before every release. Failing tests MUST block the release — no silent skips or overrides.
|
|
56
56
|
|
|
57
57
|
**Requirements:**
|
|
58
|
-
- A `make test` target
|
|
59
|
-
- CI/CD
|
|
58
|
+
- A `make test` target MUST exist and run the full suite
|
|
59
|
+
- CI/CD MUST invoke it before publish/deploy
|
|
60
60
|
- Test failures block the release
|
|
61
61
|
|
|
62
|
-
**Exception:** Projects with fewer than 100 lines of code, or whose `README.md` prominently marks them as a **Spike** or **Experiment**, are exempt from this requirement. Such projects
|
|
62
|
+
**Exception:** Projects with fewer than 100 lines of code, or whose `README.md` prominently marks them as a **Spike** or **Experiment**, are exempt from this requirement. Such projects MUST NOT be deployed to production.
|
|
63
63
|
|
|
64
64
|
**Reference:** [agentme-edr-004](004-unit-test-requirements.md) for detailed unit test requirements.
|
|
65
65
|
|
|
@@ -67,7 +67,7 @@ A unit test suite must run automatically before every release. Failing tests mus
|
|
|
67
67
|
|
|
68
68
|
#### 03-project-must-comply-with-xdrs
|
|
69
69
|
|
|
70
|
-
All XDRs that apply to the project's scope (as listed in [.xdrs/index.md](../../../index.md))
|
|
70
|
+
All XDRs that apply to the project's scope (as listed in [.xdrs/index.md](../../../index.md)) MUST be followed. A deviation requires a project-local XDR documenting the override.
|
|
71
71
|
|
|
72
72
|
**Requirements:**
|
|
73
73
|
- Review applicable XDRs before any significant implementation
|
|
@@ -77,7 +77,7 @@ All XDRs that apply to the project's scope (as listed in [.xdrs/index.md](../../
|
|
|
77
77
|
|
|
78
78
|
#### 04-project-must-have-linting
|
|
79
79
|
|
|
80
|
-
Projects larger than 10 files or 200 lines of code
|
|
80
|
+
Projects larger than 10 files or 200 lines of code MUST have a linter configured and actively enforced. Lint failures block CI builds.
|
|
81
81
|
|
|
82
82
|
**Requirements:**
|
|
83
83
|
- `make lint` runs the linter with zero-warning tolerance
|
|
@@ -85,7 +85,7 @@ Projects larger than 10 files or 200 lines of code must have a linter configured
|
|
|
85
85
|
- Linter config is checked in (e.g., `.eslintrc.js`, `pyproject.toml`, `.golangci.yml`)
|
|
86
86
|
- CI runs `make lint` before merging or releasing
|
|
87
87
|
|
|
88
|
-
**Exception:** Projects with fewer than 100 lines of code, or whose `README.md` prominently marks them as a **Spike** or **Experiment**, are exempt from this requirement. Such projects
|
|
88
|
+
**Exception:** Projects with fewer than 100 lines of code, or whose `README.md` prominently marks them as a **Spike** or **Experiment**, are exempt from this requirement. Such projects MUST NOT be deployed to production.
|
|
89
89
|
|
|
90
90
|
**Reference:** [agentme-edr-003](../application/003-javascript-project-tooling.md) for JavaScript-specific tooling.
|
|
91
91
|
|
|
@@ -93,11 +93,11 @@ Projects larger than 10 files or 200 lines of code must have a linter configured
|
|
|
93
93
|
|
|
94
94
|
#### 05-project-structure-must-be-clear
|
|
95
95
|
|
|
96
|
-
Directory and file layout
|
|
96
|
+
Directory and file layout MUST be self-explanatory: source code, tests, configuration, and examples MUST be clearly separated and named.
|
|
97
97
|
|
|
98
98
|
**Requirements:**
|
|
99
|
-
- Directory names
|
|
100
|
-
- README
|
|
99
|
+
- Directory names MUST reflect their purpose (`src/`, `lib/`, `tests/`, `examples/`, `docs/`)
|
|
100
|
+
- README MUST describe the top-level layout if non-obvious
|
|
101
101
|
- No orphaned or unexplained directories or files at the project root
|
|
102
102
|
|
|
103
103
|
**Example layout (TypeScript project):**
|
|
@@ -118,14 +118,14 @@ Directory and file layout must be self-explanatory: source code, tests, configur
|
|
|
118
118
|
|
|
119
119
|
#### 06-libraries-must-have-runnable-examples
|
|
120
120
|
|
|
121
|
-
Projects that are libraries or shared utilities
|
|
121
|
+
Projects that are libraries or shared utilities MUST include an `examples/` directory. Each subdirectory represents a usage scenario and MUST be independently runnable. Examples that are "offline" (require no external credentials, no running servers, no paid APIs, and no environment-specific configuration outside the repository) MUST be executed as part of `make test`. Examples that depend on external entities may be left out of `make test`.
|
|
122
122
|
|
|
123
123
|
**Requirements:**
|
|
124
|
-
- `examples/`
|
|
125
|
-
- Each scenario subdirectory
|
|
126
|
-
- Examples
|
|
127
|
-
- `make test` in the root
|
|
128
|
-
- Examples that depend on external entities
|
|
124
|
+
- `examples/` MUST contain at least one subdirectory per major usage scenario
|
|
125
|
+
- Each scenario subdirectory MUST have a `Makefile` with a `run` target
|
|
126
|
+
- Examples MUST import the library as an external consumer (not via relative `../src` imports)
|
|
127
|
+
- `make test` in the root MUST run all offline examples; failures block CI and releases
|
|
128
|
+
- Examples that depend on external entities MUST NOT be included in `make test`
|
|
129
129
|
|
|
130
130
|
**Directory layout:**
|
|
131
131
|
|
|
@@ -170,16 +170,16 @@ all:
|
|
|
170
170
|
|
|
171
171
|
#### 07-statistical-models-must-have-eval-targets
|
|
172
172
|
|
|
173
|
-
Projects that contain statistical models (e.g., ML models, LLM-based evaluators, classifiers, ranking systems, or any component whose output quality is measured probabilistically)
|
|
173
|
+
Projects that contain statistical models (e.g., ML models, LLM-based evaluators, classifiers, ranking systems, or any component whose output quality is measured probabilistically) MUST define measurable performance thresholds and verify them automatically.
|
|
174
174
|
|
|
175
175
|
**Requirements:**
|
|
176
|
-
- A `make eval` target
|
|
177
|
-
- Each evaluation
|
|
178
|
-
- Thresholds
|
|
179
|
-
- `make eval`
|
|
176
|
+
- A `make eval` target MUST exist and execute all performance evaluations
|
|
177
|
+
- Each evaluation MUST have a **documented minimum performance threshold** (e.g., accuracy ≥ 0.85, F1 ≥ 0.80, BLEU ≥ 0.70)
|
|
178
|
+
- Thresholds MUST be declared explicitly in the project (e.g., in a config file, `Makefile` variable, or documented in `README.md`)
|
|
179
|
+
- `make eval` MUST **exit with a non-zero status** (fail) if:
|
|
180
180
|
- The evaluation cannot be executed (missing data, environment errors, model load failures)
|
|
181
181
|
- Any metric falls below its defined minimum threshold
|
|
182
|
-
- CI/CD
|
|
182
|
+
- CI/CD MUST invoke `make eval` before releasing any version that changes model weights, prompts, or evaluation logic
|
|
183
183
|
|
|
184
184
|
**Threshold declaration example (Makefile):**
|
|
185
185
|
|
|
@@ -211,7 +211,7 @@ Every system boundary MUST signal failure explicitly:
|
|
|
211
211
|
|
|
212
212
|
- **OS processes** MUST exit with a **non-zero exit code** when something went wrong. Exit code `0` means success.
|
|
213
213
|
- **HTTP services** MUST return a **non-2xx/3xx status code** on error, accompanied by a response body that describes the problem without exposing internal system details (stack traces, SQL queries, internal paths, etc.).
|
|
214
|
-
- **All error responses** SHOULD be logged to the console/structured logger, especially system-level or unexpected errors. Operational teams
|
|
214
|
+
- **All error responses** SHOULD be logged to the console/structured logger, especially system-level or unexpected errors. Operational teams MUST be able to find the cause from logs alone.
|
|
215
215
|
|
|
216
216
|
**Examples:**
|
|
217
217
|
|
|
@@ -21,15 +21,33 @@ Developers MUST treat reusable missing guidance discovered during implementation
|
|
|
21
21
|
|
|
22
22
|
### Details
|
|
23
23
|
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
-
|
|
24
|
+
#### 01-reusable-guidance-must-become-shared-xdr
|
|
25
|
+
|
|
26
|
+
Developers MUST treat reusable missing guidance discovered during implementation as an XDR gap to be proposed and reviewed, not as permanent prompt-only context or repeated vibe coding. The main objective is sharing, discussing, and converging practices across teams. Controlled divergence during exploration is acceptable, but recurring successful decisions MUST be converged into shared XDRs.
|
|
27
|
+
|
|
28
|
+
#### 02-local-scope-must-be-for-truly-specific-decisions
|
|
29
|
+
|
|
30
|
+
Decisions placed in `_local` SHOULD be truly specific to the needs of a single application or repository. The non-`_local` scope exists to share practices across projects, company areas, and functionally organized teams.
|
|
31
|
+
|
|
32
|
+
#### 03-steering-needs-must-trigger-xdr-reflection
|
|
33
|
+
|
|
34
|
+
When developers or coding agents need too much detailed steering to complete a task, they MUST reflect on whether those details would help other teams or future implementations. If yes, create or update an XDR proposal in the broadest appropriate shared scope. This includes cases where an agent implemented a feature without a framework, pattern, coding standard, or other practice that should likely be standardized. Missing reusable guardrails SHOULD trigger an XDR proposal.
|
|
35
|
+
|
|
36
|
+
#### 04-coverage-target-should-be-80-percent
|
|
37
|
+
|
|
38
|
+
Teams SHOULD aim to keep at least 80% of big coding decisions covered by accepted XDRs. Big decisions include framework or tool selection, overall code organization, monorepo structure, complex business flows, and coding standards. If a big decision is not yet covered, developers SHOULD either propose a new XDR or document why the decision is intentionally local and should not be shared.
|
|
39
|
+
|
|
40
|
+
#### 05-leaders-must-review-xdr-proposals
|
|
41
|
+
|
|
42
|
+
Leaders responsible for the affected scope MUST review XDR proposals, adjust them as needed, and publish the accepted decision.
|
|
43
|
+
|
|
44
|
+
#### 06-query-agents-for-missing-xdrs
|
|
45
|
+
|
|
46
|
+
It is good practice to ask the coding agent which missing XDRs made the task harder, increased adjustment rounds, or forced more vibe coding. Those gaps SHOULD feed the XDR backlog.
|
|
47
|
+
|
|
48
|
+
#### 07-xdrs-are-not-feature-specs
|
|
49
|
+
|
|
50
|
+
In SDD, specifications describe the feature being built; XDRs describe reusable decisions and guardrails that MUST survive beyond one feature. Do not keep durable engineering policy only inside feature specs.
|
|
33
51
|
|
|
34
52
|
## Considered Options
|
|
35
53
|
|
|
@@ -88,7 +88,7 @@ Examples that demonstrate how to consume a library or reusable module MUST live
|
|
|
88
88
|
Examples MUST exercise the module through its public distribution surface:
|
|
89
89
|
|
|
90
90
|
- use the package built into `dist/` when the ecosystem supports local packaged artifacts
|
|
91
|
-
- otherwise use the public module path or equivalent consumer-facing import surface;
|
|
91
|
+
- otherwise use the public module path or equivalent consumer-facing import surface; MUST NOT use relative source-file imports or direct references to internal implementation paths
|
|
92
92
|
|
|
93
93
|
Example:
|
|
94
94
|
|