Drop internal vocabulary, and stop shipping dev files to users

Six comments attributed decisions to "owner decision 2026-07-22", and one test
cited a path inside the private monorepo (PromptFormatDropdown.tsx). Both are
meaningless to anyone reading this repo: an outside contributor has no idea who
the owner is, and cannot open that file. Each comment already gave its reason;
only the attribution goes.

Adds .comfyignore so tests/, scripts/ and .github/ stay in the repo but stay
out of the archive published to the Registry. Installing a pack copies that
archive into custom_nodes/ and leaves it there, and none of those directories
is imported at runtime — __init__.py loads styleref_nodes/* and server_routes
only. workflows/ is deliberately still shipped; the templates are the product.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Behzad
2026-07-27 13:36:59 +02:00
co-authored by Claude Sonnet 5
parent cd36fae865
commit 9e723479f8
4 changed files with 38 additions and 16 deletions
+24
View File
@@ -0,0 +1,24 @@
# Excluded from the archive published to the Comfy Registry — NOT from the repo.
#
# Installing this pack copies the published archive into a user's custom_nodes/
# directory, where it sits for as long as they have the pack. Nothing below is
# imported at runtime (__init__.py loads styleref_nodes/* and server_routes
# only), so shipping it would put files on thousands of machines that no
# install ever reads.
#
# Everything here stays in the repository, where it is load-bearing: the tests
# run in CI, and scripts/build_workflows.py generates workflows/ and is what a
# contributor edits. Only the shipped package is smaller.
#
# workflows/ is deliberately NOT excluded — the templates are the product.
tests/
scripts/
.github/
# Tooling caches and editor droppings, in case a publish runs from a working
# directory rather than a clean checkout.
.pytest_cache/
.ruff_cache/
__pycache__/
.DS_Store
+1 -2
View File
@@ -21,8 +21,7 @@ CATEGORY = "StyleRef"
# Node-facing target → the server's `format` parameter.
#
# The list is EXACTLY the web app's copy-box format list (owner decision
# 2026-07-22, superseding the earlier midjourney removal), in the same order:
# The list is EXACTLY the web app's copy-box format list, in the same order:
# AI Tools, STYLE.md, Flux, Midjourney, Diffusion, JSON. The style means the
# same thing here as on styleref.io, format for format.
#
+2 -2
View File
@@ -5,8 +5,8 @@ Apply is the paved road. This is the escape hatch: the style's sections come
out as individual STRING outputs so any field can drive things a prompt string
cannot — IPAdapter weights, conditioning regions, per-section text encoders.
The output list is EXACTLY the style schema's section list (owner decision
2026-07-22), in schema order, plus the six custom style items individually —
The output list is EXACTLY the style schema's section list, in schema order,
plus the six custom style items individually —
nothing derived, nothing invented, so the node reads one-to-one against the
style board on styleref.io. Output names are the schema's own section ids.
The section list is data-driven from one constant: a future schema section is
+11 -12
View File
@@ -65,10 +65,10 @@ def test_pack_registers_exactly_the_five_nodes():
def test_targets_are_exactly_the_web_apps_copy_list_in_order():
"""
Owner decision 2026-07-22: the target list mirrors the web
app's copy-box format list exactly — same entries, same order — so the
style means the same thing here as on styleref.io. Source of truth:
PROMPT_FORMAT_OPTIONS in src/components/ui/PromptFormatDropdown.tsx.
The target list mirrors the web app's copy-box format list exactly — same
entries, same order — so a style means the same thing here as it does on
styleref.io. The web app's list is the source of truth; this test is what
catches the two drifting apart.
"""
assert list(apply_node.TARGETS) == [
"ai_tools",
@@ -149,9 +149,8 @@ def test_composition_handles_an_empty_side():
def test_negative_merges_guardrails_and_extra_only():
"""
No injected boilerplate (owner decision 2026-07-22): the style's guardrails
are the authority, and anything generic belongs in extra_negative where it
stays visible.
No injected boilerplate: the style's guardrails are the authority, and
anything generic belongs in extra_negative, where the user can see it.
"""
negative = apply_node.compose_negative(STYLE, "extra thing")
assert "lens flares" in negative
@@ -406,8 +405,8 @@ def test_load_returns_ui_text_and_result_tuple(monkeypatch):
def test_load_never_fetches_style_text(monkeypatch):
"""
STYLE.md moved to Apply's target list (owner decision 2026-07-22): Load has
no style_doc output and must never spend the extra text-fetch call.
STYLE.md is a target on Apply, not an output on Load — so Load has no
style_doc output and must never spend the extra text-fetch call.
"""
monkeypatch.setattr(
api, "get_style_spec", lambda ref, etag=None: ({"name": "Warm", "sections": {}}, None, None)
@@ -532,9 +531,9 @@ def test_sections_filter_reaches_the_api_and_the_cache_key(monkeypatch):
def test_facets_outputs_are_exactly_the_schema_sections_plus_custom_items():
"""
Owner decision 2026-07-22: Facets mirrors the style board one-to-one — the
schema's section list in schema order, plus the six custom style items,
and NOTHING derived (no palette/primary_color/width/height/negative).
Facets mirrors the style board one-to-one — the schema's section list in
schema order, plus the six custom style items, and NOTHING derived (no
palette/primary_color/width/height/negative).
"""
from styleref_nodes import facets as facets_node