FORGE-F012 Document Penpot editor connection preflight and recovery

This commit is contained in:
rob
2026-11-18 14:55:11 +00:00
parent 68432c2faa
commit a9350ace7b
6 changed files with 77 additions and 6 deletions
+35
View File
@@ -0,0 +1,35 @@
"""Keep the design skill's editor-readiness and recovery guidance aligned."""
import unittest
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1] / "skills/bortstack-design"
SKILL = (ROOT / "SKILL.md").read_text(encoding="utf-8")
OPERATIONS = (ROOT / "references/penpot-operations.md").read_text(encoding="utf-8")
class PenpotConnectionContractTests(unittest.TestCase):
def test_skill_requires_verified_inspection_before_modification(self):
self.assertIn("non-destructive inspection", SKILL)
self.assertIn("only a successful inspection", SKILL)
self.assertIn("Stop mutations", SKILL)
def test_reference_distinguishes_service_editor_and_verified_design(self):
for state in ("A — MCP service available", "B — Editor connected", "C — Design operations verified"):
with self.subTest(state=state):
self.assertIn(state, OPERATIONS)
self.assertIn("Only C permits modification", OPERATIONS)
self.assertIn("intended file and page", OPERATIONS)
self.assertIn("read-only operation", OPERATIONS)
def test_recovery_verifies_target_and_uncertain_writes(self):
self.assertIn("Stop further design modifications", OPERATIONS)
self.assertIn("Do not assume a failed write either applied or rolled back", OPERATIONS)
self.assertIn("Repeat the non-destructive inspection", OPERATIONS)
self.assertIn("Reconcile any uncertain prior write", OPERATIONS)
self.assertIn("Firefox and other compatible browsers", OPERATIONS)
if __name__ == "__main__":
unittest.main()