chore(commands): split /prime into lightweight and deep variants#5651
Conversation
Reduce per-session token overhead by making /prime self-contained (~330 tokens) with project basics, top-level dirs, and the GitHub pipeline summary. Move the full architecture tour (project-guide.md + vision.md + pyproject.toml) to /prime-deep for when it's actually needed.
There was a problem hiding this comment.
Pull request overview
Splits the existing /prime slash command into a lightweight, self-contained quick-start (/prime) and a full-context variant (/prime-deep) to reduce per-session token overhead while keeping deep orientation available when needed.
Changes:
- Replaced
/primewith a short orientation (project summary, directory map, minimal git/PR status). - Added
/prime-deepcontaining the previous full/primecontent (reads + Serena/tooling guidance).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| agentic/commands/prime.md | Slims /prime down to minimal, always-useful context and short status commands. |
| agentic/commands/prime-deep.md | Introduces an opt-in deep primer that mirrors the prior /prime behavior and includes referenced docs. |
| - Run `check_onboarding_performed` | ||
| - Run `list_memories` and read relevant ones | ||
|
|
||
| ### JetBrains Tools (prefer over brute-force scanning) | ||
|
|
||
| Use Serena's JetBrains-backed tools for code navigation — they provide semantic understanding | ||
| that grep/glob cannot: | ||
|
|
||
| - `jet_brains_get_symbols_overview` — get top-level symbols in a file (classes, functions, variables). Use with `depth: 1` to also see methods of classes. Start here to understand a file before diving deeper. | ||
| - `jet_brains_find_symbol` — search for a symbol by name across the codebase. Supports name path patterns like `MyClass/my_method`. Use `include_body: true` to read source code, `include_info: true` for docstrings/signatures. | ||
| - `jet_brains_find_referencing_symbols` — find all usages of a symbol (who calls this function? who imports this class?). Essential for understanding impact of changes. | ||
| - `jet_brains_find_declaration` — jump to where a symbol is defined. | ||
| - `jet_brains_find_implementations` — find implementations of an interface/abstract class. | ||
| - `jet_brains_type_hierarchy` — understand class inheritance chains. | ||
|
|
||
| ### Editing via Serena | ||
|
|
||
| For structural edits, prefer Serena's symbol-aware tools over raw text replacement: | ||
|
|
||
| - `replace_symbol_body` — replace an entire function/class body | ||
| - `insert_after_symbol` / `insert_before_symbol` — add code relative to a symbol | ||
| - `search_for_pattern` — regex search across the codebase (fast, flexible) |
|
@copilot resolve the merge conflicts in this pull request |
- Activate the project with `mcp__serena__activate_project` if not already active - Run `mcp__serena__check_onboarding_performed` once per session - Prefer JetBrains-backed tools for code navigation and edits - See `/prime-deep` for the full tool catalog
|
@copilot resolve the merge conflicts in this pull request |
… names Co-authored-by: MarkusNeusinger <2921697+MarkusNeusinger@users.noreply.github.com>
Co-authored-by: MarkusNeusinger <2921697+MarkusNeusinger@users.noreply.github.com>
Head branch was pushed to by a user without write access
Merge conflicts resolved in commit |
The merge conflicts were already resolved in commit |
Summary
Reduce per-session token overhead from
/prime. The previous version pulled inproject-guide.md(4,030 words),vision.md,pyproject.toml, andcontext.mdon every invocation — ~7,500 tokens before any work started./prime(new, ~330 tokens): self-contained — project description, top-level dirs, GitHub pipeline summary, git status. Enough context to start everyday work without loading the full architecture tour./prime-deep(new): identical to the previous/prime— full architecture, vision, all referenced docs. Use when starting refactors or when deep context is genuinely needed.CLAUDE.mdis auto-loaded by the harness, so neither variant re-includes it.Token impact
/prime/prime-deepTest plan
/primein a fresh session — confirm git status runs and project basics are clear/prime-deep— confirm full project guide loads as beforeGenerated by Claude Code