coffee-roaster-mcp 0.1.0__tar.gz

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 (105) hide show
  1. coffee_roaster_mcp-0.1.0/.claude/skills/code-quality/SKILL.md +53 -0
  2. coffee_roaster_mcp-0.1.0/.claude/skills/hottop-validation/SKILL.md +229 -0
  3. coffee_roaster_mcp-0.1.0/.claude/skills/mcp-dev/SKILL.md +48 -0
  4. coffee_roaster_mcp-0.1.0/.claude/skills/mock-roast/SKILL.md +73 -0
  5. coffee_roaster_mcp-0.1.0/.claude/skills/release-registry/SKILL.md +64 -0
  6. coffee_roaster_mcp-0.1.0/.github/instructions/copilot.instructions.md +57 -0
  7. coffee_roaster_mcp-0.1.0/.github/scripts/write_coverage_summary.py +169 -0
  8. coffee_roaster_mcp-0.1.0/.github/workflows/ci.yml +96 -0
  9. coffee_roaster_mcp-0.1.0/.github/workflows/release.yml +234 -0
  10. coffee_roaster_mcp-0.1.0/.gitignore +221 -0
  11. coffee_roaster_mcp-0.1.0/AGENTS.md +131 -0
  12. coffee_roaster_mcp-0.1.0/LICENSE +201 -0
  13. coffee_roaster_mcp-0.1.0/PKG-INFO +642 -0
  14. coffee_roaster_mcp-0.1.0/README.md +406 -0
  15. coffee_roaster_mcp-0.1.0/docs/install-and-hardware-setup.md +291 -0
  16. coffee_roaster_mcp-0.1.0/docs/plans/coffee-roaster-mcp-v0.1-overall-plan.md +597 -0
  17. coffee_roaster_mcp-0.1.0/docs/plans/e2-runtime-crosswalk-from-coffee-roasting-poc.md +233 -0
  18. coffee_roaster_mcp-0.1.0/docs/release.md +157 -0
  19. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-03-bootstrap-pr64.md +283 -0
  20. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-03-e1-s4-pr65-review-cycle.md +178 -0
  21. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-03-e1-s5-through-e1-s7-and-e1-s8-prep.md +305 -0
  22. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-04-e2-s1-e2-s2-code-review-summary.md +202 -0
  23. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-04-e2-s1-e2-s2-runtime-and-review-cycle.md +208 -0
  24. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-04-e2-s3-e2-s4-code-review-summary.md +233 -0
  25. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-04-e2-s3-e2-s4-runtime-and-review-cycle.md +220 -0
  26. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-04-e2-s4-pr73-copilot-review-assessment.md +139 -0
  27. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-04-e2-s4-pr73-final-runtime-and-review-cycle.md +149 -0
  28. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-04-e2-s5-pr74-phase-transitions-review-cycle.md +233 -0
  29. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-04-e2-s6-pr75-emergency-stop-review-cycle.md +353 -0
  30. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-04-e2-s7-e2-s8-pr76-pr78-coverage-and-review-cycle.md +273 -0
  31. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-09-e3-s1-pr79-driver-interface-review-cycle.md +268 -0
  32. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-10-e3-s2-e3-s4-driver-lifecycle-review-cycle.md +266 -0
  33. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-11-e3-s5-pr83-hottop-command-loop-review-cycle.md +275 -0
  34. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-12-e3-s6-pr85-hottop-packet-build-parse-review-cycle.md +103 -0
  35. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-12-e3-s7-pr87-hottop-controls-review-cycle.md +117 -0
  36. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-12-e3-s8-pr89-temperature-units-review-cycle.md +147 -0
  37. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-17-e3-s9-hottop-integration-validation.md +246 -0
  38. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-17-e4-s1-hugging-face-artifact-resolver.md +159 -0
  39. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-17-e4-s10-harden-first-crack-and-mcp-coverage.md +199 -0
  40. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-17-e4-s2-load-int8-onnx-by-default.md +126 -0
  41. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-17-e4-s3-load-fp32-onnx-by-config.md +147 -0
  42. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-17-e4-s4-support-local-offline-model-directory.md +137 -0
  43. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-17-e4-s5-validate-required-detector-artifacts.md +152 -0
  44. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-17-e4-s6-add-audio-capture-pipeline.md +211 -0
  45. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-17-e4-s7-add-detector-adapter.md +189 -0
  46. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-17-e4-s8-add-microphone-and-wav-audio-input-adapters.md +273 -0
  47. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-17-e4-s9-integrate-first-crack-with-session-timeline.md +283 -0
  48. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-18-e4-1-s1-wire-mcp-roast-control-tools.md +265 -0
  49. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-18-e4-1-s2-expose-roaster-device-state.md +142 -0
  50. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-18-e4-1-s3-released-onnx-detector-backend.md +123 -0
  51. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-18-e4-1-s4-start-first-crack-runtime.md +145 -0
  52. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-18-e4-1-s5-mcp-operational-readiness.md +117 -0
  53. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-18-e4-1-s6-automatic-t0-runtime-path.md +170 -0
  54. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-23-e5-s1-rolling-telemetry-buffer-review-cycle.md +89 -0
  55. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-23-e5-s2-elapsed-roast-time.md +79 -0
  56. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-23-e5-s3-development-time-percent.md +129 -0
  57. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-23-e5-s4-60s-bean-env-deltas.md +118 -0
  58. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-23-e5-s5-bean-env-ror.md +123 -0
  59. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-23-e5-s6-append-only-jsonl-log.md +180 -0
  60. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-24-e5-s10-autonomous-telemetry-sampler.md +99 -0
  61. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-24-e5-s7-csv-roast-log-export.md +216 -0
  62. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-24-e5-s8-summary-json-export.md +84 -0
  63. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-24-e5-s9-log-schema-tests.md +78 -0
  64. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-24-e6-s1-pypi-package-metadata.md +102 -0
  65. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-24-e6-s2-readme-mcp-verification-string.md +71 -0
  66. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-24-e6-s3-server-json.md +108 -0
  67. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-24-e6-s4-version-alignment.md +69 -0
  68. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-24-e6-s5-release-workflow.md +148 -0
  69. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-24-e6-s6-mcp-registry-publishing-verification.md +157 -0
  70. coffee_roaster_mcp-0.1.0/docs/session-summaries/2026-05-24-e6-s7-install-and-hardware-setup-docs.md +87 -0
  71. coffee_roaster_mcp-0.1.0/docs/state/epics/coffee-roaster-mcp-v0.1.md +1857 -0
  72. coffee_roaster_mcp-0.1.0/docs/state/github-issues.md +111 -0
  73. coffee_roaster_mcp-0.1.0/docs/state/registry.md +347 -0
  74. coffee_roaster_mcp-0.1.0/pyproject.toml +107 -0
  75. coffee_roaster_mcp-0.1.0/server.json +24 -0
  76. coffee_roaster_mcp-0.1.0/src/coffee_roaster_mcp/__init__.py +3 -0
  77. coffee_roaster_mcp-0.1.0/src/coffee_roaster_mcp/artifacts.py +238 -0
  78. coffee_roaster_mcp-0.1.0/src/coffee_roaster_mcp/audio.py +583 -0
  79. coffee_roaster_mcp-0.1.0/src/coffee_roaster_mcp/cli.py +131 -0
  80. coffee_roaster_mcp-0.1.0/src/coffee_roaster_mcp/config.py +576 -0
  81. coffee_roaster_mcp-0.1.0/src/coffee_roaster_mcp/controls.py +24 -0
  82. coffee_roaster_mcp-0.1.0/src/coffee_roaster_mcp/detector.py +523 -0
  83. coffee_roaster_mcp-0.1.0/src/coffee_roaster_mcp/drivers.py +1288 -0
  84. coffee_roaster_mcp-0.1.0/src/coffee_roaster_mcp/exports.py +601 -0
  85. coffee_roaster_mcp-0.1.0/src/coffee_roaster_mcp/first_crack_runtime.py +345 -0
  86. coffee_roaster_mcp-0.1.0/src/coffee_roaster_mcp/hottop_validation.py +596 -0
  87. coffee_roaster_mcp-0.1.0/src/coffee_roaster_mcp/mcp_server.py +1403 -0
  88. coffee_roaster_mcp-0.1.0/src/coffee_roaster_mcp/py.typed +1 -0
  89. coffee_roaster_mcp-0.1.0/src/coffee_roaster_mcp/session.py +1961 -0
  90. coffee_roaster_mcp-0.1.0/tests/test_artifacts.py +437 -0
  91. coffee_roaster_mcp-0.1.0/tests/test_audio.py +562 -0
  92. coffee_roaster_mcp-0.1.0/tests/test_config.py +284 -0
  93. coffee_roaster_mcp-0.1.0/tests/test_detector.py +621 -0
  94. coffee_roaster_mcp-0.1.0/tests/test_drivers.py +1681 -0
  95. coffee_roaster_mcp-0.1.0/tests/test_exports.py +628 -0
  96. coffee_roaster_mcp-0.1.0/tests/test_first_crack_integration.py +378 -0
  97. coffee_roaster_mcp-0.1.0/tests/test_first_crack_runtime.py +376 -0
  98. coffee_roaster_mcp-0.1.0/tests/test_hottop_validation.py +536 -0
  99. coffee_roaster_mcp-0.1.0/tests/test_mcp_server.py +1253 -0
  100. coffee_roaster_mcp-0.1.0/tests/test_package.py +841 -0
  101. coffee_roaster_mcp-0.1.0/tests/test_package_metadata.py +62 -0
  102. coffee_roaster_mcp-0.1.0/tests/test_readme.py +41 -0
  103. coffee_roaster_mcp-0.1.0/tests/test_release_workflow.py +157 -0
  104. coffee_roaster_mcp-0.1.0/tests/test_server_json.py +132 -0
  105. coffee_roaster_mcp-0.1.0/tests/test_session.py +1809 -0
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: code-quality
3
+ description: Run RoastPilot quality gates for tests, linting, formatting, type checking, and CLI smoke checks. Use before marking a story complete or before opening a PR.
4
+ ---
5
+
6
+ # Code Quality - RoastPilot
7
+
8
+ Use this skill before marking implementation work complete.
9
+
10
+ ## Prerequisites
11
+
12
+ - Work from the repository root.
13
+ - Use Python 3.11+.
14
+ - Dependencies must be installed from project metadata:
15
+
16
+ ```bash
17
+ python -m pip install -e . --group dev
18
+ ```
19
+
20
+ ## Required Checks
21
+
22
+ Run:
23
+
24
+ ```bash
25
+ python -m pytest
26
+ python -m ruff check .
27
+ python -m ruff format --check .
28
+ python -m pyright
29
+ coffee-roaster-mcp --help
30
+ coffee-roaster-mcp --version
31
+ ```
32
+
33
+ ## Acceptance
34
+
35
+ - `pytest` passes.
36
+ - `ruff check .` passes.
37
+ - `ruff format --check .` passes.
38
+ - `pyright` reports 0 errors.
39
+ - CLI help and version commands exit successfully.
40
+
41
+ ## If The Environment Is Incomplete
42
+
43
+ - Do not silently skip checks.
44
+ - Create a temporary virtual environment if needed.
45
+ - Install dependencies from `pyproject.toml`.
46
+ - Record exactly which checks passed and which could not be run.
47
+
48
+ ## Do Not
49
+
50
+ - Add production test fakes to make tests easier.
51
+ - Install dependencies without declaring them in `pyproject.toml`.
52
+ - Mark hardware stories complete from unit tests alone.
53
+
@@ -0,0 +1,229 @@
1
+ ---
2
+ name: hottop-validation
3
+ description: Review the guarded manual validation path for Hottop hardware work. Use when planning or verifying hardware-facing changes without overstating what the repo can currently run.
4
+ ---
5
+
6
+ # Hottop Validation - RoastPilot
7
+
8
+ Use this skill for Hottop-facing work and release-readiness review.
9
+
10
+ ## Current Scope
11
+
12
+ - Hottop lifecycle, command-loop streaming, packet build/parse, control command state, and temperature-unit handling exist behind the `HottopRoasterDriver` boundary.
13
+ - The MCP roast-session tools call the configured `RoasterDriver` boundary
14
+ while preserving the one-session store semantics and fail-closed behavior.
15
+ - The runnable validation entrypoint is `coffee-roaster-mcp hottop-validate`.
16
+ - Hardware stories are not complete from mock tests alone.
17
+ - For operator setup details, including the Hottop config block and log output
18
+ paths, use `docs/install-and-hardware-setup.md`.
19
+
20
+ ## Pre-Validation Gates
21
+
22
+ Complete these gates in order before any Hottop hardware session.
23
+
24
+ ### 1. Story And Source Readiness
25
+
26
+ - Confirm E3-S4 through E3-S8 are complete in `docs/state/epics/coffee-roaster-mcp-v0.1.md`.
27
+ - Confirm the current Hottop validation story or release-readiness task is active, not a broader driver redesign.
28
+ - Confirm unit and integration coverage exists in `tests/test_drivers.py` and `tests/test_hottop_validation.py`.
29
+ - Confirm fail-closed behavior in `src/coffee_roaster_mcp/drivers.py`.
30
+
31
+ ### 2. Operator And Hardware Readiness
32
+
33
+ - Confirm the roaster is supervised for the full run.
34
+ - Confirm the operator understands emergency stop, bean drop, cooling, and physical power-off expectations.
35
+ - Confirm the serial port is known.
36
+ - Confirm the config file explicitly sets `roaster.driver: hottop_kn8828b_2k_plus`.
37
+ - Confirm the operator accepts that `--include-drop` is irreversible for loaded beans.
38
+
39
+ ### 3. Run Readiness
40
+
41
+ - Run the non-destructive validation before any full validation.
42
+ - Proceed to `--include-drop` only when the roaster is ready for an actual drop check.
43
+ - Proceed to `--include-emergency-stop` only when the operator is ready to verify the safety action.
44
+
45
+ Confirm these source artifacts before running hardware:
46
+
47
+ - `src/coffee_roaster_mcp/drivers.py`: `HottopRoasterDriver`, command-loop lifecycle, command state, packet build/parse, status read, temperature normalization, and emergency stop.
48
+ - `src/coffee_roaster_mcp/hottop_validation.py`: guarded `hottop-validate` runner, JSON evidence shape, skipped-step behavior, and release-label decision.
49
+ - `src/coffee_roaster_mcp/cli.py`: `hottop-validate` CLI options and acknowledgement flag.
50
+ - `docs/state/epics/coffee-roaster-mcp-v0.1.md`: E3-S4 through E3-S9 status and validation notes.
51
+
52
+ ## Hard Abort Conditions
53
+
54
+ Stop the validation session immediately if any of these occur:
55
+
56
+ - The serial port cannot be identified confidently or opens the wrong device.
57
+ - The command reports repeated serial write, read, checksum, or command-loop errors.
58
+ - The roaster heats when the current step expects heat off.
59
+ - Heat, fan, drop, cooling, or emergency stop causes a physical action inconsistent with the expected state.
60
+ - Temperature readings are absent, implausible, or jump unexpectedly after the telemetry wait.
61
+ - The command loop does not stop cleanly on disconnect.
62
+ - The operator loses direct supervision of the roaster.
63
+ - Smoke, electrical smell, uncontrolled heat, jammed drop, or unexpected mechanical behavior appears.
64
+
65
+ Abort procedure:
66
+
67
+ 1. Run or trigger emergency stop if it is safe to do so.
68
+ 2. Physically power off the roaster if software control is uncertain.
69
+ 3. Preserve the JSON evidence file and terminal output.
70
+ 4. Do not continue to later steps in the same run.
71
+ 5. Record the failed step, observed behavior, and whether the roaster was physically powered off.
72
+
73
+ ## Guarded Validation Command
74
+
75
+ Use a local config file with an explicit Hottop driver and serial port:
76
+
77
+ ```yaml
78
+ roaster:
79
+ driver: hottop_kn8828b_2k_plus
80
+ port: /dev/cu.usbserial-XXXX
81
+ baudrate: 115200
82
+ temperature_unit: auto
83
+ command_interval_seconds: 0.3
84
+ ```
85
+
86
+ Run the non-destructive portion first:
87
+
88
+ ```bash
89
+ coffee-roaster-mcp hottop-validate \
90
+ --config coffee-roaster-mcp.yaml \
91
+ --output docs/validation/hottop-e3-s9-non-destructive.json \
92
+ --i-understand-this-controls-hardware
93
+ ```
94
+
95
+ Run the full validation only when the roaster is supervised and ready for drop and emergency-stop checks:
96
+
97
+ ```bash
98
+ coffee-roaster-mcp hottop-validate \
99
+ --config coffee-roaster-mcp.yaml \
100
+ --output docs/validation/hottop-e3-s9-full.json \
101
+ --i-understand-this-controls-hardware \
102
+ --include-drop \
103
+ --include-emergency-stop
104
+ ```
105
+
106
+ Do not commit generated validation JSON unless the file is sanitized to remove sensitive data and formatted for long-term storage. Never commit raw serial captures.
107
+
108
+ ## Pass/Fail Criteria
109
+
110
+ Use this table with the JSON evidence from `hottop-validate` plus direct operator observation.
111
+
112
+ | Area | Pass | Needs Review Or Skipped | Fail |
113
+ | --- | --- | --- | --- |
114
+ | Connection and cleanup | `connect` is `passed`, `raw.command_loop_running` is true while connected, command writes increase, and disconnect exits cleanly. | Not applicable. | Serial open fails, writes do not occur after connection, command-loop errors increase, or disconnect reports the loop did not stop. |
115
+ | Startup safe state | First connected state shows heat `0`, fan `0` unless cooling is commanded, cooling false, solenoid false, and drum false before heat is requested. | Not applicable. | Heat, cooling, drop/solenoid, or unexpected fan behavior starts without an explicit validation step. |
116
+ | Packet parsing and telemetry | `stable_telemetry` is `passed`, `raw.status_packet_count` is greater than zero, `bean_temp_c` and `env_temp_c` are plausible, and `raw.status_read_error_count` is zero. | `stable_telemetry` is `needs_review`, startup zero readings are ignored, or temperatures are missing while the command loop otherwise runs. | Packet counts never increase, checksum/read errors repeat, command echoes are parsed as telemetry, or normalized temperatures are physically impossible. |
117
+ | Temperature units | Configured `temperature_unit` matches the run plan, `raw.resolved_temperature_unit` is stable after plausible telemetry, and Celsius-normalized values are plausible. | `auto` changes resolved unit during warmup or after ignored packets. | Fahrenheit readings are exposed as Celsius, Celsius readings are double-converted, or unit resolution remains absent after stable telemetry. |
118
+ | Heat | Heat step sets `heat_level_percent` to the requested conservative value, drum is on when heat is nonzero, then `heat_off` returns heat to `0`. | Not applicable. | Heat remains on after `heat_off`, heat changes without command, or drum behavior contradicts the heat command. |
119
+ | Fan | Fan step sets `fan_level_percent` to the requested value and the Hottop main fan responds consistently. | Not applicable. | Fan value is outside the requested range, fan does not respond, or fan remains high after cooling stop except as part of emergency stop. |
120
+ | Drop | In a full run, `drop` is `passed`, heat is `0`, drum is off, solenoid/drop path is active, cooling is on, and fan is high. | `drop` is skipped in a non-destructive run. This blocks hardware-ready release approval. | Drop is triggered unintentionally, fails to trigger when requested, or does not force heat off and cooling/fan on. |
121
+ | Cooling stop | `cooling_start` turns cooling on with high fan, and `cooling_stop` clears cooling, solenoid/drop path, and fan. | Not applicable. | Cooling does not start, does not stop, or leaves drop/solenoid state active. |
122
+ | Emergency stop | In a full run, emergency stop sets heat `0`, drum off, solenoid closed, cooling on, fan high, and evidence preserves diagnostic state. | Emergency stop is skipped in a non-destructive run. This blocks hardware-ready release approval. | Emergency stop does not force heat off, does not leave cooling/fan in a safe state, or loses diagnostic evidence. |
123
+
124
+ ## Troubleshooting
125
+
126
+ ### Serial Connection Fails
127
+
128
+ - Check the port with `ls /dev/cu.*` before and after plugging in the USB adapter.
129
+ - Confirm the config uses that exact `roaster.port`.
130
+ - Confirm no other process has the serial port open.
131
+ - Re-run only the non-destructive command until connection and cleanup pass.
132
+
133
+ ### Command Loop Or Write Counters Do Not Advance
134
+
135
+ - Check `raw.command_loop_running`, `raw.command_loop_iterations`, `raw.command_send_attempts`, `raw.command_write_count`, `raw.command_loop_error_count`, and `raw.last_command_write_size`.
136
+ - Treat repeated errors or partial writes as a hard abort.
137
+ - Review `HottopRoasterDriver._send_command_frame` and disconnect/write review notes in the active epic before changing code.
138
+
139
+ ### Packet Or Temperature Problems
140
+
141
+ - Check `raw.status_packet_count`, `raw.ignored_temperature_packet_count`, `raw.status_read_error_count`, `raw.raw_bean_temperature`, `raw.raw_env_temperature`, and `raw.resolved_temperature_unit`.
142
+ - If readings are zero during startup but later become plausible, record it as acceptable warmup behavior.
143
+ - If values are consistently implausible, stop and review packet offsets, checksum behavior, and configured `temperature_unit`.
144
+
145
+ ### Drop Or Cooling Problems
146
+
147
+ - Stop immediately if drop, solenoid, cooling, or fan behavior differs from the expected compound state.
148
+ - Do not retry full validation until the physical state is understood and the roaster is safe.
149
+ - Record whether the mismatch was software state only, physical behavior only, or both.
150
+
151
+ ### Emergency Stop Problems
152
+
153
+ - Physically power off the roaster if emergency stop does not force heat off.
154
+ - Preserve evidence and do not continue the run.
155
+ - Treat this as release-blocking until fixed and revalidated.
156
+
157
+ ## Report Template
158
+
159
+ Use this structure in issue comments, PR descriptions, or durable validation notes:
160
+
161
+ ```markdown
162
+ ## Hottop Validation Report
163
+
164
+ - Date/time:
165
+ - Operator:
166
+ - Roaster model:
167
+ - Firmware/context if known:
168
+ - Serial port:
169
+ - Baudrate:
170
+ - Configured temperature unit:
171
+ - Command interval seconds:
172
+ - Command:
173
+ - Evidence file:
174
+ - Non-destructive run or full run:
175
+
176
+ ## Source State
177
+
178
+ - Branch/commit:
179
+ - E3-S4 through E3-S8 marked complete in epic state: yes/no
180
+ - Required tests before hardware run:
181
+ - pytest:
182
+ - ruff check:
183
+ - ruff format --check:
184
+ - pyright:
185
+
186
+ ## Results
187
+
188
+ - Connection and cleanup: pass/fail/needs review
189
+ - Startup safe state: pass/fail/needs review
190
+ - Packet parsing and telemetry: pass/fail/needs review
191
+ - Temperature units: pass/fail/needs review
192
+ - Heat: pass/fail/needs review
193
+ - Fan: pass/fail/needs review
194
+ - Drop: pass/fail/skipped
195
+ - Cooling stop: pass/fail/needs review
196
+ - Emergency stop: pass/fail/skipped
197
+
198
+ ## Observations
199
+
200
+ - Observed temperatures:
201
+ - Observed command counters:
202
+ - Physical roaster behavior:
203
+ - Deviations:
204
+ - Abort conditions encountered:
205
+
206
+ ## Decision
207
+
208
+ - Hardware-ready release label allowed: yes/no
209
+ - Follow-up fixes required:
210
+ - Final driver decision:
211
+ ```
212
+
213
+ ## Required Notes
214
+
215
+ For every manual validation run, record:
216
+
217
+ - roaster model and firmware context if known
218
+ - serial port and configured temperature unit
219
+ - what commands were exercised
220
+ - whether heat, fan, drop, cooling, and emergency stop behaved as expected
221
+ - any uncertainty that keeps the hardware path from being release-ready
222
+ - the JSON evidence path, or a note explaining why evidence was not retained
223
+
224
+ ## Do Not
225
+
226
+ - Do not mark Hottop stories complete from mock-only validation.
227
+ - Do not improvise control commands against real hardware.
228
+ - Do not run the full validation flags unless the operator intends to exercise drop and emergency stop on the connected roaster.
229
+ - Do not add training, ONNX export, or Hugging Face sync steps here. Those stay in `coffee-first-crack-detection`.
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: mcp-dev
3
+ description: Set up the RoastPilot development environment and run current scaffold-level validation commands. Use when bootstrapping local development or validating early MCP scaffold work.
4
+ ---
5
+
6
+ # MCP Dev - RoastPilot
7
+
8
+ Use this skill for local development setup and scaffold validation.
9
+
10
+ ## Setup
11
+
12
+ ```bash
13
+ python3.11 -m venv .venv
14
+ source .venv/bin/activate
15
+ python -m pip install --upgrade pip
16
+ python -m pip install -e . --group dev
17
+ ```
18
+
19
+ ## Current Validation
20
+
21
+ ```bash
22
+ python -m pytest
23
+ python -m ruff check .
24
+ python -m ruff format --check .
25
+ python -m pyright
26
+ coffee-roaster-mcp --help
27
+ coffee-roaster-mcp --version
28
+ coffee-roaster-mcp serve
29
+ ```
30
+
31
+ ## Mock-Safe Bootstrap Smoke
32
+
33
+ For bootstrap work, confirm the default config still requires no roaster hardware, no microphone, and no model download from a guaranteed-empty temporary directory:
34
+
35
+ ```bash
36
+ python -c "import os, tempfile; from coffee_roaster_mcp.config import load_config; tmp = tempfile.TemporaryDirectory(); os.chdir(tmp.name); c = load_config(environ={}); print(c.roaster.driver, c.first_crack.mode, c.first_crack.precision); tmp.cleanup()"
37
+ ```
38
+
39
+ Expected output:
40
+
41
+ ```text
42
+ mock disabled int8
43
+ ```
44
+
45
+ ## Notes
46
+
47
+ - `E2-S1` adds the first stdio MCP server entrypoint with bootstrap-safe introspection tools only.
48
+ - The full mock roast flow is still pending later Epic 2 stories.
@@ -0,0 +1,73 @@
1
+ ---
2
+ name: mock-roast
3
+ description: Validate the current mock-first RoastPilot path without roaster hardware or model download. Use for bootstrap checks now and for the early MCP tool flow while the full vertical slice is still landing.
4
+ ---
5
+
6
+ # Mock Roast - RoastPilot
7
+
8
+ Use this skill for the mock-first local workflow.
9
+
10
+ ## Current Scope
11
+
12
+ - `E2-S1` provides a real stdio MCP server entrypoint.
13
+ - `E2-S4` now provides the first roast-session MCP tool surface on the mock path.
14
+ - This workflow validates the mock-safe bootstrap path and the in-process tool
15
+ flow without roaster hardware, microphone access, model download, or network.
16
+ For full operator setup details, use `docs/install-and-hardware-setup.md`.
17
+
18
+ ## Current Validation
19
+
20
+ Run from the repository root:
21
+
22
+ ```bash
23
+ python -c "import os, tempfile; from coffee_roaster_mcp.config import load_config; tmp = tempfile.TemporaryDirectory(); os.chdir(tmp.name); c = load_config(environ={}); print(c.roaster.driver, c.first_crack.mode, c.first_crack.precision); tmp.cleanup()"
24
+ coffee-roaster-mcp --help
25
+ coffee-roaster-mcp --version
26
+ coffee-roaster-mcp serve
27
+ ```
28
+
29
+ Expected bootstrap output:
30
+
31
+ ```text
32
+ mock disabled int8
33
+ ```
34
+
35
+ ## What This Confirms
36
+
37
+ - The default roaster driver stays on `mock`.
38
+ - First-crack detection stays `disabled` by default.
39
+ - Default precision stays `int8`.
40
+ - Local bootstrap does not require roaster hardware, microphone access, or model download.
41
+ - The MCP server now exposes the first session-control tool surface for the mock path.
42
+
43
+ ## Do Not Claim Here
44
+
45
+ - Do not claim final end-to-end release readiness before `E7-S1`.
46
+ - Do not add model download, model export, or Hugging Face sync steps here. Those stay in `coffee-first-crack-detection`.
47
+
48
+ ## Current MCP Tool Flow
49
+
50
+ The current mock-path tools are:
51
+
52
+ - `start_roast_session`
53
+ - `get_roast_state`
54
+ - `set_heat`
55
+ - `set_fan`
56
+ - `mark_beans_added`
57
+ - `mark_first_crack`
58
+ - `drop_beans`
59
+ - `start_cooling`
60
+ - `stop_cooling`
61
+ - `export_roast_log`
62
+ - `emergency_stop`
63
+
64
+ `export_roast_log` writes `roast.jsonl`, `roast.csv`, and `summary.json` under
65
+ the configured log directory for the active session.
66
+
67
+ ## Extend Later
68
+
69
+ Extend this workflow with:
70
+
71
+ - full mock roast start-to-export smoke checks
72
+ - log file content validation
73
+ - MCP client fixture reuse across runtime stories
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: release-registry
3
+ description: Review the staged PyPI and MCP Registry release workflow for RoastPilot. Use when preparing distribution work and keep current prereqs explicit until release stories land.
4
+ ---
5
+
6
+ # Release Registry - RoastPilot
7
+
8
+ Use this skill for package and registry release preparation.
9
+
10
+ ## Current Scope
11
+
12
+ - This is a staged runbook for future release work.
13
+ - `server.json`, registry publishing automation, and full release verification land in later Epic 6 stories.
14
+ - Do not present this workflow as fully runnable until those stories are complete.
15
+
16
+ ## Release Targets
17
+
18
+ - Package name: `coffee-roaster-mcp`
19
+ - MCP Registry name: `io.github.syamaner/coffee-roaster-mcp`
20
+ - Display title: `RoastPilot`
21
+
22
+ ## Planned Release Flow
23
+
24
+ 1. Confirm the package version is intentional.
25
+ 2. Build and validate sdist plus wheel artifacts.
26
+ 3. Confirm README contains the MCP verification string when the release story adds it.
27
+ 4. Confirm `server.json` exists and matches the package version when the registry metadata story lands.
28
+ 5. Publish the package to PyPI.
29
+ 6. Install the published package in a clean environment.
30
+ 7. Run mock-safe smoke checks against the published package.
31
+ 8. Publish MCP Registry metadata.
32
+ 9. Verify the registry listing renders the expected package and install metadata.
33
+
34
+ ## Current Review Checklist
35
+
36
+ Until Epic 6 lands, use this skill to review readiness only:
37
+
38
+ - package name is still `coffee-roaster-mcp`
39
+ - registry name is still `io.github.syamaner/coffee-roaster-mcp`
40
+ - release docs do not imply hardware-ready support without Hottop validation
41
+ - default first-crack mode remains `disabled` so package install smoke does not require audio or model download
42
+ - version alignment across package metadata, tags, and future `server.json` remains part of the release plan
43
+
44
+ ## Mock-Safe Published Smoke Target
45
+
46
+ When published package verification becomes available, the minimum smoke target remains:
47
+
48
+ ```bash
49
+ coffee-roaster-mcp --help
50
+ coffee-roaster-mcp --version
51
+ python -c "import os, tempfile; from coffee_roaster_mcp.config import load_config; tmp = tempfile.TemporaryDirectory(); os.chdir(tmp.name); c = load_config(environ={}); print(c.roaster.driver, c.first_crack.mode, c.first_crack.precision); tmp.cleanup()"
52
+ ```
53
+
54
+ Expected bootstrap output:
55
+
56
+ ```text
57
+ mock disabled int8
58
+ ```
59
+
60
+ ## Do Not
61
+
62
+ - Do not add Hugging Face model sync, model export, model cards, or dataset cards to this release workflow.
63
+ - Do not claim MCP Registry publishing is verified before `server.json`, PyPI verification, and `mcp-publisher` stories are complete.
64
+ - Do not label a release hardware-ready before the Hottop manual validation path passes.
@@ -0,0 +1,57 @@
1
+ # Copilot Code Review Instructions
2
+
3
+ ## Project Overview
4
+
5
+ RoastPilot is a spec-driven Python MCP server for autonomous coffee roasting. The server will own roaster control, telemetry, first-crack event integration, roast timing, derived metrics, event logging, and export in one local stdio process.
6
+
7
+ Full project rules are in `AGENTS.md` at the repo root.
8
+
9
+ ## Key Conventions
10
+
11
+ ### Runtime Boundary
12
+
13
+ - v0.1 is a local stdio MCP server.
14
+ - Agent orchestration and n8n are out of scope.
15
+ - One `RoastSession` runtime will own timing, telemetry, events, metrics, and logs.
16
+ - `beans_added_at` is T0. Auto-T0 detection is disabled by default.
17
+
18
+ ### Configuration
19
+
20
+ - Config defaults must allow a local mock run with no config file.
21
+ - Default roaster driver is `mock`.
22
+ - Default first-crack mode is `disabled`.
23
+ - YAML config is loaded from `coffee-roaster-mcp.yaml`.
24
+ - Environment overrides must be applied after file config.
25
+ - Use explicit `is None` checks where falsy values such as `0`, `0.0`, or empty strings have distinct meaning.
26
+
27
+ ### Hugging Face Models
28
+
29
+ - This repo consumes released artifacts from `syamaner/coffee-first-crack-detection`.
30
+ - Do not add model training, model export, Hugging Face sync, model card, or dataset card publishing here.
31
+ - INT8 ONNX is the default runtime precision.
32
+ - FP32 ONNX is supported by config.
33
+
34
+ ### Roaster Safety
35
+
36
+ - Hardware behavior must be conservative.
37
+ - Hottop command-loop behavior, packet handling, temperature units, drop, cooling, and emergency stop need explicit tests or manual validation notes.
38
+ - Do not accept mock-only validation for hardware-ready claims.
39
+
40
+ ### Code Style
41
+
42
+ - Python 3.11+ with full type hints on public functions and methods.
43
+ - Google-style docstrings for public APIs.
44
+ - `ruff check .`, `ruff format --check .`, `pyright`, and `pytest` should pass.
45
+ - Dependencies must be declared in `pyproject.toml`.
46
+
47
+ ### Generated And Local Files
48
+
49
+ - Do not commit model weights, ONNX files, audio recordings, roast logs, serial captures, `.env` files, or IDE folders.
50
+ - Generated roast logs will belong under ignored log directories once logging lands.
51
+
52
+ ### Testing
53
+
54
+ - Tests live under `tests/`.
55
+ - Avoid production-only fakes created solely for tests.
56
+ - Config tests should cover defaults, YAML overrides, environment overrides, and validation failures.
57
+