|
1 | 1 | # GitHub Copilot — Workflow Instructions |
2 | 2 |
|
| 3 | +> **Precedence rule:** In case of conflict, Core Principles override Workflow Orchestration, which overrides Task Management defaults. |
| 4 | +
|
3 | 5 | ## Workflow Orchestration |
4 | 6 |
|
5 | 7 | ### 1. Plan Before Implementing |
6 | | -- For ANY non-trivial task (3+ steps or architectural decisions), think through the full plan before writing code |
| 8 | +- For any task that meets ONE OR MORE of: (a) requires 3 or more distinct implementation steps, (b) involves choosing between architectural approaches, or (c) modifies more than one module/file — think through the full plan before writing code |
7 | 9 | - Use the `manage_todo_list` tool to write the plan with checkable items before starting |
8 | | -- If something goes sideways during implementation, STOP and re-plan immediately |
| 10 | +- If any of the following occur: a test fails that cannot be fixed within 2 attempts, a dependency or constraint is discovered that invalidates the current approach, or the implementation scope grows beyond the original plan — STOP and re-plan immediately |
9 | 11 | - Write detailed specs upfront to reduce ambiguity |
10 | 12 |
|
11 | 13 | ### 2. Subagent Strategy |
|
17 | 19 | ### 3. Self-Improvement Loop |
18 | 20 | - After ANY correction from the user: update `.github/instructions/lessons.instructions.md` with the pattern |
19 | 21 | - Write rules that prevent the same mistake from recurring |
20 | | -- Review lessons at the start of a session for the relevant project |
| 22 | +- At the start of each session, read `.github/instructions/lessons.instructions.md` and apply lessons that match the current repository or technology stack |
21 | 23 |
|
22 | 24 | ### 4. Verification Before Done |
23 | 25 | - Never mark a task complete without proving it works |
|
27 | 29 |
|
28 | 30 | ### 5. Demand Elegance (Balanced) |
29 | 31 | - For non-trivial changes: pause and ask "is there a more elegant way?" |
30 | | -- If a fix feels hacky, implement the elegant solution instead |
| 32 | +- Elegance takes precedence over a hacky fix, but must not require touching unnecessary code — prefer the simplest elegant solution |
31 | 33 | - Skip this for simple, obvious fixes — don't over-engineer |
32 | 34 | - Challenge your own work before presenting it |
33 | 35 |
|
34 | | -### 6. Autonomous Bug Fixing |
35 | | -- When given a bug report: just fix it — no hand-holding needed |
| 36 | +### 6. Interaction Model |
| 37 | +- **Proceed autonomously** for bug fixes and tasks with a clear, unambiguous goal (no check-in needed) |
| 38 | +- **Require check-in** before implementation only for tasks involving architectural decisions or changes affecting more than one system boundary |
36 | 39 | - Point at logs, errors, and failing tests, then resolve them |
37 | | -- Zero context switching required from the user |
38 | 40 | - Fix failing tests without being told how |
39 | 41 |
|
40 | 42 | --- |
41 | 43 |
|
42 | 44 | ## Task Management |
43 | 45 |
|
| 46 | +0. **Clarify First** — If the task description is missing acceptance criteria, affected files, or expected behavior, ask at most 3 targeted clarifying questions before writing any plan (skip for bug fixes with clear reproduction steps) |
44 | 47 | 1. **Plan First** — Write the plan to the task list (`manage_todo_list`) with checkable items |
45 | | -2. **Verify Plan** — Check in before starting implementation |
| 48 | +2. **Verify Plan** — Check in before starting implementation for architectural or multi-boundary tasks; proceed directly for bug fixes and unambiguous tasks |
46 | 49 | 3. **Track Progress** — Mark items complete as you go; only one item in-progress at a time |
47 | 50 | 4. **Explain Changes** — High-level summary at each step |
48 | 51 | 5. **Document Results** — Add a brief review at the end of the task list |
|
0 commit comments