Repository navigation
Add project command skills and contribution guidance #525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
f11c538
Add project workflow skill
frostney e66a89f
Split workflow skill into command skills
frostney bd6e45a
Clarify issue label fallback
frostney 6de2e4b
Check PR body during updates
frostney 1a18586
Check PR title during updates
frostney a41c7d6
Document implementation principles
frostney File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| --- | ||
| name: create-issue | ||
| description: Create a well-structured GocciaScript GitHub issue from a tagline or short description, using the repository issue template and project issue style. Use when the user enters /create-issue. | ||
| disable-model-invocation: true | ||
| --- | ||
|
|
||
| # Create Issue | ||
|
|
||
| Create a GitHub issue from the user's tagline or short description. | ||
|
|
||
| ## Steps | ||
|
|
||
| 1. Parse the user's tagline or short description from the command arguments. If it is missing, ask for it. | ||
| 2. Read `.github/ISSUE_TEMPLATE/default.md`. | ||
| 3. Use the established GocciaScript issue style. Good issues in this repo typically include: | ||
| - A specific, plain-language title without an area prefix. | ||
| - A short problem summary. | ||
| - Reproduction commands or a minimal code sample for bugs. | ||
| - Current behavior and expected behavior. | ||
| - Spec context or project context when relevant. | ||
| - Test impact, blocked tests, or user impact. | ||
| - Likely fix area, scope notes, constraints, and related issues. | ||
| 4. Investigate the codebase enough to avoid creating a vague or duplicate issue. Search for related code, docs, tests, and existing issues. If the tagline cannot be turned into a concrete issue without guessing, ask clarifying questions. | ||
| 5. Draft the issue using the repository template. Preserve the template's headings unless another project issue pattern is clearly more appropriate for the issue type. | ||
| 6. Choose labels by matching existing project label conventions. Use labels, not title prefixes, to capture area and type. Do not invent new labels unless the user asks. | ||
| 7. Show the title, labels, and body draft to the user before creating the issue unless the user explicitly asked to create it without review. | ||
| 8. Create the issue with GraphQL first. Include `labelIds` only when labels were selected: | ||
|
|
||
| ```bash | ||
| gh api graphql \ | ||
| -f query='mutation($repositoryId:ID!, $title:String!, $body:String!, $labelIds:[ID!]) { | ||
| createIssue(input: { | ||
| repositoryId: $repositoryId, | ||
| title: $title, | ||
| body: $body, | ||
| labelIds: $labelIds | ||
| }) { | ||
| issue { url number } | ||
| } | ||
| }' \ | ||
| -F repositoryId="$REPOSITORY_ID" \ | ||
| -f title="$ISSUE_TITLE" \ | ||
| -f body="$ISSUE_BODY" | ||
| ``` | ||
|
|
||
| When labels were selected, append one `-F labelIds[]="$LABEL_ID"` argument per label ID. | ||
|
|
||
| 9. If GraphQL is rate-limited or unavailable, create the issue with REST: | ||
|
|
||
| ```bash | ||
| gh api "repos/$OWNER/$REPO/issues" \ | ||
| -f title="$ISSUE_TITLE" \ | ||
| -f body="$ISSUE_BODY" \ | ||
| --jq '.html_url' | ||
| ``` | ||
|
|
||
| When labels were selected, append one `-f labels[]="$LABEL_NAME"` argument per label name. | ||
|
|
||
| 10. Return the issue URL to the user. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| --- | ||
| name: create-pr | ||
| description: Commit relevant changes, push the branch, and create a GocciaScript pull request using the repository PR template. Use when the user enters /create-pr. | ||
| disable-model-invocation: true | ||
| --- | ||
|
|
||
| # Create PR | ||
|
|
||
| This command is explicit permission to commit relevant changes, push the branch, and create a pull request. | ||
|
|
||
| ## Steps | ||
|
|
||
| 1. Inspect the repository state: | ||
| - `git status --short --branch` | ||
| - `git diff` | ||
| - `git diff --staged` | ||
| - `git log --oneline -5` | ||
| 2. Confirm there are changes to commit. If there are none, stop. | ||
| 3. If the current branch is `main`, create a focused branch before committing. Use an issue number or change summary for the branch name when available; otherwise ask the user. | ||
| 4. Stage only relevant files. Exclude secrets and unrelated user changes. | ||
| 5. Commit with a concise message passed via HEREDOC. | ||
| 6. Push the branch with upstream tracking when needed: `git push -u origin HEAD`. | ||
| 7. Build the PR body from the repository's pull request template. Read `.github/pull_request_template.md`, or the relevant template under `.github/PULL_REQUEST_TEMPLATE/` if the repository uses multiple templates. Fill the template faithfully and preserve its structure. | ||
| 8. Create the pull request with GraphQL first: | ||
|
|
||
| ```bash | ||
| gh api graphql \ | ||
| -f query='mutation($repositoryId:ID!, $base:String!, $head:String!, $title:String!, $body:String!) { | ||
| createPullRequest(input: { | ||
| repositoryId: $repositoryId, | ||
| baseRefName: $base, | ||
| headRefName: $head, | ||
| title: $title, | ||
| body: $body | ||
| }) { | ||
| pullRequest { url number } | ||
| } | ||
| }' \ | ||
| -F repositoryId="$REPOSITORY_ID" \ | ||
| -f base="$BASE_BRANCH" \ | ||
| -f head="$HEAD_BRANCH" \ | ||
| -f title="$PR_TITLE" \ | ||
| -f body="$PR_BODY" | ||
| ``` | ||
|
|
||
| 9. If GraphQL is rate-limited or unavailable, create the pull request with REST: | ||
|
|
||
| ```bash | ||
| gh api "repos/$OWNER/$REPO/pulls" \ | ||
| -f title="$PR_TITLE" \ | ||
| -f head="$HEAD_BRANCH" \ | ||
| -f base="$BASE_BRANCH" \ | ||
| -f body="$PR_BODY" \ | ||
| --jq '.html_url' | ||
| ``` | ||
|
|
||
| 10. Return the PR URL to the user. | ||
|
|
||
| Do not skip git hooks or verification unless the user explicitly asks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| --- | ||
| name: implement-issue | ||
| description: Validate a GitHub issue against the GocciaScript codebase, present implementation options, implement the chosen fix, and prepare a PR. Use when the user enters /implement-issue with an issue number. | ||
| disable-model-invocation: true | ||
| --- | ||
|
|
||
| # Implement Issue | ||
|
|
||
| Validate and implement the requested GitHub issue. | ||
|
|
||
| ## Steps | ||
|
|
||
| 1. Parse the issue number. If it is missing or not numeric, ask the user for the issue number. | ||
| 2. Fetch the issue with GraphQL first, including title, body, state, labels, assignees, URL, comments, and whether the issue is actually a pull request. | ||
| 3. If GraphQL is rate-limited or unavailable, fetch the issue with REST: | ||
|
|
||
| ```bash | ||
| gh api "repos/$OWNER/$REPO/issues/$ISSUE_NUMBER" | ||
| ``` | ||
|
|
||
| 4. Thoroughly review and validate the issue before coding: | ||
| - The issue exists. | ||
| - The issue is open. | ||
| - The issue is not a pull request. | ||
| - Labels or comments do not indicate `blocked`, `duplicate`, `wontfix`, or equivalent. | ||
| - The reported behavior has been checked against the current codebase, not just accepted from the issue text. | ||
| - The problem statement is verified as an actual issue in this codebase by reading the relevant implementation, running or adding a focused reproduction when practical, and comparing observed behavior with the expected behavior. | ||
| - The expected behavior and acceptance criteria are clear enough to implement. | ||
| 5. If validation fails or requirements are ambiguous, stop and ask the user. | ||
| 6. Present the user with different implementation options, including tradeoffs, recommended verification, and the option you recommend. Do not code until the user chooses an option or explicitly asks you to proceed with the recommendation. | ||
| 7. Check whether a focused branch or worktree for the issue already exists locally or on `origin`. Prefer reusing the existing focused worktree when present. If a branch exists without a worktree, use or create a worktree for it when that best isolates the work. If no focused branch exists, create one named from the issue, for example `issue-123-short-slug`, and use a worktree when practical. | ||
| 8. Implement the smallest complete change that satisfies the chosen approach. | ||
| 9. Add or update tests and documentation according to `CONTRIBUTING.md`. | ||
| 10. Run targeted verification, then broader verification when the change has wider impact. | ||
| 11. Finish by running the `/create-pr` workflow. Include `Closes #<number>` in the PR body. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| --- | ||
| name: review-pr | ||
| description: Resolve review comments on the current GocciaScript pull request without posting top-level PR comments. Use when the user enters /review-pr. | ||
| disable-model-invocation: true | ||
| --- | ||
|
|
||
| # Review PR | ||
|
|
||
| Resolve review comments on the current PR by following `.agents/skills/resolve-reviews/SKILL.md`, with these project-specific overrides. | ||
|
|
||
| ## Rules | ||
|
|
||
| - Do not leave top-level PR comments, PR review summaries, or issue comments. | ||
| - Replies to existing review comments or review threads are allowed when needed to resolve those comments. | ||
| - Keep the final summary in chat unless the user explicitly asks to post it to GitHub. | ||
| - Preserve unrelated work in the working tree. Do not revert changes you did not make. | ||
| - Run relevant verification before committing review fixes. | ||
|
|
||
| Avoid commands that create top-level comments, including `gh pr comment`, REST issue comment endpoints, or a review body that is not tied to an existing thread. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| --- | ||
| name: update-pr | ||
| description: Commit relevant local changes and push them to the current GocciaScript pull request branch. Use when the user enters /update-pr. | ||
| disable-model-invocation: true | ||
| --- | ||
|
|
||
| # Update PR | ||
|
|
||
| This command is explicit permission to commit relevant changes and push them to the current PR branch. | ||
|
|
||
| ## Steps | ||
|
|
||
| 1. Inspect the repository state: | ||
| - `git status --short --branch` | ||
| - `git diff` | ||
| - `git diff --staged` | ||
| - `git log --oneline -5` | ||
| 2. Confirm the current branch is not `main`. If it is `main`, stop and ask for the intended PR branch. | ||
| 3. Confirm the branch has an associated PR with `gh pr view`. If there is no PR, ask whether to run `/create-pr` instead. | ||
| 4. Confirm there are changes to commit. If there are none, stop. | ||
| 5. Stage only relevant files. Exclude secrets and unrelated user changes. | ||
| 6. Commit with a concise message passed via HEREDOC. | ||
| 7. Push the branch, setting upstream tracking if needed: | ||
|
|
||
| ```bash | ||
| git push -u origin HEAD | ||
| ``` | ||
|
|
||
| 8. Review the current PR title and body against the latest implementation: | ||
| - Read `.github/pull_request_template.md`, or the relevant template under `.github/PULL_REQUEST_TEMPLATE/` if the repository uses multiple templates. | ||
| - Fetch the PR body with `gh pr view --json body,url,title`. | ||
| - Compare the title, Summary, Testing, linked issues, and any scope notes with the actual commits and verification just performed. | ||
| - If the title is stale, too narrow, or no longer matches the implementation, update it with `gh pr edit --title "$PR_TITLE"`. | ||
| - If the body is stale, incomplete, or no longer matches the implementation, update it with `gh pr edit --body-file <file>`. | ||
| - Preserve the repository pull request template structure and avoid removing useful reviewer context. | ||
| 9. Report the commit hash, pushed branch, PR URL, whether the PR title or body was updated, and verification performed. | ||
|
|
||
| Do not skip git hooks or verification unless the user explicitly asks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../.agents/skills |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.