Skip to content

Conversation

@phorcys420
Copy link
Member

Summary

This PR standardizes all module documentation examples to use coder_agent.main instead of coder_agent.example, aligning with the most common template convention.

Problem

Currently, there's an inconsistency between template definitions and module documentation:

  • Templates: 78% (21 of 27) use "main" as the agent name
  • Module documentation: Most of examples use "example" as a placeholder, which doesn't exist in any templates, except some modules who already use "main"

This creates friction when users copy examples from module docs into their templates that use main as the agent name.

Solution

Update all module documentation to use coder_agent.main since:

  1. It matches the most common convention (21 of 27 existing templates)
  2. Creates consistency between docs and real-world usage
  3. Reduces the need for users to edit copy-pasted examples

Changes

Module Documentation (52 files)

  • ✅ Updated 50+ module README.md files from coder_agent.examplecoder_agent.main
  • ✅ Updated root README.md
  • ✅ Updated CONTRIBUTING.md
  • ✅ Updated examples/templates/main.tf

What's NOT in this PR

❌ Template changes - Templates are left as-is to avoid breaking existing workspaces
❌ Linting rules - Will be addressed separately if desired

Impact

Zero breaking changes: Only documentation is updated
Better DX: Copy-paste examples work with 78% of existing templates
Consistency: Documentation now matches the de facto standard

Testing

  • ✅ All changes verified with git diff
  • ✅ Only modified documentation files (52 files changed)
  • ✅ 200 insertions, 200 deletions (pure substitution)

Related

This addresses the documentation inconsistency identified in the registry audit. Template standardization can be addressed in a future PR if desired.

PR by @phorcys420
Non-blink follow-up to #566

@phorcys420
Copy link
Member Author

phorcys420 commented Nov 26, 2025

just did find&replace of coder_agent\.(.*)\.id to coder_agent.main.id, all changes seem to be correct, and untouched modules already were using coder_agent.main.id or didn't need an agent

@phorcys420 phorcys420 enabled auto-merge (squash) November 26, 2025 19:32
@phorcys420 phorcys420 requested review from DevelopmentCats and matifali and removed request for DevelopmentCats November 26, 2025 19:32
@phorcys420 phorcys420 merged commit 7c4ef92 into main Nov 26, 2025
4 checks passed
@phorcys420 phorcys420 deleted the phorcys420/standardize-agent-name-in-modules branch November 26, 2025 19:37
@matifali
Copy link
Member

Thanks @phorcys420, a good follow-up would be to update all example templates to use main as the name for the coder_agent resource.

@phorcys420
Copy link
Member Author

@matifali yes that is planned too, just didn't do it yet as it needed more testing

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.

3 participants