Documentation française · English documentation
Draw, connect, and compare Houses of Quality in native Typst. Map needs → functions → components, carry priorities between stages, and show design revisions with readable green/red/yellow backgrounds.
Documentation · Coffee example · API reference

Start in five minutes
Install Typst 0.15.1 or newer. On macOS:
brew install typst
git clone https://github.com/tychota/qfd-typst.git
cd qfd-typst
mkdir -p build
typst compile --root . --font-path fonts examples/espresso.typ build/espresso.pdf
Open build/espresso.pdf. For automatic recompilation while editing:
typst watch --root . --font-path fonts examples/espresso.typ build/espresso.pdf
On Windows/Linux, download the CLI from the official releases page and put the executable on your PATH. Verify with typst --version. No LaTeX installation is needed.
In the Typst web app, upload lib.typ, src/, and an example, preserving their folder structure. Upload the bundled Plex fonts too if those families are unavailable. Relative imports work without publishing a package.
A first matrix
Create main.typ beside lib.typ:
#import "@preview/qualitree:0.1.0": qfd
#set page(width: auto, height: auto, margin: 6mm)
#qfd(
whats: ("Enjoy good coffee", "Prepare drinks quickly"),
hows: ("Heat water", "Channel water"),
importance: (10, 7),
matrix: ((9, 3), (3, 9)),
targets: ("92 °C*", [Recipe target]),
directions: ("target", "maximize"),
correlations: ((1, 2, "-"),),
width: auto,
)
Compile with typst compile --font-path fonts main.typ. The temperature is an illustrative recipe hypothesis, not a universal recommendation.
Connect stages
Stable IDs identify entities; labels are editable text. Relations remain one-based positions within each stage.
#import "@preview/qualitree:0.1.0": qfd, qfd-stage, qfd-deploy
#let needs = qfd-stage(
rows: ((id: "taste", label: "Good taste", weight: 10),),
columns: ((id: "heat", label: "Heat water", direction: "target"),),
matrix: ((9,),),
)
#let components = qfd-deploy(needs,
columns: ((id: "heater", label: "Heater"),),
matrix: ((9,),), labels: (whats: [Functions], hows: [Components]),
)
#qfd(..components)
qfd-deploy carries unrounded relative weights forward. Only displayed values are rounded. Priorities are engineering judgments; they do not replace acceptance thresholds for taste, temperature, or safety.
Compare revisions
#import "@preview/qualitree:0.1.0": qfd, qfd-stage, qfd-diff
#let before = qfd-stage(
rows: ((id: "taste", label: "Good taste", weight: 10),),
columns: ((id: "heat", label: "Heat water"),), matrix: ((3,),),
)
#let after = before + (matrix: ((9,),))
#qfd(..qfd-diff(before, after))
Additions have pale green backgrounds, removals pale red, and changes pale yellow. Dark symbols and +/−/~ annotations supplement color. Reordering IDs creates no false edits. Removed relationships remain visible but contribute zero to current priorities. Diff views do not currently support competitive profiles or custom basements; compare source stages without those options.
The compact walkthrough adds a steam wand to a coffee-only baseline: one new milk-drink need, two new functions, and effects on existing cleaning, space, and safety responsibilities. A second option adds automatic metering and refrigerated milk storage. Both use the same compact baseline; the full coffee study remains a separate detailed example. See the option comparison.
See the profile palette reference for color provenance, contrast values, and customization.
Example sources: minimal matrix, coffee needs, coffee components, coffee report, manual milk revision, component revision, automatic milk option, detailed milk deployment, and comparison profiles. French examples: manual revision, component revision, and automatic option.
Typography and layout
Plex Sans labels and Plex Serif headings are the defaults, with built-in fallback families. The repository includes the fonts under their SIL Open Font License. The library does not install fonts or change your page settings.
Header and row sizes are measured automatically. Override header-height, row-height, cell-size, label-padding, header-padding, or cell-padding independently. font, serif-font, font-size, grid-thickness, frame-thickness, and theme control appearance. width: auto preserves natural dimensions; width: 100% scales a figure to a finite container. Scaling a dense chart into a small space also shrinks its text.
Correlation signs use bold vector +/− and circled strong signs. Choose correlation-style: "text" for ++/–. Direction indicators are ↑ maximize, ↓ minimize, and a bullseye for a target. Competitive markers stagger vertically by default, preserving score positions; marker-stagger: false restores centered markers. Dense ties may shrink markers, and crossings forced by score order cannot always be avoided.
Named local installation
python3 tools/install_local.py
Then use #import "@local/qualitree:0.1.0": qfd. This only installs the library for the local CLI; fonts are separate. See installation paths.
Typst Universe: submission PR #5808 is open. Use relative or @local imports until it is accepted; @preview/qualitree:0.1.0 is not available yet.
Develop and verify
python3 tools/test.py
python3 tools/build_examples.py
python3 tools/build_docs.py
python3 tools/package.py
Tests execute Typst assertions, 128 visibility combinations and other layout cases, invalid inputs, stage propagation, ID-based revisions, and profile placement. All public examples compile with bundled fonts and without system fonts. Source files drive the documentation previews; build_examples.py refreshes them.
Documentation map
- Vocabulary: needs, functions, components, technologies and thresholds.
- Coffee study: scope, assumptions, candidate technologies, evidence and validation work.
- API: inputs, styling, calculations and revision limitations.
- Maintaining the package: module boundaries, comments, checks and releases.
- Methodology: functional analysis and classic QFD terminology.
- Design and implementation plan.
Credits
Tycho Tatitscheff and Julien Calixte.
License
MIT for source and documentation. Bundled IBM Plex fonts retain their adjacent SIL Open Font License notices. The hero is an AI-generated decorative illustration; the examples are native Typst diagrams with explicit illustrative assumptions.