sinclair 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +4 -5
  3. data/.claude/agents/architect.md +53 -0
  4. data/.claude/agents/docs.md +34 -0
  5. data/.claude/agents/ruby.md +44 -0
  6. data/.claude/agents/security.md +27 -0
  7. data/.claude/configuration/arcanum-repo-config.json +8 -0
  8. data/.claude/configuration/auto-fix-all.json +3 -0
  9. data/.claude/scripts/check_ruby.sh +7 -0
  10. data/.claude/settings.json +10 -0
  11. data/.github/commit_message_template-2.0.md +32 -0
  12. data/.github/commit_message_template.md +8 -0
  13. data/.github/copilot-instructions.md +1 -66
  14. data/.github/pull_request_template.md +17 -0
  15. data/.gitignore +1 -0
  16. data/.rubocop.yml +1 -1
  17. data/AGENTS.md +111 -0
  18. data/CLAUDE.md +1 -0
  19. data/Dockerfile +3 -2
  20. data/Dockerfile.circleci +6 -11
  21. data/Gemfile +10 -9
  22. data/README.md +2 -2
  23. data/config/yardstick.yml +6 -0
  24. data/docs/agents/arcanum-split-issue.md +9 -0
  25. data/docs/agents/architecture.md +96 -0
  26. data/docs/agents/contributing.md +201 -0
  27. data/docs/agents/flow.md +5 -0
  28. data/docs/agents/folder-structure.md +44 -0
  29. data/docs/agents/issue-enhancement.md +10 -0
  30. data/docs/agents/issues/.gitkeep +1 -0
  31. data/docs/agents/plans/.gitkeep +1 -0
  32. data/docs/guides/sinclair/caster.md +33 -0
  33. data/docs/guides/sinclair/comparable.md +26 -0
  34. data/docs/guides/sinclair/complete-example.md +43 -0
  35. data/docs/guides/sinclair/configurable.md +55 -0
  36. data/docs/guides/sinclair/env-settable.md +41 -0
  37. data/docs/guides/sinclair/installation.md +17 -0
  38. data/docs/guides/sinclair/matchers.md +52 -0
  39. data/docs/guides/sinclair/method-builder.md +104 -0
  40. data/docs/guides/sinclair/model.md +75 -0
  41. data/docs/guides/sinclair/options.md +33 -0
  42. data/docs/guides/sinclair-usage.md +39 -0
  43. data/lib/sinclair/caster.rb +1 -1
  44. data/lib/sinclair/core_ext/object.rb +2 -2
  45. data/lib/sinclair/version.rb +1 -1
  46. data/scripts/bump_version.sh +62 -0
  47. data/sinclair.gemspec +1 -1
  48. data/spec/integration/yard/sinclair/caster/cast_spec.rb +1 -1
  49. data/spec/lib/sinclair/config_factory_spec.rb +5 -10
  50. data/spec/lib/sinclair/configurable_spec.rb +3 -6
  51. data/spec/lib/sinclair/method_definition/stringifier_spec.rb +1 -1
  52. data/spec/lib/sinclair/options_parser_spec.rb +1 -1
  53. data/spec/support/models/hash_app_client.rb +1 -2
  54. metadata +37 -8
  55. data/.github/sinclair-usage.md +0 -492
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 85ecbcdf5d1d0426ff0582775a7aba2808c2222c9f4d1dabdd0af6d772c61d0d
4
- data.tar.gz: 4b89ed144b308319c375742e9a590055730a851f447d2c7226a70fa2142d305b
3
+ metadata.gz: 407daea1c8ee68b02c3ea0ab0a1e86b81a46d4895703096a8f4592469d4c0ee6
4
+ data.tar.gz: 12041dc6191063a4299c6140786eaece455ac478210383c1a9c95286d3928dad
5
5
  SHA512:
6
- metadata.gz: acb1735bed6b21b9ed00dc6ec61f2b06b76095b04c933bc1338e21a81b3b026db5748d17e7b2af0a9108a55656e30aba832a0123c03a98123f560e65df175a17
7
- data.tar.gz: c7e3a76d3201db9f73fa3b674794622ba71c780d545cc5108b618a30b53b7b3f551a25306745fa33768ef55c8ebca8bfb9dce5b8db21cd79dcffe3dcd221375a
6
+ metadata.gz: 0e96b26175040f946134638c068e0914bea500be0aa8643dd4761ced346fbfd8d03dff4d785873d54be86cb74ffd260b9a7e567ec000d93b78d0976172450e4f
7
+ data.tar.gz: db9cae6e78d2f94808a6050253de5a6313d10bf20f5c6a93f2882c74f1cb84219435eca766391cb7a5b8ffb4f1e14aad3413bc838b139f3d56f648534b56361d
data/.circleci/config.yml CHANGED
@@ -1,6 +1,5 @@
1
- version: 2
1
+ version: 2.1
2
2
  workflows:
3
- version: 2
4
3
  test-and-build:
5
4
  jobs:
6
5
  - test:
@@ -22,7 +21,7 @@ workflows:
22
21
  jobs:
23
22
  test:
24
23
  docker:
25
- - image: darthjee/circleci_ruby_331:1.1.0
24
+ - image: darthjee/circleci_ruby_3412:1.0.0
26
25
  environment:
27
26
  PROJECT: sinclair
28
27
  steps:
@@ -38,7 +37,7 @@ jobs:
38
37
  command: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r coverage/lcov/project.lcov
39
38
  checks:
40
39
  docker:
41
- - image: darthjee/circleci_ruby_331:1.1.0
40
+ - image: darthjee/circleci_ruby_3412:1.0.0
42
41
  environment:
43
42
  PROJECT: sinclair
44
43
  steps:
@@ -63,7 +62,7 @@ jobs:
63
62
  command: check_specs
64
63
  build-and-release:
65
64
  docker:
66
- - image: darthjee/circleci_ruby_331:1.1.0
65
+ - image: darthjee/circleci_ruby_3412:1.0.0
67
66
  environment:
68
67
  PROJECT: sinclair
69
68
  steps:
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: architect
3
+ description: Sinclair architect and coordinator. Use for cross-cutting tasks, multi-agent coordination, build/CI/release configuration, or any task that spans more than one agent's scope.
4
+ tools: Read, Edit, Write, Bash, Agent
5
+ ---
6
+
7
+ You are the architect and coordinator for the Sinclair project — a Ruby gem providing base classes and utility modules for other gems to build on.
8
+
9
+ ## Your scope
10
+
11
+ Everything not owned by a specialist agent:
12
+
13
+ - `Gemfile`, `sinclair.gemspec`, `Rakefile`, `Makefile`
14
+ - `Dockerfile`, `Dockerfile.circleci`, `docker-compose.yml`
15
+ - `.circleci/config.yml`
16
+ - `.rubocop.yml`, `.rubocop_todo.yml`, `.rspec`
17
+ - `config/` (`check_specs.yml`, `rubycritc.rb`, `yardstick.rb`, `yardstick.yml`)
18
+ - `LICENSE`, `.gitignore`, `sinclair.png`
19
+ - Cross-cutting decisions that span `ruby` and/or `docs`
20
+ - Coordination of the other specialist agents
21
+
22
+ ## Specialist agents
23
+
24
+ Delegate implementation work to the right agent. Never implement what belongs to a specialist yourself.
25
+
26
+ | Agent | Scope |
27
+ |-------|-------|
28
+ | `ruby` | `lib/`, `spec/` — gem source, tests, and inline YARD docs |
29
+ | `docs` | `docs/agents/`, `README.md`, `WARNINGS.md`, `AGENTS.md`, `CLAUDE.md`, `.github/*.md` — all prose documentation |
30
+ | `security` | Read-only, whole repo — flags security concerns, does not fix |
31
+
32
+ ## How to coordinate
33
+
34
+ When a task spans multiple agents:
35
+
36
+ 1. **Break it down** — identify which parts belong to which agent.
37
+ 2. **Sequence or parallelize** — if agents' outputs are independent, run them in parallel; if one depends on the other, sequence them.
38
+ 3. **Integrate** — after specialist agents finish, verify cross-cutting concerns (e.g. a `lib/` change that needs a version bump or CI update).
39
+ 4. **Delegate doc updates** — if an architectural change needs `docs/agents/` updated, ask the `docs` agent to do it rather than editing it yourself.
40
+ 5. **Consult `security` early** on anything touching dynamic code evaluation, env/external input, or dependencies.
41
+
42
+ ## Documentation (`docs/agents/`)
43
+
44
+ | File | Contents |
45
+ |------|----------|
46
+ | [Folder Structure](../../docs/agents/folder-structure.md) | Top-level directory layout and the role of each folder. |
47
+ | [Architecture](../../docs/agents/architecture.md) | Source layout, modules, code style, and implementation guidelines. |
48
+ | [Contributing](../../docs/agents/contributing.md) | Commit guidelines, PR standards, code organization, and refactoring rules. |
49
+ | [Flow](../../docs/agents/flow.md) | Main runtime flow of the application. |
50
+ | [Plans](../../docs/agents/plans/) | Implementation plans for ongoing or upcoming features. |
51
+ | [Issues](../../docs/agents/issues/) | Detailed specs for open issues. |
52
+
53
+ Keep this table's targets accurate. When a new agent is created or its scope changes, ask the `docs` agent to update `AGENTS.md` and `docs/agents/`, and update this file yourself.
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: docs
3
+ description: Sinclair documentation specialist. Use for any task involving docs/agents/, README.md, WARNINGS.md, AGENTS.md, CLAUDE.md, or .github/*.md templates.
4
+ tools: Read, Edit, Write
5
+ ---
6
+
7
+ You are the documentation specialist for the Sinclair project — a Ruby gem providing base classes and utility modules for other gems to build on.
8
+
9
+ ## Your scope
10
+
11
+ You own all prose documentation, wherever it lives:
12
+
13
+ - `docs/agents/` — architecture, folder-structure, flow, contributing, issue-enhancement, plans/, issues/
14
+ - `README.md`, `WARNINGS.md`
15
+ - `AGENTS.md`, `CLAUDE.md`
16
+ - `.github/copilot-instructions.md` and other `.github/*.md` templates
17
+
18
+ Do NOT touch `lib/` or `spec/` (including inline YARD comments) — that belongs to the `ruby` agent. Do NOT touch Gemfile, gemspec, Rakefile, Dockerfiles, or CI config — that belongs to the `architect` agent. Generated docs under `doc/` (YARD build output) are not yours to hand-edit.
19
+
20
+ ## Stack
21
+
22
+ - Markdown
23
+ - YARD-generated API docs live under `doc/` (generated — do not hand-edit; source is inline comments in `lib/`, owned by `ruby`)
24
+
25
+ ## Commands
26
+
27
+ No automated lint/test command exists for documentation in this project. Review changes by reading them for accuracy against the current code and keeping cross-links (e.g. the `## Documentation` table in `AGENTS.md`) up to date.
28
+
29
+ ## Conventions
30
+
31
+ - All documentation must be written in **English**.
32
+ - Keep `docs/agents/folder-structure.md`, `architecture.md`, and `contributing.md` in sync with the actual codebase.
33
+ - If a `docs/agents/*.md` file grows too large, split it into a same-named folder with linked sub-files (e.g. `docs/agents/flow/` linked from `docs/agents/flow.md`) instead of letting one file grow unbounded.
34
+ - Keep the `## Documentation` table in `AGENTS.md` in sync with the files that exist under `docs/agents/`.
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: ruby
3
+ description: Sinclair Ruby specialist. Use for any task involving lib/, spec/, or inline YARD documentation.
4
+ tools: Read, Edit, Write, Bash
5
+ ---
6
+
7
+ You are the Ruby specialist for the Sinclair project — a Ruby gem providing base classes and utility modules (method building, config, options, env settings, comparable, model, RSpec matchers) for other gems to build on.
8
+
9
+ ## Your scope
10
+
11
+ You own everything inside `lib/` and `spec/`, including inline YARD doc-comments within `lib/` source files:
12
+
13
+ - `lib/sinclair.rb` and `lib/sinclair/**` — gem source code
14
+ - `spec/**` — RSpec test suite, mirroring `lib/`'s structure
15
+
16
+ Do NOT touch `docs/agents/`, `README.md`, `WARNINGS.md`, `AGENTS.md`, `CLAUDE.md`, `.github/*.md`, or any file outside `lib/`/`spec/` — those belong to the `docs` agent. Do NOT touch Gemfile, gemspec, Rakefile, Dockerfiles, CI config, or other root-level project files — those belong to the `architect` agent.
17
+
18
+ ## Stack
19
+
20
+ - Ruby (>= 3.4.0), ActiveSupport
21
+ - RSpec for tests
22
+ - Rubocop for linting
23
+ - YARD / Yardstick for inline documentation and doc-coverage
24
+
25
+ ## Commands
26
+
27
+ Always run these through docker-compose, never with the host's Ruby:
28
+
29
+ ```bash
30
+ docker-compose run --rm sinclair bundle exec rspec
31
+ docker-compose run --rm sinclair rubocop
32
+ docker-compose run --rm sinclair bundle exec rake verify_measurements
33
+ ```
34
+
35
+ ## Conventions
36
+
37
+ - Follow **Clean Code** principles: clear naming, small focused methods, minimal duplication.
38
+ - Follow **Sandi Metz** rules: small single-responsibility classes, short methods, respect the Law of Demeter.
39
+ - Document all public methods and classes with **YARD** doc-comments.
40
+ - **At least one spec per source file** (exceptions listed in `config/check_specs.yml`).
41
+ - **Avoid mocks** — prefer real objects and stubs only when there's no reasonable alternative.
42
+ - **One expectation per example.**
43
+ - Public methods before private methods within a class.
44
+ - One class/module per file, file named in snake_case matching the class/module name (see `docs/agents/contributing.md`).
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: security
3
+ description: Sinclair security reviewer. Read-only advisory agent — use to flag security concerns anywhere in the repo. Does not fix issues itself.
4
+ tools: Read, Grep, Glob, Bash
5
+ ---
6
+
7
+ You are the security reviewer for the Sinclair project — a Ruby gem providing base classes and utility modules for other gems to build on.
8
+
9
+ ## Your scope
10
+
11
+ You review the **entire repository**, read-only. You do not own any files and must never edit or write code — your job is to identify and clearly report security concerns to the `architect` or the relevant specialist agent (`ruby` or `docs`), who will decide how to address them.
12
+
13
+ Pay particular attention to:
14
+
15
+ - Dynamic code evaluation: `lib/sinclair/method_definition/`, `lib/sinclair/method_builder/`, and anywhere `eval`, `instance_eval`, `class_eval`, or string-built method bodies are used — check whether user-controlled input can reach them.
16
+ - `lib/sinclair/settable/` and `lib/sinclair/env_settable.rb` — env var / external input handling and casting (`lib/sinclair/caster/`).
17
+ - Dependency risk: `Gemfile`, `Gemfile.lock`, `sinclair.gemspec` — outdated or known-vulnerable gem versions.
18
+ - CI/release secrets handling in `.circleci/config.yml` and `build_gem.sh`-style release steps.
19
+
20
+ ## Commands
21
+
22
+ No security-scanning gem (e.g. `bundler-audit`) is currently in the `Gemfile`. Perform manual review: `grep`/`Read` for risky patterns and cross-check dependency versions in `Gemfile.lock` by eye. If recurring findings would benefit from an automated scanner, report that as a recommendation to `architect` rather than adding the dependency yourself.
23
+
24
+ ## Conventions
25
+
26
+ - Report findings, don't fix them — you have no `Edit`/`Write` tools by design.
27
+ - For each finding: cite the file/line, describe the concrete risk (not just "this looks unsafe"), and suggest which agent should own the fix.
@@ -0,0 +1,8 @@
1
+ {
2
+ "auto-fix-all": {
3
+ "ignored_check_patterns": [
4
+ "Codacy"
5
+ ]
6
+ },
7
+ "version": "2.4.0"
8
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "ignored_check_patterns": ["Codacy"]
3
+ }
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ set -x
4
+
5
+ bundle exec rspec
6
+ rubocop
7
+ bundle exec rake verify_measurements
@@ -0,0 +1,10 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(auto-fix-all/scripts/wait_ci_and_merge.sh *)",
5
+ "Bash(auto-fix-issue/scripts/commit_change.sh *)",
6
+ "Bash(auto-fix-issue/scripts/run_checks.sh *)",
7
+ "Bash(git add *)"
8
+ ]
9
+ }
10
+ }
@@ -0,0 +1,32 @@
1
+ ```text
2
+ <type>(<scope>): <subject> (issue #<id>)
3
+
4
+ <optional body: what was done and why, if not obvious>
5
+
6
+ Addresses-Comment: <optional: URL of the PR comment this commit addresses>
7
+
8
+ Co-Authored-By: <AI model name> <AI model email>
9
+ Co-Authored-By: <agent> agent <agent email>
10
+ ```
11
+
12
+ Note: unlike the model line above (always the running AI model's own
13
+ canonical noreply address), the agent line's email is independently
14
+ configurable per agent via the "git.email" key (a template such as
15
+ "you+{agent}@example.com", with "{agent}" substituted for the actual
16
+ agent name, e.g. "architect" or "backend") in
17
+ .claude/state/arcanum-config.json (local) or
18
+ .claude/configuration/arcanum-repo-config.json (repo) — see
19
+ docs/guides/arcanum-repo-config.md. When "git.email" is unset, the agent
20
+ line falls back to the same address as the model line, reproducing the
21
+ old, single-shared-email template's output.
22
+
23
+ The model line above can be omitted entirely by setting the
24
+ "git.omit_model_coauthor" key to "true" in the same three locations
25
+ (local state, repo config, or global config — see
26
+ docs/guides/arcanum-repo-config.md) — the agent line is always still
27
+ emitted regardless of this setting.
28
+
29
+ This file's mere presence (as "commit_message_template-2.0.md", not its
30
+ content) is what switches the commit scripts onto this new, two-distinct-
31
+ email behavior — the content itself is never parsed at runtime, it is
32
+ purely human-facing documentation of the shape above.
@@ -0,0 +1,8 @@
1
+ <type>(<scope>): <subject> (issue #<id>)
2
+
3
+ <optional body: what was done and why, if not obvious>
4
+
5
+ Addresses-Comment: <optional: URL of the PR comment this commit addresses>
6
+
7
+ Co-Authored-By: <AI model name> <AI model email>
8
+ Co-Authored-By: <agent> agent <AI model email>
@@ -1,66 +1 @@
1
- # GitHub Copilot Instructions for Sinclair
2
-
3
- ## Project Purpose
4
-
5
- Sinclair is a Ruby gem that serves as a **foundation for developing other gems** by providing base classes and utility modules. It supplies:
6
-
7
- - A method builder (`Sinclair`) for dynamically adding instance and class methods to any class.
8
- - `Sinclair::Configurable` / `Sinclair::Config` for adding configuration to classes and modules.
9
- - `Sinclair::Options` for structured, validated option objects.
10
- - `Sinclair::EnvSettable` for reading environment variables through class methods.
11
- - `Sinclair::Comparable` for easy `==` comparisons based on selected attributes.
12
- - `Sinclair::Model` for quick creation of simple plain-Ruby model classes (using `initialize_with` inside the class body or `.for` as an inline subclassing helper).
13
- - RSpec matchers (`Sinclair::Matchers`) to test method-building behaviour.
14
-
15
- All PRs, code, comments, and documentation must be written in **English**.
16
-
17
- ## Development Workflow
18
-
19
- Development runs inside **Docker** using **docker-compose**.
20
-
21
- - **Enter the development environment:**
22
- ```bash
23
- make dev
24
- ```
25
- This runs `docker-compose run sinclair /bin/bash`, dropping you into an interactive shell inside the container with the project mounted at `/home/app/app`.
26
-
27
- - The Docker image is built from `Dockerfile`; a CircleCI-specific image is available via `Dockerfile.circleci`.
28
-
29
- ## Tooling & CI
30
-
31
- The CI pipeline (`.circleci/config.yml`) runs the following checks on every PR:
32
-
33
- - **RSpec** – unit/integration test suite:
34
- ```bash
35
- bundle exec rspec
36
- ```
37
- - **Rubocop** – Ruby style and linting:
38
- ```bash
39
- rubocop
40
- ```
41
- - **Yardstick** – documentation coverage check:
42
- ```bash
43
- bundle exec rake verify_measurements
44
- ```
45
- - **YARD** – API documentation is generated with YARD:
46
- ```bash
47
- yard
48
- ```
49
-
50
- All four checks must pass before a PR can be merged.
51
-
52
- ## Testing Guidelines
53
-
54
- - **Aim for at least one spec per source file.** Files explicitly excluded from this requirement are listed in `config/check_specs.yml`.
55
- - **Avoid mocks.** Prefer real objects and stubs only when there is no reasonable alternative.
56
- - **One expectation per example.** Keep each `it` block focused on a single assertion.
57
- - Place specs under `spec/` mirroring the structure of `lib/`.
58
-
59
- ## Code Quality & Style
60
-
61
- - Follow **Clean Code** principles: clear naming, small focused methods, and minimal duplication.
62
- - Follow **Sandi Metz** Ruby rules:
63
- - Classes should be small and have a **single responsibility**.
64
- - Methods should be short and do one thing.
65
- - Respect the **Law of Demeter** – avoid long method chains that reach through unrelated objects.
66
- - Document all public methods and classes with **YARD** doc-comments.
1
+ See [AGENTS.md](../AGENTS.md) for project instructions.
@@ -0,0 +1,17 @@
1
+ ## Summary
2
+
3
+ <!-- One sentence describing what this PR does -->
4
+
5
+ ## Problem
6
+
7
+ <!-- What problem does this solve? Why is this change needed? -->
8
+
9
+ ## Solution
10
+
11
+ <!-- How was the problem solved? What approach was taken? -->
12
+
13
+ ## Details
14
+
15
+ <!-- Optional: implementation notes, migration steps, caveats. Remove this section if not needed. -->
16
+
17
+ Fixes #
data/.gitignore CHANGED
@@ -7,3 +7,4 @@ doc
7
7
  measurement/
8
8
  **/*.swp
9
9
  rubycritic/
10
+ .claude/state/
data/.rubocop.yml CHANGED
@@ -2,7 +2,7 @@ require: rubocop-rspec
2
2
  inherit_from: .rubocop_todo.yml
3
3
 
4
4
  AllCops:
5
- TargetRubyVersion: 3.3
5
+ TargetRubyVersion: 3.4
6
6
  NewCops: enable
7
7
 
8
8
  RSpec/DescribeClass:
data/AGENTS.md ADDED
@@ -0,0 +1,111 @@
1
+ # GitHub Copilot Instructions for Sinclair
2
+
3
+ ## Project Purpose
4
+
5
+ Sinclair is a Ruby gem that serves as a **foundation for developing other gems** by providing base classes and utility modules. It supplies:
6
+
7
+ - A method builder (`Sinclair`) for dynamically adding instance and class methods to any class.
8
+ - `Sinclair::Configurable` / `Sinclair::Config` for adding configuration to classes and modules.
9
+ - `Sinclair::Options` for structured, validated option objects.
10
+ - `Sinclair::EnvSettable` for reading environment variables through class methods.
11
+ - `Sinclair::Comparable` for easy `==` comparisons based on selected attributes.
12
+ - `Sinclair::Model` for quick creation of simple plain-Ruby model classes (using `initialize_with` inside the class body or `.for` as an inline subclassing helper).
13
+ - RSpec matchers (`Sinclair::Matchers`) to test method-building behaviour.
14
+
15
+ All PRs, code, comments, and documentation must be written in **English**.
16
+
17
+ ## Development Workflow
18
+
19
+ Development runs inside **Docker** using **docker-compose**.
20
+
21
+ - **Enter the development environment:**
22
+ ```bash
23
+ make dev
24
+ ```
25
+ This runs `docker-compose run sinclair /bin/bash`, dropping you into an interactive shell inside the container with the project mounted at `/home/app/app`.
26
+
27
+ - **Always run specs and checks through docker-compose**, never with the host's Ruby. The container provides the Ruby version and gems CI uses. Either run the commands from inside `make dev`, or one-off:
28
+ ```bash
29
+ docker-compose build base_build # (re)build the image after Gemfile/Dockerfile changes
30
+ docker-compose run --rm sinclair bundle exec rspec
31
+ docker-compose run --rm sinclair rubocop
32
+ ```
33
+ All commands listed under [Tooling & CI](#tooling--ci) are meant to be run inside the container.
34
+
35
+ - The Docker image is built from `Dockerfile`; a CircleCI-specific image is available via `Dockerfile.circleci`.
36
+
37
+ ## Tooling & CI
38
+
39
+ The CI pipeline (`.circleci/config.yml`) runs the following checks on every PR:
40
+
41
+ - **RSpec** – unit/integration test suite:
42
+ ```bash
43
+ bundle exec rspec
44
+ ```
45
+ - **Rubocop** – Ruby style and linting:
46
+ ```bash
47
+ rubocop
48
+ ```
49
+ - **Yardstick** – documentation coverage check:
50
+ ```bash
51
+ bundle exec rake verify_measurements
52
+ ```
53
+ - **YARD** – API documentation is generated with YARD:
54
+ ```bash
55
+ yard
56
+ ```
57
+
58
+ All four checks must pass before a PR can be merged.
59
+
60
+ ## Testing Guidelines
61
+
62
+ - **Aim for at least one spec per source file.** Files explicitly excluded from this requirement are listed in `config/check_specs.yml`.
63
+ - **Avoid mocks.** Prefer real objects and stubs only when there is no reasonable alternative.
64
+ - **One expectation per example.** Keep each `it` block focused on a single assertion.
65
+ - Place specs under `spec/` mirroring the structure of `lib/`.
66
+
67
+ ## Code Quality & Style
68
+
69
+ - Follow **Clean Code** principles: clear naming, small focused methods, and minimal duplication.
70
+ - Follow **Sandi Metz** Ruby rules:
71
+ - Classes should be small and have a **single responsibility**.
72
+ - Methods should be short and do one thing.
73
+ - Respect the **Law of Demeter** – avoid long method chains that reach through unrelated objects.
74
+ - Document all public methods and classes with **YARD** doc-comments.
75
+
76
+ ## Documentation
77
+
78
+ All project documentation lives under [`docs/agents/`](docs/agents/):
79
+
80
+ | File | Contents |
81
+ |------|----------|
82
+ | [Folder Structure](docs/agents/folder-structure.md) | Top-level directory layout and the role of each folder. |
83
+ | [Architecture](docs/agents/architecture.md) | Source layout, modules, code style, and implementation guidelines. |
84
+ | [Contributing](docs/agents/contributing.md) | Commit guidelines, PR standards, code organization, and refactoring rules. |
85
+ | [Flow](docs/agents/flow.md) | Main runtime flow of the application. |
86
+ | [Plans](docs/agents/plans/) | Implementation plans for ongoing or upcoming features. |
87
+ | [Issues](docs/agents/issues/) | Detailed specs for open issues. |
88
+
89
+ ### Issues (`docs/agents/issues/`)
90
+
91
+ Each file documents an issue in detail. Naming convention:
92
+
93
+ ```
94
+ docs/agents/issues/<issue_id>_<issue_name>.md
95
+ ```
96
+
97
+ Example: `docs/agents/issues/5_release_docker_image.md` for issue #5.
98
+
99
+ ### Plans (`docs/agents/plans/`)
100
+
101
+ Each plan is a directory named after the issue ID and topic, containing one or more related files:
102
+
103
+ ```
104
+ docs/agents/plans/<issue_id>_<topic>/<related_files>.md
105
+ ```
106
+
107
+ Example: `docs/agents/plans/12_add-auth/plan.md` for issue #12.
108
+
109
+ ## Commit Attribution
110
+
111
+ Commit co-author trailers follow arcanum's resolved `git.omit_model_coauthor` and `git.remove_coauthors` config (check them with `/arcanum-check-config`); this overrides Claude Code's own attribution reminder for every commit, including ones written by hand.
data/CLAUDE.md ADDED
@@ -0,0 +1 @@
1
+ See [AGENTS.md](AGENTS.md) for project instructions.
data/Dockerfile CHANGED
@@ -1,5 +1,6 @@
1
- FROM darthjee/scripts:0.6.0 as scripts
2
- FROM darthjee/ruby_331:1.1.0 as base
1
+ FROM darthjee/scripts:0.15.0 as scripts
2
+
3
+ FROM darthjee/ruby_3412:1.0.0 as base
3
4
 
4
5
  COPY --chown=app:app ./ /home/app/app/
5
6
 
data/Dockerfile.circleci CHANGED
@@ -1,17 +1,17 @@
1
- FROM darthjee/scripts:0.3.1 as scripts
1
+ FROM darthjee/scripts:0.15.0 AS scripts
2
2
 
3
- FROM darthjee/circleci_ruby_270:1.2.0 as base
3
+ FROM darthjee/circleci_ruby_3412:1.0.0 AS base
4
4
 
5
- COPY --chown=app:app ./ /home/circleci/project/
5
+ COPY --chown=circleci:circleci ./ /home/circleci/project/
6
6
 
7
7
  ######################################
8
8
 
9
- FROM base as builder
9
+ FROM base AS builder
10
10
 
11
11
  COPY --chown=circleci:circleci --from=scripts /home/scripts/builder/bundle_builder.sh /usr/local/sbin/bundle_builder.sh
12
12
 
13
- ENV PROJECT sinclair
14
- ENV HOME_DIR /home/circleci
13
+ ENV PROJECT=sinclair
14
+ ENV HOME_DIR=/home/circleci
15
15
  RUN bundle_builder.sh
16
16
 
17
17
  #######################
@@ -20,9 +20,4 @@ FROM base
20
20
 
21
21
  COPY --chown=circleci:circleci --from=builder /home/circleci/bundle/ /home/circleci/.rubygems/
22
22
 
23
- COPY --chown=circleci:circleci --from=scripts /home/scripts/sbin/rubycritic.sh /usr/local/sbin/
24
- COPY --chown=circleci:circleci --from=scripts /home/scripts/sbin/check_specs /usr/local/sbin/
25
- COPY --chown=circleci:circleci --from=scripts /home/scripts/sbin/check_readme.sh /usr/local/sbin/
26
- COPY --chown=circleci:circleci --from=scripts /home/scripts/sbin/build_gem.sh /usr/local/sbin/
27
-
28
23
  RUN bundle install
data/Gemfile CHANGED
@@ -4,21 +4,22 @@ source 'https://rubygems.org'
4
4
 
5
5
  gemspec
6
6
 
7
- gem 'bundler', '>= 2.5.13'
7
+ gem 'bundler', '>= 4.0.24'
8
8
  gem 'pry', '0.14.2'
9
9
  gem 'pry-nav', '1.0.0'
10
- gem 'rake', '13.2.1'
10
+ gem 'rake', '13.4.2'
11
11
  gem 'reek', '6.5.0'
12
12
  gem 'rspec', '3.13.2'
13
- gem 'rspec-core', '3.13.6'
14
- gem 'rspec-expectations', '3.13.5'
15
- gem 'rspec-mocks', '3.13.8'
16
- gem 'rspec-support', '3.13.7'
17
- gem 'rubocop', '1.85.1'
18
- gem 'rubocop-rspec', '3.9.0'
13
+ gem 'rspec-core', '3.13.7'
14
+ gem 'rspec-expectations', '3.13.6'
15
+ gem 'rspec-mocks', '3.13.9'
16
+ gem 'rspec-support', '3.13.8'
17
+ gem 'rubocop', '1.92.2'
18
+ gem 'rubocop-rake', '0.7.1'
19
+ gem 'rubocop-rspec', '3.10.2'
19
20
  gem 'rubycritic', '5.0.0'
20
21
  gem 'simplecov', '0.22.0'
21
22
  gem 'simplecov-html', '0.13.2'
22
23
  gem 'simplecov-lcov', '0.9.0'
23
- gem 'yard', '0.9.38'
24
+ gem 'yard', '0.9.45'
24
25
  gem 'yardstick', '0.9.9'
data/README.md CHANGED
@@ -13,13 +13,13 @@ create custom comparators, configure your application, create powerfull options,
13
13
 
14
14
  Employing Sinclair in your applications helps you streamline your development workflow and enhance your development process through more efficient, cleaner code
15
15
 
16
- **Current Release**: [3.1.0](https://github.com/darthjee/sinclair/tree/3.1.0)
16
+ **Current Release**: [3.2.0](https://github.com/darthjee/sinclair/tree/3.2.0)
17
17
 
18
18
  **Next release** [3.2.0](https://github.com/darthjee/sinclair/compare/3.1.0...main)
19
19
 
20
20
  Yard Documentation
21
21
  -------------------
22
- [https://www.rubydoc.info/gems/sinclair/3.0.1](https://www.rubydoc.info/gems/sinclair/3.1.0)
22
+ [https://www.rubydoc.info/gems/sinclair/3.2.0](https://www.rubydoc.info/gems/sinclair/3.2.0)
23
23
 
24
24
  Installation
25
25
  ---------------
data/config/yardstick.yml CHANGED
@@ -41,6 +41,12 @@ rules:
41
41
  - Sinclair::Model.initialize_with
42
42
  - Sinclair::Settable#setting_with_options
43
43
  - Sinclair::Settable::Builder#read_block
44
+ - Sinclair::ChainSettable#source
45
+ - Sinclair::ChainSettable#sources
46
+ - Sinclair::ConfigFactory#config
47
+ - Sinclair::EnvSettable#settings_prefix
48
+ - Sinclair::Options#initialize
49
+ - Sinclair::Settable#with_settings
44
50
  ReturnTag:
45
51
  enabled: true
46
52
  exclude:
@@ -0,0 +1,9 @@
1
+ # Arcanum Split Issue
2
+
3
+ A checklist of concerns to consider when splitting a broad issue into sub-issues via `/arcanum-split-issue`. Not exhaustive — adjust or extend the list for this project's needs.
4
+
5
+ - **Sub-issue granularity** — is each sub-issue independently workable, or does it still depend on another sub-issue landing first?
6
+ - **Standalone clarity** — does each sub-issue stand on its own, without requiring the reader to have the parent issue open to understand it?
7
+ - **Shared contracts** — interfaces, schemas, or config keys touched by more than one sub-issue, and who owns getting them right first.
8
+ - **Sequencing** — is there a natural order sub-issues should be implemented/merged in, or can they proceed in parallel?
9
+ - **Responsible agents** — which specialist agent(s) each sub-issue is likely to fall to.