Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 11, 2025

Completed: Add guidance for plugins vs config options in emitters

  • Explore repository structure and understand emitter documentation
  • Add new section in emitters-basics.md about when to use plugins vs config options
  • Format and validate changes (passes Prettier)
  • Build and verify website with new documentation (builds successfully)
  • Address PR feedback: Remove unclear example section
  • Address PR feedback: Remove vague "trade-offs" line

Summary

Added a new "Plugins vs. config options" section to the emitters-basics documentation (placed after "Emitter options vs. decorators" section). The guidance includes:

Plugins

Composable sets of visitors/components for specific scenarios:

  • Cohesive transformations working together
  • Distinct use cases (client/server/docs generation)
  • Enable/disable as a unit
  • Reusable across emitters

Config Options

Independent flags that can be mixed and matched:

  • Individual toggleable features
  • Behavior/output characteristics
  • Different flag combinations
  • Simple toggles/values

Best Practice

Enable features by default; only add configuration when:

  • Different users have different needs
  • Backward compatibility requires opt-in

Updates:

  • Removed example section per PR feedback (didn't provide clear guidance)
  • Removed vague "trade-offs" line per PR feedback
Original prompt

This section details on the original issue you should resolve

<issue_title>Add guidance around when to use plugins vs config options</issue_title>
<issue_description>Ideally we just turn a feature on, but if it needs to be configurable, we should have some guidance on when to use plugins vs config options in an emitter. </issue_description>

Comments on the Issue (you are @copilot in this section)

@JoshLove-msft Plugins are more like a composable set of visitors, e.g. https://github.com/Azure/azure-sdk-for-net/tree/main/eng/packages/plugins/client/Client.Plugin that are targeted towards a specific scenario. Config options should be flags that we may want to mix and match. If possible, we should just enable a feature without using a flag.

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Added a new section in the emitters-basics documentation explaining when to use plugins versus configuration options. This includes:
- Clear definitions of plugins (composable visitor sets for specific scenarios)
- When to use config options (independent toggleable features)
- Best practices for avoiding unnecessary configuration
- Practical examples to help emitter authors make the right choice

Co-authored-by: JoshLove-msft <[email protected]>
Copilot AI changed the title [WIP] Add guidance on using plugins versus config options Add guidance for plugins vs config options in emitters Nov 12, 2025
Copilot finished work on behalf of JoshLove-msft November 12, 2025 00:02
Copilot AI requested a review from JoshLove-msft November 12, 2025 00:02
- The feature has trade-offs that different users might evaluate differently
- Backward compatibility requires making a change opt-in

For example, if you're adding support for generating additional utility functions, consider whether this should be:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot this is not a good example and we don't even provide guidance on which route to take. We should remove this section.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the example section in 32c6293.

**Best practice:** Whenever possible, enable features by default without requiring configuration. Only add configuration when:

- Different users have genuinely different needs or preferences
- The feature has trade-offs that different users might evaluate differently
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot This is kind of meaningless

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the vague "trade-offs" line in 7da3f14.

As requested in PR feedback, removed the example section (lines 159-163) that didn't provide clear guidance on which route to take.

Co-authored-by: JoshLove-msft <[email protected]>
Removed the unclear "trade-offs" line from best practices as it didn't provide actionable guidance.

Co-authored-by: JoshLove-msft <[email protected]>
Copilot finished work on behalf of JoshLove-msft November 12, 2025 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add guidance around when to use plugins vs config options

2 participants