Improve Agent Workflow
Principle expression
Primary: P04
Supporting: P02, P08, P15
Scope
Own one judgment: given an observed failure or friction in how agents work in
this project, which owning surface should change, and what is the smallest
change that improves the required action under the real runtime?
The object is the project's agent-facing work system, not the whole project.
Possible owning surfaces include a project skill, governing instruction,
context-delivery path, prompt, tool or CLI contract, hook or adapter,
verification gate, and handoff record. Do not optimize product code, team
policy, CI, or business process unless it is directly part of the evidenced
agent action. Do not create a central orchestrator or require the project to
adopt this collection's vocabulary.
Use this skill as the external diagnostic entry when the owning surface is
unclear or several surfaces interact. When the user already names a known owner
and a dedicated method for it is available, enter that method directly. After
diagnosis selects an owner, hand off the domain judgment rather than keeping a
second coordinating layer active.
This package is independently usable. It carries a read-only Sequence snapshot
in references/sequence.md; the target project does not need this
repository or its other skills.
Principle source
Use a host principles/SEQUENCE.md and matching interpretations when the host
declares them. Otherwise use this package's snapshot. Before diagnosing the
owner, read the Sequence and exactly the P04, P02, P08, and P15 interpretation
sections from the same source. Do not load other interpretations by default. A
host source governs its project; do not merge it with or overwrite it from the
snapshot.
Start
Recover the concrete problem before naming a solution:
Target agent, runtime, and ordinary entry path:
Required action or judgment:
Observed failure, friction, or cost:
Source evidence and current owner:
Hard constraints and human authority:
Smallest suspected change:
Observation that would disconfirm it:
If no recurring or consequential agent-action gap is evidenced, answer locally
or perform the ordinary task. Do not manufacture an agent-workflow project.
Dispatch
- When the owning surface is the project's tool or CLI contract — the user asks
to review, audit, fix, or improve a CLI, its commands, arguments, output, or
how agents invoke it, whether read-only or authorized — read and follow
commands/cli-surface.md.
- When the user asks to inspect, assess, or recommend without authorizing
changes, read and follow
commands/audit.md.
- When the user asks to fix, optimize, implement, or improve the project, read
and follow
commands/improve.md.
- With ambiguous intent, begin with the read-only audit and stop before edits.
Domain vocabulary
Read the agent-work model when agent workflow, owning surface, ordinary entry path, or the difference among
guidance, capability, verification, and acceptance is unclear. These terms are
diagnostic relations, not a required project architecture or lifecycle.
Core method
- Observe the actual work. Read the target project's governing sources,
the relevant agent surface, and evidence from a real or reproducible task.
Separate the observed behavior from its proposed cause. A polished prompt,
passing unit test, or agent self-report is not behavior evidence by itself.
- Trace the action journey. Follow the task from human intent through
discovery, guidance, action or tool use, verification, and handoff. This is
an inspection model, not a mandatory pipeline. Read
the agent-work model only when the owning
surface is unclear or several surfaces interact.
- Find the principal contradiction and owner. Identify the one mismatch
whose resolution changes downstream behavior. Distinguish missing or wrong
domain truth from failed delivery, weak skill expression, tool friction,
absent verification, and authority confusion. Route truth and acceptance to
their actual owners; an agent-workflow change must not invent either.
- Compare the unchanged case with minimal interventions. Prefer correcting
an existing owner over adding another skill, file, hook, tool, or workflow.
For each additional surface, name the decision it changes and the burden it
adds. Retain hard constraints and normal project conventions.
- Act only within authorization. For an audit, produce evidence and a
smallest recommendation. For an improvement, change the smallest owning
surface and its directly required consumers. If that surface is a skill,
load the skill-surface guide; if it is a tool
or CLI contract, read
commands/cli-surface.md; do not load either for
unrelated workflow work.
- Verify behavior through the ordinary path. Re-run the representative
task or the closest safe probe from the same entry surface. Add a boundary
case that should not trigger or overreach. State what would falsify the
improvement claim. Structural checks support packaging but cannot replace
action evidence.
- Leave proportional inheritance. Report the observation, changed owner,
evidence, residual uncertainty, and human decision still required. Add a
durable record only when a later actor must recover the reason, boundary, or
verification result; do not create a standing improvement bureaucracy.
Ownership boundaries
- Domain source: owns what is true or required. This skill may reveal a gap
but must not silently author policy, architecture, or acceptance criteria.
- Agent instruction or skill: owns a reusable judgment at activation. It
does not enforce runtime capability or accept its own result.
- Context path: owns when and how named source material reaches the agent;
copies and summaries remain projections.
- Tool, CLI, hook, or adapter: owns mechanical capability and raw evidence,
not semantic acceptance. When the selected surface is a CLI contract, the
review method in
commands/cli-surface.md owns the concrete judgment. Check
the current runtime's documentation rather than embedding vendor-specific
configuration as universal doctrine.
- Verifier and human committer: decide whether durable work is accepted.
The actor that made the change may prepare evidence but cannot manufacture
independent approval.
Completion standard
The work is ready when it identifies the concrete agent action, observed gap,
principal contradiction, owning surface, smallest change or recommendation,
ordinary-path action evidence, boundary evidence, and residual human decision.
If the result only improves prose, adds machinery, or passes a synthetic check
without changing the named action, report it as inconclusive and continue from
the observed failure.
1---2name: improve-agent-workflow3description: Diagnose and improve how coding agents work in an existing project: project skills, AGENTS instructions, prompt and context delivery, tools or CLI surfaces, hooks, verification, handoffs, and agent-facing workflow. Use when an agent repeatedly misses scope or instructions, the owning agent-facing surface is unclear, several surfaces interact, agent experience is costly or confusing, or a user asks Codex to improve how agents work in a company repository. Also use when the owning surface is a tool or CLI contract: to review, audit, fix, or improve a CLI's commands, arguments, help, output, or how agents invoke it from a shell. Triggers include "review this CLI", "audit the command interface", "make this CLI agent-friendly", "CLI/命令/参数审查", and agent invocation ergonomics. Start from observed project evidence, change the smallest owning surface, and verify behavior through the ordinary agent entry path. If the issue is already localized to a skill's trigger, prompt, context layering, or behavior evaluation and a4---56# Improve Agent Workflow78## Principle expression910**Primary:** P0411**Supporting:** P02, P08, P151213## Scope1415Own one judgment: **given an observed failure or friction in how agents work in16this project, which owning surface should change, and what is the smallest17change that improves the required action under the real runtime?**1819The object is the project's agent-facing work system, not the whole project.20Possible owning surfaces include a project skill, governing instruction,21context-delivery path, prompt, tool or CLI contract, hook or adapter,22verification gate, and handoff record. Do not optimize product code, team23policy, CI, or business process unless it is directly part of the evidenced24agent action. Do not create a central orchestrator or require the project to25adopt this collection's vocabulary.2627Use this skill as the external diagnostic entry when the owning surface is28unclear or several surfaces interact. When the user already names a known owner29and a dedicated method for it is available, enter that method directly. After30diagnosis selects an owner, hand off the domain judgment rather than keeping a31second coordinating layer active.3233This package is independently usable. It carries a read-only Sequence snapshot34in `references/sequence.md`; the target project does not need this35repository or its other skills.3637## Principle source3839Use a host `principles/SEQUENCE.md` and matching interpretations when the host40declares them. Otherwise use this package's snapshot. Before diagnosing the41owner, read the Sequence and exactly the P04, P02, P08, and P15 interpretation42sections from the same source. Do not load other interpretations by default. A43host source governs its project; do not merge it with or overwrite it from the44snapshot.4546## Start4748Recover the concrete problem before naming a solution:4950```text51Target agent, runtime, and ordinary entry path:52Required action or judgment:53Observed failure, friction, or cost:54Source evidence and current owner:55Hard constraints and human authority:56Smallest suspected change:57Observation that would disconfirm it:58```5960If no recurring or consequential agent-action gap is evidenced, answer locally61or perform the ordinary task. Do not manufacture an agent-workflow project.6263## Dispatch6465- When the owning surface is the project's tool or CLI contract — the user asks66 to review, audit, fix, or improve a CLI, its commands, arguments, output, or67 how agents invoke it, whether read-only or authorized — read and follow68 `commands/cli-surface.md`.69- When the user asks to inspect, assess, or recommend without authorizing70 changes, read and follow `commands/audit.md`.71- When the user asks to fix, optimize, implement, or improve the project, read72 and follow `commands/improve.md`.73- With ambiguous intent, begin with the read-only audit and stop before edits.7475## Domain vocabulary7677Read [the agent-work model](references/agent-work-model.md) when `agent78workflow`, `owning surface`, `ordinary entry path`, or the difference among79guidance, capability, verification, and acceptance is unclear. These terms are80diagnostic relations, not a required project architecture or lifecycle.8182## Core method83841. **Observe the actual work.** Read the target project's governing sources,85 the relevant agent surface, and evidence from a real or reproducible task.86 Separate the observed behavior from its proposed cause. A polished prompt,87 passing unit test, or agent self-report is not behavior evidence by itself.882. **Trace the action journey.** Follow the task from human intent through89 discovery, guidance, action or tool use, verification, and handoff. This is90 an inspection model, not a mandatory pipeline. Read91 [the agent-work model](references/agent-work-model.md) only when the owning92 surface is unclear or several surfaces interact.933. **Find the principal contradiction and owner.** Identify the one mismatch94 whose resolution changes downstream behavior. Distinguish missing or wrong95 domain truth from failed delivery, weak skill expression, tool friction,96 absent verification, and authority confusion. Route truth and acceptance to97 their actual owners; an agent-workflow change must not invent either.984. **Compare the unchanged case with minimal interventions.** Prefer correcting99 an existing owner over adding another skill, file, hook, tool, or workflow.100 For each additional surface, name the decision it changes and the burden it101 adds. Retain hard constraints and normal project conventions.1025. **Act only within authorization.** For an audit, produce evidence and a103 smallest recommendation. For an improvement, change the smallest owning104 surface and its directly required consumers. If that surface is a skill,105 load [the skill-surface guide](references/skill-surface.md); if it is a tool106 or CLI contract, read `commands/cli-surface.md`; do not load either for107 unrelated workflow work.1086. **Verify behavior through the ordinary path.** Re-run the representative109 task or the closest safe probe from the same entry surface. Add a boundary110 case that should not trigger or overreach. State what would falsify the111 improvement claim. Structural checks support packaging but cannot replace112 action evidence.1137. **Leave proportional inheritance.** Report the observation, changed owner,114 evidence, residual uncertainty, and human decision still required. Add a115 durable record only when a later actor must recover the reason, boundary, or116 verification result; do not create a standing improvement bureaucracy.117118## Ownership boundaries119120- **Domain source:** owns what is true or required. This skill may reveal a gap121 but must not silently author policy, architecture, or acceptance criteria.122- **Agent instruction or skill:** owns a reusable judgment at activation. It123 does not enforce runtime capability or accept its own result.124- **Context path:** owns when and how named source material reaches the agent;125 copies and summaries remain projections.126- **Tool, CLI, hook, or adapter:** owns mechanical capability and raw evidence,127 not semantic acceptance. When the selected surface is a CLI contract, the128 review method in `commands/cli-surface.md` owns the concrete judgment. Check129 the current runtime's documentation rather than embedding vendor-specific130 configuration as universal doctrine.131- **Verifier and human committer:** decide whether durable work is accepted.132 The actor that made the change may prepare evidence but cannot manufacture133 independent approval.134135## Completion standard136137The work is ready when it identifies the concrete agent action, observed gap,138principal contradiction, owning surface, smallest change or recommendation,139ordinary-path action evidence, boundary evidence, and residual human decision.140If the result only improves prose, adds machinery, or passes a synthetic check141without changing the named action, report it as inconclusive and continue from142the observed failure.