mandrel 2.6.0 → 2.8.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 (78) hide show
  1. package/.agents/README.md +104 -330
  2. package/.agents/agents/auditor.md +135 -0
  3. package/.agents/agents/plan-critic.md +80 -0
  4. package/.agents/audit-checklists/dependencies.md +7 -0
  5. package/.agents/audit-checklists/documentation.md +1 -0
  6. package/.agents/docs/SDLC.md +69 -162
  7. package/.agents/docs/configuration.md +133 -499
  8. package/.agents/docs/quality-gates.md +59 -180
  9. package/.agents/instructions.md +170 -295
  10. package/.agents/rules/changelog-style.md +8 -66
  11. package/.agents/rules/ci-remediation.md +65 -124
  12. package/.agents/rules/gherkin-standards.md +10 -31
  13. package/.agents/rules/git-conventions-reference.md +28 -61
  14. package/.agents/rules/git-conventions.md +1 -1
  15. package/.agents/rules/orchestration-error-handling.md +5 -15
  16. package/.agents/rules/security-baseline.md +7 -13
  17. package/.agents/rules/shell-conventions.md +4 -13
  18. package/.agents/rules/test-seams.md +2 -2
  19. package/.agents/rules/testing-standards.md +7 -17
  20. package/.agents/scripts/lib/feedback-loop/audit-results-graduator.js +7 -2
  21. package/.agents/scripts/lib/feedback-loop/graduator-core.js +144 -12
  22. package/.agents/scripts/lib/feedback-loop/retro-proposals-graduator.js +11 -1
  23. package/.agents/scripts/lib/observability/runtime-friction.js +97 -36
  24. package/.agents/scripts/lib/orchestration/single-story-close/phases/post-land.js +29 -5
  25. package/.agents/skills/core/api-and-interface-design/SKILL.md +23 -297
  26. package/.agents/skills/core/api-and-interface-design/reference.md +76 -0
  27. package/.agents/skills/core/browser-testing-with-devtools/SKILL.md +20 -327
  28. package/.agents/skills/core/browser-testing-with-devtools/reference.md +74 -0
  29. package/.agents/skills/core/code-review-and-quality/reference.md +16 -398
  30. package/.agents/skills/core/debugging-and-error-recovery/reference.md +14 -281
  31. package/.agents/skills/core/documentation-and-adrs/reference.md +42 -338
  32. package/.agents/skills/core/git-workflow-and-versioning/SKILL.md +28 -326
  33. package/.agents/skills/core/idea-refinement/SKILL.md +67 -193
  34. package/.agents/skills/core/security-and-hardening/SKILL.md +15 -31
  35. package/.agents/skills/core/security-and-hardening/reference.md +15 -273
  36. package/.agents/skills/skills.index.json +5 -5
  37. package/.agents/skills/stack/qa/gherkin-authoring/SKILL.md +16 -222
  38. package/.agents/skills/stack/qa/gherkin-authoring/reference.md +157 -0
  39. package/.agents/skills/stack/qa/playwright/SKILL.md +0 -29
  40. package/.agents/skills/stack/qa/qa-explore-driving/SKILL.md +19 -23
  41. package/.agents/skills/stack/qa/qa-harness/SKILL.md +35 -53
  42. package/.agents/skills/stack/qa/vitest/SKILL.md +0 -29
  43. package/.agents/workflows/audit-accessibility.md +34 -108
  44. package/.agents/workflows/audit-architecture.md +35 -123
  45. package/.agents/workflows/audit-clean-code.md +19 -78
  46. package/.agents/workflows/audit-data-model.md +32 -100
  47. package/.agents/workflows/audit-dependencies.md +47 -111
  48. package/.agents/workflows/audit-devops.md +16 -83
  49. package/.agents/workflows/audit-documentation.md +46 -93
  50. package/.agents/workflows/audit-navigability.md +26 -80
  51. package/.agents/workflows/audit-performance.md +40 -106
  52. package/.agents/workflows/audit-privacy.md +17 -80
  53. package/.agents/workflows/audit-quality.md +35 -99
  54. package/.agents/workflows/audit-security.md +20 -78
  55. package/.agents/workflows/audit-seo.md +20 -98
  56. package/.agents/workflows/audit-sre.md +20 -88
  57. package/.agents/workflows/audit-to-stories.md +1 -8
  58. package/.agents/workflows/audit-ux-ui.md +17 -80
  59. package/.agents/workflows/deliver.md +54 -9
  60. package/.agents/workflows/git-cleanup.md +50 -275
  61. package/.agents/workflows/helpers/audit-lens-core.md +230 -0
  62. package/.agents/workflows/helpers/code-review.md +11 -23
  63. package/.agents/workflows/helpers/deliver-story-reference.md +114 -17
  64. package/.agents/workflows/helpers/deliver-story.md +26 -186
  65. package/.agents/workflows/helpers/qa-core.md +174 -0
  66. package/.agents/workflows/helpers/qa-run-scenario-reference.md +35 -0
  67. package/.agents/workflows/helpers/qa-run-scenario.md +11 -25
  68. package/.agents/workflows/helpers/worktree-lifecycle.md +6 -67
  69. package/.agents/workflows/mandrel-update.md +7 -13
  70. package/.agents/workflows/plan.md +17 -15
  71. package/.agents/workflows/qa-assist.md +140 -269
  72. package/.agents/workflows/qa-explore.md +125 -316
  73. package/.agents/workflows/qa-run.md +180 -380
  74. package/docs/CHANGELOG.md +18 -0
  75. package/package.json +1 -1
  76. package/.agents/workflows/helpers/audit-dual-path.md +0 -59
  77. package/.agents/workflows/helpers/audit-self-check.md +0 -70
  78. package/.agents/workflows/helpers/audit-severity-scale.md +0 -19
package/docs/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [2.8.0](https://github.com/dsj1984/mandrel/compare/mandrel-v2.7.0...mandrel-v2.8.0) (2026-07-21)
6
+
7
+
8
+ ### Changed
9
+
10
+ * **audit:** extract a shared audit-lens-core and dispatch lenses through a role-scoped auditor ([#4665](https://github.com/dsj1984/mandrel/issues/4665)) ([#4674](https://github.com/dsj1984/mandrel/issues/4674)) ([c7b0e13](https://github.com/dsj1984/mandrel/commit/c7b0e138465bd14eef08470cc756c7ea3c35e78d))
11
+ * **qa:** extract shared qa-core helper and cut the stale draft-bundle path (refs [#4666](https://github.com/dsj1984/mandrel/issues/4666)) ([#4669](https://github.com/dsj1984/mandrel/issues/4669)) ([dca7412](https://github.com/dsj1984/mandrel/commit/dca74128b419cd96deaaa4b214223d82f5a16415))
12
+ * **skills:** enforce capsule-first discipline and fix git-skill rule conflicts (refs [#4667](https://github.com/dsj1984/mandrel/issues/4667)) ([#4673](https://github.com/dsj1984/mandrel/issues/4673)) ([4a3a142](https://github.com/dsj1984/mandrel/commit/4a3a1428873f0d3f0fc084dc77b7d591576f0eee))
13
+ * **workflows:** wire role-scoped story-worker dispatch and slim the delivery workflow cluster (refs [#4663](https://github.com/dsj1984/mandrel/issues/4663)) ([#4670](https://github.com/dsj1984/mandrel/issues/4670)) ([42e65f0](https://github.com/dsj1984/mandrel/commit/42e65f0a2483a924aa0a1268b4ec26ea6f5b53bb))
14
+
15
+ ## [2.7.0](https://github.com/dsj1984/mandrel/compare/mandrel-v2.6.0...mandrel-v2.7.0) (2026-07-21)
16
+
17
+
18
+ ### Fixed
19
+
20
+ * **feedback-loop:** repair the graduator idempotency probe — an HTML-comment-wrapped search query never matches, so every rollup re-files ([#4657](https://github.com/dsj1984/mandrel/issues/4657)) ([#4661](https://github.com/dsj1984/mandrel/issues/4661)) ([9bb9d3a](https://github.com/dsj1984/mandrel/commit/9bb9d3ad674dafb11bcd2fbce771a81b79e8cd51))
21
+ * **retro:** generalize post-land recovery marking and gate merge-wait-exhausted on real budget exhaustion (refs [#4654](https://github.com/dsj1984/mandrel/issues/4654)) ([#4658](https://github.com/dsj1984/mandrel/issues/4658)) ([54c45ae](https://github.com/dsj1984/mandrel/commit/54c45ae4f522688e018c092da0137cc6562e0c73))
22
+
5
23
  ## [2.6.0](https://github.com/dsj1984/mandrel/compare/mandrel-v2.5.0...mandrel-v2.6.0) (2026-07-20)
6
24
 
7
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mandrel",
3
- "version": "2.6.0",
3
+ "version": "2.8.0",
4
4
  "description": "Claude Code-first opinionated workflow framework: instructions, skills, rules, and SDLC workflows that govern AI coding assistants.",
5
5
  "files": [
6
6
  ".agents/",
@@ -1,59 +0,0 @@
1
- # Audit lens execution strategy (dual-path)
2
-
3
- > **Single source for the dual-path preamble (Story #4625).** Every lens whose
4
- > `## Execution strategy (dual-path)` section points here shares this exact
5
- > contract. Read `audit-<lens>` and
6
- > `.claude/workflows/audit-<lens>.workflow.js` below as this lens's own name.
7
-
8
- A lens that references this helper runs along one of two execution paths. Both
9
- emit the **identical** report contract (the lens's Output Requirements step);
10
- downstream consumers (`audit-to-stories`) are agnostic to which path produced
11
- it.
12
-
13
- - **Orchestrated (dynamic-workflow) path.** When Claude Code's
14
- [dynamic workflows](https://code.claude.com/docs/en/workflows) are
15
- available, the saved project workflow
16
- `.claude/workflows/audit-<lens>.workflow.js` fans the lens's dimensions out
17
- as parallel read-only subagents, runs an **adversarial cross-check** stage
18
- (an independent agent reviews each dimension's findings and drops false
19
- positives before they enter the report), then synthesises the report. The
20
- orchestrator derives its per-dimension prompts from the *lens* markdown at
21
- run time — the lens stays the single source of truth; the script does not
22
- fork a second copy of the spec.
23
- - **Sequential (single-pass) path.** When dynamic workflows are unavailable,
24
- follow the lens's Steps turn-by-turn exactly as before. This is the default
25
- fallback and changes nothing about the existing behaviour.
26
-
27
- **Strategy selection** is computed by
28
- [`lib/dynamic-workflow/capability.js`](../../scripts/lib/dynamic-workflow/capability.js)
29
- (`selectAuditStrategy`). The orchestrated path is chosen only when the runtime
30
- is Claude Code, `disableWorkflows` is not set (settings.json **or**
31
- `CLAUDE_CODE_DISABLE_WORKFLOWS`), and the Claude Code version meets the
32
- research-preview floor (`>= 2.1.154`). Any other runtime, a disabled setting,
33
- or an older version degrades gracefully to the sequential path.
34
-
35
- > **Capability degradation, not a contract shim.** This dual path is **not**
36
- > covered by the No-Shim / hard-cutover rule in
37
- > [`git-conventions.md`](../../rules/git-conventions.md). That rule forbids
38
- > running two shapes of the *same contract* side by side. Here there is **one**
39
- > report contract; only the *execution strategy* is selected from a runtime
40
- > capability — the same pattern the protocol already endorses for live-docs
41
- > fallback in [`instructions.md` §1.C/§1.D](../../instructions.md). The full
42
- > capability-degradation rationale lives in the
43
- > [`capability.js`](../../scripts/lib/dynamic-workflow/capability.js) module
44
- > docstring; the orchestrated-run evidence and per-lens cost/precision gate
45
- > verdicts live in [`docs/roadmap.md`](../../../docs/roadmap.md) (Part 3 —
46
- > Dynamic-Workflow Orchestration).
47
-
48
- **Forcing a path (for testing).** Set `MANDREL_AUDIT_STRATEGY=sequential` to
49
- verify the fallback path with the feature notionally disabled, or
50
- `MANDREL_AUDIT_STRATEGY=orchestrated` to pin the dynamic path. To exercise the
51
- real disable signals instead, set `CLAUDE_CODE_DISABLE_WORKFLOWS=1` (env) or
52
- `disableWorkflows: true` in `.claude/settings.json` and re-run the lens — both
53
- degrade to the sequential path.
54
-
55
- > **Read-only on both paths.** The lens is read-only (see its Constraint). The
56
- > orchestrated subagents run in `acceptEdits` and inherit the session tool
57
- > allowlist, but the workflow script grants the analysis agents only
58
- > read/search tools (`Read`, `Grep`, `Glob`) — no write/edit/shell-mutation
59
- > tools. The single write in an orchestrated run is the final report artifact.
@@ -1,70 +0,0 @@
1
- # Audit finding self-cross-check (shared)
2
-
3
- > **Single source of truth for the sequential-path false-positive guard
4
- > (Story #4627).** Every non-retired audit lens references this file and runs
5
- > this pass over its Detailed Findings before finalizing its report. The
6
- > orchestrated dynamic-workflow path already fans out an independent
7
- > adversarial reviewer; this pass gives the **sequential single-pass** path —
8
- > the one consumer runs take, where the npm payload ships no per-lens
9
- > `*.workflow.js` — the same false-positive filter, so a lens cannot report an
10
- > unverified finding just because it ran single-pass.
11
-
12
- You are your own adversarial reviewer. After you have drafted the Detailed
13
- Findings but **before** you write the report artifact, re-open every finding
14
- and hold it to the bar below. This pass is **read-only** — it filters and
15
- tightens the findings you already have; it never invents new ones.
16
-
17
- ## Per-finding evidence bar (keep or drop)
18
-
19
- Keep a finding only when **all** of the following hold. Drop it otherwise.
20
-
21
- - **Grounded location** — it names a concrete `path:line` (or a concrete
22
- symbol / config key) that you have actually read, not a hypothetical or a
23
- "somewhere in the codebase" claim.
24
- - **Reproducible evidence** — the problem is backed by an observable: a tool
25
- reading (a baseline row, a complexity/MI/duplication number, a failing
26
- command), a quoted code snippet, or a specific standard it violates. A
27
- finding whose entire basis is "this looks wrong" does not clear the bar.
28
- - **In-scope** — when a change-set scope filter was supplied (the `Scope`
29
- block resolved to a file list), the finding lives in that scope or a direct
30
- dependency the lens explicitly reasons across. A finding outside the scope
31
- filter is dropped, not reported.
32
- - **Actionable** — the recommendation is specific enough to execute. Drop
33
- vague exhortations ("improve error handling generally") that carry no
34
- concrete change.
35
-
36
- ## Exclusion list (never a finding)
37
-
38
- Treat the following as **out of scope by construction** and drop any finding
39
- that rests on one of them:
40
-
41
- - **Sanctioned test seams** — exports consumed only by tests, and other
42
- patterns the `test-seams` rule blesses. Never a production defect.
43
- - **Entry points & public API surface** — CLI mains, `bin/` scripts, declared
44
- `exports` / `bin` / `main`, and barrel contracts consumed out-of-tree. A
45
- zero in-repo consumer count is not death.
46
- - **Dynamic / framework reachability** — symbols reached via `import()`,
47
- string-keyed dispatch, decorators, lifecycle listeners, or convention-loaded
48
- plugin directories. Invisible to static analysis, not dead.
49
- - **Intentional, documented deviations** — a pattern an in-tree comment, ADR,
50
- or config explicitly sanctions. Cite it and drop the finding.
51
- - **Style-only nits already enforced by a formatter/linter** — do not
52
- re-litigate what the committed tooling already governs.
53
-
54
- ## Final re-open-and-drop pass (mandatory)
55
-
56
- 1. Walk your Detailed Findings once more, applying the bar and the exclusion
57
- list above. Remove every finding that fails.
58
- 2. Count what you kept (`k`) and what you dropped (`d`).
59
- 3. Record the outcome in the report's **Executive Summary** as a single line:
60
-
61
- ```text
62
- Self-cross-check: kept <k> / dropped <d>.
63
- ```
64
-
65
- When `d > 0`, name the dropped findings (title + the bar/exclusion reason)
66
- in one short list under that line, so the filtering is auditable and never
67
- silent.
68
-
69
- A lens that keeps every finding still records `dropped 0` — the line's absence
70
- is itself a defect (it means the pass did not run).
@@ -1,19 +0,0 @@
1
- # Audit finding severity scale (shared)
2
-
3
- > **Single source of truth for the `Severity` axis (Story #4625).** Every audit
4
- > lens report references this file so the four levels — and the parser that
5
- > ranks them — never drift per lens.
6
-
7
- Every finding grades its severity (labelled `Severity` or `Impact` on a given
8
- lens) on this ordered scale. `parse-audit-md.js` recognizes every level, and a
9
- surviving **Critical** finding halts the delivery gate
10
- (`lib/audit-suite/findings.js#hasSurvivingCritical`).
11
-
12
- - **Critical** — an active, exploitable, or data-losing defect that must be
13
- fixed before the change can ship (e.g. a leaked secret, an auth bypass, a
14
- guaranteed production outage or data-loss path).
15
- - **High** — a serious correctness, security, or maintainability risk that
16
- should be fixed promptly, but does not by itself block the release.
17
- - **Medium** — a real problem worth scheduling; contained blast radius, or a
18
- reasonable workaround exists.
19
- - **Low** — minor or cosmetic; fix opportunistically.