-
Notifications
You must be signed in to change notification settings - Fork 8
docs: add repo-owned agent skills #2711
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
38cf8a9
docs: add repo-owned agent skills
shikanime acee9cb
docs: generalize agent skills to git and broaden to issue and review
shikanime 7c9ee93
docs: address review threads on skill concision and e2e policy
shikanime d40dbb6
docs: fold playwright comment into the command line
shikanime 8f2e2c3
docs: add cpn-land and cpn-delegate skills
shikanime b56a5ec
docs: rename cpn-land to cpn-merge
shikanime 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,68 @@ | ||
| --- | ||
| name: cpn-commit | ||
| description: | ||
| "Use when committing in this repo: conventional commit shape enforced by | ||
| commitlint." | ||
| version: 1.0.0 | ||
| license: Apache-2.0 | ||
| --- | ||
|
|
||
| # Console commits | ||
|
|
||
| The `commit-msg` Husky hook runs commitlint (`commitlint.config.cjs`, extends | ||
| `@commitlint/config-conventional` with `'body-leading-blank': [2, 'always']`). | ||
| Release Please derives version bumps from the type. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Feature branch off `origin/main`, `git branch --show-current` to confirm — | ||
| never commit on `main`. | ||
| - Husky hooks active via `pnpm install`; commitlint rejects a malformed | ||
| message at `commit-msg`. | ||
|
|
||
| An unmet requirement is a reported blocker, never a silent scope change. | ||
| Never bypass hooks with `--no-verify`. | ||
|
|
||
| ## Commit shape | ||
|
|
||
| | Rule | Value | | ||
| | -------- | ----------------------------------------------------------------------------------------- | | ||
| | Types | `feat`, `fix`, `chore`, `docs`, `refactor`, `revert`, `build`, `feature` | | ||
| | Scope | optional, `type(scope):` | | ||
| | Breaking | `type!:` / `type(scope)!:` | | ||
| | Subject | imperative, lowercase start, no trailing period | | ||
| | Body | optional, separated from the subject by exactly one blank line | | ||
| | Footer | `Refs #N`; never `Closes #N` — issues close deliberately after verification | | ||
|
|
||
| Reference safety: a bare `#N` resolves to a console issue/PR. Cross-repo | ||
| references use a full URL or `owner/repo#N`. | ||
|
|
||
| ## Procedure | ||
|
|
||
| Single-line message: | ||
|
|
||
| ```bash | ||
| git commit -m "fix: prevent null group lookup in keycloak sync" | ||
| ``` | ||
|
|
||
| With a body, use a heredoc; repeated `-m` flags are fragile under shell | ||
| quoting. The blank line after the subject satisfies `body-leading-blank`: | ||
|
|
||
| ```bash | ||
| git commit -m "$(cat <<'EOF' | ||
| feat(plugins): add vault secret rotation | ||
|
|
||
| Supports monthly rotation via the hook post step. | ||
|
|
||
| Refs #123 | ||
| EOF | ||
| )" | ||
| ``` | ||
|
|
||
| Fold work into the last commit with `git commit --amend` — never amend a | ||
| commit that is already pushed and under review. | ||
|
|
||
| ## Verify | ||
|
|
||
| `git log -1 --format=%B` — shape matches the table; footer `Refs #N` present | ||
| when an issue stands behind the commit. |
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,67 @@ | ||
| --- | ||
| name: cpn-delegate | ||
| description: | ||
| "Use when isolating one unit of work in a fresh git worktree — the default | ||
| working surface for every implementation unit." | ||
| version: 1.0.0 | ||
| license: Apache-2.0 | ||
| --- | ||
|
|
||
| # Console work isolation | ||
|
|
||
| One unit of work = one worktree off `origin/main`. A checkout holding | ||
| unrelated work in progress is never the editing surface. | ||
|
|
||
| ## Procedure | ||
|
|
||
| 1. Open the worktree off the remote tip — a sibling of the repo root, never | ||
| inside it: | ||
|
|
||
| ```bash | ||
| cd ~/Source/Repos/github.com/cloud-pi-native/console | ||
| git worktree add ../console.<topic> -b <branch> origin/main | ||
| cd ../console.<topic> | ||
| ``` | ||
|
|
||
| - `<branch>` = `<type>/<slug>`, prefix matching the commit type | ||
| (`feat/vault-rotation`, `docs/repo-skills`). | ||
| - Pin `origin/main`, never local `main` (stale). | ||
| - `pnpm install` in the worktree: Husky hooks and deps are per-worktree. | ||
|
|
||
| 2. Implement, commit per `cpn-commit` — one logical change. | ||
|
|
||
| 3. Push, then hand off to `cpn-pr` (draft, French body, issue linked): | ||
|
|
||
| ```bash | ||
| git push -u origin <branch> | ||
| ``` | ||
|
|
||
| ## After landing | ||
|
|
||
| ```bash | ||
| cd ~/Source/Repos/github.com/cloud-pi-native/console | ||
| git worktree remove ../console.<topic> | ||
| git branch -d <branch> | ||
| git fetch --prune | ||
| ``` | ||
|
|
||
| ## Pitfalls | ||
|
|
||
| - `rm -rf` on a worktree holding uncommitted work — WIP loss; | ||
| `git worktree remove` refuses unless clean. | ||
| - Basing on local `main` — rebase onto `origin/main` before pushing | ||
| (`cpn-pr`). | ||
| - Two units in one worktree — out-of-scope fixes become follow-up issues | ||
| (`cpn-dev-workflow`). | ||
|
|
||
| ## Verify | ||
|
|
||
| ```bash | ||
| git worktree list | ||
| git status --porcelain # clean before switching units | ||
| ``` | ||
|
|
||
| ## See also | ||
|
|
||
| `cpn-dev-workflow` (lifecycle, quality gates) · `cpn-commit` · `cpn-pr` · | ||
| `cpn-merge` (landing, cleanup). |
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,76 @@ | ||
| --- | ||
| name: cpn-dev-workflow | ||
| description: | ||
| "Use when contributing to this repo: issue-first lifecycle, workspace | ||
| isolation, quality gates, and the PR workflow." | ||
| version: 1.0.0 | ||
| license: Apache-2.0 | ||
| --- | ||
|
|
||
| # Console dev workflow | ||
|
|
||
| ## Stack | ||
|
|
||
| - pnpm monorepo, Node >= 26, pnpm >= 11.8 | ||
| - Backend target: `apps/server-nestjs`. `apps/server` is frozen (read-only | ||
| reference) — never modify it. | ||
| - Git-backed repository: work on feature branches off `origin/main`; | ||
| `main` is protected. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| ```bash | ||
| gh api user --jq .login # authenticated | ||
| gh api repos/cloud-pi-native/console --jq .viewerPermission # need write | ||
| node --version && pnpm --version # Node >= 26, pnpm >= 11.8 | ||
| git status --porcelain # clean checkout | ||
| ``` | ||
|
|
||
| An unmet requirement is a reported blocker, never a silent scope change. | ||
|
|
||
| ## Lifecycle | ||
|
|
||
| Lifecycle: discussion → issue → issue comments → PR. No PR without an issue | ||
| behind it; no bare-request implementation. | ||
|
|
||
| 1. **One issue per item.** Bug `🐛 [BUG] - <summary>` / feature | ||
| `💡 [REQUEST] - <summary>`, via `.github/ISSUE_TEMPLATE/`. Body = problem | ||
| statement plus a `- [ ]` acceptance tasklist, Définition du fini — never | ||
| the solution; analysis goes in comments. Search existing issues before | ||
| creating. | ||
| 2. **Triage before work**: set each empty, determinable field — labels | ||
| from `gh label list`, never invented; assignee; milestone: bug → highest | ||
| open patch of the current minor line, feature → next minor/major. | ||
| 3. **Branch from `origin/main`**, implement, commit. | ||
| 4. **Draft PR** linked to the issue. | ||
| 5. **Human approving review is the merge gate** — do not self-merge. | ||
| 6. **Close deliberately**: verify every acceptance box, then close the issue | ||
| with an evidence comment. Never rely on PR-merge auto-close. | ||
|
|
||
| Written artifacts — issues, PR bodies, comments — stay terse: one statement | ||
| per fact, no rephrasing, no filler. Inflation buries signal. | ||
|
|
||
| Details live in the `cpn-issue`, `cpn-commit`, `cpn-pr`, `cpn-review`, | ||
| `cpn-merge`, and `cpn-delegate` skills. | ||
|
|
||
| ## Isolation | ||
|
|
||
| - One logical change per branch and PR; out-of-scope fixes become follow-up | ||
| issues. | ||
| - When the current checkout holds unrelated work in progress, isolate in a | ||
| fresh git worktree (`cpn-delegate`) instead of mixing: | ||
|
|
||
| ```bash | ||
| git worktree add ../console.<topic> -b <branch> origin/main | ||
|
shikanime marked this conversation as resolved.
|
||
| ``` | ||
|
|
||
| ## Verify | ||
|
|
||
| Before opening the PR: | ||
|
|
||
| ```bash | ||
| pnpm format | ||
| pnpm lint | ||
| pnpm test # targeted specs at minimum | ||
| pnpm playwright:test # always — unlinked changes can break E2E; also flags flaky/slow specs | ||
| ``` | ||
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,85 @@ | ||
| --- | ||
| name: cpn-issue | ||
| description: | ||
| "Use when opening, triaging, or closing an issue in this repo: French | ||
| templates, acceptance ledger, additive triage." | ||
| version: 1.0.0 | ||
| license: Apache-2.0 | ||
| --- | ||
|
|
||
| # Console issues | ||
|
|
||
| Issue-first repo norm: no PR without an issue behind it (lifecycle in the | ||
| `cpn-dev-workflow` skill, link-up in `cpn-pr`). | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Issues live on `cloud-pi-native/console`. | ||
| - `gh` authenticated with write access, verified: | ||
|
shikanime marked this conversation as resolved.
|
||
|
|
||
| ```bash | ||
| gh api user --jq .login # authenticated | ||
| gh api repos/cloud-pi-native/console --jq .viewerPermission # write to triage | ||
| ``` | ||
|
|
||
| An unmet requirement is a reported blocker, never a silent scope change. | ||
|
|
||
| ## Open | ||
|
|
||
| 1. Search before creating — reuse a matching open issue instead of a | ||
| duplicate: `gh issue list --repo cloud-pi-native/console --state open | ||
| --search "<keywords>"`. | ||
| 2. Title `🐛 [BUG] - <summary>` or `💡 [REQUEST] - <summary>`, via | ||
| `.github/ISSUE_TEMPLATE/`; label `bug` / `enhancement`. | ||
| 3. Body in **French**, from the template: problem statement (need, scope, | ||
|
shikanime marked this conversation as resolved.
|
||
| impact) plus a `- [ ]` **Définition du fini** acceptance tasklist as the | ||
| work ledger — never the solution; findings and analysis go in comments. | ||
| 4. Free-text rules: terse — one statement per fact, no rephrasing (full | ||
| discipline in `cpn-dev-workflow`); natural paragraphs, no hard wrapping, | ||
| never run a formatter over a body; a literal `@` in prose triggers a | ||
| user/team mention — wrap it in a code span. | ||
|
|
||
| ```bash | ||
| gh issue create --repo cloud-pi-native/console \ | ||
| --title "💡 [REQUEST] - <summary>" --label enhancement --body-file <file> | ||
| ``` | ||
|
|
||
| ## Triage | ||
|
|
||
| Fill each empty, determinable field, additively (`--add-label` / | ||
| `--add-assignee`, never `--label`); never invent a value the repo doesn't | ||
| have — filter labels against `gh label list`: | ||
|
|
||
| ```bash | ||
| gh issue edit <N> --repo cloud-pi-native/console \ | ||
| --add-label <label> --add-assignee "$(gh api user --jq .login)" \ | ||
| --milestone "<milestone>" | ||
| ``` | ||
|
|
||
| - **labels** — from `gh label list`, seeded by the title marker. | ||
| - **assignee** — the author, if empty. | ||
| - **milestone** — bug → highest open patch of the current minor line; | ||
| enhancement → next minor/major. | ||
| - **project** — `--add-project <n>` only when one board is the obvious home; | ||
| skip when ambiguous. | ||
|
|
||
| The issue clearly belongs to another `cloud-pi-native/*` repo? Transfer | ||
| instead of re-triaging: `gh issue transfer <N> <OWNER/REPO>` — do not edit or | ||
| close the source first. | ||
|
|
||
| ## Iterate & close | ||
|
|
||
| - The body stays the stable problem statement; decisions go to the comment | ||
| thread via `gh issue comment <N> --body-file <file>`, one line per decision; | ||
| lasting references are appended to the body's Références section. | ||
| - Closure is deliberate: verify every `- [ ]` box against evidence, then | ||
| `gh issue close <N> --comment "<evidence>"`. Never rely on PR-merge | ||
| auto-close, never close silently — state why (duplicate → link the | ||
| canonical issue). | ||
|
|
||
| ## Verify | ||
|
|
||
| ```bash | ||
| gh issue view <N> --repo cloud-pi-native/console \ | ||
| --json number,title,labels,state | ||
| ``` | ||
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.