refactor(opencode): drop @pm git-ref read mode, no longer used by workflow
@pm originally had two read modes — git-ref (via `git show <ref>:TODO.md`) and filesystem. Git-ref existed because the workflow once ran in a bare repo with no working tree. Once the workflow was simplified to assume opencode is launched in the worktree, every dispatch (Phase 2 read, Phase 9 update, Failure handler) uses filesystem mode. Git-ref mode became dead weight: it added bash permissions, an allowlist, a "Bash Discipline" section, and a dual-mode "How to Read" section, but the workflow never invoked it. A reviewer correctly flagged the resulting inconsistency between the two-mode docs and the single-mode usage. @pm is now single-mode. Bash access is removed (bash: false, no permission allowlist). The "How to Read" section collapses to "you operate on TODO/ via the filesystem only" with one explicit pointer that ad-hoc historical reads (`git show main:TODO/GAL-39.md`) are out of scope — the user can run that themselves. The workflow drops the now-redundant "(live filesystem mode)" qualifier from Phase 2 / Phase 9 / Failure handler dispatches and the Roles & Dispatch table updates @pm's constraint to "No bash."
This commit is contained in:
parent
cc971b80e0
commit
c3407c9c98
2 changed files with 11 additions and 25 deletions
|
|
@ -30,7 +30,7 @@ This is a **multi-agent** workflow. There is one orchestrator (you, running in `
|
|||
| `@simplify` | Reviews for unnecessary complexity. Advisory recommendations. | Read-only. |
|
||||
| `@test` | Writes failing tests for a task spec, verifies RED, hands off to `@make`. | May only modify test files / `#[cfg(test)] mod` blocks. Bash sandboxed to test runners. |
|
||||
| `@make` | Implements a single task spec. Verifies acceptance criteria. | May only modify files listed in the task spec. Bash sandboxed to language toolchains; no `git`, network, `cd`. |
|
||||
| `@pm` | Reads/updates `TODO/` issue files. | May only modify `TODO/` contents. Bash sandboxed to `git show` / `git ls-tree` / `ls`. |
|
||||
| `@pm` | Reads/updates `TODO/` issue files. | May only modify `TODO/` contents. No bash. |
|
||||
|
||||
**What "Dispatch" means here.** Every "dispatch `@<name>`" in the phase descriptions is a call to opencode's subagent / task invocation tool with that agent name. Each dispatch starts a **fresh context**: the subagent has no memory of prior phases, no view of this orchestration, and no access beyond what its own file declares. The subagent receives only what the dispatch prompt provides — typically an absolute path to a file in `$RUN_DIR` plus a small per-dispatch context block.
|
||||
|
||||
|
|
@ -92,7 +92,7 @@ Define `RUN_DIR="$WORKTREE_PATH/.workflow/run-$ISSUE_ID"` once in Phase 1 and re
|
|||
|
||||
## Phase 2: Issue Context
|
||||
|
||||
Dispatch `@pm` against `./TODO/` (live filesystem mode; pass the absolute `TODO/` directory path) and fetch the issue at `./TODO/<ID>.md`:
|
||||
Dispatch `@pm` against `./TODO/` (pass the absolute `TODO/` directory path) and fetch the issue at `./TODO/<ID>.md`:
|
||||
- Title, description, acceptance criteria (if section present)
|
||||
- Labels and parent
|
||||
- Sub-issues list (if the issue is a parent)
|
||||
|
|
@ -454,7 +454,7 @@ The workflow is forge-agnostic. It commits locally and stops. **Do not push, and
|
|||
- If changes are large/varied, use multiple atomic commits (one per logical unit)
|
||||
|
||||
### TODO Update
|
||||
- Dispatch `@pm` against the absolute `./TODO/` path (live filesystem mode). Ask it to:
|
||||
- Dispatch `@pm` against the absolute `./TODO/` path. Ask it to:
|
||||
- Set the issue file's frontmatter `status` to `Done` (or leave at `In Progress` if the run is incomplete and the user must verify before marking Done).
|
||||
- Add a comment of the form: `- YYYY-MM-DD — Branch \`$BRANCH_NAME\`, commit <SHA> — <one-line summary>` (date from the shell, never fabricated).
|
||||
- Propagate any status flip to the dependent index: `TODO/README.md` for top-level issues (`parent: null`), or the parent file's `## Sub-issues` line for sub-issues.
|
||||
|
|
@ -481,7 +481,7 @@ At any phase, if an unrecoverable error occurs:
|
|||
1. Write `$RUN_DIR/summary.md` (creating `$RUN_DIR` first if it doesn't exist) with what was completed and what failed. Do **not** stage or commit anything under `.workflow/`.
|
||||
2. If any code was written, commit it with message `wip: incomplete workflow run for <issue-id>`. Stage code only — exclude `.workflow/` and `TODO/`.
|
||||
3. Leave the branch and worktree intact for the user to inspect — do not push, do not delete.
|
||||
4. Dispatch `@pm` against `./TODO/` (live filesystem mode) to add a comment on the issue file (`./TODO/<ID>.md`) summarising what failed.
|
||||
4. Dispatch `@pm` against `./TODO/` to add a comment on the issue file (`./TODO/<ID>.md`) summarising what failed.
|
||||
5. Stop execution.
|
||||
|
||||
**Never hang on interactive prompts.** If any command appears to require input, treat it as a failure and follow the above procedure.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue