← ClaudeAtlas

rag-code-genlisted

RAG-grounded code generation with source citations. Triggers on: grounded code, ground this, cite sources, show me with sources, how do I with attune, reference attune docs, grounded against attune docs.
Smart-AI-Memory/attune-ai · ★ 10 · AI & Automation · score 72
Install: claude install-skill Smart-AI-Memory/attune-ai
# RAG-grounded code generation attune-rag ships with attune-ai core (`pip install attune-ai`). Grounds code generation in the attune-help template corpus so outputs cite real APIs, workflow names, and patterns instead of hallucinating them. Every output ends with a `## Sources` block of clickable citations. ## Scoping Before running, ask: 1. **What are you trying to produce?** Code, config, explanation, or a mix? 2. **Any specific attune surface?** e.g. "the security-audit workflow", "MCP tool pattern", "BaseWorkflow subclass". Helps retrieval hit the right concept file. 3. **Depth?** Default is `standard`. `quick` saves time and budget for simple asks; `deep` is for complex multi-file or architectural questions. ## Running ``` attune workflow run rag-code-gen \ --input '{"query": "<the request>"}' ``` Optional inputs: - `k` — max grounding docs to retrieve (default 3) - `depth` — `quick` / `standard` / `deep` - `feedback` — pass `good` or `bad` AFTER inspecting the output to record a verdict against every cited template - `model` — override the generator model if you need to ## Output shape `WorkflowResult.final_output` is a string with two parts: 1. The generated code / explanation 2. A `## Sources` section listing each cited `attune-help` template with its category, retrieval score, and a clickable link to the source on GitHub `WorkflowResult.metadata` carries the full citation dict (`query`, `retriever_name`, `retrieved_at`, `hits[]`)