From 7b2cf785f9f05d1132ceeb40c1952cad1f009760 Mon Sep 17 00:00:00 2001 From: Kiyohito Itoh Date: Fri, 13 Feb 2026 16:47:48 +0900 Subject: [PATCH 01/27] feat: Standardize issue and PR formats for issue-driven development (#16) Co-authored-by: Claude Opus 4.6 --- .claude/rules/issues.md | 118 ++++++ .claude/skills/git/workflows/branch-create.md | 206 ++++++----- .../skills/git/workflows/worktree-create.md | 286 ++++++++++----- .claude/skills/pr/templates/pr-template.md | 92 +++++ .claude/skills/pr/workflows/create.md | 346 +++++++++++++++--- 5 files changed, 804 insertions(+), 244 deletions(-) create mode 100644 .claude/rules/issues.md create mode 100644 .claude/skills/pr/templates/pr-template.md diff --git a/.claude/rules/issues.md b/.claude/rules/issues.md new file mode 100644 index 00000000..7e020eea --- /dev/null +++ b/.claude/rules/issues.md @@ -0,0 +1,118 @@ +# Issue Format + +All issues should follow a consistent structure that clearly articulates the problem, who is affected, and what success looks like. + +## Title Format + +Use the user story format: + +``` +As a [role], I want [goal] so that [benefit] +``` + +**Examples:** +- As a developer, I want standardized issue formats so that I can create consistent documentation +- As a user, I want keyboard shortcuts so that I can navigate more efficiently +- As a maintainer, I want automated tests so that I can catch regressions early + +## Body Format + +Issues should include four sections: + +### 1. Situation + +Concrete facts and observed circumstances. What is the current state? + +- Describe what exists today +- Include relevant technical details +- State observable facts, not opinions +- Reference specific files, systems, or behaviors + +### 2. Pain + +Who is affected and what problem do they face? + +- Identify the affected stakeholders (developers, users, maintainers, etc.) +- Describe the specific problem or friction they experience +- Explain why the current situation is problematic +- Include impact or severity if relevant + +### 3. Benefit + +Who benefits and how? Use the form "[who] can [what]". + +- State clear benefits for each stakeholder +- Use active voice with "can" statements +- Be specific about capabilities gained +- Avoid vague improvements like "better" or "easier" + +**Examples:** +- Developers can create branches with consistent naming +- Users can understand feature status at a glance +- Maintainers can onboard new contributors faster + +### 4. Success Criteria + +Checkboxes that verify benefit achievement. Each criterion should be: + +- Measurable or verifiable +- Directly related to stated benefits +- Written as observable outcomes +- Formatted as GitHub checkboxes `- [ ]` + +**Example:** +```markdown +- [ ] `.claude/rules/issues.md` exists and documents the format +- [ ] New issues follow the Situation/Pain/Benefit/Success Criteria structure +- [ ] Success criteria are written as verifiable checkboxes +``` + +## Complete Example + +```markdown +**Title:** As a developer, I want standardized PR formats so that I can review changes efficiently + +**Body:** + +### Situation + +Currently, PRs are created with an ad-hoc format. Some include detailed context, others provide minimal information. There is no standard structure for documenting the approach, testing, or linking to related issues. + +### Pain + +Reviewers waste time reconstructing context from commit messages and code changes. Developers don't know what information to include in PR descriptions. The lack of consistency makes it harder to maintain quality standards across the project. + +### Benefit + +- Reviewers can understand changes quickly without extensive code archaeology +- Developers can follow a clear template for documenting their work +- Maintainers can enforce quality standards through structured PR requirements + +### Success Criteria + +- [ ] `.claude/skills/pr/workflows/create.md` includes comprehensive PR template +- [ ] Template includes sections for Approach, Tasks, Expert Review, and Success Criteria +- [ ] All new PRs reference the related issue number +- [ ] PRs include verification of issue success criteria +``` + +## Usage Guidelines + +When creating issues: + +1. **Start with the title** - Frame it as a user story +2. **Describe the situation** - State facts about current state +3. **Identify the pain** - Who hurts and why +4. **Articulate benefits** - Use "[who] can [what]" format +5. **Define success criteria** - Write verifiable checkboxes +6. **Review for clarity** - Ensure someone unfamiliar with the context can understand + +## Rationale + +This format ensures: + +- **Shared understanding** - Everyone knows why work matters +- **Clear scope** - Success criteria prevent scope creep +- **Stakeholder focus** - Benefits are explicit and measurable +- **Verification** - Checkboxes provide clear completion signal +- **Traceability** - Format supports issue-driven development workflow diff --git a/.claude/skills/git/workflows/branch-create.md b/.claude/skills/git/workflows/branch-create.md index 6ba25664..cb88d8a2 100644 --- a/.claude/skills/git/workflows/branch-create.md +++ b/.claude/skills/git/workflows/branch-create.md @@ -1,6 +1,6 @@ # Branch Creation Workflow -This workflow creates a working branch from the main branch. +This workflow creates a working branch from the development branch (typically `develop`). ## Required Tools @@ -11,21 +11,48 @@ This workflow creates a working branch from the main branch. ### 1. Pre-flight Checks -**1.1 Verify Current Branch** +**1.1 Get Development Branch and Verify Current Branch** ```bash -git branch --show-current -``` +# Get repository default branch (should be develop per branch strategy) +default_branch=$(gh repo view --json defaultBranchRef -q .defaultBranchRef.name) +echo "Repository default branch: ${default_branch}" -If not on `main`, exit with error: -``` -Error: Working branches must be created from the main branch. -Current branch: {current_branch} +# Verify develop branch exists +if ! git rev-parse --verify develop &>/dev/null; then + echo "Error: Branch 'develop' does not exist in this repository." + echo "" + echo "Please create 'develop' branch first:" + echo " git checkout -b develop main" + echo " git push -u origin develop" + echo "" + echo "Or update the workflow if using different branch names." + exit 1 +fi -To switch to main: -git checkout main +# For branch creation, always use develop as base +if [[ "$default_branch" == "develop" ]]; then + base_branch="develop" +else + echo "WARNING: Repository default is ${default_branch}, but using 'develop' per branch strategy" + base_branch="develop" +fi + +# Get current branch +current_branch=$(git branch --show-current) +echo "Current branch: ${current_branch}" ``` +If not on the base branch, exit with error: + +Error: Working branches must be created from the development branch. + +Current branch: ${current_branch} +Base branch: ${base_branch} + +To switch to ${base_branch}: +git checkout ${base_branch} + **1.2 Verify Clean Working Tree** ```bash @@ -33,7 +60,7 @@ git status --porcelain ``` If uncommitted changes exist, exit with error: -``` + Error: You have uncommitted changes. Please commit or stash changes before proceeding. @@ -42,107 +69,107 @@ git status Stash changes: git stash -``` **1.3 Update Remote** ```bash -git fetch origin main -git pull origin main +echo "Updating ${base_branch} from remote..." +git fetch origin "${base_branch}" +git pull origin "${base_branch}" +echo "Base branch updated successfully" ``` If pull fails (conflicts): -``` -Error: Failed to update main branch. -Please resolve conflicts before proceeding. -``` -### 2. Propose Branch Names +Error: Failed to update ${base_branch} branch. +Please resolve conflicts before proceeding. -**2.1 Ask Work Purpose** +### 2. Get Issue Number and Create Branch Name -Use AskUserQuestion to understand work purpose: +**2.1 Ask for Issue Number** -``` -Question: What will you implement or fix in this branch? -Header: "Work Type" -Options: - - Label: "New Feature" - Description: "Implement a new feature" - - Label: "Bug Fix" - Description: "Fix an existing bug" - - Label: "Refactoring" - Description: "Improve code structure" - - Label: "Documentation" - Description: "Update documentation" -``` +Use the AskUserQuestion tool to prompt the user: +- Question: "What is the issue number for this work?" +- Provide two options: "I have an issue number" and "No issue yet" +- If user selects "I have an issue number", they will provide the number via text input +- If user selects "No issue yet", exit with guidance -**2.2 Ask for Details** +If user selects "No issue yet", exit with guidance: -Based on selected work type, ask for details (free text): -``` -Please provide details about "{work_type}". -Examples: user authentication, login page bug, API layer refactoring, etc. -``` - -**2.3 Generate Branch Names** +Please create an issue first using GitHub issues. +This ensures work is tracked and follows issue-driven development. -Generate 3 branch name candidates from the details: +I can help create the issue. Please provide: +- Role: Who is affected? +- Goal: What do you want? +- Benefit: Why is this important? -**Generation Rules**: -- Prefix: `add-` (feature), `fix-` (bug), `refactor-` (refactor), `docs-` (docs) -- Body: Keywords from details joined with `-` -- All lowercase, alphanumeric and hyphens only +Or you can create it manually on GitHub following .claude/rules/issues.md format. +Once created, return here with the issue number. -**Examples**: -- Details: "Add user authentication feature" - - Candidate 1: `add-user-auth` - - Candidate 2: `add-authentication` - - Candidate 3: `user-auth-feature` +If user provides an issue number, validate it is numeric: -- Details: "Fix login page bug" - - Candidate 1: `fix-login-page` - - Candidate 2: `fix-login-bug` - - Candidate 3: `login-page-fix` +```bash +if ! [[ "$issue_number" =~ ^[0-9]+$ ]]; then + echo "Error: Issue number must be a positive integer" + exit 1 +fi +echo "Issue number validated: ${issue_number}" +``` -**2.4 Select Branch Name** +**2.2 Validate Issue Exists** -Use AskUserQuestion to select from candidates: +Verify the issue exists using gh CLI: -``` -Question: Select branch name. -Header: "Branch Name" -Options: - - Label: "{candidate1}" - Description: "Recommended" - - Label: "{candidate2}" - Description: "" - - Label: "{candidate3}" - Description: "" +```bash +echo "Validating issue #${issue_number}..." +if ! gh issue view "$issue_number" &>/dev/null; then + echo "Error: Issue #${issue_number} not found." + echo "" + echo "Please verify the issue number or create the issue first:" + echo "gh issue create" + exit 1 +fi +echo "Issue #${issue_number} confirmed" ``` -If user selects "Other", accept free text input. +**2.3 Generate Branch Name** -**2.5 Check for Duplicates** +Branch name is always: `issue-${issue_number}` + +Example: +- Issue #42 → Branch: `issue-42` +- Issue #123 → Branch: `issue-123` ```bash -git branch --list "{branch_name}" +branch_name="issue-${issue_number}" +echo "Branch name will be: ${branch_name}" ``` -If exists, exit with error: -``` -Error: Branch "{branch_name}" already exists. +**2.4 Check for Duplicates** -Use a different name or delete the existing branch: -git branch -d {branch_name} +```bash +if git branch --list "${branch_name}" | grep -q .; then + echo "Error: Branch '${branch_name}' already exists." + echo "" + echo "To work on existing branch:" + echo "git checkout ${branch_name}" + echo "" + echo "To delete and recreate:" + echo "git branch -D ${branch_name}" + exit 1 +fi +echo "Branch name is available" ``` ### 3. Create Branch -Create branch with selected name: +Create branch with issue-based name: ```bash -git checkout -b {branch_name} +echo "Creating branch ${branch_name} from ${base_branch}..." +git checkout -b "${branch_name}" +echo "Branch created successfully" ``` ### 4. Display Result @@ -150,10 +177,11 @@ git checkout -b {branch_name} ``` ## Branch Creation Complete -**Branch Name**: {branch_name} -**Base Branch**: main +**Branch Name**: ${branch_name} +**Issue**: #${issue_number} +**Base Branch**: ${base_branch} -You can now start working. +You can now start working on this issue. Use `/git commit` to commit changes. ``` @@ -161,13 +189,19 @@ Use `/git commit` to commit changes. | Error | Response | |-------|----------| -| Not on main branch | Guide to switch to main | +| Not on develop branch | Guide to switch to develop | | Uncommitted changes | Guide to commit or stash | -| Failed to update main | Guide to resolve conflicts | -| Branch name exists | Guide to use different name or delete existing | +| Failed to update develop | Guide to resolve conflicts | +| Branch name exists | Guide to use existing or delete | +| Issue not found | Guide to create issue first | +| Invalid issue number | Reject non-numeric input | ## Important Notes 1. **No emojis**: Never use emojis unless explicitly requested by user -2. **Branch name quality**: Generate appropriate names from user input -3. **Safety**: Protect main branch, check duplicates, verify clean working tree +2. **Issue-driven development**: All branches must be linked to a GitHub issue +3. **Branch naming**: Always use `issue-` format for consistency +4. **Safety**: Protect main/develop branches, check duplicates, verify clean working tree +5. **Issue validation**: Always verify issue exists before creating branch +6. **Branch strategy**: Branches are created from `develop`, not `main` +7. **Variable syntax**: Always use `${variable}` or `"$variable"` in bash commands for safety diff --git a/.claude/skills/git/workflows/worktree-create.md b/.claude/skills/git/workflows/worktree-create.md index cceba5d7..946c5dbc 100644 --- a/.claude/skills/git/workflows/worktree-create.md +++ b/.claude/skills/git/workflows/worktree-create.md @@ -1,6 +1,6 @@ # Worktree Creation Workflow -This workflow creates a new worktree for parallel work. +This workflow creates a new worktree for parallel work from the development branch (typically `develop`). ## Required Tools @@ -14,190 +14,278 @@ This workflow creates a new worktree for parallel work. **1.1 Get Current Directory and Repository Name** ```bash -pwd -basename $(pwd) -``` +current_dir=$(pwd) +repo_name=$(basename "$current_dir") +parent_dir=$(dirname "$current_dir") -- Current directory: `/nab-agents` -- Repository name: `nab-agents` +echo "Current directory: ${current_dir}" +echo "Repository name: ${repo_name}" +echo "Parent directory: ${parent_dir}" +``` -**1.2 Get Parent Directory** +**1.2 Get Development Branch** ```bash -dirname $(pwd) +# Get repository default branch (should be develop per branch strategy) +default_branch=$(gh repo view --json defaultBranchRef -q .defaultBranchRef.name) +echo "Repository default branch: ${default_branch}" + +# Verify develop branch exists +if ! git rev-parse --verify develop &>/dev/null; then + echo "Error: Branch 'develop' does not exist in this repository." + echo "" + echo "Please create 'develop' branch first:" + echo " git checkout -b develop main" + echo " git push -u origin develop" + echo "" + echo "Or update the workflow if using different branch names." + exit 1 +fi + +# For worktree creation, always use develop as base +if [[ "$default_branch" == "develop" ]]; then + base_branch="develop" +else + echo "WARNING: Repository default is ${default_branch}, but using 'develop' per branch strategy" + base_branch="develop" +fi + +echo "Worktree will be created from: ${base_branch}" ``` -- Parent directory: `` +### 2. Get Issue Number and Create Branch Name -### 2. Propose Branch Names +**2.1 Ask for Issue Number** -**2.1 Ask Work Purpose** +Use the AskUserQuestion tool to prompt the user: +- Question: "What is the issue number for this work?" +- Provide two options: "I have an issue number" and "No issue yet" +- If user selects "I have an issue number", they will provide the number via text input +- If user selects "No issue yet", exit with guidance -Use AskUserQuestion to understand work purpose: - -``` -Question: What will you implement or fix in this worktree? -Header: "Work Type" -Options: - - Label: "New Feature" - Description: "Implement a new feature" - - Label: "Bug Fix" - Description: "Fix an existing bug" - - Label: "Refactoring" - Description: "Improve code structure" - - Label: "Documentation" - Description: "Update documentation" -``` +If user selects "No issue yet", exit with guidance: -**2.2 Ask for Details** +Please create an issue first using GitHub issues. +This ensures work is tracked and follows issue-driven development. -Based on selected work type, ask for details (free text): -``` -Please provide details about "{work_type}". -Examples: user authentication, login page bug, API layer refactoring, etc. -``` +I can help create the issue. Please provide: +- Role: Who is affected? +- Goal: What do you want? +- Benefit: Why is this important? -**2.3 Generate Branch Names** +Or you can create it manually on GitHub following .claude/rules/issues.md format. +Once created, return here with the issue number. -Generate 3 branch name candidates from the details: +If user provides an issue number, validate it is numeric: -**Generation Rules**: -- Prefix: `add-` (feature), `fix-` (bug), `refactor-` (refactor), `docs-` (docs) -- Body: Keywords from details joined with `-` -- All lowercase, alphanumeric and hyphens only +```bash +if ! [[ "$issue_number" =~ ^[0-9]+$ ]]; then + echo "Error: Issue number must be a positive integer" + exit 1 +fi +echo "Issue number validated: ${issue_number}" +``` -**2.4 Select Branch Name** +**2.2 Validate Issue Exists** -Use AskUserQuestion to select from candidates: +Verify the issue exists using gh CLI: +```bash +echo "Validating issue #${issue_number}..." +if ! gh issue view "$issue_number" &>/dev/null; then + echo "Error: Issue #${issue_number} not found." + echo "" + echo "Please verify the issue number or create the issue first:" + echo "gh issue create" + exit 1 +fi +echo "Issue #${issue_number} confirmed" ``` -Question: Select branch name. -Header: "Branch Name" -Options: - - Label: "{candidate1}" - Description: "Recommended" - - Label: "{candidate2}" - Description: "" - - Label: "{candidate3}" - Description: "" -``` -If user selects "Other", accept free text input. +**2.3 Generate Branch Name** + +Branch name is always: `issue-${issue_number}` -**2.5 Check for Duplicates** +Example: +- Issue #42 → Branch: `issue-42` +- Issue #123 → Branch: `issue-123` ```bash -git branch --list "{branch_name}" +branch_name="issue-${issue_number}" +echo "Branch name will be: ${branch_name}" ``` -If exists, exit with error: -``` -Error: Branch "{branch_name}" already exists. +**2.4 Check for Branch Duplicates** -Use a different name or delete the existing branch: -git branch -d {branch_name} +```bash +if git branch --list "${branch_name}" | grep -q .; then + echo "Error: Branch '${branch_name}' already exists." + echo "" + echo "To work on existing branch in a new worktree:" + echo "git worktree add ${branch_name}" + echo "" + echo "To delete and recreate:" + echo "git branch -D ${branch_name}" + exit 1 +fi +echo "Branch name is available" ``` ### 3. Determine Worktree Path -**3.1 Generate Path** +**3.1 Generate and Validate Worktree Path** + +Generate path using consistent naming: ```bash -parent_dir=$(dirname $(pwd)) -repo_name=$(basename $(pwd)) -worktree_path="${parent_dir}/${repo_name}-${branch_name}" +worktree_path="${parent_dir}/issue-${issue_number}" +echo "Generated worktree path: ${worktree_path}" ``` Example: -- Current: `/nab-agents` -- Worktree: `/nab-agents-` +- Current: `/home/user/work/nabledge-dev` +- Issue #42 → Worktree: `/home/user/work/issue-42` +- Issue #123 → Worktree: `/home/user/work/issue-123` -**3.2 Check Path Existence** +Validate parent directory is writable: ```bash -test -e {worktree_path} +if [[ ! -w "$parent_dir" ]]; then + echo "Error: Cannot write to parent directory: ${parent_dir}" + echo "Check permissions or choose different location" + exit 1 +fi +echo "Parent directory is writable" ``` -If exists, exit with error: +Check if path contains special characters: + +```bash +if [[ "$worktree_path" =~ [^a-zA-Z0-9/_-] ]]; then + echo "WARNING: Path contains special characters: ${worktree_path}" + echo "This may cause issues on some systems" +fi ``` -Error: Path "{worktree_path}" already exists. -Use a different branch name or delete the existing directory. +**3.2 Check Path Existence** + +```bash +if [[ -e "$worktree_path" ]]; then + echo "Error: Path already exists: ${worktree_path}" + echo "" + echo "Options:" + echo "1. Remove existing: rm -rf '${worktree_path}'" + echo "2. Use different issue number" + echo "3. Cancel operation" + exit 1 +fi +echo "Path is available" ``` -**3.3 Confirm Path** +**3.3 Check for Existing Worktree** -Use AskUserQuestion to confirm path: +Check if a worktree already exists for this branch: +```bash +existing_worktree=$(git worktree list --porcelain | grep -A 2 "branch refs/heads/${branch_name}" | grep "worktree" | awk '{print $2}') +if [[ -n "$existing_worktree" ]]; then + echo "Error: Worktree already exists for ${branch_name} at: ${existing_worktree}" + echo "" + echo "Options:" + echo "1. Use existing worktree: cd '${existing_worktree}'" + echo "2. Remove existing: git worktree remove '${existing_worktree}'" + echo "3. Cancel operation" + exit 1 +fi +echo "No existing worktree for this branch" ``` -Question: Create worktree at the following path. OK? -Header: "Confirm Path" -Options: - - Label: "Yes, create it" - Description: "{worktree_path}" - - Label: "No, cancel" - Description: "" -Display info: -Path: {worktree_path} -Branch: {branch_name} -Base: main +**3.4 Confirm Path** + +Use the AskUserQuestion tool to confirm: +- Question: "Create worktree at the following path. OK?" +- Display the full path in the question +- Provide options: "Yes, create it" and "No, cancel" + +Display information: +``` +Path: ${worktree_path} +Branch: ${branch_name} +Issue: #${issue_number} +Base: ${base_branch} ``` +If user selects "No, cancel", exit gracefully. + ### 4. Create Worktree -**4.1 Update Main Branch** +**4.1 Update Development Branch** ```bash -git fetch origin main -git pull origin main +echo "Updating ${base_branch} from remote..." +git fetch origin "${base_branch}" +git pull origin "${base_branch}" +echo "Base branch updated successfully" ``` **4.2 Create Worktree** ```bash -git worktree add -b {branch_name} {worktree_path} main +echo "Creating worktree at ${worktree_path}..." +git worktree add -b "${branch_name}" "${worktree_path}" "${base_branch}" +echo "Worktree created successfully" ``` If creation fails: -``` + Error: Failed to create worktree. Please verify: - Sufficient disk space - Write permissions to the path - Valid branch name -``` ### 5. Display Result ``` ## Worktree Creation Complete -**Path**: {worktree_path} -**Branch**: {branch_name} -**Base Branch**: main +**Path**: ${worktree_path} +**Branch**: ${branch_name} +**Issue**: #${issue_number} +**Base Branch**: ${base_branch} ### Move to Worktree -cd {worktree_path} +cd ${worktree_path} -You can now start working. +You can now start working on this issue. Use `/git commit` to commit changes. + +### Open in Editor (optional) +code ${worktree_path} ``` ## Error Handling | Error | Response | |-------|----------| -| Branch name exists | Guide to use different name or delete existing | -| Path exists | Guide to use different name or delete existing directory | -| Failed to update main | Guide to resolve conflicts | +| Branch name exists | Guide to use different issue or delete existing | +| Path exists | Guide to remove existing or use different issue | +| Failed to update develop | Guide to resolve conflicts | | Insufficient permissions | Guide to check write permissions | | Insufficient disk space | Guide to check disk space | +| Issue not found | Guide to create issue first | +| Invalid issue number | Reject non-numeric input | +| Existing worktree | Guide to use existing or remove | ## Important Notes 1. **No emojis**: Never use emojis unless explicitly requested by user -2. **Path naming convention**: `{parent_dir}/{repo_name}-{branch_name}` -3. **Branch name quality**: Generate appropriate names from user input -4. **Base branch**: Always branch from main +2. **Path naming convention**: `${parent_dir}/issue-${issue_number}` +3. **Branch naming convention**: `issue-${issue_number}` +4. **Issue-driven development**: All worktrees must be linked to a GitHub issue +5. **Issue validation**: Always verify issue exists before creating worktree +6. **Base branch**: Always branch from `develop`, not `main` +7. **Variable syntax**: Always use `${variable}` or `"$variable"` in bash commands for safety +8. **Path safety**: Validate parent directory permissions and path availability +9. **Worktree cleanup**: Use `git worktree remove` instead of `rm -rf` for proper cleanup diff --git a/.claude/skills/pr/templates/pr-template.md b/.claude/skills/pr/templates/pr-template.md new file mode 100644 index 00000000..1163bbd8 --- /dev/null +++ b/.claude/skills/pr/templates/pr-template.md @@ -0,0 +1,92 @@ +# PR Template + +This is the standard template for all pull requests. All PRs must reference a GitHub issue following issue-driven development. + +## Template Structure + +```markdown +Closes #[ISSUE_NUMBER] + +## Approach +[Describe the solution strategy and key design decisions. Explain WHY this approach was chosen, any alternatives considered, and trade-offs made.] + +## Tasks +[List implementation tasks completed as checkboxes] +- [x] Task 1 +- [x] Task 2 +- [x] Task 3 + +## Expert Review + +> **Instructions for Expert**: Please review the approach and implementation, then fill in this table with your feedback. + +| Aspect | Status | Comments | +|--------|--------|----------| +| Architecture | ⚪ Not Reviewed / ✅ Approved / ⚠️ Needs Changes | | +| Code Quality | ⚪ Not Reviewed / ✅ Approved / ⚠️ Needs Changes | | +| Testing | ⚪ Not Reviewed / ✅ Approved / ⚠️ Needs Changes | | +| Documentation | ⚪ Not Reviewed / ✅ Approved / ⚠️ Needs Changes | | + +## Success Criteria Check + +[Read the issue body and extract success criteria section, then create verification table] + +| Criterion | Status | Evidence | +|-----------|--------|----------| +| [Criterion 1 from issue] | ✅ Met / ❌ Not Met | [How this was verified] | +| [Criterion 2 from issue] | ✅ Met / ❌ Not Met | [How this was verified] | + +🤖 Generated with [Claude Code](https://claude.com/claude-code) +``` + +## Usage in Workflows + +This template is used for all PRs following issue-driven development: +- All PRs must close a GitHub issue +- Branch name follows `issue-` convention +- Success criteria are verified against the issue + +## Placeholder Replacement + +When generating PR body from this template: +- `[ISSUE_NUMBER]` → Actual issue number +- `[Describe the solution...]` → Generated approach description +- `[List implementation...]` → Generated task list +- `[Criterion X from issue]` → Extracted from issue body +- `[How this was verified]` → Evidence from implementation + +## Example + +```markdown +Closes #42 + +## Approach +Implemented session-based authentication using JWT tokens. Chose this approach for stateless authentication and better scalability compared to server-side sessions. + +## Tasks +- [x] Create login form component +- [x] Implement JWT token generation +- [x] Add authentication middleware +- [x] Write integration tests + +## Expert Review + +> **Instructions for Expert**: Please review the approach and implementation, then fill in this table with your feedback. + +| Aspect | Status | Comments | +|--------|--------|----------| +| Architecture | ⚪ Not Reviewed / ✅ Approved / ⚠️ Needs Changes | | +| Code Quality | ⚪ Not Reviewed / ✅ Approved / ⚠️ Needs Changes | | +| Testing | ⚪ Not Reviewed / ✅ Approved / ⚠️ Needs Changes | | +| Documentation | ⚪ Not Reviewed / ✅ Approved / ⚠️ Needs Changes | | + +## Success Criteria Check + +| Criterion | Status | Evidence | +|-----------|--------|----------| +| Users can log in with username and password | ✅ Met | Login form implemented and tested in auth.test.js:45 | +| Session persists across page reloads | ✅ Met | JWT stored in localStorage, verified in session.test.js:78 | +| Invalid credentials show error message | ✅ Met | Error handling tested in auth.test.js:92 | + +🤖 Generated with [Claude Code](https://claude.com/claude-code) +``` diff --git a/.claude/skills/pr/workflows/create.md b/.claude/skills/pr/workflows/create.md index 1effdaa3..81b5e402 100644 --- a/.claude/skills/pr/workflows/create.md +++ b/.claude/skills/pr/workflows/create.md @@ -1,11 +1,12 @@ # PR Creation Workflow -This workflow creates a PR from the current branch to main. +This workflow creates a PR from the current branch to the development branch (typically `develop`). ## Required Tools - Bash - Read +- AskUserQuestion ## Execution Steps @@ -14,32 +15,55 @@ This workflow creates a PR from the current branch to main. **1.1 Verify Current Branch** ```bash -git branch --show-current +current_branch=$(git branch --show-current) +echo "Current branch: ${current_branch}" ``` -If current branch is `main` or `master`, exit with error: -``` -Error: Cannot create PR from main branch. +If current branch is `main`, `master`, or `develop`, exit with error: + +Error: Cannot create PR from the main/develop branch. Please create a feature/issue branch first. -``` -**1.2 Get Default Branch** +**1.2 Get Development Branch** ```bash +# Get repository default branch (should be develop) default_branch=$(gh repo view --json defaultBranchRef -q .defaultBranchRef.name) +echo "Repository default branch: ${default_branch}" + +# Verify develop branch exists +if ! git rev-parse --verify develop &>/dev/null; then + echo "Error: Branch 'develop' does not exist in this repository." + echo "" + echo "Please create 'develop' branch first:" + echo " git checkout -b develop main" + echo " git push -u origin develop" + echo "" + echo "Or update the workflow if using different branch names." + exit 1 +fi + +# For PR creation, always target develop +if [[ "$default_branch" == "develop" ]]; then + target_branch="develop" +else + echo "WARNING: Repository default is ${default_branch}, but using 'develop' per branch strategy" + target_branch="develop" +fi + +echo "PR will target: ${target_branch}" ``` **1.3 Check Commit History** ```bash -git log "$default_branch"..HEAD --oneline +git log "${target_branch}"..HEAD --oneline ``` If no commits exist, exit with error: -``` -Error: No new commits from {default_branch}. + +Error: No new commits from ${target_branch}. Please commit your changes first. -``` **1.4 Verify Remote Push** @@ -48,104 +72,308 @@ git status ``` If "Your branch is ahead of" or "have diverged" appears, push is needed: + ```bash -git push -u origin "$(git branch --show-current)" +git push -u origin "${current_branch}" ``` If push fails (rejected): + ```bash -git pull --rebase origin "$(git branch --show-current)" +git pull --rebase origin "${current_branch}" git push ``` ### 2. Generate PR Title and Description -**2.1 Get Commit History and Diff** +**2.1 Get Issue Number** + +Check if branch follows `issue-` naming convention: ```bash -git log "$default_branch"..HEAD --format="%s" -git diff "$default_branch"...HEAD --stat +if [[ "$current_branch" =~ ^issue-([0-9]+)$ ]]; then + issue_number="${BASH_REMATCH[1]}" + echo "Detected issue number from branch: #${issue_number}" +else + issue_number="" +fi ``` -**2.2 Generate Title and Description** +If no issue number detected from branch name, use the AskUserQuestion tool to prompt the user: +- Question: "What is the issue number this PR addresses?" +- User must provide the issue number via text input +- Issue number is required (issue-driven development standard) + +If user provides an issue number, validate it is numeric: + +```bash +if ! [[ "$issue_number" =~ ^[0-9]+$ ]]; then + echo "Error: Issue number must be a positive integer" + exit 1 +fi +``` + +Then validate the issue exists: + +```bash +if ! gh issue view "$issue_number" &>/dev/null; then + echo "Error: Issue #${issue_number} not found." + echo "Please create an issue first or verify the issue number." + exit 1 +fi +echo "Validated issue #${issue_number} exists" +``` + +**2.2 Gather Information** + +Collect all necessary information for PR generation: + +```bash +# Get commit history +echo "Analyzing commits..." +commits=$(git log "${target_branch}"..HEAD --format="%s%n%b") + +# Get diff statistics +echo "Analyzing changes..." +diff_stat=$(git diff "${target_branch}"...HEAD --stat) + +# Get issue body +echo "Fetching issue details..." +issue_body=$(gh issue view "$issue_number" --json body -q .body) +``` -Analyze commit history and diff, generate in the following format: +**2.3 Load PR Template** -**Title**: Summarize main changes (within 70 characters) -- Example: "feat: Add user authentication feature" -- Example: "fix: Fix session timeout on login" +Use the Read tool to load `.claude/skills/pr/templates/pr-template.md`. -**Description**: +The template contains the following structure with placeholders: ```markdown -## Summary -{Describe purpose and content of changes in 1-3 sentences} +Closes #[ISSUE_NUMBER] -## Changes -{List main changes as bullet points} +## Approach +[Describe the solution...] -## Testing -- [ ] Manual testing completed -- [ ] Tests added/updated (if needed) +## Tasks +[List implementation...] + +## Expert Review +[Review table] + +## Success Criteria Check +[Criterion X from issue] | Status | Evidence + +🤖 Generated with [Claude Code](https://claude.com/claude-code) +``` + +**2.4 Generate Title** + +Analyze commits to generate appropriate PR title: + +**Title Generation Rules**: +1. If only 1 commit: Use the commit message subject line +2. If multiple commits: Identify common theme across commit messages +3. If commit messages unclear (e.g., "fix", "update"): Analyze diff to determine primary change type +4. Format: `: ` where type is one of: feat, fix, refactor, docs, test, chore +5. MUST be under 70 characters + +**Examples**: +- "feat: Add JWT authentication middleware" +- "fix: Resolve session timeout on login" +- "refactor: Extract validation logic to separate module" + +**2.5 Generate Description with Placeholder Replacement** + +Replace each placeholder in the loaded template: + +**Step 1: Replace [ISSUE_NUMBER]** +``` +Closes #[ISSUE_NUMBER] +↓ +Closes #42 +``` + +**Step 2: Replace [Describe the solution...]** +- Summarize the approach from commit message bodies +- Identify key design decisions from changed files (using diff_stat) +- Explain WHY this approach was chosen +- Example output: + ``` + Implemented session-based authentication using JWT tokens. Chose this + approach for stateless authentication and better scalability compared + to server-side sessions. + ``` + +**Step 3: Replace [List implementation...]** +- Extract task list from commit messages (subjects) +- Format as checkbox list with all items checked +- Example output: + ``` + - [x] Create login form component + - [x] Implement JWT token generation + - [x] Add authentication middleware + - [x] Write integration tests + ``` + +**Step 4: Keep Expert Review Table as-is** +- Do not modify the Expert Review table +- Leave all status fields as "⚪ Not Reviewed" + +**Step 5: Replace Success Criteria Section** +- Parse issue_body to extract success criteria +- Look for lines starting with `- [ ]` or `- [x]` under "Success Criteria" heading +- For each criterion, create a table row: + - Criterion: The criterion text + - Status: "✅ Met" (if implemented) or "❌ Not Met" + - Evidence: Specific file paths, line numbers, or test names +- Example output: + ``` + | Criterion | Status | Evidence | + |-----------|--------|----------| + | Users can log in with username and password | ✅ Met | Login form implemented in auth.component.tsx:45 | + | Session persists across page reloads | ✅ Met | JWT stored in localStorage, verified in session.test.js:78 | + ``` + +**Step 6: Add Attribution** +- Keep the attribution line at the end: + ``` + 🤖 Generated with [Claude Code](https://claude.com/claude-code) + ``` + +**Example Complete Output**: +```markdown +Closes #42 + +## Approach +Implemented session-based authentication using JWT tokens. Chose this approach +for stateless authentication and better scalability compared to server-side sessions. + +## Tasks +- [x] Create login form component +- [x] Implement JWT token generation +- [x] Add authentication middleware +- [x] Write integration tests + +## Expert Review + +> **Instructions for Expert**: Please review the approach and implementation, then fill in this table with your feedback. + +| Aspect | Status | Comments | +|--------|--------|----------| +| Architecture | ⚪ Not Reviewed / ✅ Approved / ⚠️ Needs Changes | | +| Code Quality | ⚪ Not Reviewed / ✅ Approved / ⚠️ Needs Changes | | +| Testing | ⚪ Not Reviewed / ✅ Approved / ⚠️ Needs Changes | | +| Documentation | ⚪ Not Reviewed / ✅ Approved / ⚠️ Needs Changes | | + +## Success Criteria Check + +| Criterion | Status | Evidence | +|-----------|--------|----------| +| Users can log in with username and password | ✅ Met | Login form implemented in auth.component.tsx:45 | +| Session persists across page reloads | ✅ Met | JWT stored in localStorage, verified in session.test.js:78 | +| Invalid credentials show error message | ✅ Met | Error handling tested in auth.test.js:92 | 🤖 Generated with [Claude Code](https://claude.com/claude-code) ``` ### 3. Create PR +**IMPORTANT**: Use HEREDOC syntax for multi-line PR body to ensure correct formatting. + +**HEREDOC Syntax Example**: + +```bash +gh pr create \ + --title "feat: Add user authentication" \ + --body "$(cat <<'EOF' +Closes #42 + +## Approach +Implemented session-based authentication using JWT tokens. Chose this approach for stateless authentication and better scalability compared to server-side sessions. + +## Tasks +- [x] Create login form component +- [x] Implement JWT token generation +- [x] Add authentication middleware +- [x] Write integration tests + +## Expert Review + +> **Instructions for Expert**: Please review the approach and implementation, then fill in this table with your feedback. + +| Aspect | Status | Comments | +|--------|--------|----------| +| Architecture | ⚪ Not Reviewed / ✅ Approved / ⚠️ Needs Changes | | +| Code Quality | ⚪ Not Reviewed / ✅ Approved / ⚠️ Needs Changes | | +| Testing | ⚪ Not Reviewed / ✅ Approved / ⚠️ Needs Changes | | +| Documentation | ⚪ Not Reviewed / ✅ Approved / ⚠️ Needs Changes | | + +## Success Criteria Check + +| Criterion | Status | Evidence | +|-----------|--------|----------| +| Users can log in with username and password | ✅ Met | Login form implemented and tested in auth.test.js:45 | +| Session persists across page reloads | ✅ Met | JWT stored in localStorage, verified in session.test.js:78 | +| Invalid credentials show error message | ✅ Met | Error handling tested in auth.test.js:92 | + +🤖 Generated with [Claude Code](https://claude.com/claude-code) +EOF +)" \ + --base develop \ + --head issue-42 +``` + +**Execute PR Creation**: + Create PR with generated title and description: ```bash gh pr create \ - --title "{generated_title}" \ - --body "{generated_description}" \ - --base "$default_branch" \ - --head "$current_branch" + --title "${generated_title}" \ + --body "${generated_description}" \ + --base "${target_branch}" \ + --head "${current_branch}" +``` + +Capture the PR URL: +```bash +pr_url=$(gh pr view --json url -q .url) +echo "PR created: ${pr_url}" ``` ### 4. Display Result +Display the PR URL and guide user to review on GitHub: + ``` ## PR Creation Complete -**PR**: {pr_url} -**Branch**: {source_branch} → {target_branch} -**Title**: {title} +**PR**: ${pr_url} +**Branch**: ${current_branch} → ${target_branch} +**Title**: ${generated_title} -Please request review from reviewers. +📝 Please review the PR description on GitHub. + If any changes are needed, let me know and I will update it. ``` ## Error Handling | Error | Response | |-------|----------| -| Execute from main branch | Guide to execute from feature/issue branch | +| Execute from main/develop branch | Guide to execute from feature/issue branch | | No commits | Guide to commit changes first | | Push failure | `git pull --rebase` and retry push | | Authentication error | Authenticate with `gh auth login` | +| Issue not found | Create issue first (required for issue-driven development) | +| No issue number provided | Prompt user for issue number (required) | ## Notes 1. **Emoji Usage**: Do not use emojis unless user explicitly requests them 2. **GitHub Permissions**: Requires Write or higher permissions 3. **Title Quality**: Generate appropriate title if commit messages are inadequate -4. **HEREDOC Usage**: Use HEREDOC for multi-line PR body to ensure correct formatting - -### HEREDOC Usage Example - -```bash -gh pr create \ - --title "feat: Add user authentication" \ - --body "$(cat <<'EOF' -## Summary -Added user authentication feature. - -## Changes -- Implemented login form -- Added session management - -🤖 Generated with [Claude Code](https://claude.com/claude-code) -EOF -)" \ - --base main \ - --head feature/auth -``` +4. **HEREDOC Usage**: ALWAYS use HEREDOC for multi-line PR body to ensure correct formatting +5. **Branch Strategy**: PRs should target `develop` by default +6. **Variable Syntax**: Always use `${variable}` or `"$variable"` in bash commands for safety +7. **PR Template**: Use `.claude/skills/pr/templates/pr-template.md` for consistent formatting +8. **Review Flow**: After PR creation, user reviews on GitHub and can request changes from the AI agent +9. **Issue Required**: All PRs must reference a GitHub issue (issue-driven development standard) From 34b66c1b5664fc3bbcd9815fd99c5bf57adfc3b2 Mon Sep 17 00:00:00 2001 From: kiyotis Date: Mon, 16 Feb 2026 10:25:16 +0900 Subject: [PATCH 02/27] Refactor: Extract inline scripts from GitHub Actions workflow 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 --- .github/scripts/clean-repository.sh | 31 +++++ .github/scripts/commit-and-push.sh | 47 +++++++ .github/scripts/create-version-tag.sh | 34 +++++ .github/scripts/update-changelog.sh | 56 ++++++++ .github/scripts/validate-marketplace.sh | 65 +++++++++ .github/scripts/validate-version-updates.sh | 37 ++++++ .github/workflows/sync-to-nabledge.yml | 140 +++----------------- 7 files changed, 285 insertions(+), 125 deletions(-) create mode 100755 .github/scripts/clean-repository.sh create mode 100755 .github/scripts/commit-and-push.sh create mode 100755 .github/scripts/create-version-tag.sh create mode 100755 .github/scripts/update-changelog.sh create mode 100755 .github/scripts/validate-marketplace.sh create mode 100755 .github/scripts/validate-version-updates.sh diff --git a/.github/scripts/clean-repository.sh b/.github/scripts/clean-repository.sh new file mode 100755 index 00000000..e43ed2fc --- /dev/null +++ b/.github/scripts/clean-repository.sh @@ -0,0 +1,31 @@ +#!/bin/bash +set -e +set -u +set -o pipefail + +# Remove all files except .git/ from target repository +# Usage: ./clean-repository.sh + +# Validate required parameters +TARGET_DIR="${1:-}" +if [ -z "$TARGET_DIR" ]; then + echo "Error: Target directory required" + echo "Usage: $0 " + exit 1 +fi + +# Validate target directory exists +if [ ! -d "$TARGET_DIR" ]; then + echo "Error: Target directory does not exist: $TARGET_DIR" + exit 1 +fi + +echo "Cleaning repository: $TARGET_DIR" + +# Change to target directory +cd "$TARGET_DIR" + +# Remove all files except .git/ +find . -mindepth 1 -maxdepth 1 ! -name '.git' -exec rm -rf {} + + +echo "Repository cleaned successfully" diff --git a/.github/scripts/commit-and-push.sh b/.github/scripts/commit-and-push.sh new file mode 100755 index 00000000..0059d35a --- /dev/null +++ b/.github/scripts/commit-and-push.sh @@ -0,0 +1,47 @@ +#!/bin/bash +set -e +set -u +set -o pipefail + +# Commit and push changes to repository +# Usage: ./commit-and-push.sh [commit-body] [branch] +# Environment: Working directory should be the target repository + +# Validate required parameters +COMMIT_MESSAGE="${1:-}" +COMMIT_BODY="${2:-}" +BRANCH="${3:-main}" + +if [ -z "$COMMIT_MESSAGE" ]; then + echo "Error: Commit message required" + echo "Usage: $0 [commit-body] [branch]" + exit 1 +fi + +echo "Preparing to commit changes..." + +# Configure git user +git config user.name "github-actions[bot]" +git config user.email "github-actions[bot]@users.noreply.github.com" + +# Stage all changes +git add . + +# Check if there are changes to commit +if git diff --staged --quiet; then + echo "No changes to commit" + exit 0 +fi + +# Create commit with message and optional body +if [ -n "$COMMIT_BODY" ]; then + git commit -m "$COMMIT_MESSAGE" -m "$COMMIT_BODY" +else + git commit -m "$COMMIT_MESSAGE" +fi + +# Push to origin +echo "Pushing to origin ${BRANCH}..." +git push origin "${BRANCH}" + +echo "Changes committed and pushed successfully to ${BRANCH}" diff --git a/.github/scripts/create-version-tag.sh b/.github/scripts/create-version-tag.sh new file mode 100755 index 00000000..57e4fdd9 --- /dev/null +++ b/.github/scripts/create-version-tag.sh @@ -0,0 +1,34 @@ +#!/bin/bash +set -e +set -u +set -o pipefail + +# Create and push version tag if it doesn't exist +# Usage: ./create-version-tag.sh +# Environment: Working directory should be the target repository + +# Validate required parameters +VERSION="${1:-}" + +if [ -z "$VERSION" ]; then + echo "Error: Version required" + echo "Usage: $0 " + exit 1 +fi + +TAG_NAME="${VERSION}" + +echo "Processing version tag: ${TAG_NAME}" + +# Check if tag already exists on remote +if git ls-remote --tags origin | grep -q "refs/tags/${TAG_NAME}"; then + echo "Tag ${TAG_NAME} already exists on remote, skipping tag creation" + exit 0 +fi + +# Create and push tag +echo "Creating tag: ${TAG_NAME}" +git tag -a "${TAG_NAME}" -m "Release version ${VERSION}" +git push origin "${TAG_NAME}" + +echo "Successfully created and pushed tag: ${TAG_NAME}" diff --git a/.github/scripts/update-changelog.sh b/.github/scripts/update-changelog.sh new file mode 100755 index 00000000..1ce3a20b --- /dev/null +++ b/.github/scripts/update-changelog.sh @@ -0,0 +1,56 @@ +#!/bin/bash +set -e +set -u +set -o pipefail + +# Append sync entry to CHANGELOG.md with date and commit reference +# Usage: ./update-changelog.sh + +# Validate required parameters +CHANGELOG_FILE="${1:-}" +COMMIT_SHA="${2:-}" +REPO_FULL_NAME="${3:-}" + +if [ -z "$CHANGELOG_FILE" ]; then + echo "Error: Changelog file path required" + echo "Usage: $0 " + exit 1 +fi + +if [ -z "$COMMIT_SHA" ]; then + echo "Error: Commit SHA required" + echo "Usage: $0 " + exit 1 +fi + +if [ -z "$REPO_FULL_NAME" ]; then + echo "Error: Repository full name required" + echo "Usage: $0 " + exit 1 +fi + +# Validate changelog file exists +if [ ! -f "$CHANGELOG_FILE" ]; then + echo "Error: Changelog file does not exist: $CHANGELOG_FILE" + exit 1 +fi + +echo "Updating CHANGELOG: $CHANGELOG_FILE" + +COMMIT_URL="https://github.com/${REPO_FULL_NAME}/commit/${COMMIT_SHA}" +DATE=$(date +%Y-%m-%d) +TEMP_FILE=$(mktemp) + +# Read first line (# Changelog) +head -n 1 "$CHANGELOG_FILE" > "$TEMP_FILE" + +# Add new unreleased section using printf +printf "\n## [Unreleased] - %s\n\n### Changed\n- Synced from: %s\n\n" "$DATE" "$COMMIT_URL" >> "$TEMP_FILE" + +# Append rest of original file +tail -n +2 "$CHANGELOG_FILE" >> "$TEMP_FILE" + +# Replace original file +mv "$TEMP_FILE" "$CHANGELOG_FILE" + +echo "CHANGELOG updated successfully" diff --git a/.github/scripts/validate-marketplace.sh b/.github/scripts/validate-marketplace.sh new file mode 100755 index 00000000..d5b5dd35 --- /dev/null +++ b/.github/scripts/validate-marketplace.sh @@ -0,0 +1,65 @@ +#!/bin/bash +set -e +set -u +set -o pipefail + +# Validate marketplace directory structure and JSON formats +# Usage: ./validate-marketplace.sh + +# Validate required parameters +MARKETPLACE_ROOT="${1:-}" +if [ -z "$MARKETPLACE_ROOT" ]; then + echo "Error: Marketplace root directory required" + echo "Usage: $0 " + exit 1 +fi + +# Validate directory exists +if [ ! -d "$MARKETPLACE_ROOT" ]; then + echo "Error: Marketplace root directory does not exist: $MARKETPLACE_ROOT" + exit 1 +fi + +echo "Validating marketplace structure in: $MARKETPLACE_ROOT" + +# Check marketplace files exist +echo "Checking marketplace files..." +test -f "$MARKETPLACE_ROOT/.claude-plugin/marketplace.json" || { echo "Error: marketplace.json not found"; exit 1; } +test -f "$MARKETPLACE_ROOT/README.md" || { echo "Error: Root README.md not found"; exit 1; } +test -f "$MARKETPLACE_ROOT/LICENSE" || { echo "Error: Root LICENSE not found"; exit 1; } + +# Check nabledge-6 plugin structure +echo "Checking nabledge-6 plugin structure..." +test -f "$MARKETPLACE_ROOT/plugins/nabledge-6/.claude-plugin/plugin.json" || { echo "Error: nabledge-6/plugin.json not found"; exit 1; } +test -f "$MARKETPLACE_ROOT/plugins/nabledge-6/skills/nabledge-6/SKILL.md" || { echo "Error: nabledge-6/SKILL.md not found"; exit 1; } +test -f "$MARKETPLACE_ROOT/plugins/nabledge-6/README.md" || { echo "Error: nabledge-6/README.md not found"; exit 1; } +test -f "$MARKETPLACE_ROOT/plugins/nabledge-6/CHANGELOG.md" || { echo "Error: nabledge-6/CHANGELOG.md not found"; exit 1; } + +# Check nabledge-6 supporting directories (inside skills/nabledge-6/) +echo "Checking nabledge-6 supporting directories..." +test -d "$MARKETPLACE_ROOT/plugins/nabledge-6/skills/nabledge-6/workflows" || { echo "Error: nabledge-6/skills/nabledge-6/workflows not found"; exit 1; } +test -d "$MARKETPLACE_ROOT/plugins/nabledge-6/skills/nabledge-6/assets" || { echo "Error: nabledge-6/skills/nabledge-6/assets not found"; exit 1; } +test -d "$MARKETPLACE_ROOT/plugins/nabledge-6/skills/nabledge-6/knowledge" || { echo "Error: nabledge-6/skills/nabledge-6/knowledge not found"; exit 1; } +test -d "$MARKETPLACE_ROOT/plugins/nabledge-6/skills/nabledge-6/docs" || { echo "Error: nabledge-6/skills/nabledge-6/docs not found"; exit 1; } + +# Check setup scripts exist at root +echo "Checking setup scripts..." +test -f "$MARKETPLACE_ROOT/setup-6-cc.sh" || { echo "Error: setup-6-cc.sh not found at root"; exit 1; } +test -f "$MARKETPLACE_ROOT/setup-6-ghc.sh" || { echo "Error: setup-6-ghc.sh not found at root"; exit 1; } + +# Validate JSON formats +echo "Validating JSON formats..." +jq empty "$MARKETPLACE_ROOT/.claude-plugin/marketplace.json" || { echo "Error: Invalid marketplace.json"; exit 1; } +jq empty "$MARKETPLACE_ROOT/plugins/nabledge-6/.claude-plugin/plugin.json" || { echo "Error: Invalid plugin.json"; exit 1; } + +# Validate marketplace.json structure +echo "Validating marketplace.json structure..." +jq -e '.name' "$MARKETPLACE_ROOT/.claude-plugin/marketplace.json" > /dev/null || { echo "Error: marketplace.json missing 'name' field"; exit 1; } +jq -e '.plugins' "$MARKETPLACE_ROOT/.claude-plugin/marketplace.json" > /dev/null || { echo "Error: marketplace.json missing 'plugins' array"; exit 1; } + +# Validate plugin.json structure +echo "Validating plugin.json structure..." +jq -e '.name' "$MARKETPLACE_ROOT/plugins/nabledge-6/.claude-plugin/plugin.json" > /dev/null || { echo "Error: plugin.json missing 'name' field"; exit 1; } +jq -e '.version' "$MARKETPLACE_ROOT/plugins/nabledge-6/.claude-plugin/plugin.json" > /dev/null || { echo "Error: plugin.json missing 'version' field"; exit 1; } + +echo "Marketplace structure validation passed!" diff --git a/.github/scripts/validate-version-updates.sh b/.github/scripts/validate-version-updates.sh new file mode 100755 index 00000000..5f0ac02c --- /dev/null +++ b/.github/scripts/validate-version-updates.sh @@ -0,0 +1,37 @@ +#!/bin/bash +set -e +set -u +set -o pipefail + +# Validate that version files are updated when non-infrastructure files change +# Usage: ./validate-version-updates.sh + +echo "Validating version updates..." + +# Get list of changed files +CHANGED_FILES=$(git diff HEAD~1 HEAD --name-only) + +# Check if only infrastructure files were changed +INFRA_ONLY=true +while IFS= read -r file; do + if [[ ! "$file" =~ ^\.github/ ]] && \ + [[ ! "$file" =~ ^\.claude/marketplace ]] && \ + [[ ! "$file" =~ ^\.claude/rules/ ]] && \ + [[ "$file" != *"transform-to-plugin.sh"* ]]; then + INFRA_ONLY=false + break + fi +done <<< "$CHANGED_FILES" + +# If non-infrastructure files changed, require version update +if [ "$INFRA_ONLY" = false ]; then + if ! echo "$CHANGED_FILES" | grep -q "plugin/plugin.json\|plugin/CHANGELOG.md\|marketplace/.claude-plugin/marketplace.json"; then + echo "Error: plugin.json, CHANGELOG.md, or marketplace.json must be updated before sync" + exit 1 + fi + echo "Version files updated - validation passed" +else + echo "Infrastructure-only changes detected, skipping version validation" +fi + +echo "Version validation completed successfully" diff --git a/.github/workflows/sync-to-nabledge.yml b/.github/workflows/sync-to-nabledge.yml index bb8dd7e9..c896430c 100644 --- a/.github/workflows/sync-to-nabledge.yml +++ b/.github/workflows/sync-to-nabledge.yml @@ -3,7 +3,7 @@ name: Sync to nabledge repository on: push: branches: - - main + - refactor-extract-workflow-scripts jobs: sync: @@ -16,45 +16,18 @@ jobs: fetch-depth: 0 - name: Validate version updates - run: | - # Get list of changed files - CHANGED_FILES=$(git diff HEAD~1 HEAD --name-only) - - # Check if only infrastructure files were changed - INFRA_ONLY=true - while IFS= read -r file; do - if [[ ! "$file" =~ ^\.github/ ]] && \ - [[ ! "$file" =~ ^\.claude/marketplace ]] && \ - [[ ! "$file" =~ ^\.claude/rules/ ]] && \ - [[ "$file" != *"transform-to-plugin.sh"* ]]; then - INFRA_ONLY=false - break - fi - done <<< "$CHANGED_FILES" - - # If non-infrastructure files changed, require version update - if [ "$INFRA_ONLY" = false ]; then - if ! echo "$CHANGED_FILES" | grep -q "plugin/plugin.json\|plugin/CHANGELOG.md\|marketplace/.claude-plugin/marketplace.json"; then - echo "Error: plugin.json, CHANGELOG.md, or marketplace.json must be updated before sync" - exit 1 - fi - else - echo "Infrastructure-only changes detected, skipping version validation" - fi + run: .github/scripts/validate-version-updates.sh - name: Checkout nabledge repository uses: actions/checkout@v4 with: repository: nablarch/nabledge - ref: main + ref: test-to token: ${{ secrets.NABLEDGE_SYNC_TOKEN }} path: nabledge-repo - name: Clean nabledge repository - run: | - cd nabledge-repo - # Remove all files except .git/ - find . -mindepth 1 -maxdepth 1 ! -name '.git' -exec rm -rf {} + + run: .github/scripts/clean-repository.sh nabledge-repo - name: Transform to plugin structure run: | @@ -63,108 +36,25 @@ jobs: - name: Update CHANGELOG.md run: | - TRIGGER_COMMIT_SHA="${{ github.sha }}" - TRIGGER_COMMIT_URL="https://github.com/${{ github.repository }}/commit/${TRIGGER_COMMIT_SHA}" - DATE=$(date +%Y-%m-%d) - - # Append sync entry to nabledge-6 plugin CHANGELOG - CHANGELOG_FILE="nabledge-repo/plugins/nabledge-6/CHANGELOG.md" - TEMP_FILE=$(mktemp) - - # Read first line (# Changelog) - head -n 1 "$CHANGELOG_FILE" > "$TEMP_FILE" - - # Add new unreleased section using printf - printf "\n## [Unreleased] - %s\n\n### Changed\n- Synced from: %s\n\n" "$DATE" "$TRIGGER_COMMIT_URL" >> "$TEMP_FILE" - - # Append rest of original file - tail -n +2 "$CHANGELOG_FILE" >> "$TEMP_FILE" - - # Replace original file - mv "$TEMP_FILE" "$CHANGELOG_FILE" + .github/scripts/update-changelog.sh \ + nabledge-repo/plugins/nabledge-6/CHANGELOG.md \ + "${{ github.sha }}" \ + "${{ github.repository }}" - name: Validate marketplace structure - run: | - echo "Validating marketplace structure..." - - # Check marketplace files exist - test -f nabledge-repo/.claude-plugin/marketplace.json || { echo "Error: marketplace.json not found"; exit 1; } - test -f nabledge-repo/README.md || { echo "Error: Root README.md not found"; exit 1; } - test -f nabledge-repo/LICENSE || { echo "Error: Root LICENSE not found"; exit 1; } - - # Check nabledge-6 plugin structure - test -f nabledge-repo/plugins/nabledge-6/.claude-plugin/plugin.json || { echo "Error: nabledge-6/plugin.json not found"; exit 1; } - test -f nabledge-repo/plugins/nabledge-6/skills/nabledge-6/SKILL.md || { echo "Error: nabledge-6/SKILL.md not found"; exit 1; } - test -f nabledge-repo/plugins/nabledge-6/README.md || { echo "Error: nabledge-6/README.md not found"; exit 1; } - test -f nabledge-repo/plugins/nabledge-6/CHANGELOG.md || { echo "Error: nabledge-6/CHANGELOG.md not found"; exit 1; } - - # Check nabledge-6 supporting directories (inside skills/nabledge-6/) - test -d nabledge-repo/plugins/nabledge-6/skills/nabledge-6/workflows || { echo "Error: nabledge-6/skills/nabledge-6/workflows not found"; exit 1; } - test -d nabledge-repo/plugins/nabledge-6/skills/nabledge-6/assets || { echo "Error: nabledge-6/skills/nabledge-6/assets not found"; exit 1; } - test -d nabledge-repo/plugins/nabledge-6/skills/nabledge-6/knowledge || { echo "Error: nabledge-6/skills/nabledge-6/knowledge not found"; exit 1; } - test -d nabledge-repo/plugins/nabledge-6/skills/nabledge-6/docs || { echo "Error: nabledge-6/skills/nabledge-6/docs not found"; exit 1; } - - # Check setup scripts exist at root - test -f nabledge-repo/setup-6-cc.sh || { echo "Error: setup-6-cc.sh not found at root"; exit 1; } - test -f nabledge-repo/setup-6-ghc.sh || { echo "Error: setup-6-ghc.sh not found at root"; exit 1; } - - # Validate JSON formats - echo "Validating JSON formats..." - jq empty nabledge-repo/.claude-plugin/marketplace.json || { echo "Error: Invalid marketplace.json"; exit 1; } - jq empty nabledge-repo/plugins/nabledge-6/.claude-plugin/plugin.json || { echo "Error: Invalid plugin.json"; exit 1; } - - # Validate marketplace.json structure - echo "Validating marketplace.json structure..." - jq -e '.name' nabledge-repo/.claude-plugin/marketplace.json > /dev/null || { echo "Error: marketplace.json missing 'name' field"; exit 1; } - jq -e '.plugins' nabledge-repo/.claude-plugin/marketplace.json > /dev/null || { echo "Error: marketplace.json missing 'plugins' array"; exit 1; } - - # Validate plugin.json structure - echo "Validating plugin.json structure..." - jq -e '.name' nabledge-repo/plugins/nabledge-6/.claude-plugin/plugin.json > /dev/null || { echo "Error: plugin.json missing 'name' field"; exit 1; } - jq -e '.version' nabledge-repo/plugins/nabledge-6/.claude-plugin/plugin.json > /dev/null || { echo "Error: plugin.json missing 'version' field"; exit 1; } - - echo "Marketplace structure validation passed!" - - - name: Configure Git - working-directory: nabledge-repo - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" + run: .github/scripts/validate-marketplace.sh nabledge-repo - name: Commit and Push to nabledge working-directory: nabledge-repo run: | - git add . - - if git diff --staged --quiet; then - echo "No changes to commit" - exit 0 - fi - - TRIGGER_COMMIT_SHA="${{ github.sha }}" - TRIGGER_COMMIT_URL="https://github.com/${{ github.repository }}/commit/${TRIGGER_COMMIT_SHA}" - - git commit -m "Sync nabledge marketplace from nabledge-dev" -m "Triggered by: ${TRIGGER_COMMIT_URL}" - - git push origin main + TRIGGER_COMMIT_URL="https://github.com/${{ github.repository }}/commit/${{ github.sha }}" + ../.github/scripts/commit-and-push.sh \ + "Sync nabledge marketplace from nabledge-dev" \ + "Triggered by: ${TRIGGER_COMMIT_URL}" \ + "test-to" - name: Create and push version tag working-directory: nabledge-repo run: | - # Extract version from marketplace.json VERSION=$(jq -r '.metadata.version' .claude-plugin/marketplace.json) - TAG_NAME="${VERSION}" - - echo "Creating tag: ${TAG_NAME}" - - # Check if tag already exists on remote - if git ls-remote --tags origin | grep -q "refs/tags/${TAG_NAME}"; then - echo "Tag ${TAG_NAME} already exists on remote, skipping tag creation" - exit 0 - fi - - # Create and push tag - git tag -a "${TAG_NAME}" -m "Release version ${VERSION}" - git push origin "${TAG_NAME}" - - echo "Successfully created and pushed tag: ${TAG_NAME}" + ../.github/scripts/create-version-tag.sh "$VERSION" From 6b47e7a53578d2718797e1efdd1c0f57af60ef04 Mon Sep 17 00:00:00 2001 From: kiyotis Date: Mon, 16 Feb 2026 10:29:19 +0900 Subject: [PATCH 03/27] Test: Trigger version validation error Change SKILL.md without updating version files to test validation Co-Authored-By: Claude Opus 4.6 --- .claude/skills/nabledge-6/SKILL.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.claude/skills/nabledge-6/SKILL.md b/.claude/skills/nabledge-6/SKILL.md index a73740a3..64b94da7 100644 --- a/.claude/skills/nabledge-6/SKILL.md +++ b/.claude/skills/nabledge-6/SKILL.md @@ -17,6 +17,7 @@ Structured knowledge base for Nablarch 6 framework, covering batch processing an - **Knowledge search**: Learn Nablarch APIs, patterns, configurations, troubleshooting - **Code analysis**: Understand existing code structure, dependencies, and design - **Development support**: Feature implementation, code review, error investigation +- **Testing**: Validate version update checks ## How to use From 40f0e26993aa21ebc25e19860e1950e891ec1b9c Mon Sep 17 00:00:00 2001 From: kiyotis Date: Mon, 16 Feb 2026 10:29:46 +0900 Subject: [PATCH 04/27] Revert "Test: Trigger version validation error" This reverts commit 6b47e7a53578d2718797e1efdd1c0f57af60ef04. --- .claude/skills/nabledge-6/SKILL.md | 1 - 1 file changed, 1 deletion(-) diff --git a/.claude/skills/nabledge-6/SKILL.md b/.claude/skills/nabledge-6/SKILL.md index 64b94da7..a73740a3 100644 --- a/.claude/skills/nabledge-6/SKILL.md +++ b/.claude/skills/nabledge-6/SKILL.md @@ -17,7 +17,6 @@ Structured knowledge base for Nablarch 6 framework, covering batch processing an - **Knowledge search**: Learn Nablarch APIs, patterns, configurations, troubleshooting - **Code analysis**: Understand existing code structure, dependencies, and design - **Development support**: Feature implementation, code review, error investigation -- **Testing**: Validate version update checks ## How to use From 92f62131856bb6e22b28780a9da0a5958a5bc767 Mon Sep 17 00:00:00 2001 From: kiyotis Date: Mon, 16 Feb 2026 10:29:55 +0900 Subject: [PATCH 05/27] Test: Trigger marketplace validation error Remove marketplace.json to test validation Co-Authored-By: Claude Opus 4.6 --- .../marketplace/.claude-plugin/marketplace.json | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .claude/marketplace/.claude-plugin/marketplace.json diff --git a/.claude/marketplace/.claude-plugin/marketplace.json b/.claude/marketplace/.claude-plugin/marketplace.json deleted file mode 100644 index 9a42f4af..00000000 --- a/.claude/marketplace/.claude-plugin/marketplace.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "nabledge", - "owner": { - "name": "Nablarch" - }, - "metadata": { - "version": "0.1", - "description": "Nablarch skills for AI-assisted development" - }, - "plugins": [ - { - "name": "nabledge-6", - "source": "./plugins/nabledge-6" - } - ] -} From aaddcd8535120b0541787d9751238de0c47da898 Mon Sep 17 00:00:00 2001 From: kiyotis Date: Mon, 16 Feb 2026 10:30:49 +0900 Subject: [PATCH 06/27] Revert "Test: Trigger marketplace validation error" This reverts commit 92f62131856bb6e22b28780a9da0a5958a5bc767. --- .../marketplace/.claude-plugin/marketplace.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .claude/marketplace/.claude-plugin/marketplace.json diff --git a/.claude/marketplace/.claude-plugin/marketplace.json b/.claude/marketplace/.claude-plugin/marketplace.json new file mode 100644 index 00000000..9a42f4af --- /dev/null +++ b/.claude/marketplace/.claude-plugin/marketplace.json @@ -0,0 +1,16 @@ +{ + "name": "nabledge", + "owner": { + "name": "Nablarch" + }, + "metadata": { + "version": "0.1", + "description": "Nablarch skills for AI-assisted development" + }, + "plugins": [ + { + "name": "nabledge-6", + "source": "./plugins/nabledge-6" + } + ] +} From fc2c35e187d421a0e43c07b442a087d89574c013 Mon Sep 17 00:00:00 2001 From: kiyotis Date: Mon, 16 Feb 2026 10:34:22 +0900 Subject: [PATCH 07/27] docs: Clarify installation prerequisites in README 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 --- .claude/skills/nabledge-6/plugin/CHANGELOG.md | 5 +++++ .claude/skills/nabledge-6/plugin/README.md | 11 +++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.claude/skills/nabledge-6/plugin/CHANGELOG.md b/.claude/skills/nabledge-6/plugin/CHANGELOG.md index ecb1a682..66842638 100644 --- a/.claude/skills/nabledge-6/plugin/CHANGELOG.md +++ b/.claude/skills/nabledge-6/plugin/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to the nabledge-6 plugin will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [Unreleased] + +### Changed +- Clarified installation prerequisites in README (Claude Code requires CC installed, GitHub Copilot requires WSL or GitBash) + ## [0.1] - 2026-02-13 ### Added diff --git a/.claude/skills/nabledge-6/plugin/README.md b/.claude/skills/nabledge-6/plugin/README.md index 9acb3252..818def69 100644 --- a/.claude/skills/nabledge-6/plugin/README.md +++ b/.claude/skills/nabledge-6/plugin/README.md @@ -41,6 +41,8 @@ Nablarchの知識を活用した開発支援ワークフローを提供します ### Claude Code +**前提条件**: Claude Code がインストール済みであること + プロジェクトルートで以下のコマンドを実行: ```bash @@ -51,7 +53,12 @@ curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-cc.sh **注**: セットアップスクリプトは必要に応じて `jq` コマンドを自動インストールします(Linux/WSL/GitBash環境)。macOSでは手動インストールが必要です(`brew install jq`)。 -### GitHub Copilot (WSL / GitBash) +### GitHub Copilot + +**前提条件**: WSL または GitBash 環境 + +- VS Code のターミナルを使用する場合は、ターミナルを WSL または GitBash に設定してください +- PowerShell や Command Prompt では動作しません プロジェクトルートで以下のコマンドを実行: @@ -101,7 +108,7 @@ curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-cc.sh 実行後、更新された`.claude/settings.json`をGitにコミット・プッシュしてください。 -### GitHub Copilot (WSL / GitBash) +### GitHub Copilot セットアップスクリプトを再実行: From 15806692319dfddca47a16af62cd352dd49196ea Mon Sep 17 00:00:00 2001 From: kiyotis Date: Mon, 16 Feb 2026 10:45:25 +0900 Subject: [PATCH 08/27] feat: Add environment variable support to setup scripts 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 --- .claude/skills/nabledge-6/plugin/CHANGELOG.md | 3 +++ .claude/skills/nabledge-6/plugin/README.md | 20 +++++++++++++++++++ scripts/setup-6-cc.sh | 15 ++++++++++---- scripts/setup-6-ghc.sh | 12 ++++++++--- 4 files changed, 43 insertions(+), 7 deletions(-) diff --git a/.claude/skills/nabledge-6/plugin/CHANGELOG.md b/.claude/skills/nabledge-6/plugin/CHANGELOG.md index 66842638..3a889bca 100644 --- a/.claude/skills/nabledge-6/plugin/CHANGELOG.md +++ b/.claude/skills/nabledge-6/plugin/CHANGELOG.md @@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Added +- Environment variable support for setup scripts (`NABLEDGE_REPO`, `NABLEDGE_BRANCH`) to enable testing and custom repository usage + ### Changed - Clarified installation prerequisites in README (Claude Code requires CC installed, GitHub Copilot requires WSL or GitBash) diff --git a/.claude/skills/nabledge-6/plugin/README.md b/.claude/skills/nabledge-6/plugin/README.md index 818def69..6beb6b41 100644 --- a/.claude/skills/nabledge-6/plugin/README.md +++ b/.claude/skills/nabledge-6/plugin/README.md @@ -53,6 +53,16 @@ curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-cc.sh **注**: セットアップスクリプトは必要に応じて `jq` コマンドを自動インストールします(Linux/WSL/GitBash環境)。macOSでは手動インストールが必要です(`brew install jq`)。 +**環境変数でカスタマイズ** (オプション): + +```bash +# テストブランチを使用する場合 +NABLEDGE_BRANCH=test-to curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-cc.sh | bash + +# フォーク版を使用する場合 +NABLEDGE_REPO=mycompany/nabledge-fork NABLEDGE_BRANCH=custom curl -sSL https://raw.githubusercontent.com/mycompany/nabledge-fork/custom/setup-6-cc.sh | bash +``` + ### GitHub Copilot **前提条件**: WSL または GitBash 環境 @@ -70,6 +80,16 @@ curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-ghc.s **注**: セットアップスクリプトは必要に応じて `jq` コマンドを自動インストールします(Linux/WSL/GitBash環境)。macOSでは手動インストールが必要です(`brew install jq`)。 +**環境変数でカスタマイズ** (オプション): + +```bash +# テストブランチを使用する場合 +NABLEDGE_BRANCH=test-to curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-ghc.sh | bash + +# フォーク版を使用する場合 +NABLEDGE_REPO=mycompany/nabledge-fork NABLEDGE_BRANCH=custom curl -sSL https://raw.githubusercontent.com/mycompany/nabledge-fork/custom/setup-6-ghc.sh | bash +``` + ## 使い方 ### 基本的な使い方 diff --git a/scripts/setup-6-cc.sh b/scripts/setup-6-cc.sh index 00beeea0..66c97252 100755 --- a/scripts/setup-6-cc.sh +++ b/scripts/setup-6-cc.sh @@ -11,13 +11,20 @@ fi echo "Setting up Nabledge-6 plugin for Claude Code..." echo "Project root: $PROJECT_ROOT" -# Configuration -REPO_OWNER="nablarch" -REPO_NAME="nabledge" -BRANCH="main" +# Configuration (can be overridden with environment variables) +NABLEDGE_REPO="${NABLEDGE_REPO:-nablarch/nabledge}" +NABLEDGE_BRANCH="${NABLEDGE_BRANCH:-main}" + +# Parse repository owner and name from NABLEDGE_REPO +REPO_OWNER="${NABLEDGE_REPO%/*}" +REPO_NAME="${NABLEDGE_REPO#*/}" +BRANCH="$NABLEDGE_BRANCH" MARKETPLACE_NAME="nabledge" PLUGIN_NAME="nabledge-6" +echo "Repository: $NABLEDGE_REPO" +echo "Branch: $BRANCH" + # Create .claude directory if it doesn't exist mkdir -p "$PROJECT_ROOT/.claude" diff --git a/scripts/setup-6-ghc.sh b/scripts/setup-6-ghc.sh index 9fc25b33..cf0a6d6e 100755 --- a/scripts/setup-6-ghc.sh +++ b/scripts/setup-6-ghc.sh @@ -11,11 +11,17 @@ fi echo "Setting up Nabledge-6 skill for GitHub Copilot..." echo "Project root: $PROJECT_ROOT" -# Download nabledge-6 plugin from nablarch/nabledge repository -REPO_URL="https://github.com/nablarch/nabledge" -BRANCH="main" +# Configuration (can be overridden with environment variables) +NABLEDGE_REPO="${NABLEDGE_REPO:-nablarch/nabledge}" +NABLEDGE_BRANCH="${NABLEDGE_BRANCH:-main}" + +# Build repository URL +REPO_URL="https://github.com/${NABLEDGE_REPO}" +BRANCH="$NABLEDGE_BRANCH" TEMP_DIR=$(mktemp -d) +echo "Repository: $NABLEDGE_REPO" +echo "Branch: $BRANCH" echo "Downloading nabledge-6 plugin from $REPO_URL (branch: $BRANCH)..." cd "$TEMP_DIR" git clone --depth 1 --filter=blob:none --sparse --branch "$BRANCH" "$REPO_URL" From 87783f2c4795e89583b02358ee02939df16b8d90 Mon Sep 17 00:00:00 2001 From: kiyotis Date: Mon, 16 Feb 2026 10:46:41 +0900 Subject: [PATCH 09/27] docs: Fix environment variable usage examples in README 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 --- .claude/skills/nabledge-6/plugin/README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.claude/skills/nabledge-6/plugin/README.md b/.claude/skills/nabledge-6/plugin/README.md index 6beb6b41..bbcc12e2 100644 --- a/.claude/skills/nabledge-6/plugin/README.md +++ b/.claude/skills/nabledge-6/plugin/README.md @@ -57,10 +57,12 @@ curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-cc.sh ```bash # テストブランチを使用する場合 -NABLEDGE_BRANCH=test-to curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-cc.sh | bash +curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-cc.sh -o setup.sh +NABLEDGE_BRANCH=test-to bash setup.sh # フォーク版を使用する場合 -NABLEDGE_REPO=mycompany/nabledge-fork NABLEDGE_BRANCH=custom curl -sSL https://raw.githubusercontent.com/mycompany/nabledge-fork/custom/setup-6-cc.sh | bash +curl -sSL https://raw.githubusercontent.com/mycompany/nabledge-fork/custom/setup-6-cc.sh -o setup.sh +NABLEDGE_REPO=mycompany/nabledge-fork NABLEDGE_BRANCH=custom bash setup.sh ``` ### GitHub Copilot @@ -84,10 +86,12 @@ curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-ghc.s ```bash # テストブランチを使用する場合 -NABLEDGE_BRANCH=test-to curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-ghc.sh | bash +curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-ghc.sh -o setup.sh +NABLEDGE_BRANCH=test-to bash setup.sh # フォーク版を使用する場合 -NABLEDGE_REPO=mycompany/nabledge-fork NABLEDGE_BRANCH=custom curl -sSL https://raw.githubusercontent.com/mycompany/nabledge-fork/custom/setup-6-ghc.sh | bash +curl -sSL https://raw.githubusercontent.com/mycompany/nabledge-fork/custom/setup-6-ghc.sh -o setup.sh +NABLEDGE_REPO=mycompany/nabledge-fork NABLEDGE_BRANCH=custom bash setup.sh ``` ## 使い方 From b71a66b8532f13cd949419ba7b4f8d7bf3b989b1 Mon Sep 17 00:00:00 2001 From: kiyotis Date: Mon, 16 Feb 2026 10:47:16 +0900 Subject: [PATCH 10/27] docs: Update CHANGELOG for README fix Co-Authored-By: Claude Opus 4.6 --- .claude/skills/nabledge-6/plugin/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.claude/skills/nabledge-6/plugin/CHANGELOG.md b/.claude/skills/nabledge-6/plugin/CHANGELOG.md index 3a889bca..a4173f79 100644 --- a/.claude/skills/nabledge-6/plugin/CHANGELOG.md +++ b/.claude/skills/nabledge-6/plugin/CHANGELOG.md @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Changed - Clarified installation prerequisites in README (Claude Code requires CC installed, GitHub Copilot requires WSL or GitBash) +- Fixed environment variable usage examples in README (download script first, then execute with env vars) ## [0.1] - 2026-02-13 From e3a9c2958ff559998485c5c12508cad71ce8379b Mon Sep 17 00:00:00 2001 From: kiyotis Date: Mon, 16 Feb 2026 10:55:36 +0900 Subject: [PATCH 11/27] refactor: Remove CHANGELOG auto-update from sync workflow 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 --- .github/scripts/update-changelog.sh | 56 -------------------------- .github/workflows/sync-to-nabledge.yml | 7 ---- 2 files changed, 63 deletions(-) delete mode 100755 .github/scripts/update-changelog.sh diff --git a/.github/scripts/update-changelog.sh b/.github/scripts/update-changelog.sh deleted file mode 100755 index 1ce3a20b..00000000 --- a/.github/scripts/update-changelog.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash -set -e -set -u -set -o pipefail - -# Append sync entry to CHANGELOG.md with date and commit reference -# Usage: ./update-changelog.sh - -# Validate required parameters -CHANGELOG_FILE="${1:-}" -COMMIT_SHA="${2:-}" -REPO_FULL_NAME="${3:-}" - -if [ -z "$CHANGELOG_FILE" ]; then - echo "Error: Changelog file path required" - echo "Usage: $0 " - exit 1 -fi - -if [ -z "$COMMIT_SHA" ]; then - echo "Error: Commit SHA required" - echo "Usage: $0 " - exit 1 -fi - -if [ -z "$REPO_FULL_NAME" ]; then - echo "Error: Repository full name required" - echo "Usage: $0 " - exit 1 -fi - -# Validate changelog file exists -if [ ! -f "$CHANGELOG_FILE" ]; then - echo "Error: Changelog file does not exist: $CHANGELOG_FILE" - exit 1 -fi - -echo "Updating CHANGELOG: $CHANGELOG_FILE" - -COMMIT_URL="https://github.com/${REPO_FULL_NAME}/commit/${COMMIT_SHA}" -DATE=$(date +%Y-%m-%d) -TEMP_FILE=$(mktemp) - -# Read first line (# Changelog) -head -n 1 "$CHANGELOG_FILE" > "$TEMP_FILE" - -# Add new unreleased section using printf -printf "\n## [Unreleased] - %s\n\n### Changed\n- Synced from: %s\n\n" "$DATE" "$COMMIT_URL" >> "$TEMP_FILE" - -# Append rest of original file -tail -n +2 "$CHANGELOG_FILE" >> "$TEMP_FILE" - -# Replace original file -mv "$TEMP_FILE" "$CHANGELOG_FILE" - -echo "CHANGELOG updated successfully" diff --git a/.github/workflows/sync-to-nabledge.yml b/.github/workflows/sync-to-nabledge.yml index c896430c..2505ecde 100644 --- a/.github/workflows/sync-to-nabledge.yml +++ b/.github/workflows/sync-to-nabledge.yml @@ -34,13 +34,6 @@ jobs: # Use transform script .github/scripts/transform-to-plugin.sh . nabledge-repo - - name: Update CHANGELOG.md - run: | - .github/scripts/update-changelog.sh \ - nabledge-repo/plugins/nabledge-6/CHANGELOG.md \ - "${{ github.sha }}" \ - "${{ github.repository }}" - - name: Validate marketplace structure run: .github/scripts/validate-marketplace.sh nabledge-repo From 7773844217ebbef7e2b02862b16f6ab300e1466a Mon Sep 17 00:00:00 2001 From: kiyotis Date: Mon, 16 Feb 2026 11:00:33 +0900 Subject: [PATCH 12/27] docs: Split documentation into separate usage guides 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 --- .claude/skills/nabledge-6/plugin/CHANGELOG.md | 6 +- .claude/skills/nabledge-6/plugin/README.md | 106 +----------------- .claude/skills/nabledge-6/plugin/USAGE-CC.md | 77 +++++++++++++ .claude/skills/nabledge-6/plugin/USAGE-GHC.md | 81 +++++++++++++ 4 files changed, 166 insertions(+), 104 deletions(-) create mode 100644 .claude/skills/nabledge-6/plugin/USAGE-CC.md create mode 100644 .claude/skills/nabledge-6/plugin/USAGE-GHC.md diff --git a/.claude/skills/nabledge-6/plugin/CHANGELOG.md b/.claude/skills/nabledge-6/plugin/CHANGELOG.md index a4173f79..aee8d1fd 100644 --- a/.claude/skills/nabledge-6/plugin/CHANGELOG.md +++ b/.claude/skills/nabledge-6/plugin/CHANGELOG.md @@ -8,10 +8,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Added - Environment variable support for setup scripts (`NABLEDGE_REPO`, `NABLEDGE_BRANCH`) to enable testing and custom repository usage +- Separate usage guides: `USAGE-CC.md` for Claude Code and `USAGE-GHC.md` for GitHub Copilot ### Changed -- Clarified installation prerequisites in README (Claude Code requires CC installed, GitHub Copilot requires WSL or GitBash) -- Fixed environment variable usage examples in README (download script first, then execute with env vars) +- Split documentation into focused guides (README.md for overview, USAGE-CC.md and USAGE-GHC.md for detailed instructions) +- Clarified installation prerequisites in usage guides (Claude Code requires CC installed, GitHub Copilot requires WSL or GitBash) +- Fixed environment variable usage examples in usage guides (download script first, then execute with env vars) ## [0.1] - 2026-02-13 diff --git a/.claude/skills/nabledge-6/plugin/README.md b/.claude/skills/nabledge-6/plugin/README.md index bbcc12e2..b0c093d3 100644 --- a/.claude/skills/nabledge-6/plugin/README.md +++ b/.claude/skills/nabledge-6/plugin/README.md @@ -37,107 +37,9 @@ Nablarchの知識を活用した開発支援ワークフローを提供します 注:評価版のため、知識・ワークフローともにカバー範囲は限定的です。フィードバックをもとに拡充していきます。 -## インストール +## 利用ガイド -### Claude Code +使用するAIツールに応じて、以下のガイドを参照してください。 -**前提条件**: Claude Code がインストール済みであること - -プロジェクトルートで以下のコマンドを実行: - -```bash -curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-cc.sh | bash -``` - -実行後、`.claude/settings.json`が自動的に作成または更新されます。このファイルをGitにコミット・プッシュしてください。チームメンバーがリポジトリをクローンしてClaude Codeを起動すると、自動的にプラグインのインストールが促されます。 - -**注**: セットアップスクリプトは必要に応じて `jq` コマンドを自動インストールします(Linux/WSL/GitBash環境)。macOSでは手動インストールが必要です(`brew install jq`)。 - -**環境変数でカスタマイズ** (オプション): - -```bash -# テストブランチを使用する場合 -curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-cc.sh -o setup.sh -NABLEDGE_BRANCH=test-to bash setup.sh - -# フォーク版を使用する場合 -curl -sSL https://raw.githubusercontent.com/mycompany/nabledge-fork/custom/setup-6-cc.sh -o setup.sh -NABLEDGE_REPO=mycompany/nabledge-fork NABLEDGE_BRANCH=custom bash setup.sh -``` - -### GitHub Copilot - -**前提条件**: WSL または GitBash 環境 - -- VS Code のターミナルを使用する場合は、ターミナルを WSL または GitBash に設定してください -- PowerShell や Command Prompt では動作しません - -プロジェクトルートで以下のコマンドを実行: - -```bash -curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-ghc.sh | bash -``` - -実行後、`.claude` ディレクトリがプロジェクトに作成されます。このディレクトリをGitにコミット・プッシュしてください。チームメンバーも同じスキルを利用できるようになります。 - -**注**: セットアップスクリプトは必要に応じて `jq` コマンドを自動インストールします(Linux/WSL/GitBash環境)。macOSでは手動インストールが必要です(`brew install jq`)。 - -**環境変数でカスタマイズ** (オプション): - -```bash -# テストブランチを使用する場合 -curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-ghc.sh -o setup.sh -NABLEDGE_BRANCH=test-to bash setup.sh - -# フォーク版を使用する場合 -curl -sSL https://raw.githubusercontent.com/mycompany/nabledge-fork/custom/setup-6-ghc.sh -o setup.sh -NABLEDGE_REPO=mycompany/nabledge-fork NABLEDGE_BRANCH=custom bash setup.sh -``` - -## 使い方 - -### 基本的な使い方 - -```bash -/nabledge-6 -``` - -スキルを起動し、対話的にNablarchに関する質問や、コード分析を行うことができます。 - -### 知識検索 - -```bash -/nabledge-6 "バッチ処理の実装方法を教えて" -``` - -Nablarch 6のドキュメントやベストプラクティスから知識を検索し、回答を得ることができます。質問は日本語でも英語でも可能です。 - -### コード分析 - -```bash -/nabledge-6 code-analysis -``` - -現在のプロジェクトのコードをNablarchの観点から分析します。Actionクラス、ハンドラ構成、データベースアクセスパターンなどを評価し、改善提案を提供します。 - -## バージョンアップ - -### Claude Code - -セットアップスクリプトを再実行: - -```bash -curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-cc.sh | bash -``` - -実行後、更新された`.claude/settings.json`をGitにコミット・プッシュしてください。 - -### GitHub Copilot - -セットアップスクリプトを再実行: - -```bash -curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-ghc.sh | bash -``` - -更新後、`.claude` ディレクトリの変更をGitにコミット・プッシュしてください。 +- **[Claude Code利用ガイド](USAGE-CC.md)** - Claude Codeでの利用方法 +- **[GitHub Copilot利用ガイド](USAGE-GHC.md)** - GitHub Copilotでの利用方法 diff --git a/.claude/skills/nabledge-6/plugin/USAGE-CC.md b/.claude/skills/nabledge-6/plugin/USAGE-CC.md new file mode 100644 index 00000000..1b7fc6f3 --- /dev/null +++ b/.claude/skills/nabledge-6/plugin/USAGE-CC.md @@ -0,0 +1,77 @@ +# Claude Code 利用ガイド + +Nabledge-6を Claude Code で使用するためのガイドです。 + +## 前提条件 + +- Claude Code がインストール済みであること +- プロジェクトディレクトリで作業していること + +## インストール + +プロジェクトルートで以下のコマンドを実行: + +```bash +curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-cc.sh | bash +``` + +実行後、`.claude/settings.json` が自動的に作成または更新されます。 + +### チーム共有 + +`.claude/settings.json` をGitにコミット・プッシュしてください。チームメンバーがリポジトリをクローンしてClaude Codeを起動すると、自動的にプラグインのインストールが促されます。 + +### 注意事項 + +- セットアップスクリプトは必要に応じて `jq` コマンドを自動インストールします(Linux/WSL/GitBash環境) +- macOSでは手動インストールが必要です: `brew install jq` + +### 環境変数でカスタマイズ (オプション) + +リポジトリやブランチをカスタマイズする場合: + +```bash +# テストブランチを使用する場合 +curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-cc.sh -o setup.sh +NABLEDGE_BRANCH=test-to bash setup.sh + +# フォーク版を使用する場合 +curl -sSL https://raw.githubusercontent.com/mycompany/nabledge-fork/custom/setup-6-cc.sh -o setup.sh +NABLEDGE_REPO=mycompany/nabledge-fork NABLEDGE_BRANCH=custom bash setup.sh +``` + +## 使い方 + +### 基本的な使い方 + +```bash +/nabledge-6 +``` + +スキルを起動し、対話的にNablarchに関する質問や、コード分析を行うことができます。 + +### 知識検索 + +```bash +/nabledge-6 "バッチ処理の実装方法を教えて" +``` + +Nablarch 6のドキュメントやベストプラクティスから知識を検索し、回答を得ることができます。質問は日本語でも英語でも可能です。 + +### コード分析 + +```bash +/nabledge-6 code-analysis +``` + +現在のプロジェクトのコードをNablarchの観点から分析します。Actionクラス、ハンドラ構成、データベースアクセスパターンなどを評価し、改善提案を提供します。 + +## バージョンアップ + +セットアップスクリプトを再実行: + +```bash +curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-cc.sh | bash +``` + +実行後、更新された `.claude/settings.json` をGitにコミット・プッシュしてください。 diff --git a/.claude/skills/nabledge-6/plugin/USAGE-GHC.md b/.claude/skills/nabledge-6/plugin/USAGE-GHC.md new file mode 100644 index 00000000..515ab2d2 --- /dev/null +++ b/.claude/skills/nabledge-6/plugin/USAGE-GHC.md @@ -0,0 +1,81 @@ +# GitHub Copilot 利用ガイド + +Nabledge-6を GitHub Copilot で使用するためのガイドです。 + +## 前提条件 + +- **WSL または GitBash 環境** + - VS Code のターミナルを使用する場合は、ターミナルを WSL または GitBash に設定してください + - PowerShell や Command Prompt では動作しません +- プロジェクトディレクトリで作業していること + +## インストール + +プロジェクトルートで以下のコマンドを実行: + +```bash +curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-ghc.sh | bash +``` + +実行後、`.claude` ディレクトリがプロジェクトに作成されます。 + +### チーム共有 + +`.claude` ディレクトリをGitにコミット・プッシュしてください。チームメンバーも同じスキルを利用できるようになります。 + +### 注意事項 + +- セットアップスクリプトは必要に応じて `jq` コマンドを自動インストールします(Linux/WSL/GitBash環境) +- macOSでは手動インストールが必要です: `brew install jq` + +### 環境変数でカスタマイズ (オプション) + +リポジトリやブランチをカスタマイズする場合: + +```bash +# テストブランチを使用する場合 +curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-ghc.sh -o setup.sh +NABLEDGE_BRANCH=test-to bash setup.sh + +# フォーク版を使用する場合 +curl -sSL https://raw.githubusercontent.com/mycompany/nabledge-fork/custom/setup-6-ghc.sh -o setup.sh +NABLEDGE_REPO=mycompany/nabledge-fork NABLEDGE_BRANCH=custom bash setup.sh +``` + +## 使い方 + +### 基本的な使い方 + +エディタで以下のようにスキルを呼び出します: + +```bash +/nabledge-6 +``` + +スキルを起動し、対話的にNablarchに関する質問や、コード分析を行うことができます。 + +### 知識検索 + +```bash +/nabledge-6 "バッチ処理の実装方法を教えて" +``` + +Nablarch 6のドキュメントやベストプラクティスから知識を検索し、回答を得ることができます。質問は日本語でも英語でも可能です。 + +### コード分析 + +```bash +/nabledge-6 code-analysis +``` + +現在のプロジェクトのコードをNablarchの観点から分析します。Actionクラス、ハンドラ構成、データベースアクセスパターンなどを評価し、改善提案を提供します。 + +## バージョンアップ + +セットアップスクリプトを再実行: + +```bash +curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-ghc.sh | bash +``` + +更新後、`.claude` ディレクトリの変更をGitにコミット・プッシュしてください。 From b5e537a921305972a22afa2aa09c9549a15e6973 Mon Sep 17 00:00:00 2001 From: kiyotis Date: Mon, 16 Feb 2026 11:01:23 +0900 Subject: [PATCH 13/27] fix: Copy USAGE guides in transform script 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 --- .github/scripts/transform-to-plugin.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/scripts/transform-to-plugin.sh b/.github/scripts/transform-to-plugin.sh index d9124c42..d6771b65 100755 --- a/.github/scripts/transform-to-plugin.sh +++ b/.github/scripts/transform-to-plugin.sh @@ -53,6 +53,8 @@ cp -r "$SOURCE_DIR/.claude/skills/nabledge-6/docs" "$DEST_DIR/plugins/nabledge-6 # Plugin-specific files cp "$SOURCE_DIR/.claude/skills/nabledge-6/plugin/README.md" "$DEST_DIR/plugins/nabledge-6/" cp "$SOURCE_DIR/.claude/skills/nabledge-6/plugin/CHANGELOG.md" "$DEST_DIR/plugins/nabledge-6/" +cp "$SOURCE_DIR/.claude/skills/nabledge-6/plugin/USAGE-CC.md" "$DEST_DIR/plugins/nabledge-6/" +cp "$SOURCE_DIR/.claude/skills/nabledge-6/plugin/USAGE-GHC.md" "$DEST_DIR/plugins/nabledge-6/" # Copy setup scripts to root echo "Copying setup scripts to root..." From e831ce8888e8d08657ca812a679b8b5fcc1b440c Mon Sep 17 00:00:00 2001 From: kiyotis Date: Mon, 16 Feb 2026 11:05:49 +0900 Subject: [PATCH 14/27] docs: Rename usage guides and improve README structure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .claude/skills/nabledge-6/plugin/CHANGELOG.md | 6 ++++-- .../nabledge-6/plugin/{USAGE-CC.md => GUIDE-CC.md} | 0 .../plugin/{USAGE-GHC.md => GUIDE-GHC.md} | 0 .claude/skills/nabledge-6/plugin/README.md | 14 +++++++++----- .github/scripts/transform-to-plugin.sh | 4 ++-- 5 files changed, 15 insertions(+), 9 deletions(-) rename .claude/skills/nabledge-6/plugin/{USAGE-CC.md => GUIDE-CC.md} (100%) rename .claude/skills/nabledge-6/plugin/{USAGE-GHC.md => GUIDE-GHC.md} (100%) diff --git a/.claude/skills/nabledge-6/plugin/CHANGELOG.md b/.claude/skills/nabledge-6/plugin/CHANGELOG.md index aee8d1fd..c953ca34 100644 --- a/.claude/skills/nabledge-6/plugin/CHANGELOG.md +++ b/.claude/skills/nabledge-6/plugin/CHANGELOG.md @@ -8,10 +8,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Added - Environment variable support for setup scripts (`NABLEDGE_REPO`, `NABLEDGE_BRANCH`) to enable testing and custom repository usage -- Separate usage guides: `USAGE-CC.md` for Claude Code and `USAGE-GHC.md` for GitHub Copilot +- Separate usage guides: `GUIDE-CC.md` for Claude Code and `GUIDE-GHC.md` for GitHub Copilot +- Purpose statement in README to clarify why this skill is needed ### Changed -- Split documentation into focused guides (README.md for overview, USAGE-CC.md and USAGE-GHC.md for detailed instructions) +- Split documentation into focused guides (README.md for overview, GUIDE-CC.md and GUIDE-GHC.md for detailed instructions) +- Moved evaluation notice to top of README for better visibility - Clarified installation prerequisites in usage guides (Claude Code requires CC installed, GitHub Copilot requires WSL or GitBash) - Fixed environment variable usage examples in usage guides (download script first, then execute with env vars) diff --git a/.claude/skills/nabledge-6/plugin/USAGE-CC.md b/.claude/skills/nabledge-6/plugin/GUIDE-CC.md similarity index 100% rename from .claude/skills/nabledge-6/plugin/USAGE-CC.md rename to .claude/skills/nabledge-6/plugin/GUIDE-CC.md diff --git a/.claude/skills/nabledge-6/plugin/USAGE-GHC.md b/.claude/skills/nabledge-6/plugin/GUIDE-GHC.md similarity index 100% rename from .claude/skills/nabledge-6/plugin/USAGE-GHC.md rename to .claude/skills/nabledge-6/plugin/GUIDE-GHC.md diff --git a/.claude/skills/nabledge-6/plugin/README.md b/.claude/skills/nabledge-6/plugin/README.md index b0c093d3..1819b9f2 100644 --- a/.claude/skills/nabledge-6/plugin/README.md +++ b/.claude/skills/nabledge-6/plugin/README.md @@ -1,6 +1,12 @@ # Nabledge-6 -Nablarch 6のAI支援開発スキルです。 +> **⚠️ 評価版** +> 現在、評価版として公開しています。知識・ワークフローともにカバー範囲は限定的です。 +> フィードバックをもとに継続的に拡充していきます。 + +## 目的 + +AIコーディングエージェント(Claude Code、GitHub Copilot)は、Nablarchのような企業フレームワークの知識を十分に持っていません。Nabledge-6は、エージェントにNablarch 6のドキュメントとベストプラクティスを提供し、開発支援の精度を向上させます。 ## 機能 @@ -35,11 +41,9 @@ Nablarchの知識を活用した開発支援ワークフローを提供します - **影響調査**: 変更による影響範囲をNablarchの構造を踏まえて調査 - **コードレビュー**: Nablarchの規約やベストプラクティスに基づくレビュー -注:評価版のため、知識・ワークフローともにカバー範囲は限定的です。フィードバックをもとに拡充していきます。 - ## 利用ガイド 使用するAIツールに応じて、以下のガイドを参照してください。 -- **[Claude Code利用ガイド](USAGE-CC.md)** - Claude Codeでの利用方法 -- **[GitHub Copilot利用ガイド](USAGE-GHC.md)** - GitHub Copilotでの利用方法 +- **[Claude Code利用ガイド](GUIDE-CC.md)** - Claude Codeでの利用方法 +- **[GitHub Copilot利用ガイド](GUIDE-GHC.md)** - GitHub Copilotでの利用方法 diff --git a/.github/scripts/transform-to-plugin.sh b/.github/scripts/transform-to-plugin.sh index d6771b65..cb51dcab 100755 --- a/.github/scripts/transform-to-plugin.sh +++ b/.github/scripts/transform-to-plugin.sh @@ -53,8 +53,8 @@ cp -r "$SOURCE_DIR/.claude/skills/nabledge-6/docs" "$DEST_DIR/plugins/nabledge-6 # Plugin-specific files cp "$SOURCE_DIR/.claude/skills/nabledge-6/plugin/README.md" "$DEST_DIR/plugins/nabledge-6/" cp "$SOURCE_DIR/.claude/skills/nabledge-6/plugin/CHANGELOG.md" "$DEST_DIR/plugins/nabledge-6/" -cp "$SOURCE_DIR/.claude/skills/nabledge-6/plugin/USAGE-CC.md" "$DEST_DIR/plugins/nabledge-6/" -cp "$SOURCE_DIR/.claude/skills/nabledge-6/plugin/USAGE-GHC.md" "$DEST_DIR/plugins/nabledge-6/" +cp "$SOURCE_DIR/.claude/skills/nabledge-6/plugin/GUIDE-CC.md" "$DEST_DIR/plugins/nabledge-6/" +cp "$SOURCE_DIR/.claude/skills/nabledge-6/plugin/GUIDE-GHC.md" "$DEST_DIR/plugins/nabledge-6/" # Copy setup scripts to root echo "Copying setup scripts to root..." From d4e1bcf5497afdde09d41d5cefd4135d6c8813e9 Mon Sep 17 00:00:00 2001 From: kiyotis Date: Mon, 16 Feb 2026 11:13:34 +0900 Subject: [PATCH 15/27] docs: Enhance evaluation notice and improve user guides 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 --- .claude/skills/nabledge-6/plugin/CHANGELOG.md | 8 ++-- .claude/skills/nabledge-6/plugin/GUIDE-CC.md | 37 ++++++++---------- .claude/skills/nabledge-6/plugin/GUIDE-GHC.md | 39 ++++++++----------- .claude/skills/nabledge-6/plugin/README.md | 16 ++++---- 4 files changed, 45 insertions(+), 55 deletions(-) diff --git a/.claude/skills/nabledge-6/plugin/CHANGELOG.md b/.claude/skills/nabledge-6/plugin/CHANGELOG.md index c953ca34..d71f89c1 100644 --- a/.claude/skills/nabledge-6/plugin/CHANGELOG.md +++ b/.claude/skills/nabledge-6/plugin/CHANGELOG.md @@ -9,13 +9,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Added - Environment variable support for setup scripts (`NABLEDGE_REPO`, `NABLEDGE_BRANCH`) to enable testing and custom repository usage - Separate usage guides: `GUIDE-CC.md` for Claude Code and `GUIDE-GHC.md` for GitHub Copilot -- Purpose statement in README to clarify why this skill is needed ### Changed - Split documentation into focused guides (README.md for overview, GUIDE-CC.md and GUIDE-GHC.md for detailed instructions) -- Moved evaluation notice to top of README for better visibility -- Clarified installation prerequisites in usage guides (Claude Code requires CC installed, GitHub Copilot requires WSL or GitBash) -- Fixed environment variable usage examples in usage guides (download script first, then execute with env vars) +- Enhanced evaluation notice to clarify purpose: experience knowledge impact, understand workflow possibilities, and gather requirements +- Clarified installation prerequisites in guides (Claude Code requires CC installed, GitHub Copilot requires WSL or GitBash) +- Updated usage instructions to emphasize natural language interaction as primary method, with manual execution as optional +- Removed environment variable customization from user guides (developer-only information) ## [0.1] - 2026-02-13 diff --git a/.claude/skills/nabledge-6/plugin/GUIDE-CC.md b/.claude/skills/nabledge-6/plugin/GUIDE-CC.md index 1b7fc6f3..f5617a2a 100644 --- a/.claude/skills/nabledge-6/plugin/GUIDE-CC.md +++ b/.claude/skills/nabledge-6/plugin/GUIDE-CC.md @@ -26,46 +26,41 @@ curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-cc.sh - セットアップスクリプトは必要に応じて `jq` コマンドを自動インストールします(Linux/WSL/GitBash環境) - macOSでは手動インストールが必要です: `brew install jq` -### 環境変数でカスタマイズ (オプション) +## 使い方 -リポジトリやブランチをカスタマイズする場合: +### 基本的な使い方 -```bash -# テストブランチを使用する場合 -curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-cc.sh -o setup.sh -NABLEDGE_BRANCH=test-to bash setup.sh +自然言語でNablarchに関する質問や依頼をするだけで、Claude Codeが自動的にnabledge-6スキルを使用します。 -# フォーク版を使用する場合 -curl -sSL https://raw.githubusercontent.com/mycompany/nabledge-fork/custom/setup-6-cc.sh -o setup.sh -NABLEDGE_REPO=mycompany/nabledge-fork NABLEDGE_BRANCH=custom bash setup.sh +**例**: +``` +Nablarchのバッチ処理の実装方法を教えて ``` -## 使い方 - -### 基本的な使い方 +``` +このプロジェクトのコードをNablarchの観点から分析して +``` -```bash -/nabledge-6 +``` +UniversalDaoの使い方を教えて ``` -スキルを起動し、対話的にNablarchに関する質問や、コード分析を行うことができます。 +### 手動実行(オプション) -### 知識検索 +明示的にスキルを指定したい場合は、以下のコマンドで手動実行できます: ```bash -/nabledge-6 "バッチ処理の実装方法を教えて" +/nabledge-6 ``` -Nablarch 6のドキュメントやベストプラクティスから知識を検索し、回答を得ることができます。質問は日本語でも英語でも可能です。 +対話的にNablarchに関する質問や、コード分析を行うことができます。 -### コード分析 +コード分析を直接実行する場合: ```bash /nabledge-6 code-analysis ``` -現在のプロジェクトのコードをNablarchの観点から分析します。Actionクラス、ハンドラ構成、データベースアクセスパターンなどを評価し、改善提案を提供します。 - ## バージョンアップ セットアップスクリプトを再実行: diff --git a/.claude/skills/nabledge-6/plugin/GUIDE-GHC.md b/.claude/skills/nabledge-6/plugin/GUIDE-GHC.md index 515ab2d2..08ce1da8 100644 --- a/.claude/skills/nabledge-6/plugin/GUIDE-GHC.md +++ b/.claude/skills/nabledge-6/plugin/GUIDE-GHC.md @@ -28,48 +28,41 @@ curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-ghc.s - セットアップスクリプトは必要に応じて `jq` コマンドを自動インストールします(Linux/WSL/GitBash環境) - macOSでは手動インストールが必要です: `brew install jq` -### 環境変数でカスタマイズ (オプション) +## 使い方 -リポジトリやブランチをカスタマイズする場合: +### 基本的な使い方 -```bash -# テストブランチを使用する場合 -curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-ghc.sh -o setup.sh -NABLEDGE_BRANCH=test-to bash setup.sh +自然言語でNablarchに関する質問や依頼をするだけで、GitHub Copilotが自動的にnabledge-6スキルを使用します。 -# フォーク版を使用する場合 -curl -sSL https://raw.githubusercontent.com/mycompany/nabledge-fork/custom/setup-6-ghc.sh -o setup.sh -NABLEDGE_REPO=mycompany/nabledge-fork NABLEDGE_BRANCH=custom bash setup.sh +**例**: +``` +Nablarchのバッチ処理の実装方法を教えて ``` -## 使い方 - -### 基本的な使い方 - -エディタで以下のようにスキルを呼び出します: +``` +このプロジェクトのコードをNablarchの観点から分析して +``` -```bash -/nabledge-6 +``` +UniversalDaoの使い方を教えて ``` -スキルを起動し、対話的にNablarchに関する質問や、コード分析を行うことができます。 +### 手動実行(オプション) -### 知識検索 +明示的にスキルを指定したい場合は、エディタで以下のコマンドを実行できます: ```bash -/nabledge-6 "バッチ処理の実装方法を教えて" +/nabledge-6 ``` -Nablarch 6のドキュメントやベストプラクティスから知識を検索し、回答を得ることができます。質問は日本語でも英語でも可能です。 +対話的にNablarchに関する質問や、コード分析を行うことができます。 -### コード分析 +コード分析を直接実行する場合: ```bash /nabledge-6 code-analysis ``` -現在のプロジェクトのコードをNablarchの観点から分析します。Actionクラス、ハンドラ構成、データベースアクセスパターンなどを評価し、改善提案を提供します。 - ## バージョンアップ セットアップスクリプトを再実行: diff --git a/.claude/skills/nabledge-6/plugin/README.md b/.claude/skills/nabledge-6/plugin/README.md index 1819b9f2..3a39305d 100644 --- a/.claude/skills/nabledge-6/plugin/README.md +++ b/.claude/skills/nabledge-6/plugin/README.md @@ -1,12 +1,14 @@ # Nabledge-6 -> **⚠️ 評価版** -> 現在、評価版として公開しています。知識・ワークフローともにカバー範囲は限定的です。 -> フィードバックをもとに継続的に拡充していきます。 - -## 目的 - -AIコーディングエージェント(Claude Code、GitHub Copilot)は、Nablarchのような企業フレームワークの知識を十分に持っていません。Nabledge-6は、エージェントにNablarch 6のドキュメントとベストプラクティスを提供し、開発支援の精度を向上させます。 +> **⚠️ 評価版について** +> +> 現在、評価版として公開しています。本スキルの目的は以下の通りです: +> +> - **知識あり/なしの違いを体感する**: AIエージェント(Claude Code、GitHub Copilot)は、Nablarchのような企業フレームワークの知識を十分に持っていません。本スキルを導入することで、Nablarch固有の知識を活用した開発支援が可能になります +> - **ワークフローの実行イメージを掴む**: コード分析などのワークフローを実際に試すことで、AIエージェントによる開発支援の可能性を理解できます +> - **現場からの要望を集める**: 実際に使用していただき、どのような機能や知識が必要か、フィードバックをお寄せください +> +> 知識・ワークフローともにカバー範囲は限定的ですが、フィードバックをもとに継続的に拡充していきます。 ## 機能 From 1ec6fbe82c9448a86b0df7a4e146a961661d0f08 Mon Sep 17 00:00:00 2001 From: kiyotis Date: Mon, 16 Feb 2026 11:18:41 +0900 Subject: [PATCH 16/27] docs: Improve GitHub Copilot guide with accurate usage instructions 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 --- .claude/skills/nabledge-6/plugin/CHANGELOG.md | 7 ++- .claude/skills/nabledge-6/plugin/GUIDE-CC.md | 5 --- .claude/skills/nabledge-6/plugin/GUIDE-GHC.md | 45 ++++++++++--------- 3 files changed, 28 insertions(+), 29 deletions(-) diff --git a/.claude/skills/nabledge-6/plugin/CHANGELOG.md b/.claude/skills/nabledge-6/plugin/CHANGELOG.md index d71f89c1..275f28ce 100644 --- a/.claude/skills/nabledge-6/plugin/CHANGELOG.md +++ b/.claude/skills/nabledge-6/plugin/CHANGELOG.md @@ -13,9 +13,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Changed - Split documentation into focused guides (README.md for overview, GUIDE-CC.md and GUIDE-GHC.md for detailed instructions) - Enhanced evaluation notice to clarify purpose: experience knowledge impact, understand workflow possibilities, and gather requirements -- Clarified installation prerequisites in guides (Claude Code requires CC installed, GitHub Copilot requires WSL or GitBash) -- Updated usage instructions to emphasize natural language interaction as primary method, with manual execution as optional +- Clarified installation prerequisites and procedures in GitHub Copilot guide (WSL/GitBash required, VS Code settings, skill usage format) +- Explained why PowerShell/Command Prompt doesn't work (jq command requirement) +- Updated GitHub Copilot usage to require `/nabledge-6 message` format (message-only doesn't invoke skill) +- Updated usage instructions to emphasize natural language interaction as primary method for Claude Code - Removed environment variable customization from user guides (developer-only information) +- Removed macOS-specific notes (out of scope for WSL/GitBash prerequisites) ## [0.1] - 2026-02-13 diff --git a/.claude/skills/nabledge-6/plugin/GUIDE-CC.md b/.claude/skills/nabledge-6/plugin/GUIDE-CC.md index f5617a2a..87baae55 100644 --- a/.claude/skills/nabledge-6/plugin/GUIDE-CC.md +++ b/.claude/skills/nabledge-6/plugin/GUIDE-CC.md @@ -21,11 +21,6 @@ curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-cc.sh `.claude/settings.json` をGitにコミット・プッシュしてください。チームメンバーがリポジトリをクローンしてClaude Codeを起動すると、自動的にプラグインのインストールが促されます。 -### 注意事項 - -- セットアップスクリプトは必要に応じて `jq` コマンドを自動インストールします(Linux/WSL/GitBash環境) -- macOSでは手動インストールが必要です: `brew install jq` - ## 使い方 ### 基本的な使い方 diff --git a/.claude/skills/nabledge-6/plugin/GUIDE-GHC.md b/.claude/skills/nabledge-6/plugin/GUIDE-GHC.md index 08ce1da8..123aca8d 100644 --- a/.claude/skills/nabledge-6/plugin/GUIDE-GHC.md +++ b/.claude/skills/nabledge-6/plugin/GUIDE-GHC.md @@ -6,60 +6,61 @@ Nabledge-6を GitHub Copilot で使用するためのガイドです。 - **WSL または GitBash 環境** - VS Code のターミナルを使用する場合は、ターミナルを WSL または GitBash に設定してください - - PowerShell や Command Prompt では動作しません + - PowerShell や Command Prompt では動作しません(セットアップスクリプトが `jq` コマンドを使用するため) - プロジェクトディレクトリで作業していること +- VS Code の GitHub Copilot 拡張機能がインストール済みであること ## インストール +### 1. スキルをプロジェクトに追加 + プロジェクトルートで以下のコマンドを実行: ```bash curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-ghc.sh | bash ``` -実行後、`.claude` ディレクトリがプロジェクトに作成されます。 +実行後、`.claude` ディレクトリがプロジェクトに作成されます。このディレクトリ内のスキル定義を GitHub Copilot が自動的に認識します。 -### チーム共有 +### 2. VS Code でスキルを有効化 -`.claude` ディレクトリをGitにコミット・プッシュしてください。チームメンバーも同じスキルを利用できるようになります。 +VS Code の設定でスキル機能を有効にする必要があります: + +1. VS Code の設定を開く(`Cmd/Ctrl + ,`) +2. 「GitHub Copilot」を検索 +3. 「Skills」または「スキル」関連の設定を探して有効化 -### 注意事項 +**注**: 設定項目名は GitHub Copilot のバージョンによって異なる場合があります。詳細は GitHub Copilot の公式ドキュメントを参照してください。 -- セットアップスクリプトは必要に応じて `jq` コマンドを自動インストールします(Linux/WSL/GitBash環境) -- macOSでは手動インストールが必要です: `brew install jq` +### 3. チーム共有 + +`.claude` ディレクトリをGitにコミット・プッシュしてください。チームメンバーも同じスキルを利用できるようになります。 ## 使い方 ### 基本的な使い方 -自然言語でNablarchに関する質問や依頼をするだけで、GitHub Copilotが自動的にnabledge-6スキルを使用します。 +GitHub Copilot でスキルを使用するには、**スキル名とメッセージを組み合わせて**指定します: -**例**: ``` -Nablarchのバッチ処理の実装方法を教えて +/nabledge-6 Nablarchのバッチ処理の実装方法を教えて ``` ``` -このプロジェクトのコードをNablarchの観点から分析して +/nabledge-6 このプロジェクトのコードをNablarchの観点から分析して ``` ``` -UniversalDaoの使い方を教えて +/nabledge-6 UniversalDaoの使い方を教えて ``` -### 手動実行(オプション) +**重要**: メッセージだけではスキルが使用されません。必ず `/nabledge-6` を先頭に付けてください。 -明示的にスキルを指定したい場合は、エディタで以下のコマンドを実行できます: +### コード分析 -```bash -/nabledge-6 -``` - -対話的にNablarchに関する質問や、コード分析を行うことができます。 - -コード分析を直接実行する場合: +コード分析ワークフローを実行する場合: -```bash +``` /nabledge-6 code-analysis ``` From 2739c180673749f363b7ffbc32536fa08c657576 Mon Sep 17 00:00:00 2001 From: kiyotis Date: Mon, 16 Feb 2026 11:21:18 +0900 Subject: [PATCH 17/27] docs: Simplify versioning explanation in marketplace README 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 --- .claude/marketplace/README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.claude/marketplace/README.md b/.claude/marketplace/README.md index 2fa87e03..30590d1a 100644 --- a/.claude/marketplace/README.md +++ b/.claude/marketplace/README.md @@ -13,12 +13,9 @@ Nabledgeは、NablarchによるAI支援開発スキルです。Claude CodeやGit インストール方法や使い方は各プラグインのREADMEを参照してください。 -## バージョニング +## バージョン -各プラグインは独立したバージョン管理を行っています。 - -- nabledge-6: `minor.patch` 形式を使用(例: 0.1, 1.0, 2.0) -- プラグイン名がすでにNablarchのメジャーバージョンを示しています +セットアップスクリプトは常に最新版をインストールします。バージョン番号(0.1, 1.0など)はリリース情報として記録されますが、利用者が意識する必要はありません。 ## ライセンス From eb18834a1436ae6872c60aa712a7e96cd4cc4914 Mon Sep 17 00:00:00 2001 From: kiyotis Date: Mon, 16 Feb 2026 11:22:45 +0900 Subject: [PATCH 18/27] docs: Correct code analysis workflow description 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 --- .claude/skills/nabledge-6/plugin/CHANGELOG.md | 1 + .claude/skills/nabledge-6/plugin/README.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.claude/skills/nabledge-6/plugin/CHANGELOG.md b/.claude/skills/nabledge-6/plugin/CHANGELOG.md index 275f28ce..2bb6b544 100644 --- a/.claude/skills/nabledge-6/plugin/CHANGELOG.md +++ b/.claude/skills/nabledge-6/plugin/CHANGELOG.md @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Separate usage guides: `GUIDE-CC.md` for Claude Code and `GUIDE-GHC.md` for GitHub Copilot ### Changed +- Corrected code analysis workflow description (generates documentation, does not provide improvement suggestions) - Split documentation into focused guides (README.md for overview, GUIDE-CC.md and GUIDE-GHC.md for detailed instructions) - Enhanced evaluation notice to clarify purpose: experience knowledge impact, understand workflow possibilities, and gather requirements - Clarified installation prerequisites and procedures in GitHub Copilot guide (WSL/GitBash required, VS Code settings, skill usage format) diff --git a/.claude/skills/nabledge-6/plugin/README.md b/.claude/skills/nabledge-6/plugin/README.md index 3a39305d..55aeefe3 100644 --- a/.claude/skills/nabledge-6/plugin/README.md +++ b/.claude/skills/nabledge-6/plugin/README.md @@ -36,7 +36,7 @@ Nablarchの知識を活用した開発支援ワークフローを提供します 現在提供しているワークフロー: -- **コード分析**: Nablarchの観点からプロジェクトコードを分析し、改善提案を行う +- **コード分析**: Nablarchの観点からプロジェクトコードを分析し、構造や依存関係を可視化したドキュメントを生成する 今後追加予定のワークフロー: From b0d6e4a0f7ac24337b69fbeb5186ae29a260ed5e Mon Sep 17 00:00:00 2001 From: kiyotis Date: Mon, 16 Feb 2026 11:28:11 +0900 Subject: [PATCH 19/27] Restructure version documentation for better user experience - 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 --- .claude/marketplace/CHANGELOG.md | 40 +++++++++++++++++++ .claude/marketplace/README.md | 4 +- .claude/skills/nabledge-6/plugin/GUIDE-CC.md | 18 ++++++++- .claude/skills/nabledge-6/plugin/GUIDE-GHC.md | 18 ++++++++- .github/scripts/transform-to-plugin.sh | 5 ++- 5 files changed, 79 insertions(+), 6 deletions(-) create mode 100644 .claude/marketplace/CHANGELOG.md diff --git a/.claude/marketplace/CHANGELOG.md b/.claude/marketplace/CHANGELOG.md new file mode 100644 index 00000000..f5c9d287 --- /dev/null +++ b/.claude/marketplace/CHANGELOG.md @@ -0,0 +1,40 @@ +# Changelog + +All notable changes to the Nabledge marketplace will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). + +## バージョン対応表 + +| マーケットプレイスバージョン | nabledge-6 | nabledge-5 | リリース日 | +|---------------------------|-----------|-----------|----------| +| 0.1 | [0.1](plugins/nabledge-6/CHANGELOG.md#01---2026-02-13) | - | 2026-02-13 | + +--- + +## [0.1] - 2026-02-13 + +### 概要 + +初回リリース。Nablarch 6向けのAI支援開発スキルを提供します。 + +### プラグイン + +#### nabledge-6 (0.1) + +- Nablarch 6u3の知識検索機能 +- コード分析機能(構造化テンプレート) +- バッチ処理の基礎知識 +- データベースアクセスライブラリ +- テスティングフレームワークの基礎 +- セキュリティチェックリスト + +詳細は [nabledge-6 CHANGELOG](plugins/nabledge-6/CHANGELOG.md) を参照してください。 + +#### nabledge-5 + +今後提供予定 + +--- + +[0.1]: https://github.com/nablarch/nabledge/releases/tag/0.1 diff --git a/.claude/marketplace/README.md b/.claude/marketplace/README.md index 30590d1a..e22ae72a 100644 --- a/.claude/marketplace/README.md +++ b/.claude/marketplace/README.md @@ -13,9 +13,9 @@ Nabledgeは、NablarchによるAI支援開発スキルです。Claude CodeやGit インストール方法や使い方は各プラグインのREADMEを参照してください。 -## バージョン +## 変更履歴 -セットアップスクリプトは常に最新版をインストールします。バージョン番号(0.1, 1.0など)はリリース情報として記録されますが、利用者が意識する必要はありません。 +全体およびプラグイン別の変更履歴は [CHANGELOG.md](CHANGELOG.md) を参照してください。 ## ライセンス diff --git a/.claude/skills/nabledge-6/plugin/GUIDE-CC.md b/.claude/skills/nabledge-6/plugin/GUIDE-CC.md index 87baae55..2fad05e0 100644 --- a/.claude/skills/nabledge-6/plugin/GUIDE-CC.md +++ b/.claude/skills/nabledge-6/plugin/GUIDE-CC.md @@ -58,10 +58,26 @@ UniversalDaoの使い方を教えて ## バージョンアップ -セットアップスクリプトを再実行: +### 最新版へのアップデート(推奨) + +セットアップスクリプトを再実行すると、常に最新版がインストールされます: ```bash curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-cc.sh | bash ``` 実行後、更新された `.claude/settings.json` をGitにコミット・プッシュしてください。 + +### 特定バージョンの指定(オプション) + +特定のバージョンにしたい場合は、タグを指定できます: + +```bash +# バージョン 0.2 にする場合 +curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-cc.sh -o setup.sh +NABLEDGE_BRANCH=0.2 bash setup.sh +``` + +実行後、`.claude/settings.json` をGitにコミット・プッシュしてください。 + +**注**: 通常は最新版の使用を推奨します。特定バージョンの指定は、動作検証やトラブルシューティングが必要な場合のみ使用してください。 diff --git a/.claude/skills/nabledge-6/plugin/GUIDE-GHC.md b/.claude/skills/nabledge-6/plugin/GUIDE-GHC.md index 123aca8d..28496dba 100644 --- a/.claude/skills/nabledge-6/plugin/GUIDE-GHC.md +++ b/.claude/skills/nabledge-6/plugin/GUIDE-GHC.md @@ -66,10 +66,26 @@ GitHub Copilot でスキルを使用するには、**スキル名とメッセー ## バージョンアップ -セットアップスクリプトを再実行: +### 最新版へのアップデート(推奨) + +セットアップスクリプトを再実行すると、常に最新版がインストールされます: ```bash curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-ghc.sh | bash ``` 更新後、`.claude` ディレクトリの変更をGitにコミット・プッシュしてください。 + +### 特定バージョンの指定(オプション) + +特定のバージョンにしたい場合は、タグを指定できます: + +```bash +# バージョン 0.2 にする場合 +curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-ghc.sh -o setup.sh +NABLEDGE_BRANCH=0.2 bash setup.sh +``` + +更新後、`.claude` ディレクトリの変更をGitにコミット・プッシュしてください。 + +**注**: 通常は最新版の使用を推奨します。特定バージョンの指定は、動作検証やトラブルシューティングが必要な場合のみ使用してください。 diff --git a/.github/scripts/transform-to-plugin.sh b/.github/scripts/transform-to-plugin.sh index cb51dcab..c52ce8f3 100755 --- a/.github/scripts/transform-to-plugin.sh +++ b/.github/scripts/transform-to-plugin.sh @@ -32,9 +32,10 @@ mkdir -p "$DEST_DIR/plugins/nabledge-6/skills/nabledge-6" echo "Copying marketplace.json..." cp "$SOURCE_DIR/.claude/marketplace/.claude-plugin/marketplace.json" "$DEST_DIR/.claude-plugin/" -# Copy marketplace README and LICENSE to root -echo "Copying marketplace README and LICENSE..." +# Copy marketplace README, CHANGELOG, and LICENSE to root +echo "Copying marketplace README, CHANGELOG, and LICENSE..." cp "$SOURCE_DIR/.claude/marketplace/README.md" "$DEST_DIR/README.md" +cp "$SOURCE_DIR/.claude/marketplace/CHANGELOG.md" "$DEST_DIR/CHANGELOG.md" cp "$SOURCE_DIR/.claude/marketplace/LICENSE" "$DEST_DIR/" # Copy nabledge-6 plugin files From 7232faddef954fbe091f662a2556b8e72401f2f5 Mon Sep 17 00:00:00 2001 From: kiyotis Date: Mon, 16 Feb 2026 11:29:08 +0900 Subject: [PATCH 20/27] Update CHANGELOG for version documentation restructuring 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 --- .claude/skills/nabledge-6/plugin/CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.claude/skills/nabledge-6/plugin/CHANGELOG.md b/.claude/skills/nabledge-6/plugin/CHANGELOG.md index 2bb6b544..87686178 100644 --- a/.claude/skills/nabledge-6/plugin/CHANGELOG.md +++ b/.claude/skills/nabledge-6/plugin/CHANGELOG.md @@ -20,6 +20,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Updated usage instructions to emphasize natural language interaction as primary method for Claude Code - Removed environment variable customization from user guides (developer-only information) - Removed macOS-specific notes (out of scope for WSL/GitBash prerequisites) +- Simplified version documentation: removed complex version section from README, users always install latest by default +- Added version upgrade sections to usage guides with tag specification examples for specific versions +- Created marketplace CHANGELOG with version correspondence table linking to plugin CHANGELOGs ## [0.1] - 2026-02-13 From cdf51955c00a71621e50b60a6e471cf8e1d36385 Mon Sep 17 00:00:00 2001 From: kiyotis Date: Mon, 16 Feb 2026 11:32:24 +0900 Subject: [PATCH 21/27] =?UTF-8?q?CHANGELOG=E3=82=92=E6=97=A5=E6=9C=AC?= =?UTF-8?q?=E8=AA=9E=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Nablarchユーザー(日本人)向けのため、全てのCHANGELOGを日本語に変更: - プラグインCHANGELOG(.claude/skills/nabledge-6/plugin/CHANGELOG.md) - マーケットプレイスCHANGELOG(.claude/marketplace/CHANGELOG.md) Co-Authored-By: Claude Opus 4.6 --- .claude/marketplace/CHANGELOG.md | 8 ++-- .claude/skills/nabledge-6/plugin/CHANGELOG.md | 40 +++++++++---------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.claude/marketplace/CHANGELOG.md b/.claude/marketplace/CHANGELOG.md index f5c9d287..2dbeef36 100644 --- a/.claude/marketplace/CHANGELOG.md +++ b/.claude/marketplace/CHANGELOG.md @@ -1,8 +1,8 @@ -# Changelog +# 変更履歴 -All notable changes to the Nabledge marketplace will be documented in this file. +Nabledgeマーケットプレイス全体の主な変更内容を記録しています。 -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +フォーマットは [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) に基づいています。 ## バージョン対応表 @@ -29,7 +29,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - テスティングフレームワークの基礎 - セキュリティチェックリスト -詳細は [nabledge-6 CHANGELOG](plugins/nabledge-6/CHANGELOG.md) を参照してください。 +詳細は [nabledge-6 変更履歴](plugins/nabledge-6/CHANGELOG.md) を参照してください。 #### nabledge-5 diff --git a/.claude/skills/nabledge-6/plugin/CHANGELOG.md b/.claude/skills/nabledge-6/plugin/CHANGELOG.md index 87686178..394c8106 100644 --- a/.claude/skills/nabledge-6/plugin/CHANGELOG.md +++ b/.claude/skills/nabledge-6/plugin/CHANGELOG.md @@ -1,28 +1,28 @@ -# Changelog +# 変更履歴 -All notable changes to the nabledge-6 plugin will be documented in this file. +nabledge-6プラグインの主な変更内容を記録しています。 -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +フォーマットは [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) に基づいています。 ## [Unreleased] -### Added -- Environment variable support for setup scripts (`NABLEDGE_REPO`, `NABLEDGE_BRANCH`) to enable testing and custom repository usage -- Separate usage guides: `GUIDE-CC.md` for Claude Code and `GUIDE-GHC.md` for GitHub Copilot - -### Changed -- Corrected code analysis workflow description (generates documentation, does not provide improvement suggestions) -- Split documentation into focused guides (README.md for overview, GUIDE-CC.md and GUIDE-GHC.md for detailed instructions) -- Enhanced evaluation notice to clarify purpose: experience knowledge impact, understand workflow possibilities, and gather requirements -- Clarified installation prerequisites and procedures in GitHub Copilot guide (WSL/GitBash required, VS Code settings, skill usage format) -- Explained why PowerShell/Command Prompt doesn't work (jq command requirement) -- Updated GitHub Copilot usage to require `/nabledge-6 message` format (message-only doesn't invoke skill) -- Updated usage instructions to emphasize natural language interaction as primary method for Claude Code -- Removed environment variable customization from user guides (developer-only information) -- Removed macOS-specific notes (out of scope for WSL/GitBash prerequisites) -- Simplified version documentation: removed complex version section from README, users always install latest by default -- Added version upgrade sections to usage guides with tag specification examples for specific versions -- Created marketplace CHANGELOG with version correspondence table linking to plugin CHANGELOGs +### 追加 +- セットアップスクリプトの環境変数サポート(`NABLEDGE_REPO`, `NABLEDGE_BRANCH`)により、テストやカスタムリポジトリの使用が可能に +- 利用ガイドの分離:Claude Code向け `GUIDE-CC.md` と GitHub Copilot向け `GUIDE-GHC.md` + +### 変更 +- コード分析ワークフローの説明を修正(ドキュメント生成機能であり、改善提案は行わない) +- ドキュメントを目的別に分離(README.mdは概要、GUIDE-CC.mdとGUIDE-GHC.mdは詳細手順) +- 評価版の目的を明確化:知識の有無による違いの体感、ワークフローの理解、現場からの要望収集 +- GitHub Copilot利用ガイドのインストール前提条件と手順を明確化(WSL/GitBash必須、VS Code設定、スキル使用形式) +- PowerShell/Command Promptが動作しない理由を説明(jqコマンド要件) +- GitHub Copilotの使用方法を更新:`/nabledge-6 メッセージ`形式が必要(メッセージのみではスキルが呼び出されない) +- Claude Codeの利用方法を更新:自然言語での対話を主要な使用方法として強調 +- 利用ガイドから環境変数カスタマイズを削除(開発者向け情報のため) +- macOS固有の注意事項を削除(WSL/GitBash前提のためスコープ外) +- バージョン管理の説明を簡素化:READMEから複雑なバージョンセクションを削除、ユーザーは常に最新版をインストール +- 利用ガイドにバージョンアップセクションを追加:タグ指定による特定バージョンのインストール例を記載 +- マーケットプレイス全体のCHANGELOGを作成:バージョン対応表とプラグインCHANGELOGへのリンク ## [0.1] - 2026-02-13 From c721d711cc108457b9ba62bd58c263ba6c7b8a4d Mon Sep 17 00:00:00 2001 From: kiyotis Date: Mon, 16 Feb 2026 11:33:08 +0900 Subject: [PATCH 22/27] =?UTF-8?q?CHANGELOG=200.1=E3=82=BB=E3=82=AF?= =?UTF-8?q?=E3=82=B7=E3=83=A7=E3=83=B3=E3=81=AE=E3=83=98=E3=83=83=E3=83=80?= =?UTF-8?q?=E3=83=BC=E3=82=82=E6=97=A5=E6=9C=AC=E8=AA=9E=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 「### Added」を「### 追加」に変更 Co-Authored-By: Claude Opus 4.6 --- .claude/skills/nabledge-6/plugin/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.claude/skills/nabledge-6/plugin/CHANGELOG.md b/.claude/skills/nabledge-6/plugin/CHANGELOG.md index 394c8106..6f9ea0a3 100644 --- a/.claude/skills/nabledge-6/plugin/CHANGELOG.md +++ b/.claude/skills/nabledge-6/plugin/CHANGELOG.md @@ -26,7 +26,7 @@ nabledge-6プラグインの主な変更内容を記録しています。 ## [0.1] - 2026-02-13 -### Added +### 追加 - Nablarch 6u3の知識検索機能 - コード分析機能(構造化テンプレート) - バッチ処理の基礎知識 From ff17cf51cd30c844dee1efaa70b04801b412eae1 Mon Sep 17 00:00:00 2001 From: kiyotis Date: Mon, 16 Feb 2026 11:38:12 +0900 Subject: [PATCH 23/27] =?UTF-8?q?=E3=83=9E=E3=83=BC=E3=82=B1=E3=83=83?= =?UTF-8?q?=E3=83=88=E3=83=97=E3=83=AC=E3=82=A4=E3=82=B9CHANGELOG=E3=82=92?= =?UTF-8?q?=E7=B0=A1=E7=B4=A0=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit バージョン対応表のみに変更し、詳細は各プラグインのCHANGELOGへのリンクで参照する形に。 重複した変更内容の記載を削除してメンテナンスを容易に。 Co-Authored-By: Claude Opus 4.6 --- .claude/marketplace/CHANGELOG.md | 33 ++------------------------------ 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/.claude/marketplace/CHANGELOG.md b/.claude/marketplace/CHANGELOG.md index 2dbeef36..e08740dd 100644 --- a/.claude/marketplace/CHANGELOG.md +++ b/.claude/marketplace/CHANGELOG.md @@ -1,40 +1,11 @@ # 変更履歴 -Nabledgeマーケットプレイス全体の主な変更内容を記録しています。 +Nabledgeマーケットプレイス全体のバージョン対応表です。 -フォーマットは [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) に基づいています。 +詳細な変更内容は各プラグインのCHANGELOGを参照してください。 ## バージョン対応表 | マーケットプレイスバージョン | nabledge-6 | nabledge-5 | リリース日 | |---------------------------|-----------|-----------|----------| | 0.1 | [0.1](plugins/nabledge-6/CHANGELOG.md#01---2026-02-13) | - | 2026-02-13 | - ---- - -## [0.1] - 2026-02-13 - -### 概要 - -初回リリース。Nablarch 6向けのAI支援開発スキルを提供します。 - -### プラグイン - -#### nabledge-6 (0.1) - -- Nablarch 6u3の知識検索機能 -- コード分析機能(構造化テンプレート) -- バッチ処理の基礎知識 -- データベースアクセスライブラリ -- テスティングフレームワークの基礎 -- セキュリティチェックリスト - -詳細は [nabledge-6 変更履歴](plugins/nabledge-6/CHANGELOG.md) を参照してください。 - -#### nabledge-5 - -今後提供予定 - ---- - -[0.1]: https://github.com/nablarch/nabledge/releases/tag/0.1 From a8937225f245ce633823183f50adc2990346f5bc Mon Sep 17 00:00:00 2001 From: kiyotis Date: Mon, 16 Feb 2026 11:41:01 +0900 Subject: [PATCH 24/27] =?UTF-8?q?CHANGELOG=200.1=E3=82=92=E7=B0=A1?= =?UTF-8?q?=E7=B4=A0=E5=8C=96=E3=81=97=E3=80=81setup-6-ghc.sh=E3=81=AE?= =?UTF-8?q?=E3=83=90=E3=82=B0=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - CHANGELOG 0.1: 機能リストを削除し「評価版として基礎知識とワークフローを提供」に変更 評価版で限定的であることを明確に - setup-6-ghc.sh: カスタムリポジトリ名に対応 リポジトリ名からディレクトリ名を動的に取得するように修正 Co-Authored-By: Claude Opus 4.6 --- .claude/skills/nabledge-6/plugin/CHANGELOG.md | 7 +------ scripts/setup-6-ghc.sh | 5 +++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.claude/skills/nabledge-6/plugin/CHANGELOG.md b/.claude/skills/nabledge-6/plugin/CHANGELOG.md index 6f9ea0a3..ca687770 100644 --- a/.claude/skills/nabledge-6/plugin/CHANGELOG.md +++ b/.claude/skills/nabledge-6/plugin/CHANGELOG.md @@ -27,11 +27,6 @@ nabledge-6プラグインの主な変更内容を記録しています。 ## [0.1] - 2026-02-13 ### 追加 -- Nablarch 6u3の知識検索機能 -- コード分析機能(構造化テンプレート) -- バッチ処理の基礎知識 -- データベースアクセスライブラリ -- テスティングフレームワークの基礎 -- セキュリティチェックリスト +- 評価版として、Nablarch 6のバッチ処理に関する基礎知識とコード分析ワークフローを提供 [0.1]: https://github.com/nablarch/nabledge/releases/tag/0.1 diff --git a/scripts/setup-6-ghc.sh b/scripts/setup-6-ghc.sh index cf0a6d6e..920ce1d7 100755 --- a/scripts/setup-6-ghc.sh +++ b/scripts/setup-6-ghc.sh @@ -17,6 +17,7 @@ NABLEDGE_BRANCH="${NABLEDGE_BRANCH:-main}" # Build repository URL REPO_URL="https://github.com/${NABLEDGE_REPO}" +REPO_NAME="${NABLEDGE_REPO##*/}" BRANCH="$NABLEDGE_BRANCH" TEMP_DIR=$(mktemp -d) @@ -25,7 +26,7 @@ echo "Branch: $BRANCH" echo "Downloading nabledge-6 plugin from $REPO_URL (branch: $BRANCH)..." cd "$TEMP_DIR" git clone --depth 1 --filter=blob:none --sparse --branch "$BRANCH" "$REPO_URL" -cd nabledge +cd "$REPO_NAME" git sparse-checkout set plugins/nabledge-6 # Create .claude/skills directory @@ -34,7 +35,7 @@ mkdir -p "$PROJECT_ROOT/.claude/skills" # Copy skills/nabledge-6 directory as-is echo "Copying nabledge-6 skill to project..." -cp -r "$TEMP_DIR/nabledge/plugins/nabledge-6/skills/nabledge-6" "$PROJECT_ROOT/.claude/skills/" +cp -r "$TEMP_DIR/$REPO_NAME/plugins/nabledge-6/skills/nabledge-6" "$PROJECT_ROOT/.claude/skills/" # Clean up rm -rf "$TEMP_DIR" From d00f62488435ecd72bb6c75c175783e2491277c8 Mon Sep 17 00:00:00 2001 From: kiyotis Date: Mon, 16 Feb 2026 11:47:57 +0900 Subject: [PATCH 25/27] =?UTF-8?q?GitHub=20Copilot=E3=82=B9=E3=82=AD?= =?UTF-8?q?=E3=83=AB=E6=9C=89=E5=8A=B9=E5=8C=96=E6=89=8B=E9=A0=86=E3=82=92?= =?UTF-8?q?=E5=85=B7=E4=BD=93=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit VS Code設定での具体的な手順を追加: - 検索キーワード: chat.useAgentSkills - チェックボックスをオンにする - VS Code再起動で有効化 Co-Authored-By: Claude Opus 4.6 --- .claude/skills/nabledge-6/plugin/GUIDE-GHC.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.claude/skills/nabledge-6/plugin/GUIDE-GHC.md b/.claude/skills/nabledge-6/plugin/GUIDE-GHC.md index 28496dba..9bd07e09 100644 --- a/.claude/skills/nabledge-6/plugin/GUIDE-GHC.md +++ b/.claude/skills/nabledge-6/plugin/GUIDE-GHC.md @@ -26,11 +26,11 @@ curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-ghc.s VS Code の設定でスキル機能を有効にする必要があります: -1. VS Code の設定を開く(`Cmd/Ctrl + ,`) -2. 「GitHub Copilot」を検索 -3. 「Skills」または「スキル」関連の設定を探して有効化 +1. VS Code の設定を開く(`Ctrl + ,` または歯車アイコンをクリック) +2. 検索ボックスに `chat.useAgentSkills` と入力 +3. 「Chat: Use Agent Skills」のチェックボックスをオンにする -**注**: 設定項目名は GitHub Copilot のバージョンによって異なる場合があります。詳細は GitHub Copilot の公式ドキュメントを参照してください。 +設定後、VS Code を再起動すると `/nabledge-6` スキルが使用可能になります。 ### 3. チーム共有 From 60fa9d9eddd66c7661e03456695c44f4cef29afb Mon Sep 17 00:00:00 2001 From: kiyotis Date: Mon, 16 Feb 2026 11:50:23 +0900 Subject: [PATCH 26/27] =?UTF-8?q?GitHub=20Copilot=E3=82=BB=E3=83=83?= =?UTF-8?q?=E3=83=88=E3=82=A2=E3=83=83=E3=83=97=E3=81=A7.vscode/settings.j?= =?UTF-8?q?son=E3=82=92=E8=87=AA=E5=8B=95=E8=A8=AD=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit チーム全体でGitHub Copilotスキル機能を共有可能に: - setup-6-ghc.shが.vscode/settings.jsonを自動作成・更新 - chat.useAgentSkills設定を追加(既存設定は保持) - 既に設定がある場合は上書きしない - チームメンバーはクローン後にVS Code再起動のみで利用可能 テスト済み: - 新規作成ケース - 既存ファイル・既存設定ありケース - 既存ファイル・他設定ありケース(マージ) Co-Authored-By: Claude Opus 4.6 --- .claude/skills/nabledge-6/plugin/CHANGELOG.md | 1 + .claude/skills/nabledge-6/plugin/GUIDE-GHC.md | 20 +++++++--------- scripts/setup-6-ghc.sh | 23 +++++++++++++++++++ 3 files changed, 32 insertions(+), 12 deletions(-) diff --git a/.claude/skills/nabledge-6/plugin/CHANGELOG.md b/.claude/skills/nabledge-6/plugin/CHANGELOG.md index ca687770..7a7d17d7 100644 --- a/.claude/skills/nabledge-6/plugin/CHANGELOG.md +++ b/.claude/skills/nabledge-6/plugin/CHANGELOG.md @@ -9,6 +9,7 @@ nabledge-6プラグインの主な変更内容を記録しています。 ### 追加 - セットアップスクリプトの環境変数サポート(`NABLEDGE_REPO`, `NABLEDGE_BRANCH`)により、テストやカスタムリポジトリの使用が可能に - 利用ガイドの分離:Claude Code向け `GUIDE-CC.md` と GitHub Copilot向け `GUIDE-GHC.md` +- GitHub Copilotセットアップスクリプトによる `.vscode/settings.json` の自動設定(`chat.useAgentSkills`)により、チーム全体でスキル機能を共有可能に ### 変更 - コード分析ワークフローの説明を修正(ドキュメント生成機能であり、改善提案は行わない) diff --git a/.claude/skills/nabledge-6/plugin/GUIDE-GHC.md b/.claude/skills/nabledge-6/plugin/GUIDE-GHC.md index 9bd07e09..867e2740 100644 --- a/.claude/skills/nabledge-6/plugin/GUIDE-GHC.md +++ b/.claude/skills/nabledge-6/plugin/GUIDE-GHC.md @@ -20,21 +20,17 @@ Nabledge-6を GitHub Copilot で使用するためのガイドです。 curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-ghc.sh | bash ``` -実行後、`.claude` ディレクトリがプロジェクトに作成されます。このディレクトリ内のスキル定義を GitHub Copilot が自動的に認識します。 +実行後、以下のファイルが自動的に作成されます: +- `.claude/skills/nabledge-6/` - スキル定義(GitHub Copilot が自動認識) +- `.vscode/settings.json` - VS Code 設定(GitHub Copilot スキル機能を有効化) -### 2. VS Code でスキルを有効化 +### 2. チーム共有 -VS Code の設定でスキル機能を有効にする必要があります: +`.claude` ディレクトリと `.vscode/settings.json` をGitにコミット・プッシュしてください。チームメンバーがリポジトリをクローンすると、自動的に以下が有効になります: +- nabledge-6 スキルの利用 +- GitHub Copilot スキル機能の有効化 -1. VS Code の設定を開く(`Ctrl + ,` または歯車アイコンをクリック) -2. 検索ボックスに `chat.useAgentSkills` と入力 -3. 「Chat: Use Agent Skills」のチェックボックスをオンにする - -設定後、VS Code を再起動すると `/nabledge-6` スキルが使用可能になります。 - -### 3. チーム共有 - -`.claude` ディレクトリをGitにコミット・プッシュしてください。チームメンバーも同じスキルを利用できるようになります。 +**注**: チームメンバーは VS Code を再起動する必要があります。 ## 使い方 diff --git a/scripts/setup-6-ghc.sh b/scripts/setup-6-ghc.sh index 920ce1d7..6c4ef7bc 100755 --- a/scripts/setup-6-ghc.sh +++ b/scripts/setup-6-ghc.sh @@ -100,8 +100,31 @@ if ! command -v jq &> /dev/null; then echo "jq installed successfully!" fi +# Configure VS Code settings for GitHub Copilot skills +echo "Configuring VS Code settings for GitHub Copilot skills..." +mkdir -p "$PROJECT_ROOT/.vscode" + +if [ -f "$PROJECT_ROOT/.vscode/settings.json" ]; then + # Existing file - check if chat.useAgentSkills already exists + if jq -e '.["chat.useAgentSkills"]' "$PROJECT_ROOT/.vscode/settings.json" > /dev/null 2>&1; then + echo "chat.useAgentSkills setting already exists in .vscode/settings.json" + else + # Add setting to existing file + jq '. + {"chat.useAgentSkills": true}' "$PROJECT_ROOT/.vscode/settings.json" > "$PROJECT_ROOT/.vscode/settings.json.tmp" + mv "$PROJECT_ROOT/.vscode/settings.json.tmp" "$PROJECT_ROOT/.vscode/settings.json" + echo "Added chat.useAgentSkills to existing .vscode/settings.json" + fi +else + # Create new file + echo '{"chat.useAgentSkills": true}' | jq '.' > "$PROJECT_ROOT/.vscode/settings.json" + echo "Created .vscode/settings.json with chat.useAgentSkills setting" +fi + echo "" echo "Setup complete! The nabledge-6 skill is now available in your project." echo "Location: $PROJECT_ROOT/.claude/skills/nabledge-6" echo "" +echo "GitHub Copilot skills have been enabled in .vscode/settings.json" +echo "Commit .vscode/settings.json to share this configuration with your team." +echo "" echo "You can use it with GitHub Copilot by typing '/nabledge-6' in your editor." From 292f6aaec1f00e47d3c77600f6f5e266d8dd8b14 Mon Sep 17 00:00:00 2001 From: kiyotis Date: Mon, 16 Feb 2026 12:00:29 +0900 Subject: [PATCH 27/27] =?UTF-8?q?GitHub=20Copilot=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E3=82=92=E4=BF=AE=E6=AD=A3=EF=BC=9A=E3=82=B9?= =?UTF-8?q?=E3=83=A9=E3=83=83=E3=82=B7=E3=83=A5=E3=82=B3=E3=83=9E=E3=83=B3?= =?UTF-8?q?=E3=83=89=E4=B8=8D=E8=A6=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 自然言語での質問で自動的にスキルが適用されるため: - GUIDE-GHC.md: `/nabledge-6 メッセージ` 形式を削除 - 使い方: 自然言語で質問するだけに変更 - setup-6-ghc.sh: 完了メッセージから `/nabledge-6` を削除 Co-Authored-By: Claude Opus 4.6 --- .claude/skills/nabledge-6/plugin/CHANGELOG.md | 2 +- .claude/skills/nabledge-6/plugin/GUIDE-GHC.md | 19 +++++-------------- scripts/setup-6-ghc.sh | 2 +- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/.claude/skills/nabledge-6/plugin/CHANGELOG.md b/.claude/skills/nabledge-6/plugin/CHANGELOG.md index 7a7d17d7..5fd7884e 100644 --- a/.claude/skills/nabledge-6/plugin/CHANGELOG.md +++ b/.claude/skills/nabledge-6/plugin/CHANGELOG.md @@ -17,7 +17,7 @@ nabledge-6プラグインの主な変更内容を記録しています。 - 評価版の目的を明確化:知識の有無による違いの体感、ワークフローの理解、現場からの要望収集 - GitHub Copilot利用ガイドのインストール前提条件と手順を明確化(WSL/GitBash必須、VS Code設定、スキル使用形式) - PowerShell/Command Promptが動作しない理由を説明(jqコマンド要件) -- GitHub Copilotの使用方法を更新:`/nabledge-6 メッセージ`形式が必要(メッセージのみではスキルが呼び出されない) +- GitHub Copilotの使用方法を更新:自然言語での質問で自動的にスキルが適用される(スラッシュコマンド不要) - Claude Codeの利用方法を更新:自然言語での対話を主要な使用方法として強調 - 利用ガイドから環境変数カスタマイズを削除(開発者向け情報のため) - macOS固有の注意事項を削除(WSL/GitBash前提のためスコープ外) diff --git a/.claude/skills/nabledge-6/plugin/GUIDE-GHC.md b/.claude/skills/nabledge-6/plugin/GUIDE-GHC.md index 867e2740..5cd7983b 100644 --- a/.claude/skills/nabledge-6/plugin/GUIDE-GHC.md +++ b/.claude/skills/nabledge-6/plugin/GUIDE-GHC.md @@ -36,28 +36,19 @@ curl -sSL https://raw.githubusercontent.com/nablarch/nabledge/main/setup-6-ghc.s ### 基本的な使い方 -GitHub Copilot でスキルを使用するには、**スキル名とメッセージを組み合わせて**指定します: +自然言語でNablarchに関する質問や依頼をするだけで、GitHub Copilotが自動的にnabledge-6スキルを使用します。 +**例**: ``` -/nabledge-6 Nablarchのバッチ処理の実装方法を教えて +Nablarchのバッチ処理の実装方法を教えて ``` ``` -/nabledge-6 このプロジェクトのコードをNablarchの観点から分析して +このプロジェクトのコードをNablarchの観点から分析して ``` ``` -/nabledge-6 UniversalDaoの使い方を教えて -``` - -**重要**: メッセージだけではスキルが使用されません。必ず `/nabledge-6` を先頭に付けてください。 - -### コード分析 - -コード分析ワークフローを実行する場合: - -``` -/nabledge-6 code-analysis +UniversalDaoの使い方を教えて ``` ## バージョンアップ diff --git a/scripts/setup-6-ghc.sh b/scripts/setup-6-ghc.sh index 6c4ef7bc..7799cbcf 100755 --- a/scripts/setup-6-ghc.sh +++ b/scripts/setup-6-ghc.sh @@ -127,4 +127,4 @@ echo "" echo "GitHub Copilot skills have been enabled in .vscode/settings.json" echo "Commit .vscode/settings.json to share this configuration with your team." echo "" -echo "You can use it with GitHub Copilot by typing '/nabledge-6' in your editor." +echo "You can now use nabledge-6 with GitHub Copilot by asking questions in natural language."