cw-orient
Use at the start of any Codewhale work session, or when unsure whether the canonical checkout is on current `main` and what is dirty in it: establish live repo truth before reading a plan or editing a file.
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 4.1w
- Forks
- 3.6k
01 前言 Front Matter
- name
- cw-orient
- description
- Use at the start of any Codewhale work session, or when unsure whether the canonical checkout is on current `main` and what is dirty in it: establish live repo truth before reading a plan or editing a file.
03 SKILL.md 正文
cw-orient
Open every session on live truth, not on a handoff note, a directory name, or
what was true last time. Several agents share this one checkout on main; the
cheapest bug to avoid is committing a live writer's half-written edit.
This is stage 1 of the loop: orient → cw-slice → cw-gates → cw-dogfood → cw-land → cw-handoff.
When to use
- Starting a session, resuming one, or taking over from another agent.
- A handoff, issue, or plan tells you the state of the repo — verify before trusting it.
- You are about to edit and are not certain what is dirty or who is writing.
Workflow
-
Locate yourself. Checkout, branch, dirt, and how far you are from the remote:
git rev-parse --show-toplevel && git branch --show-current git status --short --branch git log --oneline --decorate -10Agent work happens on
main. A detached HEAD or another branch here is a state to reconcile (preserve dirt and stranded commits, compare withorigin/main, return tomain) before editing; seeAGENTS.md§ Working rules. -
Look for stranded work, not lanes.
git worktree listand recent branches tell you what may hold unlanded commits. Inventory them; do not start work in someone else's. Create your own short-lived worktree fromorigin/mainonly after the inventory.git worktree list git branch --sort=-committerdate --format='%(committerdate:short) %(refname:short)' | head -20 -
Dirt in this checkout is yours (
AGENTS.md, founder 2026-10-22).git status --porcelain git diff --statCheck mtimes: a file changed in the last 15 minutes, or one a live session is editing, is mid-edit — ask that writer to commit, and commit the rest yourself in coherent verified groups (cw-land). Never stash,
checkout --, reset or clean it. -
Fix which guidance applies. The nearest scoped
AGENTS.mdwins over the root one, and it is where the per-area rules actually live:find . -name AGENTS.md -not -path './tmp/*' -not -path '*/node_modules/*' -not -path './target/*'Today: root
AGENTS.md,crates/tui/AGENTS.md,crates/localization/locales/AGENTS.md,web/AGENTS.md. Read the one that owns the files you are about to touch. -
Establish version truth from source, not memory.
grep -m1 '^version' Cargo.toml ./scripts/release/check-versions.shcheck-versions.shis the drift gate across the workspace version, npm,Cargo.lock, the changelog, and the README. If it disagrees with what you were told, believe the script. -
Only if the task is about the community queue — issues, PRs, harvesting, credit — pull the live queue with the
gh-*skills in this directory rather than assuming from memory. When the task is local-only, stay offline and record the missing external receipt instead.
Red flags / don't
- Don't infer the current state from a directory name, a stale handoff, or a
.mdfile's confident prose. All three have been wrong here. - Don't treat a plan document as current state. Plans describe intent;
gitdescribes reality. - Don't clean, stash, reset, or
git checkout --dirt in the checkout; read it, prove it, and commit it, or hand it to the live writer. - Don't use a new worktree to escape dirt or a conflict; inherited work is still yours.
- Don't skip step 4 because the root
AGENTS.md"probably covers it". The scoped files carry the rules that actually get violated. - Don't fetch, browse, or hit GitHub when the task was scoped local-only.
Output
Open with a short status block. Skip fields that are empty or normal — a
clean tree on main with no stranded work is one line, not five:
- checkout path, branch (or detached HEAD), base commit;
- dirty files and whether a live writer owns them;
- stranded branches or checkouts holding unlanded commits;
- workspace version and whether
check-versions.shagrees; - which
AGENTS.mdfiles govern this change.
04 同仓库更多 Skills
gh-find-prs
Survey the open Codewhale PR and issue queue read-only: fetch each item, check it against current code, and produce one coverage and disposition matrix with cited evidence and credit owed.
gh-file-issue
Use when filing a new Codewhale GitHub issue: turn a bug or idea into a well-formed, actionable issue with repro, acceptance criteria, labels, and milestone.
gh-close-issues
Close resolved Codewhale issues only after verifying the landed behavior: Refs #N per landing, Fixes #N only when the reporter's scenario was reproduced, closure at the release step or on the reporter's confirmation, always with a crediting comment.
gh-assign-issues
Use to assign GitHub issues to a milestone and/or owners in bulk, verifying each.
feedback
暂无简介
cw-slice
Use before writing code for any Codewhale feature, upgrade, or refactor: find the existing owner of the behavior, bound the change to one reviewable slice, and fix the evidence bar before you start.