agentme 0.10.0 → 0.12.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 (26) hide show
  1. package/.filedist-package.yml +1 -1
  2. package/.xdrs/agentme/edrs/application/003-javascript-project-tooling.md +41 -5
  3. package/.xdrs/agentme/edrs/application/010-golang-project-tooling.md +39 -15
  4. package/.xdrs/agentme/edrs/application/014-python-project-tooling.md +76 -17
  5. package/.xdrs/agentme/edrs/application/015-cli-tool-standards.md +25 -24
  6. package/.xdrs/agentme/edrs/application/018-ai-agent-development-standards.md +29 -11
  7. package/.xdrs/agentme/edrs/application/021-pragmatic-hexagonal-architecture.md +112 -0
  8. package/.xdrs/agentme/edrs/application/skills/001-create-javascript-project/SKILL.md +26 -11
  9. package/.xdrs/agentme/edrs/application/skills/003-create-golang-project/SKILL.md +31 -14
  10. package/.xdrs/agentme/edrs/application/skills/005-create-python-project/SKILL.md +64 -33
  11. package/.xdrs/agentme/edrs/devops/005-monorepo-structure.md +1 -1
  12. package/.xdrs/agentme/edrs/devops/006-github-pipelines.md +1 -1
  13. package/.xdrs/agentme/edrs/devops/008-common-targets.md +1 -1
  14. package/.xdrs/agentme/edrs/devops/017-tool-execution-and-scripting.md +2 -2
  15. package/.xdrs/agentme/edrs/governance/013-contributing-guide-requirements.md +1 -1
  16. package/.xdrs/agentme/edrs/index.md +2 -0
  17. package/.xdrs/agentme/edrs/observability/011-service-health-check-endpoint.md +1 -1
  18. package/.xdrs/agentme/edrs/principles/002-coding-best-practices.md +1 -1
  19. package/.xdrs/agentme/edrs/principles/004-unit-test-requirements.md +8 -2
  20. package/.xdrs/agentme/edrs/principles/007-project-quality-standards.md +3 -3
  21. package/.xdrs/agentme/edrs/principles/009-error-handling.md +1 -1
  22. package/.xdrs/agentme/edrs/principles/012-continuous-xdr-enrichment.md +2 -2
  23. package/.xdrs/agentme/edrs/principles/016-cross-language-module-structure.md +1 -1
  24. package/.xdrs/agentme/edrs/principles/022-secrets-management.md +128 -0
  25. package/.xdrs/agentme/edrs/principles/articles/001-continuous-xdr-improvement.md +5 -5
  26. package/package.json +2 -2
@@ -19,7 +19,7 @@ Every project must meet six minimum quality standards: a Getting Started section
19
19
 
20
20
  These standards form a non-negotiable baseline. Individual projects may raise the bar but must never fall below it.
21
21
 
22
- ### Implementation Details
22
+ ### Details
23
23
 
24
24
  #### 01-readme-must-have-getting-started
25
25
 
@@ -31,7 +31,7 @@ These standards form a non-negotiable baseline. Individual projects may raise th
31
31
 
32
32
  **Required README structure:**
33
33
 
34
- ```markdown
34
+ ````markdown
35
35
  # Project Name
36
36
 
37
37
  One-line description.
@@ -46,7 +46,7 @@ npm install my-package
46
46
  import { myFunction } from "my-package";
47
47
  myFunction({ input: "value" });
48
48
  ```
49
- ```
49
+ ````
50
50
 
51
51
  ---
52
52
 
@@ -17,7 +17,7 @@ What error handling practices should be followed across all languages and projec
17
17
 
18
18
  **Follow a set of consistent error handling practices: catch only where you can handle, return errors as values at interfaces, centralize repetitive catch logic, communicate failure clearly at process and service boundaries, and exercise error paths with dedicated tests.**
19
19
 
20
- ### Implementation Details
20
+ ### Details
21
21
 
22
22
  #### 01-catch-only-where-handled
23
23
 
@@ -19,7 +19,7 @@ Question: What policy should developers follow to continuously enrich XDRs so re
19
19
 
20
20
  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.
21
21
 
22
- ### Implementation Details
22
+ ### Details
23
23
 
24
24
  - 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.
25
25
  - The non _local scope exists to share practices across projects, company areas, and functionally organized teams. Decisions placed in `_local` should be truly specific to the needs of a single application or repository.
@@ -43,4 +43,4 @@ Developers must treat reusable missing guidance discovered during implementation
43
43
  - [_core-adr-001](../../../_core/adrs/principles/001-xdrs-core.md)
44
44
  - [_core-article-001](../../../_core/adrs/principles/articles/001-xdrs-overview.md)
45
45
  - [agentme-article-001](articles/001-continuous-xdr-improvement.md)
46
- - [002-write-policy skill](../../../../.github/skills/002-write-policy/SKILL.md)
46
+ - [002-write-policy skill](../../../_core/adrs/principles/skills/002-write-policy/SKILL.md)
@@ -19,7 +19,7 @@ What baseline structure rules must every buildable module follow regardless of l
19
19
 
20
20
  Language-specific EDRs may add ecosystem details, but they must not redefine these baseline folder responsibilities.
21
21
 
22
- ### Implementation Details
22
+ ### Details
23
23
 
24
24
  #### 01-module-must-own-folder-root
25
25
 
@@ -0,0 +1,128 @@
1
+ ---
2
+ name: agentme-edr-policy-022-secrets-management
3
+ description: Defines how secrets (API keys, passwords, tokens, credentials, private certificates) must be stored, fetched, and provisioned. Use when implementing secret handling in any language or deployment target.
4
+ apply-to: All software projects handling secrets
5
+ valid-from: 2026-05-28
6
+ ---
7
+
8
+ # agentme-edr-policy-022: Secrets management
9
+
10
+ ## Context and Problem Statement
11
+
12
+ A "secret" is any sensitive information whose exposure would compromise security or access control. Examples include API keys, passwords, authentication tokens, credentials, and private certificates. Plain configuration data (feature flags, endpoint URLs, port numbers) is not a secret.
13
+
14
+ Secrets stored on disk — even in `.env` files excluded from version control — are vulnerable to accidental exposure, tooling leaks, and lateral movement after a compromise. Hardcoded or cached secrets resist rotation and create synchronization headaches across environments.
15
+
16
+ What practices should projects follow to handle secrets securely across local development and cloud deployments?
17
+
18
+ ## Decision Outcome
19
+
20
+ **Use native OS keychains for local development and cloud secret managers for deployed environments, accessed through a unified connector with ordered fallback.**
21
+
22
+ All implementation practices derive from three guiding principles:
23
+
24
+ 1. **Least exposure** — minimize the means, timespan, and surface of contact with the secret.
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.
27
+
28
+ ### Details
29
+
30
+ #### 01-no-secrets-on-disk
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.
33
+
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
+
36
+ ---
37
+
38
+ #### 02-local-dev-uses-native-keychain
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:
41
+
42
+ | Language | Library |
43
+ |----------|---------|
44
+ | Python | `keyring` |
45
+ | JavaScript/TypeScript | `cross-keychain` |
46
+ | Go | `go-keyring` |
47
+
48
+ The "group" (service name) defaults to the module name. The secret identifier should match the ID used in the cloud secret manager for consistency.
49
+
50
+ ---
51
+
52
+ #### 03-fallback-lookup-order
53
+
54
+ Secret fetching must implement a fallback chain in the following order:
55
+
56
+ 1. **Native OS keychain** — attempt to retrieve the secret using the local keychain library (used during local development).
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).
58
+ 3. **Raise an exception** — if both lookups fail, raise an exception with a clear message indicating both failed paths.
59
+
60
+ Example error message:
61
+ ```
62
+ Secret 'db-password' could not be found in keychain under group 'mymodule' or in AWS Secrets Manager under secretId 'db-password'
63
+ ```
64
+
65
+ ---
66
+
67
+ #### 04-secret-fetching-in-connector
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.
70
+
71
+ ---
72
+
73
+ #### 05-setup-secrets-makefile-target
74
+
75
+ Every module that requires secrets must expose a `setup-secrets` Makefile target. This target:
76
+
77
+ - Prompts the user for each required secret value interactively.
78
+ - If the user provides an empty value, the existing secret is not updated.
79
+ - Stores the provided value in the native OS keychain.
80
+ - Uses the module name as the default group (service name).
81
+ - Uses secret identifiers that match the cloud secret manager IDs.
82
+
83
+ The desired developer flow:
84
+
85
+ ```text
86
+ $ make run
87
+ Error: Secret 'api-key' could not be found in keychain under group 'mymodule'
88
+ or in AWS Secrets Manager under secretId 'api-key'
89
+
90
+ $ make setup-secrets
91
+ Enter value for 'api-key' (leave empty to skip):
92
+ > ****
93
+ Secret 'api-key' stored in keychain under group 'mymodule'.
94
+
95
+ $ make run
96
+ # Application starts successfully
97
+ ```
98
+
99
+ ---
100
+
101
+ #### 06-never-log-or-leak-secrets
102
+
103
+ 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.
104
+
105
+ ---
106
+
107
+ #### 07-prefer-dynamic-fetching
108
+
109
+ 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:
110
+
111
+ - Automatic password rotation without redeployment.
112
+ - Immediate propagation of rotated secrets.
113
+ - Reduced window of exposure if memory is compromised.
114
+
115
+ Short-lived caching (e.g., a few minutes) is acceptable when performance requires it, but must have an explicit TTL.
116
+
117
+ ---
118
+
119
+ #### 08-prefer-fetching-at-point-of-use
120
+
121
+ 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.
122
+
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.
124
+
125
+ ## References
126
+
127
+ - [agentme-edr-008](../devops/008-common-targets.md) - Common development script names (defines Makefile target conventions)
128
+ - [agentme-edr-009](009-error-handling.md) - Error handling (governs how the fallback exception should be raised)
@@ -2,13 +2,13 @@
2
2
 
3
3
  ## Overview
4
4
 
5
- This article explains how architects, engineers and business professionals should recognize, organize, and promote reusable delivery decisions into XDRs as a continuous improvement activity. It is aimed at people working with coding agents, vibe-coding loops, or SDD-oriented delivery who need a practical path from task friction to shared documentation.
5
+ A practical guide for recognizing recurring delivery decisions and promoting them into shared XDRs. Intended for engineers, architects, and business professionals working with coding agents or SDD-oriented delivery.
6
6
 
7
- Continuous improvement matters because delivery decisions do not stay correct forever. Team structures change, platforms evolve, tools mature, and the trade-offs behind earlier choices shift over time. If XDRs are not revisited and improved continuously, previously useful decisions become stale guidance and eventually turn into a form of legacy documentation that misleads delivery instead of guiding it.
7
+ ## Content
8
8
 
9
- Continuous improvement also keeps the target state explicit. As XDRs evolve across projects and tracks, teams need a clear shared view of where they are trying to converge, what remains intentionally different, and what should be treated as technical debt on the path toward that target. Keeping XDRs current reduces confusion about the desired future state and helps each project evolve toward it deliberately instead of drifting through ad hoc local decisions.
9
+ Delivery decisions do not stay correct forever. Team structures change, platforms evolve, tools mature, and the trade-offs behind earlier choices shift over time. If XDRs are not revisited and improved continuously, previously useful decisions become stale guidance that misleads delivery instead of guiding it.
10
10
 
11
- ## Content
11
+ Keeping XDRs current also makes the target state explicit. Teams need a clear shared view of where they are converging, what remains intentionally different, and what is technical debt on the path to that target.
12
12
 
13
13
  ### Start from delivery friction
14
14
 
@@ -90,4 +90,4 @@ If the same clarification would likely be needed in another feature, by another
90
90
  - [_core-adr-001](../../../../_core/adrs/principles/001-xdrs-core.md) - XDR structure, numbering, and mandatory template
91
91
  - [_core-article-001](../../../../_core/adrs/principles/articles/001-xdrs-overview.md) - XDR introduction and general adoption guidance
92
92
  - [agentme-edr-012](../012-continuous-xdr-enrichment.md) - Shared-first XDR enrichment policy and 80% coverage target
93
- - [002-write-policy skill](../../../../../.github/skills/002-write-policy/SKILL.md) - Step-by-step procedure for drafting new XDRs
93
+ - [002-write-policy skill](../../../../_core/adrs/principles/skills/002-write-policy/SKILL.md) - Step-by-step procedure for drafting new XDRs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentme",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "description": "",
5
5
  "dependencies": {
6
6
  "filedist": "^0.34.1"
@@ -22,6 +22,6 @@
22
22
  "url": "https://github.com/flaviostutz/agentme.git"
23
23
  },
24
24
  "devDependencies": {
25
- "xdrs-core": "^0.28.0"
25
+ "xdrs-core": "^0.28.1"
26
26
  }
27
27
  }