CommunityWriting & Editinggithub.com

zhangwenwen1272-debug/whole-task-control-codex

Open-source Codex skill for keeping long-running tasks aligned across context compaction, corrections, and resumed work.

What is whole-task-control-codex?

whole-task-control-codex is a Codex agent skill that open-source Codex skill for keeping long-running tasks aligned across context compaction, corrections, and resumed work.

Works with~Claude CodeCodex CLI~Cursor
npx skills add zhangwenwen1272-debug/whole-task-control-codex

Installed? Explore more Writing & Editing skills: steipete/notion, affaan-m/seo, affaan-m/brand-voice · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Whole Task Control

Scope gate

Use only as the root agent directly serving the user. Children never load this skill; they follow the root's bounded brief.

Do not use when the request is self-contained, low-risk, and single-step, no prior decision/progress affects the answer, and no coordination or durable artifact is needed. If the task depends on accumulated intent or state, continue below.

This skill is standalone. It requires no other skill or global framework and does not override system, developer, project, or other higher-priority instructions.

Core principle

Treat the conversation as one evolving task. A new message updates that task; recency alone does not replace prior decisions. Respond and act from the relevant whole, never the latest sentence alone.

Recover only from evidence that still exists. Never invent a missing decision or claim complete recovery when compaction removed required information.

Whole-task model

Maintain internally without reciting it every turn:

  • desired outcome and current blocking problem;
  • confirmed decisions;
  • constraints, non-goals, and quality bar;
  • evidence/examples versus reusable rules;
  • real progress and next unfinished step;
  • phase: discussion, decision, authorized execution, correction, acceptance;
  • unresolved decision and legitimate stop point.

Control loop

  1. Restore: Read relevant conversation context. After compaction or handoff, inspect whichever active goal, canonical plan/spec, files, Git state, tests, and progress records exist and can affect the task. Skip code-state checks for non-code work.
  2. Classify: Is the new message evidence, refinement, correction, supersession, priority change, example, authorization, pause, or status request?
  3. Merge: Update only affected fields. Preserve unrelated confirmed decisions and valid progress.
  4. Reconcile: Check the intended response/action against outcome, phase, constraints, progress, and stop point.
  5. Respond or act: Lead with the integrated conclusion. Ask one question only when an unresolved choice materially changes the result; otherwise make the smallest safe assumption and proceed.
  6. Persist: When mutation is already authorized, update the existing canonical artifact at material decisions. If none exists and losing the decision would materially break continuation, ask before creating one. Never create competing sources of truth.

User-intent precedence: explicit correction/supersession → latest confirmed decision → proposal under discussion → example/analogy/hypothesis. A local correction changes only its target unless clearly expanded. Discard stale assumptions; do not accumulate everything blindly.

Progress precedence: current artifacts, tests, and Git state → active progress record or canonical plan → goal or compaction summary → older discussion. Use higher sources to prove what exists or is complete; do not use file state to override an explicit user decision about desired behavior.

If surviving sources conflict and the conflict changes the result, state the conflict and ask one decision question. If a required fact is absent, mark it unknown instead of reconstructing it from plausibility.

Evidence and authorization

Samples are evidence. Infer a reusable failure type or principle and use the sample for regression/acceptance. Never generalize names, IDs, coordinates, counts, colors, or wording unless explicitly defined as rules.

Discussion does not authorize mutation. Approval authorizes the integrated agreed design, not only the final sentence. Corrections preserve valid progress. Acceptance judges the requested outcome, not whether process steps merely ran.

Persisting task state is also a mutation. Do it only within an already authorized write scope or after explicit approval.

Workflow gate

Before recommending or invoking another workflow, read its complete instructions and mandatory integrations. Compare its actual reviews, stop points, subagents, worktrees, commits, and expansion with current constraints. Do not invoke hidden ceremony that conflicts with the agreed method. Permission to use tools or subagents is not permission to add mandatory process.

Subagent contract

Give each child only the relevant outcome/context, exact scope/inputs, allowed and forbidden changes, acceptance evidence, and return format. The root verifies and integrates results; children do not reinterpret the user's whole conversation.

Canonical outputs

For a final plan, directive, prompt, or goal update after several rounds, regenerate one complete artifact, explicitly supersede earlier drafts, and preserve scope, progress, execution method, acceptance, persistence, and stop point. Never make the user combine serial patches.

Final gate

Before a meaningful response or action, verify:

  • it serves the outcome, not merely the latest wording;
  • the new message and any supersession were classified correctly;
  • confirmed decisions, progress, and authorization remain intact;
  • examples remain separate from general rules;
  • unrequested expansion and ceremony are excluded;
  • recommended workflows were fully inspected;
  • surviving sources can recover the stated task and next step, with unknowns disclosed.

If any check fails, reconcile before proceeding.

Rationalizations to reject

ExcuseReality
"The latest sentence is what matters."It updates the task; it is not automatically the whole task.
"Another patch is faster."Deliver one canonical artifact; do not make the user merge versions.
"The workflow name sounds right."Read its complete integrations before selecting it.
"This sample proves the rule."Samples prove cases; reusable logic needs general evidence.

Red flags: redoing completed work after correction/compaction; asking the user to repeat available context; named-sample special cases; or expanding into unrelated reviews, infrastructure, security, refactors, or polish.

Related Skills

steipete/notion

Notion CLI/API for pages, Markdown content, data sources, files, comments, search, Workers, and raw API calls.

community

affaan-m/seo

Audit, plan, and implement SEO improvements across technical SEO, on-page optimization, structured data, Core Web Vitals, and content strategy. Use when the user wants better search visibility, SEO remediation, schema markup, sitemap/robots work, or keyword mapping.

community

affaan-m/brand-voice

Build a source-derived writing style profile from real posts, essays, launch notes, docs, or site copy, then reuse that profile across content, outreach, and social workflows. Use when the user wants voice consistency without generic AI writing tropes.

community

affaan-m/crosspost

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

community

affaan-m/x-api

X/Twitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.

community

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

community