[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F1G7NZMJPJ51NAJWRFD2C4":3,"skill-same:01M7F1G7NZMJPJ51NAJWRFD2C4":52},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7F1G7NZMJPJ51NAJWRFD2C4","loopx-project",null,"Use when connecting a repository or project goal document to LoopX, maintaining project-local goal state, refreshing stale dashboard status, syncing local projects into the shared global registry, or diagnosing LoopX CLI\u002FPATH\u002Fstatus\u002Fhistory issues across multiple repos. For registering durable project materials such as Lark\u002Fwiki\u002Fdesign docs, prefer the narrower loopx-doc-registry skill.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Floopx-project\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: loopx-project\ndescription: Use when connecting a repository or project goal document to LoopX, maintaining project-local goal state, refreshing stale dashboard status, syncing local projects into the shared global registry, or diagnosing LoopX CLI\u002FPATH\u002Fstatus\u002Fhistory issues across multiple repos. For registering durable project materials such as Lark\u002Fwiki\u002Fdesign docs, prefer the narrower loopx-doc-registry skill.\n---\n\n# LoopX Project Workflow\n\nUse this skill when the task mentions LoopX, loopx, a project goal\ndocument, multi-project dashboard\u002Fstatus, stale latest run,\n`.loopx\u002Fregistry.json`, `.codex\u002Fgoals`, `refresh-state`,\n`sync-global`, or connecting a new repo. If the task is mainly about reading,\nremembering, recording, indexing, or registering a durable project material,\nload `loopx-doc-registry` and use that narrower workflow first.\n\nLoopX has two layers:\n\n- **Project-local state**: each repo owns `.loopx\u002Fregistry.json` and\n  `.codex\u002Fgoals\u002F\u003Cgoal-id>\u002FACTIVE_GOAL_STATE.md`.\n- **Shared local control plane**: `~\u002F.codex\u002Floopx` stores run history and\n  `registry.global.json` for multi-project status.\n\nDo not manually copy one project's registry entry into another project. Local\n`connect` and `refresh-state` should sync into the shared global registry\nautomatically.\n\n## Slash Command Fallback\n\nWhen the visible user message is exactly a LoopX slash command or starts with a\nLoopX slash command plus arguments, do not treat it as ordinary chat.\n\nRecognized project-local goal-start command:\n\n- `\u002Floopx \u003Cgoal text>`\n- `\u002Floopx --capability-route issue-fix \u003Cgoal text>`\n\nRecognized repo-review commands:\n\n- `\u002Floopx-pr-review`\n- `\u002Floopx-pr-review \u003Ctime window or filter text>`\n\nIf the text after `\u002Floopx` begins with the exact optional prefix\n`--capability-route issue-fix`, remove only that prefix from the goal text and\npass it as the explicit start-goal route switch. Otherwise every non-whitespace\ncharacter after `\u002Floopx` is goal text. Never infer a product capability route\nfrom issue\u002FPR wording, URLs, or semantic similarity. Do not downgrade either\nform into a status or inspection turn.\n\n`start-goal --project` keeps the requested project route, including a linked\ngit worktree, so a fresh task cannot inherit an older worktree's goal.\nLower-level diagnostic command packs may still report a canonical\n`canonical_project_alias` \u002F `source_registry` route. Do not manually replace\neither route with an unadvertised bootstrap command.\n\nFrom the target project root, pass the text after `\u002Floopx` as the explicit\ngoal-start objective before planning or writing project state:\n\n```bash\nloopx start-goal --guided --project . --goal-text \"\u003CGOAL_TEXT>\"\n```\n\nAppend `--capability-route issue-fix` only when the caller supplied that exact\nexplicit route switch.\n\nInclude `--goal-id \u003CSTABLE_GOAL_ID>` when known. Codex App automatically reads\nthe stable ambient `CODEX_THREAD_ID`; other hosts that expose a stable opaque\nthread id should pass it as `--thread-id \u003CHOST_THREAD_ID>` on every `\u002Floopx`\ninvocation. If that thread is already bound, reuse the returned\n`--agent-id \u003CREGISTERED_AGENT_ID>` on start, heartbeat, quota, refresh-state,\nand Todo commands. Include `--agent-id \u003CREGISTERED_AGENT_ID>` only when the\ncurrent session already owns that identity, the thread binding resolves to it,\nor the user explicitly asks to take over that exact agent's work.\n\nWhen a stable thread id is present but has no binding, treat it as a new host\nsession and follow the returned fresh-registration default. Select an existing\nlane only when the user explicitly requests takeover of that exact agent, then\nbind it with the returned `bind-agent-thread` command. When no thread id is\navailable, preserve the fail-closed identity gate and never infer takeover from\nregistry order or the only registered lane; pass `--new-peer` only when the\nuser explicitly requests fresh onboarding on that unboundable host. Choose a\nfresh public-safe id, preview then execute `register-agent`, and\nrequire the `--require-new --execute` result to report `ok=true`, `changed=true`,\n`written=true`, successful global sync, and verified registration readback\nbefore rerunning `start-goal` with that new id. A preview is advisory and never\nallows continuation. If\n`start-goal --guided` is not available, refresh the local LoopX CLI or use the\nchecked-out LoopX repository CLI for validation; do not silently downgrade\n`\u002Floopx \u003Cgoal text>` into a bare `\u002Floopx` read-only command. Use\n`loopx bootstrap-command-pack --project . --goal-text \"\u003CGOAL_TEXT>\"` only when\nimplementing or debugging the lower-level host handoff packet.\n\nIf the connected goal later needs a wider or corrected write boundary, do not\nrerun `loopx bootstrap --force` just to change scope. Use the incremental\nconfiguration path instead:\n\n```bash\nloopx configure-goal \\\n  --goal-id \u003CSTABLE_GOAL_ID> \\\n  --write-scope \"\u003CSAFE_WRITE_SCOPE>\" \\\n  --execute\n```\n\nIf a destructive reconnect is explicitly required, pass `--preserve-todos` with\n`--force` unless the user intends to rebuild the active state file and discard\nexisting todo projection.\n\n`\u002Floopx \u003Cgoal text>` is an explicit goal-start intent: first produce a concise\nordered plan, then write todos in priority order, using planner order plus\n`todo add` write order as the same-priority tie-breaker. For broad or fuzzy\nproduct directions, use a small public-safe planning set; for clear bounded\nproblems, use the minimum sufficient ordered todo plan and avoid\nmanagement-only filler.\n\nGlobal manager slash commands such as `\u002Floopx-global-summary`,\n`\u002Floopx-global-gates`, `\u002Floopx-global-todos`, and `\u002Floopx-global-risks` are not\nproject bootstrap commands. Route them to the global manager command contract\nor status summary surface instead of `bootstrap-command-pack`. Legacy\n`\u002Floop-global-*` forms may be treated as aliases, but canonical help and\npackets should use `\u002Floopx-global-*`.\n\nRepo-review slash commands are also not project bootstrap commands. If the\nvisible request starts with `\u002Floopx-pr-review`, stop this project-bootstrap\nworkflow and load the narrower `loopx-pr-review` skill. That skill owns the\nrequired first command, packet-preservation rules, and five-block per-PR review\ncontract. Do not handle `\u002Floopx-pr-review` from this broader project skill, and\ndo not route it to `loopx-pr-merge` unless the user later asks to approve,\ncomment on, merge, self-merge, or admin-bypass a specific PR.\n\nWhen the request asks to inventory, prioritize, document, or continuously\nmonitor a delivery program spanning several PRs or MRs, load the narrower\n`loopx-pr-program` skill after the project goal transaction is established.\nThat skill owns provider-neutral snapshots, grouped monitor state, material\nchange detection, and roadmap projection. Keep deep per-change review in\n`loopx-pr-review` and provider mutations in the separately authorized workflow.\n\nWhen a user has just connected a project, receives a guided start packet, or\nreceives a bootstrap command pack for the first time, briefly tell them the\nusable commands instead of assuming they will inspect CLI help:\n\n- `\u002Floopx \u003Cgoal text>`: start a concrete goal with a plan-before-todo-write\n  flow.\n- `\u002Floopx-global-summary`: read the global progress digest.\n- `\u002Floopx-global-gates`, `\u002Floopx-global-todos`, `\u002Floopx-global-risks`: inspect\n  manager-level gates, work, and risks.\n- `\u002Floopx-pr-review`: use the `loopx-pr-review` skill to run `loopx pr-review`\n  and review unmerged\u002Fmerged PR groups one by one.\n\nFor command-line discovery, use:\n\n```bash\nloopx slash-commands\n```\n\n## Register Project Authority And Material Sources\n\nWhen a project agent discovers a durable design document, research note,\nbenchmark paper, owner packet, migration report, or external material that\nfuture agents may need for routing, validation, or conflict resolution, treat\nthat as a doc-registry skill trigger. Identify the target project and goal\nfirst; do not register material into the current meta goal just because this\nworker found it.\n\nFor material owned by the current project, update the project-local doc registry\nor equivalent authority map first, then register the compact redacted source\ncontract in the same project's ignored `.loopx\u002Fregistry.json`:\n\n```bash\nloopx register-authority-source --goal-id \u003CSTABLE_GOAL_ID> ...\n```\n\nFor another project's DOC_REGISTRY-style map, import only the compact authority\nsummary instead of copying raw paths, document ids, URLs, comments, or source\nbodies:\n\n```bash\nloopx import-doc-registry-authority --goal-id \u003CSTABLE_GOAL_ID> ...\n```\n\nAfter registration, refresh status or state so review packets, read-only maps,\nand heartbeat workers can find the new authority without relying on chat\nmemory. Stop and write a project-local todo or blocker when the target project\nis ambiguous, the source cannot be represented as public-safe metadata, or the\nnext step would require reading a gated source body.\n\n## Owner-Facing Explore Views\n\nTreat the canonical Explore topology and an owner-facing decision graph as two\ndifferent read models over one evidence source:\n\n- canonical JSON, Mermaid, and Nodes\u002FEdges\u002FFindings tables preserve complete\n  public-safe node identity, evidence, and lineage;\n- focused status\u002Ftag exports are bounded evidence subsets, not executive views\n  by default;\n- an executive graph applies semantic compression for operator decisions. It\n  should show the decision contract, baseline\u002Fincumbent, decisive negative\n  evidence, active work or capacity, material risk, terminal gate, and next\n  decision. Semantic compression may tighten labels and remove true\n  duplication, but it must preserve material decision and evidence nodes plus\n  their lineage.\n\nNever overwrite an executive whiteboard directly from a full or focused\ncanonical export unless a declared presentation contract proves that the\nexport already carries those semantic roles. For a recurring sync, keep a\nproject-local display contract with required roles, stable canonical ids,\nsemantic sections or linked subgraphs, and a non-identity guard. The default\ncardinality policy is graph growth: do not omit or merge away a material node\nbecause the graph crossed a generic count such as 20 nodes. A hard\n`max_nodes` or `max_edges` limit is valid only as an explicit opt-in\npresentation policy with declared scope and overflow behavior; absent that\npolicy, treat those limits as unbounded.\n\nRender with the target renderer, run overlap and text-overflow checks, inspect\nthe actual preview, then sync and verify the remote source or digest. Repair a\nfailed readability check by relayout, shorter labels, larger frames, or more\nsemantic subgraphs, not by deleting material evidence. If any check still\nfails, keep the previous owner view; do not publish a structurally valid but\nunreadable graph.\n\nThis separation does not transfer quota, todo, launch, stop, or promotion\nauthority into the presentation layer. Record material experiment transitions\nin canonical Explore state first, then refresh the executive projection.\n\n## Preflight\n\nResolve the host command once before project work. On native Windows PowerShell\n7, keep the installed `loopx.ps1` directory on the Windows user `PATH` and run:\n\n```powershell\nloopx doctor\n```\n\nWhen the current Windows executor is not PowerShell, preserve the same entry by\ncalling PowerShell 7 explicitly:\n\n```text\npwsh.exe -NoLogo -NoProfile -File \"$HOME\u002F.local\u002Fbin\u002Floopx.ps1\" doctor\n```\n\nIf the Windows entry is missing, run the trusted checkout installer from\nPowerShell 7, then start a fresh host process so it inherits the user `PATH`:\n\n```powershell\npwsh -NoLogo -NoProfile -File .\\scripts\\install-windows.ps1 -Python (Get-Command python).Source -AddToUserPath\nloopx doctor\n```\n\nOn POSIX hosts, use the existing shell entry:\n\n```bash\nexport PATH=\"$HOME\u002F.local\u002Fbin:$PATH\"\nloopx doctor\n```\n\nIf `loopx` is not on PATH:\n\n```bash\ninstall_script=\"$HOME\u002Floopx\u002Fscripts\u002Finstall-local.sh\"\nif [ -x \"$install_script\" ]; then\n  \"$install_script\"\n  export PATH=\"$HOME\u002F.local\u002Fbin:$PATH\"\nfi\nloopx doctor\n```\n\nIf this still fails, report the exact missing piece and do not fake a successful\nconnection.\n\n## Diagnose For The User\n\nWhen the user asks whether LoopX is working, whether a project can\nself-drive, why it is stuck, or says \"diagnose LoopX\", do not hand the\nuser shell commands. Run the diagnostic surfaces yourself and then reason from\nthe evidence.\n\nPrefer the agent-facing packet:\n\n```bash\nloopx diagnose\n```\n\nIf the target goal is known:\n\n```bash\nloopx diagnose --goal-id \u003CSTABLE_GOAL_ID>\n```\n\nThe `diagnose` command is not the final judge. It returns compact\n`status`, `quota should-run`, todo, interaction-contract, and boundary signals\nplus a reasoning checklist. Use those signals as evidence, then answer in your\nown words:\n\n- whether the project can currently self-drive;\n- what evidence supports that conclusion;\n- what blocks autonomous delivery or self-repair;\n- the exact user\u002Fcontroller question, if one is projected;\n- what the agent will do next.\n\nOnly claim autonomous readiness when your reasoning confirms that the user gate\ndoes not block the selected path, quota permits a turn, `goal_boundary` allows\nthe work, and there is a concrete agent todo or recommended action. If\n`diagnose` cannot read status\u002Fquota, repair installation, PATH, registry path,\nor project connection first; do not infer readiness from chat memory.\n\n## Before Spending Automatic Compute\n\nBefore a heartbeat, scheduled tick, long-running adapter, or autonomous project\nagent spends another delivery turn, ask LoopX whether this goal is\neligible:\n\n```bash\nloopx --format json --registry \"$HOME\u002F.codex\u002Floopx\u002Fregistry.global.json\" quota should-run --goal-id \u003CSTABLE_GOAL_ID>\n```\n\nFor a registered multi-agent goal, include this agent's identity:\n\n```bash\nloopx --format json --registry \"$HOME\u002F.codex\u002Floopx\u002Fregistry.global.json\" quota should-run --goal-id \u003CSTABLE_GOAL_ID> --agent-id \u003CREGISTERED_AGENT_ID>\n```\n\nIf a registered goal returns `automation_prompt_upgrade.required=true`, treat\nthe installed automation prompt as stale and regenerate it with\n`heartbeat-prompt --agent-id ... --agent-scope ...`.\n\nIf the default `loopx` payload contradicts the just-merged source checkout or a\n`PYTHONPATH=\u003Ccheckout> python3 -m loopx.cli ...` cross-check, pause delivery and\nrun `loopx doctor` before trusting quota. The installed command is normally a\nrelease snapshot wrapper, so a self-merged fix may require refreshing the local\ninstall from latest trusted `origin\u002Fmain` with `loopx update --execute --ref main`\nor a clean main checkout's `scripts\u002Finstall-local.sh`; rerun the default `loopx`\ncommand after the refresh and only spend quota after the runtime payload matches\nthe repaired source behavior. A dirty or non-main checkout is canary-only by\ndefault. Use `LOOPX_PROMOTE_DEFAULT=1 scripts\u002Finstall-local.sh` only after the\ncheckout has passed its promotion validation and the default replacement is an\nintentional write.\n\nOn native Windows, automatic archive update and rollback are fail-closed. Update\nthe trusted checkout, rerun `scripts\u002Finstall-windows.ps1`, and verify the new\nrelease with `loopx doctor --deep` before spending quota.\n\nIf the response has `state=operator_gate`, treat it as a user\u002Fcontroller\ninteraction, not a silent skip. Read `gate_prompt`, `operator_question`,\n`recommended_action`, `next_handoff_condition`, `missing_gates`, and\n`user_todo_summary` and `agent_todo_summary` when present, then ask the concrete gate in Chinese unless\nthe same unresolved question was already surfaced in the recent visible thread.\nBefore repeating a public PR merge-approval gate, reconcile it against current\ncompact PR lifecycle state. When the todo has a merge-scoped decision such as\n`direction:action:merge_pr_\u003Cnumber>` and the public PR URL is unambiguous, run:\n\n```bash\nloopx issue-fix pr-gate-reconcile \\\n  --goal-id \u003CSTABLE_GOAL_ID> \\\n  --todo-id \u003CUSER_GATE_TODO_ID> \\\n  --url \u003CPUBLIC_GITHUB_PR_URL> \\\n  --fetch-metadata \\\n  --execute\n```\n\nThen rerun `quota should-run`. The command may complete only the matching\n`user_gate`, and only after compact public metadata reports `MERGED` or\n`CLOSED`; it records no body, comments, logs, provider payload, or external\nwrite. If the URL is ambiguous or the public read fails, preserve the gate and\nsurface that exact resolution failure instead of claiming the owner still needs\nto approve an already-terminal PR.\nOnly when `interaction_contract.user_channel.action_required=true` or\n`user_todo_summary.open_count > 0`, the notification must name concrete payload\ntodo(s)\u002Fquestions, never only \"owner gate\"; if those required user-facing items\nare not projected, say \"具体 user todo 未投影，需修复 LoopX 状态投影\"; never\nsay \"no new user action\" for this case. When\n`interaction_contract.user_channel.action_required=false` and\n`user_todo_summary.open_count=0`, allow \"无用户待办\u002F无需通知\" or a quiet\nno-notification result; do not imply a state projection bug. Do not run\n`agent_command`, adapter work,\nwrite-control, production actions, or the gated path while asking.\n\nPrefer the guard's `interaction_contract` when present. It is the current\nmachine-readable protocol for the user \u002F agent \u002F LoopX CLI split:\n`interaction_contract.user_channel` says whether to ask the user,\n`agent_channel` says whether Codex must attempt work or may quiet no-op, and\n`cli_channel` says which CLI transition and spend policy apply. Treat older\nfields such as `execution_obligation`, `heartbeat_recommendation`,\n`work_lane_contract`, and `goal_boundary` as compatibility\u002Fdrill-down fields\nunder that contract, not as competing sources of truth.\n\nIf the response has `should_run=false` and not `safe_bypass_allowed=true`, do\nnot run implementation or adapter work for that goal in this turn. When\nrunning from a heartbeat, pass its `\u003Ccurrent_time_iso>` as\n`quota should-run --turn-instance-id \u003CHEARTBEAT_TURN_ID>` and reuse that id for\nsame-heartbeat retries. This commits one idempotent receipt on every heartbeat;\nwhen `effective_action=monitor_quiet_skip`, the same guard also commits the\nno-spend stall observation and returns the follow-up decision. Follow\n`autonomous_replan_required` \u002F `execution_obligation.must_attempt_work=true` if\nthe guard exposes it. If `heartbeat_receipt.status=write_failed`, retry with the\nsame turn id rather than manually appending another poll. Otherwise quietly\nreport or record the public-safe `reason` only when there is no operator gate to\nask. Keep the heartbeat\nautomation active: unchanged monitor-only polls are liveness-preserving no-ops,\nnot self-stop signals. If the command exits non-zero, fail closed: run\n`loopx doctor` \u002F `loopx status` and fix status collection before\nspending compute.\n\nIf the response has `state=operator_gate` and `safe_bypass_allowed=true`, the\ngate blocks only the gated delivery path. After the gate has already been\nsurfaced, you may still read the active state and do one bounded safe-bypass\nstep from the Priority Stack, such as read-only steering analysis,\ndocumentation, or another P0\u002FP1 item that does not depend on that gate. If that\nsafe-bypass step actually spends automatic compute, validate it, write back\nprogress\u002Fcritic\u002Fnext action, optionally refresh state, and append one quota\nspend event. If `user_todo_summary.open_count > 0`, the safe-bypass report must\ninclude those existing open user todos and must not say there is \"no new user\naction\". If `agent_todo_summary.open_count > 0`, use it as the project agent's\nsafe follow-up checklist instead of mining chat history or an overlong Next\nAction.\n\nIf the response has `safe_bypass_kind=outcome_floor_recovery` or\n`heartbeat_recommendation.recommended_mode=outcome_floor_recovery`, the outcome\nfloor blocks surface-only delivery but permits one bounded recovery attempt:\nproduce the required ranker\u002Fcross-domain evidence artifact named by\n`quota.must_advance`, or write back the concrete blocker that prevents that\nartifact. Avoid summary\u002Fqueue\u002Fcontract propagation and synthetic-only test\nchains. Spend exactly once only after validated evidence\u002Fblocker writeback.\n\nThis guard is only a compute-allocation check. It does not grant write\npermission, bypass operator gates, or replace run-bound human reward. Operator\ngates block the gated delivery path, not unrelated safe steering work.\nFor an eligible current goal, dependency or sibling-goal todos must not consume the whole eligible turn.\nRecord or surface those todos as dependency blockers,\nbut continue the steering audit and choose a gate-independent\nP0\u002FP1\u002FP2 candidate for the current goal when one exists. Stop before delivery\nonly when the open user\u002Fowner todo belongs to the current goal's guard payload\nor project asset and blocks the selected delivery path.\nRoutine public repo publication is a boundary decision, not a standing operator\ngate: when the active state permits the step, validation passes, and the\npublic\u002Fprivate boundary scan is clean, commit, push, and PR creation can proceed\nautonomously. Stop for private or company-internal material, credentials,\ndestructive git operations, production actions, or repository rules that\nexplicitly require review.\nUse the shared global registry for this guard so the project agent reads the\nsame operator gates, user todos, agent todos, and quota state as the dashboard. This does\nnot mean all project work is global: `todo add`, `refresh-state`, adapter runs,\nand project-file reads still use the project-local state\u002Fregistry and then sync\nthe public-safe projection back into the global control plane. If two projects\nshare a `goal_id`, treat that as a registry health bug and fix the id\u002Fsource\nmapping.\n\nIf `should_run=true`, do not simply continue the nearest previous TODO. Read the\nactive state's Priority Stack, recent progress, and critic, then run a short\nsteering audit before choosing work: list at least three plausible next-action\ncandidates across different P0\u002FP1\u002FP2 lanes when useful; if the same topic has\nconsumed several recent delivery slices, apply a continuation check and state\nwhy continuing still wins; keep compute quota separate from focus quota; record\nany losing high-value candidate that should not be forgotten. Include a product\nbottleneck lens: ask whether the core goal is currently bottlenecked by user\nexperience, agent capability, evidence quality, adapter readiness, or\npriority-rule gaps, and promote one concrete bottleneck candidate when it should\noutrank the nearest local TODO. Then choose exactly one bounded, verifiable step\nfrom that audit.\n\nWhen you tell the user a connected LoopX plan, top-todo list, priority\nstack, or route change, treat that as a writeback trigger, not chat memory. If\nthe plan contains concrete future P0\u002FP1\u002FP2 work, user actions, route decisions,\nor deprecations, update active-state todos \u002F Next Action \u002F `refresh-state`\nbefore the final response, or explicitly say why the plan is only speculative\nand was not written. Use `loopx todo add` \u002F `todo update` for durable\nwork items; do not leave them only in prose, a review doc, or a Lark\u002Fchat\nreply.\n\nFor connected delivery goals, also read `goal_boundary` from the\n`quota should-run` payload before choosing a step. It carries the registry's\nadapter status, allowed write scope, parent-approval scopes, guards, and stop\ncondition. Treat it as the project-specific boundary contract so automation\nprompts can stay short instead of repeating long per-project protected-scope\nlists.\nWhen reading status or quota routing, use `attention_queue.items` and\n`project_asset` as current authority only when the item is project-asset-backed.\nIf `project_asset` is absent or the source is legacy\u002Fraw fallback, do not infer\nowner, gate, or stop-condition authority from raw queue fields.\n\n## Set Up Recurring Heartbeats\n\nWhen the exact host is Codex App connected to a remote workspace over SSH and\n`automation_update` is unavailable because of that host boundary, use the\nvisible Goal integration instead of reporting a missing-automation blocker:\n\n```bash\nloopx --format json agent-onboard \\\n  --agent-type codex-app-ssh \\\n  --project . \\\n  --goal-id \u003CSTABLE_GOAL_ID> \\\n  --agent-id \u003CREGISTERED_AGENT_ID>\n```\n\nRun the returned `activation_input_command`, read `task_body`, and set the\ncurrent visible task to `\u002Fgoal \u003Ctask_body>`. In Codex App, use the available\nGoal control directly; do not ask the user to run `heartbeat-prompt` or paste\nthe body manually when the host exposes Goal control. Surface the exact\npasteable gate only when Goal control is also unavailable.\n\nThe generated `codex_app_ssh_goal` body is bounded by the `\u002Fgoal` 4000-character\nlimit. It uses an interactive `agent_cli_loop` scheduler context, omits\nheartbeat turn receipts, and must not create\u002Fupdate automations, apply RRULE\ncadence, or invent `LOOPX_TURN`.\n\nWhen a user or controller wants a recurring Codex App heartbeat for a connected\ngoal, prefer the generator instead of hand-copying the quota lifecycle:\n\n```bash\nloopx heartbeat-prompt --goal-id \u003CSTABLE_GOAL_ID>\n```\n\nThe default generated body is thin when the target Codex agent can inspect\nLoopX state and CLI output itself. Passing `--thin` remains accepted and\nexplicit:\n\n```bash\nloopx heartbeat-prompt --thin --goal-id \u003CSTABLE_GOAL_ID>\n```\n\nUse the compact body after reviewing the full generated contract when the\ninstalled prompt should carry more lifecycle detail inline:\n\n```bash\nloopx heartbeat-prompt --compact --goal-id \u003CSTABLE_GOAL_ID>\n```\n\nIf the installed automation body still needs to be smaller, use the brief body:\n\n```bash\nloopx heartbeat-prompt --brief --goal-id \u003CSTABLE_GOAL_ID>\n```\n\nFor a shared-control-plane goal with `coordination.registered_agents`, always\ninclude the registered identity and scope in the installed automation prompt:\n\n```bash\nloopx heartbeat-prompt --thin --goal-id \u003CSTABLE_GOAL_ID> \\\n  --agent-id \u003CREGISTERED_AGENT_ID> \\\n  --agent-scope \"\u003CTHIS_AGENT_SCOPE>\"\n```\n\nOnce agents are registered, an unscoped `heartbeat-prompt` call fails closed so\nstale automations surface an upgrade error instead of running without identity.\n\nFor connected goals, omit `--active-state`; the CLI resolves the active state\nfrom the registry goal `state_file`, which keeps installed automations from\npinning a stale path. Pass `--active-state \u003CACTIVE_GOAL_STATE_PATH>` only for\ndetached state files, migration checks, or compatibility tests.\n\nCopy the generated task body into the Codex App heartbeat automation. The thin\nbody is the installed default for trusted local workers: it keeps the automation\nprompt project-agnostic and tells Codex to re-read registry\u002Fglobal quota truth,\nactive state, status\u002Frun history, repo state, and project signals on each\nwakeup. Use `--full` for the expanded audit source. The compact body is useful\nwhen context pressure matters but the installed prompt should still carry the\nquota, gate, blocker-push, recommendation, steering-audit, writeback, refresh,\nand spend lifecycle inline. The brief body keeps only preflight\u002Fguard, core\ninvariants, and spend accounting in the installed prompt while delegating\ndetailed branches back to the generated compact\u002Ffull contracts.\nThe generated guard and spend commands explicitly use the shared global\nregistry so project heartbeats read the same operator gates and user todos as\nthe dashboard, regardless of their current repo. Completed heartbeat delivery\nspends through `quota spend-slot --source heartbeat --execute`, not through a\nnatural-language report. Quota slots are minute-granularity by default: minute\nheartbeats spend `--slots 1`, while coarser fixed-interval automations should\nspend the scheduler minutes consumed by that completed turn.\n\nKeep project-specific behavior out of the automation prompt. Encode local\ndifferences in the project registry, `.codex\u002Fgoals\u002F\u003Cgoal-id>\u002FACTIVE_GOAL_STATE.md`,\nadapter output, or narrow public\u002Fprivate boundary rules. If a lifecycle rule is\nuseful across projects, update `loopx heartbeat-prompt` and its smoke\ncontract rather than hand-editing one heartbeat automation.\nFor delivery-specific boundaries, prefer the registry fields surfaced in\n`quota should-run.goal_boundary`; the automation prompt only needs to say to\nobey that payload and stop when useful work falls outside it.\n\nWhen a LoopX client\u002Fprompt contract changes, update the matching smoke\ncoverage in the same patch. Interface-budget and regression constraints belong\nin lightweight smoke scripts such as `examples\u002Fcontrol_plane\u002Fheartbeat-prompt-smoke.py`,\n`examples\u002Fcontrol_plane\u002Fquota-plan-smoke.py`, or `examples\u002Fcontrol_plane\u002Fquota-contract-smoke.py`; heavier\nCodex CLI plus LoopX end-to-end checks should stay explicit or\nlow-frequency instead of becoming the default heartbeat path.\n\nThe quota guard returns `execution_obligation` and\n`heartbeat_recommendation`. It also returns `scheduler_hint`, which controls\nthe next wakeup cadence and external-loop unchanged-poll self-stop; this is\nscheduling policy, not delivery permission. Codex CLI TUI and Claude Code loops\nshould run the final quota\u002Freplan check from `scheduler_hint` before applying\ntheir `after_limit`; if the guard changes or returns `run_now`, follow the new\nquota contract instead of stopping. Codex App heartbeat workers should\nsearch\u002Fuse `automation_update` when available. If\n`scheduler_hint.action=stop_until_explicit_resume` and\n`scheduler_hint.codex_app.host_action=pause_or_delete_current_heartbeat`, call\n`automation_update` once to pause the current heartbeat (delete only when the\nhost cannot pause), verify the host result, spend no quota, and end the turn.\nThis terminal host action takes precedence over RRULE handling and requires no\nscheduler ACK. Otherwise use `automation_update` only when\n`scheduler_hint.codex_app.stateful_backoff.apply_needed=true` and\n`scheduler_hint.codex_app.recommended_rrule` is present. After a successful\nRRULE update, run `loopx` with\n`scheduler_hint.codex_app.ack_hint.cli_args` (normally `quota scheduler-ack-current`,\nwhich re-reads the latest scheduler hint instead of hand-copying short-lived\nreset tokens). Attempt the host update at most once per hint and turn. If it\nfails or times out, do not retry or ACK; run\n`scheduler_hint.codex_app.failure_hint.cli_args` once. That no-spend writeback\nrecords the failed target\u002Fobserved-host pair so later heartbeats suppress the\nexact repeat until either value changes. Continue allowed delivery under the\nobserved host cadence. If\n`apply_needed=false` but `ack_needed=true`, a matching host\nreadback already proves the RRULE; skip `automation_update` and run the bound\nack hint directly. LoopX owns reset\u002Fprogression state\nand omits `recommended_rrule` when the desired RRULE is already applied.\nCadence changes, reset-to-initial updates, final checks, and self-stop changes\ndo not spend quota.\nFor a uniquely matched active Codex App heartbeat, `quota should-run`\nautomatically reconciles the installed RRULE with LoopX's ACK ledger. Treat\n`stateful_backoff.host_observation.status=drift_detected` as authoritative for\ncadence repair; a stale or premature ACK must not suppress `apply_needed`.\nWhen readback matches a reset RRULE that is not yet bound in scheduler state,\nthe ack hint carries the exact reset token, identity signature, and CLI route;\nmissing readback must not use this shortcut.\nThis readback is cadence-only and never exposes the automation prompt or grants\nLoopX permission to edit Codex App files directly.\n\nRead\n`execution_obligation` before\ndeciding on a quiet no-op:\n`heartbeat_recommendation.notify` is only the user-notification policy, not an\nexecution gate. If\n`execution_obligation.must_attempt_work=true`, attempt one bounded progress\nbatch or segment even when `notify=DONT_NOTIFY`; a quiet no-op requires\n`execution_obligation.must_attempt_work=false` and no\n`notify_user_on_open_todo=true` blocker-push notification. New connected read-only goals\nshould follow `recommended_mode=run_first_read_only_map`: run one real\n`loopx read-only-map --goal-id \u003CSTABLE_GOAL_ID>`, validate the saved\n`read_only_project_map`, spend exactly once after validation, then sync or\nrefresh state if needed. Already mapped goals should follow\n`recommended_mode=mapped_noop_if_unchanged`: if there is no new instruction,\nowner evidence, agent todo, stale source, or safe handoff, return a quiet no-op\nwithout another dry-run, file edit, or quota spend.\n\nThe generated task body also carries a no-progress self-repair guard. More\nimportantly, `quota should-run` may expose a hard\n`autonomous_replan_obligation` \u002F `execution_obligation.must_attempt_work=true`\ncontract when active state or public run history shows repeated typed no-progress\nturns. Quiet future-monitor heartbeat receipts are liveness evidence only;\n`dead_monitor_repeat` counts unchanged due\u002Fexternal monitor executions with a\nconcrete Todo or target identity at its declared threshold. Obey that machine\ncontract before another quiet no-op: run one\nbounded self-repair\u002Freplan batch through implementation, validation, and\nwriteback when that boundary is clear, then spend once. Do not stop at the first\ntiny substep when the repair has an obvious validation boundary. Cancel or\npause the heartbeat automation only after 2 consecutive stalled turns (the same\nrepair path stuck for 2 more eligible turns); explain the no-progress loop with\n`NOTIFY`, and skip quota spend for that self-cancel turn.\nThe same generated task body also makes routine public commit, push, and PR\ncreation autonomous after validation plus a clean public\u002Fprivate boundary scan.\nDo not reintroduce a user gate for public-safe publication itself.\nIt also respects `notify_user_on_open_todo=true`: open user todos in\nfocus-wait, waiting, or external-evidence lanes should become a compact\nblocker-push `NOTIFY` with at most three items, while skipping delivery work\nand quota spend for that blocker-push turn. If the payload includes\n`open_todo_notification_policy=repeat_until_resolved`, repeat that `NOTIFY`\nuntil the todo is done, deferred, or replaced. When\nthe user confirms that an existing review or action already happened, write\nback that exact todo immediately: complete only with an explicit typed decision,\notherwise supersede the stale gate without granting authority; then refresh\nstate and rerun quota so a successor or autonomous replan can surface. When\n`user_gate_notification_cooldown.notification_suppressed=true`, preserve the\npending gate but return quiet `DONT_NOTIFY`; the bounded reminder window or a\nmaterial gate\u002Fhost change reopens the notification. Other blocker-push cases may\nstill be de-duplicated when the same blocker was already surfaced recently.\nEligible monitor-only no-transition polls keep user todos visible in the\npayload but should stay quiet unless a material transition appears.\n\nKeep the Codex App visible goal text short, for example\n`按 ACTIVE_GOAL_STATE.md，基于 LoopX 体系，推进项目`. Do not use that short\ntext as the automation body. Across projects, the automation body should be the\nsame generated lifecycle prompt with only `goal_id`, `active_state`, and narrow\nproject boundary rules changed. When a project appears to need a custom\nautomation branch, treat that as a LoopX product gap first, not as a\nreason to paste one-off control logic into the scheduler.\n\n## Generate A Review Packet\n\nWhen a project agent, controller thread, or local shell needs the current\noperator packet, prefer the CLI packet over asking the user to find a dashboard\ncopy button:\n\n```bash\nloopx review-packet --goal-id \u003CSTABLE_GOAL_ID>\n```\n\nFor machine-readable inspection, put the global format flag before the\nsubcommand:\n\n```bash\nloopx --format json review-packet --goal-id \u003CSTABLE_GOAL_ID>\n```\n\nWhen the human\u002Fcontroller decision is already approved and the only remaining\nstep is to relay the target-agent instruction, use the minimal handoff form:\n\n```bash\nloopx review-packet --goal-id \u003CSTABLE_GOAL_ID> --handoff-only\n```\n\nThis command is read-only. It packages the current status into the same Review\nPacket shape as the dashboard; it does not append human reward, append an\noperator gate, refresh state, grant write-control, or authorize production\nactions. `--handoff-only` only strips the human decision wrapper from markdown\noutput; JSON output returns a minimized handoff payload with `handoff_text`\ninstead of the full operator packet. If the selected queue item is legacy\u002Fraw\nfallback rather than project-asset-backed, do not treat raw queue fields as\nowner, gate, or stop-condition authority.\n\nRead the packet in order:\n\n- `人只需判断`: the user or controller decides in the dashboard\u002Foperator view or\n  trusted local shell. A target project agent cannot self-approve this section.\n- `用户本地 Gate 记录草稿`: a local preview for the user\u002Fcontroller. The target\n  project agent must not run this draft as its own command.\n- `给项目 Agent`: the executable handoff context only after the packet's\n  forwarding condition is already satisfied. If its stop condition fires, stop\n  and report the exact blocker instead of continuing.\n\n## Connect A New Project\n\n1. Read the project goal document and inspect the repo narrowly.\n2. Extract a stable `goal_id`, one-line `objective`, `domain`, authority\n   sources, validation surfaces, first safe action, and public\u002Fprivate\n   boundary.\n3. Run `connect` from the project root. Prefer read-only until the goal doc\n   explicitly authorizes mutation:\n\n```bash\nloopx connect \\\n  --goal-id \u003CSTABLE_GOAL_ID> \\\n  --objective \"\u003COBJECTIVE_FROM_GOAL_DOC>\" \\\n  --domain \u003CDOMAIN> \\\n  --goal-doc \u003CGOAL_DOC_PATH> \\\n  --adapter-kind read_only_project_map_v0 \\\n  --adapter-status connected-read-only\n```\n\n`connect` should create or update the local registry\u002Fstate and auto-sync the\npublic-safe entry into `~\u002F.codex\u002Floopx\u002Fregistry.global.json`.\n\nOne repository can host multiple peer-owned goals, such as delivery and a\nlow-conflict validation lane. Run `connect` once per stable `goal_id`; keep one\nshared `.loopx\u002Fregistry.json`, but use one active state per goal:\n\n```text\n.codex\u002Fgoals\u002F\u003Cdelivery-goal-id>\u002FACTIVE_GOAL_STATE.md\n.codex\u002Fgoals\u002F\u003Cvalidation-goal-id>\u002FACTIVE_GOAL_STATE.md\n```\n\nDo not reuse one `state_file` for two goal ids. `loopx registry` treats\nthat as a health error, and `read-only-map` checks the selected goal's own\n`.codex\u002Fgoals\u002F\u003Cgoal-id>\u002F` directory so one healthy lane does not hide another\nlane's missing state.\n\nIf the goal state or registry contains private evidence, add `.loopx\u002F`\nand `.codex\u002Fgoals\u002F` to that project's `.gitignore`.\n\nFor a generic read-only connection, create the first non-generic map run:\n\n```bash\nloopx read-only-map --goal-id \u003CSTABLE_GOAL_ID>\n```\n\nThis reads registry metadata, the active state, and a bounded project-file\ninventory, then appends a `read_only_project_map` run. Use it before writing a\nproject-specific adapter when the dashboard would otherwise stay on\n`state_refreshed` or `connected_without_run`.\n\nFor a planned high-complexity adapter, preview the same bounded map before\ncontroller opt-in:\n\n```bash\nloopx read-only-map --goal-id \u003CSTABLE_GOAL_ID> --dry-run\n```\n\nIf the adapter status is `planned`, only the `--dry-run` preview is allowed and\nthe result should include `opt_in_required=true`. Do not append a real map until\nthe user or target controller has moved the adapter to `read-only-map-ready`,\n`connected-read-only`, or `connected`. Relay the returned `residual_risks`\nlabels directly; do not invent a separate free-form risk summary.\n\nWhen the user or target controller answers the opt-in gate, record that answer\nbefore handing the command to another project agent:\n\n```bash\nloopx operator-gate \\\n  --goal-id \u003CSTABLE_GOAL_ID> \\\n  --decision approve \\\n  --reason-summary \"\u003CPUBLIC_SAFE_CHINESE_REASON>\" \\\n  --dry-run\n```\n\nUse `approve`, `reject`, or `defer`. The dry-run writes nothing; the real append\ncreates an `operator_gate_*` compact run so `loopx status` and the\ndashboard can tell whether the project agent may run the approved command. This\nis not a human reward signal and does not grant write-control.\n\n## Qualify Non-Trivial Final Diffs\n\nBefore a non-trivial delivery or merge, inspect the current goal configuration.\nWhen `change_quality_qualification.enabled` is true, load\n`loopx-change-quality` and follow its exact-scope workflow:\n\n```bash\nloopx --format json change-quality prepare \\\n  --goal-id \u003CSTABLE_GOAL_ID> \\\n  --repo-path .\n```\n\nThe policy keeps two decisions separate: `safe_fix` permits at most one bounded\nrepair pass, while `strict_receipt` requires a passing receipt for the exact\nfinal diff. Any edit invalidates the old fingerprint. Record and verify the\nfinal receipt, then pass `--goal-id \u003CSTABLE_GOAL_ID>` to `canary premerge`.\n\nIf the host cannot load skills, use the self-contained prepare packet as the\nreview contract. Turn may carry the packet or receipt reference, but it does\nnot own policy or enforcement. Do not invent a receipt, reuse one from an older\ndiff, or turn subjective style advice into a blocker.\n\n## Refresh State After Non-Adapter Work\n\nIf the agent updated `ACTIVE_GOAL_STATE.md`, a progress ledger, a planning doc,\nor external coordination state without producing a new adapter run, append a\nstate-only refresh:\n\n```bash\nloopx refresh-state --goal-id \u003CSTABLE_GOAL_ID> --agent-id \u003CREGISTERED_AGENT_ID>\n```\n\nFor multi-agent goals, keep the same `--agent-id` envelope that passed\n`quota should-run`. This default is an agent-lane refresh. To update the\ngoal-level route or durable `## Next Action`, any registered peer may add\n`--progress-scope goal`.\n\nIf that refresh records a validated progress artifact rather than a pure\nstate-only note, include a public-safe classification and explicit delivery\nhints so status, review packets, and quota guards do not infer scale\u002Foutcome\nfrom the classification name:\n\n```bash\nloopx refresh-state \\\n  --goal-id \u003CSTABLE_GOAL_ID> \\\n  --classification \u003CPUBLIC_SAFE_PROGRESS_CLASSIFICATION> \\\n  --delivery-batch-scale \u003CACTUAL_DELIVERY_BATCH_SCALE> \\\n  --delivery-outcome \u003CACTUAL_DELIVERY_OUTCOME> \\\n  --agent-id \u003CREGISTERED_AGENT_ID> \\\n  --progress-scope goal\n```\n\nReplace all three placeholders from the current validated turn. Never default\nor upgrade a smaller\u002Fpreparatory turn to `multi_surface` \u002F `outcome_progress`\njust because those values would satisfy a delivery floor.\n\nIf the current run may write local LoopX state but its runtime boundary forbids\nconfigured external sink writes, keep `explore_graph.enabled` unchanged and add\n`--suppress-external-sinks`. This preserves canonical local graph projection,\nrecords the run-scoped authorization boundary, and leaves sink digests pending\nfor a later authorized refresh. Do not toggle the goal-level Graph setting as a\none-off workaround for an external-write boundary.\n\nUse `delivery_outcome` as a machine enum, not as prose:\n\n- `surface_only`: docs, contracts, smokes, setup, or preparation moved, but the\n  primary product\u002Fcase result did not.\n- `outcome_gap`: the run should have advanced the primary result but ended with\n  a concrete blocker or missing outcome.\n- `outcome_progress`: primary result evidence advanced materially, but the\n  selected stage is not fully complete.\n- `primary_goal_outcome`: the selected stage's primary result is complete,\n  validated, and written back.\n\nDo not rely on `classification` names such as `*_contract_v0_delivered` to carry\nthis meaning. `classification` is a human\u002Fhistory label; `delivery_outcome` is\nthe control-plane signal consumed by quota, status, and review packets.\n\nThis fixes stale dashboards where the latest run still shows an old\n`ready_for_controller_opt_in` or similar state. It also auto-syncs the project\nentry into the global registry. If you do not pass `--recommended-action`, the\nrefresh run should publish the first local-control-plane item from\n`## Next Action` as the compact dashboard action, including wrapped continuation\nlines. `recommended_action` may include private\u002Flocal routing references needed\nby the individual operator, but must not include credentials, auth headers, or\ninline secrets; shareable\u002Fpublic projections are responsible for redaction.\n\nFor complex projects, do not pack a whole user reading queue into\n`## Next Action`. Keep the first Next Action item as one routing sentence, then\nuse the CLI to write explicit checkbox sections instead of hand-editing section\nnames:\n\n```bash\nloopx todo add \\\n  --goal-id \u003CSTABLE_GOAL_ID> \\\n  --role user \\\n  --text \"Read the short review packet before approving delivery.\"\n\nloopx todo add \\\n  --goal-id \u003CSTABLE_GOAL_ID> \\\n  --role agent \\\n  --text \"Build the next read-only worksheet after the user decision is recorded.\"\n```\n\nThe CLI creates the canonical section when needed and avoids duplicate exact\ntodo text. The resulting Markdown shape is:\n\n```md\n## User Todo \u002F Owner Review Reading Queue\n\n- [ ] Read the short review packet.\n- [ ] Record the owner decision in the worksheet.\n\n## Agent Todo\n\n- [ ] Build the next read-only worksheet after the user decision is recorded.\n```\n\n`loopx status` lifts those sections into `user_todos` and `agent_todos`.\nThe dashboard uses `user_todos` for the first-screen human checklist; project\nagents should read `agent_todos` only after health, operator gates, evidence,\nand quota allow execution.\n\nFor non-trivial feature work, prefer todo succession over extra lifecycle\nstates. When a slice merges or validates, complete the current todo only after\ncreating the next concrete agent\u002Fuser todo for rollout, product-path audit,\ndocs, telemetry, benchmark proof, or operator decision; if there is truly no\nfollow-up, write a compact no-follow-up rationale in the completion note.\nAn open feature PR that is waiting for ordinary human review does not by itself\nblock further project work. Complete the feature slice with its validated PR\nevidence, derive the review reminder with `--next-user-todo ...` and\n`--next-user-task-class user_action`, and keep a runnable agent successor. Add\na separate `continuous_monitor` for PR lifecycle readback. Use `user_gate` only\nfor an exact authority boundary such as merging an aggregate experiment branch\ninto `main`, release, benchmark launch, credentials, or protected production\naction. A stable experiment integration branch may collect feature PRs from\nisolated worktrees; keep the aggregate PR to `main` as the final review gate.\nWhen the next agent slice is not yet known, keep the bound `user_action`\nvisible without converting it into a gate. If bounded no-progress evidence\naccumulates while the agent frontier is empty, follow\n`autonomous_replan_required` and produce one typed semantic outcome. If the\nprojected frontier owns a concrete target, create and claim that runnable agent\ntodo, binding it to the projected `obligation_id` with\n`--replan-obligation-id \u003Cexact-id>`, a typed `--action-kind`, and a stable\n`--target-key` or Explore node ref. The atomic Todo mutation is the semantic\nreceipt; do not add a second repair ACK. When no executable target is known,\nuse the projected typed semantic or coverage-backed terminal writeback rather\nthan creating a Todo whose task is merely to replan. Only authoritative typed\nterminal-closure evidence may replace that Todo writeback with explicit\nno-follow-up.\n`successor_todo_ids` records lineage only: linking successors does not suspend\nan open parent. When splitting a parent into explicit successors, decide whether\nthe parent still has an independent immediate action. If it does not, explicitly\ndefer it with a supported `resume_when` or complete it; do not infer aggregate\nsemantics from successor links alone. Treat `parent_successor_advisory` in the\n`todo update` response as the machine-readable authoring reminder for this\ndecision, not as a new persisted lifecycle state.\n\n## Record Human Reward\n\nWhen the user gives a clear reward judgment for an exact run, first validate\nthe overlay and active-state writeback:\n\n```bash\nloopx reward \\\n  --goal-id \u003CSTABLE_GOAL_ID> \\\n  --run-generated-at \u003CRUN_GENERATED_AT> \\\n  --decision \u003CDECISION_LABEL> \\\n  --reward positive \\\n  --reason-summary \"\u003CPUBLIC_SAFE_CHINESE_REASON>\" \\\n  --follow-up \"\u003CPUBLIC_SAFE_NEXT_ACTION>\" \\\n  --write-active-state-summary \\\n  --dry-run\n```\n\nOnly after the user has explicitly approved recording the reward, rerun without\n`--dry-run`. The durable source of truth is still the run-bound\n`human_reward` overlay. The active-state writeback is a `Progress Ledger`\nsummary for future agents; project agents should read the reward through the\nreturned `project_agent_visibility.history_command`.\n\n## Multi-Project Status\n\nInside a project:\n\n```bash\nloopx status\n```\n\nTo focus the status projection on one goal while preserving global health\nfields, pass the goal id:\n\n```bash\nloopx --format json status --goal-id \u003CSTABLE_GOAL_ID>\n```\n\nOutside a project, `loopx status` should fall back to:\n\n```text\n~\u002F.codex\u002Floopx\u002Fregistry.global.json\n```\n\nUse explicit sync only for diagnosis or recovery:\n\n```bash\nloopx sync-global\n```\n\nIf status shows `unregistered_runtime_goal`:\n\n- If the project is active, run `loopx sync-global` or reconnect from\n  that project's local registry.\n- If the runtime record is obsolete, preview cleanup with\n  `loopx archive-runtime --goal-id \u003CGOAL_ID>` and only execute cleanup\n  when that is clearly intended.\n\n## Validation\n\nAfter connect or refresh, run the smallest useful set:\n\n```bash\nloopx registry\nloopx status\nloopx check --scan-path \u003CPUBLIC_SAFE_FILE_OR_DIR>\n```\n\nFor multi-project UI updates, refresh the dashboard status JSON from the global\nregistry:\n\n```bash\nloopx --registry \"$HOME\u002F.codex\u002Floopx\u002Fregistry.global.json\" \\\n  --format json status > \u003Cdashboard>\u002Fpublic\u002Fstatus.local.json\n```\n\n## Reporting\n\nReport in Chinese when the user is reviewing:\n\n- changed files and whether they are public or local-private;\n- validation commands and results;\n- how the goal appears in dashboard or attention queue;\n- the next safe action;\n- any missing gates before decision-advisor or write-controller behavior.\n\nNever include credentials, private docs, raw internal links, production task\nids, or raw local evidence in public repo docs or examples.\n","# LoopX Project Workflow\n\nUse this skill when the task mentions LoopX, loopx, a project goal\ndocument, multi-project dashboard\u002Fstatus, stale latest run,\n`.loopx\u002Fregistry.json`, `.codex\u002Fgoals`, `refresh-state`,\n`sync-global`, or connecting a new repo. If the task is mainly about reading,\nremembering, recording, indexing, or registering a durable project material,\nload `loopx-doc-registry` and use that narrower workflow first.\n\nLoopX has two layers:\n\n- **Project-local state**: each repo owns `.loopx\u002Fregistry.json` and\n  `.codex\u002Fgoals\u002F\u003Cgoal-id>\u002FACTIVE_GOAL_STATE.md`.\n- **Shared local control plane**: `~\u002F.codex\u002Floopx` stores run history and\n  `registry.global.json` for multi-project status.\n\nDo not manually copy one project's registry entry into another project. Local\n`connect` and `refresh-state` should sync into the shared global registry\nautomatically.\n\n## Slash Command Fallback\n\nWhen the visible user message is exactly a LoopX slash command or starts with a\nLoopX slash command plus arguments, do not treat it as ordinary chat.\n\nRecognized project-local goal-start command:\n\n- `\u002Floopx \u003Cgoal text>`\n- `\u002Floopx --capability-route issue-fix \u003Cgoal text>`\n\nRecognized repo-review commands:\n\n- `\u002Floopx-pr-review`\n- `\u002Floopx-pr-review \u003Ctime window or filter text>`\n\nIf the text after `\u002Floopx` begins with the exact optional prefix\n`--capability-route issue-fix`, remove only that prefix from the goal text and\npass it as the explicit start-goal route switch. Otherwise every non-whitespace\ncharacter after `\u002Floopx` is goal text. Never infer a product capability route\nfrom issue\u002FPR wording, URLs, or semantic similarity. Do not downgrade either\nform into a status or inspection turn.\n\n`start-goal --project` keeps the requested project route, including a linked\ngit worktree, so a fresh task cannot inherit an older worktree's goal.\nLower-level diagnostic command packs may still report a canonical\n`canonical_project_alias` \u002F `source_registry` route. Do not manually replace\neither route with an unadvertised bootstrap command.\n\nFrom the target project root, pass the text after `\u002Floopx` as the explicit\ngoal-start objective before planning or writing project state:\n\n```bash\nloopx start-goal --guided --project . --goal-text \"\u003CGOAL_TEXT>\"\n```\n\nAppend `--capability-route issue-fix` only when the caller supplied that exact\nexplicit route switch.\n\nInclude `--goal-id \u003CSTABLE_GOAL_ID>` when known. Codex App automatically reads\nthe stable ambient `CODEX_THREAD_ID`; other hosts that expose a stable opaque\nthread id should pass it as `--thread-id \u003CHOST_THREAD_ID>` on every `\u002Floopx`\ninvocation. If that thread is already bound, reuse the returned\n`--agent-id \u003CREGISTERED_AGENT_ID>` on start, heartbeat, quota, refresh-state,\nand Todo commands. Include `--agent-id \u003CREGISTERED_AGENT_ID>` only when the\ncurrent session already owns that identity, the thread binding resolves to it,\nor the user explicitly asks to take over that exact agent's work.\n\nWhen a stable thread id is present but has no binding, treat it as a new host\nsession and follow the returned fresh-registration default. Select an existing\nlane only when the user explicitly requests takeover of that exact agent, then\nbind it with the returned `bind-agent-thread` command. When no thread id is\navailable, preserve the fail-closed identity gate and never infer takeover from\nregistry order or the only registered lane; pass `--new-peer` only when the\nuser explicitly requests fresh onboarding on that unboundable host. Choose a\nfresh public-safe id, preview then execute `register-agent`, and\nrequire the `--require-new --execute` result to report `ok=true`, `changed=true`,\n`written=true`, successful global sync, and verified registration readback\nbefore rerunning `start-goal` with that new id. A preview is advisory and never\nallows continuation. If\n`start-goal --guided` is not available, refresh the local LoopX CLI or use the\nchecked-out LoopX repository CLI for validation; do not silently downgrade\n`\u002Floopx \u003Cgoal text>` into a bare `\u002Floopx` read-only command. Use\n`loopx bootstrap-command-pack --project . --goal-text \"\u003CGOAL_TEXT>\"` only when\nimplementing or debugging the lower-level host handoff packet.\n\nIf the connected goal later needs a wider or corrected write boundary, do not\nrerun `loopx bootstrap --force` just to change scope. Use the incremental\nconfiguration path instead:\n\n```bash\nloopx configure-goal \\\n  --goal-id \u003CSTABLE_GOAL_ID> \\\n  --write-scope \"\u003CSAFE_WRITE_SCOPE>\" \\\n  --execute\n```\n\nIf a destructive reconnect is explicitly required, pass `--preserve-todos` with\n`--force` unless the user intends to rebuild the active state file and discard\nexisting todo projection.\n\n`\u002Floopx \u003Cgoal text>` is an explicit goal-start intent: first produce a concise\nordered plan, then write todos in priority order, using planner order plus\n`todo add` write order as the same-priority tie-breaker. For broad or fuzzy\nproduct directions, use a small public-safe planning set; for clear bounded\nproblems, use the minimum sufficient ordered todo plan and avoid\nmanagement-only filler.\n\nGlobal manager slash commands such as `\u002Floopx-global-summary`,\n`\u002Floopx-global-gates`, `\u002Floopx-global-todos`, and `\u002Floopx-global-risks` are not\nproject bootstrap commands. Route them to the global manager command contract\nor status summary surface instead of `bootstrap-command-pack`. Legacy\n`\u002Floop-global-*` forms may be treated as aliases, but canonical help and\npackets should use `\u002Floopx-global-*`.\n\nRepo-review slash commands are also not project bootstrap commands. If the\nvisible request starts with `\u002Floopx-pr-review`, stop this project-bootstrap\nworkflow and load the narrower `loopx-pr-review` skill. That skill owns the\nrequired first command, packet-preservation rules, and five-block per-PR review\ncontract. Do not handle `\u002Floopx-pr-review` from this broader project skill, and\ndo not route it to `loopx-pr-merge` unless the user later asks to approve,\ncomment on, merge, self-merge, or admin-bypass a specific PR.\n\nWhen the request asks to inventory, prioritize, document, or continuously\nmonitor a delivery program spanning several PRs or MRs, load the narrower\n`loopx-pr-program` skill after the project goal transaction is established.\nThat skill owns provider-neutral snapshots, grouped monitor state, material\nchange detection, and roadmap projection. Keep deep per-change review in\n`loopx-pr-review` and provider mutations in the separately authorized workflow.\n\nWhen a user has just connected a project, receives a guided start packet, or\nreceives a bootstrap command pack for the first time, briefly tell them the\nusable commands instead of assuming they will inspect CLI help:\n\n- `\u002Floopx \u003Cgoal text>`: start a concrete goal with a plan-before-todo-write\n  flow.\n- `\u002Floopx-global-summary`: read the global progress digest.\n- `\u002Floopx-global-gates`, `\u002Floopx-global-todos`, `\u002Floopx-global-risks`: inspect\n  manager-level gates, work, and risks.\n- `\u002Floopx-pr-review`: use the `loopx-pr-review` skill to run `loopx pr-review`\n  and review unmerged\u002Fmerged PR groups one by one.\n\nFor command-line discovery, use:\n\n```bash\nloopx slash-commands\n```\n\n## Register Project Authority And Material Sources\n\nWhen a project agent discovers a durable design document, research note,\nbenchmark paper, owner packet, migration report, or external material that\nfuture agents may need for routing, validation, or conflict resolution, treat\nthat as a doc-registry skill trigger. Identify the target project and goal\nfirst; do not register material into the current meta goal just because this\nworker found it.\n\nFor material owned by the current project, update the project-local doc registry\nor equivalent authority map first, then register the compact redacted source\ncontract in the same project's ignored `.loopx\u002Fregistry.json`:\n\n```bash\nloopx register-authority-source --goal-id \u003CSTABLE_GOAL_ID> ...\n```\n\nFor another project's DOC_REGISTRY-style map, import only the compact authority\nsummary instead of copying raw paths, document ids, URLs, comments, or source\nbodies:\n\n```bash\nloopx import-doc-registry-authority --goal-id \u003CSTABLE_GOAL_ID> ...\n```\n\nAfter registration, refresh status or state so review packets, read-only maps,\nand heartbeat workers can find the new authority without relying on chat\nmemory. Stop and write a project-local todo or blocker when the target project\nis ambiguous, the source cannot be represented as public-safe metadata, or the\nnext step would require reading a gated source body.\n\n## Owner-Facing Explore Views\n\nTreat the canonical Explore topology and an owner-facing decision graph as two\ndifferent read models over one evidence source:\n\n- canonical JSON, Mermaid, and Nodes\u002FEdges\u002FFindings tables preserve complete\n  public-safe node identity, evidence, and lineage;\n- focused status\u002Ftag exports are bounded evidence subsets, not executive views\n  by default;\n- an executive graph applies semantic compression for operator decisions. It\n  should show the decision contract, baseline\u002Fincumbent, decisive negative\n  evidence, active work or capacity, material risk, terminal gate, and next\n  decision. Semantic compression may tighten labels and remove true\n  duplication, but it must preserve material decision and evidence nodes plus\n  their lineage.\n\nNever overwrite an executive whiteboard directly from a full or focused\ncanonical export unless a declared presentation contract proves that the\nexport already carries those semantic roles. For a recurring sync, keep a\nproject-local display contract with required roles, stable canonical ids,\nsemantic sections or linked subgraphs, and a non-identity guard. The default\ncardinality policy is graph growth: do not omit or merge away a material node\nbecause the graph crossed a generic count such as 20 nodes. A hard\n`max_nodes` or `max_edges` limit is valid only as an explicit opt-in\npresentation policy with declared scope and overflow behavior; absent that\npolicy, treat those limits as unbounded.\n\nRender with the target renderer, run overlap and text-overflow checks, inspect\nthe actual preview, then sync and verify the remote source or digest. Repair a\nfailed readability check by relayout, shorter labels, larger frames, or more\nsemantic subgraphs, not by deleting material evidence. If any check still\nfails, keep the previous owner view; do not publish a structurally valid but\nunreadable graph.\n\nThis separation does not transfer quota, todo, launch, stop, or promotion\nauthority into the presentation layer. Record material experiment transitions\nin canonical Explore state first, then refresh the executive projection.\n\n## Preflight\n\nResolve the host command once before project work. On native Windows PowerShell\n7, keep the installed `loopx.ps1` directory on the Windows user `PATH` and run:\n\n```powershell\nloopx doctor\n```\n\nWhen the current Windows executor is not PowerShell, preserve the same entry by\ncalling PowerShell 7 explicitly:\n\n```text\npwsh.exe -NoLogo -NoProfile -File \"$HOME\u002F.local\u002Fbin\u002Floopx.ps1\" doctor\n```\n\nIf the Windows entry is missing, run the trusted checkout installer from\nPowerShell 7, then start a fresh host process so it inherits the user `PATH`:\n\n```powershell\npwsh -NoLogo -NoProfile -File .\\scripts\\install-windows.ps1 -Python (Get-Command python).Source -AddToUserPath\nloopx doctor\n```\n\nOn POSIX hosts, use the existing shell entry:\n\n```bash\nexport PATH=\"$HOME\u002F.local\u002Fbin:$PATH\"\nloopx doctor\n```\n\nIf `loopx` is not on PATH:\n\n```bash\ninstall_script=\"$HOME\u002Floopx\u002Fscripts\u002Finstall-local.sh\"\nif [ -x \"$install_script\" ]; then\n  \"$install_script\"\n  export PATH=\"$HOME\u002F.local\u002Fbin:$PATH\"\nfi\nloopx doctor\n```\n\nIf this still fails, report the exact missing piece and do not fake a successful\nconnection.\n\n## Diagnose For The User\n\nWhen the user asks whether LoopX is working, whether a project can\nself-drive, why it is stuck, or says \"diagnose LoopX\", do not hand the\nuser shell commands. Run the diagnostic surfaces yourself and then reason from\nthe evidence.\n\nPrefer the agent-facing packet:\n\n```bash\nloopx diagnose\n```\n\nIf the target goal is known:\n\n```bash\nloopx diagnose --goal-id \u003CSTABLE_GOAL_ID>\n```\n\nThe `diagnose` command is not the final judge. It returns compact\n`status`, `quota should-run`, todo, interaction-contract, and boundary signals\nplus a reasoning checklist. Use those signals as evidence, then answer in your\nown words:\n\n- whether the project can currently self-drive;\n- what evidence supports that conclusion;\n- what blocks autonomous delivery or self-repair;\n- the exact user\u002Fcontroller question, if one is projected;\n- what the agent will do next.\n\nOnly claim autonomous readiness when your reasoning confirms that the user gate\ndoes not block the selected path, quota permits a turn, `goal_boundary` allows\nthe work, and there is a concrete agent todo or recommended action. If\n`diagnose` cannot read status\u002Fquota, repair installation, PATH, registry path,\nor project connection first; do not infer readiness from chat memory.\n\n## Before Spending Automatic Compute\n\nBefore a heartbeat, scheduled tick, long-running adapter, or autonomous project\nagent spends another delivery turn, ask LoopX whether this goal is\neligible:\n\n```bash\nloopx --format json --registry \"$HOME\u002F.codex\u002Floopx\u002Fregistry.global.json\" quota should-run --goal-id \u003CSTABLE_GOAL_ID>\n```\n\nFor a registered multi-agent goal, include this agent's identity:\n\n```bash\nloopx --format json --registry \"$HOME\u002F.codex\u002Floopx\u002Fregistry.global.json\" quota should-run --goal-id \u003CSTABLE_GOAL_ID> --agent-id \u003CREGISTERED_AGENT_ID>\n```\n\nIf a registered goal returns `automation_prompt_upgrade.required=true`, treat\nthe installed automation prompt as stale and regenerate it with\n`heartbeat-prompt --agent-id ... --agent-scope ...`.\n\nIf the default `loopx` payload contradicts the just-merged source checkout or a\n`PYTHONPATH=\u003Ccheckout> python3 -m loopx.cli ...` cross-check, pause delivery and\nrun `loopx doctor` before trusting quota. The installed command is normally a\nrelease snapshot wrapper, so a self-merged fix may require refreshing the local\ninstall from latest trusted `origin\u002Fmain` with `loopx update --execute --ref main`\nor a clean main checkout's `scripts\u002Finstall-local.sh`; rerun the default `loopx`\ncommand after the refresh and only spend quota after the runtime payload matches\nthe repaired source behavior. A dirty or non-main checkout is canary-only by\ndefault. Use `LOOPX_PROMOTE_DEFAULT=1 scripts\u002Finstall-local.sh` only after the\ncheckout has passed its promotion validation and the default replacement is an\nintentional write.\n\nOn native Windows, automatic archive update and rollback are fail-closed. Update\nthe trusted checkout, rerun `scripts\u002Finstall-windows.ps1`, and verify the new\nrelease with `loopx doctor --deep` before spending quota.\n\nIf the response has `state=operator_gate`, treat it as a user\u002Fcontroller\ninteraction, not a silent skip. Read `gate_prompt`, `operator_question`,\n`recommended_action`, `next_handoff_condition`, `missing_gates`, and\n`user_todo_summary` and `agent_todo_summary` when present, then ask the concrete gate in Chinese unless\nthe same unresolved question was already surfaced in the recent visible thread.\nBefore repeating a public PR merge-approval gate, reconcile it against current\ncompact PR lifecycle state. When the todo has a merge-scoped decision such as\n`direction:action:merge_pr_\u003Cnumber>` and the public PR URL is unambiguous, run:\n\n```bash\nloopx issue-fix pr-gate-reconcile \\\n  --goal-id \u003CSTABLE_GOAL_ID> \\\n  --todo-id \u003CUSER_GATE_TODO_ID> \\\n  --url \u003CPUBLIC_GITHUB_PR_URL> \\\n  --fetch-metadata \\\n  --execute\n```\n\nThen rerun `quota should-run`. The command may complete only the matching\n`user_gate`, and only after compact public metadata reports `MERGED` or\n`CLOSED`; it records no body, comments, logs, provider payload, or external\nwrite. If the URL is ambiguous or the public read fails, preserve the gate and\nsurface that exact resolution failure instead of claiming the owner still needs\nto approve an already-terminal PR.\nOnly when `interaction_contract.user_channel.action_required=true` or\n`user_todo_summary.open_count > 0`, the notification must name concrete payload\ntodo(s)\u002Fquestions, never only \"owner gate\"; if those required user-facing items\nare not projected, say \"具体 user todo 未投影，需修复 LoopX 状态投影\"; never\nsay \"no new user action\" for this case. When\n`interaction_contract.user_channel.action_required=false` and\n`user_todo_summary.open_count=0`, allow \"无用户待办\u002F无需通知\" or a quiet\nno-notification result; do not imply a state projection bug. Do not run\n`agent_command`, adapter work,\nwrite-control, production actions, or the gated path while asking.\n\nPrefer the guard's `interaction_contract` when present. It is the current\nmachine-readable protocol for the user \u002F agent \u002F LoopX CLI split:\n`interaction_contract.user_channel` says whether to ask the user,\n`agent_channel` says whether Codex must attempt work or may quiet no-op, and\n`cli_channel` says which CLI transition and spend policy apply. Treat older\nfields such as `execution_obligation`, `heartbeat_recommendation`,\n`work_lane_contract`, and `goal_boundary` as compatibility\u002Fdrill-down fields\nunder that contract, not as competing sources of truth.\n\nIf the response has `should_run=false` and not `safe_bypass_allowed=true`, do\nnot run implementation or adapter work for that goal in this turn. When\nrunning from a heartbeat, pass its `\u003Ccurrent_time_iso>` as\n`quota should-run --turn-instance-id \u003CHEARTBEAT_TURN_ID>` and reuse that id for\nsame-heartbeat retries. This commits one idempotent receipt on every heartbeat;\nwhen `effective_action=monitor_quiet_skip`, the same guard also commits the\nno-spend stall observation and returns the follow-up decision. Follow\n`autonomous_replan_required` \u002F `execution_obligation.must_attempt_work=true` if\nthe guard exposes it. If `heartbeat_receipt.status=write_failed`, retry with the\nsame turn id rather than manually appending another poll. Otherwise quietly\nreport or record the public-safe `reason` only when there is no operator gate to\nask. Keep the heartbeat\nautomation active: unchanged monitor-only polls are liveness-preserving no-ops,\nnot self-stop signals. If the command exits non-zero, fail closed: run\n`loopx doctor` \u002F `loopx status` and fix status collection before\nspending compute.\n\nIf the response has `state=operator_gate` and `safe_bypass_allowed=true`, the\ngate blocks only the gated delivery path. After the gate has already been\nsurfaced, you may still read the active state and do one bounded safe-bypass\nstep from the Priority Stack, such as read-only steering analysis,\ndocumentation, or another P0\u002FP1 item that does not depend on that gate. If that\nsafe-bypass step actually spends automatic compute, validate it, write back\nprogress\u002Fcritic\u002Fnext action, optionally refresh state, and append one quota\nspend event. If `user_todo_summary.open_count > 0`, the safe-bypass report must\ninclude those existing open user todos and must not say there is \"no new user\naction\". If `agent_todo_summary.open_count > 0`, use it as the project agent's\nsafe follow-up checklist instead of mining chat history or an overlong Next\nAction.\n\nIf the response has `safe_bypass_kind=outcome_floor_recovery` or\n`heartbeat_recommendation.recommended_mode=outcome_floor_recovery`, the outcome\nfloor blocks surface-only delivery but permits one bounded recovery attempt:\nproduce the required ranker\u002Fcross-domain evidence artifact named by\n`quota.must_advance`, or write back the concrete blocker that prevents that\nartifact. Avoid summary\u002Fqueue\u002Fcontract propagation and synthetic-only test\nchains. Spend exactly once only after validated evidence\u002Fblocker writeback.\n\nThis guard is only a compute-allocation check. It does not grant write\npermission, bypass operator gates, or replace run-bound human reward. Operator\ngates block the gated delivery path, not unrelated safe steering work.\nFor an eligible current goal, dependency or sibling-goal todos must not consume the whole eligible turn.\nRecord or surface those todos as dependency blockers,\nbut continue the steering audit and choose a gate-independent\nP0\u002FP1\u002FP2 candidate for the current goal when one exists. Stop before delivery\nonly when the open user\u002Fowner todo belongs to the current goal's guard payload\nor project asset and blocks the selected delivery path.\nRoutine public repo publication is a boundary decision, not a standing operator\ngate: when the active state permits the step, validation passes, and the\npublic\u002Fprivate boundary scan is clean, commit, push, and PR creation can proceed\nautonomously. Stop for private or company-internal material, credentials,\ndestructive git operations, production actions, or repository rules that\nexplicitly require review.\nUse the shared global registry for this guard so the project agent reads the\nsame operator gates, user todos, agent todos, and quota state as the dashboard. This does\nnot mean all project work is global: `todo add`, `refresh-state`, adapter runs,\nand project-file reads still use the project-local state\u002Fregistry and then sync\nthe public-safe projection back into the global control plane. If two projects\nshare a `goal_id`, treat that as a registry health bug and fix the id\u002Fsource\nmapping.\n\nIf `should_run=true`, do not simply continue the nearest previous TODO. Read the\nactive state's Priority Stack, recent progress, and critic, then run a short\nsteering audit before choosing work: list at least three plausible next-action\ncandidates across different P0\u002FP1\u002FP2 lanes when useful; if the same topic has\nconsumed several recent delivery slices, apply a continuation check and state\nwhy continuing still wins; keep compute quota separate from focus quota; record\nany losing high-value candidate that should not be forgotten. Include a product\nbottleneck lens: ask whether the core goal is currently bottlenecked by user\nexperience, agent capability, evidence quality, adapter readiness, or\npriority-rule gaps, and promote one concrete bottleneck candidate when it should\noutrank the nearest local TODO. Then choose exactly one bounded, verifiable step\nfrom that audit.\n\nWhen you tell the user a connected LoopX plan, top-todo list, priority\nstack, or route change, treat that as a writeback trigger, not chat memory. If\nthe plan contains concrete future P0\u002FP1\u002FP2 work, user actions, route decisions,\nor deprecations, update active-state todos \u002F Next Action \u002F `refresh-state`\nbefore the final response, or explicitly say why the plan is only speculative\nand was not written. Use `loopx todo add` \u002F `todo update` for durable\nwork items; do not leave them only in prose, a review doc, or a Lark\u002Fchat\nreply.\n\nFor connected delivery goals, also read `goal_boundary` from the\n`quota should-run` payload before choosing a step. It carries the registry's\nadapter status, allowed write scope, parent-approval scopes, guards, and stop\ncondition. Treat it as the project-specific boundary contract so automation\nprompts can stay short instead of repeating long per-project protected-scope\nlists.\nWhen reading status or quota routing, use `attention_queue.items` and\n`project_asset` as current authority only when the item is project-asset-backed.\nIf `project_asset` is absent or the source is legacy\u002Fraw fallback, do not infer\nowner, gate, or stop-condition authority from raw queue fields.\n\n## Set Up Recurring Heartbeats\n\nWhen the exact host is Codex App connected to a remote workspace over SSH and\n`automation_update` is unavailable because of that host boundary, use the\nvisible Goal integration instead of reporting a missing-automation blocker:\n\n```bash\nloopx --format json agent-onboard \\\n  --agent-type codex-app-ssh \\\n  --project . \\\n  --goal-id \u003CSTABLE_GOAL_ID> \\\n  --agent-id \u003CREGISTERED_AGENT_ID>\n```\n\nRun the returned `activation_input_command`, read `task_body`, and set the\ncurrent visible task to `\u002Fgoal \u003Ctask_body>`. In Codex App, use the available\nGoal control directly; do not ask the user to run `heartbeat-prompt` or paste\nthe body manually when the host exposes Goal control. Surface the exact\npasteable gate only when Goal control is also unavailable.\n\nThe generated `codex_app_ssh_goal` body is bounded by the `\u002Fgoal` 4000-character\nlimit. It uses an interactive `agent_cli_loop` scheduler context, omits\nheartbeat turn receipts, and must not create\u002Fupdate automations, apply RRULE\ncadence, or invent `LOOPX_TURN`.\n\nWhen a user or controller wants a recurring Codex App heartbeat for a connected\ngoal, prefer the generator instead of hand-copying the quota lifecycle:\n\n```bash\nloopx heartbeat-prompt --goal-id \u003CSTABLE_GOAL_ID>\n```\n\nThe default generated body is thin when the target Codex agent can inspect\nLoopX state and CLI output itself. Passing `--thin` remains accepted and\nexplicit:\n\n```bash\nloopx heartbeat-prompt --thin --goal-id \u003CSTABLE_GOAL_ID>\n```\n\nUse the compact body after reviewing the full generated contract when the\ninstalled prompt should carry more lifecycle detail inline:\n\n```bash\nloopx heartbeat-prompt --compact --goal-id \u003CSTABLE_GOAL_ID>\n```\n\nIf the installed automation body still needs to be smaller, use the brief body:\n\n```bash\nloopx heartbeat-prompt --brief --goal-id \u003CSTABLE_GOAL_ID>\n```\n\nFor a shared-control-plane goal with `coordination.registered_agents`, always\ninclude the registered identity and scope in the installed automation prompt:\n\n```bash\nloopx heartbeat-prompt --thin --goal-id \u003CSTABLE_GOAL_ID> \\\n  --agent-id \u003CREGISTERED_AGENT_ID> \\\n  --agent-scope \"\u003CTHIS_AGENT_SCOPE>\"\n```\n\nOnce agents are registered, an unscoped `heartbeat-prompt` call fails closed so\nstale automations surface an upgrade error instead of running without identity.\n\nFor connected goals, omit `--active-state`; the CLI resolves the active state\nfrom the registry goal `state_file`, which keeps installed automations from\npinning a stale path. Pass `--active-state \u003CACTIVE_GOAL_STATE_PATH>` only for\ndetached state files, migration checks, or compatibility tests.\n\nCopy the generated task body into the Codex App heartbeat automation. The thin\nbody is the installed default for trusted local workers: it keeps the automation\nprompt project-agnostic and tells Codex to re-read registry\u002Fglobal quota truth,\nactive state, status\u002Frun history, repo state, and project signals on each\nwakeup. Use `--full` for the expanded audit source. The compact body is useful\nwhen context pressure matters but the installed prompt should still carry the\nquota, gate, blocker-push, recommendation, steering-audit, writeback, refresh,\nand spend lifecycle inline. The brief body keeps only preflight\u002Fguard, core\ninvariants, and spend accounting in the installed prompt while delegating\ndetailed branches back to the generated compact\u002Ffull contracts.\nThe generated guard and spend commands explicitly use the shared global\nregistry so project heartbeats read the same operator gates and user todos as\nthe dashboard, regardless of their current repo. Completed heartbeat delivery\nspends through `quota spend-slot --source heartbeat --execute`, not through a\nnatural-language report. Quota slots are minute-granularity by default: minute\nheartbeats spend `--slots 1`, while coarser fixed-interval automations should\nspend the scheduler minutes consumed by that completed turn.\n\nKeep project-specific behavior out of the automation prompt. Encode local\ndifferences in the project registry, `.codex\u002Fgoals\u002F\u003Cgoal-id>\u002FACTIVE_GOAL_STATE.md`,\nadapter output, or narrow public\u002Fprivate boundary rules. If a lifecycle rule is\nuseful across projects, update `loopx heartbeat-prompt` and its smoke\ncontract rather than hand-editing one heartbeat automation.\nFor delivery-specific boundaries, prefer the registry fields surfaced in\n`quota should-run.goal_boundary`; the automation prompt only needs to say to\nobey that payload and stop when useful work falls outside it.\n\nWhen a LoopX client\u002Fprompt contract changes, update the matching smoke\ncoverage in the same patch. Interface-budget and regression constraints belong\nin lightweight smoke scripts such as `examples\u002Fcontrol_plane\u002Fheartbeat-prompt-smoke.py`,\n`examples\u002Fcontrol_plane\u002Fquota-plan-smoke.py`, or `examples\u002Fcontrol_plane\u002Fquota-contract-smoke.py`; heavier\nCodex CLI plus LoopX end-to-end checks should stay explicit or\nlow-frequency instead of becoming the default heartbeat path.\n\nThe quota guard returns `execution_obligation` and\n`heartbeat_recommendation`. It also returns `scheduler_hint`, which controls\nthe next wakeup cadence and external-loop unchanged-poll self-stop; this is\nscheduling policy, not delivery permission. Codex CLI TUI and Claude Code loops\nshould run the final quota\u002Freplan check from `scheduler_hint` before applying\ntheir `after_limit`; if the guard changes or returns `run_now`, follow the new\nquota contract instead of stopping. Codex App heartbeat workers should\nsearch\u002Fuse `automation_update` when available. If\n`scheduler_hint.action=stop_until_explicit_resume` and\n`scheduler_hint.codex_app.host_action=pause_or_delete_current_heartbeat`, call\n`automation_update` once to pause the current heartbeat (delete only when the\nhost cannot pause), verify the host result, spend no quota, and end the turn.\nThis terminal host action takes precedence over RRULE handling and requires no\nscheduler ACK. Otherwise use `automation_update` only when\n`scheduler_hint.codex_app.stateful_backoff.apply_needed=true` and\n`scheduler_hint.codex_app.recommended_rrule` is present. After a successful\nRRULE update, run `loopx` with\n`scheduler_hint.codex_app.ack_hint.cli_args` (normally `quota scheduler-ack-current`,\nwhich re-reads the latest scheduler hint instead of hand-copying short-lived\nreset tokens). Attempt the host update at most once per hint and turn. If it\nfails or times out, do not retry or ACK; run\n`scheduler_hint.codex_app.failure_hint.cli_args` once. That no-spend writeback\nrecords the failed target\u002Fobserved-host pair so later heartbeats suppress the\nexact repeat until either value changes. Continue allowed delivery under the\nobserved host cadence. If\n`apply_needed=false` but `ack_needed=true`, a matching host\nreadback already proves the RRULE; skip `automation_update` and run the bound\nack hint directly. LoopX owns reset\u002Fprogression state\nand omits `recommended_rrule` when the desired RRULE is already applied.\nCadence changes, reset-to-initial updates, final checks, and self-stop changes\ndo not spend quota.\nFor a uniquely matched active Codex App heartbeat, `quota should-run`\nautomatically reconciles the installed RRULE with LoopX's ACK ledger. Treat\n`stateful_backoff.host_observation.status=drift_detected` as authoritative for\ncadence repair; a stale or premature ACK must not suppress `apply_needed`.\nWhen readback matches a reset RRULE that is not yet bound in scheduler state,\nthe ack hint carries the exact reset token, identity signature, and CLI route;\nmissing readback must not use this shortcut.\nThis readback is cadence-only and never exposes the automation prompt or grants\nLoopX permission to edit Codex App files directly.\n\nRead\n`execution_obligation` before\ndeciding on a quiet no-op:\n`heartbeat_recommendation.notify` is only the user-notification policy, not an\nexecution gate. If\n`execution_obligation.must_attempt_work=true`, attempt one bounded progress\nbatch or segment even when `notify=DONT_NOTIFY`; a quiet no-op requires\n`execution_obligation.must_attempt_work=false` and no\n`notify_user_on_open_todo=true` blocker-push notification. New connected read-only goals\nshould follow `recommended_mode=run_first_read_only_map`: run one real\n`loopx read-only-map --goal-id \u003CSTABLE_GOAL_ID>`, validate the saved\n`read_only_project_map`, spend exactly once after validation, then sync or\nrefresh state if needed. Already mapped goals should follow\n`recommended_mode=mapped_noop_if_unchanged`: if there is no new instruction,\nowner evidence, agent todo, stale source, or safe handoff, return a quiet no-op\nwithout another dry-run, file edit, or quota spend.\n\nThe generated task body also carries a no-progress self-repair guard. More\nimportantly, `quota should-run` may expose a hard\n`autonomous_replan_obligation` \u002F `execution_obligation.must_attempt_work=true`\ncontract when active state or public run history shows repeated typed no-progress\nturns. Quiet future-monitor heartbeat receipts are liveness evidence only;\n`dead_monitor_repeat` counts unchanged due\u002Fexternal monitor executions with a\nconcrete Todo or target identity at its declared threshold. Obey that machine\ncontract before another quiet no-op: run one\nbounded self-repair\u002Freplan batch through implementation, validation, and\nwriteback when that boundary is clear, then spend once. Do not stop at the first\ntiny substep when the repair has an obvious validation boundary. Cancel or\npause the heartbeat automation only after 2 consecutive stalled turns (the same\nrepair path stuck for 2 more eligible turns); explain the no-progress loop with\n`NOTIFY`, and skip quota spend for that self-cancel turn.\nThe same generated task body also makes routine public commit, push, and PR\ncreation autonomous after validation plus a clean public\u002Fprivate boundary scan.\nDo not reintroduce a user gate for public-safe publication itself.\nIt also respects `notify_user_on_open_todo=true`: open user todos in\nfocus-wait, waiting, or external-evidence lanes should become a compact\nblocker-push `NOTIFY` with at most three items, while skipping delivery work\nand quota spend for that blocker-push turn. If the payload includes\n`open_todo_notification_policy=repeat_until_resolved`, repeat that `NOTIFY`\nuntil the todo is done, deferred, or replaced. When\nthe user confirms that an existing review or action already happened, write\nback that exact todo immediately: complete only with an explicit typed decision,\notherwise supersede the stale gate without granting authority; then refresh\nstate and rerun quota so a successor or autonomous replan can surface. When\n`user_gate_notification_cooldown.notification_suppressed=true`, preserve the\npending gate but return quiet `DONT_NOTIFY`; the bounded reminder window or a\nmaterial gate\u002Fhost change reopens the notification. Other blocker-push cases may\nstill be de-duplicated when the same blocker was already surfaced recently.\nEligible monitor-only no-transition polls keep user todos visible in the\npayload but should stay quiet unless a material transition appears.\n\nKeep the Codex App visible goal text short, for example\n`按 ACTIVE_GOAL_STATE.md，基于 LoopX 体系，推进项目`. Do not use that short\ntext as the automation body. Across projects, the automation body should be the\nsame generated lifecycle prompt with only `goal_id`, `active_state`, and narrow\nproject boundary rules changed. When a project appears to need a custom\nautomation branch, treat that as a LoopX product gap first, not as a\nreason to paste one-off control logic into the scheduler.\n\n## Generate A Review Packet\n\nWhen a project agent, controller thread, or local shell needs the current\noperator packet, prefer the CLI packet over asking the user to find a dashboard\ncopy button:\n\n```bash\nloopx review-packet --goal-id \u003CSTABLE_GOAL_ID>\n```\n\nFor machine-readable inspection, put the global format flag before the\nsubcommand:\n\n```bash\nloopx --format json review-packet --goal-id \u003CSTABLE_GOAL_ID>\n```\n\nWhen the human\u002Fcontroller decision is already approved and the only remaining\nstep is to relay the target-agent instruction, use the minimal handoff form:\n\n```bash\nloopx review-packet --goal-id \u003CSTABLE_GOAL_ID> --handoff-only\n```\n\nThis command is read-only. It packages the current status into the same Review\nPacket shape as the dashboard; it does not append human reward, append an\noperator gate, refresh state, grant write-control, or authorize production\nactions. `--handoff-only` only strips the human decision wrapper from markdown\noutput; JSON output returns a minimized handoff payload with `handoff_text`\ninstead of the full operator packet. If the selected queue item is legacy\u002Fraw\nfallback rather than project-asset-backed, do not treat raw queue fields as\nowner, gate, or stop-condition authority.\n\nRead the packet in order:\n\n- `人只需判断`: the user or controller decides in the dashboard\u002Foperator view or\n  trusted local shell. A target project agent cannot self-approve this section.\n- `用户本地 Gate 记录草稿`: a local preview for the user\u002Fcontroller. The target\n  project agent must not run this draft as its own command.\n- `给项目 Agent`: the executable handoff context only after the packet's\n  forwarding condition is already satisfied. If its stop condition fires, stop\n  and report the exact blocker instead of continuing.\n\n## Connect A New Project\n\n1. Read the project goal document and inspect the repo narrowly.\n2. Extract a stable `goal_id`, one-line `objective`, `domain`, authority\n   sources, validation surfaces, first safe action, and public\u002Fprivate\n   boundary.\n3. Run `connect` from the project root. Prefer read-only until the goal doc\n   explicitly authorizes mutation:\n\n```bash\nloopx connect \\\n  --goal-id \u003CSTABLE_GOAL_ID> \\\n  --objective \"\u003COBJECTIVE_FROM_GOAL_DOC>\" \\\n  --domain \u003CDOMAIN> \\\n  --goal-doc \u003CGOAL_DOC_PATH> \\\n  --adapter-kind read_only_project_map_v0 \\\n  --adapter-status connected-read-only\n```\n\n`connect` should create or update the local registry\u002Fstate and auto-sync the\npublic-safe entry into `~\u002F.codex\u002Floopx\u002Fregistry.global.json`.\n\nOne repository can host multiple peer-owned goals, such as delivery and a\nlow-conflict validation lane. Run `connect` once per stable `goal_id`; keep one\nshared `.loopx\u002Fregistry.json`, but use one active state per goal:\n\n```text\n.codex\u002Fgoals\u002F\u003Cdelivery-goal-id>\u002FACTIVE_GOAL_STATE.md\n.codex\u002Fgoals\u002F\u003Cvalidation-goal-id>\u002FACTIVE_GOAL_STATE.md\n```\n\nDo not reuse one `state_file` for two goal ids. `loopx registry` treats\nthat as a health error, and `read-only-map` checks the selected goal's own\n`.codex\u002Fgoals\u002F\u003Cgoal-id>\u002F` directory so one healthy lane does not hide another\nlane's missing state.\n\nIf the goal state or registry contains private evidence, add `.loopx\u002F`\nand `.codex\u002Fgoals\u002F` to that project's `.gitignore`.\n\nFor a generic read-only connection, create the first non-generic map run:\n\n```bash\nloopx read-only-map --goal-id \u003CSTABLE_GOAL_ID>\n```\n\nThis reads registry metadata, the active state, and a bounded project-file\ninventory, then appends a `read_only_project_map` run. Use it before writing a\nproject-specific adapter when the dashboard would otherwise stay on\n`state_refreshed` or `connected_without_run`.\n\nFor a planned high-complexity adapter, preview the same bounded map before\ncontroller opt-in:\n\n```bash\nloopx read-only-map --goal-id \u003CSTABLE_GOAL_ID> --dry-run\n```\n\nIf the adapter status is `planned`, only the `--dry-run` preview is allowed and\nthe result should include `opt_in_required=true`. Do not append a real map until\nthe user or target controller has moved the adapter to `read-only-map-ready`,\n`connected-read-only`, or `connected`. Relay the returned `residual_risks`\nlabels directly; do not invent a separate free-form risk summary.\n\nWhen the user or target controller answers the opt-in gate, record that answer\nbefore handing the command to another project agent:\n\n```bash\nloopx operator-gate \\\n  --goal-id \u003CSTABLE_GOAL_ID> \\\n  --decision approve \\\n  --reason-summary \"\u003CPUBLIC_SAFE_CHINESE_REASON>\" \\\n  --dry-run\n```\n\nUse `approve`, `reject`, or `defer`. The dry-run writes nothing; the real append\ncreates an `operator_gate_*` compact run so `loopx status` and the\ndashboard can tell whether the project agent may run the approved command. This\nis not a human reward signal and does not grant write-control.\n\n## Qualify Non-Trivial Final Diffs\n\nBefore a non-trivial delivery or merge, inspect the current goal configuration.\nWhen `change_quality_qualification.enabled` is true, load\n`loopx-change-quality` and follow its exact-scope workflow:\n\n```bash\nloopx --format json change-quality prepare \\\n  --goal-id \u003CSTABLE_GOAL_ID> \\\n  --repo-path .\n```\n\nThe policy keeps two decisions separate: `safe_fix` permits at most one bounded\nrepair pass, while `strict_receipt` requires a passing receipt for the exact\nfinal diff. Any edit invalidates the old fingerprint. Record and verify the\nfinal receipt, then pass `--goal-id \u003CSTABLE_GOAL_ID>` to `canary premerge`.\n\nIf the host cannot load skills, use the self-contained prepare packet as the\nreview contract. Turn may carry the packet or receipt reference, but it does\nnot own policy or enforcement. Do not invent a receipt, reuse one from an older\ndiff, or turn subjective style advice into a blocker.\n\n## Refresh State After Non-Adapter Work\n\nIf the agent updated `ACTIVE_GOAL_STATE.md`, a progress ledger, a planning doc,\nor external coordination state without producing a new adapter run, append a\nstate-only refresh:\n\n```bash\nloopx refresh-state --goal-id \u003CSTABLE_GOAL_ID> --agent-id \u003CREGISTERED_AGENT_ID>\n```\n\nFor multi-agent goals, keep the same `--agent-id` envelope that passed\n`quota should-run`. This default is an agent-lane refresh. To update the\ngoal-level route or durable `## Next Action`, any registered peer may add\n`--progress-scope goal`.\n\nIf that refresh records a validated progress artifact rather than a pure\nstate-only note, include a public-safe classification and explicit delivery\nhints so status, review packets, and quota guards do not infer scale\u002Foutcome\nfrom the classification name:\n\n```bash\nloopx refresh-state \\\n  --goal-id \u003CSTABLE_GOAL_ID> \\\n  --classification \u003CPUBLIC_SAFE_PROGRESS_CLASSIFICATION> \\\n  --delivery-batch-scale \u003CACTUAL_DELIVERY_BATCH_SCALE> \\\n  --delivery-outcome \u003CACTUAL_DELIVERY_OUTCOME> \\\n  --agent-id \u003CREGISTERED_AGENT_ID> \\\n  --progress-scope goal\n```\n\nReplace all three placeholders from the current validated turn. Never default\nor upgrade a smaller\u002Fpreparatory turn to `multi_surface` \u002F `outcome_progress`\njust because those values would satisfy a delivery floor.\n\nIf the current run may write local LoopX state but its runtime boundary forbids\nconfigured external sink writes, keep `explore_graph.enabled` unchanged and add\n`--suppress-external-sinks`. This preserves canonical local graph projection,\nrecords the run-scoped authorization boundary, and leaves sink digests pending\nfor a later authorized refresh. Do not toggle the goal-level Graph setting as a\none-off workaround for an external-write boundary.\n\nUse `delivery_outcome` as a machine enum, not as prose:\n\n- `surface_only`: docs, contracts, smokes, setup, or preparation moved, but the\n  primary product\u002Fcase result did not.\n- `outcome_gap`: the run should have advanced the primary result but ended with\n  a concrete blocker or missing outcome.\n- `outcome_progress`: primary result evidence advanced materially, but the\n  selected stage is not fully complete.\n- `primary_goal_outcome`: the selected stage's primary result is complete,\n  validated, and written back.\n\nDo not rely on `classification` names such as `*_contract_v0_delivered` to carry\nthis meaning. `classification` is a human\u002Fhistory label; `delivery_outcome` is\nthe control-plane signal consumed by quota, status, and review packets.\n\nThis fixes stale dashboards where the latest run still shows an old\n`ready_for_controller_opt_in` or similar state. It also auto-syncs the project\nentry into the global registry. If you do not pass `--recommended-action`, the\nrefresh run should publish the first local-control-plane item from\n`## Next Action` as the compact dashboard action, including wrapped continuation\nlines. `recommended_action` may include private\u002Flocal routing references needed\nby the individual operator, but must not include credentials, auth headers, or\ninline secrets; shareable\u002Fpublic projections are responsible for redaction.\n\nFor complex projects, do not pack a whole user reading queue into\n`## Next Action`. Keep the first Next Action item as one routing sentence, then\nuse the CLI to write explicit checkbox sections instead of hand-editing section\nnames:\n\n```bash\nloopx todo add \\\n  --goal-id \u003CSTABLE_GOAL_ID> \\\n  --role user \\\n  --text \"Read the short review packet before approving delivery.\"\n\nloopx todo add \\\n  --goal-id \u003CSTABLE_GOAL_ID> \\\n  --role agent \\\n  --text \"Build the next read-only worksheet after the user decision is recorded.\"\n```\n\nThe CLI creates the canonical section when needed and avoids duplicate exact\ntodo text. The resulting Markdown shape is:\n\n```md\n## User Todo \u002F Owner Review Reading Queue\n\n- [ ] Read the short review packet.\n- [ ] Record the owner decision in the worksheet.\n\n## Agent Todo\n\n- [ ] Build the next read-only worksheet after the user decision is recorded.\n```\n\n`loopx status` lifts those sections into `user_todos` and `agent_todos`.\nThe dashboard uses `user_todos` for the first-screen human checklist; project\nagents should read `agent_todos` only after health, operator gates, evidence,\nand quota allow execution.\n\nFor non-trivial feature work, prefer todo succession over extra lifecycle\nstates. When a slice merges or validates, complete the current todo only after\ncreating the next concrete agent\u002Fuser todo for rollout, product-path audit,\ndocs, telemetry, benchmark proof, or operator decision; if there is truly no\nfollow-up, write a compact no-follow-up rationale in the completion note.\nAn open feature PR that is waiting for ordinary human review does not by itself\nblock further project work. Complete the feature slice with its validated PR\nevidence, derive the review reminder with `--next-user-todo ...` and\n`--next-user-task-class user_action`, and keep a runnable agent successor. Add\na separate `continuous_monitor` for PR lifecycle readback. Use `user_gate` only\nfor an exact authority boundary such as merging an aggregate experiment branch\ninto `main`, release, benchmark launch, credentials, or protected production\naction. A stable experiment integration branch may collect feature PRs from\nisolated worktrees; keep the aggregate PR to `main` as the final review gate.\nWhen the next agent slice is not yet known, keep the bound `user_action`\nvisible without converting it into a gate. If bounded no-progress evidence\naccumulates while the agent frontier is empty, follow\n`autonomous_replan_required` and produce one typed semantic outcome. If the\nprojected frontier owns a concrete target, create and claim that runnable agent\ntodo, binding it to the projected `obligation_id` with\n`--replan-obligation-id \u003Cexact-id>`, a typed `--action-kind`, and a stable\n`--target-key` or Explore node ref. The atomic Todo mutation is the semantic\nreceipt; do not add a second repair ACK. When no executable target is known,\nuse the projected typed semantic or coverage-backed terminal writeback rather\nthan creating a Todo whose task is merely to replan. Only authoritative typed\nterminal-closure evidence may replace that Todo writeback with explicit\nno-follow-up.\n`successor_todo_ids` records lineage only: linking successors does not suspend\nan open parent. When splitting a parent into explicit successors, decide whether\nthe parent still has an independent immediate action. If it does not, explicitly\ndefer it with a supported `resume_when` or complete it; do not infer aggregate\nsemantics from successor links alone. Treat `parent_successor_advisory` in the\n`todo update` response as the machine-readable authoring reminder for this\ndecision, not as a new persisted lifecycle state.\n\n## Record Human Reward\n\nWhen the user gives a clear reward judgment for an exact run, first validate\nthe overlay and active-state writeback:\n\n```bash\nloopx reward \\\n  --goal-id \u003CSTABLE_GOAL_ID> \\\n  --run-generated-at \u003CRUN_GENERATED_AT> \\\n  --decision \u003CDECISION_LABEL> \\\n  --reward positive \\\n  --reason-summary \"\u003CPUBLIC_SAFE_CHINESE_REASON>\" \\\n  --follow-up \"\u003CPUBLIC_SAFE_NEXT_ACTION>\" \\\n  --write-active-state-summary \\\n  --dry-run\n```\n\nOnly after the user has explicitly approved recording the reward, rerun without\n`--dry-run`. The durable source of truth is still the run-bound\n`human_reward` overlay. The active-state writeback is a `Progress Ledger`\nsummary for future agents; project agents should read the reward through the\nreturned `project_agent_visibility.history_command`.\n\n## Multi-Project Status\n\nInside a project:\n\n```bash\nloopx status\n```\n\nTo focus the status projection on one goal while preserving global health\nfields, pass the goal id:\n\n```bash\nloopx --format json status --goal-id \u003CSTABLE_GOAL_ID>\n```\n\nOutside a project, `loopx status` should fall back to:\n\n```text\n~\u002F.codex\u002Floopx\u002Fregistry.global.json\n```\n\nUse explicit sync only for diagnosis or recovery:\n\n```bash\nloopx sync-global\n```\n\nIf status shows `unregistered_runtime_goal`:\n\n- If the project is active, run `loopx sync-global` or reconnect from\n  that project's local registry.\n- If the runtime record is obsolete, preview cleanup with\n  `loopx archive-runtime --goal-id \u003CGOAL_ID>` and only execute cleanup\n  when that is clearly intended.\n\n## Validation\n\nAfter connect or refresh, run the smallest useful set:\n\n```bash\nloopx registry\nloopx status\nloopx check --scan-path \u003CPUBLIC_SAFE_FILE_OR_DIR>\n```\n\nFor multi-project UI updates, refresh the dashboard status JSON from the global\nregistry:\n\n```bash\nloopx --registry \"$HOME\u002F.codex\u002Floopx\u002Fregistry.global.json\" \\\n  --format json status > \u003Cdashboard>\u002Fpublic\u002Fstatus.local.json\n```\n\n## Reporting\n\nReport in Chinese when the user is reviewing:\n\n- changed files and whether they are public or local-private;\n- validation commands and results;\n- how the goal appears in dashboard or attention queue;\n- the next safe action;\n- any missing gates before decision-advisor or write-controller behavior.\n\nNever include credentials, private docs, raw internal links, production task\nids, or raw local evidence in public repo docs or examples.\n",{"name":5,"description":7},"main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","05-技能与代理开发\u002Floopx-project",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill loopx-project",{"tool":38,"command":39},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill loopx-project",{"tool":41,"command":42},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill loopx-project","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Floopx-project\u002FSKILL.md",true,[46],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"agents\u002Fopenai.yaml","REFERENCE","参考文档",237,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Floopx-project\u002Fagents\u002Fopenai.yaml",[53,60,65,72,79,86],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],{"skillNo":61,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]