Skip to content

build(nix): add ast-grep to home packages - #427

Merged
furedea merged 1 commit into
mainfrom
build/74-ast-grep-path
Nov 10, 2026
Merged

furedea merged 1 commit into
mainfrom
build/74-ast-grep-path

Conversation

@furedea-agent

@furedea-agent furedea-agent Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

概要

agent-config の lint_format フック (furedea/agent-config#74) は,エージェントの編集後に共有ルールで ast-grep scan を実行する.しかし ast-grep がユーザーの日常 PATH になく,フックが何もせずに終わっていた.

nixpkgs の ast-grep を nix/home/default.nix の home.packages に追加した.配置は「Code quality」グループで,actionlint と zizmor の間に置き,既存のアルファベット順を保っている.

Refs furedea/agent-config#74

検証

  • nix flake check: all checks passed (aarch64-darwin)
  • nixfmt --check nix/home/default.nix: 差分なし
  • pre-commit (lefthook: deadnix, statix, nixfmt, ls-lint など): すべて成功
  • darwin-rebuild switch / home-manager switch は未実行.適用はユーザーが行う.

計画からの変更

なし.

🤖 Generated with Claude Code

@furedea

furedea commented Nov 10, 2026

Copy link
Copy Markdown
Owner

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-10T05:21:05.133313Z
We couldn’t complete this review. Comment @codex review to try again.
0c18a95 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions

Copy link
Copy Markdown
Contributor

Review summary: no findings.

This PR adds one line, ast-grep in the home.packages Code quality group. ast-grep is a valid top-level nixpkgs attribute. The repo doesn't install it anywhere else, so the line can't duplicate or collide with another entry. The nixpkgs package doesn't install the legacy sg binary by default, so nothing in PATH should conflict with /usr/bin/sg either. A package addition like this doesn't need its own tests; nix flake check covers evaluation.

Blocking findings (P0/P1): 0

@furedea
furedea merged commit b066248 into main Nov 10, 2026
19 of 21 checks passed
@furedea
furedea deleted the build/74-ast-grep-path branch November 10, 2026 05:24
furedea added a commit that referenced this pull request Nov 10, 2026
## 概要

agent-config を最新にして,編集のたびに共通の ast-grep
規則(agent-config#117,#121)が動くようにする.`ast-grep` は #427 で PATH に入っている.

| 項目 | 前 | 後 |
| --- | --- | --- |
| agent-config | eae1408(共通の規則なし) | #117 まで |
| 編集後の hook | ast-grep を動かさない | 共通の規則で ast-grep を動かし,指摘を返す(止めない) |

## 検証

- [x] `darwin-rebuild switch` で適用済み(ユーザー)
- [x] 配られた `hooks/lint/sgconfig.yml` で,`@staticmethod` を含む試しのファイルに
`py_no_staticmethod` が出ることを確認

Refs furedea/agent-config#74

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: furedea <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant