Trade With Viet
Session Explainer
Internal use only — enter access password
setup

VietConnect Second Brain — a token-efficient knowledge base

2026-06-11 · explainer.tradewithviet.com

Built VietConnect a 'second brain' so every future session loads full context cheaply — and never re-reads the 11.4 MB pitch PDFs again.Đã xây cho VietConnect một 'bộ não thứ hai' để mỗi phiên làm việc sau này nạp đủ ngữ cảnh với chi phí thấp — và không bao giờ phải đọc lại hai file PDF pitch nặng 11.4 MB nữa.

Strategic knowledge was scattered across 5+ places and two heavy PDFs, so every new session burned tokens re-discovering the same facts and re-asking settled questions. I consolidated everything into a small, indexed docs/ folder, wired auto-loaded pointers so each session finds it for free, and converted the pitch PDFs to markdown. Additive only — no code touched, no deletions.Kiến thức chiến lược nằm rải rác ở hơn 5 nơi cùng hai file PDF nặng, nên mỗi phiên mới lại tốn token để tìm lại đúng những thông tin cũ và hỏi lại những việc đã chốt. Tôi gom tất cả vào một thư mục docs/ nhỏ gọn có mục lục, gắn các con trỏ tự nạp để mỗi phiên tìm thấy nó miễn phí, và chuyển PDF pitch sang markdown. Chỉ thêm vào — không động vào code, không xóa gì.

StatusBuilt (not committed)Đã xây (chưa commit)ScopeVietConnect repo docs/Thư mục docs/ của repoOutput9 docs, 1057 lines9 tài liệu, 1057 dòngDate2026-06-11

6-layer thinking chainChuỗi tư duy 6 tầng

L1
Raw requestYêu cầu gốc
"Check the whole codebase so it's efficient and clean… save tokens because each session I have to push memory again or read the PDF again… convert PDFs to Markdown so you never read them again… think of a clot that amplifies a brain.""Kiểm tra lại toàn bộ codebase cho gọn và hiệu quả… tiết kiệm token vì mỗi phiên lại phải nạp lại bộ nhớ hoặc đọc lại PDF… chuyển PDF sang Markdown để không bao giờ đọc lại nữa… nghĩ ra một thứ khuếch đại bộ não."
L2
Reframe — what was really neededDiễn giải lại — nhu cầu thật
The real ask isn't a code cleanup — it's a context-cost problem. Each session re-pays to learn the same things: it parses 11.4 MB of pitch PDFs, hunts through scattered docs, and re-asks decisions that were already made. The need is a single, cheap, always-found source of truth (a 'second brain') plus a discipline that stops repeated questions.Yêu cầu thật không phải dọn code — đó là bài toán chi phí ngữ cảnh. Mỗi phiên phải trả lại để học đúng những thứ cũ: phân tích 11.4 MB PDF pitch, lục lọi các tài liệu rải rác, và hỏi lại những quyết định đã chốt. Cái cần là một nguồn chân lý duy nhất, rẻ, luôn tìm thấy được (một 'bộ não thứ hai') cùng một kỷ luật để chặn việc hỏi đi hỏi lại.
L3
ConstraintsRàng buộc
  • The repo is already git-clean — videos (692 MB), .next (1.3 GB), and automation tooling are all gitignored. So 'bloat cleanup' was a false lead.
  • The only heavy tracked items are 2 pitch PDFs (11.4 MB), and they're generated from React slides — so the real source already lives in code.
  • Two memory layers exist: Claude's auto-memory (loads each session) and in-repo docs (loads only when read). The trick is to make the cheap one point to the rich one.
  • Strategic knowledge sat in plans/ (untracked), pitch slides, SETUP.md, a gitignored brand JSON, and memory — no single home.
  • Repo vốn đã sạch về git — video (692 MB), .next (1.3 GB) và bộ công cụ tự động hóa đều đã được gitignore. Nên 'dọn rác' là hướng sai.
  • Thứ nặng duy nhất được theo dõi là 2 file PDF pitch (11.4 MB), và chúng được sinh ra từ các slide React — nên nguồn thật đã nằm sẵn trong code.
  • Có hai tầng bộ nhớ: bộ nhớ tự động của Claude (nạp mỗi phiên) và tài liệu trong repo (chỉ nạp khi đọc). Mẹo là làm cho cái rẻ trỏ tới cái giàu thông tin.
  • Kiến thức chiến lược nằm ở plans/ (chưa theo dõi), các slide pitch, SETUP.md, một file brand JSON bị gitignore, và bộ nhớ — không có một nơi duy nhất.
L4
Options weighedCác lựa chọn cân nhắc
  • A) Convert PDFs only — cheap, but leaves market/product knowledge scattered. (Under-solves.)
  • B) Stuff everything into Claude auto-memory — loads free, but bloats every session and isn't shared/version-controlled.
  • C) Full in-repo docs/ + a tiny auto-loaded pointer + decision log (chosen) — versioned, shared, and read on-demand; only a 40-line index loads by default.
  • D) A dynamic RAG/retrieval system — overkill for a single repo; new infra to maintain.
  • A) Chỉ chuyển PDF — rẻ, nhưng kiến thức thị trường/sản phẩm vẫn rải rác. (Giải chưa đủ.)
  • B) Nhồi hết vào bộ nhớ tự động của Claude — nạp miễn phí, nhưng làm phình mỗi phiên và không chia sẻ/quản lý phiên bản được.
  • C) Bộ docs/ đầy đủ trong repo + một con trỏ tự nạp nhỏ xíu + nhật ký quyết định (đã chọn) — có phiên bản, chia sẻ được, đọc theo nhu cầu; mặc định chỉ nạp một mục lục 40 dòng.
  • D) Hệ thống RAG/truy hồi động — quá mức cho một repo đơn lẻ; thêm hạ tầng phải bảo trì.
L5
Principle invokedNguyên tắc áp dụng
Make the free thing point to the rich thing — and write knowledge where it's versioned and shared, not where it's private and reloaded.Hãy để cái miễn phí trỏ tới cái giàu thông tin — và ghi kiến thức ở nơi có phiên bản và chia sẻ được, không phải nơi riêng tư và phải nạp lại.
L6
Pick + recognition signalLựa chọn + dấu hiệu nhận biết
Chose C: a flat docs/ knowledge base with an INDEX as the entry point, pointers in AGENTS.md + one memory line so every session finds it for free, and a decisions.md log to kill repeat questions. Rejected B (auto-memory bloat, not shareable) and D (infra overkill). Recognition signal: when context keeps getting re-derived every session, don't memorize harder — build one cheap index that the always-loaded files point into.Chọn C: một kho tài liệu docs/ phẳng với INDEX làm cửa vào, các con trỏ trong AGENTS.md + một dòng bộ nhớ để mỗi phiên tìm thấy miễn phí, và nhật ký decisions.md để dập tắt việc hỏi lại. Loại B (phình bộ nhớ, không chia sẻ được) và D (thừa hạ tầng). Dấu hiệu nhận biết: khi ngữ cảnh cứ phải dựng lại mỗi phiên, đừng cố ghi nhớ nhiều hơn — hãy xây một mục lục rẻ mà các file luôn-được-nạp trỏ vào.

How the 'second brain' saves tokensVì sao 'bộ não thứ hai' tiết kiệm token

Two files load automatically and for free at the start of every session. Both now point to a tiny index. The index maps to focused docs, so a session reads only the 1-2 it needs — and the 11.4 MB PDFs are never opened.Hai file tự động nạp miễn phí ở đầu mỗi phiên. Cả hai giờ đều trỏ tới một mục lục nhỏ xíu. Mục lục dẫn tới các tài liệu chuyên biệt, nên một phiên chỉ đọc 1-2 tài liệu cần thiết — và các file PDF 11.4 MB không bao giờ bị mở.

Loads free every sessionAGENTS.md / CLAUDE.md + memory indexRead once, cheapdocs/INDEX.md (40 lines)points toOpen only what the task needsstrategy · pitch · market · productarchitecture · roadmap · branddecisions.md — check before askingpublic/pitch/*.pdf (11.4 MB)NEVER read — content is in docs/pitch.md×
Technical termThuật ngữ kỹ thuậtPlain nameTên dễ hiểuRoleVai trò
AGENTS.md / CLAUDE.mdThe always-on instructionsHướng dẫn luôn bậtAuto-loaded into every session at zero extra cost. Now tells any AI tool: read docs/INDEX.md first, never read the pitch PDFs, check decisions.md before asking.Tự nạp vào mọi phiên mà không tốn thêm. Giờ báo cho mọi công cụ AI: đọc docs/INDEX.md trước, không bao giờ đọc PDF pitch, kiểm tra decisions.md trước khi hỏi.
memory MEMORY.mdClaude's cross-session sticky-note indexMục lục ghi chú xuyên phiên của ClaudeAlso auto-loads. Added one line pointing to the brain, so even a fresh Claude session knows the docs/ exists.Cũng tự nạp. Đã thêm một dòng trỏ tới bộ não, nên cả một phiên Claude mới tinh cũng biết docs/ tồn tại.
docs/INDEX.mdThe map + session ritualBản đồ + quy trình mỗi phiên40 lines. A task-to-docs router so a session opens only the 1-2 relevant files instead of everything.40 dòng. Bộ định tuyến từ-công-việc-tới-tài-liệu để một phiên chỉ mở 1-2 file liên quan thay vì mở tất cả.
docs/decisions.mdThe 'already decided' logNhật ký 'đã quyết'Append-only record of settled calls + genuinely-open questions, so settled things are never re-asked.Bản ghi chỉ-thêm gồm các quyết định đã chốt + các câu hỏi thực sự còn mở, nên việc đã chốt không bị hỏi lại.

Read it in 30 seconds: the two files that load for free now point to a 40-line index; the index points to focused docs; the expensive PDFs are routed around entirely.

Lesson to carry forward: you don't reduce context cost by remembering more — you reduce it by giving the always-loaded files a single cheap door (an index) into the deep knowledge, and routing around the expensive artifacts.

Đọc trong 30 giây: hai file nạp miễn phí giờ trỏ tới một mục lục 40 dòng; mục lục trỏ tới các tài liệu chuyên biệt; các PDF tốn kém bị đi vòng hoàn toàn.

Bài học mang theo: bạn không giảm chi phí ngữ cảnh bằng cách nhớ nhiều hơn — bạn giảm nó bằng cách cho các file luôn-được-nạp một cánh cửa rẻ duy nhất (một mục lục) đi vào kho kiến thức sâu, và đi vòng qua các tạo phẩm tốn kém.

What ran, in orderĐã chạy gì, theo thứ tự

1
Scan the repoQuét repo
3 Explore agents mapped structure, found all PDFs, audited docs + git tracking. Key finding: repo is already git-clean; only the 2 pitch PDFs are heavy + tracked.3 agent Explore vẽ bản đồ cấu trúc, tìm hết PDF, soát tài liệu + tình trạng git. Phát hiện chính: repo vốn đã sạch git; chỉ 2 file PDF pitch là nặng và được theo dõi.
2
Confirm + decideXác nhận + quyết định
Verified gitignore covers videos/.next; asked you 3 questions (scope, plans/, PDFs). You chose: keep PDFs + add markdown; advised on the rest.Kiểm tra gitignore đã bao video/.next; hỏi bạn 3 câu (phạm vi, plans/, PDF). Bạn chọn: giữ PDF + thêm markdown; phần còn lại để tôi tư vấn.
3
Build 8 source docsDựng 8 tài liệu nguồn
4 parallel agents distilled pitch slides, market research, code, SETUP, and the brand JSON into strategy/pitch/market/product/architecture/roadmap/brand docs.4 agent song song chắt lọc slide pitch, nghiên cứu thị trường, code, SETUP và brand JSON thành các tài liệu strategy/pitch/market/product/architecture/roadmap/brand.
4
Write the synthesisViết phần tổng hợp
Hand-wrote INDEX.md (map + 4-step ritual) and decisions.md (seeded with settled calls + open questions).Tự tay viết INDEX.md (bản đồ + quy trình 4 bước) và decisions.md (mồi sẵn các quyết định đã chốt + câu hỏi còn mở).
5
Wire the pointersĐấu nối các con trỏ
Updated AGENTS.md, added a memory file + MEMORY.md line, so every session finds the brain for free.Cập nhật AGENTS.md, thêm một file bộ nhớ + một dòng MEMORY.md, để mỗi phiên tìm thấy bộ não miễn phí.
6
Repo hygiene + verifyDọn repo + kiểm chứng
Gitignored plans/ as scratch; confirmed all 9 docs exist, every internal link resolves, PDFs still tracked, plans/ gone from git status.Gitignore plans/ như bản nháp; xác nhận đủ 9 tài liệu, mọi liên kết nội bộ hợp lệ, PDF vẫn được theo dõi, plans/ biến mất khỏi git status.
7
CommitCommit
Held back — commits only on your say-so.Tạm hoãn — chỉ commit khi bạn đồng ý.

Layered decision cardsCác quyết định theo tầng

Where should the brain live — repo docs/ or Claude memory?Bộ não nên ở đâu — docs/ trong repo hay bộ nhớ Claude?
L1You wanted knowledge that doesn't get re-loaded or re-asked every session.Bạn muốn kiến thức không phải nạp lại hay hỏi lại mỗi phiên.
L2Two stores exist: in-repo docs (versioned, shared, read on demand) and Claude auto-memory (loads free, but private + reloaded each time).Có hai kho: tài liệu trong repo (có phiên bản, chia sẻ, đọc theo nhu cầu) và bộ nhớ tự động Claude (nạp miễn phí, nhưng riêng tư + nạp lại mỗi lần).
L3Auto-memory bloats every session if overloaded and isn't shared with the team or other machines; repo docs are free to store but only load when read.Bộ nhớ tự động sẽ phình mỗi phiên nếu nhồi quá nhiều và không chia sẻ cho nhóm hay máy khác; tài liệu repo lưu miễn phí nhưng chỉ nạp khi được đọc.
L4(A) all in memory — free but bloated/private. (B) all in repo — shared but not auto-found. (C) repo docs + a thin memory/AGENTS pointer — best of both. (D) external DB — overkill.(A) tất cả trong bộ nhớ — miễn phí nhưng phình/riêng tư. (B) tất cả trong repo — chia sẻ nhưng không tự tìm thấy. (C) docs repo + một con trỏ mỏng ở memory/AGENTS — tốt nhất cả hai. (D) DB ngoài — quá mức.
L5Source of truth belongs where it's versioned and shared; the auto-loaded layer should be a thin pointer, not the payload.Nguồn chân lý thuộc về nơi có phiên bản và chia sẻ được; tầng tự-nạp nên là con trỏ mỏng, không phải nội dung.
L6Chose C. Rejected A (bloat + not shareable) and D (infra). Recognition signal: keep the always-loaded layer tiny; it should route, not carry.Chọn C. Loại A (phình + không chia sẻ) và D (hạ tầng). Dấu hiệu nhận biết: giữ tầng luôn-nạp thật nhỏ; nó nên định tuyến, không gánh nội dung.
Convert the PDF, or use the React slides as the source?Chuyển từ PDF, hay dùng slide React làm nguồn?
L1"Convert PDFs to Markdown so you never read them again.""Chuyển PDF sang Markdown để không bao giờ đọc lại nữa."
L2The pitch PDFs are generated from src/components/pitch/slides/*.tsx — the real, editable source is code, not the PDF.PDF pitch được sinh ra từ src/components/pitch/slides/*.tsx — nguồn thật, sửa được là code, không phải PDF.
L3The committed PDF turned out to be a stale 22-slide export; the live deck is 26 slides (4 newer slides missing from the PDF).PDF đã commit hóa ra là bản xuất cũ 22 slide; bộ slide hiện tại có 26 slide (PDF thiếu 4 slide mới).
L4(A) pdftotext the PDF — captures the stale version. (B) read the .tsx slides — captures the live version. (C) both, cross-check.(A) pdftotext file PDF — lấy bản cũ. (B) đọc slide .tsx — lấy bản hiện tại. (C) cả hai, đối chiếu chéo.
L5Convert from the source of truth, not the derived artifact.Chuyển từ nguồn chân lý, không phải tạo phẩm phái sinh.
L6Chose C: built pitch.md from the slides, cross-checked numbers against the PDF, and logged the staleness. Recognition signal: when a binary is generated, distill its source, not the output.Chọn C: dựng pitch.md từ slide, đối chiếu số liệu với PDF, và ghi lại việc PDF đã cũ. Dấu hiệu nhận biết: khi một file nhị phân được sinh ra, hãy chắt lọc từ nguồn của nó, không phải từ đầu ra.
What to do with the untracked plans/ folder?Xử lý thư mục plans/ chưa theo dõi thế nào?
L1plans/ held valuable roadmap + market research but wasn't in git (noisy ?? in status).plans/ chứa roadmap + nghiên cứu thị trường giá trị nhưng chưa nằm trong git (hiện ?? gây nhiễu trong status).
L2It's raw working scratch; the durable facts inside it are what matter, not the folder.Đó là bản nháp làm việc thô; cái quan trọng là các dữ kiện bền vững bên trong, không phải thư mục.
L3Committing raw scratch clutters history; deleting risks losing research; leaving it untracked keeps git status noisy.Commit bản nháp thô làm rối lịch sử; xóa thì có nguy cơ mất nghiên cứu; để chưa theo dõi thì git status cứ nhiễu.
L4(A) commit as-is. (B) extract durable facts into docs/, gitignore the rest. (C) leave untracked.(A) commit nguyên trạng. (B) trích dữ kiện bền vững vào docs/, gitignore phần còn lại. (C) để chưa theo dõi.
L5Version the distilled truth; keep the raw scratch local.Quản lý phiên bản phần chân lý đã chắt lọc; giữ bản nháp thô ở máy.
L6Chose B: facts now live in docs/market.md + docs/roadmap.md; plans/ is gitignored but still on disk (nothing lost). Recognition signal: distill-then-ignore beats commit-the-mess.Chọn B: dữ kiện giờ nằm ở docs/market.md + docs/roadmap.md; plans/ bị gitignore nhưng vẫn còn trên đĩa (không mất gì). Dấu hiệu nhận biết: chắt-lọc-rồi-bỏ-qua hơn là commit-cả-mớ-lộn-xộn.

Artifact mapBản đồ tệp tạo ra

PathĐường dẫnWhatLà gìWho reads itAi dùng
docs/INDEX.mdEntry point: doc map + 4-step session ritualCửa vào: bản đồ tài liệu + quy trình 4 bước mỗi phiênEvery session reads this firstMỗi phiên đọc cái này đầu tiên
docs/strategy.mdThesis, TWV Method, differentiation, business model, pricing, GTMLuận điểm, Phương pháp TWV, khác biệt hóa, mô hình KD, giá, GTMPositioning / pitching / strategy workViệc định vị / pitch / chiến lược
docs/pitch.mdFull pitch deck as markdown (replaces the 11.4 MB PDFs)Toàn bộ bộ pitch dạng markdown (thay cho PDF 11.4 MB)Investor narrative — no PDF parsingCâu chuyện gọi vốn — không cần phân tích PDF
docs/market.mdMentor feedback, niche, craft villages, US/EU demand, competitorsPhản hồi cố vấn, ngách, làng nghề, nhu cầu Mỹ/EU, đối thủStrategy / niche / competitor questionsCâu hỏi chiến lược / ngách / đối thủ
docs/product.mdFeature inventory with LIVE / PARTIAL / PENDING statusDanh mục tính năng kèm trạng thái LIVE / MỘT PHẦN / CHỜBuilding or changing a featureXây hoặc sửa một tính năng
docs/architecture.mdStack, the Next.js gotcha, routes, Supabase data model, commandsCông nghệ, lưu ý Next.js, route, mô hình dữ liệu Supabase, lệnhWriting any codeViết bất kỳ dòng code nào
docs/roadmap.mdPhase status refreshed against the real codeTrạng thái các giai đoạn được cập nhật theo code thậtDeciding what to build nextQuyết định xây gì tiếp theo
docs/brand.mdColors, logos, voice, tagline + the color-mismatch warningMàu, logo, giọng điệu, tagline + cảnh báo lệch màuDesign / copy / visual workViệc thiết kế / nội dung / hình ảnh
docs/decisions.mdAppend-only log of settled decisions + open questionsNhật ký chỉ-thêm gồm quyết định đã chốt + câu hỏi còn mởChecked before asking you anythingKiểm tra trước khi hỏi bạn bất cứ điều gì
AGENTS.mdAdded a pointer block: read docs/INDEX.md first, never read pitch PDFsThêm khối con trỏ: đọc docs/INDEX.md trước, không đọc PDF pitchAll agentic tools, auto-loadedMọi công cụ AI, tự nạp
.gitignoreAdded /plans/ as ignored scratchThêm /plans/ làm bản nháp bị bỏ quaKeeps git status cleanGiữ git status sạch
memory/project_vietconnect_brain_in_docs.mdMemory pointer so every Claude session knows the brain existsCon trỏ bộ nhớ để mỗi phiên Claude biết bộ não tồn tạiAuto-loaded via MEMORY.mdTự nạp qua MEMORY.md
Your call — open issues this build surfacedBạn quyết định — các vấn đề còn mở mà lần này phát hiện
  • Decide whether to commit: docs/ + AGENTS.md + .gitignore (suggested message: 'docs: add consolidated knowledge base + session pointers'). Nothing is committed yet.Quyết định có commit không: docs/ + AGENTS.md + .gitignore (gợi ý message: 'docs: add consolidated knowledge base + session pointers'). Chưa commit gì cả.
  • Regenerate the pitch PDFs (npm run pitch:pdf) so the downloadable deck matches the live 26-slide version before sharing externally.Tạo lại PDF pitch (npm run pitch:pdf) để bản tải xuống khớp với bộ 26 slide hiện tại trước khi chia sẻ ra ngoài.
  • Pick ONE canonical brand palette — there's a 4-way mismatch (brand-twv.json vs coded --vc-* tokens vs roadmap hexes vs raw teal-/red- in ~16 files).Chọn MỘT bảng màu chuẩn — đang lệch 4 nguồn (brand-twv.json vs token --vc-* trong code vs mã hex ở roadmap vs teal-/red- thô trong ~16 file).
  • Wire Stripe: checkout/webhook code is complete but pricing CTAs go to /register and price IDs are placeholders → 0 paying customers.Đấu nối Stripe: code checkout/webhook đã xong nhưng nút giá trỏ về /register và price ID còn là giả → 0 khách trả tiền.
  • Decide on i18n: next-intl is installed but 0% configured and the EN/VI toggle is fake — build it or remove it.Quyết định i18n: next-intl đã cài nhưng 0% cấu hình và nút EN/VI là giả — làm thật hoặc bỏ đi.
  • Choose the niche focus: handicraft/home-goods (most validated) vs food ingredients (bigger TAM) — gated by where TWV's on-ground network is strongest.Chọn ngách trọng tâm: thủ công/đồ gia dụng (được kiểm chứng nhất) vs nguyên liệu thực phẩm (TAM lớn hơn) — phụ thuộc mạng lưới thực địa của TWV mạnh ở đâu.

Check your understandingKiểm tra mức hiểu của bạn

What actually makes the 'second brain' cheaper in tokens than the old setup?Điều gì thực sự làm 'bộ não thứ hai' tốn ít token hơn cách cũ?
Why was pitch.md built from the .tsx slides instead of from the committed PDF?Vì sao pitch.md được dựng từ slide .tsx thay vì từ PDF đã commit?
In your own words: why was plans/ gitignored instead of committed or deleted?Bằng lời của bạn: vì sao plans/ bị gitignore thay vì commit hay xóa?
Mastery checklist — tick what you can explain unpromptedBảng tự đánh giá — tích những gì bạn tự giải thích được