/bytedesk-goals:run_goals [docs/goals/<theme>.plan.json | <goal.md>]from bytedesk-goals
Execute goal batches through run-goals — validate manifests, then drain the plan sequentially inline via /goal handoffs (exit 2 until each goal completes). Orchestrates docs/goals/*.plan.json with land-gated dependsOn, proof gate (update_goal or record/proof), and integration gate for parallel subagent batches; never implements goal docs inline. Syncs Jira via bytedesk-jira-task when goals carry jiraTaskKey. Use for "run goals", "/run_goals", "execute the plan", a .plan.json manifest, or a single goal doc.
Ships in bytedesk-goals. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Execute a batch of goals planned by [[plan_goal]]. Each goal is a self-contained
doc at docs/goals/<name>.md carrying its own verifiable success criteria;
this skill orchestrates running them in the right order and reports PASS/FAIL.
docs/goals/<theme>.plan.json (preferred — see schema below), ordocs/goals/<name>.md — MUST execute through /goal
via run-goals run-one (emits inline handoff); skip the manifest
orchestration below but not the Goal Execution Contract.run_goals orchestrates — it does not implement goal docs inline.
Before marking any goal PASS:
run-goals validate docs/goals/<theme>.plan.json/goal inline — the mechanical executor always
emits a handoff (exit 2) and halts until you invoke the printed prompt:
run-goals run-one --id <goal-id> --doc <doc-path>run-goals run-manifest <manifest.plan.json>
→ invoke /goal from the JSON prompt → on PASS run the printed continueAfter.command
(adds --completed <id> for each finished goal until manifest exits 0).update_goal(completed: true) with per-criterion evidence (primary), orrun-goals record --id <goal-id> then
proof --id exits 0.scripts/dev/workflow.mjs land feature/<goal-id>
before the next goal whose deps require merged code.FORBIDDEN: summarizing a goal doc and implementing from memory without step 2. FORBIDDEN: marking PASS from tests/PR alone without the proof gate in step 3.
run-goals)| Verb | Purpose |
|---|---|
validate <manifest> | DAG + doc existence check |
run-one --id --doc | Emit inline /goal handoff for one goal (exit 2) |
run-manifest <manifest> [--completed id,id] | Next sequential handoff, or exit 0 when done |
status --id | Inline completion sentinel status |
proof --id | Exit 0 only when sentinel says succeeded |
record --id [--exit-code N] | Write completion sentinel after inline /goal |
handoff --id --doc | Alias for run-one |
Manifest loop (preferred):
run-goals validate docs/goals/<theme>.plan.json
run-goals run-manifest docs/goals/<theme>.plan.json
# exit 2 → invoke printed /goal prompt → land → re-run continueAfter.command
# exit 0 → manifest complete
If /goal is unavailable as a slash command, read and follow the [[goal]] skill
verbatim (update_goal loop). That is /goal — not a license to skip it.
docs/goals/<theme>.plan.json){
"plan": "proactive-goal-engine", // theme slug
"created": "2026-05-22",
"jiraEpicKey": "BDP-947", // optional; set by /plan_epic. Epic this plan delivers.
"integration": { // optional; controls autonomous landing after a parallel batch
"autoMergeTo": "develop", // omit/empty => STOP at green (default). Set => auto-merge to this branch ONLY through a green gate.
"gate": "scripts/testing/local-test.sh pr-ready" // full suite run once on the integrated result; default if omitted
},
"goals": [
{
"id": "cadence", // unique kebab id, referenced by dependsOn
"doc": "docs/goals/agent-goal-cadence.md", // self-contained goal doc (has Success criteria)
"title": "BDP-949 cadence engine",
"dependsOn": [], // ids that must LAND (merge to base) before this STARTS; this goal branches from the updated base
"mode": "sequential", // "sequential" (default) | "parallel" (opt-in worktree fan-out)
"needsHumanGate": false, // true => always in-session (forces sequential)
"touches": ["plugins/bytedesk-team-plugin"], // paths it writes; overlap => can't be in the same parallel batch
"jiraTaskKey": "BDP-949" // optional; transitions synced via bytedesk-jira-task
}
]
}
The manifest does not restate success criteria — each doc owns them. It
carries identity, ordering, execution-mode, and (optionally) Jira keys.
Mode default is sequential and that is the safe path: parallelism is opt-in
per goal, and even parallel goals never land independently — they converge at the
integration gate. needsHumanGate: true forces sequential regardless of mode.
doc path exists and is readable.dependsOn. Reject cycles and unknown ids — report and stop.dependsOn.dependsOn is a land-dependency, not a pass-dependency: a goal does not start until every dep has landed on the base branch (merged to develop, not merely PASS-in-isolation). The dependent's worktree is then created from the updated base, so it actually builds on its deps' code. This is why a dep that "passed" but isn't merged cannot unblock anything.
Execute as land-gated levels, looping until all goals are done:
dependsOn have all landed on the base (a no-dep goal is startable immediately). If the set is empty but goals remain, you're blocked on an un-landed dep — see resumability below.git -C <canonical> fetch origin develop so they branch from a base containing everything landed so far.touches overlap forces serial.Resumability: if integration.autoMergeTo is unset, a level stops at "green — PRs ready" and dependents stay blocked until you merge those PRs. run_goals is idempotent — re-invoke it (or it resumes) once the deps are on develop; it skips goals already landed (detect via the base branch containing them / Jira Done) and continues with the newly-unblocked level.
run-goals.mjs (before §2 lane selection)After §1 validation, do not implement goals yourself. Drive execution:
run-goals validate <manifest> (or confirm --doc exists for a single goal).run-goals run-manifest <manifest> — exit 2 halts with the next
inline /goal handoff; invoke it, update_goal(completed: true), optionally record --id,
then workflow.mjs land feature/<goal-id> when the doc requires it.continueAfter.command until run-manifest exits 0./goal (DEFAULT). run-goals.mjs always emits in-session handoffs.
Each goal gets a real /goal Stop-hook loop in this session — not implementation from memory.
Land before the next goal whose deps require merged code. Always used when
needsHumanGate: true, or when the goal's Constraints reserve interactive approval/deploy/merge."mode": "parallel".
Use background Agent subagents (§3) — not run-goals.mjs, which is sequential-only.
Parallel goals never land on their own — they converge at the integration gate (§4).When in doubt, sequential. Parallelism is a wall-clock optimization for vetted-independent goals, not the default.
All worktree lifecycle goes through the worktree-operator (scripts/dev/workflow.mjs, ADR-0058) — never worktree.sh, raw git worktree/git branch -D, or gh pr merge directly, and never the Agent tool's generic isolation: "worktree" (it bypasses branch conventions + shared-state symlinks). Per parallel goal:
scripts/dev/workflow.mjs new <goal-id> (the operator fetches develop first; default base origin/develop) → makes .claude/worktrees/<goal-id> on branch feature/<goal-id>, symlinked to shared state. Because dependents only start after their deps have landed (§1), the worktree already contains every dep's code. Resolve the absolute path "<canonical>/.claude/worktrees/<goal-id>".<abs worktree path> — start every command by ensuring you are in that directory; never touch the canonical checkout or another goal's worktree." Do not pass Agent isolation.feature/<goal-id> and opens its PR via scripts/dev/workflow.mjs ship --message "<BDP-N: summary>" — ship pushes + opens a PR but does NOT merge. Each goal is verified only in isolation; landing is the integration gate's job.scripts/dev/workflow.mjs cleanup <goal-id> (--force only to discard intentional scratch) — this removes the worktree and its branch and resets localDev if that worktree was the source mount.mode: "parallel" goals only)run-goals.mjs does not fan out parallel goals. For parallel-mode goals in a level,
dispatch background Agent subagents. Each handoff from run-one injects
worktree-operator grounding — subagent prompts must repeat cwd, feature/<id>, and
workflow.mjs verbs; agents must not implement from canonical develop/main.
Each parallel subagent prompt MUST:
Read the [[goal]] skill. Treat the goal doc as a
/goalobjective. Self-verify every Success criterion with command evidence. Runrun-goals proof --id <id>before reporting PASS (or write equivalent sentinel).shipbut do notland.
RESULT: PASS alone is insufficient without proof --id succeeding.
Parallel goals are each verified only in isolation; merging them is the only point where their combination is tested. touches (path overlap) catches obvious file collisions but not semantic ones (two migrations, two version bumps, two consumer registrations, lockfile churn). So "all worktrees complete" is not sufficient to land — the gate is. Once every parallel goal in the batch is PASS (branches pushed, PRs open):
agent-concurrency-plan --agents <N> --repo platform
If the plan says chunked, split the batch. When agents fail with
rate-limit/quota noise, re-dispatch once with failure context; repeated
failures move to the in-session lane.scripts/dev/workflow.mjs new <plan>-integration.cd into it and merge each PASSED branch one at a time (git merge --no-ff feature/<goal-id>). A non-trivial conflict is a real integration problem the isolated runs couldn't see — abort the merge, STOP, surface it; nothing lands.integration.gate (default scripts/testing/local-test.sh pr-ready) on the integrated result. This is the only run that proves the goals work together.integration.autoMergeTo:
"develop") AND gate green: auto-land. Merge each PASSED branch in listed order via the operator: scripts/dev/workflow.mjs land feature/<goal-id> [feature/...] (the explicit merge step); because the gate already proved the combination, these apply cleanly — if land reports a conflict, STOP. land also advances the develop-remote localDev mirror to the merged code (best-effort roll; pass --no-roll to skip the pod restart). Then confirm the target branch contains every merge. PRs stay the audit trail; Jira tasks transition to Done (§6) on land.scripts/dev/workflow.mjs cleanup <name>, which also removes the branch), per § Worktree isolation step 4.Integration-branch exception: if the integration branch itself contains
merge commits with conflict resolutions, do not run workflow.mjs ship,
workflow.mjs land, or git rebase on that branch. Invoke
bytedesk-integration-branch-operator, push the integration branch as-is, merge
the PR with a merge commit, then run sync-develop-runtime, reset-localdev,
and cleanup. This preserves resolutions that a rebase would replay.
Hard rules: the gate (steps 1–3) is mandatory before any parallel land and cannot be skipped by autoMergeTo; autoMergeTo only authorizes the green outcome to merge without a human. Sequential goals never enter this gate — each already integrated against live develop before the next began.
run-goals.mjs proof --id exit 0, or update_goal(completed: true) for in-session).RESULT: PASS is a claim. Spot-check the load-bearing evidence (run the doc's verification command, confirm the artifact) before accepting it.jiraTaskKey)Delegate all Jira writes to the [[bytedesk-jira-task]] skill — do not hand-roll a second Jira client.
PR #N ready for review); leave In Progress — do not mark Done at PASS.blocked label if dependents are stuck).jiraEpicKey is set, move the Epic Done only when all child tasks are Done (per project-management rules).End with a compact summary:
At the end of each land-gated level, before compaction, interruption, or final reply, emit a continuation pack that a fresh session can execute without reconstructing the whole transcript:
## Continuation Pack
Plan: docs/goals/<theme>.plan.json
Base proof: <origin/develop sha or target branch sha>
Completed and landed: <goal id -> PR/commit/Jira>
Completed but not landed: <goal id -> PR/status/blocker>
Current worktrees: <path -> branch -> dirty/clean>
localDev mapping: <develop-remote or worktree path>
Runtime state: <services rolled, Omnigent/plugin state if relevant>
Next task: <single concrete command or goal id>
Known blockers: <only real blockers, with evidence>
Residual follow-ups: <non-blocking items intentionally deferred>
For workflow epics, also include: current Office /sources count, Omnigent
plugin/runtime freshness, gateway health, and whether browser smoke has proven
the changed UI. This pack is not a substitute for verification; it is the
minimum state transfer needed for the next agent to continue correctly.
You may set a single session goal of "all manifest goals PASS or definitively blocked" so the run continues until the whole batch resolves. Do not set a separate Stop-hook per goal — the orchestrator is the loop.
"mode": "parallel". Parallelism buys wall-clock time at the cost of fidelity (subagents lose the Stop-hook) and integration risk — use it only for vetted-independent goals.touches is necessary, not sufficient. It prevents obvious file collisions; the integration gate catches semantic conflicts. Default to serial when unsure.scripts/dev/workflow.mjs (new/ship/land/cleanup; one worktree per parallel goal, always cleaned up). Never call worktree.sh, raw git worktree/git branch -D, or gh pr merge for managed worktrees, and do not use the Agent tool's generic isolation: "worktree" — see .claude/rules/worktree-lifecycle.md.doc is missing, stop and report — do not guess the plan.What SKILL.md sets; muted values are Claude Code's defaults
7 skills in this plugin
/bytedesk-confluenceByteDesk Confluence knowledge operations. Use this skill for any interaction with the ByteDesk Platform Confluence space — searching for existing docs, creating new pages, linking pages to Jira tickets, and retrieving operational runbooks or architecture notes before making decisions. Invoke when the user says "search confluence", "find docs", "create confluence page", "document this in confluence", "link to jira", "check the docs", "write runbook", "what does confluence say about", or when making a decision that depends on project context not in the codebase./bytedesk-jira-taskFull Jira task lifecycle manager for the ByteDesk Platform (BDP) project. Use this skill whenever you need to create, update, transition, or link Jira issues in the BDP project — including creating tasks before coding, moving items to In Progress, adding progress comments, linking child tasks to parent Epics, and transitioning to Done after merging. Invoke proactively whenever work begins, scope changes, or code lands. Also use when the user says "create jira", "start a task", "mark done", "open a ticket", "update jira", "transition to in progress", or any similar phrase.Other plugins' skills for the same job
/bytedesk-skill-syncKeep Codex/Grok skill state (.agents/skills) in parity with the canonical Claude skills (.claude/skills). Use when a skill was edited under .claude/skills and Codex/Grok need the update, when "sync skills to .agents", "skill parity", "port the skill to codex/grok", "update agents skills", or after landing any change to a skill the agents also use. Reports drift (--check) or mirrors it (--apply). Root docs (CLAUDE.md/AGENTS.md) are report-only because AGENTS.md carries intentional Codex/Grok divergences.npx claudepluginhub bytedeskai/bytedesk-marketplace --plugin bytedesk-goals