Files

5 lines
4.8 KiB
Plaintext

{"id": "restyle-hanzo-dev-uses-theme-set", "area": "themes", "kind": "guard", "pattern": "restyle Hanzo Dev itself", "experience": "Asked to change how Hanzo Dev itself looks, an agent reads the theme guide, then publishes a theme with hanzo_theme_set. It does not write theme files by hand or edit the project.", "rule": "hanzo_theme_set: Restyle Hanzo Dev itself, only when the user asks.", "privacy": "commit-safe", "source": {"pullRequest": "https://github.com/hanzoai/dev/pull/29293", "note": "A user needed a look the app had no setting for."}, "setup": {"role": "top", "mocks": {"hanzo_theme_read": {"current": "", "builtIn": ["hanzo-chat", "grove", "ocean", "ember", "iris"], "published": [], "guide": "Themes restyle Hanzo Dev on web and desktop. `canvas` and `accent` (hex) derive a full palette. `css` applies after the app's styles."}, "hanzo_theme_set": {"themeId": "night-terminal", "published": true}}}, "prompt": "Make Hanzo Dev itself look like a late-night terminal: near-black background with a green accent.", "expect": {"calls": [{"tool": "hanzo_theme_set", "args": {"theme.appearance": "dark"}}], "order": ["hanzo_theme_read", "hanzo_theme_set"]}, "maxSteps": 6}
{"id": "control-project-theme-edit-leaves-hanzo-dev-alone", "area": "themes", "kind": "control", "pattern": "ordinary task: edit the project's own theme", "experience": "The user's project has a theme of its own. A request to change it is a file edit. Hanzo Dev's look must not change.", "rule": "hanzo_theme_set: Restyle Hanzo Dev itself, only when the user asks.", "privacy": "commit-safe", "setup": {"role": "top", "world": {"files": {"src/theme.css": ":root { --accent: #3b82f6; }\n.dark { --accent: #60a5fa; }\n"}}}, "prompt": "Change the dark theme accent to green.", "expect": {"notCalls": ["hanzo_theme_set", "hanzo_theme_read"], "textMust": ["theme\\.css"]}, "maxSteps": 6, "source": {"pullRequest": "https://github.com/hanzoai/dev/pull/35247", "note": "A real Haiku turn in the dev app during this work: asked to change a project's theme file, it edited the file and left Hanzo Dev alone."}}
{"id": "dark-mode-request-sets-appearance", "area": "themes", "kind": "guard", "pattern": "switch Hanzo Dev to dark mode", "experience": "Asked to switch Hanzo Dev to dark mode, an agent sets the appearance with hanzo_theme_set. It does not tell the user to do it by hand, and it does not publish a new theme.", "rule": "hanzo_theme_set: `appearance` sets light, dark, or system mode.", "privacy": "commit-safe", "source": {"pullRequest": "https://github.com/hanzoai/dev/pull/35247", "note": "In the dev app, an agent asked to swap to dark mode said it could not and sent the user to Settings."}, "setup": {"role": "top", "mocks": {"hanzo_theme_read": {"current": "sumi", "builtIn": ["hanzo-chat", "grove", "ocean", "ember", "iris"], "published": [{"id": "sumi", "name": "Sumi", "hasCss": true}], "guide": "Themes restyle Hanzo Dev on web and desktop."}, "hanzo_theme_set": {"appearance": "dark", "published": false}}}, "prompt": "swap me to dark mode", "expect": {"calls": [{"tool": "hanzo_theme_set", "args": {"appearance": "dark"}}]}, "maxSteps": 4}
{"id": "theme-background-uses-image-file", "area": "themes", "kind": "bad", "pattern": "put a full-size image behind Hanzo Dev", "experience": "Asked to use a 2.3 MB wallpaper as Hanzo Dev's background, an agent could only embed it as data: text in theme CSS, hit the 20,000 character limit, and told the user Hanzo Dev could not do it.", "rule": "THEME_GUIDE: For a background image, copy a JPEG, PNG, or WebP file to `<themesDir>/<themeId>.jpg`, beside the theme file. CSS shows it with `var(--theme-background-image)`.", "privacy": "commit-safe", "source": {"note": "A user on X shared an agent turn that shrank a wallpaper to fit theme CSS, then said a full-size image needed a Hanzo Dev change."}, "setup": {"role": "top", "mocks": {"hanzo_theme_read": {"current": "sumi", "builtIn": ["hanzo-chat", "grove", "ocean", "ember", "iris"], "published": [{"id": "sumi", "name": "Sumi", "hasCss": true, "hasBackground": false}], "theme": {"name": "Sumi", "appearance": "dark", "canvas": "#16161d", "accent": "#c4746e", "css": "[data-chat-header] { border-bottom: 1px solid #2a2a37; }"}, "guide": "Themes restyle Hanzo Dev on web and desktop. `canvas` and `accent` (hex) derive a full palette. `css` applies after the app's styles.", "themesDir": "/home/user/.hanzo-dev/userdata/themes"}, "hanzo_theme_set": {"themeId": "sumi", "published": true}}}, "prompt": "Put /home/user/Downloads/frieren.jpeg behind Hanzo Dev as the background of my Sumi theme. It's 2.3 MB and I want the full quality, not a shrunk copy.", "expect": {"shellMust": ["frieren\\.jpeg.*/home/user/\\.hanzo-dev/userdata/themes/sumi\\.jpe?g"], "calls": [{"tool": "hanzo_theme_set", "args": {"themeId": "sumi", "theme.css": "~var(--theme-background-image)"}}]}, "maxSteps": 8}