Skip to content

fix(build): copy prompt .md assets to dist after tsc (ENG-232)#42

Open
patoo0x wants to merge 1 commit intov5from
fix/eng-232-prompt-path-conflict
Open

fix(build): copy prompt .md assets to dist after tsc (ENG-232)#42
patoo0x wants to merge 1 commit intov5from
fix/eng-232-prompt-path-conflict

Conversation

@patoo0x
Copy link

@patoo0x patoo0x commented Mar 20, 2026

Problem

PromptLoader resolves prompts from dist/prompts/ at runtime, but TypeScript's compiler only emits .js/.d.ts files — it silently ignores .md assets. After a clean build, dist/prompts/ was missing entirely, causing all prompt loads to return empty strings.

This also created the ambiguous dist/prompts vs dist/prompts/prompts path confusion described in issue #39 — the loader path was correct, but the build output was wrong depending on what was manually present in dist/.

Fix

  • scripts/copy-prompts.js: mirrors src/prompts/**/*.mddist/prompts/ after every build
  • package.json: build script updated to tsc && node scripts/copy-prompts.js

Result

dist/prompts/
  capabilities/corridor-agent.md
  capabilities/merchant-agent.md
  capabilities/onboarding.md
  capabilities/personal-agent.md
  features/bill-splitting.md
  features/recurring-payments.md
  features/smart-suggestions.md
  features/spending-summary.md
  system/base-agent.md
  system/dialect-awareness.md
  system/safety-rails.md

Single canonical path. No duplication. No nesting. Build verified clean.

Closes #39
Resolves ENG-232

TypeScript compiler does not copy non-.ts assets. PromptLoader resolves
prompts from dist/prompts/ at runtime — without this copy step, the
directory was missing after a clean build, causing prompt load failures.

Fix:
- Add scripts/copy-prompts.js: mirrors src/prompts/ → dist/prompts/
- Wire into build script: 'tsc && node scripts/copy-prompts.js'

Result: single canonical dist/prompts/ path, no duplication, build
verified clean (11 .md files copied across 3 subdirs).

Closes #39
Resolves ENG-232
@linear
Copy link

linear bot commented Mar 20, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant