Skip to content

refactor(owie): prompt-as-md, slot injection, Langfuse SSOT, auto-push workflow#20

Merged
phucbm merged 4 commits into
mainfrom
refactor/owie-prompt-md-langfuse
Jun 11, 2026
Merged

refactor(owie): prompt-as-md, slot injection, Langfuse SSOT, auto-push workflow#20
phucbm merged 4 commits into
mainfrom
refactor/owie-prompt-md-langfuse

Conversation

@phucbm

@phucbm phucbm commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Move system prompt from TS template literal → lib/chat/system-prompt.md
  • Add rule numbering (1.x, A/B/C/M/R/F/S.x) for easy reference
  • Slot system: {{personas}}, {{merchants}}, {{banks}} filled at push time via buildLocalPrompt()
  • getSystemPrompt() fetches Langfuse (SSOT), falls back to buildLocalPrompt() if Langfuse unavailable
  • Remove unused REFUSAL_TEMPLATE export
  • Replace CT pronoun with bạn/mình throughout
  • Fix S.2 card-battle link: natural display text instead of raw slug path
  • push-prompt.ts: diff before push, skip if unchanged, emit ::pushed:: signal
  • push-prompt.yml: auto-push on every main push, Discord webhook notification on new version

Secrets needed in repo settings

  • DISCORD_WEBHOOK_URL (new)
  • LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY, LANGFUSE_BASE_URL, OPENWALLET_API_KEY (existing)

Test plan

  • Chat with Owie — no CT references in responses
  • Off-topic question — refusal uses bạn
  • Merge → confirm GitHub Action runs and pushes to Langfuse
  • Confirm Discord notification fires

phucbm added 4 commits June 11, 2026 09:27
CT (Chủ tịch) was a team-internal term unfamiliar to new users.
Switch to standard Vietnamese pronouns: bạn (you), mình/Owie (I/me).
…ix card-battle link text

- Extract prompt from TS template literal → lib/chat/system-prompt.md
- Add rule numbering (1.x, A.x, B.x, C.x, M.x, R.x, F.x, S.x) for easy reference
- Fix S.2 card comparison link: use natural display text like 'So sánh [Card A] và [Card B]' instead of raw slug path as link text
- fs.readFileSync at module level; Langfuse fallback still works
- Add {{personas}}, {{merchants}}, {{banks}} slots to system-prompt.md
- TS fills slots via fillSlots() — dynamic lists fully declared in .md
- Remove unused REFUSAL_TEMPLATE export
…h workflow

- Move system prompt from TS template literal to lib/chat/system-prompt.md
- Add rule numbering (1.x, A/B/C/M/R/F/S.x) for easy reference
- Slot system: {{personas}}, {{merchants}}, {{banks}} filled at push time
- buildLocalPrompt() fills slots from live API — used by push script only
- getSystemPrompt() fetches Langfuse (SSOT), falls back to buildLocalPrompt()
- Remove unused REFUSAL_TEMPLATE export
- Replace CT pronoun with bạn/mình throughout
- Fix S.2 card-battle link: natural display text not raw slug path
- push-prompt.ts: diff before push, skip if unchanged, emit ::pushed:: signal
- push-prompt.yml: auto-push on every main push, Discord webhook on new version
@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openwallet Ready Ready Preview, Comment Jun 11, 2026 3:02am

@phucbm phucbm self-assigned this Jun 11, 2026
@phucbm phucbm enabled auto-merge June 11, 2026 03:04
@phucbm phucbm merged commit d37c718 into main Jun 11, 2026
3 checks passed
@phucbm phucbm deleted the refactor/owie-prompt-md-langfuse branch June 11, 2026 03:06
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