Seven Habits for AI Coding
Overview
Mental model that maps Stephen Covey's 7 Habits of Highly Effective People onto AI-assisted development with Claude Code. Use as a diagnostic checklist when your AI workflow feels chaotic, reactive, or produces low-quality output — not as a ritual to perform on every task.
Core principle: the 7 habits are principles, not procedures. They tell you which discipline is missing; the existing skills/tools tell you how to fix it.
When to Use
- Auditing your Claude Code workflow for blind spots
- Onboarding a new project — which habits should I bring?
- AI output feels off and you need to find the missing discipline
- Designing team practices for AI-assisted engineering
- Post-mortem after a botched AI task
- Deciding human-vs-AI division of labor on a new task
Don't use for routine single-file edits, narrow bug fixes, or one-shot questions — reach for the specific debug/test/docs skill instead.
The Mapping
| # |
Habit (Covey) |
AI Coding Practice |
| 1 |
积极主动 (Be Proactive) |
Curate CLAUDE.md / MEMORY.md / lessons.md before AI fails. Set up hooks before reactive fixes. Capture corrections as durable memory the moment they happen. Focus on the circle of influence (your prompt, your context, your rules) rather than blaming the model. |
| 2 |
以终为始 (Begin with End in Mind) |
Plan mode + spec/acceptance criteria before prompting. TDD: tests are the spec. Define "done" before starting. Mental creation precedes physical creation. |
| 3 |
要事第一 (Put First Things First) |
TodoWrite + Quadrant-II discipline. No scope creep mid-task. Architecture decisions before the crunch, not during. One battle at a time (don't refactor while debugging). |
| 4 |
双赢思维 (Think Win-Win) |
Match work to actor: human = judgment, context, ambiguity, "is this the right problem"; AI = speed, breadth, mechanical transformation, "execute the plan". Don't micromanage execution; don't outsource judgment. |
| 5 |
知彼解己 (Seek First to Understand) |
Read existing code/docs before editing. Use deep-code-read, codebase-onboarding, context7 for library APIs. Read failing tests fully. Verify APIs — never let the model guess. |
| 6 |
统合综效 (Synergize) |
Parallel subagents for independent work. adversarial-review / ultrareview for risky changes. Mix models (Opus thinks, Sonnet executes, Haiku batches). Cross-check across agents (codex + claude). |
| 7 |
不断更新 (Sharpen the Saw) |
Renew across 4 dimensions: tooling (/update, hook upgrades), knowledge (retro, learn, continuous-learning), principles (audit lessons.md, prune stale rules), collaboration (promote project-scoped patterns to global). |
Diagnostic Table — Symptom → Missing Habit
When AI output feels off, find the failing habit, then apply the corresponding skill.
| Symptom |
Missing |
Apply |
| AI repeats the same mistake across sessions |
1 |
Write to lessons.md / MEMORY.md |
| AI dives in, ends up wrong direction |
2 |
Plan mode, write spec first |
| Task drifts; "while we're here" creep |
3 |
TodoWrite, defer non-critical to backlog |
| You're rewriting every line AI produces |
4 |
Wrong split — give AI a clearer mechanical task or take judgment back |
| AI hallucinates APIs / fabricates code |
5 |
Force context7 / deep-code-read before edits |
| Risky change shipped without challenge |
6 |
adversarial-review / ultrareview |
| Same mistakes month after month |
7 |
retro + prune lessons.md |
Pre-Task Heuristic (3 questions)
Before any non-trivial AI task, answer:
- Habit 2 — Do I have a written plan / spec / acceptance criteria?
- Habit 5 — Has the AI (or have I) actually read the relevant existing code?
- Habit 6 — Is this risky enough to need a second perspective?
If two or more answers are "no," stop and address before continuing.
Habit → Skill/Tool Cheatsheet
| Habit |
Concrete skills/tools to reach for |
| 1 Proactive |
edit ~/.claude/CLAUDE.md, lessons.md, learn, update-config (hooks), promote |
| 2 End in Mind |
plan, EnterPlanMode, superpowers:writing-plans, tdd, superpowers:test-driven-development |
| 3 First Things First |
TodoWrite, TaskCreate, freeze (focus boundary), unfreeze |
| 4 Win-Win |
judgment in main thread; execution via Agent subagents (one task per subagent) |
| 5 Understand First |
deep-code-read, codebase-onboarding, context7, project deep-read skills (e.g. ada-dr-*) |
| 6 Synergize |
adversarial-review, ultrareview, superpowers:dispatching-parallel-agents, codex, plan-*-review family |
| 7 Sharpen |
retro, learn, continuous-learning, sessions, /update, gstack-upgrade |
Common Mistakes
- Ritualizing without judgment. Principles, not a checklist. A 5-minute fix should not become a 1-hour ceremony — that itself is a habit-3 failure.
- Skipping habit 5 because "the model knows the codebase." It doesn't. Force it to read first; verify before suggesting.
- Confusing 4 and 6. Win-Win = role boundaries between human and AI. Synergy = combining outputs across multiple agents/models. Both matter; neither replaces the other.
- Treating habit 7 as optional. Without renewal the other six decay quietly: stale lessons stop firing, hooks lag tooling, principles drift from current practice.
- Using all 7 every time. That's habit 3 violating itself. Pick the one or two that matter for this task.
When NOT to Apply
- Ten-second edits, typo fixes, single-line changes
- Throwaway prototypes where rigor costs more than rework
- The user explicitly asked for raw code, not a methodology
- A specific skill (debug, test, security) already covers the discipline you need
1---2name: seven-habits-coding3description: Use when designing or auditing AI coding workflows, deciding human/AI division of labor, diagnosing why Claude Code output feels reactive/off-target/low-quality, or onboarding to a new project and choosing which collaboration disciplines to enforce. Maps Stephen Covey's 7 Habits onto Claude Code practices as a diagnostic mental model.4---56# Seven Habits for AI Coding78## Overview910Mental model that maps Stephen Covey's *7 Habits of Highly Effective People* onto AI-assisted development with Claude Code. Use as a **diagnostic checklist** when your AI workflow feels chaotic, reactive, or produces low-quality output — not as a ritual to perform on every task.1112Core principle: the 7 habits are **principles, not procedures**. They tell you *which discipline is missing*; the existing skills/tools tell you *how to fix it*.1314## When to Use1516- Auditing your Claude Code workflow for blind spots17- Onboarding a new project — which habits should I bring?18- AI output feels off and you need to find the missing discipline19- Designing team practices for AI-assisted engineering20- Post-mortem after a botched AI task21- Deciding human-vs-AI division of labor on a new task2223**Don't use** for routine single-file edits, narrow bug fixes, or one-shot questions — reach for the specific debug/test/docs skill instead.2425## The Mapping2627| # | Habit (Covey) | AI Coding Practice |28|---|--------------|-------------------|29| 1 | 积极主动 (Be Proactive) | Curate `CLAUDE.md` / `MEMORY.md` / `lessons.md` *before* AI fails. Set up hooks before reactive fixes. Capture corrections as durable memory the moment they happen. Focus on the circle of influence (your prompt, your context, your rules) rather than blaming the model. |30| 2 | 以终为始 (Begin with End in Mind) | Plan mode + spec/acceptance criteria before prompting. TDD: tests are the spec. Define "done" before starting. Mental creation precedes physical creation. |31| 3 | 要事第一 (Put First Things First) | TodoWrite + Quadrant-II discipline. No scope creep mid-task. Architecture decisions *before* the crunch, not during. One battle at a time (don't refactor while debugging). |32| 4 | 双赢思维 (Think Win-Win) | Match work to actor: **human** = judgment, context, ambiguity, "is this the right problem"; **AI** = speed, breadth, mechanical transformation, "execute the plan". Don't micromanage execution; don't outsource judgment. |33| 5 | 知彼解己 (Seek First to Understand) | Read existing code/docs *before* editing. Use `deep-code-read`, `codebase-onboarding`, `context7` for library APIs. Read failing tests fully. Verify APIs — never let the model guess. |34| 6 | 统合综效 (Synergize) | Parallel subagents for independent work. `adversarial-review` / `ultrareview` for risky changes. Mix models (Opus thinks, Sonnet executes, Haiku batches). Cross-check across agents (codex + claude). |35| 7 | 不断更新 (Sharpen the Saw) | Renew across 4 dimensions: **tooling** (`/update`, hook upgrades), **knowledge** (`retro`, `learn`, continuous-learning), **principles** (audit `lessons.md`, prune stale rules), **collaboration** (promote project-scoped patterns to global). |3637## Diagnostic Table — Symptom → Missing Habit3839When AI output feels off, find the failing habit, then apply the corresponding skill.4041| Symptom | Missing | Apply |42|---------|---------|-------|43| AI repeats the same mistake across sessions | 1 | Write to `lessons.md` / `MEMORY.md` |44| AI dives in, ends up wrong direction | 2 | Plan mode, write spec first |45| Task drifts; "while we're here" creep | 3 | TodoWrite, defer non-critical to backlog |46| You're rewriting every line AI produces | 4 | Wrong split — give AI a clearer mechanical task or take judgment back |47| AI hallucinates APIs / fabricates code | 5 | Force `context7` / `deep-code-read` before edits |48| Risky change shipped without challenge | 6 | `adversarial-review` / `ultrareview` |49| Same mistakes month after month | 7 | `retro` + prune `lessons.md` |5051## Pre-Task Heuristic (3 questions)5253Before any non-trivial AI task, answer:54551. **Habit 2** — Do I have a written plan / spec / acceptance criteria?562. **Habit 5** — Has the AI (or have I) actually read the relevant existing code?573. **Habit 6** — Is this risky enough to need a second perspective?5859**If two or more answers are "no," stop and address before continuing.**6061## Habit → Skill/Tool Cheatsheet6263| Habit | Concrete skills/tools to reach for |64|-------|-----------------------------------|65| 1 Proactive | edit `~/.claude/CLAUDE.md`, `lessons.md`, `learn`, `update-config` (hooks), `promote` |66| 2 End in Mind | `plan`, EnterPlanMode, `superpowers:writing-plans`, `tdd`, `superpowers:test-driven-development` |67| 3 First Things First | TodoWrite, TaskCreate, `freeze` (focus boundary), `unfreeze` |68| 4 Win-Win | judgment in main thread; execution via Agent subagents (one task per subagent) |69| 5 Understand First | `deep-code-read`, `codebase-onboarding`, `context7`, project deep-read skills (e.g. `ada-dr-*`) |70| 6 Synergize | `adversarial-review`, `ultrareview`, `superpowers:dispatching-parallel-agents`, `codex`, `plan-*-review` family |71| 7 Sharpen | `retro`, `learn`, `continuous-learning`, `sessions`, `/update`, `gstack-upgrade` |7273## Common Mistakes74751. **Ritualizing without judgment.** Principles, not a checklist. A 5-minute fix should not become a 1-hour ceremony — that itself is a habit-3 failure.762. **Skipping habit 5 because "the model knows the codebase."** It doesn't. Force it to read first; verify before suggesting.773. **Confusing 4 and 6.** Win-Win = role boundaries between human and AI. Synergy = combining outputs across multiple agents/models. Both matter; neither replaces the other.784. **Treating habit 7 as optional.** Without renewal the other six decay quietly: stale lessons stop firing, hooks lag tooling, principles drift from current practice.795. **Using all 7 every time.** That's habit 3 violating itself. Pick the one or two that matter for *this* task.8081## When NOT to Apply8283- Ten-second edits, typo fixes, single-line changes84- Throwaway prototypes where rigor costs more than rework85- The user explicitly asked for raw code, not a methodology86- A specific skill (debug, test, security) already covers the discipline you need