Difference Between --auto-update and Manual /understand Re-runs in Egonex
The --auto-update flag persists a configuration change that enables automatic post-commit hooks for incremental knowledge graph updates, while manual /understand re-runs execute as ephemeral, one-time operations without modifying persistent settings.
The /understand skill in the Egonex-AI/Understand-Anything repository serves as the primary entry point for building a knowledge graph of your project. Understanding the difference between --auto-update and manual re-runs is essential for optimizing your workflow, as the former establishes persistent automation through git hooks while the latter provides on-demand execution without side effects.
How the --auto-update Flag Works
When you invoke /understand with the --auto-update flag, the skill writes {"autoUpdate": true} to .understand-anything/config.json and enables a post-commit hook that triggers automatically on every git commit. This hook loads existing file fingerprints, re-analyzes only the changed files, and patches the graph incrementally rather than rebuilding it from scratch.
The flag handling is defined in understand-anything-plugin/skills/understand/SKILL.md, which documents the Phase 0.5 configuration steps where the system sets up the persistent automation. Once enabled, future commits automatically update the graph without requiring manual intervention.
Manual Re-runs and Ephemeral Execution
Running /understand without the --auto-update flag executes the skill as a one-time operation that does not modify the configuration file. The command evaluates whether to perform a full rebuild, an incremental update, or a review based on the current commit hash and changed files, following the decision table in Phase 0 of the SKILL.md workflow.
Because this execution leaves the autoUpdate setting unchanged in the config, subsequent git commits will not trigger automatic graph updates. The graph will only refresh the next time you manually invoke the command or explicitly disable auto-update with --no-auto-update.
Configuration Persistence Mechanism
The persistence layer relies on a default configuration defined in understand-anything-plugin/packages/core/src/types.ts at line 116, where autoUpdate defaults to false. The saveConfig function in understand-anything-plugin/packages/core/src/persistence/index.ts (line 35) persists user-provided values to the JSON file, while loadConfig (line 40) reads these settings on every run, falling back to defaults when the file is absent.
This architecture ensures that the --auto-update flag creates a persistent opt-in, whereas manual runs remain ephemeral and configuration-neutral.
Practical Usage Examples
Enable automatic incremental updates and persist the setting:
understand . --auto-update
Disable automatic updates and update the config file:
understand . --no-auto-update
Run a full rebuild manually (ignores existing graph):
understand . --full
Run without flags to check current state and update incrementally if needed:
understand .
Resulting configuration after enabling auto-update:
{
"autoUpdate": true,
"outputLanguage": "en"
}
Resulting configuration after disabling auto-update:
{
"autoUpdate": false,
"outputLanguage": "en"
}
Summary
--auto-updatepersistsautoUpdate: trueto the config file and installs a post-commit hook for automatic incremental updates on every git commit.- Manual re-runs execute once without modifying configuration, deciding between full rebuilds and incremental updates based on the current commit state.
--no-auto-updateexplicitly disables the automatic hook by settingautoUpdate: falsein the configuration.- The default configuration in
types.tssetsautoUpdate: false, ensuring manual control unless explicitly opted into automation.
Frequently Asked Questions
Does a manual /understand re-run enable automatic updates?
No. Manual re-runs do not modify the .understand-anything/config.json file. The autoUpdate setting remains unchanged, so automatic post-commit hooks are not installed or enabled unless you explicitly use the --auto-update flag.
Where is the auto-update configuration stored?
The configuration is stored in .understand-anything/config.json in your project root. According to the saveConfig implementation in understand-anything-plugin/packages/core/src/persistence/index.ts, this file contains the autoUpdate boolean and other project settings like outputLanguage.
What triggers an automatic update when auto-update is enabled?
When enabled, a post-commit git hook triggers after every commit. The hook analyzes only the changed files by loading existing fingerprints from the persistence layer, then patches the knowledge graph incrementally without requiring a manual /understand invocation.
How do I disable auto-update after enabling it?
Run the command with the --no-auto-update flag. This writes {"autoUpdate": false} to the configuration file and removes the automatic hook, returning the project to manual-only updates.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →