All Lessons

Why does the Shipwright factory implement continuous verification through event-driven plugins and hooks rather than relying on prompt instructions like 'Please run npm test after modifying files'?

1 / 1
advanced 35 min

Plugins and Hooks: Automating the Line

Subscribe to the opencode event stream and intercept tool calls. Add custom tools, and build the verification hook that runs checks after every edit.

Loading lesson content...

In the Shipwright verification plugin snippet below, why does the plugin debounce file edits during file.edited but immediately flush pending checks on session.idle?

1 / 1

When registering a custom tool like shipwright_create_pr via tool() in an opencode plugin, what is the architectural tradeoff of defining strict Zod validation schemas and verifying that the current branch is not main before invoking the GitHub CLI?

1 / 1