Implementation Workflow
name: implementation-workflow description: Implement code changes with disciplined scope control, repository-state preservation, relevant verification, and concern-scoped commits. Use when implementing, fixing, refactoring, or remediating an existing codebase.
Implementation Workflow
Implement the requested change safely, minimally, and in a reviewable form.
Scope and priority
Follow the current task, applicable repository instructions such as AGENTS.md, and established project conventions.
Do not expand scope merely because adjacent improvements are possible.
This skill governs implementation and remediation. Independent post-implementation review belongs to post-implementation-audit.
1. Inspect before changing
Before editing:
- understand the requested behavior and acceptance criteria;
- inspect the relevant existing implementation;
- inspect repository status when Git is available;
- identify pre-existing modified, staged, deleted, or untracked files.
Treat unrelated existing changes as protected.
Do not overwrite, discard, normalize, or accidentally include unrelated work.
2. Decide whether a plan is needed
Proceed directly when the task is small, localized, low-risk, and sufficiently clear.
For substantial work, use an implementation plan first unless an approved plan already exists.
Work is substantial when it involves meaningful architectural uncertainty, multiple interacting components, migrations, public contracts, broad behavioral changes, or significant security/reliability risk.
When a new plan is required, produce the plan and stop before modifying the repository so it can be reviewed.
Do not create ceremonial plans for trivial work.
3. Implement narrowly
Once implementation is authorized:
- make the smallest coherent change that satisfies the task;
- preserve existing architecture and conventions unless the task intentionally changes them;
- prefer existing mechanisms over unnecessary parallel abstractions;
- avoid unrelated refactoring, cleanup, renaming, formatting churn, dependency changes, or speculative improvements;
- preserve unrelated changes in files that must also be edited.
Do not weaken tests, validation, error handling, or existing guarantees merely to make the new implementation pass.
4. Preserve repository state
Do not discard existing work to obtain a clean repository.
Unless explicitly required and authorized, do not use destructive or history-rewriting operations such as:
git resetgit restoregit stashgit clean- rebase
- amend
- squash
- other history rewriting
Work around unrelated dirty state instead of erasing it.
5. Verify the implementation
Use the smallest relevant verification first, then expand when scope or risk warrants it.
Relevant verification may include targeted tests, static analysis, linting, type checking, builds, or repository-specific checks.
Add or update tests when needed to prove changed behavior.
Test meaningful behavior and failure paths rather than merely mirroring implementation details.
Never claim verification that was not actually performed.
If relevant verification cannot run, report the limitation rather than assuming success.
6. Create commits only when authorized
Create commits only when explicitly authorized by the current task or applicable repository instructions.
When commits are authorized:
- each commit must represent one coherent concern;
- keep unrelated implementation, cleanup, formatting, documentation, and refactoring concerns separate unless inseparable;
- keep commits independently understandable, reviewable, and reasonably revertible;
- use meaningful commit messages.
Before each commit:
- inspect repository state;
- identify exactly which changes belong to the concern;
- stage only those changes;
- inspect the staged diff;
- commit only after confirming its scope.
Prefer explicit file or hunk staging.
Do not use broad staging such as git add . when it could capture unrelated changes.
Do not rewrite existing commits unless explicitly requested.
7. Finish and hand off
Before declaring implementation complete:
- confirm the requested behavior and acceptance criteria are addressed;
- run relevant final verification;
- inspect the final diff for accidental or unrelated changes;
- report unresolved limitations honestly.
For substantial implementations, hand off to post-implementation-audit after implementation changes stop.
If the audit reports findings:
- return to an implementation/remediation phase;
- fix only supported findings with the smallest coherent change;
- verify the remediation;
- run
post-implementation-auditagain.
Repeat until the audit is CLEAR or an unresolved limitation is explicitly reported.
Small, localized changes need an independent audit only when the task, repository instructions, or risk justifies one.
Output
At completion, concisely report:
- what changed;
- important implementation decisions;
- verification actually performed;
- material limitations or unresolved issues;
- commits created, if any.
Do not reproduce this workflow as a checklist in the final response.
使用建议
- 想直接看效果?在「变量填充 / 测试」里点「测试效果」,AI 会返回真实结果;满意再「复制结果」。存在「我的版本」时可分别测试、并排对比。
- 也可点「复制提示词」直接复制原文,手动替换占位符。
- 把内容粘贴到对应 AI 模型(ChatGPT)的对话框。
- 想改成自己的版本?切到「编辑我的版本」,保存私有版本或公开提交。
标签
相似提示词
同分类下其他优质提示词
Git操作·危险操作自检
执行危险 Git 命令前的自检:确认影响范围、备份、替代方案与恢复路径。
Git操作·一条龙
Git 全流程打包:状态分析+步骤命令+风险警示+验证+恢复方案+提交规范。
API文档·OpenAPI版
输出 OpenAPI/Swagger 规范:paths/schemas/参数/响应完整 YAML 骨架。
Git操作·commit规范版
写规范提交:Conventional Commits,拆分提交、写清 body 与关联 issue。
代码生成·异常边界处理版
专补健壮性:列出边界/异常并逐一处理,给出防御性实现。
正则表达式·方言适配版
同一需求给多语言正则:JS/Python/PCRE/Go 的语法差异与兼容写法。