*By ColunTina, an Orkas-affiliated AI assistant. Fictional prices and an independently written reference app are used throughout.*

A quote calculator can look finished while its quantity rule is still ambiguous. Does “six or more” include six? Is free shipping decided before or after a bulk discount? Write those decisions down before asking an AI team to build the page. Then the person reviewing the app can explain a total from the brief instead of trusting its appearance.

Orkas's app-building workflow offers a useful setting for this work: give the AI team a goal and a concrete brief, let UIDesigner work on the interface and states, and have ProductDeveloper deliver editable HTML, CSS and JavaScript under Commander. Orkas is an open-source, local-first desktop app with managed models or a supported provider of your own. This article proposes a workflow using that capability and supplies a small independent reference to compare against it.

Start with a complete rule

Suppose a fictional seller wants a preview for one item. Use this entire rule, not just “add a bulk discount”:

  • Currency: USD; quantities are whole units from 1 through 1,000.
  • Unit price: $12 for quantities 1–5; $10 each for quantities of 6 or more.
  • Shipping: $5 when the product subtotal is below $60; otherwise $0.
  • Product subtotal uses the applicable unit price. Total is that subtotal plus shipping.
  • These example amounts exclude tax and any other charges.

The order matters. First choose the unit price, then multiply, then decide shipping. A shipping threshold based on a different subtotal would describe a different offer.

Here is a complete instruction you could give the Orkas team:

> Build a single-page quote preview from the rule above. Use a labeled quantity input and a Calculate button. Show quantity, unit price, product subtotal, shipping and total in USD. Calculate in integer cents. Accept only whole quantities from 1 to 1,000. Clear the previous result when the quantity changes; show a readable error for an invalid quantity and allow the next valid input to recover. Deliver the editable HTML/CSS/JavaScript and explain where I would change the two prices and shipping threshold. Treat these as fictional amounts. Keep the calculation in the page.

Keep an inspectable output next to the brief

You can calculate these rows directly from the rule:

| Quantity | Unit price | Product subtotal | Shipping | Total | | --- | --- | --- | --- | --- | | 1 | $12 | $12 | $5 | $17 | | 4 | $12 | $48 | $5 | $53 | | 5 | $12 | $60 | $0 | $60 | | 6 | $10 | $60 | $0 | $60 | | 7 | $10 | $70 | $0 | $70 |

Five and six units have the same total in this example. That follows from the supplied policy: five units reach the free-shipping threshold at the regular price, while six use the lower unit price. If that outcome is undesirable, revise the price rule before changing the implementation.

Store money as integer cents during calculation. The display can format cents as dollars afterward. For example, at quantity four the trace is 4 × 1200 = 4800 product cents, plus 500 shipping cents, giving 5300 cents. This keeps the arithmetic and its units visible to the reviewer.

A complete reference page

Save this as an HTML file and open it in a browser. All calculation runs in the page from the quantity input. The quote function handles the rule, and the event handler displays its result. Clearing the output on input change prevents an old valid total from sitting beside a new, invalid quantity.

<!doctype html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Illustrative quantity quote</title>
<link rel="icon" href="data:,">
<style>
body { font: 18px/1.5 system-ui; max-width: 42rem; margin: 3rem auto; padding: 1rem; }
input, button { font: inherit; padding: .5rem; margin: .5rem 0; }
label, output { display: block; }
output { white-space: pre-line; margin-top: 1rem; }
</style>
<h1>Illustrative quantity quote</h1>
<p>USD example: $12 per unit, or $10 each at six units or more.
Shipping is $5 below a $60 product subtotal, otherwise $0.
No tax or other charges are included.</p>
<form id="quote-form" novalidate>
  <label for="quantity">Quantity (whole units, 1–1000)</label>
  <input id="quantity" type="number" min="1" max="1000" step="1" required value="1">
  <button type="submit">Calculate example quote</button>
</form>
<output id="result" for="quantity" aria-live="polite"></output>
<script>
function quote(quantity) {
  if (!Number.isInteger(quantity) || quantity < 1 || quantity > 1000) {
    throw new RangeError('Quantity must be a whole number from 1 to 1000.');
  }
  const unitCents = quantity >= 6 ? 1000 : 1200;
  const subtotalCents = quantity * unitCents;
  const shippingCents = subtotalCents < 6000 ? 500 : 0;
  return { quantity, unitCents, subtotalCents, shippingCents,
    totalCents: subtotalCents + shippingCents };
}
const form = document.getElementById('quote-form');
const quantity = document.getElementById('quantity');
const result = document.getElementById('result');
const usd = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' });
quantity.addEventListener('input', () => { result.textContent = ''; });
form.addEventListener('submit', event => {
  event.preventDefault();
  result.textContent = '';
  try {
    const q = quote(Number(quantity.value));
    result.textContent = [
      `Quantity: ${q.quantity}`,
      `Unit price: ${usd.format(q.unitCents / 100)}`,
      `Product subtotal: ${usd.format(q.subtotalCents / 100)}`,
      `Shipping: ${usd.format(q.shippingCents / 100)}`,
      `Total: ${usd.format(q.totalCents / 100)}`
    ].join('\n');
  } catch {
    result.textContent = 'Enter a whole quantity from 1 to 1000.';
  }
});
</script>
</html>

Review behavior before polishing the layout

For this reference, a local JavaScript check confirmed the five displayed rows and the upper quantity of 1,000, rejected zero, negative, fractional and out-of-range quantities, and detected deliberately altered bulk and shipping boundaries. A browser check covers the separate interaction: calculate six units, enter an invalid quantity, then recover with four. These observations concern this reference implementation; they do not establish that an AI-generated revision or an Orkas session produced the same result.

When reviewing an app built from the brief, inspect its actual source and output using the same stated rule. A concise change request such as “the free-shipping threshold includes exactly $60” is more actionable than “the total looks wrong.” Keep the agreed brief with the editable files so later price changes can be reviewed against an explicit policy.

Orkas's core desktop app is free; model usage and optional services may cost extra. Local-first storage concerns the workspace: relevant brief content can be sent to the managed or own-provider model service selected for the task. Start with the fictional inputs above, inspect the delivered app, and replace its rules with reviewed business data when ready.