agentme 0.36.0 → 0.37.1

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 (56) hide show
  1. package/.filedist-package.yml +1 -1
  2. package/.xdrs/agentme/bdrs/index.md +2 -1
  3. package/.xdrs/agentme/bdrs/operations/{401-epic-feature-story-planning.md → 401-plan-epic-feature-story.md} +2 -2
  4. package/.xdrs/agentme/bdrs/operations/402-digital-product-roles.md +15 -19
  5. package/.xdrs/agentme/bdrs/operations/403-product-team-composition.md +3 -0
  6. package/.xdrs/agentme/bdrs/operations/404-team-roles-and-specialists.md +61 -82
  7. package/.xdrs/agentme/bdrs/operations/405-digital-product-roles-raci.md +131 -0
  8. package/.xdrs/agentme/bdrs/principles/002-okr-framework.md +1 -1
  9. package/.xdrs/agentme/bdrs/principles/003-product-delivery-value-flow.md +3 -2
  10. package/.xdrs/agentme/edrs/application/101-javascript-project-tooling.md +1 -1
  11. package/.xdrs/agentme/edrs/application/102-golang-project-tooling.md +1 -1
  12. package/.xdrs/agentme/edrs/application/103-python-project-tooling.md +1 -1
  13. package/.xdrs/agentme/edrs/application/127-external-system-adapter-skills.md +2 -0
  14. package/.xdrs/agentme/edrs/application/skills/{251-azure-devops-connector → azure-devops-connector}/SKILL.md +40 -9
  15. package/.xdrs/agentme/edrs/application/skills/{251-azure-devops-connector → azure-devops-connector}/SKILL.test.md +2 -2
  16. package/.xdrs/agentme/edrs/application/skills/{051-create-golang-project → create-golang-project}/SKILL.md +55 -2
  17. package/.xdrs/agentme/edrs/application/skills/create-golang-project/SKILL.test.md +72 -0
  18. package/.xdrs/agentme/edrs/application/skills/{050-create-javascript-project → create-javascript-project}/SKILL.md +57 -25
  19. package/.xdrs/agentme/edrs/application/skills/create-javascript-project/SKILL.test.md +72 -0
  20. package/.xdrs/agentme/edrs/application/skills/{052-create-python-project → create-python-project}/SKILL.md +36 -2
  21. package/.xdrs/agentme/edrs/application/skills/create-python-project/SKILL.test.md +79 -0
  22. package/.xdrs/agentme/edrs/application/skills/{250-github-connector → github-connector}/SKILL.md +39 -8
  23. package/.xdrs/agentme/edrs/application/skills/{250-github-connector → github-connector}/SKILL.test.md +2 -2
  24. package/.xdrs/agentme/edrs/application/skills/{200-run-skill-tests → run-skill-tests}/SKILL.md +39 -5
  25. package/.xdrs/agentme/edrs/application/skills/{200-run-skill-tests → run-skill-tests}/SKILL.test.md +8 -8
  26. package/.xdrs/agentme/edrs/application/skills/{010-select-relevant-xdrs → select-relevant-xdrs}/SKILL.md +36 -2
  27. package/.xdrs/agentme/edrs/application/skills/select-relevant-xdrs/SKILL.test.md +73 -0
  28. package/.xdrs/agentme/edrs/governance/502-contributing-guide-requirements.md +1 -1
  29. package/.xdrs/agentme/edrs/index.md +16 -11
  30. package/.xdrs/agentme/edrs/operations/402-dora-metrics-framework.md +82 -0
  31. package/.xdrs/agentme/edrs/operations/403-dora-deployment-frequency.md +37 -0
  32. package/.xdrs/agentme/edrs/operations/404-dora-lead-time-for-changes.md +41 -0
  33. package/.xdrs/agentme/edrs/operations/405-dora-change-failure-rate.md +42 -0
  34. package/.xdrs/agentme/edrs/operations/406-dora-time-to-restore-service.md +42 -0
  35. package/.xdrs/agentme/edrs/platform/301-monorepo-structure.md +1 -1
  36. package/.xdrs/agentme/edrs/platform/skills/{053-monorepo-setup → monorepo-setup}/SKILL.md +50 -16
  37. package/.xdrs/agentme/edrs/platform/skills/monorepo-setup/SKILL.test.md +80 -0
  38. package/.xdrs/agentme/edrs/principles/012-continuous-xdr-enrichment.md +1 -1
  39. package/.xdrs/agentme/edrs/principles/017-skill-testing.md +4 -4
  40. package/.xdrs/agentme/edrs/principles/articles/001-continuous-xdr-improvement.md +1 -1
  41. package/.xdrs/agentme/edrs/principles/skills/{150-refine-plan-mode → refine-plan-mode}/SKILL.md +43 -17
  42. package/.xdrs/agentme/edrs/principles/skills/{150-refine-plan-mode → refine-plan-mode}/SKILL.test.md +3 -3
  43. package/.xdrs/agentme/edrs/principles/skills/{151-refine-user-story → refine-user-story}/SKILL.md +42 -15
  44. package/.xdrs/agentme/edrs/principles/skills/{151-refine-user-story → refine-user-story}/SKILL.test.md +18 -18
  45. package/.xdrs/agentme/edrs/principles/skills/{400-pr-owner-assistant → resolve-pr-comments}/Makefile +1 -1
  46. package/.xdrs/agentme/edrs/principles/skills/resolve-pr-comments/SKILL.md +662 -0
  47. package/.xdrs/agentme/edrs/principles/skills/resolve-pr-comments/SKILL.test.md +165 -0
  48. package/.xdrs/agentme/edrs/principles/skills/{400-pr-owner-assistant → resolve-pr-comments}/scripts/post-replies-azure-devops.js +3 -3
  49. package/.xdrs/agentme/edrs/principles/skills/{400-pr-owner-assistant → resolve-pr-comments}/scripts/post-replies-azure-devops.test.js +5 -5
  50. package/.xdrs/agentme/edrs/principles/skills/{400-pr-owner-assistant → resolve-pr-comments}/scripts/post-replies-github.js +3 -3
  51. package/.xdrs/agentme/edrs/principles/skills/{400-pr-owner-assistant → resolve-pr-comments}/scripts/post-replies-github.test.js +4 -4
  52. package/.xdrs/agentme/edrs/principles/skills/{400-pr-owner-assistant → resolve-pr-comments}/scripts/update-section.js +84 -3
  53. package/.xdrs/agentme/edrs/principles/skills/{400-pr-owner-assistant → resolve-pr-comments}/scripts/update-section.test.js +125 -1
  54. package/package.json +2 -2
  55. package/.xdrs/agentme/edrs/principles/skills/400-pr-owner-assistant/SKILL.md +0 -633
  56. package/.xdrs/agentme/edrs/principles/skills/400-pr-owner-assistant/SKILL.test.md +0 -174
@@ -1,13 +1,14 @@
1
1
  ---
2
- name: 250-github-connector
2
+ name: github-connector
3
3
  description: >
4
4
  Base connector providing authentication, read access, and write access to GitHub pull
5
5
  requests and their comments via the gh CLI. Pure I/O -- no triage logic, no business
6
- decisions. Activate when an agent or skill (such as pr-owner-assistant) needs to fetch or
6
+ decisions. Activate when an agent or skill (such as resolve-pr-comments) needs to fetch or
7
7
  post PR comments, resolve review threads, or check out a PR branch on GitHub.
8
8
  metadata:
9
9
  author: flaviostutz
10
- version: "1.1"
10
+ version: "1.2.0"
11
+ updated: 2026-09-21
11
12
  ---
12
13
 
13
14
  ## Overview
@@ -18,9 +19,28 @@ Wraps the `gh` CLI -- GitHub's own supported API client -- so callers never cons
18
19
  REST/GraphQL calls or handle GitHub-specific auth themselves. Contains no business logic (per
19
20
  rule 05): it does not decide what a comment means, what action to take, or when to reply --
20
21
  it only reads and writes data and normalizes it to the shape consumed by
21
- [`400-pr-owner-assistant`](../../../principles/skills/400-pr-owner-assistant/SKILL.md).
22
+ [`resolve-pr-comments`](../../../principles/skills/resolve-pr-comments/SKILL.md).
22
23
 
23
- This is a base connector skill (number range 250-299).
24
+ ### Inputs
25
+
26
+ #### Required
27
+ - PR identifier (`owner/repo` + number) and operation
28
+
29
+ #### Optional
30
+ - Comment/thread id (replies, resolution)
31
+
32
+ ### Outputs
33
+
34
+ #### Contents
35
+ - Normalized comment/thread records; write confirmation
36
+
37
+ #### Changes
38
+ - PR comments, replies, thread resolution (writes only)
39
+
40
+ ### Halt Conditions
41
+ - `gh` CLI missing or unauthenticated
42
+ - Write operation lacks explicit human confirmation
43
+ - Only a non-`gh` HTTP fallback is available
24
44
 
25
45
  ## Instructions
26
46
 
@@ -72,7 +92,7 @@ Normalize every fetched item to the shared record shape (`id`, `kind`, `status`,
72
92
  `can_resolve`, `path`, `line`, `content`, `author`, `in_reply_to`, `diff_hunk`, `url`):
73
93
  - `kind` is `"issue-comment"`, `"review-comment"`, or `"review-summary"`.
74
94
  - `status` is `"resolved"` when the GraphQL thread lookup marks it resolved, else `"open"`.
75
- GitHub has no `wontfix`/`closed` state of its own -- `pr-owner-assistant` tracks those
95
+ GitHub has no `wontfix`/`closed` state of its own -- `resolve-pr-comments` tracks those
76
96
  locally.
77
97
  - `can_resolve` is `true` only for `"review-comment"` items belonging to a resolvable
78
98
  thread; `"issue-comment"` and `"review-summary"` are never resolvable -- set `false`.
@@ -179,9 +199,20 @@ thread via the GraphQL mutation using that comment's thread node id.
179
199
  `GH_PAGER=cat gh api repos/{owner}/{repo}/issues/{n}/comments`) when running non-
180
200
  interactively, which disables `gh`'s pager unconditionally.
181
201
 
202
+ ## Anti-Patterns
203
+
204
+ - **Mistake:** Falling back to `curl`/HTML scraping when `gh` is missing or unauthenticated.
205
+ **Why it happens:** The target data is often technically public, so a workaround feels harmless.
206
+ **Instead:** Stop at the Authentication check and wait for the human to fix `gh`.
207
+ - **Mistake:** Assuming a numeric REST comment/review id also works for GraphQL mutations.
208
+ **Why it happens:** Both values look like ordinary identifiers for the same comment.
209
+ **Instead:** Always resolve the thread's GraphQL node id first via `reviewThreads`.
210
+ - **Mistake:** Posting a write without showing the mandatory confirmation summary.
211
+ **Why it happens:** The payload already looks correct, so confirmation feels redundant.
212
+ **Instead:** Always show System/Operation/Fields/Impact and wait for explicit confirmation.
213
+
182
214
  ## References
183
215
 
184
- - [`400-pr-owner-assistant`](../../../principles/skills/400-pr-owner-assistant/SKILL.md) -- consumes this connector's normalized output.
216
+ - [`resolve-pr-comments`](../../../principles/skills/resolve-pr-comments/SKILL.md) -- consumes this connector's normalized output.
185
217
  - [`agentme-edr-127`](../../127-external-system-adapter-skills.md) -- external system adapter skill rules (connector naming, Known Issues format, HITL-before-write).
186
218
  - [`agentme-edr-124`](../../124-secrets-management.md) -- credential storage and retrieval.
187
- - [`agentme-core-adr-003`](../../../../../agentme-core/adrs/principles/003-skill-numbering-ranges.md) -- skill numbering ranges (250-299 base connectors).
@@ -1,6 +1,6 @@
1
1
  ---
2
- skill: 250-github-connector
3
- skill-version: "1.0"
2
+ skill: github-connector
3
+ skill-version: "1.2.0"
4
4
  ---
5
5
 
6
6
  ## Test Scenarios
@@ -1,23 +1,45 @@
1
1
  ---
2
- name: 200-run-skill-tests
2
+ name: run-skill-tests
3
3
  description: >
4
4
  Executes the SKILL.test.md test scenarios for a given skill, evaluates each assertion against the skill's
5
5
  actual output, and reports a pass/fail result per scenario. Activate when the user asks to test, verify,
6
6
  or validate a skill, or before merging a PR that modifies a skill or its SKILL.test.md.
7
7
  metadata:
8
8
  author: flaviostutz
9
- version: "1.0"
9
+ version: "1.1.0"
10
+ updated: 2026-09-21
10
11
  ---
11
12
 
12
13
  ## Overview
13
14
 
14
15
  Loads `SKILL.test.md` from a skill directory, runs each scenario by invoking the target skill with the specified trigger, evaluates every assertion against the output, and produces a structured test report.
15
16
 
17
+ ### Inputs
18
+
19
+ #### Required
20
+ - Path to the skill directory to test
21
+
22
+ #### Optional
23
+ - None
24
+
25
+ ### Outputs
26
+
27
+ #### Contents
28
+ - Structured PASS/FAIL test report, per scenario and assertion
29
+
30
+ #### Changes
31
+ - None (read-only; never modifies the skill or test file)
32
+
33
+ ### Halt Conditions
34
+ - Skill path not provided and not inferable from context
35
+ - Skill directory or `SKILL.test.md` not found
36
+ - `SKILL.test.md` has no scenarios
37
+
16
38
  ## Instructions
17
39
 
18
40
  ### Phase 1: Locate and Validate SKILL.test.md
19
41
 
20
- 1. Accept the skill path from the user (e.g., `.agents/skills/001-review` or `.xdrs/_local/adrs/principles/skills/005-my-skill`). If no path is given, ask: *"Which skill do you want to test? Provide the path to the skill directory."*
42
+ 1. Accept the skill path from the user (e.g., `.agents/skills/review` or `.xdrs/_local/adrs/principles/skills/005-my-skill`). If no path is given, ask: *"Which skill do you want to test? Provide the path to the skill directory."*
21
43
  2. Resolve the path to the directory containing `SKILL.md`. If the path is a symlink, follow it to the real directory.
22
44
  3. Check that `SKILL.test.md` exists in the same directory as `SKILL.md`. If it is missing, output:
23
45
 
@@ -91,9 +113,9 @@ A scenario passes only when every one of its assertions passes. The overall outc
91
113
 
92
114
  ## Examples
93
115
 
94
- **Input**: "Test the skill at `.agents/skills/001-review`"
116
+ **Input**: "Test the skill at `.agents/skills/review`"
95
117
 
96
- - Phase 1 resolves the symlink → `.xdrs/_core/adrs/principles/skills/001-review/`
118
+ - Phase 1 resolves the symlink → `.xdrs/_core/adrs/principles/skills/review/`
97
119
  - Reads `SKILL.test.md`, parses 3 scenarios
98
120
  - Executes each scenario with the target skill loaded
99
121
  - Reports per-assertion PASS/FAIL and an overall outcome
@@ -111,6 +133,18 @@ A scenario passes only when every one of its assertions passes. The overall outc
111
133
  - If the target skill fails to activate (e.g., not registered in VS Code), note this in the report as FAIL with reason "skill could not be activated" and continue to remaining scenarios.
112
134
  - If `skill-version` in `SKILL.test.md` does not match `SKILL.md`, emit a WARNING at the top of the report but do not halt.
113
135
 
136
+ ## Anti-Patterns
137
+
138
+ - **Mistake:** Modifying the skill or its test file while testing it.
139
+ **Why it happens:** An obvious bug seen mid-test is tempting to fix right away.
140
+ **Instead:** Never modify either file; only report the FAIL and evidence.
141
+ - **Mistake:** Treating an INCONCLUSIVE assertion as a pass.
142
+ **Why it happens:** An ambiguous result can feel close enough to success.
143
+ **Instead:** Always treat INCONCLUSIVE the same as FAIL, with a reason.
144
+ - **Mistake:** Silently continuing when `skill-version` mismatches `SKILL.md`.
145
+ **Why it happens:** A version-string mismatch looks cosmetic and unimportant.
146
+ **Instead:** Emit a visible WARNING at the top of the report.
147
+
114
148
  ## References
115
149
 
116
150
  - [`agentme-edr-policy-017`](../../../principles/017-skill-testing.md) — Skill testing mandate and SKILL.test.md format specification
@@ -1,6 +1,6 @@
1
1
  ---
2
- skill: 200-run-skill-tests
3
- skill-version: "1.0"
2
+ skill: run-skill-tests
3
+ skill-version: "1.1.0"
4
4
  ---
5
5
 
6
6
  ## Test Scenarios
@@ -8,9 +8,9 @@ skill-version: "1.0"
8
8
  ### Scenario 1: Successfully executes scenarios and reports results
9
9
 
10
10
  **Trigger / Input**
11
- You are an agent with the `200-run-skill-tests` skill loaded. The workspace has a skill at `.agents/skills/001-review` with both `SKILL.md` and `SKILL.test.md` present. The user says:
11
+ You are an agent with the `run-skill-tests` skill loaded. The workspace has a skill at `.agents/skills/review` with both `SKILL.md` and `SKILL.test.md` present. The user says:
12
12
 
13
- "Test the skill at `.agents/skills/001-review`"
13
+ "Test the skill at `.agents/skills/review`"
14
14
 
15
15
  **Expected Behaviour**
16
16
  1. Skill resolves the path to the real directory (following the symlink).
@@ -22,7 +22,7 @@ You are an agent with the `200-run-skill-tests` skill loaded. The workspace has
22
22
  7. Skill outputs a structured report using the mandated template with a final Outcome line.
23
23
 
24
24
  **Assertions**
25
- - [ ] Output contains `## Skill Test Report: 001-review`.
25
+ - [ ] Output contains `## Skill Test Report: review`.
26
26
  - [ ] Output contains a `### Scenario` section for each scenario in `SKILL.test.md`.
27
27
  - [ ] Each scenario section lists individual assertion results as `PASS` or `FAIL`.
28
28
  - [ ] Output ends with a `## Summary` block containing `Scenarios:`, `Passed:`, `Failed:`, and `Outcome:`.
@@ -30,9 +30,9 @@ You are an agent with the `200-run-skill-tests` skill loaded. The workspace has
30
30
  ### Scenario 2: Halts with ERROR when SKILL.test.md is missing
31
31
 
32
32
  **Trigger / Input**
33
- You are an agent with the `200-run-skill-tests` skill loaded. The workspace has a skill directory `.xdrs/agentme/edrs/application/skills/050-create-javascript-project` that contains `SKILL.md` but no `SKILL.test.md`. The user says:
33
+ You are an agent with the `run-skill-tests` skill loaded. The workspace has a skill directory `.xdrs/agentme/edrs/application/skills/create-javascript-project` that contains `SKILL.md` but no `SKILL.test.md`. The user says:
34
34
 
35
- "Run tests for `.xdrs/agentme/edrs/application/skills/050-create-javascript-project`"
35
+ "Run tests for `.xdrs/agentme/edrs/application/skills/create-javascript-project`"
36
36
 
37
37
  **Expected Behaviour**
38
38
  1. Skill resolves the path to the directory.
@@ -49,7 +49,7 @@ You are an agent with the `200-run-skill-tests` skill loaded. The workspace has
49
49
  ### Scenario 3: Injects simulated human responses when present
50
50
 
51
51
  **Trigger / Input**
52
- You are an agent with the `200-run-skill-tests` skill loaded. The workspace has a skill at `.xdrs/agentme/edrs/principles/skills/refine-plan-mode` with both `SKILL.md` and `SKILL.test.md` present. Scenario 1 in that `SKILL.test.md` includes a `**Simulated Human Responses**` section with 9 ordered responses. The user says:
52
+ You are an agent with the `run-skill-tests` skill loaded. The workspace has a skill at `.xdrs/agentme/edrs/principles/skills/refine-plan-mode` with both `SKILL.md` and `SKILL.test.md` present. Scenario 1 in that `SKILL.test.md` includes a `**Simulated Human Responses**` section with 9 ordered responses. The user says:
53
53
 
54
54
  "Test the skill at `.xdrs/agentme/edrs/principles/skills/refine-plan-mode`"
55
55
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: 010-select-relevant-xdrs
2
+ name: select-relevant-xdrs
3
3
  description: >
4
4
  Analyzes a client repository, extracts the full agentme XDR set, and excludes the records that do
5
5
  not fit the project's structure and workflow needs. Activate this skill when the user asks to
@@ -7,7 +7,8 @@ description: >
7
7
  bootstrap agentme guidance into a repository without manually deciding which records to keep.
8
8
  metadata:
9
9
  author: flaviostutz
10
- version: "1.0"
10
+ version: "1.1.0"
11
+ updated: 2026-09-21
11
12
  compatibility: Node.js 18+
12
13
  ---
13
14
 
@@ -17,6 +18,27 @@ Installs the full agentme XDR set for a repository through the published CLI, th
17
18
  records that clearly do not fit the target project by passing explicit `--exclude` flags during
18
19
  extraction.
19
20
 
21
+ ### Inputs
22
+
23
+ #### Required
24
+ - Target repository to install/update agentme XDRs into
25
+
26
+ #### Optional
27
+ - Explicit list of XDRs to keep or exclude
28
+
29
+ ### Outputs
30
+
31
+ #### Contents
32
+ - Installed `.xdrs/` tree, minus excluded records
33
+
34
+ #### Changes
35
+ - Existing `.xdrs/` merged/updated in place
36
+
37
+ ### Halt Conditions
38
+ - Package does not expose enough metadata to enumerate shipped XDRs
39
+ - Extraction would overwrite locally customized agent files
40
+ - Candidate exclusion is debatable (keep instead of guessing)
41
+
20
42
  ## Instructions
21
43
 
22
44
  ### Phase 1: Discover the available extractable artifacts
@@ -131,6 +153,18 @@ Input: "Set up agentme for this repo"
131
153
  - If the repository is a spike or intentionally minimal experiment, still prefer the smallest preset
132
154
  set of workflow artifacts and avoid adding scaffolding that the project will not use.
133
155
 
156
+ ## Anti-Patterns
157
+
158
+ - **Mistake:** Excluding an XDR whenever its fit is merely debatable.
159
+ **Why it happens:** Fewer records feels like a cleaner, more tailored result.
160
+ **Instead:** Keep the XDR; exclude only records that clearly do not fit.
161
+ - **Mistake:** Overwriting locally customized agent files during extraction.
162
+ **Why it happens:** Preset extraction defaults to replacing existing files.
163
+ **Instead:** Warn the user first and describe the likely merge points.
164
+ - **Mistake:** Failing immediately when the CLI cannot list shipped XDRs directly.
165
+ **Why it happens:** The direct enumeration path is the expected happy path.
166
+ **Instead:** Fall back to published package metadata or the README inventory.
167
+
134
168
  ## References
135
169
 
136
170
  - [agentme README](../../../../../../README.md)
@@ -0,0 +1,73 @@
1
+ ---
2
+ skill: select-relevant-xdrs
3
+ skill-version: "1.1.0"
4
+ ---
5
+
6
+ ## Test Scenarios
7
+
8
+ ### Scenario 1: Install presets for a single-package Node.js library, happy path
9
+
10
+ **Trigger / Input**
11
+
12
+ "Install the right agentme XDR presets for this Node.js library." The repository is a single npm
13
+ package with a Makefile and no Go code, no monorepo layout, and no deployed/long-running service.
14
+
15
+ **Expected Behaviour**
16
+
17
+ 1. Phase 1 inventories the shipped agentme XDR files.
18
+ 2. Phase 2 analyzes the repository and detects a JavaScript/TypeScript single-package library with
19
+ Makefiles, no Go tooling, no monorepo structure, and no service surface.
20
+ 3. Phase 3 selects exclusions with one-line rationale each — at minimum the Go project tooling XDR
21
+ and the service health-check XDR — while keeping baseline/broadly applicable guidance.
22
+ 4. Phase 4 runs `npx -y agentme extract --output . --all --exclude <path> --exclude <path>` with
23
+ one `--exclude` flag per excluded XDR, then verifies `.xdrs/index.md`, `.xdrs/agentme/`, and
24
+ `AGENTS.md` exist and that every excluded path is absent from the output.
25
+
26
+ **Assertions**
27
+
28
+ - [ ] Output excludes `.xdrs/agentme/edrs/application/102-golang-project-tooling.md` and
29
+ `.xdrs/agentme/edrs/operations/401-service-health-check-endpoint.md` with a one-line
30
+ rationale for each.
31
+ - [ ] Output runs `agentme extract` with `--all` plus one `--exclude` flag per excluded XDR path,
32
+ rather than a hand-picked include list.
33
+ - [ ] Output verifies after extraction that `.xdrs/index.md`, `.xdrs/agentme/`, and `AGENTS.md`
34
+ exist and that the excluded paths are absent from the result.
35
+
36
+ ### Scenario 2: Extraction blocked when the package exposes no inventory metadata
37
+
38
+ **Trigger / Input**
39
+
40
+ Run the skill in an environment where the CLI cannot enumerate the shipped XDRs, and the package
41
+ metadata and repository documentation also do not describe the shipped XDR set.
42
+
43
+ **Expected Behaviour**
44
+
45
+ Per Phase 1 step 4, since even the fallback inventory sources fail, the skill stops before
46
+ attempting any extraction and reports that automatic selection is blocked because the package does
47
+ not expose enough metadata in the current environment, rather than guessing an exclude list or
48
+ forcing a full installation.
49
+
50
+ **Assertions**
51
+
52
+ - [ ] Output stops before running any `agentme extract` command.
53
+ - [ ] Output reports that automatic selection is blocked due to insufficient package metadata,
54
+ rather than silently falling back to a default guess.
55
+
56
+ ### Scenario 3: Debatable exclusion is kept, not excluded
57
+
58
+ **Trigger / Input**
59
+
60
+ Analyzing a currently single-package repository whose README states the team is planning to split
61
+ it into multiple applications "sometime in the future." Whether the monorepo-structure XDR still
62
+ applies is debatable.
63
+
64
+ **Expected Behaviour**
65
+
66
+ Per the Edge Cases entry on debatable exclusions, since the mismatch is not concrete today, the
67
+ skill keeps the monorepo-structure XDR in the installed set rather than excluding it on the basis
68
+ of a possible future restructuring.
69
+
70
+ **Assertions**
71
+
72
+ - [ ] Output keeps `.xdrs/agentme/edrs/platform/301-monorepo-structure.md` in the installed set.
73
+ - [ ] Output does not add it to the exclude list on the basis of a future, not-yet-concrete plan.
@@ -67,4 +67,4 @@ The content SHOULD stay concise and practical; do not turn `CONTRIBUTING.md` int
67
67
  ## References
68
68
 
69
69
  - [agentme-edr-301 - Monorepo structure](../platform/301-monorepo-structure.md)
70
- - [053-monorepo-setup skill](../platform/skills/053-monorepo-setup/SKILL.md)
70
+ - [monorepo-setup skill](../platform/skills/monorepo-setup/SKILL.md)
@@ -8,12 +8,12 @@ Propose changes via pull request. All changes must be verified for clarity and n
8
8
 
9
9
  Foundational standards, principles, and guidelines.
10
10
 
11
- - [150-refine-plan-mode](principles/skills/150-refine-plan-mode/SKILL.md) - **Refine plan mode** — MANDATORY skill for ANY planning activity (plan, design, propose, outline, draft, brainstorm, architect). Read and follow in full before any execution begins. Must be read from XDRS even when not in `.agents/skills`. *(skill)*
12
- - [151-refine-user-story](principles/skills/151-refine-user-story/SKILL.md) - **Refine user stories** — Refine, elaborate, study or develop the contents of a user story used to create a unit of work for an agile team. Runs a structured 10-phase refinement process: understand the request, qualify requirements, research context, review consistency, validate visually, challenge from 9 user-perspective angles (Phase 6), challenge from 8 implementer-perspective angles (Phase 7), produce a ready-to-implement story (Phase 8), and run a final readiness double-check (Phase 9). *(skill)*
13
- - [400-pr-owner-assistant](principles/skills/400-pr-owner-assistant/SKILL.md) - **PR owner assistant** — Helps the OWNER of a pull request work through comments left by others: fetches every comment (GitHub or Azure DevOps) from its URL, tracks them in a local file, and walks through triaging each one (reply-question, won't-fix, work-on-a-fix) with explicit human confirmation at every step. A hands-on, mutating workflow to answer feedback and land fixes -- not a code-review skill. Delegates provider-specific reads/writes to `250-github-connector` or `251-azure-devops-connector`. *(skill)*
11
+ - [refine-plan-mode](principles/skills/refine-plan-mode/SKILL.md) - **Refine plan mode** — MANDATORY skill for ANY planning activity (plan, design, propose, outline, draft, brainstorm, architect). Read and follow in full before any execution begins. Must be read from XDRS even when not in `.agents/skills`. *(skill)*
12
+ - [refine-user-story](principles/skills/refine-user-story/SKILL.md) - **Refine user stories** — Refine, elaborate, study or develop the contents of a user story used to create a unit of work for an agile team. Runs a structured 10-phase refinement process: understand the request, qualify requirements, research context, review consistency, validate visually, challenge from 9 user-perspective angles (Phase 6), challenge from 8 implementer-perspective angles (Phase 7), produce a ready-to-implement story (Phase 8), and run a final readiness double-check (Phase 9). *(skill)*
13
+ - [resolve-pr-comments](principles/skills/resolve-pr-comments/SKILL.md) - **Resolve PR comments** — Helps the OWNER of a pull request work through comments left by others: fetches every comment (GitHub or Azure DevOps) from its URL, tracks them in a local file, and walks through triaging each one (reply, won't-fix, fix) at a human-chosen automation level -- from fully automatic to fully guided, with fine-grained free-text control over the mix -- while syncing back to the provider always stays its own explicitly confirmed step. A hands-on, mutating workflow to answer feedback and land fixes -- not a code-review skill. Delegates provider-specific reads/writes to `github-connector` or `azure-devops-connector`. *(skill)*
14
14
  - [agentme-edr-012](principles/012-continuous-xdr-enrichment.md) - **Continuous xdr improvement policy** - Promote recurring delivery lessons into reusable XDRs
15
15
  - [agentme-edr-016](principles/016-cross-language-module-structure.md) - **Cross-language module structure** - Organize modules consistently across supported languages
16
- - [agentme-edr-017](principles/017-skill-testing.md) - **skill testing** - Mandates a `SKILL.test.md` co-located with every skill in scopes that follow agentme; defines test scenario format (trigger, expected behaviour, assertions) and requires execution before merging any skill change *(includes skill: [200-run-skill-tests](application/skills/200-run-skill-tests/SKILL.md))*
16
+ - [agentme-edr-017](principles/017-skill-testing.md) - **skill testing** - Mandates a `SKILL.test.md` co-located with every skill in scopes that follow agentme; defines test scenario format (trigger, expected behaviour, assertions) and requires execution before merging any skill change *(includes skill: [run-skill-tests](application/skills/run-skill-tests/SKILL.md))*
17
17
 
18
18
  ## Articles
19
19
 
@@ -31,17 +31,17 @@ Language and framework-specific tooling and project structure.
31
31
  - [agentme-edr-124](application/124-secrets-management.md) - **Secrets management** - Handle secrets securely using native keychains and cloud secret managers
32
32
  - [agentme-edr-125](application/125-coding-abstraction-practices.md) - **Coding abstraction practices** - Define when abstractions are justified and when they must be inlined
33
33
  - [agentme-edr-127](application/127-external-system-adapter-skills.md) - **External system adapter skills** - Priority-ordered approach and adapter skill authoring standards for automating interactions with external systems
34
- - [250-github-connector](application/skills/250-github-connector/SKILL.md) - **GitHub connector** — Base connector providing authentication, read access, and write access to GitHub pull requests and their comments via the `gh` CLI. *(skill)*
35
- - [251-azure-devops-connector](application/skills/251-azure-devops-connector/SKILL.md) - **Azure DevOps connector** — Base connector providing authentication, read access, and write access to Azure DevOps pull requests and their comment threads via the `az` CLI. *(skill)*
34
+ - [github-connector](application/skills/github-connector/SKILL.md) - **GitHub connector** — Base connector providing authentication, read access, and write access to GitHub pull requests and their comments via the `gh` CLI. *(skill)*
35
+ - [azure-devops-connector](application/skills/azure-devops-connector/SKILL.md) - **Azure DevOps connector** — Base connector providing authentication, read access, and write access to Azure DevOps pull requests and their comment threads via the `az` CLI. *(skill)*
36
36
 
37
37
  ### Language and framework tooling
38
38
 
39
- - [agentme-edr-101](application/101-javascript-project-tooling.md) - **JavaScript project tooling and structure** - Scaffold JavaScript libraries with the standard toolchain *(includes skill: [050-create-javascript-project](application/skills/050-create-javascript-project/SKILL.md))*
40
- - [agentme-edr-102](application/102-golang-project-tooling.md) - **Go project tooling and structure** - Scaffold Go CLIs and libraries with the standard layout *(includes skill: [051-create-golang-project](application/skills/051-create-golang-project/SKILL.md))*
41
- - [agentme-edr-103](application/103-python-project-tooling.md) - **Python project tooling and structure** - Scaffold Python packages and CLIs with the standard layout *(includes skill: [052-create-python-project](application/skills/052-create-python-project/SKILL.md))*
39
+ - [agentme-edr-101](application/101-javascript-project-tooling.md) - **JavaScript project tooling and structure** - Scaffold JavaScript libraries with the standard toolchain *(includes skill: [create-javascript-project](application/skills/create-javascript-project/SKILL.md))*
40
+ - [agentme-edr-102](application/102-golang-project-tooling.md) - **Go project tooling and structure** - Scaffold Go CLIs and libraries with the standard layout *(includes skill: [create-golang-project](application/skills/create-golang-project/SKILL.md))*
41
+ - [agentme-edr-103](application/103-python-project-tooling.md) - **Python project tooling and structure** - Scaffold Python packages and CLIs with the standard layout *(includes skill: [create-python-project](application/skills/create-python-project/SKILL.md))*
42
42
  - [agentme-edr-104](application/104-cli-tool-standards.md) - **CLI tool standards** - Define command UX and behavior for CLI tools
43
43
  - [agentme-edr-126](application/126-pragmatic-hexagonal-architecture.md) - **Pragmatic hexagonal architecture** - Organize application layers as External/Adapters/Application with practical coupling rules
44
- - [010-select-relevant-xdrs](application/skills/010-select-relevant-xdrs/SKILL.md) - **Select relevant XDRs**
44
+ - [select-relevant-xdrs](application/skills/select-relevant-xdrs/SKILL.md) - **Select relevant XDRs**
45
45
 
46
46
  ### AI development
47
47
 
@@ -75,7 +75,7 @@ Data layer implementation and data management decisions.
75
75
 
76
76
  Infrastructure implementation, delivery pipeline, and developer environment decisions.
77
77
 
78
- - [agentme-edr-301](platform/301-monorepo-structure.md) - **Monorepo structure** - Standardize monorepo layout, tooling, and package boundaries *(includes skill: [053-monorepo-setup](platform/skills/053-monorepo-setup/SKILL.md))*
78
+ - [agentme-edr-301](platform/301-monorepo-structure.md) - **Monorepo structure** - Standardize monorepo layout, tooling, and package boundaries *(includes skill: [monorepo-setup](platform/skills/monorepo-setup/SKILL.md))*
79
79
  - [agentme-edr-302](platform/302-github-pipelines.md) - **GitHub CI/CD pipelines** - Define required CI stages and workflow structure
80
80
  - [agentme-edr-303](platform/303-common-targets.md) - **Common development script names** - Reuse standard build, lint, and test target names
81
81
  - [agentme-edr-304](platform/304-tool-execution-and-scripting.md) - **Tool execution and scripting** - Run tools consistently across shells, Makefiles, and CI
@@ -93,3 +93,8 @@ Contribution and collaboration standards shared across projects.
93
93
  Production behavior and operational response decisions.
94
94
 
95
95
  - [agentme-edr-401](operations/401-service-health-check-endpoint.md) - **Service health check endpoint** - Expose a standard runtime health-check endpoint for services
96
+ - [agentme-edr-402](operations/402-dora-metrics-framework.md) - **DORA metrics framework** - Per-service/team measurement, sub-metric composition, maturity tiers, and adoption order for DORA's four key metrics
97
+ - [agentme-edr-403](operations/403-dora-deployment-frequency.md) - **DORA deployment frequency** - Calculation, examples, and challenges for deploys-per-week, batch size, and automation ratio
98
+ - [agentme-edr-404](operations/404-dora-lead-time-for-changes.md) - **DORA lead time for changes** - Calculation, examples, and challenges for PR cycle time, review latency, deploy-pipeline time, and total lead time
99
+ - [agentme-edr-405](operations/405-dora-change-failure-rate.md) - **DORA change failure rate** - Calculation, examples, and challenges for hotfix/revert rate, incident-linked deploy rate, and escaped defect rate, including cross-team attribution
100
+ - [agentme-edr-406](operations/406-dora-time-to-restore-service.md) - **DORA time to restore service** - Calculation, examples, and challenges for total restore time, detection time, acknowledgement time, and resolution time
@@ -0,0 +1,82 @@
1
+ ---
2
+ name: agentme-edr-policy-402-dora-metrics-framework
3
+ description: Defines the framework for measuring DORA's four software delivery metrics per team and service, including sub-metric composition, maturity-tier definition, distribution reporting, adoption order, and daily usage by role. Use when implementing or reviewing DORA metrics measurement, dashboards, or reporting.
4
+ apply-to: Teams and organizations measuring, reporting, or improving software delivery performance using DORA's four key metrics
5
+ valid-from: 2026-09-18
6
+ ---
7
+
8
+ # agentme-edr-policy-402: DORA metrics framework
9
+
10
+ ## Context and Problem Statement
11
+
12
+ Teams need objective signals of software delivery performance, but without a shared framework, teams measure different things, blend unlike services together, or reduce delivery health to one misleading number. How should DORA's four key metrics be scoped, combined into a maturity signal, and used across teams so results stay comparable, actionable, and resistant to gaming?
13
+
14
+ ## Decision Outcome
15
+
16
+ **Adopt DORA's four key metrics, each measured per service and rolled up per team, decomposed into incrementally-adoptable sub-metrics defined in one companion policy per metric.**
17
+
18
+ Every team gets a maturity tier per metric plus one blended tier; company-wide reporting always shows a tier distribution, never a company-wide average.
19
+
20
+ ### Details
21
+
22
+ #### 01-four-key-metrics
23
+
24
+ This framework covers DORA's four key metrics: Deployment Frequency ([agentme-edr-403](403-dora-deployment-frequency.md)), Lead Time for Changes ([agentme-edr-404](404-dora-lead-time-for-changes.md)), Change Failure Rate ([agentme-edr-405](405-dora-change-failure-rate.md)), and Time to Restore Service ([agentme-edr-406](406-dora-time-to-restore-service.md); DORA's current term is "Failed Deployment Recovery Time"). Sub-metrics MUST follow a hybrid composition model: Lead Time and Time to Restore sub-metrics are additive and sum to the parent value, while Deployment Frequency and Change Failure Rate sub-metrics are complementary signals that MUST NOT be summed. All time-based sub-metrics MUST use the median (p50) as the headline statistic instead of the mean, to resist outlier skew; percentile bands (p85/p95) MAY be added for distribution visibility.
25
+
26
+ #### 02-per-service-and-team-accounting
27
+
28
+ Every metric and sub-metric MUST be measured and reported per team, never only as an org-wide aggregate. The atomic unit of attribution MUST be the deployable service, not the team directly: a team's figures MUST be a rollup of its owned services, per [agentme-bdr-402](../../bdrs/operations/402-digital-product-roles.md)'s `01-product-team-purpose`/`02-product-team-scope-of-work` (a team owns its product's full lifecycle end-to-end). A change touching multiple services MUST be measured independently against each affected service's own timeline; it MUST NOT be flagged as cross-team or assigned to one majority owner.
29
+
30
+ #### 03-artifact-to-service-mapping
31
+
32
+ Code-path-based artifacts (pull requests, commits, deploy-workflow runs) MUST be attributed to a service using the repository's CODEOWNERS file, with path patterns defined at service-directory granularity. CODEOWNERS MUST NOT be used for GH Issues, since issues have no file path; issue-based sub-metrics MUST instead use an explicit label or component convention (for example a `service:<name>` label) cross-walked to the owning service.
33
+
34
+ #### 04-cross-team-incident-attribution
35
+
36
+ When an incident's root cause is traced to a different team's change, it MUST be counted against the root-cause team's Change Failure Rate ([agentme-edr-405](405-dora-change-failure-rate.md)) and, separately, tagged as a non-tiered visibility signal for the impacted team. It MUST NOT be double-counted into the impacted team's own numerator. Root-cause determination MUST follow [agentme-bdr-405](../../bdrs/operations/405-digital-product-roles-raci.md)'s `04-accountability-network-and-root-cause-tracing` methodology rather than a separate one defined here.
37
+
38
+ #### 05-maturity-level-definition
39
+
40
+ Each team MUST be assigned a named maturity tier (Elite, High, Medium, or Low, per DORA's current published bands, cited and dated rather than hardcoded here) for each of the four metrics. Each team MUST also receive one blended maturity label equal to the floor (worst) of its four per-metric tiers. This floor combination is this framework's own practical proxy, since DORA does not publish an official per-team combination formula; it is grounded in DORA's own finding that top performers tend to do well across all metrics. A Low tier on a metric with a genuine regulatory floor MUST NOT be treated as an excuse to stop improving the rest of that metric or any other metric within the team's control.
41
+
42
+ #### 06-maturity-level-distribution-reporting
43
+
44
+ Maturity level MUST NOT be averaged across teams into one company-wide figure. Company-wide reporting MUST show the percentage of teams at each blended tier as the headline view, with the four per-metric tier distributions available as a supporting drill-down. Distributions MUST NOT be used to rank or compete teams against each other, and individual team results MUST NOT be reported in a way that isolates one team's metrics from the others' — both patterns are documented by DORA as pitfalls that fuel finger-pointing and gaming.
45
+
46
+ #### 07-adoption-order
47
+
48
+ Teams SHOULD adopt the four metrics in this order: Deployment Frequency, then Lead Time for Changes, then Change Failure Rate, then Time to Restore Service. Each step needs one more data source or organizational capability than the last (deploy-workflow history only; then PR data; then a failure-labeling convention; then incident-management timestamps), and DORA's research shows that improving batch size and frequency first cascades into better lead time and stability. Each companion policy defines its own internal sub-metric adoption order using the same ease-plus-impact rationale.
49
+
50
+ #### 08-daily-usage-by-role
51
+
52
+ Roles SHOULD consult these metrics at the cadence below when carrying out their accountabilities as defined in [agentme-bdr-402](../../bdrs/operations/402-digital-product-roles.md), [agentme-bdr-404](../../bdrs/operations/404-team-roles-and-specialists.md), and [agentme-bdr-405](../../bdrs/operations/405-digital-product-roles-raci.md):
53
+
54
+ | Role | Cadence | Usage |
55
+ |---|---|---|
56
+ | Tech Lead / AI Lead | Daily | Primary consumer; accountable for CI/CD pipeline health and incident response; reads review latency ([agentme-edr-404](404-dora-lead-time-for-changes.md) `02`) jointly with Change Failure Rate to catch rubber-stamping |
57
+ | PO | Weekly | Reads Deployment Frequency and Lead Time alongside Change Failure Rate before go-live approvals |
58
+ | EM | Weekly/quarterly | Cross-checks a sustained Low tier against the team's `agentme-bdr-402` `03-workforce-allocation` operations-and-controls capacity |
59
+ | PjM | As-needed | Investigates cross-team blockers when Lead Time or Change Failure Rate issues trace to cross-team dependencies |
60
+ | PM / Leadership | Quarterly | Reads the tier distribution from rule `06`, never a company-wide average |
61
+
62
+ ## Considered Options
63
+
64
+ * (REJECTED) **Single composite delivery score** — blend all four metrics into one number
65
+ * Reason: Hides which metric needs attention; contradicts DORA's own guidance against "one metric to rule them all"
66
+ * (REJECTED) **Company-wide averaged maturity score** — one blended number across all teams
67
+ * Reason: Masks teams that need help; contradicts DORA's guidance against disparate comparisons and siloed competition
68
+ * (REJECTED) **Strict-composition redesign for Deployment Frequency and Change Failure Rate** — force all sub-metrics to sum to the parent value
69
+ * Reason: Would require dropping batch size (an orthogonal dimension) and escaped-defect-rate (different attribution lag) to force a clean sum
70
+
71
+ ## References
72
+
73
+ - [DORA's software delivery performance metrics](https://dora.dev/guides/dora-metrics-four-keys/)
74
+ - [agentme-edr-403](403-dora-deployment-frequency.md) — Deployment Frequency
75
+ - [agentme-edr-404](404-dora-lead-time-for-changes.md) — Lead Time for Changes
76
+ - [agentme-edr-405](405-dora-change-failure-rate.md) — Change Failure Rate
77
+ - [agentme-edr-406](406-dora-time-to-restore-service.md) — Time to Restore Service
78
+ - [agentme-edr-401](401-service-health-check-endpoint.md) — Service health check endpoint
79
+ - [agentme-edr-302](../platform/302-github-pipelines.md) — GitHub CI/CD pipelines
80
+ - [agentme-bdr-402](../../bdrs/operations/402-digital-product-roles.md) — Digital product roles: org & cross-team
81
+ - [agentme-bdr-404](../../bdrs/operations/404-team-roles-and-specialists.md) — Digital product roles: team & specialists
82
+ - [agentme-bdr-405](../../bdrs/operations/405-digital-product-roles-raci.md) — Digital product roles: RACI
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: agentme-edr-policy-403-dora-deployment-frequency
3
+ description: Defines calculation, examples, and challenges for DORA's Deployment Frequency metric and its deploys-per-week, batch-size, and automation-ratio sub-metrics. Use when instrumenting or reviewing deployment frequency measurement.
4
+ apply-to: Teams and organizations measuring, reporting, or improving software delivery performance using DORA's four key metrics
5
+ valid-from: 2026-09-18
6
+ ---
7
+
8
+ # agentme-edr-policy-403: DORA deployment frequency
9
+
10
+ ## Context and Problem Statement
11
+
12
+ Deployment Frequency is the easiest of DORA's four metrics to start measuring, but teams need a concrete, per-service calculation method rather than just the concept. How should deploys-per-week, batch size, and automation ratio be calculated, and in what order should a team adopt them?
13
+
14
+ ## Decision Outcome
15
+
16
+ **Measure three complementary, non-summing sub-metrics per deployable service, adopted in order of increasing data-source complexity.**
17
+
18
+ Each sub-metric MUST be scoped per [agentme-edr-402](402-dora-metrics-framework.md)'s `02-per-service-and-team-accounting` and rolled up per team; none of the three sum to a single formula.
19
+
20
+ ### Details
21
+
22
+ #### 01-deploys-per-week
23
+
24
+ Deploys-per-week MUST be calculated by counting successful deploy-workflow runs on the service's default or release branch per week, using CODEOWNERS to attribute each run to its service. Example: a service with 12 successful deploy runs over 4 weeks has a Deployment Frequency of 3/week. Challenges: a change touching multiple services MUST be counted independently against each service's own timeline; the measurement window MUST span the service's own release-train or freeze-window cadence rather than a fixed calendar snapshot; "one deploy event" for canary, staged, or multi-region rollouts MUST be defined consistently per service (for example, pipeline-run start); re-run or retry executions of the same release MUST NOT inflate the count. This is the first sub-metric to adopt: it needs only deploy-workflow history as a single data source, and gives the fastest, most direct throughput signal.
25
+
26
+ #### 02-batch-size
27
+
28
+ Batch size MUST be calculated by counting commits or PRs merged between two consecutive deploys of the same service. Example: 8 PRs merged between deploy N and deploy N+1 gives a batch size of 8. Challenges: squash-merge collapses commit history, so the count MUST be based on merged PRs rather than raw commits. Teams SHOULD adopt this second: it needs no data source beyond `01`'s deploy history, and is a leading indicator for both Lead Time and Change Failure Rate risk (see [agentme-edr-402](402-dora-metrics-framework.md)'s `07-adoption-order`).
29
+
30
+ #### 03-automation-ratio
31
+
32
+ Automation ratio MUST be calculated by dividing automated deploy-workflow runs (triggered by merge, tag, or schedule) by all deploy-workflow runs for the service. Example: 18 automated of 20 total runs gives a 90% automation ratio. Challenges: a mandatory regulatory or manual QA approval gate MUST NOT be conflated with an ad-hoc manual deploy; only the latter counts against automation ratio. Teams SHOULD adopt this third, since it requires classifying trigger type per run and is most useful once volume and batch size are already understood.
33
+
34
+ ## References
35
+
36
+ - [agentme-edr-402](402-dora-metrics-framework.md) — DORA metrics framework
37
+ - [DORA's software delivery performance metrics](https://dora.dev/guides/dora-metrics-four-keys/)
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: agentme-edr-policy-404-dora-lead-time-for-changes
3
+ description: Defines calculation, examples, and challenges for DORA's Lead Time for Changes metric and its PR-cycle-time, review-latency, deploy-pipeline-time, and total-lead-time sub-metrics. Use when instrumenting or reviewing lead time measurement.
4
+ apply-to: Teams and organizations measuring, reporting, or improving software delivery performance using DORA's four key metrics
5
+ valid-from: 2026-09-18
6
+ ---
7
+
8
+ # agentme-edr-policy-404: DORA lead time for changes
9
+
10
+ ## Context and Problem Statement
11
+
12
+ Lead Time for Changes is often reduced to one number that hides whether delay lives in review or in deployment. How should its phases be calculated so a team can see where time is actually spent, and how do the phases combine into a total?
13
+
14
+ ## Decision Outcome
15
+
16
+ **Measure four additive sub-metrics per deployable service that sum to a total lead time, using the median (p50) as the headline statistic.**
17
+
18
+ Review latency is a phase inside PR cycle time; PR cycle time plus deploy-pipeline time MUST equal total lead time.
19
+
20
+ ### Details
21
+
22
+ #### 01-pr-cycle-time
23
+
24
+ PR cycle time MUST be measured from a PR's first commit to its `merged_at` timestamp. Example: first commit at day 0, merged at day 2 gives a 2-day PR cycle time. Challenges: squash-merge loses the first-commit timestamp, so the PR's `created_at` SHOULD be used as a proxy; stacked PRs and long-lived branches with rebases distort the start time. Teams SHOULD adopt this first, since it uses a single data source (GitHub PRs) and is usually the dominant contributor to total lead time.
25
+
26
+ #### 02-review-latency
27
+
28
+ Review latency MUST be measured from a PR's `created_at` to its first review `submitted_at`, as a drill-down inside `01`. Example: PR opened at hour 0, first review at hour 20, gives 20 hours of review latency. Challenges: this is the sub-metric most at risk of being gamed by rubber-stamping; an unusually fast review latency MUST be read jointly with [agentme-edr-405](405-dora-change-failure-rate.md)'s Change Failure Rate rather than treated as a win on its own. Teams SHOULD adopt this second: it reuses `01`'s data source with one extra timestamp, and is usually the most common, most actionable bottleneck.
29
+
30
+ #### 03-deploy-pipeline-time
31
+
32
+ Deploy-pipeline time MUST be measured from merge to deploy completion for the affected service, covering any merge-to-deploy gate whether automated or manual (including mandatory regulatory or QA approval gates). Example: merged at hour 0, service deployed at hour 6, gives 6 hours of deploy-pipeline time. Challenges: a PR shipping to multiple services MUST have this computed once per affected service, since deploy timing differs by service; flaky CI re-runs inflate the measurement. Teams SHOULD adopt this third: it requires a second data source (deploy-workflow runs) correlated with PR data, and isolates exactly how much delay sits outside the team's own review process.
33
+
34
+ #### 04-total-lead-time
35
+
36
+ Total lead time MUST equal `01` plus `03` (with `02` already counted inside `01`), computed once per PR-and-affected-service pair and rolled up per team. Example: 2-day PR cycle time plus 6-hour deploy-pipeline time gives a total of roughly 2.25 days. Challenges: a handful of extreme outliers can skew a mean, which is why the median MUST be the headline statistic. Teams SHOULD adopt this last: it requires correlating both data sources together, the hardest sub-metric to compute reliably, but it is the single clearest measure of overall delivery speed.
37
+
38
+ ## References
39
+
40
+ - [agentme-edr-402](402-dora-metrics-framework.md) — DORA metrics framework
41
+ - [DORA's software delivery performance metrics](https://dora.dev/guides/dora-metrics-four-keys/)