Issue Triage
Issue Triage manages the issue tracker backlog so Orchestrator can run. It turns
tracker items into well-shaped, dependency-aware, agent-ready work or explicit
human/To Issues follow-up.
The end state is a useful Todo backlog:
- every
Todo implementation ticket is a one-PR kind-slice
- ready work has
ready-for-agent, the configured route, required labels,
required estimate, complete body contract, and predicted footprint
- blocked ready work stays in
Todo with blocker relationships encoded
- not-ready work is labeled or moved to the configured human, intake, parked, or
To Issues path when config grants that authority
- Orchestrator can consume the final
starts, blocked-ready list, and next
actions without re-triaging the same queue
Default triage starts from the configured ready and intake states, configured
active or PR-linked issues that need reconciliation, and direct blockers of those
tickets. In most Linear repos this means Todo, Triage, active or PR-linked
issues with stale workflow metadata, and any active issues that directly block
those tickets. Do not include unrelated Linear Backlog, Duplicate, Done,
canceled, icebox, or other parked/terminal states by default.
This skill is script-driven tracker grooming. It is not research,
implementation, code review, repo health monitoring, CI diagnosis, deploy
diagnosis, security scanning, or production triage.
Read only:
docs/agents/workflow/config.md
- source-of-truth specs, roadmap, milestone, and project docs cited by the
config or scoped tickets
- issue tracker metadata, bodies, comments, labels, statuses, estimates,
projects, parents, and relationships
- explicit user instructions
- approved workflow script outputs from
skills/ziw-orchestrate/scripts
Run the scripts, read the output, inspect only the bounded tracker scope and its
cited source-of-truth docs, then fix the tickets. The scripts are the observation
layer for queue, PR, and worker state; the agent does not rediscover that state
manually. No manual code search, implementation file reads, one-off gh
queries, CI spelunking, deploy checks, log review, security tool runs, or broad
repo health checks. If handoff quality depends on information that is not in the
tracker, config, cited source-of-truth docs, or script output, leave the exact
missing field for To Issues or a human.
Tracker/MCP tools are for applying ticket mutations and reading specific ticket
fields that the scripts do not return. Do not use MCP calls to rebuild the same
inventory, PR state, dependency frontier, or readiness decisions that the scripts
already compute.
Inputs
- Issue tracker project, team, repo label, board, roadmap, query, filter, or
explicit Linear
Backlog state scope.
- Repo path and
docs/agents/workflow/config.md.
- Existing tracker statuses, labels, priorities, estimates, dependencies,
parents, children, duplicates, issue bodies, and comments.
- Optional user instructions for dry run, first-run intake backfill, first-run
Linear Backlog backfill, Linear Backlog review, intake cleanup, priority
policy, or orphan routing.
Context
Read docs/agents/workflow/config.md first. If it is missing, run or request
ziw-setup before broad cleanup.
Confirm these config values before mutating the issue tracker:
- provider location, project, team, roadmap, and routing label
- status names and mappings
- ready state, intake states, active states, done state, and Linear Backlog
policy
- readiness, type, risk, review-debt, worker environment, and route labels
- readiness label policy and startable work criteria
- priority policy, estimate policy, dependency policy, and orphan policy
- agent-ready issue body contract
- Issue Triage mutation authority
- dependency graph mechanism and blocker relationship direction
If tracker metadata disagrees with config, update only exact label gaps that are
safe to create. Do not create or rename workflows, statuses, teams, projects,
boards, roadmaps, or label taxonomies without explicit approval.
Operating Loop
Start each run by choosing one mode:
- default backlog grooming
- explicit issue, project, board, repo label, team, query, or filter
- requested Linear Backlog or intake cleanup
- dry run
A normal ziw-triage invocation is a request to process the configured intake
states. Complete implementation-ready intake tickets move from Triage to the
configured ready state, usually Todo, without requiring the user to separately
say "intake cleanup." Linear Backlog remains excluded unless explicitly
requested. A dry run recommends the same transitions without applying them.
Then follow this order:
- State the bounded tracker scope, skipped states, allowed mutations, and
ready/Done rules from config.
- Run the configured workflow scripts before broad tracker reads:
../ziw-orchestrate/scripts/tick-snapshot.mjs for the compact queue snapshot,
../ziw-orchestrate/scripts/tick-plan.mjs for deterministic queue decisions,
and ../ziw-orchestrate/scripts/linear-dag-start.mjs for
dependency/startability. Pass the configured repo, tracker team, route label,
and ready/intake states to tick-snapshot.mjs, usually
--linear-states Todo,Triage, so the snapshot bounds the queue and its direct
blockers. Build the scripts' compact JSON config and queue inputs from
verified values in the Markdown workflow config; do not pass
docs/agents/workflow/config.md directly to a script's --config flag. Use
the planner input contract
for accepted fields and types. Use
the normal compact JSON output for planning. --pretty only changes
formatting, and --debug is for diagnosing planner decisions. If a script
cannot run because credentials or inputs are missing, report the exact missing
input and use tracker tools only for the smallest bounded replacement query.
- Build the issue set from script output and targeted tracker queries. Include
configured active or PR-linked issues only when the output or tracker fields
show state, review, claim, or metadata needing reconciliation. Read cited
source-of-truth docs when needed to verify scope or dependency order.
When such a target or any of its direct
blockedBy records is absent from
the snapshot, fetch the missing records with one bounded tracker query. Add
them to linear.activeIssues in the compact input before freezing the issue
set and rerunning the planner and DAG scripts. Do not fetch blockers of those
blockers or unrelated parked and terminal issues.
- Freeze the issue set. Do not expand it because a linked PR, branch, CI run,
deploy, alert, or code path looks interesting.
- Classify every issue.
- Apply safe tracker updates in batches.
- Re-run the DAG/startability script over the updated issue set when
implementation
kind-slice issues are in scope.
- Report what changed, what remains blocked, and exactly what Orchestrator,
To Issues, or a human should do next.
If the issue set is empty, report the empty scoped result and stop.
Decision Routine
Use script and tracker output to choose one action per issue:
- Fix now: safe label, status, body, estimate, route, dependency, stale
readiness, review-evidence, or handoff-field repair is clear.
- Ready for Orchestrator: the issue is a one-PR
kind-slice with body,
route, readiness, required estimate, dependency encoding, and likely files,
packages, or artifacts recorded in its body.
- Blocked but shaped: the issue is otherwise ready, but
linear-dag-start.mjs reports dependency blockers.
- Needs To Issues: the issue is a container, vague plan, multi-PR scope,
missing split, or missing likely files, packages, or artifacts in its body.
- Needs human: product, security, credential, customer, ADR, ownership,
priority, or acceptance-criteria decision is missing.
- Orchestrator action: script output shows linked PR/status/check/review
state needs active workflow handling that triage should not perform.
- Park: the tracker state is intentionally outside the current work queue.
Do not invent a new investigation path. If the next action is not one of these,
record a config gap or ask a specific human question.
Use the script outputs directly:
tick-snapshot.mjs gives the compact queue, linked PR footprint, current heads,
checks, review state, and Linear queue metadata when credentials are available.
tick-plan.mjs gives ready-state promotions, review-evidence actions,
human-merge label actions, capacity/dispatch signals, and the deterministic
next workflow action.
linear-dag-start.mjs gives roots, frontier, starts, blockers, cycles, and
missing startability requirements.
Triage owns ticket repairs implied by those outputs. Orchestrator owns active
delivery actions implied by those outputs.
Default Scope
Default triage is Todo plus intake grooming in the tracker. Build the default
issue set from configured tracker state and script output, not from ad hoc
exploration:
- Issues in the configured ready state, usually
Todo.
- Issues in configured intake or review-debt intake states that config says
Issue Triage should normalize, usually
Triage.
- Active or PR-linked issues in the configured current-work scope when tracker
or script evidence shows stale status, review, claim, or handoff metadata that
triage is allowed to repair.
- Direct active blockers of those ready, intake, or reconciliation issues, even
when the blocker lives outside
Todo or Triage.
- Non-done issues with the repo routing label that are missing configured
project, parent, kind, readiness, dependency, or body metadata only when they
are already in the configured ready or intake states.
- Issues from workflow script output whose tracker metadata needs repair before
Orchestrator can use them.
- Recently updated issues only when they are already in configured ready,
intake, or active tracker states.
For default mode, the main cleanup target is the configured ready state. If
config says that is Todo, make Todo the clean Orchestrator handoff queue.
If config treats Linear Backlog, icebox, someday, roadmap, or equivalent
states as parked/out-of-work-queue, skip them unless the user explicitly asks
for Linear Backlog review, Linear Backlog cleanup, or Linear Backlog backfill. If
the user says "backlog" generically, follow the repo config's backlog-grooming
scope instead of assuming the Linear Backlog status is in scope.
When building readiness-label queues such as ready-for-agent or
ready-for-human, exclude the configured done state up front unless the user
explicitly asks to audit Done cleanup.
Classify Issues
Classify each issue into exactly one primary outcome:
- ready for Orchestrator: one-PR
kind-slice, complete body contract, route,
labels, dependencies, and required estimate when configured
- blocked but shaped: otherwise ready, with dependency blockers encoded
- needs To Issues: container, spec, epic, vague plan, multi-PR work, missing
likely files/packages/artifacts in the body, or missing concrete scope split
- needs human decision: product, security, credential, customer, ADR, ownership,
priority, or acceptance-criteria decision required
- parked: intentionally not ready for agent work
- duplicate or likely duplicate
- orphan: missing route, project, parent, status, or owner metadata
- config gap: required tracker field or policy is missing from config
- Orchestrator action: script output shows active PR/check/review/status work
that belongs to Orchestrator
Do not infer scope by reading code or linked artifacts outside the workflow
scripts. If tracker text plus script output does not contain enough information
to classify safely, choose needs To Issues, needs human decision, or
config gap.
Cleanup
Apply obvious mechanical tracker updates:
- route orphan issues into the configured project, team, repo label, or parent
when tracker evidence is direct
- add missing configured labels for route, kind, type, risk, readiness, review
debt, and worker environment when policy allows
- set exactly one
kind-* value and clear conflicting kind labels
- keep
kind-spec and kind-epic as containers; never mark containers
ready-for-agent
- normalize issue bodies to the configured agent-ready headings
- preserve useful existing text and add missing headings without inventing facts
- add or preserve estimates only when config grants Issue Triage that authority
- encode dependency blockers from tracker relationships or issue text
- remove completed, canceled, duplicate, or unrelated blockers only when tracker
state makes that direct
- move complete
kind-slice issues from configured intake states to the
configured ready state during every normal triage run when the full readiness
contract is complete, including the required labels, route, estimate, body,
and ready-for-agent; never promote kind-spec or kind-epic containers
- move complete
ready-for-agent kind-slice issues from explicitly requested
Linear Backlog cleanup/backfill scope to the configured ready state when
config grants promotion authority
- leave parked Linear Backlog or equivalent states alone unless explicitly in
scope
- move or label not-ready
Todo issues according to config: needs-info,
ready-for-human, configured intake, parked, or To Issues input. Do not leave
vague tickets in Todo with no next owner
- remove
ready-for-agent from vague, duplicate, parent, human-owned,
multi-outcome, boundary-incomplete, or body-incomplete issues
- mark implementation-ready slices
ready-for-agent when no further human
refinement is needed, even if dependency blockers remain
- reconcile stale tracker state only from tracker evidence or approved script
output, such as a linked PR merged, an active PR needing review state, a
changed PR head invalidating review evidence, or a terminal ticket retaining a
readiness label
- clear readiness labels when moving a ticket to the configured done state
- add, remove, or leave review evidence and human-merge labels only when script
output provides the current PR head, check, review, draft, and unresolved
thread state required by config
- add a concise tracker comment only when it helps a human or Orchestrator act
Do not close, cancel, reprioritize across projects, rewrite product scope, or
move active workflow states unless config or the user explicitly grants that
authority.
Do not manually verify linked PRs, branch state, CI, deploys, or code. Use only
tracker text and script output. If an issue appears to need verification that the
scripts did not provide, leave an Orchestrator next action such as "verify linked
PR is merged and update status if complete."
Readiness Contract
An issue can receive ready-for-agent only when it is:
- scoped to one PR
- scoped to one primary outcome
- assigned to the configured project, parent, or route
- labeled with one clear kind and required type/risk labels
- estimated when config requires estimates before handoff
- explicit about in-scope and out-of-scope work
- complete enough for Orchestrator to decide startability and dispatch
Required body content:
- outcome
- context docs or tracker links
- likely files, packages, or artifacts
- in scope
- out of scope
- acceptance criteria
- required checks
- security, privacy, data, and operational invariants
- dependencies or blockers
- estimate when config stores estimates in the body
The scope fields must be concrete. In scope lists only the behavior, files,
docs, tests, and workflow state this PR may change. Out of scope lists
adjacent outcomes, sibling tickets, optional polish, broad refactors, production
actions, and follow-up behavior the worker must not deliver.
Populate likely files, packages, or artifacts only from existing tracker text,
config, To Issues output, or approved script output. Do not search the repo to
discover them. If they are missing, withhold ready-for-agent and leave the
issue for To Issues or human clarification.
If an issue carries ready-for-agent but the body says it is waiting on human
setup, credentials, provider decisions, security judgment, or a
ready-for-human rationale, treat the body as the stronger signal. Remove or
withhold ready-for-agent, preserve the exact human decision needed, and report
the contradiction.
Dependencies
Encode dependencies from bounded, authoritative evidence:
- explicit blocker text in the issue
- tracker parent, child, related, blocker, or duplicate relationships
- accepted sequencing in the scoped project's cited specs, roadmap, milestone,
or project docs
- concrete producer-before-consumer, schema-before-reader, API-before-client, or
release-order prerequisites stated by those sources
Use the smallest direct blocker graph that preserves the required order. Remove
terminal blockers when tracker state makes that safe, detect missing direct
edges and cycles, and keep transitive-only edges out unless the tracker requires
them. Do not inspect implementation code, PR diffs, branches, or deploy state to
invent ordering. If the tracker and cited source-of-truth docs still leave the
sequence ambiguous, leave the issue for To Issues or human clarification.
Dependency blockers do not remove ready-for-agent or worker-environment
labels. Encode dependency order with tracker relationships, blocker fields, or
the dependencies/body section so Orchestrator can compute startability.
When the frozen scope contains implementation kind-slice tickets, run the
dependency/startability script over the snapshot or a compact issue JSON:
node <skill-dir>/../ziw-orchestrate/scripts/linear-dag-start.mjs <snapshot-or-issues.json> --config <config.json>
Use the DAG result to fix the queue:
starts: verify the full readiness contract before leaving the issue in
Todo with ready-for-agent and handing it to Orchestrator. The DAG checks
label/state eligibility, not body completeness. Missing structured footprint
data in the snapshot is distinct from missing likely files/packages/artifacts
in the issue body. Orchestrator owns footprint derivation and collision-safe
dispatch, including the unknown-footprint lane its dispatch policy allows.
frontier but not starts: repair missing labels, kind, ready state, active
claim, open-PR metadata, or body fields when safe
startableBlockers: convert each blocker into a ticket repair, a To Issues
action, a human question, or an Orchestrator next action
- cycles and out-of-scope blockers: encode the correct relationship if direct;
otherwise mark for human/To Issues
Human Clarification
Ask the user only when a safe tracker update depends on a concrete decision.
Keep questions short and tied to a specific issue.
If the user is unavailable or the run is non-interactive:
- add the configured human-input label or state
- add one concise tracker comment only when it helps the human answer
- include the exact question or next action in the final report
- leave the issue out of
ready-for-agent
Never fabricate scope, acceptance criteria, likely files, priority, estimates,
or dependency order to make a ticket look ready.
Guardrails
- Scripts first, no ad hoc exploration. Use approved workflow scripts and
tracker tools. Do not do manual code search, implementation file reads, tests,
one-off
gh queries, PR list spelunking, branch checks, CI checks, deploy
checks, production logs, alerts, security scans, package audits, or
repo-health sweeps.
- Do not implement code, create PRs, merge, deploy, or mutate production.
- Follow only cited source-of-truth project docs for scope and dependency
analysis. Do not follow PR, CI, deploy, log, or unrelated external links.
- Do not create noisy comments for small label edits.
- Do not create new label taxonomies unless config or the user explicitly names
them.
- Stop before destructive bulk changes if more than a small number of issues
would be canceled, closed, moved across projects, or reprioritized.
Done
Report:
- scripts run, script inputs, and any script fallback used
- tracker scope reviewed and whether the run was dry-run, partial, or applied
- Linear Backlog or intake states skipped or explicitly included
- issues changed, unchanged, parked, and needing human decision
- orphans routed or left with reasons
- labels, priorities, estimates, body contracts, dependency relationships, and
status recommendations updated
- ready-state issues made agent-ready or left with exact missing fields
- intake/review-debt issues promoted, left for To Issues, parked, or left for a
human decision
- issues ready for Orchestrator, blocked-but-ready, missing metadata, missing
body fields, duplicate, cyclic, or config-blocked
- stale tracker state repaired from script output, including Done/readiness,
review evidence, and human-merge label repairs
- exact Orchestrator next actions for any linked PR/status verification needed
- final
Todo handoff: starts, blocked-ready, and not-ready tickets removed or
marked with their exact next owner
- user questions asked or exact human next actions left
1---2name: ziw-triage3description: Use for script-guided issue tracker triage when managing the current project backlog, making issues ready for Orchestrator by running workflow scripts, inspecting their outputs, and fixing labels, statuses, dependencies, body contracts, estimates, stale tracker state, and explicit human questions without ad hoc exploration.4---56# Issue Triage78Issue Triage manages the issue tracker backlog so Orchestrator can run. It turns9tracker items into well-shaped, dependency-aware, agent-ready work or explicit10human/To Issues follow-up.1112The end state is a useful `Todo` backlog:1314- every `Todo` implementation ticket is a one-PR `kind-slice`15- ready work has `ready-for-agent`, the configured route, required labels,16 required estimate, complete body contract, and predicted footprint17- blocked ready work stays in `Todo` with blocker relationships encoded18- not-ready work is labeled or moved to the configured human, intake, parked, or19 To Issues path when config grants that authority20- Orchestrator can consume the final `starts`, blocked-ready list, and next21 actions without re-triaging the same queue2223Default triage starts from the configured ready and intake states, configured24active or PR-linked issues that need reconciliation, and direct blockers of those25tickets. In most Linear repos this means `Todo`, `Triage`, active or PR-linked26issues with stale workflow metadata, and any active issues that directly block27those tickets. Do not include unrelated Linear `Backlog`, Duplicate, Done,28canceled, icebox, or other parked/terminal states by default.2930This skill is script-driven tracker grooming. It is not research,31implementation, code review, repo health monitoring, CI diagnosis, deploy32diagnosis, security scanning, or production triage.3334Read only:3536- `docs/agents/workflow/config.md`37- source-of-truth specs, roadmap, milestone, and project docs cited by the38 config or scoped tickets39- issue tracker metadata, bodies, comments, labels, statuses, estimates,40 projects, parents, and relationships41- explicit user instructions42- approved workflow script outputs from `skills/ziw-orchestrate/scripts`4344Run the scripts, read the output, inspect only the bounded tracker scope and its45cited source-of-truth docs, then fix the tickets. The scripts are the observation46layer for queue, PR, and worker state; the agent does not rediscover that state47manually. No manual code search, implementation file reads, one-off `gh`48queries, CI spelunking, deploy checks, log review, security tool runs, or broad49repo health checks. If handoff quality depends on information that is not in the50tracker, config, cited source-of-truth docs, or script output, leave the exact51missing field for To Issues or a human.5253Tracker/MCP tools are for applying ticket mutations and reading specific ticket54fields that the scripts do not return. Do not use MCP calls to rebuild the same55inventory, PR state, dependency frontier, or readiness decisions that the scripts56already compute.5758## Inputs5960- Issue tracker project, team, repo label, board, roadmap, query, filter, or61 explicit Linear `Backlog` state scope.62- Repo path and `docs/agents/workflow/config.md`.63- Existing tracker statuses, labels, priorities, estimates, dependencies,64 parents, children, duplicates, issue bodies, and comments.65- Optional user instructions for dry run, first-run intake backfill, first-run66 Linear Backlog backfill, Linear Backlog review, intake cleanup, priority67 policy, or orphan routing.6869## Context7071Read `docs/agents/workflow/config.md` first. If it is missing, run or request72`ziw-setup` before broad cleanup.7374Confirm these config values before mutating the issue tracker:7576- provider location, project, team, roadmap, and routing label77- status names and mappings78- ready state, intake states, active states, done state, and Linear Backlog79 policy80- readiness, type, risk, review-debt, worker environment, and route labels81- readiness label policy and startable work criteria82- priority policy, estimate policy, dependency policy, and orphan policy83- agent-ready issue body contract84- Issue Triage mutation authority85- dependency graph mechanism and blocker relationship direction8687If tracker metadata disagrees with config, update only exact label gaps that are88safe to create. Do not create or rename workflows, statuses, teams, projects,89boards, roadmaps, or label taxonomies without explicit approval.9091## Operating Loop9293Start each run by choosing one mode:9495- default backlog grooming96- explicit issue, project, board, repo label, team, query, or filter97- requested Linear Backlog or intake cleanup98- dry run99100A normal `ziw-triage` invocation is a request to process the configured intake101states. Complete implementation-ready intake tickets move from `Triage` to the102configured ready state, usually `Todo`, without requiring the user to separately103say "intake cleanup." Linear `Backlog` remains excluded unless explicitly104requested. A dry run recommends the same transitions without applying them.105106Then follow this order:1071081. State the bounded tracker scope, skipped states, allowed mutations, and109 ready/Done rules from config.1102. Run the configured workflow scripts before broad tracker reads:111 `../ziw-orchestrate/scripts/tick-snapshot.mjs` for the compact queue snapshot,112 `../ziw-orchestrate/scripts/tick-plan.mjs` for deterministic queue decisions,113 and `../ziw-orchestrate/scripts/linear-dag-start.mjs` for114 dependency/startability. Pass the configured repo, tracker team, route label,115 and ready/intake states to `tick-snapshot.mjs`, usually116 `--linear-states Todo,Triage`, so the snapshot bounds the queue and its direct117 blockers. Build the scripts' compact JSON config and queue inputs from118 verified values in the Markdown workflow config; do not pass119 `docs/agents/workflow/config.md` directly to a script's `--config` flag. Use120 the [planner input contract](../ziw-orchestrate/references/planner-input.md)121 for accepted fields and types. Use122 the normal compact JSON output for planning. `--pretty` only changes123 formatting, and `--debug` is for diagnosing planner decisions. If a script124 cannot run because credentials or inputs are missing, report the exact missing125 input and use tracker tools only for the smallest bounded replacement query.1263. Build the issue set from script output and targeted tracker queries. Include127 configured active or PR-linked issues only when the output or tracker fields128 show state, review, claim, or metadata needing reconciliation. Read cited129 source-of-truth docs when needed to verify scope or dependency order.130 When such a target or any of its direct `blockedBy` records is absent from131 the snapshot, fetch the missing records with one bounded tracker query. Add132 them to `linear.activeIssues` in the compact input before freezing the issue133 set and rerunning the planner and DAG scripts. Do not fetch blockers of those134 blockers or unrelated parked and terminal issues.1354. Freeze the issue set. Do not expand it because a linked PR, branch, CI run,136 deploy, alert, or code path looks interesting.1375. Classify every issue.1386. Apply safe tracker updates in batches.1397. Re-run the DAG/startability script over the updated issue set when140 implementation `kind-slice` issues are in scope.1418. Report what changed, what remains blocked, and exactly what Orchestrator,142 To Issues, or a human should do next.143144If the issue set is empty, report the empty scoped result and stop.145146## Decision Routine147148Use script and tracker output to choose one action per issue:149150- **Fix now**: safe label, status, body, estimate, route, dependency, stale151 readiness, review-evidence, or handoff-field repair is clear.152- **Ready for Orchestrator**: the issue is a one-PR `kind-slice` with body,153 route, readiness, required estimate, dependency encoding, and likely files,154 packages, or artifacts recorded in its body.155- **Blocked but shaped**: the issue is otherwise ready, but156 `linear-dag-start.mjs` reports dependency blockers.157- **Needs To Issues**: the issue is a container, vague plan, multi-PR scope,158 missing split, or missing likely files, packages, or artifacts in its body.159- **Needs human**: product, security, credential, customer, ADR, ownership,160 priority, or acceptance-criteria decision is missing.161- **Orchestrator action**: script output shows linked PR/status/check/review162 state needs active workflow handling that triage should not perform.163- **Park**: the tracker state is intentionally outside the current work queue.164165Do not invent a new investigation path. If the next action is not one of these,166record a config gap or ask a specific human question.167168Use the script outputs directly:169170- `tick-snapshot.mjs` gives the compact queue, linked PR footprint, current heads,171 checks, review state, and Linear queue metadata when credentials are available.172- `tick-plan.mjs` gives ready-state promotions, review-evidence actions,173 human-merge label actions, capacity/dispatch signals, and the deterministic174 next workflow action.175- `linear-dag-start.mjs` gives roots, frontier, starts, blockers, cycles, and176 missing startability requirements.177178Triage owns ticket repairs implied by those outputs. Orchestrator owns active179delivery actions implied by those outputs.180181## Default Scope182183Default triage is `Todo` plus intake grooming in the tracker. Build the default184issue set from configured tracker state and script output, not from ad hoc185exploration:1861871. Issues in the configured ready state, usually `Todo`.1882. Issues in configured intake or review-debt intake states that config says189 Issue Triage should normalize, usually `Triage`.1903. Active or PR-linked issues in the configured current-work scope when tracker191 or script evidence shows stale status, review, claim, or handoff metadata that192 triage is allowed to repair.1934. Direct active blockers of those ready, intake, or reconciliation issues, even194 when the blocker lives outside `Todo` or `Triage`.1955. Non-done issues with the repo routing label that are missing configured196 project, parent, kind, readiness, dependency, or body metadata only when they197 are already in the configured ready or intake states.1986. Issues from workflow script output whose tracker metadata needs repair before199 Orchestrator can use them.2007. Recently updated issues only when they are already in configured ready,201 intake, or active tracker states.202203For default mode, the main cleanup target is the configured ready state. If204config says that is `Todo`, make `Todo` the clean Orchestrator handoff queue.205206If config treats Linear `Backlog`, icebox, someday, roadmap, or equivalent207states as parked/out-of-work-queue, skip them unless the user explicitly asks208for Linear Backlog review, Linear Backlog cleanup, or Linear Backlog backfill. If209the user says "backlog" generically, follow the repo config's backlog-grooming210scope instead of assuming the Linear `Backlog` status is in scope.211212When building readiness-label queues such as `ready-for-agent` or213`ready-for-human`, exclude the configured done state up front unless the user214explicitly asks to audit Done cleanup.215216## Classify Issues217218Classify each issue into exactly one primary outcome:219220- ready for Orchestrator: one-PR `kind-slice`, complete body contract, route,221 labels, dependencies, and required estimate when configured222- blocked but shaped: otherwise ready, with dependency blockers encoded223- needs To Issues: container, spec, epic, vague plan, multi-PR work, missing224 likely files/packages/artifacts in the body, or missing concrete scope split225- needs human decision: product, security, credential, customer, ADR, ownership,226 priority, or acceptance-criteria decision required227- parked: intentionally not ready for agent work228- duplicate or likely duplicate229- orphan: missing route, project, parent, status, or owner metadata230- config gap: required tracker field or policy is missing from config231- Orchestrator action: script output shows active PR/check/review/status work232 that belongs to Orchestrator233234Do not infer scope by reading code or linked artifacts outside the workflow235scripts. If tracker text plus script output does not contain enough information236to classify safely, choose `needs To Issues`, `needs human decision`, or237`config gap`.238239## Cleanup240241Apply obvious mechanical tracker updates:242243- route orphan issues into the configured project, team, repo label, or parent244 when tracker evidence is direct245- add missing configured labels for route, kind, type, risk, readiness, review246 debt, and worker environment when policy allows247- set exactly one `kind-*` value and clear conflicting kind labels248- keep `kind-spec` and `kind-epic` as containers; never mark containers249 `ready-for-agent`250- normalize issue bodies to the configured agent-ready headings251- preserve useful existing text and add missing headings without inventing facts252- add or preserve estimates only when config grants Issue Triage that authority253- encode dependency blockers from tracker relationships or issue text254- remove completed, canceled, duplicate, or unrelated blockers only when tracker255 state makes that direct256- move complete `kind-slice` issues from configured intake states to the257 configured ready state during every normal triage run when the full readiness258 contract is complete, including the required labels, route, estimate, body,259 and `ready-for-agent`; never promote `kind-spec` or `kind-epic` containers260- move complete `ready-for-agent` `kind-slice` issues from explicitly requested261 Linear Backlog cleanup/backfill scope to the configured ready state when262 config grants promotion authority263- leave parked Linear Backlog or equivalent states alone unless explicitly in264 scope265- move or label not-ready `Todo` issues according to config: `needs-info`,266 `ready-for-human`, configured intake, parked, or To Issues input. Do not leave267 vague tickets in `Todo` with no next owner268- remove `ready-for-agent` from vague, duplicate, parent, human-owned,269 multi-outcome, boundary-incomplete, or body-incomplete issues270- mark implementation-ready slices `ready-for-agent` when no further human271 refinement is needed, even if dependency blockers remain272- reconcile stale tracker state only from tracker evidence or approved script273 output, such as a linked PR merged, an active PR needing review state, a274 changed PR head invalidating review evidence, or a terminal ticket retaining a275 readiness label276- clear readiness labels when moving a ticket to the configured done state277- add, remove, or leave review evidence and human-merge labels only when script278 output provides the current PR head, check, review, draft, and unresolved279 thread state required by config280- add a concise tracker comment only when it helps a human or Orchestrator act281282Do not close, cancel, reprioritize across projects, rewrite product scope, or283move active workflow states unless config or the user explicitly grants that284authority.285286Do not manually verify linked PRs, branch state, CI, deploys, or code. Use only287tracker text and script output. If an issue appears to need verification that the288scripts did not provide, leave an Orchestrator next action such as "verify linked289PR is merged and update status if complete."290291## Readiness Contract292293An issue can receive `ready-for-agent` only when it is:294295- scoped to one PR296- scoped to one primary outcome297- assigned to the configured project, parent, or route298- labeled with one clear kind and required type/risk labels299- estimated when config requires estimates before handoff300- explicit about in-scope and out-of-scope work301- complete enough for Orchestrator to decide startability and dispatch302303Required body content:304305- outcome306- context docs or tracker links307- likely files, packages, or artifacts308- in scope309- out of scope310- acceptance criteria311- required checks312- security, privacy, data, and operational invariants313- dependencies or blockers314- estimate when config stores estimates in the body315316The scope fields must be concrete. `In scope` lists only the behavior, files,317docs, tests, and workflow state this PR may change. `Out of scope` lists318adjacent outcomes, sibling tickets, optional polish, broad refactors, production319actions, and follow-up behavior the worker must not deliver.320321Populate likely files, packages, or artifacts only from existing tracker text,322config, To Issues output, or approved script output. Do not search the repo to323discover them. If they are missing, withhold `ready-for-agent` and leave the324issue for To Issues or human clarification.325326If an issue carries `ready-for-agent` but the body says it is waiting on human327setup, credentials, provider decisions, security judgment, or a328`ready-for-human` rationale, treat the body as the stronger signal. Remove or329withhold `ready-for-agent`, preserve the exact human decision needed, and report330the contradiction.331332## Dependencies333334Encode dependencies from bounded, authoritative evidence:335336- explicit blocker text in the issue337- tracker parent, child, related, blocker, or duplicate relationships338- accepted sequencing in the scoped project's cited specs, roadmap, milestone,339 or project docs340- concrete producer-before-consumer, schema-before-reader, API-before-client, or341 release-order prerequisites stated by those sources342343Use the smallest direct blocker graph that preserves the required order. Remove344terminal blockers when tracker state makes that safe, detect missing direct345edges and cycles, and keep transitive-only edges out unless the tracker requires346them. Do not inspect implementation code, PR diffs, branches, or deploy state to347invent ordering. If the tracker and cited source-of-truth docs still leave the348sequence ambiguous, leave the issue for To Issues or human clarification.349350Dependency blockers do not remove `ready-for-agent` or worker-environment351labels. Encode dependency order with tracker relationships, blocker fields, or352the dependencies/body section so Orchestrator can compute startability.353354When the frozen scope contains implementation `kind-slice` tickets, run the355dependency/startability script over the snapshot or a compact issue JSON:356357```sh358node <skill-dir>/../ziw-orchestrate/scripts/linear-dag-start.mjs <snapshot-or-issues.json> --config <config.json>359```360361Use the DAG result to fix the queue:362363- `starts`: verify the full readiness contract before leaving the issue in364 `Todo` with `ready-for-agent` and handing it to Orchestrator. The DAG checks365 label/state eligibility, not body completeness. Missing structured footprint366 data in the snapshot is distinct from missing likely files/packages/artifacts367 in the issue body. Orchestrator owns footprint derivation and collision-safe368 dispatch, including the unknown-footprint lane its dispatch policy allows.369- `frontier` but not `starts`: repair missing labels, kind, ready state, active370 claim, open-PR metadata, or body fields when safe371- `startableBlockers`: convert each blocker into a ticket repair, a To Issues372 action, a human question, or an Orchestrator next action373- cycles and out-of-scope blockers: encode the correct relationship if direct;374 otherwise mark for human/To Issues375376## Human Clarification377378Ask the user only when a safe tracker update depends on a concrete decision.379Keep questions short and tied to a specific issue.380381If the user is unavailable or the run is non-interactive:382383- add the configured human-input label or state384- add one concise tracker comment only when it helps the human answer385- include the exact question or next action in the final report386- leave the issue out of `ready-for-agent`387388Never fabricate scope, acceptance criteria, likely files, priority, estimates,389or dependency order to make a ticket look ready.390391## Guardrails392393- Scripts first, no ad hoc exploration. Use approved workflow scripts and394 tracker tools. Do not do manual code search, implementation file reads, tests,395 one-off `gh` queries, PR list spelunking, branch checks, CI checks, deploy396 checks, production logs, alerts, security scans, package audits, or397 repo-health sweeps.398- Do not implement code, create PRs, merge, deploy, or mutate production.399- Follow only cited source-of-truth project docs for scope and dependency400 analysis. Do not follow PR, CI, deploy, log, or unrelated external links.401- Do not create noisy comments for small label edits.402- Do not create new label taxonomies unless config or the user explicitly names403 them.404- Stop before destructive bulk changes if more than a small number of issues405 would be canceled, closed, moved across projects, or reprioritized.406407## Done408409Report:410411- scripts run, script inputs, and any script fallback used412- tracker scope reviewed and whether the run was dry-run, partial, or applied413- Linear Backlog or intake states skipped or explicitly included414- issues changed, unchanged, parked, and needing human decision415- orphans routed or left with reasons416- labels, priorities, estimates, body contracts, dependency relationships, and417 status recommendations updated418- ready-state issues made agent-ready or left with exact missing fields419- intake/review-debt issues promoted, left for To Issues, parked, or left for a420 human decision421- issues ready for Orchestrator, blocked-but-ready, missing metadata, missing422 body fields, duplicate, cyclic, or config-blocked423- stale tracker state repaired from script output, including Done/readiness,424 review evidence, and human-merge label repairs425- exact Orchestrator next actions for any linked PR/status verification needed426- final `Todo` handoff: starts, blocked-ready, and not-ready tickets removed or427 marked with their exact next owner428- user questions asked or exact human next actions left