Shuichiro Ogawa
日本語

Architecture

How this site is built.

This site is composed of two architectures: a system that delivers the web, and a fleet of agents that produce the content. Here we publish each configuration and the rationale behind it.

Part 1

System Architecture

Static generation with Astro, served by Cloudflare Workers. Wiki chat powered by Workers AI. Everything runs within the free tier.

Tech Stack

Technology stack.

  • Astro 6 Web framework (zero JS, static generation)
  • Cloudflare Workers Hosting (Static Assets + SSR)
  • Tailwind CSS 4 Styling (Vite plugin)
  • Workers AI Llama 3.3 70B wiki chat (free tier)
  • TypeScript 6 Type system (astro check)

Cloudflare

System configuration on Cloudflare.

The site is a single Cloudflare Worker serving Astro build artifacts. Here's what we use, how, and why.

  1. Workers (Static Assets)

    How: Astro build generates static assets, served as a single Worker via the @astrojs/cloudflare adapter.

    Why: Static hosting alone has alternatives, but Workers lets us add AI chat (/api/chat) and bindings (KV, Vectorize) within the same runtime — so we chose Workers from the start.

  2. Custom Domain (apex)

    How: The apex domain jamjet-iqbal.com is assigned directly to the Worker via wrangler.jsonc routes. Cloudflare auto-creates DNS records and TLS certificates.

    Why: Maintain apex-level publishing without manual DNS or certificate management.

  3. wrangler (config as code)

    How: name, compatibility_date, nodejs_compat, and routes are consolidated in wrangler.jsonc and merged with adapter-generated deploy config for wrangler deploy.

    Why: Keep deploy configuration in git-managed code, enabling identical procedures from local and CI.

  4. GitHub Actions auto-deploy

    How: Weekly/monthly observation workflows commit collected notes, push, then run wrangler deploy. API tokens are scoped to Workers edit + target zone only.

    Why: Keep wiki updates and production publishing running regardless of PC state. Manual changes still deploy via npm run deploy.

  5. Free tier first + binding reservations

    How: Default path stays within Cloudflare free tier (100K requests/day, etc.). AI / KV / R2 / D1 / Vectorize are unimplemented, designed as plug-in points in wrangler.jsonc for roadmap phases P3–P7.

    Why: Low cost is the top priority. Paid/metered features are "slot ready, default off" for staged introduction.

AI Chat

Wiki chat (/chat).

A chat feature where Workers AI answers questions using published note excerpts as evidence. Responds via SSE streaming.

Model
@cf/meta/llama-3.3-70b-instruct-fp8-fast
Search
Bigram match scoring (zero-dependency Japanese support)
Context
Top 4 note excerpts injected into system prompt
Cost
Operated within Workers AI free tier (10,000 Neurons/day)

Part 2

Agent Architecture

Content on this site is produced by Claude Code subagents. The system is organized into a 4-stage pipeline (collection, debate, critique, publication) and a 3-tier model hierarchy.

Model Tiers

Three-tier model hierarchy.

Models are assigned by role nature, balancing reasoning depth with token cost.

  1. claude-opus-4-6 [1m]

    Core of debate. Handles lead argumentation, mutual counterarguments, auditing, attacking shared premises, and managing academic citations — roles requiring deep reasoning and 1M-context long-document comprehension.

    4 agents
  2. claude-sonnet-5

    Collection, review, and utility. Read-only structured extraction and clearly scoped inspections achieve sufficient quality with the latest Sonnet, optimizing cost.

    5 agents
  3. claude-fable-5

    Too token-intensive for standing assignments. Reserved for especially deep theoretical rounds (e.g., SO theory arbitration), specified via launch-time override on a case-by-case basis.

    0 agents (no standing assignment)

Agents

Nine subagents.

Organized into four groups spanning collection through critique. Each agent switches roles at launch via dispatch headers (profile / persona / lens / axis / canon / mode), covering the perspectives of the former 27 agents with just 9. Badges indicate each agent's model.

Debate

4 agents
  • industry-lead Opus Assumes industry personas (design firm / strategy consulting / independent office) via persona switching, arguing business viability and billability
  • practice-auditor Opus Inspects role claims through 5 lenses: revenue viability, differentiator reality, evidence methodology, liability/provenance, and demand-side behavior
  • disruption-provocateur Opus Attacks shared premises along 4 axes: historical disruption, global arbitrage, platform power, and end-user indifference
  • academic-critic Opus Critiques against 3 canons — design theory, education/pedagogy, and industry/professional studies — with cited sources

Collection

3 agents
  • source-researcher Sonnet Collects with citations across 7 profiles: scholarly, vendor primary, official statistics, analyst, developer voice, expert commentary, and labor market
  • paper-screening-agent Sonnet Screens collected literature candidates by inclusion criteria and removes duplicates
  • docs-researcher Sonnet Verifies current framework APIs and configurations against official documentation

Design Review

1 agents
  • design-reviewer Sonnet Switches between system-health and ui-analysis modes for design system health checks and page UI analysis/implementation guidance

Documentation

1 agents
  • doc-writer Sonnet Produces copy-paste-ready procedural guides and operational documentation from verified facts

Pipeline

Four stages from collection to publication.

  1. 01 — Sources

    Primary source layer (read-only)

    Collection corpora and citation ledgers in source/review/ serve as the primary source layer. raw/ is a reserved immutable area (write-blocked by hook).

  2. 02 — Collect

    Collection & corpus building

    Collection agents follow a protocol prioritizing primary sources, tracking citations, and filtering position-talk to produce citation-ledgered corpora.

  3. 03 — Debate

    Debate & critique (R1–R5)

    Debate leads, auditors, provocateurs, and academic critics exchange arguments and counterarguments across multiple rounds. The deliverable is a cited opposition table, not a smoothed consensus.

  4. 04 — Publish

    Published as wiki/note

    Integrated results are written back as notes with full references, updating the index and log for publication on this site.

Guardrails

Safety measures.

  • raw/ immutability (PreToolUse hook blocks writes)
  • Unpublished research control (pages without draft / so_theory flags are not published)
  • README and asset list sync (PostToolUse hook prompts updates)
  • Debate reproducibility (debate leads stay off the web, arguing only from pre-fixed evidence)
  • Debate cost logging (debates run one round, recording per-agent consumption in the debate record)
  • CI gate (wiki health check, type check, and build run on every push / PR)
  • Compact recovery (decision structures saved to state file before compaction; PreToolUse gate forces recovery after)
  • Early context alerts (PostToolUse / UserPromptSubmit suggest /compact-prep above 60% usage)