Skip to content

Hermes Agent context engine: the main model writes the compaction handoff on its cached prompt prefix

Require diagnostic context in reports and add agent rules (#10)

Elevatormusic4681c9fbff30
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 584a1c2..24a0a52 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -1,45 +1,142 @@
name: Bug report
-description: The plugin does something wrong or fails.
+description: Report a failure with the data needed to diagnose it.
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
- Do not paste private conversations, API keys, or full request bodies. For a security problem, use the Security tab instead (see SECURITY.md).
+ Complete each section. Use `unknown`, `not run`, or `not applicable` with a short reason when needed; do not guess. See [CONTRIBUTING.md](https://github.com/Elevatormusic/hermes-warm-compaction/blob/main/CONTRIBUTING.md).
+ Use synthetic messages. Do not paste real or private histories, summaries, full configs, raw requests, credentials, header/query values, account identifiers, or private local paths. Clearly label synthetic fixtures, synthetic summaries, and fake keys or option values used for tests. Do not enable full request dumps to complete this report. Review all output before sharing it. For a security problem, use [private reporting](https://github.com/Elevatormusic/hermes-warm-compaction/security/advisories/new).
+ These fields reduce follow-up requests. A new problem can still need more checks. No production cache reset or model deployment change is required.
- type: textarea
- id: what
+ id: behavior
attributes:
- label: What happened
- description: What you did, what you expected, and what happened.
+ label: Expected and actual behavior
+ description: Give the concrete action that fails, what you expected, what happened, and the effect on your task.
+ placeholder: |
+ Action:
+ Expected:
+ Actual:
+ Effect:
validations:
required: true
- type: textarea
- id: log
- attributes:
- label: warm_compaction log lines
- description: The `warm_compaction:` lines from `logs/agent.log`. They have the path, the reason, and the time, and no conversation text.
- render: text
- - type: input
- id: plugin
+ id: versions
attributes:
- label: Plugin version or commit
+ label: Plugin and Hermes versions
+ description: Give the versions that are installed and running. Give a full source commit when available, or the install ref. State local edits separately.
+ placeholder: |
+ Plugin version:
+ Plugin source commit or install ref:
+ Plugin install method and local edits:
+ Running Hermes version and commit:
+ Hermes install method and local edits:
validations:
required: true
- - type: input
- id: hermes
+ - type: textarea
+ id: environment
attributes:
- label: Hermes Agent commit or version
+ label: Environment and session
+ description: Python means the interpreter that runs Hermes. Name the run mode and relevant other plugins or middleware. Omit private paths and profile names.
+ placeholder: |
+ OS version and CPU architecture:
+ Hermes Python version:
+ Run mode (interactive CLI, one-shot CLI, Desktop, gateway, container, WSL, or other):
+ New or resumed session:
+ A main-model reply completed in this same process before compaction (yes/no/unknown):
+ Restart after install or settings change:
+ Other context engines, plugins, or middleware that affect requests:
+ Recent changes before the failure:
validations:
required: true
- - type: input
+ - type: textarea
id: route
attributes:
- label: API mode and server
- description: For example `chat_completions` on vLLM 0.x, llama.cpp, LM Studio, or a hosted API.
+ label: Main model route
+ description: Give the exact model ID and API mode. Give the server version when known. Name any proxy or gateway; give a hostname only if needed, never a full endpoint URL.
+ placeholder: |
+ Provider:
+ Model ID:
+ API mode (chat_completions, codex_responses, anthropic_messages, other, or unknown):
+ Server name and version (or hosted API):
+ Proxy or gateway in use:
+ validations:
+ required: true
+ - type: textarea
+ id: compaction
+ attributes:
+ label: Compaction setup and frequency
+ description: Give only these non-secret settings. Use default, unknown, or not applicable with a reason as needed. For the auxiliary route, state inherited/auto or give provider, model, API mode, and server version when known.
+ placeholder: |
+ Trigger (manual /compress, automatic, both, or install/load failure):
+ Failures / attempts and whether every attempt fails:
+ context.engine:
+ Plugin threshold, tail_tokens, user_copy_chars, warm:
+ Main model context window and reply limit:
+ auxiliary.warm_compaction route:
+ Route or settings changes during the attempt:
+ validations:
+ required: true
+ - type: textarea
+ id: request_options
+ attributes:
+ label: Request options and connection settings
+ description: Give custom option names and value types when known, never real values. Include options added by a gateway or middleware. State your source (selected settings or documentation), or use none/unknown with a reason. Omit certificate paths and data.
+ placeholder: |
+ Extra header names (including model.default_headers and provider extra_headers):
+ Extra query option names:
+ extra_body option names and value types:
+ Tool use and forced tool_choice present:
+ response_format or other structured-response option present:
+ Audio options or n above 1 present:
+ TLS checks enabled; custom CA used:
+ Gateway needs cookies:
+ Source of this information (or reason it is unknown):
validations:
required: true
- type: textarea
id: steps
attributes:
- label: Steps to reproduce
- description: Use a synthetic conversation if you can.
+ label: Minimal synthetic reproduction
+ description: Give numbered steps and clearly labeled invented messages or a small synthetic fixture. State approximate message and token counts. If a safe reproduction is unavailable, explain why. No real or private transcript or generated summary.
+ placeholder: |
+ 1.
+ 2.
+ Synthetic input or fixture:
+ Approximate message and token counts:
+ Built-in compressor result, if already checked (or not run):
+ validations:
+ required: true
+ - type: textarea
+ id: log
+ attributes:
+ label: Redacted compaction diagnostics
+ description: Paste relevant warm_compaction lines from logs/agent.log and adjacent plugin warnings about capture, fallback, or fixed summaries. Keep path, reason, elapsed time, token counts, and error class when available. Do not attach the whole log. If absent, state no log line and why.
+ render: text
+ validations:
+ required: true
+ - type: textarea
+ id: doctor
+ attributes:
+ label: Plugin doctor results
+ description: Run hermes plugins doctor warm_compaction in the terminal environment where Hermes runs. Give redacted check results. If the name does not resolve, use hermes plugins doctor <plugin-folder> locally. Replace private paths with <plugin-folder>. If unavailable or not run, state why.
+ render: text
+ validations:
+ required: true
+ - type: textarea
+ id: performance
+ attributes:
+ label: Performance evidence, if this report makes a performance claim
+ description: Complete only for a speed, cache, or token-use claim. Give synthetic workload, comparison method, versions/settings, number of runs, per-run times, prompt/output/cached-token counts, and concurrent load when known. State what was not measured. Missing counters are unknown, not zero. No live benchmark is required to report a functional bug.
+ placeholder: |
+ Claim and comparison:
+ Synthetic workload, versions, settings, and concurrent load:
+ Runs, per-run times, and token counts:
+ Unknown counters and measurement limits:
+ - type: checkboxes
+ id: privacy
+ attributes:
+ label: Before submission
+ options:
+ - label: I reviewed all text and attachments. They contain no real or private conversation, summary, full config, raw request, credential, header/query value, account identifier, or private local path. Synthetic fixtures and fake values are clearly labeled.
+ required: true
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 5b31c76..249d229 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -1,13 +1,36 @@
-## What and why
+## Problem and change
-<!-- What this change does, and the problem it fixes. Link the issue. -->
+<!-- Link the issue, or explain why there is none. Give the concrete trigger and before/after behavior. For a bug fix without a complete linked report, include applicable diagnostic fields from CONTRIBUTING.md. -->
-## How it was tested
+Issue:
+Trigger and before/after:
-<!-- The new test that failed before the change, and the checks you ran. -->
+## Scope
-- [ ] `python -m unittest discover -s tests -p "test_wc_*.py"` passes
-- [ ] `ruff check .` passes
-- [ ] The integration check passes on a clean Hermes checkout (when the change touches Hermes behavior)
-- [ ] README Limits and CHANGELOG are updated (when behavior changes)
-- [ ] No private conversation, key, or full request body in the change
+<!-- State the files/components changed, why they are needed, and any limits or risks. Explain any README Limits or CHANGELOG update that is needed for a behavior change. Use documented Hermes plugin APIs only: no host patch, compressor subclass, or runtime wrapping. -->
+
+## Check results
+
+<!-- Give the exact command and outcome for each applicable check: passed, failed, skipped, or unavailable. Explain every skipped or unavailable check. A document-only change needs link, form schema (when applicable), and diff checks; it needs no code regression test or model/server details. CI unit and lint checks must pass for every PR. -->
+
+| Check | Exact command | Outcome and evidence |
+| --- | --- | --- |
+| Regression test for a behavior fix (fails before, passes after) | | |
+| Unit tests | | |
+| Lint | | |
+| Hermes integration, for changes to Hermes interaction | | |
+| Document links / issue form YAML and schema, when applicable | | |
+| `git diff --check` | `git diff --check` | |
+
+<!-- For integration, give the exact clean Hermes commit, Python version, and report result. Commands and check limits are in CONTRIBUTING.md. Use placeholders for private paths. -->
+
+Integration versions and report (or not applicable with reason):
+
+## Evidence and limits
+
+<!-- Link small redacted metadata evidence and synthetic fixtures when needed. For a performance claim, give workload, comparison method, versions/settings, number of runs, per-run times, token/cache counts, and concurrent load when known. Missing counters are unknown. State what was not measured. For documents only, write not applicable with a reason. -->
+
+Evidence:
+Limits:
+
+- [ ] I reviewed the diff and attachments. They contain no real or private conversation, summary, full config, raw request, credential, header/query value, account identifier, or private local path. Synthetic fixtures and fake values are clearly labeled.
diff --git a/AGENTS.md b/AGENTS.md
new file mode 100644
index 0000000..1fdd28a
--- /dev/null
+++ b/AGENTS.md
@@ -0,0 +1,62 @@
+# Agent guide
+
+Read this file for every task. Use ASD-STE100 Simplified Technical English in chat, comments, docstrings, and documents. User instructions control the task. Keep changes small and reversible. Preserve unrelated files and local changes.
+
+## Start with current sources
+
+1. Read [README.md](README.md), [CONTRIBUTING.md](CONTRIBUTING.md), and [SECURITY.md](SECURITY.md). Read the code and tests that control the reported behavior.
+2. Check Git status, branch, commit, and remote before changes. For an issue, read the full report and all comments. For a PR, read the current diff, comments, review threads, and checks.
+3. Check the installed and running plugin version, source commit or install ref, and local edits when available. Check the exact Hermes commit and relevant plugin API source. Keep unknown values explicit. Historical evidence does not prove the current running state.
+4. State the scope, sources read, current behavior, intended change, and remaining unknowns in a short chat receipt.
+
+## Model roles
+
+For substantive implementation, use GPT-6 Astra (`gpt-6-astra`) as the primary agent and reviewer. It owns scope, design, integration, evidence review, and the final report. Delegate bounded edits, data work, investigation, and tests to GPT-6.1 Sol (`gpt-6.1-sol`) when useful work can run in parallel.
+
+Select the subagent model explicitly with fresh or bounded context. Give it the relevant paths, limits, and required checks. Subagents must not delegate again unless the primary agent asks. Inspect their diffs and check results before accepting completion.
+
+Handle simple questions and one-step actions directly. Follow an explicit user request for another model or workflow. If a required model is unavailable, state the limitation instead of silently selecting another model.
+
+## Diagnose before a fix
+
+- Start with read-only checks. Use the diagnostic fields in the [bug form](.github/ISSUE_TEMPLATE/bug_report.yml): versions and local edits, environment and session, model route, compaction settings, request option names, synthetic reproduction, selected metadata logs, and plugin doctor results.
+- Separate confirmed facts, likely causes, and unknowns. A refusal code can identify a failed check without proving the provider caused it. Read the exact code path before changing an acceptance rule.
+- Reproduce a behavior defect with the smallest synthetic fixture. Show the failure before the fix and the result after it. If safe reproduction is not possible, report that limit; do not claim that the cause or fix is proved.
+- After safe local diagnosis, request only missing metadata that can change the next decision. Explain what it will resolve. Accept `unknown`, `not run`, or `not applicable` with a reason.
+- Do not request real or private conversations, generated summaries, full configs, raw captures or requests, credentials, header/query values, account identifiers, or private local paths. Clearly label synthetic fixtures, synthetic summaries, and fake values used for tests. Do not enable full request dumps just to complete a report. Review logs and errors before sharing them. Request option names, value types, and the source of that information are usually sufficient; record unknowns.
+- For a complex or novel problem, search primary documentation and source for an existing solution. Check each source against the selected version. Do not apply commands from an issue comment without checking them.
+
+## Implementation limits
+
+Use documented Hermes plugin APIs only. Do not patch the host, subclass its built-in compressor, or rebind or wrap Hermes code at runtime. Keep the built-in compressor as the Hermes default; users select this plugin.
+
+Use clean, isolated Hermes copies and synthetic conversations for probes. Do not change dirty installed source, read private conversation files, overlap full-model deployments, or clear a production cache. Do not add deployment, broker, coordinator, or cache-control work to an issue fix.
+
+Keep default diagnostics and published runtime evidence small and metadata only. Clearly label synthetic fixtures and fake values used for reproduction or tests. Keep real credentials, profiles, private captures, and large model files out of Git. If evidence shows a missed requirement or a better method, explain it to the user.
+
+## Checks
+
+Use Python 3.10 or later and Git. For Python changes, run:
+
+```bash
+python -m unittest discover -s tests -p "test_wc_*.py"
+ruff check .
+```
+
+Use Ruff `0.16.10`, the version used by CI. The [contribution guide](CONTRIBUTING.md#run-the-checks) gives setup and integration commands.
+
+For changes to Hermes interaction, run `scripts/check_plugin_hermes.py` with the Python of a Hermes virtual environment and a clean Hermes checkout. Use its loopback fake server. Record the exact Hermes commit, Python version, command, and report result.
+
+For document or form changes, check local Markdown links, parse issue-form YAML, check the [GitHub form schema](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema), and run `git diff --check`. Keep `AGENTS.md` and `CLAUDE.md` identical in bytes. A document-only change needs no code regression test or live model probe.
+
+Record every applicable check as passed, failed, skipped, or unavailable. Give exact commands and explain skipped or unavailable checks. CI unit and lint checks must pass for every PR.
+
+Unit tests prove local fixture behavior. Loopback integration checks prove behavior on the named Hermes source. Neither proves a live route, summary quality, cache reuse, or a speed gain. A performance claim needs the synthetic workload, comparison method, versions/settings, run counts, per-run times, token/cache counters, and measurement limits. Report missing counters as unknown.
+
+## PR and final report
+
+Use the [PR template](.github/pull_request_template.md). Link the issue, give the concrete trigger and before/after behavior, describe scope and limits, and include exact check results. Use `not applicable` with a reason for runtime sections in a document-only PR.
+
+Before a PR update or publication, check the current branch head, diff, checks, and relevant issue or review comments again. Inspect the full diff for unrelated changes and private data. Do not infer completion from an old check result.
+
+The final report states what changed, why, the checks and their outcomes, and what remains unproved. Do not present a local fix as deployed or a unit test as a performance result.
diff --git a/CLAUDE.md b/CLAUDE.md
new file mode 100644
index 0000000..1fdd28a
--- /dev/null
+++ b/CLAUDE.md
@@ -0,0 +1,62 @@
+# Agent guide
+
+Read this file for every task. Use ASD-STE100 Simplified Technical English in chat, comments, docstrings, and documents. User instructions control the task. Keep changes small and reversible. Preserve unrelated files and local changes.
+
+## Start with current sources
+
+1. Read [README.md](README.md), [CONTRIBUTING.md](CONTRIBUTING.md), and [SECURITY.md](SECURITY.md). Read the code and tests that control the reported behavior.
+2. Check Git status, branch, commit, and remote before changes. For an issue, read the full report and all comments. For a PR, read the current diff, comments, review threads, and checks.
+3. Check the installed and running plugin version, source commit or install ref, and local edits when available. Check the exact Hermes commit and relevant plugin API source. Keep unknown values explicit. Historical evidence does not prove the current running state.
+4. State the scope, sources read, current behavior, intended change, and remaining unknowns in a short chat receipt.
+
+## Model roles
+
+For substantive implementation, use GPT-6 Astra (`gpt-6-astra`) as the primary agent and reviewer. It owns scope, design, integration, evidence review, and the final report. Delegate bounded edits, data work, investigation, and tests to GPT-6.1 Sol (`gpt-6.1-sol`) when useful work can run in parallel.
+
+Select the subagent model explicitly with fresh or bounded context. Give it the relevant paths, limits, and required checks. Subagents must not delegate again unless the primary agent asks. Inspect their diffs and check results before accepting completion.
+
+Handle simple questions and one-step actions directly. Follow an explicit user request for another model or workflow. If a required model is unavailable, state the limitation instead of silently selecting another model.
+
+## Diagnose before a fix
+
+- Start with read-only checks. Use the diagnostic fields in the [bug form](.github/ISSUE_TEMPLATE/bug_report.yml): versions and local edits, environment and session, model route, compaction settings, request option names, synthetic reproduction, selected metadata logs, and plugin doctor results.
+- Separate confirmed facts, likely causes, and unknowns. A refusal code can identify a failed check without proving the provider caused it. Read the exact code path before changing an acceptance rule.
+- Reproduce a behavior defect with the smallest synthetic fixture. Show the failure before the fix and the result after it. If safe reproduction is not possible, report that limit; do not claim that the cause or fix is proved.
+- After safe local diagnosis, request only missing metadata that can change the next decision. Explain what it will resolve. Accept `unknown`, `not run`, or `not applicable` with a reason.
+- Do not request real or private conversations, generated summaries, full configs, raw captures or requests, credentials, header/query values, account identifiers, or private local paths. Clearly label synthetic fixtures, synthetic summaries, and fake values used for tests. Do not enable full request dumps just to complete a report. Review logs and errors before sharing them. Request option names, value types, and the source of that information are usually sufficient; record unknowns.
+- For a complex or novel problem, search primary documentation and source for an existing solution. Check each source against the selected version. Do not apply commands from an issue comment without checking them.
+
+## Implementation limits
+
+Use documented Hermes plugin APIs only. Do not patch the host, subclass its built-in compressor, or rebind or wrap Hermes code at runtime. Keep the built-in compressor as the Hermes default; users select this plugin.
+
+Use clean, isolated Hermes copies and synthetic conversations for probes. Do not change dirty installed source, read private conversation files, overlap full-model deployments, or clear a production cache. Do not add deployment, broker, coordinator, or cache-control work to an issue fix.
+
+Keep default diagnostics and published runtime evidence small and metadata only. Clearly label synthetic fixtures and fake values used for reproduction or tests. Keep real credentials, profiles, private captures, and large model files out of Git. If evidence shows a missed requirement or a better method, explain it to the user.
+
+## Checks
+
+Use Python 3.10 or later and Git. For Python changes, run:
+
+```bash
+python -m unittest discover -s tests -p "test_wc_*.py"
+ruff check .
+```
+
+Use Ruff `0.16.10`, the version used by CI. The [contribution guide](CONTRIBUTING.md#run-the-checks) gives setup and integration commands.
+
+For changes to Hermes interaction, run `scripts/check_plugin_hermes.py` with the Python of a Hermes virtual environment and a clean Hermes checkout. Use its loopback fake server. Record the exact Hermes commit, Python version, command, and report result.
+
+For document or form changes, check local Markdown links, parse issue-form YAML, check the [GitHub form schema](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema), and run `git diff --check`. Keep `AGENTS.md` and `CLAUDE.md` identical in bytes. A document-only change needs no code regression test or live model probe.
+
+Record every applicable check as passed, failed, skipped, or unavailable. Give exact commands and explain skipped or unavailable checks. CI unit and lint checks must pass for every PR.
+
+Unit tests prove local fixture behavior. Loopback integration checks prove behavior on the named Hermes source. Neither proves a live route, summary quality, cache reuse, or a speed gain. A performance claim needs the synthetic workload, comparison method, versions/settings, run counts, per-run times, token/cache counters, and measurement limits. Report missing counters as unknown.
+
+## PR and final report
+
+Use the [PR template](.github/pull_request_template.md). Link the issue, give the concrete trigger and before/after behavior, describe scope and limits, and include exact check results. Use `not applicable` with a reason for runtime sections in a document-only PR.
+
+Before a PR update or publication, check the current branch head, diff, checks, and relevant issue or review comments again. Inspect the full diff for unrelated changes and private data. Do not infer completion from an old check result.
+
+The final report states what changed, why, the checks and their outcomes, and what remains unproved. Do not present a local fix as deployed or a unit test as a performance result.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index aa975f6..ab6ff6d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -4,25 +4,56 @@ Thank you for your help. This guide tells you how to report a problem, propose a
## Report a problem
-- For a bug, open an issue with the **Bug report** form. Give the Hermes Agent commit, the plugin version, the API mode, and the server (for example vLLM, llama.cpp, or a hosted API).
-- Each compaction writes one `warm_compaction:` line to `logs/agent.log`. Add that line: it has the path (`warm`, `fallback`, or `fixed`), the reason, and the time. It has no conversation text.
-- Do not attach private conversations, API keys, or full request bodies. Use a synthetic conversation that shows the problem.
-- For a security problem, do not open an issue. See [SECURITY.md](SECURITY.md).
+Use the [Bug report form](.github/ISSUE_TEMPLATE/bug_report.yml) for a failure. Use the [Feature request form](.github/ISSUE_TEMPLATE/feature_request.yml) for a proposed capability. For a security problem, use the private route in [SECURITY.md](SECURITY.md).
+
+Complete each bug report section. Give exact versions when you have them. Write `unknown`, `not run`, or `not applicable` with a short reason when you cannot give a value. Do not guess. These fields reduce follow-up requests, but a new or version-specific problem can still need more checks.
+
+Include:
+
+- The installed plugin version, source commit or install ref, install method, and local edits. Give the running Hermes version and commit, and any local Hermes edits.
+- OS version, CPU architecture, Python version used by Hermes, and run mode (interactive CLI, one-shot CLI, Desktop, gateway, container, or WSL). State whether the session is new or resumed, whether a main-model reply completed in this process before compaction, and whether Hermes restarted after the plugin or settings changed.
+- Main provider, exact model ID, API mode, server name and version when known, and whether a proxy or gateway is used. Include a hostname only if needed to explain routing. Do not give full endpoint URLs.
+- Compaction trigger and frequency, selected context engine, plugin settings, context window, reply limit, and the auxiliary `warm_compaction` route. State any recent route or settings change and other context engines, plugins, or middleware that can affect the request.
+- Names of extra headers, query options, and `extra_body` options, their value types when known, and whether tool, structured-response, audio, or multiple-choice request options are set. State where this information came from, or why it is unknown. Give no real header, query, or `extra_body` values. State whether TLS checks are enabled, whether a custom CA is used, and whether a gateway needs cookies. Give no certificate or cookie data.
+- Minimal steps with a synthetic conversation, expected behavior, actual behavior, and how often the failure occurs. State whether the built-in compressor has the same problem, if already checked. A baseline check is optional.
+- Redacted diagnostic output, as described below. For a performance claim, also give the comparison method, per-run times, token counts, cache counters, versions, and limits. A missing cache counter is `unknown`, not zero.
+
+### Safe reproduction and diagnostics
+
+Use invented messages that reproduce the failure. State the approximate message count and token count. If no safe reproduction is available, explain that limit. Do not attach real or private histories, generated summaries, full configurations, raw requests, credentials, header/query values, account identifiers, or private local paths. Clearly label synthetic fixtures, synthetic summaries, and fake credential or option values used for tests. Do not enable full request dumps just to complete a report.
+
+Copy the relevant `warm_compaction:` lines from `logs/agent.log`, and any adjacent plugin warnings about capture, fallback, or fixed summaries. Keep path, reason, elapsed time, token counts, and error class when available. Report `no log line` with a reason when the plugin never loaded or no compaction ran. Review the selected lines before you paste them; do not attach the whole log.
+
+Run this command in the same terminal environment where Hermes runs, then provide the redacted check results:
+
+```bash
+hermes plugins doctor warm_compaction
+```
+
+If the installed plugin name cannot be resolved, use `hermes plugins doctor <plugin-folder>` locally. Replace private paths in the shared command and output with `<plugin-folder>`. If the command is unavailable or you did not run it, give that status and reason. Doctor checks discovery and registration; it does not prove that a running session loaded the plugin, that a summary is correct, or that a server reused its cache.
+
+Use a clean, isolated Hermes copy for further probes. Keep installed source and production sessions intact. A report does not require a production cache reset, a model deployment change, or a live benchmark.
## Propose a change
1. Open an issue first for a large change, so that we can agree on the design.
2. Fork the repository and make a branch from `main`.
-3. Write a test that fails without your change. Then make the change.
-4. Run the checks below.
-5. Open a pull request. Fill in the template.
+3. For a behavior fix, add a test that fails without your change. Then make the change. A document-only change does not need a code test.
+4. Run the applicable checks below. Record the exact command and whether it passed, failed, was skipped, or was unavailable. Explain every skipped or unavailable check.
+5. Open a pull request. Complete the [PR template](.github/pull_request_template.md): link the issue, state the concrete trigger and before/after behavior, explain the scope, and give check results and limits. If there is no issue, explain why.
Keep each pull request to one subject. The plugin uses documented Hermes plugin APIs only: no patch of Hermes, no subclass of the built-in compressor, and no runtime wrapping of Hermes code. A change that needs one of those cannot be merged.
+For a bug fix, link a complete bug report or include its applicable diagnostic fields in the PR. For a performance change, include the comparison method and small metadata evidence. Clearly label synthetic fixtures and redact runtime evidence before publication. A document-only PR needs no model, server, or private runtime data; write `not applicable` with a reason for those sections.
+
+Agents must read [AGENTS.md](AGENTS.md) before work. [CLAUDE.md](CLAUDE.md) has the same instructions.
+
## Run the checks
You need Python 3.10 or later and Git. The plugin has no third-party dependency.
+For Python changes, run the unit tests and lint. Unit tests check local behavior with fixtures; they do not prove deployed compatibility, summary quality, or cache reuse.
+
```bash
python -m unittest discover -s tests -p "test_wc_*.py"
```
@@ -34,12 +65,16 @@ pip install ruff==0.16.10
ruff check .
```
-The integration check runs real Hermes code against a loopback fake server. Run it with the Python of a Hermes virtual environment and a **clean** Hermes checkout, not your installed Hermes:
+For changes to Hermes interaction, also run the integration check. It runs real Hermes code against a loopback fake server with synthetic conversations. Run it with the Python of a Hermes virtual environment and a **clean** Hermes checkout, not your installed Hermes. Record the exact Hermes commit, Python version, command, and report result:
```bash
<hermes-venv-python> -B scripts/check_plugin_hermes.py --hermes-source <clean-hermes-checkout> --report .work/plugin-integration-report.json
```
+The integration check covers install, request, compaction, and history behavior on that Hermes version. It does not call a real model or prove live cache reuse or a performance gain. Keep evidence small and metadata only.
+
+For document or form changes, check local Markdown links and run `git diff --check`. For issue forms, parse the YAML and check its fields against the [GitHub form schema](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema). No live model check is needed for these changes.
+
CI runs the unit tests on Python 3.10 to 3.13 (Linux) and on Python 3.12 (Windows and macOS), and the lint. A pull request must pass both.
## Style