jace 0.1.2 → 1.0.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 (41) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +7 -8
  3. data/.claude/agents/architect.md +56 -0
  4. data/.claude/agents/docs.md +35 -0
  5. data/.claude/agents/ruby.md +43 -0
  6. data/.claude/agents/security.md +26 -0
  7. data/.claude/configuration/arcanum-repo-config.json +9 -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 -99
  14. data/.github/pull_request_template.md +17 -0
  15. data/.gitignore +1 -0
  16. data/AGENTS.md +140 -0
  17. data/CLAUDE.md +1 -0
  18. data/Dockerfile +3 -2
  19. data/Gemfile +9 -9
  20. data/README.md +3 -3
  21. data/docs/agents/arcanum-split-issue.md +9 -0
  22. data/docs/agents/architecture.md +46 -0
  23. data/docs/agents/contributing.md +207 -0
  24. data/docs/agents/flow.md +27 -0
  25. data/docs/agents/folder-structure.md +60 -0
  26. data/docs/agents/issue-enhancement.md +10 -0
  27. data/docs/agents/issues/.gitkeep +1 -0
  28. data/docs/agents/plans/.gitkeep +1 -0
  29. data/docs/guides/jace/api-reference.md +20 -0
  30. data/docs/guides/jace/basic-usage.md +40 -0
  31. data/docs/guides/jace/core-concepts.md +43 -0
  32. data/docs/guides/jace/execution-model.md +19 -0
  33. data/docs/guides/jace/handlers.md +61 -0
  34. data/docs/guides/jace/installation.md +23 -0
  35. data/docs/guides/jace/integration-pattern.md +32 -0
  36. data/docs/guides/jace-usage.md +24 -0
  37. data/lib/jace/version.rb +1 -1
  38. data/scripts/bump_version.sh +62 -0
  39. data/spec/integration/yard/jace/registry_spec.rb +1 -2
  40. metadata +33 -7
  41. data/.github/jace-usage.md +0 -241
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: edbe47ae577217615eeb4e52e32e153b9ace099df742a18f83011531a2d25a2a
4
- data.tar.gz: d014449186c5277a9a3affc9a97a4af06d5fd38fdb14589960561ddd3c6f4ba6
3
+ metadata.gz: 92f09386ab75f222e75583f5440bfaba2aad7e9a9efbdeeee054e146fd275861
4
+ data.tar.gz: 8baf1b6564998cae28d548a086f38fb9e0e8a6207af97094c843809f385ce599
5
5
  SHA512:
6
- metadata.gz: 317fc86a9bbbec76b9a503b977cf5c11d9de4e31f24c20b23a4498d6d667723e956f471d356f549ee8c28b0674c8a69f077cc0bd271cd18dd985b6dd1244d564
7
- data.tar.gz: 4191ed6b5339fd9feb83cec5a2f6478cd16a083c47c4817226cf856e65722a502964f5db2f6a272a58e96c3a043affaa80380ceb324c4c4e6e0afba0764c2473
6
+ metadata.gz: 8c006578074156da6fd61a0d8782889ffec7f584183dac634bcedb405624e82b325af4dc49d2574a5c6e68b766672065aae0df295c3ebe827e70144aac867a29
7
+ data.tar.gz: 3b135e63e1a2606433f455f23c67912e6345e57fa7cadd49397dbfdd9062c99fc0d129a792d3f93a1be4ce8dcf1a485f30b56f76a007306923fa446d5732c6a6
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: jace
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: jace
44
43
  steps:
@@ -54,7 +53,7 @@ jobs:
54
53
  command: bundle exec rake verify_measurements
55
54
  - run:
56
55
  name: Check version documentation
57
- command: check_readme.sh
56
+ command: PROJECT=jace check_readme.sh
58
57
  - run:
59
58
  name: Rubycritcs check
60
59
  command: rubycritic.sh
@@ -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: jace
69
68
  steps:
@@ -76,7 +75,7 @@ jobs:
76
75
  command: build_gem.sh signin
77
76
  - run:
78
77
  name: Build Gem
79
- command: build_gem.sh build
78
+ command: PROJECT=jace build_gem.sh build
80
79
  - run:
81
80
  name: Push Gem
82
- command: build_gem.sh push
81
+ command: PROJECT=jace build_gem.sh push
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: architect
3
+ description: Jace 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 Jace project — a Ruby gem for in-process,
8
+ event-driven development (register `before`/`after` handlers for named events, then trigger them).
9
+
10
+ ## Your scope
11
+
12
+ Everything not owned by a specialist agent:
13
+
14
+ - `Gemfile`, `jace.gemspec`, `Rakefile`, `Makefile`
15
+ - `Dockerfile`, `docker-compose.yml`
16
+ - `.circleci/config.yml`
17
+ - `.rubocop.yml`, `.rubocop_todo.yml`, `.rspec`
18
+ - `config/` (`check_specs.yml`, `rubycritc.rb`, `yardstick.rb`, `yardstick.yml`)
19
+ - `LICENSE`, `.gitignore`, `jace.png`
20
+ - Cross-cutting decisions that span `ruby` and/or `docs`
21
+ - Coordination of the other specialist agents
22
+
23
+ ## Specialist agents
24
+
25
+ Delegate implementation work to the right agent. Never implement what belongs to a specialist yourself.
26
+
27
+ | Agent | Scope |
28
+ |-------|-------|
29
+ | `ruby` | `lib/`, `spec/` — gem source, tests, and inline YARD docs |
30
+ | `docs` | `docs/agents/`, `README.md`, `AGENTS.md`, `CLAUDE.md`, `.github/*.md` — all prose documentation |
31
+ | `security` | Read-only, whole repo — flags security concerns, does not fix |
32
+
33
+ ## How to coordinate
34
+
35
+ When a task spans multiple agents:
36
+
37
+ 1. **Break it down** — identify which parts belong to which agent.
38
+ 2. **Sequence or parallelize** — if agents' outputs are independent, run them in parallel; if one depends on the other, sequence them.
39
+ 3. **Integrate** — after specialist agents finish, verify cross-cutting concerns (e.g. a `lib/` change that needs a version bump or CI update).
40
+ 4. **Delegate doc updates** — if an architectural change needs `docs/agents/` updated, ask the `docs` agent to do it rather than editing it yourself.
41
+ 5. **Consult `security` early** on anything touching `instance_eval`/`send`, dynamic handler dispatch, or dependencies.
42
+
43
+ ## Documentation (`docs/agents/`)
44
+
45
+ | File | Contents |
46
+ |------|----------|
47
+ | [Folder Structure](../../docs/agents/folder-structure.md) | Top-level directory layout and the role of each folder. |
48
+ | [Architecture](../../docs/agents/architecture.md) | Source layout, modules, code style, and implementation guidelines. |
49
+ | [Contributing](../../docs/agents/contributing.md) | Commit guidelines, PR standards, code organization, and refactoring rules. |
50
+ | [Flow](../../docs/agents/flow.md) | Main runtime flow of the application. |
51
+ | [Plans](../../docs/agents/plans/) | Implementation plans for ongoing or upcoming features. |
52
+ | [Issues](../../docs/agents/issues/) | Detailed specs for open issues. |
53
+ | [Issue Enhancement](../../docs/agents/issue-enhancement.md) | Checklist of concerns used by `/enhance-issue`. |
54
+ | [Arcanum Split Issue](../../docs/agents/arcanum-split-issue.md) | Checklist of concerns used by `/arcanum-split-issue`. |
55
+
56
+ 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,35 @@
1
+ ---
2
+ name: docs
3
+ description: Jace documentation specialist. Use for any task involving docs/agents/, README.md, AGENTS.md, CLAUDE.md, or .github/*.md templates.
4
+ tools: Read, Edit, Write
5
+ ---
6
+
7
+ You are the documentation specialist for the Jace project — a Ruby gem for in-process,
8
+ event-driven development.
9
+
10
+ ## Your scope
11
+
12
+ You own all prose documentation, wherever it lives:
13
+
14
+ - `docs/agents/` — architecture, folder-structure, flow, contributing, issue-enhancement, arcanum-split-issue, plans/, issues/
15
+ - `README.md`
16
+ - `AGENTS.md`, `CLAUDE.md`
17
+ - `.github/copilot-instructions.md` and other `.github/*.md` templates
18
+
19
+ 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.
20
+
21
+ ## Stack
22
+
23
+ - Markdown
24
+ - YARD-generated API docs live under `doc/` (generated — do not hand-edit; source is inline comments in `lib/`, owned by `ruby`)
25
+
26
+ ## Commands
27
+
28
+ 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.
29
+
30
+ ## Conventions
31
+
32
+ - All documentation must be written in **English**.
33
+ - Keep `docs/agents/folder-structure.md`, `architecture.md`, and `contributing.md` in sync with the actual codebase.
34
+ - 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.
35
+ - Keep the `## Documentation` table in `AGENTS.md` in sync with the files that exist under `docs/agents/`.
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: ruby
3
+ description: Jace 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 Jace project — a Ruby gem for in-process, event-driven
8
+ development (`Jace::Registry`, `Jace::Dispatcher`, `Jace::Executer`, `Jace::Handler`).
9
+
10
+ ## Your scope
11
+
12
+ You own everything inside `lib/` and `spec/`, including inline YARD doc-comments within `lib/` source files:
13
+
14
+ - `lib/jace.rb` and `lib/jace/**` — gem source code
15
+ - `spec/**` — RSpec test suite (unit specs mirroring `lib/`, plus `spec/integration/` for README/YARD examples)
16
+
17
+ Do NOT touch `docs/agents/`, `README.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.
18
+
19
+ ## Stack
20
+
21
+ - Ruby (>= 3.3.1), no runtime dependencies
22
+ - RSpec for tests
23
+ - Rubocop for linting
24
+ - YARD / Yardstick for inline documentation and doc-coverage
25
+
26
+ ## Commands
27
+
28
+ ```bash
29
+ bundle exec rspec
30
+ rubocop
31
+ bundle exec rake verify_measurements
32
+ ```
33
+
34
+ ## Conventions
35
+
36
+ - Follow **Sandi Metz** rules: small single-responsibility classes, short methods, respect the Law of Demeter.
37
+ - Document all public methods and classes with **YARD** doc-comments.
38
+ - **At least one spec per source file** (exceptions listed in `config/check_specs.yml`).
39
+ - **One expectation per example.**
40
+ - Use `let`, `subject`, and `described_class` to keep specs readable and DRY.
41
+ - Public methods before private methods within a class.
42
+ - One class/module per file, file named in snake_case matching the class/module name (see `docs/agents/contributing.md`).
43
+ - `frozen_string_literal: true` at the top of every Ruby file.
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: security
3
+ description: Jace 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 Jace project — a Ruby gem for in-process, event-driven development.
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
+ - `lib/jace/handler.rb` and `lib/jace/executer.rb` — both use `instance_eval` to run registered blocks, and `Handler` builds `proc { send(method_name) }` from a `Symbol`. Check whether an application ever registers a handler built from untrusted/user-controlled input (event name, method name, or block).
16
+ - Dependency risk: `Gemfile`, `Gemfile.lock`, `jace.gemspec` — outdated or known-vulnerable gem versions.
17
+ - CI/release secrets handling in `.circleci/config.yml` and `build_gem.sh`-style release steps.
18
+
19
+ ## Commands
20
+
21
+ 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.
22
+
23
+ ## Conventions
24
+
25
+ - Report findings, don't fix them — you have no `Edit`/`Write` tools by design.
26
+ - 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,9 @@
1
+ {
2
+ "auto-fix-all": {
3
+ "ignored_check_patterns": [
4
+ "Codacy",
5
+ "Inline docs"
6
+ ]
7
+ },
8
+ "version": "2.4.0"
9
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "ignored_check_patterns": ["Codacy", "Inline docs"]
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,99 +1 @@
1
- # GitHub Copilot Instructions for Jace
2
-
3
- ## Project Overview
4
-
5
- **Jace** is a Ruby gem designed for event-driven development **within a single application**.
6
- It is not about distributed architecture or message queues — it is about building internal
7
- event-oriented logic inside a Ruby gem or application.
8
-
9
- With Jace, you register handlers for named events and trigger those events later. When an
10
- event is triggered, Jace executes the registered `before` handlers, then the main block,
11
- then the `after` handlers — all within a given context object.
12
-
13
- ### Core classes
14
-
15
- - **`Jace::Registry`** — stores event-to-handler mappings and exposes `register` and
16
- `trigger` methods.
17
- - **`Jace::Dispatcher`** — holds `before` and `after` handler lists for a single event
18
- and delegates execution to `Jace::Executer`.
19
- - **`Jace::Executer`** — runs the before handlers, the main block, and the after handlers
20
- inside a given context.
21
- - **`Jace::Handler`** — wraps a `Symbol` (method name) or `Proc` into a callable unit
22
- that evaluates within a context via `instance_eval`.
23
-
24
- ### Typical usage
25
-
26
- ```ruby
27
- registry = Jace::Registry.new
28
- context = SomeContext.new
29
-
30
- registry.register(:payment_processed, :before) { notify_fraud_service }
31
- registry.register(:payment_processed) { send_receipt }
32
-
33
- registry.trigger(:payment_processed, context) do
34
- process_payment
35
- end
36
- # Runs: notify_fraud_service → process_payment → send_receipt
37
- ```
38
-
39
- ---
40
-
41
- ## Language
42
-
43
- All code, comments, documentation, commit messages, PR titles, PR descriptions, and review
44
- comments **must be written in English**.
45
-
46
- ---
47
-
48
- ## Testing
49
-
50
- - Every new class or module **must have a corresponding RSpec spec file**.
51
- - Specs mirror the source tree: `lib/jace/foo.rb` → `spec/lib/jace/foo_spec.rb`.
52
- - Files that are intentionally excluded from spec coverage (e.g. `version.rb`) are listed
53
- in `config/check_specs.yml`. Add any new file that genuinely does not need a spec to that
54
- list; otherwise write the spec.
55
- - Write **unit specs** for individual classes and **integration specs** under
56
- `spec/integration/` for end-to-end scenarios (README examples, YARD examples).
57
- - Each `it` block should have **one expectation** whenever possible.
58
- - Use `let`, `subject`, and `described_class` to keep examples readable and DRY.
59
-
60
- ---
61
-
62
- ## Documentation
63
-
64
- - All public classes, modules, and methods **must be documented with [YARD](https://yardoc.org/)**.
65
- - Use the following YARD tags where applicable:
66
- - `@param name [Type] description`
67
- - `@return [Type] description`
68
- - `@example` with working Ruby code
69
- - `@api public` / `@api private`
70
- - `@author`
71
- - Private methods and internal helpers should carry at least a brief description so
72
- developers can understand intent without reading implementation details.
73
- - Keep examples in YARD docs consistent with the specs under `spec/integration/yard/`.
74
-
75
- ---
76
-
77
- ## Code Style and Design
78
-
79
- ### Single Responsibility (Sandi Metz / 99 Bottles)
80
-
81
- - Classes and methods should do **one thing**.
82
- - Prefer many small, well-named methods over a few large ones.
83
- - If a method needs a comment to explain *what* it does (not *why*), it should probably be
84
- extracted into its own method.
85
- - Aim for methods that fit on a screen without scrolling.
86
-
87
- ### Law of Demeter
88
-
89
- - Objects should only talk to their **immediate collaborators**.
90
- - Avoid chaining method calls across object boundaries (e.g. `a.b.c.d`).
91
- - If you need data from a distant object, add a delegation method or restructure the
92
- dependency.
93
-
94
- ### General conventions
95
-
96
- - Use `frozen_string_literal: true` at the top of every Ruby file.
97
- - Prefer `attr_reader` over direct ivar access in the body of methods.
98
- - New public methods added to `Jace` classes must be covered by specs and YARD docs before
99
- the PR is considered complete.
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/AGENTS.md ADDED
@@ -0,0 +1,140 @@
1
+ # GitHub Copilot Instructions for Jace
2
+
3
+ ## Project Overview
4
+
5
+ **Jace** is a Ruby gem designed for event-driven development **within a single application**.
6
+ It is not about distributed architecture or message queues — it is about building internal
7
+ event-oriented logic inside a Ruby gem or application.
8
+
9
+ With Jace, you register handlers for named events and trigger those events later. When an
10
+ event is triggered, Jace executes the registered `before` handlers, then the main block,
11
+ then the `after` handlers — all within a given context object.
12
+
13
+ ### Core classes
14
+
15
+ - **`Jace::Registry`** — stores event-to-handler mappings and exposes `register` and
16
+ `trigger` methods.
17
+ - **`Jace::Dispatcher`** — holds `before` and `after` handler lists for a single event
18
+ and delegates execution to `Jace::Executer`.
19
+ - **`Jace::Executer`** — runs the before handlers, the main block, and the after handlers
20
+ inside a given context.
21
+ - **`Jace::Handler`** — wraps a `Symbol` (method name) or `Proc` into a callable unit
22
+ that evaluates within a context via `instance_eval`.
23
+
24
+ ### Typical usage
25
+
26
+ ```ruby
27
+ registry = Jace::Registry.new
28
+ context = SomeContext.new
29
+
30
+ registry.register(:payment_processed, :before) { notify_fraud_service }
31
+ registry.register(:payment_processed) { send_receipt }
32
+
33
+ registry.trigger(:payment_processed, context) do
34
+ process_payment
35
+ end
36
+ # Runs: notify_fraud_service → process_payment → send_receipt
37
+ ```
38
+
39
+ ---
40
+
41
+ ## Language
42
+
43
+ All code, comments, documentation, commit messages, PR titles, PR descriptions, and review
44
+ comments **must be written in English**.
45
+
46
+ ---
47
+
48
+ ## Testing
49
+
50
+ - Every new class or module **must have a corresponding RSpec spec file**.
51
+ - Specs mirror the source tree: `lib/jace/foo.rb` → `spec/lib/jace/foo_spec.rb`.
52
+ - Files that are intentionally excluded from spec coverage (e.g. `version.rb`) are listed
53
+ in `config/check_specs.yml`. Add any new file that genuinely does not need a spec to that
54
+ list; otherwise write the spec.
55
+ - Write **unit specs** for individual classes and **integration specs** under
56
+ `spec/integration/` for end-to-end scenarios (README examples, YARD examples).
57
+ - Each `it` block should have **one expectation** whenever possible.
58
+ - Use `let`, `subject`, and `described_class` to keep examples readable and DRY.
59
+
60
+ ---
61
+
62
+ ## Documentation
63
+
64
+ All project documentation lives under [`docs/agents/`](docs/agents/):
65
+
66
+ | File | Contents |
67
+ |------|----------|
68
+ | [Folder Structure](docs/agents/folder-structure.md) | Top-level directory layout and the role of each folder. |
69
+ | [Architecture](docs/agents/architecture.md) | Source layout, modules, code style, and implementation guidelines. |
70
+ | [Flow](docs/agents/flow.md) | Main runtime flow of the application. |
71
+ | [Contributing](docs/agents/contributing.md) | Commit guidelines, PR standards, code organization, and refactoring rules. |
72
+ | [Plans](docs/agents/plans/) | Implementation plans for ongoing or upcoming features. |
73
+ | [Issues](docs/agents/issues/) | Detailed specs for open issues. |
74
+ | [Issue Enhancement](docs/agents/issue-enhancement.md) | Checklist of concerns used by `/enhance-issue` to flesh out vague issue ideas. |
75
+ | [Arcanum Split Issue](docs/agents/arcanum-split-issue.md) | Checklist of concerns used by `/arcanum-split-issue` to break broad issues into sub-issues. |
76
+
77
+ ### Issues (`docs/agents/issues/`)
78
+
79
+ Each file documents an issue in detail. Naming convention:
80
+
81
+ ```
82
+ docs/agents/issues/<issue_id>_<issue_name>.md
83
+ ```
84
+
85
+ Example: `docs/agents/issues/5_release_docker_image.md` for issue #5.
86
+
87
+ ### Plans (`docs/agents/plans/`)
88
+
89
+ Each plan is a directory named after the issue ID and topic, containing one or more related files:
90
+
91
+ ```
92
+ docs/agents/plans/<issue_id>_<topic>/<related_files>.md
93
+ ```
94
+
95
+ Example: `docs/agents/plans/12_add-auth/plan.md` for issue #12.
96
+
97
+ ---
98
+
99
+ ## Documentation Standards
100
+
101
+ - All public classes, modules, and methods **must be documented with [YARD](https://yardoc.org/)**.
102
+ - Use the following YARD tags where applicable:
103
+ - `@param name [Type] description`
104
+ - `@return [Type] description`
105
+ - `@example` with working Ruby code
106
+ - `@api public` / `@api private`
107
+ - `@author`
108
+ - Private methods and internal helpers should carry at least a brief description so
109
+ developers can understand intent without reading implementation details.
110
+ - Keep examples in YARD docs consistent with the specs under `spec/integration/yard/`.
111
+
112
+ ---
113
+
114
+ ## Code Style and Design
115
+
116
+ ### Single Responsibility (Sandi Metz / 99 Bottles)
117
+
118
+ - Classes and methods should do **one thing**.
119
+ - Prefer many small, well-named methods over a few large ones.
120
+ - If a method needs a comment to explain *what* it does (not *why*), it should probably be
121
+ extracted into its own method.
122
+ - Aim for methods that fit on a screen without scrolling.
123
+
124
+ ### Law of Demeter
125
+
126
+ - Objects should only talk to their **immediate collaborators**.
127
+ - Avoid chaining method calls across object boundaries (e.g. `a.b.c.d`).
128
+ - If you need data from a distant object, add a delegation method or restructure the
129
+ dependency.
130
+
131
+ ### General conventions
132
+
133
+ - Use `frozen_string_literal: true` at the top of every Ruby file.
134
+ - Prefer `attr_reader` over direct ivar access in the body of methods.
135
+ - New public methods added to `Jace` classes must be covered by specs and YARD docs before
136
+ the PR is considered complete.
137
+
138
+ ## Commit Attribution
139
+
140
+ 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,6 +1,6 @@
1
- FROM darthjee/scripts:0.6.0 as scripts
1
+ FROM darthjee/scripts:0.15.0 as scripts
2
2
 
3
- FROM darthjee/ruby_331:1.1.0 as base
3
+ FROM darthjee/ruby_3412:1.0.0 as base
4
4
 
5
5
  COPY --chown=app:app ./ /home/app/app/
6
6
 
@@ -19,3 +19,4 @@ FROM base
19
19
 
20
20
  COPY --chown=app:app --from=builder /home/app/bundle/ /usr/local/bundle/
21
21
  RUN bundle install
22
+
data/Gemfile CHANGED
@@ -4,21 +4,21 @@ 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-rspec', '3.10.2'
19
19
  gem 'rubycritic', '5.0.0'
20
20
  gem 'simplecov', '0.22.0'
21
21
  gem 'simplecov-html', '0.13.2'
22
22
  gem 'simplecov-lcov', '0.9.0'
23
- gem 'yard', '0.9.38'
23
+ gem 'yard', '0.9.45'
24
24
  gem 'yardstick', '0.9.9'
data/README.md CHANGED
@@ -10,7 +10,7 @@ Jace
10
10
 
11
11
  Yard Documentation
12
12
  -------------------
13
- [https://www.rubydoc.info/gems/jace/0.1.1](https://www.rubydoc.info/gems/jace/0.1.2)
13
+ [https://www.rubydoc.info/gems/jace/1.0.0](https://www.rubydoc.info/gems/jace/1.0.0)
14
14
 
15
15
  Jace is designed to have a semi event driven development
16
16
 
@@ -18,9 +18,9 @@ Using `Jace::Registry`, event handlers can be registered to events, and when an
18
18
  is triggered, the block that triggers it is given to Jace, which will triger, around it,
19
19
  the +before+ and +after+ handlers
20
20
 
21
- **Current Release**: [0.1.2](https://github.com/darthjee/jace/tree/0.1.2)
21
+ **Current Release**: [1.0.0](https://github.com/darthjee/jace/tree/1.0.0)
22
22
 
23
- **Next release**: [0.2.0](https://github.com/darthjee/jace/compare/0.1.2...main)
23
+ **Next release**: [1.1.0](https://github.com/darthjee/jace/compare/1.0.0...main)
24
24
 
25
25
  Installation
26
26
  ---------------
@@ -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.