Scaffold a GoF pattern
scaffold_patternCreate a language-agnostic pseudo-code skeleton for a GoF pattern, showing participants and their collaboration. Rename roles to your domain and translate to any language.
Instructions
Generate a language-agnostic pseudo-code skeleton for a GoF pattern, showing its participants and how they collaborate. Optionally rename roles to your domain (e.g. Product -> Notification). Translate the result into your target language.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| names | No | Optional role→name map, e.g. {"Product":"Notification","Creator":"Dispatcher"}. | |
| pattern | Yes | Pattern slug/name/alias, e.g. "observer", "factory-method". |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| code | No | ||
| name | No | ||
| slug | No | ||
| error | No | ||
| roles | No |