DEVELOPER NOTES
Give your coding agent a task contract it can finish
Specify the target, boundaries, evidence, and handoff before a small task grows into an unreviewable rewrite.

“Fix the app” is a mood, not a task. I understand the mood. But an agent needs a finish line that another person can recognize. A useful task contract is short enough to read and concrete enough to constrain the work. It is an engineering habit, not a claim that a new prompt format makes every model reliable.
Write the user-visible result first
Start with a trigger and an outcome: “When an empty CSV is uploaded, show an actionable message and preserve the current workspace.” That is more useful than “improve error handling.” Add a real failing example with private information removed. Name the repository and branch or worktree so the agent does not infer a target from whichever directory happens to be open.
Define what the agent may change. For a frontend validation fix, database migration and authentication redesign are probably outside scope. If those areas turn out to be relevant, the agent should bring evidence back instead of silently expanding the project. The contract should also state any already-authorized deployment or publication step; memory and comments in a file cannot grant that permission.
Ask for evidence that fits the change
A good acceptance statement has an observable result. “The supplied empty file produces the error, the previous dataset remains readable, and a valid import still succeeds” is testable. The particular checks should come from the failure risk, not from a ritual to run every tool in the repository.
Use a compact handoff structure:
Target: empty-CSV import behavior
Allowed area: importer and its error UI
Acceptance: no workspace loss; valid import still works
Evidence: reproduction, focused checks, changed files
Handoff: result, limits, next required action
This is an original example, not a configuration format for a particular harness. Keep credentials and customer files out of the task text. Link to authorized fixtures instead.
Make partial progress honest
An agent may discover that the failure occurs in a dependency it cannot safely change. A useful report says what it reproduced, what it changed, what remains, and which check supports each statement. A plan is not an implementation; a file edit is not a passing test; a passing local test is not a deployed fix.
Review the result against the original acceptance statement before asking for more work. If the goal changes, update the contract rather than layering contradictory messages on top. Clear boundaries save time because the worker can make routine choices independently while still knowing where its authority ends.
コーディングエージェントに完了を判断できる依頼を書く
「アプリを直して」は気持ちは分かるが、完了条件になりにくい。エージェントへの依頼は短く具体的にしたい。これは新しい魔法のプロンプトではなく、作業を判断できる形にする習慣だ。
利用者の結果から書く
「空のCSVを送ると説明を表示し、現在のデータを残す」のように条件と結果を書く。非機密の再現例、リポジトリ、ブランチかworktreeを指定する。変更可能な範囲を決め、認証やDB設計まで勝手に広げない。必要な関連変更が見つかったら証拠付きで報告する。ファイルのコメントや記憶は公開権限を追加しない。
見て確かめられる証拠
空ファイルのエラー、以前のデータ保持、正常ファイルの成功を確認する。危険に合う検査を選び、全部のツールを形式的に実行しない。
対象: 空CSVの読み込み
範囲: 読み込み処理とエラー表示
受け入れ: データ保持、正常入力も成功
証拠: 再現、関連検査、変更ファイル
引き渡し: 結果、限界、残る必要作業
これは独自の例で、特定製品の設定形式ではない。秘密や顧客ファイルは含めない。部分完了なら、再現したこと、直したこと、未解決、各証拠を分ける。計画、編集、テスト成功、公開は同じ状態ではない。目標が変わったら依頼自体を更新し、矛盾する追加指示を積み重ねない。



