Skip to content

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

feat: delegate release checks to configured reviewers

[._.]/ Adam Eivy9e1f1a4a88b3
diff --git a/scripts/migrations/297-release-check-slashdo-review-prompt.js b/scripts/migrations/297-release-check-slashdo-review-prompt.js
new file mode 100644
index 0000000000..c958a339c1
--- /dev/null
+++ b/scripts/migrations/297-release-check-slashdo-review-prompt.js
@@ -0,0 +1,53 @@
+/**
+ * Upgrade the scheduled release-check prompt to the slashdo-backed v11 flow.
+ *
+ * Existing installs persist task prompts under data/cos/task-schedule.json (and
+ * older installs may still use data/task-schedule.json). The prompt-version
+ * loader handles this on read, but the explicit migration updates both files at
+ * install time so the stored schedule and the runtime default converge together.
+ * Customized prompts remain untouched.
+ */
+
+import { readFile, writeFile } from 'fs/promises';
+import { join } from 'path';
+import { DEFAULT_TASK_PROMPTS, PROMPT_VERSIONS } from '../../server/services/taskPromptDefaults.js';
+
+const SCHEDULE_PATHS = [
+ join('data', 'cos', 'task-schedule.json'),
+ join('data', 'task-schedule.json'),
+];
+
+async function readJson(path) {
+ const raw = await readFile(path, 'utf-8').catch((err) => {
+ if (err.code === 'ENOENT') return null;
+ throw err;
+ });
+ if (raw == null) return null;
+ try {
+ return JSON.parse(raw);
+ } catch {
+ return null;
+ }
+}
+
+export default {
+ async up({ rootDir }) {
+ let updatedCount = 0;
+ for (const relPath of SCHEDULE_PATHS) {
+ const fullPath = join(rootDir, relPath);
+ const schedule = await readJson(fullPath);
+ const task = schedule?.tasks?.['release-check'];
+ if (!task) continue;
+
+ const currentVersion = task.promptVersion || 1;
+ if (task.promptCustomized || currentVersion >= PROMPT_VERSIONS['release-check']) continue;
+
+ task.prompt = DEFAULT_TASK_PROMPTS['release-check'];
+ task.promptVersion = PROMPT_VERSIONS['release-check'];
+ await writeFile(fullPath, `${JSON.stringify(schedule, null, 2)}\n`);
+ updatedCount += 1;
+ console.log(`📝 ${relPath}: upgraded release-check prompt v${currentVersion} → v${PROMPT_VERSIONS['release-check']}`);
+ }
+ return { updated: updatedCount };
+ },
+};
diff --git a/scripts/migrations/297-release-check-slashdo-review-prompt.test.js b/scripts/migrations/297-release-check-slashdo-review-prompt.test.js
new file mode 100644
index 0000000000..47531fb3a7
--- /dev/null
+++ b/scripts/migrations/297-release-check-slashdo-review-prompt.test.js
@@ -0,0 +1,61 @@
+import { describe, it, expect, beforeEach, afterEach } from 'vitest';
+import { mkdtempSync, rmSync, writeFileSync, readFileSync, mkdirSync, existsSync } from 'fs';
+import { tmpdir } from 'os';
+import { join } from 'path';
+
+import migration from './297-release-check-slashdo-review-prompt.js';
+import { DEFAULT_TASK_PROMPTS, PROMPT_VERSIONS } from '../../server/services/taskPromptDefaults.js';
+
+const writeJson = (path, value) => writeFileSync(path, JSON.stringify(value, null, 2) + '\n');
+const readJson = (path) => JSON.parse(readFileSync(path, 'utf-8'));
+
+describe('migration 297 — upgrade release-check task prompt to the slashdo-backed reviewer flow', () => {
+ let rootDir;
+
+ beforeEach(() => {
+ rootDir = mkdtempSync(join(tmpdir(), 'migration-297-'));
+ mkdirSync(join(rootDir, 'data', 'cos'), { recursive: true });
+ });
+
+ afterEach(() => {
+ rmSync(rootDir, { recursive: true, force: true });
+ });
+
+ it('updates both supported schedule locations and leaves custom prompts alone', async () => {
+ const cosPath = join(rootDir, 'data', 'cos', 'task-schedule.json');
+ const legacyPath = join(rootDir, 'data', 'task-schedule.json');
+ writeJson(cosPath, {
+ tasks: {
+ 'release-check': { promptVersion: 10, promptCustomized: false, prompt: 'old v10' },
+ custom: { promptVersion: 10, promptCustomized: true, prompt: 'keep this' },
+ },
+ });
+ writeJson(legacyPath, {
+ tasks: {
+ 'release-check': { promptVersion: 10, promptCustomized: false, prompt: 'old v10' },
+ },
+ });
+
+ const result = await migration.up({ rootDir });
+
+ expect(result.updated).toBe(2);
+ expect(readJson(cosPath).tasks['release-check']).toEqual({
+ promptVersion: PROMPT_VERSIONS['release-check'],
+ promptCustomized: false,
+ prompt: DEFAULT_TASK_PROMPTS['release-check'],
+ });
+ expect(readJson(cosPath).tasks.custom).toEqual({
+ promptVersion: 10,
+ promptCustomized: true,
+ prompt: 'keep this',
+ });
+ expect(readJson(legacyPath).tasks['release-check'].prompt).toBe(DEFAULT_TASK_PROMPTS['release-check']);
+ });
+
+ it('does not create a schedule when neither location exists', async () => {
+ const result = await migration.up({ rootDir });
+
+ expect(result.updated).toBe(0);
+ expect(existsSync(join(rootDir, 'data', 'cos', 'task-schedule.json'))).toBe(false);
+ });
+});
diff --git a/server/services/agentPromptBuilder.test.js b/server/services/agentPromptBuilder.test.js
index 227b112337..16f7bdbd24 100644
--- a/server/services/agentPromptBuilder.test.js
+++ b/server/services/agentPromptBuilder.test.js
@@ -2608,6 +2608,23 @@ describe('buildAgentPrompt — slashdo-backed tasks', () => {
expect(prompt).toContain('/do:plan-task');
});
+ it('pins the bundled release workflow to PortOS Code Review Defaults', async () => {
+ vi.mocked(getCodeReviewDefaults).mockResolvedValueOnce({ reviewers: ['codex'] });
+ vi.mocked(loadSlashdoFile).mockResolvedValueOnce('# Release\n\nCanonical release procedure.');
+ const prompt = await buildAgentPrompt(
+ makeTask({ description: 'Run the release check', metadata: { slashdoCommand: 'release' } }),
+ {}, '/r', null, isTruthyMeta,
+ { providerType: 'cli', providerId: 'codex' });
+
+ expect(prompt).toContain('do-release');
+ expect(prompt).toContain('--review-with codex');
+ expect(prompt).toContain('Canonical release procedure.');
+ expect(vi.mocked(loadSlashdoFile)).toHaveBeenCalledWith('release', {
+ stripFrontmatter: true,
+ skipIncludes: expect.arrayContaining(['copilot-review-loop']),
+ });
+ });
+
it('uses explicit slashdoArgs when present', async () => {
const prompt = await buildAgentPrompt(
slashdoTask({ slashdoArgs: '--issues 42' }), {}, '/r', null, isTruthyMeta,
diff --git a/server/services/cosTaskGenerator.js b/server/services/cosTaskGenerator.js
index acc6fa33e4..82563b294e 100644
--- a/server/services/cosTaskGenerator.js
+++ b/server/services/cosTaskGenerator.js
@@ -1772,9 +1772,7 @@ export async function generateSelfImprovementTaskForType(taskType, state) {
const taskSchedule = await import('./taskSchedule.js');
const { getTaskPrompt } = await import('./taskPromptService.js');
const interval = await taskSchedule.getTaskInterval(taskType);
-
- // Get the effective prompt (custom or default)
- const description = await getTaskPrompt(taskType);
+ let description = await getTaskPrompt(taskType);
const metadata = {
analysisType: taskType,
@@ -1809,6 +1807,20 @@ export async function generateSelfImprovementTaskForType(taskType, state) {
const approval = await resolveConfidenceApproval(state, `self-improve:${taskType}`, `Task self-improve:${taskType}`, metadata);
stampApprovalReason(metadata, approval);
+ // Self-improvement tasks do not pass through the managed-app prompt renderer,
+ // but release-check still names the install's configured reviewers explicitly.
+ // Resolve that token here so the global/on-demand path gets the same reviewer
+ // contract and local-review procedure as an app-scoped release task.
+ if (description.includes('{reviewers}')) {
+ const codeReviewDefaults = await getCodeReviewDefaults().catch(() => null);
+ const reviewers = resolveClaimReviewerConfig(metadata, codeReviewDefaults, codeReviewDefaults?.reviewers);
+ Object.assign(metadata, reviewerConfigMetadata(reviewers));
+ description = description
+ .replace(/\{reviewers\}/g, () => reviewers.csv)
+ + appendReviewerEffortBlock(reviewers.reviewers, reviewers.reviewerEfforts, reviewers.reviewerModels)
+ + buildLocalReviewerInstructions(reviewers.reviewers, reviewers.reviewerModels, reviewers.reviewerEfforts);
+ }
+
const task = {
id: `self-improve-${taskType}-${Date.now().toString(36)}`,
status: 'pending',
diff --git a/server/services/taskPromptDefaults.test.js b/server/services/taskPromptDefaults.test.js
index e2e05298ea..46d01be93a 100644
--- a/server/services/taskPromptDefaults.test.js
+++ b/server/services/taskPromptDefaults.test.js
@@ -500,9 +500,9 @@ describe('taskPromptDefaults integrity snapshot', () => {
// release-check READS the changelog rather than writing it, so its fix is the
// mirror image: an unreleased set that lives in uncollected fragments must not
// read as "not enough work accumulated for a release".
- it('release-check v9 reconciles missing releases before evaluating readiness, preserving the v8 default', () => {
+ it('release-check v11 delegates release mechanics and configured reviews, preserving v10', () => {
const current = DEFAULT_TASK_PROMPTS['release-check'];
- expect(PROMPT_VERSIONS['release-check']).toBeGreaterThanOrEqual(9);
+ expect(PROMPT_VERSIONS['release-check']).toBeGreaterThanOrEqual(11);
expect(current).toContain('Reconcile Missing Releases');
expect(current).toContain('Unpublished release detected');
expect(current).toContain('--latest=false');
@@ -516,6 +516,11 @@ describe('taskPromptDefaults integrity snapshot', () => {
expect(current).toContain('database-backed test suite');
expect(current).toContain('test-database provisioning/setup command');
expect(current).toContain('never substitute a production database');
+ expect(current).toContain('{reviewers}');
+ expect(current).toContain('/do:release');
+ expect(current).not.toMatch(/copilot/i);
+ expect(current).not.toContain('reviewThreads');
+ expect(current).not.toContain('copilot-pull-request-reviewer');
// v8 is identified by content, not by position: later revisions append
// their own outgoing bodies after it, so `last` stops meaning v8.
@@ -525,6 +530,9 @@ describe('taskPromptDefaults integrity snapshot', () => {
);
expect(v8Candidates).toHaveLength(1);
expect(v8Candidates[0]).not.toBe(current);
+ const v10 = previous.find((prompt) => prompt.includes('copilot-pull-request-reviewer') && prompt.includes('AGENTS.md'));
+ expect(v10).toBeDefined();
+ expect(v10).not.toBe(current);
});
// refresh-local-llm-catalog is the one PortOS-ONLY prompt in this set (it
diff --git a/server/services/taskPromptDefaults/integrity.snapshot.json b/server/services/taskPromptDefaults/integrity.snapshot.json
index f1b26c6712..540a49b6d9 100644
--- a/server/services/taskPromptDefaults/integrity.snapshot.json
+++ b/server/services/taskPromptDefaults/integrity.snapshot.json
@@ -23,7 +23,7 @@
"code-reviewer-implement": "2e10cac7c1e1cd021d06bfddb5c1eaf2",
"error-handling": "9afba2e99b90a8d5771c75e7f0615d96",
"typing": "1f2758ce0bb62d789a21aec241549531",
- "release-check": "2d2a6700c23b73bf738c2aa915e37277",
+ "release-check": "64be10f6ac7bcf74d4fc257089fc179b",
"stash-cleanup": "1c12bac5aac6bb27008c40981e7db08c",
"jira-sprint-manager": "3e63c8a3bdf0d5a05a30faaa2dc07980",
"do-replan": "35660eb7b43e4259a6a9253ed288a1db",
@@ -67,7 +67,7 @@
"data-safety": 1,
"simplify": 1,
"stash-cleanup": 2,
- "release-check": 10
+ "release-check": 11
},
"REFERENCE_WATCH_AUDITED_VERSION": 3,
"PREVIOUS_DEFAULT_PROMPTS": {
@@ -201,7 +201,8 @@
"8436a47b5b1c9b2a342795e5634552da",
"746f11daaf721eae9e16845858ef55ee",
"08c928e6f79f83535e40b6988ff6eae3",
- "afa9039cfbff21d77d601dc74eb5b81f"
+ "afa9039cfbff21d77d601dc74eb5b81f",
+ "2d2a6700c23b73bf738c2aa915e37277"
],
"branch-reconcile": [
"7ef2b5f7d8f05937d4912b26ad45f42e",
diff --git a/server/services/taskPromptDefaults/previousDefaults.js b/server/services/taskPromptDefaults/previousDefaults.js
index 1938bb2fc9..20a7b8da27 100644
--- a/server/services/taskPromptDefaults/previousDefaults.js
+++ b/server/services/taskPromptDefaults/previousDefaults.js
@@ -9002,7 +9002,8 @@ Use Playwright MCP to test PortOS at different viewport sizes:
Focus on these routes: /cos, /cos/tasks, /devtools, /providers`,
],
- 'release-check': [
+ 'release-check': (() => {
+ const history = [
// prior default (pre-genericization / intermediate)
`[Improvement: {appName}] Release Check
@@ -10003,7 +10004,17 @@ Summarize:
- Key changes (from changelog)
- Number of review iterations needed
- Any unresolved issues`,
- ],
+ ];
+ // v10 only changed the agent-instructions filename. Derive it from the
+ // already preserved v9 body so the outgoing default stays byte-identical
+ // without duplicating a 7 KB template in this history file.
+ const v10 = history.at(-1).replace(
+ 'Then search for release documentation. Check your CLAUDE.md context (already provided above) for "Git Workflow", "Release", or "Changelog" sections. If the release process is not clear from CLAUDE.md, check these files in order (use whichever exist):',
+ 'Then search for release documentation. Check your AGENTS.md (or CLAUDE.md) context (already provided above) for "Git Workflow", "Release", or "Changelog" sections. If the release process is not clear from those instructions, check these files in order (use whichever exist):'
+ );
+ if (v10 === history.at(-1)) throw new Error('release-check v10 historical prompt derivation did not match v9');
+ return [...history, v10];
+ })(),
'branch-reconcile': [
// v1 default — superseded by v2, whose Rules make "merged" (not "PR opened")
// the terminal state for an auto-mergeable branch. v1's blanket "never merge
diff --git a/server/services/taskPromptDefaults/prompts.js b/server/services/taskPromptDefaults/prompts.js
index 0bdd70b681..f619d50223 100644
--- a/server/services/taskPromptDefaults/prompts.js
+++ b/server/services/taskPromptDefaults/prompts.js
@@ -1421,140 +1421,39 @@ Repository: {repoPath}
Repository: {repoPath}
-Check if {appName} has accumulated enough work for a release, following the project's own documented release process.
+This scheduled task is a thin coordinator for {appName}'s release. The bundled slashdo \`release\` workflow is the single source of truth for release mechanics. Do not duplicate its branch, version, changelog, readiness, test/build, PR, review, CI, merge, tag, or report steps here.
-## Step 0: Discover the Release Process
+## Step 0: Reconcile Missing Releases
-You need to determine these values (use angle-bracket names as placeholders in subsequent steps):
-- \`<SOURCE_BRANCH>\` — where development happens
-- \`<TARGET_BRANCH>\` — where releases go
-- Changelog format and location
-- Pre-release checks (tests, builds)
-- Push/rebase conventions
-
-First, extract \`<OWNER>\` and \`<REPO>\`:
+Before evaluating unreleased work, determine \`<OWNER>\`, \`<REPO>\`, and \`<TARGET_BRANCH>\` from the repository's AGENTS.md (or CLAUDE.md) and release documentation. If the project does not document a release flow, use the repository's default branch. Extract the GitHub project identity with:
\`\`\`bash
cd {repoPath} && gh repo view --json owner,name --jq '"OWNER=" + .owner.login + " REPO=" + .name'
\`\`\`
-Then search for release documentation. Check your AGENTS.md (or CLAUDE.md) context (already provided above) for "Git Workflow", "Release", or "Changelog" sections. If the release process is not clear from those instructions, check these files in order (use whichever exist):
-1. \`cat {repoPath}/README.md\` — look for release/deployment/workflow sections
-2. \`cat {repoPath}/.changelog/README.md\` — changelog format and release conventions
-3. \`cat {repoPath}/CONTRIBUTING.md\` — contributing/release guidelines
-4. \`ls {repoPath}/docs/\` — look for release process docs (e.g., RELEASE.md, DEPLOY.md)
-5. \`ls {repoPath}/.github/workflows/\` — infer branch flow from CI workflow triggers
-6. \`gh api repos/<OWNER>/<REPO>/branches --jq '.[].name'\` — list branches to identify the flow
-
-If no documentation specifies a release flow, fall back to: source=dev, target=main.
-
-## Step 1: Reconcile Missing Releases
-
-BEFORE evaluating unreleased work, check for existing release tags that lack a corresponding GitHub Release:
+Check for existing release tags that lack a corresponding GitHub Release:
1. \`git -C {repoPath} fetch --tags origin\`
-2. List all version tags (e.g., \`v*\`) on \`<TARGET_BRANCH>\` / \`origin\` and list published GitHub Releases:
+2. List version tags on \`<TARGET_BRANCH>\` / \`origin\` and published releases:
\`\`\`bash
gh release list --repo <OWNER>/<REPO> --limit 100
\`\`\`
-3. Compare every release tag \`vX.Y.Z\` against published GitHub Releases. If a tag \`vX.Y.Z\` exists but has no corresponding GitHub Release:
- - Report the missing release version explicitly: "Unpublished release detected: vX.Y.Z".
- - Locate the changelog body for \`vX.Y.Z\` (e.g., \`.changelog/vX.Y.Z.md\` or \`.changelog/vX.Y.x.md\`).
- - Check if a newer version tag or release exists.
- - Publish the missing release using \`gh release create "vX.Y.Z"\`:
- - Use \`.changelog/vX.Y.Z.md\` (or the assembled changelog for that version) as the release body (\`--notes-file\` or \`--body-file\`).
- - Pass \`--latest=false\` if a newer version tag or release is already published, so backfilling an old version never displaces the current Latest release. Pass \`--latest\` only if \`vX.Y.Z\` is the newest version.
-4. Report any missing releases reconciled before proceeding to Step 2.
-
-## Step 2: Evaluate Readiness
-
-Using the changelog location discovered in Step 0:
-- Read the current changelog (e.g., \`.changelog/NEXT.md\` or \`.changelog/v*.x.md\`)
-- **Also read the entries not yet folded into that file.** Repos that collect per-branch fragments (e.g. \`.changelog/next/\`, so parallel agents don't conflict on a shared file) keep unreleased entries there until the release collects them, so the staged file alone under-counts the work. Read the fragment directory directly, and if the repo's changelog README documents a preview/collect command, use that to assemble the unreleased notes in one call. Do NOT guess a command name — only run one this repo actually documents.
-- Read the current version: \`node -p "require('{repoPath}/package.json').version"\` or equivalent
-
-Count substantive entries (lines starting with "###" or "- **" under Features, Fixes, Improvements sections) across the **assembled** unreleased notes — the staged file plus any uncollected fragments. If fewer than 2 substantive entries exist, stop and report: "Not enough work accumulated for a release." Do NOT create a PR.
-
-## Step 3: Verify Clean State
-
-Run these checks on \`<SOURCE_BRANCH>\` (stop if any fail):
-1. \`git -C {repoPath} fetch origin\` and ensure \`<SOURCE_BRANCH>\` is up to date
-2. Run the project's test suite (use the command from release docs). If the
- release docs identify a separate database-backed test suite, first run the
- documented test-database provisioning/setup command, then run that database
- test command as well. Keep the database test target isolated from any real
- user database; never substitute a production database just to make tests
- pass. If setup cannot reach the documented database service, report the
- environmental blocker and stop before creating the release PR.
-3. Run the project's build (use the command from release docs)
-
-## Step 4: Create or Find PR
-
-Check for existing PR: \`gh pr list --repo <OWNER>/<REPO> --base <TARGET_BRANCH> --head <SOURCE_BRANCH> --state open --json number,url\`
-
-If a PR exists, use it. If not, create one following the project's documented release PR conventions.
-
-Capture the PR number as \`<PR_NUM>\` and URL.
-
-## Step 5: Wait for Copilot Review
-
-Copilot review is triggered automatically on push. Poll every 15 seconds until the review appears:
-\`\`\`bash
-gh api repos/<OWNER>/<REPO>/pulls/<PR_NUM>/reviews --jq '.[] | select(.user.login == "copilot-pull-request-reviewer") | .state'
-\`\`\`
-
-Wait until you see APPROVED or CHANGES_REQUESTED. Timeout after 5 minutes of polling.
-
-## Step 6: Address Feedback Loop (max 5 iterations)
+3. Compare every \`vX.Y.Z\` tag with published releases. For each missing release:
+ - Report it explicitly as "Unpublished release detected: vX.Y.Z".
+ - Find its changelog body (for example, \`.changelog/vX.Y.Z.md\` or \`.changelog/vX.Y.x.md\`).
+ - Check whether a newer version exists.
+ - Publish it with \`gh release create "vX.Y.Z"\`, using \`--notes-file\` or \`--body-file\`; pass \`--latest=false\` when a newer release exists, and \`--latest\` only for the newest version.
+4. Report missing releases reconciled before continuing.
-### 6a. Fetch unresolved review threads
+The canonical workflow owns readiness and should count both the current changelog and any uncollected per-branch fragments (for example, \`.changelog/next/\`) across the assembled notes. If the changelog README documents a preview/collect command, use only that documented command — Do NOT guess a command name. If fewer than two substantive entries remain, stop without creating a release PR.
-Use gh api graphql (JSON input to avoid shell escaping issues with GraphQL variables):
+If the release docs identify a separate database-backed test suite, the canonical workflow must first use the documented test-database provisioning/setup command and then run that suite against an isolated test database. The workflow must never substitute a production database; if the isolated setup cannot reach its documented service, report the environmental blocker and stop.
-\`\`\`bash
-echo '{"query":"query{repository(owner:\\"<OWNER>\\",name:\\"<REPO>\\"){pullRequest(number:<PR_NUM>){reviewThreads(first:100){nodes{id,isResolved,comments(first:10){nodes{body,path,line,author{login}}}}}}}}"}' | gh api graphql --input -
-\`\`\`
-
-### 6b. If no unresolved threads: skip to Step 7 (Merge).
-
-### 6c. If unresolved threads exist, evaluate each one:
-
-For each comment, read the referenced file and critically evaluate the suggestion:
-- **If the suggestion is valid and improves the code**: apply the fix
-- **If the suggestion is a false positive, overly pedantic, or would make the code worse**: do NOT change the code
-
-Either way, resolve every thread — the goal is zero unresolved threads before merge.
-
-After evaluating all threads:
-- If any code changes were made: run the project's test suite to verify, then commit and push using \`/do:push\` (or manually: stage specific files, conventional commit prefix, \`git pull --rebase && git push\`)
-
-### 6d. Resolve ALL threads via GraphQL mutation (both fixed and dismissed):
-
-For each thread, use the thread node id from 5a:
-\`\`\`bash
-echo '{"query":"mutation{resolveReviewThread(input:{threadId:\\"THREAD_NODE_ID\\"}){thread{isResolved}}}"}' | gh api graphql --input -
-\`\`\`
-
-### 6e. Wait for new Copilot review if code was pushed (repeat Step 5)
-
-If you pushed changes in 6c, the push automatically triggers a new Copilot review. Poll for it, then loop back to 6a. If no code changes were made (all threads were false positives), skip straight to Step 7.
-
-If after 5 iterations there are still unresolved threads, stop and report what remains.
-
-## Step 7: Merge
-
-Only merge when Copilot's most recent review has NO unresolved threads:
-\`\`\`bash
-gh pr merge <PR_NUM> --merge
-\`\`\`
+## Step 1: Run the canonical release workflow
-If merge fails (e.g., branch protections), try: \`gh pr merge <PR_NUM> --merge --admin\`
+The PortOS Code Review Defaults rendered into \`{reviewers}\` are authoritative for this run. Use exactly that reviewer list and no other. The task builder attaches the same list to the bundled slashdo invocation; do not invoke a bare workflow that falls back to saved slashdo defaults. PortOS-only configured reviewers still run through the Local Reviewer Procedure appended to this prompt. If the reviewer list is empty or unavailable, stop before creating or updating a release PR.
-## Step 8: Report
+Run the bundled \`/do:release\` workflow (or its equivalent \`release\` skill) exactly once, in autonomous mode with no \`--interactive\` flag. It owns release readiness, version/changelog finalization, tests/build, local review, PR creation, the configured reviewer loop, CI, merge, tagging, and the final report. If it cannot run or a configured reviewer is unavailable or inconclusive, stop and report instead of substituting another reviewer.
-Summarize:
-- Version released
-- Key changes (from changelog)
-- Number of review iterations needed
-- Any unresolved issues`,
+The release workflow is attached to this task by metadata so every provider receives the same bundled body and reviewer pin. Do not reimplement any of its phases in this scheduled prompt.`,
'stash-cleanup': `[Improvement: {appName}] Git Stash Cleanup
diff --git a/server/services/taskPromptDefaults/versions.js b/server/services/taskPromptDefaults/versions.js
index 3c349e683d..6d11dea57d 100644
--- a/server/services/taskPromptDefaults/versions.js
+++ b/server/services/taskPromptDefaults/versions.js
@@ -43,7 +43,7 @@ export const PROMPT_VERSIONS = {
'data-safety': 1, // v1: data/upgrade-safety audit (migrations, schema parity, version gates). Mode injected at dispatch.
'simplify': 1, // v1: dead-code/duplication audit. Mode injected at dispatch.
'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 PREVIOUS_DEFAULT_PROMPTS entry needed).
- 'release-check': 10, // 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")
+ 'release-check': 11, // 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")
};
// Audit anchor for reference-watch's read/write coupling.
diff --git a/server/services/taskSchedule.test.js b/server/services/taskSchedule.test.js
index 4087a13c55..3f363538c0 100644
--- a/server/services/taskSchedule.test.js
+++ b/server/services/taskSchedule.test.js
@@ -1160,6 +1160,14 @@ describe('taskSchedule', () => {
// Issues mode ships GitHub issues only — it explicitly does not touch PLAN.md.
expect(prompt).toContain('does NOT touch PLAN.md')
})
+
+ it('release-check delegates to slashdo release and has no hardcoded reviewer', async () => {
+ const prompt = await getTaskPrompt('release-check')
+ expect(prompt).toContain('/do:release')
+ expect(prompt).toContain('{reviewers}')
+ expect(prompt.toLowerCase()).not.toContain('copilot')
+ expect(prompt).not.toContain('reviewThreads')
+ })
})
// The gh/git coordinator types deliver their work as a SIDE EFFECT (a deleted
@@ -1190,7 +1198,12 @@ describe('taskSchedule', () => {
expect(meta.worktreeChangesExpected).toBe(false)
// Locked, so a per-app override can't re-attach what the defaults cleared.
// worktreeChangesExpected is managed too — see MANAGED_AGENT_OPTIONS.
- expect(MANAGED_AGENT_OPTIONS[taskType]).toEqual(['useWorktree', 'openPR', 'worktreeChangesExpected'])
+ const managed = ['useWorktree', 'openPR', 'worktreeChangesExpected']
+ if (taskType === 'release-check') {
+ managed.push('slashdoCommand')
+ expect(meta.slashdoCommand).toBe('release')
+ }
+ expect(MANAGED_AGENT_OPTIONS[taskType]).toEqual(managed)
}
)
@@ -1212,6 +1225,7 @@ describe('taskSchedule', () => {
expect(meta.useWorktree).toBe(false)
expect(meta.openPR).toBe(false)
expect(meta.worktreeChangesExpected).toBe(false)
+ if (taskType === 'release-check') expect(meta.slashdoCommand).toBe('release')
if (taskType === 'branch-reconcile') expect(meta.branchesPerAgent).toBe(3)
}
)
diff --git a/server/services/taskScheduleRegistry.js b/server/services/taskScheduleRegistry.js
index 44f13b622a..c8a5d8148b 100644
--- a/server/services/taskScheduleRegistry.js
+++ b/server/services/taskScheduleRegistry.js
@@ -103,6 +103,10 @@ export const SELF_IMPROVEMENT_TASK_TYPES = [
// A guard test in taskSchedule.test.js asserts every member of that set carries
// this posture, so a new coordinator type can't be added to one list only.
const NON_COMMITTING_COORDINATOR_METADATA = { useWorktree: false, openPR: false, worktreeChangesExpected: false };
+// Release-check delegates its release lifecycle to the bundled slashdo workflow.
+// Keep the command in managed metadata so a customized prompt or app override
+// cannot silently fall back to a second, drifting release implementation.
+const RELEASE_CHECK_METADATA = { ...NON_COMMITTING_COORDINATOR_METADATA, slashdoCommand: 'release' };
// Migration 274 removes branch-cleanup from new schedules, but a partially
// upgraded install may still load its stored task before the migration runs.
// Keep its safety posture available without making it a newly-shipped task.
@@ -251,7 +255,7 @@ export const DEFAULT_TASK_INTERVALS = {
// release PR) rather than producing source commits. It must run from the app's
// live main checkout so its branch/ref checks describe the real release flow;
// a CoS worktree hides that checkout and creates an irrelevant task branch.
- 'release-check': { type: INTERVAL_TYPES.ON_DEMAND, enabled: false, providerId: null, model: null, prompt: null, taskMetadata: { ...NON_COMMITTING_COORDINATOR_METADATA } },
+ 'release-check': { type: INTERVAL_TYPES.ON_DEMAND, enabled: false, providerId: null, model: null, prompt: null, taskMetadata: { ...RELEASE_CHECK_METADATA } },
// stash-cleanup triages `git stash list` and drops what's superseded/stale,
// leaving real unlanded work in place for the user to recover by hand. It
// runs in the app's live checkout (never a CoS worktree — a stash is a
@@ -363,7 +367,7 @@ export const MANAGED_AGENT_OPTIONS = {
// claim-work delegates to one of the above prompt bodies, each of which
// creates its own worktree + PR — so the same lock applies to the router.
'claim-work': ['useWorktree', 'openPR', 'claimFlow'],
- 'release-check': ['useWorktree', 'openPR', 'worktreeChangesExpected'],
+ 'release-check': ['useWorktree', 'openPR', 'worktreeChangesExpected', 'slashdoCommand'],
'stash-cleanup': ['useWorktree', 'openPR', 'worktreeChangesExpected']
};