PROJECT GRAPH FEATURE
Impact, Context, and Watch Mode
This is the shift from structural knowledge to structural safety: impact before edits, focused context instead of giant prompts, and graph freshness during long work sessions.
Feature Guide
A quick orientation block that answers the essential questions: what this feature does, how it works, why it matters, and the key concepts behind it.
What this does
Impact mode is where Project Graph becomes a change-safety tool. It estimates blast radius, groups affected modules by depth, and can package only the snippets and context that actually belong in a review or AI prompt.
How it works
Use `ai:review-graph:impact` on a class, file path, or node id, add `--context` when you want a focused context package, add `--prompt` when that package should be shaped for review or refactor work, and use `ai:review-graph:watch` when a long session would otherwise leave graph-backed answers stale.
Why it matters
This matters because risky work usually fails before the patch is done: teams underestimate blast radius, overfeed AI prompts, and keep editing while structural assumptions drift. Project Graph makes those failure modes explicit and reviewable.
Key concepts
- ai:review-graph:impact
- Analyzes downstream impact for a class, file path, or node id and groups affected nodes by depth and module.
- --context
- Packages focused source snippets and graph-backed context so review or AI work starts from the impacted structure instead of random file dumps.
- --prompt
- Formats the context package into a review-, refactor-, or test-oriented prompt scaffold.
- ai:review-graph:watch
- Keeps the stored graph fresh during active development so later graph-backed answers match the current codebase.
Change Safety Flow
Check the blast radius before you edit, then package only the context you actually need
This matters because the expensive mistakes usually happen before the final patch exists: the blast radius was guessed, the prompt was too broad, or the graph-backed answer was already stale. Impact mode puts those risks on the surface early.
Step 1
Analyze the impact radius
Point at a file path, FQCN, or node id and inspect affected modules and dependency depth before changing the target.
bin/semitexa ai:review-graph:impact Semitexa\\Demo\\Application\\Service\\DemoCatalogService
bin/semitexa ai:review-graph:impact packages/semitexa-demo/src/Application/Service/DemoCatalogService.php --json
Step 2
Package focused context for AI or review
Context output and prompt generation keep the AI input precise instead of dumping large random slices of the repository.
bin/semitexa ai:review-graph:impact Semitexa\\Demo\\Application\\Service\\DemoCatalogService --context
bin/semitexa ai:review-graph:impact Semitexa\\Demo\\Application\\Service\\DemoCatalogService --context --prompt=review
Step 3
Keep the graph current during active work
Watch mode is useful when a long editing or review-fix session would otherwise drift away from the graph that later impact answers depend on.
bin/semitexa ai:review-graph:watch --full-on-start
bin/semitexa ai:review-graph:watch --interval=2
Where The Profit Shows Up
- Risky refactors become easier to scope before they start instead of after the first surprising breakage.
- AI prompts become smaller and more defensible because context is selected from the impacted structure.
- Review comments can be grounded in downstream effect instead of intuition alone.
- Long work sessions stay safer because watch mode keeps graph-backed answers aligned with the changing repository.
Verified against Semitexa Ultimate 2026.09.19.1020
Impact, Context, and Watch Mode
Project Graph is not only for inspection. It is also a practical safety layer for change planning.
Canonical flow
- Analyze the impact radius before editing.
- Package only the context needed for review or AI work.
- Keep the graph current during active changes when the session is long.
Commands
bin/semitexa ai:review-graph:impact Semitexa\\Demo\\Application\\Service\\DemoCatalogService
bin/semitexa ai:review-graph:impact Semitexa\\Demo\\Application\\Service\\DemoCatalogService --context
bin/semitexa ai:review-graph:impact Semitexa\\Demo\\Application\\Service\\DemoCatalogService --context --prompt=review
bin/semitexa ai:review-graph:watch --full-on-start
Why this matters
This is where the graph becomes engineering safety: clearer blast-radius decisions, smaller prompts, fewer accidental side effects, and safer refactors.
How it works
Use `ai:review-graph:impact` on a class, file path, or node id, add `--context` when you want a focused context package, add `--prompt` when that package should be shaped for review or refactor work, and use `ai:review-graph:watch` when a long session would otherwise leave graph-backed answers stale.
Why it matters
This matters because risky work usually fails before the patch is done: teams underestimate blast radius, overfeed AI prompts, and keep editing while structural assumptions drift. Project Graph makes those failure modes explicit and reviewable.
Key concepts
- ai:review-graph:impact
- Analyzes downstream impact for a class, file path, or node id and groups affected nodes by depth and module.
- --context
- Packages focused source snippets and graph-backed context so review or AI work starts from the impacted structure instead of random file dumps.
- --prompt
- Formats the context package into a review-, refactor-, or test-oriented prompt scaffold.
- ai:review-graph:watch
- Keeps the stored graph fresh during active development so later graph-backed answers match the current codebase.
Recommended Habit
A disciplined graph-first change workflow
Treat Project Graph as part of serious change preparation, not as an optional afterthought.
Refresh or verify the graph before substantial edits when impact results need to reflect the current repository state.
Run impact analysis before touching shared services, handlers, repositories, or framework infrastructure.
Prefer `--context` and prompt packaging over manually assembling giant AI prompts from arbitrary files.
Use watch mode during long-running refactors or review-fix sessions where the codebase changes repeatedly.