Personal_AI_Infrastructure icon indicating copy to clipboard operation
Personal_AI_Infrastructure copied to clipboard

CLAUDE.md bootstrap not extended after interview — context files not loaded

Open Chinmaya-India opened this issue 6 months ago • 2 comments

Problem

When a new PAI user completes the /interview workflow and populates TELOS context files (e.g., CURRENT_STATE/Finances.md, Health.md, Challenges.md), the CLAUDE.md bootstrap configuration is not updated to include these files in its @-imports. This causes critical context to be unavailable at session start, resulting in the DA missing essential constraints and current situation data.

Root Cause

CLAUDE.md is created as a bootstrap template with minimal @-imports (PRINCIPAL_IDENTITY, PRINCIPAL_TELOS summary only). The intended workflow is:

  1. User runs /interview → populates TELOS files
  2. CLAUDE.md should be extended to @-import the newly-populated files ← This step is missing

There is no automation (hook, script, or documented procedure) that extends CLAUDE.md after interview completion.

Impact

  • DA lacks critical context about user's current constraints (employment, income, capital, energy patterns)
  • Context-dependent reasoning fails (e.g., suggesting approaches incompatible with user's actual situation)
  • DA must re-ask questions user has already answered
  • Breaks the core PAI promise: 'The DA reads it at every session start — keeping it current is how the DA stays aligned'

Expected Behavior

After /interview completes and populates TELOS files, one of the following should happen:

  1. CLAUDE.md is automatically extended to @-import critical context files, OR
  2. CLAUDE.md uses wildcard @-imports (e.g., @PAI/USER/TELOS/CURRENT_STATE/*) to load all populated files, OR
  3. LoadContext hook auto-loads CURRENT_STATE/* and IDEAL_STATE/* subdirectories, OR
  4. Documentation explicitly states that users must manually extend CLAUDE.md after interview

Actual Behavior

CLAUDE.md remains in bootstrap state with incomplete @-imports. Critical context files exist but are not loaded at session start.

Steps to Reproduce

  1. Create new PAI instance
  2. Run /interview and complete all phases (populates TELOS/CURRENT_STATE/Finances.md, Health.md, etc.)
  3. Start new session
  4. Attempt to access context about user's current employment/constraints
  5. DA has not loaded Finances.md or other CURRENT_STATE files

Proposed Solutions

Option A (Automation): Add a post-Interview hook that scans TELOS/CURRENT_STATE/ for populated files and adds them to CLAUDE.md's @-imports.

Option B (Configuration): Update CLAUDE.md bootstrap to use wildcard imports: @PAI/USER/TELOS/CURRENT_STATE/*

Option C (Hook Enhancement): Extend LoadContext.hook.ts to load CURRENT_STATE/* and IDEAL_STATE/* subdirectories as dynamic context.

Option D (Documentation): Document the post-interview CLAUDE.md extension step explicitly in the Interview workflow.

Context

This issue was discovered when DA failed to account for user constraints (can't leave government job, can't work two jobs simultaneously) during strategic planning. These constraints were documented in CURRENT_STATE/Finances.md but not loaded because CLAUDE.md didn't @-import them.

Chinmaya-India avatar May 19 '26 08:05 Chinmaya-India

Good catch. This is a real onboarding gap in the default scaffold.

Of your four options, (C) — LoadContext hook enhancement is the cleanest path. LoadContext already fires at session start; extending it to glob CURRENT_STATE/* and IDEAL_STATE/* keeps CLAUDE.md stable as a bootstrap artifact and makes the interview workflow "just work" without programmatic CLAUDE.md rewriting.

(B) would be ideal but Claude Code doesn't support wildcard @-imports today — each file needs an explicit @path line. (A) is fragile (programmatic CLAUDE.md rewriting risks breaking the file). (D) is a fallback but this should be automated.

For reference, one workaround that already exists: the PRINCIPAL_TELOS.md auto-generated summary (produced by GenerateTelosSummary.ts) rolls up all TELOS source files into a single @-imported file. If your CLAUDE.md imports that summary rather than individual files, new interview content surfaces automatically on the next summary regeneration. But that's a workaround — the LoadContext hook enhancement would be the proper fix so individual files are available at full fidelity, not just summarized.

jmmarkiewicz avatar May 19 '26 17:05 jmmarkiewicz

You found a real broken promise in v5 — interview output genuinely wasn't loaded at session start. The current architecture fixes it two ways: setup now activates the CLAUDE.md @-imports once your USER files are populated (your Option A, automated), and a PostToolUse hook regenerates the @-imported TELOS summary any time a TELOS file changes, so the DA reads fresh context every session. Closing as fixed in the current line.

danielmiessler avatar Jul 07 '26 18:07 danielmiessler