Design patterns

How CloudForge suggests software design patterns while it writes code, and how to add your own.

On this page

How it works

For each request, CloudForge checks which patterns might help. When one fits, it uses the pattern's guidance for your language as it writes the code.

CloudForge knows these patterns:

KindPatterns
CreationalBuilder, factory, singleton alternatives, registry
StructuralAdapter, decorator, facade, repository
BehavioralChain of responsibility, command, observer, state, strategy, template method
ArchitecturalDependency injection, plugin architecture

Add your own

Write a pattern your team uses as a Markdown file in .cloudforge/patterns/<name>.md. CloudForge considers it next to the built-in patterns.

To make CloudForge always follow a pattern, write a rule instead. See Rules, skills and hooks.

Keyboard shortcuts

Docs keyboard shortcuts
Ctrl + KOpen search
/Open search
?Show this list
[Previous page
]Next page
EscClose search, this list or the menu

Turn these off if they get in the way of speech input or other tools. Ctrl + K always works.