Skip to content

📝 AI向け指示文書の監査結果を反映#286

Merged
touyou merged 1 commit into
mainfrom
chore/ai-docs-audit
Jul 3, 2026
Merged

📝 AI向け指示文書の監査結果を反映#286
touyou merged 1 commit into
mainfrom
chore/ai-docs-audit

Conversation

@touyou

@touyou touyou commented Jul 3, 2026

Copy link
Copy Markdown
Member

概要

5リポジトリ横断の AI 向け文書・スキル監査で見つかった sparkle-design 側の改善点を反映します。

変更内容

  • Git 安全ルールの明文化: docs/ai-instructions/context.md に amend+force-push 禁止・通常マージのみ・lockfile 更新必須・pnpm 10.12.4 固定を追加。ワークスペース外からこのリポジトリ単体でセッションを開いた AI エージェントもルールに到達できるように(生成物 AGENTS.md / Copilot / Cursor へ同期済み)
  • Cursor 向け new-component ルールの欠落解消: sync-ai-instructions.shgenerate_cursor 呼び出しを追加(Copilot は 5 件生成されるのに Cursor は 4 件だった)
  • README の誤記修正: 生成されない .github/copilot-instructions.md の行を削除
  • 共有スキルの文言改善(internal / docs / prj-template へは各リポジトリの同期スクリプトで追従予定):
    • change-sparkle-config: 未導入時の誘導に install-sparkle-design(internal 環境の対応スキル)を併記
    • add-sparkle-component: Node.js 18+ が利用側プロジェクト要件である旨を明記

マージ後のフォローアップ

  • sparkle-design-internal で pnpm sync:public-skills
  • sparkle-design-docs で pnpm sync:skills

🤖 Generated with Claude Code

https://claude.ai/code/session_012pfrFvQwXGi3DNG7er73Q7

- context.md に Git 安全ルールを追加(amend+force-push 禁止 / 通常マージのみ / lockfile 更新必須 / pnpm 10.12.4 固定)→ AGENTS.md・Copilot・Cursor へ同期
- sync-ai-instructions.sh に new-component.md の Cursor 向け生成を追加(.cursor/rules/new-component.mdc の欠落を解消)
- ai-instructions/README.md から生成されない .github/copilot-instructions.md の行を削除
- change-sparkle-config: 未導入時の誘導に internal 環境向けの install-sparkle-design を併記
- add-sparkle-component: Node.js 18+ は利用側プロジェクトの要件である旨を明記

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012pfrFvQwXGi3DNG7er73Q7
@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sparkle-design Ready Ready Preview, Comment Jul 3, 2026 5:55am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

複数のAI指示ドキュメント(AGENTS.md、.cursor/rules/context.mdc、GitHub instructions、docs/ai-instructions/context.md)にGit Safety Rulesセクションを追加し、新規Cursorルール new-component.mdc を追加、同期スクリプトへ生成分岐を追加、スキルSKILL.mdの導入案内文言とREADME記載を更新した。

Changes

Gitセーフティルールの追加

Layer / File(s) Summary
各指示ファイルへのGit Safety Rulesセクション追加
AGENTS.md, .cursor/rules/context.mdc, .github/instructions/ai-context.instructions.md, docs/ai-instructions/context.md
main直接push禁止、amend/force-push禁止、通常マージ徹底、lockfile更新要件、固定ツールチェーン(Node.js 22.14.0 / pnpm 10.12.4)利用のルールを各ドキュメントに同内容で追記。

新規コンポーネント作成ルールの追加

Layer / File(s) Summary
new-component.mdcルールの新規作成
.cursor/rules/new-component.mdc
フロントマター、日本語の作成手順(setup.sh実行、README更新、公開状況更新等)、コメント規則参照を新規定義。
同期スクリプトへの生成分岐追加
scripts/sync-ai-instructions.sh
new-component.md 存在時に generate_cursornew-component.mdc を生成する分岐を追加。

スキル案内文言とREADME更新

Layer / File(s) Summary
スキルSKILL.mdの導入案内・バージョン注記更新
.claude/skills/add-sparkle-component/SKILL.md, .claude/skills/change-sparkle-config/SKILL.md
Node.jsバージョン参照追記、internal環境向け install-sparkle-design への案内切り替え。
README.mdの生成ファイル一覧修正
docs/ai-instructions/README.md
GitHub Copilotメイン指示ファイル行を削除。

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • goodpatch/sparkle-design#271: 同じ .claude/skills/add-sparkle-component/SKILL.md.claude/skills/change-sparkle-config/SKILL.md を直接更新している点で重なりあり。

Poem

ぴょんと跳ねて ルール整え 🐇
mainには push しない 約束ね
amendもforceも しないでおこう
new-componentは 手順どおり
うさぎの手も 借りたい git safety!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed タイトルは AI 向け指示文書の監査反映という主変更を簡潔に表しており、内容とも一致しています。
Description check ✅ Passed 概要、変更内容、マージ後のフォローアップが揃っており、テンプレート要件を概ね満たしています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/ai-docs-audit

Comment @coderabbitai help to get the list of available commands.

@touyou touyou marked this pull request as ready for review July 3, 2026 06:07
Copilot AI review requested due to automatic review settings July 3, 2026 06:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

AI 向け指示文書・スキル監査の指摘を sparkle-design に反映し、各ツール(GitHub Copilot / Cursor / Codex / Claude Code)へ同期される生成物の欠落や誤記を解消する PR です。

Changes:

  • context.md に Git 運用の安全ルール(force-push禁止、通常マージのみ、lockfile更新、Node/pnpm固定)を追記し、生成物(AGENTS.md / Copilot / Cursor)にも反映
  • sync-ai-instructions.sh で Cursor 向けに new-component ルール生成を追加し、Cursor 側の欠落を解消
  • AI instructions README の誤記を修正し、Claude スキル文書の誘導文言を改善

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/sync-ai-instructions.sh Cursor へ new-component ルールを生成する処理を追加
docs/ai-instructions/README.md 生成されない Copilot 指示ファイルの記載を削除
docs/ai-instructions/context.md Git Safety Rules とツールチェーン固定情報を追記(指示ソース)
AGENTS.md context.md 由来の Git Safety Rules を反映(生成物)
.github/instructions/ai-context.instructions.md context.md 由来の Git Safety Rules を反映(生成物)
.cursor/rules/new-component.mdc new-component.md を Cursor ルールとして追加(生成物)
.cursor/rules/context.mdc context.md 由来の Git Safety Rules を反映(生成物)
.claude/skills/change-sparkle-config/SKILL.md 未導入時の誘導先として internal 用スキルも併記
.claude/skills/add-sparkle-component/SKILL.md Node.js 要件の注記を明確化(利用側=18+ / 開発側=22.14.0)

### Git Safety Rules
- **Never amend + force-push**: address review feedback and mistakes with new commits
- **No direct push to `main`**: always go through a PR (admin merge required)
- **PR merges use normal merge (`--merge`)**: never squash-merge (squashing loses commits)
- **No direct push to `main`**: always go through a PR (admin merge required)
- **PR merges use normal merge (`--merge`)**: never squash-merge (squashing loses commits)
- **Update the lockfile whenever `package.json` changes**: CI runs `pnpm install --frozen-lockfile` and will fail otherwise
- **Use the pinned toolchain**: Node.js 22.14.0 / pnpm 10.12.4 (see `.tool-versions`; newer pnpm majors can rewrite the lockfile)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
scripts/sync-ai-instructions.sh (1)

57-65: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

generate_cursor()globs を YAML 文字列として出力してください。
globs: ** は YAML として解釈できず、.cursor/rules/new-component.mdc の frontmatter が壊れます。globs をクォートするか、配列形式にしてください。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/sync-ai-instructions.sh` around lines 57 - 65, The frontmatter
generated by generate_cursor() is writing globs as an unquoted YAML scalar,
which breaks parsing for patterns like **. Update the generate_cursor() output
in the sync-ai-instructions.sh flow so globs is emitted as a valid YAML string
or sequence, and keep the existing description and alwaysApply fields unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@scripts/sync-ai-instructions.sh`:
- Around line 57-65: The frontmatter generated by generate_cursor() is writing
globs as an unquoted YAML scalar, which breaks parsing for patterns like **.
Update the generate_cursor() output in the sync-ai-instructions.sh flow so globs
is emitted as a valid YAML string or sequence, and keep the existing description
and alwaysApply fields unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 24763705-3252-475f-857d-295ecc218d72

📥 Commits

Reviewing files that changed from the base of the PR and between 68d6034 and a169c30.

📒 Files selected for processing (9)
  • .claude/skills/add-sparkle-component/SKILL.md
  • .claude/skills/change-sparkle-config/SKILL.md
  • .cursor/rules/context.mdc
  • .cursor/rules/new-component.mdc
  • .github/instructions/ai-context.instructions.md
  • AGENTS.md
  • docs/ai-instructions/README.md
  • docs/ai-instructions/context.md
  • scripts/sync-ai-instructions.sh
💤 Files with no reviewable changes (1)
  • docs/ai-instructions/README.md

@touyou touyou merged commit 728d0e0 into main Jul 3, 2026
5 checks passed
@touyou touyou deleted the chore/ai-docs-audit branch July 3, 2026 06:21
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.

2 participants