DSH’s philosophy is “Everything is a plugin.” Writing local plugins requires following specific format specifications and accumulating development experience to avoid repeatedly hitting the same pitfalls. dsh-plugin-forge is a meta-plugin that allows you to quickly scaffold DSH local plugins in the dph format in any workspace, and maintains a pitfall experience library to continuously refine development.
This is a workflow plugin maintained by CAI-MH.
Core Features¶
The plugin provides four main commands, covering the full process from development to deployment:
- Retrieve specifications and experience:
plugin_forge_guide, used to retrieve the latest format specifications and the pitfall experience library; required reading before writing plugins. - Generate a skeleton:
plugin_forge_scaffold, used to generate a loadable bundle skeleton in the current workspace for implementing business logic later. - Validate and install:
plugin_forge_install, used to validate the plugin and install it to the local web profile; a DSH restart is required for the change to take effect. - Record experience:
plugin_forge_experience, used to record or view pitfall experiences; after solving a problem, record it to feed back into future development.
Typical Usage¶
- Before writing a plugin: Run
plugin_forge_guideand read the latest format specifications and experience library. - Generate the skeleton: Run
plugin_forge_scaffoldto generate the skeleton files. - Implement the logic: Write the specific business logic code in the generated skeleton.
- Install the plugin: Run
plugin_forge_installto complete validation and installation, then restart DSH. - Record pitfalls: Each time you resolve a development issue, run
plugin_forge_experience(action=add)to write the experience into the library.
Pitfall Experience Library¶
The pitfall experience library is globally shared and stored at:
~/.dsh/plugin-forge/EXPERIENCE.md
On first use, the library is automatically populated with seed experiences. This file is shared across all workspaces and is suitable as a general pitfall-avoidance guide for a team or individual.
Installation and Activation¶
An official installation command has not been found in the retrieved documentation so far. This plugin exists as a module type and is loaded as a DSH bundle.
Notes¶
- The plugin type is module.
- You must restart DSH after installing the plugin for changes to take effect.
- The plugin runs with the permissions of the current DSH process; review the source code and license (MIT) before installing.
Summary¶
This tool lowers the barrier to DSH plugin development through standardized scaffolding and a global experience library, and ensures that pitfall experiences can be continuously accumulated and reused.