TechNext · Quy trình Đề xuất Bán hàngTechNext · Sales Proposal Pipeline

Quy trình Đề xuất Bán hàngSales Proposal Pipeline — cơ chế hiện tại— current mechanics

Đây là cơ chế hiện tại của pipeline — không còn là kế hoạch. technext-sales-proposal nay là một orchestrator + 10 sub-skill trong skills/ + 5 loại agent trong agents/, cộng 4 script tất định (bind_check.py, stitch_group.py, validate-proposal.py, ccusage_to_csv.py) — phần đếm/so khớp không giao cho LLM. Sơ đồ dưới vẽ đúng luồng chạy thật: pre-fetch một lần, gate dữ kiện trước khi viết, rồi hai cổng chặn cứng.These are the pipeline's current mechanics — no longer a plan. technext-sales-proposal is now one orchestrator + 10 sub-skills under skills/ + 5 agent definitions under agents/, plus 4 deterministic scripts (bind_check.py, stitch_group.py, validate-proposal.py, ccusage_to_csv.py) — the counting/matching work is never handed to an LLM. The diagram below draws the real flow: pre-fetch once, gate the facts before writing, then two hard gates.

Đầu vàoInputs

Quy trình cần những gìWhat the pipeline consumes

Mọi thứ người dùng cung cấp trước khi quy trình bắt đầu chạy.Everything the user provides before the workflow starts running.

  • Tên/website khách hàngClient name / website
    Yêu cầu tối thiểu để khởi động — "làm sales proposal cho X"Minimum needed to kick off — "make a sales proposal for X"
  • Bản ghi cuộc gọi khám phá (tùy chọn)Discovery-call transcript (optional)
    Dán trực tiếp — nâng cấp độ tin cậy của phần nghiên cứu lên "Đã xác nhận"Pasted in directly — upgrades research confidence to "Confirmed"
  • Checkpoint JSON đã có (tùy chọn)Existing checkpoint JSON (optional)
    Cho phép chỉ chạy lại một phase/nhóm/section thay vì toàn bộ pipelineLets a single phase/group/section resume instead of a full rebuild
Hộp đen · quy trìnhBlack-box · workflow

Bên trong chạy gìWhat runs inside

Một orchestrator điều phối bốn subagent nghiên cứu song song, cộng một worker cho mỗi đối thủ. Mọi con số dưới đây là hiện trạng đã chạy được.One orchestrator dispatches four parallel research subagents, plus one worker per competitor. Every number below is the current, working state.

0
OrchestratorOrchestrator
sales-proposal-run · capable modelsales-proposal-run · capable model
0
Subagent song songParallel subagents
4 nhóm A–D + 1 worker/đối thủ (model rẻ, song song)4 groups A–D + 1 worker per competitor (cheap model, parallel)
0
Tool bên ngoàiExternal tools
GLEIF · Wikidata · Jina Reader · registries (Companies House / OpenCorporates / SEC EDGAR) · WebSearch · validate-proposal.py · ccusage
0
SkillSkills
company-verifier · officers-lookup · web-osint-scanner · source-auditor · chart-data-analyst · checkpoint-manager · front-matter-writer · assembler · mechanical-validator · judgment-reviewercompany-verifier · officers-lookup · web-osint-scanner · source-auditor · chart-data-analyst · checkpoint-manager · front-matter-writer · assembler · mechanical-validator · judgment-reviewer
sales-proposal-run (model mạnh nhất) xác thực danh tính qua company-verifier (GLEIF + Wikidata, miễn phí) + officers-lookup (Companies House / OpenCorporates / SEC EDGAR, miễn phí), rồi web-osint-scanner ghi web-scan.json, nhận diện 2–4 đối thủ và pre-fetch song song mọi URL vào captures/*.md (~39 trang ≈ 1–2 phút, thay cho ~29 phút fetch live). Mỗi đối thủ có một competitor-research-worker (model rẻ, ≤8 fetch / ≤8 phút) trả JSON dữ kiện, và bind_check.py --facts của source-auditor là cổng chặn trước khi Phase 1 chạy. Bốn nhóm A–D đọc section-shell.md (~5 KB, không đọc template 250 KB) + captures/, trả fragment thô; stitch_group.py ghép thành trang xem được. source-auditor merge 4 file findings, gộp nguồn trùng gốc, re-grade, bind-check lại từ cache và sinh sources-citation bằng máy. front-matter-writer viết 6 section đầu, assembler ráp thành 1 file, mechanical-validator (13 check cứng: no-CDN, HTML hợp lệ qua html5lib, đủ 18 chart + 4 sơ đồ…) và judgment-reviewer duyệt lần cuối. ccusage (miễn phí) xuất CSV chi phí thật theo từng task.sales-proposal-run (any capable model) verifies identity via company-verifier (GLEIF + Wikidata, free) + officers-lookup (Companies House / OpenCorporates / SEC EDGAR, free), then web-osint-scanner writes web-scan.json, identifies 2–4 competitors and pre-fetches every URL in parallel into captures/*.md (~39 pages ≈ 1–2 min, replacing ~29 min of live fetching). One competitor-research-worker per competitor (cheap model, ≤8 fetches / ≤8 min) returns facts-only JSON, and source-auditor's bind_check.py --facts is a hard gate before Phase 1 runs. Groups A–D read section-shell.md (~5 KB, never the 250 KB template) + captures/ and return raw fragments; stitch_group.py stitches them into a previewable page. source-auditor merges the 4 findings files, collapses duplicate-origin sources, re-grades, re-runs bind-check from cache and generates sources-citation mechanically. front-matter-writer writes the 6 opening sections, assembler assembles one file, mechanical-validator (13 hard checks: no-CDN, html5lib HTML validity, all 18 charts + 4 diagrams…) and judgment-reviewer sign off. ccusage (free) exports a real per-task cost CSV.
AgentAgents competitor-research-worker research-due-diligence-agent research-ops-tech-agent research-delivery-growth-agent tools-documents-agent
Đầu raOutputs

Người dùng nhận được gìWhat user receive

Năm sản phẩm bàn giao mỗi task, khớp 1:1 với giai đoạn đã tạo ra chúng.Five deliverables per task, mapped 1:1 to the stages that produced them.

HTMLĐề xuất bán hàng song ngữBilingual sales proposal .html

Trang HTML tự chứa ~40 section, 18 biểu đồ + 4 sơ đồ tĩnh, trích dẫn dạng hover-card đã bind-check với nguồn thật.Self-contained ~40-section page, 18 charts + 4 static diagrams, bind-checked hover-card citations.

JSONCơ sở dữ liệu phát hiện, đọc được bằng máyMachine-readable findings base .json

claim/section/nguồn/hạng A-D/Đã xác nhận — để bước sau nạp vào Odoo CRM qua MCP.claim/section/source/grade A-D/Confirmed — for a later MCP step to load into Odoo CRM.

PWABộ file PWA đi kèmCompanion PWA bundle manifest+sw+icons

Manifest, service worker, 2 icon — để bản đề xuất đã giao có thể cài đặt được.Manifest, service worker, 2 icons — makes the delivered proposal installable.

CSVChi phí thật theo từng taskReal per-task cost report -cost-report.csv

Sinh bởi ccusage_to_csv.py sau mỗi task — một dòng một task, tự cảnh báo nếu có model lạ lẫn vào session.Written by ccusage_to_csv.py after each task — one row per task, auto-warns if a foreign model shows up inside a session.

HTMLBảng điều khiển chi phí (tạo một lần)Cost dashboard (built once) cost-dashboard.html

Mở một lần rồi nạp nhiều file *-cost-report.csv để xem bảng gộp, cộng dồn theo lần chạy và tổng — không sinh lại mỗi lần chạy.Opened once, then loads any number of *-cost-report.csv files into a merged table with per-run subtotals and a grand total — not regenerated on every run.

Section 2 · Sơ đồ nodeSection 2 · Node graph

Bên trong quy trìnhInside the workflow — từng giai đoạn— stage by stage

Sáu giai đoạn, trái sang phải — cộng hai cổng chặn cứng: gate --facts (trước khi viết) và source-auditor (Phase 2.5). Mỗi node thể hiện loại, tên, và việc nó làm. Node Agent mang logo Claude và chip model. Rê chuột vào một Agent (trên màn hình) hoặc đọc callout (bản in) để xem thẻ chi tiết đầy đủ.Six phases, left to right — plus two hard gates: the --facts gate (before any writing) and source-auditor (Phase 2.5). Each node shows its kind, name, and what happens in it. Agent nodes carry the Claude brand mark and the model chip. Hover an Agent (screen) or read the callout (print) for its full detail card.

Trigger
Agent · any capable model
Tool
Skill
Deliverable
Section 3 · Điểm chưa khớpSection 3 · Known gaps

Năm chỗ dây nối chưa khớpFive places the wiring does not connect yet

Sơ đồ trên vẽ đúng luồng đang chạy. Phần dưới là những chỗ tài liệu và code chưa khớp nhau — đã kiểm chứng bằng cách chạy thật, không phải suy đoán. Sửa xong thì xoá mục tương ứng khỏi đây.The graph above draws the flow that actually runs. Below are the places where docs and code disagree — each verified by running it, not guessed. Delete an item here once it is fixed.

Hộp đen · chưa khớpBlack-box · not yet wired

Cần sửa để sơ đồ đúng 100%What still needs fixing for the diagram to be 100% true

Xếp theo mức ảnh hưởng: #1 làm mất lợi ích cache, #2–#4 làm gate yếu hơn tưởng, #5 chỉ là nhãn.Ordered by impact: #1 nullifies the cache gain, #2–#4 weaken a gate more than the docs imply, #5 is cosmetic.

  • `captures/manifest.json` — quy ước đường dẫn lệch nhau`captures/manifest.json` — path convention mismatch
    Code resolve trường file theo thư mục chứa manifest, còn ví dụ trong web-osint-scanner/SKILL.md lại ghi "file": "captures/xxx.md" → ghép thành captures/captures/xxx.md → OSError → rơi xuống fetch live, đúng cái ~17,5 phút vừa cắt. Đã kiểm chứng: "abc123.md" → cached, 0 fetched live; "captures/abc123.md" → 1 fetched live. Sửa: đổi ví dụ cho khớp, hoặc cho code thử lần lượt base_dir rồi base_dir/...The code resolves the file field against the manifest's own directory, but the example in web-osint-scanner/SKILL.md writes "file": "captures/xxx.md" → resolves to captures/captures/xxx.md → OSError → falls back to a live fetch — exactly the ~17.5 min the change was meant to remove. Verified: "abc123.md" → cached, 0 fetched live; "captures/abc123.md" → 1 fetched live. Fix: align the example, or have the code try base_dir then base_dir/...
  • Chart có hai chủCharts have two owners
    Nhóm A vẫn được lệnh "build all of these yourself, in this same call" (12 chart) và front-matter-writer dựng 5 chart inline — trong khi chart-data-analyst lại tuyên bố là nơi duy nhất quyết định số liệu cho cả 18 chart. Chạy thật thì chart inline thắng, chart-manifest.json thành file chết.Group A is still instructed to "build all of these yourself, in this same call" (12 charts) and front-matter-writer builds 5 inline — while chart-data-analyst claims to be the single place deciding numbers for all 18. In a real run the inline charts win and chart-manifest.json becomes a dead file.
  • `html-renderer` — tên không tồn tại trên đĩa`html-renderer` — a name that is not on disk
    Thư mục thật là skills/assembler/, nhưng 4 file skill vẫn gọi nó là html-renderer. Trang này đã sửa về assembler; còn phải sửa trong source-auditor (×2), mechanical-validator (×2), chart-data-analyst — hoặc đổi tên thư mục.The real folder is skills/assembler/, yet 4 skill files still call it html-renderer. This page is corrected to assembler; the same fix is still needed in source-auditor (×2), mechanical-validator (×2) and chart-data-analyst — or rename the folder instead.
  • `--facts` chỉ bắt được một nửa số claim`--facts` only catches half the claims
    Hàm quét JSON chỉ nhận dict có đủ cả source_url và excerpt. Schema của competitor-research-worker để positioning và pricing_tier là chuỗi trần, và messaging_themes có source_url nhưng thiếu excerpt → 3 nhóm claim này lọt gate, chỉ strengths/weaknesses được kiểm.The JSON walker only collects dicts holding both source_url and excerpt. competitor-research-worker's schema keeps positioning and pricing_tier as bare strings, and messaging_themes has source_url but no excerpt → those 3 claim groups slip past the gate; only strengths/weaknesses get checked.
  • Check #6 — nhãn cũ, logic đúngCheck #6 — stale label, correct logic
    validate-proposal.py in ra ".assess label on Roadmap/Change Management/Hypercare" nhưng REQUIRED_ASSESS_SECTIONS chỉ còn ["recommendations"] — 5 section cũ đã bị bỏ nên kết quả đúng, chỉ nhãn còn cũ. Không ảnh hưởng PASS/FAIL.validate-proposal.py prints ".assess label on Roadmap/Change Management/Hypercare" while REQUIRED_ASSESS_SECTIONS now holds only ["recommendations"] — those 5 sections were removed, so the result is right and only the label is stale. No effect on PASS/FAIL.
Section 4 · Quyết định toolSection 4 · Tool decisions

Vì sao chọn tool này, bỏ tool kiaWhy this tool, not that one — 4 nhóm quyết định— 4 decision groups

4 nhóm tool được cân nhắc — mỗi cái đánh giá theo đúng 1 câu hỏi: có áp dụng được vào pipeline technext-sales-proposal hiện tại không, và tại sao.4 tool groups considered — each judged on exactly one question: does it actually fit the current technext-sales-proposal pipeline, and why.

Cập nhật sau báo cáo này:Updated after this report: quyết định Crawl4AI dưới đây đã đổi — khi cài thử thật, Crawl4AI bị chính Application Control policy của máy chặn (native DLL _xxhash), không phải do chọn sai tool. Pipeline hiện tại dùng chỉ Jina Reader, không dùng Crawl4AI. Xem web-osint-scanner/SKILL.md để biết quyết định thật hiện hành.the Crawl4AI decision below has since changed — a real install attempt got blocked by this machine's own Application Control policy (a native _xxhash DLL), not a wrong tool choice. The pipeline now uses Jina Reader only, not Crawl4AI. See web-osint-scanner/SKILL.md for the current real decision.

1. Đo chi phí1. Cost tracking

ccusage, Langfuse, Heliconeccusage, Langfuse, Helicone

ccusage

Áp dụng đượcApplies

Đọc trực tiếp log local của Claude Code, miễn phí hoàn toàn, không cần key.Reads Claude Code's local logs directly, fully free, no key needed.

Vì sao:Why: đúng đối tượng cần đo — phiên làm việc Claude Code CLI, không phải app tự viết gọi API.matches exactly what needs measuring — Claude Code CLI sessions, not a hand-built app calling an LLM API.
Đã làm:Done: tích hợp vào judgment-reviewer, xuất CSV có task label + duration.integrated into judgment-reviewer, exports a CSV with task label + duration.

Langfuse

Không áp dụngDoesn't apply

Nền tảng LLM observability — theo dõi app tự viết gọi API LLM, cần nhúng SDK vào code.An LLM observability platform — tracks a hand-built app calling an LLM API, requires embedding an SDK in the code.

Vì sao không:Why not: pipeline này chạy qua Claude Code CLI (skill/subagent), không phải 1 ứng dụng tự viết gọi thẳng API Anthropic — không có chỗ nào để nhúng Langfuse SDK vào.this pipeline runs through the Claude Code CLI (skills/subagents), not a hand-written app calling the Anthropic API directly — there's nowhere to embed the Langfuse SDK.

Helicone

Không áp dụngDoesn't apply

Hoạt động như 1 proxy đứng giữa app và LLM — đổi 1 URL trong code gọi API là xong.Works as a proxy between your app and the LLM — swap one URL in your API-calling code.

Vì sao không:Why not: cùng lý do với Langfuse — không có URL/code gọi API nào để đổi trong Claude Code CLI. Thêm nữa, Helicone vừa bị Mintlify mua lại (3/2026), tương lai dài hạn chưa rõ.same reason as Langfuse — no API-calling URL/code to swap inside the Claude Code CLI. Also, Helicone was just acquired by Mintlify (March 2026), long-term roadmap unclear.

2. Đọc/quét web2. Read/crawl web

Firecrawl, Jina Reader, Crawl4AIFirecrawl, Jina Reader, Crawl4AI

Firecrawl

Được nhưng không tối ưuWorks but not optimal

API biến website thành dữ liệu sạch, có MCP integration sẵn.API that turns websites into clean data, has a ready MCP integration.

Vì sao chưa tối ưu:Why not optimal: free tier có giới hạn (1.000 credit/tháng) và cần đăng ký tài khoản — trong khi Jina Reader làm được việc tương tự mà không cần đăng ký gì.free tier is limited (1,000 credits/month) and needs a signup — while Jina Reader does the same job with no signup at all.

Jina Reader (r.jina.ai)

Áp dụng được — nên dùng thay FirecrawlApplies — recommended over Firecrawl

Chỉ cần thêm r.jina.ai/ trước 1 URL bất kỳ là ra ngay nội dung sạch dạng markdown — không cần key cho request cơ bản.Just prepend r.jina.ai/ to any URL to get clean markdown back — no key needed for basic requests.

Vì sao:Why: zero setup — không đăng ký, không cài đặt, không API key cho việc đọc 1 trang. Đúng nhu cầu web-osint-scanner khi chỉ cần đọc trang chủ/trang About của khách hàng.zero setup — no signup, no install, no API key for reading one page. Fits exactly what web-osint-scanner needs when it's just reading a client's homepage/About page.
Đề xuất:Recommendation: đổi web-osint-scanner dùng Jina Reader cho việc đọc từng trang đơn lẻ.switch web-osint-scanner to Jina Reader for single-page reads.

Crawl4AI

Áp dụng được — giữ cho việc quét nhiều trangApplies — kept for multi-page crawling

Mã nguồn mở, tự cài, hoàn toàn miễn phí, không giới hạn.Open source, self-hosted, fully free, unlimited.

Vì sao:Why: Jina Reader mạnh cho 1 trang, nhưng khi cần quét cả site (nhiều trang liên kết, site JS nặng), Crawl4AI mạnh hơn hẳn — vẫn giữ vai trò riêng, không thay thế Jina Reader mà bổ sung.Jina Reader is strong for one page, but crawling a whole site (many linked pages, heavy JS) is where Crawl4AI is clearly stronger — keeps its own role, complements rather than replaces Jina Reader.

3. Xác minh pháp nhân3. Legal entity verification

GLEIF, Wikidata, SEC EDGAR Full-TextGLEIF, Wikidata, SEC EDGAR Full-Text

GLEIF

Áp dụng được — đã tích hợp làm chínhApplies — already integrated as primary

API miễn phí, không key, chuyên biệt cho mã định danh pháp nhân (LEI) toàn cầu.Free API, no key, purpose-built for global Legal Entity Identifiers (LEI).

Vì sao:Why: đúng nhu cầu cốt lõi của company-verifier — xác thực tên pháp lý/quốc gia/tình trạng hoạt động.matches company-verifier's core need exactly — verifying legal name/country/active status.

Wikidata (SPARQL)

Dùng bổ sung, không thay thếSupplement only, not a replacement

Free hoàn toàn, không key — nhưng là knowledge graph chung (100 triệu+ thực thể), không chuyên biệt cho pháp nhân/LEI.Fully free, no key — but a general knowledge graph (100M+ entities), not specialized for legal entities/LEI.

Vì sao chỉ bổ sung:Why supplement only: SPARQL cần biết gần đúng tên để tra, không mạnh cho việc "xác thực đúng công ty" như GLEIF — nhưng có nhiều dữ liệu khác hữu ích (năm thành lập, người sáng lập) cho phần company-profile.SPARQL needs a roughly-known name to query, not strong for "confirm this is the right company" like GLEIF — but has other useful data (founding year, founders) for company-profile.

SEC EDGAR Full-Text Search

Không áp dụngDoesn't apply

Miễn phí hoàn toàn, tìm được toàn văn hồ sơ nộp lên SEC từ 2001 tới nay.Fully free, full-text search across SEC filings since 2001.

Vì sao không:Why not: chỉ có công ty đại chúng Mỹ (public company niêm yết, phải nộp báo cáo SEC) — khách hàng SME của TechNext hầu như không thuộc nhóm này.only covers US publicly-traded companies (required to file with the SEC) — TechNext's SME clients almost never fall into this group.

4. Kiểm tra/validate HTML4. HTML validation

BeautifulSoup4, lxml, html5validatorBeautifulSoup4, lxml, html5validator

BeautifulSoup4

Áp dụng được — nên đổi sang dùngApplies — recommended switch

validate-proposal.py hiện tại dùng regex (re.findall) để soát HTML — khá thô, dễ báo sai khi format thay đổi nhẹ.The current validate-proposal.py uses regex (re.findall) to check HTML — fairly crude, prone to false results on minor format changes.

Vì sao:Why: đọc đúng cấu trúc DOM thay vì đoán qua chuỗi ký tự — parser khoan dung với HTML thật ("real-world" tolerant), đúng tinh thần validator hiện tại đang cần.reads the real DOM structure instead of guessing from raw text — a parser tolerant of real-world HTML, matching what this validator already needs.
Đề xuất:Recommendation: đổi các check trong validate-proposal.py từ regex sang BeautifulSoup4 để giảm lỗi false positive/negative.switch validate-proposal.py's checks from regex to BeautifulSoup4 to reduce false positive/negative results.

lxml

Không cần thiếtNot necessary

Nhanh hơn, hỗ trợ XPath — mạnh cho xử lý file lớn/XML.Faster, supports XPath — strong for large-file/XML processing.

Vì sao không cần:Why not needed: 1 file proposal chỉ vài trăm KB — tốc độ không phải vấn đề ở quy mô này, thêm lxml chỉ thêm phụ thuộc không cần thiết.one proposal file is only a few hundred KB — speed isn't a problem at this scale, adding lxml is an unneeded extra dependency.

html5lib / html5validator

Áp dụng được — nên thêmApplies — recommended addition

Tuân thủ đúng spec HTML5 — dùng khi cần kiểm tra chuẩn (validator, công cụ sanitize).Strict HTML5 spec compliance — used when spec-correctness is non-negotiable (validators, sanitizers).

Vì sao:Why: regex/BeautifulSoup kiểm tra được "đúng nội dung" nhưng không kiểm tra được "đúng chuẩn HTML5 thật" (thẻ đóng đúng, thuộc tính hợp lệ...) — đây là lỗ hổng hiện tại của validator.regex/BeautifulSoup check "right content" but not "actually valid HTML5" (tags closed correctly, valid attributes...) — this is a real gap in the current validator.
Đề xuất:Recommendation: thêm 1 check mới trong mechanical-validator dùng html5lib để xác nhận file xuất ra là HTML5 hợp lệ thật sự.add a new check in mechanical-validator using html5lib to confirm the output file is genuinely valid HTML5.

Tóm tắt hành độngAction summary

  1. Đổi: web-osint-scanner dùng Jina Reader thay Firecrawl cho việc đọc 1 trangSwitch: web-osint-scanner to Jina Reader instead of Firecrawl for single-page reads
  2. Giữ: ccusage, GLEIF, Crawl4AI — đã đúng việc, không đổiKeep: ccusage, GLEIF, Crawl4AI — already the right fit, no change
  3. Thêm nhẹ: Wikidata bổ sung cho company-profile, không thay GLEIFLight addition: Wikidata to supplement company-profile, not replacing GLEIF
  4. Nâng cấp: validate-proposal.py đổi regex → BeautifulSoup4, thêm check html5libUpgrade: validate-proposal.py switch regex → BeautifulSoup4, add an html5lib check
  5. Bỏ hẳn: Langfuse, Helicone, SEC EDGAR, lxml — không phù hợp quy mô/mục đích pipeline nàyDrop entirely: Langfuse, Helicone, SEC EDGAR, lxml — don't fit this pipeline's scale/purpose