You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(docs): require explicit repo arg for fork detection (#73)
* fix(docs): require explicit repo arg for fork detection in CLAUDE.md
gh repo view (without --repo) resolves forks to the parent repo,
so isFork is always false. The instructions now require extracting
the origin remote's owner/repo and passing it explicitly, matching
the pattern already used in scripts/entrypoint.sh.
Closes#70
* chore(docs): require explicit prettier check in subagent tasks
Subagent task descriptions must include a prettier check step
covering all modified files, not just the primary target. Prevents
formatting issues from slipping through when subagents skip
verification on secondary files.
Closes#61
Copy file name to clipboardExpand all lines: CLAUDE.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,7 +84,7 @@ The panel is not a rubber stamp. Genuinely reason from each expert's perspective
84
84
85
85
Before beginning any task, complete these initialization steps in order:
86
86
87
-
1.**Sync with upstream** — First, switch to `main` (`git switch main`). If switching fails (e.g., `main` is checked out in another worktree), do not run `git pull` from the current branch — use `git fetch origin main` instead and proceed. Once on `main`, run `gh repo view --json isFork,parent`to check if the repo is a fork. If it is a fork, sync main with upstream: `gh repo sync <fork-owner>/<fork-repo> --source <parent-owner>/<parent-repo> --branch main`, then `git pull origin main`. Lastly, ensure the fork's origin main branch is pushed and synced with the upstream main branch at GitHub. If the repo is not a fork, run `git pull origin main` to ensure the local checkout is current with its remote. If any step fails, warn the user and proceed — do not block the task.
87
+
1.**Sync with upstream** — First, switch to `main` (`git switch main`). If switching fails (e.g., `main` is checked out in another worktree), do not run `git pull` from the current branch — use `git fetch origin main` instead and proceed. Once on `main`, detect whether the repo is a fork: extract the origin remote's `owner/repo` from `git remote get-url origin`, then run `gh repo view <origin-owner/repo> --json isFork,parent`(the repo must be specified explicitly — without it, `gh` resolves forks to the parent repo and `isFork`is always `false`). If it is a fork, sync main with upstream: `gh repo sync <fork-owner>/<fork-repo> --source <parent-owner>/<parent-repo> --branch main`, then `git pull origin main`. Lastly, ensure the fork's origin main branch is pushed and synced with the upstream main branch at GitHub. If the repo is not a fork, run `git pull origin main` to ensure the local checkout is current with its remote. If any step fails, warn the user and proceed — do not block the task.
88
88
89
89
All work — whether writing code, answering questions, or reviewing files — should be based on the latest upstream state. This is a best-effort step that runs from the main branch before any worktree is created.
90
90
@@ -111,7 +111,7 @@ Every change goes through a pull request — no direct commits to main. PR descr
111
111
112
112
Before creating a PR, detect whether the repo is a fork with an upstream parent:
113
113
114
-
1.Run `gh repo view --json isFork,parent` to check.
114
+
1.Extract the origin remote's `owner/repo` from `git remote get-url origin`, then run `gh repo view <origin-owner/repo> --json isFork,parent` to check. The repo must be specified explicitly — without it, `gh` resolves forks to the parent repo and `isFork` is always `false`.
115
115
2. If the repo **is a fork** (i.e., `isFork` is true and `parent` exists), target the upstream parent repo. Use `gh pr create --repo <parent-owner>/<parent-repo>` so the PR is sent upstream.
116
116
3. If the repo **is not a fork**, create the PR against the local remote origin as usual.
117
117
@@ -151,6 +151,8 @@ All commit messages follow the conventional commits standard:
151
151
152
152
Run `bunx prettier --write "**/*.{ts,md}"` on all TypeScript and Markdown files before committing. Run `bunx prettier --check "**/*.{ts,md}"` to verify.
153
153
154
+
When dispatching subagents that modify TypeScript or Markdown files, include an explicit `bunx prettier --check "**/*.{ts,md}"` step in the task description. The check must cover all modified files — not just the primary target — and run after implementation, before the subagent reports completion.
0 commit comments