hashbrown

Ethics

Generate, review, edit and explicitly apply a plan, then use the applied context in a follow-up.

Recorded with real OpenAI JSON and actual framework parser APIs in the checked Angular workbench. Source completion, parser completion, original JSON validation and application actions remain separate. Review and Apply are explicit; browser readContext returns the applied plan and revision. Unchanged protocol events are paced at 20 ms for filming; the normal host adds no delay. Footage is slowed to half speed for readability. Replay makes no requests or writes. No narration. Read the text walkthrough.

An AI feature asks a user to trust a system that can produce an incorrect or incomplete answer. Responsible design starts with that interaction: what the user sees, what data leaves the application, and which actions require a person's decision.

Hashbrown gives us tools for building the interface. We still own the product decisions around disclosure, access, review, and recovery.

Keep a proposal separate from an applied change

Scroll horizontally to see the full diagram, or expand it.

draft availableapply + confirmdiscardGeneratingA response is still arrivingReady for reviewA draft, not a saved changeAppliedThe application confirmed thewriteDiscardedNo application write
A generated value is a draft. Apply it only after the user reviews the current draft and the application confirms the change.
Read the diagram

Generation produces a proposal for review. The user can edit or discard it. An explicit Apply action checks the current draft and permission before writing. Only a confirmed write reaches Applied. Failure paths are omitted from this focused diagram; a failed generation or write must not be displayed as Applied. This is an application interaction model, not an SDK persistence state machine.

Keep a proposal separate from an applied change

A generated value is a draft. Apply it only after the user reviews the current draft and the application confirms the change.

Read the diagram

Generation produces a proposal for review. The user can edit or discard it. An explicit Apply action checks the current draft and permission before writing. Only a confirmed write reaches Applied. Failure paths are omitted from this focused diagram; a failed generation or write must not be displayed as Applied. This is an application interaction model, not an SDK persistence state machine.

Make the proposal visible

Tell the user when content was generated. Show what a proposed change will do before applying it. For example, an assistant can draft a delivery note while the user reviews and edits the text in an ordinary form. Generating the note should not silently submit the order.

Interface stateWhat the user should understand
GeneratingThe current content may still change.
Ready for reviewA proposal is available; it has not been applied.
Failed or cancelledThe requested operation did not complete successfully.
AppliedThe application confirmed the specific change.

Use concrete labels such as Apply delivery note instead of an ambiguous Continue. Preserve an ordinary editing or manual path when generation is unavailable.

Keep approval tied to the current draft

Here is an application-owned gate you can adapt before enabling a review action. It has no model or framework dependency. It handles only a local draft; the server must independently authorize and validate any saved change.

type ReviewedDraft = {
  text: string;
  complete: boolean;
  failed: boolean;
  sourceRevision: number;
};

export function canReviewDraft(
  draft: ReviewedDraft,
  currentRevision: number,
): boolean {
  return (
    draft.complete &&
    !draft.failed &&
    draft.sourceRevision === currentRevision &&
    draft.text.trim().length > 0 &&
    draft.text.length <= 2000
  );
}

The conditions are explicit: a completed result, no known failure, a current source revision, and the application's text limits. This does not establish factual correctness or user consent by itself. Review the content and make the final action explicit.

Choose data deliberately

Send the context needed for the task. Avoid sending an entire customer record when an order status is sufficient. Keep credentials on the server, authorize reads and writes, and decide how conversation data is retained and deleted. Explain those product choices where the user makes the decision to share data.

Explain what data will be sent before asking the user to share it, and give them a useful way to decline. A disclosure such as “Drafted with AI. Review before applying” makes the proposal visible without claiming that it is verified.

Treat generated text and tool requests as untrusted inputs. A component catalog constrains the interface the model can request; it does not authorize a refund, account change, or database write. Validate those actions at their application boundary.

Test the ordinary and difficult paths

Review the feature with keyboard and screen-reader navigation, small viewports, slow responses, unavailable models, misleading output, and cancellation. Make errors actionable without exposing private data. For features that accept public input or publish generated content, decide where moderation and human review belong and test their failure paths too. Include people who use the product in this review, and evaluate whether the feature helps them complete the task.

Explore it in the workbench

Open the Natural language forms lesson in the workbench below. Its Replay tab shows an actual generated plan, an editable form, and an explicit Apply action.

Watch the distinction between the model's draft, the user's edited form, and the accepted application state in State. The replay retains a model overwrite and an explicit correction; it does not replace that outcome with an ideal response. Scrub the timeline to compare those moments. Replay cannot apply the plan or send another request.

This is a small example of an interaction boundary, not a complete policy for your product. Continue with Natural language forms, Public endpoints, and the production recovery reference for the corresponding implementation details.

EthicsMake the proposal visibleKeep approval tied to the current draftChoose data deliberatelyTest the ordinary and difficult pathsExplore it in the workbench