drop mock_data.json: embed fixtures inline in skill.test.py

The testgen call now replies with plain Python (no JSON envelope), so the
model can no longer confuse the envelope with the artifact. skill.test.py
carries its fixture data inline as Python literals; the folder layout is
now skill.py, skill.test.py, contract.json, config.json. The regen ladder
drops the mock option (3-option: code/contract/test) since a fixture fix
is a test regen.
This commit is contained in:
Denton Social committed 2026-09-26 00:04:23 -05:00
1 parent ddd2495f81
commit 06ccfb77c6
11 files changed
+192 -152

No files matched your search

+3 -9
View File
@@ -176,9 +176,9 @@ class SkillStore:
"""Persists one skill leaf as a folder of deliverables.
Layout: <base>/<category>/<name>/{skill.py, skill.test.py, contract.json,
mock_data.json, config.json}. skill.py is the runnable body; the rest are
produced by the contract/test generation steps and read back so skills stay
runnable and configurable across restarts. The old single-file layout
config.json}. skill.py is the runnable body; the rest are produced by the
contract/test generation steps and read back so skills stay runnable and
configurable across restarts. The old single-file layout
(<base>/<category>/<name>.py) is NOT read — this is a clean switch.
"""
@@ -198,9 +198,6 @@ class SkillStore:
def write_contract(self, category: str, name: str, contract: dict) -> Path:
return self._write_json(category, name, "contract.json", contract)
def write_mock(self, category: str, name: str, mock) -> Path:
return self._write_json(category, name, "mock_data.json", mock)
def write_config(self, category: str, name: str, config: dict) -> Path:
return self._write_json(category, name, "config.json", config)
@@ -224,9 +221,6 @@ class SkillStore:
def read_config(self, category: str, name: str) -> dict:
return self._read_json(category, name, "config.json")
def read_mock(self, category: str, name: str):
return self._read_json(category, name, "mock_data.json")
def _read_json(self, category: str, name: str, filename: str):
path = self.dir(category, name) / filename
if not path.is_file():