$npx -y skills add affaan-m/ECC --skill agentic-engineeringOperate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when AI agents perform most implementation work and humans enforce quality and risk controls.
| 1 | # Agentic Engineering |
| 2 | |
| 3 | Use this skill for engineering workflows where AI agents perform most implementation work and humans enforce quality and risk controls. |
| 4 | |
| 5 | ## Operating Principles |
| 6 | |
| 7 | 1. Define completion criteria before execution. |
| 8 | 2. Decompose work into agent-sized units. |
| 9 | 3. Route model tiers by task complexity. |
| 10 | 4. Measure with evals and regression checks. |
| 11 | |
| 12 | ## Eval-First Loop |
| 13 | |
| 14 | 1. Define capability eval and regression eval. |
| 15 | 2. Run baseline and capture failure signatures. |
| 16 | 3. Execute implementation. |
| 17 | 4. Re-run evals and compare deltas. |
| 18 | |
| 19 | **Example workflow:** |
| 20 | ``` |
| 21 | 1. Write test that captures desired behavior (eval) |
| 22 | 2. Run test → capture baseline failures |
| 23 | 3. Implement feature |
| 24 | 4. Re-run test → verify improvements |
| 25 | 5. Check for regressions in other tests |
| 26 | ``` |
| 27 | |
| 28 | ## Task Decomposition |
| 29 | |
| 30 | Apply the 15-minute unit rule: |
| 31 | - Each unit should be independently verifiable |
| 32 | - Each unit should have a single dominant risk |
| 33 | - Each unit should expose a clear done condition |
| 34 | |
| 35 | **Good decomposition:** |
| 36 | ``` |
| 37 | Task: Add user authentication |
| 38 | ├─ Unit 1: Add password hashing (15 min, security risk) |
| 39 | ├─ Unit 2: Create login endpoint (15 min, API contract risk) |
| 40 | ├─ Unit 3: Add session management (15 min, state risk) |
| 41 | └─ Unit 4: Protect routes with middleware (15 min, auth logic risk) |
| 42 | ``` |
| 43 | |
| 44 | **Bad decomposition:** |
| 45 | ``` |
| 46 | Task: Add user authentication (2 hours, multiple risks) |
| 47 | ``` |
| 48 | |
| 49 | ## Model Routing |
| 50 | |
| 51 | Choose model tier based on task complexity: |
| 52 | |
| 53 | - **Haiku**: Classification, boilerplate transforms, narrow edits |
| 54 | - Example: Rename variable, add type annotation, format code |
| 55 | |
| 56 | - **Sonnet**: Implementation and refactors |
| 57 | - Example: Implement feature, refactor module, write tests |
| 58 | |
| 59 | - **Opus**: Architecture, root-cause analysis, multi-file invariants |
| 60 | - Example: Design system, debug complex issue, review architecture |
| 61 | |
| 62 | **Cost discipline:** Escalate model tier only when lower tier fails with a clear reasoning gap. |
| 63 | |
| 64 | ## Session Strategy |
| 65 | |
| 66 | - **Continue session** for closely-coupled units |
| 67 | - Example: Implementing related functions in same module |
| 68 | |
| 69 | - **Start fresh session** after major phase transitions |
| 70 | - Example: Moving from implementation to testing |
| 71 | |
| 72 | - **Compact after milestone completion**, not during active debugging |
| 73 | - Example: After feature complete, before starting next feature |
| 74 | |
| 75 | ## Review Focus for AI-Generated Code |
| 76 | |
| 77 | Prioritize: |
| 78 | - Invariants and edge cases |
| 79 | - Error boundaries |
| 80 | - Security and auth assumptions |
| 81 | - Hidden coupling and rollout risk |
| 82 | |
| 83 | Do not waste review cycles on style-only disagreements when automated format/lint already enforce style. |
| 84 | |
| 85 | **Review checklist:** |
| 86 | - [ ] Edge cases handled (null, empty, boundary values) |
| 87 | - [ ] Error handling comprehensive |
| 88 | - [ ] Security assumptions validated |
| 89 | - [ ] No hidden coupling between modules |
| 90 | - [ ] Rollout risk assessed (breaking changes, migrations) |
| 91 | |
| 92 | ## Cost Discipline |
| 93 | |
| 94 | Track per task: |
| 95 | - Model tier used |
| 96 | - Token estimate |
| 97 | - Retries needed |
| 98 | - Wall-clock time |
| 99 | - Success/failure outcome |
| 100 | |
| 101 | **Example tracking:** |
| 102 | ``` |
| 103 | Task: Implement user login |
| 104 | Model: Sonnet |
| 105 | Tokens: ~5k input, ~2k output |
| 106 | Retries: 1 (initial implementation had auth bug) |
| 107 | Time: 8 minutes |
| 108 | Outcome: Success |
| 109 | ``` |
| 110 | |
| 111 | ## When to Use This Skill |
| 112 | |
| 113 | - Managing AI-driven development workflows |
| 114 | - Planning agent task decomposition |
| 115 | - Optimizing model tier selection |
| 116 | - Implementing eval-first development |
| 117 | - Reviewing AI-generated code |
| 118 | - Tracking development costs |
| 119 | |
| 120 | ## Integration with Other Skills |
| 121 | |
| 122 | - **tdd-workflow**: Combine with eval-first loop for test-driven development |
| 123 | - **verification-loop**: Use for continuous validation during implementation |
| 124 | - **search-first**: Apply before implementation to find existing solutions |
| 125 | - **coding-standards**: Reference during code review phase |