Skip to content

Add .github/sinclair-usage.md for Copilot context in dependent projects#118

Merged
darthjee merged 2 commits intomainfrom
copilot/add-sinclair-usage-doc
Mar 7, 2026
Merged

Add .github/sinclair-usage.md for Copilot context in dependent projects#118
darthjee merged 2 commits intomainfrom
copilot/add-sinclair-usage-doc

Conversation

Copy link
Contributor

Copilot AI commented Mar 7, 2026

Other projects that depend on sinclair need a reference file they can drop into their own .github/ folder so GitHub Copilot understands how to use the gem correctly.

Changes

  • Adds .github/sinclair-usage.md — a self-contained usage guide covering every public-facing feature of the gem with annotated code examples:
    • Sinclair builder: stand-alone, block DSL, string/block/call method definitions, result caching, and subclassing for custom builders
    • Sinclair::Configurable / Sinclair::Config: read-only config with defaults, reset, as_options, and custom config classes
    • Sinclair::Options: validated keyword-argument objects with defaults and InvalidOptions on unknown keys
    • Sinclair::EnvSettable: ENV vars as class methods with prefix and type casting
    • Sinclair::Comparable: attribute-based == via comparable_by
    • Sinclair::Model: quick plain-Ruby models with initialize_with, writter:, and comparable: options
    • Sinclair::Caster: named and class-keyed type-casting registry
    • Sinclair::Matchers: RSpec matchers for testing builders (add_method, add_class_method, change_method, change_class_method)
    • A combined end-to-end example

writter: is intentionally spelled that way throughout — it is the gem's actual keyword argument name.

Original prompt

Preciso que você abra um novo pr em darthjee/sinclair. Na pasta. .github, coloque um arquivo, sinclair-usage.md, que será instruções de como outros projetos devem usar a gem. Basicamente, irei copiar este arquivo na pasta .github em outros projetos para que o copilot saiba como usar a gem


💡 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.

Co-authored-by: darthjee <3843066+darthjee@users.noreply.github.com>
Copilot AI changed the title [WIP] Add sinclair usage instructions in README Add .github/sinclair-usage.md for Copilot context in dependent projects Mar 7, 2026
@darthjee darthjee marked this pull request as ready for review March 7, 2026 18:44
@darthjee darthjee merged commit fe1da8d into main Mar 7, 2026
5 checks passed
darthjee added a commit that referenced this pull request Mar 8, 2026
…ts (#118)

* Initial plan

* Add .github/sinclair-usage.md usage guide for dependent projects

Co-authored-by: darthjee <3843066+darthjee@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: darthjee <3843066+darthjee@users.noreply.github.com>
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.

2 participants