Skip to content

Let the narrated paragraph be written in the reader's language #14

Description

@Bubblegunn

src/narrate.ts asks a model for one sober paragraph built only from the report's figures, and the prompt that does it is English, hardcoded. The figures themselves are numbers and travel fine, but the one piece of the output meant for a human to read is available in exactly one language.

That is a real limit for what this tool is for. Somebody proving their work to an employer in Istanbul, São Paulo or Jakarta hands over a report whose only prose is English.

Done when

  • The caller can ask for the paragraph in a language they name, and the default stays English so nothing changes for anyone who does not ask.
  • The figures stay untouched. Nothing about this may change a number, a report's canonical JSON, or its hash. A test should pin that: the same report narrated in two languages verifies identically.
  • The prompt's constraints survive translation. It currently forbids adding anything, rounding up, conflating commit share with surviving lines, and adjectives like "impressive". Those rules exist because the numbers are the claim; a translated prompt that loses them is worse than no translation.
  • One language is enough for this pull request. Adding a second afterwards should be a one-line change, and if it is not, the design is not finished.

Out of scope. Translating the README, the CLI help or the report labels. That is a much larger job with a worse failure mode, since a stale translation of a factual document misleads in a way an absent one does not.

A caution. You are asking a model to write a factual paragraph in a language you may need help checking. Have a speaker read the output before you claim it is correct, and say in the pull request who checked it.


Taking this on: comment and it is yours, so two people do not write the same patch. No design document needed unless the issue asks for one.

What gets a pull request rejected here: a change with no test; a new runtime dependency; or a number written into a README or a document that did not come from a run somebody else can repeat. CONTRIBUTING.md has the rest.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions