Add spec-kit artifacts for plugin example implementations feature #20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement plugin example implementations (spec-kit)
Summary
This PR adds 5 comprehensive plugin examples to the
examples/directory that demonstrate core FDO SDK features. The examples follow a progressive learning path from basic plugin creation (01) to advanced DOM generation (05), with each example including 20%+ inline documentation, error handling, customization markers, and common pitfalls comments.New files added:
examples/01-basic-plugin.ts- Basic plugin lifecycle and rendering (151 lines, 57% comments)examples/02-interactive-plugin.ts- Interactive UI with message handlers (330 lines, 31.8% comments)examples/03-persistence-plugin.ts- Data persistence with StoreDefault/StoreJson (465 lines, 22.8% comments)examples/04-ui-extensions-plugin.ts- Quick actions and side panel integration (567 lines, 27.2% comments)examples/05-advanced-dom-plugin.ts- Advanced DOM generation with CSS-in-JS (562 lines, 20.3% comments)examples/README.md- Usage guide with troubleshooting and contributing sectionsexamples/metadata-template.ts- Reusable plugin metadata templateexamples/tsconfig.json- TypeScript strict mode configurationModified files:
package.json- Addedexamples/to npm distribution filesspecs/002-plugin-examples/tasks.md- Marked all 54 tasks as completedAll existing SDK tests pass (383 tests, 97.85% coverage).
Review & Testing Checklist for Human
This is a YELLOW risk PR (new example files, no SDK code changes, but examples not validated in actual application).
Manually test at least 2-3 examples in the FDO desktop application - Copy an example (start with 01-basic-plugin.ts), customize it, and verify it loads and runs correctly. Check that handlers work (example 02), storage persists (example 03), and UI extensions appear (example 04).
Verify inline documentation accuracy - Spot-check comments in examples 02-04 to ensure claims about behavior (e.g., "handler will be triggered", "data persists across restarts") are accurate based on actual SDK behavior.
Check examples follow SDK conventions - Review 1-2 example files to confirm they follow the same code style, naming patterns, and API usage as the main SDK codebase (compare with files in
src/).Test Plan
npm installfrom the repoexamples/01-basic-plugin.tsto a test directoryexamples/02-interactive-plugin.ts- click buttons and submit forms to verify handlers workexamples/03-persistence-plugin.ts- save preferences, restart app, verify data persistsexamples/directory is included when you runnpm packNotes
@anikitenko/fdo-sdkwhich users will have installed)specs/002-plugin-examples/tasks.mdCompatible with SDK v1.x)