Ask

From mikeprasad/aria-knowledge · View interactive version

Ask is an AI agent skill from the GitHub repository mikeprasad/aria-knowledge. Research a question, check existing knowledge first, draft a knowledge doc from the answer, and save directly to the appropriate category. Use when user says "/aria-cowork:ask", "ask about", "research and save", "I want to learn about", "what is the pattern for". Skips backlogs — the user reviews th

How to use this skill

Skill file

/ask — Query-Driven Knowledge Creation

Research a question, check if the answer already exists in the knowledge base, and if not, draft a knowledge doc that saves directly to promoted files after user review. Fast path from question to knowledge — no backlog intermediary.

Runtime Gate (per ADR-094)

Canonical resolution: This is the Claude Cowork variant — namespaced-only. When both plugin-claude-code and plugin-claude-cowork are loaded in the same session (most common in Claude Desktop), bare /ask resolves to aria-knowledge's variant — Code is the canonical owner of all 24 dual-port skills per ADR-094 §Part 1. To reach this skill, use the namespaced form: /aria-cowork:ask. Do NOT match bare /ask — that belongs to aria-knowledge.

Before Step 0 — runtime self-correction. Check whether the Bash tool is available in this session. If Bash IS available (you are running in Claude Code or another runtime with shell access), this invocation reached the wrong variant for the runtime. Do not ask — redirect. Announce it in one line, then use the Skill tool to invoke ask with the same arguments the user provided, and do not run this skill's steps:

↪️ Redirecting to /ask — you invoked the aria-cowork variant, but you are running in Claude Code or another runtime with shell access.

Behavior is largely the same in both runtimes; for the Code-native variant (uses ~/.claude/aria-knowledge.local.md config and the full Code tool surface), use /ask (the aria-knowledge canonical).

⛔ The redirect is unconditional — every mode including auto, and no opt-out. Reaching this variant under that condition is always a mis-invocation, so there is nothing for the user to decide. Design record: docs/superpowers/specs/2026-08-28-runtime-gate-auto-redirect-design.md (D2 auto-redirect, D3 no escape hatch, D6 announce-don't-swap-silently).

If Bash is NOT available (normal Cowork runtime), proceed to Step 0.

Step 0: Resolve config

The default knowledge folder is ~/Projects/knowledge/ (expand ~ to your home directory's absolute path). Read <knowledge_folder>/aria-config.md and extract knowledge_folder. If aria-config.md doesn't exist, stop: "aria-cowork is not configured. Run /aria-setup to get started."

Use <knowledge_folder> for all file operations during this session.

Step 1: Parse question

The user provides a question as the argument. If no argument is provided, ask: "What would you like to know?"

Extract the core topic and likely tags from the question for use in Step 2.

Step 2: Check existing knowledge

Before researching, check if the answer already exists:

  1. Resolve aliases first (added v0.3.0 — parity with aria-knowledge v2.16.0): if <knowledge_folder>/aliases.md exists, parse the alias→canonical map and replace any tag token in the question that matches an alias with its canonical form before the index lookup. No notification line needed — this is internal to /ask's coarse check (/context is the surface that surfaces resolution notifications).

If <knowledge_folder>/index.md exists, extract tags from the (post-alias-resolution) question and check for matching files in both the ## Tag Index section AND the ## Semantic Hints Index section. Tag matching is exact equality (existing behavior); hint matching is substring (case-insensitive, hyphen-normalized) — same rule as /aria-cowork:context Step 3. A hint match counts the same as a tag match for partial-match detection.

  1. Scan headings of files in approaches/, guides/, references/, decisions/ for topic overlap.
  2. Check intake/ backlogs for pending items on the same topic.

If a strong match is found: Present the existing file(s) to the user:

"This may already be covered in [filename]. Want me to load it? Or research fresh?"

If no match: Proceed to Step 3.

Step 3: Research

Answer the question using available sources:

  1. Knowledge base — scan relevant files for partial answers or related context.
  2. Web — use WebSearch and WebFetch for external information (APIs, frameworks, best practices).
  3. MCP-connected tools (when available in v0.2.0+) — query connected ~~docs, ~~project tracker for org-internal context.

Synthesize a clear, complete answer. Focus on practical, actionable knowledge — not textbook definitions.

Step 4: Determine category

Based on the answer content, suggest where it belongs:

| Content type | Category | Example |

|---|---|---|

| How to do X (proven method) | approaches/ | API pagination patterns |

| How X works (operational) | guides/ | Supabase auth setup |

| What others say about X | references/ | Stripe webhook best practices |

| We chose X because Y | decisions/ | Why cursor over offset pagination |

| X must/must not (principle) | rules/ | Rare — usually via /audit-knowledge |

Step 5: Draft knowledge doc

Write a draft in the standard format for the suggested category:

---
tags: [detected tags from question and answer]
---

# [Title]

**Last updated:** YYYY-MM-DD

[Answer content — structured with sections as appropriate]

## Related
[Links to any existing knowledge files that connect to this topic]

If Step 2 found a partial match, note: "Related: [existing file] — consider whether this should update that file instead of creating a new one."

Step 6: Present for review

Show the draft with metadata:

## /ask Result

**Question:** [original question]
**Category:** [suggested category]
**File:** [suggested filename in kebab-case]
**Tags:** [detected tags]

[Draft content]

Save to <knowledge_folder>/[category]/[filename]? (yes / edit / change category / reject / update <existing-file>)

Step 7: Save or discard

Based on user response:

After saving, confirm: "Saved to [path]. Run /aria-cowork:index to update the tag index."

Rules

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.