mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-07 10:06:21 +00:00
* docs(send-to-guide): enhance turns are free; render is the paid step The shipped pricing model is import + enhance turns free, only the final render charged (a monthly free-render credit, then per-minute). The guide labeled enhance as 'the paid step', which misstates the model to the authoring agent. Move the paid label to Render. * docs(send-to-guide): state the tiered render billing contract + pin it in the guide test Address review: the pricing line must teach Claude the real tiered contract, not a single universal free render. Per heygen-server usage_limits.py: FREE accounts get 3 renders/month (then blocked, not billed); paid plans are charged 20 credits per rendered minute at completion. Enhance turns are free. Also pin the invariant in sendToGuideContract.test.ts: assert Enhance=free / Render=paid + the tiered figures, and a negative assertion blocking the retired 'Enhance ... paid step' wording from returning.
48 lines
2.5 KiB
TypeScript
48 lines
2.5 KiB
TypeScript
// @vitest-environment node
|
|
import { describe, expect, it } from "vitest";
|
|
import { readFileSync } from "node:fs";
|
|
import { join } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
// Semantic pin for the Claude Design "Send to HyperFrames" authoring guide. The guide is
|
|
// LLM-facing prompt text, so a wording regression silently reintroduces a real failure mode.
|
|
// A live Send-to import genericized a source design's concrete figures ("2.4M signals/sec" ->
|
|
// "streaming now") because the guide both called the rebuild "lossy by nature" AND demanded
|
|
// "content match the brief exactly" — a contradiction with no rule for what to preserve. This
|
|
// pins the resolved "preserve substance, adapt form" instruction and asserts the two retired
|
|
// contradictory phrases cannot silently return. validate-docs proves syntax, not intent.
|
|
const REPO_ROOT = join(fileURLToPath(new URL(".", import.meta.url)), "..", "..", "..", "..", "..");
|
|
const GUIDE = readFileSync(
|
|
join(REPO_ROOT, "docs", "guides", "claude-design-send-to-hyperframes.md"),
|
|
"utf8",
|
|
);
|
|
|
|
describe("Send-to guide fidelity contract", () => {
|
|
it("carries the resolved 'preserve substance, adapt form' instruction", () => {
|
|
expect(GUIDE).toContain("Preserve substance; adapt form");
|
|
expect(GUIDE).toContain("do NOT genericize");
|
|
expect(GUIDE).toContain("do NOT invent copy or numbers");
|
|
});
|
|
|
|
it("does not restore the retired contradictory fidelity phrasing", () => {
|
|
expect(GUIDE).not.toContain("lossy by nature");
|
|
expect(GUIDE).not.toContain("content match the brief exactly");
|
|
});
|
|
|
|
// Pricing is LLM-facing contract too: the guide once labeled Enhance "the paid step", which
|
|
// teaches Claude the wrong billing boundary. The shipped model (heygen-server
|
|
// magic_edit/logic/usage_limits.py) is: import + enhance turns free; only Render is billed —
|
|
// FREE accounts get 3 renders/month, paid plans 20 credits/rendered-minute. Pin the concept,
|
|
// not an exact sentence, and block the retired Enhance-as-paid wording from returning.
|
|
it("identifies Enhance as free and Render as the paid/billed step, with the tiered contract", () => {
|
|
expect(GUIDE).toContain("Enhance turns are free");
|
|
expect(GUIDE).toContain("Render is the paid step");
|
|
expect(GUIDE).toContain("3 renders per month");
|
|
expect(GUIDE).toContain("20 credits per rendered minute");
|
|
});
|
|
|
|
it("does not restore the retired 'Enhance ... paid step' wording", () => {
|
|
expect(GUIDE).not.toContain("HeyGen media. This is the paid step");
|
|
});
|
|
});
|