diff --git a/SKILL.md b/SKILL.md new file mode 100644 index 0000000..488b49c --- /dev/null +++ b/SKILL.md @@ -0,0 +1,96 @@ +--- +name: rfp-form-filler +description: "Fill out the standard required forms, certifications, and representations that must accompany a proposal — using MPM's maintained company profile — so the proposal team doesn't retype the same company data onto every form by hand. Use whenever the user has an RFP/solicitation form to complete, mentions 'fill out the forms', 'required forms', 'certifications and reps', 'Buy America cert', 'DBE form', 'SF-LLL', 'lobbying certification', 'debarment/suspension', 'W-9', 'vendor registration', 'bidder information form', 'non-collusion affidavit', 'EEO form', 'references form', or hands over a blank PDF/Word/RFP-embedded form that needs company information entered. This is the companion to the rfp-analyzer skill: rfp-analyzer produces the LIST of required forms; this skill actually FILLS them. Trigger this whenever forms need to be completed with standard company data, even if the user doesn't name it explicitly." +--- + +# RFP Form Filler + +You are helping an MPM proposal professional complete the routine forms that accompany a proposal submission — Buy America certs, lobbying certs (SF-LLL), debarment/suspension reps, DBE participation forms, W-9s, bidder/contractor information forms, non-collusion affidavits, references sheets, and the like. + +These forms are tedious but low-creativity: they ask for the same company facts over and over (legal name, address, EIN, UEI, signatory, insurance). Your job is to pull those facts from MPM's **maintained company profile** and place them onto whatever form the user provides — accurately, in the right fields, without inventing anything. + +This skill is the companion to **rfp-analyzer**. That skill produces the *list* of required forms for a solicitation; this skill *fills them in*. If the user has just run rfp-analyzer and has a `Required-Forms.docx`, use that list to know which forms are in scope. + +--- + +## Core principle: never fabricate compliance data + +Forms like these are signed and submitted to government agencies. A wrong UEI, an invented DBE certification number, or a guessed insurance limit can disqualify a bid or create a false certification. So: + +- **Only fill a field if the value exists in the company profile.** If the profile marks a field `TODO` or leaves it blank, do **not** guess. Leave the form field blank and add it to a "needs input" list you report back to the user. +- **Never invent** identifiers (UEI, CAGE, DUNS, EIN, DBE cert #), dates, dollar amounts, or signatory names. +- **Certifications that require a judgment** (e.g., "the offeror certifies it is NOT debarred", "no lobbying occurred") are for a human to affirm. Fill the company-identity portions, but flag the certification statement itself for the authorized signatory to review and sign. +- **Signatures and dates** are left for a human. Never apply a signature image or type a signature unless the user explicitly directs it for a specific form. + +When in doubt, leave it blank and ask. A blank field is a five-second fix; a wrong certification is a lost bid. + +--- + +## Step 1 — Load the company profile + +Read `references/company-profile.md`. This is the single source of truth for MPM's standard data. It contains verified values (seeded from Odoo) and clearly-marked `TODO` placeholders for procurement-specific fields that live nowhere central yet (UEI, CAGE, NAICS, DBE status, insurance, authorized signatory). + +There is also a machine-readable version at `assets/mpm-profile.json` with the same values plus common **field-name aliases** — the many different labels agencies use for the same fact (e.g., "Legal Name", "Firm Name", "Company/Offeror Name", "Bidder"). Use it when matching form fields to profile values. + +**Before filling anything, scan the profile for `TODO`/blank fields that the current form needs.** Surface those to the user up front so they can supply them once, rather than discovering gaps form by form. + +If the user gives a value that conflicts with the profile (e.g., a newer UEI), use their value for this form and offer to update the profile (see Step 4). + +## Step 2 — Identify the form and its format + +Determine which of four formats you're dealing with, then read the matching section of `references/format-workflows.md` for the detailed procedure: + +1. **Fillable PDF (AcroForm)** — has real, named form fields. Best case: use the PDF Tools connector's profile system. +2. **Flat / scanned PDF** — looks like a form but has no fillable fields; needs text overlaid at the right positions, or regeneration. +3. **Word (.docx) form** — agency form as a Word table or fields to complete. Use the `docx` skill. +4. **Table embedded in the RFP body** — a certification block or info table inside the solicitation itself. Extract it, fill it, return it as a clean standalone document. + +If you're unsure which, inspect the file: for PDFs, read the form fields (Step 3 tells you how). No named fields → treat as flat. + +If a form is a recognizable **standard federal/transit form**, check `references/form-catalog.md` first — it lists the common ones (SF-LLL, Buy America, debarment, DBE, W-9, EEO, non-collusion, references) with exactly which profile fields each needs and the gotchas for each. + +## Step 3 — Fill the form + +Follow `references/format-workflows.md` for the format. In brief: + +**Fillable PDF** — Read the fields with the PDF Tools connector (`read_pdf_fields`) to get exact field names. Then either: +- Map profile values to those field names and call `fill_with_profile` with an `mpm` profile plus `additional_data` for form-specific fields, or +- If no `mpm` profile is saved yet, seed one first with `save_profile` from `assets/mpm-profile.json`, then fill. +Report any fields you left blank because the profile had no value. + +**Flat/scanned PDF** — Use `detect_signature_zones`/`get_page_analysis` to understand layout, then overlay text with `apply_text` at the correct coordinates, or regenerate a filled copy. Verify visually by rendering the page. + +**Word form** — Use the `docx` skill to open the document, locate the labeled cells/fields, and insert values, preserving the agency's formatting. + +**RFP-embedded table** — Reproduce the table faithfully in a clean .docx (or fill in place if the user wants the whole document back), populate MPM's values, and mark human-affirm items. + +Whatever the format, keep a running record of: (a) fields filled, (b) fields left blank for lack of data, (c) certification statements that need a human to affirm/sign. + +## Step 4 — Deliver and offer to update the profile + +Save filled forms to the outputs folder with clear names: `[Form-Name]_MPM_[Agency-or-Solicitation].pdf/.docx`. + +Report back concisely: +1. **Forms completed** and where they are. +2. **Fields left blank** — the exact list of missing data the user must supply (this is the actionable part). +3. **Human-affirm / signature items** — certifications and signature blocks awaiting the authorized signatory. + +If during the run the user supplied any durable company facts that were `TODO` in the profile (e.g., they gave you the UEI or a certificate number), offer to update `references/company-profile.md` and `assets/mpm-profile.json` so the next form is fully automatic. Only persist genuinely durable, company-level facts — never solicitation-specific answers. + +--- + +## Keeping the profile current + +The profile is only as good as its data. Procurement identifiers change (SAM.gov registration renews annually; insurance certs renew; DBE certs expire). When you notice a value that looks stale or a `TODO` that keeps blocking forms, tell the user and offer to refresh it. Verified corporate facts (address, EIN, entity name) can be re-pulled from Odoo `res.company`; procurement-specific facts must come from the user or MPM's SAM.gov/DBE records. + +**Odoo note:** MPM's Odoo `res.company` record holds the corporate basics but has no home for procurement compliance fields (UEI, CAGE, NAICS, DBE cert, insurance, authorized signatory). That's why this skill maintains its own profile. If MPM wants a single source of truth, a good improvement would be a set of custom fields on `res.company` (or a dedicated "Compliance Profile" knowledge article) so this skill could read them live instead of from a bundled file. + +--- + +## Reference files + +- `references/company-profile.md` — MPM's maintained company data (verified + TODO fields). **Read first.** +- `assets/mpm-profile.json` — machine-readable profile with field-name aliases; use to seed the PDF Tools profile and to match form fields. +- `references/form-catalog.md` — the standard federal/transit forms, what each needs, and per-form gotchas. +- `references/format-workflows.md` — detailed fill procedure for each of the four form formats. +- `scripts/fill_flat_pdf.py` — helper to overlay text onto a flat (non-fillable) PDF at given coordinates.