jez 0.1.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.
@@ -0,0 +1,46 @@
1
+ # Share and initialize Jez
2
+
3
+ ## Install the skill
4
+
5
+ Run `jez install` after installing the gem, or `ruby exe/jez install` from a checkout.
6
+ Jez discovers Claude Code, Codex, and Antigravity from their executables and user configuration directories.
7
+ Pass one or more agent flags to select targets explicitly.
8
+ Add `--dry-run` to preview the install.
9
+
10
+ | Flag | Default skill destination |
11
+ | --------------- | ----------------------------- |
12
+ | `--claude` | `~/.claude/skills/jez` |
13
+ | `--codex` | `~/.agents/skills/jez` |
14
+ | `--antigravity` | `~/.gemini/config/skills/jez` |
15
+
16
+ When Vercel's `skills` executable is on `PATH`, Jez uses it to install the bundled skill for the selected agents and lets Vercel choose the installation layout.
17
+ Otherwise Jez links the directory printed by `jez path` directly into the destinations above.
18
+ Keep that directory available while using a linked install.
19
+
20
+ ## Enable the optional diagnostics
21
+
22
+ From the installed skill directory, run `./bin/install` to provision Ruby and the locked gems with mise and Bundler.
23
+ The shell entry points require a Unix-like environment with `realpath`.
24
+ The quality command runs inside a target Git repository with a base commit.
25
+
26
+ To also register an edit hook, run `./bin/install --claude` or `./bin/install --codex`.
27
+ Both flags take an optional settings file path.
28
+ Use an explicit path for a custom configuration location.
29
+ The hook requires `jq` on the agent's PATH.
30
+ For Codex, trust the hook with `/hooks`.
31
+ Repeat installation after moving a standalone checkout.
32
+
33
+ ## Initialize a target project
34
+
35
+ When asked to initialize Jez, inspect the target's agent instructions, Ruby setup, test commands, and CI configuration.
36
+ Identify the commands a contributor should run and any existing mode defaults or directories where restructuring is authorized.
37
+
38
+ If the team needs durable guidance, add the missing decisions to its existing repository instructions.
39
+ If no instructions exist, use a short `AGENTS.md`.
40
+ Use repository-relative paths for scoped rules.
41
+ Preserve existing instructions and reuse an existing setup section on subsequent runs.
42
+ Leave mode selection to the skill when the team has no stated preference.
43
+
44
+ Verify documented commands from their intended directory and report unavailable checks.
45
+ If existing instructions already cover the project, summarize what Jez will use.
46
+ Ordinary Ruby changes require no initialization or generated configuration.
data/scripts/check.rb ADDED
@@ -0,0 +1,7 @@
1
+ $LOAD_PATH.unshift(File.expand_path("../lib", __dir__))
2
+
3
+ require_relative "../lib/jez/check"
4
+ require "ruby_quality"
5
+
6
+ status = RubyQuality::Cli.new.run(ARGV)
7
+ exit Jez::Check::RUNNER_CODES.fetch(status)
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $LOAD_PATH.unshift(File.expand_path("../lib", __dir__))
4
+
5
+ require "optparse"
6
+ require "shellwords"
7
+ require "jez/harness"
8
+
9
+ MESSAGES = { added: "added", updated: "updated", unchanged: "already configured" }.freeze
10
+
11
+ hook = File.realpath(File.expand_path("../hooks/ruby-ratchet", __dir__))
12
+ selected = {}
13
+ parser = OptionParser.new("usage: bin/install [--claude [SETTINGS]] [--codex [HOOKS]]")
14
+ Jez::Harness.all.each do |harness|
15
+ description = "Add the ratchet hook to #{harness.name} (default #{harness.hooks_path})"
16
+ parser.on("--#{harness.name} [PATH]", description) do |path|
17
+ selected[harness] = path || harness.hooks_path
18
+ end
19
+ end
20
+
21
+ begin
22
+ parser.parse!(ARGV)
23
+ puts "No harness selected; installed the toolchain only. #{parser.banner}" if selected.empty?
24
+ selected.each do |harness, path|
25
+ relative = ".#{harness.name}/skills/jez/hooks/ruby-ratchet"
26
+ command = if File.identical?(File.join(Dir.home, relative), hook)
27
+ harness.name == "claude" ? "~/#{relative}" : %("$HOME/#{relative}")
28
+ else
29
+ Shellwords.escape(hook)
30
+ end
31
+ status = harness.hooks_file(path).install_hook(command)
32
+ puts "#{harness.name} ratchet hook #{MESSAGES.fetch(status)} in #{path}"
33
+ puts " #{harness.follow_up}" if harness.follow_up && status != :unchanged
34
+ end
35
+ rescue OptionParser::ParseError, JSON::ParserError, SystemCallError => error
36
+ warn "jez install: #{error.message}"
37
+ exit 1
38
+ end
metadata ADDED
@@ -0,0 +1,88 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jez
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Dan Brubaker Horst
8
+ bindir: exe
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies: []
12
+ email:
13
+ - dan.brubaker.horst@gmail.com
14
+ executables:
15
+ - jez
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - ".reek.yml"
20
+ - ".rubocop.yml"
21
+ - CHANGELOG.md
22
+ - Gemfile
23
+ - Gemfile.lock
24
+ - LICENSE.txt
25
+ - README.md
26
+ - SKILL.md
27
+ - bin/install
28
+ - exe/jez
29
+ - hooks/ruby-ratchet
30
+ - jez.gemspec
31
+ - lib/jez.rb
32
+ - lib/jez/check.rb
33
+ - lib/jez/decision.rb
34
+ - lib/jez/harness.rb
35
+ - lib/jez/hooks_file.rb
36
+ - lib/jez/installer.rb
37
+ - lib/jez/version.rb
38
+ - lib/ruby_quality.rb
39
+ - lib/ruby_quality/check.rb
40
+ - lib/ruby_quality/cli.rb
41
+ - lib/ruby_quality/errors.rb
42
+ - lib/ruby_quality/gate.rb
43
+ - lib/ruby_quality/measures/disables.rb
44
+ - lib/ruby_quality/measures/flay.rb
45
+ - lib/ruby_quality/measures/flog.rb
46
+ - lib/ruby_quality/measures/reek.rb
47
+ - lib/ruby_quality/measures/rubocop.rb
48
+ - lib/ruby_quality/observation.rb
49
+ - lib/ruby_quality/options.rb
50
+ - lib/ruby_quality/report.rb
51
+ - lib/ruby_quality/repository.rb
52
+ - lib/ruby_quality/shell.rb
53
+ - lib/ruby_quality/source.rb
54
+ - lib/ruby_quality/toolchain.rb
55
+ - mise.toml
56
+ - references/design-decisions.md
57
+ - references/diagnostics.md
58
+ - references/setup.md
59
+ - scripts/check.rb
60
+ - scripts/install.rb
61
+ homepage: https://github.com/danhorst/jez
62
+ licenses:
63
+ - MIT
64
+ metadata:
65
+ source_code_uri: https://github.com/danhorst/jez
66
+ changelog_uri: https://github.com/danhorst/jez/blob/main/CHANGELOG.md
67
+ allowed_push_host: https://rubygems.org
68
+ rdoc_options: []
69
+ require_paths:
70
+ - lib
71
+ required_ruby_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '3.2'
76
+ - - "<"
77
+ - !ruby/object:Gem::Version
78
+ version: '5'
79
+ required_rubygems_version: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ requirements: []
85
+ rubygems_version: 4.0.14
86
+ specification_version: 4
87
+ summary: Choose and verify a proportionate design for a Ruby change
88
+ test_files: []