docs(skills): ip-as-logo follows the modern section order; add skill tests
Authoring standard 5 wants `# <Skill> Skill`, then When to Use, Prerequisites and Procedure; the port kept the upstream layout with the trigger sentence in the intro and no prerequisites section. Body text is unchanged; the docs page is regenerated for this skill only. Standard 7 asks for tests/skills/test_<skill>_skill.py: two invariants — frontmatter/section structure, and generation routed through the native `image_generate` tool with no residue of the upstream harness.
This commit is contained in:
@@ -13,9 +13,9 @@ metadata:
|
||||
related_skills: [pixel-art]
|
||||
---
|
||||
|
||||
# IP as Logo
|
||||
# IP as Logo Skill
|
||||
|
||||
Create the simplest possible cute IP character: a compact, lovable symbol that remains recognizable at `32 × 32`, not a detailed character illustration. Use when a user wants a mascot, IP character, brand character, or "cute logo" for a product, repo, app, or community.
|
||||
Create the simplest possible cute IP character: a compact, lovable symbol that remains recognizable at `32 × 32`, not a detailed character illustration.
|
||||
|
||||
> **Hermes adaptation notes** (the rest of this document is the upstream
|
||||
> workflow, kept intact — snapshot of
|
||||
@@ -41,7 +41,16 @@ Create the simplest possible cute IP character: a compact, lovable symbol that r
|
||||
> candidates. Only run `vision_analyze` on a result if the user explicitly
|
||||
> asks for a compliance check.
|
||||
|
||||
## Workflow
|
||||
## When to Use
|
||||
|
||||
Use when a user wants a mascot, IP character, brand character, or "cute logo" for a product, repo, app, or community.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- An image-generation backend configured for the built-in `image_generate` tool; check with `hermes tools` and enable one there if the tool reports no backend.
|
||||
- `vision_analyze` only for an explicitly requested compliance check; `delegate_task` only for large batches where the user wants speed.
|
||||
|
||||
## Procedure
|
||||
|
||||
1. Parse the request for an explicit IP subject and available product context. Do not ask the user to choose a color mode unless they explicitly want to control it.
|
||||
2. When the user has not specified an IP subject and the current workspace is a product repository, inspect relevant read-only context before asking questions. Prefer the README, product docs, package or app metadata, landing-page copy, manifests, and design tokens. Treat context as sufficient when the product purpose, primary audience, and intended personality can be inferred with reasonable confidence.
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
"""Tests for the ip-as-logo optional skill."""
|
||||
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
import yaml
|
||||
|
||||
SKILL_PATH = (
|
||||
Path(__file__).resolve().parents[2] / "optional-skills" / "creative" / "ip-as-logo" / "SKILL.md"
|
||||
)
|
||||
|
||||
|
||||
def _frontmatter_and_body():
|
||||
content = SKILL_PATH.read_text(encoding="utf-8")
|
||||
assert content.startswith("---")
|
||||
m = re.search(r"\n---\s*\n", content[3:])
|
||||
assert m, "frontmatter must close with ---"
|
||||
return yaml.safe_load(content[3 : m.start() + 3]), content[m.end() + 3 :]
|
||||
|
||||
|
||||
def test_frontmatter_fields_and_section_order():
|
||||
fm, body = _frontmatter_and_body()
|
||||
for field in ("name", "description", "version", "author", "license", "platforms"):
|
||||
assert field in fm, f"missing frontmatter field: {field}"
|
||||
assert fm["name"] == "ip-as-logo"
|
||||
assert fm["metadata"]["hermes"]["category"] == "creative"
|
||||
headings = re.findall(r"^## (.+)$", body, re.MULTILINE)
|
||||
expected = ["When to Use", "Prerequisites", "Procedure"]
|
||||
assert [h for h in headings if h in expected] == expected, headings
|
||||
assert headings[-1] == "Verification"
|
||||
|
||||
|
||||
def test_generation_routes_through_native_tool():
|
||||
"""The upstream skill targeted another agent's image pipeline; the port must
|
||||
route through Hermes' `image_generate` and carry no residue of that harness."""
|
||||
_, body = _frontmatter_and_body()
|
||||
assert "`image_generate`" in body
|
||||
assert 'aspect_ratio="square"' in body
|
||||
assert not re.search(r"\bImageGen\b|\bCodex\b|\bClaude\b", body)
|
||||
@@ -29,9 +29,9 @@ Design minimal cute IP mascot marks readable at 32px.
|
||||
The following is the complete skill definition that Hermes loads when this skill is triggered. This is what the agent sees as instructions when the skill is active.
|
||||
:::
|
||||
|
||||
# IP as Logo
|
||||
# IP as Logo Skill
|
||||
|
||||
Create the simplest possible cute IP character: a compact, lovable symbol that remains recognizable at `32 × 32`, not a detailed character illustration. Use when a user wants a mascot, IP character, brand character, or "cute logo" for a product, repo, app, or community.
|
||||
Create the simplest possible cute IP character: a compact, lovable symbol that remains recognizable at `32 × 32`, not a detailed character illustration.
|
||||
|
||||
> **Hermes adaptation notes** (the rest of this document is the upstream
|
||||
> workflow, kept intact — snapshot of
|
||||
@@ -57,7 +57,16 @@ Create the simplest possible cute IP character: a compact, lovable symbol that r
|
||||
> candidates. Only run `vision_analyze` on a result if the user explicitly
|
||||
> asks for a compliance check.
|
||||
|
||||
## Workflow
|
||||
## When to Use
|
||||
|
||||
Use when a user wants a mascot, IP character, brand character, or "cute logo" for a product, repo, app, or community.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- An image-generation backend configured for the built-in `image_generate` tool; check with `hermes tools` and enable one there if the tool reports no backend.
|
||||
- `vision_analyze` only for an explicitly requested compliance check; `delegate_task` only for large batches where the user wants speed.
|
||||
|
||||
## Procedure
|
||||
|
||||
1. Parse the request for an explicit IP subject and available product context. Do not ask the user to choose a color mode unless they explicitly want to control it.
|
||||
2. When the user has not specified an IP subject and the current workspace is a product repository, inspect relevant read-only context before asking questions. Prefer the README, product docs, package or app metadata, landing-page copy, manifests, and design tokens. Treat context as sufficient when the product purpose, primary audience, and intended personality can be inferred with reasonable confidence.
|
||||
|
||||
Reference in New Issue
Block a user