CppDepend AI
Things to ask your assistant
Copy these requests as they are. They work with any assistant once you ran cppdepend-ai init in your repository.
Review your change before a pull request
Review my change with CppDepend. Report new issues, methods whose complexity grew, and any new namespace cycle. Give file:line, rule and severity for each.
For a pull request, ask it to compare with your main branch: "...only the files changed since main."
Fix the issues of a rule or a file
Fix the issues of rule X in src/foo/. Use the "how to fix" from CppDepend. Re-run the analysis and confirm each issue is gone.
Refactor the riskiest code
Pick the top hotspot, explain why it is one, and propose a refactoring plan before editing.
Ask for the plan first: an analysis takes minutes, edits are cheap, mistakes are expensive.
Architecture questions
- "Are there dependency cycles? Which types create them?"
- "What breaks if I change this method?" (your assistant looks at its callers)
- "Can namespace A depend on namespace B?" (your assistant writes a CQLinq rule and tests it)
Turn a decision into a rule
Write a CppDepend rule that fails when a method has more than 8 parameters, test it, and add it to the queries of cppdepend-ai.gate.json.
Tips
- Ask for the evidence: file and line, rule, severity.
- Say "do not leave new Blocker or Critical issues": it matches the quality gate.
- Ask the assistant to tell you when the results are out of date or when there is no baseline.
Avoid
- Editing the files in the
cppdependaifolder: they are generated. - Pasting whole result files in the chat: ask for the summary.
- Trusting numbers for code you edited since the last analysis.
- Silencing a rule just to make the gate pass, without a team decision.
