Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Feature Creation

15.2. Feature Creation — Writing New Features

Start with a dedicated worktree for each feature

The recommended principle: create a separate branch/worktree for every significant change — keep the diff focused and the PR small and easy to review. This is a habit to adopt from the moment you start creating a feature, not something to think about only when opening the PR.

Combine with AGENTS.md to follow existing conventions

When writing a new feature, AGENTS.md (7.2) ensures the generated code follows the project’s conventions — directory structure, naming style, architectural patterns already in use — rather than the agent applying a generic style that does not fit the codebase.

Notes

  • For a feature that needs multiple coordinated steps (write code → write tests → update docs), consider using a bundle skill (10.1) if this is a process you repeat frequently in the project.
  • Use checkpoints//rollback when experimenting with different approaches for the same feature — safer than committing each attempt.
  • If you need to try multiple solutions to the same problem in parallel, open separate worktrees (one branch per approach) instead of trying them sequentially on the same branch — easier to compare, and you do not fear losing a discarded option.