feat: rebuild evidence-first application workflow

This commit is contained in:
2026-07-27 17:56:15 +02:00
parent c24892f381
commit fe5f24704f
57 changed files with 3815 additions and 3555 deletions
+55 -302
View File
@@ -1,329 +1,82 @@
---
description: Synthesize completed extractions into the knowledge base files needed for resume generation
user-invocable: true
name: setup-build-kb
description: Build or update the resume knowledge base from structured extractions. Use to normalize employment evidence, maintain the canonical claims registry, add achievements with ownership and metric status, update evidence-tiered skills and role bundles, propagate corrections, and validate the full resume system.
---
# /setup-build-kb
# Build or Update the Knowledge Base
**User input:** `$ARGUMENTS`
## Authority Model
Parse `$ARGUMENTS`:
- Empty → full build (all phases)
- Phase number (e.g., `3`) → resume from that phase
- "experience" / "bundles" / "skills" / "pubs" / "reframing" / "significance" → run only that component
- "status" → show what's built and what's missing
The pipeline is:
---
`source documents -> extractions -> canonical claims -> experience records/bundles -> generated applications`
## Startup
Generated applications never flow backward into the KB.
1. Read `AGENTS.md` — check KB Corrections Log
2. Read `config.md` — load:
- Personal Info (positions, institutions, dates)
- Role Types table (defines which bundles to create)
- Provenance Flags (propagate to all KB files)
- Document Preferences (bullet variant defaults)
3. Read `knowledge_base/extractions/_INVENTORY.md` — verify extractions exist
4. Scan `resume_builder/` to see what's already built
Read `resume_builder/canonical/claims.json`, `config.md`, and all relevant extractions before changing normalized sources. Preserve raw source documents. A verified correction must update canonical claims first and then every dependent normalized file.
**Pre-flight check:**
- If `_INVENTORY.md` is empty or has no entries: "No extractions found. Run `/setup-extract` first." Stop.
- If fewer than 2 extractions: warn "Only [N] extraction(s) found. KB quality improves with more papers. Continue anyway?"
## Canonical Claim Record
Progress: "Found [N] extractions across [M] positions. Config has [K] role types defined."
For each employment item or achievement, record:
---
- stable ID;
- employer, title, dates and location;
- factual scope;
- individual vs shared ownership;
- allowed verbs;
- forbidden overstatements;
- metric/result and verification status;
- evidence source;
- last verified date.
## Phase 1: Build Experience Files
When ownership is ambiguous, use contributing/shared scope and ask the user. Do not default to full ownership.
**Goal:** Create one experience file per position, containing all achievements organized for resume generation.
## Experience Files
**Read:** All extraction files listed in `_INVENTORY.md`
Experience files explain facts and context. They may contain example phrasings, but those examples cannot override canonical scope and should not be optimized to fixed line counts.
**For each position** (from `config.md` or inferred from extraction metadata):
Every achievement section must include canonical ID, source, ownership scope, status, verified result/metric state, relevant skills and role relevance.
1. Group extractions by the position they belong to (based on dates, institution, or user clarification)
2. Ask the user to confirm grouping if ambiguous: "I've grouped these papers under [Position]. Correct?"
## Skills Taxonomy
**Experience file format** (`resume_builder/experience/experience_<position_key>.md`):
Use only these evidence levels:
```markdown
# Experience: [Position Title] — [Institution]
## [Date Range]
- Production — current.
- Production — historical.
- Hands-on — current.
- Project / proof of concept.
- Certification / coursework.
- Unverified / never used.
### Cross-Position Section
[Brief narrative connecting this position's work to the user's broader trajectory]
[CL framing content — how this position fits the career arc]
Do not assign Expert/Proficient/Familiar labels. Add a skill to canonical claims before it can appear in a generated document.
---
## Role Bundles
### Achievement [ID]: [Short Title]
**Source:** [extraction filename]
**Paper:** [citation or "internal"/"unpublished"]
**User's role:** [first author / contributing / sole developer]
**Status:** [published / under review / draft / internal]
Each bundle must contain:
**Context:** [1-2 sentences — what problem, why it matters]
1. Defensible positioning.
2. Good-fit roles and hard-gate cautions.
3. Achievement priorities.
4. Safe reframing rules.
5. Evidence-backed skills guidance.
6. Conditional cover-letter guidance.
**Bullet variants:**
- **2L:** [Full 2-line bullet text — STAR format, ~180-210 rendered characters]
- **3L:** [Full 3-line bullet text — for CV use, ~270-310 rendered characters]
- **1L:** [Condensed 1-line version — ~90-110 rendered characters, for tight budgets]
Bundles may rank evidence; they may not broaden it. Title-defining gaps must be stated explicitly.
**Key skills:** [comma-separated list of skills this achievement demonstrates]
**ATS keywords:** [domain-specific terms an ATS might scan for]
**Reframing notes:** [how to emphasize different aspects for different role types]
## Significance Context
---
[Repeat for each achievement]
Keep company/industry context separate from candidate impact. Mark external claims for re-verification at application time. Never attach generic scale, economics, customers or market trends to the candidate.
## Correction Propagation
After any correction, search canonical claims, config, extractions, experience files, bundles, support files, templates and active drafts. Historical submitted outputs remain unchanged but update `historical_outputs.json` when they become unsafe for reuse.
## Validation
Run:
```powershell
python resume_builder/helpers/validate_resume_system.py
```
### >>>>>> MANDATORY STOP — DO NOT PROCEED <<<<<<
Present the experience file(s) — show achievement count per position, total bullet variants.
Ask user to review: "Are the groupings correct? Any achievements missing or misattributed?"
**You MUST wait for the user's explicit text response before continuing.**
---
## Phase 2: Build Skills Taxonomy
**Goal:** Create a categorized inventory of all technical skills from extractions.
**Read:** All extraction files (Methods & Tools sections) + experience files from Phase 1
**Build** `resume_builder/support/skills_taxonomy.md`:
```markdown
# Skills Taxonomy
## Summary Stats
- Total unique skills: [N]
- Publications: [N] ([breakdown by status])
- Top methods: [ranked list]
## Categories
### [Category 1: e.g., Computational Methods]
| Skill | Proficiency | Evidence | Resume Weight |
|-------|-----------|----------|---------------|
| [skill] | [expert/proficient/familiar] | [paper IDs] | [HIGH/MED/LOW] |
### [Category 2: e.g., Programming & Software]
[same table format]
### [Category 3: e.g., Machine Learning]
[same table format]
[Continue for all categories — typically 4-7 categories]
```
**Proficiency levels:**
- **Expert:** Multiple first-author papers, developed custom tools
- **Proficient:** Used extensively in published work, comfortable teaching
- **Familiar:** Used in one project, or contributed to someone else's implementation
Progress: "Built taxonomy — [N] skills across [M] categories"
---
## Phase 3: Build Publication Metadata
**Goal:** Structured pub data for resume/CV generation.
**Build** `resume_builder/support/pub_metadata.md`:
```markdown
# Publication Metadata
## Summary
- Total publications: [N]
- First-author: [N] | Co-first: [N] | Contributing: [N]
- Published: [N] | Under review: [N] | In preparation: [N]
## Publication List
### First-Author / Co-First
| # | Citation (et al. format) | Journal | Year | Status | Key Topic |
|---|-------------------------|---------|------|--------|-----------|
| 1 | [Author et al., Journal, Year] | [journal] | [year] | [status] | [topic] |
### Contributing Author
[same table format]
### Under Review / In Preparation
[same table format, with provenance notes]
```
Progress: "Pub metadata — [N] first-author, [M] contributing, [K] under review"
---
## Phase 4: Build Achievement Reframing Guide
**Goal:** Per-achievement significance lines + framing directives for each role type.
**Read:** Experience files + `config.md` Role Types
**Build** `resume_builder/support/achievement_reframing_guide.md`:
```markdown
# Achievement Reframing Guide
## How to Use
For each achievement, `Significance:` provides a one-line framing cue.
The role-type table shows how to emphasize/de-emphasize for each target audience.
---
### [Achievement ID]: [Title]
**Significance:** [One sentence — why this matters broadly]
| Role Type | Emphasis | Lead Verb | Framing Angle |
|-----------|----------|-----------|---------------|
| [role 1] | HIGH | Developed | [emphasize X aspect] |
| [role 2] | MEDIUM | Applied | [bridge to Y domain] |
| [role 3] | LOW | -- | [omit or condense] |
**Overclaiming warning:** [if applicable — e.g., "Do not claim sole credit for experimental results"]
**First-pass checklist:** [ ] Verb matches author role [ ] Numbers from paper [ ] Status matches provenance
---
[Repeat for each achievement]
```
### >>>>>> MANDATORY STOP — DO NOT PROCEED <<<<<<
Present the reframing guide summary — show which achievements are HIGH for which role types.
Ask user: "Does this priority mapping look right for your target roles?"
**You MUST wait for the user's explicit text response before continuing.**
---
## Phase 5: Build Bundles
**Goal:** One bundle per role type from `config.md`, with 5 sections each.
**Read:** Experience files + Skills Taxonomy + Reframing Guide + `config.md` Role Types
**For each role type**, create `resume_builder/bundles/bundle_<role_type>.md`:
```markdown
# Bundle: [Role Type Name]
> Target employers: [from config.md]
> Tier: [from config.md]
---
## S1: Role Profile & Priority Matrix
**Positioning:** [1-2 sentences — how to position the user for this role type]
### Priority Matrix
| Priority | Achievement IDs | Rationale |
|----------|----------------|-----------|
| HIGH | [IDs] | [why these lead for this role type] |
| MEDIUM | [IDs] | [supporting evidence, bridge topics] |
| LOW | [IDs] | [omit unless budget allows or JD specifically asks] |
---
## S2: Summary Guide
**Headline pattern:** [Role-appropriate headline template]
**Building blocks:** [3-5 phrases that should appear in summaries for this role type]
**Avoid:** [terms/framings that don't fit this audience]
---
## S3: Achievement Reframing Map
[For each HIGH/MEDIUM achievement: which angle to use, which metrics to lead with]
| ID | Default Framing | This Role's Framing | Key Metric |
|----|----------------|--------------------|-----------|
| [ID] | [generic] | [role-specific angle] | [number to highlight] |
---
## S4: Skills Guide
**Bold tools (resume):** [3-5 tools to bold in Technical Skills for this role type]
**Must-include skills:** [skills that MUST appear for ATS match]
**Nice-to-have:** [skills to include if budget allows]
**Omit:** [skills irrelevant to this audience]
---
## S5: Cover Letter Guide
**Institution type:** [Industry / National Lab / Academic]
**Opening hook pattern:** [template for first paragraph opener]
**Key narrative thread:** [what story to tell across paragraphs]
**"Why them" angle:** [what to research about target employer]
**Avoid:** [CL anti-patterns for this role type]
```
Progress: "Building bundle for [role type] — [N] HIGH priority achievements, [M] bold tools"
---
## Phase 6: Build Significance Research Files
**Goal:** Field context for cover letters — NOT for resume bullets.
**For each position**, create `resume_builder/support/significance_<position_key>.md`:
```markdown
# Significance Research: [Position]
> Use in cover letters and summaries — NOT in resume bullet text.
> These provide field context that demonstrates the user understands the landscape.
---
### [Achievement ID]: Field Context
**The problem:** [What challenge does this address? Industry/scientific context]
**Competing approaches:** [What else exists? What are the limitations?]
**Why this matters:** [Market size, DOE/funding priorities, industry need]
**Differentiation:** [What makes the user's approach unique or better?]
---
[Repeat for each major achievement worth cover-letter depth]
### Field Overview: [Broad Topic]
[2-3 paragraphs of field context that multiple achievements contribute to]
[Useful for cover letter opening hooks and "why this matters" framing]
```
Progress: "Significance research — [N] achievements with field context, [M] field overviews"
---
## Final: Status Report
After all phases complete (or after the requested subset), present:
### KB Build Status
| Component | File | Status | Items |
|-----------|------|--------|-------|
| Experience files | `experience/*.md` | [DONE/MISSING] | [N achievements] |
| Skills taxonomy | `support/skills_taxonomy.md` | [DONE/MISSING] | [N skills] |
| Pub metadata | `support/pub_metadata.md` | [DONE/MISSING] | [N pubs] |
| Reframing guide | `support/achievement_reframing_guide.md` | [DONE/MISSING] | [N entries] |
| Bundles | `bundles/bundle_*.md` | [DONE/MISSING] | [N bundles] |
| Significance | `support/significance_*.md` | [DONE/MISSING] | [N files] |
### Ready for Generation?
- [ ] At least 1 experience file with 5+ achievements
- [ ] Skills taxonomy with 20+ skills
- [ ] At least 1 bundle matching a target role type
- [ ] Pub metadata complete
- [ ] Reframing guide covers all achievements
- [ ] Significance files for cover letter depth
If all checked: "Knowledge base is ready. Save a JD to `JDs/` and run `/make-resume JDs/<filename>.txt`"
If gaps: "[List what's missing and which phase to re-run]"
### >>>>>> MANDATORY STOP <<<<<<
Present status report. Wait for user confirmation.
**You MUST wait for the user's explicit text response before continuing.**
Then review the diff for dates, titles, ownership, metrics and skill evidence. Present the changed claim records and affected downstream files to the user for confirmation.