Miniscript
Also called: Bitcoin Miniscript, miniscript policy, policy language, BIP379.
Miniscript is a structured way to write Bitcoin Script, specified in BIP 379, that makes complex spending conditions easy to analyze, combine and sign.
Miniscript is a language for writing a subset of Bitcoin Script in a structured, composable way. Instead of hand-assembling opcodes, you combine named fragments such as pk(), older() and thresh(), and each one maps directly onto real script.
Example
wsh(or_d(pk(A),and_v(v:pk(B),older(4032))))
Key A can spend at any time. Key B can spend only once the coins have sat unspent for 4,032 blocks (about four weeks), because older() compiles to OP_CHECKSEQUENCEVERIFY. Policies like this are used for inheritance and recovery setups.
What it makes possible
BIP 379, by Pieter Wuille, Andrew Poelstra, Sanket Kanjalkar, Antoine Poinsot and Ava Chow, starts from problems that are hard with raw script: finding the cheapest script for a policy, combining policies (a multisig where one "key" is itself another multisig), working out what an existing script allows, building a valid witness for any script given the right keys, and predicting the cost of spending. Because every fragment has typed, known behavior, software can check these properties automatically, including whether a third party could malleate the witness.
Where it is used
Miniscript covers P2WSH and tapscript, with small differences between them (multi() in P2WSH, multi_a() in tapscript). It is written inside the wsh() (BIP 382) and tr() (BIP 386) output descriptors, so for users it is an extension of the descriptor language rather than a separate one. Wallets and hardware signers that understand Miniscript can sign for custom policies without bespoke code for each one. See the output descriptors guide for how it fits together.