docs: add initial plugin development guide#140
Conversation
📝 WalkthroughWalkthroughAdded a new guide page at docs/guides/plugin-development.mdx and registered it in the Docs navigation by inserting "guides/plugin-development" into docs/docs.json (navigation.tabs[0].groups[].pages). The MDX covers Suga plugin concepts, plugin types, manifest structure, Terraform module layout, runtime adapter patterns with Go examples, local development workflows (suga plugin serve, suga build --replace-library), testing/iteration, platform integration, and publishing/versioning. Also updated CLI docs (cli/internal/mcp/instructions-plugin-library-development.md) to use the term “runtime adapters,” add a Note for AI Agents, and add a Local Development Workflow section. Added accepted vocabulary terms: namespace, proxying, pubsub. Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (1)📓 Common learnings🔇 Additional comments (1)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
docs/guides/plugin-development.mdx (1)
589-591: Consider tightening wording on line 591.The phrase "in order to grant" could be more concise: change to "to grant" for brevity.
Apply this diff:
- Suga `identity` plugins are a special type of plugin. They're not deployed independently, instead they're attached to `service` plugins, in order to grant that service access to other resources. + Suga `identity` plugins are a special type of plugin. They're not deployed independently; instead they're attached to `service` plugins to grant services access to other resources.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
docs/docs.json(1 hunks)docs/guides/plugin-development.mdx(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-22T21:56:58.994Z
Learnt from: jyecusch
Repo: nitrictech/suga PR: 78
File: docs/docs.json:24-27
Timestamp: 2025-09-22T21:56:58.994Z
Learning: When analyzing docs.json navigation structures, ensure to carefully verify the actual JSON structure before flagging navigation mismatches. The "Core Concepts" and "Resources" groups in docs/docs.json are correctly configured with their corresponding MDX files.
Applied to files:
docs/docs.json
🪛 GitHub Actions: Test Docs
docs/guides/plugin-development.mdx
[error] 332-332: [Vale.Spelling] Did you really mean 'pubsub'?
[error] 338-338: [Vale.Spelling] Did you really mean 'proxying'?
🪛 GitHub Check: Spell Check with Vale
docs/guides/plugin-development.mdx
[failure] 338-338:
[vale] reported by reviewdog 🐶
[Vale.Spelling] Did you really mean 'proxying'?
Raw Output:
{"message": "[Vale.Spelling] Did you really mean 'proxying'?", "location": {"path": "docs/guides/plugin-development.mdx", "range": {"start": {"line": 338, "column": 18}}}, "severity": "ERROR"}
[failure] 332-332:
[vale] reported by reviewdog 🐶
[Vale.Spelling] Did you really mean 'pubsub'?
Raw Output:
{"message": "[Vale.Spelling] Did you really mean 'pubsub'?", "location": {"path": "docs/guides/plugin-development.mdx", "range": {"start": {"line": 332, "column": 119}}}, "severity": "ERROR"}
🪛 LanguageTool
docs/guides/plugin-development.mdx
[style] ~591-~591: Consider a more concise word here.
Context: ... they're attached to service plugins, in order to grant that service access to other reso...
(IN_ORDER_TO_PREMIUM)
🔇 Additional comments (3)
docs/docs.json (1)
37-37: Navigation entry correctly placed.The new guide entry follows established patterns and is properly positioned within the Guides section.
docs/guides/plugin-development.mdx (2)
332-332: Fix Vale spell check failures blocking pipeline.The pipeline is blocked by Vale spell check flagging two valid technical terms:
- Line 332:
pubsub— a standard cloud computing term (Google Cloud Pub/Sub, AWS SNS)- Line 338:
proxying— valid English gerund form of "proxy"These appear to be false positives, but they're blocking the build.
Consider one of these approaches:
- Add these terms to Vale's dictionary/exceptions if the project maintains one
- Rephrase to synonyms (e.g., "pub/sub" or "message queue" for pubsub; "forwarding" or "routing" for proxying)
Would you like me to generate alternative wording that avoids these flags?
Also applies to: 338-338
1-705: Comprehensive and well-structured guide.The plugin development guide is excellent—clear progression from concepts through local workflows, practical examples throughout, and helpful cross-references to related documentation. The step-by-step local development section (lines 365–557) and advanced topics are particularly valuable. Once you fix the critical import issue and unblock the pipeline, this is ready to merge.
|
@coderabbitai could we compare the new additions in this PR to an existing file @cli/internal/mcp/instructions-plugin-library-development.md? |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 50098 @tjholm I've compared both files. Here's a detailed analysis: Purpose & AudienceNew doc ( Existing doc ( Content OverlapBoth documents cover:
Key Differences1. Local Development WorkflowThe new doc extensively covers 2. Terminology
Both terms are used but might cause confusion if not aligned. 3. Storage Plugin Interface Discrepancy
|
eeb64e6 to
3f317a1
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
cli/internal/mcp/instructions-plugin-library-development.md (1)
484-484: Add language identifier to output code block.For consistency and proper syntax highlighting, specify the shell output format.
-``` +```text Suga Plugin Development Serverdocs/guides/plugin-development.mdx (1)
704-704: Minor style: simplify phrasing.The phrase "in order to grant" can be tightened to just "to grant" for directness.
-Suga `identity` plugins are a special type of plugin. They're not deployed independently, instead they're attached to `service` plugins, in order to grant that service access to other resources. +Suga `identity` plugins are a special type of plugin. They're not deployed independently, instead they're attached to `service` plugins, to grant that service access to other resources.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
cli/internal/mcp/instructions-plugin-library-development.md(3 hunks)docs/docs.json(1 hunks)docs/guides/plugin-development.mdx(1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: davemooreuws
Repo: nitrictech/suga PR: 29
File: docs/guides/terraform-backend-config.mdx:0-0
Timestamp: 2025-08-28T06:12:17.266Z
Learning: The Suga project uses Mintlify for documentation. Mintlify provides built-in MDX components like <Steps> and <Step> that don't need to be defined or imported in the repository - they're available by default in Mintlify's documentation platform.
📚 Learning: 2025-09-22T21:56:58.994Z
Learnt from: jyecusch
Repo: nitrictech/suga PR: 78
File: docs/docs.json:24-27
Timestamp: 2025-09-22T21:56:58.994Z
Learning: When analyzing docs.json navigation structures, ensure to carefully verify the actual JSON structure before flagging navigation mismatches. The "Core Concepts" and "Resources" groups in docs/docs.json are correctly configured with their corresponding MDX files.
Applied to files:
docs/docs.json
📚 Learning: 2025-10-21T21:25:52.280Z
Learnt from: tjholm
Repo: nitrictech/suga PR: 127
File: client/java/src/main/kotlin/com/addsuga/client/SugaClient.kt:25-41
Timestamp: 2025-10-21T21:25:52.280Z
Learning: The Suga runtime server is always bound to loopback (localhost only) and is never accessible from the public internet. It does not configure TLS. Plaintext gRPC connections are appropriate and expected for client connections to the Suga runtime.
Applied to files:
cli/internal/mcp/instructions-plugin-library-development.md
🪛 GitHub Actions: Test Docs
docs/guides/plugin-development.mdx
[error] 204-204: [Vale.Spelling] Did you really mean 'namespace'?
[error] 205-205: [Vale.Spelling] Did you really mean 'namespace'?
[error] 220-220: [Vale.Spelling] Did you really mean 'namespace'?
[error] 391-391: [Vale.Spelling] Did you really mean 'namespace'?
[error] 445-445: [Vale.Spelling] Did you really mean 'proxying'?
[error] 450-450: [Vale.Spelling] Did you really mean 'pubsub'?
🪛 GitHub Check: Spell Check with Vale
docs/guides/plugin-development.mdx
[failure] 450-450:
[vale] reported by reviewdog 🐶
[Vale.Spelling] Did you really mean 'pubsub'?
Raw Output:
{"message": "[Vale.Spelling] Did you really mean 'pubsub'?", "location": {"path": "docs/guides/plugin-development.mdx", "range": {"start": {"line": 450, "column": 119}}}, "severity": "ERROR"}
[failure] 445-445:
[vale] reported by reviewdog 🐶
[Vale.Spelling] Did you really mean 'proxying'?
Raw Output:
{"message": "[Vale.Spelling] Did you really mean 'proxying'?", "location": {"path": "docs/guides/plugin-development.mdx", "range": {"start": {"line": 445, "column": 18}}}, "severity": "ERROR"}
[failure] 391-391:
[vale] reported by reviewdog 🐶
[Vale.Spelling] Did you really mean 'namespace'?
Raw Output:
{"message": "[Vale.Spelling] Did you really mean 'namespace'?", "location": {"path": "docs/guides/plugin-development.mdx", "range": {"start": {"line": 391, "column": 81}}}, "severity": "ERROR"}
[failure] 220-220:
[vale] reported by reviewdog 🐶
[Vale.Spelling] Did you really mean 'namespace'?
Raw Output:
{"message": "[Vale.Spelling] Did you really mean 'namespace'?", "location": {"path": "docs/guides/plugin-development.mdx", "range": {"start": {"line": 220, "column": 127}}}, "severity": "ERROR"}
[failure] 205-205:
[vale] reported by reviewdog 🐶
[Vale.Spelling] Did you really mean 'namespace'?
Raw Output:
{"message": "[Vale.Spelling] Did you really mean 'namespace'?", "location": {"path": "docs/guides/plugin-development.mdx", "range": {"start": {"line": 205, "column": 45}}}, "severity": "ERROR"}
[failure] 204-204:
[vale] reported by reviewdog 🐶
[Vale.Spelling] Did you really mean 'namespace'?
Raw Output:
{"message": "[Vale.Spelling] Did you really mean 'namespace'?", "location": {"path": "docs/guides/plugin-development.mdx", "range": {"start": {"line": 204, "column": 48}}}, "severity": "ERROR"}
🪛 LanguageTool
docs/guides/plugin-development.mdx
[style] ~704-~704: Consider a more concise word here.
Context: ... they're attached to service plugins, in order to grant that service access to other reso...
(IN_ORDER_TO_PREMIUM)
cli/internal/mcp/instructions-plugin-library-development.md
[grammar] ~5-~5: Use a hyphen to join words.
Context: ...more conceptual explanations and getting started guides, refer users to the [Plug...
(QB_NEW_EN_HYPHEN)
🪛 markdownlint-cli2 (0.18.1)
cli/internal/mcp/instructions-plugin-library-development.md
484-484: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
543-543: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
554-554: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Test
- GitHub Check: Build (windows-latest, amd64)
- GitHub Check: Security Scan
🔇 Additional comments (4)
docs/docs.json (1)
37-37: Navigation entry looks good.The new guide is properly registered in the Guides group within the documentation navigation structure.
docs/guides/plugin-development.mdx (3)
203-206: Clear registration pattern documentation.The Note box correctly distinguishes service (no namespace) vs. storage (with namespace) registration patterns, directly addressing a technical gap identified in the PR review discussion.
224-360: Storage runtime adapter example is accurate.The S3StorageService implementation correctly uses protobuf-generated types (StorageReadRequest, StorageWriteResponse, etc.) with UnimplementedStorageServer embedding, matching the actual interface specifications. The bytes import is present. This directly addresses concerns raised in the previous code review.
445-450: Ignore Vale spelling check false positives.The pipeline reports Vale spelling errors for "namespace," "proxying," and "pubsub" — all valid technical terms used correctly. These are false positives and safe to ignore.
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
cli/internal/mcp/instructions-plugin-library-development.md(3 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: davemooreuws
Repo: nitrictech/suga PR: 29
File: docs/guides/terraform-backend-config.mdx:0-0
Timestamp: 2025-08-28T06:12:17.266Z
Learning: The Suga project uses Mintlify for documentation. Mintlify provides built-in MDX components like <Steps> and <Step> that don't need to be defined or imported in the repository - they're available by default in Mintlify's documentation platform.
📚 Learning: 2025-10-21T21:25:52.280Z
Learnt from: tjholm
Repo: nitrictech/suga PR: 127
File: client/java/src/main/kotlin/com/addsuga/client/SugaClient.kt:25-41
Timestamp: 2025-10-21T21:25:52.280Z
Learning: The Suga runtime server is always bound to loopback (localhost only) and is never accessible from the public internet. It does not configure TLS. Plaintext gRPC connections are appropriate and expected for client connections to the Suga runtime.
Applied to files:
cli/internal/mcp/instructions-plugin-library-development.md
🪛 LanguageTool
cli/internal/mcp/instructions-plugin-library-development.md
[grammar] ~5-~5: Use a hyphen to join words.
Context: ...more conceptual explanations and getting started guides, refer users to the [Plug...
(QB_NEW_EN_HYPHEN)
🪛 markdownlint-cli2 (0.18.1)
cli/internal/mcp/instructions-plugin-library-development.md
484-484: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Build (windows-latest, amd64)
- GitHub Check: Build (macos-latest, arm64)
- GitHub Check: Security Scan
- GitHub Check: Test
🔇 Additional comments (3)
cli/internal/mcp/instructions-plugin-library-development.md (3)
5-5: Clear note directing AI agents to user-facing docs.The note provides appropriate context for AI agents and reduces potential duplication between internal MCP instructions and user-facing guidance.
68-68: Terminology clarification is helpful.Adding "also called 'runtime adapters' in user-facing documentation" explicitly bridges the terminology gap between this internal reference and the user guide, reducing confusion.
458-562: Comprehensive local development workflow section.The new section provides step-by-step guidance on
suga plugin serveandsuga build --replace-library, including practical examples for iteration and custom platforms. Well-structured with clear use cases and multiple replacement options. Aligns the internal docs with the new user-facing plugin development guide.
|
🎉 This PR is included in version 0.4.4 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Closes NIT-443