Setup
Create or refresh the repo-local agent config used by the other skills. Run this
once per repo, then rerun it when the workflow may have changed or the user wants
to verify that the config is current. The output is a compact lookup table, not
a narrative doc.
Include stable values workflow agents need repeatedly: repo commands, tracker
IDs, labels, agent access, review gates, handoff shape, and safety rules.
Agents should query external systems to refresh live state, not to rediscover
these values. If a value cannot be verified during setup, record it as an
explicit unknown with the source that should verify it.
Shared workflow skills may be distributed as project skills, plugin or
marketplace, managed settings, user/global-only, or mixed mode. Record which
mode this repo actually uses. Project-scoped generated ziw-* copies are valid
when repo, remote, or cloud workers need the skills from a fresh clone; treat
them as vendored generated dependencies from zaks-io/skills, update them
mechanically, and do not hand-edit them in downstream repos.
Setup is a verification pass, not a best-effort note-taking pass. Every populated
config value that can change agent behavior must have current evidence from the
repo, tracker, code host, CI, agent integration, environment config, or explicit
user instruction. If the value is not verified, mark it inferred or move it to
Unknowns; do not present it as authoritative.
Inputs
- Repo path to configure.
- Existing repo rules, CI, package scripts, issue tracker, and deploy docs.
- Existing spec indexes, specs, glossaries, context maps, and ADR conventions.
- Any user-provided tracker, agent access, or environment constraints.
Output File
Create or update:
docs/agents/workflow/config.md
Treat this file as the repo's workflow lookup table. Keep it terse: values,
paths, commands, IDs, owners, and unknowns. Omit explanation, background, and
fields that do not apply.
Load these references when writing the config:
- references/project-config.md for the template
and required sections
- references/agent-workflow.md for role
responsibilities and adapter minimums
- references/issue-tracker-contract.md
for tracker states, labels, readiness, and issue body shape
- references/operating-profile.md for the
worker concurrency default, the issue-assigned delegation and continuation
mechanic, the repo-route precondition, and the merge-safety decision table
- references/linear-cursor-example.md for
a worked Linear + Cursor config to copy when the repo uses that stack
- references/handoff.md for cross-agent handoff shape
Refresh Existing Config
If docs/agents/workflow/config.md already exists, read it before inspecting
anything else. Use it as the baseline for refresh:
- preserve verified stable values that still match current repo and tracker
state
- re-verify every populated behavior-affecting field before leaving it
authoritative; do not preserve a stale value just because it is already in the
file
- re-run at least one read-only query against configured tracker IDs and
query-safe names before trusting a project, team, board, or roadmap mapping
- check unknowns, stale timestamps, changed commands, renamed labels, moved
projects, changed CI, changed worker delegation paths, and changed environment
rules
- replace stale slugs or display names that return empty tracker results when a
verified provider ID or canonical name resolves the same scope
- update only fields that are missing, stale, wrong, or newly verified
- do not erase explicit human decisions unless current evidence or the user
contradicts them
- report what changed, what stayed verified, and what remains unknown
Do not regenerate the config from scratch when refreshing. The job is to detect
drift from the current config, then patch the lookup table.
Verification Standard
Verify all populated workflow fields that setup writes or preserves:
- repo identity, default branch, branch prefix, package manager, lockfile, and
command names from repo files and git metadata
- install, check, build, test, lint, smoke, preview, and generated-artifact
commands from scripts, CI workflows, makefiles, justfiles, runbooks, or direct
safe command execution
- planning artifact authority, paths, status convention, and documentation
checks from spec indexes, context maps, ADR indexes, scripts, CI, or explicit
user instruction
- issue tracker provider, location, team/project/board/roadmap, statuses,
labels, priorities, estimate fields, relationships, issue templates, and query
contracts with read-only tracker tool calls when tools are available
- code host default branch, branch protections, PR conventions, linked checks,
and open PR query shape through git metadata, code host tools, or workflow
files
- worker delegation paths, environment labels or fields, continuation paths, and
remote worker delegation mechanics through tracker metadata, verified config,
or explicit user instruction
- Claude, Codex, editor, and repo-local adapter paths by resolving files,
symlinks, imports, and generated skill metadata from a clean path
- shared workflow skill distribution mode, source, lockfile, refresh command,
project paths, symlink layout, plugin marketplace, and whether generated skill
directories are committed dependencies, ignored local cache, or absent
- environment safety, deployment paths, hosted checks, preview rules, credential
rules, and production approval rules from deployment config, CI, runbooks, or
explicit user instruction
Do not run install, deploy, production mutation, expensive hosted actions, or
credentialed provider actions just to verify setup unless the user explicitly
approved that action. For those values, verify the command or path exists and
record execution as unknown or requiring approval.
Every unknown must name the missing value and the source or action that would
verify it. The final report must say whether any critical unknowns remain.
Gather
Inspect files that exist:
AGENTS.md, CLAUDE.md, editor or agent rules, and repo-local skills
- target repo's Claude Code integration config,
.claude/*, and any repo-local
agent, command, or skill directories that Claude should load
package.json, lockfiles, Makefile, Justfile, turbo config, and CI workflows
- project status, roadmap, specs, ADRs, runbooks, and existing
docs/agents/*
- existing agent label docs, such as
docs/agents/triage-labels.md
- code host branch, default branch, PR, preview, and deploy workflows
- root
.coderabbit.yaml when present, especially reviews.auto_review
- hosted review provider docs or app settings when CodeRabbit, Cursor Bugbot,
or another PR review bot is enabled
- issue tracker provider, provider location, projects or boards, statuses,
labels, issue templates, and existing issue examples by querying tracker tools
when available
- environment files, deployment config, and service inventories
Configure
Record:
- only verified stable values future workflow agents would otherwise have to
find again
- a compact verification summary: date, scope, evidence sources, safe commands or
read-only tool calls used, and unverified values
- repo identity, default branch, branch prefix, and PR conventions
- default-branch baseline health: current required-check state, known-red jobs
with an
expected-red-until-<ticket> note, and which job conclusion the
post-merge check judges when an umbrella workflow contains a known-broken
sibling job
- remote worker environment enforcement: whether repo hooks and gates actually
install and run in each remote or cloud worker environment (installers often
skip under a generic
CI=true) and the exact pre-push gate that environment
enforces; prompt-level instructions are not a substitute for an
environment-enforced gate
- package manager and command table: install, full gate, focused checks, build,
lint, typecheck, tests, smoke, generated artifacts, cache policy, CI env
passthrough rules, and the exact coverage or secret-scan scopes that hosted
checks enforce
- gate parity: the repo's CI required job should invoke the same single verify
entrypoint the local hooks run, so a check added to CI is a check added
locally by construction. Record the entrypoint command and the CI job that
calls it. Flag any test, lint, coverage, format, or scan step that CI runs
outside that entrypoint as a
config-gap to fix in the repo, not a
difference to document in prose
- planning artifact map: current-truth spec index and paths, glossary or context
map paths, ADR path and naming convention, authority hierarchy, spec status
convention, and documentation checks
- issue tracker provider, provider location, project or board, routing label,
triage scope, orphan policy, statuses, labels, kind label set
(
kind-spec, kind-epic, kind-slice) and its single-select policy,
readiness label policy, worker environment label policy when present, startable
work criteria (including kind-slice only), readiness-label query policy that
excludes the configured done state, priority policy, estimate field, estimate
scale, estimate policy, dependency policy, dependency graph mechanism, file
footprint convention, issue body contract, agent-suitability policy for work
types and risk,
Issue Triage verified-state reconciliation authority, configured
intake-to-ready promotion authority, explicit Linear Backlog promotion gate,
and which workflow
role owns active status transitions
- tracker tool query contract: exact provider IDs, query-safe names, status
field names, relationship or blocker fields, pagination shape if relevant, and
one read-only verification query or tool call that returned the expected scope
- code-host issue sync policy, including whether Linear advances ticket states
from linked GitHub PR status and whether agents should assume synced state when
both linked entities exist
- code-host PR attention labels the orchestrator applies when a PR needs human
merge or input;
needs-human-merge must mean the PR is merge-ready except for
required human merge authority, while labels such as needs-human-input cover
non-merge-ready questions or approvals
- supported worker delegation paths:
local-worktree, issue-assigned, or both
- default worker path and capacity policy when the user or repo has a stable
preference
- duplicate worker or PR detection policy for issue-assigned providers that can
spawn more than one session for one dispatch
- autonomous-loop controls when the repo runs the orchestrator unattended:
worker concurrency cap, worker count policy, preview-provider cap, stuck-worker
timeout, attempt cap before the thrash circuit breaker, required checks that
define green for the integrate gate, auto-merge risk tiers, merge method,
post-merge preparation and check, the production deploy status check on the
default-branch HEAD when the repo deploys on push, auto-Done integration
behavior,
single-ticket one-off mutation policy, verified-ready ticket-set policy,
completely-blocked stop policy, friction intake provider, location, mode,
visibility, agent create authority, review cadence, cleanup policy, and
delivery metrics
- runtime loop and automation terminology for each supported adapter: Claude Code
/loop, schedule, or wake-up timer; Codex automations, either cron
automations or heartbeat automations; and which mechanism owns recurring
Orchestrator ticks
- label source of truth: the live tracker metadata, tracker workflow settings,
existing repo docs, or explicit user instruction used to verify label names
- label documentation policy: whether repo-local label docs exist, and whether
they mirror this config or redirect agents back to it
- verified tracker metadata: lookup tool or query used, verification date, and
exact provider IDs, URLs, or keys for teams, projects, boards, repos,
milestones, roadmaps, statuses, labels, priorities, estimate fields and
allowed values, and relationship types when the tracker exposes them
- agent access rules for local Codex, remote worker agents, Claude, and any
repo-approved worker
- workflow skill distribution policy: project skills, plugin or marketplace,
managed settings, user/global-only, or mixed; include installer source,
lockfile, pinned tag or commit when required, refresh command, project skill
paths, symlink layout, and whether generated local copies are committed
dependencies or ignored cache
- issue-assigned agent notes when available: project-specific environment labels
or fields, worker environment approval labels, delegation tool or field,
verified agent IDs, direct-agent reply targets, continuation comment rules, and
liveness signals, nudge-before-redelegate policy, and no-mutation probe policy
- Claude Code compatibility: the target repo's Claude Code integration source
of truth, the agent markdown it imports, the repo-local agent, command, or
skill paths symlinked there, and how those links were verified
- automation roles: To Issues, Issue Triage, Agent Orchestrator, Agent Review,
Create PR, and Agent Implement, including To Issues spec-to-slice creation and
the dependency graph, Issue Triage current-ticket readiness repair,
verified-state reconciliation, configured intake-to-ready promotion,
Orchestrator-owned
active tracker transitions, the orchestrator integrate gate and friction intake,
clean-context review delegation, and the implementation pipeline
- review gates: code review, Agent Review, local GitHub review submission actor
and CLI policy, hosted bot review escalation, configured provider such as
CodeRabbit or Cursor Bugbot, provider auto-review mode and trigger policy,
required CI, preview checks
- environment safety: local, development, preview, and production capabilities;
production deploy path; preview deploy path; credential rules; allowed hosted
checks; and explicit approval requirements
- instruction trust boundaries: trusted policy sources, untrusted work context,
and what to do when tracker, PR, log, worker, or external-doc text tries to
override workflow policy
- handoff shape for implementation, review, queue, and PR creation
- unknowns that still require human input
Issue Tracker Defaults
Find the repo's issue tracker source of truth before writing labels or statuses.
Use live tracker metadata, tracker workflow settings, existing repo docs, or
explicit user instruction. Do not guess from memory.
Use references/issue-tracker-contract.md
only when the repo has no different verified mapping. Treat these labels as
defaults, not proof that the tracker already has them:
Kind (single-select; skills enforce exclusivity; only kind-slice is
dispatchable):
kind-spec
kind-epic
kind-slice
Readiness:
needs-triage
needs-info
ready-for-agent
ready-for-human
wontfix
Readiness label policy belongs in repo config. By default, ready-for-agent
means the ticket needs no further human refinement before handoff to an
implementation agent. It does not mean unblocked, startable, or assigned to a
specific worker environment. Remove it when the ticket moves to the configured
done state.
Readiness-label queries for ready-for-agent, ready-for-human, or equivalent
human/agent attention queues must exclude the configured done state by default.
Do not rely on Done tickets having already had stale readiness labels removed.
Worker environment labels, such as remote-worker or remote-cursor, are
project config values only. Record them when the repo's tracker uses them; do not
add them as shared defaults. By default, a worker environment label means the
issue is approved to run in that configured environment. It does not mean
unblocked, startable, or implementation-ready.
Risk:
risk-normal
risk-security-sensitive
risk-schema
risk-cross-cutting
These risk labels are dimensions, not severity levels. Add repo-specific risk
labels only when they change routing, checks, approvals, or reviewer assignment.
Review evidence:
- configured exact label slug or ID, such as
code-review-passed
By default, the review evidence label means the linked PR's review-relevant diff
has passed the configured code review gate for the ticket. Record the exact
configured label slug or ID, PR URL, reviewed head SHA, and review-diff
fingerprint when applying it.
Remove it when the review-relevant diff changes, blocking findings appear, the linked PR
changes, or the evidence is missing. Resolve the label by configured slug or ID,
not by reconstructing a title-case display name.
Type:
Bug
Feature
Improvement
Tech Debt
Spike
Hotfix
Do not invent a provider location, status, or label if the issue tracker cannot confirm it.
Write an unknown in the config instead.
When tracker tools are available, verify the available tracker metadata during
setup and record exact names plus stable IDs in the config. Later skills should
not have to rediscover routine IDs before moving issues, applying labels, or
checking project state.
Provider location must be query-safe. For Linear, record the team ID and exact
team name or key that the tool accepts. Do not store only a repo slug such as
agent-paste unless a read-only tool query proves that slug returns the intended
issues. Record whether the tool uses status, state, statusType, or another
field for workflow filtering.
Do not copy every discoverable agent assignee or integration detail into config.
The tracker remains the source of truth for which agents are currently
assignable. Record only the supported worker delegation paths and repo-specific
routing or continuation details that a future Orchestrator run would otherwise waste
time rediscovering.
Do not verify issue-assigned agents by mutating real implementation issues. Use
read-only tracker metadata, existing verified config, provider documentation, or
a user-approved test issue. If the tracker returns a stable delegate or agent ID
from a real delegation event, record it during refresh so future Orchestrator
runs can use it without probing.
If docs/agents/triage-labels.md or a similar label doc exists, update it to
match the config or replace its contents with a pointer to the config. Do not
leave it as a stale partial list. It must cover readiness, risk, review
evidence, type, and any configured area or ownership labels.
Adapter Update
After writing the config, update short agent adapters when present:
AGENTS.md
CLAUDE.md
- editor or agent rules
- repo-local skill usage docs
Adapters should say to read docs/agents/workflow/config.md before using the
workflow skills. Keep them short and use
references/agent-workflow.md as the adapter
contract.
If runtime-generated shared ziw-* skill files exist under .agents/skills/,
.claude/skills/, .codex/skills/, or skills/, decide whether those files
are a committed dependency, symlink fanout, ignored local cache, absent, or
repo-authored project-specific skills. For committed dependencies, record the
source and lockfile and commit mechanical updates. Never hand-edit downstream
generated copies.
For Claude Code, configure the target repo's Claude Code integration, not this
skills repo. Treat that integration as the source of truth for Claude-facing
agent, command, and skill registration. Configure it to import the target repo's
agent markdown, usually AGENTS.md through a one-line CLAUDE.md @AGENTS.md
import when supported. Claude Code is picky, so do not make independent copies.
Symlink repo-local Claude Code paths into the integration location when Claude
Code requires exact paths, then verify each link target resolves from a clean
checkout. Record any path Claude Code refuses to follow as an unknown instead of
guessing.
Safety
- Never include secrets, tokens, signed URLs, customer payloads, or private logs
in the config.
- Never deploy or mutate production while setting up config.
- Prefer exact discovered commands over guesses.
- If a command is inferred but unverified, mark it as inferred.
Done
Report:
- config path written
- whether this was first setup or refresh of an existing config
- whether the config is complete enough to be the workflow lookup table
- config fields changed, unchanged, and still unknown
- verification evidence gathered and critical unknowns remaining
- commands discovered
- tracker routing and labels found or missing
- agent adapters updated
- unknowns left for the user
- validation command run
1---2name: ziw-setup3description: Use for workflow setup when setting up or refreshing a repository for agent workflows by creating docs/agents/workflow/config.md with repo commands, planning artifacts, issue tracking, agent adapters, review gates, and environment safety rules.4---56# Setup78Create or refresh the repo-local agent config used by the other skills. Run this9once per repo, then rerun it when the workflow may have changed or the user wants10to verify that the config is current. The output is a compact lookup table, not11a narrative doc.1213Include stable values workflow agents need repeatedly: repo commands, tracker14IDs, labels, agent access, review gates, handoff shape, and safety rules.15Agents should query external systems to refresh live state, not to rediscover16these values. If a value cannot be verified during setup, record it as an17explicit unknown with the source that should verify it.1819Shared workflow skills may be distributed as project skills, plugin or20marketplace, managed settings, user/global-only, or mixed mode. Record which21mode this repo actually uses. Project-scoped generated `ziw-*` copies are valid22when repo, remote, or cloud workers need the skills from a fresh clone; treat23them as vendored generated dependencies from `zaks-io/skills`, update them24mechanically, and do not hand-edit them in downstream repos.2526Setup is a verification pass, not a best-effort note-taking pass. Every populated27config value that can change agent behavior must have current evidence from the28repo, tracker, code host, CI, agent integration, environment config, or explicit29user instruction. If the value is not verified, mark it `inferred` or move it to30`Unknowns`; do not present it as authoritative.3132## Inputs3334- Repo path to configure.35- Existing repo rules, CI, package scripts, issue tracker, and deploy docs.36- Existing spec indexes, specs, glossaries, context maps, and ADR conventions.37- Any user-provided tracker, agent access, or environment constraints.3839## Output File4041Create or update:4243- `docs/agents/workflow/config.md`4445Treat this file as the repo's workflow lookup table. Keep it terse: values,46paths, commands, IDs, owners, and unknowns. Omit explanation, background, and47fields that do not apply.4849Load these references when writing the config:5051- [references/project-config.md](references/project-config.md) for the template52 and required sections53- [references/agent-workflow.md](references/agent-workflow.md) for role54 responsibilities and adapter minimums55- [references/issue-tracker-contract.md](references/issue-tracker-contract.md)56 for tracker states, labels, readiness, and issue body shape57- [references/operating-profile.md](references/operating-profile.md) for the58 worker concurrency default, the issue-assigned delegation and continuation59 mechanic, the repo-route precondition, and the merge-safety decision table60- [references/linear-cursor-example.md](references/linear-cursor-example.md) for61 a worked Linear + Cursor config to copy when the repo uses that stack62- [references/handoff.md](references/handoff.md) for cross-agent handoff shape6364## Refresh Existing Config6566If `docs/agents/workflow/config.md` already exists, read it before inspecting67anything else. Use it as the baseline for refresh:6869- preserve verified stable values that still match current repo and tracker70 state71- re-verify every populated behavior-affecting field before leaving it72 authoritative; do not preserve a stale value just because it is already in the73 file74- re-run at least one read-only query against configured tracker IDs and75 query-safe names before trusting a project, team, board, or roadmap mapping76- check unknowns, stale timestamps, changed commands, renamed labels, moved77 projects, changed CI, changed worker delegation paths, and changed environment78 rules79- replace stale slugs or display names that return empty tracker results when a80 verified provider ID or canonical name resolves the same scope81- update only fields that are missing, stale, wrong, or newly verified82- do not erase explicit human decisions unless current evidence or the user83 contradicts them84- report what changed, what stayed verified, and what remains unknown8586Do not regenerate the config from scratch when refreshing. The job is to detect87drift from the current config, then patch the lookup table.8889## Verification Standard9091Verify all populated workflow fields that setup writes or preserves:9293- repo identity, default branch, branch prefix, package manager, lockfile, and94 command names from repo files and git metadata95- install, check, build, test, lint, smoke, preview, and generated-artifact96 commands from scripts, CI workflows, makefiles, justfiles, runbooks, or direct97 safe command execution98- planning artifact authority, paths, status convention, and documentation99 checks from spec indexes, context maps, ADR indexes, scripts, CI, or explicit100 user instruction101- issue tracker provider, location, team/project/board/roadmap, statuses,102 labels, priorities, estimate fields, relationships, issue templates, and query103 contracts with read-only tracker tool calls when tools are available104- code host default branch, branch protections, PR conventions, linked checks,105 and open PR query shape through git metadata, code host tools, or workflow106 files107- worker delegation paths, environment labels or fields, continuation paths, and108 remote worker delegation mechanics through tracker metadata, verified config,109 or explicit user instruction110- Claude, Codex, editor, and repo-local adapter paths by resolving files,111 symlinks, imports, and generated skill metadata from a clean path112- shared workflow skill distribution mode, source, lockfile, refresh command,113 project paths, symlink layout, plugin marketplace, and whether generated skill114 directories are committed dependencies, ignored local cache, or absent115- environment safety, deployment paths, hosted checks, preview rules, credential116 rules, and production approval rules from deployment config, CI, runbooks, or117 explicit user instruction118119Do not run install, deploy, production mutation, expensive hosted actions, or120credentialed provider actions just to verify setup unless the user explicitly121approved that action. For those values, verify the command or path exists and122record execution as unknown or requiring approval.123124Every unknown must name the missing value and the source or action that would125verify it. The final report must say whether any critical unknowns remain.126127## Gather128129Inspect files that exist:130131- `AGENTS.md`, `CLAUDE.md`, editor or agent rules, and repo-local skills132- target repo's Claude Code integration config, `.claude/*`, and any repo-local133 agent, command, or skill directories that Claude should load134- `package.json`, lockfiles, Makefile, Justfile, turbo config, and CI workflows135- project status, roadmap, specs, ADRs, runbooks, and existing `docs/agents/*`136- existing agent label docs, such as `docs/agents/triage-labels.md`137- code host branch, default branch, PR, preview, and deploy workflows138- root `.coderabbit.yaml` when present, especially `reviews.auto_review`139- hosted review provider docs or app settings when CodeRabbit, Cursor Bugbot,140 or another PR review bot is enabled141- issue tracker provider, provider location, projects or boards, statuses,142 labels, issue templates, and existing issue examples by querying tracker tools143 when available144- environment files, deployment config, and service inventories145146## Configure147148Record:149150- only verified stable values future workflow agents would otherwise have to151 find again152- a compact verification summary: date, scope, evidence sources, safe commands or153 read-only tool calls used, and unverified values154- repo identity, default branch, branch prefix, and PR conventions155- default-branch baseline health: current required-check state, known-red jobs156 with an `expected-red-until-<ticket>` note, and which job conclusion the157 post-merge check judges when an umbrella workflow contains a known-broken158 sibling job159- remote worker environment enforcement: whether repo hooks and gates actually160 install and run in each remote or cloud worker environment (installers often161 skip under a generic `CI=true`) and the exact pre-push gate that environment162 enforces; prompt-level instructions are not a substitute for an163 environment-enforced gate164- package manager and command table: install, full gate, focused checks, build,165 lint, typecheck, tests, smoke, generated artifacts, cache policy, CI env166 passthrough rules, and the exact coverage or secret-scan scopes that hosted167 checks enforce168- gate parity: the repo's CI required job should invoke the same single verify169 entrypoint the local hooks run, so a check added to CI is a check added170 locally by construction. Record the entrypoint command and the CI job that171 calls it. Flag any test, lint, coverage, format, or scan step that CI runs172 outside that entrypoint as a `config-gap` to fix in the repo, not a173 difference to document in prose174- planning artifact map: current-truth spec index and paths, glossary or context175 map paths, ADR path and naming convention, authority hierarchy, spec status176 convention, and documentation checks177- issue tracker provider, provider location, project or board, routing label,178 triage scope, orphan policy, statuses, labels, kind label set179 (`kind-spec`, `kind-epic`, `kind-slice`) and its single-select policy,180 readiness label policy, worker environment label policy when present, startable181 work criteria (including `kind-slice` only), readiness-label query policy that182 excludes the configured done state, priority policy, estimate field, estimate183 scale, estimate policy, dependency policy, dependency graph mechanism, file184 footprint convention, issue body contract, agent-suitability policy for work185 types and risk,186 Issue Triage verified-state reconciliation authority, configured187 intake-to-ready promotion authority, explicit Linear Backlog promotion gate,188 and which workflow189 role owns active status transitions190- tracker tool query contract: exact provider IDs, query-safe names, status191 field names, relationship or blocker fields, pagination shape if relevant, and192 one read-only verification query or tool call that returned the expected scope193- code-host issue sync policy, including whether Linear advances ticket states194 from linked GitHub PR status and whether agents should assume synced state when195 both linked entities exist196- code-host PR attention labels the orchestrator applies when a PR needs human197 merge or input; `needs-human-merge` must mean the PR is merge-ready except for198 required human merge authority, while labels such as `needs-human-input` cover199 non-merge-ready questions or approvals200- supported worker delegation paths: `local-worktree`, `issue-assigned`, or both201- default worker path and capacity policy when the user or repo has a stable202 preference203- duplicate worker or PR detection policy for issue-assigned providers that can204 spawn more than one session for one dispatch205- autonomous-loop controls when the repo runs the orchestrator unattended:206 worker concurrency cap, worker count policy, preview-provider cap, stuck-worker207 timeout, attempt cap before the thrash circuit breaker, required checks that208 define green for the integrate gate, auto-merge risk tiers, merge method,209 post-merge preparation and check, the production deploy status check on the210 default-branch HEAD when the repo deploys on push, auto-Done integration211 behavior,212 single-ticket one-off mutation policy, verified-ready ticket-set policy,213 completely-blocked stop policy, friction intake provider, location, mode,214 visibility, agent create authority, review cadence, cleanup policy, and215 delivery metrics216- runtime loop and automation terminology for each supported adapter: Claude Code217 `/loop`, schedule, or wake-up timer; Codex automations, either cron218 automations or heartbeat automations; and which mechanism owns recurring219 Orchestrator ticks220- label source of truth: the live tracker metadata, tracker workflow settings,221 existing repo docs, or explicit user instruction used to verify label names222- label documentation policy: whether repo-local label docs exist, and whether223 they mirror this config or redirect agents back to it224- verified tracker metadata: lookup tool or query used, verification date, and225 exact provider IDs, URLs, or keys for teams, projects, boards, repos,226 milestones, roadmaps, statuses, labels, priorities, estimate fields and227 allowed values, and relationship types when the tracker exposes them228- agent access rules for local Codex, remote worker agents, Claude, and any229 repo-approved worker230- workflow skill distribution policy: project skills, plugin or marketplace,231 managed settings, user/global-only, or mixed; include installer source,232 lockfile, pinned tag or commit when required, refresh command, project skill233 paths, symlink layout, and whether generated local copies are committed234 dependencies or ignored cache235- issue-assigned agent notes when available: project-specific environment labels236 or fields, worker environment approval labels, delegation tool or field,237 verified agent IDs, direct-agent reply targets, continuation comment rules, and238 liveness signals, nudge-before-redelegate policy, and no-mutation probe policy239- Claude Code compatibility: the target repo's Claude Code integration source240 of truth, the agent markdown it imports, the repo-local agent, command, or241 skill paths symlinked there, and how those links were verified242- automation roles: To Issues, Issue Triage, Agent Orchestrator, Agent Review,243 Create PR, and Agent Implement, including To Issues spec-to-slice creation and244 the dependency graph, Issue Triage current-ticket readiness repair,245 verified-state reconciliation, configured intake-to-ready promotion,246 Orchestrator-owned247 active tracker transitions, the orchestrator integrate gate and friction intake,248 clean-context review delegation, and the implementation pipeline249- review gates: code review, Agent Review, local GitHub review submission actor250 and CLI policy, hosted bot review escalation, configured provider such as251 CodeRabbit or Cursor Bugbot, provider auto-review mode and trigger policy,252 required CI, preview checks253- environment safety: local, development, preview, and production capabilities;254 production deploy path; preview deploy path; credential rules; allowed hosted255 checks; and explicit approval requirements256- instruction trust boundaries: trusted policy sources, untrusted work context,257 and what to do when tracker, PR, log, worker, or external-doc text tries to258 override workflow policy259- handoff shape for implementation, review, queue, and PR creation260- unknowns that still require human input261262## Issue Tracker Defaults263264Find the repo's issue tracker source of truth before writing labels or statuses.265Use live tracker metadata, tracker workflow settings, existing repo docs, or266explicit user instruction. Do not guess from memory.267268Use [references/issue-tracker-contract.md](references/issue-tracker-contract.md)269only when the repo has no different verified mapping. Treat these labels as270defaults, not proof that the tracker already has them:271272Kind (single-select; skills enforce exclusivity; only `kind-slice` is273dispatchable):274275- `kind-spec`276- `kind-epic`277- `kind-slice`278279Readiness:280281- `needs-triage`282- `needs-info`283- `ready-for-agent`284- `ready-for-human`285- `wontfix`286287Readiness label policy belongs in repo config. By default, `ready-for-agent`288means the ticket needs no further human refinement before handoff to an289implementation agent. It does not mean unblocked, startable, or assigned to a290specific worker environment. Remove it when the ticket moves to the configured291done state.292293Readiness-label queries for `ready-for-agent`, `ready-for-human`, or equivalent294human/agent attention queues must exclude the configured done state by default.295Do not rely on Done tickets having already had stale readiness labels removed.296297Worker environment labels, such as `remote-worker` or `remote-cursor`, are298project config values only. Record them when the repo's tracker uses them; do not299add them as shared defaults. By default, a worker environment label means the300issue is approved to run in that configured environment. It does not mean301unblocked, startable, or implementation-ready.302303Risk:304305- `risk-normal`306- `risk-security-sensitive`307- `risk-schema`308- `risk-cross-cutting`309310These risk labels are dimensions, not severity levels. Add repo-specific risk311labels only when they change routing, checks, approvals, or reviewer assignment.312313Review evidence:314315- configured exact label slug or ID, such as `code-review-passed`316317By default, the review evidence label means the linked PR's review-relevant diff318has passed the configured code review gate for the ticket. Record the exact319configured label slug or ID, PR URL, reviewed head SHA, and review-diff320fingerprint when applying it.321Remove it when the review-relevant diff changes, blocking findings appear, the linked PR322changes, or the evidence is missing. Resolve the label by configured slug or ID,323not by reconstructing a title-case display name.324325Type:326327- `Bug`328- `Feature`329- `Improvement`330- `Tech Debt`331- `Spike`332- `Hotfix`333334Do not invent a provider location, status, or label if the issue tracker cannot confirm it.335Write an unknown in the config instead.336337When tracker tools are available, verify the available tracker metadata during338setup and record exact names plus stable IDs in the config. Later skills should339not have to rediscover routine IDs before moving issues, applying labels, or340checking project state.341342Provider location must be query-safe. For Linear, record the team ID and exact343team name or key that the tool accepts. Do not store only a repo slug such as344`agent-paste` unless a read-only tool query proves that slug returns the intended345issues. Record whether the tool uses `status`, `state`, `statusType`, or another346field for workflow filtering.347348Do not copy every discoverable agent assignee or integration detail into config.349The tracker remains the source of truth for which agents are currently350assignable. Record only the supported worker delegation paths and repo-specific351routing or continuation details that a future Orchestrator run would otherwise waste352time rediscovering.353354Do not verify issue-assigned agents by mutating real implementation issues. Use355read-only tracker metadata, existing verified config, provider documentation, or356a user-approved test issue. If the tracker returns a stable delegate or agent ID357from a real delegation event, record it during refresh so future Orchestrator358runs can use it without probing.359360If `docs/agents/triage-labels.md` or a similar label doc exists, update it to361match the config or replace its contents with a pointer to the config. Do not362leave it as a stale partial list. It must cover readiness, risk, review363evidence, type, and any configured area or ownership labels.364365## Adapter Update366367After writing the config, update short agent adapters when present:368369- `AGENTS.md`370- `CLAUDE.md`371- editor or agent rules372- repo-local skill usage docs373374Adapters should say to read `docs/agents/workflow/config.md` before using the375workflow skills. Keep them short and use376[references/agent-workflow.md](references/agent-workflow.md) as the adapter377contract.378379If runtime-generated shared `ziw-*` skill files exist under `.agents/skills/`,380`.claude/skills/`, `.codex/skills/`, or `skills/`, decide whether those files381are a committed dependency, symlink fanout, ignored local cache, absent, or382repo-authored project-specific skills. For committed dependencies, record the383source and lockfile and commit mechanical updates. Never hand-edit downstream384generated copies.385386For Claude Code, configure the target repo's Claude Code integration, not this387skills repo. Treat that integration as the source of truth for Claude-facing388agent, command, and skill registration. Configure it to import the target repo's389agent markdown, usually `AGENTS.md` through a one-line `CLAUDE.md` `@AGENTS.md`390import when supported. Claude Code is picky, so do not make independent copies.391Symlink repo-local Claude Code paths into the integration location when Claude392Code requires exact paths, then verify each link target resolves from a clean393checkout. Record any path Claude Code refuses to follow as an unknown instead of394guessing.395396## Safety397398- Never include secrets, tokens, signed URLs, customer payloads, or private logs399 in the config.400- Never deploy or mutate production while setting up config.401- Prefer exact discovered commands over guesses.402- If a command is inferred but unverified, mark it as inferred.403404## Done405406Report:407408- config path written409- whether this was first setup or refresh of an existing config410- whether the config is complete enough to be the workflow lookup table411- config fields changed, unchanged, and still unknown412- verification evidence gathered and critical unknowns remaining413- commands discovered414- tracker routing and labels found or missing415- agent adapters updated416- unknowns left for the user417- validation command run