Add dataInvention flag to PromptOptions to disable the 'generate realistic/plausible data' rule
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- ai-infra-agents
Research direction
In lang-core, start by reading PromptOptions and buildImportantRules(), where the data-generation rule is currently appended unconditionally. Check how the existing prompt flags are handled and look for relevant tests. Done means dataInvention defaults to true, while setting it to false omits that rule without changing other prompt behavior.
Written by the indexing model from the issue text.
Description
Context
buildImportantRules() in lang-core unconditionally appends the line:
- When asked about data, generate realistic/plausible data
This is correct for generative UI (the default consumer), but harmful for description-mode consumers that describe existing UI rather than generating new UI. In that context it instructs the model to invent data — image URLs, prices, copy — that is not in the source, producing artefacts that are locally well-formed but materially false.
Current workaround
We post-process the generated prompt to excise the line:
const prompt = library.prompt(options);
return prompt.split("\n").filter(line => !line.includes("When asked about data, generate realistic/plausible data")).join("\n");
This works but is coupled to the exact wording — if lang-core rewords the rule, the excision silently stops matching.
Proposal
Add a dataInvention?: boolean flag to PromptOptions, defaulting to true (preserving current behaviour). When false, skip the line in buildImportantRules().
This mirrors the existing pattern of editMode, inlineMode, bindings, and toolCalls — feature flags that control which sections of the prompt are emitted.
Use case
backpack-openui has two consumers:
- Runtime (generative UI) —
dataInvention: true(default) - Description (describing existing prototypes) —
dataInvention: false
The description consumer is the one that needs this flag. Evidence: https://github.com/Skyscanner/backpack-openui/blob/main/docs/spike-findings.md
- Dominant language
- TypeScript
- Stars
- 10k
- Forks
- 698
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 138
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from thesysdev/openui
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
thesysdev/openui#1445 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 18/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 18/100
thesysdev/openui#1528 · 1 reaction ·
Maintainers usually reply within 1 day
All issues in thesysdev/openui
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Open-Earth-Foundation/CityCatalyst#3399 ·
Maintainers usually reply within 2 days
-
userReport
Difficulty 1/5 Under an hour Newbie friendliness 72/100
nkprasad12/morcus-net#631 ·
Maintainers usually reply within 1 day
-
fix(app): fail closed if GetGeneralSetting fails during initializationPossibly taken @kalavt claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
nekko-labs/nekko-agent#1756 ·
Maintainers usually reply within 1 day
-
needs-area-label
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 2 days