feat(ai): add glossary-grounded action capabilities to Glossary Copilot#31
Open
paollacq wants to merge 1 commit intosolanabr:mainfrom
Open
feat(ai): add glossary-grounded action capabilities to Glossary Copilot#31paollacq wants to merge 1 commit intosolanabr:mainfrom
paollacq wants to merge 1 commit intosolanabr:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR evolves Glossary Copilot from glossary-grounded Q&A into a glossary-grounded developer action layer. It adds four action modes on top of the existing glossary context engine: Code Explain, Debug Assistant, Code Generation, and Build / Learning Planner. Instead of using a generic chat flow, each mode dynamically assembles context from glossary relationships, mental models, builder paths, confusable concepts, and next-step terms before calling Gemini. The result is a more practical Solana development assistant built directly into Glossary OS.
What This PR Adds
/[locale]/copilotgetMultiTermContext(terms)for action-oriented context compositionExplainDebugGeneratePlanen,pt,esFeature 1: Code Explain
Input:
Output:
Implemented using:
Real test used:
#[derive(Accounts)]exampleFeature 2: Debug Assistant
Input:
Output:
Implemented using:
Real test used:
seeds constraintPDA failureFeature 3: Code Generation
Input:
Output:
Implemented using:
REPLACE_WITH_YOUR_PROGRAM_IDReal test used:
Feature 4: Build / Learning Planner
Input:
Output:
Implemented using:
Anchor,Runtime,DeFi,AgentsReal test used:
Why This Is Useful
This makes the glossary directly actionable.
Instead of stopping at:
the product now helps users:
That is much closer to a real Solana builder workflow.
Why This Is Different
This is not:
This is:
The system builds context from:
For action modes, it expands into multi-term context so the LLM reasons across a small concept cluster instead of a single definition.
Routes
/en/term/[slug]-> inline Copilot/pt/term/[slug]-> inline Copilot/es/term/[slug]-> inline Copilot/en/copilot-> Copilot workspace/pt/copilot-> Copilot workspace/es/copilot-> Copilot workspaceGemini Setup
Create
apps/glossary-os/.env.local:Local Run
From the repository root:
Validation