diogenes 0.1.2 → 0.1.3
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.
- checksums.yaml +4 -4
- data/.mise/config.toml +72 -0
- data/.mise/mise.lock +179 -0
- data/.mise/tasks/update-hk-import +79 -0
- data/.release-please-config.json +1 -1
- data/.release-please-manifest.json +2 -2
- data/CHANGELOG.md +7 -0
- data/CLAUDE.md +107 -99
- data/CONTRIBUTING.md +206 -0
- data/README.md +157 -134
- data/Rakefile +15 -1
- data/Steepfile +11 -0
- data/docs/gates.md +178 -0
- data/docs/targets.md +11 -0
- data/exe/diogenes +6 -0
- data/hk.pkl +46 -0
- data/lib/diogenes/cli/init.rb +88 -0
- data/lib/diogenes/cli.rb +95 -0
- data/lib/diogenes/templates/init/artifacts/decision_record.md.erb +53 -0
- data/lib/diogenes/templates/init/diogenes.rb +13 -0
- data/lib/diogenes/templates/init/hooks/README.md +15 -0
- data/lib/diogenes/templates/init/rules/five_gates.rb +33 -0
- data/lib/diogenes/templates/init/skills/example_skill.rb +33 -0
- data/lib/diogenes/version.rb +2 -1
- data/lib/diogenes.rb +27 -2
- data/sig/generated/diogenes/cli/init.rbs +34 -0
- data/sig/generated/diogenes/cli.rbs +34 -0
- data/sig/generated/diogenes/version.rbs +5 -0
- data/sig/generated/diogenes.rbs +26 -0
- metadata +23 -9
- data/docs/context.md +0 -60
- data/docs/contributing.md +0 -228
- data/docs/dashboard.md +0 -365
- data/docs/examples.md +0 -162
- data/docs/framework.md +0 -146
- data/mise.lock +0 -48
- data/mise.toml +0 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 23508c589817a7a8faac15185d7c803745553d4d7789ba279de8c871a6103336
|
|
4
|
+
data.tar.gz: 21405f813bf767dd43f88bfb554d611201480f1de7f75d73868e0ce65a02d419
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c66d6ecd7165e10aad7db8e036d74060d9e8d32dbaa627711fbd3bcbc490768e074da7042d42dc3dfb6bbe9a7f14d2b874780863ffd57a27d6a2a99d79ab6ac0
|
|
7
|
+
data.tar.gz: 6be0cb67ee1592d32ff288acf254c7521562c45e860fdd0dd87da5b2ab86b940565810ef30d31d9522b10c09366e81ea552ccff1efad814d18f40406e4fc0b72
|
data/.mise/config.toml
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
[settings]
|
|
2
|
+
experimental = true
|
|
3
|
+
lockfile = true
|
|
4
|
+
|
|
5
|
+
[env]
|
|
6
|
+
HK_MISE = 1
|
|
7
|
+
|
|
8
|
+
[tools]
|
|
9
|
+
ruby = "4.0.5"
|
|
10
|
+
hk = "latest"
|
|
11
|
+
pkl = "latest"
|
|
12
|
+
actionlint = "1.7.12"
|
|
13
|
+
yamlfmt = "0.21.0"
|
|
14
|
+
|
|
15
|
+
[hooks]
|
|
16
|
+
# Automatically install/update hooks when tools are installed
|
|
17
|
+
postinstall = '''
|
|
18
|
+
if [ "$CI" != "true" ]; then
|
|
19
|
+
mise run bootstrap
|
|
20
|
+
fi
|
|
21
|
+
'''
|
|
22
|
+
|
|
23
|
+
[tasks.bootstrap]
|
|
24
|
+
alias = "up"
|
|
25
|
+
run = ["hk install", { task = "update-hk-import" }, "bundle install"]
|
|
26
|
+
|
|
27
|
+
[tasks.update]
|
|
28
|
+
alias = ["upd", "upg"]
|
|
29
|
+
run = [
|
|
30
|
+
"mise upgrade --bump",
|
|
31
|
+
"mise lock",
|
|
32
|
+
"bundle update --all",
|
|
33
|
+
"bundle clean --force",
|
|
34
|
+
{ task = "update-hk-import" },
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
[tasks."types:check"]
|
|
38
|
+
alias = ["tc", "types", "typecheck"]
|
|
39
|
+
run = ["bundle exec rake steep:check"]
|
|
40
|
+
|
|
41
|
+
[tasks."types:generate"]
|
|
42
|
+
alias = ["tg", "typegen"]
|
|
43
|
+
run = ["bundle exec rake rbs:generate"]
|
|
44
|
+
|
|
45
|
+
[tasks.run]
|
|
46
|
+
alias = ["diogenes"]
|
|
47
|
+
run = "bundle exec exe/diogenes"
|
|
48
|
+
|
|
49
|
+
[tasks.pre-commit]
|
|
50
|
+
run = "hk run pre-commit"
|
|
51
|
+
|
|
52
|
+
[tasks.check]
|
|
53
|
+
alias = ["chk", "lint"]
|
|
54
|
+
run = [{ task = "typecheck" }, "hk run check --all"]
|
|
55
|
+
|
|
56
|
+
[tasks.fix]
|
|
57
|
+
alias = ["fmt", "format"]
|
|
58
|
+
run = [{ task = "types:generate" }, "hk run fix --all"]
|
|
59
|
+
|
|
60
|
+
[tasks.clean]
|
|
61
|
+
alias = ["cln", "nuke"]
|
|
62
|
+
run = [
|
|
63
|
+
"rm -f *.gem",
|
|
64
|
+
"rm -rf .bundle",
|
|
65
|
+
"rm -rf .ruby-lsp",
|
|
66
|
+
"rm -rf .yardoc",
|
|
67
|
+
"rm -rf coverage",
|
|
68
|
+
"rm -rf pkg",
|
|
69
|
+
"rm -rf tmp",
|
|
70
|
+
"rm -rf vendor/bundle",
|
|
71
|
+
"bundle clean --force",
|
|
72
|
+
]
|
data/.mise/mise.lock
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
# @generated - this file is auto-generated by `mise lock` https://mise.en.dev/dev-tools/mise-lock.html
|
|
2
|
+
|
|
3
|
+
[[tools.actionlint]]
|
|
4
|
+
version = "1.7.12"
|
|
5
|
+
backend = "aqua:rhysd/actionlint"
|
|
6
|
+
|
|
7
|
+
[tools.actionlint."platforms.linux-arm64"]
|
|
8
|
+
checksum = "sha256:325e971b6ba9bfa504672e29be93c24981eeb1c07576d730e9f7c8805afff0c6"
|
|
9
|
+
url = "https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_1.7.12_linux_arm64.tar.gz"
|
|
10
|
+
provenance = "github-attestations"
|
|
11
|
+
|
|
12
|
+
[tools.actionlint."platforms.linux-arm64-musl"]
|
|
13
|
+
checksum = "sha256:325e971b6ba9bfa504672e29be93c24981eeb1c07576d730e9f7c8805afff0c6"
|
|
14
|
+
url = "https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_1.7.12_linux_arm64.tar.gz"
|
|
15
|
+
provenance = "github-attestations"
|
|
16
|
+
|
|
17
|
+
[tools.actionlint."platforms.linux-x64"]
|
|
18
|
+
checksum = "sha256:8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8"
|
|
19
|
+
url = "https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_1.7.12_linux_amd64.tar.gz"
|
|
20
|
+
provenance = "github-attestations"
|
|
21
|
+
|
|
22
|
+
[tools.actionlint."platforms.linux-x64-musl"]
|
|
23
|
+
checksum = "sha256:8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8"
|
|
24
|
+
url = "https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_1.7.12_linux_amd64.tar.gz"
|
|
25
|
+
provenance = "github-attestations"
|
|
26
|
+
|
|
27
|
+
[tools.actionlint."platforms.macos-arm64"]
|
|
28
|
+
checksum = "sha256:aba9ced2dee8d27fecca3dc7feb1a7f9a52caefa1eb46f3271ea66b6e0e6953f"
|
|
29
|
+
url = "https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_1.7.12_darwin_arm64.tar.gz"
|
|
30
|
+
provenance = "github-attestations"
|
|
31
|
+
|
|
32
|
+
[tools.actionlint."platforms.macos-x64"]
|
|
33
|
+
checksum = "sha256:5b44c3bc2255115c9b69e30efc0fecdf498fdb63c5d58e17084fd5f16324c644"
|
|
34
|
+
url = "https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_1.7.12_darwin_amd64.tar.gz"
|
|
35
|
+
provenance = "github-attestations"
|
|
36
|
+
|
|
37
|
+
[tools.actionlint."platforms.windows-x64"]
|
|
38
|
+
checksum = "sha256:6e7241b51e6817ea6a047693d8e6fed13b31819c9a0dd6c5a726e1592d22f6e9"
|
|
39
|
+
url = "https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_1.7.12_windows_amd64.zip"
|
|
40
|
+
provenance = "github-attestations"
|
|
41
|
+
|
|
42
|
+
[[tools.hk]]
|
|
43
|
+
version = "1.48.0"
|
|
44
|
+
backend = "aqua:jdx/hk"
|
|
45
|
+
|
|
46
|
+
[tools.hk."platforms.linux-arm64"]
|
|
47
|
+
checksum = "sha256:d72463103d9682094e9b1fb2f20ef8824d1ec7a9b23f79163921bac7785fcd51"
|
|
48
|
+
url = "https://github.com/jdx/hk/releases/download/v1.48.0/hk-aarch64-unknown-linux-gnu.tar.gz"
|
|
49
|
+
|
|
50
|
+
[tools.hk."platforms.linux-arm64-musl"]
|
|
51
|
+
checksum = "sha256:c6ba1ed78e6d205f442e013ffb20e815ff6498ae12aac0705fd3132a9a9b92a0"
|
|
52
|
+
url = "https://github.com/jdx/hk/releases/download/v1.48.0/hk-aarch64-unknown-linux-musl.tar.gz"
|
|
53
|
+
|
|
54
|
+
[tools.hk."platforms.linux-x64"]
|
|
55
|
+
checksum = "sha256:6b7f9a28391a8b13b88208d723cbde7b945d095cbb03455c7dd5f8df551ed380"
|
|
56
|
+
url = "https://github.com/jdx/hk/releases/download/v1.48.0/hk-x86_64-unknown-linux-gnu.tar.gz"
|
|
57
|
+
|
|
58
|
+
[tools.hk."platforms.linux-x64-musl"]
|
|
59
|
+
checksum = "sha256:bde5bcaab4035488520ab977f23bfe0b1b639152c6ed7200c9592724e2afe88d"
|
|
60
|
+
url = "https://github.com/jdx/hk/releases/download/v1.48.0/hk-x86_64-unknown-linux-musl.tar.gz"
|
|
61
|
+
|
|
62
|
+
[tools.hk."platforms.macos-arm64"]
|
|
63
|
+
checksum = "sha256:e3985a14f41ba5eb849bf79502ad19201d0a582114a5ebe35a9afff16742024b"
|
|
64
|
+
url = "https://github.com/jdx/hk/releases/download/v1.48.0/hk-aarch64-apple-darwin.tar.gz"
|
|
65
|
+
|
|
66
|
+
[tools.hk."platforms.windows-x64"]
|
|
67
|
+
checksum = "sha256:6349ab27cd7a9c07e68edc7c2af0859c8a540482e97a5b7306e9e88460a5ca43"
|
|
68
|
+
url = "https://github.com/jdx/hk/releases/download/v1.48.0/hk-x86_64-pc-windows-msvc.zip"
|
|
69
|
+
|
|
70
|
+
[[tools.pkl]]
|
|
71
|
+
version = "0.31.1"
|
|
72
|
+
backend = "aqua:apple/pkl"
|
|
73
|
+
|
|
74
|
+
[tools.pkl."platforms.linux-arm64"]
|
|
75
|
+
checksum = "sha256:7ef10e743daa921fb94ae7bdb9ec6986f362bf250c55814b9ea2aeb13f2d083e"
|
|
76
|
+
url = "https://github.com/apple/pkl/releases/download/0.31.1/pkl-linux-aarch64"
|
|
77
|
+
|
|
78
|
+
[tools.pkl."platforms.linux-arm64-musl"]
|
|
79
|
+
checksum = "sha256:7ef10e743daa921fb94ae7bdb9ec6986f362bf250c55814b9ea2aeb13f2d083e"
|
|
80
|
+
url = "https://github.com/apple/pkl/releases/download/0.31.1/pkl-linux-aarch64"
|
|
81
|
+
|
|
82
|
+
[tools.pkl."platforms.linux-x64"]
|
|
83
|
+
checksum = "sha256:618f13955d755cafbfe8c9cba1d27635848cd49dbc6abffd398d2751db1231bf"
|
|
84
|
+
url = "https://github.com/apple/pkl/releases/download/0.31.1/pkl-linux-amd64"
|
|
85
|
+
|
|
86
|
+
[tools.pkl."platforms.linux-x64-musl"]
|
|
87
|
+
checksum = "sha256:618f13955d755cafbfe8c9cba1d27635848cd49dbc6abffd398d2751db1231bf"
|
|
88
|
+
url = "https://github.com/apple/pkl/releases/download/0.31.1/pkl-linux-amd64"
|
|
89
|
+
|
|
90
|
+
[tools.pkl."platforms.macos-arm64"]
|
|
91
|
+
checksum = "sha256:1b6a5438d9624cd2798a7530721bbbfa27ef72efe5c878a1b6c546c6e7ca0e8f"
|
|
92
|
+
url = "https://github.com/apple/pkl/releases/download/0.31.1/pkl-macos-aarch64"
|
|
93
|
+
|
|
94
|
+
[tools.pkl."platforms.macos-x64"]
|
|
95
|
+
checksum = "sha256:22123ed4ae4c03afa8c54c69f77f0bec39b0fa0f67b09d6d148e0a376a2a471d"
|
|
96
|
+
url = "https://github.com/apple/pkl/releases/download/0.31.1/pkl-macos-amd64"
|
|
97
|
+
|
|
98
|
+
[tools.pkl."platforms.windows-x64"]
|
|
99
|
+
checksum = "sha256:a8834481667325b44c539dbb758d7365a16389070f343c04b639bbe525ede013"
|
|
100
|
+
url = "https://github.com/apple/pkl/releases/download/0.31.1/pkl-windows-amd64.exe"
|
|
101
|
+
|
|
102
|
+
[[tools.ruby]]
|
|
103
|
+
version = "4.0.5"
|
|
104
|
+
backend = "core:ruby"
|
|
105
|
+
|
|
106
|
+
[tools.ruby.options]
|
|
107
|
+
compile = "false"
|
|
108
|
+
precompiled_url = "jdx/ruby"
|
|
109
|
+
ruby_build_repo = "https://github.com/rbenv/ruby-build.git"
|
|
110
|
+
ruby_install = "false"
|
|
111
|
+
|
|
112
|
+
[tools.ruby."platforms.linux-arm64"]
|
|
113
|
+
checksum = "sha256:142cc75048232c19fedca2748f4882f5d40443eb3d3532dc65efab44e6107553"
|
|
114
|
+
url = "https://github.com/jdx/ruby/releases/download/4.0.5-2/ruby-4.0.5.arm64_linux.tar.gz"
|
|
115
|
+
provenance = "github-attestations"
|
|
116
|
+
|
|
117
|
+
[tools.ruby."platforms.linux-arm64-musl"]
|
|
118
|
+
checksum = "sha256:142cc75048232c19fedca2748f4882f5d40443eb3d3532dc65efab44e6107553"
|
|
119
|
+
url = "https://github.com/jdx/ruby/releases/download/4.0.5-2/ruby-4.0.5.arm64_linux.tar.gz"
|
|
120
|
+
provenance = "github-attestations"
|
|
121
|
+
|
|
122
|
+
[tools.ruby."platforms.linux-x64"]
|
|
123
|
+
checksum = "sha256:15a8cb9e40784fe3d2309e1bf30a8cb92932ec83513e93dc90d8b507608344a0"
|
|
124
|
+
url = "https://github.com/jdx/ruby/releases/download/4.0.5-2/ruby-4.0.5.x86_64_linux.tar.gz"
|
|
125
|
+
provenance = "github-attestations"
|
|
126
|
+
|
|
127
|
+
[tools.ruby."platforms.linux-x64-musl"]
|
|
128
|
+
checksum = "sha256:15a8cb9e40784fe3d2309e1bf30a8cb92932ec83513e93dc90d8b507608344a0"
|
|
129
|
+
url = "https://github.com/jdx/ruby/releases/download/4.0.5-2/ruby-4.0.5.x86_64_linux.tar.gz"
|
|
130
|
+
provenance = "github-attestations"
|
|
131
|
+
|
|
132
|
+
[tools.ruby."platforms.macos-arm64"]
|
|
133
|
+
checksum = "sha256:2ceac7dbfb7ce73e7efbf0198fb859c23144169af9bd417b3996c6176e60ae80"
|
|
134
|
+
url = "https://github.com/jdx/ruby/releases/download/4.0.5-2/ruby-4.0.5.macos.tar.gz"
|
|
135
|
+
provenance = "github-attestations"
|
|
136
|
+
|
|
137
|
+
[tools.ruby."platforms.macos-x64"]
|
|
138
|
+
checksum = "sha256:7d6149079a63f8ae1d326c9fa65c6019ba2dc3155eae7b39159817911c88958e"
|
|
139
|
+
url = "https://cache.ruby-lang.org/pub/ruby/4.0/ruby-4.0.5.tar.gz"
|
|
140
|
+
|
|
141
|
+
[[tools.ruby]]
|
|
142
|
+
version = "4.0.5"
|
|
143
|
+
backend = "core:ruby"
|
|
144
|
+
|
|
145
|
+
[tools.ruby."platforms.windows-x64"]
|
|
146
|
+
checksum = "sha256:74e31613fc71e6e23431dfc4d8b6ec2818a4dc1fd16e0983b074144c16719c8b"
|
|
147
|
+
url = "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-4.0.5-1/rubyinstaller-4.0.5-1-x64.7z"
|
|
148
|
+
|
|
149
|
+
[[tools.yamlfmt]]
|
|
150
|
+
version = "0.21.0"
|
|
151
|
+
backend = "aqua:google/yamlfmt"
|
|
152
|
+
|
|
153
|
+
[tools.yamlfmt."platforms.linux-arm64"]
|
|
154
|
+
checksum = "sha256:5b2689c963b177271330c5ce8ca7396751107e5a826be46f03d2cb9b6f0c7784"
|
|
155
|
+
url = "https://github.com/google/yamlfmt/releases/download/v0.21.0/yamlfmt_0.21.0_Linux_arm64.tar.gz"
|
|
156
|
+
|
|
157
|
+
[tools.yamlfmt."platforms.linux-arm64-musl"]
|
|
158
|
+
checksum = "sha256:5b2689c963b177271330c5ce8ca7396751107e5a826be46f03d2cb9b6f0c7784"
|
|
159
|
+
url = "https://github.com/google/yamlfmt/releases/download/v0.21.0/yamlfmt_0.21.0_Linux_arm64.tar.gz"
|
|
160
|
+
|
|
161
|
+
[tools.yamlfmt."platforms.linux-x64"]
|
|
162
|
+
checksum = "sha256:1f300d9257b232bb3b541d7fb1b0e6b3c121bcbab381c86cd38cb8722be8a566"
|
|
163
|
+
url = "https://github.com/google/yamlfmt/releases/download/v0.21.0/yamlfmt_0.21.0_Linux_x86_64.tar.gz"
|
|
164
|
+
|
|
165
|
+
[tools.yamlfmt."platforms.linux-x64-musl"]
|
|
166
|
+
checksum = "sha256:1f300d9257b232bb3b541d7fb1b0e6b3c121bcbab381c86cd38cb8722be8a566"
|
|
167
|
+
url = "https://github.com/google/yamlfmt/releases/download/v0.21.0/yamlfmt_0.21.0_Linux_x86_64.tar.gz"
|
|
168
|
+
|
|
169
|
+
[tools.yamlfmt."platforms.macos-arm64"]
|
|
170
|
+
checksum = "sha256:4b417ecb94339d57e4c122ecc948c1a00fe328b5853266de9806e652a92858fa"
|
|
171
|
+
url = "https://github.com/google/yamlfmt/releases/download/v0.21.0/yamlfmt_0.21.0_Darwin_arm64.tar.gz"
|
|
172
|
+
|
|
173
|
+
[tools.yamlfmt."platforms.macos-x64"]
|
|
174
|
+
checksum = "sha256:060e943bcb8583c456810eb1ff4721b4f46c4a0c1a4432449d5dc3bbfe29a22b"
|
|
175
|
+
url = "https://github.com/google/yamlfmt/releases/download/v0.21.0/yamlfmt_0.21.0_Darwin_x86_64.tar.gz"
|
|
176
|
+
|
|
177
|
+
[tools.yamlfmt."platforms.windows-x64"]
|
|
178
|
+
checksum = "sha256:07f80ce5d741eb4b0a9380ac78a19c7cb5bd44e2a9a47a5a04839e3ba54dd463"
|
|
179
|
+
url = "https://github.com/google/yamlfmt/releases/download/v0.21.0/yamlfmt_0.21.0_Windows_x86_64.tar.gz"
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
set -o errexit
|
|
4
|
+
set -o nounset
|
|
5
|
+
set -o pipefail
|
|
6
|
+
|
|
7
|
+
if [[ "${TRACE:-}" == true || "${DEBUG:-}" == true ]]; then
|
|
8
|
+
set -o xtrace # Trace the execution of the script (debug)
|
|
9
|
+
fi
|
|
10
|
+
|
|
11
|
+
# Resolves to the calling script's name
|
|
12
|
+
declare -r script_name="${0##*/}"
|
|
13
|
+
|
|
14
|
+
function log_info() {
|
|
15
|
+
local -r message="${1:-}"
|
|
16
|
+
echo -e "[${script_name}] ${message}"
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function log_error() {
|
|
20
|
+
local -r message="${1:-}"
|
|
21
|
+
echo -e "[${script_name}] ERROR: ${message}" >&2
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function handle_error() {
|
|
25
|
+
local -ri exit_code=$?
|
|
26
|
+
local -r line_number="$1"
|
|
27
|
+
|
|
28
|
+
# Disable errexit so we don't fail inside the handler
|
|
29
|
+
set +o errexit
|
|
30
|
+
|
|
31
|
+
log_error "Command failed (exit $exit_code) at line $line_number: $BASH_COMMAND"
|
|
32
|
+
exit "${exit_code}"
|
|
33
|
+
}
|
|
34
|
+
trap 'handle_error ${LINENO}' ERR
|
|
35
|
+
|
|
36
|
+
function now_utc() {
|
|
37
|
+
date -u +%Y%m%dT%H%M%SZ
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function init() {
|
|
41
|
+
if [[ -n "${__COMMON_BASH_LOADED:-}" ]]; then
|
|
42
|
+
return 0
|
|
43
|
+
fi
|
|
44
|
+
__COMMON_BASH_LOADED=1
|
|
45
|
+
|
|
46
|
+
# Set project-specific environment variables
|
|
47
|
+
: "${PROJECT_ROOT:="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"}"
|
|
48
|
+
: "${BUILD_DIR:="${PROJECT_ROOT}/.build"}"
|
|
49
|
+
export PROJECT_ROOT BUILD_DIR
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
# Example import headers to be updated:
|
|
53
|
+
# amends "package://github.com/jdx/hk/releases/download/v1.34.0/hk@1.34.0#/Config.pkl"
|
|
54
|
+
# import "package://github.com/jdx/hk/releases/download/v1.34.0/hk@1.34.0#/Builtins.pkl"
|
|
55
|
+
|
|
56
|
+
function main() {
|
|
57
|
+
init "$@"
|
|
58
|
+
|
|
59
|
+
local -r config_path="${PROJECT_ROOT}/hk.pkl"
|
|
60
|
+
if [[ ! -f "${config_path}" ]]; then
|
|
61
|
+
log_error "Config file not found: ${config_path}"
|
|
62
|
+
exit 1
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
local -r hk_version="$(mise exec -- hk version | head -n 1)"
|
|
66
|
+
|
|
67
|
+
log_info "Updating hk imports in ${config_path} to version ${hk_version}"
|
|
68
|
+
|
|
69
|
+
local -r temp_path="$(mktemp)"
|
|
70
|
+
{
|
|
71
|
+
echo "amends \"package://github.com/jdx/hk/releases/download/v${hk_version}/hk@${hk_version}#/Config.pkl\""
|
|
72
|
+
echo "import \"package://github.com/jdx/hk/releases/download/v${hk_version}/hk@${hk_version}#/Builtins.pkl\""
|
|
73
|
+
tail -n +3 "${config_path}"
|
|
74
|
+
} >"${temp_path}"
|
|
75
|
+
|
|
76
|
+
mv "${temp_path}" "${config_path}"
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
main "$@"
|
data/.release-please-config.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
{
|
|
2
|
-
".": "0.1.
|
|
3
|
-
}
|
|
2
|
+
".": "0.1.3"
|
|
3
|
+
}
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.1.3](https://github.com/meaganewaller/diogenes/compare/diogenes/v0.1.2...diogenes/v0.1.3) (2026-06-27)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* introduce Diogenes CLI with initialization and command structure ([e4d5f82](https://github.com/meaganewaller/diogenes/commit/e4d5f8201c83b54f03c7d7b722e26e0d47c70cb0))
|
|
9
|
+
|
|
3
10
|
## [0.1.2](https://github.com/meaganewaller/diogenes/compare/diogenes/v0.1.1...diogenes/v0.1.2) (2026-06-27)
|
|
4
11
|
|
|
5
12
|
|
data/CLAUDE.md
CHANGED
|
@@ -1,138 +1,146 @@
|
|
|
1
|
-
# Diogenes — Claude
|
|
1
|
+
# Diogenes — Claude Instructions
|
|
2
2
|
|
|
3
|
-
This file
|
|
3
|
+
> This file is generated by `diogenes build --target claude-code`.
|
|
4
|
+
> Edit the source in `.diogenes/` and rebuild. Do not edit this file directly.
|
|
4
5
|
|
|
5
6
|
---
|
|
6
7
|
|
|
7
|
-
## What This Gem
|
|
8
|
+
## What This Gem Is
|
|
8
9
|
|
|
9
|
-
Diogenes is a
|
|
10
|
+
Diogenes is a Ruby gem with two surfaces:
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
2. **Grounding verification** — actively checking that AI output is supported by retrieved context
|
|
13
|
-
3. **Drift detection** — tracking when indexed documents go stale relative to their sources
|
|
14
|
-
4. **Eval running** — testing AI features against golden pairs on a schedule, alerting on regression
|
|
15
|
-
5. **Dashboard** — surfacing all of the above in a mounted Rails engine
|
|
12
|
+
**CLI / Build Tool** — Takes a canonical `.diogenes/` source (skills, rules, hooks, artifacts defined in a Ruby DSL) and builds agent-specific configuration files for Claude Code, Cursor, Copilot, Codex, Gemini, and other agents. One source of truth, many targets.
|
|
16
13
|
|
|
17
|
-
It
|
|
14
|
+
**Runtime Library** — A `Diogenes::Gated` module you include in Ruby classes that touch AI. It enforces a five-gate decision framework at class load time (loud in development, graceful in production) and provides RSpec/Minitest matchers so gate decisions live in the test suite.
|
|
15
|
+
|
|
16
|
+
The gem is grounded in a decision framework for AI features derived from Ruby's core principles: least surprise, programmer happiness, and human-centered design.
|
|
18
17
|
|
|
19
18
|
---
|
|
20
19
|
|
|
21
|
-
##
|
|
20
|
+
## Codebase Map
|
|
22
21
|
|
|
23
|
-
```
|
|
22
|
+
```text
|
|
24
23
|
lib/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
24
|
+
├── diogenes.rb # entry point, autoloads, top-level configure block
|
|
25
|
+
├── diogenes/
|
|
26
|
+
│ ├── cli/ # Thor-based CLI commands
|
|
27
|
+
│ │ ├── init.rb # diogenes init
|
|
28
|
+
│ │ ├── build.rb # diogenes build
|
|
29
|
+
│ │ ├── evaluate.rb # diogenes evaluate (interactive)
|
|
30
|
+
│ │ └── validate.rb # diogenes validate
|
|
31
|
+
│ ├── dsl/ # source format DSL
|
|
32
|
+
│ │ ├── skill.rb # Diogenes.skill { ... }
|
|
33
|
+
│ │ ├── rule.rb # Diogenes.rule { ... }
|
|
34
|
+
│ │ ├── hook.rb # Diogenes.hook { ... }
|
|
35
|
+
│ │ └── artifact.rb # Diogenes.artifact { ... }
|
|
36
|
+
│ ├── gates/ # one file per gate
|
|
37
|
+
│ │ ├── base.rb # shared validation interface
|
|
38
|
+
│ │ ├── failure_mode.rb # Gate 1
|
|
39
|
+
│ │ ├── user_verifiable.rb # Gate 2
|
|
40
|
+
│ │ ├── human_in_loop.rb # Gate 3
|
|
41
|
+
│ │ ├── observability.rb # Gate 4
|
|
42
|
+
│ │ └── right_tool.rb # Gate 5
|
|
43
|
+
│ ├── targets/ # one file per agent target
|
|
44
|
+
│ │ ├── base.rb # shared emit interface
|
|
45
|
+
│ │ ├── claude_code.rb # .claude/ + CLAUDE.md
|
|
46
|
+
│ │ ├── cursor.rb # .cursor/rules/
|
|
47
|
+
│ │ ├── copilot.rb # .github/copilot-instructions.md
|
|
48
|
+
│ │ ├── codex.rb # codex-instructions.md + tools.json
|
|
49
|
+
│ │ └── gemini.rb # .gemini/instructions.md
|
|
50
|
+
│ ├── runtime/ # the Gated module and GateResult
|
|
51
|
+
│ │ ├── gated.rb # include Diogenes::Gated
|
|
52
|
+
│ │ ├── gate_result.rb # structured pass/fail response
|
|
53
|
+
│ │ └── environment.rb # development vs production behaviour
|
|
54
|
+
│ └── rspec/ # RSpec matchers
|
|
55
|
+
│ └── matchers.rb # have_gate, pass_gate, fail_gate
|
|
56
|
+
spec/ # mirrors lib/
|
|
57
|
+
exe/
|
|
58
|
+
└── diogenes # CLI entry point
|
|
59
|
+
.diogenes/ # this gem's own canonical source
|
|
57
60
|
```
|
|
58
61
|
|
|
59
|
-
|
|
62
|
+
---
|
|
60
63
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
views/diogenes/dashboard/
|
|
71
|
-
overview.html.erb
|
|
72
|
-
grounding/
|
|
73
|
-
drift/
|
|
74
|
-
evals/
|
|
75
|
-
assets/
|
|
76
|
-
diogenes.css # Minimal; no framework dependency
|
|
77
|
-
config/
|
|
78
|
-
routes.rb
|
|
79
|
-
db/
|
|
80
|
-
migrate/ # Audit log, drift tracking, eval results tables
|
|
81
|
-
```
|
|
64
|
+
## Key Conventions
|
|
65
|
+
|
|
66
|
+
**Error messages are human.** When a gate fails or a configuration is invalid, the message should say what happened, why it matters, and what to do instead. Not just what went wrong — what to do about it.
|
|
67
|
+
|
|
68
|
+
**Development is loud, production is graceful.** Gate failures raise in development (`Diogenes::GateFailed`), return a `GateResult` in production. Environment is detected via `Rails.env` if present, otherwise `ENV["DIOGENES_ENV"]`.
|
|
69
|
+
|
|
70
|
+
**The DSL is the source of truth.** Nothing in `lib/` should have an opinion about what format a particular agent uses. Targets do the translation. Gates do the validation. The DSL holds the intent.
|
|
71
|
+
|
|
72
|
+
**Agent-agnostic means agent-agnostic.** When working on a target, resist any temptation to leak target-specific concepts into the DSL or gates. A skill is a skill. A rule is a rule. The target decides what to do with them.
|
|
82
73
|
|
|
83
74
|
---
|
|
84
75
|
|
|
85
|
-
##
|
|
76
|
+
## Available Skills
|
|
86
77
|
|
|
87
|
-
|
|
78
|
+
Use these commands in any Claude session while working on this gem:
|
|
88
79
|
|
|
89
|
-
|
|
80
|
+
### `/evaluate-feature <description>`
|
|
90
81
|
|
|
91
|
-
|
|
82
|
+
Walk a proposed gem feature through the five Diogenes gates. Yes, the gem evaluates itself. Produces a decision record you should commit alongside the PR.
|
|
92
83
|
|
|
93
|
-
|
|
84
|
+
*Use when:* You're about to build something new and want to check it against the framework before writing code.
|
|
94
85
|
|
|
95
|
-
|
|
86
|
+
### `/new-target <agent-name>`
|
|
96
87
|
|
|
97
|
-
|
|
88
|
+
Scaffold a new build target. Generates `lib/diogenes/targets/<name>.rb`, the corresponding spec file, and a stub entry in `docs/targets.md`.
|
|
98
89
|
|
|
99
|
-
|
|
90
|
+
*Use when:* Adding support for a new agent.
|
|
100
91
|
|
|
101
|
-
|
|
92
|
+
### `/review-philosophy`
|
|
102
93
|
|
|
103
|
-
|
|
94
|
+
Review the current working context (open files, recent changes) for alignment with Diogenes' principles. Flags anything that feels like scope creep, API surface bloat, or a violation of the "agent-agnostic source" rule.
|
|
95
|
+
|
|
96
|
+
*Use when:* You've been in the weeds for a while and want a sanity check.
|
|
97
|
+
|
|
98
|
+
### `/generate-stories <feature description>`
|
|
99
|
+
|
|
100
|
+
Draft user stories with acceptance criteria for a proposed feature, scoped to the demo or the full roadmap depending on what you specify.
|
|
104
101
|
|
|
105
|
-
|
|
102
|
+
*Use when:* Scoping new work before opening a PR.
|
|
106
103
|
|
|
107
|
-
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
- The engine and all ActiveRecord code lives under `lib/diogenes/engine/` and is never required by the core
|
|
104
|
+
### `/gate-schema <gate-name> <option-name>`
|
|
105
|
+
|
|
106
|
+
Help design the schema and validation logic for a new gate option. Asks targeted questions about what passes, what fails, and what the failure message should say.
|
|
107
|
+
|
|
108
|
+
*Use when:* Adding new options to an existing gate.
|
|
113
109
|
|
|
114
110
|
---
|
|
115
111
|
|
|
116
|
-
##
|
|
112
|
+
## Active Rules
|
|
113
|
+
|
|
114
|
+
These apply to every session working on this gem:
|
|
115
|
+
|
|
116
|
+
**Stay agent-agnostic.** The `.diogenes/` DSL and the gate framework should never reference Claude, Cursor, or any specific agent. Targets handle translation. If you find yourself writing agent-specific logic outside a target file, stop.
|
|
117
|
+
|
|
118
|
+
**The gates are not a checklist to game.** When evaluating proposed features with `/evaluate-feature`, engage honestly with each gate. A gate failure is information, not an obstacle.
|
|
119
|
+
|
|
120
|
+
**Prefer explicit Ruby over clever Ruby.** This gem will be read by contributors who are encountering it for the first time. Clarity beats elegance. The person debugging this at midnight should understand it without context.
|
|
117
121
|
|
|
118
|
-
-
|
|
119
|
-
- The grounding verifier has a stub: `Diogenes::Grounding::Verifier.stub(result: :pass)`
|
|
120
|
-
- Drift tracker tests use fixed timestamps; never `Time.now` directly
|
|
121
|
-
- Eval matchers are tested against fixture responses, not live LLM calls
|
|
122
|
-
- The engine is tested with a minimal Rails app in `spec/dummy/`
|
|
123
|
-
- `Diogenes::TestMode` disables gate enforcement while still recording gate declarations — use in specs that test the host app's AI features, not Diogenes itself
|
|
122
|
+
**Gate failure messages are first-class.** When you write or modify a gate, the failure message is as important as the validation logic. Draft it first. It should sound like a thoughtful colleague pointing something out, not a compiler.
|
|
124
123
|
|
|
125
|
-
|
|
124
|
+
**Tests are not optional.** Every gate option, every target, every CLI command needs tests. If you're uncertain what to test, that uncertainty is a sign the API needs clarification, not that tests can be skipped.
|
|
126
125
|
|
|
127
126
|
---
|
|
128
127
|
|
|
129
|
-
##
|
|
128
|
+
## Running the Gem Locally
|
|
130
129
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
130
|
+
```bash
|
|
131
|
+
bundle exec exe/diogenes --help
|
|
132
|
+
bundle exec exe/diogenes init
|
|
133
|
+
bundle exec exe/diogenes evaluate "some feature idea"
|
|
134
|
+
bundle exec exe/diogenes build --all
|
|
135
|
+
bundle exec rspec
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
---
|
|
137
139
|
|
|
138
|
-
|
|
140
|
+
## Rebuilding This File
|
|
141
|
+
|
|
142
|
+
This file was generated from `.diogenes/`. To regenerate after source changes:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
bundle exec exe/diogenes build --target claude-code
|
|
146
|
+
```
|