openstudio-ai 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 (186) hide show
  1. openstudio_ai-0.1.0/.gitignore +38 -0
  2. openstudio_ai-0.1.0/HANDOFF.md +88 -0
  3. openstudio_ai-0.1.0/LICENSE +28 -0
  4. openstudio_ai-0.1.0/PKG-INFO +129 -0
  5. openstudio_ai-0.1.0/README.md +92 -0
  6. openstudio_ai-0.1.0/adapters/README.md +183 -0
  7. openstudio_ai-0.1.0/adapters/__init__.py +2 -0
  8. openstudio_ai-0.1.0/adapters/base.py +17 -0
  9. openstudio_ai-0.1.0/adapters/claude_code_adapter.py +848 -0
  10. openstudio_ai-0.1.0/adapters/codex_adapter.py +656 -0
  11. openstudio_ai-0.1.0/adapters/contracts.py +43 -0
  12. openstudio_ai-0.1.0/agent.py +87 -0
  13. openstudio_ai-0.1.0/blackboard/README.md +24 -0
  14. openstudio_ai-0.1.0/blackboard/__init__.py +2 -0
  15. openstudio_ai-0.1.0/blackboard/manager.py +24 -0
  16. openstudio_ai-0.1.0/blackboard/operations.py +62 -0
  17. openstudio_ai-0.1.0/blackboard/schemas/artifact_record.schema.json +15 -0
  18. openstudio_ai-0.1.0/blackboard/schemas/state_patch.schema.json +8 -0
  19. openstudio_ai-0.1.0/blackboard/schemas/workflow_state.schema.json +20 -0
  20. openstudio_ai-0.1.0/blackboard/snapshot.py +16 -0
  21. openstudio_ai-0.1.0/blackboard/store.py +24 -0
  22. openstudio_ai-0.1.0/cli.py +294 -0
  23. openstudio_ai-0.1.0/docs/ADVANCED_USER_GUIDE.md +232 -0
  24. openstudio_ai-0.1.0/docs/DEVELOPER_GUIDANCE.md +499 -0
  25. openstudio_ai-0.1.0/docs/HARNESS_DETAILS.md +358 -0
  26. openstudio_ai-0.1.0/docs/MARKETPLACE_INSTALL_GUIDE.md +102 -0
  27. openstudio_ai-0.1.0/docs/OPENSTUDIO_SDK_EXPERIENCE.md +677 -0
  28. openstudio_ai-0.1.0/docs/PACKAGING_NORTHSTAR.md +408 -0
  29. openstudio_ai-0.1.0/docs/README.md +24 -0
  30. openstudio_ai-0.1.0/docs/RELEASE.md +181 -0
  31. openstudio_ai-0.1.0/docs/RUNTIME_INSTALLATION_CONTRACT.md +89 -0
  32. openstudio_ai-0.1.0/docs/architecture_diagram.md +80 -0
  33. openstudio_ai-0.1.0/docs/openstudio_ai_harness_diagram.png +0 -0
  34. openstudio_ai-0.1.0/docs/openstudio_ai_harness_simple.png +0 -0
  35. openstudio_ai-0.1.0/docs/openstudio_ai_workflow_horizontal.png +0 -0
  36. openstudio_ai-0.1.0/evals/README.md +16 -0
  37. openstudio_ai-0.1.0/evals/cases/.gitkeep +1 -0
  38. openstudio_ai-0.1.0/evals/datasets/.gitkeep +1 -0
  39. openstudio_ai-0.1.0/evals/measures/.gitkeep +1 -0
  40. openstudio_ai-0.1.0/evals/planning/.gitkeep +1 -0
  41. openstudio_ai-0.1.0/evals/regression/.gitkeep +1 -0
  42. openstudio_ai-0.1.0/harness/README.md +16 -0
  43. openstudio_ai-0.1.0/harness/__init__.py +2 -0
  44. openstudio_ai-0.1.0/harness/artifact_types.py +17 -0
  45. openstudio_ai-0.1.0/harness/bootstrap.py +12 -0
  46. openstudio_ai-0.1.0/harness/config.py +13 -0
  47. openstudio_ai-0.1.0/harness/loader.py +11 -0
  48. openstudio_ai-0.1.0/harness/package_manifest.yaml +15 -0
  49. openstudio_ai-0.1.0/harness/registry.py +28 -0
  50. openstudio_ai-0.1.0/knowledge/openstudio_sdk_recipes.md +80 -0
  51. openstudio_ai-0.1.0/knowledge/openstudio_sdk_wiki/sdk_constructions.md +291 -0
  52. openstudio_ai-0.1.0/knowledge/openstudio_sdk_wiki/sdk_core_patterns.md +242 -0
  53. openstudio_ai-0.1.0/knowledge/openstudio_sdk_wiki/sdk_daylighting.md +124 -0
  54. openstudio_ai-0.1.0/knowledge/openstudio_sdk_wiki/sdk_geometry.md +239 -0
  55. openstudio_ai-0.1.0/knowledge/openstudio_sdk_wiki/sdk_hvac.md +254 -0
  56. openstudio_ai-0.1.0/knowledge/openstudio_sdk_wiki/sdk_index.md +58 -0
  57. openstudio_ai-0.1.0/knowledge/openstudio_sdk_wiki/sdk_review_prompts.md +137 -0
  58. openstudio_ai-0.1.0/knowledge/openstudio_sdk_wiki/sdk_schedules.md +162 -0
  59. openstudio_ai-0.1.0/knowledge/openstudio_sdk_wiki/sdk_simulation_results.md +96 -0
  60. openstudio_ai-0.1.0/knowledge/openstudio_sdk_wiki/sdk_spaces_zones_loads.md +176 -0
  61. openstudio_ai-0.1.0/learning/README.md +55 -0
  62. openstudio_ai-0.1.0/learning/__init__.py +2 -0
  63. openstudio_ai-0.1.0/learning/common/__init__.py +2 -0
  64. openstudio_ai-0.1.0/learning/common/confidence.py +11 -0
  65. openstudio_ai-0.1.0/learning/common/events.py +27 -0
  66. openstudio_ai-0.1.0/learning/common/lineage.py +12 -0
  67. openstudio_ai-0.1.0/learning/common/storage.py +14 -0
  68. openstudio_ai-0.1.0/learning/developer_agent/README.md +22 -0
  69. openstudio_ai-0.1.0/learning/developer_agent/developer_learning_agent.yaml +33 -0
  70. openstudio_ai-0.1.0/learning/developer_agent/prompts/developer_learning_agent.md +35 -0
  71. openstudio_ai-0.1.0/learning/developer_agent/prompts/reflection.md +12 -0
  72. openstudio_ai-0.1.0/learning/developer_agent/prompts/system.md +11 -0
  73. openstudio_ai-0.1.0/learning/developer_pipeline/README.md +26 -0
  74. openstudio_ai-0.1.0/learning/developer_pipeline/__init__.py +2 -0
  75. openstudio_ai-0.1.0/learning/developer_pipeline/capture.py +25 -0
  76. openstudio_ai-0.1.0/learning/developer_pipeline/distill.py +14 -0
  77. openstudio_ai-0.1.0/learning/developer_pipeline/promote.py +27 -0
  78. openstudio_ai-0.1.0/learning/developer_pipeline/review_queue.py +15 -0
  79. openstudio_ai-0.1.0/learning/developer_pipeline/run_pipeline.py +220 -0
  80. openstudio_ai-0.1.0/learning/developer_pipeline/schemas/candidate_measure.schema.json +17 -0
  81. openstudio_ai-0.1.0/learning/developer_pipeline/schemas/candidate_skill.schema.json +17 -0
  82. openstudio_ai-0.1.0/learning/developer_pipeline/schemas/eval_case.schema.json +15 -0
  83. openstudio_ai-0.1.0/learning/developer_pipeline/schemas/lesson.schema.json +17 -0
  84. openstudio_ai-0.1.0/learning/developer_pipeline/validate.py +13 -0
  85. openstudio_ai-0.1.0/learning/harness_pipeline/README.md +28 -0
  86. openstudio_ai-0.1.0/learning/harness_pipeline/__init__.py +2 -0
  87. openstudio_ai-0.1.0/learning/harness_pipeline/capture.py +25 -0
  88. openstudio_ai-0.1.0/learning/harness_pipeline/cluster_recipes.py +12 -0
  89. openstudio_ai-0.1.0/learning/harness_pipeline/local_registry.py +15 -0
  90. openstudio_ai-0.1.0/learning/harness_pipeline/propose_measure.py +15 -0
  91. openstudio_ai-0.1.0/learning/harness_pipeline/runtime_learning.md +17 -0
  92. openstudio_ai-0.1.0/learning/harness_pipeline/schemas/candidate_measure.schema.json +16 -0
  93. openstudio_ai-0.1.0/learning/harness_pipeline/schemas/candidate_recipe.schema.json +16 -0
  94. openstudio_ai-0.1.0/learning/harness_pipeline/schemas/session_lesson.schema.json +15 -0
  95. openstudio_ai-0.1.0/learning/harness_pipeline/summarize_script.py +10 -0
  96. openstudio_ai-0.1.0/learning/review_queue/.gitkeep +1 -0
  97. openstudio_ai-0.1.0/measures/README.md +13 -0
  98. openstudio_ai-0.1.0/measures/add_daylighting.py +135 -0
  99. openstudio_ai-0.1.0/measures/approved/.gitkeep +1 -0
  100. openstudio_ai-0.1.0/measures/candidates/.gitkeep +1 -0
  101. openstudio_ai-0.1.0/measures/templates/.gitkeep +1 -0
  102. openstudio_ai-0.1.0/openstudio_mcp/README.md +102 -0
  103. openstudio_ai-0.1.0/openstudio_mcp/__init__.py +12 -0
  104. openstudio_ai-0.1.0/openstudio_mcp/docs/assets/pruning_workflow.svg +118 -0
  105. openstudio_ai-0.1.0/openstudio_mcp/docs/assets/runtime_data_model.svg +80 -0
  106. openstudio_ai-0.1.0/openstudio_mcp/measures/.gitkeep +1 -0
  107. openstudio_ai-0.1.0/openstudio_mcp/results/.gitkeep +1 -0
  108. openstudio_ai-0.1.0/openstudio_mcp/runtime/__init__.py +1 -0
  109. openstudio_ai-0.1.0/openstudio_mcp/runtime/artifact_store.py +86 -0
  110. openstudio_ai-0.1.0/openstudio_mcp/runtime/job_manager.py +159 -0
  111. openstudio_ai-0.1.0/openstudio_mcp/runtime/measure_registry.py +121 -0
  112. openstudio_ai-0.1.0/openstudio_mcp/runtime/state_store.py +447 -0
  113. openstudio_ai-0.1.0/openstudio_mcp/runtime/workspace_manager.py +69 -0
  114. openstudio_ai-0.1.0/openstudio_mcp/sdk_docs/__init__.py +8 -0
  115. openstudio_ai-0.1.0/openstudio_mcp/sdk_docs/lookup.py +660 -0
  116. openstudio_ai-0.1.0/openstudio_mcp/server.py +1230 -0
  117. openstudio_ai-0.1.0/openstudio_mcp/simulation/.gitkeep +1 -0
  118. openstudio_ai-0.1.0/openstudio_mcp/tools/__init__.py +1 -0
  119. openstudio_ai-0.1.0/openstudio_mcp/tools/blackboard.py +235 -0
  120. openstudio_ai-0.1.0/openstudio_mcp/tools/model.py +125 -0
  121. openstudio_ai-0.1.0/openstudio_mcp/tools/results.py +52 -0
  122. openstudio_ai-0.1.0/openstudio_mcp/tools/runtime.py +61 -0
  123. openstudio_ai-0.1.0/openstudio_mcp/tools/schemas.py +160 -0
  124. openstudio_ai-0.1.0/openstudio_mcp/tools/sdk_docs.py +127 -0
  125. openstudio_ai-0.1.0/openstudio_mcp/tools/sim.py +65 -0
  126. openstudio_ai-0.1.0/policy/measure_registry.yaml +22 -0
  127. openstudio_ai-0.1.0/policy/promotion_policy.yaml +13 -0
  128. openstudio_ai-0.1.0/policy/retention_policy.yaml +5 -0
  129. openstudio_ai-0.1.0/policy/review_policy.yaml +13 -0
  130. openstudio_ai-0.1.0/policy/run_gates.yaml +4 -0
  131. openstudio_ai-0.1.0/policy/tool_allowlist.yaml +3 -0
  132. openstudio_ai-0.1.0/prompts/blackboard_contract.md +21 -0
  133. openstudio_ai-0.1.0/prompts/harness_system_prompt.md +12 -0
  134. openstudio_ai-0.1.0/prompts/learning_contract.md +14 -0
  135. openstudio_ai-0.1.0/prompts/openstudio_agent.md +179 -0
  136. openstudio_ai-0.1.0/prompts/promotion_rules.md +13 -0
  137. openstudio_ai-0.1.0/pyproject.toml +138 -0
  138. openstudio_ai-0.1.0/resource/USA_FL_Tampa.Intl.AP.722110_TMY3.epw +8768 -0
  139. openstudio_ai-0.1.0/resource/sample.osm +8275 -0
  140. openstudio_ai-0.1.0/sample.env +17 -0
  141. openstudio_ai-0.1.0/scripts/__init__.py +1 -0
  142. openstudio_ai-0.1.0/scripts/build_sdk_doc_index.py +40 -0
  143. openstudio_ai-0.1.0/scripts/generate_hvac_child_skills.py +173 -0
  144. openstudio_ai-0.1.0/sdk_index/README.md +15 -0
  145. openstudio_ai-0.1.0/sdk_index/__init__.py +2 -0
  146. openstudio_ai-0.1.0/sdk_index/build_index.py +10 -0
  147. openstudio_ai-0.1.0/sdk_index/contracts.py +18 -0
  148. openstudio_ai-0.1.0/sdk_index/graph/.gitkeep +1 -0
  149. openstudio_ai-0.1.0/sdk_index/index/.gitkeep +1 -0
  150. openstudio_ai-0.1.0/sdk_index/query.py +13 -0
  151. openstudio_ai-0.1.0/skills/HVAC_CHILD_SKILL_MANAGEMENT.md +273 -0
  152. openstudio_ai-0.1.0/skills/hvac_sizing_assistant.md +77 -0
  153. openstudio_ai-0.1.0/skills/openstudio_hvac_air_loop_creator.md +100 -0
  154. openstudio_ai-0.1.0/skills/openstudio_hvac_central_cooling_coil_creator.md +107 -0
  155. openstudio_ai-0.1.0/skills/openstudio_hvac_central_heating_coil_creator.md +112 -0
  156. openstudio_ai-0.1.0/skills/openstudio_hvac_outdoor_air_system_creator.md +128 -0
  157. openstudio_ai-0.1.0/skills/openstudio_hvac_schedule_resolver.md +122 -0
  158. openstudio_ai-0.1.0/skills/openstudio_hvac_sizing_system_configurator.md +118 -0
  159. openstudio_ai-0.1.0/skills/openstudio_hvac_supply_fan_creator.md +108 -0
  160. openstudio_ai-0.1.0/skills/openstudio_hvac_system_validator.md +119 -0
  161. openstudio_ai-0.1.0/skills/openstudio_hvac_vav_terminal_creator.md +136 -0
  162. openstudio_ai-0.1.0/skills/openstudio_hvac_workflow_state.md +142 -0
  163. openstudio_ai-0.1.0/skills/openstudio_sdk_model_editor.md +263 -0
  164. openstudio_ai-0.1.0/skills/openstudio_vav_reheat_system_creator.md +190 -0
  165. openstudio_ai-0.1.0/skills/specs/hvac/openstudio_hvac_air_loop_creator.yaml +74 -0
  166. openstudio_ai-0.1.0/skills/specs/hvac/openstudio_hvac_central_cooling_coil_creator.yaml +75 -0
  167. openstudio_ai-0.1.0/skills/specs/hvac/openstudio_hvac_central_heating_coil_creator.yaml +81 -0
  168. openstudio_ai-0.1.0/skills/specs/hvac/openstudio_hvac_outdoor_air_system_creator.yaml +98 -0
  169. openstudio_ai-0.1.0/skills/specs/hvac/openstudio_hvac_schedule_resolver.yaml +94 -0
  170. openstudio_ai-0.1.0/skills/specs/hvac/openstudio_hvac_sizing_system_configurator.yaml +89 -0
  171. openstudio_ai-0.1.0/skills/specs/hvac/openstudio_hvac_supply_fan_creator.yaml +79 -0
  172. openstudio_ai-0.1.0/skills/specs/hvac/openstudio_hvac_system_validator.yaml +79 -0
  173. openstudio_ai-0.1.0/skills/specs/hvac/openstudio_hvac_vav_terminal_creator.yaml +98 -0
  174. openstudio_ai-0.1.0/skills/templates/hvac_child_skill.md.j2 +79 -0
  175. openstudio_ai-0.1.0/specs/openstudio_agent.yaml +116 -0
  176. openstudio_ai-0.1.0/tests/README.md +18 -0
  177. openstudio_ai-0.1.0/tests/agent_eval_cases.json +379 -0
  178. openstudio_ai-0.1.0/tests/test_mcp_openstudio_smoke.py +497 -0
  179. openstudio_ai-0.1.0/tests/test_openstudio_claude_code_adapter.py +199 -0
  180. openstudio_ai-0.1.0/tests/test_openstudio_cli.py +65 -0
  181. openstudio_ai-0.1.0/tests/test_openstudio_codex_adapter.py +141 -0
  182. openstudio_ai-0.1.0/tests/test_openstudio_hvac_skill_generation.py +29 -0
  183. openstudio_ai-0.1.0/tests/test_openstudio_learning_pipeline.py +55 -0
  184. openstudio_ai-0.1.0/tests/test_openstudio_sdk_docs.py +190 -0
  185. openstudio_ai-0.1.0/tests/test_openstudio_ui.py +188 -0
  186. openstudio_ai-0.1.0/ui.py +908 -0
@@ -0,0 +1,38 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ .pytest_cache/
5
+ .mypy_cache/
6
+ .ruff_cache/
7
+ .coverage
8
+ htmlcov/
9
+ dist/
10
+ build/
11
+ *.egg-info/
12
+
13
+ # Local environments
14
+ .venv/
15
+ venv/
16
+ .env
17
+
18
+ # macOS / editor
19
+ .DS_Store
20
+ .idea/
21
+ .vscode/
22
+
23
+ # OpenStudio AI runtime state
24
+ .openstudio_mcp_workspace/
25
+ .openstudio_ai_blackboards/
26
+ .sdk_doc_index.json
27
+ logs/*
28
+ !logs/.gitkeep
29
+ outputs/*
30
+ !outputs/.gitkeep
31
+ state/candidate_assets/*
32
+ state/sessions/*
33
+ state/snapshots/*
34
+ state/workflow_runs/*
35
+
36
+ # Generated local package exports
37
+ openstudio-ai-claude-plugin/
38
+ openstudio-ai-codex-plugin/
@@ -0,0 +1,88 @@
1
+ # OpenStudio AI Harness Handoff
2
+
3
+ ## Current Status
4
+
5
+ The initial standalone repository migration has started. The OpenStudio AI
6
+ example from `BEM-AI/examples/openstudio_ai` now lives in a flattened,
7
+ root-level harness layout in this repository.
8
+
9
+ Migrated components:
10
+
11
+ - OpenStudio MCP runtime and tools.
12
+ - Claude Code and Codex plugin adapters.
13
+ - Skills, generated HVAC child skills, knowledge packs, and SDK index modules.
14
+ - Learning pipeline modules, policies, prompts, and docs.
15
+ - Local blackboard modules and MCP-backed blackboard tools.
16
+ - Focused regression tests from the BEM-AI repository.
17
+
18
+ First packaging phase completed:
19
+
20
+ - Runtime installation contract documented in `docs/RUNTIME_INSTALLATION_CONTRACT.md`.
21
+ - Claude and Codex adapters support `--runtime-mode local`, `installed`, and
22
+ `marketplace`.
23
+ - Installed and marketplace exports point `.mcp.json` at `openstudio-ai-mcp`.
24
+ - Marketplace exports include setup/doctor/repair command files and
25
+ `installers/install_runtime.py` plus `installers/doctor_runtime.py`.
26
+ - Energy-modeler marketplace setup guide added in `docs/MARKETPLACE_INSTALL_GUIDE.md`.
27
+
28
+ Pip release baseline completed:
29
+
30
+ - Distribution name set to `openstudio-ai`.
31
+ - `openstudio>=3.10.0` is a required runtime dependency because the MCP server
32
+ depends on the OpenStudio Python package.
33
+ - `openstudio-ai` CLI added with `doctor`, `paths`, `version`,
34
+ `install-runtime`, `repair`, `export`, and `validate-export`.
35
+ - `openstudio-ai-mcp` console script remains the MCP runtime entrypoint.
36
+ - Runtime assets, skills, knowledge, prompts, resources, and docs are included
37
+ in the wheel while local folders such as `.venv`, `.git`, `.idea`, and
38
+ runtime workspaces are excluded.
39
+ - PyPI/TestPyPI release instructions added in `docs/RELEASE.md`.
40
+
41
+ Documentation cleanup completed:
42
+
43
+ - Long-form docs and diagrams moved under `docs/`.
44
+ - Root `blackboard_schema.json` removed because active exported schemas live in
45
+ `blackboard/schemas/`.
46
+ - `docs/README.md` documents the current docs map and schema decision.
47
+
48
+ ## Verification
49
+
50
+ Last verified from this repository root with the BEM-AI development virtual
51
+ environment:
52
+
53
+ ```bash
54
+ /Users/xuwe123/github/BEM-AI/.venv/bin/python -m py_compile $(find . -name '*.py' -print)
55
+ /Users/xuwe123/github/BEM-AI/.venv/bin/python -m pytest -q tests
56
+ ```
57
+
58
+ Result:
59
+
60
+ - `py_compile`: passed.
61
+ - `pytest`: `54 passed, 2 skipped, 5 warnings`.
62
+ - The skipped tests require `OPENSTUDIO_PATH` to point to a valid OpenStudio
63
+ executable.
64
+ - `python -m build`: produced `dist/openstudio_ai-0.1.0.tar.gz` and
65
+ `dist/openstudio_ai-0.1.0-py3-none-any.whl`.
66
+ - `twine check dist/*`: passed in a temporary smoke-test environment.
67
+ - Fresh wheel install smoke test: `openstudio-ai`, `openstudio-ai-mcp`, and
68
+ marketplace plugin exports worked.
69
+
70
+ ## Notes
71
+
72
+ - `pyproject.toml` is a first standalone package scaffold. It explicitly
73
+ includes the harness tree so skills, prompts, resources, knowledge files, and
74
+ diagrams are distributed with the package.
75
+ - Runtime state and generated caches are ignored by Git.
76
+ - The root README now describes the migrated standalone harness and the current
77
+ developer commands.
78
+
79
+ ## Next Steps
80
+
81
+ 1. Decide the long-term dependency source for `automa_ai` before publishing.
82
+ 2. Add CI that runs `py_compile` and the focused pytest suite.
83
+ 3. Test `pip install -e ".[dev]"` in a fresh environment once package
84
+ dependencies are settled.
85
+ 4. Add an OpenStudio-installed verification pass with `OPENSTUDIO_PATH`
86
+ configured.
87
+ 5. Continue packaging work for MCP distribution and marketplace-oriented
88
+ agentic installation.
@@ -0,0 +1,28 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2026, Battelle Memorial Institute
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its contributors
16
+ may be used to endorse or promote products derived from this software
17
+ without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
+ DAMAGES INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER
26
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
+ OR TORT INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE
28
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,129 @@
1
+ Metadata-Version: 2.4
2
+ Name: openstudio-ai
3
+ Version: 0.1.0
4
+ Summary: OpenStudio AI harness with MCP runtime, host adapters, skills, and knowledge.
5
+ Project-URL: Homepage, https://gitlab.pnnl.gov/building-energy-modeling/openstudio-ai-harness
6
+ Project-URL: Repository, https://gitlab.pnnl.gov/building-energy-modeling/openstudio-ai-harness
7
+ Project-URL: Documentation, https://gitlab.pnnl.gov/building-energy-modeling/openstudio-ai-harness
8
+ Author: PNNL
9
+ License-Expression: BSD-3-Clause
10
+ License-File: LICENSE
11
+ Keywords: ai,building-energy-modeling,mcp,openstudio,simulation
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: License :: OSI Approved :: BSD License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Topic :: Scientific/Engineering
19
+ Requires-Python: >=3.12
20
+ Requires-Dist: jinja2>=3.1.0
21
+ Requires-Dist: mcp>=1.0.0
22
+ Requires-Dist: openstudio>=3.10.0
23
+ Requires-Dist: pydantic>=2.12.3
24
+ Requires-Dist: python-dotenv>=1.0.0
25
+ Requires-Dist: pyyaml>=6.0.2
26
+ Provides-Extra: automa
27
+ Requires-Dist: automa-ai>=0.7.3; extra == 'automa'
28
+ Provides-Extra: dev
29
+ Requires-Dist: black>=25.9.0; extra == 'dev'
30
+ Requires-Dist: build>=1.2.0; extra == 'dev'
31
+ Requires-Dist: pytest-asyncio>=1.2.0; extra == 'dev'
32
+ Requires-Dist: pytest>=8.4.2; extra == 'dev'
33
+ Requires-Dist: twine>=5.0.0; extra == 'dev'
34
+ Provides-Extra: ui
35
+ Requires-Dist: streamlit>=1.54.0; extra == 'ui'
36
+ Description-Content-Type: text/markdown
37
+
38
+ # OpenStudio AI Harness
39
+
40
+ OpenStudio AI Harness packages a local MCP runtime, host adapters, skills,
41
+ knowledge, and workflow-state tools for AI-assisted building-energy modeling.
42
+
43
+ ## Current Capabilities
44
+
45
+ - OpenStudio MCP server for model lifecycle, simulation, results, SDK lookup,
46
+ runtime storage, and MCP-backed blackboard workflow state.
47
+ - Claude Code plugin export.
48
+ - Codex plugin export.
49
+ - Runtime learning schemas and candidate folders.
50
+ - HVAC workflow skills and generated child skills.
51
+ - Reviewed OpenStudio SDK knowledge packs.
52
+ - Packaging north-star plan for stable `pip install` and marketplace agentic
53
+ installation paths.
54
+
55
+ ## Development Setup
56
+
57
+ From this repository root:
58
+
59
+ ```bash
60
+ python -m pip install -e ".[dev]"
61
+ ```
62
+
63
+ Install the runtime package after it is published:
64
+
65
+ ```bash
66
+ python -m pip install openstudio-ai
67
+ openstudio-ai doctor
68
+ openstudio-ai-mcp --transport stdio
69
+ ```
70
+
71
+ Run focused tests:
72
+
73
+ ```bash
74
+ python -m pytest -q \
75
+ tests/test_mcp_openstudio_smoke.py \
76
+ tests/test_openstudio_sdk_docs.py \
77
+ tests/test_openstudio_learning_pipeline.py \
78
+ tests/test_openstudio_codex_adapter.py \
79
+ tests/test_openstudio_claude_code_adapter.py
80
+ ```
81
+
82
+ Start the MCP server in stdio mode:
83
+
84
+ ```bash
85
+ openstudio-ai-mcp --transport stdio
86
+ ```
87
+
88
+ Export local development plugins:
89
+
90
+ ```bash
91
+ python -m adapters.claude_code_adapter export-plugin \
92
+ --output-dir /tmp/openstudio-ai-claude-plugin
93
+
94
+ python -m adapters.codex_adapter export-plugin \
95
+ --output-dir /tmp/openstudio-ai-codex-plugin
96
+ ```
97
+
98
+ Export marketplace-oriented plugins that expect an installed runtime command:
99
+
100
+ ```bash
101
+ python -m adapters.claude_code_adapter export-plugin \
102
+ --output-dir /tmp/openstudio-ai-claude-plugin \
103
+ --runtime-mode marketplace
104
+
105
+ python -m adapters.codex_adapter export-plugin \
106
+ --output-dir /tmp/openstudio-ai-codex-plugin \
107
+ --runtime-mode marketplace
108
+ ```
109
+
110
+ ## Key Docs
111
+
112
+ - [Harness Details](docs/HARNESS_DETAILS.md)
113
+ - [Packaging North Star](docs/PACKAGING_NORTHSTAR.md)
114
+ - [Runtime Installation Contract](docs/RUNTIME_INSTALLATION_CONTRACT.md)
115
+ - [Marketplace Install Guide](docs/MARKETPLACE_INSTALL_GUIDE.md)
116
+ - [PyPI Release Guide](docs/RELEASE.md)
117
+ - [Developer Guidance](docs/DEVELOPER_GUIDANCE.md)
118
+
119
+ ## Runtime State
120
+
121
+ Local runtime state is intentionally ignored by Git:
122
+
123
+ - `.openstudio_mcp_workspace/`
124
+ - `.openstudio_ai_blackboards/`
125
+ - `logs/`
126
+ - `outputs/`
127
+
128
+ The MCP runtime uses local SQLite metadata and filesystem workspaces for large
129
+ OSM, SQL, and log artifacts.
@@ -0,0 +1,92 @@
1
+ # OpenStudio AI Harness
2
+
3
+ OpenStudio AI Harness packages a local MCP runtime, host adapters, skills,
4
+ knowledge, and workflow-state tools for AI-assisted building-energy modeling.
5
+
6
+ ## Current Capabilities
7
+
8
+ - OpenStudio MCP server for model lifecycle, simulation, results, SDK lookup,
9
+ runtime storage, and MCP-backed blackboard workflow state.
10
+ - Claude Code plugin export.
11
+ - Codex plugin export.
12
+ - Runtime learning schemas and candidate folders.
13
+ - HVAC workflow skills and generated child skills.
14
+ - Reviewed OpenStudio SDK knowledge packs.
15
+ - Packaging north-star plan for stable `pip install` and marketplace agentic
16
+ installation paths.
17
+
18
+ ## Development Setup
19
+
20
+ From this repository root:
21
+
22
+ ```bash
23
+ python -m pip install -e ".[dev]"
24
+ ```
25
+
26
+ Install the runtime package after it is published:
27
+
28
+ ```bash
29
+ python -m pip install openstudio-ai
30
+ openstudio-ai doctor
31
+ openstudio-ai-mcp --transport stdio
32
+ ```
33
+
34
+ Run focused tests:
35
+
36
+ ```bash
37
+ python -m pytest -q \
38
+ tests/test_mcp_openstudio_smoke.py \
39
+ tests/test_openstudio_sdk_docs.py \
40
+ tests/test_openstudio_learning_pipeline.py \
41
+ tests/test_openstudio_codex_adapter.py \
42
+ tests/test_openstudio_claude_code_adapter.py
43
+ ```
44
+
45
+ Start the MCP server in stdio mode:
46
+
47
+ ```bash
48
+ openstudio-ai-mcp --transport stdio
49
+ ```
50
+
51
+ Export local development plugins:
52
+
53
+ ```bash
54
+ python -m adapters.claude_code_adapter export-plugin \
55
+ --output-dir /tmp/openstudio-ai-claude-plugin
56
+
57
+ python -m adapters.codex_adapter export-plugin \
58
+ --output-dir /tmp/openstudio-ai-codex-plugin
59
+ ```
60
+
61
+ Export marketplace-oriented plugins that expect an installed runtime command:
62
+
63
+ ```bash
64
+ python -m adapters.claude_code_adapter export-plugin \
65
+ --output-dir /tmp/openstudio-ai-claude-plugin \
66
+ --runtime-mode marketplace
67
+
68
+ python -m adapters.codex_adapter export-plugin \
69
+ --output-dir /tmp/openstudio-ai-codex-plugin \
70
+ --runtime-mode marketplace
71
+ ```
72
+
73
+ ## Key Docs
74
+
75
+ - [Harness Details](docs/HARNESS_DETAILS.md)
76
+ - [Packaging North Star](docs/PACKAGING_NORTHSTAR.md)
77
+ - [Runtime Installation Contract](docs/RUNTIME_INSTALLATION_CONTRACT.md)
78
+ - [Marketplace Install Guide](docs/MARKETPLACE_INSTALL_GUIDE.md)
79
+ - [PyPI Release Guide](docs/RELEASE.md)
80
+ - [Developer Guidance](docs/DEVELOPER_GUIDANCE.md)
81
+
82
+ ## Runtime State
83
+
84
+ Local runtime state is intentionally ignored by Git:
85
+
86
+ - `.openstudio_mcp_workspace/`
87
+ - `.openstudio_ai_blackboards/`
88
+ - `logs/`
89
+ - `outputs/`
90
+
91
+ The MCP runtime uses local SQLite metadata and filesystem workspaces for large
92
+ OSM, SQL, and log artifacts.
@@ -0,0 +1,183 @@
1
+ # OpenStudio AI Agent Adapters
2
+
3
+ This folder defines the host-specific adapter layer for packaging OpenStudio AI
4
+ into agent shells such as Codex or Claude Code.
5
+
6
+ Adapters are responsible for:
7
+
8
+ - loading the harness system prompt and prompt contracts;
9
+ - exposing the skill directory to the host agent;
10
+ - connecting the OpenStudio MCP server;
11
+ - wiring the blackboard state store;
12
+ - recording learning events from host-agent activity.
13
+
14
+ Adapters should stay thin. Product behavior belongs in `harness/`,
15
+ `blackboard/`, `learning/`, `skills/`, and `openstudio_mcp/`.
16
+
17
+ ## Claude Code Plugin Export
18
+
19
+ Export a Claude plugin-style package:
20
+
21
+ ```bash
22
+ .venv/bin/python -m adapters.claude_code_adapter export-plugin \
23
+ --output-dir /tmp/openstudio-ai-plugin
24
+ ```
25
+
26
+ Preview package files without writing:
27
+
28
+ ```bash
29
+ .venv/bin/python -m adapters.claude_code_adapter export-plugin \
30
+ --output-dir /tmp/openstudio-ai-plugin \
31
+ --dry-run
32
+ ```
33
+
34
+ Runtime modes:
35
+
36
+ - `--runtime-mode local`: development mode; `.mcp.json` starts the MCP server
37
+ from this source checkout.
38
+ - `--runtime-mode installed`: assumes `openstudio-ai-mcp` is already installed.
39
+ - `--runtime-mode marketplace`: assumes `openstudio-ai-mcp` is the runtime
40
+ command and adds setup/doctor/repair commands plus installer helper scripts.
41
+
42
+ Marketplace export:
43
+
44
+ ```bash
45
+ .venv/bin/python -m adapters.claude_code_adapter export-plugin \
46
+ --output-dir /tmp/openstudio-ai-plugin \
47
+ --runtime-mode marketplace
48
+ ```
49
+
50
+ The exported package has this shape:
51
+
52
+ ```text
53
+ openstudio-ai-plugin/
54
+ ├── .claude-plugin/marketplace.json
55
+ ├── INSTALL.md
56
+ └── openstudio-ai/
57
+ ├── .claude-plugin/plugin.json
58
+ ├── .mcp.json
59
+ ├── README.md
60
+ ├── CONNECTORS.md
61
+ ├── commands/
62
+ ├── installers/
63
+ ├── skills/
64
+ ├── knowledge/
65
+ ├── instructions/
66
+ ├── learning/
67
+ └── blackboard/schemas/
68
+ ```
69
+
70
+ Skills and knowledge are exported as separate files and folders. They are not
71
+ flattened into one large `CLAUDE.md`.
72
+
73
+ Install the exported plugin from inside Claude Code:
74
+
75
+ ```text
76
+ /plugin marketplace add /tmp/openstudio-ai-plugin
77
+ /plugin install openstudio-ai@openstudio-ai-local
78
+ /reload-plugins
79
+ ```
80
+
81
+ Then use the namespaced commands:
82
+
83
+ ```text
84
+ /openstudio-ai:add-vav-reheat
85
+ /openstudio-ai:simulate
86
+ /openstudio-ai:query-results
87
+ /openstudio-ai:propose-measure
88
+ /openstudio-ai:setup-openstudio-ai
89
+ ```
90
+
91
+ ## Claude Code Project Install
92
+
93
+ Preview the files that would be installed into a Claude Code project:
94
+
95
+ ```bash
96
+ .venv/bin/python -m adapters.claude_code_adapter install \
97
+ --target-dir /path/to/claude/project \
98
+ --dry-run
99
+ ```
100
+
101
+ Install into a Claude Code project:
102
+
103
+ ```bash
104
+ .venv/bin/python -m adapters.claude_code_adapter install \
105
+ --target-dir /path/to/claude/project
106
+ ```
107
+
108
+ The installer writes:
109
+
110
+ - `.mcp.json`
111
+ Project-scoped MCP server registration for `openstudio_ai`.
112
+ - `.claude/CLAUDE.md`
113
+ Project instructions containing OpenStudio AI harness paths, prompt
114
+ contracts, and runtime skill references.
115
+
116
+ If `.claude/CLAUDE.md` already exists and is not managed by OpenStudio AI, the
117
+ installer stops unless `--force` is provided. With `--force`, it appends a
118
+ generated OpenStudio AI block.
119
+
120
+ Project install is mainly useful for local development and debugging. The
121
+ plugin export command is the intended distributable path.
122
+
123
+ ## Codex Plugin Export
124
+
125
+ Export a Codex plugin-style package and repo-local marketplace:
126
+
127
+ ```bash
128
+ .venv/bin/python -m adapters.codex_adapter export-plugin \
129
+ --output-dir /tmp/openstudio-ai-codex-plugin
130
+ ```
131
+
132
+ Preview package files without writing:
133
+
134
+ ```bash
135
+ .venv/bin/python -m adapters.codex_adapter export-plugin \
136
+ --output-dir /tmp/openstudio-ai-codex-plugin \
137
+ --dry-run
138
+ ```
139
+
140
+ Marketplace export:
141
+
142
+ ```bash
143
+ .venv/bin/python -m adapters.codex_adapter export-plugin \
144
+ --output-dir /tmp/openstudio-ai-codex-plugin \
145
+ --runtime-mode marketplace
146
+ ```
147
+
148
+ The exported package has this shape:
149
+
150
+ ```text
151
+ openstudio-ai-codex-plugin/
152
+ ├── .agents/plugins/marketplace.json
153
+ ├── INSTALL.md
154
+ └── plugins/
155
+ └── openstudio-ai/
156
+ ├── .codex-plugin/plugin.json
157
+ ├── .mcp.json
158
+ ├── README.md
159
+ ├── CONNECTORS.md
160
+ ├── commands/
161
+ ├── installers/
162
+ ├── skills/
163
+ ├── knowledge/
164
+ ├── instructions/
165
+ ├── learning/
166
+ └── blackboard/schemas/
167
+ ```
168
+
169
+ Validate the plugin:
170
+
171
+ ```bash
172
+ python -m json.tool \
173
+ /tmp/openstudio-ai-codex-plugin/plugins/openstudio-ai/.codex-plugin/plugin.json
174
+ ```
175
+
176
+ Install the marketplace in Codex:
177
+
178
+ ```bash
179
+ codex plugin marketplace add /tmp/openstudio-ai-codex-plugin
180
+ ```
181
+
182
+ Then install or view `openstudio-ai` from the `openstudio-ai-local` marketplace
183
+ in the Codex plugin UI.
@@ -0,0 +1,2 @@
1
+ """Host adapter contracts for the OpenStudio AI harness."""
2
+
@@ -0,0 +1,17 @@
1
+ from __future__ import annotations
2
+
3
+ from abc import ABC, abstractmethod
4
+
5
+ from adapters.contracts import HostAdapterConfig, HostLaunchPlan
6
+
7
+
8
+ class OpenStudioAiHostAdapter(ABC):
9
+ """Thin interface implemented by each supported agent host."""
10
+
11
+ def __init__(self, config: HostAdapterConfig):
12
+ self.config = config
13
+
14
+ @abstractmethod
15
+ def build_launch_plan(self) -> HostLaunchPlan:
16
+ """Return the files and entrypoints the host should load."""
17
+