Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 44 additions & 10 deletions .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,56 @@
"Bash(RUBY2HTML_DISABLE_EXT=1 bundle exec rspec *)",
"Bash(RUBY2HTML_NO_SIMD=1 bundle exec rake compile)",
"Bash(bin/build-ext)",
"Bash(bin/build-ext *)"
],
"ask": [
"Bash(bin/build-ext *)",
"Bash(git add *)",
"Bash(git commit *)",
"Bash(git push)",
"Bash(git push *)",
"Bash(git checkout *)",
"Bash(git switch *)",
"Bash(git branch *)",
"Bash(git fetch *)",
"Bash(git pull *)",
"Bash(git pull)",
"Bash(git rebase *)",
"Bash(git stash *)",
"Bash(git restore *)",
"Bash(git rm *)",
"Bash(git mv *)",
"Bash(gh pr *)",
"Bash(gh issue *)",
"Bash(gh api *)",
"Bash(gh workflow *)",
"Bash(gh run *)",
"Bash(gh repo view *)",
"Bash(gh label *)",
"Bash(bundle exec rake *)",
"Bash(bundle exec ruby *)",
"Bash(bundle exec rails *)",
"Bash(bin/rails *)",
"Bash(bundle update *)",
"Bash(bundle outdated *)",
"Bash(bundle lock *)",
"Bash(ruby *)",
"Bash(bin/*)"
],
"deny": [
"Read(./config/master.key)",
"Read(./.env*)",
"Read(./tmp/local_secret.txt)",
"Bash(git tag *)",
"Bash(git commit *)",
"Bash(git push --tags*)",
"Bash(git push * --tags*)",
"Bash(git push --force*)",
"Bash(git push * --force*)",
"Bash(git push -f*)",
"Bash(git push * -f*)",
"Bash(bundle exec rake release*)",
"Bash(rake release*)",
"Bash(gem push *)",
"Bash(gem yank *)",
"Bash(gh release *)"
],
"deny": [
"Read(./config/master.key)",
"Read(./.env*)",
"Read(./tmp/local_secret.txt)"
"Bash(gh release *)",
"Bash(gh repo delete *)"
]
},
"hooks": {
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Keep it that way: don't hardcode version lists or benchmark numbers in docs; poi

- Project skills (`.claude/skills/`): `release` (bump → changelog → verify → `release: X.Y.Z` PR; merging publishes; manual-only), `benchmark` (before/after), `add-html-tag`, `review` (checklist for `ext/` and renderer diffs), `debug-render` (C vs Ruby output diffs, sanitizer builds), `upgrade-deps`.
- Subagents (`.claude/agents/`, read-only tools): `perf-reviewer`, `xss-auditor`. Use them for an independent pass on hot-path or escaping changes.
- `.claude/settings.json`: allowlists specs, `rake compile/spec/bench/build/smoke`, rubocop, brakeman, bench scripts and read-only git/gh; `git commit`, `git push`, `git tag`, `rake release`, `gem push/yank`, `gh release` always ask. A PostToolUse hook (`.claude/hooks/post-edit-reminder.sh`, non-blocking) reminds to recompile after `ext/` edits and to keep Native/PureRuby parity after renderer edits.
- `.claude/settings.json`: allowlists the whole routine workflow (specs, `rake`, rubocop, brakeman, bench scripts, `bin/*`, git add/commit/push/branch, `gh pr|issue|api|run|workflow`), so agents work without prompts. Denied outright (never needed: merging a version bump publishes): `git tag`, force pushes, `rake release`, `gem push/yank`, `gh release`, reading `.env*`/`config/master.key`. A PostToolUse hook (`.claude/hooks/post-edit-reminder.sh`, non-blocking) reminds to recompile after `ext/` edits and to keep Native/PureRuby parity after renderer edits.

## Definition of done

Expand Down
3 changes: 3 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ else
Rake::ExtensionTask.new('ruby2html') do |ext|
ext.lib_dir = 'lib/ruby2html'
ext.ext_dir = 'ext/ruby2html'
# Build in tmp/ext, not tmp/: `rake clobber` removes the tmp dir, and tmp/ holds the demo
# app's tracked .keep files.
ext.tmp_dir = 'tmp/ext'
end
rescue LoadError
desc 'Compile the C extension (requires rake-compiler)'
Expand Down
Empty file added tmp/.keep
Empty file.
Empty file added tmp/pids/.keep
Empty file.
Empty file added tmp/storage/.keep
Empty file.
Loading