Skip to content

Refactor GitHub Actions workflow and improve documentation#23

Merged
kiyotis merged 27 commits intodevelopfrom
refactor-extract-workflow-scripts
Feb 16, 2026
Merged

Refactor GitHub Actions workflow and improve documentation#23
kiyotis merged 27 commits intodevelopfrom
refactor-extract-workflow-scripts

Conversation

@kiyotis
Copy link
Contributor

@kiyotis kiyotis commented Feb 16, 2026

概要

GitHub Actionsワークフローのインラインスクリプトを外部ファイルに抽出し、メンテナンス性を向上させました。また、ドキュメント構成とセットアップスクリプトを大幅に改善しました。

主な変更内容

1. ワークフローリファクタリング

インラインスクリプトの抽出 (.github/scripts/)

  • validate-version-updates.sh - バージョンファイル更新検証
  • clean-repository.sh - リポジトリクリーンアップ
  • validate-marketplace.sh - マーケットプレイス構造検証
  • commit-and-push.sh - 変更のコミット・プッシュ
  • create-version-tag.sh - バージョンタグ作成
  • transform-to-plugin.sh - プラグイン配布形式への変換

結果: ワークフローファイルが171行 → 約60行に削減、可読性とテスト容易性が向上

削除: update-changelog.sh - CHANGELOG同期は不要(開発側の変更のみ追跡)

2. セットアップスクリプト改善

環境変数サポート追加

  • NABLEDGE_REPO - カスタムリポジトリ指定
  • NABLEDGE_BRANCH - ブランチ/タグ指定
  • テスト環境や特定バージョンのインストールに対応

GitHub Copilot自動設定 (setup-6-ghc.sh)

  • .vscode/settings.json を自動作成・更新
  • chat.useAgentSkills: true を設定
  • 既存設定を保持してマージ
  • チーム全体でスキル機能を共有可能に

バグ修正

  • カスタムリポジトリ名に対応(リポジトリ名を動的取得)

3. ドキュメント再構成

利用ガイドの分離

  • GUIDE-CC.md - Claude Code向け詳細手順
  • GUIDE-GHC.md - GitHub Copilot向け詳細手順
  • README.md - 概要のみ(シンプルに)

CHANGELOG整備

  • 全て日本語化(Nablarchユーザー向け)
  • マーケットプレイスCHANGELOG: バージョン対応表のみ(詳細はプラグインCHANGELOGへリンク)
  • プラグインCHANGELOG 0.1: 評価版であることを明確化(「基礎知識とワークフローを提供」)

バージョン管理の簡素化

  • READMEから複雑なバージョンセクションを削除
  • 利用ガイドにアップグレード手順を追加(タグ指定の例含む)
  • デフォルトは常に最新版、特定バージョンはオプション

その他のドキュメント改善

  • 評価版の目的を明確化(知識の違い体感、ワークフロー理解、要望収集)
  • コード分析の説明を修正(ドキュメント生成機能、改善提案は行わない)
  • VS Codeスキル有効化手順を具体化(chat.useAgentSkills で検索)
  • GitHub Copilot使用方法: 自然言語で質問(スラッシュコマンド不要)
  • WSL/GitBash必須の理由を説明(jqコマンド要件)
  • 環境変数カスタマイズを利用ガイドから削除(開発者向け情報)

テスト

動作確認済み

✅ セットアップスクリプト(Claude Code / GitHub Copilot)
✅ バージョンアップ(再実行でのアップグレード)
✅ 環境変数カスタマイズ(NABLEDGE_REPO, NABLEDGE_BRANCH)
✅ VS Code settings.json自動設定

  • 新規作成ケース
  • 既存設定マージケース
  • 重複チェック
    ✅ GitHub Actions全ステップ(test-toブランチで検証)

エラーケーステスト

✅ バージョン検証失敗
✅ マーケットプレイス検証失敗

影響範囲

  • 破壊的変更なし: 既存のセットアップ方法は引き続き動作
  • 追加機能: 環境変数サポート、VS Code自動設定
  • 改善: ドキュメント構成、CHANGELOG、バージョン管理説明、使い方の明確化

ファイル変更統計

主要な変更:

  • .github/scripts/: 6つの新スクリプト
  • .github/workflows/sync-to-nabledge.yml: 大幅簡素化
  • scripts/setup-6-*.sh: 環境変数サポート、VS Code自動設定
  • .claude/marketplace/: CHANGELOG追加、README簡素化
  • .claude/skills/nabledge-6/plugin/: GUIDE分離、CHANGELOG日本語化

🤖 Generated with Claude Code

kiyotis and others added 27 commits February 16, 2026 10:12
)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Extract 6 inline bash scripts from sync-to-nabledge.yml workflow into separate script files for better maintainability and testability.

Changes:
- Create validate-version-updates.sh
- Create clean-repository.sh
- Create update-changelog.sh
- Create validate-marketplace.sh
- Create commit-and-push.sh (with branch parameter support)
- Create create-version-tag.sh
- Update workflow to use external scripts
- Configure workflow to push to test-to branch for testing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change SKILL.md without updating version files to test validation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove marketplace.json to test validation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add clear prerequisites for both Claude Code and GitHub Copilot installations:
- Claude Code: Requires Claude Code to be installed
- GitHub Copilot: Requires WSL or GitBash environment
  - VS Code terminal must be set to WSL or GitBash
  - PowerShell and Command Prompt are not supported

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add NABLEDGE_REPO and NABLEDGE_BRANCH environment variables to both setup scripts:
- NABLEDGE_REPO: Repository path (default: nablarch/nabledge)
- NABLEDGE_BRANCH: Branch name (default: main)

This enables:
- Testing with test-to branch
- Using forked repositories
- Custom corporate deployments

Updated README with usage examples for both Claude Code and GitHub Copilot.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Correct the environment variable usage examples to download the script first,
then execute with environment variables. Direct piping does not pass
environment variables to the downloaded script.

Before (incorrect):
NABLEDGE_BRANCH=test-to curl -sSL ... | bash

After (correct):
curl -sSL ... -o setup.sh
NABLEDGE_BRANCH=test-to bash setup.sh

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove automatic CHANGELOG update during sync:
- Sync information does not need to be recorded in CHANGELOG
- CHANGELOG should only contain release information
- Development changes are tracked in nabledge-dev's [Unreleased] section
- On release, [Unreleased] becomes versioned (e.g., [0.2] - 2026-XX-XX)

Changes:
- Remove "Update CHANGELOG.md" step from workflow
- Delete update-changelog.sh script (no longer needed)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Split documentation for better readability:
- README.md: Overview and feature descriptions only
- USAGE-CC.md: Claude Code installation, usage, and upgrade guide
- USAGE-GHC.md: GitHub Copilot installation, usage, and upgrade guide

Benefits:
- Each guide is focused and easy to navigate
- Users can quickly find relevant information for their tool
- Reduces cognitive load by separating concerns

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add USAGE-CC.md and USAGE-GHC.md to the files copied by transform-to-plugin.sh.
These new usage guides were not being copied to the distribution repository.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Changes:
- Rename USAGE-CC.md → GUIDE-CC.md
- Rename USAGE-GHC.md → GUIDE-GHC.md
- Move evaluation notice to top of README with warning symbol
- Add purpose statement explaining why this skill is needed
- Update transform script to use new filenames

Benefits:
- Evaluation status is immediately visible
- Purpose is clear before diving into features
- Consistent naming with Japanese term "利用ガイド" (usage guide)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Changes:
- Enhanced evaluation notice to clarify three key purposes:
  1. Experience the difference with/without Nablarch knowledge
  2. Understand workflow execution possibilities
  3. Gather requirements from actual usage
- Removed separate "Purpose" section (merged into evaluation notice)
- Removed environment variable customization from user guides (developer-only)
- Updated usage sections to emphasize natural language interaction

Benefits:
- Clearer evaluation objectives for users
- Simpler guides focused on end-user needs
- Better alignment with how users actually interact with AI assistants

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Changes:
- Add explanation for why PowerShell/Command Prompt doesn't work (jq requirement)
- Clarify that .claude directory is automatically recognized by GitHub Copilot
- Add VS Code skill enablement instructions
- Update usage instructions to require `/nabledge-6 message` format (message-only doesn't work)
- Remove macOS-specific notes (out of scope for WSL/GitBash prerequisites)
- Remove unnecessary notes section from Claude Code guide

Benefits:
- Users understand why certain environments are required
- Clear instructions for GitHub Copilot skill setup
- Accurate usage format prevents confusion

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Simplify versioning section for end users:
- Users always install the latest version via setup scripts
- Version numbers (0.1, 1.0, etc.) are for release tracking only
- Users don't need to be aware of individual plugin versioning

Changed from:
- Complex explanation of independent plugin versioning
- Technical details about version format

To:
- Simple statement that setup always installs latest
- Version numbers are informational only

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix inaccurate description of code analysis workflow:

Before: "analyzes code and provides improvement suggestions"
After: "analyzes code and generates documentation visualizing structure and dependencies"

The code analysis workflow actually:
1. Traces code dependencies
2. Searches Nablarch knowledge
3. Generates structured documentation with Mermaid diagrams

It does NOT provide improvement suggestions - that's a future feature.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove version section from marketplace README (users always install latest)
- Create marketplace CHANGELOG with version correspondence table
- Add version upgrade sections to both GUIDE-CC.md and GUIDE-GHC.md
  - Default behavior: install latest version (recommended)
  - Optional: specify tag with NABLEDGE_BRANCH environment variable
- Update transform script to copy marketplace CHANGELOG

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Document changes made to version documentation and usage guides:
- Simplified version section in README
- Added version upgrade instructions with tag specification
- Created marketplace CHANGELOG with version correspondence table

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Nablarchユーザー(日本人)向けのため、全てのCHANGELOGを日本語に変更:
- プラグインCHANGELOG(.claude/skills/nabledge-6/plugin/CHANGELOG.md)
- マーケットプレイスCHANGELOG(.claude/marketplace/CHANGELOG.md)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
「### Added」を「### 追加」に変更

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
バージョン対応表のみに変更し、詳細は各プラグインのCHANGELOGへのリンクで参照する形に。
重複した変更内容の記載を削除してメンテナンスを容易に。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- CHANGELOG 0.1: 機能リストを削除し「評価版として基礎知識とワークフローを提供」に変更
  評価版で限定的であることを明確に
- setup-6-ghc.sh: カスタムリポジトリ名に対応
  リポジトリ名からディレクトリ名を動的に取得するように修正

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
VS Code設定での具体的な手順を追加:
- 検索キーワード: chat.useAgentSkills
- チェックボックスをオンにする
- VS Code再起動で有効化

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
チーム全体でGitHub Copilotスキル機能を共有可能に:
- setup-6-ghc.shが.vscode/settings.jsonを自動作成・更新
- chat.useAgentSkills設定を追加(既存設定は保持)
- 既に設定がある場合は上書きしない
- チームメンバーはクローン後にVS Code再起動のみで利用可能

テスト済み:
- 新規作成ケース
- 既存ファイル・既存設定ありケース
- 既存ファイル・他設定ありケース(マージ)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
自然言語での質問で自動的にスキルが適用されるため:
- GUIDE-GHC.md: `/nabledge-6 メッセージ` 形式を削除
- 使い方: 自然言語で質問するだけに変更
- setup-6-ghc.sh: 完了メッセージから `/nabledge-6` を削除

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kiyotis kiyotis changed the title Refactor: Extract inline scripts from GitHub Actions workflow Refactor GitHub Actions workflow and improve documentation Feb 16, 2026
@kiyotis kiyotis changed the base branch from main to develop February 16, 2026 03:04
@kiyotis kiyotis merged commit eef0c52 into develop Feb 16, 2026
1 check passed
@kiyotis kiyotis deleted the refactor-extract-workflow-scripts branch February 16, 2026 03:51
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

Comments