Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .agents/skills/orchestrate-sdlc/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ filegroup(
],
visibility = ["//visibility:public"],
)

exports_files(
["references/watch.md"],
visibility = [":__subpackages__"],
)
13 changes: 7 additions & 6 deletions .agents/skills/orchestrate-sdlc/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Read [workflow.md](references/workflow.md) when starting a campaign or dispatchi
3. Maintain one durable, untracked campaign ledger at `.sdlc/campaign.json` in the main checkout (layout in [workflow.md](references/workflow.md)), where the PEW renderer reads it. Retain agent names/IDs, roles, final artifacts (kind, absolute path, time; updated whenever an agent delivers one), issue/PR mappings, each agent's worktree path and branch, states, dependencies, permissions, exact reply IDs, feedback revisions, cursors, budgets, and operation ownership. Pass its absolute path to workers.
4. Schedule against actual available concurrency, not a requested setting that has not taken effect. Run independent preparation, publication, and CI concurrently. Lock only the same branch or real dependency; reserve a short target-ref critical section for final merges when the backend requires it.

Publish draft PRs first. Preserve the freshest Draft/Ready state on updates; green CI alone does not authorize Ready or merge. Keep owners dormant rather than occupying workers while CI runs.
Publish draft PRs first. A PR leaves Draft only through the gate in [workflow.md](references/workflow.md): bound-reviewer rounds up to a cap, local validation, then the owner's approval of the exact head. Preserve the freshest Draft/Ready state on updates; green CI alone does not authorize Ready or merge. Keep owners dormant rather than occupying workers while CI runs.

## User commands

Expand All @@ -52,17 +52,18 @@ Run the [PEW renderer](scripts/pew.py) from the repository root and print its st

It reads the ledger at `.sdlc/campaign.json` in the main checkout (`-- --state PATH` overrides) and each listed PR's state and required checks through `gh`, and prints a header line, a Markdown table with one row per non-archived agent, and footnotes. Never hand-build, edit, trim, or reformat its output. If it fails, say so and show the error; do not improvise a table. A change to columns, scope, or archive display is a change to the script.

Never drop a field to save width. Keep the ledger's next-step and last-action phrases short; those are the only text to shorten. A terminal that renders a wide table as stacked per-row blocks is acceptable. Links are always inline Markdown links: PR numbers to their PRs and artifacts as `[kind](file:///abs/path)`.
Never drop a field to save width. Keep the ledger's next-step and last-action phrases short; those are the only text to shorten. A terminal that renders a wide table as stacked per-row blocks is acceptable. The table has three columns: `Agent / issue-work`, `PR / state / artifacts`, and `Next step / last action`. In the middle column each PR's state follows its link, as in `<…/pull/N> 🟢 Ready · 🟢 pass`, then its artifacts, with items separated by `; `. Every link is a bare autolink without a `#` fragment, so a terminal that prints a Markdown link as `label (url)` shows each URL once: a PR is its GitHub URL (`<https://github.com/OWNER/REPO/pull/N>`, the number readable at its end), and an artifact is its file URI alone (`<file:///abs/path>`; the file name says what it is). File paths are percent-encoded, so spaces, angle brackets, and `#` cannot end the link or start a fragment. Review URLs are not rendered; the review ID belongs in the last-action text. The output never depends on terminal width.

The script renders only what the ledger holds, so keeping these fields current is the orchestrator's duty (schema in [watch.md](references/watch.md)):

- `last_update` and `last_action` change on each meaningful work-item event: code changes, PR/check-state transitions, new/edited comments, agent responses, and new agent instructions. Read-only polls, unchanged snapshots, and `PEW` itself do not change them. Rows sort newest first, not by issue priority.
- `last_update` and `last_action` change on each meaningful work-item event: code changes, PR/check-state transitions, new/edited comments, agent responses, and new agent instructions. Read-only polls, unchanged snapshots, and `PEW` itself do not change them. Rows sort newest first, not by issue priority. A reviewer whose `reviews` names a non-archived implementer gets its own row directly below that implementer, and the pair ranks by its newest member. That reviewer row omits the PRs and their state, which the implementer's row already shows, and lists only the reviewer's own artifacts, if any. Other reviewers rank on their own. A reviewer row's activity ends with `🧐 N passes, M comments`, summed from its `review_history` entries across all PRs, and omitted when it has none.
- `state` is `working` or `idle`, the only two displayed worker states. Dormant, waiting, blocked, and completed are explained in `next_step` text. Worker activity is independent of PR state.
- `author_action` names what the change author running the orchestrator must do, such as reviewing a Draft or answering a pending decision, and adds `🙋` to the row. Other human reviewers are not operators: awaiting their approval or an unresolved review thread alone does not set it. Clear it after the author responds unless a further author action remains pending.
- `artifacts` holds the latest final artifact of each kind (investigation report, implementation spec, review report), replaced when a new version is delivered, never a draft.
- `author_action` names what the change author running the orchestrator must do, such as answering a pending decision, and adds `🙋` to the row. Other human reviewers are not operators: awaiting their approval or an unresolved review thread alone does not set it. Re-evaluate it whenever the author answers, a decision it names is resolved, or one of the agent's PRs merges or closes: clear it, or narrow it to what is still pending, and set `author_action_at` to the time it was set or last re-evaluated. A decision tied to no agent's open work, such as deleting a retired worktree, goes in the top-level `author_actions` list, which renders as `🙋 campaign:` footnotes, never on an unrelated agent's row. The renderer flags a 🙋 for re-evaluation when `author_action_at` is missing or any of the agent's PRs merged or closed after it.
- `prs[N].gate`, `review_round`, `review_verdict`, `review_history`, `owner_approval`, and `local_validation` track the review gate. Open PRs show it after CI, beside the PR's link: `🧐 agent review 2/5`, `⛔` when escalated or past the round cap, `🙋 owner review`, `🙋 re-approval` after a push past an approval, or `✅ owner approved`. Whenever the gate waits for the owner, the PR owner's row gets 🙋 and a footnote naming the head to approve, so do not repeat that wait in `author_action`. Footnotes also flag a Ready PR without a recorded owner approval, a `ready` gate on a Draft, and an owner gate without a satisfied reviewer verdict or passing local validation on the current head.
- `artifacts` holds the latest final local file of each kind (investigation report, implementation spec, review report), replaced when a new version is delivered, never a draft and never a URL.
- `model` is the concrete model; when it is unknown the row shows `model?`, and the orchestrator asks that agent once when it next reports.

Role icons are fixed identity, not state: 🔎 investigator, 🧑‍💻 implementer, 🧐 reviewer. CI is 🟢 `pass` only when every required check explicitly passed on the current head; skipped is not passing. `Ready` is not approval or merge eligibility, so the review decision appears in a footnote.
Role icons are fixed identity, not state: 🔎 investigator, 🔨 implementer, 🧐 reviewer. CI is 🟢 `pass` only when every required check explicitly passed on the current head; skipped is not passing. A merged PR shows only 🟣 `Merged`, without CI. `Ready` is not approval or merge eligibility, so the review decision appears in a footnote.

Archived agents are omitted and counted in a footnote; retain their reports and transcripts. Merged implementer owners become eligible for archival only after one week from merge, with no active assignment, unresolved follow-up, or other/shared PR ownership; a bound reviewer is archived together with its implementer. Preserve their full historical record before removal; age alone never archives an active owner. Do not wake agents merely to list them; the one-off model question is the exception. `PEW` is read-only: it never grants mutation authority, restarts a watcher, or renews a watch window.

Expand Down
Loading
Loading