AgentSkillsCN

Feature Breakdown

将功能拆解为可实施的任务

SKILL.md
--- frontmatter
type: skill
name: Feature Breakdown
description: Break down features into implementable tasks
skillSlug: feature-breakdown
phases: [P]
generated: 2026-01-20
status: filled
scaffoldVersion: "2.0.0"

Feature Breakdown Skill

When to Use

Use this skill when:

  • Planning new features for the contract indexing system
  • Breaking down complex features into tasks
  • Estimating effort and dependencies
  • Identifying integration points

Feature Decomposition Approach

Break features into logical components following project structure:

Core Components

  1. Indexing Layer (indexer.py)

    • PDF extraction
    • Document classification
    • Database operations
  2. Search Layer (search.py)

    • Full-text search
    • Filtering
    • Result formatting
  3. Organization Layer (organize.py)

    • Document organization
    • Report generation
    • Statistics
  4. Metrics Layer (metrics.py)

    • Success indicators
    • Performance metrics
    • Extraction statistics

Task Estimation Guidelines

Small Features (1-2 hours)

  • Adding new filter to search
  • Adding new metadata field
  • Improving error messages

Medium Features (4-8 hours)

  • New extraction method
  • Enhanced classification
  • New report format

Large Features (1-3 days)

  • OCR implementation
  • Database schema changes
  • New CLI command

Dependency Identification

Common Dependencies

  • Database: Changes to indexer.py may affect search
  • Classification: New document types require classification updates
  • Metrics: New features should include metrics tracking

Example: OCR Feature Breakdown

  1. Extraction Layer

    • Add OCR dependency check
    • Implement OCR extraction function
    • Integrate with existing extraction
  2. Database Layer

    • Add extraction_method field
    • Add extraction_metrics table
    • Update schema creation
  3. Metrics Layer

    • Track OCR usage
    • Report OCR statistics
    • Success indicators
  4. Documentation

    • Update README
    • Add OCR installation instructions
    • Document OCR workflow

Integration Points

Database Schema Changes

  • Schema migration
  • Backward compatibility
  • Index updates

Search Integration

  • New filter parameters
  • Result formatting changes
  • Export format updates

Metrics Integration

  • New metrics tracked
  • Indicator calculations
  • Report generation

Examples from Project

Feature: OCR Support

Breakdown:

  1. Add OCR dependencies (requirements.txt)
  2. Implement OCR extraction function
  3. Integrate OCR fallback in main extraction
  4. Add metrics tracking for OCR usage
  5. Update README with OCR instructions
  6. Test with scanned PDFs

Feature: Export Format

Breakdown:

  1. Add export format option to search
  2. Implement export function
  3. Add format validation
  4. Test export functionality
  5. Update documentation

Checklist

When breaking down features:

  • Identify core components affected
  • List database changes needed
  • Identify integration points
  • Estimate effort for each task
  • Consider dependencies
  • Plan testing approach
  • Document in plan or issue