refactor(opencode): make workflow forge-agnostic and read TODO.md from bare repo
Drops all GitHub-specific tooling (gh CLI, draft PR creation) so the workflow stops at git commit and leaves push/PR/MR to the user. TODO.md is now expected to be a tracked file on the default branch. Phase 1 verifies the repo is bare via `git rev-parse --is-bare-repository`, resolves the default branch from HEAD / init.defaultBranch, and snapshots TODO.md via `git show "$DEFAULT_BRANCH:TODO.md"` to a tempfile that @pm reads in Phase 2. Phase 10 updates the live TODO.md inside the worktree and commits the change separately. The /review command drops its PR mode for the same reason; @pm documents the read-only-snapshot vs. live-worktree path distinction.
This commit is contained in:
parent
4ec1561af4
commit
2941faa822
3 changed files with 61 additions and 46 deletions
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
description: review changes [commit|branch|pr|@plan], defaults to uncommitted
|
||||
description: review changes [commit|branch|@plan], defaults to uncommitted
|
||||
subtask: true
|
||||
---
|
||||
|
||||
|
|
@ -16,12 +16,11 @@ Classify the input into one of these modes:
|
|||
| Pattern | Mode |
|
||||
|---------|------|
|
||||
| Empty / no arguments | **code:uncommitted** |
|
||||
| Contains `github.com` or `pull` or is a bare number (e.g. `42`) | **code:pr** |
|
||||
| Hex string 7-40 chars (e.g. `a1b2c3d`) | **code:commit** |
|
||||
| File content provided via `@` reference (look for file contents in context) | **plan** |
|
||||
| Otherwise, treat as branch name | **code:branch** |
|
||||
|
||||
Use best judgement when the input is ambiguous.
|
||||
Use best judgement when the input is ambiguous. The command is forge-agnostic — review remote pull/merge requests by checking out the branch locally and passing the branch name (or by passing the merge-base commit).
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -33,7 +32,6 @@ Run the appropriate git commands to get the diff:
|
|||
- **code:uncommitted**: `git diff` + `git diff --cached` + `git status --short` (read untracked files too)
|
||||
- **code:commit**: `git show $ARGUMENTS`
|
||||
- **code:branch**: `git diff $ARGUMENTS...HEAD`
|
||||
- **code:pr**: `gh pr view $ARGUMENTS` + `gh pr diff $ARGUMENTS`
|
||||
|
||||
Then:
|
||||
1. Identify all changed files from the diff
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue