Coding
Use this skill whenever an LLM Agent is asked to implement, fix, refactor, or otherwise change code.
Principles
- Define the problem clearly. A problem that can be described clearly in language is already mostly solved. Start by making the current problem explicit before coding.
- Define the target from the problem. State the final goal for the current coding round so the agent knows what outcome it is optimizing for.
- Use TDD. Drive coding with tests. Work in small, fast iterations: write or adjust a focused test, make the smallest implementation change that passes it, then refine.
- Make atomic git commits. After completing each atomic unit of the coding task, create one commit for that unit before moving on.
Workflow
- Clarify the problem in concrete language.
- Derive the goal for the current coding round from that problem definition.
- Break the work into atomic units that can be tested and committed independently.
- For each unit:
- Write or update a focused test that captures the intended behavior.
- Implement the smallest correct change.
- Run the relevant test.
- Commit the completed unit with an atomic git commit.
- Continue with the next unit until the coding goal is complete.