Home / Ops / Housekeeping and Process

Affirmology Internal Resource Hub Build Brief v1

Updated Jun 26, 2026 · Affirmology_ResourceHub_BuildBrief_v1.md

Summary. For: a Claude Code session running on the Mac (has filesystem access to the AFFIRMOLOGY folder, the Cloudflare token, and can run shell + wrangler). How to use: paste this whole file as the kickoff. Read the reference file in section 9 before building.

Affirmology Internal Resource Hub Build Brief v1

For: a Claude Code session running on the Mac (has filesystem access to the AFFIRMOLOGY folder, the Cloudflare token, and can run shell + wrangler). How to use: paste this whole file as the kickoff. Read the reference file in section 9 before building.


0. What you are building (one paragraph)

A gated, internal HTML resource hub at resources.affirmology.ai for Jeff, Sol, and Colin. It renders the project's key documents as clean, navigable HTML (house style matching the reference playbook), organized by category, with the Project State front and center. A cron job on the Mac refreshes it every 1 to 2 hours: it notices new or changed docs in the folder, extracts a title, summary, category, and related docs from each, and regenerates and redeploys the site. Only the team (allowlisted by Cloudflare Access) can reach it.


1. Hard rules (do not break)


2. Source content


3. Categories (taxonomy)

Map every doc to exactly one. Mirror the CLAUDE.md taxonomy plus Gamification and a Start bucket:

Start here / Project State · Strategy · Product · Engine · Council · Video · Readings · Audio · Ops · Gamification · Archive

Classification: use filename and content heuristics first; for ambiguous docs, run a cheap LLM classify (Haiku) against this exact list.


4. Architecture


5. The generator script (the heart of it)

Write it in Python and reuse the agent venv and Anthropic key (/Users/jeffreyparker/CLAUDE/AFFIRMOLOGY/affirmology-agent/.venv, key in affirmology-agent/.env). On each run it:

  1. Walk the source folder (section 2 rules), list candidate docs.
  2. Load resource-hub/manifest.json. For each doc it stores: relative path, content hash, title, category, summary, topics, related (list of paths), last-built timestamp.
  3. For each new or changed doc (hash differs from manifest): - Extract (one Haiku call): title, a 2 to 3 sentence summary, the category (from the section 3 list), and 3 to 6 key topics. - Relate: match this doc's topics and filename against every other manifest entry; store the top few overlaps as related. - Render: convert the markdown body to HTML (a markdown lib), wrap it in the shared template (top nav, breadcrumb, title, summary, body, related, timestamp). For docs that are already curated .html (like the reference playbook), link or embed them as-is rather than re-styling. - Update the manifest entry.
  4. Regenerate index.html and every category page from the manifest (pure templating, so cross-links, "recently updated," and counts always reflect the current set).
  5. Write everything to dist/.
  6. Deploy dist/ to Cloudflare Pages (section 6).

Cost control: only changed docs hit the LLM. Index and category regeneration is free templating. Log how many docs were reprocessed each run.

manifest.json entry shape:

{
  "path": "Affirmology_LaunchCRM_Playbook_v1.html",
  "hash": "sha256...",
  "title": "Launch Outreach + CRM Playbook",
  "category": "Strategy",
  "summary": "Operating plan for the June 28 warm outreach wave and the Airtable CRM...",
  "topics": ["launch", "crm", "airtable", "beta", "investors"],
  "related": ["Affirmology_LaunchTimeline_v1.md", "Affirmology_FundingStrategy_Memo_v1.md"],
  "last_built": "2026-06-26T18:00:00Z"
}

6. Hosting and access (Cloudflare)


7. The cron job (every 2 hours, on the Mac)

Use launchd (preferred on macOS). Build three things:

  1. A wrapper script resource-hub/rebuild.sh that: cd's to the folder, activates the venv, runs the generator, runs the wrangler deploy, and appends to resource-hub/rebuild.log.
  2. A launchd plist ~/Library/LaunchAgents/ai.affirmology.resourcehub.plist with StartInterval of 7200 seconds (2 hours), pointing at rebuild.sh, with stdout/stderr to the log.
  3. The load command: launchctl load ~/Library/LaunchAgents/ai.affirmology.resourcehub.plist

Note it only runs while the Mac is awake and online, which is acceptable (same constraint as the render heartbeat). Provide the exact plist contents and the rebuild.sh contents in your build.


8. Acceptance criteria (verify before claiming done)


9. Reference file (read this first)

/Users/jeffreyparker/CLAUDE/AFFIRMOLOGY/Affirmology_LaunchCRM_Playbook_v1.html

This is the visual and quality bar. Open it, read its <style> block, and extract it to resource-hub/assets/style.css. Match its layout language: emerald/gold/cream palette, rounded cards, left-border callouts (ok/warn/stop variants), header tables, the two-column table of contents, the pill tags. Every generated page should feel like it came from the same hand as this file.


10. Build order

  1. Scaffold resource-hub/; extract the stylesheet from the reference file.
  2. Generator working on a handful of docs locally; open dist/index.html in a browser to check the feel.
  3. Add the manifest, incremental hashing, and the Haiku extraction and relate pass.
  4. Create the Cloudflare Pages project, custom domain, and Access policy.
  5. Wire wrangler pages deploy; confirm the gate in incognito.
  6. Add the launchd cron; confirm a real 2-hour cycle picks up a changed doc.
  7. Run the full acceptance pass in section 8.

Keep the first version lean. Hand-curated category mapping for the few docs that matter is fine for v1 if the LLM classify is flaky; the incremental cron and the Access gate are the parts that must be solid.