Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
/**
* Prompt-version machinery for the cross-install auto-upgrade contract.
* See the barrel (../taskPromptDefaults.js) header and AGENTS.md
* "Distribution model" before editing.
*/
// Prompt versions — bump when a default prompt changes so existing instances auto-upgrade.
// Only non-customized prompts (promptCustomized !== true) are upgraded.
export const PROMPT_VERSIONS = {
'app-launch-video': 8, // v8: options.formats renders one timeline in several aspect ratios — declare portosComposition.formats, implement layout({width,height}) to recompose per frame, proof each format (#8960). v7: measured composition/beats.json (bpm/beats/downbeats/hits from a real analysis of the chosen library track, #8958) is named next to the motion kit — place state changes on beats, big moments on downbeats, UI sounds on hits, instead of guessing a tempo. v6: showreel and ui-morph runs set motionBlur:4 on portosComposition so fast cuts and morphs render with blended motion blur (#8959)
'model-comparison-refresh': 4, // v4: installed inventory, sourced composite estimates and authenticated import
// Current claim-flow bumps retire the Copilot fallback, drive local reviewers
// fail closed, verify the remote merge state, and clean up without force-delete.
'do-replan': 2, // v2: scheduled issue-quality gate rejects speculative/future-only work and keeps valid current refactors claimable
'feature-ideas': 11, // v11: Phase 4 (Brainstorm) establishes product direction from the repo's own documents in precedence order — root `PRD.md` first, then `GOALS.md`, then README/docs — and the candidate test cites PRD requirements when one exists. v9's "read GOALS.md, else focus on general improvements" ignored a PRD entirely, so a repo whose product intent lives in PRD.md (PortOS included) had its most specific source unread. Mirrors plan-feature v2. v10: Phase 4 (Brainstorm) consults the repo's REJECTED.md and recently closed-unmerged PRs before proposing, so ideas the user already declined aren't re-proposed (mirrors idle-review's REJECTED.md contract). v9: drop DONE.md reads — use `.changelog/` + `git log` (last 50) as the completed-work signal
'plan-task': 21, // v21: an optional reviewer (~opt) failure/timeout/provider error never sets review-blocked and does not prevent merge. v20: Phase 2 links the source checkout's node_modules into the new claim worktree via scripts/link-worktree-deps.js (#9052). v19: the claim worktree directory is namespaced per managed app (`claim-{appSlug}-…`) — see `appWorktreeSlug` in server/lib/worktreeOwnership.js for why a work-item-only name collided under the one shared worktrees root. v18: scheduled plan-task no longer instructs a code-review loop; v17: the implement + changelog steps name `AGENTS.md` (or `CLAUDE.md`) as the repo-conventions file (#4852 made AGENTS.md canonical; the dual naming keeps a managed app that still carries only the old name discoverable). v16: every reviewer that can read the working tree runs BEFORE the PR is opened — Phase 6 splits the configured list into LOCAL reviewers (every non-`@<login>` token, reviewed against `git diff origin/main...HEAD`) and PR-SIDE reviewers (`@<login>` plus any auto-requested review bot), opens the PR only once the branch is review-clean, and then waits on those PR-side reviewers plus required CI. Previously the PR was opened first and every reviewer ran against its diff, so each round of findings landed as follow-up commits on an already-public PR. v14: claim worktree creation passes `--no-track`, so a branch based on `origin/main` cannot inherit `main` as its upstream and make a config-derived push write directly to the default branch; the later `git push -u` sets the intended branch upstream. v13: Phase 5's changelog step reads the repo's documented convention FIRST (per-branch fragment directory + helper script, as PortOS now uses) and only falls back to detect-and-append when none is documented; the Phase 6 review-stuck note no longer names `.changelog/NEXT.md` as the file it wrote. v12: the reviewer bullets name the antigravity reviewer's actual PATH binary (`agy`) — the bare `antigravity` slug is a command that exists nowhere, and a review-loop agent that probed for it concluded no reviewer was available and merged on its own self-review. The same bump adds the missing-binary guard: a reviewer whose CLI is not on PATH is UNSATISFIED, never a clean review the agent substitutes its own self-review for. v11: worktree is created under PortOS's shared worktrees dir (`{worktreesRoot}` → data/cos/worktrees) instead of a repo-relative `data/cos/worktrees/` path, so the agent's checkout no longer lands inside the managed app's working tree. v10: Phase 3 "decide, don't defer" — an *ambiguous* PLAN.md item no longer jumps to the Phase 3b clarification PR; the agent picks the most reasonable reading, notes it, and implements. Phase 3b is reserved for destructive/irreversible or genuinely-human-gated items. Mirrors claim-issue v7 + CLAUDE.md. v9: per-kind reviewer bullets name `grok` alongside `claude`/`codex`/`antigravity` as a local-CLI reviewer (grok is now a selectable Review Loop reviewer). v8: Phase-6 merge fallback prefers --merge over --squash (after --auto), matching the /do:pr + review-loop default and PortOS's merge-only policy
'claim-issue': 31, // v31: an optional reviewer (~opt) failure/timeout/provider error never sets review-blocked and does not prevent merge. v30: a review that could not return a verdict is reported in the run summary only — no PR/MR comment announcing that the review was unavailable or inconclusive. v29: prefixed labels are spelled with the forge separator — GitLab gets its scoped `::` (`model::heavy`), GitHub keeps `:` — matching slashdo v3.39.0. v28: the claim worktree directory is namespaced per managed app (`claim-{appSlug}-…`) — see `appWorktreeSlug` in server/lib/worktreeOwnership.js for why a work-item-only name collided under the one shared worktrees root. v27: render the selected author mode in the candidate-list script. // v25: a volunteer claim IS a claim — the Phase 1 handoff now writes the same forge state the deterministic issue-watcher writes for the same event (`in-progress` stamped, `good first issue` / `help wanted` retired), instead of the exact opposite. v24's "leave contributor-invitation labels intact, do NOT add `in-progress`" contradicted issueWatcher.js#assignVolunteer, so which path resolved a claim comment first decided the resulting forge state; the shared policy now lives in one place (`volunteerClaimLabels` / `formatVolunteerClaimCommands`, lib/dispatchLabels.js) and the prompt renders its commands from it. The marker also gained a releaser — issueReconcile.js classifies an untouched non-owner claim ABANDONED after FOREIGN_CLAIM_STALE_DAYS and releases it back to the queue. A failed/unverified handoff still writes NOTHING. v24: scheduled and pinned GitHub claims inspect structured comments for a clear active human claimant, verify the contributor with the issue-specific assignee endpoint, assign + read back the handoff, and exit without autonomous markers; all public forge content and reviewer diffs are explicitly untrusted data that cannot request commands or disclosure. v23: required local-review execution failures (including quota/provider exhaustion, timeout, transport, malformed/empty, or no-verdict results) record `review-blocked`, still publish the PR, and leave it open with a pending-review comment; substantive findings and publication failures still block. // v22: Phase 2 releases `good first issue` / `help wanted` (one best-effort `--remove-label` per label, since a combined edit fails the whole call when either label is absent) alongside the assignee + `in-progress` markers, and does not restore them when the claim is later released. v21: an epic is no longer a dead end — Phase 1 treats an UNdecomposed epic as eligible (last-resort, after every atomic issue) and routes it to the new Phase 1b, which reuses an existing child split or files one (2–8 independently shippable slices, each `Part of #<epic>`), rewrites the epic body with a `## Decomposed into` checklist, stamps the `decomposed` label, and then claims the first slice. Phase 3's too-large branch decomposes instead of parking to `needs-input`. Before this, a queue holding only epics ended every run with nothing done. `decomposed` is the convergence marker the perpetualWork detector reads (isActionableIssue). v20: canonicalize GitHub's ssh.github.com SSH-over-443 alias before host-aware identity probes. v19: host-aware GitHub identity probes use the repository origin, and probe failures stay transient instead of parking an assigned-only queue. v18: explicit issue-page claims ignore existing assignees; auto-pick resolves the authenticated login so self-assigned issues remain retryable; open continuation handoffs clear in-progress and all assignees. v17: mirrors plan-task v17 — Phase 4 and Phase 5 name `AGENTS.md` (or `CLAUDE.md`) as the repo-conventions file (#4852). v16: Phase 1 step 4's blocking-label check is now the `{issueExcludeLabels}` placeholder (resolveIssueExcludeLabelsBlock, cosTaskGenerator.js) — the fixed NON_ACTIONABLE_ISSUE_LABELS set plus any app-configured `taskMetadata.issueExcludeLabels` extras (e.g. `good first issue`), so the live claim agent honors the same per-app exclusions the perpetual-drain detector applies, not just the hardcoded set. The pinned-target constraint (`/do:next <num>` / the work-item picker) also re-checks that resolved list, not just the fixed 3, so a target that gained an excluded label after the picker snapshot still isn't force-claimed. Phase 1's candidate fetch widened to `--limit 500` (was 100), matching perpetualWork.js's detector — the label filter runs on the fetched page, so a small cap risked missing eligible work further down a busy queue. v15: Phase 5 is now the pre-PR local review (LOCAL reviewers = every non-`@<login>` token, run against the branch diff; an unsatisfied one blocks PR creation entirely) and Phase 6 opens the PR, satisfies the PR-SIDE reviewers (`@<login>` plus any auto-requested review bot) and required CI, then merges. v13: follow-up issue recipes choose independent slashdo dispatch hints (`model:`/`effort:`) and contributor labels (`good first issue`/`help wanted`) instead of only `plan`. v12: claim worktree creation passes `--no-track`, so a branch based on `origin/main` cannot inherit `main` as its upstream and make a config-derived push write directly to the default branch; the later `git push -u` sets the intended branch upstream. v11: EVERY Phase-3 release now converges — the "already fixed / superseded" case CLOSES the issue (with a comment naming what delivered it) and the "stale reference" case tags `needs-input`, instead of both releasing the issue open and unlabeled. `isActionableIssue` (perpetualWork.js) can only see labels/assignees/epic/in-flight, so a body-or-comment-driven release left the issue looking actionable and the perpetual drain re-spawned a no-op agent on it every tick. v10: Phase 5's changelog step defers to the convention the repo documents (per-branch fragment directory + helper script when present) instead of prescribing an append to `.changelog/NEXT.md`. v9: reviewer bullets name the antigravity reviewer's actual PATH binary (`agy`) — mirrors plan-task v12. The same bump adds the missing-binary guard: a reviewer whose CLI is not on PATH is UNSATISFIED, never a clean review the agent substitutes its own self-review for. v8: worktree is created under PortOS's shared worktrees dir (`{worktreesRoot}` → data/cos/worktrees) instead of a repo-relative `data/cos/worktrees/` path, so the agent's checkout no longer lands inside the managed app's working tree. v7: Phase 3 no longer releases/parks an *ambiguous* issue to `needs-input` — the agent decides (picks the most reasonable reading, records it in an issue comment, ships) rather than punting the choice back to a human; `needs-input` is reserved for destructive/irreversible or genuinely-human-gated (hardware/credentials) cases. Mirrors the "Decide, don't defer" policy in CLAUDE.md. v6: Phase 1 epic skip also recognizes a leading `[epic]` bracket or `Epic:` colon title tag (e.g. "[Epic] …" / "Epic: …"), not just an `epic` label or a "(epic)" suffix — mirrors the perpetualWork detector so a `[Epic]`-titled issue with no `epic` label stops re-spawning a claim agent that always skips it (perpetual drain now converges/parks). v5: per-kind reviewer bullets name `grok` alongside `claude`/`codex`/`antigravity` as a local-CLI reviewer (grok is now a selectable Review Loop reviewer). v4: Phase 5 chooses the issue trailer deliberately (Closes for a full ship, Refs + a `## Remaining` section for a partial one) and Phase 7 reconciles the issue with the partial-ship hybrid — close + file a scoped follow-up when the remainder is separable, else comment "done/remaining" + release the `in-progress` claim — so a partial ship is never left OPEN + `in-progress` (a zombie the claim queue skips forever). v3: Phase 3 tags an ambiguous/too-large issue `needs-input` (not just a comment) so it's excluded from future autonomous claims — required for `perpetual` (drain-until-done) mode to converge instead of re-picking the same un-actionable issue. v2: stop treating the bare `plan` label as a skip — `plan` is the claimable-queue label (do-replan --issues labels every migrated backlog item `plan`), so v1's exclusion emptied the whole actionable queue; now skip only true epics (`epic` label or "(epic)" title)
'claim-issue-gitlab': 28, // v28: an optional reviewer (~opt) failure/timeout/provider error never sets review-blocked and does not prevent merge. v27: a review that could not return a verdict is reported in the run summary only — no PR/MR comment announcing that the review was unavailable or inconclusive. v26: prefixed labels are spelled with the forge separator — GitLab gets its scoped `::` (`model::heavy`), GitHub keeps `:` — matching slashdo v3.39.0. v25: the claim worktree directory is namespaced per managed app (`claim-{appSlug}-…`) — see `appWorktreeSlug` in server/lib/worktreeOwnership.js for why a work-item-only name collided under the one shared worktrees root. v24: render the selected author mode in the candidate-list script. // Shared mandatory issue-label contract and restricted contributor invitations. v22: GitLab issue/MR content and reviewer diffs are explicitly untrusted public data that cannot request commands, dependency installs, link navigation, or disclosure of local/private state. v21: required local-review execution failures (including quota/provider exhaustion, timeout, transport, malformed/empty, or no-verdict results) record `review-blocked`, still publish the MR, and leave it open with a pending-review note; substantive findings and publication failures still block. // v20: mirrors claim-issue v22 — Phase 2 releases `good first issue` / `help wanted` (one best-effort `--unlabel` per label) alongside the assignee + `in-progress` markers. v19: mirrors claim-issue v21 — Phase 1b decomposes an undecomposed epic into per-slice issues (`Part of #<epic>`, `decomposed` marker label on the parent) and claims the first slice, and the too-large branch splits rather than parking. v18: explicit issue-page claims ignore existing assignees; auto-pick resolves the authenticated login so self-assigned issues remain retryable; open continuation handoffs clear in-progress and all assignees. v17: mirrors claim-issue v17 — the repo-conventions file is named `AGENTS.md` (or `CLAUDE.md`) (#4852). v16: the Phase 1 and Phase 6 glab recipes use `--output json` instead of `-F json`. On `glab issue list`, `-F` is `--output-format` (details|ids|urls) — a DIFFERENT flag from `--output` (text|json) — so that spelling was accepted, ignored, and answered with the human table at exit 0; an agent piping that to `jq` got nothing and could not distinguish it from "no issues". `--output json` is correct on every glab subcommand, so the mr recipes are normalized to the same spelling in this bump. v15: mirrors claim-issue v16 — Phase 1 step 4's blocking-label check is now the `{issueExcludeLabels}` placeholder. v14: mirrors claim-issue v15 — Phase 5 runs the LOCAL reviewers against the branch diff before any MR exists, Phase 6 opens the MR and satisfies the MR-SIDE reviewers + pipeline before merging. v12: follow-up issue recipes choose independent slashdo dispatch hints (`model:`/`effort:`) and contributor labels (`good first issue`/`help wanted`) instead of only `plan`. v11: claim worktree creation passes `--no-track`, so a branch based on the default-branch remote ref does not inherit it as an upstream; the later `git push -u` sets the intended branch upstream. v10: mirrors claim-issue v11 — every Phase-3 release converges (close the already-fixed/superseded issue, tag the stale-reference one `needs-input`) so the perpetual drain stops re-picking it. v9: mirrors claim-issue v10 — Phase 5's changelog step defers to the repo's documented convention (per-branch fragments) rather than prescribing a `.changelog/NEXT.md` append. v8: reviewer bullets name the antigravity reviewer's actual PATH binary (`agy`) — mirrors plan-task v12. The same bump adds the missing-binary guard: a reviewer whose CLI is not on PATH is UNSATISFIED, never a clean review the agent substitutes its own self-review for. v7: worktree is created under PortOS's shared worktrees dir (`{worktreesRoot}` → data/cos/worktrees) instead of a repo-relative `data/cos/worktrees/` path, so the agent's checkout no longer lands inside the managed app's working tree (mirrors claim-issue v8). v6: mirrors claim-issue v7 — Phase 3 decides an *ambiguous* issue (record the chosen reading in an issue note, ship) instead of parking it to `needs-input`, which is reserved for destructive/irreversible or genuinely-human-gated (hardware/credentials) cases. v5: mirrors claim-issue v6 — Phase 1 epic skip also recognizes a leading `[epic]` bracket or `Epic:` colon title tag (e.g. "[Epic] …" / "Epic: …"), not just an `epic` label or a "(epic)" suffix, so the GitLab detector/agent converge on epic-titled issues too. v4: per-kind reviewer bullets name `grok` alongside `claude`/`codex`/`antigravity` as a local-CLI reviewer (grok is now a selectable Review Loop reviewer). v3: mirrors claim-issue v4 — Phase 5 chooses Closes-vs-Refs deliberately and Phase 7 reconciles the issue with the partial-ship hybrid (close + scoped follow-up when separable, else "done/remaining" note + release the `in-progress` claim) so a partial ship is never stranded. v2: Phase 3 tags an ambiguous/too-large issue `needs-input` (mirrors claim-issue v3) so it's excluded from future autonomous claims — required for `perpetual` (drain-until-done) mode to converge. v1: GitLab sibling of claim-issue — same 7-phase /claim --issues flow over `glab` issues + merge requests. Reached via the claim-work router when an app's resolved workTracker is 'gitlab'.
'claim-issue-jira': 19, // v19: an optional reviewer (~opt) failure/timeout/provider error never sets review-blocked and does not prevent merge. v18: a review that could not return a verdict is reported in the run summary only — no PR/MR comment announcing that the review was unavailable or inconclusive. v17: the claim worktree directory is namespaced per managed app (`claim-{appSlug}-…`) — see `appWorktreeSlug` in server/lib/worktreeOwnership.js for why a work-item-only name collided under the one shared worktrees root. v16: required local-review execution failures (including quota/provider exhaustion, timeout, transport, malformed/empty, or no-verdict results) record `review-blocked`, still publish the MR/PR, and leave it open with a pending-review note; substantive findings and publication failures still block. // v15: mirrors claim-issue v21 / claim-issue-gitlab v19 — an epic is no longer a dead end. Phase 1 treats an UNdecomposed epic as eligible (last-resort, after every atomic ticket) and routes it to the new Phase 1b, which reuses an existing child split or files one (2–8 independently shippable slices, each assigned to the caller and dropped into the active sprint so the NEXT run can actually see them), rewrites the epic's description with a `## Decomposed into` checklist, stamps the `decomposed` label, and claims the first slice. Phase 3's too-large branch splits instead of parking. This became possible when #5042 taught the JIRA reads to carry the data: getIssue now projects labels/description/epic link, fetchMyCurrentSprintTickets returns labels, and a new getEpicChildren finds an epic's children (a failed lookup throws rather than reading as "no children"). v14: Phase 1 states WHY this flow leaves an epic for a human while claim-issue v21 / claim-issue-gitlab v19 now decompose one — the JIRA reads PortOS exposes (jira.js#getIssue, #fetchMyCurrentSprintTickets) return neither a ticket's labels nor its epic links, so an agent here can see no decomposition marker and cannot find an epic's existing children. Doc-only; the flow is unchanged, and porting Phase 1b here is tracked in #5042. v13: mirrors claim-issue v17 — the repo-conventions file is named `AGENTS.md` (or `CLAUDE.md`) (#4852). v12: mirrors claim-issue v15 in the JIRA flow — Phase 5 runs the LOCAL reviewers against the branch diff before the MR/PR is opened (and before the In Review transition), Phase 6 keeps only the PR-side reviewers plus the worktree cleanup. v10: follow-up tickets receive equivalent hyphenated dispatch (`model-*`/`effort-*`) and contributor (`good-first-issue`/`help-wanted`) labels when independently justified. v9: claim worktree creation passes `--no-track`, so a branch based on the default-branch remote ref does not inherit it as an upstream; the later `git push -u` sets the intended branch upstream. v8: mirrors claim-issue v11 in JIRA's status vocabulary — an already-fixed/superseded ticket transitions to Done/Closed and a stale-reference ticket parks on a Blocked/On Hold status behind a Review Hub todo, instead of transitioning back to a not-started status that Phase 1 immediately re-picks. v7: mirrors claim-issue v10 — Phase 5's changelog step defers to the repo's documented convention (per-branch fragments) rather than prescribing a `.changelog/NEXT.md` append. v6: reviewer bullets name the antigravity reviewer's actual PATH binary (`agy`) — mirrors plan-task v12. The same bump adds the missing-binary guard: a reviewer whose CLI is not on PATH is UNSATISFIED, never a clean review the agent substitutes its own self-review for. v5: worktree is created under PortOS's shared worktrees dir (`{worktreesRoot}` → data/cos/worktrees) instead of `{repoPath}/data/cos/worktrees/`, so the agent's checkout no longer lands inside the managed app's working tree (mirrors claim-issue v8). v4: mirrors claim-issue v7 — Phase 3 decides an *ambiguous* ticket (record the chosen reading in a ticket comment, ship) instead of parking it to a "Needs clarification" Review Hub todo, and Phase 1 no longer skips a merely-underspecified ticket; the todo is reserved for destructive/irreversible or genuinely-human-gated cases. v3: per-kind reviewer bullets name `grok` alongside `claude`/`codex`/`antigravity` as a local-CLI reviewer (grok is now a selectable Review Loop reviewer). v2: Phase 5 records remaining scope in the ticket (Done/Remaining comment) and files a follow-up ticket when a partial ship's remainder is separable, so remaining work isn't lost when a human lands the MR/PR. v1: JIRA sibling of claim-issue — claim ONE ready sprint ticket, move it To Do→In Progress→In Review around a self-managed worktree + MR/PR. Reached via the claim-work router when an app's resolved workTracker is 'jira' (replaces the prior jira→jira-sprint-manager route).
'pr-reviewer': 5, // v4: model-abuse screen → tool-free eligibility gate → optional sandboxed review/actions
'code-reviewer-a': 1, // v1: 2-stage pipeline (codebase review → triage & implement)
'code-reviewer-b': 1, // v1: 2-stage pipeline (codebase review → triage & implement)
'reference-watch': 5, // v5: upstream commit list is fenced and the prompt carries a public-forge trust-boundary clause (#12491). v4: forge proposals use plain human-readable titles and tracker-defined IDs/filing scripts; PLAN.md keeps its existing checklist IDs. The prompt delegates inventory, duplicate matching, labels, and command syntax to {trackerInstructions}. v3: record proposals in the app's RESOLVED work tracker (PLAN.md / GitHub / GitLab / JIRA) via the {trackerInstructions} block — no longer hardcodes PLAN.md, so an app configured for GitHub issues gets `gh issue create` proposals. v2: append slug-tagged checklist items to PLAN.md (Adopt + Maybe) instead of writing REFERENCE_REVIEW.md; security-flagged commits get no PLAN entry (mentioned only in final summary)
'pr-watcher': 2, // v1: review-and-comment default for newly-opened PRs on the app's default branch
'branch-reconcile': 12, // v12: a merged clean checkout is removed in place and is not complete until the service returns ok:true and branchDeleted:true. v11: honor focused local validation; required hosted CI owns broad proof. v10: SUPERSEDED verdicts are retired by the deterministic backup-first reap, not held. v9: dispatch scoped completed-checkout reviews through verified archival retirement; preserve intentional holds. v8: merge ready conflict-free branches without chasing default-branch movement; rebase only for conflicts, enforced policy or evidenced integration risk. v7: align SUPERSEDED summary instruction with deterministic cleanup pass; superseded branches with worktrees are reaped rather than held by the claim idle window. v6: prefixed labels are spelled with the forge separator — GitLab gets its scoped `::` (`model::heavy`), GitHub keeps `:` — matching slashdo v3.39.0. v5: explicit Ultra capability dispatch alongside the existing three tiers.
// v4: the prompt now interpolates DISPATCH_HINT_FANOUT_GUIDANCE next to the "spawn one sub-agent per branch" instruction and tells the coordinator to dispatch each sub-agent at ITS OWN branch's recommended model/effort — the same per-issue routing the claim swarm's Phase B already does, applied here because branch-reconcile fans out over issue-derived branches too (#6373). v3: SUPERSEDED is a first-class outcome — a branch whose problem the default branch already solved a different way is reported and left untouched, never merged (merging it undoes shipped work). A resolvable conflict is explicitly NOT evidence the work is still wanted, and every branch is rebased + test-verified before it reaches a PR. v2: a branch whose "Do:" line ends in a merge isn't finished until it IS merged — the sub-agent waits CI out in-session instead of handing back a green-but-open PR, and the old blanket "never merge unreviewed work" rule (which vetoed the per-branch merge instruction) is replaced by the explicit CI-green + MERGEABLE + review gate. v1: per-app coordinator that finishes in-flight LOCAL branches (open PR / resolve conflicts / drive review / auto-merge) after the deterministic merged-branch cleanup pass. Peer-safe (local refs only). Replaced the PortOS-only branchReconcileScheduler.
'issue-reconcile': 9, // v9: API calls target the {portosApiUrl} placeholder expanded at spawn (loopback mirror on HTTPS installs), not the load-time advertised origin (#12405). v8: whole label-create commands instead of a `name hex` list (#9056). v7: prefixed labels are spelled with the forge separator — GitLab gets its scoped `::` (`model::heavy`), GitHub keeps `:` — matching slashdo v3.39.0. Shared mandatory issue-label contract and restricted contributor invitations. v4: follow-up recipes apply independent slashdo dispatch hints and contributor labels (`good first issue`/`help wanted`, Jira hyphenated equivalents) instead of only `plan`. v3: adds a JIRA arm — status-based zombies (a ticket left In Review with remaining scope + no live claim; JIRA has no `in-progress` label) detected via the PortOS JIRA API and healed through ticket transitions + `POST tickets`, routed in via the app's resolved workTracker ('jira') rather than the git host. v2: forge-aware — the scan + coordinator now cover GitLab (`glab` issues + MRs) as well as GitHub, resolved from the app's origin host; every heal command is shown as gh/glab and the injected header names the forge. v1: per-app coordinator that heals ZOMBIE issues (open + in-progress but their PR merged with no live claim) after the deterministic gh/git scan. Applies the partial-ship hybrid — close + file a scoped follow-up when the remainder is separable, else comment "done/remaining" + release the claim so the queue re-picks it.
'refresh-local-llm-catalog': 4, // v4: follows the current no-per-branch-changelog contract and relies on a release-note-quality commit subject. v3: catalog maintenance now preserves the primary-lane + cross-lane recommendation taxonomy and reserves featured treatment for a deliberate first choice. v2: PortOS-only task, so it names the retired fragment command directly. v1: research current local models, refresh LOCAL_LLM_CATALOG + EDITORIAL_FAMILY_RANK, PR (PortOS repo only)
'user-action-review': 3, // v3: API call targets {portosApiUrl}, expanded at spawn to the loopback origin (#12405). v2: leftover-branch idle detector interpolates via {userActionDetectors}; empty-ledger skip is waived when detector findings exist; leftover findings are propose-only (never reconcile / Run Now). v1: install-wide review of the operator-action ledger (#5595) — query the last 7 days, group repetition by type + target, propose 1–5 automations delivered per {userActionDelivery} (tracker issues by default, queued CoS tasks when the operator flips fileIssues off); never mutates settings or schedule types, summarizes CoS prompts instead of pasting them, exits immediately on an empty log.
'media-render-research': 1, // v1: research local Apple Silicon image/video models, runtimes and settings against the shipped stack; file up to five ready-to-work tracker items.
'plan-feature': 6, // v6: forge issues use plain human-readable titles and tracker-defined IDs; filing syntax/identity comes from {trackerInstructions}. v5: absent optional preload sections explicitly fall back to normal inventory/source reads. v4: truncated/unreadable preloads explicitly allow a direct source read. v3: consumes programmatically preloaded PRD/GOALS/open-issue/open-PR/closed-unmerged-PR snapshots and explicitly avoids re-fetching them. v2: PRD.md is the primary product/evaluation source, GOALS.md supplements or falls back, and repository documentation is the best-effort fallback when neither exists. v1: net-new planning-only sibling of feature-ideas.
// Basic self-improvement tasks — versioned so installs created before the
// Jan→Feb 2026 genericization (which still have the app-name-hardcoded "PortOS"
// default persisted, sometimes mis-flagged promptCustomized) auto-upgrade to the
// current {appName} body. See the retired-hash history in
// integrity.snapshot.json + the self-heal in taskScheduleStore.js readSchedule().
'security': 6, // v6: generic trust-model pointer (AGENTS.md Security Model + ETHOS.md for PortOS) replaces the PortOS-specific authority paragraph, adds the one-finding-per-class rule, and drops the redaction sentence the mode banners own (#12081, #12080). v5: distinguish delegated authority from untrusted content and require workflow-preserving boundary fixes. v4: adds tenant/resource isolation, SSRF, and unsafe deserialization — the service and data-API defects the v3 list (written for a web app) did not name. v3: carries {modeInstructions} (the pre-v3 body had no placeholder, so its own "fix and commit" steps fought a file-issues dispatch) and defers to the project's documented threat model, requiring an attacker-or-accident story per finding instead of a generic OWASP checklist walk. Previously v2: generic {appName} body (older default hardcoded "PortOS"/"server/routes" paths)
'performance': 7, // v7: points a PortOS run at the synthetic --route audit when the live browser is unauthenticated, marking live UI load UNVERIFIED (#12998). v6: the service/data-path and UI-load sections are "Where present" (apply what exists, skip the rest silently) and the app-specific reference-data sentence is a generic hunt bullet (#12078). v5: adds required service/data-path coverage (query plans, streaming vs buffering, batch shape, pools, partition pruning, cold start), hands spend to cost-efficiency, and replaces PortOS-specific collection names with generic ones — the prompt runs against every managed app. v4: requires UI route-load, idle-network and large-collection evidence; missing measurements are explicitly unverified.
'code-quality': 6, // v6: the triage lane ranks the three focused audits to run next under a `Recommended next audits` heading and cedes unhandled boundary calls to error-handling (#12085). v5: drops the read-instruction-files and scan-then-bound restatements the mode banners and discovery contract own (#12080). v4: hands generated-artifact/hand-synced-registry/layout-coupling drift to the better-structural-drift lane and counted branching + reader cost to better-complexity / better-cognitive-load, keeping conventional maintainability defects — the split across PortOS's specialist tasks. Previously v3: inventory structural drift, duplicate sources of truth, volatile generated artifacts, and incidental-layout coupling before conventional maintainability checks. v2: generic {appName} body (older default hardcoded "PortOS")
'test-coverage': 4, // v4: files issues by default and, in implement mode, names the redundant test removed to pay for a new one in a suite over the size budget (#12087). v3: carries {modeInstructions}, ranks gaps by consequence rather than percentage, tests at the highest practical public boundary, requires naming the regression a new test uniquely catches, and hands existing-test quality to better-test-quality. Previously v2: generic {appName} body (older default hardcoded "PortOS")
'accessibility': 5, // v5: the "skip what static analysis already covers" list now also names keyboard-trap/unreachable-control and faked-semantics findings, matching Biome's `useKeyWithClickEvents`, `noNoninteractiveElementToInteractiveRole`, `useFocusableInteractive`, and `noAriaHiddenOnFocusable` a11y rules (enabled in `client/biome.jsonc` alongside the four from v4) — the live-agent budget shifts further to focus-order/live-region/contrast/zoom issues static analysis still can't establish. Previously v4: checks for an existing JSX a11y linter (Biome's a11y group, jsx-a11y) first and skips findings it already catches deterministically (missing alt/labels, invalid/unsupported ARIA), so the live-agent budget goes to keyboard/focus/live-region/contrast/zoom issues static analysis can't establish. Previously v3: carries {modeInstructions}, names who is blocked and how far they get, and prefers a native element over a custom control with patched attributes. Previously v2: generic {appName} + the app UI (older default hardcoded "PortOS" + http://localhost:5555)
'console-errors': 4, // v4: refer to framework-neutral UI lifecycle audit. v3: carries {modeInstructions}, collects real emitted output before diagnosing, groups duplicates by cause, and forbids "fixing" an error by suppressing it. Previously v2: unified `[Improvement: {appName}]` body (pre-unification defaults shipped separate self- and app-improvement bodies)
'error-handling': 4, // v4: cedes sensitive detail in an error path to privacy and partial writes to data-integrity (#12086). v3: carries {modeInstructions} and covers resilience (timeouts, retry ceilings, degraded-dependency fallback, cleanup on the error path, actionable user-facing text) while handing swallowed errors and log context to observability. Previously v2: unified `[Improvement: {appName}]` body (older default used the `[App Improvement: {appName}]` header)
'typing': 3, // v3: carries {modeInstructions}, exits cleanly on an untyped project, and targets boundary escape hatches and validator/type disagreement instead of a mechanical annotation sweep. Previously v2: unified `[Improvement: {appName}]` body (older default used the `[App Improvement: {appName}]` header)
'dependency-updates': 9, // v9: the task always runs in an isolated CoS worktree (schedule default `useWorktree: true`, locked) — the body no longer describes the live checkout as the usual cwd; an already-current repo exits with an empty branch as a success (`noChangeSuccess`); and Phase 1 recognizes a maintainer-admission CI hold on a bot PR (`held for maintainer review`) as a re-run after diff inspection, never a FIX-THEN-MERGE push. v8: installs and validation run through scripts/contained-run.js (Docker containment) when it is ready, and the summary says when they ran uncontained. v7: dependency-update worktrees keep package-manager writes out of the source checkout's shared node_modules. v6: the throwaway bot-PR worktree is `dep-{appSlug}-pr-<n>` — the app NAME alone did not isolate two managed apps sharing a name, and {appSlug} is rendered server-side rather than slugified by the agent (`appWorktreeSlug`, server/lib/worktreeOwnership.js). v5: inventory all Dependabot alerts and ecosystems, verify actual upstream fixes, and track unpatched mitigations separately from alert closure. v4: the Phase 1 GitLab MR listing gains `--output json` — without it glab answers with the human table, which carries the head branch but NOT the author, while the classification right below it reads both. The same bump drops `--state` from the MR-list recipes — that flag does not exist (MR state is selected by presence flags `--merged`/`--closed`/`--all`, and OPEN is the default), so `--state opened` exited 1 with `Unknown flag: --state` and Phase 1 skipped its bot-PR triage entirely on GitLab repos. v3: Phase 1 triages open Dependabot/Renovate PRs first (evidence → MERGE / FIX-THEN-MERGE / CLOSE / LEAVE, including conflict + CI-failure repair on the bot branch) before Phase 2 updates anything the bots didn't cover — an agent that bumped packages itself was duplicating and conflicting with open bot PRs. v2: generic {appName} body (older default hardcoded "PortOS")
'documentation': 9, // v9: hunts instruction files, skills, and shipped task prompts for named files/functions/flags/tools/commands absent from the tree, one finding per file (#12093). v8: drops the read-instruction-files restatement the mode banners own (#12080). v7: carries {modeInstructions} and ranks wrong documentation above missing documentation, verifying instructions against the code rather than trusting the prose. Previously v6: the changelog step names `AGENTS.md` (or `CLAUDE.md`) as the file carrying the repo's documented convention — #4852 made AGENTS.md the canonical cross-vendor agent-instructions filename, and a managed app that adopted it would otherwise be told to read a file it no longer has. v5: the changelog step defers to the convention the repo documents (some repos collect per-branch fragments in a directory so parallel agents don't conflict) instead of prescribing an append to `.changelog/NEXT.md`. v4: generic {appName} body (v1 hardcoded "PortOS"; v2/v3 retired DONE.md wording)
'ui-bugs': 4, // v4: hunts the unhappy branch of each primary action and statically provable crashes (a call to a member the imported module lacks), which no longer count as speculative; cedes stranded workflows to workflow-recovery and unfinished controls to feature-completeness. Previous version: v3: carries {modeInstructions}, exits cleanly when the interface is unreachable instead of filing from imagination, and cedes layout/a11y/UX/copy to their owners. Previously v2: generic {appName} + the app UI (older default hardcoded "PortOS" + http://localhost:5555)
'mobile-responsive': 4, // v4: owns every layout defect at viewport width ≤1024 plus touch; narrow containers on a desktop viewport stay with ux (#12084). v3: carries {modeInstructions} and requires the viewport width plus what a user cannot do there, rather than flagging any layout that merely looks different. Previously v2: generic {appName} app-UI body (older default hardcoded "PortOS" + http://localhost:5555)
'ux': 8, // v8: route rotation reads the preloaded Recent audit slices block (#12090). v7: walks routes with whatever browser automation the run has (no Playwright MCP tool names), three viewport classes instead of six exact sizes, and item 8 restricted to a narrow container on a desktop viewport — phone/tablet widths belong to mobile-responsive (#12077, #12084). v6: route selection reaches record detail/editor routes partway through their workflow with tracker-driven rotation, and adds checklist items 12 (a record page says where it stands, the next action, and how to open its output) and 13 (same page family, same shell — provable from layout config). Previous version: v5: adds checklist items 9–11 (instruction text that over-explains, duplicate controls for one action, information hidden when the current state needs it) plus a per-route action/text/state inventory; previous runs only filed what items 1–8 named and treated verbosity as aesthetic. v4: forge issues use plain human-readable titles and tracker-defined IDs; filing syntax/identity comes from {trackerInstructions}. v3: audits narrow monitors and widget containers, including clipped overflow and sidebar/zoom states.
// v2: replaces the hardcoded "Read-only on source / no branches, no PRs" paragraph with {modeInstructions} — the audit is registered as file-issues-capable, so a do-work dispatch previously got a mode banner that its own body contradicted in two places. Previously v1: walk the running UI with Playwright MCP against a 7-item named UX checklist and file ONE tracker item per finding via {trackerInstructions} — read-only on source, no branches/PRs. Mode (file-issues vs implement) is injected at dispatch via {modeInstructions} / applyAuditModeWrapper — no prompt bump required.
'data-safety': 3, // v3: cedes read-modify-write races to data-integrity (#12082). v2: generalizes beyond installs to deployments/environments/datasets and adds backup restorability, bulk/backfill safety, retention reach, and long-lived data formats; hands runtime data correctness to data-integrity. v1: data/upgrade-safety audit (migrations, schema parity, version gates). Mode injected at dispatch.
'simplify': 3, // v3: cedes file splits and responsibility boundaries to module-hygiene (#12083). v2: an unreferenced endpoint/setting/job that documentation, UI text or a plan describes is an unfinished feature for feature-completeness, not a deletion. Previous version: v1: dead-code/duplication audit. Mode injected at dispatch.
'module-hygiene': 3, // v3: slice choice reads the preloaded Recent audit slices block (#12090). v2: drops the scan-then-bound restatement the discovery contract owns (#12080). v1: evidence-led complexity, responsibility, reuse, and reusable-surface discoverability audit. Mode injected at dispatch.
'api-contract': 2, // v2: framework-neutral (RPC, GraphQL, event contracts, SDKs — not only Express routes) and adds spec drift, breaking changes to published contracts, idempotency keys, pagination bounds, and long synchronous work. v1: API/route-contract audit (validation gaps, client/server drift, status envelopes, asyncHandler). Net-new type (no retired-hash history needed). Mode injected at dispatch.
'ui-lifecycle': 3, // v3: hunts failed loads rendered as empty collections (#12094). v2: framework-neutral UI lifecycle and state correctness. v1: lifecycle/state audit limited to React effects, stale closures, unmounted setState, and derived state. Mode injected at dispatch.
'observability': 2, // v2: adds correlation across boundaries, alertable metrics for critical paths, truthful health signals, and audit trails, scaled to the project. v1: logging/observability audit (silent catches, log noise, missing error context, uninstrumented pipelines). Net-new type. Mode injected at dispatch.
'copy': 1, // v1: copy/text-clarity audit (jargon, ambiguous action verbs, dead-end errors, pluralization). Net-new type. Mode injected at dispatch.
// The `better-*` lanes are PortOS-owned specialist missions associated with
// generic slashdo `do:better` scopes through DO_BETTER_SCOPE_COVERAGE in
// lib/auditCatalog.js. Their mission-specific checks stay here; orchestration,
// mode handling, and tracker filing come from shared runtime contracts rather
// than copied command mechanics. Net-new types (no retired-hash history
// needed). Mode injected at dispatch.
'better-complexity': 2, // v2: compare repository-wide worst offenders; low churn is not an exclusion. v1: counted branching per function, ranked by churn/fan-in, with a named transformation and a behavior-preservation contract.
'better-cognitive-load': 2, // v2: audit and clean excessive code comments while preserving contracts and rationale. v1: reader cost (mixed abstraction, flag arguments, lying names, action at a distance) — explicitly NOT the size/nesting thresholds its siblings own.
'better-structural-drift': 2, // v2: hunts behaviour twins — parallel code paths for one concern where a fix landed in only one (#12092). v1: derived artifacts as a second source of truth, position-keyed records, hand-synced registries, incidental-layout coupling — carved out of code-quality v3.
'better-runtime-safety': 4, // v4: keeps in-memory check-then-act races and cedes persisted read-modify-write races to data-integrity (#12082). v3: adds cross-module contract breaks in untyped code (missing members, missing named exports, dropped wrapper arguments) with a guard-test fix. Previous version: Framework-neutral UI lifecycle overlap. Previous version: v1: latent defects (floating promises, unowned rejections, unguarded access, sentinel confusion, races, leaks) requiring a concrete failure scenario.
'better-dependency-freedom': 2, // v2: carries {depfreeMode} — the operator-chosen removal bar (default / heavy / extreme, the slashdo do:depfree modes) decides where the Acceptable line sits, and the extreme bar asks for a replacement design and parity suite with no size ceiling. v1: dependency NECESSITY (the do:depfree lens) — classify, prove usage, size the replacement. Distinct from dependency-updates, which bumps what stays.
'infrastructure': 3, // v3: drops the redaction sentence the mode banners own (#12080). v2: measured CI efficiency, risk-based stage placement and test-value evidence. v1: IaC/container/orchestration/CI audit — exposure, identity grants, secrets, pinning, runtime guardrails, state config, CI supply chain, environment drift. Net-new type. Mode injected at dispatch.
'data-integrity': 1, // v1: runtime data-correctness audit — idempotency under redelivery, partial writes, lost updates, boundary validation, schema evolution, semantic corruption, pagination, retention, transfer checks. Net-new type.
'reliability': 1, // v1: service reliability audit — shutdown draining, truthful health checks, backpressure, job leasing/checkpoints, startup fragility, mixed-version deploys. Net-new type.
'privacy': 2, // v2: drops the redaction sentence the mode banners own (#12080). v1: personal/sensitive-data audit — operational exposure, third-party minimization, API over-exposure, retention, erasure reach, real data in fixtures. Honors the project's documented sharing model. Net-new type.
'cost-efficiency': 1, // v1: metered-spend audit — repeated paid calls, unrequested provider work, retry multiplication, unbounded scans, storage growth, over-provisioning, egress. Net-new type.
'feature-completeness': 1, // v1: incomplete-feature audit — stubs and 501s reachable from the UI, permanently disabled or "coming soon" controls, UI/doc promises the code does not keep, settings nothing reads, capabilities with no entry point, events nobody hears, plans that disagree with the code, deferred work with no live tracker item. Decides finish / hide / remove. Net-new type.
'upgrade-rehearsal': 2, // v2 (#12906): Postgres round-trip in throwaway portos_rehearsal_<id>_test databases (scripts/rehearsal-scratch-db.js) — backup, restorePostgres dry run then execute into a second database, row-count and ledger parity, file-only fallback reports Postgres as uncovered; scratch roots and HOME kept short (pm2 socket path limit). v1: executed upgrade-and-restore rehearsal (#12091) — opens with the scratch-only rule (never the live data/ or real Postgres, MEMORY_BACKEND=file + NODE_ENV=test, a free port from the documented band), builds synthetic older installs from migration-test fixtures, runs the seed step and migration runner, boots to the health endpoint, restores a backup into a second scratch root and verifies its manifest; one issue per root cause. Net-new type.
'workflow-recovery': 1, // v1: workflow completion and recovery audit — inventories server in-progress states and checks each has a visible resume/cancel/reattach exit, busy refusals carry the holder id, client-orchestrated chains survive a failed follow-up step or reload, waits time out, and duplicate-preventing markers live on the server. Net-new type.
'better-dev-environment': 2, // v2: drops the redaction clause the mode banners own (#12080). v1: host impact of the development loop, measured by diffing host state around a bounded run — leaked temp files/processes/ports, writes outside the sandbox, accumulation, watcher/idle cost, suite runtime. Net-new type.
'better-test-quality': 2, // v2: adds mocks that drift from the module they replace (members/exports the real module lacks). Previous version: v1: vacuous/weak/redundant existing tests, proven with a mutation probe. Distinct from test-coverage, which owns the gaps.
'stash-cleanup': 2, // v2: the STALE/ABANDONED heuristic names `AGENTS.md` (or `CLAUDE.md`) as the policy file to check before assuming a stash contradicts current architecture (#4852). v1: triage git stash list — supersession check against main, drop superseded/stale entries, leave real unlanded work in place. Net-new type (no retired-hash history needed).
'repo-sync': 1, // v1: verify + finish the deterministic install-wide origin-sync sweep (services/repoSync.js) — resolve mid-flight merges/rebases, decide what to do with uncommitted work, land or report unpushed branches, triage the stashes it could not prove redundant. Net-new type (no retired-hash history needed).
'do-release': 21, // v21: pin a candidate at kickoff, resume its original cutoff, and limit in-flight/dependency work to evidenced candidate-gating fixes; later main merges belong to the next release. v20 history follows: v20: Step 2 recognizes a maintainer-admission CI hold on a dependency-bot PR (`held for maintainer review`) — inspect the diff and re-run the held workflow instead of pushing a "fix" onto the bot branch, which re-arms the hold. v19: API calls target {portosApiUrl}, expanded at spawn to the loopback origin (#12405). v18: the run stays with the release PR through CI, fixes red checks (including ones inherited from the dev branch) and ends only with a merged, tagged, published release — v17 agent-36fff086 opened the release PR, got one idle nudge and reported INCOMPLETE with CI still pending. v17: previously accepted rules may be retired after documented value/feasibility reassessment. v16: unresolved accepted findings block release at every severity; optional reviewer availability remains optional. v15: renamed from `release-check` — the goal is a SHIPPED release, not a readiness check. The run first finishes in-flight work no live agent owns (open PRs, lingering branches via branch-reconcile), merges dependency-bot PRs, then releases; a blocker that survives three attempts goes to a sub-agent or a queued PortOS task instead of ending the run (v14 stopped at its 10-commit bound with the release PR open), local-only flakes no longer block a green-CI release, and routine design/preference decisions are made and listed for operator review. The operator's `{releaseOptions}` toggles (finishInFlight / mergeDependencyUpdates / resolveBlockers / autoDecide) gate each step. v14: the release agent names each release from its one or two biggest user-visible wins and writes the exact first heading the GitHub workflow promotes to the release title. v13: a failing test suite or red CI is work the run must FIX (reproduce, classify regression vs. bad test vs. environmental blocker, fix the root cause, verify, commit, resume) instead of a reason to halt the release — a pre-existing failure on main stopped v12 short with the release untouched; skipping/deleting/loosening a test to force green is explicitly not a fix, and the loop is bounded (3 attempts per failure, 10 fix commits per run). v12: code review is advisory and only CI gates release progress; v11: delegate release mechanics to bundled slashdo release and pin PortOS-configured reviewers. v10: the release-documentation search names the `AGENTS.md` (or `CLAUDE.md`) context instead of CLAUDE.md alone (#4852). v9: Step 1 reconciles missing GitHub Releases against git release tags (publishing any missing tag with .changelog/vX.Y.Z.md as body and --latest=false when a newer version exists) BEFORE evaluating if enough unreleased work has accumulated; v8: database-backed release tests are provisioned and run using the repo's documented isolated test database before the release PR gate; v7: Step 1 also reads the UNCOLLECTED changelog fragments (the fragment dir, plus whatever preview command that repo documents — release-check is a generic {appName} prompt, so it never names a PortOS script to run) and counts substantive entries across the assembled notes — reading only the staged `.changelog/NEXT.md` under-counts a release whose entries are still per-branch fragments, so a ready release reported as "not enough work". v6: generic {appName} body (older defaults hardcoded "PortOS")
// A SCHEDULE task type absent from this map is silently exempt from
// auto-upgrade forever: taskScheduleStore's upgrade block is gated on
// `PROMPT_VERSIONS[taskType] && …`, so a body change ships and no install
// ever receives it. console-errors, error-handling and typing were frozen
// that way for months. Every PERSISTED prompt therefore carries an entry, v1
// meaning "shipped once, never revised" — taskPromptDefaults.test.js enforces
// the parity against an explicit allowlist, so the next new prompt has to
// justify itself to stay unversioned. (Pipeline STAGE bodies are on that
// allowlist: they are read live from the catalog and never persisted, so an
// edit reaches every install on the next dispatch.)
'jira-sprint-manager': 1,
'jira-status-report': 2, // v2: API call targets {portosApiUrl}, expanded at spawn to the loopback origin (#12405).
};
// Claim prompts enforce host-control security eligibility before any claim or handoff.
// Dependency reconciliation requires positive completion evidence and preserves manual blockers.
// v35 (claim-issue): Phase 2 tells the agent not to delegate the claim to the bundled
// slashdo /do:next skill — its next/issue-<num> branch and sibling worktree convention
// differ from this flow's claim/issue-<num>, which is what made a /do:next-created PR
// invisible to the watchdog's live-claim check (#8161; server/lib/planIds.js).
// v36 (claim-issue) / v32 (gitlab) / v21 (jira): Phase 2 links the source checkout's
// node_modules into the new claim worktree via {portosRoot}/scripts/link-worktree-deps.js,
// so the agent can run tests there without installing (#9052).
// v37 (claim-issue) / v33 (gitlab): the shared dispatch-label contract renders whole
// `gh label create <name> --color <hex>` commands instead of a `name hex` list, which
// agents copied verbatim into malformed label names (#9056).
// Code review isolation is a preference; supported headless reviewers remain usable.
// v39 (claim-issue) / v35 (gitlab) / v22 (jira): an optional reviewer (~opt) failure/timeout/provider error never sets review-blocked and does not prevent merge.
// Revalidate current need and project alignment before claims, contributor handoff or epic splits.
// Guard each merge attempt and stop on uncertain readback (#12273).
// Epic decomposition reads only the owner's own comments, never the public
// thread, resolving the account itself so a pinned epic still finds them.
// A forge reviewer (`@login`) may be a person: wait up to 4 hours per round and iterate with them.
PROMPT_VERSIONS['claim-issue'] = 49; // v49: a merged clean checkout is removed in place; do not copy it into an archive. v48: fresh claims reject same-login assignment and PR body/commit evidence.
PROMPT_VERSIONS['claim-issue-gitlab'] = 43; // v43: a merged clean checkout is removed in place; do not copy it into an archive. v42: same-login assignment is not run ownership; inspect MR closing trailers.
// Accepted review findings require resolution regardless of severity.
PROMPT_VERSIONS['claim-issue-jira'] = 27; // v25: API calls target {portosApiUrl}, expanded at spawn to the loopback origin (#12405).
// Audit anchor for reference-watch's read/write coupling.
// The reference-watch schedule default (`taskMetadata.readOnly` in DEFAULT_TASK_INTERVALS)
// is derived from what the active prompt VERSION does: v4's prompt records proposals in the
// app's resolved work tracker — the PLAN.md path appends + commits `[ref-watch-…]` items, and
// the forge paths (GitHub/GitLab) shell out to `gh`/`glab issue create`. Both need a writable
// agent (a read-only agent gets the "do not modify or commit files" guard and refuses), so the
// default stays `readOnly: false`. A future version that returns to a propose-only flow would
// need `readOnly: true` again. `REFERENCE_WATCH_AUDITED_VERSION` records the
// PROMPT_VERSIONS['reference-watch'] value the current `readOnly` default was last audited
// against. A guard test in taskSchedule.test.js fails when PROMPT_VERSIONS['reference-watch']
// moves past this anchor — forcing whoever bumps the prompt to re-confirm the default still
// matches the prompt's behavior and then advance this anchor in the same change. See issue #734.
// Re-audited at v5: the prompt still files proposals via PLAN.md commits or gh/glab, so readOnly stays false.
export const REFERENCE_WATCH_AUDITED_VERSION = 5;
// Guard generated GitHub merges with fresh state/head/admission and confirmed readback (#12273).
PROMPT_VERSIONS['plan-task'] = 26; // v26: a merged clean checkout is removed in place; do not copy it into an archive.
// A still-owned checkout hands off to exact, durable completion recovery.
PROMPT_VERSIONS['plan-task-claim'] = 2; // v2: a merged clean checkout is removed in place; do not copy it into an archive.
PROMPT_VERSIONS['branch-cleanup'] = 2; // v2: a merged clean checkout is removed in place; do not copy it into an archive.