memento-mori-jester 0.1.89 → 0.1.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,18 @@ All notable changes to Memento Mori Jester are tracked here.
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 0.1.91
8
+
9
+ - Added checked public-safe maintainer response snippets for `docs-example`, `fixture-backlog`, and `rule-review-candidate` support outcomes.
10
+ - Extended `npm run support:check` and production-readiness checks so response snippets stay aligned with the checked triage playbook.
11
+ - Updated README, maintainer triage docs, support examples, production-readiness docs, roadmap, and release notes for lower-friction support replies.
12
+
13
+ ## 0.1.90
14
+
15
+ - Added `examples/support`, a checked maintainer triage playbook for sanitized report-gallery and false-positive reports.
16
+ - Extended `npm run support:check` and production-readiness checks so the playbook keeps public-safe examples, first responses, classifications, and follow-up outcomes aligned.
17
+ - Updated README, report docs, maintainer triage docs, release docs, production-readiness docs, roadmap, and release notes for deterministic support handling.
18
+
7
19
  ## 0.1.89
8
20
 
9
21
  - Added a report-gallery feedback issue template for public-safe reports about confusing or stale checked examples, and strengthened false-positive reports with version and redacted `doctor --json` prompts.
package/README.md CHANGED
@@ -76,6 +76,8 @@ For trust-building output examples, see [examples/reports](examples/reports). `n
76
76
 
77
77
  If one of those reports is confusing or stale, use the public-safe [report gallery feedback template](examples/reports/feedback-template.md). It asks for version, nearest gallery example, sanitized command/output summaries, and redacted diagnostics without private repo code or secrets.
78
78
 
79
+ Maintainers can use the checked [support triage playbook](examples/support) and [response snippets](examples/support/response-snippets.md) to turn sanitized reports into a docs example, fixture backlog item, or rule-review candidate without changing behavior first.
80
+
79
81
  Expected vibe:
80
82
 
81
83
  ```text
@@ -448,6 +450,8 @@ More setup examples:
448
450
  - [Consumer Quickstart Smoke](examples/consumer-quickstart)
449
451
  - [Real-World Report Gallery](examples/reports)
450
452
  - [Report Gallery Feedback Template](examples/reports/feedback-template.md)
453
+ - [Support Triage Playbook](examples/support)
454
+ - [Maintainer Response Snippets](examples/support/response-snippets.md)
451
455
  - [Security Policy](SECURITY.md)
452
456
  - [Maintainer Triage](docs/MAINTAINER_TRIAGE.md)
453
457
  - [Changelog](CHANGELOG.md)
@@ -469,6 +473,8 @@ Framework CI examples:
469
473
  - [Consumer Quickstart Smoke](examples/consumer-quickstart)
470
474
  - [Real-World Report Gallery](examples/reports)
471
475
  - [Report Gallery Feedback Template](examples/reports/feedback-template.md)
476
+ - [Support Triage Playbook](examples/support)
477
+ - [Maintainer Response Snippets](examples/support/response-snippets.md)
472
478
  - [Next.js CI](examples/ci/nextjs.yml)
473
479
  - [Vite React CI](examples/ci/vite-react.yml)
474
480
  - [Express API CI](examples/ci/express-api.yml)
@@ -525,7 +531,7 @@ Maintainers can use [docs/MAINTAINER_TRIAGE.md](docs/MAINTAINER_TRIAGE.md) to tu
525
531
  Run `npm run fixtures:check` before merging fixture changes; it catches duplicate IDs, missing rule metadata, weak descriptions, unsafe-looking content, and duplicate content.
526
532
  Run `npm run fixtures:report` to see fixture coverage by rule, rule family, preset slice, kind, verdict, quiet-pass boundaries, feasible pass-case gaps, and curation-next guidance before choosing the next fixture. Use `npm run fixtures:report -- --markdown` when you want a paste-ready summary for release notes or GitHub issues.
527
533
  Run `npm run reports:check` after editing [examples/reports](examples/reports); it verifies the public report gallery against an installed package in a temporary consumer project.
528
- Run `npm run support:check` after editing issue templates, support docs, or the report gallery feedback path; it verifies the public report template asks for useful redacted context without inviting secrets or private code.
534
+ Run `npm run support:check` after editing issue templates, support docs, the report gallery feedback path, the [support triage playbook](examples/support), or [response snippets](examples/support/response-snippets.md); it verifies the public templates ask for useful redacted context without inviting secrets or private code.
529
535
  Run `npm run promo:card` to regenerate the repo-local social preview card after changing its copy or design.
530
536
  Run `npm run promo:check` after editing promo assets; it checks the current demo video, stills, docs, and fixture evidence numbers stay in sync.
531
537
  Run `npm run site:check` after editing the repo-local landing page; it verifies the start command, demo links, social card, repo, release, and npm links.
package/ROADMAP.md CHANGED
@@ -6,6 +6,8 @@ Memento Mori Jester is usable today as a CLI, MCP server, GitHub Action, and git
6
6
 
7
7
  ## Recently Shipped
8
8
 
9
+ - Checked maintainer response snippets in v0.1.91, adding public-safe reply templates for docs examples, fixture backlog items, and rule-review candidates.
10
+ - Checked maintainer triage playbook in v0.1.90, showing how sanitized reports become docs examples, fixture backlog items, or rule-review candidates.
9
11
  - Checked adopter feedback path in v0.1.89, adding a report-gallery issue template, package-shipped feedback template, and support triage guard.
10
12
  - Checked report gallery in v0.1.88, proving fresh `doctor`, destructive-command `summary`, and blocked-command reports from an installed consumer project.
11
13
  - Consumer quickstart registry-mode fix in v0.1.87, proving the same smoke against `memento-mori-jester@latest` after publish.
@@ -79,7 +81,7 @@ Memento Mori Jester is usable today as a CLI, MCP server, GitHub Action, and git
79
81
  ## Product Ideas
80
82
 
81
83
  - Collect real-world reports and fold the strongest redacted cases into more framework tuning cookbook recipes.
82
- - Turn repeated report-gallery feedback into clearer gallery examples or redacted fixtures.
84
+ - Use repeated playbook outcomes and response snippets to prioritize the next redacted fixture or report-gallery update.
83
85
  - Add a hosted-page option or GitHub Pages instructions once the static page has settled.
84
86
 
85
87
  ## Quality And Safety
@@ -21,6 +21,8 @@ For users who just need to understand what a healthy report looks like, point th
21
21
 
22
22
  For users who say a gallery report is confusing, stale, or hard to compare with their local output, point them at [examples/reports/feedback-template.md](../examples/reports/feedback-template.md) or the GitHub [report gallery feedback issue template](../.github/ISSUE_TEMPLATE/report_gallery_feedback.yml). It asks for the nearest checked example, sanitized command and output summaries, version, and redacted diagnostics without asking for private code.
23
23
 
24
+ When a report has enough public-safe detail to triage, compare it with the checked [support triage playbook](../examples/support). The playbook walks sanitized report-gallery and false-positive reports through first response, classification, and a follow-up outcome. Use [response-snippets.md](../examples/support/response-snippets.md) to reply consistently after choosing the outcome.
25
+
24
26
  Do not ask users to paste secrets, private code, customer data, live credentials, complete CI logs, or unredacted SARIF. If the report involves credential exposure, command execution, unexpected network access, private code disclosure, package publishing, or MCP data exposure, route it through [SECURITY.md](../SECURITY.md).
25
27
 
26
28
  ## Triage Labels
@@ -57,6 +59,14 @@ Use report-gallery feedback when the issue is about understanding installed-pack
57
59
  - a small docs update,
58
60
  - or a redacted fixture only if the report exposes a reusable rule boundary.
59
61
 
62
+ Use the playbook outcomes consistently:
63
+
64
+ - `docs-example`: the behavior is expected but the report or wording is unclear.
65
+ - `fixture-backlog`: the reduced report looks safe and should become a pass or quiet-pass fixture.
66
+ - `rule-review-candidate`: repeated sanitized reports suggest guidance or matching may need review, but not from a single report.
67
+
68
+ Use the matching response snippet for the first public reply, then adapt only the project-neutral parts: the rule id, minimal command summary, fixture id, and next command. Do not add private code, private paths, tokens, full logs, or exploitable details to the response.
69
+
60
70
  After editing report support docs or issue templates, run:
61
71
 
62
72
  ```powershell
@@ -47,6 +47,7 @@ This checklist defines what "production grade" means for Memento Mori Jester rig
47
47
  - `README.md` leads with a no-write first run, project bootstrap, agent setup, and optional hooks/CI.
48
48
  - `docs/GETTING_STARTED.md`, `docs/CLI.md`, `docs/RELEASE.md`, and `docs/TRUSTED_PUBLISHING.md` cover the core adoption and release paths.
49
49
  - `examples/reports` provides checked, public-safe report examples for fresh install diagnostics, summary output, blocked command reviews, and report-gallery feedback.
50
+ - `examples/support` provides a checked maintainer triage playbook and response snippets for first response, classification, and follow-up outcomes from sanitized support reports.
50
51
  - `site/index.html` gives maintainers a static one-page share surface that reuses the demo, social card, start command, and public links.
51
52
  - Every public release has matching `CHANGELOG.md` notes and `docs/RELEASE_NOTES_vX.Y.Z.md`.
52
53
 
@@ -59,13 +60,14 @@ This checklist defines what "production grade" means for Memento Mori Jester rig
59
60
  - GitHub issue templates collect bug reports, false-positive reports, report-gallery feedback, and feature requests with the diagnostic context maintainers need.
60
61
  - `SECURITY.md` routes vulnerability reports away from public issues and asks for redacted diagnostics.
61
62
  - `docs/MAINTAINER_TRIAGE.md` explains how to turn useful false-positive reports into fixture coverage before changing rule logic.
63
+ - `examples/support` shows maintainers how to classify sanitized reports as a docs example, fixture backlog item, or rule-review candidate before changing behavior, then reply with public-safe response snippets.
62
64
  - `npm run fixtures:check` validates fixture IDs, metadata, unsafe-looking content, duplicate content, and explicit expected/absent rule intent.
63
65
  - `npm run fixtures:report` shows fixture coverage by rule, rule family, preset slice, kind, verdict, quiet-pass rule boundaries, and feasible pass-case gaps so maintainers can pick the next fixture target; `npm run fixtures:report -- --markdown` produces a paste-ready maintainer snapshot.
64
66
  - `npm run framework:tuning:check` keeps the framework tuning guide, cookbook JSON, cookbook README, and fixture IDs aligned.
65
67
  - `npm run framework:tuning:doctor` runs the cookbook tune commands through the built CLI with temporary preset configs, so package consumers do not inherit stale recipes.
66
68
  - `npm run consumer:quickstart:check` installs the package into a temporary minimal project and runs `doctor`, `summary`, and packaged framework tuning checks from that consumer side.
67
69
  - `npm run reports:check` installs the package into a temporary minimal project and runs the report gallery's `doctor`, `summary`, and blocked-command examples through that consumer side.
68
- - `npm run support:check` verifies issue templates, support docs, and the report gallery feedback template stay public-safe and ask for useful redacted context.
70
+ - `npm run support:check` verifies issue templates, support docs, the report gallery feedback template, the maintainer triage playbook, and response snippets stay public-safe and ask for useful redacted context.
69
71
  - `npm run promo:card` regenerates the deterministic social preview card, and `npm run promo:check` verifies current repo-local promo assets against the current fixture evidence before maintainers post or refresh the demo.
70
72
  - `npm run site:check` verifies the static landing page before maintainers post or host it.
71
73
  - npm publish has a manual workflow fallback, but the normal release path is tag-driven trusted publishing.
@@ -97,4 +99,4 @@ This checklist defines what "production grade" means for Memento Mori Jester rig
97
99
  ## Known Next Gaps
98
100
 
99
101
  - Continue expanding real-world preset fixtures and false-positive examples so tuning remains evidence-based.
100
- - Fold the strongest redacted support reports into fixture or report-gallery updates.
102
+ - Fold the strongest redacted support reports into fixture, playbook, or report-gallery updates.
package/docs/RELEASE.md CHANGED
@@ -30,7 +30,7 @@ Move the current changelog bullets into a matching version section and add `docs
30
30
  ## 2. Tag And Push
31
31
 
32
32
  ```powershell
33
- git add package.json package-lock.json CHANGELOG.md docs/RELEASE_NOTES_v0.1.x.md docs/PRODUCTION_READINESS.md docs/MAINTAINER_TRIAGE.md docs/FRAMEWORK_TUNING.md docs/GITHUB_ACTIONS.md examples/ci examples/consumer-quickstart examples/reports examples/tuning scripts/check-ci-adoption.mjs scripts/check-consumer-quickstart.mjs scripts/check-report-gallery.mjs scripts/check-support-triage.mjs scripts/check-framework-tuning.mjs scripts/doctor-framework-tuning.mjs SECURITY.md .github/ISSUE_TEMPLATE
33
+ git add package.json package-lock.json CHANGELOG.md docs/RELEASE_NOTES_v0.1.x.md docs/PRODUCTION_READINESS.md docs/MAINTAINER_TRIAGE.md docs/FRAMEWORK_TUNING.md docs/GITHUB_ACTIONS.md examples/ci examples/consumer-quickstart examples/reports examples/support examples/tuning scripts/check-ci-adoption.mjs scripts/check-consumer-quickstart.mjs scripts/check-report-gallery.mjs scripts/check-support-triage.mjs scripts/check-framework-tuning.mjs scripts/doctor-framework-tuning.mjs SECURITY.md .github/ISSUE_TEMPLATE
34
34
  git commit -m "Release v0.1.x"
35
35
  git tag -a v0.1.x -m "Memento Mori Jester v0.1.x"
36
36
  git push origin main
@@ -0,0 +1,58 @@
1
+ # Memento Mori Jester v0.1.90
2
+
3
+ ## Summary
4
+
5
+ This release adds a checked maintainer triage playbook for sanitized support reports. The goal is to make report handling deterministic after users submit public-safe report-gallery feedback or false-positive reports: first response, classification, and follow-up outcome are now documented and checked.
6
+
7
+ ## What Changed
8
+
9
+ - Added `examples/support/README.md`.
10
+ - Added `examples/support/triage-playbook.json`.
11
+ - Extended `scripts/check-support-triage.mjs` to validate the playbook.
12
+ - Extended production-readiness checks for the playbook.
13
+ - Updated README, report gallery docs, maintainer triage docs, release docs, production-readiness docs, roadmap, and changelog.
14
+
15
+ ## Public Interface
16
+
17
+ - No CLI command changes.
18
+ - No MCP tool changes.
19
+ - No config schema changes.
20
+ - No review rule, scoring, matching, or verdict behavior changes.
21
+ - No GitHub Action input changes.
22
+ - Support docs and package examples now include a checked maintainer playbook.
23
+
24
+ ## Release Validation
25
+
26
+ ```powershell
27
+ npm.cmd test
28
+ npm.cmd run support:check
29
+ npm.cmd run reports:check
30
+ npm.cmd run demo:svg:check
31
+ npm.cmd run promo:card:check
32
+ npm.cmd run promo:check
33
+ npm.cmd run fixtures:report
34
+ npm.cmd run fixtures:report -- --json
35
+ npm.cmd run fixtures:report -- --markdown
36
+ npm.cmd run pack:dry
37
+ git diff --check
38
+ node .\dist\cli.js doctor
39
+ node .\dist\cli.js summary --kind command "git reset --hard"
40
+ git diff | node .\dist\cli.js diff --fail-on block --subject "v0.1.90 checked maintainer triage playbook"
41
+ ```
42
+
43
+ Expected:
44
+
45
+ - `support:check` verifies issue templates, feedback templates, and the maintainer triage playbook.
46
+ - `reports:check` still verifies the installed-package report gallery.
47
+ - fixture report still shows `Fixtures: 222`.
48
+ - GitHub Release and npm Publish complete from the `v0.1.90` tag.
49
+
50
+ After publish:
51
+
52
+ ```powershell
53
+ npm.cmd view memento-mori-jester version --silent
54
+ npx.cmd -y memento-mori-jester@latest doctor
55
+ npx.cmd -y memento-mori-jester@latest summary --kind command "git reset --hard"
56
+ npm.cmd run support:check
57
+ npm.cmd run reports:check -- --package memento-mori-jester@latest
58
+ ```
@@ -0,0 +1,58 @@
1
+ # Memento Mori Jester v0.1.91
2
+
3
+ ## Summary
4
+
5
+ This release adds checked maintainer response snippets for the three support outcomes introduced by the triage playbook: docs clarification, fixture backlog, and rule-review candidate. The goal is to reduce response friction while keeping public replies safe, consistent, and evidence-based.
6
+
7
+ ## What Changed
8
+
9
+ - Added `examples/support/response-snippets.md`.
10
+ - Added `examples/support/response-snippets.json`.
11
+ - Extended `scripts/check-support-triage.mjs` to validate response snippets.
12
+ - Extended production-readiness checks for response snippets.
13
+ - Updated README, maintainer triage docs, support examples, production-readiness docs, roadmap, and changelog.
14
+
15
+ ## Public Interface
16
+
17
+ - No CLI command changes.
18
+ - No MCP tool changes.
19
+ - No config schema changes.
20
+ - No review rule, scoring, matching, or verdict behavior changes.
21
+ - No GitHub Action input changes.
22
+ - Support docs and package examples now include checked maintainer response snippets.
23
+
24
+ ## Release Validation
25
+
26
+ ```powershell
27
+ npm.cmd test
28
+ npm.cmd run support:check
29
+ npm.cmd run reports:check
30
+ npm.cmd run demo:svg:check
31
+ npm.cmd run promo:card:check
32
+ npm.cmd run promo:check
33
+ npm.cmd run fixtures:report
34
+ npm.cmd run fixtures:report -- --json
35
+ npm.cmd run fixtures:report -- --markdown
36
+ npm.cmd run pack:dry
37
+ git diff --check
38
+ node .\dist\cli.js doctor
39
+ node .\dist\cli.js summary --kind command "git reset --hard"
40
+ git diff | node .\dist\cli.js diff --fail-on block --subject "v0.1.91 checked maintainer response snippets"
41
+ ```
42
+
43
+ Expected:
44
+
45
+ - `support:check` verifies issue templates, feedback templates, the maintainer triage playbook, and response snippets.
46
+ - `reports:check` still verifies the installed-package report gallery.
47
+ - fixture report still shows `Fixtures: 222`.
48
+ - GitHub Release and npm Publish complete from the `v0.1.91` tag.
49
+
50
+ After publish:
51
+
52
+ ```powershell
53
+ npm.cmd view memento-mori-jester version --silent
54
+ npx.cmd -y memento-mori-jester@latest doctor
55
+ npx.cmd -y memento-mori-jester@latest summary --kind command "git reset --hard"
56
+ npm.cmd run support:check
57
+ npm.cmd run reports:check -- --package memento-mori-jester@latest
58
+ ```
@@ -30,6 +30,8 @@ If a report-gallery example is confusing, stale, or does not match what you see
30
30
 
31
31
  The useful public details are the package version, nearest gallery example, a sanitized command summary, a few relevant output lines, and redacted `doctor --json` output. Do not paste secrets, private repository code, customer data, full CI logs, unredacted SARIF, or private paths.
32
32
 
33
+ Maintainers should handle those reports with the checked [Maintainer Triage Playbook](../support), which shows first responses, classifications, and follow-up outcomes for docs examples, fixture backlog items, and rule-review candidates.
34
+
33
35
  Maintainers can keep this support path aligned with:
34
36
 
35
37
  ```powershell
@@ -0,0 +1,42 @@
1
+ # Maintainer Triage Playbook
2
+
3
+ This playbook shows how to handle sanitized adopter reports without turning every surprise into an immediate rule change. It pairs with [docs/MAINTAINER_TRIAGE.md](../../docs/MAINTAINER_TRIAGE.md), the [report gallery feedback template](../reports/feedback-template.md), and the GitHub issue templates.
4
+
5
+ The checked source is [triage-playbook.json](triage-playbook.json). Use [response-snippets.md](response-snippets.md) for copy-paste replies after a report is classified. The snippet source is [response-snippets.json](response-snippets.json).
6
+
7
+ | ID | Source | Classification | Follow-up |
8
+ | --- | --- | --- | --- |
9
+ | `gallery-expected-block-docs` | report-gallery feedback | expected docs clarification | docs example |
10
+ | `false-positive-fixture-backlog` | false-positive report | plausible safe boundary | fixture backlog |
11
+ | `repeated-risky-domain-rule-review` | false-positive report | repeated surprise pattern | rule-review candidate |
12
+
13
+ ## Maintainer Flow
14
+
15
+ 1. Confirm the report is public-safe. If it includes secrets, private code, full CI logs, exploitable details, package publishing concerns, MCP data exposure, or credential handling, route it through [SECURITY.md](../../SECURITY.md).
16
+ 2. Ask for the smallest redacted reproduction plus `jester doctor --json`.
17
+ 3. For noisy rules, ask for `jester tune <rule-id> --json`.
18
+ 4. Classify the report as `docs`, `false-positive`, `rules`, `bug`, or `security`.
19
+ 5. Choose one follow-up outcome:
20
+ - `docs-example`: improve wording or a checked report example.
21
+ - `fixture-backlog`: add a pass or quiet-pass fixture before changing behavior.
22
+ - `rule-review-candidate`: collect repeated sanitized reports before changing guidance or matching.
23
+ 6. Close with the next command the user can run.
24
+ 7. Use the matching response snippet so replies stay public-safe and consistent.
25
+
26
+ ## Checks
27
+
28
+ Run this after editing support docs, issue templates, the playbook, or response snippets:
29
+
30
+ ```powershell
31
+ npm run support:check
32
+ ```
33
+
34
+ Run these when a report becomes fixture work:
35
+
36
+ ```powershell
37
+ npm run fixtures:check
38
+ npm run fixtures:report
39
+ npm run fixtures:report -- --markdown
40
+ ```
41
+
42
+ The playbook is intentionally synthetic and public. Do not add private repository names, private paths, tokens, customer data, or full logs.
@@ -0,0 +1,41 @@
1
+ [
2
+ {
3
+ "id": "docs-example-response",
4
+ "outcome": "docs-example",
5
+ "title": "Expected behavior, docs clarification",
6
+ "useWhen": "A sanitized report matches checked behavior, but the user expected different wording or severity.",
7
+ "labels": ["docs"],
8
+ "body": [
9
+ "Thanks for the report. This looks like expected behavior for the checked example, but the wording can be clearer.",
10
+ "Please do not paste private repo code, full logs, secrets, or private paths. If your local output differs from the checked example, share redacted `jester doctor --json` output and the smallest sanitized command summary.",
11
+ "Maintainer next step: update the report gallery wording or docs example, then run `npm run reports:check` and `npm run support:check`."
12
+ ],
13
+ "requiredChecks": ["npm run reports:check", "npm run support:check"]
14
+ },
15
+ {
16
+ "id": "fixture-backlog-response",
17
+ "outcome": "fixture-backlog",
18
+ "title": "Plausible false positive, fixture backlog",
19
+ "useWhen": "A sanitized false-positive report describes a safe boundary that should be protected before changing rule behavior.",
20
+ "labels": ["false-positive", "rules"],
21
+ "body": [
22
+ "Thanks, this looks like a plausible safe boundary. Please keep the reproduction minimal and redacted, then share `jester tune <rule-id> --json`, redacted `jester doctor --json`, and the smallest command, plan, diff, or final-answer text that reproduces the result.",
23
+ "We will not loosen the rule from one report. If the reduced example is valid, the next step is a pass or quiet-pass fixture with `expectedRuleIds` or `absentRuleIds`.",
24
+ "Maintainer next step: add the fixture backlog item, then run `npm run fixtures:check`, `npm run fixtures:report`, and `npm run support:check`."
25
+ ],
26
+ "requiredChecks": ["npm run fixtures:check", "npm run fixtures:report", "npm run support:check"]
27
+ },
28
+ {
29
+ "id": "rule-review-candidate-response",
30
+ "outcome": "rule-review-candidate",
31
+ "title": "Repeated surprise, rule review candidate",
32
+ "useWhen": "A report may be expected on its own, but repeated sanitized reports suggest the rule guidance or matching boundary may need review.",
33
+ "labels": ["false-positive", "rules"],
34
+ "body": [
35
+ "Thanks. This may be expected caution for now, but repeated sanitized reports can become a rule-review candidate.",
36
+ "Please share redacted `jester doctor --json`, redacted `jester tune <rule-id> --json`, and the smallest public-safe input that reproduces the surprise. Do not paste secrets, private project details, full logs, or private paths.",
37
+ "Maintainer next step: collect at least two sanitized examples, compare `fixtureEvidence`, and only then decide whether this is docs, fixture backlog, guidance, or rule-matching work."
38
+ ],
39
+ "requiredChecks": ["npm run fixtures:report -- --markdown", "npm run support:check"]
40
+ }
41
+ ]
@@ -0,0 +1,51 @@
1
+ # Maintainer Response Snippets
2
+
3
+ These public-safe snippets reduce maintainer response friction after a report has been classified with the [triage playbook](triage-playbook.json). They are intentionally generic: no private repository names, no customer data, no full logs, and no real credentials.
4
+
5
+ The checked source is [response-snippets.json](response-snippets.json). Keep the outcome IDs aligned with the playbook:
6
+
7
+ - `docs-example`
8
+ - `fixture-backlog`
9
+ - `rule-review-candidate`
10
+
11
+ ## Docs Example Response
12
+
13
+ Use for `docs-example` outcomes when behavior is expected but wording or examples could be clearer.
14
+
15
+ ```markdown
16
+ Thanks for the report. This looks like expected behavior for the checked example, but the wording can be clearer.
17
+
18
+ Please do not paste private repo code, full logs, secrets, or private paths. If your local output differs from the checked example, share redacted `jester doctor --json` output and the smallest sanitized command summary.
19
+
20
+ Maintainer next step: update the report gallery wording or docs example, then run `npm run reports:check` and `npm run support:check`.
21
+ ```
22
+
23
+ ## Fixture Backlog Response
24
+
25
+ Use for `fixture-backlog` outcomes when a minimized false-positive report looks like a safe boundary worth preserving.
26
+
27
+ ```markdown
28
+ Thanks, this looks like a plausible safe boundary. Please keep the reproduction minimal and redacted, then share `jester tune <rule-id> --json`, redacted `jester doctor --json`, and the smallest command, plan, diff, or final-answer text that reproduces the result.
29
+
30
+ We will not loosen the rule from one report. If the reduced example is valid, the next step is a pass or quiet-pass fixture with `expectedRuleIds` or `absentRuleIds`.
31
+
32
+ Maintainer next step: add the fixture backlog item, then run `npm run fixtures:check`, `npm run fixtures:report`, and `npm run support:check`.
33
+ ```
34
+
35
+ ## Rule Review Candidate Response
36
+
37
+ Use for `rule-review-candidate` outcomes when repeated sanitized reports suggest a rule boundary or guidance may need review.
38
+
39
+ ```markdown
40
+ Thanks. This may be expected caution for now, but repeated sanitized reports can become a rule-review candidate.
41
+
42
+ Please share redacted `jester doctor --json`, redacted `jester tune <rule-id> --json`, and the smallest public-safe input that reproduces the surprise. Do not paste secrets, private project details, full logs, or private paths.
43
+
44
+ Maintainer next step: collect at least two sanitized examples, compare `fixtureEvidence`, and only then decide whether this is docs, fixture backlog, guidance, or rule-matching work.
45
+ ```
46
+
47
+ Run the guard after editing snippets:
48
+
49
+ ```powershell
50
+ npm run support:check
51
+ ```
@@ -0,0 +1,96 @@
1
+ [
2
+ {
3
+ "id": "gallery-expected-block-docs",
4
+ "source": "report-gallery-feedback",
5
+ "nearestReportExample": "destructive-command-summary",
6
+ "sanitizedReport": {
7
+ "version": "latest",
8
+ "kind": "command",
9
+ "command": "jester summary --kind command \"git reset --hard\"",
10
+ "observed": [
11
+ "Verdict: BLOCK",
12
+ "destructive-git-history",
13
+ "Suggested next: jester tune destructive-git-history"
14
+ ],
15
+ "question": "I expected this to warn, not block, because I only wanted to see the summary output."
16
+ },
17
+ "firstResponse": "Thanks. This looks like expected behavior for the destructive-command summary example: the command is intentionally blocked so the gallery can show a high-signal report. Please share redacted `jester doctor --json` output only if your local output differs from the checked example.",
18
+ "classification": {
19
+ "labels": ["docs"],
20
+ "decision": "expected-behavior-docs-example",
21
+ "rationale": "The reported command matches a checked gallery example and does not indicate a rule bug."
22
+ },
23
+ "maintainerChecks": [
24
+ "npm run reports:check",
25
+ "npm run support:check"
26
+ ],
27
+ "followUpOutcome": {
28
+ "type": "docs-example",
29
+ "action": "Clarify the report gallery row or README wording if multiple adopters expect a non-blocking example."
30
+ }
31
+ },
32
+ {
33
+ "id": "false-positive-fixture-backlog",
34
+ "source": "false-positive",
35
+ "nearestReportExample": "none",
36
+ "sanitizedReport": {
37
+ "version": "latest",
38
+ "kind": "diff",
39
+ "ruleId": "custom-web-storage-sensitive-value",
40
+ "command": "jester summary --kind diff <redacted-diff>",
41
+ "observed": [
42
+ "Verdict: BLOCK",
43
+ "custom-web-storage-sensitive-value",
44
+ "localStorage theme preference"
45
+ ],
46
+ "question": "This looks like a theme preference, not a token or password."
47
+ },
48
+ "firstResponse": "Thanks. Please keep the diff minimal and redacted, then include `jester tune custom-web-storage-sensitive-value --json` and redacted `jester doctor --json` output. If the reduced example only stores a non-sensitive preference, this should become a quiet-pass fixture candidate before any rule change.",
49
+ "classification": {
50
+ "labels": ["false-positive", "rules"],
51
+ "decision": "fixture-backlog",
52
+ "rationale": "The report describes a plausible safe boundary, but maintainers need a minimized redacted reproduction before changing matching behavior."
53
+ },
54
+ "maintainerChecks": [
55
+ "npm run fixtures:check",
56
+ "npm run fixtures:report",
57
+ "npm run support:check"
58
+ ],
59
+ "followUpOutcome": {
60
+ "type": "fixture-backlog",
61
+ "action": "Add a quiet-pass fixture with `absentRuleIds` for the noisy rule if the sanitized reproduction is valid and not already covered."
62
+ }
63
+ },
64
+ {
65
+ "id": "repeated-risky-domain-rule-review",
66
+ "source": "false-positive",
67
+ "nearestReportExample": "none",
68
+ "sanitizedReport": {
69
+ "version": "latest",
70
+ "kind": "plan",
71
+ "ruleId": "risky-domain",
72
+ "command": "jester summary --kind plan \"Update auth docs and verify links\"",
73
+ "observed": [
74
+ "Verdict: CAUTION",
75
+ "risky-domain",
76
+ "High-risk domain touched"
77
+ ],
78
+ "question": "The plan is documentation-only, but the rule still cautions because it mentions auth."
79
+ },
80
+ "firstResponse": "Thanks. This may be expected caution for plan text, but repeated reports can justify a rule-review candidate. Please share redacted `jester doctor --json` output, redacted `jester tune risky-domain --json` output, and the smallest plan text that reproduces the surprise. Do not paste private project details.",
81
+ "classification": {
82
+ "labels": ["false-positive", "rules"],
83
+ "decision": "rule-review-candidate",
84
+ "rationale": "One report is not enough to loosen a broad domain rule, but repeated sanitized reports may show the guidance or matching boundary needs review."
85
+ },
86
+ "maintainerChecks": [
87
+ "npm run fixtures:report -- --markdown",
88
+ "node .\\dist\\cli.js tune risky-domain --json",
89
+ "npm run support:check"
90
+ ],
91
+ "followUpOutcome": {
92
+ "type": "rule-review-candidate",
93
+ "action": "Collect at least two sanitized examples and compare fixture evidence before changing rule guidance or matching."
94
+ }
95
+ }
96
+ ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memento-mori-jester",
3
- "version": "0.1.89",
3
+ "version": "0.1.91",
4
4
  "description": "A local court-jester sidecar for AI coding agents: review plans, commands, diffs, and final claims before they get too pleased with themselves.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -93,6 +93,10 @@ for (const path of [
93
93
  "examples/reports/README.md",
94
94
  "examples/reports/feedback-template.md",
95
95
  "examples/reports/report-gallery.json",
96
+ "examples/support/README.md",
97
+ "examples/support/response-snippets.md",
98
+ "examples/support/response-snippets.json",
99
+ "examples/support/triage-playbook.json",
96
100
  "examples/presets/README.md",
97
101
  "examples/tuning/README.md",
98
102
  "examples/tuning/framework-tuning-cookbook.json",
@@ -121,6 +125,8 @@ requireText("README.md", /adoption-smoke\.yml/, "adoption smoke CI link");
121
125
  requireText("README.md", /consumer-quickstart/, "consumer quickstart smoke link");
122
126
  requireText("README.md", /examples\/reports/, "report gallery link");
123
127
  requireText("README.md", /feedback-template\.md/, "report gallery feedback template link");
128
+ requireText("README.md", /examples\/support/, "support triage playbook link");
129
+ requireText("README.md", /response-snippets\.md/, "support response snippets link");
124
130
  requireText("README.md", /report gallery feedback/i, "report gallery feedback guidance");
125
131
  requireText("README.md", /License: PolyForm Noncommercial/, "the noncommercial license badge");
126
132
  requireText("docs/PRODUCTION_READINESS.md", /npm package/i, "npm package readiness");
@@ -141,6 +147,8 @@ requireText("docs/PRODUCTION_READINESS.md", /adoption-smoke\.yml/, "adoption smo
141
147
  requireText("docs/PRODUCTION_READINESS.md", /consumer:quickstart:check/, "consumer quickstart smoke readiness");
142
148
  requireText("docs/PRODUCTION_READINESS.md", /reports:check/, "report gallery readiness");
143
149
  requireText("docs/PRODUCTION_READINESS.md", /support:check/, "support triage readiness");
150
+ requireText("docs/PRODUCTION_READINESS.md", /examples\/support/, "support triage playbook readiness");
151
+ requireText("docs/PRODUCTION_READINESS.md", /response snippets/i, "support response snippets readiness");
144
152
  requireText("docs/PRODUCTION_READINESS.md", /quiet-pass/, "quiet-pass fixture readiness");
145
153
  requireText("docs/CLI.md", /jester doctor --json/, "doctor JSON CLI docs");
146
154
  requireText("docs/CLI.md", /quiet-pass fixture/, "quiet-pass fixture CLI docs");
@@ -164,6 +172,11 @@ requireText("docs/MAINTAINER_TRIAGE.md", /expectedRuleIds/, "fixture expected ru
164
172
  requireText("docs/MAINTAINER_TRIAGE.md", /absentRuleIds/, "fixture absent rule guidance");
165
173
  requireText("docs/MAINTAINER_TRIAGE.md", /feedback-template\.md/, "report gallery feedback template link");
166
174
  requireText("docs/MAINTAINER_TRIAGE.md", /report_gallery_feedback\.yml/, "report gallery issue template link");
175
+ requireText("docs/MAINTAINER_TRIAGE.md", /examples\/support/, "support triage playbook link");
176
+ requireText("docs/MAINTAINER_TRIAGE.md", /response-snippets\.md/, "support response snippets link");
177
+ requireText("docs/MAINTAINER_TRIAGE.md", /docs-example/, "docs example triage outcome");
178
+ requireText("docs/MAINTAINER_TRIAGE.md", /fixture-backlog/, "fixture backlog triage outcome");
179
+ requireText("docs/MAINTAINER_TRIAGE.md", /rule-review-candidate/, "rule review triage outcome");
167
180
  requireText("docs/MAINTAINER_TRIAGE.md", /support:check/, "support triage check guidance");
168
181
  requireText("examples/fixtures/README.md", /MAINTAINER_TRIAGE\.md/, "maintainer triage link");
169
182
  requireText("examples/fixtures/README.md", /Adding A Fixture From A Report/, "fixture report conversion guidance");
@@ -181,6 +194,7 @@ requireText("examples/consumer-quickstart/package.json", /framework:tuning:docto
181
194
  requireText("examples/reports/README.md", /report-gallery\.json/, "report gallery JSON link");
182
195
  requireText("examples/reports/README.md", /feedback-template\.md/, "report gallery feedback template link");
183
196
  requireText("examples/reports/README.md", /report_gallery_feedback\.yml/, "report gallery issue template link");
197
+ requireText("examples/reports/README.md", /examples\/support|Maintainer Triage Playbook/i, "support triage playbook link");
184
198
  requireText("examples/reports/README.md", /npm run reports:check/, "report gallery check command");
185
199
  requireText("examples/reports/README.md", /npm run support:check/, "support triage check command");
186
200
  requireText("examples/reports/report-gallery.json", /fresh-install-doctor/, "fresh install doctor report");
@@ -191,6 +205,19 @@ requireText("examples/reports/feedback-template.md", /summary --kind command "gi
191
205
  requireText("examples/reports/feedback-template.md", /tune <rule-id> --json/, "feedback template tune diagnostics");
192
206
  requireText("examples/reports/feedback-template.md", /Privacy Checklist/, "feedback template privacy checklist");
193
207
  requireText("examples/reports/feedback-template.md", /SECURITY\.md/, "feedback template security redirect");
208
+ requireText("examples/support/README.md", /triage-playbook\.json/, "support triage playbook JSON link");
209
+ requireText("examples/support/README.md", /response-snippets\.md/, "support response snippets link");
210
+ requireText("examples/support/README.md", /docs-example/, "support triage docs outcome");
211
+ requireText("examples/support/README.md", /fixture-backlog/, "support triage fixture outcome");
212
+ requireText("examples/support/README.md", /rule-review-candidate/, "support triage rule-review outcome");
213
+ requireText("examples/support/triage-playbook.json", /gallery-expected-block-docs/, "support triage docs example");
214
+ requireText("examples/support/triage-playbook.json", /false-positive-fixture-backlog/, "support triage fixture example");
215
+ requireText("examples/support/triage-playbook.json", /repeated-risky-domain-rule-review/, "support triage rule-review example");
216
+ requireText("examples/support/response-snippets.md", /Maintainer Response Snippets/, "support response snippets heading");
217
+ requireText("examples/support/response-snippets.md", /response-snippets\.json/, "support response snippets JSON link");
218
+ requireText("examples/support/response-snippets.json", /docs-example-response/, "support docs response snippet");
219
+ requireText("examples/support/response-snippets.json", /fixture-backlog-response/, "support fixture response snippet");
220
+ requireText("examples/support/response-snippets.json", /rule-review-candidate-response/, "support rule-review response snippet");
194
221
  requireText("examples/tuning/README.md", /framework-tuning-cookbook\.json/, "framework tuning cookbook JSON link");
195
222
  requireText("examples/tuning/README.md", /framework:tuning:doctor/, "framework tuning doctor guidance");
196
223
  requireText("examples/tuning/README.md", /jester tune <rule-id> --json|jester tune [a-z0-9-]+ --json/, "framework tuning command guidance");
@@ -223,6 +250,8 @@ requireText("scripts/check-report-gallery.mjs", /memento-mori-jester@latest/, "r
223
250
  requireText("scripts/check-report-gallery.mjs", /destructive-command-summary/, "report gallery summary guard");
224
251
  requireText("scripts/check-support-triage.mjs", /report_gallery_feedback\.yml/, "support triage issue template guard");
225
252
  requireText("scripts/check-support-triage.mjs", /feedback-template\.md/, "support triage feedback template guard");
253
+ requireText("scripts/check-support-triage.mjs", /triage-playbook\.json/, "support triage playbook guard");
254
+ requireText("scripts/check-support-triage.mjs", /response-snippets\.json/, "support response snippets guard");
226
255
  requireText("scripts/check-support-triage.mjs", /unsafeContentPatterns/, "support triage unsafe content checks");
227
256
  requireText("package.json", /"fixtures:check": "node scripts\/check-fixtures\.mjs"/, "fixture authoring check script");
228
257
  requireText("package.json", /"fixtures:report": "node scripts\/report-fixtures\.mjs"/, "fixture coverage report script");
@@ -25,6 +25,10 @@ const supportFiles = [
25
25
  ".github/ISSUE_TEMPLATE/config.yml",
26
26
  "examples/reports/feedback-template.md",
27
27
  "examples/reports/README.md",
28
+ "examples/support/README.md",
29
+ "examples/support/response-snippets.md",
30
+ "examples/support/response-snippets.json",
31
+ "examples/support/triage-playbook.json",
28
32
  "docs/MAINTAINER_TRIAGE.md",
29
33
  "docs/PRODUCTION_READINESS.md",
30
34
  "README.md",
@@ -71,16 +75,53 @@ requireText("examples/reports/feedback-template.md", /npm run support:check/, "s
71
75
  requireText("examples/reports/README.md", /feedback-template\.md/, "feedback template link");
72
76
  requireText("examples/reports/README.md", /report_gallery_feedback\.yml/, "GitHub issue template link");
73
77
  requireText("examples/reports/README.md", /npm run support:check/, "support checker command");
78
+ requireText("examples/reports/README.md", /examples\/support|Maintainer Triage Playbook/i, "maintainer triage playbook link");
79
+
80
+ requireText("examples/support/README.md", /Maintainer Triage Playbook/, "maintainer playbook heading");
81
+ requireText("examples/support/README.md", /triage-playbook\.json/, "maintainer playbook JSON link");
82
+ requireText("examples/support/README.md", /response-snippets\.md/, "maintainer response snippets link");
83
+ requireText("examples/support/README.md", /gallery-expected-block-docs/, "docs example playbook case");
84
+ requireText("examples/support/README.md", /false-positive-fixture-backlog/, "fixture backlog playbook case");
85
+ requireText("examples/support/README.md", /repeated-risky-domain-rule-review/, "rule review playbook case");
86
+ requireText("examples/support/README.md", /doctor --json/, "doctor JSON playbook prompt");
87
+ requireText("examples/support/README.md", /tune <rule-id> --json/, "tune JSON playbook prompt");
88
+ requireText("examples/support/README.md", /docs-example/, "docs outcome");
89
+ requireText("examples/support/README.md", /fixture-backlog/, "fixture backlog outcome");
90
+ requireText("examples/support/README.md", /rule-review-candidate/, "rule review outcome");
91
+ requireText("examples/support/README.md", /SECURITY\.md/, "security redirect");
92
+ requireText("examples/support/README.md", /npm run support:check/, "support checker command");
93
+ requireText("examples/support/response-snippets.md", /Maintainer Response Snippets/, "response snippets heading");
94
+ requireText("examples/support/response-snippets.md", /response-snippets\.json/, "response snippets JSON link");
95
+ requireText("examples/support/response-snippets.md", /docs-example/, "docs response outcome");
96
+ requireText("examples/support/response-snippets.md", /fixture-backlog/, "fixture backlog response outcome");
97
+ requireText("examples/support/response-snippets.md", /rule-review-candidate/, "rule review response outcome");
98
+ requireText("examples/support/response-snippets.md", /jester doctor --json/, "doctor JSON response prompt");
99
+ requireText("examples/support/response-snippets.md", /jester tune <rule-id> --json/, "tune JSON response prompt");
100
+ requireText("examples/support/response-snippets.md", /npm run support:check/, "support checker response command");
101
+ requireText("examples/support/response-snippets.json", /docs-example-response/, "docs response snippet");
102
+ requireText("examples/support/response-snippets.json", /fixture-backlog-response/, "fixture response snippet");
103
+ requireText("examples/support/response-snippets.json", /rule-review-candidate-response/, "rule review response snippet");
104
+
74
105
  requireText("docs/MAINTAINER_TRIAGE.md", /feedback-template\.md/, "feedback template triage link");
75
106
  requireText("docs/MAINTAINER_TRIAGE.md", /report_gallery_feedback\.yml/, "report gallery issue template triage link");
107
+ requireText("docs/MAINTAINER_TRIAGE.md", /examples\/support/, "maintainer playbook triage link");
108
+ requireText("docs/MAINTAINER_TRIAGE.md", /response-snippets\.md/, "maintainer response snippets triage link");
109
+ requireText("docs/MAINTAINER_TRIAGE.md", /docs-example/, "docs example triage outcome");
110
+ requireText("docs/MAINTAINER_TRIAGE.md", /fixture-backlog/, "fixture backlog triage outcome");
111
+ requireText("docs/MAINTAINER_TRIAGE.md", /rule-review-candidate/, "rule review triage outcome");
76
112
  requireText("docs/MAINTAINER_TRIAGE.md", /npm(?:\.cmd)? run support:check/, "support checker triage command");
77
113
  requireText("docs/PRODUCTION_READINESS.md", /support:check/, "support checker readiness");
78
114
  requireText("README.md", /feedback-template\.md/, "feedback template README link");
115
+ requireText("README.md", /examples\/support/, "maintainer triage playbook README link");
116
+ requireText("README.md", /response-snippets\.md/, "maintainer response snippets README link");
79
117
  requireText("README.md", /report gallery feedback/i, "report gallery feedback guidance");
80
118
 
81
119
  requireText("package.json", /"support:check": "node scripts\/check-support-triage\.mjs"/, "support checker script");
82
120
  requireText("package.json", /npm run support:check/, "support checker in npm test");
83
121
 
122
+ checkTriagePlaybook();
123
+ checkResponseSnippets();
124
+
84
125
  if (failures.length > 0) {
85
126
  console.error("Support triage check failed:");
86
127
  for (const failure of failures) {
@@ -95,6 +136,15 @@ function read(path) {
95
136
  return readFileSync(join(root, path), "utf8");
96
137
  }
97
138
 
139
+ function readJson(path) {
140
+ try {
141
+ return JSON.parse(read(path));
142
+ } catch (error) {
143
+ failures.push(`${path} should be valid JSON: ${error instanceof Error ? error.message : String(error)}`);
144
+ return null;
145
+ }
146
+ }
147
+
98
148
  function requireFile(path) {
99
149
  if (!existsSync(join(root, path))) {
100
150
  failures.push(`${path} is missing.`);
@@ -112,3 +162,164 @@ function requireText(path, pattern, description) {
112
162
  failures.push(`${path} should include ${description}.`);
113
163
  }
114
164
  }
165
+
166
+ function checkTriagePlaybook() {
167
+ const path = "examples/support/triage-playbook.json";
168
+ const playbook = readJson(path);
169
+ if (!playbook) {
170
+ return;
171
+ }
172
+
173
+ if (!Array.isArray(playbook) || playbook.length !== 3) {
174
+ failures.push(`${path} should contain exactly three maintainer triage examples.`);
175
+ return;
176
+ }
177
+
178
+ const expectedIds = [
179
+ "gallery-expected-block-docs",
180
+ "false-positive-fixture-backlog",
181
+ "repeated-risky-domain-rule-review"
182
+ ];
183
+ const expectedOutcomes = ["docs-example", "fixture-backlog", "rule-review-candidate"];
184
+ const expectedSources = ["report-gallery-feedback", "false-positive"];
185
+ const seenIds = new Set();
186
+
187
+ for (const [index, entry] of playbook.entries()) {
188
+ const expectedId = expectedIds[index];
189
+ if (entry?.id !== expectedId) {
190
+ failures.push(`${path} entry ${index + 1} should have id ${expectedId}.`);
191
+ continue;
192
+ }
193
+
194
+ if (seenIds.has(entry.id)) {
195
+ failures.push(`${path} has duplicate id ${entry.id}.`);
196
+ }
197
+ seenIds.add(entry.id);
198
+
199
+ if (!expectedSources.includes(entry.source)) {
200
+ failures.push(`${entry.id}.source should be one of ${expectedSources.join(", ")}.`);
201
+ }
202
+
203
+ if (typeof entry.nearestReportExample !== "string" || entry.nearestReportExample.length < 4) {
204
+ failures.push(`${entry.id}.nearestReportExample should be a useful string.`);
205
+ }
206
+
207
+ if (typeof entry.sanitizedReport?.version !== "string") {
208
+ failures.push(`${entry.id}.sanitizedReport.version should be present.`);
209
+ }
210
+
211
+ if (!["command", "plan", "diff", "final"].includes(entry.sanitizedReport?.kind)) {
212
+ failures.push(`${entry.id}.sanitizedReport.kind should be a review kind.`);
213
+ }
214
+
215
+ if (typeof entry.sanitizedReport?.command !== "string" || !entry.sanitizedReport.command.includes("jester")) {
216
+ failures.push(`${entry.id}.sanitizedReport.command should include a jester command.`);
217
+ }
218
+
219
+ if (!Array.isArray(entry.sanitizedReport?.observed) || entry.sanitizedReport.observed.length < 2) {
220
+ failures.push(`${entry.id}.sanitizedReport.observed should include stable output fragments.`);
221
+ }
222
+
223
+ if (typeof entry.sanitizedReport?.question !== "string" || entry.sanitizedReport.question.length < 20) {
224
+ failures.push(`${entry.id}.sanitizedReport.question should explain the adopter surprise.`);
225
+ }
226
+
227
+ if (typeof entry.firstResponse !== "string" || !entry.firstResponse.includes("doctor --json")) {
228
+ failures.push(`${entry.id}.firstResponse should ask for or mention redacted doctor --json diagnostics.`);
229
+ }
230
+
231
+ if (!Array.isArray(entry.classification?.labels) || entry.classification.labels.length === 0) {
232
+ failures.push(`${entry.id}.classification.labels should be a non-empty array.`);
233
+ }
234
+
235
+ if (typeof entry.classification?.decision !== "string" || entry.classification.decision.length < 8) {
236
+ failures.push(`${entry.id}.classification.decision should be present.`);
237
+ }
238
+
239
+ if (!Array.isArray(entry.maintainerChecks) || !entry.maintainerChecks.includes("npm run support:check")) {
240
+ failures.push(`${entry.id}.maintainerChecks should include npm run support:check.`);
241
+ }
242
+
243
+ if (entry.followUpOutcome?.type !== expectedOutcomes[index]) {
244
+ failures.push(`${entry.id}.followUpOutcome.type should be ${expectedOutcomes[index]}.`);
245
+ }
246
+
247
+ if (typeof entry.followUpOutcome?.action !== "string" || entry.followUpOutcome.action.length < 30) {
248
+ failures.push(`${entry.id}.followUpOutcome.action should describe the maintainer action.`);
249
+ }
250
+ }
251
+ }
252
+
253
+ function checkResponseSnippets() {
254
+ const path = "examples/support/response-snippets.json";
255
+ const snippets = readJson(path);
256
+ if (!snippets) {
257
+ return;
258
+ }
259
+
260
+ if (!Array.isArray(snippets) || snippets.length !== 3) {
261
+ failures.push(`${path} should contain exactly three maintainer response snippets.`);
262
+ return;
263
+ }
264
+
265
+ const expected = [
266
+ { id: "docs-example-response", outcome: "docs-example", checks: ["npm run reports:check", "npm run support:check"] },
267
+ { id: "fixture-backlog-response", outcome: "fixture-backlog", checks: ["npm run fixtures:check", "npm run fixtures:report", "npm run support:check"] },
268
+ { id: "rule-review-candidate-response", outcome: "rule-review-candidate", checks: ["npm run fixtures:report -- --markdown", "npm run support:check"] }
269
+ ];
270
+ const seenIds = new Set();
271
+
272
+ for (const [index, snippet] of snippets.entries()) {
273
+ const expectedSnippet = expected[index];
274
+ if (snippet?.id !== expectedSnippet.id) {
275
+ failures.push(`${path} entry ${index + 1} should have id ${expectedSnippet.id}.`);
276
+ continue;
277
+ }
278
+
279
+ if (seenIds.has(snippet.id)) {
280
+ failures.push(`${path} has duplicate id ${snippet.id}.`);
281
+ }
282
+ seenIds.add(snippet.id);
283
+
284
+ if (snippet.outcome !== expectedSnippet.outcome) {
285
+ failures.push(`${snippet.id}.outcome should be ${expectedSnippet.outcome}.`);
286
+ }
287
+
288
+ if (typeof snippet.title !== "string" || snippet.title.length < 10) {
289
+ failures.push(`${snippet.id}.title should be a useful string.`);
290
+ }
291
+
292
+ if (typeof snippet.useWhen !== "string" || snippet.useWhen.length < 30) {
293
+ failures.push(`${snippet.id}.useWhen should explain when to use the response.`);
294
+ }
295
+
296
+ if (!Array.isArray(snippet.labels) || snippet.labels.length === 0) {
297
+ failures.push(`${snippet.id}.labels should be a non-empty array.`);
298
+ }
299
+
300
+ if (!Array.isArray(snippet.body) || snippet.body.length !== 3) {
301
+ failures.push(`${snippet.id}.body should contain exactly three response paragraphs.`);
302
+ continue;
303
+ }
304
+
305
+ const bodyText = snippet.body.join("\n");
306
+ if (!bodyText.includes("doctor --json")) {
307
+ failures.push(`${snippet.id}.body should ask for or mention redacted doctor --json diagnostics.`);
308
+ }
309
+
310
+ if (!/secret|private|redacted/i.test(bodyText)) {
311
+ failures.push(`${snippet.id}.body should include privacy or redaction guidance.`);
312
+ }
313
+
314
+ if (!Array.isArray(snippet.requiredChecks)) {
315
+ failures.push(`${snippet.id}.requiredChecks should be an array.`);
316
+ continue;
317
+ }
318
+
319
+ for (const check of expectedSnippet.checks) {
320
+ if (!snippet.requiredChecks.includes(check)) {
321
+ failures.push(`${snippet.id}.requiredChecks should include ${check}.`);
322
+ }
323
+ }
324
+ }
325
+ }