Hunknote automatically detects scope from your staged files.
Strategies
Auto (Default)
Tries all strategies and uses the best match.
hunknote --scope-strategy auto
Monorepo
Detects scope from monorepo directory structures.
packages/auth/src/login.py → scope: auth
apps/web/components/Button.js → scope: web
Recognized roots: packages/, apps/, libs/, modules/, services/
hunknote --scope-strategy monorepo
Path-Prefix
Uses the most common path segment.
api/routes.py → scope: api
api/models.py → scope: api
hunknote --scope-strategy path-prefix
Mapping
Uses explicit path-to-scope configuration.
scope:
strategy: mapping
mapping:
"src/api/": api
"src/web/": ui
hunknote --scope-strategy mapping
None
Disables scope inference.
hunknote --scope-strategy none
# or
hunknote --no-scope
Precedence
Scope is determined in order (first wins):
--scope <value>CLI flag--no-scopeCLI flag- LLM suggested scope
- Heuristics-based inference
- No scope
Debug
hunknote --debug
Shows: strategy used, inferred scope, confidence, final scope.