Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

feat: docs/glossary interlinking (#922)

Sid2511fe971f58
diff --git a/.claude/skills/carbon-docs/SKILL.md b/.claude/skills/carbon-docs/SKILL.md
index 1dafa8374f..814de777ec 100644
--- a/.claude/skills/carbon-docs/SKILL.md
+++ b/.claude/skills/carbon-docs/SKILL.md
@@ -103,14 +103,21 @@ flowIndex: 1 # order of the flow in the subnav (0 = first)
real key** from `components/editorial/illustrations.tsx` (else it silently renders nothing). Valid keys:
`flow-overview, order-split, bom-tree, demand-forecast, planning-engine, shopfloor-loop, eight-d,
traceability-graph, method-types, kit-vs-subassembly, reorder-policy, outside-processing, mes-station,
- issue-workflow, schedule-board, get-method, conversion-factor`. For anything without a fitting key, use
- `<Screenshot>` instead — don't invent keys.
-- `<Screenshot label="Sales order dashboard" caption="…" ratio="wide|tall|square" />` — placeholder frame,
- free-text label (no image asset needed). Default `ratio="wide"`.
+ issue-workflow, schedule-board, get-method, conversion-factor, opportunity-thread, cash-cycle,
+ rfq-fanout, receive-bill-axes, wip-inflow, wip-to-cogs, depreciation-curve, asset-exit`. For anything
+ without a fitting key, use `<Screenshot>` instead — don't invent keys.
+- `<Screenshot label="Sales order dashboard" caption="…" ratio="wide|tall|square" />` — a standing **slot for
+ a real Carbon capture**. Use it where the reader needs to see the actual UI (dashboard, a specific
+ form/field, status, board, where-to-click) — not as decoration. Label the **real, current** screen + state
+ precisely (verify it exists) so a real screenshot can drop straight in and the docs stay synced to the live
+ Carbon UI. Default `ratio="wide"`.
- `<Callout tone="neutral|blue|green|amber" badge="WHY BATCH" title="…">body</Callout>` — the workhorse.
Use it to carry the **Carbon-specific truth a generic description gets wrong**. Tones: blue = explanatory
"why", green = good-to-know/outcome, amber = caution/contrast, neutral = definitional.
- `<Divider />` — closes a chapter before its wrap-up line.
+- `<Term>make to order</Term>` — inline glossary term: dotted-underline; click/tap opens a popover with a
+ grounded one-line definition + an optional "Learn more" link. Same component on both surfaces; definitions
+ live in `apps/docs/lib/glossary.ts`. See "Interlinking & the glossary" below.
Each `##` heading becomes a sidebar rail entry — so structure chapters as 3–5 `##` sections.
@@ -135,6 +142,8 @@ Each `##` heading becomes a sidebar rail entry — so structure chapters as 3–
features = `packages/ee/src/plan.ts` (Business/Partner). **Don't** badge free ones (email, exchange-rates).
The gate is **Cloud-only** — self-hosted isn't plan-gated; note that where it matters.
- `<Steps>/<Step>`, `<Tabs>/<Tab>` (fumadocs-ui), markdown tables, and code fences (dark panel).
+ - `<Term id?>…</Term>` — inline glossary term (dotted underline → definition popover). The same component
+ as the Guide; see "Interlinking & the glossary" below.
- Voice is more technical/scannable than the Guides — fields, constraints, tables — but still names the
gotcha and links back to the Guide for the narrative.
@@ -154,6 +163,31 @@ Each `##` heading becomes a sidebar rail entry — so structure chapters as 3–
- **Name things as they are now.** Use a feature's current name; never narrate rename/removal history
("formerly item rules", "storage units used to…"). When an old name and the code disagree, the code wins.
+## Interlinking & the glossary
+
+Two linking mechanisms — use **both**, deliberately, every time you touch a page. Internal linking compounds:
+a page that links out *and* glosses its jargon is worth more than the same prose in isolation.
+
+- **Markdown links carry navigation.** Link the *noun*, inline, at natural seams; never "click here". A Guide
+ links into Reference for fields; Reference links back to the Guide for the story
+ (`[make-to-order tour](/guides/order)`). Cross-surface and cross-flow links are expected, not optional.
+- **`<Term>` carries definitions.** Wrap a manufacturing/Carbon term a reader can hit cold (method type,
+ replenishment system, WIP, outside operation, kit/subassembly…) so a click gives the gloss without leaving
+ the page.
+ - `<Term>make to order</Term>` slugifies the text to find the entry; `<Term id="make-to-order">made</Term>`
+ when the display text differs from the slug.
+ - **First occurrence per page only** — not every instance. Underlining every "order" is noise.
+ - Definitions are a single source of truth: `apps/docs/lib/glossary.ts` (`slug → { term, definition, href? }`).
+ Add the entry there *before* you use a new term, and **ground the definition in source** (the prime
+ directive applies — exact enum values, real behavior). Omit `href` when there's no dedicated page yet (the
+ popover still shows the definition); the "Learn more" link auto-hides when it would point at the page
+ you're already on.
+ - Unknown slug → renders as plain text (never breaks prose) — a typo fails safe, not loud.
+
+**Enrichment pass.** Whenever you create or edit a page, finish with a linking pass: wrap first-occurrence
+jargon in `<Term>`, add markdown cross-links at the seams, and add any missing glossary entries. Cheapest way
+to raise the whole site's connectivity.
+
## Design / styling
- **Light-only.** Warm-paper palette: page bg `#FBFBF9` / `#F5F5F2`; ink `#262323` (+ `rgba(38,35,35,0.x)`
@@ -196,6 +230,7 @@ Each `##` heading becomes a sidebar rail entry — so structure chapters as 3–
## Verification bar
Never declare docs done without: the new content rendering (in the user's running dev server, or a clean
-`pnpm --filter docs build`), every internal link resolving, names matching real code, **no generic repeated
+`pnpm --filter docs build`), every internal link resolving, any new `<Term>` glossary entries grounded in
+source + their popovers rendering, names matching real code, **no generic repeated
headings**, and a re-read that confirms each page says what matters / names the mistake / points onward. Then
record progress (`llm/tasks/` + memory). **Don't kill or rebuild under the user's running dev server.**
diff --git a/.claude/skills/carbon-docs/references/components.md b/.claude/skills/carbon-docs/references/components.md
index 67402fdcd2..2ec820e948 100644
--- a/.claude/skills/carbon-docs/references/components.md
+++ b/.claude/skills/carbon-docs/references/components.md
@@ -35,8 +35,17 @@ Placeholder frame for a real Carbon screen — no image asset required.
<Screenshot label="Sales order dashboard" caption="The 90-unit robot order, with its three-week schedule." ratio="wide" />
```
- `label: string` (required), `caption?: string`, `ratio?: "wide" | "tall" | "square"` (default `wide` = 16/9).
-- This is the default visual in new content — most new chapters lean on `<Screenshot>` + `<Callout>` and use
- `<Figure>` only where a registry key genuinely fits.
+- The default *visual* in new content — chapters lean on `<Screenshot>` + `<Callout>`, with `<Figure>` only
+ where a registry key genuinely fits. But place each one where a real screen earns it, not as filler.
+- **A `<Screenshot>` is a standing slot for a *real* Carbon capture — treat it as one.** Use it where the
+ reader genuinely needs to see the actual UI (a dashboard, a specific form/field, a status badge, a board,
+ where-to-click). If the prose already carries the point, skip it.
+- **Label the real screen, grounded.** `label`/`caption` must name an actual, current Carbon screen + state —
+ verify it exists in the app, like any other claim. "Job operations tab — outside operation flagged for a
+ PO" beats "a screenshot of operations". A precise label lets a real capture drop straight in and keeps the
+ docs honest to the live UI.
+- Prefer a real-screen `<Screenshot>` over a conceptual `<Figure>` when the point is *what Carbon actually
+ looks like / where to click*; use `<Figure>` only when the point is a concept or relationship.
### `<Callout>` (Guide API — tone + badge)
The workhorse. Carry the **Carbon-specific truth a generic description gets wrong**.
@@ -56,6 +65,21 @@ and billing are deliberately separate steps.
### `<Divider />`
Hairline rule. Used once near the end of a chapter, before the wrap-up sentence.
+### `<Term>`
+Inline glossary term — dotted blue underline; click/tap opens a popover with a one-line definition and an
+optional "Learn more" link. The non-link affordance for jargon: links navigate (solid, blue text), terms
+define (dotted underline, ink text).
+```mdx
+Set the method type to <Term>purchase to order</Term> when the material is bought, not built.
+You <Term id="pull-from-inventory">pull it from stock</Term> when the parent is built.
+```
+- `id?: string` (explicit glossary slug), `children` (display text — slugified to the entry key when `id` is omitted).
+- Definitions live in `apps/docs/lib/glossary.ts` (`slug → { term, definition, href? }`). Add the entry there
+ first, grounded in source. Omit `href` → definition-only popover; the "Learn more" link auto-hides when it
+ would point at the current page. Unknown slug → renders plain text (fails safe).
+- **Same component on the Reference surface.** First occurrence per page only — see SKILL.md "Interlinking &
+ the glossary".
+
**Rail:** every `##` heading becomes a sidebar entry. Structure a chapter as 3–5 `##` sections + a short
intro; `###` is for sub-structure (not in the rail).
@@ -100,6 +124,11 @@ Field / parameter / option rows (hairline-divided).
- **Code fences** render in the dark API-playground panel (`MdxCodeBlock`). Reference pages *may* use fences
— but mind the shiki theme gotcha (SKILL.md).
+### `<Term>`
+Inline glossary term (dotted underline → definition popover) — **the same component as the Guide**; see the
+Guide-surface entry above for the API. Use it on Reference prose too: gloss the first occurrence of a term a
+reader hits cold, especially where the page names a concept it doesn't stop to define.
+
---
## Choosing a component
@@ -110,6 +139,7 @@ Field / parameter / option rows (hairline-divided).
| Show a conceptual diagram | `<Figure>` (real key only) | — |
| Flag a must-not-miss truth / gotcha | `<Callout tone badge title>` | `<Callout type>` |
| Fan out to related pages | inline links | `<Cards>` |
+| Gloss a jargon term inline | `<Term>` | `<Term>` |
| Document fields/params | (prose) | markdown table or `<EnvVars>` |
| A short ordered procedure | (narrate it) | `<Steps>` |
| Alternative paths | — | `<Tabs>` |
diff --git a/.claude/skills/carbon-docs/references/writing-guide.md b/.claude/skills/carbon-docs/references/writing-guide.md
index 14646c3b7b..ad87c9dbdb 100644
--- a/.claude/skills/carbon-docs/references/writing-guide.md
+++ b/.claude/skills/carbon-docs/references/writing-guide.md
@@ -63,9 +63,17 @@ same opportunity, so you can enter the flow at whatever point a deal actually st
## Interlink at the seams
-Connect flows where they naturally touch: `[make-to-order tour](/guides/order)`,
-`[quote-to-cash](/guides/order-to-cash)`. Link the *noun*, inline — never "click here". A Guide links into
-Reference for fields; Reference links back to the Guide for the story.
+Two mechanisms, both every time you touch a page:
+
+- **Markdown links carry *navigation*.** Link the *noun*, inline — never "click here". A Guide links into
+ Reference for fields; Reference links back to the Guide for the story
+ (`[make-to-order tour](/guides/order)`, `[quote-to-cash](/guides/order-to-cash)`).
+- **`<Term>` carries *definitions*.** Wrap a term a reader hits cold (method type, replenishment system, WIP,
+ outside operation…) so a click glosses it in place. First occurrence per page only; definitions live in
+ `apps/docs/lib/glossary.ts`, grounded in source — add the entry before you use a new term.
+
+When you create or edit a page, end with an **enrichment pass**: gloss first-occurrence jargon with `<Term>`,
+add cross-links at the seams, top up the glossary. Internal linking compounds — make it a habit.
## Real page templates
@@ -131,6 +139,8 @@ forward** — cut anything that does none. Then the page as a whole:
- Clear next step / link at the end?
- Could a real example replace an abstract sentence? Replace it.
- **Every status/name/transition checked against source?** (Rule 0.)
+- **Jargon glossed, seams linked?** First-use terms wrapped in `<Term>` (entry in `lib/glossary.ts`), cross-links added.
+- **Visuals show the real UI?** Each `<Screenshot>` marks a real, current Carbon screen (grounded label), placed where the reader needs to see it — not decoration.
## Tone calibration
diff --git a/apps/docs/app/api-reference/layout.tsx b/apps/docs/app/api-reference/layout.tsx
index 4e23246895..c2effcbb29 100644
--- a/apps/docs/app/api-reference/layout.tsx
+++ b/apps/docs/app/api-reference/layout.tsx
@@ -4,6 +4,7 @@ import { ApiConfigProvider } from "@/components/api/config-context";
import { Configurator } from "@/components/api/configurator";
import { TableOfContents } from "@/components/api/toc";
import { MainHeader } from "@/components/main-header";
+import { NavScrollChevron } from "@/components/nav-scroll-chevron";
import { navTree } from "@/lib/api-data";
export default function ApiReferenceLayout({
@@ -28,6 +29,7 @@ export default function ApiReferenceLayout({
<aside className="sticky top-[64px] hidden h-[calc(100dvh-64px)] w-[280px] shrink-0 overflow-y-auto border-r border-[#E7E7E3] px-[20px] py-[28px] scrollbar-hidden-until-scroll nav-scroll-fade lg:block">
<Configurator />
<ApiNav tree={navTree} />
+ <NavScrollChevron />
</aside>
<main className="min-w-0 flex-1 px-[24px] pb-[140px] pt-[40px] lg:px-[56px]">
{children}
diff --git a/apps/docs/app/editorial.css b/apps/docs/app/editorial.css
index 7ae0665074..86b5d57d36 100644
--- a/apps/docs/app/editorial.css
+++ b/apps/docs/app/editorial.css
@@ -106,23 +106,12 @@ body {
background: #26232326;
}
-/* Scroll affordance for navigation sidebars — fade the list at its top/bottom edges
- * so it's clear there's more above / below. Applied only to nav scrollers. */
+/* Scroll affordance for navigation sidebars — fade only the top edge so it's clear
+ * there's more above. The bottom fade + "more below" chevron come from
+ * <NavScrollChevron>. Applied to every nav scroller (guides rail, api/mcp, reference). */
.nav-scroll-fade {
- -webkit-mask-image: linear-gradient(
- to bottom,
- transparent 0,
- #000 22px,
- #000 calc(100% - 26px),
- transparent 100%
- );
- mask-image: linear-gradient(
- to bottom,
- transparent 0,
- #000 22px,
- #000 calc(100% - 26px),
- transparent 100%
- );
+ -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22px);
+ mask-image: linear-gradient(to bottom, transparent 0, #000 22px);
}
/* View Transitions — smooth cross-fade when switching chapters (driven by
diff --git a/apps/docs/app/mcp/layout.tsx b/apps/docs/app/mcp/layout.tsx
index 790e2eb0a3..7b86e668ea 100644
--- a/apps/docs/app/mcp/layout.tsx
+++ b/apps/docs/app/mcp/layout.tsx
@@ -4,6 +4,7 @@ import { Configurator } from "@/components/api/configurator";
import { McpNav } from "@/components/api/mcp-nav";
import { TableOfContents } from "@/components/api/toc";
import { MainHeader } from "@/components/main-header";
+import { NavScrollChevron } from "@/components/nav-scroll-chevron";
import { toolsNavTree } from "@/lib/tools-data";
export default function McpLayout({ children }: { children: ReactNode }) {
@@ -24,6 +25,7 @@ export default function McpLayout({ children }: { children: ReactNode }) {
<aside className="sticky top-[64px] hidden h-[calc(100dvh-64px)] w-[280px] shrink-0 overflow-y-auto border-r border-[#E7E7E3] px-[20px] py-[28px] scrollbar-hidden-until-scroll nav-scroll-fade lg:block">
<Configurator />
<McpNav tools={toolsNavTree} />
+ <NavScrollChevron />
</aside>
<main className="min-w-0 flex-1 px-[24px] pb-[140px] pt-[40px] lg:px-[56px]">
{children}
diff --git a/apps/docs/components/editorial/how-to-layout.tsx b/apps/docs/components/editorial/how-to-layout.tsx
index f1f69813d8..ff59e149ec 100644
--- a/apps/docs/components/editorial/how-to-layout.tsx
+++ b/apps/docs/components/editorial/how-to-layout.tsx
@@ -2,6 +2,7 @@
import type { ReactNode } from "react";
import { PageFeedback } from "@/components/api/page-feedback";
+import { NavScrollChevron } from "@/components/nav-scroll-chevron";
import { ReadingProgress } from "@/components/reading-progress";
import { chaptersInFlow, useGuide } from "./guide-context";
import { SidebarNav } from "./sidebar-nav";
@@ -127,6 +128,7 @@ export function HowToLayout({ bodies }: { bodies: ReactNode[] }) {
of stretching; scrolls internally only if it outgrows the viewport. */}
<aside className="sticky top-[116px] hidden max-h-[calc(100dvh-116px)] w-[260px] shrink-0 self-start overflow-y-auto scrollbar-hidden-until-scroll nav-scroll-fade pb-[40px] pl-[50px] pr-[10px] pt-[40px] min-[1000px]:block">
<SidebarNav chapters={chapters} active={active} onActiveChange={goTo} />
+ <NavScrollChevron />
</aside>
{/* Content — natural document flow. The window scrolls, so the footer only
diff --git a/apps/docs/components/editorial/illustrations.tsx b/apps/docs/components/editorial/illustrations.tsx
index ec2c2bf4c7..30ba0c748e 100644
--- a/apps/docs/components/editorial/illustrations.tsx
+++ b/apps/docs/components/editorial/illustrations.tsx
@@ -15,7 +15,15 @@ export type IllustrationKey =
| "issue-workflow"
| "schedule-board"
| "get-method"
- | "conversion-factor";
+ | "conversion-factor"
+ | "opportunity-thread"
+ | "cash-cycle"
+ | "rfq-fanout"
+ | "receive-bill-axes"
+ | "wip-inflow"
+ | "wip-to-cogs"
+ | "depreciation-curve"
+ | "asset-exit";
/* On-brand editorial illustrations — warm paper palette, DM Sans (inherited),
* #00B0FF accent, made=blue / bought=amber tags matching the content badges.
@@ -754,6 +762,220 @@ function ConversionFactor() {
);
}
+function OpportunityThread() {
+ const docs = [
+ { x: 20, label: "Sales RFQ", sub: "salesRfqId", accent: false },
+ { x: 270, label: "Quote", sub: "quoteId", accent: false },
+ { x: 520, label: "Sales order", sub: "salesOrderId", accent: true },
+ ];
+ return (
+ <svg viewBox="0 0 720 200" className="w-full h-auto" role="img" aria-label="One opportunity threads RFQ, quote, and order">
+ {/* the three documents, left to right */}
+ <Arrow x1={200} y1={47} x2={268} y2={47} />
+ <Arrow x1={450} y1={47} x2={518} y2={47} />
+ {docs.map((d) => (
+ <Box key={d.label} x={d.x} y={20} w={180} h={54} label={d.label} sub={d.sub} accent={d.accent} />
+ ))}
+ {/* dashed connectors down to the opportunity that holds all three */}
+ <g stroke={LINE} strokeWidth={1.4} strokeDasharray="4 4" fill="none">
+ {[110, 360, 610].map((x) => (
+ <line key={x} x1={x} y1={74} x2={x} y2={130} />
+ ))}
+ </g>
+ <Box x={20} y={130} w={680} h={50} label="Opportunity" sub="one thread — any slot can be empty" />
+ </svg>
+ );
+}
+
+function CashCycle() {
+ const steps = [
+ { x: 10, w: 160, label: "Sales order", sub: "To Ship and Invoice", accent: true },
+ { x: 205, w: 150, label: "Shipment", sub: "Posted", accent: false },
+ { x: 390, w: 150, label: "Invoice", sub: "Submitted", accent: false },
+ { x: 575, w: 135, label: "Paid", sub: "datePaid set", accent: true },
+ ];
+ const gaps = [
+ { x: 170, label: "post" },
+ { x: 355, label: "bill" },
+ { x: 540, label: "pay" },
+ ];
+ return (
+ <svg viewBox="0 0 720 150" className="w-full h-auto" role="img" aria-label="Order to cash in four posted steps">
+ {gaps.map((g) => (
+ <g key={g.label}>
+ <text x={g.x + 17} y={42} textAnchor="middle" fontSize="11" fontWeight={600} fill={BRAND_INK} fontFamily="var(--font-mono)">
+ {g.label}
+ </text>
+ <Arrow x1={g.x} y1={78} x2={g.x + 33} y2={78} />
+ </g>
+ ))}
+ {steps.map((s) => (
+ <Box key={s.label} x={s.x} y={50} w={s.w} h={56} label={s.label} sub={s.sub} accent={s.accent} />
+ ))}
+ <text x={360} y={132} textAnchor="middle" fontSize="11.5" fill={INK_60}>
+ Each step is its own posted move — none auto-chains.
+ </text>
+ </svg>
+ );
+}
+
+function RfqFanout() {
+ const quotes = [
+ { y: 12, label: "Supplier A", sub: "$12.40 · 3 wk", win: false },
+ { y: 82, label: "Supplier B", sub: "$11.80 · 2 wk", win: true },
+ { y: 152, label: "Supplier C", sub: "$12.10 · 4 wk", win: false },
+ ];
+ return (
+ <svg viewBox="0 0 720 212" className="w-full h-auto" role="img" aria-label="One RFQ fans out to supplier quotes, then converts the winner to a PO">
+ <Box x={16} y={78} w={170} h={56} label="Purchasing RFQ" sub="one request" accent />
+ {/* fan out to one supplier quote each */}
+ <g stroke={LINE} strokeWidth={1.4} fill="none">
+ {quotes.map((q) => (
+ <path key={q.label} d={`M 186 106 C 250 106, 250 ${q.y + 24}, 300 ${q.y + 24}`} />
+ ))}
+ </g>
+ {quotes.map((q) => (
+ <g key={q.label}>
+ <Box x={300} y={q.y} w={200} h={48} label={q.label} sub={q.sub} accent={q.win} />
+ {q.win && <Tag x={444} y={q.y - 9} kind="made" label="chosen" />}
+ </g>
+ ))}
+ {/* winner converts to the order */}
+ <Arrow x1={500} y1={106} x2={556} y2={106} />
+ <Box x={558} y={78} w={150} h={56} label="Purchase order" sub="from winner" accent />
+ </svg>
+ );
+}
+
+function ReceiveBillAxes() {
+ const rows = [
+ { tag: "RECEIVE", y: 24, post: "Receipt posts", postSub: "→ quantityReceived", flag: "Received ✓", flagSub: "receivedComplete" },
+ { tag: "INVOICE", y: 128, post: "Bill posts", postSub: "→ quantityInvoiced", flag: "Invoiced ✓", flagSub: "invoicedComplete" },
+ ];
+ return (
+ <svg viewBox="0 0 720 200" className="w-full h-auto" role="img" aria-label="A purchase order line tracked on two independent axes, received and invoiced">
+ {rows.map((r) => (
+ <g key={r.tag}>
+ <text x={20} y={r.y - 6} fontSize="11" fontWeight={600} fill={INK_45} fontFamily="var(--font-mono)">
+ {r.tag}
+ </text>
+ <Box x={20} y={r.y} w={200} h={52} label={r.post} sub={r.postSub} />
+ <Arrow x1={220} y1={r.y + 26} x2={252} y2={r.y + 26} />
+ <Box x={254} y={r.y} w={190} h={52} label={r.flag} sub={r.flagSub} />
+ </g>
+ ))}
+ {/* both flags converge on the same line */}
+ <g stroke={INK_45} strokeWidth={1.4} fill="none">
+ <path d="M 444 50 C 500 50, 500 96, 538 100" />
+ <path d="M 444 154 C 500 154, 500 124, 538 120" />
+ </g>
+ <Box x={540} y={82} w={168} h={56} label="Line completed" sub="both flags true" accent />
+ </svg>
+ );
+}
+
+function WipInflow() {
+ return (
+ <svg viewBox="0 0 720 180" className="w-full h-auto" role="img" aria-label="Two streams feed a job's work in process">
+ <Box x={24} y={22} w={216} h={52} label="Material" sub="issued / backflushed" />
+ <Box x={24} y={106} w={216} h={52} label="Labor & machine" sub="production events" />
+ {/* both streams debit WIP */}
+ <Arrow x1={240} y1={48} x2={426} y2={80} />
+ <Arrow x1={240} y1={132} x2={426} y2={98} />
+ <text x={336} y={58} textAnchor="middle" fontSize="10.5" fill={INK_45}>
+ cost out of inventory
+ </text>
+ <text x={336} y={126} textAnchor="middle" fontSize="10.5" fill={INK_45}>
+ hours × work-center rate
+ </text>
+ <Box x={428} y={56} w={244} h={66} label="Work in process" sub="a GL account balance" accent />
+ <text x={550} y={140} textAnchor="middle" fontSize="11" fill={INK_60}>
+ cleared when the job finishes
+ </text>
+ </svg>
+ );
+}
+
+function WipToCogs() {
+ const main = [
+ { x: 16, label: "Work in process", sub: "job's balance", accent: true },
+ { x: 246, label: "Inventory", sub: "finished goods", accent: false },
+ { x: 466, label: "COGS", sub: "cost of goods sold", accent: false },
+ ];
+ return (
+ <svg viewBox="0 0 720 200" className="w-full h-auto" role="img" aria-label="WIP flows to inventory, then to COGS; residual sweeps to variance at close">
+ {/* finish → sell along the top */}
+ <text x={220} y={50} textAnchor="middle" fontSize="11" fontWeight={600} fill={BRAND_INK} fontFamily="var(--font-mono)">finish</text>
+ <Arrow x1={196} y1={63} x2={244} y2={63} />
+ <text x={440} y={50} textAnchor="middle" fontSize="11" fontWeight={600} fill={BRAND_INK} fontFamily="var(--font-mono)">sell</text>
+ <Arrow x1={416} y1={63} x2={464} y2={63} />
+ {main.map((m) => (
+ <Box key={m.label} x={m.x} y={34} w={m.x === 16 ? 180 : 170} h={58} label={m.label} sub={m.sub} accent={m.accent} />
+ ))}
+ {/* residual swept to variance at close */}
+ <g stroke={INK_45} strokeWidth={1.4} fill="none">
+ <line x1={106} y1={92} x2={106} y2={140} />
+ <path d="M 101 130 L 106 140 L 111 130" strokeLinecap="round" strokeLinejoin="round" />
+ </g>
+ <text x={118} y={120} fontSize="10.5" fill={INK_45} fontFamily="var(--font-mono)">close</text>
+ <Box x={16} y={140} w={230} h={52} label="Production Variance" sub="residual swept at close" />
+ </svg>
+ );
+}
+
+function DepreciationCurve() {
+ const x0 = 96;
+ const baseY = 200;
+ const xEnd = 600;
+ const costY = 44;
+ const residualY = 168;
+ return (
+ <svg viewBox="0 0 720 240" className="w-full h-auto" role="img" aria-label="Net book value declining from cost to residual value">
+ {/* axes */}
+ <line x1={x0} y1={28} x2={x0} y2={baseY} stroke={LINE} strokeWidth={1.4} />
+ <line x1={x0} y1={baseY} x2={664} y2={baseY} stroke={LINE} strokeWidth={1.4} />
+ {/* residual floor */}
+ <line x1={x0} y1={residualY} x2={xEnd} y2={residualY} stroke={INK_45} strokeWidth={1.2} strokeDasharray="5 4" />
+ <text x={xEnd + 6} y={residualY + 4} fontSize="11.5" fill={INK_60}>residual value</text>
+ {/* cost start */}
+ <circle cx={x0} cy={costY} r={3.6} fill={INK} />
+ <text x={x0 + 8} y={costY - 4} fontSize="11.5" fill={INK_60}>acquisition cost</text>
+ {/* straight line */}
+ <line x1={x0} y1={costY} x2={xEnd} y2={residualY} stroke={INK} strokeWidth={2} strokeLinecap="round" />
+ {/* declining balance */}
+ <path d={`M ${x0} ${costY} C 200 132, 360 164, ${xEnd} ${residualY}`} fill="none" stroke={BRAND} strokeWidth={2} strokeLinecap="round" />
+ {/* legend */}
+ <g>
+ <line x1={360} y1={44} x2={384} y2={44} stroke={INK} strokeWidth={2} />
+ <text x={392} y={48} fontSize="11.5" fill={INK_60}>Straight line</text>
+ <line x1={500} y1={44} x2={524} y2={44} stroke={BRAND} strokeWidth={2} />
+ <text x={532} y={48} fontSize="11.5" fill={INK_60}>Declining balance</text>
+ </g>
+ {/* axis labels */}
+ <text x={x0 - 8} y={36} textAnchor="end" fontSize="11" fill={INK_45} fontFamily="var(--font-mono)" transform={`rotate(-90 ${x0 - 8} 36)`}>book value</text>
+ <text x={x0 + 4} y={222} fontSize="11" fill={INK_45} fontFamily="var(--font-mono)">time →</text>
+ </svg>
+ );
+}
+
+function AssetExit() {
+ return (
+ <svg viewBox="0 0 720 210" className="w-full h-auto" role="img" aria-label="An asset leaves the books by sale or disposal">
+ <Box x={20} y={76} w={190} h={58} label="Asset" sub="Active / Fully Depreciated" accent />
+ {/* sell → sales order (money in) */}
+ <text x={252} y={60} textAnchor="middle" fontSize="11" fontWeight={600} fill={BRAND_INK} fontFamily="var(--font-mono)">Sell</text>
+ <Arrow x1={210} y1={92} x2={298} y2={56} />
+ <Box x={300} y={30} w={230} h={52} label="Sales order" sub="drafted at net book value" />
+ <Tag x={540} y={47} kind="made" label="money in" />
+ {/* dispose → write-off (no proceeds) */}
+ <text x={252} y={156} textAnchor="middle" fontSize="11" fontWeight={600} fill={INK_60} fontFamily="var(--font-mono)">Dispose</text>
+ <Arrow x1={210} y1={118} x2={298} y2={158} />
+ <Box x={300} y={140} w={230} h={52} label="Write-off" sub="remaining NBV → loss" />
+ <Tag x={540} y={157} kind="neutral" label="retire" />
+ </svg>
+ );
+}
+
export const illustrations: Record<IllustrationKey, () => React.ReactElement> = {
"flow-overview": FlowOverview,
"order-split": OrderSplit,
@@ -772,4 +994,12 @@ export const illustrations: Record<IllustrationKey, () => React.ReactElement> =
"schedule-board": ScheduleBoard,
"get-method": GetMethod,
"conversion-factor": ConversionFactor,
+ "opportunity-thread": OpportunityThread,
+ "cash-cycle": CashCycle,
+ "rfq-fanout": RfqFanout,
+ "receive-bill-axes": ReceiveBillAxes,
+ "wip-inflow": WipInflow,
+ "wip-to-cogs": WipToCogs,
+ "depreciation-curve": DepreciationCurve,
+ "asset-exit": AssetExit,
};
diff --git a/apps/docs/components/editorial/mdx.tsx b/apps/docs/components/editorial/mdx.tsx
index e1b7f75ba3..562a117ca6 100644
--- a/apps/docs/components/editorial/mdx.tsx
+++ b/apps/docs/components/editorial/mdx.tsx
@@ -1,5 +1,6 @@
import type { ComponentPropsWithoutRef, ReactNode } from "react";
import { type IllustrationKey, illustrations } from "./illustrations";
+import { Term } from "./term";
import { Zoomable } from "./zoomable";
/* The editorial MDX component map. Guide chapters are authored as MDX and rendered
@@ -236,4 +237,5 @@ export const editorialMdxComponents = {
Screenshot,
Callout,
Divider,
+ Term,
};
diff --git a/apps/docs/components/editorial/term.tsx b/apps/docs/components/editorial/term.tsx
new file mode 100644
index 0000000000..faa6ba6d70
--- /dev/null
+++ b/apps/docs/components/editorial/term.tsx
@@ -0,0 +1,79 @@
+"use client";
+
+/**
+ * Term — an inline glossary term. Dotted blue underline (distinct from a real link,
+ * which is solid + blue text); click/tap opens a popover with a grounded definition
+ * and, when the term has a home page, a "Learn more" link.
+ *
+ * Usage in MDX:
+ * <Term>purchase to order</Term> — text is slugified to find the entry
+ * <Term id="purchase-to-order">bought</Term> — explicit key when display ≠ term
+ *
+ * An unknown key renders the text plainly — a glossary gap never breaks prose or
+ * leaves a dotted underline that opens nothing.
+ */
+import * as Popover from "@radix-ui/react-popover";
+import Link from "next/link";
+import { usePathname } from "next/navigation";
+import type { ReactNode } from "react";
+import { glossary } from "@/lib/glossary";
+
+function slugify(text: string) {
+ return text
+ .toLowerCase()
+ .trim()
+ .replace(/[^a-z0-9]+/g, "-")
+ .replace(/^-+|-+$/g, "");
+}
+
+export function Term({ id, children }: { id?: string; children: ReactNode }) {
+ const pathname = usePathname();
+ const key = id ?? (typeof children === "string" ? slugify(children) : "");
+ const entry = glossary[key];
+
+ if (!entry) return <>{children}</>;
+
+ // Hide "Learn more" when it points at the page you're already on — a link back to
+ // here is noise. Compare path only (ignore hash + trailing slash).
+ const hrefPath = entry.href?.split("#")[0].replace(/\/$/, "");
+ const showLearnMore = !!hrefPath && hrefPath !== (pathname ?? "").replace(/\/$/, "");
+
+ return (
+ <Popover.Root>
+ <Popover.Trigger asChild>
+ <button
+ type="button"
+ className="inline cursor-help appearance-none border-0 bg-transparent p-0 m-0 [font:inherit] text-inherit align-baseline underline decoration-dotted decoration-[#1E84B0] decoration-[1.5px] underline-offset-[3.5px] transition-colors hover:decoration-[#0C6E96] focus:outline-none focus-visible:outline-none focus-visible:rounded-[2px] focus-visible:ring-2 focus-visible:ring-[#00B0FF]/50"
+ >
+ {children}
+ </button>
+ </Popover.Trigger>
+ <Popover.Portal>
+ <Popover.Content
+ side="top"
+ align="start"
+ sideOffset={8}
+ collisionPadding={16}
+ className="z-50 w-[300px] max-w-[calc(100vw-32px)] rounded-[10px] border border-[#E3E3DF] bg-white px-[15px] py-[14px] shadow-[0_4px_20px_rgba(38,35,35,0.10)]"
+ >
+ <div className="text-[13px] font-[500] text-[#262323]">{entry.term}</div>
+ <div className="mt-[5px] text-[13px] leading-[1.55] text-[rgba(38,35,35,0.72)]">
+ {entry.definition}
+ </div>
+ {showLearnMore && (
+ <div className="mt-[11px] border-t border-[#EFEFEB] pt-[10px]">
+ <Link
+ href={entry.href}
+ className="inline-flex items-center gap-[4px] text-[13px] font-[500] text-[#1E84B0] no-underline hover:text-[#0C6E96]"
+ >
+ Learn more
+ <span aria-hidden>→</span>
+ </Link>
+ </div>
+ )}
+ <Popover.Arrow width={12} height={6} className="fill-white" />
+ </Popover.Content>
+ </Popover.Portal>
+ </Popover.Root>
+ );
+}
diff --git a/apps/docs/components/mdx.tsx b/apps/docs/components/mdx.tsx
index 9165f57c7d..d76ab5c551 100644
--- a/apps/docs/components/mdx.tsx
+++ b/apps/docs/components/mdx.tsx
@@ -7,6 +7,7 @@ import { MdxCodeBlock } from "@/components/api/mdx-code-block";
import { Checklist, Check } from "@/components/checklist";
// Editorial Callout/Card so the Reference matches the Guide (not Fumadocs defaults).
import { Callout, Card, Cards, EnvVar, EnvVars, PlanBadge } from "@/components/editorial/reference-components";
+import { Term } from "@/components/editorial/term";
import { FeatureCallout } from "@/components/feature-callout";
import { Frame } from "@/components/frame";
import { Eyebrow } from "@/components/prose";
@@ -35,6 +36,7 @@ export function getMDXComponents(components?: MDXComponents) {
EnvVar,
EnvVars,
PlanBadge,
+ Term,
Step,
Steps,
Tab,
diff --git a/apps/docs/components/nav-scroll-chevron.tsx b/apps/docs/components/nav-scroll-chevron.tsx
index e69aff58e9..7cea9dfe93 100644
--- a/apps/docs/components/nav-scroll-chevron.tsx
+++ b/apps/docs/components/nav-scroll-chevron.tsx
@@ -11,15 +11,23 @@ export function NavScrollChevron() {
const [more, setMore] = useState(false);
useEffect(() => {
- const scroller = ref.current?.closest("aside");
- if (!scroller) return;
+ const el = ref.current;
+ const scroller = el?.closest("aside");
+ if (!el || !scroller) return;
const update = () => {
setMore(scroller.scrollHeight - scroller.scrollTop - scroller.clientHeight > 8);
};
update();
scroller.addEventListener("scroll", update, { passive: true });
+ // Observe BOTH the scroller (viewport-height changes) AND the nav content above the
+ // chevron — a ResizeObserver on the fixed-height scroller never fires when only its
+ // inner content changes (the list reflowing as fonts load, or a section expanding),
+ // which would leave `more` stale and the chevron wrongly hidden.
const ro = new ResizeObserver(update);
ro.observe(scroller);
+ if (el.previousElementSibling) ro.observe(el.previousElementSibling);
+ // Late web-font reflow can grow the list after mount; recompute once fonts settle.
+ document.fonts?.ready.then(update).catch(() => {});
return () => {
scroller.removeEventListener("scroll", update);
ro.disconnect();
diff --git a/apps/docs/content/docs/index.mdx b/apps/docs/content/docs/index.mdx
index 243706429b..678c7a7e2f 100644
--- a/apps/docs/content/docs/index.mdx
+++ b/apps/docs/content/docs/index.mdx
@@ -4,7 +4,7 @@ description: Carbon is a manufacturing system — ERP for the office, MES for th
---
Carbon is a manufacturing system: **ERP** for the office (orders, purchasing, planning, accounting) and
-**MES** for the floor (jobs, operations, tracking) — one platform over one data model.
+**MES** for the floor (<Term id="job">jobs</Term>, <Term id="operation">operations</Term>, tracking) — one platform over one data model.
These are the **technical docs**: exact behavior, fields, and operations. If you're new, start with the
narrated [**Guide**](/guides/order), which walks one order from the sales desk to a shipped, traceable robot.
diff --git a/apps/docs/content/docs/integrations/accounting.mdx b/apps/docs/content/docs/integrations/accounting.mdx
index 9495a9926b..29de98f017 100644
--- a/apps/docs/content/docs/integrations/accounting.mdx
+++ b/apps/docs/content/docs/integrations/accounting.mdx
@@ -3,7 +3,7 @@ title: Accounting
description: Post invoices to Xero and keep currency exchange rates current automatically.
---
-Two accounting integrations: **Xero** mirrors your invoices into an external ledger, and **Exchange Rates**
+Two accounting integrations: **Xero** mirrors your <Term id="invoice">invoices</Term> into an external ledger, and **Exchange Rates**
keeps multi-currency math honest. Exchange Rates is available on every plan; Xero is an Enterprise
(Business / Partner) integration.
diff --git a/apps/docs/content/docs/integrations/assistant.mdx b/apps/docs/content/docs/integrations/assistant.mdx
index 9ce18c3bdc..f765b04099 100644
--- a/apps/docs/content/docs/integrations/assistant.mdx
+++ b/apps/docs/content/docs/integrations/assistant.mdx
@@ -7,7 +7,7 @@ description: Bring the Carbon Assistant into Slack, with nonconformance notifica
## Slack
Connect **Slack** over **OAuth** to put the **Carbon Assistant** in your workspace and receive
-**nonconformance notifications** where your team already talks. Authorizing opens a Slack install popup;
+**<Term id="nonconformance">nonconformance</Term> notifications** where your team already talks. Authorizing opens a Slack install popup;
there are no fields to fill in.
| Setting | What it controls |
diff --git a/apps/docs/content/docs/integrations/estimating.mdx b/apps/docs/content/docs/integrations/estimating.mdx
index d553ba2532..0b6b5ba089 100644
--- a/apps/docs/content/docs/integrations/estimating.mdx
+++ b/apps/docs/content/docs/integrations/estimating.mdx
@@ -18,7 +18,7 @@ it imports.
| Tracking type | Default for imported items — **Inventory**, **Non-Inventory**, or **Batch**. |
| Use Paperless order number | Whether to carry the Paperless order number onto the Carbon document. |
-Imported quotes and BOMs land as Carbon records, ready to turn into sales orders and jobs.
+Imported <Term id="quote">quotes</Term> and <Term id="bom">BOMs</Term> land as Carbon records, ready to turn into <Term id="sales-order">sales orders</Term> and <Term id="job">jobs</Term>.
## Related
diff --git a/apps/docs/content/docs/integrations/project-management.mdx b/apps/docs/content/docs/integrations/project-management.mdx
index 5fe67c7cd7..3c5dd562e0 100644
--- a/apps/docs/content/docs/integrations/project-management.mdx
+++ b/apps/docs/content/docs/integrations/project-management.mdx
@@ -5,7 +5,7 @@ description: Link Carbon quality issues to Linear or Jira so engineering tracks
---
When a quality problem needs engineering's attention, Carbon can push it into the issue tracker your team
-already lives in. Both connectors are aimed at **quality (nonconformance) issues**.
+already lives in. Both connectors are aimed at **quality (<Term id="nonconformance">nonconformance</Term>) issues**.
## Linear
diff --git a/apps/docs/content/docs/reference/accounting.mdx b/apps/docs/content/docs/reference/accounting.mdx
index 978325df52..681c9595cc 100644
--- a/apps/docs/content/docs/reference/accounting.mdx
+++ b/apps/docs/content/docs/reference/accounting.mdx
@@ -3,7 +3,7 @@ title: Accounting & the ledger
description: How operations become journal entries — accounts, periods, and the postings behind every flow.
---
-Carbon's flows all end the same way: shipping, receiving, finishing a job, depreciating an asset each post to the **general ledger**. This page covers the machinery they share.
+Carbon's flows all end the same way: shipping, receiving, finishing a job, depreciating an asset each post to the **<Term id="general-ledger">general ledger</Term>**. This page covers the machinery they share.
## Accounting is a switch
@@ -15,7 +15,7 @@ A shop can run operationally — receiving, building, shipping — before it kee
## The journal
-Every posting is a **journal** with balanced **journal lines** — debits positive, credits negative. The journal carries a **source type** naming what produced it; each line carries an account and can be tagged with dimensions. A journal is *Posted* (the normal state), *Draft*, or *Reversed* — voiding writes a reversing journal rather than deleting one.
+Every <Term id="posting">posting</Term> is a **<Term>journal</Term>** with balanced **journal lines** — debits positive, credits negative. The journal carries a **source type** naming what produced it; each line carries an account and can be tagged with dimensions. A journal is *Posted* (the normal state), *Draft*, or *Reversed* — voiding writes a reversing journal rather than deleting one.
| Source type | Posted by |
| --- | --- |
@@ -46,7 +46,7 @@ A journal line can be tagged with **dimensions** — location, department, cost
## Periods
-Every posting lands in an **accounting period**. A period is a current-period pointer — *Active* or *Inactive* — created and activated on demand as you post. There's no hard period-close that blocks posting; the period simply follows the postings.
+Every posting lands in an **<Term id="accounting-period">accounting period</Term>**. A period is a current-period pointer — *Active* or *Inactive* — created and activated on demand as you post. There's no hard period-close that blocks posting; the period simply follows the postings.
## Related
diff --git a/apps/docs/content/docs/reference/approvals.mdx b/apps/docs/content/docs/reference/approvals.mdx
index 87baa2e227..bbe5364ebb 100644
--- a/apps/docs/content/docs/reference/approvals.mdx
+++ b/apps/docs/content/docs/reference/approvals.mdx
@@ -5,7 +5,7 @@ description: Route purchase orders, quality documents, and suppliers for sign-of
An **approval** holds a document in a pending state until someone authorized signs off. Carbon decides
whether a document needs approval — and who may grant it — from per-company **approval rules**. A rule
-exists per document type; for purchase orders it can also carry an amount tier, so a small order goes
+exists per document type; for <Term id="purchase-order">purchase orders</Term> it can also carry an amount tier, so a small order goes
through untouched while a large one waits for the right person.
Say you set a purchase-order rule at **$25,000** with the purchasing managers as approvers: a $4,000 order
diff --git a/apps/docs/content/docs/reference/fixed-assets.mdx b/apps/docs/content/docs/reference/fixed-assets.mdx
index b88b1241df..3b1f0fe7fd 100644
--- a/apps/docs/content/docs/reference/fixed-assets.mdx
+++ b/apps/docs/content/docs/reference/fixed-assets.mdx
@@ -3,7 +3,7 @@ title: Fixed assets
description: Capital equipment on the books — acquired, depreciated, and retired.
---
-A **fixed asset** is a piece of capital equipment you capitalize and depreciate rather than expense — a press, a CNC, a forklift. It's an accounting record of value over time, distinct from the work center that represents the same machine on the floor. Every asset belongs to an **asset class**, which supplies the general-ledger accounts it posts to.
+A **fixed asset** is a piece of capital equipment you capitalize and depreciate rather than expense — a press, a CNC, a forklift. It's an accounting record of value over time, distinct from the <Term>work center</Term> that represents the same machine on the floor. Every asset belongs to an **<Term>asset class</Term>**, which supplies the general-ledger accounts it posts to.
## Lifecycle
@@ -19,7 +19,7 @@ A **fixed asset** is a piece of capital equipment you capitalize and depreciate
An asset comes onto the books two ways, both starting at **Draft**:
- **Register** one you already own — supply its acquisition cost and depreciation start date, and it moves to **Active**. No money posts; you're recording something you have.
-- **Buy** one through purchasing — a purchase-order line of type *Fixed Asset* that, when the receipt posts, debits the asset account, **adds** the cost to the asset, and flips it to **Active**.
+- **Buy** one through purchasing — a <Term id="purchase-order">purchase-order</Term> line of type *Fixed Asset* that, when the receipt posts, debits the asset account, **adds** the cost to the asset, and flips it to **Active**.
<Callout type="note">
The purchase-receipt path activates the asset and posts its acquisition entry **only when accounting is enabled** for the company. Cost is added cumulatively, so an asset can accrue value across several receipts; with accounting off, the line is received but the asset is left in Draft.
@@ -27,9 +27,9 @@ The purchase-receipt path activates the asset and posts its acquisition entry **
## Depreciating
-Depreciation runs as a **monthly batch you trigger** — there's no background poster. You create a run for a period, Carbon pulls every Active asset and computes each charge, you review it as a draft, then post: debit depreciation expense, credit accumulated depreciation. Carbon keeps a separate **tax** book too, including MACRS, when tax depreciation is enabled. When an asset's net book value reaches its residual, posting flips it to **Fully Depreciated**.
+<Term id="depreciation">Depreciation</Term> runs as a **monthly batch you trigger** — there's no background poster. You create a run for a period, Carbon pulls every Active asset and computes each charge, you review it as a draft, then post: debit depreciation expense, credit accumulated depreciation. Carbon keeps a separate **tax** book too, including <Term>MACRS</Term>, when tax depreciation is enabled. When an asset's <Term id="net-book-value">net book value</Term> reaches its residual, posting flips it to **Fully Depreciated**.
-Book depreciation follows the asset's method — straight line, declining balance, or units of production.
+Book depreciation follows the asset's method — <Term id="straight-line">straight line</Term>, <Term id="declining-balance">declining balance</Term>, or units of production.
## Selling vs. disposing
@@ -43,7 +43,7 @@ An Active or Fully Depreciated asset leaves the books two different ways:
| Money | Collected through the invoice, like any sale | Remaining book value booked as a loss |
<Callout type="warn">
-Selling and disposing are **not** two names for one thing. Selling hands the asset to the normal quote-to-cash flow at book value and leaves it on the books; disposing retires it directly as a write-off. Disposal today is scrapping at a loss — there's no proceeds-based gain calculation wired up.
+Selling and disposing are **not** two names for one thing. Selling hands the asset to the normal quote-to-cash flow at book value and leaves it on the books; disposing retires it directly as a write-off. <Term id="disposal">Disposal</Term> today is scrapping at a loss — there's no proceeds-based gain calculation wired up.
</Callout>
<Callout type="info">
diff --git a/apps/docs/content/docs/reference/inventory.mdx b/apps/docs/content/docs/reference/inventory.mdx
index 939e17befa..e5e98cfeae 100644
--- a/apps/docs/content/docs/reference/inventory.mdx
+++ b/apps/docs/content/docs/reference/inventory.mdx
@@ -11,7 +11,7 @@ A **location** is a site or warehouse. Within one, stock sits in **storage units
## On hand is a ledger
-The **item ledger** is the source of truth. On-hand is the sum of its signed movements — receipts and outputs add, sales and consumption subtract, transfers move between places. A cached per-location quantity exists for quick reads, but the ledger is what's authoritative.
+The **<Term id="item-ledger">item ledger</Term>** is the source of truth. On-hand is the sum of its signed movements — <Term id="receipt">receipts</Term> and outputs add, sales and consumption subtract, transfers move between places. A cached per-location quantity exists for quick reads, but the ledger is what's authoritative.
| Entry type | Effect |
| --- | --- |
@@ -30,7 +30,7 @@ On hand can go **negative**. Shipping, issuing to a job, and picking all post th
## Movements
-Two kinds of transfer move stock. A **warehouse transfer** moves it between locations, and is carried out as a shipment out of one and a receipt into the other. A **stock transfer** moves it within a single location, between storage units. A manual **adjustment** writes straight to the ledger as a positive or negative entry — or a *Set Quantity* that books the difference to a target.
+Two kinds of transfer move stock. A **warehouse transfer** moves it between locations, and is carried out as a <Term id="shipment">shipment</Term> out of one and a receipt into the other. A **stock transfer** moves it within a single location, between storage units. A manual **adjustment** writes straight to the ledger as a positive or negative entry — or a *Set Quantity* that books the difference to a target.
## Value
diff --git a/apps/docs/content/docs/reference/invoices.mdx b/apps/docs/content/docs/reference/invoices.mdx
index 85df5d6f36..fd5ed199de 100644
--- a/apps/docs/content/docs/reference/invoices.mdx
+++ b/apps/docs/content/docs/reference/invoices.mdx
@@ -7,10 +7,10 @@ An **invoice** records money owed. Carbon has two kinds that behave almost ident
## Where they come from
-A **sales invoice** is raised from a sales order, or from a **posted shipment** — billing on the order or billing on what actually shipped. A **purchase invoice** is raised from a purchase order, keeping the lines that still have something to bill. Either way the new invoice opens at **Draft**, fully editable, and links each line back to the order line it bills.
+A **sales invoice** is raised from a <Term id="sales-order">sales order</Term>, or from a **<Term id="shipment">posted shipment</Term>** — billing on the order or billing on what actually shipped. A **purchase invoice** is raised from a <Term id="purchase-order">purchase order</Term>, keeping the lines that still have something to bill. Either way the new invoice opens at **Draft**, fully editable, and links each line back to the order line it bills.
<Callout type="note">
-A purchase invoice reconciles on the **purchase order line**, not on a receipt — there's no direct receipt link, and a receipt isn't even required to bill. Posting clears the goods-received-not-invoiced accrual against the shared order line and books any price difference to variance.
+A purchase invoice reconciles on the **purchase order line**, not on a <Term id="receipt">receipt</Term> — there's no direct receipt link, and a receipt isn't even required to bill. Posting clears the <Term id="gr-ir">goods-received-not-invoiced</Term> accrual against the shared order line and books any price difference to <Term id="purchase-price-variance">variance</Term>.
</Callout>
## Status lifecycle
@@ -30,7 +30,7 @@ The posted state has a different name on each side — **Submitted** for sales,
## Posting
-Posting an invoice writes its general-ledger entries — receivables against sales for a sale, payables against inventory or WIP for a purchase — but only when accounting is enabled for the company. Posting also bumps the invoiced quantity on each order line and stamps the posting date.
+<Term id="posting">Posting</Term> an invoice writes its general-ledger entries — receivables against sales for a sale, payables against inventory or WIP for a purchase — but only when accounting is enabled for the company. Posting also bumps the invoiced quantity on each order line and stamps the posting date.
<Callout type="warn">
Posting never marks an invoice **Paid** — it lands on **Submitted** or **Open**. Recording payment is a separate, deliberate step. A posted invoice can't be deleted either; to undo one you **void** it, which writes reversing entries rather than erasing history.
diff --git a/apps/docs/content/docs/reference/items.mdx b/apps/docs/content/docs/reference/items.mdx
index 3d2062b48c..05373713a8 100644
--- a/apps/docs/content/docs/reference/items.mdx
+++ b/apps/docs/content/docs/reference/items.mdx
@@ -3,9 +3,9 @@ title: Items
description: The master record for everything you make, buy, or stock — parts, materials, tools, and more.
---
-An **item** is the master record for anything Carbon tracks: a finished part, a raw material, a tool, a consumable. Orders, methods, jobs, and inventory all point back to it. Its human-facing **part number** is the readable id — the underlying id is an internal key you rarely see.
+An **item** is the master record for anything Carbon tracks: a finished part, a raw material, a tool, a consumable. Orders, <Term id="method">methods</Term>, <Term id="job">jobs</Term>, and inventory all point back to it. Its human-facing **part number** is the readable id — the underlying id is an internal key you rarely see.
-An item's type, how it's replenished, and how it's tracked decide how it behaves everywhere downstream — whether it can be made or only bought, whether stock is counted, whether each unit needs a serial. Get the item right and the rest of the system follows.
+An item's type, how it's replenished, and how it's tracked decide how it behaves everywhere downstream — whether it can be made or only bought, whether stock is counted, whether each unit needs a <Term id="serial">serial</Term>. Get the item right and the rest of the system follows.
## Fields
@@ -20,19 +20,19 @@ An item's type, how it's replenished, and how it's tracked decide how it behaves
| Active | boolean | Whether it can be used on new documents. |
<Callout type="note">
-**Replenishment system** is the high-level strategy; **default method type** is the line-level default it allows. A *Buy* item defaults to purchasing; a *Make* item can be built to order or pulled from stock. The two are related but distinct.
+**<Term>Replenishment system</Term>** is the high-level strategy; **<Term id="method-type">default method type</Term>** is the line-level default it allows. A *Buy* item defaults to purchasing; a *Make* item can be built to order or pulled from stock. The two are related but distinct.
</Callout>
## Tracking
-The tracking type sets how units are counted. *Inventory* items are quantity-tracked stock; *Non-Inventory* items aren't counted; *Serial* items carry one record per unit; *Batch* items are lot-tracked with their own batch numbers and dates.
+The tracking type sets how units are counted. *Inventory* items are quantity-tracked stock; *Non-Inventory* items aren't counted; *Serial* items carry one record per unit; *<Term id="batch">Batch</Term>* items are lot-tracked with their own batch numbers and dates.
## Revisions
Each revision of a part is its **own item record**, sharing the same part number but a different revision. A design change creates a new revision rather than rewriting the old one, so jobs built against an earlier revision keep their history.
<Callout type="info">
-An item's costing method — *Standard*, *Average*, *FIFO*, or *LIFO* — lives on its cost record, not the item itself, and decides how consumption is valued.
+An item's <Term>costing method</Term> — *Standard*, *Average*, *FIFO*, or *LIFO* — lives on its cost record, not the item itself, and decides how consumption is valued.
</Callout>
## Related
diff --git a/apps/docs/content/docs/reference/jobs.mdx b/apps/docs/content/docs/reference/jobs.mdx
index 86c896920f..bd74afb500 100644
--- a/apps/docs/content/docs/reference/jobs.mdx
+++ b/apps/docs/content/docs/reference/jobs.mdx
@@ -3,9 +3,9 @@ title: Jobs
description: One run of production — a single item, a quantity to make, and its own copy of the method.
---
-A **job** is the unit of production work in Carbon. It pins down one item, how many to make, where, and by when — and carries its own copy of the manufacturing method (the materials and operations) so the floor always builds from a fixed recipe, even as the part master changes underneath it.
+A **job** is the unit of production work in Carbon. It pins down one item, how many to make, where, and by when — and carries its own copy of the <Term id="method">manufacturing method</Term> (the materials and operations) so the floor always builds from a fixed recipe, even as the part master changes underneath it.
-Everything on the shop floor hangs off a job: the schedule board places its operations, material is issued against it, time is logged to it, and cost accumulates into its work-in-process. A sales order line that's made to order becomes a job; planning turns a stock shortfall into one. It's the bridge between demand and the floor.
+Everything on the shop floor hangs off a job: the schedule board places its operations, material is <Term id="material-issue">issued</Term> against it, time is logged to it, and cost accumulates into its <Term id="wip">work-in-process</Term>. A <Term id="sales-order">sales order</Term> line that's made to order becomes a job; planning turns a stock shortfall into one. It's the bridge between demand and the floor.
## Fields
@@ -41,7 +41,7 @@ A **Completed**, **Closed**, or **Cancelled** job is locked — its method, quan
## Make to order vs. make to stock
-A job is identical whichever way it's raised — only its source differs. A **make-to-order** job links back to a sales order line; a **make-to-stock** job comes from planning with no order behind it. Either way the job completes into inventory first, and the sale (if any) ships from stock — the job never ships directly to a customer.
+A job is identical whichever way it's raised — only its source differs. A **<Term id="make-to-order">make-to-order</Term>** job links back to a sales order line; a **make-to-stock** job comes from <Term id="mrp">planning</Term> with no order behind it. Either way the job completes into inventory first, and the sale (if any) ships from stock — the job never ships directly to a customer.
<Callout type="note">
Releasing a job copies the part's method into a job-specific copy. Editing that copy never touches the part master, and updating the part never disturbs a job already in flight.
diff --git a/apps/docs/content/docs/reference/maintenance.mdx b/apps/docs/content/docs/reference/maintenance.mdx
index d9eadd4823..9cb5aa534d 100644
--- a/apps/docs/content/docs/reference/maintenance.mdx
+++ b/apps/docs/content/docs/reference/maintenance.mdx
@@ -3,7 +3,7 @@ title: Maintenance
description: Keeping work centers running — reactive and preventive maintenance dispatches.
---
-Maintenance in Carbon keeps the machines on the floor running. The unit of work is a **dispatch** — a work-order-like record raised against a **work center**, either reactively when something breaks or on a recurring preventive schedule. Execution happens on the floor in MES; authoring and reporting live in the back office under Resources.
+Maintenance in Carbon keeps the machines on the floor running. The unit of work is a **dispatch** — a work-order-like record raised against a **<Term>work center</Term>**, either reactively when something breaks or on a recurring preventive schedule. Execution happens on the floor in MES; authoring and reporting live in the back office under Resources.
## Dispatches
@@ -17,14 +17,14 @@ A **maintenance dispatch** is one job of upkeep: what's wrong, which work center
| Completed | Done — any running time entries are closed automatically. |
| Cancelled | Dropped without completing. |
-Every dispatch carries a **priority** (Low, Medium, High, Critical) and a **source** that says where it came from: **Reactive** (a breakdown — the default), **Scheduled** (generated from a preventive schedule), or **Non-Conformance** (raised from a quality issue). Time is tracked as events against the dispatch, and parts as dispatch items.
+Every dispatch carries a **priority** (Low, Medium, High, Critical) and a **source** that says where it came from: **Reactive** (a breakdown — the default), **Scheduled** (generated from a preventive schedule), or **Non-Conformance** (raised from a <Term id="nonconformance">quality issue</Term>). Time is tracked as events against the dispatch, and parts as dispatch items.
## What it's against
A dispatch is attached to a **work center** and its location — the machine being maintained.
<Callout type="note">
-Maintenance targets a **work center**, not a fixed asset or an equipment record. The same physical machine may also be a depreciable fixed asset, but Carbon keeps those independent — maintenance is about keeping the *production resource* available, not about the asset's book value.
+Maintenance targets a **work center**, not a <Term id="fixed-asset">fixed asset</Term> or an equipment record. The same physical machine may also be a depreciable fixed asset, but Carbon keeps those independent — maintenance is about keeping the *production resource* available, not about the asset's book value.
</Callout>
## Preventive schedules
@@ -41,7 +41,7 @@ A dispatch marked **Down** or **Planned** blocks its work center: on the floor,
## Material and cost
-Parts used in maintenance are issued from inventory, drawing stock down through the item ledger as a *Maintenance Consumption* movement.
+Parts used in maintenance are issued from inventory, drawing stock down through the <Term id="item-ledger">item ledger</Term> as a *Maintenance Consumption* movement.
<Callout type="info">
Maintenance material is an **inventory movement only** — it posts to the item ledger but writes **no** general-ledger entry, regardless of whether accounting is enabled. It reduces what's on hand; it doesn't hit the books.
diff --git a/apps/docs/content/docs/reference/methods.mdx b/apps/docs/content/docs/reference/methods.mdx
index 3d46beabf2..eefbcd69e9 100644
--- a/apps/docs/content/docs/reference/methods.mdx
+++ b/apps/docs/content/docs/reference/methods.mdx
@@ -27,7 +27,7 @@ method that references the part — draft methods only; active and archived meth
These are two different questions, and Carbon keeps them separate:
-- **Method type** answers *how does this part get into its parent?* — Make to Order, Purchase to Order, or Pull from Inventory.
+- **Method type** answers *how does this part get into its parent?* — <Term>Make to Order</Term>, <Term>Purchase to Order</Term>, or <Term>Pull from Inventory</Term>.
- **Replenishment system** answers *how is this part replenished overall, and which planning queue does it
land in?* — `Buy`, `Make`, or `Buy and Make`.
diff --git a/apps/docs/content/docs/reference/planning.mdx b/apps/docs/content/docs/reference/planning.mdx
index 370ca5d534..585c7ef44b 100644
--- a/apps/docs/content/docs/reference/planning.mdx
+++ b/apps/docs/content/docs/reference/planning.mdx
@@ -3,16 +3,16 @@ title: Planning (MRP)
description: How demand turns into suggested jobs and purchase orders — and where that ends and scheduling begins.
---
-Planning answers one question: *what should we make or buy, and how much?* Carbon's MRP looks at everything you owe and everything you have coming, and turns the gap into suggested orders — which you choose to act on.
+Planning answers one question: *what should we make or buy, and how much?* Carbon's <Term>MRP</Term> looks at everything you owe and everything you have coming, and turns the gap into suggested orders — which you choose to act on.
-Without planning you'd reorder by hand. MRP nets demand against supply across the whole bill of materials, so a shortfall on a top-level robot surfaces as the right quantity of every component, offset for its lead time — before you're caught short.
+Without planning you'd reorder by hand. MRP nets demand against supply across the whole <Term id="bom">bill of materials</Term>, so a shortfall on a top-level robot surfaces as the right quantity of every component, offset for its <Term>lead time</Term> — before you're caught short.
## Two stages
Planning runs in two distinct passes, and conflating them is the usual mistake:
-1. **MRP — explode and net.** The engine explodes demand through bills of material, nets it against on-hand plus open jobs and purchase orders, and writes period-bucketed demand and supply forecasts. It does **not** apply reorder points and does **not** create orders.
-2. **Planning views — suggest a quantity.** The production and purchasing planning pages read those forecasts, project running stock week by week, and apply each item's **reorder policy** to propose a quantity to order.
+1. **MRP — explode and net.** The engine explodes demand through bills of material, nets it against on-hand plus open jobs and purchase orders, and writes period-bucketed demand and supply forecasts. It does **not** apply <Term id="reorder-point">reorder points</Term> and does **not** create orders.
+2. **Planning views — suggest a quantity.** The production and purchasing planning pages read those forecasts, project running stock week by week, and apply each item's **<Term id="reordering-policy">reorder policy</Term>** to propose a quantity to order.
<Callout type="note">
MRP **suggests, it never auto-orders.** The engine only writes forecasts; turning a suggestion into a real job or PO is an explicit action you take on the planning page.
@@ -34,7 +34,7 @@ Each item, per location, carries a **reordering policy** that decides how a sugg
## From suggestion to order
-An item's **replenishment system** routes where its shortfall shows up: *Make* items surface on the production planning page as suggested jobs, *Buy* items on the purchasing page as suggested POs. Choosing **Order** creates a real job or purchase order at status **"Planned"** — persisted from planning, but not yet released into the normal lifecycle.
+An item's **<Term>replenishment system</Term>** routes where its shortfall shows up: *Make* items surface on the production planning page as suggested <Term id="job">jobs</Term>, *Buy* items on the purchasing page as suggested POs. Choosing **Order** creates a real job or purchase order at status **"Planned"** — persisted from planning, but not yet released into the normal lifecycle.
<Callout type="info">
**"Planned"** is a real, saved job or PO that came from a planning suggestion and is waiting to be released — distinct from a hand-started **"Draft"**.
@@ -42,7 +42,7 @@ An item's **replenishment system** routes where its shortfall shows up: *Make* i
## Planning vs scheduling
-Planning decides *what and how much*; **scheduling** decides *when and where*. Once a job exists, the scheduling engine places its operations onto work centers and computes their dates — it never changes quantities. The two are separate subsystems that meet at the job: planning finalizes it, scheduling sequences it onto the floor.
+Planning decides *what and how much*; **scheduling** decides *when and where*. Once a job exists, the scheduling engine places its <Term id="operation">operations</Term> onto <Term id="work-center">work centers</Term> and computes their dates — it never changes quantities. The two are separate subsystems that meet at the job: planning finalizes it, scheduling sequences it onto the floor.
## Related
diff --git a/apps/docs/content/docs/reference/purchase-orders.mdx b/apps/docs/content/docs/reference/purchase-orders.mdx
index b35ff15628..56a7c6dcd1 100644
--- a/apps/docs/content/docs/reference/purchase-orders.mdx
+++ b/apps/docs/content/docs/reference/purchase-orders.mdx
@@ -3,9 +3,9 @@ title: Purchase orders
description: A commitment to a supplier — what to receive, and what you'll be billed for.
---
-A **purchase order** is a commitment to buy from a supplier. It may come from comparing supplier quotes or be raised directly, and it's the document receipts and supplier invoices reconcile against.
+A **purchase order** is a commitment to buy from a supplier. It may come from comparing <Term id="supplier-quote">supplier quotes</Term> or be raised directly, and it's the document <Term id="receipt">receipts</Term> and <Term id="invoice">supplier invoices</Term> reconcile against.
-Like a sales order in reverse, a purchase order line keeps two independent counters — how much has been received, and how much has been invoiced — and only closes when both are satisfied. Receiving and billing advance the same order along separate axes.
+Like a <Term id="sales-order">sales order</Term> in reverse, a purchase order line keeps two independent counters — how much has been received, and how much has been invoiced — and only closes when both are satisfied. Receiving and billing advance the same order along separate axes.
## Line fields
@@ -19,7 +19,7 @@ Like a sales order in reverse, a purchase order line keeps two independent count
## Types
-A purchase order is one of three kinds: a plain **Purchase**, a **Return** to the supplier, or **Outside Processing** — sending parts out to a vendor for a production step, where the line links to a job operation.
+A purchase order is one of three kinds: a plain **Purchase**, a **Return** to the supplier, or **<Term id="outside-operation">Outside Processing</Term>** — sending parts out to a vendor for a production step, where the line links to a job operation.
## Status
diff --git a/apps/docs/content/docs/reference/quality.mdx b/apps/docs/content/docs/reference/quality.mdx
index 2a3a79d9b9..0b8c5d9a37 100644
--- a/apps/docs/content/docs/reference/quality.mdx
+++ b/apps/docs/content/docs/reference/quality.mdx
@@ -3,7 +3,7 @@ title: Quality
description: Issues and corrective-action workflows, plus incoming inspection that gates received goods.
---
-Carbon's quality module turns on two things: **issues** you raise against a defect and drive to closure, and **inbound inspection** that holds received goods until they're checked. Both leave a trail back to the document that went wrong.
+Carbon's quality module turns on two things: **<Term id="nonconformance">issues</Term>** you raise against a defect and drive to closure, and **inbound inspection** that holds received goods until they're checked. Both leave a trail back to the document that went wrong.
## Issues
@@ -13,7 +13,7 @@ Issues open from several places: by hand, from the shop floor in MES, from Slack
### Workflows and actions
-An issue can run a configurable workflow — often an **8D**. The workflow attaches **required actions** and **approvals** as tasks; each task advances *Pending → In Progress → Completed* as the team works it. Adding a **Material Review Board** approval gates closing the issue: it can't close until a **disposition** is chosen for the affected material — *Return to Supplier*, *Rework*, *Scrap*, or *Use As Is*.
+An issue can run a configurable workflow — often an **<Term id="8d">8D</Term>**. The workflow attaches **required actions** and **approvals** as tasks; each task advances *Pending → In Progress → Completed* as the team works it. Adding a **Material Review Board** approval gates closing the issue: it can't close until a **disposition** is chosen for the affected material — *Return to Supplier*, *<Term>Rework</Term>*, *<Term>Scrap</Term>*, or *Use As Is*.
<Callout type="note">
There's no dedicated supplier scorecard in Carbon — **supplier quality is a derived metric**, counted from the issues linked to each supplier. The data comes from the issues themselves, not a separate record.
diff --git a/apps/docs/content/docs/reference/quotes.mdx b/apps/docs/content/docs/reference/quotes.mdx
index 65f14697df..e416780c5d 100644
--- a/apps/docs/content/docs/reference/quotes.mdx
+++ b/apps/docs/content/docs/reference/quotes.mdx
@@ -3,9 +3,9 @@ title: Quotes
description: A priced offer to a customer — the front of the sales flow.
---
-A **quote** is a priced offer to a customer: the line items they asked about, what each costs, and for how long. It's where a sale begins, before there's any commitment to build or ship. Accept it and it becomes a sales order; let it lapse and it closes on its own.
+A **quote** is a priced offer to a customer: the line items they asked about, what each costs, and for how long. It's where a sale begins, before there's any commitment to build or ship. Accept it and it becomes a <Term id="sales-order">sales order</Term>; let it lapse and it closes on its own.
-A quote is where pricing is negotiated and recorded. Lines support quantity breaks, so the price for ten can differ from the price for a hundred, and the number you settle on is what carries forward to the order. Quotes are optional — an order can be raised directly — but when used, a quote and its eventual order are tied together through a shared opportunity rather than a rigid link.
+A quote is where pricing is negotiated and recorded. Lines support quantity breaks, so the price for ten can differ from the price for a hundred, and the number you settle on is what carries forward to the order. Quotes are optional — an order can be raised directly — but when used, a quote and its eventual order are tied together through a shared <Term>opportunity</Term> rather than a rigid link.
## Fields
@@ -44,7 +44,7 @@ Digital acceptance is gated: the quote must be **Sent** and the company must hav
Converting a quote — internally, or by the customer accepting — builds a sales order from its lines at the negotiated price and opens it at **To Ship and Invoice**. The quote itself flips to **Ordered**, or **Partial** if only some lines converted.
<Callout type="info">
-There's no path from a quote straight to a production job. A job is raised from a *sales order* line, so the sequence is always quote → order → job.
+There's no path from a quote straight to a production job. A <Term id="job">job</Term> is raised from a *sales order* line, so the sequence is always quote → order → job.
</Callout>
## Related
diff --git a/apps/docs/content/docs/reference/receipts.mdx b/apps/docs/content/docs/reference/receipts.mdx
index 5ac7f22a93..bb1422545c 100644
--- a/apps/docs/content/docs/reference/receipts.mdx
+++ b/apps/docs/content/docs/reference/receipts.mdx
@@ -3,9 +3,9 @@ title: Receipts
description: Goods coming in — receiving against a purchase order and posting to inventory.
---
-A **receipt** brings goods in. Like shipments, one receipt model serves several sources — most often a purchase order, but also inbound transfers — and posting is what turns a delivery into stock on hand.
+A **receipt** brings goods in. Like <Term id="shipment">shipments</Term>, one receipt model serves several sources — most often a <Term id="purchase-order">purchase order</Term>, but also inbound transfers — and <Term id="posting">posting</Term> is what turns a delivery into stock on hand.
-A receipt line soft-links back to the purchase order line it fulfills. Posting adds the quantity to inventory, raises the order line's received quantity, and advances the order — and, when accounting is enabled, debits inventory (or work-in-process, for outside processing) against a goods-received-not-invoiced accrual that the supplier invoice later clears.
+A receipt line soft-links back to the purchase order line it fulfills. Posting adds the quantity to inventory, raises the order line's received quantity, and advances the order — and, when accounting is enabled, debits inventory (or <Term id="wip">work-in-process</Term>, for outside processing) against a <Term id="gr-ir">goods-received-not-invoiced</Term> accrual that the supplier invoice later clears.
## Fields
diff --git a/apps/docs/content/docs/reference/reordering.mdx b/apps/docs/content/docs/reference/reordering.mdx
index 8ddf3f9d32..24f2153382 100644
--- a/apps/docs/content/docs/reference/reordering.mdx
+++ b/apps/docs/content/docs/reference/reordering.mdx
@@ -4,7 +4,7 @@ description: How each part decides when and how much to replenish — the policy
---
Every part carries a **reordering policy** that tells planning how to replenish it. The policy decides
-*when and how much*; the **replenishment system** decides whether that becomes a purchase order or a job.
+*when and how much*; the **<Term>replenishment system</Term>** decides whether that becomes a <Term id="purchase-order">purchase order</Term> or a <Term id="job">job</Term>.
## Policies
diff --git a/apps/docs/content/docs/reference/routings.mdx b/apps/docs/content/docs/reference/routings.mdx
index c8e153de13..d226b96e7b 100644
--- a/apps/docs/content/docs/reference/routings.mdx
+++ b/apps/docs/content/docs/reference/routings.mdx
@@ -3,11 +3,11 @@ title: Routings
description: The ordered operations and work centers a part flows through to get made.
---
-A **routing** is the recipe the shop floor follows to make a part: the ordered list of operations and
-the work center each one runs on. It's what turns "we have an order" into "here's exactly what happens,
+A **routing** is the recipe the shop floor follows to make a part: the ordered list of <Term id="operation">operations</Term> and
+the <Term>work center</Term> each one runs on. It's what turns "we have an order" into "here's exactly what happens,
in what order, where."
-Without a routing, a job can't be scheduled or costed — there's nothing to place on the board and
+Without a routing, a <Term id="job">job</Term> can't be scheduled or costed — there's nothing to place on the board and
nothing to estimate run time from. The routing is the bridge between *what* you're making (the item) and
*how* it gets made (the schedule).
diff --git a/apps/docs/content/docs/reference/sales-orders.mdx b/apps/docs/content/docs/reference/sales-orders.mdx
index 46da99246c..9f1ad65286 100644
--- a/apps/docs/content/docs/reference/sales-orders.mdx
+++ b/apps/docs/content/docs/reference/sales-orders.mdx
@@ -3,7 +3,7 @@ title: Sales orders
description: A confirmed customer commitment — what to ship and invoice, tracked line by line.
---
-A **sales order** is a confirmed commitment to deliver items to a customer. It may begin as a quote, or be entered directly; either way it's the document the rest of fulfillment keys off — shipments, invoices, and any make-to-order jobs all trace back to its lines.
+A **sales order** is a confirmed commitment to deliver items to a customer. It may begin as a <Term>quote</Term>, or be entered directly; either way it's the document the rest of fulfillment keys off — <Term id="shipment">shipments</Term>, <Term id="invoice">invoices</Term>, and any make-to-order jobs all trace back to its lines.
The order line is where fulfillment is scored. Each line tracks how much was sold against how much has shipped and how much has been invoiced, and it stays open until both are complete — which is what lets one order be delivered and billed in batches without losing the remainder.
@@ -33,7 +33,7 @@ The stored status reflects what's outstanding, and the order list shows a comput
| Closed / Cancelled | Ended early or abandoned. |
<Callout type="note">
-The order list can read **In Progress** even while the stored status is *To Ship and Invoice* — that's the display status reflecting a make-to-order line whose jobs aren't finished yet. The stored status still drives the flow.
+The order list can read **In Progress** even while the stored status is *To Ship and Invoice* — that's the display status reflecting a <Term id="make-to-order">make-to-order</Term> line whose jobs aren't finished yet. The stored status still drives the flow.
</Callout>
## Related
diff --git a/apps/docs/content/docs/reference/shelf-life.mdx b/apps/docs/content/docs/reference/shelf-life.mdx
index 2e5069a12a..a1ebf8aaf3 100644
--- a/apps/docs/content/docs/reference/shelf-life.mdx
+++ b/apps/docs/content/docs/reference/shelf-life.mdx
@@ -4,8 +4,8 @@ description: How Carbon stamps expiration dates on tracked stock — and blocks
---
**Shelf life** is how Carbon decides when a batch or serial of an item *expires*, and what happens when
-someone tries to use it after that. It only applies to **Serial-** or **Batch-tracked** items, because the
-expiration date lives on the physical lot — the **tracked entity** — not on the item master.
+someone tries to use it after that. It only applies to **<Term id="serial">Serial-</Term>** or **<Term id="batch">Batch-tracked</Term>** items, because the
+expiration date lives on the physical lot — the **<Term id="tracked-entity">tracked entity</Term>** — not on the item master.
Three records work together: a **policy** per item (how expiry is decided), an **expiration date** per
tracked entity (the actual date), and a **company-wide rule** for what to do with expired stock.
@@ -79,7 +79,7 @@ wherever stock is consumed or moved — material issues, stock transfers, and ma
whether the action comes from the office or the floor.
</Callout>
-Picking is **FEFO-aware**: available tracked entities are offered earliest-expiry-first, so the oldest stock
+Picking is **<Term id="fefo">FEFO</Term>-aware**: available tracked entities are offered earliest-expiry-first, so the oldest stock
leaves first by default. A **near-expiry warning** highlights batches approaching their date in the tracked-entity
lists; set its lead time (in days) in company settings — leaving it blank turns the warning badges off.
diff --git a/apps/docs/content/docs/reference/shipments.mdx b/apps/docs/content/docs/reference/shipments.mdx
index 2fea1c658a..b971d17ddd 100644
--- a/apps/docs/content/docs/reference/shipments.mdx
+++ b/apps/docs/content/docs/reference/shipments.mdx
@@ -3,9 +3,9 @@ title: Shipments
description: Goods going out — one posting model serving sales orders, returns, and transfers.
---
-A **shipment** moves goods out the door. One shipment model serves several source documents — a sales order, a purchase return, an outbound transfer — each tagged by what it came from, so the same posting logic handles them all.
+A **shipment** moves goods out the door. One shipment model serves several source documents — a <Term id="sales-order">sales order</Term>, a purchase return, an outbound transfer — each tagged by what it came from, so the same posting logic handles them all.
-Creating a shipment changes nothing on hand. **Posting** it is the event that matters: it relieves inventory, advances the source document, and — when accounting is enabled — books the cost of what left. A shipment can be partial, so an order can go out in several.
+Creating a shipment changes nothing on hand. **<Term id="posting">Posting</Term>** it is the event that matters: it relieves inventory, advances the source document, and — when accounting is enabled — books the cost of what left. A shipment can be partial, so an order can go out in several.
## Fields
@@ -25,7 +25,7 @@ Creating a shipment changes nothing on hand. **Posting** it is the event that ma
| Voided | Reversed after posting. |
<Callout type="info">
-Posting decrements inventory and bumps the source line's sent quantity; a sales order line's *sent complete* flag flips only once the cumulative shipped quantity reaches the ordered quantity. Posting a shipment does **not** create the invoice — billing is a separate step.
+Posting decrements inventory and bumps the source line's sent quantity; a sales order line's *sent complete* flag flips only once the cumulative shipped quantity reaches the ordered quantity. Posting a shipment does **not** create the <Term id="invoice">invoice</Term> — billing is a separate step.
</Callout>
## Related
diff --git a/apps/docs/content/docs/reference/storage-rules.mdx b/apps/docs/content/docs/reference/storage-rules.mdx
index 37b0a392af..d2f03bece8 100644
--- a/apps/docs/content/docs/reference/storage-rules.mdx
+++ b/apps/docs/content/docs/reference/storage-rules.mdx
@@ -6,10 +6,10 @@ description: Predicate guards that validate inventory transactions — block wit
A **storage rule** is a guard that runs when an inventory transaction posts. It checks the line against a
condition you define and, if the condition fails, either **blocks** the transaction or **warns** and lets the
-user acknowledge and continue. Rules attach to **items** or to **work centers**.
+user acknowledge and continue. Rules attach to **items** or to **<Term id="work-center">work centers</Term>**.
For example, to keep batch chemicals out of ambient bins: target **items** in your chemicals group, fire on
-**receipt** and **place** (put-away), and require `storageUnit.storageTypeId` `eq` your cold-storage type —
+**<Term>receipt</Term>** and **place** (put-away), and require `storageUnit.storageTypeId` `eq` your cold-storage type —
severity **error**, message `{item.id} must be stored in cold storage`. Receive that item into the wrong
bin and the post is stopped with exactly that message.
@@ -35,7 +35,7 @@ don't.
<Callout type="info">
Aside from the `isSet` / `isNotSet` checks, a condition pointing at a field that has **no value** fails as a
*"…is required"* violation — so the same rules double as presence checks (for instance, require a lot number
-before a shipment can post).
+before a <Term>shipment</Term> can post).
</Callout>
## Operators
diff --git a/apps/docs/content/docs/reference/suppliers-and-customers.mdx b/apps/docs/content/docs/reference/suppliers-and-customers.mdx
index d90a265931..0bcd813da7 100644
--- a/apps/docs/content/docs/reference/suppliers-and-customers.mdx
+++ b/apps/docs/content/docs/reference/suppliers-and-customers.mdx
@@ -7,7 +7,7 @@ description: The parties you buy from and sell to — and the ways their records
## Suppliers
-A supplier lives in purchasing and anchors the buy side — purchase orders, supplier quotes, and bills all reference it. Its **status** is a fixed set: *Active*, *Inactive*, *Pending*, *Rejected*. A supplier links to the items you buy through **supplier parts**, each carrying the supplier's own part number, a minimum order quantity, and a conversion factor from their pack to your stock unit.
+A supplier lives in purchasing and anchors the buy side — <Term id="purchase-order">purchase orders</Term>, <Term id="supplier-quote">supplier quotes</Term>, and bills all reference it. Its **status** is a fixed set: *Active*, *Inactive*, *Pending*, *Rejected*. A supplier links to the items you buy through **supplier parts**, each carrying the supplier's own part number, a minimum order quantity, and a <Term>conversion factor</Term> from their pack to your stock unit.
<Callout type="note">
A supplier part has **no lead time** — purchasing lead time is set per item, not per supplier-part. The supplier part is about identity and pack size, not delivery time.
@@ -15,7 +15,7 @@ A supplier part has **no lead time** — purchasing lead time is set per item, n
## Customers
-A customer lives in sales and anchors the sell side — quotes, orders, and invoices reference it. Unlike supplier status, **customer status is a configurable list** you define, not a fixed enum. Customers don't have a supplier-part analog; pricing instead comes from **price overrides** and **pricing rules**, which can target a whole customer type and stack with quantity breaks.
+A customer lives in sales and anchors the sell side — <Term id="quote">quotes</Term>, orders, and <Term id="invoice">invoices</Term> reference it. Unlike supplier status, **customer status is a configurable list** you define, not a fixed enum. Customers don't have a supplier-part analog; pricing instead comes from **price overrides** and **pricing rules**, which can target a whole customer type and stack with quantity breaks.
<Callout type="info">
The asymmetry to remember: **supplier status is a fixed four-value set; customer status is a company-configurable lookup.** Their type catalogs (supplier type, customer type) are both user-defined.
@@ -23,7 +23,7 @@ The asymmetry to remember: **supplier status is a fixed four-value set; customer
## What they share
-Both records carry the same satellite shape: **contacts**, **locations/addresses**, and **payment, shipping, and tax** defaults. Payment terms, currency, and tax settings live on those satellites — not on the core record. Both also have a human-readable id (`SUP…` / `CUS…`) on top of their internal key, and both can expose an external **portal**: suppliers respond to RFQs through a digital-quote link; customers track their orders through a customer portal.
+Both records carry the same satellite shape: **contacts**, **locations/addresses**, and **payment, shipping, and tax** defaults. Payment terms, currency, and tax settings live on those satellites — not on the core record. Both also have a human-readable id (`SUP…` / `CUS…`) on top of their internal key, and both can expose an external **portal**: suppliers respond to <Term id="rfq">RFQs</Term> through a digital-quote link; customers track their orders through a customer portal.
## Related
diff --git a/apps/docs/content/docs/reference/traceability.mdx b/apps/docs/content/docs/reference/traceability.mdx
index 4250758f8a..053bf26c1a 100644
--- a/apps/docs/content/docs/reference/traceability.mdx
+++ b/apps/docs/content/docs/reference/traceability.mdx
@@ -3,11 +3,11 @@ title: Traceability
description: Serial and batch tracking, and the genealogy that links what went into what.
---
-For items that need it, Carbon tracks individual units and lots as **tracked entities**, and records every consume-and-produce as it happens — so you can prove what went into a finished unit, and trace a suspect lot forward to everything it touched.
+For items that need it, Carbon tracks individual units and lots as **<Term id="tracked-entity">tracked entities</Term>**, and records every consume-and-produce as it happens — so you can prove what went into a finished unit, and trace a suspect lot forward to everything it touched.
## Tracked entities
-A **tracked entity** is a tracked quantity of an item. A **Serial** item gets one entity per unit (quantity 1); a **Batch** item gets one entity per lot. The serial or batch number, and where it came from, live on the entity's attributes. An entity carries a status as it moves:
+A **tracked entity** is a tracked quantity of an item. A **<Term id="serial">Serial</Term>** item gets one entity per unit (quantity 1); a **<Term id="batch">Batch</Term>** item gets one entity per lot. The serial or batch number, and where it came from, live on the entity's attributes. An entity carries a status as it moves:
| Status | Meaning |
| --- | --- |
@@ -23,7 +23,7 @@ Receiving a tracked item creates entities **On Hold**; posting the receipt relea
## Genealogy
-Every material event — consume, produce, split, ship — is recorded as an **activity** with **inputs** (what was consumed) and **outputs** (what was produced). Parent and child link through the activity, so the genealogy graph is built as work happens and walked later to trace a unit's ancestry or descendants. Consuming part of a batch records a **split**, linking the original lot to the consumed portion and the remainder.
+Every material event — consume, produce, split, ship — is recorded as an **activity** with **inputs** (what was consumed) and **outputs** (what was produced). Parent and child link through the activity, so the <Term>genealogy</Term> graph is built as work happens and walked later to trace a unit's ancestry or descendants. Consuming part of a batch records a **split**, linking the original lot to the consumed portion and the remainder.
<Callout type="note">
There are no separate serial-number or batch-number tables — one tracked-entity model represents both, and the number itself is an attribute. Genealogy isn't a stored parent pointer; it's reconstructed by walking the activity graph from a unit outward.
diff --git a/apps/docs/content/docs/reference/work-centers.mdx b/apps/docs/content/docs/reference/work-centers.mdx
index dfd5003aeb..44584e2999 100644
--- a/apps/docs/content/docs/reference/work-centers.mdx
+++ b/apps/docs/content/docs/reference/work-centers.mdx
@@ -3,9 +3,9 @@ title: Work centers
description: Where operations run — the stations and machines, their rates, and the processes they perform.
---
-A **work center** is a place on the floor where operations run — a station, a machine, a cell — tied to a location. It carries the rates used to cost and schedule work, and performs one or more **processes** (the capabilities, like *cut* or *weld*).
+A **work center** is a place on the floor where <Term id="operation">operations</Term> run — a station, a machine, a cell — tied to a location. It carries the rates used to cost and schedule work, and performs one or more **processes** (the capabilities, like *cut* or *weld*).
-Routing operations are scheduled onto work centers, and a work center's rates price the labor and machine time logged against it. It's the link between an operation in the abstract and a real place with a cost and a calendar.
+<Term id="routing">Routing</Term> operations are scheduled onto work centers, and a work center's rates price the labor and machine time logged against it. It's the link between an operation in the abstract and a real place with a cost and a calendar.
## Fields
@@ -21,7 +21,7 @@ Routing operations are scheduled onto work centers, and a work center's rates pr
## Processes
-A **process** is a capability a work center can perform; work centers and processes are many-to-many. A process is *Inside*, *Outside*, or both — **Outside** processes are subcontracted, and suppliers attach to them for outside-processing purchase orders.
+A **process** is a capability a work center can perform; work centers and processes are many-to-many. A process is *Inside*, *Outside*, or both — **<Term id="outside-operation">Outside</Term>** processes are subcontracted, and suppliers attach to them for outside-processing <Term id="purchase-order">purchase orders</Term>.
<Callout type="note">
A work center is **not** a fixed asset. The machine you schedule production on (a work center) and the machine you depreciate (a fixed asset) are independent records in Carbon — there's no link between them, even when they're the same physical machine.
diff --git a/apps/docs/content/guides/build.mdx b/apps/docs/content/guides/build.mdx
index c56560b15a..1e879e2130 100644
--- a/apps/docs/content/guides/build.mdx
+++ b/apps/docs/content/guides/build.mdx
@@ -11,24 +11,24 @@ Open the job you just released and look at what it actually takes to build a rob
## The bill of materials
-A robot's bill of materials (BoM) is a tree. The robot is built from an arm and a leg; each of those is built from a machined part and a motor. Carbon shows the whole structure at a glance, with every node carrying an icon for how it's obtained.
+A robot's <Term id="bom">bill of materials</Term> (BoM) is a tree. The robot is built from an arm and a leg; each of those is built from a machined part and a motor. Carbon shows the whole structure at a glance, with every node carrying an icon for how it's obtained.
<Figure illustration="bom-tree" caption="The robot BoM — made parts in blue, bought parts in amber, every leaf pulled from stock." />
## Method types
-Every item in that tree carries a method type, and it's the single most load-bearing field in your whole catalog. There are three values, and each one routes the item down a completely different path:
+Every item in that tree carries a <Term>method type</Term>, and it's the single most load-bearing field in your whole catalog. There are three values, and each one routes the item down a completely different path:
<Figure illustration="method-types" caption="One field, three values — Make to Order becomes a job, Purchase to Order a PO, Pull from Inventory a stock pull." />
-- Make to Order — you manufacture it. The arm part and leg part are machined in-house, so each becomes its own job with its own operations.
-- Purchase to Order — you purchase it. The motors come from a supplier, so they flow through [purchasing](/guides/rfq-to-po) as a purchase order, never touching the floor.
-- Pull from Inventory — you pull it from stock when the parent is built, whether you originally made it or bought it.
+- <Term>Make to Order</Term> — you manufacture it. The arm part and leg part are machined in-house, so each becomes its own <Term>job</Term> with its own operations.
+- <Term>Purchase to Order</Term> — you purchase it. The motors come from a supplier, so they flow through [purchasing](/guides/rfq-to-po) as a <Term>purchase order</Term>, never touching the floor.
+- <Term>Pull from Inventory</Term> — you pull it from stock when the parent is built, whether you originally made it or bought it.
-You don't tag this on each BoM line by hand. The method type lives on the item itself, and every BoM that uses that item mirrors it. Switch a part's method type once, and it cascades everywhere the part appears.
+You don't tag this on each BoM line by hand. The method type lives on [the item itself](/docs/reference/items), and every BoM that uses that item mirrors it. Switch a part's method type once, and it cascades everywhere the part appears.
<Callout tone="blue" badge="TWO DIFFERENT QUESTIONS" title="Method type and replenishment system aren't the same axis.">
-Method type answers "how does this part get into its parent?" — Make to Order, Purchase to Order, or Pull from Inventory. The replenishment system — Buy, Make, or Buy and Make — answers "how is this part stocked overall, and which planning queue does it land in?" A part can be made for one parent and pulled from stock for another.
+Method type answers "how does this part get into its parent?" — Make to Order, Purchase to Order, or Pull from Inventory. The <Term>replenishment system</Term> — Buy, Make, or Buy and Make — answers "how is this part stocked overall, and which planning queue does it land in?" A part can be made for one parent and pulled from stock for another.
</Callout>
## Kits & subassemblies
@@ -37,8 +37,8 @@ Because the arm and leg are Make to Order parts, they aren't just line items —
<Figure illustration="kit-vs-subassembly" caption="Same arm, two treatments — a Subassembly builds as its own job; a Kit is issued straight into the parent." />
-- Subassembly — built as its own job, with its own routing and its own completion. You can release the left arm independently of the final robot, and Carbon keeps the hierarchy in sync.
-- Kit — not built separately at all. Its components are issued together straight into the parent job, as a set. There's no kit job and no kit operation — just the parts, grouped.
+- <Term>Subassembly</Term> — built as its own job, with its own <Term>routing</Term> and its own completion. You can release the left arm independently of the final robot, and Carbon keeps the hierarchy in sync.
+- <Term>Kit</Term> — not built separately at all. Its components are issued together straight into the parent job, as a set. There's no kit job and no kit operation — just the parts, grouped.
Reach for a subassembly when the thing is genuinely manufactured and worth tracking on its own. Reach for a kit when a cluster of parts always goes in together and a separate build would just be ceremony.
diff --git a/apps/docs/content/guides/fixed-assets-acquire.mdx b/apps/docs/content/guides/fixed-assets-acquire.mdx
index 5041eb0577..bcc9382a16 100644
--- a/apps/docs/content/guides/fixed-assets-acquire.mdx
+++ b/apps/docs/content/guides/fixed-assets-acquire.mdx
@@ -8,12 +8,12 @@ flowName: Manufacturing accounting
flowIndex: 3
---
-Job costing followed the money a job spends. The books also carry the machines that do the building — Carbon tracks those as **fixed assets**: a press, a CNC, a forklift, anything you capitalize and depreciate rather than expense. These last two chapters follow one asset from the day it lands on the books to the day it leaves them.
+Job costing followed the money a job spends. The books also carry the machines that do the building — Carbon tracks those as **<Term id="fixed-asset">fixed assets</Term>**: a press, a CNC, a forklift, anything you capitalize and <Term id="depreciation">depreciate</Term> rather than expense. These last two chapters follow one asset from the day it lands on the books to the day it leaves them.
-A fixed asset is an accounting record, not a production resource. It belongs to an **asset class**, which carries the general-ledger accounts every asset of that kind posts to — the asset account, accumulated depreciation, depreciation expense, and the accounts used when it's written off.
+A fixed asset is an accounting record, not a production resource. It belongs to an **<Term>asset class</Term>**, which carries the general-ledger accounts every asset of that kind posts to — the asset account, accumulated depreciation, depreciation expense, and the accounts used when it's written off.
<Callout tone="amber" badge="ASSET ≠ WORK CENTER" title="A fixed asset is not the same record as a work center.">
-The machine you schedule production on is a work center; the machine you depreciate is a fixed asset. Carbon keeps these independent — there's no link between them — so the same physical press can be a work center on the floor and a fixed asset in the books without the two being wired together.
+The machine you schedule production on is a <Term>work center</Term>; the machine you depreciate is a fixed asset. Carbon keeps these independent — there's no link between them — so the same physical press can be a work center on the floor and a fixed asset in the books without the two being wired together.
</Callout>
## Onto the books
@@ -34,16 +34,18 @@ The purchase-receipt path posts the acquisition entry and the Draft → Active f
Once an asset is **"Active"**, it depreciates. Carbon runs depreciation as a **monthly batch you trigger** — there's no background job quietly posting in the night. You create a depreciation run for a period, Carbon pulls every active asset and computes each one's charge, and you review it as a **"Draft"** before posting.
-The book charge follows the asset's method — **straight line**, **declining balance**, or **units of production** — and posting the run debits depreciation expense and credits accumulated depreciation, period by period.
+The book charge follows the asset's method — **<Term>straight line</Term>**, **<Term>declining balance</Term>**, or **units of production** — and posting the run debits depreciation expense and credits accumulated depreciation, period by period.
+
+<Figure illustration="depreciation-curve" caption="Net book value falls from acquisition cost toward residual — straight line in equal steps, declining balance faster early." />
<Callout tone="neutral" badge="DRAFT THEN POST" title="Depreciation is computed at run time, reviewed, then posted.">
-Each run's amounts are calculated when you create it and held as a draft, so you can check the period's charges before they hit the ledger. When an asset's net book value reaches its residual value, posting flips it to **"Fully Depreciated"** and it stops accruing.
+Each run's amounts are calculated when you create it and held as a draft, so you can check the period's charges before they hit the ledger. When an asset's <Term>net book value</Term> reaches its <Term>residual value</Term>, posting flips it to **"Fully Depreciated"** and it stops accruing.
</Callout>
<Screenshot label="Depreciation run" caption="A monthly run: every active asset's charge, computed and held as a draft for review before posting." ratio="wide" />
## Two books at once
-The depreciation you report on the books and the depreciation you claim for tax rarely match, so Carbon keeps both. Every asset runs a **book** schedule and a separate **tax** schedule, each free to use its own method — the tax side including full **MACRS** with the IRS property-class tables. The two accumulate independently against the same asset.
+The depreciation you report on the books and the depreciation you claim for tax rarely match, so Carbon keeps both. Every asset runs a **book** schedule and a separate **tax** schedule, each free to use its own method — the tax side including full **<Term>MACRS</Term>** with the IRS property-class tables. The two accumulate independently against the same asset.
With tax depreciation enabled, posting a run can also book the **deferred tax** the gap between the two creates, so that timing difference shows up in the ledger as it happens rather than as a year-end surprise.
diff --git a/apps/docs/content/guides/fixed-assets-sell.mdx b/apps/docs/content/guides/fixed-assets-sell.mdx
index 3ba6def7d5..d04b02920a 100644
--- a/apps/docs/content/guides/fixed-assets-sell.mdx
+++ b/apps/docs/content/guides/fixed-assets-sell.mdx
@@ -8,13 +8,15 @@ flowName: Manufacturing accounting
flowIndex: 3
---
-Eventually an asset leaves the books. There are two ways out, and Carbon treats them as genuinely different actions — handled by different teams, with different effects. You **sell** an asset to a buyer, or you **dispose** of it when it's done. Both start from an asset that's **"Active"** or **"Fully Depreciated"**.
+Eventually an asset leaves the books. There are two ways out, and Carbon treats them as genuinely different actions — handled by different teams, with different effects. You **sell** an asset to a buyer, or you **<Term id="disposal">dispose</Term>** of it when it's done. Both start from an asset that's **"Active"** or **"Fully Depreciated"**.
-The number that anchors both is **net book value** — what the asset is still worth on the books: its acquisition cost minus the depreciation accumulated against it.
+The number that anchors both is **<Term>net book value</Term>** — what the asset is still worth on the books: its acquisition cost minus the <Term id="depreciation">depreciation</Term> accumulated against it.
+
+<Figure illustration="asset-exit" caption="Two ways an asset leaves the books — sold through a sales order at net book value, or disposed as a write-off." />
## Sell it
-Selling a piece of equipment is a sales act, so it lives with the sales team. The **Sell** action drafts a real **sales order** with a single **"Fixed Asset"** line pointed at the asset, priced at its **net book value**. From there it's the ordinary quote-to-cash flow — ship it, invoice it, collect — with the order line carrying a link back to the asset it came from.
+Selling a piece of equipment is a sales act, so it lives with the sales team. The **Sell** action drafts a real **<Term>sales order</Term>** with a single **"Fixed Asset"** line pointed at the asset, priced at its **net book value**. From there it's the ordinary quote-to-cash flow — ship it, invoice it, collect — with the order line carrying a link back to the asset it came from.
<Callout tone="blue" badge="SEEDS A SALES ORDER" title="Selling an asset hands it to quote-to-cash at book value.">
The Sell action doesn't invent a separate sale mechanism — it creates a normal sales order, lined up at net book value, that ships and invoices like any other. The fixed-asset line just remembers which asset was sold.
diff --git a/apps/docs/content/guides/floor.mdx b/apps/docs/content/guides/floor.mdx
index 25a0e65ed4..4d355f3346 100644
--- a/apps/docs/content/guides/floor.mdx
+++ b/apps/docs/content/guides/floor.mdx
@@ -5,7 +5,7 @@ label: "(IV)"
index: 3
---
-Time to build. You release the first production job — the first 30 robots — to the shop floor, along with the subassembly jobs for the parts that feed it. This is the handoff most shops fumble; in Carbon it's a single, traceable step.
+Time to build. You release the first <Term id="job">production job</Term> — the first 30 robots — to the shop floor, along with the <Term>subassembly</Term> jobs for the parts that feed it. This is the handoff most shops fumble; in Carbon it's a single, traceable step.
<Figure illustration="shopfloor-loop" caption="On the floor, every operation reports back: material consumed, labor logged, parts scanned." />
@@ -13,7 +13,7 @@ Time to build. You release the first production job — the first 30 robots —
The released work lands on the schedule — a board you arrange, not a Gantt chart you fight. Carbon gives you two views of it:
-- By work center — operations sit in columns, one per work center. Drag an operation to a different center, or reorder it within a column to set its priority. The only constraint is that the center can actually run that process.
+- By <Term>work center</Term> — <Term id="operation">operations</Term> sit in columns, one per work center. Drag an operation to a different center, or reorder it within a column to set its priority. The only constraint is that the center can actually run that process.
- By date — jobs sit in columns by week or month. Drag a job to a different week and Carbon reschedules it in the background.
<Figure illustration="schedule-board" caption="Two views of one schedule — operations by work center, jobs by week. Drag to rebalance either." />
@@ -26,12 +26,12 @@ Carbon lays every released operation where it belongs and lets you rebalance by
## Operations & work centers
-Open a job and its routing is an ordered list of operations. Each operation names a process — Mill, Deburr, Anodize, Assemble — and the work center that runs it, with separate setup, labor, and machine time so estimates and costs are honest about where the hours go.
+Open a job and its <Term>routing</Term> is an ordered list of operations. Each operation names a process — Mill, Deburr, Anodize, Assemble — and the work center that runs it, with separate setup, labor, and machine time so estimates and costs are honest about where the hours go.
Most operations run on your floor. But some don't, and Carbon plans for that explicitly:
- Inside operation — runs at one of your work centers, by your people.
-- Outside operation — performed by a supplier. Anodizing the arm part, say: the step leaves your floor, goes out, and comes back to finish its routing.
+- <Term>Outside operation</Term> — performed by a supplier. Anodizing the arm part, say: the step leaves your floor, goes out, and comes back to finish its routing.
<Figure illustration="outside-processing" caption="An outside step leaves the floor for a supplier and raises its own PO — then rejoins the routing." />
@@ -52,8 +52,8 @@ On the shop-floor view, an operator doesn't see a spreadsheet — they see rich
When the operator opens their operation on the MES, the controls feel physical — closer to a machine panel than a form. Everything they do here flows straight back to the job:
- Clock time with the Setup, Labor, and Machine toggles — each starts and stops a production event, so the operation's estimated hours meet the actual ones.
-- Issue Material to pull the operation's components onto the job as they're consumed.
-- Log Completed, Log Scrap with a reason, or Log Rework as pieces come off the operation.
+- <Term id="material-issue">Issue Material</Term> to pull the operation's components onto the job as they're consumed.
+- Log Completed, Log <Term>Scrap</Term> with a reason, or Log <Term>Rework</Term> as pieces come off the operation.
- Finish to close the operation — it ends every active production event in one move.
<Figure illustration="mes-station" caption="The operator's panel — Setup, Labor, and Machine time toggles, quantity logging, and Finish." />
@@ -69,7 +69,7 @@ Logged hours multiply by the work center's labor and machine rates; issued mater
Material leaves inventory two ways in Carbon, and the BoM decides which one applies to each component — so stock stays accurate without busywork:
- Issued — tracked material, like the serialized or batch-tracked motors, is issued to the operation (or picked to the line) so every unit is accounted for by its lot.
-- Backflushed — non-tracked material is pulled from stock automatically the moment the operation or job reports complete. No transactions, no keystrokes.
+- <Term id="backflush">Backflushed</Term> — non-tracked material is pulled from stock automatically the moment the operation or job reports complete. No transactions, no keystrokes.
<Callout tone="green" badge="BACKFLUSH" title="The everyday consumables update themselves as the floor builds.">
Flag a material to backflush and you never reconcile it by hand. The moment an operation reports complete, what it consumed is gone from stock and [its cost is on the job](/guides/job-costing) — while the parts that truly need tracing stay explicitly issued.
@@ -77,10 +77,10 @@ Flag a material to backflush and you never reconcile it by hand. The moment an o
## Scan & trace
-For parts that demand a paper trail, operators scan as they build. Under the hood, every physical thing — a serial, a batch, a lot — is a tracked entity. Scanning a child into the unit you're building records a tracked activity: the child is marked consumed, the unit is marked produced, and the link between them is permanent.
+For parts that demand a paper trail, operators scan as they build. Under the hood, every physical thing — a serial, a batch, a lot — is a <Term>tracked entity</Term>. Scanning a child into the unit you're building records a [tracked activity](/docs/reference/traceability): the child is marked consumed, the unit is marked produced, and the link between them is permanent.
<Callout tone="blue" badge="SERIAL vs BATCH" title="Two tracking modes, one genealogy.">
-Serialize what you track one-by-one — the finished robot, its arm, its leg. Batch-track what moves in lots — motors, fasteners, raw stock. Scan a serial into a batch and Carbon records the link, so the robot's record knows exactly which motor lot it carries.
+<Term id="serial">Serialize</Term> what you track one-by-one — the finished robot, its arm, its leg. <Term id="batch">Batch-track</Term> what moves in lots — motors, fasteners, raw stock. Scan a serial into a batch and Carbon records the link, so the robot's record knows exactly which motor lot it carries.
</Callout>
<Screenshot label="Shop-floor scan" caption="An operator scanning a motor lot into robot serial #0001 at the assembly station." ratio="wide" />
diff --git a/apps/docs/content/guides/job-costing.mdx b/apps/docs/content/guides/job-costing.mdx
index 706670949f..d0f7fac896 100644
--- a/apps/docs/content/guides/job-costing.mdx
+++ b/apps/docs/content/guides/job-costing.mdx
@@ -8,7 +8,7 @@ flowName: Manufacturing accounting
flowIndex: 3
---
-The [make-to-order tour](/guides/order) built robots. This flow follows the money those jobs spend. As a job is worked, Carbon accumulates its cost — materials consumed, labor and machine time — into work-in-process, then releases that cost into finished-goods inventory when the job completes. Every figure here is grounded in real ledger postings, so it's worth being precise about what posts, when, and to which account.
+The [make-to-order tour](/guides/order) built robots. This flow follows the money those jobs spend. As a job is worked, Carbon accumulates its cost — materials consumed, labor and machine time — into <Term id="wip">work-in-process</Term>, then releases that cost into finished-goods inventory when the job completes. Every figure here is grounded in real ledger postings, so it's worth being precise about what posts, when, and to which account.
## Accounting is a switch
@@ -22,9 +22,11 @@ Receiving, issuing, completing — the physical and status changes happen regard
As the job runs, cost flows **into** its work-in-process. Two streams feed it.
-**Material.** When a job consumes a part — issued to an operation, or backflushed at completion — Carbon moves that part's cost out of inventory and into WIP. The ledger entry is a debit to the work-in-process account and a credit to inventory, tagged *Job Consumption*.
+<Figure illustration="wip-inflow" caption="Two streams feed a job's WIP — material out of inventory, plus labor and machine time at the work center's rate." />
-**Labor and machine.** Every production event a worker or machine logs carries a duration. Carbon prices it — hours times the **work center's** labor or machine rate — and posts it in real time: a debit to WIP, a credit to a labor-absorption account, tagged *Production Event*. The rate comes from the work center, not from the operation's estimate.
+**Material.** When a job consumes a part — <Term id="material-issue">issued</Term> to an operation, or <Term id="backflush">backflushed</Term> at completion — Carbon moves that part's cost out of inventory and into WIP. The ledger entry is a debit to the work-in-process account and a credit to inventory, tagged *Job Consumption*.
+
+**Labor and machine.** Every production event a worker or machine logs carries a duration. Carbon prices it — hours times the **work center's** labor or machine rate — and posts it in real time: a debit to WIP, a credit to a labor-absorption account, tagged *Production Event*. The rate comes from the <Term>work center</Term>, not from the operation's estimate.
<Callout tone="blue" badge="NO OVERHEAD ABSORBED" title="WIP collects material, labor, and machine — not overhead.">
Only material and the labor/machine event rates post to WIP. Overhead rates exist on work centers and operations, but they drive estimating and quoting; Carbon does not absorb overhead into a job's actual cost. WIP is the sum of real material plus real time.
@@ -39,14 +41,14 @@ That material reaches WIP one of two ways, and the difference is *when*. **Issui
The posting is identical either way — cost out of inventory, into WIP — so the choice is about floor discipline, not accounting. Issue as you go when you need tight control over what's consumed; lean on backflush for the routine material you'd rather not hand-count.
<Callout tone="neutral" badge="SCRAP STAYS IN WIP" title="Scrapped material is consumed cost, too.">
-Scrap and rework are recorded as their own production quantities, but scrapping a tracked part posts the same consumption — out of inventory, into the job's WIP. There's no separate scrap account; the cost of what you ruined rides along in the job until it settles at close.
+<Term>Scrap</Term> and <Term>rework</Term> are recorded as their own production quantities, but scrapping a tracked part posts the same consumption — out of inventory, into the job's WIP. There's no separate scrap account; the cost of what you ruined rides along in the job until it settles at close.
</Callout>
## WIP isn't a table
-Here's the part most ERPs hide. In Carbon, work-in-process is not a column or a table you can read off a job. It's a **balance in the general ledger** — the sum of every posting against the work-in-process account that carries this job's id. A job's WIP is a query, not a field.
+Here's the part most ERPs hide. In Carbon, work-in-process is not a column or a table you can read off a job. It's a **balance in the [general ledger](/docs/reference/accounting)** — the sum of every posting against the work-in-process account that carries this job's id. A job's WIP is a query, not a field.
-The cost itself lives in the **cost ledger**, where each inbound entry opens a layer with a remaining quantity. How a consumed part is priced depends on the item's costing method — **FIFO** or **LIFO** walk the open layers, **Average** uses the running unit cost, **Standard** uses the standard cost. That choice changes the *amount* of the WIP entry, but the shape never changes: cost in from inventory, cost out to finished goods.
+The cost itself lives in the **cost ledger**, where each inbound entry opens a layer with a remaining quantity. How a consumed part is priced depends on the item's <Term>costing method</Term> — **FIFO** or **LIFO** walk the open layers, **Average** uses the running unit cost, **Standard** uses the standard cost. That choice changes the *amount* of the WIP entry, but the shape never changes: cost in from inventory, cost out to finished goods.
<Callout tone="neutral" badge="COST LAYERS" title="A layer is a cost-ledger row with quantity left on it.">
There is no separate cost-layer table — open layers are cost-ledger rows that still have remaining quantity. Consuming walks those layers by date for FIFO or LIFO; the costing method only decides which cost a consumption picks up, never whether WIP is tracked.
diff --git a/apps/docs/content/guides/job-finish-close.mdx b/apps/docs/content/guides/job-finish-close.mdx
index cd34e2cbdd..8546c95678 100644
--- a/apps/docs/content/guides/job-finish-close.mdx
+++ b/apps/docs/content/guides/job-finish-close.mdx
@@ -8,11 +8,13 @@ flowName: Manufacturing accounting
flowIndex: 3
---
-A job has been collecting cost in work-in-process. Three events turn that running balance into a settled set of books: the job **finishes** into inventory, the goods are **sold** out of inventory, and the job is **closed**. Each is a distinct posting, and the order matters.
+A <Term>job</Term> has been collecting cost in <Term id="wip">work-in-process</Term>. Three events turn that running balance into a settled set of books: the job **finishes** into inventory, the goods are **sold** out of inventory, and the job is **closed**. Each is a distinct posting, and the order matters.
+
+<Figure illustration="wip-to-cogs" caption="A job's WIP empties into inventory at finish, flows to COGS at the sale, and any residual sweeps to Production Variance at close." />
## Finish into inventory
-When the last operation is done, Carbon completes the job. It backflushes any material still owed, catches up any labor that hasn't posted yet, and then **receives the finished goods into inventory** — a debit to inventory, a credit to work-in-process, tagged *Job Receipt*. The job moves to **"Completed"**.
+When the last operation is done, Carbon completes the job. It <Term id="backflush">backflushes</Term> any material still owed, catches up any labor that hasn't posted yet, and then **receives the finished goods into inventory** — a debit to inventory, a credit to work-in-process, tagged *Job Receipt*. The job moves to **"Completed"**.
The receipt is valued at the job's **actual accumulated WIP cost** — whatever really went in. Carbon does not receive finished goods at standard and book a variance; the finished unit's cost is simply the sum of what the job spent.
@@ -24,7 +26,7 @@ Completion moves the whole WIP balance into inventory one-for-one — equal debi
## Make-to-order still goes through stock
-It's tempting to think a make-to-order job ships straight to the customer. It doesn't. A make-to-order job is marked by its link to a sales order line, but its costing is **identical** to a stock job: it receives into inventory first, and the sales order then ships *from inventory*. The job and the shipment are separate postings.
+It's tempting to think a make-to-order job ships straight to the customer. It doesn't. A make-to-order job is marked by its link to a <Term>sales order</Term> line, but its costing is **identical** to a stock job: it receives into inventory first, and the sales order then ships *from inventory*. The job and the shipment are separate postings.
<Callout tone="amber" badge="MTO = MTS, FOR COSTING" title="A make-to-order job receives to stock, then ships from stock.">
There is no path that ships finished goods directly off a job. Whether a job was raised for stock or for a specific order, it completes into inventory the same way — which keeps cost in one place and makes the sale a clean, separate event.
@@ -32,7 +34,7 @@ There is no path that ships finished goods directly off a job. Whether a job was
## Sell it
-When the order ships, the cost of those goods comes **out of inventory**, not out of WIP. Posting the shipment reads the inventory cost layers, prices what left, and posts a debit to cost of goods sold and a credit to inventory, tagged *Sales Shipment*. This is the same shipment posting the [quote-to-cash flow](/guides/order-to-cash) covers — here we're just watching the cost side of it.
+When the order ships, the cost of those goods comes **out of inventory**, not out of WIP. Posting the <Term>shipment</Term> reads the inventory cost layers, prices what left, and posts a debit to <Term id="cogs">cost of goods sold</Term> and a credit to inventory, tagged *Sales Shipment*. This is the same shipment posting the [quote-to-cash flow](/guides/order-to-cash) covers — here we're just watching the cost side of it.
By the time a unit is sold, its WIP is long gone — relieved at completion. COGS is always drawn from the inventory layer, so the sale's margin reflects the real landed cost of that specific stock.
diff --git a/apps/docs/content/guides/order-to-cash.mdx b/apps/docs/content/guides/order-to-cash.mdx
index a9527f3668..0601aeb603 100644
--- a/apps/docs/content/guides/order-to-cash.mdx
+++ b/apps/docs/content/guides/order-to-cash.mdx
@@ -8,7 +8,9 @@ flowName: Quote to cash
flowIndex: 1
---
-You have a sales order sitting at **"To Ship and Invoice"**. Cash is four moves away: fulfill the lines, post a shipment, raise an invoice, record payment. None of them auto-chain — each is a discrete, posted step you take when the work is actually ready.
+You have a <Term>sales order</Term> sitting at **"To Ship and Invoice"**. Cash is four moves away: fulfill the lines, post a <Term>shipment</Term>, raise an invoice, record payment. None of them auto-chain — each is a discrete, posted step you take when the work is actually ready.
+
+<Figure illustration="cash-cycle" caption="Four posted moves carry a confirmed order to recorded cash — and none of them auto-chains." />
## The line stays open
@@ -16,11 +18,11 @@ A sales order line keeps score. It tracks `saleQuantity` against `quantitySent`
## Three ways to fulfill a line
-The method type on each line decides where the goods come from:
+The <Term>method type</Term> on each line decides where the goods come from:
-- **Make to Order** raises a production job for the line — the [make-to-order tour](/guides/order) in full.
-- **Pull from Inventory** ships from stock you already hold — no job, just a pick.
-- **Purchase to Order** buys it in for this order; its **drop-ship** variant has the supplier ship straight to your customer, so the goods never touch your dock.
+- **<Term>Make to Order</Term>** raises a production <Term id="job">job</Term> for the line — the [make-to-order tour](/guides/order) in full.
+- **<Term>Pull from Inventory</Term>** ships from stock you already hold — no job, just a pick.
+- **<Term>Purchase to Order</Term>** buys it in for this order; its **<Term>drop-ship</Term>** variant has the supplier ship straight to your customer, so the goods never touch your dock.
However a line is sourced, every fulfillment resolves to one of two kinds — from **inventory** or from a **job** — and that's what the shipment posts against.
@@ -32,10 +34,10 @@ The sales order list computes a display status: while a make-to-order line still
Create a shipment against the order. One shipment table serves sales orders, purchase orders, and transfers alike, tagged here with a "Sales Order" source. It opens at **"Draft"**.
-Creating it changes nothing on hand — **posting** is the event that matters. Post the shipment and four things happen at once: the shipment moves to **"Posted"**, inventory drops via the item ledger, the line's `quantitySent` rises, and the order advances to **"To Invoice"** (or **"Completed"** once everything is both shipped and billed). `sentComplete` flips only when the cumulative shipped quantity reaches the ordered quantity, so partial and repeated shipments are first-class.
+Creating it changes nothing on hand — **<Term id="posting">posting</Term>** is the event that matters. Post the shipment and four things happen at once: the shipment moves to **"Posted"**, inventory drops via the item ledger, the line's `quantitySent` rises, and the order advances to **"To Invoice"** (or **"Completed"** once everything is both shipped and billed). `sentComplete` flips only when the cumulative shipped quantity reaches the ordered quantity, so partial and repeated shipments are first-class.
<Callout tone="amber" badge="POSTING ≠ CREATING" title="Posting moves inventory and the order — and stops there.">
-A posted shipment decrements stock and advances the order, and if accounting is enabled it writes the COGS journal entries. What it does **not** do is create the invoice. Fulfillment and billing are deliberately separate steps.
+A posted shipment decrements stock and advances the order, and if accounting is enabled it writes the <Term id="cogs">COGS</Term> journal entries. What it does **not** do is create the invoice. Fulfillment and billing are deliberately separate steps.
</Callout>
<Screenshot label="Post shipment" caption="Posting the shipment: inventory moves, the line's sent quantity rises, the order advances." ratio="wide" />
diff --git a/apps/docs/content/guides/order.mdx b/apps/docs/content/guides/order.mdx
index c234f8359d..9c5e00fba5 100644
--- a/apps/docs/content/guides/order.mdx
+++ b/apps/docs/content/guides/order.mdx
@@ -13,19 +13,19 @@ Carbon spans the office and the floor: ERP for orders, purchasing, and planning;
## The sales order
-Open the sales order dashboard. There's already an order on the books: 90 robots. But the customer doesn't want all 90 at once — they want 30 this week, 30 next week, and 30 the week after. That delivery schedule is going to shape everything downstream.
+Open the <Term>sales order</Term> dashboard. There's already an order on the books: 90 robots. But the customer doesn't want all 90 at once — they want 30 this week, 30 next week, and 30 the week after. That delivery schedule is going to shape everything downstream.
An order line doesn't close the moment you ship part of it. Carbon holds the line open — its status reads "To Ship and Invoice" — until every unit has both shipped and been invoiced. That single fact is what lets one order be fulfilled in batches without losing track of what's left.
<Screenshot label="Sales order dashboard" caption="The 90-unit robot order, with its three-week delivery schedule." ratio="wide" />
<Callout tone="neutral" badge="UPSTREAM" title="The order often starts as a quote.">
-Carbon has a full Quote module with quantity-break pricing, so the 90-unit price could have been negotiated in [quote to cash](/guides/quote-to-cash) first. We'll pick the story up at the confirmed sales order, where the build truly begins.
+Carbon has a full <Term>Quote</Term> module with quantity-break pricing, so the 90-unit price could have been negotiated in [quote to cash](/guides/quote-to-cash) first. We'll pick the story up at the confirmed sales order, where the build truly begins.
</Callout>
## Batch it into jobs
-You don't build 90 robots as one monolithic job. With a batch size of 30, Carbon splits the order into three jobs — one per delivery. Each can be scheduled, released, and shipped on its own timeline.
+You don't build 90 robots as one monolithic job. With a batch size of 30, Carbon splits the order into three <Term id="job">jobs</Term> — one per delivery. Each can be scheduled, released, and shipped on its own timeline.
<Figure illustration="order-split" caption="One 90-unit order, batched into three 30-unit jobs across three weeks." />
@@ -37,13 +37,13 @@ Three jobs of 30 let you release week one now, keep weeks two and three in plann
From the order, create the job. Carbon carries the part, quantity, and due date across automatically — the job inherits exactly what was sold, so the floor never works from a stale spec.
-It carries one more thing across, and it's the most important: the robot's manufacturing method — its full recipe of materials and operations. The job doesn't point at the part's master recipe, though. It gets its own copy.
+It carries one more thing across, and it's the most important: the robot's <Term id="method">manufacturing method</Term> — its full recipe of materials and operations. The job doesn't point at the part's master recipe, though. It gets its own copy.
<Screenshot label="Create job from sales order" caption="Converting the first 30-unit batch into a production job." ratio="wide" />
## Get the method
-Pulling that recipe into the job is an explicit action in Carbon called Get Method. It clones the part's method — every material, every operation — into a job-specific method that belongs to this job alone.
+Pulling that recipe into the job is an explicit action in Carbon called <Term>Get Method</Term>. It clones the part's method — every material, every operation — into a job-specific method that belongs to this job alone.
That copy is the whole point. Need a one-off substitution for this batch — a different fastener, an extra inspection step — you edit the job's method and the part master stays untouched. And when a change proves itself, you can push it back up to the part so every future job inherits it.
diff --git a/apps/docs/content/guides/quote-to-cash.mdx b/apps/docs/content/guides/quote-to-cash.mdx
index 1098cd30b7..477d268264 100644
--- a/apps/docs/content/guides/quote-to-cash.mdx
+++ b/apps/docs/content/guides/quote-to-cash.mdx
@@ -14,7 +14,9 @@ We'll follow one inquiry from a blank quote all the way to an order Carbon is re
## One opportunity, many documents
-In Carbon, a request for quote, a quote, and a sales order aren't a rigid chain — they're three documents that hang off a single **opportunity**. The opportunity holds a slot for each (`salesRfqId`, `quoteId`, `salesOrderId`), and any of them can be empty.
+In Carbon, a <Term id="rfq">request for quote</Term>, a <Term>quote</Term>, and a <Term>sales order</Term> aren't a rigid chain — they're three documents that hang off a single **<Term>opportunity</Term>**. The opportunity holds a slot for each (`salesRfqId`, `quoteId`, `salesOrderId`), and any of them can be empty.
+
+<Figure illustration="opportunity-thread" caption="Three documents — RFQ, quote, order — hang off one opportunity, and any slot can be empty." />
That design has a practical consequence: none of the steps are mandatory. You can raise a sales order cold, quote without a formal RFQ, or carry one opportunity through all three. Carbon tracks the relationship through the opportunity, not through a foreign key that forces the sequence.
diff --git a/apps/docs/content/guides/receive-and-bill.mdx b/apps/docs/content/guides/receive-and-bill.mdx
index bb505daad4..bda2d9828a 100644
--- a/apps/docs/content/guides/receive-and-bill.mdx
+++ b/apps/docs/content/guides/receive-and-bill.mdx
@@ -10,9 +10,11 @@ flowIndex: 2
The order is placed and sitting at **"To Receive and Invoice"**. Two things now happen on their own schedules: the goods show up, and the supplier's bill shows up. They rarely arrive together, and Carbon is built around that fact — receiving and invoicing are separate posted steps that reconcile against the order, not against each other directly.
+<Figure illustration="receive-bill-axes" caption="Received and invoiced are two independent axes on one purchase order line; the line closes only when both complete." />
+
## The line keeps score
-A purchase order line tracks `purchaseQuantity` against two independent counters: `quantityReceived` and `quantityInvoiced`. The amounts still owed — `quantityToReceive` and `quantityToInvoice` — are computed for you. A line carries two flags, `receivedComplete` and `invoicedComplete`, and only when both are true is that line done.
+A <Term>purchase order</Term> line tracks `purchaseQuantity` against two independent counters: `quantityReceived` and `quantityInvoiced`. The amounts still owed — `quantityToReceive` and `quantityToInvoice` — are computed for you. A line carries two flags, `receivedComplete` and `invoicedComplete`, and only when both are true is that line done.
Those two flags are exactly what the order's status rolls up. Receive everything and the order drops to **"To Invoice"**; bill everything and it drops to **"To Receive"**; once a line is both received and invoiced, it's **"Completed"**. Receiving and billing move the same order along two separate axes.
@@ -20,21 +22,23 @@ Those two flags are exactly what the order's status rolls up. Receive everything
Create a receipt from the order and Carbon pre-fills it from the outstanding lines, linking each receipt line back to its purchase order line. The receipt opens at **"Draft"** — and like a shipment, creating it changes nothing on hand.
-**Posting** is the event. Post the receipt and stock comes in through the item ledger as a *Purchase Receipt*, the order line's `quantityReceived` rises, `receivedComplete` flips once the full quantity is in, and the order advances. The receipt moves to **"Posted"**.
+**<Term id="posting">Posting</Term>** is the event. Post the receipt and stock comes in through the item ledger as a *Purchase Receipt*, the order line's `quantityReceived` rises, `receivedComplete` flips once the full quantity is in, and the order advances. The receipt moves to **"Posted"**.
<Callout tone="amber" badge="INVENTORY vs LEDGER" title="Stock moves whether or not accounting is on.">
-Posting a receipt always updates inventory. The accounting entries — debit inventory or WIP, credit the goods-received-not-invoiced (GR/IR) clearing account — are written only when accounting is enabled for the company. Inventory and the general ledger advance on different switches.
+Posting a receipt always updates inventory. The accounting entries — debit inventory or <Term id="wip">WIP</Term>, credit the <Term id="gr-ir">goods-received-not-invoiced (GR/IR)</Term> clearing account — are written only when accounting is enabled for the company. Inventory and the general ledger advance on different switches.
</Callout>
<Callout tone="green" badge="QUALITY HANDOFF" title="Inspected parts land on hold, not on the shelf.">
-Receive an item flagged for inspection and its tracked units come in **"On Hold"**, with an inbound inspection opened at **"Pending"** — received, but quarantined until quality clears them for use.
+Receive an item flagged for inspection and its <Term id="tracked-entity">tracked units</Term> come in **"On Hold"**, with an inbound inspection opened at **"Pending"** — received, but quarantined until quality clears them for use.
</Callout>
<Screenshot label="Post receipt" caption="Posting the receipt: stock enters the item ledger, the line's received quantity rises, the order advances." ratio="wide" />
## Buy by the box, stock by the each
-Suppliers rarely sell in your stock unit. You might buy fasteners by the thousand-count box but stock and issue them as eaches. Every purchase order line carries a **conversion factor** between the two units, so the price and quantity you agree with the supplier stay in *their* terms while inventory moves in *yours*.
+Suppliers rarely sell in your stock unit. You might buy fasteners by the thousand-count box but stock and issue them as eaches. Every purchase order line carries a **<Term>conversion factor</Term>** between the two units, so the price and quantity you agree with the supplier stay in *their* terms while inventory moves in *yours*.
+
+<Figure illustration="conversion-factor" caption="Buy by the box, stock by the each — the line's conversion factor turns one purchased box into ten stocked units." />
Posting the receipt does the translation: the quantity the supplier shipped is converted through the factor before it lands in stock, while the line's received count stays in the purchase unit. You reconcile against the supplier in the unit you ordered, and the floor pulls stock in the unit it builds with — neither side has to do the arithmetic in its head.
diff --git a/apps/docs/content/guides/rfq-to-po.mdx b/apps/docs/content/guides/rfq-to-po.mdx
index 5bf751ff66..4b0e75047e 100644
--- a/apps/docs/content/guides/rfq-to-po.mdx
+++ b/apps/docs/content/guides/rfq-to-po.mdx
@@ -12,9 +12,11 @@ Every robot the shop builds is mostly parts it buys. RFQ to bill is the procurem
We'll follow one purchased part from a blank request all the way to a posted supplier invoice.
+<Figure illustration="rfq-fanout" caption="One purchasing RFQ fans out to a supplier quote each; the winning bid converts to a purchase order." />
+
## One RFQ, many suppliers
-Start with a purchasing RFQ. Unlike a sales quote — which is one document for one customer — a purchasing RFQ is built to fan out: one request, the same lines, sent to several suppliers at once so you can compare what comes back. A fresh RFQ sits at **"Draft"**.
+Start with a <Term id="rfq">purchasing RFQ</Term>. Unlike a sales <Term>quote</Term> — which is one document for one customer — a purchasing RFQ is built to fan out: one request, the same lines, sent to several suppliers at once so you can compare what comes back. A fresh RFQ sits at **"Draft"**.
When you finalize it, Carbon does the fan-out for you. It creates one **supplier quote** per supplier off the RFQ's lines, links each back to the request, and — if you want — emails the supplier a private link to respond. The RFQ moves to **"Requested"**; each new supplier quote opens at **"Draft"**.
@@ -38,7 +40,7 @@ The share link lives on each supplier quote, so every supplier responds in their
## Into a purchase order
-Convert the winning supplier quote and Carbon builds a purchase order from it — carrying the supplier, the lines, the negotiated pricing (converted through the line's conversion factor and exchange rate), and the same supplier-interaction thread. A PO can also be one of three kinds: a plain **"Purchase"**, a **"Return"**, or **"Outside Processing"** for sending parts out to a vendor for a step.
+Convert the winning supplier quote and Carbon builds a <Term>purchase order</Term> from it — carrying the supplier, the lines, the negotiated pricing (converted through the line's <Term>conversion factor</Term> and exchange rate), and the same supplier-interaction thread. A PO can also be one of three kinds: a plain **"Purchase"**, a **"Return"**, or **<Term id="outside-operation">"Outside Processing"</Term>** for sending parts out to a vendor for a step.
A purchase order's status is never typed in by hand — Carbon computes it from the state of its lines. Finalize a fresh order and it lands at **"To Receive and Invoice"**: nothing has arrived, nothing has been billed. If the order's value crosses an approval threshold, it stops at **"Needs Approval"** until someone signs off.
diff --git a/apps/docs/lib/glossary.ts b/apps/docs/lib/glossary.ts
new file mode 100644
index 0000000000..06c039e7bb
--- /dev/null
+++ b/apps/docs/lib/glossary.ts
@@ -0,0 +1,480 @@
+/**
+ * The docs glossary — one source of truth for the inline <Term> popovers.
+ *
+ * Keys are slugs (lowercase, hyphenated). Author usage in MDX:
+ * <Term>purchase to order</Term> — slugifies the text to find the entry
+ * <Term id="purchase-to-order">bought</Term> — explicit key when display text differs
+ *
+ * Every definition is grounded in real Carbon source/migrations, not ERP-generic
+ * prose. `href` (optional) points the "Learn more" link at the page that tells the
+ * fuller story; omit it for terms with no dedicated page yet (popover still shows the
+ * definition). Enum values verified:
+ * methodType → "Make to Order" | "Purchase to Order" | "Pull from Inventory"
+ * (packages/database/.../20260321143847_method-type-migration.sql)
+ * itemReplenishmentSystem → "Buy" | "Make" | "Buy and Make"
+ * (packages/database/.../20230330024716_parts.sql)
+ */
+export type GlossaryEntry = {
+ /** Canonical name shown as the popover heading. */
+ term: string;
+ /** One or two grounded sentences. */
+ definition: string;
+ /** Optional internal route for the "Learn more" link. */
+ href?: string;
+};
+
+export const glossary: Record<string, GlossaryEntry> = {
+ "method-type": {
+ term: "Method type",
+ definition:
+ "How a part gets into its parent — set per line on a method. One of Make to Order, Purchase to Order, or Pull from Inventory. Separate from the item's replenishment system.",
+ href: "/docs/reference/methods",
+ },
+ "make-to-order": {
+ term: "Make to Order",
+ definition:
+ "The part is manufactured as its own job, with its own routing, when the parent that needs it is built.",
+ href: "/docs/reference/methods",
+ },
+ "purchase-to-order": {
+ term: "Purchase to Order",
+ definition:
+ "The material for that specific customer order is purchased from a supplier instead of being made or pulled from inventory.",
+ href: "/docs/reference/methods",
+ },
+ "pull-from-inventory": {
+ term: "Pull from Inventory",
+ definition:
+ "The part is taken from existing stock when its parent is built — no new job or purchase order is created for it.",
+ href: "/docs/reference/methods",
+ },
+ "replenishment-system": {
+ term: "Replenishment system",
+ definition:
+ "How an item is replenished overall, and which planning queue its shortfalls land in: Buy, Make, or Buy and Make. Set per item — unlike the per-line method type.",
+ href: "/docs/reference/items",
+ },
+ method: {
+ term: "Method",
+ definition:
+ "Carbon's name for a bill of materials: the materials (the components) plus the operations (the routing) that make a part.",
+ href: "/docs/reference/methods",
+ },
+ bom: {
+ term: "Bill of materials",
+ definition:
+ "In Carbon a bill of materials is called a method — the components plus the operations that produce a part.",
+ href: "/docs/reference/methods",
+ },
+ wip: {
+ term: "Work in process (WIP)",
+ definition:
+ "Not a table — a general-ledger balance. Costs accumulate in the WIP account as job materials are issued, and clear out when the job is received to stock.",
+ },
+ "outside-operation": {
+ term: "Outside operation",
+ definition:
+ "An operation performed by an outside supplier rather than an in-house work center. Carbon raises a subcontracting purchase order to cover it.",
+ },
+ subassembly: {
+ term: "Subassembly",
+ definition:
+ "A Make to Order component that gets its own job and routing inside the parent's build.",
+ href: "/docs/reference/methods",
+ },
+ kit: {
+ term: "Kit",
+ definition:
+ "A Make to Order component whose parts are issued together into the parent job — no separate build of its own.",
+ href: "/docs/reference/methods",
+ },
+ "lead-time": {
+ term: "Lead time",
+ definition:
+ "Days from ordering a part to having it available. Planning offsets demand backward by this much so supply arrives in time.",
+ href: "/docs/reference/reordering",
+ },
+ "reorder-point": {
+ term: "Reorder point",
+ definition:
+ "The on-hand level that triggers a new replenishment order under the Fixed Reorder Quantity and Maximum Quantity policies.",
+ href: "/docs/reference/reordering",
+ },
+ "reordering-policy": {
+ term: "Reordering policy",
+ definition:
+ "How an item is replenished: Manual Reorder, Demand-Based Reorder, Fixed Reorder Quantity, or Maximum Quantity.",
+ href: "/docs/reference/reordering",
+ },
+
+ // ── Production & the floor ──────────────────────────────────────────────
+ // Enums verified: jobStatus (20240909194622_jobs.sql + 20260504000002_job-closed-status.sql),
+ // productionQuantity.type (20241002012019_production-quantities.sql), rework (20260527142837_rework.sql),
+ // backflush (20260511120000_backflush-job-materials.sql), getMethodValidator (sales.models.ts).
+ job: {
+ term: "Job",
+ definition:
+ "Carbon's production order — one job builds a quantity of one item from its own copied method and routing. Status runs Draft → Ready → In Progress → Completed → Closed.",
+ href: "/docs/reference/jobs",
+ },
+ routing: {
+ term: "Routing",
+ definition:
+ "The ordered sequence of operations a job runs through. Not a separate record: it's the job's operations sorted by order, copied from the method's bill of process.",
+ href: "/docs/reference/routings",
+ },
+ operation: {
+ term: "Operation",
+ definition:
+ "One step in a job's routing. Each operation names a process and a work center and carries its own setup, labor, and machine times and rates — so cost accumulates per operation, not just per job.",
+ href: "/docs/reference/routings",
+ },
+ "work-center": {
+ term: "Work center",
+ definition:
+ "Where an operation runs. It carries labor and quoting rates — overhead is the difference between them — and links to the processes it can perform.",
+ href: "/docs/reference/work-centers",
+ },
+ backflush: {
+ term: "Backflush",
+ definition:
+ "Automatic, prorated consumption of a job's untracked materials when output is reported — no manual issue needed. Batch- or serial-tracked materials are skipped and must be issued explicitly.",
+ href: "/guides/job-costing",
+ },
+ "material-issue": {
+ term: "Issue (material)",
+ definition:
+ "Consuming material from inventory into a job, which writes a Consumption entry to the item ledger. Distinct from a quality issue, which is a nonconformance.",
+ href: "/docs/reference/jobs",
+ },
+ "get-method": {
+ term: "Get Method",
+ definition:
+ "The action that copies a saved method — its materials, operations, and work instructions — onto a job or quote line. You pick which parts to pull.",
+ href: "/docs/reference/methods",
+ },
+ scrap: {
+ term: "Scrap",
+ definition:
+ "Units reported as unrecoverable at an operation, with a reason — recorded as a production quantity of type Scrap. The alternative to routing them for rework.",
+ },
+ rework: {
+ term: "Rework",
+ definition:
+ "Sending defective units back to an earlier operation to be corrected instead of scrapping them. Carbon creates a rework path of operations targeting that step.",
+ },
+
+ // ── Sales & purchasing ──────────────────────────────────────────────────
+ // Enums verified: salesOrderStatus (20250209170952_shipment.sql), purchaseOrderStatus
+ // (20230510035345_purchasing.sql + later), quoteStatus (20240715024405_quotes.sql),
+ // opportunity (20240815020752_opportunity.sql), dropShipment flag, GR/IR account 2125.
+ "sales-order": {
+ term: "Sales order",
+ definition:
+ 'A firm customer commitment to deliver. Fulfillment status splits across "To Ship and Invoice", "To Ship", and "To Invoice" before reaching "Completed".',
+ href: "/docs/reference/sales-orders",
+ },
+ "purchase-order": {
+ term: "Purchase order",
+ definition:
+ 'A firm order to a supplier. As goods and bills arrive, status moves through "To Receive and Invoice", "To Receive", and "To Invoice" before "Completed".',
+ href: "/docs/reference/purchase-orders",
+ },
+ quote: {
+ term: "Quote",
+ definition:
+ "A priced sales quotation, often with quantity breaks. Status runs Draft → Sent → Ordered, or ends Lost, Expired, or Cancelled; an accepted quote converts to a sales order.",
+ href: "/docs/reference/quotes",
+ },
+ rfq: {
+ term: "RFQ (request for quote)",
+ definition:
+ "Carbon has two kinds: a sales RFQ, where a customer asks you to quote, and a purchasing RFQ, where you ask suppliers to quote. Both feed the opportunity thread.",
+ href: "/guides/quote-to-cash",
+ },
+ opportunity: {
+ term: "Opportunity",
+ definition:
+ "The thread linking a sales RFQ, its quote, and the resulting sales order. Not a document with its own status — a join that lets the three be read as one deal.",
+ href: "/guides/quote-to-cash",
+ },
+ "drop-ship": {
+ term: "Drop-ship",
+ definition:
+ "A shipment line sent straight from supplier to customer, bypassing your warehouse — so no inventory receipt posts. Set per shipment line, not on the order header.",
+ href: "/docs/reference/sales-orders",
+ },
+ "three-way-match": {
+ term: "Three-way match",
+ definition:
+ "Reconciling a purchase order against what was received and what was invoiced. In Carbon it's implicit — the PO line's received-vs-invoiced quantities and the GR/IR balance are the match, with no separate matching step.",
+ href: "/guides/receive-and-bill",
+ },
+ "gr-ir": {
+ term: "GR/IR (goods received, not invoiced)",
+ definition:
+ "A clearing account holding the value of goods received but not yet billed. A receipt credits it; the supplier invoice clears it.",
+ href: "/docs/reference/accounting",
+ },
+
+ // ── Inventory, tracking & costing ───────────────────────────────────────
+ // Enums verified: trackedEntity status (20250225145619_tracked-entities.sql),
+ // costingMethod (20230330024716_parts.sql), receipt/shipment status
+ // (20230728025201_receipts.sql, 20250209170952_shipment.sql), conversionFactor.
+ "tracked-entity": {
+ term: "Tracked entity",
+ definition:
+ 'One serial unit or one batch of inventory that Carbon follows individually. It carries a status — "Available", "Reserved", "On Hold", or "Consumed" — and its own attributes, such as an expiry date.',
+ href: "/docs/reference/traceability",
+ },
+ serial: {
+ term: "Serial tracking",
+ definition:
+ "Each physical unit gets its own tracked entity and unique number — one entity, one unit. Used where you need 1:1 history.",
+ href: "/docs/reference/traceability",
+ },
+ batch: {
+ term: "Batch tracking",
+ definition:
+ "A quantity of identical units shares one tracked entity and batch number — one entity, many units. Used for lots with shared attributes like an expiry date.",
+ href: "/docs/reference/traceability",
+ },
+ traceability: {
+ term: "Traceability",
+ definition:
+ "The recorded genealogy of tracked entities: which inputs were consumed to produce which outputs, activity by activity, from receipt through build to shipment.",
+ href: "/docs/reference/traceability",
+ },
+ genealogy: {
+ term: "Genealogy",
+ definition:
+ "The parent-child chain of tracked entities — what a unit was built from and what it became. Carbon assembles it from tracked-activity inputs and outputs.",
+ href: "/docs/reference/traceability",
+ },
+ "costing-method": {
+ term: "Costing method",
+ definition:
+ "How an item's unit cost is valued: Standard, Average, FIFO, or LIFO. Set per item, it drives the cost that posts when stock moves.",
+ href: "/docs/reference/items",
+ },
+ cogs: {
+ term: "Cost of goods sold (COGS)",
+ definition:
+ "The inventory cost recognized when a shipment posts: Carbon debits the COGS account and credits inventory, valued by the item's costing method.",
+ href: "/docs/reference/accounting",
+ },
+ // Alias of "cogs" so the spelled-out term also resolves — keep the definition in sync with it.
+ "cost-of-goods-sold": {
+ term: "Cost of goods sold (COGS)",
+ definition:
+ "The inventory cost recognized when a shipment posts: Carbon debits the COGS account and credits inventory, valued by the item's costing method.",
+ href: "/docs/reference/accounting",
+ },
+ "conversion-factor": {
+ term: "Conversion factor",
+ definition:
+ "Converts a supplier's purchase unit to your inventory unit on a PO, receipt, or bill line. Buy in cartons of 12, stock in eaches: a factor of 12 turns 5 cartons into 60.",
+ href: "/guides/receive-and-bill",
+ },
+ posting: {
+ term: "Posting",
+ definition:
+ 'Committing a receipt, shipment, or invoice: inventory quantities move, journal entries hit the ledger, and the document\'s status becomes "Posted". The irreversible step.',
+ href: "/docs/reference/accounting",
+ },
+ receipt: {
+ term: "Receipt",
+ definition:
+ 'The inbound posting document that takes goods into stock — from a purchase order, transfer, or job output — and creates any tracked entities. Status Draft → Pending → "Posted".',
+ href: "/docs/reference/receipts",
+ },
+ shipment: {
+ term: "Shipment",
+ definition:
+ 'The outbound posting document that takes goods out of stock to a customer, posting COGS as it goes. Status Draft → Pending → "Posted".',
+ href: "/docs/reference/shipments",
+ },
+
+ // ── Planning, quality & accounting ──────────────────────────────────────
+ // Enums verified: nonConformance status + action/task types (20250327140050_ncr.sql),
+ // accountingPeriod status Inactive/Active (20230705033432_ledgers.sql), journal model,
+ // accountingEnabled gate (20260508000000_accounting-enabled.sql), MRP edge function.
+ "demand-forecast": {
+ term: "Demand forecast",
+ definition:
+ "Expected future demand for an item, bucketed by period. The planning run populates it alongside actual demand from orders and jobs.",
+ href: "/docs/reference/planning",
+ },
+ mrp: {
+ term: "MRP (planning)",
+ definition:
+ "Carbon's planning run nets supply against demand and explodes methods — but it does not create orders. It surfaces shortfalls for you to turn into planned jobs and purchase orders.",
+ href: "/docs/reference/planning",
+ },
+ nonconformance: {
+ term: "Nonconformance (issue)",
+ definition:
+ 'Carbon\'s quality issue — a logged deviation or defect. Status runs "Registered" → "In Progress" → "Closed", with a configurable workflow of investigation and action tasks.',
+ href: "/docs/reference/quality",
+ },
+ "8d": {
+ term: "8D",
+ definition:
+ "The eight-disciplines quality method. Carbon doesn't hard-code its steps — you model it with the nonconformance workflow's investigation, action, and approval tasks.",
+ href: "/docs/reference/quality",
+ },
+ "corrective-action": {
+ term: "Corrective action",
+ definition:
+ "A nonconformance task that fixes a confirmed root cause — as opposed to a preventive action or an immediate containment action. Tracked Pending → In Progress → Completed.",
+ href: "/docs/reference/quality",
+ },
+ "preventive-action": {
+ term: "Preventive action",
+ definition:
+ "A nonconformance task that stops the problem recurring elsewhere — distinct from the corrective fix and the immediate containment.",
+ href: "/docs/reference/quality",
+ },
+ "containment-action": {
+ term: "Containment action",
+ definition:
+ "The immediate nonconformance task that quarantines affected stock or work before the root cause is known.",
+ href: "/docs/reference/quality",
+ },
+ journal: {
+ term: "Journal",
+ definition:
+ "A posted accounting entry: a header plus balanced debit and credit journal lines against GL accounts. Every posting writes one.",
+ href: "/docs/reference/accounting",
+ },
+ "general-ledger": {
+ term: "General ledger",
+ definition:
+ "The book of all posted journal lines, summed by account. Carbon only posts when the company has accounting enabled.",
+ href: "/docs/reference/accounting",
+ },
+ "accounting-period": {
+ term: "Accounting period",
+ definition:
+ 'A dated window that postings fall into. A period is "Inactive" or "Active" — not open or closed — and a posting needs an active one, which Carbon opens automatically when needed.',
+ href: "/docs/reference/accounting",
+ },
+
+ // ── Documents & variances (batch 2) ─────────────────────────────────────
+ // Grounded: supplierQuote status (20260202000000_supplier_quote_document_type.sql),
+ // invoice posting + field-based payment, finished-goods at actual WIP
+ // (20260508120000_complete-job-to-inventory.sql), production & PPV variance accounts.
+ "supplier-quote": {
+ term: "Supplier quote",
+ definition:
+ "A supplier's priced response to a purchasing RFQ — one per supplier, created when you finalize the request. Status runs Draft → Active when they submit, or Declined.",
+ href: "/guides/rfq-to-po",
+ },
+ invoice: {
+ term: "Invoice",
+ definition:
+ "A sales invoice (you bill a customer) or a purchase invoice (a supplier bills you). Posting writes the ledger but never marks it Paid — payment is a field on the invoice, not a separate record.",
+ href: "/docs/reference/invoices",
+ },
+ "finished-goods": {
+ term: "Finished goods",
+ definition:
+ "A completed job's output, received into inventory at the job's actual accumulated WIP cost. A make-to-order job stocks here first, then the sales order ships from stock.",
+ href: "/docs/reference/jobs",
+ },
+ "production-variance": {
+ term: "Production variance",
+ definition:
+ "The residual WIP a job has left at close — rounding, late material, a late event — swept to a Production Variance account. The only variance Carbon books for a job; finish is at actual cost, not standard.",
+ href: "/guides/job-finish-close",
+ },
+ "purchase-price-variance": {
+ term: "Purchase price variance",
+ definition:
+ "The gap between a purchase order's price and the supplier's bill, posted to a variance account when the invoice posts and reconciled against the receipt cost.",
+ href: "/guides/receive-and-bill",
+ },
+
+ // ── Fixed assets ────────────────────────────────────────────────────────
+ // Enums verified: fixedAssetStatus Draft/Active/Fully Depreciated/Disposed,
+ // depreciationMethod Straight Line/Declining Balance/Units of Production
+ // (20260524143827_fixed-assets.sql).
+ "fixed-asset": {
+ term: "Fixed asset",
+ definition:
+ "An accounting record for a capitalized item — a machine, vehicle, or tool you depreciate rather than expense. Independent of the work center you schedule production on. Status runs Draft → Active → Fully Depreciated → Disposed.",
+ href: "/docs/reference/fixed-assets",
+ },
+ "asset-class": {
+ term: "Asset class",
+ definition:
+ "The category a fixed asset belongs to. It carries the GL accounts every asset of that kind posts to: the asset account, accumulated depreciation, depreciation expense, and the write-off account.",
+ href: "/docs/reference/fixed-assets",
+ },
+ depreciation: {
+ term: "Depreciation",
+ definition:
+ "Writing an asset's value down over its life. Carbon runs it as a monthly batch you create, review as a draft, then post — debit depreciation expense, credit accumulated depreciation. Methods: Straight Line, Declining Balance, Units of Production.",
+ href: "/docs/reference/fixed-assets",
+ },
+ "net-book-value": {
+ term: "Net book value",
+ definition:
+ "What an asset is still worth on the books: its acquisition cost minus accumulated depreciation. The figure an asset is sold or disposed at.",
+ href: "/docs/reference/fixed-assets",
+ },
+ "straight-line": {
+ term: "Straight line",
+ definition:
+ "A depreciation method that charges an equal amount each period across the asset's useful life.",
+ href: "/docs/reference/fixed-assets",
+ },
+ "declining-balance": {
+ term: "Declining balance",
+ definition:
+ "A depreciation method that charges a fixed percentage of the remaining book value each period — heavier early, lighter later.",
+ href: "/docs/reference/fixed-assets",
+ },
+ "residual-value": {
+ term: "Residual value",
+ definition:
+ 'The floor an asset depreciates down to. When net book value reaches it, posting flips the asset to "Fully Depreciated" and it stops accruing.',
+ href: "/docs/reference/fixed-assets",
+ },
+ macrs: {
+ term: "MACRS",
+ definition:
+ "The US tax depreciation system, with the IRS property-class tables. Carbon can run a separate tax schedule on MACRS alongside the book schedule.",
+ href: "/docs/reference/fixed-assets",
+ },
+ disposal: {
+ term: "Disposal",
+ definition:
+ 'Retiring an asset by write-off instead of sale: clear accumulated depreciation, remove the asset at cost, and book the remaining net book value as a loss. Status becomes "Disposed".',
+ href: "/docs/reference/fixed-assets",
+ },
+
+ // ── Inventory ledger ────────────────────────────────────────────────────
+ "item-ledger": {
+ term: "Item ledger",
+ definition:
+ "The append-only record of every stock movement. On-hand is the sum of its signed entries — receipts and outputs add, sales and consumption subtract — and it's status-aware, so it, not the cached quantity, is the source of truth.",
+ href: "/docs/reference/inventory",
+ },
+
+ // ── Shelf life ──────────────────────────────────────────────────────────
+ // Grounded: shelf-life modes (Fixed Duration/Calculated/Set on Receipt), expired-entity
+ // policy Warn/Block/BlockWithOverride (default Block), FEFO picking.
+ "shelf-life": {
+ term: "Shelf life",
+ definition:
+ 'When a serial or batch expires, and what happens if you use it after. The date lives on the tracked entity; a company policy can Warn, Block, or BlockWithOverride on consuming expired stock — Block is the default, rejecting it outright.',
+ href: "/docs/reference/shelf-life",
+ },
+ fefo: {
+ term: "FEFO (first-expiry-first-out)",
+ definition:
+ "Picking offers available tracked entities earliest-expiry-first, so the soonest-to-expire stock leaves first by default.",
+ href: "/docs/reference/shelf-life",
+ },
+};