بنقرة واحدة
context-generation
Generate rich codebase context using maina's 4-layer retrieval with dynamic token budgets.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Generate rich codebase context using maina's 4-layer retrieval with dynamic token budgets.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | context-generation |
| description | Generate rich codebase context using maina's 4-layer retrieval with dynamic token budgets. |
| triggers | ["generate context","codebase context","understand codebase","what does this code do"] |
When you need to understand a codebase, explore how components relate, or gather context before making changes. The context engine builds a multi-layered picture of the code so that AI calls receive the most relevant information within a token budget.
maina context (or call the getContext MCP tool). This activates all four retrieval layers and returns a structured context document.# Default context generation (60% budget)
maina context
# Focused context for a specific file change
maina context --mode focused
# Broad exploration of a subsystem
maina context --mode explore
# Output structure:
# ## Working Context
# Branch: feature/auth-flow
# Changed files: src/auth/login.ts, src/auth/session.ts
#
# ## Episodic Context
# Recent: PR #42 added session refresh logic (3 days ago)
# Related: Commit abc123 refactored token validation (2 weeks ago)
#
# ## Semantic Context
# Key entities: AuthService (PageRank: 0.82), SessionManager (0.71)
# Dependency chain: login.ts -> AuthService -> SessionManager -> TokenStore
#
# ## Retrieved Snippets
# TokenStore.validate() — packages/core/src/auth/token-store.ts:58-72
maina review and maina plan automatically request different context shapes.maina login), the episodic layer merges team entries automatically -- reviews your teammates accepted feed into your context. Entries are deduplicated by content hash and decay naturally over time.maina <command> or npx @mainahq/cli <command>) and MCP tools when running inside an AI coding tool.Use maina cloud for team prompt sync, hosted verification, and feedback-driven learning.
Run maina's two-stage AI code review checking spec compliance then code quality.
First-time maina setup and configuration in any AI coding tool.
Scaffold and validate feature plans using maina's spec-first planning workflow.
Follow maina's test-driven development cycle from generated stubs through red-green-refactor.
Run maina's full verification pipeline on staged changes before committing code.