tor-to-proposal 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/.claude-plugin/marketplace.json +13 -0
  2. package/.claude-plugin/plugin.json +9 -0
  3. package/LICENSE +21 -0
  4. package/README.md +95 -0
  5. package/SKILL.md +189 -0
  6. package/assets/templates.md +74 -0
  7. package/bin/audit.mjs +60 -0
  8. package/bin/bid-pack.mjs +348 -0
  9. package/bin/cover-letter.mjs +67 -0
  10. package/bin/cv-gap.mjs +90 -0
  11. package/bin/cv-tailor.mjs +261 -0
  12. package/bin/dossier.mjs +32 -0
  13. package/bin/extract.mjs +148 -0
  14. package/bin/financial-proposal.mjs +114 -0
  15. package/bin/lib.mjs +109 -0
  16. package/bin/market-rates.mjs +54 -0
  17. package/bin/package.mjs +234 -0
  18. package/bin/pdf-extract.mjs +135 -0
  19. package/bin/pricing-model.mjs +73 -0
  20. package/bin/profile.mjs +201 -0
  21. package/bin/render.mjs +199 -0
  22. package/bin/simulator.mjs +67 -0
  23. package/bin/template-filler.mjs +160 -0
  24. package/bin/tor-to-proposal.mjs +63 -0
  25. package/commands/tor-audit.md +10 -0
  26. package/commands/tor-bid.md +18 -0
  27. package/commands/tor-cv.md +10 -0
  28. package/commands/tor-pack.md +11 -0
  29. package/commands/tor-price.md +11 -0
  30. package/commands/tor-screen.md +11 -0
  31. package/docs/PROMPT-GUIDE.md +245 -0
  32. package/docs/TECHNICAL-GUIDE.md +211 -0
  33. package/docs/USER-GUIDE.md +228 -0
  34. package/library/SCHEMA.md +45 -0
  35. package/library/bids/.gitkeep +0 -0
  36. package/mcp/server.mjs +358 -0
  37. package/package.json +57 -0
  38. package/references/packs/eu-prag.md +29 -0
  39. package/references/packs/undp.md +30 -0
  40. package/references/packs/usaid.md +29 -0
  41. package/references/packs/worldbank.md +26 -0
  42. package/references/pricing-standards.md +52 -0
  43. package/references/render-specs.md +60 -0
  44. package/references/review-rules.md +38 -0
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "tor-to-proposal",
3
+ "version": "2.0.0",
4
+ "description": "The bid tool that refuses to lie. ToR + CV in -> verified bid pack out: cover letter, tailored CV, technical response, financial proposal, submission checklist. Deterministic CLI + agent skill for UN / NGO / government consultants.",
5
+ "type": "module",
6
+ "bin": {
7
+ "tor-to-proposal": "bin/tor-to-proposal.mjs"
8
+ },
9
+ "files": [
10
+ "bin/",
11
+ "mcp/",
12
+ "commands/",
13
+ "assets/",
14
+ "references/",
15
+ "library/",
16
+ "docs/",
17
+ "SKILL.md",
18
+ "README.md",
19
+ "LICENSE",
20
+ ".claude-plugin/"
21
+ ],
22
+ "scripts": {
23
+ "test": "node test/run-tests.mjs",
24
+ "postinstall": "node -e \"console.log('tor-to-proposal installed. Run: tor-to-proposal init (one-time profile wizard).')\""
25
+ },
26
+ "engines": {
27
+ "node": ">=18"
28
+ },
29
+ "dependencies": {
30
+ "adm-zip": "^0.5.16",
31
+ "exceljs": "^4.4.0",
32
+ "mammoth": "^1.8.0",
33
+ "unpdf": "^1.8.1"
34
+ },
35
+ "keywords": [
36
+ "tor",
37
+ "proposal",
38
+ "un",
39
+ "ungm",
40
+ "undp",
41
+ "consultant",
42
+ "tender",
43
+ "bid",
44
+ "rfp",
45
+ "cover-letter",
46
+ "financial-proposal",
47
+ "cv",
48
+ "agent-skills",
49
+ "mcp"
50
+ ],
51
+ "repository": {
52
+ "type": "git",
53
+ "url": "git+https://github.com/ahaomar/tor-to-proposal.git"
54
+ },
55
+ "homepage": "https://github.com/ahaomar/tor-to-proposal#readme",
56
+ "license": "MIT"
57
+ }
@@ -0,0 +1,29 @@
1
+ # EU PRAG pack (EuropeAid / NEAR / INTPA service & works contracts)
2
+
3
+ ## Where things live
4
+ - Solicitations: EU Funding & Tenders portal (ec.europa.eu/eurostat beyond —
5
+ use the Funding & Tenders portal search); EuropeAid procurement.
6
+ - Rules: PRAG — Practical Guide for contract award (international
7
+ cooperation); the document is authoritative, edition-sensitive, and free
8
+ online. ALWAYS check the PRAG edition named in the ToR.
9
+
10
+ ## Structure conventions to verify
11
+ - Service contracts: full procedure with technical offer + financial offer
12
+ sealed separately; shortlisting stages for restricted procedures.
13
+ - Evaluation grids published in the ToR annexes — often the most detailed of
14
+ any donor (organization, methodology, key experts, proven experience).
15
+ Extract sub-elements verbatim into sub-elements.json for the simulator.
16
+ - Key experts: the grid scores named experts' qualifications — a firm bid
17
+ lives or dies on CV-grid fit (run cv-gap per expert).
18
+
19
+ ## Financial side
20
+ - Price schedule per deliverable or per expert-day; VAT rules by contract
21
+ type (international services often zero-rated, local services not).
22
+ - Global pricing rules in the instructions to tenderers; budget caps stated.
23
+
24
+ ## Watch for
25
+ - Eligibility rules (origin of tenderer, nationality of experts) are strict
26
+ and disqualifying.
27
+ - Declaration on honour + exclusion criteria forms required at submission.
28
+ - Clarification deadlines and a public Q&A published as an annex — check for
29
+ addenda before finalizing; they change grids.
@@ -0,0 +1,30 @@
1
+ # UNDP pack
2
+
3
+ Conventions to verify in the ToR — never assume; UNDP templates vary by
4
+ country office and year.
5
+
6
+ ## Where things live
7
+ - Solicitations: UNGM (ungm.org) → "UNDP" + country; some IC/SSA posts also on
8
+ the country-office site and jobs portals.
9
+ - Rules: UNDP Procurement Policy (pop.undp.org) — the ToR's GCCs derive from it.
10
+ - Vendor registration: UNGM vendor account (needed before award, not always
11
+ before bidding — check the ToR's eligibility section, p.X).
12
+
13
+ ## Typical structure of an individual-consultant (IC) solicitation
14
+ - Two-envelope: technical first; financial opened only above the technical
15
+ threshold (commonly 70/30 technical/financial — VERIFY the split and the
16
+ threshold in the ToR's evaluation section, p.X).
17
+ - Technical grid commonly covers education, relevant experience, methodology/
18
+ approach, languages. Extract the actual grid with extract.mjs; do not reuse
19
+ this sketch.
20
+
21
+ ## Financial side
22
+ - Financial Proposal form is usually an Excel annex — template-filler `map`
23
+ it; totals must remain the form's own formulas.
24
+ - IC contracts are output-based lump sums in most country offices; daily fee
25
+ × estimated days appears in the form; check whether travel is included.
26
+
27
+ ## Watch for
28
+ - "No deviation" GCC acceptance line — echo it verbatim in the cover letter.
29
+ - Clarification deadline is separate from submission deadline.
30
+ - Attested copies of degrees/diplomas sometimes required WITH the offer.
@@ -0,0 +1,29 @@
1
+ # USAID pack
2
+
3
+ ## Where things live
4
+ - Solicitations: sam.gov (US federal single portal) for direct contracts;
5
+ BAA/RFAs on grants.gov; much USAID consultancy flows through implementers
6
+ (Chemonics, DAI, FHI 360, RTI...) who subcontract with their own portals —
7
+ identify WHICH track the ToR belongs to first.
8
+ - Rules: ADS 300s (acquisition/assistance policy), FAR/DFARS for contracts;
9
+ implementers follow their own prime-award terms.
10
+
11
+ ## Conventions to verify
12
+ - Direct contracts: evaluation per FAR 15.3 or best-value tradeoff — the
13
+ ToR/RFQ states the significant factors and their order; mirror them.
14
+ - Subcontracts (most common for consultants): prime's template governs;
15
+ NTE (not-to-exceed) rates; mark-up structures are the prime's, not yours.
16
+ - Personal services contractors (PSC): published salary bands (GS/FS
17
+ equivalents) — a real, citable benchmark for market-rates-research.
18
+
19
+ ## Financial side
20
+ - Rates commonly quoted all-inclusive daily; travel billed separately at
21
+ actuals with caps (Fly America for US-origin travel).
22
+ - Payment terms of the prime flow down — verify payment reputation
23
+ (dossier) before quoting tight contingency.
24
+
25
+ ## Watch for
26
+ - US nationality/citizenship requirements for some PSCs.
27
+ - Organizational conflict-of-interest certifications.
28
+ - OFAC sanctions screening clauses — relevant if you work in sanctioned
29
+ adjacent environments.
@@ -0,0 +1,26 @@
1
+ # World Bank / IFI pack
2
+
3
+ ## Where things live
4
+ - Solicitations: World Bank eProcurement / vendor portal (worldbank.org);
5
+ consultant opportunities under STC (Short-Term Consultant) and firm CQS/RFQ
6
+ tracks.
7
+ - Rules: Procurement Regulations and Consultant Guidance (pubdocs.worldbank.org).
8
+ - Vendor registration: World Bank Supplier Portal (needed for contracting).
9
+
10
+ ## STC (individual consultant) conventions
11
+ - Daily rate + business travel expenses quoted separately; STC maximum daily
12
+ rate schedule exists — the effective ceiling changes by fiscal year: verify
13
+ the current schedule and cite it (source + date) in market-rates-research.
14
+ - Evaluation: CV against stated criteria; sometimes a short technical
15
+ response. Extract the actual criteria; never assume the common
16
+ education/experience/language sketch.
17
+
18
+ ## Firm consultations (CQS/RFQ/RFP)
19
+ - Budget caps are often pre-announced — price discovery is partly given;
20
+ position still matters for the technical/financial mix in RFPs.
21
+
22
+ ## Watch for
23
+ - COI disclosure requirements (relatives at the Bank, prior Bank employment).
24
+ - "Not to exceed X days" ceilings: pricing beyond them is at your risk.
25
+ - Deliverable-based STCs: milestone table drives payment; mirror it in the
26
+ technical response.
@@ -0,0 +1,52 @@
1
+ # Pricing standards — read before step 5 (pricing-model)
2
+
3
+ ## Conventions used by the tool (open constants)
4
+
5
+ - 8 hours/day, 5 days/week, 4.33 weeks/month (173.3 h/month).
6
+ - Formats interconvert from one base rate; every line prints its formula so a
7
+ reviewer can reproduce it with a calculator.
8
+
9
+ ## Loading (overhead multiplier)
10
+
11
+ Loading covers what the ToR does not pay for: insurance, professional
12
+ software, unpaid proposal time, leave without pay, pension. Common practice
13
+ for independent consultants on lump-sum UN/IFI work: 20–35%. Below 20%
14
+ usually means the consultant is subsidizing the client; above 40% needs a
15
+ written justification in your own records. These are conventions to sanity
16
+ check your own number — the number itself is the user's.
17
+
18
+ ## Contingency
19
+
20
+ Contingency prices the risks you can document: payment delay reputation of the
21
+ client (from the dossier), currency/FX exposure, scope-creep-prone
22
+ deliverables, extended review cycles. 5–15% is the common band. Zero
23
+ contingency is a choice, not a virtue — make it consciously.
24
+
25
+ ## Floor (decision rule — printed by every rate tool)
26
+
27
+ ```
28
+ floor = (minimum acceptable net income for the period
29
+ ÷ realistic billable days in that period) + overhead
30
+ ```
31
+
32
+ A quote below floor is a subsidy to the client; a quote above your cited
33
+ benchmark band needs a premium justification (scarce expertise, faster
34
+ delivery, lower client risk).
35
+
36
+ ## Cost-reimbursable vs lump-sum
37
+
38
+ - Cost-reimbursable: time actually worked is invoiced; loading shows as a rate.
39
+ - Lump-sum: you carry delivery risk; loading + contingency belong INSIDE the
40
+ figure — which is also what most client financial forms require (a single
41
+ daily fee or fixed deliverable prices, no visible loading lines).
42
+
43
+ ## Client form discipline
44
+
45
+ - The client's financial form governs. Restructure into it (template-filler),
46
+ never restructure it into your model.
47
+ - If the form forbids loading lines: present the loaded figure only, and keep
48
+ the decomposition in your own pricing.json for your records.
49
+ - Per-team-member breakdowns: each person's rate must individually trace to
50
+ their floor or a cited benchmark.
51
+ - Some forms include honorarium/DSA/transport fields — leave them [FILL]
52
+ unless the ToR states amounts; never guess per-diems.
@@ -0,0 +1,60 @@
1
+ # Render specs — the four final documents
2
+
3
+ You render these with your own document tooling (PDF preferred, docx
4
+ acceptable). `package.mjs` then re-extracts the text of whatever you produce
5
+ and re-runs the audit — so quality here is verified, not assumed. If you have
6
+ no document tooling, `bid-pack pack --fallback-pdf` produces plain but valid
7
+ PDFs with the built-in renderer.
8
+
9
+ Shared rules for all four documents:
10
+
11
+ - A4, margins ≥ 2 cm, single column, no headers/footers that obscure text.
12
+ - Fonts: one serif or sans family; name/credentials exactly as in the profile.
13
+ - File names are fixed — `package.mjs` looks for exactly these:
14
+ `cover-letter.pdf`, `cv-tailored.pdf`, `technical-proposal.pdf`,
15
+ `financial-proposal.pdf` (or `.xlsx` for the financial pack).
16
+ - Page numbers bottom-center on documents longer than one page.
17
+ - No placeholders survive: `[FILL]`, `{{...}}`, lorem, or "TODO" anywhere in
18
+ the rendered bytes is a hard fail.
19
+ - Keep citations readable: "(p.X)" stays inline in the text. `[[PAGE n]]` tags
20
+ are for internal tools and must NOT appear in rendered output.
21
+
22
+ ## Cover letter — Cover-Letter.pdf
23
+
24
+ - Exactly one page. Structure per `assets/templates.md`:
25
+ reference block → understanding (2 sentences, cited) → fit (one block per
26
+ core competency, requirement quoted + evidence) → compliance declarations →
27
+ availability → sign-off matching the CV name + credentials.
28
+ - 11–12 pt body, 1.15 line spacing, date top-right or under the reference
29
+ block, recipient block top-left.
30
+ - No letterhead invention: if the user has no letterhead, plain and clean wins.
31
+
32
+ ## CV — CV.pdf
33
+
34
+ - 2–4 pages. Start with identity (name + credentials, contact), then
35
+ "Most relevant for this assignment" (the tailor's summary block), then the
36
+ full reordered CV, education, languages.
37
+ - Every line traces to the master CV or a user evidence answer — the lint
38
+ already proved this for the markdown; your rendering must not add anything.
39
+ - Never include a photo, marital status, or nationality unless the ToR or the
40
+ user requires it (many UN forms do; follow the ToR, cite the page).
41
+
42
+ ## Technical response — Technical-Proposal.pdf
43
+
44
+ - One section per scored criterion, highest weight first, section numbers and
45
+ titles verbatim from the ToR grid with weight noted ("(p.X, 30 pts)").
46
+ - 10–12 pt body. Tables for work plans / deliverable mapping are welcome —
47
+ they survive re-extraction as text (verify with the pack report).
48
+ - Length follows the ToR: if it caps pages, obey the cap and say so in the
49
+ compliance matrix.
50
+
51
+ ## Financial proposal — Financial-Proposal.pdf / .xlsx
52
+
53
+ - Render from `out/financial-proposal.md` (or fill the client's own form with
54
+ `template-filler` — then the client's form IS the deliverable).
55
+ - The client sees the quote: quantities, all-inclusive unit rates, amounts,
56
+ total, payment schedule, validity, taxes. The floor math (base, loading,
57
+ contingency decomposition) NEVER appears in any client-facing file —
58
+ `pricing.md`/`pricing.json` stay private and are not part of the pack.
59
+ - Money format: thousands separators, 2 decimals, currency stated in the
60
+ header and in every column heading.
@@ -0,0 +1,38 @@
1
+ # Review rules — read before showing the user any draft
2
+
3
+ ## The four questions every paragraph must survive
4
+
5
+ 1. **Trace**: does every fact here trace to the ToR (p.X), a user input, or a cited source?
6
+ 2. **Claim**: did we claim anything the CV does not support? (GAP list is the arbiter.)
7
+ 3. **Client words**: does this paragraph use the client's own terminology, not our synonyms?
8
+ 4. **Score**: which evaluation criterion does this paragraph earn points under? If none, it is decoration — cut it.
9
+
10
+ ## Banned superlatives (cover-letter lint enforces this list)
11
+
12
+ leading, world-class, world leading, renowned, premier, cutting-edge,
13
+ state-of-the-art, best-in-class, unparalleled, top-tier, preeminent,
14
+ unrivaled, foremost, exceptional expertise, vast experience.
15
+
16
+ Replace each with evidence: "led 4 country evaluations (p.X requirement; CV §3)".
17
+
18
+ ## Style
19
+
20
+ - One page cover letter, always.
21
+ - Mirror the ToR's section names for the technical response — evaluators score
22
+ against a grid that follows the ToR's own structure.
23
+ - Quantify every experience bullet. No number available → [FILL] + ask the user.
24
+ - Passive-aggressive hedging ("we hope to potentially...") reads as weakness.
25
+ State facts; cite them; stop.
26
+ - Dates, names, reference numbers: copy-paste from the ToR, never retype.
27
+
28
+ ## Pre-submission checklist (audit.mjs covers 1–3 mechanically)
29
+
30
+ 1. [ ] Zero `[FILL]` remaining.
31
+ 2. [ ] Compliance matrix: every row Complete.
32
+ 3. [ ] No claim-shaped sentence without a trace.
33
+ 4. [ ] Cover letter lint PASS.
34
+ 5. [ ] Simulator at-risk ≈ 0 (or user accepted the residual consciously).
35
+ 6. [ ] Financial form totals are the CLIENT's formulas (we never overwrite them).
36
+ 7. [ ] File names per submission instructions (some portals reject wrong names).
37
+ 8. [ ] Submitted via the ToR's channel only, before the deadline, in the
38
+ timezone the ToR states ("17:00 GMT" is not your local 17:00).