with one click
corgispec-ask
// Answer human questions from Obsidian vault using early-stop retrieval with token budget enforcement.
// Answer human questions from Obsidian vault using early-stop retrieval with token budget enforcement.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | corgispec-ask |
| description | Answer human questions from Obsidian vault using early-stop retrieval with token budget enforcement. |
| license | MIT |
| compatibility | Requires memory/ and wiki/ directories (created by corgispec-memory-init). |
| metadata | {"author":"openspec","version":"1.0","generatedBy":"1.0.0"} |
Answer questions from vault context with budget-aware early-stop retrieval.
Provides a Q&A channel between humans (via Obsidian) and AI agents. Humans write questions as markdown files in wiki/questions/. The AI answers by searching the vault with a strict retrieval budget, writing answers back into the question file.
Key design principle: answer with minimum context. Stop retrieving as soon as sufficient information is found. This prevents runaway token consumption.
wiki/questions/ with status: pending/corgi-ask wiki/questions/<filename>.md for a specific question/corgi-ask --pending to process all pending questions in batchDo not use this skill to create questions (humans do that in Obsidian), initialize memory, or run lint checks.
memory/ directory exists with session-bridge.mdwiki/ directory exists with hot.md and index.mdwiki/questions/ (for single-question mode), or --pending flag is usedTriggered by: /corgi-ask wiki/questions/<filename>.md
Triggered by: /corgi-ask --pending
If a specific file path is provided (Mode A):
status: pending in frontmatterpending → report "Question already answered (status: {status})" and stopIf --pending flag is used (Mode B):
.md files in wiki/questions/ (excluding _index.md)status: pendingFound N pending questions:
1. <filename> — "<question title or first line>"
2. <filename> — "<question title or first line>"
...
Processing in order.
Read the question file. Extract:
## Question sectiontags field (used to guide retrieval)## Context section the human providedRetrieve context using this priority chain. Stop as soon as sufficient context is found to answer the question.
Priority 1: memory/session-bridge.md
↓ (if insufficient)
Priority 2: wiki/hot.md
↓ (if insufficient)
Priority 3: wiki/index.md (scan for relevant domain links)
↓ (if insufficient)
Priority 4: One domain page from wiki/ (follow relevant index link)
↓ (if insufficient)
Priority 5: Second domain page from wiki/ OR a page from docs/
↓ (if insufficient)
Priority 6: A file from specs/ (if question is about requirements)
Budget rules:
needs-deep-sessionEarly-stop decision at each priority level:
Update the question file:
status: answered and answered: <today's date>## Answer section## Sources section listing which files were consulted:
## Sources
- `memory/session-bridge.md` — current session state
- `wiki/hot.md` — project pulse
If insufficient context (reached budget limit without confident answer):
status: needs-deep-session## Needs section listing what additional information would help:
## Needs
- Access to `src/auth/` source code
- Full reading of `docs/architecture/auth-flow.md`
- This question spans 6+ files — requires a dedicated deep session
After answering, check if the answer reveals information that should be persisted:
Check for new pitfall:
memory/pitfalls.md Active section with format:
- <pitfall description> (source: [[wiki/questions/<filename>]])
Check for architecture insight:
wiki/architecture/implicit-contracts.md with format:
### <Contract Name>
- **Rule**: <what must be true>
- **Breaks if**: <what happens when violated>
- **Source**: [[wiki/questions/<filename>]]
Check for index update:
wiki/index.md:
For Mode A (single question):
## Question Answered
**File**: wiki/questions/<filename>.md
**Status**: answered | needs-deep-session
**Sources consulted**: N files
**Writeback**: <what was written back, or "none">
For Mode B (batch):
## Batch Complete
**Processed**: N questions
**Answered**: M
**Needs deep session**: K
**Writeback actions**: L
| # | Question | Status | Sources |
|---|----------|--------|---------|
| 1 | <title> | answered | 2 files |
| 2 | <title> | needs-deep-session | 5 files |
Questions must follow this structure:
---
type: question
status: pending
created: YYYY-MM-DD
tags: [relevant, topic, tags]
---
# <Question Title>
## Question
<The actual question text. Can be multiple paragraphs.>
## Context
<Optional: additional context the human wants to provide>
## Answer
<Filled by AI — leave empty when creating>
## Sources
<Filled by AI — leave empty when creating>
Valid status values: pending, answered, needs-deep-session
status: pending before answering (may re-answer)