The meta tutorial

Reproduce this from scratch

This page is a report about itself. It walks the exact steps used to build this project with AI (starting from an empty folder, no repo, nothing) so anyone can replicate the method on their own research question. It's a living document: it grows as the project advances.

What you'll need: a terminal, git, Node.js, and Claude Code (Anthropic's CLI agent). A modern web browser to open the report. No framework, no database, no hosting.

Just here for the method, not the code? The plain-language version (the exact questions we asked the AI, the goal at each step, and a single map of the whole flow) lives on Method & Why. This page is the hands-on rebuild: how to recreate the tooling from an empty folder, so you can run the same process on your own question.

The pipeline we ran

Before the from-scratch rebuild below, here's the actual run in one table: what each stage took in, what it produced out, and where to see the evidence.

StageInOutSee
1 · Input factorsThe brief + live web research (3 parallel agents)Five dated, sourced input docsFactors
2 · Research avenuesThe unknowns the inputs surfacedSelf-contained briefs, each with its exact prompt + a status backlog
3 · Deep researchDecision-deep briefs, run as parallel agentsCited Markdown results (search → fetch → verify → synthesis)The research
4 · AggregateThe results + the input docsOne 25-insight ledger, each entry linked to its source & confidenceMethod & Why
5 · DecisionsThe insight ledgerSix decision dossiers, each with explicit flip conditions
6 · Persona debateThe dossiers, argued by four voices in parallelReconciled positions → the dials that differentiate the tiers
Gate · BT reality checkEvery candidate ticker the dossiers reach forA verified shortlist: each ISIN graded confirmed / / unconfirmed
7 · Five strategiesThe dials + the verified shortlistDefensive / Moderate / Aggressive × small/large capital (a 3×2 grid, one cell empty), %-of-capital, with a base caseStrategies
8 · The reportAll settled Markdown sourcesThis vanilla-HTML deliverable, regenerated from the sourcesOverview
The Method-page flow map, as Mermaid source

The Method & Why page draws that flow with plain HTML & CSS (like the rest of this report), so it stays self-contained and opens straight from a file, with no internet and no build step. The Mermaid text below reproduces the same flow if you'd like to edit it or paste it into any Mermaid renderer (e.g. mermaid.live).

flowchart TD
  A["The brief — RO investor, ~EUR 30-70k, 2026 backdrop"] --> B["Ask the AI: list every factor that could matter"]
  B --> C["Factor map — ~55 factors, 6 layers"]
  C --> D["Research the decision-drivers, one deep dive each"]
  D --> R1["Lei or euro?"]
  D --> R2["RO stocks — cheap or dear?"]
  D --> R3["AI/tech from Europe?"]
  D --> R4["Defense — trend or spike?"]
  D --> R5["Oil & energy security?"]
  D --> R6["Where's the real bond yield?"]
  D --> R7["Gold or crypto to diversify?"]
  R1 --> E["Aggregate into 25 cited insights"]
  R2 --> E
  R3 --> E
  R4 --> E
  R5 --> E
  R6 --> E
  R7 --> E
  E --> F{"Central finding: inflation 10.9% > every safe yield"}
  F --> P1["Narrow bonds: tax-free Fidelis anchor"]
  F --> P2["European equity = the engine"]
  F --> P3["Gold/crypto researched, excluded by mandate"]
  F --> P4["Sleeve, defense-led; all-in-AI <= ~15%"]
  P1 --> G["Persona debate: worrier, go-getter, steady hand, macro"]
  P2 --> G
  P3 --> G
  P4 --> G
  G --> H["Five strategies: Defensive/Moderate/Aggressive x small/large (Moderate the base case)"]
  H --> I["This report"]

Part 1: Start from nothing

  1. Install Claude Code

    Install the CLI and authenticate it with your Anthropic account.

    npm install -g @anthropic-ai/claude-code
    claude   # first run walks you through login
  2. Create an empty project

    mkdir investment-research && cd investment-research
  3. Write a README that states the goal

    Before any tooling, write down, in plain language, the scenario, the constraints, and the shape of the deliverable. This README is what you'll brainstorm against. Ours described a fictional Romanian investor, a ~20–100k EUR portfolio, a low-risk core + ≤20% risk-on sleeve, the 2026 geopolitical context, and a final interactive report.

  4. Open Claude Code and brainstorm the scope

    Ask it to read the README and interview you about scope before touching code. The decisions we locked here shaped everything downstream:

    QuestionOur answer
    Report techVanilla HTML/CSS/JS, no build step
    LanguageEnglish
    Research result formatMarkdown, committed to the repo
    Live web accessYes: pull real BT/instrument/context data
    Who runs researchClaude runs the deep-research avenues
    Strategy archetypesConservative / Balanced / Growth

Part 2: Scaffold the repository

With scope agreed, have the agent lay down the folder structure and initialize git. The shape mirrors the pipeline (inputs → research → analysis → strategies → report):

investment-research/
├── README.md                 the brief
├── CLAUDE.md                 the project "overseer" (read every session)
├── docs/specs/               the approved design spec
├── process/                  the working pipeline, in order
│   ├── 1-inputs/             input factors (profile, geopolitics, trends, BT)
│   ├── 2-research/
│   │   ├── avenues/          research briefs + backlog (the exact prompts)
│   │   └── results/          cited Markdown results
│   ├── 3-analysis/
│   │   ├── aggregated-insights.md
│   │   └── decisions/        one evidence dossier per key decision
│   ├── 4-debate/             the skeptic/opportunist/conservator debate
│   └── 5-strategies/         conservative / balanced / growth
├── report/                   the shareable vanilla-HTML deliverable
└── .claude/                  agents + skills (below)
git init

Part 3: Build the Claude Code setup

This is what makes the process repeatable rather than ad-hoc. Three pieces:

CLAUDE.md: the overseer

A project-root file Claude reads at the start of every session. It states the mission, the pipeline, the operating rules (evidence over assertion, reproducibility, the ≤20% cap, BT-only universe, "not advice"), and how to pick up work. It's the brain that keeps every session consistent.

② Agents: roles with a fixed brief

Markdown files in .claude/agents/, each a specialist the orchestrator can dispatch:

Anatomy of an agent file
---
name: bt-instruments-analyst
description: When to use this agent…
tools: Read, Grep, Glob, WebSearch, WebFetch, Write, Edit
---

System prompt: the agent's job, rules, and output format.

③ Skills: repeatable procedures

Folders in .claude/skills/<name>/SKILL.md, each a playbook the agent follows the same way every time:

Part 4: Prepare for the research

  1. Map the whole field first

    Before deep-diving anything, set the AI a wide goal: list every factor that could matter (local, European, global, macro, structural, personal). Ours returned ~55 factors across six tiers (docs/factors.md), about 35 of them ones we hadn't thought of. This map decides which questions are worth researching deeply next.

  2. Fill the input factors

    Profile (confirmed with you), then geopolitics, market trends, constraints, and the BT Trade universe. The last four were pulled from live, dated sources.

  3. Author the research avenues

    Turn each unknown into a brief with a goal, key questions, required outputs, and the exact prompt. Queue them in a backlog with a status.

  4. Run deep research, one avenue at a time

    Fan-out search → fetch sources → adversarially verify → cited synthesis → a Markdown result committed next to its brief. New questions become new avenues.

Inspect the research

Each unknown became a self-contained brief with the exact prompt, run via a deep-research pass, and answered by a cited Markdown result in process/2-research/results/. Open any result below to read what we asked, its key findings, and its sources. Download the full result as Markdown from there.

#AvenueInformsStatus
01Romanian inflation & real-return hurdleGoalsfolded into setup
02Tezaur & Fidelis bonds: mechanics, yields, taxBondscovered → decision
06Geopolitical risk mapContextfolded into setup
08BT Trade platform: universe, fees, FXBT universefolded into setup

01/06/08 were satisfied by the input factors (now under Factors); 02 moved straight to the decision stage. The 14 deep-research results that produced standalone, citable docs are below. Live backlog: process/2-research/avenues/README.md.

Part 5: Aggregate into insights & decisions

Run the aggregate-insights skill once two or more results exist. It collapses many cited results into one ledger where each insight links back to its source, a confidence tag, and the decision it informs; then turns those into one evidence dossier per decision. Disagreements between sources are kept, not smoothed over: they become the raw material for the debate.

InThe cited result docs + the input factors
OutA 25-insight ledger + six decision dossiers (each with flip conditions)

Part 6: Debate, verify, and converge

This is where the method earns its trust. Three things, two of them adversarial:

  1. Run the persona debate (parallel)

    Dispatch the persona agents in one batch: a skeptic, an opportunist, a conservator, and a macro-and-thematic strategist. They argue every decision from the committed evidence only, then you reconcile their clash into a synthesis. Ours collapsed into a set of dials that map onto the five strategies (a 3×2 grid).

  2. Clear the BT reality-check gate

    Before any strategy names a ticker, the bt-instruments-analyst agent verifies each instrument is actually orderable on BT Trade, grading every ISIN confirmed / / unconfirmed into a durable shortlist.

  3. Build the five strategies & converge

    Turn the dials + the verified shortlist into concrete %-of-capital portfolios (Defensive / Moderate / Aggressive × small/large capital, a 3×2 grid, one cell empty), then write the convergence: same skeleton, only the dials move; pick by risk appetite, capital size, and the disinflation fork.

Why parallel? Independent work runs concurrently: the input factors, the research avenues, and the three debate personas were each dispatched as a single batch of subagents. The orchestrator (CLAUDE.md) reconciles their outputs. Only genuinely dependent steps (aggregation waits for results; strategies wait for the debate) stay serial.

Part 7: Generate the report

Run the build-report skill. It regenerates these vanilla-HTML pages from the settled Markdown. No build step, no CDN, no fetch() of local JSON (shared data lives in assets/data/data.js as a global), charts are inline SVG. The report is always downstream of the evidence and never gets ahead of it.

InAll settled sources (inputs, results, insights, debate, strategies)
OutThis three-part document: overview & conclusions, the method, and the whys

The throughline: Markdown is the source of truth; the report is generated from it; and every claim traces to a dated source. That's what makes the output both trustworthy and reproducible.

Progress log

Updated as the project moves, so this tutorial always reflects reality.

Status: the pipeline is complete end-to-end. What remains is live-app ISIN confirmation of the "likely" instruments, and refreshing the dated figures as markets move (the central-bank decision and the H2 inflation print are the next events that could move the thesis).