Home / Engine / Knowledge Corpus

Wisdom Corpus Tab on resources.affirmology.ai - Build Brief v1

Updated Jun 27, 2026 · Affirmology_CorpusTab_BuildBrief_v1.md

Summary. Goal: add a "Wisdom Corpus" section/tab to the existing Resource Hub (resources.affirmology.ai) so Jeff and the team can browse and search the relevant parts of the corpus: the distilled techniques (the craft table) and the nightly synthesis. Reuses the hub's

Wisdom Corpus Tab on resources.affirmology.ai - Build Brief v1

Goal: add a "Wisdom Corpus" section/tab to the existing Resource Hub (resources.affirmology.ai) so Jeff and the team can browse and search the relevant parts of the corpus: the distilled techniques (the craft table) and the nightly synthesis. Reuses the hub's existing generate-and-deploy architecture. Decoupled, additive, ships now and gets richer after the technique-pipeline Phase 1.

What this tab IS (the real purpose)

A searchable REFERENCE where the team can look up what the corpus found, AT ANY LEVEL OF ABSTRACTION, not just by named teacher. You enter by a person (IFS, Joe Dispenza, Gabor Mate), by a domain (Somatic, Consciousness), by a topic (parts work, somatic regulation, identity), or by a framework (Integral theory / "integral psychology"). NOT the chat md briefs (those already live in the hub's doc clusters). This is the research lookup.

The browse axes (multiple levels of abstraction)

The corpus carries four levels; use them as follows (verified against the live data):

The content (two collections, shown under whatever axis is active)

Each item is a scannable LIST ROW (name + one_liner); EXPAND to read the detail. Keeps it skimmable.

  1. TEACHERS AND METHODS: the 143 craft rows where area='practitioners'. JOIN craft to research_backlog on name for category + lineage (verified 143/143 match). Default grouping by category; rows sorted by confidence desc. Collapsible category sections so 17 categories stay manageable. - Collapsed row: name + one_liner. - Expanded: method, why, when_to_use, how_to_apply, lineage (clickable), tags (clickable), confidence badge, source.
  2. TECHNIQUES: the ~109 craft rows where area != 'practitioners'. Friendly area names: reading_craft -> "Reading Craft", breakthrough -> "Breakthrough", audio_production -> "Audio Production", meditation_hypnosis -> "Meditation and Hypnosis", neuroscience -> "Neuroscience", frequency_sound -> "Frequency and Sound". Same row + expand pattern.
  3. A small "Recently synthesized" panel at the very top from reports/growth_latest.md on R2 (the newest finds, dated), so fresh material surfaces.

After pipeline Phase 1 adds tags, add filters by technique_type (identity / transformation) and slot, shown when present and omitted when absent.

Brand-name nuance: the hub is gated to Jeff, Sol, and Colin, so show the real teacher name for internal lookup (e.g. "Joe Dispenza"), but keep the entry's existing brand note (e.g. "brand: heart coherence breath") visible on the card so no one copies the real name into product.

What NOT to include (so it does not get overwhelming) - IMPORTANT

How the Resource Hub works (verified, so we fit it)

The build

  1. Add a corpus-pull + render module (e.g. resource-hub/corpus_section.py), called from generate.py: - At build time, pull corpus/corpus.db from R2 to a TEMP path (e.g. the system temp dir), query it, and discard it after the build. Never write the corpus into the repo or persist it on the Mac (same cloud-only rule as everywhere). Use boto3 (already used by the daily briefing); the agent venv has it. - R2 creds: read them the same way the daily briefing does (RENDER_API_KEY from affirmology-studio/.env, then the Render service env-vars for R2_ACCOUNT_ID / R2_ACCESS_KEY_ID / R2_SECRET_ACCESS_KEY / R2_BUCKET), OR drop read-only R2 creds into resource-hub/.deploy_env. Pick one and document it. - Query the craft table; also fetch reports/growth_latest.md from R2 for the synthesis feed. - GRACEFUL DEGRADATION: if the R2 pull or query fails for any reason, skip the corpus section and let the rest of the hub build and deploy normally (wrap in try/except, like the engine's craft retrieval does). A corpus hiccup must never break the doc hub.

  2. Render the section into dist/: - A new category/tab "Wisdom Corpus" (add it to the category nav, consistent with the existing cat-*.html pages and the hub's house style / assets/style.css). - Techniques as clean cards, grouped by area (practitioners, reading_craft, breakthrough, meditation_hypnosis, neuroscience, audio_production, frequency_sound), each card showing one_liner (headline), method, why, how_to_apply, confidence, source. Sort within a group by confidence desc. - After pipeline Phase 1 lands the tags: add filter/group by technique_type (identity / transformation) and slot (open / body / close / arc), and show status. Build the rendering so these fields are shown when present and simply omitted when absent, so the tab works BEFORE and AFTER Phase 1 with no rewrite. - A "Recently synthesized" panel at the top of the tab from growth_latest.md (the "Top new finds" / researched-this-run section), so the newest material is visible with the date. - Honor the hub rules: no em dashes in generated chrome; replace any em/en dashes in source bodies with a spaced hyphen on render (the generator already has this helper).

  3. Include the techniques in the existing client-side SEARCH (search.html / the search index the generator builds), so a search for "reconsolidation" or "permission" or "somatic" finds craft entries alongside docs. This is the search experience Jeff specifically wants over the corpus.

  4. No change to rebuild.sh logic beyond ensuring the R2 creds are available to generate.py at cron time (via .deploy_env or the studio .env path). Confirm boto3 is importable in the venv the cron uses; if not, add it to the venv.

Forward compatibility (becomes the toolkit front-end)

Once technique-pipeline Phase 1/2 are in, this same tab becomes the human window into the approved toolkit: filter to approved, browse by type/slot, and (optionally, later) link the per-technique cards to a Studio approve action. Build the card template now with that in mind (room for status/type/slot, a stable per-technique anchor id).

Verification

Rules