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.
Files changed (28) hide show
  1. package/.filedist-package.yml +1 -1
  2. package/.xdrs/agentme/edrs/application/003-javascript-project-tooling.md +4 -4
  3. package/.xdrs/agentme/edrs/application/010-golang-project-tooling.md +4 -4
  4. package/.xdrs/agentme/edrs/application/014-python-project-tooling.md +10 -10
  5. package/.xdrs/agentme/edrs/application/018-ai-llm-development-standards.md +1 -1
  6. package/.xdrs/agentme/edrs/application/019-ai-agents-development-standards.md +10 -10
  7. package/.xdrs/agentme/edrs/application/021-ai-workflow-development-standards.md +10 -13
  8. package/.xdrs/agentme/edrs/application/025-ai-agent-xdrs-knowledge-layer.md +1 -1
  9. package/.xdrs/agentme/edrs/application/026-pragmatic-hexagonal-architecture.md +9 -5
  10. package/.xdrs/agentme/edrs/application/028-ai-eval-standards.md +3 -3
  11. package/.xdrs/agentme/edrs/application/029-ai-workflow-naming-conventions.md +1 -1
  12. package/.xdrs/agentme/edrs/application/030-ai-test-types-taxonomy.md +7 -5
  13. package/.xdrs/agentme/edrs/devops/005-monorepo-structure.md +27 -25
  14. package/.xdrs/agentme/edrs/devops/006-github-pipelines.md +5 -5
  15. package/.xdrs/agentme/edrs/devops/008-common-targets.md +34 -34
  16. package/.xdrs/agentme/edrs/devops/017-tool-execution-and-scripting.md +1 -1
  17. package/.xdrs/agentme/edrs/devops/027-environment-variable-configuration.md +10 -10
  18. package/.xdrs/agentme/edrs/governance/013-contributing-guide-requirements.md +35 -9
  19. package/.xdrs/agentme/edrs/observability/011-service-health-check-endpoint.md +1 -1
  20. package/.xdrs/agentme/edrs/principles/002-coding-best-practices.md +3 -3
  21. package/.xdrs/agentme/edrs/principles/004-unit-test-requirements.md +10 -8
  22. package/.xdrs/agentme/edrs/principles/007-project-quality-standards.md +25 -25
  23. package/.xdrs/agentme/edrs/principles/009-error-handling.md +1 -1
  24. package/.xdrs/agentme/edrs/principles/012-continuous-xdr-enrichment.md +27 -9
  25. package/.xdrs/agentme/edrs/principles/016-cross-language-module-structure.md +1 -1
  26. package/.xdrs/agentme/edrs/principles/022-secrets-management.md +32 -30
  27. package/.xdrs/agentme/edrs/principles/023-coding-abstraction-practices.md +4 -4
  28. package/package.json +2 -2
@@ -23,13 +23,13 @@ All implementation practices derive from three guiding principles:
23
23
 
24
24
  1. **Least exposure** — minimize the means, timespan, and surface of contact with the secret.
25
25
  2. **Easiness in secret rotation** — design so rotating a secret requires no code change or redeployment.
26
- 3. **Support for local and cloud deployment runs** — the same application code must work transparently in both environments.
26
+ 3. **Support for local and cloud deployment runs** — the same application code MUST work transparently in both environments.
27
27
 
28
28
  ### Details
29
29
 
30
30
  #### 01-no-secrets-on-disk
31
31
 
32
- Secrets must never be stored on the disk of a developer machine or server. This includes `.env` files (even when gitignored), plaintext config files, embedded in source code, or any other file-based storage.
32
+ Secrets MUST NOT be stored on the disk of a developer machine or server. This includes `.env` files (even when gitignored), plaintext config files, embedded in source code, or any other file-based storage.
33
33
 
34
34
  The only acceptable local persistence is through the operating system's native secret manager (e.g., macOS Keychain, Windows Credential Manager, Linux Secret Service).
35
35
 
@@ -37,7 +37,7 @@ The only acceptable local persistence is through the operating system's native s
37
37
 
38
38
  #### 02-local-dev-uses-native-keychain
39
39
 
40
- During local development, secrets must be stored and retrieved using the native OS secret manager. Use cross-platform libraries to keep the code OS-agnostic:
40
+ During local development, secrets MUST be stored and retrieved using the native OS secret manager. Use cross-platform libraries to keep the code OS-agnostic:
41
41
 
42
42
  | Language | Library |
43
43
  |----------|---------|
@@ -51,7 +51,7 @@ The "group" (service name) defaults to the module name. The secret identifier sh
51
51
 
52
52
  #### 03-fallback-lookup-order
53
53
 
54
- Secret fetching must implement a fallback chain in the following order:
54
+ Secret fetching MUST implement a fallback chain in the following order:
55
55
 
56
56
  1. **Native OS keychain** — attempt to retrieve the secret using the local keychain library (used during local development).
57
57
  2. **Cloud secret manager** — if not found locally, fetch from the configured cloud secret manager (AWS Secrets Manager, Azure Key Vault, etc.) (used in cloud environments).
@@ -66,13 +66,13 @@ Secret 'db-password' could not be found in keychain under group 'mymodule' or in
66
66
 
67
67
  #### 04-secret-fetching-in-connector
68
68
 
69
- The secret fetching logic (including the fallback chain from rule 03) must live in a dedicated "connector" module or function. This isolates secret-access concerns from business logic and provides a single point to configure secret sources, caching policy, and error handling.
69
+ The secret fetching logic (including the fallback chain from rule 03) MUST live in a dedicated "connector" module or function. This isolates secret-access concerns from business logic and provides a single point to configure secret sources, caching policy, and error handling.
70
70
 
71
71
  ---
72
72
 
73
73
  #### 05-setup-secrets-makefile-target
74
74
 
75
- Every module that requires secrets must expose a `setup-secrets` Makefile target. This target:
75
+ Every module that requires secrets MUST expose a `setup-secrets` Makefile target. This target:
76
76
 
77
77
  - Prompts the user for each required secret value interactively.
78
78
  - If the user provides an empty value, the existing secret is not updated.
@@ -96,49 +96,29 @@ $ make run
96
96
  # Application starts successfully
97
97
  ```
98
98
 
99
- #### 05a-makefile-uses-security-utility
100
-
101
- Makefile targets (e.g., `setup-secrets`) must use the macOS native `security` CLI to store and retrieve secrets from the keychain. This restricts Makefile-based secret management to macOS developer machines, which is acceptable since all contributors are expected to use macOS.
102
-
103
- Do **not** use `keyring` or other cross-platform libraries in Makefiles — `security` is simpler to invoke from shell and requires no additional dependencies.
104
-
105
- Storing a secret:
106
- ```makefile
107
- security add-generic-password -a "$(USER)" -s "mymodule/api-key" -w "$(SECRET_VALUE)" -U
108
- ```
109
-
110
- Retrieving a secret (e.g., to pass to a command):
111
- ```makefile
112
- SECRET_VALUE := $(shell security find-generic-password -a "$(USER)" -s "mymodule/api-key" -w 2>/dev/null)
113
- ```
114
-
115
- The `-U` flag updates the entry if it already exists. Use the format `<group>/<secret-id>` as the service name (`-s`) to mirror the module name and cloud secret manager ID convention defined in rule 02 and 05.
116
-
117
- In library code (Python, JS/TS, Go), continue using the cross-platform libraries defined in rule 02 (`keyring`, `cross-keychain`, `go-keyring`). The `security` utility is only for Makefile scripts.
118
-
119
99
  ---
120
100
 
121
101
  #### 06-never-log-or-leak-secrets
122
102
 
123
- Secrets must never be logged under any circumstance or sent to any service that is not clearly the intended consumer of that secret (authentication, encryption, etc.). This applies to all log levels including debug and trace. Error messages must reference the secret name or identifier, never its value.
103
+ Secrets MUST NOT be logged under any circumstance or sent to any service that is not clearly the intended consumer of that secret (authentication, encryption, etc.). This applies to all log levels including debug and trace. Error messages MUST reference the secret name or identifier, MUST NOT include its value.
124
104
 
125
105
  ---
126
106
 
127
107
  #### 07-prefer-dynamic-fetching
128
108
 
129
- Wherever possible, fetch secrets dynamically from the secret manager at the time of use. Avoid storing secrets in global variables or caching them indefinitely. Dynamic fetching through a specialized service enables:
109
+ Wherever possible, secrets SHOULD be fetched dynamically from the secret manager at the time of use. Avoid storing secrets in global variables or caching them indefinitely. Dynamic fetching through a specialized service enables:
130
110
 
131
111
  - Automatic password rotation without redeployment.
132
112
  - Immediate propagation of rotated secrets.
133
113
  - Reduced window of exposure if memory is compromised.
134
114
 
135
- Short-lived caching (e.g., a few minutes) is acceptable when performance requires it, but must have an explicit TTL.
115
+ Short-lived caching (e.g., a few minutes) is acceptable when performance requires it, but MUST have an explicit TTL.
136
116
 
137
117
  ---
138
118
 
139
119
  #### 08-prefer-fetching-at-point-of-use
140
120
 
141
- Prefer fetching the secret inside the function that directly needs it rather than passing it through multiple layers as a function argument. This minimizes the exposure surface by reducing the number of code paths that handle the raw secret value.
121
+ Developers SHOULD prefer fetching the secret inside the function that directly needs it rather than passing it through multiple layers as a function argument. This minimizes the exposure surface by reducing the number of code paths that handle the raw secret value.
142
122
 
143
123
  Passing secrets via function arguments is acceptable when the consuming function cannot access the connector directly, but the default design should fetch at the point of use.
144
124
 
@@ -160,6 +140,28 @@ def test_service_uses_api_key():
160
140
 
161
141
  Integration tests MAY use the real keychain on developer machines or CI after `make setup-secrets` has been run.
162
142
 
143
+ ---
144
+
145
+ #### 10-makefile-uses-security-utility
146
+
147
+ Makefile targets (e.g., `setup-secrets`) MUST use the macOS native `security` CLI to store and retrieve secrets from the keychain. This restricts Makefile-based secret management to macOS developer machines, which is acceptable since all contributors are expected to use macOS.
148
+
149
+ Do not use `keyring` or other cross-platform libraries in Makefiles — `security` is simpler to invoke from shell and requires no additional dependencies.
150
+
151
+ Storing a secret:
152
+ ```makefile
153
+ security add-generic-password -a "$(USER)" -s "mymodule/api-key" -w "$(SECRET_VALUE)" -U
154
+ ```
155
+
156
+ Retrieving a secret (e.g., to pass to a command):
157
+ ```makefile
158
+ SECRET_VALUE := $(shell security find-generic-password -a "$(USER)" -s "mymodule/api-key" -w 2>/dev/null)
159
+ ```
160
+
161
+ The `-U` flag updates the entry if it already exists. Use the format `<group>/<secret-id>` as the service name (`-s`) to mirror the module name and cloud secret manager ID convention defined in rule 02 and 05.
162
+
163
+ In library code (Python, JS/TS, Go), continue using the cross-platform libraries defined in rule 02 (`keyring`, `cross-keychain`, `go-keyring`). The `security` utility is only for Makefile scripts.
164
+
163
165
  ## References
164
166
 
165
167
  - [agentme-edr-008](../devops/008-common-targets.md) - Common development script names (defines Makefile target conventions)
@@ -27,7 +27,7 @@ Prefer functional programming: pure functions with clear input → processing
27
27
 
28
28
  #### 02-prefer-explicit-calls-over-indirections
29
29
 
30
- A sequence of direct calls to libraries and resources makes logic straightforward. Avoid:
30
+ Developers SHOULD prefer a sequence of direct calls to libraries and resources to keep logic straightforward. Avoid:
31
31
 
32
32
  - Aspect-oriented programming (AOP)
33
33
  - Implicit context injection / dependency injection containers
@@ -41,7 +41,7 @@ These patterns obfuscate the main program flow and create behavioral indirection
41
41
 
42
42
  #### 03-trivial-wrappers-are-prohibited
43
43
 
44
- A function that merely delegates to another function or API call without adding meaningful logic, domain intent, or readability **MUST be inlined**. A wrapper is justified only when it:
44
+ A function that merely delegates to another function or API call without adding meaningful logic, domain intent, or readability MUST be inlined. A wrapper is justified only when it:
45
45
 
46
46
  - Encapsulates non-trivial logic (validation, retry, transformation).
47
47
  - Communicates a domain concept the underlying expression does not convey.
@@ -103,7 +103,7 @@ function createServerConfig(opts: Partial<ServerOpts>): ServerConfig {
103
103
 
104
104
  #### 05-abstractions-for-business-logic-are-encouraged
105
105
 
106
- Extracting domain logic into a named function is **encouraged** when it:
106
+ Developers SHOULD extract domain logic into a named function when it:
107
107
 
108
108
  - Encapsulates a business rule so the reader does not need to parse low-level conditions to understand domain intent.
109
109
  - Communicates intent at a glance, making compound conditions or multi-step checks self-describing.
@@ -122,6 +122,6 @@ if (event.status === 'active' && event.role !== 'guest' && event.quota > 0) { ..
122
122
 
123
123
  #### 06-idiomatic-framework-patterns-are-exempt
124
124
 
125
- React hooks, higher-order components, middleware chains, and similar patterns established by the framework in use are **not** considered unnecessary abstraction. The reader already expects them, and fighting the framework's idioms creates more confusion than it removes.
125
+ React hooks, higher-order components, middleware chains, and similar patterns established by the framework in use MUST NOT be treated as unnecessary abstraction. The reader already expects them, and fighting the framework's idioms creates more confusion than it removes.
126
126
 
127
127
  This exemption does not override other rules — a trivial wrapper inside a hook is still prohibited.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentme",
3
- "version": "0.25.0",
3
+ "version": "0.26.0",
4
4
  "description": "",
5
5
  "dependencies": {
6
6
  "filedist": "^0.39.0"
@@ -18,6 +18,6 @@
18
18
  "url": "https://github.com/flaviostutz/agentme.git"
19
19
  },
20
20
  "devDependencies": {
21
- "xdrs-core": "^0.37.1"
21
+ "xdrs-core": "^0.38.0"
22
22
  }
23
23
  }