monitor-it
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMonitor it
监控它
Repository identity
仓库身份
Before GitHub access, Git writes/network operations, delegation, or scheduling, read and follow the shared identity instructions. Apply them to invoked upstream skills and every worker.
在访问 GitHub、执行 Git 写入/网络操作、委派任务或调度之前,读取并遵循共享身份说明。将其应用于调用的上游 skill 以及每个 worker。
User questions
用户问题
Before asking or relaying any user question, read and follow the user question rules.
Requires authenticated GitHub CLI (). Monitoring also requires access to the PR's head repository and monitoring-worker and nested implementer subagent support. Accept a spec issue number or an explicit PR URL. Invocation authorizes the scheduled checks, scoped fixes, normal pushes to the PR's head branch, review requests and replies, labels, and assignment described here and in the monitoring workflow. Creating or editing this skill does not authorize execution. Merging is not authorized.
gh在提出或转达任何用户问题之前,读取并遵循用户问题规则。
需要已认证的 GitHub CLI ()。监控还要求具备对 PR 的 head 仓库的访问权限,以及 monitoring-worker 和嵌套 implementer subagent 支持。接受 spec issue 编号或明确的 PR URL。调用即授权本文所述的定时检查、限定范围的修复、向 PR 的 head 分支进行正常推送、审查请求与回复、标签以及任务分配。创建或编辑此 skill 并不构成执行授权。不授权合并。
ghDispatch one cycle
调度一个周期
Read repository instructions and resolve the target repository. Treat numeric input such as as a spec issue number and fetch its authoritative URL, verifying it is an issue. Load when present, verifying its spec URL and repository; recover it from existing worktrees or branch contents when needed. Retain its integration branch, decisions, approved deviations, limitations, validation, and evidence. Resolve the PR through GitHub using the recorded integration head branch or verified links to the spec or its tickets, including closing references. Include open, closed, and merged PRs in lookup. Paginate candidate results and verify repository, issue association, and actual head branch before selecting a unique match. An absent report permits issue-link lookup; an unreadable or conflicting report, incomplete lookup, no match, or multiple matches requires a reported blocker or clarification before mutations. Explicit PR URLs and already verified PR identities from callers or scheduled ticks bypass issue lookup. For explicit PR URLs or verified caller/tick identities, retain the supplied identity without fetching live PR state in this coordinator; the worker verifies identity, head, and current state before acting. Issue lookup fetches only the identity and association needed to select the target. Stored PR entries in implementation reports are unnecessary and are not used for resolution. Attach the PR to this chat when supported. Resolve the absolute paths of references/monitoring-cycle.md and address-it. The worker loads both; this chat loads only this coordinator skill.
#<id>docs/implementations/<id>.mdWhen implementation context is supplied, persist the retained report or durable report pointer, evidence pointers, approved deviations, limitations, and user decisions/constraints in the PR ledger before dispatch. Recover its verified path or initialize from the supplied checkout, recording PR identity. Use the ownership and atomic-write rules below. Verify the saved context and preserve later recorded human decisions. If persistence fails, leave affected work paused and report the failure. Require every worker to recover this context from the supplied ledger and pass relevant decisions and evidence to the resolver.
<git-common-dir>/address-it/<owner>/<repo>/<PR-number>.jsonDispatch one fresh monitoring subagent without inherited conversation history, using when available. Pass both instruction paths, absolute project/checkout and ledger paths when known, PR identity and supplied expected base/head repository, branch, and SHA, authoritative spec/ticket pointers, explicit user constraints/review preference, authorization above, and start/resume or scheduled-tick intent. For scheduled ticks, supply the verified automation ID. Supply a cancellation condition revoking PR-write authorization when monitoring is stopped or superseded. Confirm nested implementer support before dispatch.
fork_turns="none"Wait for its compact result and use its verified state without duplicating its GitHub fetches in this coordinator. Leave PR fetching, feedback resolution, review requests, wait/retry decisions, readiness verification, and PR mutations to the worker. Preserve one active monitoring cycle and implementer per PR; skip overlapping ticks. An interrupted/missing/unverifiable result is incomplete work; recover through a fresh worker after reconciling inactive ownership, without claiming completion.
Before dispatching or resuming work affected by a consequential human answer, persist the actual answer, its scope, source message reference when available, and superseded decision in the ledger under the ownership and atomic-write rules below. Preserve unrelated ledger fields and verify the saved answer. If a cycle is active, interrupt affected work and reconcile ownership before recording the answer. If persistence fails, leave affected work paused and report the failure. Pass the answer explicitly to the next worker; every later worker must recover current decisions from the ledger. An answer changes only its stated scope and does not itself resume stopped monitoring.
读取仓库说明并确定目标仓库。将 之类的数字输入视为 spec issue 编号,获取其权威 URL,并验证它确实是 issue。存在 时加载该文件,同时验证其 spec URL 和仓库;如有必要,从现有 worktree 或分支内容中恢复该文件。保留其中的集成分支、决策、已批准的偏差、限制、验证结果和证据。通过 GitHub 解析 PR,依据是记录的集成 head 分支,或指向 spec 或其 ticket 的已验证链接(包括 closing references)。查找时包括 open、closed 和 merged 状态的 PR。对候选结果进行分页,并在选出唯一匹配项之前验证仓库、issue 关联和实际 head 分支。
#<id>docs/implementations/<id>.md报告缺失时允许进行 issue-link 查找;报告无法读取或内容冲突、查找不完整、无匹配项或出现多个匹配项时,必须先报告阻塞项或请求澄清,然后才能执行变更操作。明确的 PR URL 以及调用方或 scheduled tick 已验证的 PR 身份可绕过 issue 查找。对于明确的 PR URL 或已验证的调用方/tick 身份,在此 coordinator 中保留所提供的身份信息,而不获取 PR 的实时状态;由 worker 在操作前验证身份、head 和当前状态。Issue 查找仅获取选择目标所需的身份和关联信息。实施报告中存储的 PR 条目没有必要,也不用于解析。
支持时,将 PR 关联到当前聊天。确定 references/monitoring-cycle.md 和 address-it 的绝对路径。Worker 加载这两项;当前聊天仅加载此 coordinator skill。
提供了实施上下文时,在调度前,将保留的报告或持久化报告指针、证据指针、已批准的偏差、限制以及用户决策/约束持久化到 PR ledger 中。基于所提供的 checkout,恢复其已验证路径,或初始化 ,并记录 PR 身份。遵循下述所有权和原子写入规则。验证已保存的上下文,并保留后续记录的人工决策。如果持久化失败,让受影响的工作保持暂停并报告失败。要求每个 worker 从所提供的 ledger 中恢复此上下文,并将相关决策和证据传递给 resolver。
<git-common-dir>/address-it/<owner>/<repo>/<PR-number>.json调度一个不继承对话历史的新 monitoring subagent;如果支持,使用 。传递两个说明路径、已知时项目/checkout 和 ledger 的绝对路径、PR 身份以及所提供的预期 base/head 仓库、branch 和 SHA、权威 spec/ticket 指针、明确的用户约束/审查偏好、上文授权,以及 start/resume 或 scheduled-tick 意图。对于 scheduled tick,提供已验证的 automation ID。提供一个取消条件,在监控停止或被取代时撤销 PR 写授权。调度前确认支持嵌套 implementer。
fork_turns="none"等待其返回精简结果,并使用其已验证状态,而不在此 coordinator 中重复获取 GitHub 数据。将 PR 获取、反馈解决、审查请求、等待/重试决策、就绪验证和 PR 变更留给 worker。每个 PR 保持一个活跃监控周期和一个 implementer;跳过重叠的 tick。结果中断、缺失或无法验证时,工作视为未完成;在协调所有权并确认其已非活跃后,通过新的 worker 恢复,但不得声称已完成。
在调度或恢复受重大人工答复影响的工作之前,按照下述所有权和原子写入规则,将实际答复、其适用范围、可用时的来源消息引用以及被取代的决策保存到 ledger 中。保留无关的 ledger 字段并验证已保存的答复。如果某个周期处于活跃状态,先中断受影响的工作并协调所有权,然后再记录答复。如果持久化失败,让受影响的工作保持暂停并报告失败。明确将答复传递给下一个 worker;之后的每个 worker 都必须从 ledger 中恢复当前决策。答复仅改变其明确所述的范围,本身不会恢复已停止的监控。
Schedule and lifecycle
调度与生命周期
A scheduled tick first verifies its automation is active and matches the ledger ID. Paused, deleted, superseded, or unverifiable ticks return without PR writes or schedule changes. Only an explicit start/resume may activate or replace a schedule.
On start/resume, inspect matching schedules and the ledger ID, reconcile pending schedule writes, then dispatch one cycle. Match by chat, repository, and PR. If schedule state cannot be inspected, report the limitation instead of risking duplicates.
If the worker returns active with useful work or a bounded wait, reuse a matching active schedule. Only an explicit start/resume may reactivate a matching paused schedule or create a replacement when none exists. Reconcile duplicates and record the verified ID/status. Persist schedule intents before writing, inspect the result afterward, and reconcile uncertainty before retrying. Use temporary-file atomic ledger replacement under , preserving worker-owned fields and releasing only your own lock; acquire it by atomic directory creation and verify owner inactivity before stale-lock takeover.
<ledger-path>.lockEach heartbeat returns here every 120 seconds and dispatches one fresh worker. Its saved prompt invokes this coordinator by absolute path and includes the absolute monitoring reference, resolver, project and ledger paths, PR identity, spec pointers, authorization, constraints/review preference, scheduled-tick intent, notification rules, and stop conditions. Require the prompt to load implementation context and current human decisions from the ledger; saved constraints are a snapshot and cannot override later recorded answers. Local scheduling requires the machine and desktop app to remain running.
Skipped ownership conflicts leave scheduling unchanged for the next tick. Honor returned retry-after times without resetting deadlines. If scheduling is unavailable and monitoring is still needed, dispatch a worker with that limitation to finish independent work and record the blocked handoff. Relay required human questions once through the User questions procedure; review-mode decisions leave scheduling inactive until explicitly answered/resumed.
Scheduled tick 首先验证其 automation 处于活跃状态且与 ledger ID 匹配。处于暂停、已删除、已被取代或无法验证状态的 tick 直接返回,不执行 PR 写入,也不更改调度。只有明确的 start/resume 才能激活或替换调度。
在 start/resume 时,检查匹配的调度和 ledger ID,协调待处理的调度写入,然后调度一个周期。按聊天、仓库和 PR 进行匹配。如果无法检查调度状态,则报告该限制,而不是冒险产生重复任务。
如果 worker 返回状态为 active,表示有有效工作或处于有界等待中,则复用匹配的活跃调度。只有明确的 start/resume 才能重新激活匹配的暂停调度,或在不存在调度时创建替代调度。协调重复项并记录已验证的 ID/状态。在写入前持久化调度意图,写入后检查结果,并在重试前先核实和协调不确定状态。在 锁的保护下,通过临时文件原子替换 ledger;保留 worker 所有的字段,并且只释放自己持有的锁。通过原子创建目录获取锁,并在接管 stale lock 前验证所有者已非活跃。
<ledger-path>.lock每个 heartbeat 都会在此每隔 120 秒返回,并调度一个全新的 worker。其保存的 prompt 通过绝对路径调用此 coordinator,并包含 monitoring reference 的绝对路径、resolver、项目和 ledger 路径、PR 身份、spec 指针、授权、约束/审查偏好、scheduled-tick 意图、通知规则和停止条件。要求 prompt 从 ledger 加载实施上下文和当前人工决策;已保存的约束只是一份快照,不能覆盖后续记录的答复。本地调度要求机器和桌面应用保持运行。
因所有权冲突而跳过的情形不会改变下一次 tick 的调度。遵守返回的 retry-after 时间,不重置截止时间。如果无法调度但仍需监控,则将这一限制告知 worker,让其完成独立工作并记录受阻交接。按照用户问题流程仅转达一次必须由人工回答的问题;审查模式决策会使调度保持非活跃,直到得到明确答复或执行 resume。
Stop and report
停止与报告
On ready for merge, blocked, closed/merged, needs review-mode decision, or user stop, disable every matching monitor and verify inactivity. On user stop, interrupt the active worker and its implementer before shutdown, preserving ledger, branch, and unpublished work. Report shutdown failures; unverifiable terminal writes or shutdown prevent claiming completed handoff/readiness. Resume only through Schedule and lifecycle.
Report the compact verified outcome, PR URL/head SHA, meaningful changes, and required action. Active monitoring is incomplete delivery. Stay quiet while state is unchanged/non-actionable; notify on verified pushes, readiness/handoff, closure/merge, new failures, or required decisions. Report unchanged blockers once. Keep detailed evidence in the ledger rather than rereading it into this chat.
When changing behavior, evaluate the shared offline behavior checks offline, without GitHub or schedule writes.
当 PR 已可合并、受阻、已关闭/合并、需要审查模式决策或用户要求停止时,禁用所有匹配的 monitor 并验证其已停止。在用户停止时,先中断活跃的 worker 及其 implementer,再关停,以保留 ledger、分支和未发布的工作。报告关停失败;无法验证的最终写入或关停意味着不得宣称已完成交接/就绪。只能通过“调度与生命周期”恢复。
报告精简且已验证的结果、PR URL/head SHA、有意义的更改和所需操作。监控处于 active 状态时,表示交付尚未完成。状态未变化或无需操作时保持安静;仅在经核验的 push、就绪/交接、关闭/合并、新出现的失败或需要作出决策时通知。对未变化的阻塞项仅报告一次。将详细证据保留在 ledger 中,而不是将其重新读到此聊天中。
更改行为时,离线评估共享离线行为检查,不进行 GitHub 写入或调度写入。