distill-session
Skill18 starsChanged 12 days agoApache-2.0View on GitHub
Scans the active conversation history or session transcript to extract and compile new architectural concepts, entity dossiers, decisions, and patterns into the local OKF v0.2 knowledge vault. Use when the user invokes /distill-session or /sync-vault, asks to distill or save the current session into the vault, or after completing a complex design or debugging workflow. Don't use for ingesting external files or slide decks (use ingest) or for read-only vault searches (use vault-query).
- Commits and pushes
3 other projects use a version of this.
Adopted by
Most recently taken up by
- gofixpoint/amikatheir own version, first seen Oct 8, 2026
- rajdeep-singha/SecondBraintheir own version, first seen Sep 5, 2026
- shahshrey/unclawtheir own version, first seen Apr 8, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- gofixpoint/amika★ 306same name
- shahshrey/unclaw★ 17same name
- rajdeep-singha/SecondBrain★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository10 other files it gives its agents.
- rules/AGENTS.mdAGENTS.md
- ingestSkill
- knowledge-compilerSkill
- vault-correctSkill
- vault-graphSkill
- vault-lintSkill
- vault-pullSkill
- vault-querySkill
- vault-shareSkill
- wikiskillSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 7 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 52
Before modifying notes, categorize items into the 3-layer wiki hierarchy:
- Distinctive: line 58
Before or during note authoring:
- Distinctive: line 60
If a superseded claim is detected, execute an automated correction sweep via:
- Very specific: line 66
All living RESTATEMENTS are refactored into [[Authoritative Note]] wikilinks to prevent duplication and future drift.
- Distinctive: line 71
Check if the file already exists in the vault.
- Distinctive: line 72
If existing, enrich the content with new findings, version updates, or bug-fix discoveries while preserving prior knowledge.
- Distinctive: line 73
If new, author the note with compliant OKF v0.2 YAML frontmatter:
- Very specific: line 114
Add new entries into index.md under the appropriate header (## 🔬 Core Concepts & Frameworks, ## 🏢 Entity Dossiers, ## 🛠️ Tooling, …
- Distinctive: line 126
Run the vault linter to guarantee 100% graph health:
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
🧠 Distill Session (Cognitive Knowledge Compilation)
This skill enables Antigravity agents to retrospectively analyze the current conversation history, extract newly established architectural patterns, system discoveries, tool implementations, bug fixes, or benchmark metrics, and compile them into the persistent Knowledge Compiler Obsidian Vault ($OBSIDIAN_VAULT_PATH or ~/ObsidianVault) following the Open Knowledge Format (OKF v0.2).
┌────────────────────────────────────────────────────────────────────────┐
│ DISTILL-SESSION PIPELINE │
├────────────────────────────────────────────────────────────────────────┤
│ 1. Scan Transcript & Working Context │
│ ├── Trace conversation turns for key decisions, tools & concepts │
│ └── Detect `/learn` rule updates (`rules/`, `GEMINI.md`) │
│ │
│ 2. Distill Extraction Blueprint & Contradiction Sweep │
│ ├── Entities: Platforms, tools, organizations (wiki/entities/) │
│ ├── Concepts: Architectural patterns, API invariants (wiki/concepts/)│
│ └── Run `/vault-correct` if new findings supersede older claims │
│ │
│ 3. Author & Enrich OKF v0.2 Notes │
│ ├── Write frontmatter (type, tags, sources, 5-way epistemic edges) │
│ └── Inject reciprocal [[wikilinks]] (No escaped pipes in tables!) │
│ │
│ 4. `/learn` Sync & Companion Shareability Check │
│ ├── Sync `/learn` rules into vault customization notes │
│ └── Audit generalizable cloud/FinOps/A2UI invariants for `/vault-share`│
│ │
│ 5. Master Index, Graph Lint & Git Sync │
│ ├── Update `index.md`, append `log.md`, and run `vault_lint.py` │
│ └── Commit & sync updates to the local vault repository │
└────────────────────────────────────────────────────────────────────────┘⚡ Step-by-Step Execution Protocol
Step 1: Discover Vault Root & Inspect Working Context
- Locate the active vault path via environment variable
$OBSIDIAN_VAULT_PATHor default to~/ObsidianVault. - Inspect the conversation turns or read the compact transcript at:
<appDataDir>/brain/<conversation-id>/.system_generated/logs/transcript.jsonl - Identify durable intellectual property generated during the session:
- Architectural Patterns: Frameworks, lifecycle designs, protocols, schemas, API invariants.
- Entities: New or modified software tools, libraries, Google Cloud services, customer accounts.
- Empirical Benchmarks & Metrics: Sizing calculations, cost figures, performance gains, error fixes.
Step 2: Formulate Extraction Blueprint
Before modifying notes, categorize items into the 3-layer wiki hierarchy:
wiki/entities/<Name>.md: Product, tool, customer account, or library dossiers.wiki/concepts/<Topic>.md: Deep-dives into architectural principles, protocols, design patterns, or standards.wiki/synthesis/<Topic>.md: Cross-cutting analyses, trade-off comparisons, or customer strategy playbooks.
Step 3: Contradiction Check & Write-Correctness Sweep
Before or during note authoring:
- Determine if any newly established finding directly contradicts or supersedes a claim in existing notes (e.g., updated pricing metrics, corrected software versions, or revised customer architectures).
- If a superseded claim is detected, execute an automated correction sweep via:
python3 <plugin_dir>/scripts/vault_correct.py "<new fact>" --stale "<old claim>" --target "<authoritative note>" --apply - This strictly enforces the Write-Correctness Laws:
- The single AUTHORITATIVE note is updated with the new fact and
updated:timestamp. - All living RESTATEMENTS are refactored into
[[Authoritative Note]]wikilinks to prevent duplication and future drift. - Historical records (
raw/,wiki/sources/, dated files,log.md) are strictly PRESERVED.
- The single AUTHORITATIVE note is updated with the new fact and
Step 4: Author / Enrich OKF v0.2 Markdown Notes
For each identified node:
- Check if the file already exists in the vault.
- If existing, enrich the content with new findings, version updates, or bug-fix discoveries while preserving prior knowledge.
- If new, author the note with compliant OKF v0.2 YAML frontmatter:
Omit--- title: "Canonical Title" type: concept | entity | synthesis created: YYYY-MM-DD updated: YYYY-MM-DD tags: - domain/topic status: stable sources: - id: source-slug resource: "https://..." generated: { by: knowledge-compiler/gemini-pro, at: YYYY-MM-DDTHH:MM:SSZ } aliases: - "Alternative Name" ---verified:on agent-authored notes until explicit human review (vault-lint --approve-human <note>). - Linking Invariants:
- Connect all related concepts and entities using reciprocal
[[wikilinks]]. - Never escape the pipe character inside Markdown tables (always
[[Target|Alias]], never[[Target\|Alias]]). - In terminal output, provide clean ASCII diagrams alongside Mermaid code blocks.
- Connect all related concepts and entities using reciprocal
Step 5: /learn Rule Synchronization & Companion Shareability Check
Whenever a /learn rule (rules/*.md, project GEMINI.md, or SKILL.md) was created or updated during the session—or when a reusable technical invariant is crystallized:
- Local Vault Sync (
ObsidianVault):- Synchronize the updated rule into
wiki/entities/Gemini CLI Environment & Customizations.mdand enrich the correspondingwiki/concepts/orwiki/patterns/dossier. - Append a structured
## [YYYY-MM-DD] learn | <Summary>entry tolog.md.
- Synchronize the updated rule into
- Companion Plane 2 Shareability Check (
shared-okf-patterns):- Evaluate whether the learned invariant is Generalizable Enterprise Engineering IP vs. Personal / Organization-Specific Preference:
- Promote to
shared-okf-patterns(/vault-share): GCP service constraints, FinOps/CUR SQL & C2C pricing invariants (EBSOptimizedOS='NA'filtering, bottom-upvCPU+RAMcalculator rates,$0.046/vCPU-hrWindows PAYG separation, Two-Step Zero-Discount TCO Bridge), A2A v1.0 / A2UI v0.8 webhook contracts (X-A2A-Extensions,task.artifactspackaging), Google Slides/Sheets API schema rules, and MCPstdiolifecycle guards. - Keep Local Only (Air-Gapped): Personal communication/verbosity preferences, personal booking URLs, organization-specific names/deal structures, or internal HR/performance notes.
- Promote to
- For Generalizable invariants, automatically preview/stage promotion via:
and either executepython3 <plugin_dir>/scripts/sync_patterns.py share "wiki/concepts/<Concept>.md" --repo-dir ~/shared-okf-patterns --dry-run python3 <plugin_dir>/scripts/sanitize_check.py ~/shared-okf-patterns --vault ~/ObsidianVault --fix --strict/vault-share(when authorized) or present a ready-to-promote summary to the user.
- Evaluate whether the learned invariant is Generalizable Enterprise Engineering IP vs. Personal / Organization-Specific Preference:
Step 6: Update Master Index & Audit Log
- Add new entries into
index.mdunder the appropriate header (## 🔬 Core Concepts & Frameworks,## 🏢 Entity Dossiers,## 🛠️ Tooling, Frameworks & Infrastructure, or## 📑 Synthesis & Research Analyses). - Prepend a structured audit entry to
log.md:## [YYYY-MM-DD] sync | Session Distillation: <Topic / Milestone> - **Action**: Retrospectively compiled session decisions, entities, and architectures into the vault. - **Key Artifacts Created / Updated**: - Concept Note: `[[wiki/concepts/<Concept>]]` - Entity Note: `[[wiki/entities/<Entity>]]` - Master Index: `[[index.md]]`
Step 7: Verify Graph Integrity
Run the vault linter to guarantee 100% graph health:
python3 <plugin_dir>/scripts/vault_lint.py "${OBSIDIAN_VAULT_PATH:-$HOME/ObsidianVault}"Step 8: Passive Git Push
Explain to the user the notes that were authored and updated (plus any companion shared pattern candidates). When enabled, Antigravity's Stop lifecycle hook (auto_sync_vault.py) stages, commits with session provenance, and pushes the newly compiled knowledge to origin main.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

