Skip to content

Free, open source blog writer for Claude Code. Researches current sources, writes answer-first posts for Google and AI answers, has an independent reviewer score each one out of 100 and ships only after five delivery gates. 32 skills, 30 /blog commands, 5 agents. Active development at AI-Marketing-Hub/claude-blog; public releases ship here.

Phase 1: brainstein scaffold of Claude Blog Brain

Agrici Danield986df2d3dab
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json
new file mode 100644
index 0000000..0bed378
--- /dev/null
+++ b/.claude-plugin/marketplace.json
@@ -0,0 +1,34 @@
+{
+ "name": "agricidaniel-claude-blog-brain",
+ "owner": {
+ "name": "Daniel Agrici"
+ },
+ "metadata": {
+ "description": "Claude Blog Brain template and skill layer",
+ "version": "0.1.0"
+ },
+ "plugins": [
+ {
+ "name": "claude-blog-brain",
+ "source": "./",
+ "description": "Obsidian brain for blog content creation, optimization, and management dual-optimized for Google rankings (E-E-A-T, the 2026 core updates) and AI citations (GEO/AEO), spanning writing, rewriting and freshness, SERP-informed briefs and outlines, editorial calendars and strategy, semantic topic clusters, schema and internal linking, multilingual publishing, the FLOW framework, factchecking, personas, distribution, and the blog delivery contract, grounded in the claude-blog skill.",
+ "version": "0.1.0",
+ "author": {
+ "name": "Daniel Agrici"
+ },
+ "repository": "https://github.com/AgriciDaniel/claude-blog-brain",
+ "license": "Custom license",
+ "category": "claude-blog",
+ "tags": [
+ "obsidian",
+ "brain",
+ "claude-blog"
+ ],
+ "keywords": [
+ "claude-blog-brain",
+ "claude-blog",
+ "obsidian"
+ ]
+ }
+ ]
+}
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json
new file mode 100644
index 0000000..53bd489
--- /dev/null
+++ b/.claude-plugin/plugin.json
@@ -0,0 +1,21 @@
+{
+ "name": "claude-blog-brain",
+ "version": "0.1.0",
+ "description": "Claude Blog Brain Obsidian brain for blog content creation, optimization, and management dual-optimized for Google rankings (E-E-A-T, the 2026 core updates) and AI citations (GEO/AEO), spanning writing, rewriting and freshness, SERP-informed briefs and outlines, editorial calendars and strategy, semantic topic clusters, schema and internal linking, multilingual publishing, the FLOW framework, factchecking, personas, distribution, and the blog delivery contract, grounded in the claude-blog skill.",
+ "author": {
+ "name": "Daniel Agrici",
+ "url": "https://github.com/AgriciDaniel"
+ },
+ "homepage": "https://github.com/AgriciDaniel/claude-blog-brain",
+ "repository": "https://github.com/AgriciDaniel/claude-blog-brain",
+ "license": "Custom license",
+ "keywords": [
+ "claude-blog-brain",
+ "obsidian",
+ "brain",
+ "claude-blog"
+ ],
+ "skills": [
+ "./SKILL.md"
+ ]
+}
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
new file mode 100644
index 0000000..b1e1896
--- /dev/null
+++ b/.github/CODEOWNERS
@@ -0,0 +1 @@
+* @AgriciDaniel
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
new file mode 100644
index 0000000..24c8d58
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -0,0 +1,26 @@
+name: Bug report
+description: Report a reproducible Claude Blog Brain issue
+title: "bug: "
+labels: ["bug"]
+body:
+ - type: markdown
+ attributes:
+ value: Do not paste credentials, secrets, or private client data.
+ - type: textarea
+ id: summary
+ attributes:
+ label: Summary
+ validations:
+ required: true
+ - type: textarea
+ id: reproduce
+ attributes:
+ label: Reproduction
+ validations:
+ required: true
+ - type: textarea
+ id: expected
+ attributes:
+ label: Expected behavior
+ validations:
+ required: true
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 0000000..3ba13e0
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1 @@
+blank_issues_enabled: false
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000..c46c4ea
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,14 @@
+## Summary
+
+## Verification
+
+- [ ] `python -m compileall scripts claude_blog_brain tests`
+- [ ] `python tests/test_pipeline.py`
+- [ ] `python scripts/build_demo_vault.py`
+- [ ] `python scripts/package_release.py --version 0.1.0`
+
+## Release Risk
+
+- [ ] No credentials or client PII added
+- [ ] Raw-source immutability preserved
+- [ ] Report sources cite raw files or source notes
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..5ace460
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,6 @@
+version: 2
+updates:
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "weekly"
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..f81f15c
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,34 @@
+name: ci
+
+on:
+ pull_request:
+ push:
+ branches: [main]
+
+permissions:
+ contents: read
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v6
+ - uses: actions/setup-python@v6
+ with:
+ python-version: "3.12"
+ - name: Install
+ run: python -m pip install -e .
+ - name: Compile
+ run: python -m compileall scripts claude_blog_brain tests
+ - name: CLI smoke
+ run: claude-blog-brain --help
+ - name: Template vault lint
+ run: python scripts/lint_vault.py --vault assets/template-brain --template
+ - name: Pipeline tests
+ run: python tests/test_pipeline.py
+ - name: Demo vault drift
+ run: |
+ python scripts/build_demo_vault.py
+ git diff --exit-code -- examples/sample-vault
+ - name: Release package and audit
+ run: python scripts/package_release.py --version 0.1.0
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..748ccaa
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,15 @@
+.venv/
+venv/
+__pycache__/
+.pytest_cache/
+.mypy_cache/
+.ruff_cache/
+build/
+dist/
+*.egg-info/
+.DS_Store
+.env
+.env.*
+!.env.example
+.raw/secrets/
+*.secret
diff --git a/AGENTS.md b/AGENTS.md
new file mode 100644
index 0000000..4180569
--- /dev/null
+++ b/AGENTS.md
@@ -0,0 +1,37 @@
+# Claude Blog Brain Agent Instructions
+
+The canonical agent entrypoint is `SKILL.md`; this file exists for agent
+runtimes that load project-level `AGENTS.md` instructions.
+
+## Read Order
+
+1. `SKILL.md`
+2. `README.md`
+3. `docs/OPERATOR_KIT.md`
+4. `docs/PRODUCT_BOUNDARIES.md`
+5. `references/product-spec.md`
+6. `references/source-ledger.json`
+7. `references/adapter-manifest.json`
+
+## Operating Rules
+
+- Do not call this brain market-ready unless `scripts/audit_brain.py --require
+ market-ready` passes.
+- A scaffold is not a finished brain.
+- Domain-specific claims require dated trustworthy sources.
+- Research evidence must be recorded in `references/source-ledger.json`.
+- Adapter completion must be recorded in `references/adapter-manifest.json`.
+- Preserve `.raw/` as immutable source material.
+- Keep Obsidian `wiki/`, `CODEX.md`, dashboards, canvases, frontmatter,
+ wikilinks, graph hygiene, and source citations healthy.
+- V1 is advisory and read-only unless a future release defines approval and
+ rollback for mutations.
+
+## Verification
+
+```bash
+python -m compileall scripts claude_blog_brain tests
+python tests/test_pipeline.py
+python scripts/audit_brain.py --json
+python scripts/package_release.py --version 0.1.0
+```
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..5ac3d5c
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Changelog
+
+## 0.1.0 - YYYY-MM-DD
+
+- Initial Claude Blog Brain scaffold generated by Brainstein.
diff --git a/CLAUDE.md b/CLAUDE.md
new file mode 100644
index 0000000..2d390c4
--- /dev/null
+++ b/CLAUDE.md
@@ -0,0 +1,7 @@
+# Claude Blog Brain Claude Instructions
+
+
+Claude-specific note: this file is persistent project context, not an
+enforcement layer. Release readiness is enforced by `scripts/audit_brain.py`
+and `scripts/package_release.py`.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..edb08ba
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,8 @@
+# Contributing
+
+Keep changes small, sourced, and verified.
+
+- Read `CODEX.md`, `README.md`, and `docs/PRODUCT_BOUNDARIES.md`.
+- Update tests before release-affecting behavior changes.
+- Do not commit credentials, client data, or copied third-party content with
+ unknown license.
diff --git a/GEMINI.md b/GEMINI.md
new file mode 100644
index 0000000..facf71d
--- /dev/null
+++ b/GEMINI.md
@@ -0,0 +1,7 @@
+# Claude Blog Brain Gemini Instructions
+
+@./AGENTS.md
+
+Gemini-specific note: this file can be imported from a global
+`~/.gemini/GEMINI.md` loader. The canonical operating rules remain in
+`SKILL.md` and `AGENTS.md`.
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..681f84b
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,6 @@
+# Custom license
+
+Copyright (c) Daniel Agrici.
+
+Replace this file with the final license before distribution. Until then, all
+rights are reserved by Daniel Agrici.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..0b93967
--- /dev/null
+++ b/README.md
@@ -0,0 +1,90 @@
+# Claude Blog Brain
+
+<p align="center">
+ <img src="assets/svg/hero-frontispiece.svg" alt="Claude Blog Brain editorial frontispiece" width="100%"/>
+</p>
+
+Claude Blog Brain is an evidence-gated Obsidian brain for blog content creation, optimization, and management dual-optimized for Google rankings (E-E-A-T, the 2026 core updates) and AI citations (GEO/AEO), spanning writing, rewriting and freshness, SERP-informed briefs and outlines, editorial calendars and strategy, semantic topic clusters, schema and internal linking, multilingual publishing, the FLOW framework, factchecking, personas, distribution, and the blog delivery contract, grounded in the claude-blog skill.
+
+**Current maturity:** scaffolded. This repo is not market-ready until research,
+domain adapters, demo verification, audit, and release gates pass.
+
+It ships two artifacts:
+
+- `assets/template-brain/` - the distributable Obsidian vault.
+- `SKILL.md` plus `scripts/` - the agent-facing operating layer.
+
+## Buyer
+
+Content teams, bloggers, SEO content strategists, and operators who run the claude-blog skill and need a persistent, source-cited operating system for writing, optimizing, and auditing blog content that ranks on Google and gets cited by AI assistants.
+
+## Outputs
+
+- Blog quality score (5-category 100-point) synthesis playbook
+- SERP-informed content brief and outline
+- Semantic topic-cluster map with internal-link matrix
+- GEO and AI-citation readiness register
+- Schema stack and internal-linking reference library
+- Editorial calendar and content-strategy plan
+- Blog delivery-contract gate report
+- Approval queue for recommendations
+- Google algorithm-update memory and refresh log
+
+## Quick Start
+
+```bash
+python -m pip install -e .
+claude-blog-brain demo
+claude-blog-brain lint --vault examples/sample-vault
+claude-blog-brain report --vault examples/sample-vault --html-only
+```
+
+To create a client vault:
+
+```bash
+claude-blog-brain new acme --client-name "Acme Co" --owner "Daniel Agrici" --out-dir ~/claude-blog-brain-vaults
+claude-blog-brain ingest --vault ~/claude-blog-brain-vaults/acme --file tests/fixtures/sample-source.md
+claude-blog-brain synthesize --vault ~/claude-blog-brain-vaults/acme
+claude-blog-brain visuals --vault ~/claude-blog-brain-vaults/acme
+claude-blog-brain report --vault ~/claude-blog-brain-vaults/acme --html-only
+claude-blog-brain next --vault ~/claude-blog-brain-vaults/acme
+```
+
+## Boundaries
+
+V1 is advisory and read-only. It does not mutate accounts, systems, books,
+pipelines, publishing tools, customer records, or live production data.
+
+Domain claims are release-blocked until `references/current-requirements.md`,
+`references/market-research.md`, `references/source-map.md`, and
+`references/source-ledger.json` contain dated source material from trustworthy
+sources.
+
+## Maturity Gates
+
+1. Scaffolded: product shell, vault, source pack, scripts, tests, and demo exist.
+2. Researched: dated trustworthy sources replace placeholder research.
+3. Domain-adapted: real domain importer, synthesis, reports, fixtures, and tests exist.
+4. Demo-verified: sample vault regenerates deterministically and reports cite sources.
+5. Market-ready: audit score is at least 90 with no critical failures.
+
+Scores are capped by maturity. A scaffold cannot become market-ready by edited
+markdown alone.
+
+## Research Policy
+
+Use official, primary, or vendor documentation first. Use market or practitioner
+sources only as supporting evidence. Do not treat blog roundups or AI summaries
+as primary truth. Record evidence in `references/source-ledger.json`; prose-only
+research notes do not satisfy the gate.
+
+## Release
+
+```bash
+python scripts/package_release.py --version 0.1.0
+python scripts/package_release.py --version 1.0.0 --release-type market-ready
+```
+
+Release packaging scans for secrets, local paths, symlinks, untracked drift,
+and unsafe ZIP entries before writing `dist/RELEASE_MANIFEST.json` and
+`dist/SHA256SUMS`. Market-ready packaging also runs `scripts/audit_brain.py`.
diff --git a/RELEASE_CHECKLIST.md b/RELEASE_CHECKLIST.md
new file mode 100644
index 0000000..22cdd3e
--- /dev/null
+++ b/RELEASE_CHECKLIST.md
@@ -0,0 +1,37 @@
+# Release Checklist
+
+## Product
+
+- [ ] README states buyer, promise, outputs, boundaries, and quick start.
+- [ ] `SKILL.md` maps commands accurately.
+- [ ] License and distribution stance is explicit.
+- [ ] Third-party notices are current.
+
+## Research
+
+- [ ] Maturity is documented and not overstated.
+- [ ] `references/current-requirements.md` has dated official/primary sources.
+- [ ] `references/source-ledger.json` lists dated official/primary sources,
+ refresh dates, source types, and supported claims.
+- [ ] `references/source-map.md` explains import strategy and source schemas.
+- [ ] `references/safety-gates.md` lists refusal rules and failure paths.
+- [ ] Stale source claims were browsed and refreshed before release.
+
+## Vault
+
+- [ ] Template vault opens in Obsidian.
+- [ ] Hot/Index/Wiki notes and hubs are connected.
+- [ ] Raw sources stay immutable under `.raw/`.
+- [ ] Deliverables cite source notes or raw-file hashes.
+
+## Verification
+
+- [ ] `python -m compileall scripts claude_blog_brain tests`
+- [ ] `python tests/test_pipeline.py`
+- [ ] `python scripts/build_demo_vault.py`
+- [ ] `python scripts/package_release.py --version 0.1.0`
+- [ ] No secrets, private client data, or local absolute paths in artifacts.
+- [ ] Market-ready release is blocked unless audit score is at least 90 with no critical failures.
+- [ ] `references/adapter-manifest.json` names real schemas, importer paths,
+ synthesis modules, report renderers, fixtures, and tests before
+ domain-adapted or market-ready release.
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 0000000..476017d
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,8 @@
+# Security
+
+Do not open public issues containing credentials or private client data.
+
+Report sensitive issues privately to the repository owner.
+
+Release gates scan for common API keys, private keys, OAuth tokens, local home
+paths, and forbidden ZIP entries.
diff --git a/SKILL.md b/SKILL.md
new file mode 100644
index 0000000..051a551
--- /dev/null
+++ b/SKILL.md
@@ -0,0 +1,74 @@
+---
+name: claude-blog-brain
+description: >
+ Scaffold and operate Claude Blog Brain, a source-cited Obsidian brain for blog content creation, optimization, and management dual-optimized for Google rankings (E-E-A-T, the 2026 core updates) and AI citations (GEO/AEO), spanning writing, rewriting and freshness, SERP-informed briefs and outlines, editorial calendars and strategy, semantic topic clusters, schema and internal linking, multilingual publishing, the FLOW framework, factchecking, personas, distribution, and the blog delivery contract, grounded in the claude-blog skill.
+ Use when the user says "claude-blog-brain", "Claude Blog Brain", "create a blog content creation, optimization, and management dual-optimized for Google rankings (E-E-A-T, the 2026 core updates) and AI citations (GEO/AEO), spanning writing, rewriting and freshness, SERP-informed briefs and outlines, editorial calendars and strategy, semantic topic clusters, schema and internal linking, multilingual publishing, the FLOW framework, factchecking, personas, distribution, and the blog delivery contract, grounded in the claude-blog skill brain",
+ "import sources", "synthesize plan", "render report", or wants a persistent
+ vault-backed operating system for blog content creation, optimization, and management dual-optimized for Google rankings (E-E-A-T, the 2026 core updates) and AI citations (GEO/AEO), spanning writing, rewriting and freshness, SERP-informed briefs and outlines, editorial calendars and strategy, semantic topic clusters, schema and internal linking, multilingual publishing, the FLOW framework, factchecking, personas, distribution, and the blog delivery contract, grounded in the claude-blog skill.
+argument-hint: "new | ingest | synthesize | report | visuals | lint | next"
+license: Custom license
+---
+
+# Claude Blog Brain
+
+Operate the vault first. Read `CODEX.md`, `wiki/hot.md`, and `wiki/index.md`
+before changing notes.
+
+## Commands
+
+```bash
+/claude-blog-brain new <client-slug> --owner <name>
+/claude-blog-brain ingest --vault <path> --file <source>
+/claude-blog-brain synthesize --vault <path>
+/claude-blog-brain report --vault <path>
+/claude-blog-brain visuals --vault <path>
+/claude-blog-brain lint --vault <path>
+/claude-blog-brain next --vault <path>
+```
+
+Source checkout equivalent:
+
+```bash
+claude-blog-brain new <client-slug> --owner <name>
+claude-blog-brain ingest --vault <path> --file <source>
+claude-blog-brain synthesize --vault <path>
+claude-blog-brain report --vault <path> --html-only
+```
+
+## Required Operating Rules
+
+1. Read `<vault>/CODEX.md`.
+2. Read `<vault>/wiki/hot.md`.
+3. Read `<vault>/wiki/index.md`.
+4. Preserve `.raw/` as immutable source material.
+5. Never store credentials in the vault.
+6. Never make domain-specific claims without dated trustworthy sources.
+7. Keep `hot`, `index`, `overview`, and `log` current.
+8. Record research evidence in `references/source-ledger.json`.
+9. Record domain adapter completion in `references/adapter-manifest.json`.
+
+## Script Mapping
+
+- `new` -> `python scripts/scaffold_vault.py`
+- `ingest` -> `python scripts/ingest_source.py`
+- `synthesize` -> `python scripts/synthesize_brain.py`
+- `report` -> `python scripts/render_brain_report.py`
+- `visuals` -> `python scripts/generate_vault_visuals.py`
+- `lint` -> `python scripts/lint_vault.py`
+- `next` -> `python scripts/guide_next_action.py`
+
+## Quality Gates
+
+- No ranking or traffic guarantee; content outcomes are probabilistic and never certain
+- No credentials, tokens, API keys, or private client content in repo artifacts
+- No mutation of a CMS, GSC, GA4, or publishing platform; the brain is advisory and read-only
+- No recommendation without a dated source, confidence level, and rollback note
+- No deprecated advice (HowTo schema, retired FAQ rich results, FID) presented as current
+- No fabricated or unsourced statistics and no AI-detectable filler presented as fact
+
+Do not call this brain market-ready unless `scripts/audit_brain.py --require
+market-ready` passes. A scaffold is not a finished brain.
+
+## Research Refresh
+
+monthly for Google algorithm updates and Search Central policy; before every release for E-E-A-T framing, schema deprecations, and GEO/AEO citation claims; on-changelog for the claude-blog skill
diff --git a/SUPPORT.md b/SUPPORT.md
new file mode 100644
index 0000000..14f2538
--- /dev/null
+++ b/SUPPORT.md
@@ -0,0 +1,4 @@
+# Support
+
+This is a Brainstein-generated domain brain. Include version, Python version,
+operating system, command run, and sanitized error output when requesting help.
diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md
new file mode 100644
index 0000000..9bdbbfb
--- /dev/null
+++ b/THIRD_PARTY_NOTICES.md
@@ -0,0 +1,3 @@
+# Third-Party Notices
+
+Add notices for copied or adapted third-party material before release.
diff --git a/assets/svg/hero-frontispiece.svg b/assets/svg/hero-frontispiece.svg
new file mode 100644
index 0000000..d2fe49e
--- /dev/null
+++ b/assets/svg/hero-frontispiece.svg
@@ -0,0 +1,15 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 520" role="img" aria-labelledby="title desc">
+<title id="title">Claude Blog Brain frontispiece</title>
+<desc id="desc">Editorial visual showing a source-cited brain product pipeline.</desc>
+<rect width="1200" height="520" fill="#f6f4ef"/>
+<rect x="70" y="70" width="1060" height="380" fill="#ffffff" stroke="#172033" stroke-width="3"/>
+<text x="110" y="150" font-family="Inter,Arial" font-size="54" font-weight="800" fill="#172033">Claude Blog Brain</text>
+<text x="112" y="205" font-family="Inter,Arial" font-size="22" fill="#334155">Source-cited Obsidian operating brain for blog content creation, optimization, and management dual-optimized for Google rankings (E-E-A-T, the 2026 core updates) and AI citations (GEO/AEO), spanning writing, rewriting and freshness, SERP-informed briefs and outlines, editorial calendars and strategy, semantic topic clusters, schema and internal linking, multilingual publishing, the FLOW framework, factchecking, personas, distribution, and the blog delivery contract, grounded in the claude-blog skill.</text>
+<g font-family="Inter,Arial" font-size="18" font-weight="700">
+<rect x="120" y="285" width="180" height="74" fill="#e7f0f1" stroke="#2f7f87" stroke-width="3"/><text x="152" y="330" fill="#172033">Sources</text>
+<rect x="365" y="285" width="180" height="74" fill="#fff5e0" stroke="#f0b33d" stroke-width="3"/><text x="405" y="330" fill="#172033">Memory</text>
+<rect x="610" y="285" width="180" height="74" fill="#f9e7e2" stroke="#c85f4d" stroke-width="3"/><text x="650" y="330" fill="#172033">Gates</text>
+<rect x="855" y="285" width="180" height="74" fill="#ece7f3" stroke="#8d6bb3" stroke-width="3"/><text x="888" y="330" fill="#172033">Reports</text>
+</g>
+<path d="M300 322 H365 M545 322 H610 M790 322 H855" stroke="#64748b" stroke-width="4"/>
+</svg>
diff --git a/assets/template-brain/.obsidian/app.json b/assets/template-brain/.obsidian/app.json
new file mode 100644
index 0000000..b098604
--- /dev/null
+++ b/assets/template-brain/.obsidian/app.json
@@ -0,0 +1,3 @@
+{
+ "alwaysUpdateLinks": true
+}
diff --git a/assets/template-brain/.obsidian/appearance.json b/assets/template-brain/.obsidian/appearance.json
new file mode 100644
index 0000000..08570bf
--- /dev/null
+++ b/assets/template-brain/.obsidian/appearance.json
@@ -0,0 +1,6 @@
+{
+ "cssTheme": "",
+ "enabledCssSnippets": [
+ "brain"
+ ]
+}
diff --git a/assets/template-brain/.obsidian/core-plugins.json b/assets/template-brain/.obsidian/core-plugins.json
new file mode 100644
index 0000000..859c905
--- /dev/null
+++ b/assets/template-brain/.obsidian/core-plugins.json
@@ -0,0 +1,6 @@
+[
+ "file-explorer",
+ "global-search",
+ "graph",
+ "canvas"
+]
diff --git a/assets/template-brain/.obsidian/graph.json b/assets/template-brain/.obsidian/graph.json
new file mode 100644
index 0000000..9500493
--- /dev/null
+++ b/assets/template-brain/.obsidian/graph.json
@@ -0,0 +1,66 @@
+{
+ "collapse-filter": false,
+ "search": "",
+ "showTags": false,
+ "showAttachments": false,
+ "hideUnresolved": true,
+ "showOrphans": false,
+ "colorGroups": [
+ {
+ "query": "file:wiki/hot.md OR file:wiki/index.md OR file:wiki/overview.md OR file:wiki/log.md OR path:wiki/meta",
+ "color": {
+ "a": 1,
+ "rgb": 14047793
+ }
+ },
+ {
+ "query": "path:wiki/sources",
+ "color": {
+ "a": 1,
+ "rgb": 5795730
+ }
+ },
+ {
+ "query": "path:wiki/flows",
+ "color": {
+ "a": 1,
+ "rgb": 12740671
+ }
+ },
+ {
+ "query": "path:wiki/entities OR path:wiki/accounts OR path:wiki/platforms",
+ "color": {
+ "a": 1,
+ "rgb": 3112839
+ }
+ },
+ {
+ "query": "path:wiki/decisions",
+ "color": {
+ "a": 1,
+ "rgb": 13214811
+ }
+ },
+ {
+ "query": "path:wiki/deliverables OR path:wiki/reports",
+ "color": {
+ "a": 1,
+ "rgb": 11033485
+ }
+ },
+ {
+ "query": "path:wiki/experiments",
+ "color": {
+ "a": 1,
+ "rgb": 8150963
+ }
+ }
+ ],
+ "showArrow": true,
+ "textFadeMultiplier": 0.2,
+ "nodeSizeMultiplier": 1.25,
+ "lineSizeMultiplier": 1.25,
+ "centerStrength": 0.5,
+ "repelStrength": 11,
+ "linkDistance": 155
+}
diff --git a/assets/template-brain/.obsidian/snippets/brain.css b/assets/template-brain/.obsidian/snippets/brain.css
new file mode 100644
index 0000000..20b9f14
--- /dev/null
+++ b/assets/template-brain/.obsidian/snippets/brain.css
@@ -0,0 +1,9 @@
+:root {
+ --brain-accent: #2f7f87;
+ --brain-warn: #c85f4d;
+ --brain-gold: #f0b33d;
+}
+
+.markdown-preview-view h1 {
+ color: var(--brain-accent);
+}
diff --git a/assets/template-brain/.raw/.manifest.json b/assets/template-brain/.raw/.manifest.json
new file mode 100644
index 0000000..ff6a482
--- /dev/null
+++ b/assets/template-brain/.raw/.manifest.json
@@ -0,0 +1,5 @@
+{
+ "brain_schema": "claude-blog-brain.v1",
+ "sources": [],
+ "notes": "Template manifest. Client vaults append immutable source entries here."
+}
diff --git a/assets/template-brain/CODEX.md b/assets/template-brain/CODEX.md
new file mode 100644
index 0000000..c3ae293
--- /dev/null
+++ b/assets/template-brain/CODEX.md
@@ -0,0 +1,17 @@
+# Claude Blog Brain Vault Instructions
+
+Read order:
+
+1. `wiki/hot.md`
+2. `wiki/index.md`
+3. Relevant workflow, source, entity, decision, or deliverable note
+
+Rules:
+
+- Preserve `.raw/` as immutable source material.
+- Use flat YAML frontmatter and wikilinks.
+- Keep `hot`, `index`, `overview`, and `log` current.
+- Keep recommendations source-cited.
+- Do not store credentials, tokens, cookies, or private secrets.
+- Do not make domain-specific claims without dated trustworthy sources.
+- Apply `shipping-rules.md` before release-affecting changes.
diff --git a/assets/template-brain/README.md b/assets/template-brain/README.md
new file mode 100644
index 0000000..c49b558
--- /dev/null
+++ b/assets/template-brain/README.md
@@ -0,0 +1,3 @@
+# Claude Blog Brain Template Vault
+
+Open this folder in Obsidian, then start at `wiki/meta/Start Here.md`.
diff --git a/assets/template-brain/_attachments/brain-relationship-map.svg b/assets/template-brain/_attachments/brain-relationship-map.svg
new file mode 100644
index 0000000..307d6cb
--- /dev/null
+++ b/assets/template-brain/_attachments/brain-relationship-map.svg
@@ -0,0 +1,13 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 980 420" role="img" aria-labelledby="title desc">
+<title id="title">Claude Blog Brain relationship map</title>
+<desc id="desc">Source to memory to deliverable operating map.</desc>
+<rect width="980" height="420" fill="#f8fafc"/>
+<text x="40" y="58" font-size="28" font-family="Inter,Arial" font-weight="700" fill="#172033">Claude Blog Brain Relationship Map</text>
+<g font-family="Inter,Arial" font-size="14" font-weight="700">
+<rect x="50" y="130" width="160" height="72" rx="8" fill="#fff" stroke="#586f92" stroke-width="3"/><text x="82" y="172" fill="#172033">Raw Sources</text>
+<rect x="290" y="130" width="160" height="72" rx="8" fill="#fff" stroke="#2f7f87" stroke-width="3"/><text x="324" y="172" fill="#172033">Wiki Memory</text>
+<rect x="530" y="130" width="160" height="72" rx="8" fill="#fff" stroke="#c85f4d" stroke-width="3"/><text x="560" y="172" fill="#172033">Checks + Gates</text>
+<rect x="770" y="130" width="160" height="72" rx="8" fill="#fff" stroke="#f0b33d" stroke-width="3"/><text x="800" y="172" fill="#172033">Deliverables</text>
+</g>
+<path d="M210 166 H290 M450 166 H530 M690 166 H770" stroke="#64748b" stroke-width="3"/>
+</svg>
diff --git a/assets/template-brain/_templates/decision.md b/assets/template-brain/_templates/decision.md
new file mode 100644
index 0000000..7af3156
--- /dev/null
+++ b/assets/template-brain/_templates/decision.md
@@ -0,0 +1,17 @@
+---
+type: "decision"
+title: "{{title}}"
+created: "{{date}}"
+updated: "{{date}}"
+status: "proposed"
+---
+
+# {{title}}
+
+## Decision
+
+## Rationale
+
+## Rollback
+
+Related: [[Approval Queue]]
diff --git a/assets/template-brain/_templates/source-note.md b/assets/template-brain/_templates/source-note.md
new file mode 100644
index 0000000..dbd4dc9
--- /dev/null
+++ b/assets/template-brain/_templates/source-note.md
@@ -0,0 +1,21 @@
+---
+type: "source"
+title: "{{title}}"
+created: "{{date}}"
+updated: "{{date}}"
+status: "draft"
+---
+
+# {{title}}
+
+## Source
+
+- Path:
+- Hash:
+- Retrieved:
+
+## Compiled Truth
+
+Summarize the source without copying it wholesale.
+
+Related: [[Source Manifest Guide]]
diff --git a/assets/template-brain/_templates/standard-note.md b/assets/template-brain/_templates/standard-note.md
new file mode 100644
index 0000000..65ecded
--- /dev/null
+++ b/assets/template-brain/_templates/standard-note.md
@@ -0,0 +1,21 @@
+---
+type: "note"
+title: "{{title}}"
+created: "{{date}}"
+updated: "{{date}}"
+status: "draft"
+---
+
+# {{title}}
+
+## Compiled Truth
+
+Write the current sourced truth here.
+
+## Related
+
+- [[Index]]
+
+## Timeline
+
+- {{date}} - Note created.
diff --git a/assets/template-brain/shipping-rules.md b/assets/template-brain/shipping-rules.md
new file mode 100644
index 0000000..460d42f
--- /dev/null
+++ b/assets/template-brain/shipping-rules.md
@@ -0,0 +1,26 @@
+# Shipping Rules
+
+Read first. Write second. Verify third.
+
+## Before
+
+- Read before write: open sources, call sites, tests, schemas, and consumers.
+- Name like the next reader is hostile: if you cannot name it cleanly, you do
+ not understand it yet.
+
+## During
+
+- Smallest unit that works: one purpose per unit, testable in isolation.
+- Delete more than you add: code and claims are liabilities unless they earn
+ their weight.
+
+## After
+
+- Evidence over intuition: trust nothing unverified.
+- Failure is the spec: root cause, blast radius, security path, and undo plan
+ must be explicit.
+
+## Brain Rule
+
+No source, no claim. No approval and rollback, no mutation. No verification
+path, no release.
diff --git a/assets/template-brain/wiki/accounts/_index.md b/assets/template-brain/wiki/accounts/_index.md
new file mode 100644
index 0000000..0ff58c0
--- /dev/null
+++ b/assets/template-brain/wiki/accounts/_index.md
@@ -0,0 +1,23 @@
+---
+type: "hub"
+title: "Accounts Hub"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Accounts Hub
+
+## Parent
+
+- [[Index]]
+- [[Dashboard]]
+
+## Core Links
+
+- [[Hot]]
+- [[Overview]]
+
+## Notes
+
+Add generated notes here and keep this hub linked both ways.
diff --git a/assets/template-brain/wiki/canvases/Onboarding Canvas.canvas b/assets/template-brain/wiki/canvases/Onboarding Canvas.canvas
new file mode 100644
index 0000000..2256431
--- /dev/null
+++ b/assets/template-brain/wiki/canvases/Onboarding Canvas.canvas
@@ -0,0 +1,57 @@
+{
+ "nodes": [
+ {
+ "id": "hot",
+ "type": "file",
+ "file": "wiki/hot.md",
+ "x": 0,
+ "y": 0,
+ "width": 300,
+ "height": 180
+ },
+ {
+ "id": "dashboard",
+ "type": "file",
+ "file": "wiki/meta/dashboard.md",
+ "x": 360,
+ "y": 0,
+ "width": 320,
+ "height": 220
+ },
+ {
+ "id": "sources",
+ "type": "file",
+ "file": "wiki/flows/Source Intake Workflow.md",
+ "x": 0,
+ "y": 260,
+ "width": 320,
+ "height": 220
+ },
+ {
+ "id": "report",
+ "type": "file",
+ "file": "wiki/reports/Weekly Report.md",
+ "x": 720,
+ "y": 260,
+ "width": 320,
+ "height": 220
+ }
+ ],
+ "edges": [
+ {
+ "id": "e1",
+ "fromNode": "hot",
+ "toNode": "dashboard"
+ },
+ {
+ "id": "e2",
+ "fromNode": "sources",
+ "toNode": "dashboard"
+ },
+ {
+ "id": "e3",
+ "fromNode": "dashboard",
+ "toNode": "report"
+ }
+ ]
+}
diff --git a/assets/template-brain/wiki/canvases/_index.md b/assets/template-brain/wiki/canvases/_index.md
new file mode 100644
index 0000000..54f702b
--- /dev/null
+++ b/assets/template-brain/wiki/canvases/_index.md
@@ -0,0 +1,23 @@
+---
+type: "hub"
+title: "Canvases Hub"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Canvases Hub
+
+## Parent
+
+- [[Index]]
+- [[Dashboard]]
+
+## Core Links
+
+- [[Hot]]
+- [[Overview]]
+
+## Notes
+
+Add generated notes here and keep this hub linked both ways.
diff --git a/assets/template-brain/wiki/canvases/main.canvas b/assets/template-brain/wiki/canvases/main.canvas
new file mode 100644
index 0000000..2256431
--- /dev/null
+++ b/assets/template-brain/wiki/canvases/main.canvas
@@ -0,0 +1,57 @@
+{
+ "nodes": [
+ {
+ "id": "hot",
+ "type": "file",
+ "file": "wiki/hot.md",
+ "x": 0,
+ "y": 0,
+ "width": 300,
+ "height": 180
+ },
+ {
+ "id": "dashboard",
+ "type": "file",
+ "file": "wiki/meta/dashboard.md",
+ "x": 360,
+ "y": 0,
+ "width": 320,
+ "height": 220
+ },
+ {
+ "id": "sources",
+ "type": "file",
+ "file": "wiki/flows/Source Intake Workflow.md",
+ "x": 0,
+ "y": 260,
+ "width": 320,
+ "height": 220
+ },
+ {
+ "id": "report",
+ "type": "file",
+ "file": "wiki/reports/Weekly Report.md",
+ "x": 720,
+ "y": 260,
+ "width": 320,
+ "height": 220
+ }
+ ],
+ "edges": [
+ {
+ "id": "e1",
+ "fromNode": "hot",
+ "toNode": "dashboard"
+ },
+ {
+ "id": "e2",
+ "fromNode": "sources",
+ "toNode": "dashboard"
+ },
+ {
+ "id": "e3",
+ "fromNode": "dashboard",
+ "toNode": "report"
+ }
+ ]
+}
diff --git a/assets/template-brain/wiki/concepts/Best Practices Kernel.md b/assets/template-brain/wiki/concepts/Best Practices Kernel.md
new file mode 100644
index 0000000..60080c0
--- /dev/null
+++ b/assets/template-brain/wiki/concepts/Best Practices Kernel.md
@@ -0,0 +1,22 @@
+---
+type: "concept"
+title: "Best Practices Kernel"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Best Practices Kernel
+
+Read first. Write second. Verify third.
+
+## Six Cuts
+
+- Read before write.
+- Name like the next reader is hostile.
+- Ship the smallest unit that works.
+- Delete more than you add.
+- Evidence over intuition.
+- Failure is the spec.
+
+Related: [[Index]] | [[Source Intake Workflow]] | [[Synthesis Workflow]]
diff --git a/assets/template-brain/wiki/concepts/_index.md b/assets/template-brain/wiki/concepts/_index.md
new file mode 100644
index 0000000..3f698fd
--- /dev/null
+++ b/assets/template-brain/wiki/concepts/_index.md
@@ -0,0 +1,23 @@
+---
+type: "hub"
+title: "Concepts Hub"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Concepts Hub
+
+## Parent
+
+- [[Index]]
+- [[Dashboard]]
+
+## Core Links
+
+- [[Hot]]
+- [[Overview]]
+
+## Notes
+
+Add generated notes here and keep this hub linked both ways.
diff --git a/assets/template-brain/wiki/decisions/Approval Queue.md b/assets/template-brain/wiki/decisions/Approval Queue.md
new file mode 100644
index 0000000..cf1cbc9
--- /dev/null
+++ b/assets/template-brain/wiki/decisions/Approval Queue.md
@@ -0,0 +1,19 @@
+---
+type: "decision"
+title: "Approval Queue"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Approval Queue
+
+No action is approved until it has source, confidence, owner, status, and rollback.
+
+## Queue
+
+| Action | Source | Confidence | Owner | Status | Rollback |
+|---|---|---:|---|---|---|
+| Replace this example after source intake | [[Source Manifest Guide]] | low | {{owner}} | proposed | Do nothing |
+
+Related: [[Action Roadmap]] | [[Best Practices Kernel]]
diff --git a/assets/template-brain/wiki/decisions/_index.md b/assets/template-brain/wiki/decisions/_index.md
new file mode 100644
index 0000000..cf621ef
--- /dev/null
+++ b/assets/template-brain/wiki/decisions/_index.md
@@ -0,0 +1,23 @@
+---
+type: "hub"
+title: "Decisions Hub"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Decisions Hub
+
+## Parent
+
+- [[Index]]
+- [[Dashboard]]
+
+## Core Links
+
+- [[Hot]]
+- [[Overview]]
+
+## Notes
+
+Add generated notes here and keep this hub linked both ways.
diff --git a/assets/template-brain/wiki/deliverables/Action Roadmap.md b/assets/template-brain/wiki/deliverables/Action Roadmap.md
new file mode 100644
index 0000000..6e67bb2
--- /dev/null
+++ b/assets/template-brain/wiki/deliverables/Action Roadmap.md
@@ -0,0 +1,17 @@
+---
+type: "deliverable"
+title: "Action Roadmap"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Action Roadmap
+
+## Next 30 Days
+
+- Complete source intake and research refresh.
+- Replace scaffold assumptions with sourced domain notes.
+- Run release lint and package scans.
+
+Related: [[Health Scorecard]] | [[Approval Queue]] | [[Synthesis Workflow]]
diff --git a/assets/template-brain/wiki/deliverables/Health Scorecard.md b/assets/template-brain/wiki/deliverables/Health Scorecard.md
new file mode 100644
index 0000000..43688e3
--- /dev/null
+++ b/assets/template-brain/wiki/deliverables/Health Scorecard.md
@@ -0,0 +1,17 @@
+---
+type: "deliverable"
+title: "Health Scorecard"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Health Scorecard
+
+| Area | Status | Evidence | Confidence |
+|---|---|---|---:|
+| Source provenance | Needs source intake | [[Source Manifest Guide]] | low |
+| Research freshness | Needs refresh | [[Research Refresh Workflow]] | low |
+| Reporting readiness | Draft | [[Weekly Report]] | low |
+
+Related: [[Action Roadmap]] | [[Weekly Report]]
diff --git a/assets/template-brain/wiki/deliverables/_index.md b/assets/template-brain/wiki/deliverables/_index.md
new file mode 100644
index 0000000..5d6663d
--- /dev/null
+++ b/assets/template-brain/wiki/deliverables/_index.md
@@ -0,0 +1,23 @@
+---
+type: "hub"
+title: "Deliverables Hub"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Deliverables Hub
+
+## Parent
+
+- [[Index]]
+- [[Dashboard]]
+
+## Core Links
+
+- [[Hot]]
+- [[Overview]]
+
+## Notes
+
+Add generated notes here and keep this hub linked both ways.
diff --git a/assets/template-brain/wiki/entities/_index.md b/assets/template-brain/wiki/entities/_index.md
new file mode 100644
index 0000000..05eed21
--- /dev/null
+++ b/assets/template-brain/wiki/entities/_index.md
@@ -0,0 +1,23 @@
+---
+type: "hub"
+title: "Entities Hub"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Entities Hub
+
+## Parent
+
+- [[Index]]
+- [[Dashboard]]
+
+## Core Links
+
+- [[Hot]]
+- [[Overview]]
+
+## Notes
+
+Add generated notes here and keep this hub linked both ways.
diff --git a/assets/template-brain/wiki/experiments/_index.md b/assets/template-brain/wiki/experiments/_index.md
new file mode 100644
index 0000000..b4b43de
--- /dev/null
+++ b/assets/template-brain/wiki/experiments/_index.md
@@ -0,0 +1,23 @@
+---
+type: "hub"
+title: "Experiments Hub"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Experiments Hub
+
+## Parent
+
+- [[Index]]
+- [[Dashboard]]
+
+## Core Links
+
+- [[Hot]]
+- [[Overview]]
+
+## Notes
+
+Add generated notes here and keep this hub linked both ways.
diff --git a/assets/template-brain/wiki/flows/Reporting Workflow.md b/assets/template-brain/wiki/flows/Reporting Workflow.md
new file mode 100644
index 0000000..66e4103
--- /dev/null
+++ b/assets/template-brain/wiki/flows/Reporting Workflow.md
@@ -0,0 +1,16 @@
+---
+type: "flow"
+title: "Reporting Workflow"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Reporting Workflow
+
+1. Read [[Health Scorecard]] and [[Action Roadmap]].
+2. Confirm every claim points to a source note or raw hash.
+3. Render [[Weekly Report]].
+4. Remove local paths and private data before sharing.
+
+Related: [[Weekly Report]] | [[Approval Queue]]
diff --git a/assets/template-brain/wiki/flows/Research Refresh Workflow.md b/assets/template-brain/wiki/flows/Research Refresh Workflow.md
new file mode 100644
index 0000000..289defc
--- /dev/null
+++ b/assets/template-brain/wiki/flows/Research Refresh Workflow.md
@@ -0,0 +1,18 @@
+---
+type: "flow"
+title: "Research Refresh Workflow"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Research Refresh Workflow
+
+Refresh cadence: monthly for Google algorithm updates and Search Central policy; before every release for E-E-A-T framing, schema deprecations, and GEO/AEO citation claims; on-changelog for the claude-blog skill.
+
+1. Start with official, primary, vendor, regulator, standards-body, or API docs.
+2. Record URL, retrieval date, version, deprecation/sunset notes, and confidence.
+3. Update `references/current-requirements.md`.
+4. Only then update domain-specific recommendations.
+
+Related: [[Source Intake Workflow]] | [[Source Manifest Guide]] | [[Best Practices Kernel]]
diff --git a/assets/template-brain/wiki/flows/Source Intake Workflow.md b/assets/template-brain/wiki/flows/Source Intake Workflow.md
new file mode 100644
index 0000000..57372a9
--- /dev/null
+++ b/assets/template-brain/wiki/flows/Source Intake Workflow.md
@@ -0,0 +1,16 @@
+---
+type: "flow"
+title: "Source Intake Workflow"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Source Intake Workflow
+
+1. Store raw source under `.raw/sources/`.
+2. Record source path, hash, owner, and retrieval date.
+3. Create a note under `wiki/sources/`.
+4. Link affected entities and deliverables.
+
+Related: [[wiki/sources/_index|Sources Hub]] | [[Source Manifest Guide]] | [[Best Practices Kernel]]
diff --git a/assets/template-brain/wiki/flows/Synthesis Workflow.md b/assets/template-brain/wiki/flows/Synthesis Workflow.md
new file mode 100644
index 0000000..499134e
--- /dev/null
+++ b/assets/template-brain/wiki/flows/Synthesis Workflow.md
@@ -0,0 +1,16 @@
+---
+type: "flow"
+title: "Synthesis Workflow"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Synthesis Workflow
+
+1. Read source notes and `.raw/.manifest.json`.
+2. Separate facts, interpretation, and recommendations.
+3. Add confidence and failure path to recommendations.
+4. Link recommendations to [[Approval Queue]] and [[Action Roadmap]].
+
+Related: [[Source Intake Workflow]] | [[Health Scorecard]] | [[Best Practices Kernel]]
diff --git a/assets/template-brain/wiki/flows/_index.md b/assets/template-brain/wiki/flows/_index.md
new file mode 100644
index 0000000..acee1f2
--- /dev/null
+++ b/assets/template-brain/wiki/flows/_index.md
@@ -0,0 +1,23 @@
+---
+type: "hub"
+title: "Flows Hub"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Flows Hub
+
+## Parent
+
+- [[Index]]
+- [[Dashboard]]
+
+## Core Links
+
+- [[Hot]]
+- [[Overview]]
+
+## Notes
+
+Add generated notes here and keep this hub linked both ways.
diff --git a/assets/template-brain/wiki/gaps/_index.md b/assets/template-brain/wiki/gaps/_index.md
new file mode 100644
index 0000000..9e8d26e
--- /dev/null
+++ b/assets/template-brain/wiki/gaps/_index.md
@@ -0,0 +1,23 @@
+---
+type: "hub"
+title: "Gaps Hub"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Gaps Hub
+
+## Parent
+
+- [[Index]]
+- [[Dashboard]]
+
+## Core Links
+
+- [[Hot]]
+- [[Overview]]
+
+## Notes
+
+Add generated notes here and keep this hub linked both ways.
diff --git a/assets/template-brain/wiki/hot.md b/assets/template-brain/wiki/hot.md
new file mode 100644
index 0000000..abf656c
--- /dev/null
+++ b/assets/template-brain/wiki/hot.md
@@ -0,0 +1,23 @@
+---
+type: "hot"
+title: "Hot"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Hot
+
+## Current State
+
+Claude Blog Brain template is scaffolded for blog content creation, optimization, and management dual-optimized for Google rankings (E-E-A-T, the 2026 core updates) and AI citations (GEO/AEO), spanning writing, rewriting and freshness, SERP-informed briefs and outlines, editorial calendars and strategy, semantic topic clusters, schema and internal linking, multilingual publishing, the FLOW framework, factchecking, personas, distribution, and the blog delivery contract, grounded in the claude-blog skill.
+
+## Next Action
+
+Open [[Start Here]], then review [[Source Intake Workflow]] and [[Research Refresh Workflow]].
+
+## Related
+
+- [[Index]]
+- [[Dashboard]]
+- [[Log]]
diff --git a/assets/template-brain/wiki/index.md b/assets/template-brain/wiki/index.md
new file mode 100644
index 0000000..402417d
--- /dev/null
+++ b/assets/template-brain/wiki/index.md
@@ -0,0 +1,49 @@
+---
+type: "index"
+title: "Index"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Index
+
+## Start
+
+- [[Hot]]
+- [[Overview]]
+- [[Log]]
+- [[Start Here]]
+- [[Dashboard]]
+- [[Onboarding Canvas.canvas|Onboarding Canvas]]
+- [[Best Practices Kernel]]
+
+## Core Workflows
+
+- [[Source Intake Workflow]]
+- [[Research Refresh Workflow]]
+- [[Synthesis Workflow]]
+- [[Reporting Workflow]]
+
+## Deliverables
+
+- [[Health Scorecard]]
+- [[Action Roadmap]]
+- [[Weekly Report]]
+- [[Approval Queue]]
+
+## Hubs
+
+- [[wiki/accounts/_index|Accounts Hub]]
+- [[wiki/platforms/_index|Platforms Hub]]
+- [[wiki/flows/_index|Flows Hub]]
+- [[wiki/sources/_index|Sources Hub]]
+- [[wiki/concepts/_index|Concepts Hub]]
+- [[wiki/entities/_index|Entities Hub]]
+- [[wiki/decisions/_index|Decisions Hub]]
+- [[wiki/deliverables/_index|Deliverables Hub]]
+- [[wiki/reports/_index|Reports Hub]]
+- [[wiki/experiments/_index|Experiments Hub]]
+- [[wiki/canvases/_index|Canvases Hub]]
+- [[wiki/questions/_index|Questions Hub]]
+- [[wiki/gaps/_index|Gaps Hub]]
diff --git a/assets/template-brain/wiki/log.md b/assets/template-brain/wiki/log.md
new file mode 100644
index 0000000..6965583
--- /dev/null
+++ b/assets/template-brain/wiki/log.md
@@ -0,0 +1,13 @@
+---
+type: "log"
+title: "Log"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Log
+
+Related: [[Hot]] | [[Index]] | [[Dashboard]]
+
+- {{date}} - Claude Blog Brain scaffolded.
diff --git a/assets/template-brain/wiki/meta/Start Here.md b/assets/template-brain/wiki/meta/Start Here.md
new file mode 100644
index 0000000..07a03be
--- /dev/null
+++ b/assets/template-brain/wiki/meta/Start Here.md
@@ -0,0 +1,20 @@
+---
+type: "meta"
+title: "Start Here"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Start Here
+
+![[brain-relationship-map.svg]]
+
+1. Read [[Hot]].
+2. Open [[Dashboard]].
+3. Review [[Source Intake Workflow]].
+4. Review [[Research Refresh Workflow]].
+5. Add sources to `.raw/`.
+6. Run synthesis only after source quality is clear.
+
+Related: [[Index]] | [[Best Practices Kernel]]
diff --git a/assets/template-brain/wiki/meta/dashboard.md b/assets/template-brain/wiki/meta/dashboard.md
new file mode 100644
index 0000000..c32dc34
--- /dev/null
+++ b/assets/template-brain/wiki/meta/dashboard.md
@@ -0,0 +1,23 @@
+---
+type: "dashboard"
+title: "Dashboard"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Dashboard
+
+## Visual Map
+
+![[brain-relationship-map.svg]]
+
+## Operating Links
+
+- [[Source Intake Workflow]]
+- [[Research Refresh Workflow]]
+- [[Synthesis Workflow]]
+- [[Reporting Workflow]]
+- [[Approval Queue]]
+- [[Health Scorecard]]
+- [[Action Roadmap]]
diff --git a/assets/template-brain/wiki/overview.md b/assets/template-brain/wiki/overview.md
new file mode 100644
index 0000000..fca9f90
--- /dev/null
+++ b/assets/template-brain/wiki/overview.md
@@ -0,0 +1,23 @@
+---
+type: "overview"
+title: "Overview"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Overview
+
+Claude Blog Brain is a persistent operating brain for blog content creation, optimization, and management dual-optimized for Google rankings (E-E-A-T, the 2026 core updates) and AI citations (GEO/AEO), spanning writing, rewriting and freshness, SERP-informed briefs and outlines, editorial calendars and strategy, semantic topic clusters, schema and internal linking, multilingual publishing, the FLOW framework, factchecking, personas, distribution, and the blog delivery contract, grounded in the claude-blog skill.
+
+![[brain-relationship-map.svg]]
+
+## Buyer
+
+Content teams, bloggers, SEO content strategists, and operators who run the claude-blog skill and need a persistent, source-cited operating system for writing, optimizing, and auditing blog content that ranks on Google and gets cited by AI assistants.
+
+## Related
+
+- [[Index]]
+- [[Dashboard]]
+- [[Best Practices Kernel]]
diff --git a/assets/template-brain/wiki/platforms/_index.md b/assets/template-brain/wiki/platforms/_index.md
new file mode 100644
index 0000000..a70254a
--- /dev/null
+++ b/assets/template-brain/wiki/platforms/_index.md
@@ -0,0 +1,23 @@
+---
+type: "hub"
+title: "Platforms Hub"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Platforms Hub
+
+## Parent
+
+- [[Index]]
+- [[Dashboard]]
+
+## Core Links
+
+- [[Hot]]
+- [[Overview]]
+
+## Notes
+
+Add generated notes here and keep this hub linked both ways.
diff --git a/assets/template-brain/wiki/questions/_index.md b/assets/template-brain/wiki/questions/_index.md
new file mode 100644
index 0000000..3d2dd53
--- /dev/null
+++ b/assets/template-brain/wiki/questions/_index.md
@@ -0,0 +1,23 @@
+---
+type: "hub"
+title: "Questions Hub"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Questions Hub
+
+## Parent
+
+- [[Index]]
+- [[Dashboard]]
+
+## Core Links
+
+- [[Hot]]
+- [[Overview]]
+
+## Notes
+
+Add generated notes here and keep this hub linked both ways.
diff --git a/assets/template-brain/wiki/reports/Weekly Report.md b/assets/template-brain/wiki/reports/Weekly Report.md
new file mode 100644
index 0000000..963d010
--- /dev/null
+++ b/assets/template-brain/wiki/reports/Weekly Report.md
@@ -0,0 +1,21 @@
+---
+type: "report"
+title: "Weekly Report"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Weekly Report
+
+## Summary
+
+This report is a scaffold until source intake and research refresh are complete.
+
+## Evidence
+
+- [[Source Manifest Guide]]
+- [[Health Scorecard]]
+- [[Action Roadmap]]
+
+Related: [[Reporting Workflow]] | [[Approval Queue]]
diff --git a/assets/template-brain/wiki/reports/_index.md b/assets/template-brain/wiki/reports/_index.md
new file mode 100644
index 0000000..c39a385
--- /dev/null
+++ b/assets/template-brain/wiki/reports/_index.md
@@ -0,0 +1,23 @@
+---
+type: "hub"
+title: "Reports Hub"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Reports Hub
+
+## Parent
+
+- [[Index]]
+- [[Dashboard]]
+
+## Core Links
+
+- [[Hot]]
+- [[Overview]]
+
+## Notes
+
+Add generated notes here and keep this hub linked both ways.
diff --git a/assets/template-brain/wiki/sources/Source Manifest Guide.md b/assets/template-brain/wiki/sources/Source Manifest Guide.md
new file mode 100644
index 0000000..92ab9be
--- /dev/null
+++ b/assets/template-brain/wiki/sources/Source Manifest Guide.md
@@ -0,0 +1,20 @@
+---
+type: "source"
+title: "Source Manifest Guide"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Source Manifest Guide
+
+Every raw source must have:
+
+- path
+- sha256
+- retrieved date
+- source type
+- owner
+- notes about what it proves and does not prove
+
+Related: [[wiki/sources/_index|Sources Hub]] | [[Source Intake Workflow]]
diff --git a/assets/template-brain/wiki/sources/_index.md b/assets/template-brain/wiki/sources/_index.md
new file mode 100644
index 0000000..f9eba42
--- /dev/null
+++ b/assets/template-brain/wiki/sources/_index.md
@@ -0,0 +1,23 @@
+---
+type: "hub"
+title: "Sources Hub"
+created: "{{date}}"
+updated: "{{date}}"
+status: "active"
+---
+
+# Sources Hub
+
+## Parent
+
+- [[Index]]
+- [[Dashboard]]
+
+## Core Links
+
+- [[Hot]]
+- [[Overview]]
+
+## Notes
+
+Add generated notes here and keep this hub linked both ways.
diff --git a/claude_blog_brain/__init__.py b/claude_blog_brain/__init__.py
new file mode 100644
index 0000000..cf2fe4e
--- /dev/null
+++ b/claude_blog_brain/__init__.py
@@ -0,0 +1,3 @@
+"""Generated Claude Blog Brain package."""
+
+__version__ = "0.1.0"
diff --git a/claude_blog_brain/__main__.py b/claude_blog_brain/__main__.py
new file mode 100644
index 0000000..5417fda
--- /dev/null
+++ b/claude_blog_brain/__main__.py
@@ -0,0 +1,7 @@
+from __future__ import annotations
+
+from .cli import main
+
+
+if __name__ == "__main__":
+ raise SystemExit(main())
diff --git a/claude_blog_brain/cli.py b/claude_blog_brain/cli.py
new file mode 100644
index 0000000..54b2d20
--- /dev/null
+++ b/claude_blog_brain/cli.py
@@ -0,0 +1,72 @@
+from __future__ import annotations
+
+import argparse
+import subprocess
+import sys
+from pathlib import Path
+
+
+REPO = Path(__file__).resolve().parent.parent
+PY = sys.executable
+
+
+def run_script(script: str, args: list[str]) -> int:
+ return subprocess.call([PY, str(REPO / "scripts" / script), *args], cwd=REPO)
+
+
+def main(argv: list[str] | None = None) -> int:
+ parser = argparse.ArgumentParser(prog="claude-blog-brain", description="Operate Claude Blog Brain.")
+ sub = parser.add_subparsers(dest="command", required=True)
+ p_new = sub.add_parser("new")
+ p_new.add_argument("client")
+ p_new.add_argument("--client-name", default="")
+ p_new.add_argument("--owner", default="Daniel Agrici")
+ p_new.add_argument("--out-dir", default="~/claude-blog-brain-vaults")
+ p_ingest = sub.add_parser("ingest")
+ p_ingest.add_argument("--vault", required=True)
+ p_ingest.add_argument("--file", required=True)
+ p_synth = sub.add_parser("synthesize")
+ p_synth.add_argument("--vault", required=True)
+ p_report = sub.add_parser("report")
+ p_report.add_argument("--vault", required=True)
+ p_report.add_argument("--out", default="")
+ p_report.add_argument("--html-only", action="store_true")
+ p_visuals = sub.add_parser("visuals")
+ p_visuals.add_argument("--vault", required=True)
+ p_lint = sub.add_parser("lint")
+ p_lint.add_argument("--vault", required=True)
+ p_lint.add_argument("--template", action="store_true")
+ p_next = sub.add_parser("next")
+ p_next.add_argument("--vault", required=True)
+ sub.add_parser("demo")
+ args = parser.parse_args(argv)
+ if args.command == "new":
+ call = ["--client", args.client, "--client-name", args.client_name or args.client, "--owner", args.owner, "--out-dir", args.out_dir]
+ return run_script("scaffold_vault.py", call)
+ if args.command == "ingest":
+ return run_script("ingest_source.py", ["--vault", args.vault, "--file", args.file])
+ if args.command == "synthesize":
+ return run_script("synthesize_brain.py", ["--vault", args.vault])
+ if args.command == "report":
+ call = ["--vault", args.vault]
+ if args.out:
+ call += ["--out", args.out]
+ if args.html_only:
+ call.append("--html-only")
+ return run_script("render_brain_report.py", call)
+ if args.command == "visuals":
+ return run_script("generate_vault_visuals.py", ["--vault", args.vault])
+ if args.command == "lint":
+ call = ["--vault", args.vault]
+ if args.template:
+ call.append("--template")
+ return run_script("lint_vault.py", call)
+ if args.command == "next":
+ return run_script("guide_next_action.py", ["--vault", args.vault])
+ if args.command == "demo":
+ return run_script("build_demo_vault.py", [])
+ return 2
+
+
+if __name__ == "__main__":
+ raise SystemExit(main())
diff --git a/docs/OPERATOR_KIT.md b/docs/OPERATOR_KIT.md
new file mode 100644
index 0000000..0ffc452
--- /dev/null
+++ b/docs/OPERATOR_KIT.md
@@ -0,0 +1,42 @@
+# Claude Blog Brain Operator Kit
+
+## Five-Minute Path
+
+```bash
+python -m pip install -e .
+claude-blog-brain demo
+claude-blog-brain lint --vault examples/sample-vault
+claude-blog-brain report --vault examples/sample-vault --html-only
+```
+
+Open `examples/sample-vault/` in Obsidian and read:
+
+1. `CODEX.md`
+2. `wiki/hot.md`
+3. `wiki/index.md`
+4. `wiki/meta/dashboard.md`
+
+## Client Vault
+
+```bash
+claude-blog-brain new acme --client-name "Acme Co" --owner "Daniel Agrici" --out-dir ~/claude-blog-brain-vaults
+claude-blog-brain ingest --vault ~/claude-blog-brain-vaults/acme --file tests/fixtures/sample-source.md
+claude-blog-brain synthesize --vault ~/claude-blog-brain-vaults/acme
+claude-blog-brain report --vault ~/claude-blog-brain-vaults/acme --html-only
+```
+
+## Research Rule
+
+Refresh current official or primary sources before turning this scaffold into a
+domain-specific release. If the sources are not refreshed, keep the product in
+generic scaffold status.
+
+Research evidence must be written into `references/source-ledger.json` with
+source URL, source type, retrieved date, refresh due date, confidence, and claim
+coverage. Markdown research notes alone do not satisfy market-ready release.
+
+## Adapter Rule
+
+Domain-adapted status requires `references/adapter-manifest.json` to name real
+schemas, importer paths, synthesis modules, report renderers, fixtures, and
+tests. Generic scaffold scripts are intentionally capped below market-ready.
diff --git a/docs/PRODUCT_BOUNDARIES.md b/docs/PRODUCT_BOUNDARIES.md
new file mode 100644
index 0000000..753f8ce
--- /dev/null
+++ b/docs/PRODUCT_BOUNDARIES.md
@@ -0,0 +1,36 @@
+# Product Boundaries
+
+Claude Blog Brain is an advisory, read-only Obsidian brain for blog content creation, optimization, and management dual-optimized for Google rankings (E-E-A-T, the 2026 core updates) and AI citations (GEO/AEO), spanning writing, rewriting and freshness, SERP-informed briefs and outlines, editorial calendars and strategy, semantic topic clusters, schema and internal linking, multilingual publishing, the FLOW framework, factchecking, personas, distribution, and the blog delivery contract, grounded in the claude-blog skill.
+
+## It Does
+
+- Preserve raw sources under `.raw/`.
+- Synthesize source-cited notes and deliverables.
+- Maintain action queues, reports, and next actions.
+- Keep decisions auditable through source links and rollback notes.
+- Gate maturity through `references/source-ledger.json`,
+ `references/adapter-manifest.json`, and `scripts/audit_brain.py`.
+
+## It Does Not
+
+- No ranking or traffic guarantee; content outcomes are probabilistic and never certain
+- No credentials, tokens, API keys, or private client content in repo artifacts
+- No mutation of a CMS, GSC, GA4, or publishing platform; the brain is advisory and read-only
+- No recommendation without a dated source, confidence level, and rollback note
+- No deprecated advice (HowTo schema, retired FAQ rich results, FID) presented as current
+- No fabricated or unsourced statistics and no AI-detectable filler presented as fact
+
+## Safety Risks
+
+- Stale Google algorithm, E-E-A-T, or schema-deprecation requirements presented as current
+- Fabricated, unsourced, or AI-slop statistics written into published content
+- Private client content, draft URLs, or credentials leaking into raw inputs or reports
+- Overconfident content recommendations from thin or single-source inputs
+- Generated reports leaking local filesystem paths
+
+## Maturity Boundary
+
+This repo starts as `scaffolded`. Market-ready quality requires current
+research, domain adapters, deterministic demo verification, source citations,
+Obsidian graph hygiene, and release scans. The audit score is capped below 90
+until those stages are complete.
diff --git a/examples/sample-vault/.obsidian/app.json b/examples/sample-vault/.obsidian/app.json
new file mode 100644
index 0000000..b098604
--- /dev/null
+++ b/examples/sample-vault/.obsidian/app.json
@@ -0,0 +1,3 @@
+{
+ "alwaysUpdateLinks": true
+}
diff --git a/examples/sample-vault/.obsidian/appearance.json b/examples/sample-vault/.obsidian/appearance.json
new file mode 100644
index 0000000..08570bf
--- /dev/null
+++ b/examples/sample-vault/.obsidian/appearance.json
@@ -0,0 +1,6 @@
+{
+ "cssTheme": "",
+ "enabledCssSnippets": [
+ "brain"
+ ]
+}
diff --git a/examples/sample-vault/.obsidian/core-plugins.json b/examples/sample-vault/.obsidian/core-plugins.json
new file mode 100644
index 0000000..859c905
--- /dev/null
+++ b/examples/sample-vault/.obsidian/core-plugins.json
@@ -0,0 +1,6 @@
+[
+ "file-explorer",
+ "global-search",
+ "graph",
+ "canvas"
+]
diff --git a/examples/sample-vault/.obsidian/graph.json b/examples/sample-vault/.obsidian/graph.json
new file mode 100644
index 0000000..9500493
--- /dev/null
+++ b/examples/sample-vault/.obsidian/graph.json
@@ -0,0 +1,66 @@
+{
+ "collapse-filter": false,
+ "search": "",
+ "showTags": false,
+ "showAttachments": false,
+ "hideUnresolved": true,
+ "showOrphans": false,
+ "colorGroups": [
+ {
+ "query": "file:wiki/hot.md OR file:wiki/index.md OR file:wiki/overview.md OR file:wiki/log.md OR path:wiki/meta",
+ "color": {
+ "a": 1,
+ "rgb": 14047793
+ }
+ },
+ {
+ "query": "path:wiki/sources",
+ "color": {
+ "a": 1,
+ "rgb": 5795730
+ }
+ },
+ {
+ "query": "path:wiki/flows",
+ "color": {
+ "a": 1,
+ "rgb": 12740671
+ }
+ },
+ {
+ "query": "path:wiki/entities OR path:wiki/accounts OR path:wiki/platforms",
+ "color": {
+ "a": 1,
+ "rgb": 3112839
+ }
+ },
+ {
+ "query": "path:wiki/decisions",
+ "color": {
+ "a": 1,
+ "rgb": 13214811
+ }
+ },
+ {
+ "query": "path:wiki/deliverables OR path:wiki/reports",
+ "color": {
+ "a": 1,
+ "rgb": 11033485
+ }
+ },
+ {
+ "query": "path:wiki/experiments",
+ "color": {
+ "a": 1,
+ "rgb": 8150963
+ }
+ }
+ ],
+ "showArrow": true,
+ "textFadeMultiplier": 0.2,
+ "nodeSizeMultiplier": 1.25,
+ "lineSizeMultiplier": 1.25,
+ "centerStrength": 0.5,
+ "repelStrength": 11,
+ "linkDistance": 155
+}
diff --git a/examples/sample-vault/.obsidian/snippets/brain.css b/examples/sample-vault/.obsidian/snippets/brain.css
new file mode 100644
index 0000000..20b9f14
--- /dev/null
+++ b/examples/sample-vault/.obsidian/snippets/brain.css
@@ -0,0 +1,9 @@
+:root {
+ --brain-accent: #2f7f87;
+ --brain-warn: #c85f4d;
+ --brain-gold: #f0b33d;
+}
+
+.markdown-preview-view h1 {
+ color: var(--brain-accent);
+}
diff --git a/examples/sample-vault/.raw/.manifest.json b/examples/sample-vault/.raw/.manifest.json
new file mode 100644
index 0000000..7446856
--- /dev/null
+++ b/examples/sample-vault/.raw/.manifest.json
@@ -0,0 +1,18 @@
+{
+ "brain_schema": "claude-blog-brain.v1",
+ "sources": [
+ {
+ "path": ".raw/sources/sample-source.md",
+ "sha256": "9927f31d619695c9e6d81a2696f3ef83e1fbdffc733a40ba2bfbbb39bd89a8dc",
+ "retrieved": "2026-05-16",
+ "source_type": "fixture"
+ }
+ ],
+ "scaffold_history": [
+ {
+ "client": "sample-client",
+ "client_name": "Sample Client",
+ "owner": "Daniel Agrici"
+ }
+ ]
+}
diff --git a/examples/sample-vault/.raw/sources/sample-source.md b/examples/sample-vault/.raw/sources/sample-source.md
new file mode 100644
index 0000000..5078dd7
--- /dev/null
+++ b/examples/sample-vault/.raw/sources/sample-source.md
@@ -0,0 +1,8 @@
+# Sample Claude Blog Brain Source
+
+This fixture proves the brain can ingest raw source material, cite it,
+synthesize a starter scorecard, render a report, and preserve graph
+connectivity.
+
+Domain: blog content creation, optimization, and management dual-optimized for Google rankings (E-E-A-T, the 2026 core updates) and AI citations (GEO/AEO), spanning writing, rewriting and freshness, SERP-informed briefs and outlines, editorial calendars and strategy, semantic topic clusters, schema and internal linking, multilingual publishing, the FLOW framework, factchecking, personas, distribution, and the blog delivery contract, grounded in the claude-blog skill
+Owner: Daniel Agrici
diff --git a/examples/sample-vault/CODEX.md b/examples/sample-vault/CODEX.md
new file mode 100644
index 0000000..c3ae293
--- /dev/null
+++ b/examples/sample-vault/CODEX.md
@@ -0,0 +1,17 @@
+# Claude Blog Brain Vault Instructions
+
+Read order:
+
+1. `wiki/hot.md`
+2. `wiki/index.md`
+3. Relevant workflow, source, entity, decision, or deliverable note
+
+Rules:
+
+- Preserve `.raw/` as immutable source material.
+- Use flat YAML frontmatter and wikilinks.
+- Keep `hot`, `index`, `overview`, and `log` current.
+- Keep recommendations source-cited.
+- Do not store credentials, tokens, cookies, or private secrets.
+- Do not make domain-specific claims without dated trustworthy sources.
+- Apply `shipping-rules.md` before release-affecting changes.
diff --git a/examples/sample-vault/README.md b/examples/sample-vault/README.md
new file mode 100644
index 0000000..c49b558
--- /dev/null
+++ b/examples/sample-vault/README.md
@@ -0,0 +1,3 @@
+# Claude Blog Brain Template Vault
+
+Open this folder in Obsidian, then start at `wiki/meta/Start Here.md`.
diff --git a/examples/sample-vault/_attachments/brain-relationship-map.svg b/examples/sample-vault/_attachments/brain-relationship-map.svg
new file mode 100644
index 0000000..307d6cb
--- /dev/null
+++ b/examples/sample-vault/_attachments/brain-relationship-map.svg
@@ -0,0 +1,13 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 980 420" role="img" aria-labelledby="title desc">
+<title id="title">Claude Blog Brain relationship map</title>
+<desc id="desc">Source to memory to deliverable operating map.</desc>
+<rect width="980" height="420" fill="#f8fafc"/>
+<text x="40" y="58" font-size="28" font-family="Inter,Arial" font-weight="700" fill="#172033">Claude Blog Brain Relationship Map</text>
+<g font-family="Inter,Arial" font-size="14" font-weight="700">
+<rect x="50" y="130" width="160" height="72" rx="8" fill="#fff" stroke="#586f92" stroke-width="3"/><text x="82" y="172" fill="#172033">Raw Sources</text>
+<rect x="290" y="130" width="160" height="72" rx="8" fill="#fff" stroke="#2f7f87" stroke-width="3"/><text x="324" y="172" fill="#172033">Wiki Memory</text>
+<rect x="530" y="130" width="160" height="72" rx="8" fill="#fff" stroke="#c85f4d" stroke-width="3"/><text x="560" y="172" fill="#172033">Checks + Gates</text>
+<rect x="770" y="130" width="160" height="72" rx="8" fill="#fff" stroke="#f0b33d" stroke-width="3"/><text x="800" y="172" fill="#172033">Deliverables</text>
+</g>
+<path d="M210 166 H290 M450 166 H530 M690 166 H770" stroke="#64748b" stroke-width="3"/>
+</svg>
diff --git a/examples/sample-vault/_templates/decision.md b/examples/sample-vault/_templates/decision.md
new file mode 100644
index 0000000..ae012a6
--- /dev/null
+++ b/examples/sample-vault/_templates/decision.md
@@ -0,0 +1,17 @@
+---
+type: "decision"
+title: "{{title}}"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "proposed"
+---
+
+# {{title}}
+
+## Decision
+
+## Rationale
+
+## Rollback
+
+Related: [[Approval Queue]]
diff --git a/examples/sample-vault/_templates/source-note.md b/examples/sample-vault/_templates/source-note.md
new file mode 100644
index 0000000..f5d5e33
--- /dev/null
+++ b/examples/sample-vault/_templates/source-note.md
@@ -0,0 +1,21 @@
+---
+type: "source"
+title: "{{title}}"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "draft"
+---
+
+# {{title}}
+
+## Source
+
+- Path:
+- Hash:
+- Retrieved:
+
+## Compiled Truth
+
+Summarize the source without copying it wholesale.
+
+Related: [[Source Manifest Guide]]
diff --git a/examples/sample-vault/_templates/standard-note.md b/examples/sample-vault/_templates/standard-note.md
new file mode 100644
index 0000000..be53771
--- /dev/null
+++ b/examples/sample-vault/_templates/standard-note.md
@@ -0,0 +1,21 @@
+---
+type: "note"
+title: "{{title}}"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "draft"
+---
+
+# {{title}}
+
+## Compiled Truth
+
+Write the current sourced truth here.
+
+## Related
+
+- [[Index]]
+
+## Timeline
+
+- 2026-05-16 - Note created.
diff --git a/examples/sample-vault/shipping-rules.md b/examples/sample-vault/shipping-rules.md
new file mode 100644
index 0000000..460d42f
--- /dev/null
+++ b/examples/sample-vault/shipping-rules.md
@@ -0,0 +1,26 @@
+# Shipping Rules
+
+Read first. Write second. Verify third.
+
+## Before
+
+- Read before write: open sources, call sites, tests, schemas, and consumers.
+- Name like the next reader is hostile: if you cannot name it cleanly, you do
+ not understand it yet.
+
+## During
+
+- Smallest unit that works: one purpose per unit, testable in isolation.
+- Delete more than you add: code and claims are liabilities unless they earn
+ their weight.
+
+## After
+
+- Evidence over intuition: trust nothing unverified.
+- Failure is the spec: root cause, blast radius, security path, and undo plan
+ must be explicit.
+
+## Brain Rule
+
+No source, no claim. No approval and rollback, no mutation. No verification
+path, no release.
diff --git a/examples/sample-vault/wiki/accounts/_index.md b/examples/sample-vault/wiki/accounts/_index.md
new file mode 100644
index 0000000..292ecfb
--- /dev/null
+++ b/examples/sample-vault/wiki/accounts/_index.md
@@ -0,0 +1,23 @@
+---
+type: "hub"
+title: "Accounts Hub"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Accounts Hub
+
+## Parent
+
+- [[Index]]
+- [[Dashboard]]
+
+## Core Links
+
+- [[Hot]]
+- [[Overview]]
+
+## Notes
+
+Add generated notes here and keep this hub linked both ways.
diff --git a/examples/sample-vault/wiki/canvases/Onboarding Canvas.canvas b/examples/sample-vault/wiki/canvases/Onboarding Canvas.canvas
new file mode 100644
index 0000000..2256431
--- /dev/null
+++ b/examples/sample-vault/wiki/canvases/Onboarding Canvas.canvas
@@ -0,0 +1,57 @@
+{
+ "nodes": [
+ {
+ "id": "hot",
+ "type": "file",
+ "file": "wiki/hot.md",
+ "x": 0,
+ "y": 0,
+ "width": 300,
+ "height": 180
+ },
+ {
+ "id": "dashboard",
+ "type": "file",
+ "file": "wiki/meta/dashboard.md",
+ "x": 360,
+ "y": 0,
+ "width": 320,
+ "height": 220
+ },
+ {
+ "id": "sources",
+ "type": "file",
+ "file": "wiki/flows/Source Intake Workflow.md",
+ "x": 0,
+ "y": 260,
+ "width": 320,
+ "height": 220
+ },
+ {
+ "id": "report",
+ "type": "file",
+ "file": "wiki/reports/Weekly Report.md",
+ "x": 720,
+ "y": 260,
+ "width": 320,
+ "height": 220
+ }
+ ],
+ "edges": [
+ {
+ "id": "e1",
+ "fromNode": "hot",
+ "toNode": "dashboard"
+ },
+ {
+ "id": "e2",
+ "fromNode": "sources",
+ "toNode": "dashboard"
+ },
+ {
+ "id": "e3",
+ "fromNode": "dashboard",
+ "toNode": "report"
+ }
+ ]
+}
diff --git a/examples/sample-vault/wiki/canvases/_index.md b/examples/sample-vault/wiki/canvases/_index.md
new file mode 100644
index 0000000..e48a31d
--- /dev/null
+++ b/examples/sample-vault/wiki/canvases/_index.md
@@ -0,0 +1,23 @@
+---
+type: "hub"
+title: "Canvases Hub"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Canvases Hub
+
+## Parent
+
+- [[Index]]
+- [[Dashboard]]
+
+## Core Links
+
+- [[Hot]]
+- [[Overview]]
+
+## Notes
+
+Add generated notes here and keep this hub linked both ways.
diff --git a/examples/sample-vault/wiki/canvases/main.canvas b/examples/sample-vault/wiki/canvases/main.canvas
new file mode 100644
index 0000000..2256431
--- /dev/null
+++ b/examples/sample-vault/wiki/canvases/main.canvas
@@ -0,0 +1,57 @@
+{
+ "nodes": [
+ {
+ "id": "hot",
+ "type": "file",
+ "file": "wiki/hot.md",
+ "x": 0,
+ "y": 0,
+ "width": 300,
+ "height": 180
+ },
+ {
+ "id": "dashboard",
+ "type": "file",
+ "file": "wiki/meta/dashboard.md",
+ "x": 360,
+ "y": 0,
+ "width": 320,
+ "height": 220
+ },
+ {
+ "id": "sources",
+ "type": "file",
+ "file": "wiki/flows/Source Intake Workflow.md",
+ "x": 0,
+ "y": 260,
+ "width": 320,
+ "height": 220
+ },
+ {
+ "id": "report",
+ "type": "file",
+ "file": "wiki/reports/Weekly Report.md",
+ "x": 720,
+ "y": 260,
+ "width": 320,
+ "height": 220
+ }
+ ],
+ "edges": [
+ {
+ "id": "e1",
+ "fromNode": "hot",
+ "toNode": "dashboard"
+ },
+ {
+ "id": "e2",
+ "fromNode": "sources",
+ "toNode": "dashboard"
+ },
+ {
+ "id": "e3",
+ "fromNode": "dashboard",
+ "toNode": "report"
+ }
+ ]
+}
diff --git a/examples/sample-vault/wiki/concepts/Best Practices Kernel.md b/examples/sample-vault/wiki/concepts/Best Practices Kernel.md
new file mode 100644
index 0000000..f2bff2d
--- /dev/null
+++ b/examples/sample-vault/wiki/concepts/Best Practices Kernel.md
@@ -0,0 +1,22 @@
+---
+type: "concept"
+title: "Best Practices Kernel"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Best Practices Kernel
+
+Read first. Write second. Verify third.
+
+## Six Cuts
+
+- Read before write.
+- Name like the next reader is hostile.
+- Ship the smallest unit that works.
+- Delete more than you add.
+- Evidence over intuition.
+- Failure is the spec.
+
+Related: [[Index]] | [[Source Intake Workflow]] | [[Synthesis Workflow]]
diff --git a/examples/sample-vault/wiki/concepts/_index.md b/examples/sample-vault/wiki/concepts/_index.md
new file mode 100644
index 0000000..6f7e28f
--- /dev/null
+++ b/examples/sample-vault/wiki/concepts/_index.md
@@ -0,0 +1,23 @@
+---
+type: "hub"
+title: "Concepts Hub"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Concepts Hub
+
+## Parent
+
+- [[Index]]
+- [[Dashboard]]
+
+## Core Links
+
+- [[Hot]]
+- [[Overview]]
+
+## Notes
+
+Add generated notes here and keep this hub linked both ways.
diff --git a/examples/sample-vault/wiki/decisions/Approval Queue.md b/examples/sample-vault/wiki/decisions/Approval Queue.md
new file mode 100644
index 0000000..a2be17a
--- /dev/null
+++ b/examples/sample-vault/wiki/decisions/Approval Queue.md
@@ -0,0 +1,19 @@
+---
+type: "decision"
+title: "Approval Queue"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Approval Queue
+
+No action is approved until it has source, confidence, owner, status, and rollback.
+
+## Queue
+
+| Action | Source | Confidence | Owner | Status | Rollback |
+|---|---|---:|---|---|---|
+| Replace this example after source intake | [[Source Manifest Guide]] | low | Daniel Agrici | proposed | Do nothing |
+
+Related: [[Action Roadmap]] | [[Best Practices Kernel]]
diff --git a/examples/sample-vault/wiki/decisions/_index.md b/examples/sample-vault/wiki/decisions/_index.md
new file mode 100644
index 0000000..f5c091d
--- /dev/null
+++ b/examples/sample-vault/wiki/decisions/_index.md
@@ -0,0 +1,23 @@
+---
+type: "hub"
+title: "Decisions Hub"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Decisions Hub
+
+## Parent
+
+- [[Index]]
+- [[Dashboard]]
+
+## Core Links
+
+- [[Hot]]
+- [[Overview]]
+
+## Notes
+
+Add generated notes here and keep this hub linked both ways.
diff --git a/examples/sample-vault/wiki/deliverables/Action Roadmap.md b/examples/sample-vault/wiki/deliverables/Action Roadmap.md
new file mode 100644
index 0000000..a89902f
--- /dev/null
+++ b/examples/sample-vault/wiki/deliverables/Action Roadmap.md
@@ -0,0 +1,17 @@
+---
+type: "deliverable"
+title: "Action Roadmap"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Action Roadmap
+
+## Next 30 Days
+
+- Complete source intake and research refresh.
+- Replace scaffold assumptions with sourced domain notes.
+- Run release lint and package scans.
+
+Related: [[Health Scorecard]] | [[Approval Queue]] | [[Synthesis Workflow]]
diff --git a/examples/sample-vault/wiki/deliverables/Health Scorecard.md b/examples/sample-vault/wiki/deliverables/Health Scorecard.md
new file mode 100644
index 0000000..163de4d
--- /dev/null
+++ b/examples/sample-vault/wiki/deliverables/Health Scorecard.md
@@ -0,0 +1,17 @@
+---
+type: "deliverable"
+title: "Health Scorecard"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Health Scorecard
+
+| Area | Status | Evidence | Confidence |
+|---|---|---|---:|
+| Source provenance | Needs source intake | [[Source Manifest Guide]] | low |
+| Research freshness | Needs refresh | [[Research Refresh Workflow]] | low |
+| Reporting readiness | Draft | [[Weekly Report]] | low |
+
+Related: [[Action Roadmap]] | [[Weekly Report]]
diff --git a/examples/sample-vault/wiki/deliverables/_index.md b/examples/sample-vault/wiki/deliverables/_index.md
new file mode 100644
index 0000000..33bc067
--- /dev/null
+++ b/examples/sample-vault/wiki/deliverables/_index.md
@@ -0,0 +1,23 @@
+---
+type: "hub"
+title: "Deliverables Hub"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Deliverables Hub
+
+## Parent
+
+- [[Index]]
+- [[Dashboard]]
+
+## Core Links
+
+- [[Hot]]
+- [[Overview]]
+
+## Notes
+
+Add generated notes here and keep this hub linked both ways.
diff --git a/examples/sample-vault/wiki/entities/_index.md b/examples/sample-vault/wiki/entities/_index.md
new file mode 100644
index 0000000..d3d607f
--- /dev/null
+++ b/examples/sample-vault/wiki/entities/_index.md
@@ -0,0 +1,23 @@
+---
+type: "hub"
+title: "Entities Hub"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Entities Hub
+
+## Parent
+
+- [[Index]]
+- [[Dashboard]]
+
+## Core Links
+
+- [[Hot]]
+- [[Overview]]
+
+## Notes
+
+Add generated notes here and keep this hub linked both ways.
diff --git a/examples/sample-vault/wiki/experiments/_index.md b/examples/sample-vault/wiki/experiments/_index.md
new file mode 100644
index 0000000..45bde77
--- /dev/null
+++ b/examples/sample-vault/wiki/experiments/_index.md
@@ -0,0 +1,23 @@
+---
+type: "hub"
+title: "Experiments Hub"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Experiments Hub
+
+## Parent
+
+- [[Index]]
+- [[Dashboard]]
+
+## Core Links
+
+- [[Hot]]
+- [[Overview]]
+
+## Notes
+
+Add generated notes here and keep this hub linked both ways.
diff --git a/examples/sample-vault/wiki/flows/Reporting Workflow.md b/examples/sample-vault/wiki/flows/Reporting Workflow.md
new file mode 100644
index 0000000..f18117b
--- /dev/null
+++ b/examples/sample-vault/wiki/flows/Reporting Workflow.md
@@ -0,0 +1,16 @@
+---
+type: "flow"
+title: "Reporting Workflow"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Reporting Workflow
+
+1. Read [[Health Scorecard]] and [[Action Roadmap]].
+2. Confirm every claim points to a source note or raw hash.
+3. Render [[Weekly Report]].
+4. Remove local paths and private data before sharing.
+
+Related: [[Weekly Report]] | [[Approval Queue]]
diff --git a/examples/sample-vault/wiki/flows/Research Refresh Workflow.md b/examples/sample-vault/wiki/flows/Research Refresh Workflow.md
new file mode 100644
index 0000000..1643d07
--- /dev/null
+++ b/examples/sample-vault/wiki/flows/Research Refresh Workflow.md
@@ -0,0 +1,18 @@
+---
+type: "flow"
+title: "Research Refresh Workflow"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Research Refresh Workflow
+
+Refresh cadence: monthly for Google algorithm updates and Search Central policy; before every release for E-E-A-T framing, schema deprecations, and GEO/AEO citation claims; on-changelog for the claude-blog skill.
+
+1. Start with official, primary, vendor, regulator, standards-body, or API docs.
+2. Record URL, retrieval date, version, deprecation/sunset notes, and confidence.
+3. Update `references/current-requirements.md`.
+4. Only then update domain-specific recommendations.
+
+Related: [[Source Intake Workflow]] | [[Source Manifest Guide]] | [[Best Practices Kernel]]
diff --git a/examples/sample-vault/wiki/flows/Source Intake Workflow.md b/examples/sample-vault/wiki/flows/Source Intake Workflow.md
new file mode 100644
index 0000000..fd8b11e
--- /dev/null
+++ b/examples/sample-vault/wiki/flows/Source Intake Workflow.md
@@ -0,0 +1,16 @@
+---
+type: "flow"
+title: "Source Intake Workflow"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Source Intake Workflow
+
+1. Store raw source under `.raw/sources/`.
+2. Record source path, hash, owner, and retrieval date.
+3. Create a note under `wiki/sources/`.
+4. Link affected entities and deliverables.
+
+Related: [[wiki/sources/_index|Sources Hub]] | [[Source Manifest Guide]] | [[Best Practices Kernel]]
diff --git a/examples/sample-vault/wiki/flows/Synthesis Workflow.md b/examples/sample-vault/wiki/flows/Synthesis Workflow.md
new file mode 100644
index 0000000..6755a8d
--- /dev/null
+++ b/examples/sample-vault/wiki/flows/Synthesis Workflow.md
@@ -0,0 +1,16 @@
+---
+type: "flow"
+title: "Synthesis Workflow"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Synthesis Workflow
+
+1. Read source notes and `.raw/.manifest.json`.
+2. Separate facts, interpretation, and recommendations.
+3. Add confidence and failure path to recommendations.
+4. Link recommendations to [[Approval Queue]] and [[Action Roadmap]].
+
+Related: [[Source Intake Workflow]] | [[Health Scorecard]] | [[Best Practices Kernel]]
diff --git a/examples/sample-vault/wiki/flows/_index.md b/examples/sample-vault/wiki/flows/_index.md
new file mode 100644
index 0000000..fb441dc
--- /dev/null
+++ b/examples/sample-vault/wiki/flows/_index.md
@@ -0,0 +1,23 @@
+---
+type: "hub"
+title: "Flows Hub"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Flows Hub
+
+## Parent
+
+- [[Index]]
+- [[Dashboard]]
+
+## Core Links
+
+- [[Hot]]
+- [[Overview]]
+
+## Notes
+
+Add generated notes here and keep this hub linked both ways.
diff --git a/examples/sample-vault/wiki/gaps/_index.md b/examples/sample-vault/wiki/gaps/_index.md
new file mode 100644
index 0000000..8012d90
--- /dev/null
+++ b/examples/sample-vault/wiki/gaps/_index.md
@@ -0,0 +1,23 @@
+---
+type: "hub"
+title: "Gaps Hub"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Gaps Hub
+
+## Parent
+
+- [[Index]]
+- [[Dashboard]]
+
+## Core Links
+
+- [[Hot]]
+- [[Overview]]
+
+## Notes
+
+Add generated notes here and keep this hub linked both ways.
diff --git a/examples/sample-vault/wiki/hot.md b/examples/sample-vault/wiki/hot.md
new file mode 100644
index 0000000..67472d5
--- /dev/null
+++ b/examples/sample-vault/wiki/hot.md
@@ -0,0 +1,23 @@
+---
+type: "hot"
+title: "Hot"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Hot
+
+## Current State
+
+Claude Blog Brain template is scaffolded for blog content creation, optimization, and management dual-optimized for Google rankings (E-E-A-T, the 2026 core updates) and AI citations (GEO/AEO), spanning writing, rewriting and freshness, SERP-informed briefs and outlines, editorial calendars and strategy, semantic topic clusters, schema and internal linking, multilingual publishing, the FLOW framework, factchecking, personas, distribution, and the blog delivery contract, grounded in the claude-blog skill.
+
+## Next Action
+
+Open [[Start Here]], then review [[Source Intake Workflow]] and [[Research Refresh Workflow]].
+
+## Related
+
+- [[Index]]
+- [[Dashboard]]
+- [[Log]]
diff --git a/examples/sample-vault/wiki/index.md b/examples/sample-vault/wiki/index.md
new file mode 100644
index 0000000..fdce218
--- /dev/null
+++ b/examples/sample-vault/wiki/index.md
@@ -0,0 +1,49 @@
+---
+type: "index"
+title: "Index"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Index
+
+## Start
+
+- [[Hot]]
+- [[Overview]]
+- [[Log]]
+- [[Start Here]]
+- [[Dashboard]]
+- [[Onboarding Canvas.canvas|Onboarding Canvas]]
+- [[Best Practices Kernel]]
+
+## Core Workflows
+
+- [[Source Intake Workflow]]
+- [[Research Refresh Workflow]]
+- [[Synthesis Workflow]]
+- [[Reporting Workflow]]
+
+## Deliverables
+
+- [[Health Scorecard]]
+- [[Action Roadmap]]
+- [[Weekly Report]]
+- [[Approval Queue]]
+
+## Hubs
+
+- [[wiki/accounts/_index|Accounts Hub]]
+- [[wiki/platforms/_index|Platforms Hub]]
+- [[wiki/flows/_index|Flows Hub]]
+- [[wiki/sources/_index|Sources Hub]]
+- [[wiki/concepts/_index|Concepts Hub]]
+- [[wiki/entities/_index|Entities Hub]]
+- [[wiki/decisions/_index|Decisions Hub]]
+- [[wiki/deliverables/_index|Deliverables Hub]]
+- [[wiki/reports/_index|Reports Hub]]
+- [[wiki/experiments/_index|Experiments Hub]]
+- [[wiki/canvases/_index|Canvases Hub]]
+- [[wiki/questions/_index|Questions Hub]]
+- [[wiki/gaps/_index|Gaps Hub]]
diff --git a/examples/sample-vault/wiki/log.md b/examples/sample-vault/wiki/log.md
new file mode 100644
index 0000000..32e723e
--- /dev/null
+++ b/examples/sample-vault/wiki/log.md
@@ -0,0 +1,13 @@
+---
+type: "log"
+title: "Log"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Log
+
+Related: [[Hot]] | [[Index]] | [[Dashboard]]
+
+- 2026-05-16 - Claude Blog Brain scaffolded.
diff --git a/examples/sample-vault/wiki/meta/Start Here.md b/examples/sample-vault/wiki/meta/Start Here.md
new file mode 100644
index 0000000..0d79e6d
--- /dev/null
+++ b/examples/sample-vault/wiki/meta/Start Here.md
@@ -0,0 +1,20 @@
+---
+type: "meta"
+title: "Start Here"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Start Here
+
+![[brain-relationship-map.svg]]
+
+1. Read [[Hot]].
+2. Open [[Dashboard]].
+3. Review [[Source Intake Workflow]].
+4. Review [[Research Refresh Workflow]].
+5. Add sources to `.raw/`.
+6. Run synthesis only after source quality is clear.
+
+Related: [[Index]] | [[Best Practices Kernel]]
diff --git a/examples/sample-vault/wiki/meta/dashboard.md b/examples/sample-vault/wiki/meta/dashboard.md
new file mode 100644
index 0000000..61a2c3f
--- /dev/null
+++ b/examples/sample-vault/wiki/meta/dashboard.md
@@ -0,0 +1,23 @@
+---
+type: "dashboard"
+title: "Dashboard"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Dashboard
+
+## Visual Map
+
+![[brain-relationship-map.svg]]
+
+## Operating Links
+
+- [[Source Intake Workflow]]
+- [[Research Refresh Workflow]]
+- [[Synthesis Workflow]]
+- [[Reporting Workflow]]
+- [[Approval Queue]]
+- [[Health Scorecard]]
+- [[Action Roadmap]]
diff --git a/examples/sample-vault/wiki/overview.md b/examples/sample-vault/wiki/overview.md
new file mode 100644
index 0000000..549946c
--- /dev/null
+++ b/examples/sample-vault/wiki/overview.md
@@ -0,0 +1,23 @@
+---
+type: "overview"
+title: "Overview"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Overview
+
+Claude Blog Brain is a persistent operating brain for blog content creation, optimization, and management dual-optimized for Google rankings (E-E-A-T, the 2026 core updates) and AI citations (GEO/AEO), spanning writing, rewriting and freshness, SERP-informed briefs and outlines, editorial calendars and strategy, semantic topic clusters, schema and internal linking, multilingual publishing, the FLOW framework, factchecking, personas, distribution, and the blog delivery contract, grounded in the claude-blog skill.
+
+![[brain-relationship-map.svg]]
+
+## Buyer
+
+Content teams, bloggers, SEO content strategists, and operators who run the claude-blog skill and need a persistent, source-cited operating system for writing, optimizing, and auditing blog content that ranks on Google and gets cited by AI assistants.
+
+## Related
+
+- [[Index]]
+- [[Dashboard]]
+- [[Best Practices Kernel]]
diff --git a/examples/sample-vault/wiki/platforms/_index.md b/examples/sample-vault/wiki/platforms/_index.md
new file mode 100644
index 0000000..d0d0188
--- /dev/null
+++ b/examples/sample-vault/wiki/platforms/_index.md
@@ -0,0 +1,23 @@
+---
+type: "hub"
+title: "Platforms Hub"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Platforms Hub
+
+## Parent
+
+- [[Index]]
+- [[Dashboard]]
+
+## Core Links
+
+- [[Hot]]
+- [[Overview]]
+
+## Notes
+
+Add generated notes here and keep this hub linked both ways.
diff --git a/examples/sample-vault/wiki/questions/_index.md b/examples/sample-vault/wiki/questions/_index.md
new file mode 100644
index 0000000..c37e5c8
--- /dev/null
+++ b/examples/sample-vault/wiki/questions/_index.md
@@ -0,0 +1,23 @@
+---
+type: "hub"
+title: "Questions Hub"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Questions Hub
+
+## Parent
+
+- [[Index]]
+- [[Dashboard]]
+
+## Core Links
+
+- [[Hot]]
+- [[Overview]]
+
+## Notes
+
+Add generated notes here and keep this hub linked both ways.
diff --git a/examples/sample-vault/wiki/reports/Weekly Report.md b/examples/sample-vault/wiki/reports/Weekly Report.md
new file mode 100644
index 0000000..12fd202
--- /dev/null
+++ b/examples/sample-vault/wiki/reports/Weekly Report.md
@@ -0,0 +1,21 @@
+---
+type: "report"
+title: "Weekly Report"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Weekly Report
+
+## Summary
+
+This report is a scaffold until source intake and research refresh are complete.
+
+## Evidence
+
+- [[Source Manifest Guide]]
+- [[Health Scorecard]]
+- [[Action Roadmap]]
+
+Related: [[Reporting Workflow]] | [[Approval Queue]]
diff --git a/examples/sample-vault/wiki/reports/_index.md b/examples/sample-vault/wiki/reports/_index.md
new file mode 100644
index 0000000..b1dce60
--- /dev/null
+++ b/examples/sample-vault/wiki/reports/_index.md
@@ -0,0 +1,23 @@
+---
+type: "hub"
+title: "Reports Hub"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Reports Hub
+
+## Parent
+
+- [[Index]]
+- [[Dashboard]]
+
+## Core Links
+
+- [[Hot]]
+- [[Overview]]
+
+## Notes
+
+Add generated notes here and keep this hub linked both ways.
diff --git a/examples/sample-vault/wiki/sources/Source Manifest Guide.md b/examples/sample-vault/wiki/sources/Source Manifest Guide.md
new file mode 100644
index 0000000..2d96b03
--- /dev/null
+++ b/examples/sample-vault/wiki/sources/Source Manifest Guide.md
@@ -0,0 +1,20 @@
+---
+type: "source"
+title: "Source Manifest Guide"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Source Manifest Guide
+
+Every raw source must have:
+
+- path
+- sha256
+- retrieved date
+- source type
+- owner
+- notes about what it proves and does not prove
+
+Related: [[wiki/sources/_index|Sources Hub]] | [[Source Intake Workflow]]
diff --git a/examples/sample-vault/wiki/sources/_index.md b/examples/sample-vault/wiki/sources/_index.md
new file mode 100644
index 0000000..0a16923
--- /dev/null
+++ b/examples/sample-vault/wiki/sources/_index.md
@@ -0,0 +1,23 @@
+---
+type: "hub"
+title: "Sources Hub"
+created: "2026-05-16"
+updated: "2026-05-16"
+status: "active"
+---
+
+# Sources Hub
+
+## Parent
+
+- [[Index]]
+- [[Dashboard]]
+
+## Core Links
+
+- [[Hot]]
+- [[Overview]]
+
+## Notes
+
+Add generated notes here and keep this hub linked both ways.
diff --git a/install.sh b/install.sh
new file mode 100755
index 0000000..8dc68d2
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,109 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+usage() {
+ cat <<'USAGE'
+Usage: ./install.sh [--target codex|claude|agents|gemini|openclaw|portable|custom|all] [--path DIR]
+
+Installs the Claude Blog Brain skill surface.
+Use --target custom --path <agent-skill-root> for Hermes or another runtime
+when its official skill root is known.
+Set CLAUDE_BLOG_BRAIN_INSTALL_HOME to test against a temporary home directory.
+USAGE
+}
+
+target="codex"
+custom_path=""
+while [ "$#" -gt 0 ]; do
+ case "$1" in
+ --target) target="${2:?}"; shift 2 ;;
+ --path) custom_path="${2:?}"; shift 2 ;;
+ -h|--help) usage; exit 0 ;;
+ *) echo "ERROR: unknown argument: $1" >&2; usage >&2; exit 2 ;;
+ esac
+done
+
+case "${target}" in codex|claude|agents|gemini|openclaw|portable|custom|all) ;; *) echo "ERROR: invalid target" >&2; exit 2 ;; esac
+if [ "${target}" = "custom" ] && [ -z "${custom_path}" ]; then
+ echo "ERROR: --target custom requires --path" >&2
+ exit 2
+fi
+
+source_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+base_home="${CLAUDE_BLOG_BRAIN_INSTALL_HOME:-${HOME}}"
+
+target_dir() {
+ case "$1" in
+ codex) echo "${base_home}/.codex/skills/claude-blog-brain" ;;
+ claude) echo "${base_home}/.claude/skills/claude-blog-brain" ;;
+ agents) echo "${base_home}/.agents/skills/claude-blog-brain" ;;
+ openclaw) echo "${base_home}/.openclaw/skills/claude-blog-brain" ;;
+ portable) echo "${base_home}/.agent-skills/claude-blog-brain" ;;
+ custom) echo "${custom_path%/}/claude-blog-brain" ;;
+ esac
+}
+
+copy_tree() {
+ local src="$1" dest="$2"
+ mkdir -p "${dest}"
+ (cd "${src}" && find . -type f ! -path '*/__pycache__/*' ! -name '*.pyc' -print0 | while IFS= read -r -d '' file; do
+ mkdir -p "${dest}/$(dirname "${file}")"
+ cp "${file}" "${dest}/${file}"
+ done)
+}
+
+install_one() {
+ local dest="$1"
+ rm -rf "${dest}"
+ mkdir -p "${dest}"
+ for file in SKILL.md AGENTS.md CLAUDE.md GEMINI.md README.md LICENSE CHANGELOG.md RELEASE_CHECKLIST.md; do
+ if [ -f "${source_dir}/${file}" ]; then
+ cp "${source_dir}/${file}" "${dest}/${file}"
+ fi
+ done
+ copy_tree "${source_dir}/scripts" "${dest}/scripts"
+ copy_tree "${source_dir}/assets/template-brain" "${dest}/assets/template-brain"
+ copy_tree "${source_dir}/references" "${dest}/references"
+ copy_tree "${source_dir}/docs" "${dest}/docs"
+ chmod -R go-rwx "${dest}"
+ echo "Claude Blog Brain installed to ${dest}"
+}
+
+install_gemini() {
+ local dest="${base_home}/.gemini/claude-blog-brain"
+ local loader="${base_home}/.gemini/GEMINI.md"
+ install_one "${dest}"
+ mkdir -p "$(dirname "${loader}")"
+ python - "${loader}" "@./claude-blog-brain/GEMINI.md" <<'PY'
+from __future__ import annotations
+
+import re
+import sys
+from pathlib import Path
+
+path = Path(sys.argv[1])
+import_line = sys.argv[2]
+start = "<!-- claude-blog-brain-install:start -->"
+end = "<!-- claude-blog-brain-install:end -->"
+block = f"{start}\n{import_line}\n{end}"
+text = path.read_text(encoding="utf-8") if path.exists() else ""
+pattern = f"{re.escape(start)}.*?{re.escape(end)}"
+if re.search(pattern, text, flags=re.S):
+ text = re.sub(pattern, block, text, flags=re.S)
+else:
+ text = (text.rstrip() + "\n\n" + block + "\n").lstrip()
+path.write_text(text, encoding="utf-8")
+PY
+ echo "Claude Blog Brain Gemini loader updated at ${loader}"
+}
+
+if [ "${target}" = "all" ]; then
+ for name in codex claude agents openclaw portable; do
+ install_one "$(target_dir "${name}")"
+ done
+ install_gemini
+elif [ "${target}" = "gemini" ]; then
+ install_gemini
+else
+ install_one "$(target_dir "${target}")"
+fi
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000..dbbc472
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,19 @@
+[build-system]
+requires = ["setuptools>=69", "wheel"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "claude-blog-brain"
+version = "0.1.0"
+description = "Claude Blog Brain Obsidian brain template and script layer."
+readme = "README.md"
+requires-python = ">=3.11"
+license = {text = "Custom license"}
+authors = [{name = "Daniel Agrici"}]
+dependencies = []
+
+[project.scripts]
+claude-blog-brain = "claude_blog_brain.cli:main"
+
+[tool.setuptools]
+packages = ["claude_blog_brain"]
diff --git a/references/adapter-manifest.json b/references/adapter-manifest.json
new file mode 100644
index 0000000..601b269
--- /dev/null
+++ b/references/adapter-manifest.json
@@ -0,0 +1,24 @@
+{
+ "version": 1,
+ "status": "scaffold",
+ "domain": "blog content creation, optimization, and management dual-optimized for Google rankings (E-E-A-T, the 2026 core updates) and AI citations (GEO/AEO), spanning writing, rewriting and freshness, SERP-informed briefs and outlines, editorial calendars and strategy, semantic topic clusters, schema and internal linking, multilingual publishing, the FLOW framework, factchecking, personas, distribution, and the blog delivery contract, grounded in the claude-blog skill",
+ "generic_only": true,
+ "raw_input_types": [
+ "claude-blog skill v1.10.0 SKILL.md, 30 sub-skills, 5 agents, 21 references, 12 templates, and analysis scripts; Google Search Central docs; web.dev CWV; FLOW framework bibliography; GEO/AEO studies; content-marketing and copywriting research"
+ ],
+ "rules": {
+ "domain_adapted_requires": [
+ "one real domain importer or ingestion path",
+ "one domain-specific synthesis module",
+ "one report renderer",
+ "one fixture per supported input type",
+ "tests for importer, synthesis, rendering, malformed input, and missing credentials"
+ ]
+ },
+ "input_schemas": [],
+ "importers": [],
+ "synthesis_modules": [],
+ "report_renderers": [],
+ "fixtures": [],
+ "tests": []
+}
diff --git a/references/adapter-plan.md b/references/adapter-plan.md
new file mode 100644
index 0000000..bde8eee
--- /dev/null
+++ b/references/adapter-plan.md
@@ -0,0 +1,29 @@
+# Claude Blog Brain Adapter Plan
+
+Status: required before domain-adapted maturity.
+
+## Raw Input Types
+
+- claude-blog skill v1.10.0 SKILL.md, 30 sub-skills, 5 agents, 21 references, 12 templates, and analysis scripts; Google Search Central docs; web.dev CWV; FLOW framework bibliography; GEO/AEO studies; content-marketing and copywriting research
+
+## Required Implementation
+
+- Define one schema per raw input type.
+- Build at least one real domain importer or ingestion path.
+- Build one domain-specific synthesis module.
+- Build one report renderer with source citations.
+- Add sanitized fixtures and tests for every supported input type.
+
+## Safety Refusals
+
+- No ranking or traffic guarantee; content outcomes are probabilistic and never certain
+- No credentials, tokens, API keys, or private client content in repo artifacts
+- No mutation of a CMS, GSC, GA4, or publishing platform; the brain is advisory and read-only
+- No recommendation without a dated source, confidence level, and rollback note
+- No deprecated advice (HowTo schema, retired FAQ rich results, FID) presented as current
+- No fabricated or unsourced statistics and no AI-detectable filler presented as fact
+
+## Completion Gate
+
+This plan is complete only when domain-specific importer, synthesis, report,
+fixtures, and tests replace the generic scaffold.
diff --git a/references/current-requirements.md b/references/current-requirements.md
new file mode 100644
index 0000000..5ccba56
--- /dev/null
+++ b/references/current-requirements.md
@@ -0,0 +1,19 @@
+# Current Requirements
+
+Status: research required before market-ready release.
+
+## Refresh Cadence
+
+monthly for Google algorithm updates and Search Central policy; before every release for E-E-A-T framing, schema deprecations, and GEO/AEO citation claims; on-changelog for the claude-blog skill
+
+## Required Source Standard
+
+Use official, primary, vendor, standards-body, regulator, or API documentation
+first. Record URL, retrieval date, version, deprecation or sunset notes, and
+confidence.
+
+## Source Log
+
+| Source | URL | Retrieved | Version | Confidence | Notes |
+|---|---|---:|---|---|---|
+| Add official source before release | TBD | TBD | TBD | low | Release blocked until replaced |
diff --git a/references/market-research.md b/references/market-research.md
new file mode 100644
index 0000000..444f52d
--- /dev/null
+++ b/references/market-research.md
@@ -0,0 +1,21 @@
+# Market Research
+
+Status: research required before market-ready release.
+
+## Buyer Hypothesis
+
+Content teams, bloggers, SEO content strategists, and operators who run the claude-blog skill and need a persistent, source-cited operating system for writing, optimizing, and auditing blog content that ranks on Google and gets cited by AI assistants.
+
+## Demand Questions
+
+- Who pays for this workflow?
+- What raw materials do they already have?
+- What output saves time or reduces risk?
+- What would they screenshot in a sales page?
+- What weekly or monthly loop brings them back?
+
+## Evidence Log
+
+| Evidence | Source | Retrieved | Confidence | Notes |
+|---|---|---:|---|---|
+| Add market evidence before release | TBD | TBD | low | Release blocked until replaced |
diff --git a/references/product-spec.md b/references/product-spec.md
new file mode 100644
index 0000000..e8ba1f3
--- /dev/null
+++ b/references/product-spec.md
@@ -0,0 +1,47 @@
+# Claude Blog Brain Product Spec
+
+## Buyer
+
+Content teams, bloggers, SEO content strategists, and operators who run the claude-blog skill and need a persistent, source-cited operating system for writing, optimizing, and auditing blog content that ranks on Google and gets cited by AI assistants.
+
+## Domain
+
+blog content creation, optimization, and management dual-optimized for Google rankings (E-E-A-T, the 2026 core updates) and AI citations (GEO/AEO), spanning writing, rewriting and freshness, SERP-informed briefs and outlines, editorial calendars and strategy, semantic topic clusters, schema and internal linking, multilingual publishing, the FLOW framework, factchecking, personas, distribution, and the blog delivery contract, grounded in the claude-blog skill
+
+## Core Workflows
+
+- Source intake and provenance capture from the claude-blog skill and official docs
+- Answer-first article writing and rewriting via the 6-pillar dual-optimization framework
+- SERP-informed brief and outline construction with heading hierarchy
+- Semantic topic-cluster planning and hub-and-spoke execution
+- Schema stack, internal linking, and GEO/AEO citation-readiness review
+- 5-category quality scoring and the blog delivery-contract gate
+- Multilingual publishing, translation, and localization review
+- Approval queue for content recommendations with rollback notes
+- Auto brain fill and update from the Google algorithm-update ledger
+
+## Deliverables
+
+- Blog quality score (5-category 100-point) synthesis playbook
+- SERP-informed content brief and outline
+- Semantic topic-cluster map with internal-link matrix
+- GEO and AI-citation readiness register
+- Schema stack and internal-linking reference library
+- Editorial calendar and content-strategy plan
+- Blog delivery-contract gate report
+- Approval queue for recommendations
+- Google algorithm-update memory and refresh log
+
+## Promise
+
+Turn raw sources and recurring decisions into a persistent, source-cited
+operating brain.
+
+## Non-Promises
+
+- No ranking or traffic guarantee; content outcomes are probabilistic and never certain
+- No credentials, tokens, API keys, or private client content in repo artifacts
+- No mutation of a CMS, GSC, GA4, or publishing platform; the brain is advisory and read-only
+- No recommendation without a dated source, confidence level, and rollback note
+- No deprecated advice (HowTo schema, retired FAQ rich results, FID) presented as current
+- No fabricated or unsourced statistics and no AI-detectable filler presented as fact
diff --git a/references/research-plan.md b/references/research-plan.md
new file mode 100644
index 0000000..c500a62
--- /dev/null
+++ b/references/research-plan.md
@@ -0,0 +1,39 @@
+# Claude Blog Brain Research Plan
+
+Status: required before researched or market-ready maturity.
+
+## Source Targets
+
+- Official product, platform, API, vendor, regulator, or standards-body docs for blog content creation, optimization, and management dual-optimized for Google rankings (E-E-A-T, the 2026 core updates) and AI citations (GEO/AEO), spanning writing, rewriting and freshness, SERP-informed briefs and outlines, editorial calendars and strategy, semantic topic clusters, schema and internal linking, multilingual publishing, the FLOW framework, factchecking, personas, distribution, and the blog delivery contract, grounded in the claude-blog skill.
+- Primary datasets or exports the buyer already controls.
+- Dated practitioner sources only as supporting evidence.
+- Market evidence for buyer pain, recurring workflows, and paid demand.
+
+## Buyer Questions
+
+- Who pays for this brain?
+- What raw materials do they already have?
+- What output saves time or reduces risk?
+- What weekly or monthly workflow brings them back?
+- What should the brain refuse to do?
+
+## Official-Source Checklist
+
+- [ ] Source URL recorded.
+- [ ] Retrieval date recorded.
+- [ ] Version, API version, or policy date recorded when available.
+- [ ] Sunset/deprecation notes recorded when available.
+- [ ] Confidence level assigned.
+- [ ] Contradictions or gaps recorded.
+
+## Safety Questions
+
+- Stale Google algorithm, E-E-A-T, or schema-deprecation requirements presented as current
+- Fabricated, unsourced, or AI-slop statistics written into published content
+- Private client content, draft URLs, or credentials leaking into raw inputs or reports
+- Overconfident content recommendations from thin or single-source inputs
+- Generated reports leaking local filesystem paths
+
+## Completion Gate
+
+Replace this plan with dated source evidence before calling this brain researched.
diff --git a/references/safety-gates.md b/references/safety-gates.md
new file mode 100644
index 0000000..5de5ee7
--- /dev/null
+++ b/references/safety-gates.md
@@ -0,0 +1,29 @@
+# Safety Gates
+
+V1 is read-only and advisory unless a future release explicitly adds approved,
+reversible mutation.
+
+## Refusal Rules
+
+- No ranking or traffic guarantee; content outcomes are probabilistic and never certain
+- No credentials, tokens, API keys, or private client content in repo artifacts
+- No mutation of a CMS, GSC, GA4, or publishing platform; the brain is advisory and read-only
+- No recommendation without a dated source, confidence level, and rollback note
+- No deprecated advice (HowTo schema, retired FAQ rich results, FID) presented as current
+- No fabricated or unsourced statistics and no AI-detectable filler presented as fact
+
+## Safety Risks
+
+- Stale Google algorithm, E-E-A-T, or schema-deprecation requirements presented as current
+- Fabricated, unsourced, or AI-slop statistics written into published content
+- Private client content, draft URLs, or credentials leaking into raw inputs or reports
+- Overconfident content recommendations from thin or single-source inputs
+- Generated reports leaking local filesystem paths
+
+## Release-Blocking Gates
+
+- Current trustworthy sources are missing.
+- Raw source provenance is missing.
+- Deliverables contain unsupported claims.
+- Credentials or private client data are present.
+- A mutation path exists without approval and rollback.
diff --git a/references/source-ledger.json b/references/source-ledger.json
new file mode 100644
index 0000000..2fa1ec3
--- /dev/null
+++ b/references/source-ledger.json
@@ -0,0 +1,26 @@
+{
+ "version": 1,
+ "status": "scaffold",
+ "domain": "blog content creation, optimization, and management dual-optimized for Google rankings (E-E-A-T, the 2026 core updates) and AI citations (GEO/AEO), spanning writing, rewriting and freshness, SERP-informed briefs and outlines, editorial calendars and strategy, semantic topic clusters, schema and internal linking, multilingual publishing, the FLOW framework, factchecking, personas, distribution, and the blog delivery contract, grounded in the claude-blog skill",
+ "refresh_cadence": "monthly for Google algorithm updates and Search Central policy; before every release for E-E-A-T framing, schema deprecations, and GEO/AEO citation claims; on-changelog for the claude-blog skill",
+ "rules": {
+ "researched_requires": [
+ "at least two captured sources for fast-moving or high-stakes domains",
+ "at least one official/primary source for lower-risk domains",
+ "retrieved dates, refresh_due dates, source_type, confidence, and claim coverage",
+ "no placeholder/example URLs"
+ ],
+ "accepted_primary_types": [
+ "official",
+ "primary",
+ "vendor",
+ "regulator",
+ "government",
+ "standards",
+ "standards-body",
+ "authority",
+ "api-docs"
+ ]
+ },
+ "sources": []
+}
diff --git a/references/source-manifest-template.md b/references/source-manifest-template.md
new file mode 100644
index 0000000..6acc6e4
--- /dev/null
+++ b/references/source-manifest-template.md
@@ -0,0 +1,17 @@
+# Source Manifest Template
+
+```json
+{
+ "brain_schema": "claude-blog-brain.v1",
+ "sources": [
+ {
+ "path": ".raw/sources/example.csv",
+ "sha256": "<sha256>",
+ "retrieved": "YYYY-MM-DD",
+ "source_type": "manual-export",
+ "owner": "Daniel Agrici",
+ "notes": "What this source proves and what it does not prove."
+ }
+ ]
+}
+```
diff --git a/references/source-map.md b/references/source-map.md
new file mode 100644
index 0000000..1d6a9ec
--- /dev/null
+++ b/references/source-map.md
@@ -0,0 +1,22 @@
+# Source Map
+
+## Raw Sources
+
+- claude-blog skill v1.10.0 SKILL.md, 30 sub-skills, 5 agents, 21 references, 12 templates, and analysis scripts; Google Search Central docs; web.dev CWV; FLOW framework bibliography; GEO/AEO studies; content-marketing and copywriting research
+
+## Enrichment Sources
+
+- Official Google Search Central, web.dev, and Schema.org documentation
+- Primary-source-verified Google algorithm-update ledger (data/google-updates.json)
+- Quality Rater Guidelines (E-E-A-T, YMYL, scaled-content abuse) and the Search Essentials / spam policies
+- FLOW framework (github.com/AgriciDaniel/flow) and its cited studies
+- GEO/AEO and AI-search studies (AI Overviews coverage and CTR, AI Mode behavior, passage-level citability)
+
+## Import Strategy
+
+- Copy raw source files into `.raw/sources/`.
+- Record path, hash, retrieval date, owner, and source type.
+- Record external research sources in `references/source-ledger.json`.
+- Record implemented schemas and adapters in `references/adapter-manifest.json`.
+- Create a source note under `wiki/sources/`.
+- Link affected entities, workflows, and deliverables.
diff --git a/scripts/audit_brain.py b/scripts/audit_brain.py
new file mode 100755
index 0000000..0466e56
--- /dev/null
+++ b/scripts/audit_brain.py
@@ -0,0 +1,388 @@
+#!/usr/bin/env python3
+from __future__ import annotations
+
+import argparse
+import json
+import re
+from datetime import date
+from pathlib import Path
+from typing import Any
+from urllib.parse import urlparse
+
+
+REPO = Path(__file__).resolve().parent.parent
+RESEARCH_FILES = [
+ "references/current-requirements.md",
+ "references/market-research.md",
+ "references/source-map.md",
+ "references/safety-gates.md",
+]
+SOURCE_PACK_FILES = [
+ "references/product-spec.md",
+ "references/source-map.md",
+ "references/current-requirements.md",
+ "references/market-research.md",
+ "references/safety-gates.md",
+ "references/source-manifest-template.md",
+ "references/research-plan.md",
+ "references/adapter-plan.md",
+ "references/source-ledger.json",
+ "references/adapter-manifest.json",
+]
+PLACEHOLDER_PATTERNS = [
+ re.compile(r"\bTBD\b", re.I),
+ re.compile(r"research required", re.I),
+ re.compile(r"release blocked", re.I),
+ re.compile(r"add .* before release", re.I),
+ re.compile(r"replace this example", re.I),
+]
+HIGH_STAKES_TERMS = {
+ "accounting",
+ "tax",
+ "legal",
+ "medical",
+ "health",
+ "finance",
+ "financial",
+ "compliance",
+ "payroll",
+ "security",
+ "insurance",
+ "investment",
+}
+FAST_MOVING_TERMS = {
+ "ads",
+ "advertising",
+ "api",
+ "platform",
+ "social",
+ "youtube",
+ "tiktok",
+ "meta",
+ "google",
+ "linkedin",
+ "ai",
+}
+PRIMARY_SOURCE_TYPES = {
+ "official",
+ "primary",
+ "vendor",
+ "regulator",
+ "government",
+ "standards",
+ "standards-body",
+ "authority",
+ "api-docs",
+}
+DISALLOWED_SOURCE_HOSTS = {
+ "example.com",
+ "www.example.com",
+ "example.org",
+ "www.example.org",
+ "example.net",
+ "www.example.net",
+ "localhost",
+ "127.0.0.1",
+ "0.0.0.0",
+}
+MATURITY_SCORE_CAP = {
+ "scaffolded": 59,
+ "researched": 74,
+ "domain-adapted": 84,
+ "demo-verified": 89,
+ "market-ready": 100,
+}
+MATURITY_ORDER = ["scaffolded", "researched", "domain-adapted", "demo-verified", "market-ready"]
+
+
+def main(argv: list[str] | None = None) -> int:
+ parser = argparse.ArgumentParser(description="Audit Claude Blog Brain maturity gates.")
+ parser.add_argument("--json", action="store_true")
+ parser.add_argument("--require", choices=MATURITY_ORDER)
+ parser.add_argument("--report-only", action="store_true")
+ args = parser.parse_args(argv)
+
+ result = audit_repo()
+ if args.json:
+ print(json.dumps(result, indent=2, sort_keys=True))
+ else:
+ print(f"Status: {result['status']}")
+ print(f"Score: {result['score']}")
+ for failure in result["critical_failures"]:
+ print(f"CRITICAL: {failure}")
+ for warning in result["warnings"]:
+ print(f"WARNING: {warning}")
+
+ if args.require and MATURITY_ORDER.index(result["status"]) < MATURITY_ORDER.index(args.require):
+ print(f"ERROR: required maturity {args.require}, got {result['status']}", file=__import__("sys").stderr)
+ return 1
+ if args.report_only:
+ return 0
+ return 1 if result["critical_failures"] else 0
+
+
+def audit_repo() -> dict[str, Any]:
+ categories: dict[str, dict[str, Any]] = {}
+ critical: list[str] = []
+ warnings: list[str] = []
+
+ add_category(categories, "product_clarity", *check_product_clarity())
+ add_category(categories, "source_pack", *check_source_pack())
+ research_ok, research_score, research_notes, research_critical = check_research()
+ add_category(categories, "current_research", research_ok, research_score, research_notes)
+ critical.extend(research_critical)
+ adapter_ok, adapter_score, adapter_notes, adapter_critical = check_adapters()
+ add_category(categories, "domain_adapters", adapter_ok, adapter_score, adapter_notes)
+ critical.extend(adapter_critical)
+ citation_ok, citation_score, citation_notes, citation_critical = check_citations()
+ add_category(categories, "source_citation", citation_ok, citation_score, citation_notes)
+ critical.extend(citation_critical)
+ add_category(categories, "demo_determinism", *check_paths(["examples/sample-vault/CODEX.md", "examples/sample-vault/.raw/.manifest.json", "examples/sample-vault/wiki/hot.md", "examples/sample-vault/wiki/reports/Weekly Report.md"]))
+ add_category(categories, "tests", *check_paths(["tests/test_pipeline.py", ".github/workflows/ci.yml"]))
+ add_category(categories, "packaging", *check_packaging())
+ add_category(categories, "installability", *check_paths(["install.sh", "uninstall.sh", "pyproject.toml"]))
+ add_category(categories, "docs", *check_paths(["README.md", "docs/OPERATOR_KIT.md", "docs/PRODUCT_BOUNDARIES.md", "RELEASE_CHECKLIST.md"]))
+ add_category(categories, "obsidian_vault_quality", *check_paths(["assets/template-brain/CODEX.md", "assets/template-brain/.raw/.manifest.json", "assets/template-brain/wiki/hot.md", "assets/template-brain/wiki/index.md", "assets/template-brain/wiki/overview.md", "assets/template-brain/wiki/log.md", "assets/template-brain/wiki/meta/dashboard.md", "assets/template-brain/wiki/canvases/Onboarding Canvas.canvas"]))
+
+ for name, category in categories.items():
+ if not category["ok"]:
+ warnings.append(f"{name}: " + "; ".join(category["notes"][:3]))
+
+ raw_score = round(sum(category["score"] for category in categories.values()) / len(categories))
+ status = determine_status(categories, raw_score, critical)
+ score = min(raw_score, MATURITY_SCORE_CAP[status])
+ return {
+ "status": status,
+ "score": score,
+ "market_ready": status == "market-ready",
+ "critical_failures": critical,
+ "warnings": warnings,
+ "categories": categories,
+ }
+
+
+def add_category(categories: dict[str, dict[str, Any]], name: str, ok: bool, score: int, notes: list[str]) -> None:
+ categories[name] = {"ok": ok, "score": max(0, min(100, score)), "notes": notes}
+
+
+def check_product_clarity() -> tuple[bool, int, list[str]]:
+ text = (read(REPO / "README.md") + "\n" + read(REPO / "SKILL.md")).lower()
+ required = ["buyer", "outputs", "boundaries", "quick start", "maturity"]
+ notes = [f"missing {term} language" for term in required if term not in text]
+ return not notes, 100 - 15 * len(notes), notes
+
+
+def check_source_pack() -> tuple[bool, int, list[str]]:
+ missing = [rel for rel in SOURCE_PACK_FILES if not (REPO / rel).exists()]
+ return not missing, 100 - 12 * len(missing), [f"missing {rel}" for rel in missing]
+
+
+def check_research() -> tuple[bool, int, list[str], list[str]]:
+ notes: list[str] = []
+ critical: list[str] = []
+ score = 100
+ context = read(REPO / "references" / "product-spec.md") + "\n" + read(REPO / "README.md")
+ requires_fresh = contains_any(context, HIGH_STAKES_TERMS) or contains_any(context, FAST_MOVING_TERMS)
+
+ for rel in RESEARCH_FILES:
+ path = REPO / rel
+ if not path.exists():
+ notes.append(f"missing {rel}")
+ critical.append(f"missing research file: {rel}")
+ score -= 25
+ continue
+ text = path.read_text(encoding="utf-8", errors="replace")
+ if any(pattern.search(text) for pattern in PLACEHOLDER_PATTERNS):
+ notes.append(f"placeholder research remains in {rel}")
+ critical.append(f"placeholder research remains: {rel}")
+ score -= 20
+ if rel.endswith("current-requirements.md") and not re.search(r"\b20\d\d-\d\d-\d\d\b", text):
+ notes.append(f"missing retrieval dates in {rel}")
+ score -= 10
+
+ ledger_ok, ledger_score, ledger_notes, ledger_critical = check_source_ledger(requires_fresh=requires_fresh)
+ notes.extend(ledger_notes)
+ critical.extend(ledger_critical)
+ return not critical and ledger_ok, max(0, min(score, ledger_score)), notes, critical
+
+
+def check_source_ledger(*, requires_fresh: bool) -> tuple[bool, int, list[str], list[str]]:
+ path = REPO / "references" / "source-ledger.json"
+ notes: list[str] = []
+ critical: list[str] = []
+ data, errors = load_json_object(path)
+ if errors:
+ critical.extend(f"invalid source-ledger.json: {error}" for error in errors)
+ return False, 0, notes, critical
+ sources = data.get("sources")
+ if not isinstance(sources, list) or not sources:
+ notes.append("source-ledger.json has no captured sources")
+ critical.append("source-ledger has no captured official/primary sources")
+ return False, 35, notes, critical
+
+ official_count = 0
+ for index, source in enumerate(sources, start=1):
+ label = f"source-ledger source #{index}"
+ if not isinstance(source, dict):
+ critical.append(f"{label} must be an object")
+ continue
+ source_type = clean_string(source.get("source_type")).lower()
+ retrieved = parse_iso_date(clean_string(source.get("retrieved")))
+ refresh_due = parse_iso_date(clean_string(source.get("refresh_due")))
+ claims = source.get("claims")
+ if not clean_string(source.get("title")):
+ critical.append(f"{label} missing title")
+ if not is_valid_source_url(clean_string(source.get("url"))):
+ critical.append(f"{label} has invalid or placeholder URL")
+ if source_type in PRIMARY_SOURCE_TYPES:
+ official_count += 1
+ elif source_type not in {"market", "practitioner", "supporting", "fixture"}:
+ critical.append(f"{label} has unsupported source_type")
+ if retrieved is None:
+ critical.append(f"{label} missing valid retrieved date")
+ elif retrieved > date.today():
+ critical.append(f"{label} has future retrieved date")
+ if not isinstance(claims, list) or not any(clean_string(claim) for claim in claims):
+ critical.append(f"{label} must list sourced claims")
+ if requires_fresh:
+ if refresh_due is None:
+ critical.append(f"{label} missing valid refresh_due date")
+ elif refresh_due < date.today():
+ critical.append(f"{label} refresh_due is stale")
+
+ minimum_official = 2 if requires_fresh else 1
+ if official_count < minimum_official:
+ critical.append(f"source-ledger needs at least {minimum_official} official/primary sources")
+ return not critical, max(0, 100 - 18 * len(critical) - 8 * len(notes)), notes, critical
+
+
+def check_adapters() -> tuple[bool, int, list[str], list[str]]:
+ notes: list[str] = []
+ critical: list[str] = []
+ data, errors = load_json_object(REPO / "references" / "adapter-manifest.json")
+ if errors:
+ critical.extend(f"invalid adapter-manifest.json: {error}" for error in errors)
+ return False, 0, notes, critical
+ if data.get("generic_only") is not False:
+ notes.append("adapter-manifest declares generic_only=true")
+ return False, 55, notes, critical
+
+ required_sections = {
+ "input_schemas": "input schema",
+ "importers": "importer",
+ "synthesis_modules": "synthesis module",
+ "report_renderers": "report renderer",
+ "fixtures": "fixture",
+ "tests": "test",
+ }
+ for section, label in required_sections.items():
+ entries = data.get(section)
+ if not isinstance(entries, list) or not entries:
+ critical.append(f"adapter-manifest missing {label} entries")
+ continue
+ for index, entry in enumerate(entries, start=1):
+ entry_path = manifest_entry_path(entry)
+ if not entry_path:
+ critical.append(f"adapter-manifest {section} #{index} missing path")
+ elif not (REPO / entry_path).exists():
+ critical.append(f"adapter-manifest {section} path does not exist: {entry_path}")
+ return not critical, max(0, 100 - 18 * len(critical) - 8 * len(notes)), notes, critical
+
+
+def check_citations() -> tuple[bool, int, list[str], list[str]]:
+ notes: list[str] = []
+ critical: list[str] = []
+ for folder in ["assets/template-brain/wiki/deliverables", "assets/template-brain/wiki/reports", "examples/sample-vault/wiki/deliverables", "examples/sample-vault/wiki/reports"]:
+ root = REPO / folder
+ if not root.exists():
+ continue
+ for path in root.rglob("*.md"):
+ text = path.read_text(encoding="utf-8", errors="replace")
+ if "[[" not in text and ".raw/" not in text and "sha256" not in text.lower():
+ rel = path.relative_to(REPO).as_posix()
+ notes.append(f"missing source citation in {rel}")
+ critical.append(f"unsourced deliverable/report: {rel}")
+ return not critical, max(0, 100 - 15 * len(critical)), notes, critical
+
+
+def check_packaging() -> tuple[bool, int, list[str]]:
+ path = REPO / "scripts" / "package_release.py"
+ if not path.exists():
+ return False, 0, ["missing scripts/package_release.py"]
+ text = path.read_text(encoding="utf-8", errors="replace")
+ notes = [f"package script missing {term}" for term in ["SHA256SUMS", "RELEASE_MANIFEST", "release-type", "market-ready", "audit_brain.py"] if term not in text]
+ return not notes, 100 - 20 * len(notes), notes
+
+
+def check_paths(paths: list[str]) -> tuple[bool, int, list[str]]:
+ missing = [rel for rel in paths if not (REPO / rel).exists()]
+ return not missing, 100 - 12 * len(missing), [f"missing {rel}" for rel in missing]
+
+
+def determine_status(categories: dict[str, dict[str, Any]], score: int, critical: list[str]) -> str:
+ if not categories["current_research"]["ok"]:
+ return "scaffolded"
+ if not categories["domain_adapters"]["ok"]:
+ return "researched"
+ if not categories["demo_determinism"]["ok"] or not categories["tests"]["ok"]:
+ return "domain-adapted"
+ if critical or score < 90 or any(not categories[name]["ok"] for name in ["packaging", "installability", "docs", "source_citation", "obsidian_vault_quality"]):
+ return "demo-verified"
+ return "market-ready"
+
+
+def load_json_object(path: Path) -> tuple[dict[str, Any], list[str]]:
+ if not path.exists():
+ return {}, [f"missing {path.relative_to(REPO).as_posix()}"]
+ try:
+ data = json.loads(path.read_text(encoding="utf-8"))
+ except ValueError as exc:
+ return {}, [str(exc)]
+ if not isinstance(data, dict):
+ return {}, ["top-level value must be an object"]
+ return data, []
+
+
+def contains_any(text: str, terms: set[str]) -> bool:
+ lowered = text.lower()
+ return any(term in lowered for term in terms)
+
+
+def clean_string(value: object) -> str:
+ return value.strip() if isinstance(value, str) else ""
+
+
+def parse_iso_date(value: str) -> date | None:
+ try:
+ return date.fromisoformat(value)
+ except ValueError:
+ return None
+
+
+def is_valid_source_url(value: str) -> bool:
+ parsed = urlparse(value)
+ host = parsed.netloc.lower()
+ return parsed.scheme in {"http", "https"} and bool(host) and host not in DISALLOWED_SOURCE_HOSTS and "TBD" not in value.upper()
+
+
+def manifest_entry_path(entry: object) -> str:
+ if isinstance(entry, str):
+ return entry
+ if not isinstance(entry, dict):
+ return ""
+ for key in ["path", "schema_path", "module", "fixture", "test"]:
+ value = entry.get(key)
+ if isinstance(value, str) and value.strip():
+ return value.strip()
+ return ""
+
+
+def read(path: Path) -> str:
+ try:
+ return path.read_text(encoding="utf-8", errors="replace")
+ except FileNotFoundError:
+ return ""
+
+
+if __name__ == "__main__":
+ raise SystemExit(main())
diff --git a/scripts/build_demo_vault.py b/scripts/build_demo_vault.py
new file mode 100755
index 0000000..ef7cbde
--- /dev/null
+++ b/scripts/build_demo_vault.py
@@ -0,0 +1,34 @@
+#!/usr/bin/env python3
+from __future__ import annotations
+
+import shutil
+import subprocess
+import sys
+from pathlib import Path
+
+
+REPO = Path(__file__).resolve().parent.parent
+PY = sys.executable
+
+
+def run(args: list[str]) -> None:
+ subprocess.run([PY, *args], cwd=REPO, check=True)
+
+
+def main() -> int:
+ demo_parent = REPO / "examples"
+ demo = demo_parent / "sample-vault"
+ if demo.exists():
+ shutil.rmtree(demo)
+ run(["scripts/scaffold_vault.py", "--client", "sample-vault", "--client-name", "Sample Client", "--owner", "Daniel Agrici", "--out-dir", str(demo_parent)])
+ run(["scripts/ingest_source.py", "--vault", str(demo), "--file", "tests/fixtures/sample-source.md", "--source-type", "fixture"])
+ run(["scripts/synthesize_brain.py", "--vault", str(demo)])
+ run(["scripts/generate_vault_visuals.py", "--vault", str(demo)])
+ run(["scripts/render_brain_report.py", "--vault", str(demo), "--html-only"])
+ run(["scripts/lint_vault.py", "--vault", str(demo)])
+ print(demo)
+ return 0
+
+
+if __name__ == "__main__":
+ raise SystemExit(main())
diff --git a/scripts/generate_vault_visuals.py b/scripts/generate_vault_visuals.py
new file mode 100755
index 0000000..369eb94
--- /dev/null
+++ b/scripts/generate_vault_visuals.py
@@ -0,0 +1,37 @@
+#!/usr/bin/env python3
+from __future__ import annotations
+
+import argparse
+from pathlib import Path
+
+
+SVG = """<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 980 420" role="img" aria-labelledby="title desc">
+<title id="title">Claude Blog Brain relationship map</title>
+<desc id="desc">Source to memory to deliverable operating map.</desc>
+<rect width="980" height="420" fill="#f8fafc"/>
+<text x="40" y="58" font-size="28" font-family="Inter,Arial" font-weight="700" fill="#172033">Claude Blog Brain Relationship Map</text>
+<g font-family="Inter,Arial" font-size="14" font-weight="700">
+<rect x="50" y="130" width="160" height="72" rx="8" fill="#fff" stroke="#586f92" stroke-width="3"/><text x="82" y="172" fill="#172033">Raw Sources</text>
+<rect x="290" y="130" width="160" height="72" rx="8" fill="#fff" stroke="#2f7f87" stroke-width="3"/><text x="324" y="172" fill="#172033">Wiki Memory</text>
+<rect x="530" y="130" width="160" height="72" rx="8" fill="#fff" stroke="#c85f4d" stroke-width="3"/><text x="560" y="172" fill="#172033">Checks + Gates</text>
+<rect x="770" y="130" width="160" height="72" rx="8" fill="#fff" stroke="#f0b33d" stroke-width="3"/><text x="800" y="172" fill="#172033">Deliverables</text>
+</g>
+<path d="M210 166 H290 M450 166 H530 M690 166 H770" stroke="#64748b" stroke-width="3"/>
+</svg>
+"""
+
+
+def main(argv: list[str] | None = None) -> int:
+ parser = argparse.ArgumentParser(description="Generate vault visual assets.")
+ parser.add_argument("--vault", required=True)
+ args = parser.parse_args(argv)
+ vault = Path(args.vault).expanduser().resolve()
+ out = vault / "_attachments" / "brain-relationship-map.svg"
+ out.parent.mkdir(parents=True, exist_ok=True)
+ out.write_text(SVG, encoding="utf-8")
+ print(out)
+ return 0
+
+
+if __name__ == "__main__":
+ raise SystemExit(main())
diff --git a/scripts/guide_next_action.py b/scripts/guide_next_action.py
new file mode 100755
index 0000000..9388897
--- /dev/null
+++ b/scripts/guide_next_action.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env python3
+from __future__ import annotations
+
+import argparse
+import re
+from pathlib import Path
+
+
+def main(argv: list[str] | None = None) -> int:
+ parser = argparse.ArgumentParser(description="Print the next operator action from hot.md.")
+ parser.add_argument("--vault", required=True)
+ args = parser.parse_args(argv)
+ hot = Path(args.vault).expanduser().resolve() / "wiki" / "hot.md"
+ text = hot.read_text(encoding="utf-8") if hot.exists() else ""
+ match = re.search(r"## Next Action\s+(.+?)(?:\n## |\Z)", text, re.S)
+ print(match.group(1).strip() if match else "Read CODEX.md, wiki/hot.md, and wiki/index.md.")
+ return 0
+
+
+if __name__ == "__main__":
+ raise SystemExit(main())
diff --git a/scripts/ingest_source.py b/scripts/ingest_source.py
new file mode 100755
index 0000000..5c4e5af
--- /dev/null
+++ b/scripts/ingest_source.py
@@ -0,0 +1,137 @@
+#!/usr/bin/env python3
+from __future__ import annotations
+
+import argparse
+import hashlib
+import json
+import re
+import shutil
+import sys
+from datetime import date
+from pathlib import Path
+
+
+MAX_BYTES = 10 * 1024 * 1024
+
+
+def main(argv: list[str] | None = None) -> int:
+ parser = argparse.ArgumentParser(description="Ingest one raw source into a brain vault.")
+ parser.add_argument("--vault", required=True)
+ parser.add_argument("--file", required=True)
+ parser.add_argument("--source-type", default="manual")
+ args = parser.parse_args(argv)
+ vault = Path(args.vault).expanduser().resolve()
+ source = Path(args.file).expanduser().resolve()
+ if not (vault / "CODEX.md").exists():
+ print(f"ERROR: not a brain vault: {vault}", file=sys.stderr)
+ return 2
+ if not source.is_file():
+ print(f"ERROR: source file not found: {source}", file=sys.stderr)
+ return 2
+ if source.stat().st_size > MAX_BYTES:
+ print(f"ERROR: source file too large: {source}", file=sys.stderr)
+ return 2
+ raw_dir = vault / ".raw" / "sources"
+ raw_dir.mkdir(parents=True, exist_ok=True)
+ source_digest = sha256_file(source)
+ target = collision_safe_path(raw_dir, source.name, source_digest)
+ shutil.copy2(source, target)
+ digest = sha256_file(target)
+ update_manifest(vault, target.relative_to(vault).as_posix(), digest, args.source_type)
+ source_note = collision_safe_path(vault / "wiki" / "sources", f"{safe_title(source.stem)}.md", digest)
+ source_note.parent.mkdir(parents=True, exist_ok=True)
+ source_note.write_text(f"""---
+type: "source"
+title: "{source.stem}"
+created: "{date.today().isoformat()}"
+updated: "{date.today().isoformat()}"
+status: "active"
+sources: ["{target.relative_to(vault).as_posix()}"]
+---
+
+# {source.stem}
+
+## Source
+
+- Path: `{target.relative_to(vault).as_posix()}`
+- Hash: `{digest}`
+- Retrieved: {date.today().isoformat()}
+- Type: {args.source_type}
+
+## Compiled Truth
+
+Summarize this source without copying it wholesale.
+
+Related: [[Source Manifest Guide]] | [[wiki/sources/_index|Sources Hub]]
+""", encoding="utf-8")
+ append_log(vault, f"Ingested source [[{source.stem}]] from `{target.relative_to(vault).as_posix()}`.")
+ print(json.dumps({"copied": str(target), "sha256": digest}, indent=2))
+ return 0
+
+
+def sha256_file(path: Path) -> str:
+ h = hashlib.sha256()
+ with path.open("rb") as f:
+ for chunk in iter(lambda: f.read(1024 * 1024), b""):
+ h.update(chunk)
+ return h.hexdigest()
+
+
+def collision_safe_path(directory: Path, filename: str, digest: str) -> Path:
+ safe_name = safe_filename(filename)
+ candidate = directory / safe_name
+ if not candidate.exists():
+ return candidate
+ stem = candidate.stem or "source"
+ suffix = candidate.suffix
+ digest_name = directory / f"{stem}-{digest[:12]}{suffix}"
+ if not digest_name.exists():
+ return digest_name
+ counter = 2
+ while True:
+ numbered = directory / f"{stem}-{digest[:12]}-{counter}{suffix}"
+ if not numbered.exists():
+ return numbered
+ counter += 1
+
+
+def safe_filename(value: str) -> str:
+ name = Path(value).name
+ cleaned = re.sub(r"[^A-Za-z0-9._ -]+", "", name).strip()
+ return cleaned[:120] or "source"
+
+
+def update_manifest(vault: Path, rel: str, digest: str, source_type: str) -> None:
+ path = vault / ".raw" / ".manifest.json"
+ data = {"sources": []}
+ if path.exists():
+ data = json.loads(path.read_text(encoding="utf-8"))
+ if not isinstance(data, dict):
+ raise SystemExit(f"ERROR: raw manifest must be an object: {path}")
+ sources = data.setdefault("sources", [])
+ if not isinstance(sources, list):
+ raise SystemExit(f"ERROR: raw manifest sources must be a list: {path}")
+ data.setdefault("sources", []).append({
+ "path": rel,
+ "sha256": digest,
+ "retrieved": date.today().isoformat(),
+ "source_type": source_type,
+ })
+ path.write_text(json.dumps(data, indent=2) + "\n", encoding="utf-8")
+ path.chmod(0o600)
+
+
+def safe_title(value: str) -> str:
+ cleaned = re.sub(r"[^A-Za-z0-9 _-]+", "", value).strip() or "Source"
+ return cleaned[:90]
+
+
+def append_log(vault: Path, message: str) -> None:
+ log = vault / "wiki" / "log.md"
+ if log.exists():
+ text = log.read_text(encoding="utf-8").rstrip() + f"\n- {date.today().isoformat()} - {message}\n"
+ log.write_text(text, encoding="utf-8")
+
+
+if __name__ == "__main__":
+ raise SystemExit(main())
diff --git a/scripts/lint_vault.py b/scripts/lint_vault.py
new file mode 100755
index 0000000..ea5a5ef
--- /dev/null
+++ b/scripts/lint_vault.py
@@ -0,0 +1,125 @@
+#!/usr/bin/env python3
+from __future__ import annotations
+
+import argparse
+import hashlib
+import json
+import re
+import sys
+from pathlib import Path
+
+
+def main(argv: list[str] | None = None) -> int:
+ parser = argparse.ArgumentParser(description="Lint a brain vault.")
+ parser.add_argument("--vault", required=True)
+ parser.add_argument("--template", action="store_true")
+ args = parser.parse_args(argv)
+ vault = Path(args.vault).expanduser().resolve()
+ errors: list[str] = []
+ warnings: list[str] = []
+ for rel in ["CODEX.md", "README.md", "shipping-rules.md", ".raw/.manifest.json", "wiki/hot.md", "wiki/index.md", "wiki/overview.md", "wiki/log.md", "wiki/meta/Start Here.md", "wiki/meta/dashboard.md"]:
+ if not (vault / rel).exists():
+ errors.append(f"missing {rel}")
+ check_raw_manifest(vault, errors)
+ graph = vault / ".obsidian" / "graph.json"
+ if graph.exists():
+ data = json.loads(graph.read_text(encoding="utf-8"))
+ if len(data.get("colorGroups") or []) < 4:
+ errors.append("graph.json has fewer than 4 color groups")
+ notes = list((vault / "wiki").rglob("*.md")) if (vault / "wiki").exists() else []
+ stems = {p.stem.lower(): p for p in notes}
+ rels = {p.relative_to(vault).with_suffix("").as_posix().lower(): p for p in notes}
+ incoming = {p: 0 for p in notes}
+ outgoing = {p: 0 for p in notes}
+ duplicate_stems: dict[str, list[str]] = {}
+ for path in notes:
+ duplicate_stems.setdefault(path.stem.lower(), []).append(path.relative_to(vault).as_posix())
+ text = path.read_text(encoding="utf-8")
+ if not text.startswith("---\n"):
+ errors.append(f"missing frontmatter: {path.relative_to(vault)}")
+ if re.search(r"\{\{(?!date|owner|client_slug|client_name)[^}]+\}\}|__[A-Z0-9_]+__|\bTODO\b", text):
+ errors.append(f"unresolved placeholder in {path.relative_to(vault)}")
+ if any(part in {"deliverables", "reports"} for part in path.parts) and "[[" not in text and ".raw/" not in text and "sha256" not in text.lower():
+ errors.append(f"deliverable/report lacks source citation: {path.relative_to(vault)}")
+ for raw in re.findall(r"!?\[\[([^\]]+)\]\]", text):
+ raw_target = raw.split("|", 1)[0].split("#", 1)[0].strip()
+ target = raw_target.replace(".md", "").replace(".canvas", "").strip()
+ if not target:
+ continue
+ outgoing[path] += 1
+ key = target.lower()
+ if key in stems:
+ incoming[stems[key]] += 1
+ elif key in rels:
+ incoming[rels[key]] += 1
+ elif not (vault / raw_target).exists() and not any(vault.rglob(raw_target)):
+ errors.append(f"dead wikilink in {path.relative_to(vault)}: {raw}")
+ zero_in = [p.relative_to(vault).as_posix() for p in notes if incoming[p] == 0]
+ zero_out = [p.relative_to(vault).as_posix() for p in notes if outgoing[p] == 0]
+ if zero_in:
+ warnings.append("zero incoming wiki notes: " + ", ".join(zero_in[:20]))
+ if zero_out:
+ warnings.append("zero outgoing wiki notes: " + ", ".join(zero_out[:20]))
+ for stem, paths in duplicate_stems.items():
+ if stem != "_index" and len(paths) > 1:
+ errors.append(f"duplicate note stem {stem}: {', '.join(paths)}")
+ for warning in warnings:
+ print(f"WARNING: {warning}")
+ for error in errors:
+ print(f"ERROR: {error}", file=sys.stderr)
+ print("Vault lint passed" if not errors else "Vault lint failed")
+ return 1 if errors else 0
+
+
+def check_raw_manifest(vault: Path, errors: list[str]) -> None:
+ manifest_path = vault / ".raw" / ".manifest.json"
+ if not manifest_path.exists():
+ return
+ try:
+ data = json.loads(manifest_path.read_text(encoding="utf-8"))
+ except ValueError as exc:
+ errors.append(f"invalid raw manifest: {exc}")
+ return
+ sources = data.get("sources", [])
+ if not isinstance(sources, list):
+ errors.append("raw manifest sources must be a list")
+ return
+ seen_paths: set[str] = set()
+ for index, entry in enumerate(sources, start=1):
+ label = f"raw manifest source #{index}"
+ if not isinstance(entry, dict):
+ errors.append(f"{label} must be an object")
+ continue
+ rel = entry.get("path")
+ expected = entry.get("sha256")
+ if not isinstance(rel, str) or not rel.strip():
+ errors.append(f"{label} missing path")
+ continue
+ rel = rel.strip()
+ if rel in seen_paths:
+ errors.append(f"duplicate raw manifest path: {rel}")
+ seen_paths.add(rel)
+ if rel.startswith("/") or ".." in Path(rel).parts:
+ errors.append(f"{label} has unsafe path: {rel}")
+ continue
+ source = vault / rel
+ if not source.is_file():
+ errors.append(f"{label} missing file: {rel}")
+ continue
+ if not isinstance(expected, str) or not re.fullmatch(r"[0-9a-f]{64}", expected):
+ errors.append(f"{label} missing valid sha256")
+ continue
+ if sha256_file(source) != expected:
+ errors.append(f"{label} sha256 mismatch: {rel}")
+
+
+def sha256_file(path: Path) -> str:
+ h = hashlib.sha256()
+ with path.open("rb") as f:
+ for chunk in iter(lambda: f.read(1024 * 1024), b""):
+ h.update(chunk)
+ return h.hexdigest()
+
+
+if __name__ == "__main__":
+ raise SystemExit(main())
diff --git a/scripts/package_release.py b/scripts/package_release.py
new file mode 100755
index 0000000..1d6aea1
--- /dev/null
+++ b/scripts/package_release.py
@@ -0,0 +1,257 @@
+#!/usr/bin/env python3
+from __future__ import annotations
+
+import argparse
+import hashlib
+import json
+import re
+import stat
+import subprocess
+import sys
+import zipfile
+from datetime import datetime, timezone
+from pathlib import Path
+
+
+REPO = Path(__file__).resolve().parent.parent
+TEXT_SUFFIXES = {".base", ".canvas", ".css", ".csv", ".html", ".json", ".md", ".py", ".sh", ".toml", ".txt", ".yaml", ".yml"}
+SKIP_PARTS = {".git", ".pytest_cache", ".mypy_cache", ".ruff_cache", ".venv", "__pycache__", "build", "dist", "venv"}
+SKIP_SUFFIXES = {".pyc", ".pyo", ".log"}
+FORBIDDEN_ENTRY_NAMES = {".env", ".env.local", ".env.production", ".DS_Store", "Thumbs.db", "workspace.json"}
+MAX_SCAN_BYTES = 25 * 1024 * 1024
+FORBIDDEN_TEXT_PATTERNS = {
+ "local home path": re.compile(rb"/home/[A-Za-z0-9_.-]+"),
+ "private key": re.compile(rb"-----BEGIN [A-Z ]*PRIVATE KEY-----"),
+ "openai api key": re.compile(rb"sk-[A-Za-z0-9_-]{20,}"),
+ "anthropic api key": re.compile(rb"sk-ant-[A-Za-z0-9_-]{20,}"),
+ "github token": re.compile(rb"(ghp|github_pat)_[A-Za-z0-9_]{20,}"),
+ "aws key": re.compile(rb"AKIA[0-9A-Z]{16}"),
+ "google api key": re.compile(rb"AIza[0-9A-Za-z_-]{20,}"),
+ "bearer literal": re.compile(rb"Bearer\s+[A-Za-z0-9._-]{24,}"),
+}
+
+
+def main(argv: list[str] | None = None) -> int:
+ parser = argparse.ArgumentParser(description="Build verified release ZIP artifacts.")
+ parser.add_argument("--version", required=True)
+ parser.add_argument("--dist-dir", default="dist")
+ parser.add_argument("--release-type", default="scaffold", choices=["scaffold", "demo", "market-ready"])
+ args = parser.parse_args(argv)
+ version = normalize_version(args.version)
+ dist = (REPO / args.dist_dir).resolve()
+ if dist != REPO and not dist.is_relative_to(REPO):
+ raise SystemExit(f"ERROR: --dist-dir must resolve inside the repo: {dist}")
+ dist.mkdir(parents=True, exist_ok=True)
+ if args.release_type == "market-ready":
+ enforce_market_ready_gate()
+ scan_source_tree()
+ artifacts = [
+ build_zip(dist / f"claude-blog-brain-template-v{version}.zip", REPO / "assets" / "template-brain", "claude-blog-brain-template"),
+ build_zip(dist / f"claude-blog-brain-sample-vault-v{version}.zip", REPO / "examples" / "sample-vault", "claude-blog-brain-sample-vault"),
+ build_source_zip(dist / f"claude-blog-brain-source-v{version}.zip", version),
+ ]
+ for artifact in artifacts:
+ validate_zip(artifact["path"])
+ manifest = {
+ "product": "claude-blog-brain",
+ "version": version,
+ "release_type": args.release_type,
+ "generated_at": datetime.now(timezone.utc).replace(microsecond=0).isoformat(),
+ "git_commit": git_commit(),
+ "artifacts": [{"file": a["path"].name, "sha256": sha256_file(a["path"]), "bytes": a["path"].stat().st_size, "entries": a["entries"]} for a in artifacts],
+ "checks": ["repo source scan passed", "zip entry scan passed", "zip content secret scan passed", "zip content local-path scan passed"],
+ }
+ manifest_path = dist / "RELEASE_MANIFEST.json"
+ manifest_path.write_text(json.dumps(manifest, indent=2, sort_keys=True) + "\n", encoding="utf-8")
+ sums = dist / "SHA256SUMS"
+ write_sha256s(sums, [*(a["path"] for a in artifacts), manifest_path])
+ validate_sha256s(sums)
+ print(f"Release package built in {dist}")
+ return 0
+
+
+def enforce_market_ready_gate() -> None:
+ audit = REPO / "scripts" / "audit_brain.py"
+ if not audit.exists():
+ raise SystemExit("ERROR: market-ready release blocked: missing scripts/audit_brain.py")
+ proc = subprocess.run(
+ [sys.executable, str(audit), "--require", "market-ready", "--json"],
+ cwd=REPO,
+ text=True,
+ capture_output=True,
+ check=False,
+ )
+ if proc.returncode:
+ detail = "\n".join(part for part in [proc.stdout.strip(), proc.stderr.strip()] if part)
+ raise SystemExit("ERROR: market-ready release blocked by audit:\n" + detail)
+
+
+def normalize_version(value: str) -> str:
+ version = value.strip().removeprefix("v")
+ if not re.fullmatch(r"\d+\.\d+\.\d+", version):
+ raise SystemExit("ERROR: --version must look like 0.1.0")
+ return version
+
+
+def should_skip(path: Path) -> bool:
+ if set(path.parts) & SKIP_PARTS:
+ return True
+ if any(part.endswith(".egg-info") for part in path.parts):
+ return True
+ return path.suffix in SKIP_SUFFIXES
+
+
+def reject_forbidden_entry(path: Path) -> None:
+ if path.name in FORBIDDEN_ENTRY_NAMES:
+ raise SystemExit(f"ERROR: forbidden release entry: {path.as_posix()}")
+ if path.is_absolute() or ".." in path.parts:
+ raise SystemExit(f"ERROR: unsafe release entry: {path.as_posix()}")
+
+
+def iter_tree(root: Path) -> list[Path]:
+ files: list[Path] = []
+ for path in root.rglob("*"):
+ rel = path.relative_to(root)
+ if should_skip(rel):
+ continue
+ reject_forbidden_entry(rel)
+ if path.is_symlink():
+ raise SystemExit(f"ERROR: symlink not allowed: {rel.as_posix()}")
+ if path.is_file():
+ files.append(path)
+ return sorted(files)
+
+
+def source_files() -> list[Path]:
+ if (REPO / ".git").exists():
+ reject_dirty_tracked_files()
+ reject_untracked_files()
+ proc = subprocess.run(["git", "ls-files", "-z", "--cached"], cwd=REPO, capture_output=True, check=False)
+ if proc.returncode != 0:
+ raise SystemExit(proc.stderr.decode("utf-8", "replace"))
+ files = []
+ for raw in proc.stdout.split(b"\0"):
+ if raw:
+ rel = Path(raw.decode("utf-8", "replace"))
+ if should_skip(rel):
+ continue
+ reject_forbidden_entry(rel)
+ path = REPO / rel
+ if path.is_symlink():
+ raise SystemExit(f"ERROR: symlink not allowed: {rel.as_posix()}")
+ if path.is_file():
+ files.append(path)
+ return sorted(files)
+ return iter_tree(REPO)
+
+
+def reject_dirty_tracked_files() -> None:
+ dirty: set[str] = set()
+ for args in (["git", "diff", "--name-only", "-z"], ["git", "diff", "--name-only", "-z", "--cached"]):
+ proc = subprocess.run(args, cwd=REPO, capture_output=True, check=False)
+ if proc.returncode != 0:
+ raise SystemExit(proc.stderr.decode("utf-8", "replace"))
+ dirty.update(raw.decode("utf-8", "replace") for raw in proc.stdout.split(b"\0") if raw)
+ blocked = sorted(path for path in dirty if not should_skip(Path(path)))
+ if blocked:
+ raise SystemExit("ERROR: dirty tracked files would make release non-reproducible: " + ", ".join(blocked[:10]))
+
+
+def reject_untracked_files() -> None:
+ proc = subprocess.run(["git", "ls-files", "-z", "--others", "--exclude-standard"], cwd=REPO, capture_output=True, check=False)
+ if proc.returncode != 0:
+ raise SystemExit(proc.stderr.decode("utf-8", "replace"))
+ untracked = sorted(raw.decode("utf-8", "replace") for raw in proc.stdout.split(b"\0") if raw)
+ allowed = [p for p in untracked if not should_skip(Path(p))]
+ if allowed:
+ raise SystemExit("ERROR: untracked files would make release non-reproducible: " + ", ".join(allowed[:10]))
+
+
+def scan_source_tree() -> None:
+ for path in source_files():
+ rel = path.relative_to(REPO)
+ if not should_skip(rel):
+ scan_file(path, rel.as_posix())
+
+
+def build_zip(out: Path, source: Path, root_name: str) -> dict[str, object]:
+ entries = 0
+ with zipfile.ZipFile(out, "w", compression=zipfile.ZIP_DEFLATED) as zf:
+ for path in iter_tree(source):
+ zf.write(path, (Path(root_name) / path.relative_to(source)).as_posix())
+ entries += 1
+ return {"path": out, "entries": entries}
+
+
+def build_source_zip(out: Path, version: str) -> dict[str, object]:
+ entries = 0
+ with zipfile.ZipFile(out, "w", compression=zipfile.ZIP_DEFLATED) as zf:
+ for path in source_files():
+ rel = path.relative_to(REPO)
+ if not should_skip(rel):
+ zf.write(path, (Path(f"claude-blog-brain-v{version}") / rel).as_posix())
+ entries += 1
+ return {"path": out, "entries": entries}
+
+
+def validate_zip(path: Path) -> None:
+ with zipfile.ZipFile(path) as zf:
+ names = zf.namelist()
+ if not names:
+ raise SystemExit(f"ERROR: empty artifact: {path.name}")
+ for name in names:
+ rel = Path(name)
+ for part in rel.parts:
+ reject_forbidden_entry(Path(part))
+ if should_skip(rel) or any(part in SKIP_PARTS for part in rel.parts):
+ raise SystemExit(f"ERROR: forbidden zip entry in {path.name}: {name}")
+ mode = zf.getinfo(name).external_attr >> 16
+ if stat.S_ISLNK(mode):
+ raise SystemExit(f"ERROR: symlink entry in {path.name}: {name}")
+ scan_bytes(zf.read(name), f"{path.name}:{name}", rel.suffix)
+
+
+def scan_file(path: Path, label: str) -> None:
+ size = path.stat().st_size
+ if size > MAX_SCAN_BYTES:
+ raise SystemExit(f"ERROR: file too large for release scan: {label}")
+ scan_bytes(path.read_bytes(), label, path.suffix)
+
+
+def scan_bytes(data: bytes, label: str, suffix: str) -> None:
+ if suffix and suffix not in TEXT_SUFFIXES:
+ return
+ for name, pattern in FORBIDDEN_TEXT_PATTERNS.items():
+ if pattern.search(data):
+ raise SystemExit(f"ERROR: {name} found in {label}")
+
+
+def sha256_file(path: Path) -> str:
+ h = hashlib.sha256()
+ with path.open("rb") as f:
+ for chunk in iter(lambda: f.read(1024 * 1024), b""):
+ h.update(chunk)
+ return h.hexdigest()
+
+
+def write_sha256s(path: Path, artifacts: list[Path]) -> None:
+ path.write_text("\n".join(f"{sha256_file(a)} {a.name}" for a in artifacts) + "\n", encoding="utf-8")
+
+
+def validate_sha256s(path: Path) -> None:
+ for line in path.read_text(encoding="utf-8").splitlines():
+ expected, filename = line.split(" ", 1)
+ actual = sha256_file(path.parent / filename)
+ if expected != actual:
+ raise SystemExit(f"ERROR: checksum mismatch for {filename}")
+
+
+def git_commit() -> str | None:
+ if not (REPO / ".git").exists():
+ return None
+ proc = subprocess.run(["git", "rev-parse", "HEAD"], cwd=REPO, capture_output=True, text=True, check=False)
+ return proc.stdout.strip() if proc.returncode == 0 else None
+
+
+if __name__ == "__main__":
+ raise SystemExit(main())
diff --git a/scripts/render_brain_report.py b/scripts/render_brain_report.py
new file mode 100755
index 0000000..236bd5c
--- /dev/null
+++ b/scripts/render_brain_report.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python3
+from __future__ import annotations
+
+import argparse
+import html
+import re
+import sys
+from pathlib import Path
+
+
+LOCAL_PATH = re.compile(r"/home/[A-Za-z0-9_.-]+")
+
+
+def main(argv: list[str] | None = None) -> int:
+ parser = argparse.ArgumentParser(description="Render the weekly report as HTML.")
+ parser.add_argument("--vault", required=True)
+ parser.add_argument("--out", default="")
+ parser.add_argument("--html-only", action="store_true")
+ args = parser.parse_args(argv)
+ vault = Path(args.vault).expanduser().resolve()
+ report = vault / "wiki" / "reports" / "Weekly Report.md"
+ if not report.exists():
+ print("ERROR: report not found; run synthesize first", file=sys.stderr)
+ return 2
+ out = Path(args.out).expanduser().resolve() if args.out else vault / "weekly-report.html"
+ html_text = markdown_to_html(report.read_text(encoding="utf-8"))
+ html_text = LOCAL_PATH.sub("[local-path-redacted]", html_text)
+ out.write_text(html_text, encoding="utf-8")
+ print(out)
+ return 0
+
+
+def markdown_to_html(text: str) -> str:
+ body = []
+ for line in text.splitlines():
+ if line.startswith("---"):
+ continue
+ if line.startswith("# "):
+ body.append(f"<h1>{html.escape(line[2:])}</h1>")
+ elif line.startswith("## "):
+ body.append(f"<h2>{html.escape(line[3:])}</h2>")
+ elif line.startswith("- "):
+ body.append(f"<li>{html.escape(line[2:])}</li>")
+ elif line.strip():
+ body.append(f"<p>{html.escape(line)}</p>")
+ return "<!doctype html><meta charset='utf-8'><title>Weekly Report</title><body>" + "\n".join(body) + "</body>\n"
+
+
+if __name__ == "__main__":
+ raise SystemExit(main())
diff --git a/scripts/scaffold_vault.py b/scripts/scaffold_vault.py
new file mode 100755
index 0000000..957e6bf
--- /dev/null
+++ b/scripts/scaffold_vault.py
@@ -0,0 +1,85 @@
+#!/usr/bin/env python3
+from __future__ import annotations
+
+import argparse
+import json
+import re
+import shutil
+import stat
+import sys
+from datetime import date
+from pathlib import Path
+
+
+REPO = Path(__file__).resolve().parent.parent
+TEMPLATE = REPO / "assets" / "template-brain"
+
+
+def main(argv: list[str] | None = None) -> int:
+ parser = argparse.ArgumentParser(description="Scaffold a client vault from the template brain.")
+ parser.add_argument("--client", required=True)
+ parser.add_argument("--client-name", default="")
+ parser.add_argument("--owner", required=True)
+ parser.add_argument("--out-dir", required=True)
+ parser.add_argument("--force", action="store_true")
+ args = parser.parse_args(argv)
+ slug = safe_slug(args.client)
+ out_dir = Path(args.out_dir).expanduser().resolve()
+ vault = out_dir / slug
+ if vault.exists() and any(vault.iterdir()) and not args.force:
+ print(f"ERROR: vault exists and is not empty: {vault}", file=sys.stderr)
+ return 2
+ if not TEMPLATE.exists():
+ print(f"ERROR: template missing: {TEMPLATE}", file=sys.stderr)
+ return 2
+ if vault.exists():
+ shutil.rmtree(vault)
+ copy_template(TEMPLATE, vault, {
+ "{{date}}": date.today().isoformat(),
+ "{{client_slug}}": slug,
+ "{{client_name}}": args.client_name or slug,
+ "{{owner}}": args.owner,
+ })
+ manifest = vault / ".raw" / ".manifest.json"
+ manifest.parent.mkdir(parents=True, exist_ok=True)
+ manifest.write_text(json.dumps({
+ "scaffold_history": [{
+ "client": slug,
+ "client_name": args.client_name or slug,
+ "owner": args.owner,
+ "created": date.today().isoformat(),
+ }],
+ "sources": [],
+ }, indent=2) + "\n", encoding="utf-8")
+ manifest.chmod(0o600)
+ print(vault)
+ return 0
+
+
+def safe_slug(value: str) -> str:
+ slug = re.sub(r"[^a-z0-9]+", "-", value.lower()).strip("-")
+ if not slug or slug in {".", ".."}:
+ raise SystemExit("ERROR: invalid client slug")
+ return slug
+
+
+def copy_template(src: Path, dest: Path, replacements: dict[str, str]) -> None:
+ for path in sorted(src.rglob("*")):
+ if path.is_dir():
+ continue
+ rel = path.relative_to(src)
+ target = dest / rel
+ target.parent.mkdir(parents=True, exist_ok=True)
+ data = path.read_bytes()
+ try:
+ text = data.decode("utf-8")
+ except UnicodeDecodeError:
+ target.write_bytes(data)
+ continue
+ for old, new in replacements.items():
+ text = text.replace(old, new)
+ target.write_text(text, encoding="utf-8")
+
+
+if __name__ == "__main__":
+ raise SystemExit(main())
diff --git a/scripts/synthesize_brain.py b/scripts/synthesize_brain.py
new file mode 100755
index 0000000..82bcdf7
--- /dev/null
+++ b/scripts/synthesize_brain.py
@@ -0,0 +1,108 @@
+#!/usr/bin/env python3
+from __future__ import annotations
+
+import argparse
+import json
+import sys
+from datetime import date
+from pathlib import Path
+
+
+def main(argv: list[str] | None = None) -> int:
+ parser = argparse.ArgumentParser(description="Synthesize source-cited starter deliverables.")
+ parser.add_argument("--vault", required=True)
+ args = parser.parse_args(argv)
+ vault = Path(args.vault).expanduser().resolve()
+ manifest_path = vault / ".raw" / ".manifest.json"
+ if not manifest_path.exists():
+ print("ERROR: missing .raw/.manifest.json; run scaffold and ingest first", file=sys.stderr)
+ return 2
+ manifest = json.loads(manifest_path.read_text(encoding="utf-8"))
+ sources = manifest.get("sources", [])
+ source_rows = "\n".join(f"| `{item.get('path', '')}` | `{item.get('sha256', '')[:12]}` | {item.get('retrieved', '')} |" for item in sources) or "| No sources yet | | |"
+ write(vault / "wiki" / "deliverables" / "Health Scorecard.md", f"""---
+type: "deliverable"
+title: "Health Scorecard"
+created: "{date.today().isoformat()}"
+updated: "{date.today().isoformat()}"
+status: "draft"
+---
+
+# Health Scorecard
+
+## Source Coverage
+
+| Source | Hash | Retrieved |
+|---|---|---:|
+{source_rows}
+
+## Current Read
+
+This is a source-cited scaffold. Domain-specific conclusions remain blocked
+until current trustworthy research is captured in `references/`.
+
+Related: [[Action Roadmap]] | [[Weekly Report]] | [[Source Manifest Guide]]
+""")
+ write(vault / "wiki" / "deliverables" / "Action Roadmap.md", f"""---
+type: "deliverable"
+title: "Action Roadmap"
+created: "{date.today().isoformat()}"
+updated: "{date.today().isoformat()}"
+status: "draft"
+---
+
+# Action Roadmap
+
+## Immediate Actions
+
+1. Complete source intake.
+2. Refresh official/current requirements.
+3. Replace scaffold claims with sourced domain notes.
+
+## Approval Gate
+
+Every action requires source, confidence, owner, approval status, and rollback.
+
+Related: [[Approval Queue]] | [[Health Scorecard]] | [[Best Practices Kernel]]
+""")
+ write(vault / "wiki" / "reports" / "Weekly Report.md", f"""---
+type: "report"
+title: "Weekly Report"
+created: "{date.today().isoformat()}"
+updated: "{date.today().isoformat()}"
+status: "draft"
+---
+
+# Weekly Report
+
+## Summary
+
+Claude Blog Brain is ready for source review. It has {len(sources)} raw source(s) in
+the manifest.
+
+## Evidence
+
+- [[Health Scorecard]]
+- [[Action Roadmap]]
+- [[Source Manifest Guide]]
+
+Related: [[Reporting Workflow]] | [[Approval Queue]]
+""")
+ append_log(vault, "Synthesized source-cited starter deliverables.")
+ print("Synthesis complete")
+ return 0
+
+
+def write(path: Path, text: str) -> None:
+ path.parent.mkdir(parents=True, exist_ok=True)
+ path.write_text(text.rstrip() + "\n", encoding="utf-8")
+
+
+def append_log(vault: Path, message: str) -> None:
+ log = vault / "wiki" / "log.md"
+ if log.exists():
+ log.write_text(log.read_text(encoding="utf-8").rstrip() + f"\n- {date.today().isoformat()} - {message}\n", encoding="utf-8")
+
+
+if __name__ == "__main__":
+ raise SystemExit(main())
diff --git a/specs/claude-blog-brain.yaml b/specs/claude-blog-brain.yaml
new file mode 100644
index 0000000..37e682d
--- /dev/null
+++ b/specs/claude-blog-brain.yaml
@@ -0,0 +1,70 @@
+# Brainstein spec v2
+# Claude Blog Brain - source-cited knowledge base for the claude-blog skill (v1.10.0).
+spec_version: 2
+slug: "claude-blog-brain"
+title: "Claude Blog Brain"
+domain: "blog content creation, optimization, and management dual-optimized for Google rankings (E-E-A-T, the 2026 core updates) and AI citations (GEO/AEO), spanning writing, rewriting and freshness, SERP-informed briefs and outlines, editorial calendars and strategy, semantic topic clusters, schema and internal linking, multilingual publishing, the FLOW framework, factchecking, personas, distribution, and the blog delivery contract, grounded in the claude-blog skill"
+buyer: "Content teams, bloggers, SEO content strategists, and operators who run the claude-blog skill and need a persistent, source-cited operating system for writing, optimizing, and auditing blog content that ranks on Google and gets cited by AI assistants."
+owner: "Daniel Agrici"
+repo_url: "https://github.com/AgriciDaniel/claude-blog-brain"
+license_name: "Custom license"
+research_refresh_cadence: "monthly for Google algorithm updates and Search Central policy; before every release for E-E-A-T framing, schema deprecations, and GEO/AEO citation claims; on-changelog for the claude-blog skill"
+workflows:
+ - "Source intake and provenance capture from the claude-blog skill and official docs"
+ - "Answer-first article writing and rewriting via the 6-pillar dual-optimization framework"
+ - "SERP-informed brief and outline construction with heading hierarchy"
+ - "Semantic topic-cluster planning and hub-and-spoke execution"
+ - "Schema stack, internal linking, and GEO/AEO citation-readiness review"
+ - "5-category quality scoring and the blog delivery-contract gate"
+ - "Multilingual publishing, translation, and localization review"
+ - "Approval queue for content recommendations with rollback notes"
+ - "Auto brain fill and update from the Google algorithm-update ledger"
+raw_sources:
+ - "claude-blog skill v1.10.0 SKILL.md, 30 sub-skills, 5 agents, 21 references, 12 templates, and analysis scripts; Google Search Central docs; web.dev CWV; FLOW framework bibliography; GEO/AEO studies; content-marketing and copywriting research"
+enrichment_sources:
+ - "Official Google Search Central, web.dev, and Schema.org documentation"
+ - "Primary-source-verified Google algorithm-update ledger (data/google-updates.json)"
+ - "Quality Rater Guidelines (E-E-A-T, YMYL, scaled-content abuse) and the Search Essentials / spam policies"
+ - "FLOW framework (github.com/AgriciDaniel/flow) and its cited studies"
+ - "GEO/AEO and AI-search studies (AI Overviews coverage and CTR, AI Mode behavior, passage-level citability)"
+deliverables:
+ - "Blog quality score (5-category 100-point) synthesis playbook"
+ - "SERP-informed content brief and outline"
+ - "Semantic topic-cluster map with internal-link matrix"
+ - "GEO and AI-citation readiness register"
+ - "Schema stack and internal-linking reference library"
+ - "Editorial calendar and content-strategy plan"
+ - "Blog delivery-contract gate report"
+ - "Approval queue for recommendations"
+ - "Google algorithm-update memory and refresh log"
+refusal_rules:
+ - "No ranking or traffic guarantee; content outcomes are probabilistic and never certain"
+ - "No credentials, tokens, API keys, or private client content in repo artifacts"
+ - "No mutation of a CMS, GSC, GA4, or publishing platform; the brain is advisory and read-only"
+ - "No recommendation without a dated source, confidence level, and rollback note"
+ - "No deprecated advice (HowTo schema, retired FAQ rich results, FID) presented as current"
+ - "No fabricated or unsourced statistics and no AI-detectable filler presented as fact"
+safety_risks:
+ - "Stale Google algorithm, E-E-A-T, or schema-deprecation requirements presented as current"
+ - "Fabricated, unsourced, or AI-slop statistics written into published content"
+ - "Private client content, draft URLs, or credentials leaking into raw inputs or reports"
+ - "Overconfident content recommendations from thin or single-source inputs"
+ - "Generated reports leaking local filesystem paths"
+playbook_steps:
+ - "Source intake and provenance capture"
+ - "Write or rewrite via the 6-pillar dual-optimization framework"
+ - "Brief, outline, and topic-cluster construction"
+ - "Quality scoring and the blog delivery-contract gate"
+ - "GEO, schema, and distribution review"
+ - "Approval queue and next-action review"
+audit_focus:
+ - "Stale Google algorithm, E-E-A-T, or schema-deprecation requirements"
+ - "Fabricated or unsourced statistics and AI-detectable phrasing in content"
+ - "Private client content, draft URLs, or credentials in raw inputs"
+ - "Overconfident recommendations from incomplete inputs"
+next_action_signals:
+ - "Blog quality score synthesis playbook"
+ - "GEO and AI-citation readiness register"
+ - "Semantic topic-cluster map"
+ - "Blog delivery-contract gate"
+ - "Google algorithm-update refresh log"
diff --git a/tests/fixtures/sample-source.md b/tests/fixtures/sample-source.md
new file mode 100644
index 0000000..5078dd7
--- /dev/null
+++ b/tests/fixtures/sample-source.md
@@ -0,0 +1,8 @@
+# Sample Claude Blog Brain Source
+
+This fixture proves the brain can ingest raw source material, cite it,
+synthesize a starter scorecard, render a report, and preserve graph
+connectivity.
+
+Domain: blog content creation, optimization, and management dual-optimized for Google rankings (E-E-A-T, the 2026 core updates) and AI citations (GEO/AEO), spanning writing, rewriting and freshness, SERP-informed briefs and outlines, editorial calendars and strategy, semantic topic clusters, schema and internal linking, multilingual publishing, the FLOW framework, factchecking, personas, distribution, and the blog delivery contract, grounded in the claude-blog skill
+Owner: Daniel Agrici
diff --git a/tests/test_pipeline.py b/tests/test_pipeline.py
new file mode 100644
index 0000000..5f24b84
--- /dev/null
+++ b/tests/test_pipeline.py
@@ -0,0 +1,75 @@
+#!/usr/bin/env python3
+from __future__ import annotations
+
+import os
+import subprocess
+import sys
+import tempfile
+from pathlib import Path
+
+
+REPO = Path(__file__).resolve().parent.parent
+PY = sys.executable
+
+
+def run(args: list[str], *, env: dict[str, str] | None = None) -> subprocess.CompletedProcess[str]:
+ proc = subprocess.run([PY, *args], cwd=REPO, text=True, capture_output=True, env={**os.environ, **(env or {})}, check=False)
+ if proc.returncode:
+ print(proc.stdout)
+ print(proc.stderr, file=sys.stderr)
+ raise AssertionError(f"command failed: {' '.join(args)}")
+ return proc
+
+
+def run_cmd(args: list[str], *, env: dict[str, str] | None = None) -> subprocess.CompletedProcess[str]:
+ proc = subprocess.run(args, cwd=REPO, text=True, capture_output=True, env={**os.environ, **(env or {})}, check=False)
+ if proc.returncode:
+ print(proc.stdout)
+ print(proc.stderr, file=sys.stderr)
+ raise AssertionError(f"command failed: {' '.join(args)}")
+ return proc
+
+
+def main() -> int:
+ run(["-m", "compileall", "scripts", "claude_blog_brain", "tests"])
+ run(["scripts/lint_vault.py", "--vault", "assets/template-brain", "--template"])
+ with tempfile.TemporaryDirectory(prefix="claude-blog-brain-test-") as tmp:
+ out_dir = Path(tmp) / "vaults"
+ run(["scripts/scaffold_vault.py", "--client", "acme", "--client-name", "Acme Co", "--owner", "Test Owner", "--out-dir", str(out_dir)])
+ vault = out_dir / "acme"
+ run(["scripts/ingest_source.py", "--vault", str(vault), "--file", "tests/fixtures/sample-source.md"])
+ run(["scripts/synthesize_brain.py", "--vault", str(vault)])
+ run(["scripts/generate_vault_visuals.py", "--vault", str(vault)])
+ run(["scripts/render_brain_report.py", "--vault", str(vault), "--html-only"])
+ run(["scripts/lint_vault.py", "--vault", str(vault)])
+ assert (vault / "weekly-report.html").exists()
+ run(["scripts/build_demo_vault.py"])
+ run(["scripts/audit_brain.py", "--json", "--report-only"])
+ blocked = subprocess.run([PY, "scripts/package_release.py", "--version", "0.1.0", "--release-type", "market-ready"], cwd=REPO, text=True, capture_output=True, check=False)
+ assert blocked.returncode != 0
+ assert "market-ready release blocked" in blocked.stderr
+ run(["scripts/package_release.py", "--version", "0.1.0"])
+ assert (REPO / "dist" / "RELEASE_MANIFEST.json").exists()
+ with tempfile.TemporaryDirectory(prefix="claude-blog-brain-install-") as tmp:
+ env = {"CLAUDE_BLOG_BRAIN_INSTALL_HOME": tmp}
+ run_cmd(["bash", "install.sh", "--target", "all"], env=env)
+ assert (Path(tmp) / ".codex" / "skills" / "claude-blog-brain" / "SKILL.md").exists()
+ assert (Path(tmp) / ".openclaw" / "skills" / "claude-blog-brain" / "SKILL.md").exists()
+ assert (Path(tmp) / ".agent-skills" / "claude-blog-brain" / "SKILL.md").exists()
+ assert (Path(tmp) / ".gemini" / "claude-blog-brain" / "GEMINI.md").exists()
+ assert "claude-blog-brain-install:start" in (Path(tmp) / ".gemini" / "GEMINI.md").read_text(encoding="utf-8")
+ custom_root = Path(tmp) / "custom-skills"
+ run_cmd(["bash", "install.sh", "--target", "custom", "--path", str(custom_root)], env=env)
+ assert (custom_root / "claude-blog-brain" / "SKILL.md").exists()
+ run_cmd(["bash", "uninstall.sh", "--target", "all"], env=env)
+ assert not (Path(tmp) / ".codex" / "skills" / "claude-blog-brain").exists()
+ assert not (Path(tmp) / ".gemini" / "claude-blog-brain").exists()
+ assert not (Path(tmp) / ".gemini" / "GEMINI.md").exists()
+ run_cmd(["bash", "uninstall.sh", "--target", "custom", "--path", str(custom_root)], env=env)
+ assert not (custom_root / "claude-blog-brain").exists()
+ print("Pipeline tests passed")
+ return 0
+
+
+if __name__ == "__main__":
+ raise SystemExit(main())
diff --git a/uninstall.sh b/uninstall.sh
new file mode 100755
index 0000000..57377bc
--- /dev/null
+++ b/uninstall.sh
@@ -0,0 +1,79 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+target="codex"
+custom_path=""
+while [ "$#" -gt 0 ]; do
+ case "$1" in
+ --target) target="${2:?}"; shift 2 ;;
+ --path) custom_path="${2:?}"; shift 2 ;;
+ -h|--help) echo "Usage: ./uninstall.sh [--target codex|claude|agents|gemini|openclaw|portable|custom|all] [--path DIR]"; exit 0 ;;
+ *) echo "ERROR: unknown argument: $1" >&2; exit 2 ;;
+ esac
+done
+
+case "${target}" in codex|claude|agents|gemini|openclaw|portable|custom|all) ;; *) echo "ERROR: invalid target" >&2; exit 2 ;; esac
+if [ "${target}" = "custom" ] && [ -z "${custom_path}" ]; then
+ echo "ERROR: --target custom requires --path" >&2
+ exit 2
+fi
+base_home="${CLAUDE_BLOG_BRAIN_INSTALL_HOME:-${HOME}}"
+
+target_dir() {
+ case "$1" in
+ codex) echo "${base_home}/.codex/skills/claude-blog-brain" ;;
+ claude) echo "${base_home}/.claude/skills/claude-blog-brain" ;;
+ agents) echo "${base_home}/.agents/skills/claude-blog-brain" ;;
+ openclaw) echo "${base_home}/.openclaw/skills/claude-blog-brain" ;;
+ portable) echo "${base_home}/.agent-skills/claude-blog-brain" ;;
+ custom) echo "${custom_path%/}/claude-blog-brain" ;;
+ esac
+}
+
+remove_one() {
+ local dir="$1"
+ if [ -d "${dir}" ]; then
+ rm -rf "${dir}"
+ echo "Removed ${dir}"
+ else
+ echo "Claude Blog Brain is not installed at ${dir}"
+ fi
+}
+
+remove_gemini() {
+ local dir="${base_home}/.gemini/claude-blog-brain"
+ local loader="${base_home}/.gemini/GEMINI.md"
+ remove_one "${dir}"
+ if [ -f "${loader}" ]; then
+ python - "${loader}" <<'PY'
+from __future__ import annotations
+
+import re
+import sys
+from pathlib import Path
+
+path = Path(sys.argv[1])
+start = "<!-- claude-blog-brain-install:start -->"
+end = "<!-- claude-blog-brain-install:end -->"
+text = path.read_text(encoding="utf-8")
+pattern = f"\n*{re.escape(start)}.*?{re.escape(end)}\n*"
+new_text = re.sub(pattern, "\n", text, flags=re.S).strip()
+if new_text:
+ path.write_text(new_text + "\n", encoding="utf-8")
+else:
+ path.unlink()
+PY
+ echo "Claude Blog Brain Gemini loader cleaned at ${loader}"
+ fi
+}
+
+if [ "${target}" = "all" ]; then
+ for name in codex claude agents openclaw portable; do
+ remove_one "$(target_dir "${name}")"
+ done
+ remove_gemini
+elif [ "${target}" = "gemini" ]; then
+ remove_gemini
+else
+ remove_one "$(target_dir "${target}")"
+fi