# Improve the workflow

A useful workflow changes when evidence reveals a better way to work. Improve the existing
rules rather than leave each session to rediscover the same problem.

**In short:** Record the observed problem and verified correction. Update the rule that owns the lesson,
review the change and verify that the next session can follow it.

## Steps

1. Notice recurring uncertainty, avoidable work, confusing instructions or a failed
   assumption during development. Record the specific situation and what was observed.
2. Investigate the cause. Compare the proposed correction with the actual project and
   existing rules. When needed, use an isolated experiment or regression check.
3. Separate the reusable principle from one project's paths, credentials, deployment
   details and current task state. Keep the evidence in the appropriate private location.
4. Update the owning rule or procedure within the authorized project scope. Prefer one
   maintained explanation over copies in prompts, scripts and unrelated guides.
5. Verify that the revised instruction matches real commands, permissions and behavior.
   Record the changed source and any pending dependent updates.
6. On the next relevant task, use the revised rule and observe whether it helps. If it
   does not, keep the finding and refine the rule again.

## A small example

Suppose a long build finishes after the agent disconnects. A second session starts another
build because the first task ID was not recorded. The verified correction is to retain the
actual task ID and inspect the result before issuing another command.

Add that rule to the project's checkpoint procedure and link to
[Checkpoint and resume](https://docs.cmdop.ai/guides/workflow/checkpoints-and-recovery.md). This preserves the
lesson without introducing another build service or copying a private task log.

## Improving public guidance

For a lesson useful to other developers, propose a reviewed change to the public Workflow
guide. Remove private details, make the advice specific and state its limitations.
The public page and the documentation snapshot served by
[`docs_read`](https://docs.cmdop.ai/reference/tools/docs_read.md) may be at different revisions until an eligible
server update. Check the actual snapshot when current guidance matters.

A living workflow is a practice of reviewed improvement, not automatic permission to
rewrite rules, launch agents, change the user's project or publish material.

## Check

The updated rule identifies a real lesson, explains what to do and has an appropriate
verification method. The original failure and remaining limitations are still visible in
the project's evidence. Avoid treating a documentation edit as proof that runtime
behavior has changed.

## Related

[Engineering workflow](https://docs.cmdop.ai/guides/workflow.md) · [Research and plan](https://docs.cmdop.ai/guides/workflow/research-and-planning.md) ·
[Verify and deliver](https://docs.cmdop.ai/guides/workflow/testing-and-delivery.md)
