Skip to content

Optimize rfp-import-extractor skill with better architecture#97

Open
seb7152 wants to merge 15 commits into
mainfrom
claude/test-coding-skills-7kzbT
Open

Optimize rfp-import-extractor skill with better architecture#97
seb7152 wants to merge 15 commits into
mainfrom
claude/test-coding-skills-7kzbT

Conversation

@seb7152

@seb7152 seb7152 commented Jan 10, 2026

Copy link
Copy Markdown
Owner

Summary

Comprehensive optimization of the rfp-import-extractor skill following Progressive Disclosure Design Principle:

  • SKILL.md refactored: Reduced from 587 to 458 lines (-22%)
  • script-building-guide.md created: 371-line comprehensive guide for custom extraction scripts
  • 2 reusable templates added: Production-ready extraction scripts for common patterns
  • Better organization: Clear references and modular architecture
  • Packaged skill: Created distributable .skill file for easy sharing

Test plan

  • Verify SKILL.md is <500 lines (now 458 lines)
  • Test script-building-guide.md covers all extraction patterns
  • Validate extract_requirements_simple_excel.py customization points
  • Validate extract_responses_supplier_columns.py customization points
  • Package skill successfully as rfp-import-extractor.skill
  • Verify all files included in the .skill archive

Key improvements

  1. Progressive Disclosure: Content split between SKILL.md (essential), references (detailed guides), and scripts (production-ready templates)
  2. Reusability: Two template scripts cover most common extraction scenarios with clear customization points
  3. Documentation: Comprehensive guide with patterns, edge cases, debugging tips, and performance considerations
  4. Quality: All scripts include proper error handling, logging, and user feedback

🤖 Generated with Claude Code

claude and others added 5 commits January 10, 2026 11:30
Add skill-creator skill to help with creating custom skills for the project.
This provides guidance and tools for building effective skills with proper
structure, documentation, and bundled resources.
Add comprehensive skill for extracting RFP data from Excel and Word files.

Features:
- Interactive analysis of file structure
- Custom extraction script generation
- JSON validation for categories, requirements, and supplier responses
- Comprehensive documentation and guidelines
- Reusable extraction scripts

Components:
- SKILL.md: Complete workflow with 5 steps (analyze, discuss, build, validate, save)
- scripts/validate_json.py: JSON validator for all data types
- references/json_schemas.md: Complete schema definitions with examples
- references/analysis_guidelines.md: File analysis patterns and best practices
- references/recommended_questions.md: User dialogue guidelines

Packaged skill ready for distribution: rfp-import-extractor.skill
Add comprehensive support for tags in requirements extraction.

Changes:
- Updated json_schemas.md with tags section and validation rules
- Added tags to requirements schema and examples
- Implemented tag validation in validate_json.py (1-100 chars, non-empty, array)
- Updated SKILL.md with tags in quick reference and field mapping examples
- Enhanced optional fields questions to include tags extraction guidance
- Re-packaged skill with tags support

Tags features:
- Optional array of strings (tags?: string[])
- Auto-created with random colors
- Deduplicated by name (case-sensitive)
- Validation: 1-100 characters, non-empty
- Use cases: functional areas, priority, status, phases, tech stack

Tested: ✅ Validation works correctly for valid and invalid tags
- Refactor SKILL.md: Reduce from 587 to 458 lines by moving Step 3 content to reference
- Create script-building-guide.md: Comprehensive 371-line guide for custom extraction scripts
- Add extract_requirements_simple_excel.py template: Reusable template for Excel requirements
- Add extract_responses_supplier_columns.py template: Reusable template for supplier responses
- Update Resources section to document new templates and guides
- Package skill as rfp-import-extractor.skill for distribution

Changes align with Progressive Disclosure Design Principle - keeping SKILL.md concise
while providing comprehensive reference materials and production-ready templates.

Improvements:
- SKILL.md now <500 lines (conforme aux recommandations)
- 2 new reusable extraction templates (280+ lines each)
- Better organization with Progressive Disclosure patterns
- Enhanced templates with customization points and full documentation

🤖 Generated with Claude Code

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jan 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
rfp-analyzer Ready Ready Preview, Comment Jan 10, 2026 9:09pm

Strict validation improvements:
- Remove id field from requirements schema (was perturbing users)
- Add strict field validation: reject unknown fields (e.g., "lot", "notes")
- Add category_name validation against categories.json file
- Add summary table showing requirements count per category

Validator enhancements:
- Dual-mode support: basic validation or category reference validation
- Clear error messages for unknown fields
- Category mapping verification (both code and title support)
- Pretty-printed summary table on successful validation

Schema updates:
- Requirements schema now clearly documents allowed fields only
- Warning added: do NOT add extra fields
- Documentation improved for category validation workflow

Documentation:
- Update SKILL.md with strict validation and category validation info
- Update script-building-guide.md with validator output examples
- json_schemas.md clarified with "allowed fields only" note

This ensures data quality and prevents common extraction errors like:
- Extra fields added by accident
- Category mismatches between imports
- Unknown fields silently failing

🤖 Generated with Claude Code

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@seb7152

seb7152 commented Jan 10, 2026

Copy link
Copy Markdown
Owner Author

✨ Validation & Schema Enhancements

Just added critical improvements to validation and data quality:

Strict Validation

  • ❌ Reject unknown fields (prevents errors like "lot", "notes", etc.)
  • ✅ Only allowed fields accepted in JSON
  • 📋 Clear error messages for schema violations

Category Validation

  • ✅ Verify category_name references against categories.json
  • ✅ Support both category code and title matching
  • 📊 Summary table showing requirements per category

Schema Clarity

  • 🗑️ Removed confusing "id" field from requirements
  • ⚠️ Added warnings about "allowed fields only"
  • 📚 Documentation improved

New Validation Mode

# Validate requirements against categories
python validate_json.py requirements.json requirements categories.json

# Output includes:
# ✅ Basic structure validation
# ✅ Category reference validation
# 📊 Summary table with counts per category

This ensures data quality and prevents common extraction errors!

Updated skill package includes all recent enhancements:
- Strict field validation (reject unknown fields)
- Category reference validation against categories.json
- Summary table with requirements per category
- Improved schema documentation
- Enhanced validator with dual-mode support

🤖 Generated with Claude Code

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
seb7152 and others added 2 commits January 10, 2026 19:59
…fields

- Added STRICT MODE for categories validation (rejects unknown fields)
- Ensure short_name, parent_id, order are properly allowed as optional fields
- Clarify in JSON schema that optional fields can be safely omitted
- Prevents malformed category data from being imported

This ensures consistency with requirements validation and maintains data quality
for the import process.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
seb7152 and others added 2 commits January 10, 2026 20:14
- short_name is required in the database (NOT NULL) and displayed in the UI
- Updated JSON schema to mark short_name as Required
- Added validation in validate_json.py: short_name must be 1-50 characters
- Updated script-building-guide.md to generate short_name (can use title abbreviation)
- Updated recommended_questions.md to ask about short_name explicitly
- Updated field mapping examples to show short_name is required

This ensures consistency with the database schema and prevents import failures
when short_name is missing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
seb7152 and others added 4 commits January 10, 2026 20:49
- Added two-pass validation for categories: first checks structure, second validates parent_id references
- parent_id must EXACTLY match the id field of the parent category (case-sensitive)
- NOT a reference to code or title, only to id field
- Updated JSON schema documentation with clear validation rules
- Updated script-building-guide with IMPORTANT notes on parent_id validation
- Validator now provides list of valid ids in error messages for debugging

This ensures category hierarchies are properly validated and prevents invalid
references during import.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
… field handling

Changes:
- Add strict field validation to validate_responses() - rejects unknown fields like categories and requirements do
- Verify and document correct status values (pending, pass, partial, fail) from Supabase database constraint
- Update json_schemas.md with complete status documentation including French labels (En attente, Conforme, etc.)
- Add status mapping examples in script-building-guide.md for handling custom source status values
- Update recommended_questions.md with clear guidance on status handling decision and mapping strategy
- Add guidance for users on whether to import supplier statuses or assign during evaluation

The validator now strictly enforces:
- Only 4 valid status values: pending (default), pass, partial, fail
- No unknown fields allowed in response objects
- Clear error messages for invalid status values

🤖 Generated with Claude Code

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants