181ee03cc2
Replace the old /work command with two new skills backed by Linear: - /work: proper flow (plan, PR, CI iteration, review loop) - /yolo: fast flow (implement, push directly, done) Both share common config via linear-common/COMMON.md and use per-project .claude/linear.json for org, team, build commands, etc. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2.7 KiB
2.7 KiB
name, description, user-invocable, args
| name | description | user-invocable | args | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| work | Pick a Linear task (or create one), implement in a worktree, open a PR, and iterate on reviews autonomously | true |
|
Work - Proper PR Flow
Autonomous workflow: Linear issue -> worktree -> implementation -> PR -> review iteration -> done.
First: Read ~/.claude/skills/linear-common/COMMON.md for shared setup instructions.
Workflow
1. Setup (from COMMON.md)
- Load project config
- Select task (from
$ARGUMENTS) - Set up worktree
- Gather context
2. Plan
- Analyze the issue requirements and the codebase context you gathered.
- Break the work into logical commits.
- If the issue is non-trivial, write a brief plan as a comment on the Linear issue.
- Identify risks or open questions. If they're blocking, ask the user. If not, note them and proceed with best judgment.
3. Implement
Follow the implementation guidelines from COMMON.md.
After implementation is complete:
- Run the
buildCommandfrom the config. All checks must pass before opening a PR. - If tests fail, fix them. Do not ship broken code.
4. Open PR
- Push the branch:
git push -u origin <branch> - Open a PR with
gh pr create:- Title: concise, under 70 characters
- Body format:
## Summary <bullets> ## Linear Closes <ISSUE-ID> ## Test plan <what was tested and how> - Request reviewers from
prReviewersif configured.
- Move the Linear issue to "In Review" (or equivalent status).
5. Review loop
Repeat until the PR is approved and CI passes:
-
Poll for reviews:
gh pr view <number> --json reviews,reviewRequests,statusCheckRollup gh api repos/{owner}/{repo}/pulls/{number}/comments -
For each review comment:
- Valid feedback: fix the code, commit, push.
- Misunderstanding: reply explaining, resolve the thread.
- Resolve addressed threads via GraphQL:
gh api graphql -f query='mutation { resolveReviewThread(input: {threadId: "<ID>"}) { thread { isResolved } } }' - Find thread IDs:
gh api graphql -f query='{ repository(owner: "<OWNER>", name: "<REPO>") { pullRequest(number: <N>) { reviewThreads(first: 100) { nodes { id isResolved comments(first: 1) { nodes { body } } } } } } }'
-
After addressing all comments, verify the build still passes.
-
Continue until:
- All review threads resolved
- CI checks pass
- No pending review requests
-
Move the Linear issue to "Done" (or "Ready to merge" if that status exists).