feat(short): el prompt sabe cuánto texto cabe dibujado, y el informe grita si quedó ilegible
Build & Deploy ResearchOwl / build-and-push (push) Successful in 10s
Build & Deploy ResearchOwl / build-and-push (push) Successful in 10s
x-fits llega vivo del contrato y se pone delante del modelo: es el único límite que nada rechaza, porque el renderizador encoge en vez de fallar. Sin esto el modelo escribe una cita de 58 caracteres para un hueco de 16 y se entera cuando ya está renderizada. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
a13c3062b6
commit
129f436fd2
@@ -90,6 +90,12 @@ not a target. Aim for {target_min:.0f}-{target_max:.0f}.
|
||||
a card with four rows needs longer than a headline.
|
||||
- Every string is drawn as given. Write them the way they should appear: \
|
||||
SHORT, UPPERCASE, no trailing punctuation. A headline is 2-5 words.
|
||||
- **"CABE ~N caracteres dibujados" is a width, and it is the one limit nothing \
|
||||
will catch for you.** Nothing rejects a longer string: the renderer shrinks the \
|
||||
type until it fits, so a quote of 58 characters in a 16-character slot is drawn \
|
||||
at a quarter of its size and ends up the smallest text on a frame it was \
|
||||
supposed to dominate. Stay at or under N. On a quote that means picking a \
|
||||
shorter verbatim span, never squeezing the whole sentence in.
|
||||
- Respect every max length and list-length limit above. They are enforced.
|
||||
- Colours are palette names ({colors}) — never hex.
|
||||
- Quotes carry the typographic quote marks: “SPLIT RADAR IMAGE”, with U+201C \
|
||||
|
||||
@@ -406,6 +406,12 @@ def _describe_field(name: str, schema: dict, required: bool, defs: dict,
|
||||
bits.append("no vacío")
|
||||
if "maxLength" in schema:
|
||||
bits.append(f"máx {schema['maxLength']} caracteres")
|
||||
# `x-fits` es cuánto texto cabe DIBUJADO al tamaño de diseño, medido por
|
||||
# shortsmith contra sus propias fuentes. No se valida — los caracteres son
|
||||
# un proxy de los píxeles — pero es lo único que evita que el modelo escriba
|
||||
# una cita de 58 caracteres en un hueco de 16 y salga dibujada ilegible.
|
||||
if "x-fits" in schema:
|
||||
bits.append(f"CABE ~{schema['x-fits']} caracteres dibujados")
|
||||
for key, text in (("minimum", "≥"), ("maximum", "≤"),
|
||||
("exclusiveMinimum", ">"), ("exclusiveMaximum", "<")):
|
||||
if key in schema:
|
||||
|
||||
Reference in New Issue
Block a user