Featuresmith Icon
Featuresmith
  • Docs
  • SDK
  • CLI
  • Examples
  • Roadmap
v0.4.0
Documentation

Getting Started

  • Introduction
  • Installation
  • Quick Start
  • Tutorial Notebooks
  • Benchmarks
  • Development Setup
  • Contributing

Core Concepts

  • Architecture Overview
  • Dataset Layer
  • Connectors
  • Profiling Engine
  • Rule Engine
  • Dataset Review Engine
  • ML Readiness Score
  • Target Leakage Detection
  • Dataset Diff Engine
  • Target Column Concept
  • Mental Model & Workflow
  • Interpreting Findings
  • Workflow Cheat Sheet
  • Beginner Glossary

Python SDK

  • load()
  • profile()
  • analyze()
  • review()
  • diff()
  • score()
  • plan()
  • Dataset
  • Data Models
  • Profile Models
  • Rule & Finding Models
  • Review Models
  • Score Models
  • Leakage Models
  • Diff Models
  • Exceptions
  • Plugins

CLI Reference

  • analyze
  • review
  • diff
  • score
  • plan
  • Configuration

Guides

  • CI/CD Integration
  • Custom Rules
  • Writing Plugins

Resources

  • Release Notes
  • FAQ
  • Troubleshooting
DocsGuide

Getting Started

  • Introduction
  • Installation
  • Quick Start
  • Tutorial Notebooks
  • Benchmarks
  • Development Setup
  • Contributing

Core Concepts

  • Architecture Overview
  • Dataset Layer
  • Connectors
  • Profiling Engine
  • Rule Engine
  • Dataset Review Engine
  • ML Readiness Score
  • Target Leakage Detection
  • Dataset Diff Engine
  • Target Column Concept
  • Mental Model & Workflow
  • Interpreting Findings
  • Workflow Cheat Sheet
  • Beginner Glossary

Python SDK

  • load()
  • profile()
  • analyze()
  • review()
  • diff()
  • score()
  • plan()
  • Dataset
  • Data Models
  • Profile Models
  • Rule & Finding Models
  • Review Models
  • Score Models
  • Leakage Models
  • Diff Models
  • Exceptions
  • Plugins

CLI Reference

  • analyze
  • review
  • diff
  • score
  • plan
  • Configuration

Guides

  • CI/CD Integration
  • Custom Rules
  • Writing Plugins

Resources

  • Release Notes
  • FAQ
  • Troubleshooting
HomeDocsfs.plan()

Python SDK

fs.plan()

SDK Reference: compile a deterministic Plan from accepted recommendations

python
1def plan(result: ReviewResult, *, accept: list[str] | None = None) -> Plan:

Overview

Compiles a deterministic Plan from the accepted recommendations in a ReviewResult. The Plan is the central domain primitive of the Dataset Contract lifecycle: an ordered, inspectable set of steps derived from accepted recommendations, with full traceability back to the originating findings and reviewers. It is deterministic (the same accepted recommendations always produce the same Plan), inspectable (every step is readable before anything runs), serializable (versioned schema), and AI-independent (a Plan from rules and a Plan from natural language are identical objects).

When to Use It

Use after fs.review() to turn the ranked, explainable recommendations produced by the Recommendation Engine into an actionable, human-reviewable plan. Review the recommendation IDs first, then pass the ones you accept via accept.

Parameters

  • result: ReviewResult. An existing result object produced by fs.review().
  • accept: list[str] | None. Recommendation IDs to include in the Plan. If None or empty, returns an empty Plan.

Raises ValueError if any accepted recommendation ID is not found in the review's recommendations.

Return Value

Returns a Plan dataclass containing:

  • plan_schema_version: str (currently "0.1.0").
  • items: Ordered tuple of PlanItem objects, one per accepted recommendation.
  • source_review_id: Optional identifier of the ReviewResult the Plan was derived from.
  • accepted_recommendation_ids: The recommendation IDs that were accepted to create this Plan.

Each PlanItem includes an id, recommendation_id, title, rationale, confidence (0.0 to 1.0), severity (critical, warning, or info), affected_columns, suggested_action, originating_findings, and originating_reviewers.

SDK Example

python
1import featuresmith as fs
2
3result = fs.review("data.csv", target_column="label")
4
5# Inspect the ranked recommendations first
6for rec in result.recommendations:
7 print(f"{rec.id} [{rec.severity}] {rec.title}")
8
9# Accept the ones you want in the plan
10plan = fs.plan(result, accept=["rec.quality.missingness.cabin"])
11
12for item in plan.items:
13 print(f"{item.id}: {item.title}")
14 print(f" Action: {item.suggested_action}")

How Recommendations Are Generated

The centralized Recommendation Engine merges findings from every review section into a single ranked, explainable list. Findings affecting the same column with the same rule category are grouped into one recommendation, and each recommendation is ranked by severity (descending), then confidence (descending), then number of affected columns (descending). Recommendation IDs follow the pattern rec.<rule_category>.<column> (for example, rec.quality.missingness.cabin).

Notes and Limitations

  • Advisory Only: The Plan is purely advisory — nothing is auto-applied. Executing the steps (code generation, dataset mutation) is planned for a future release.
  • Empty by Default: Calling fs.plan() without accept returns an empty Plan.

Related Documentation

See the review SDK reference fs.review(), the review models reference Review Models, and the CLI counterpart featuresmith plan.

Explore

  • Quick Start
  • Python SDK
  • CLI Reference
  • Examples
Featuresmith Icon
Featuresmith

Open-source data profiling and validation for Python engineers.

Documentation

  • Introduction
  • Quick Start
  • Python SDK
  • CLI Reference

Community

  • GitHub
  • Discussions
  • Issues
  • Contributing

Project

  • Roadmap
  • Release status
  • Benchmarks
  • Changelog
  • Examples

Legal

  • Apache 2.0 License
  • Code of Conduct
  • Security

© 2026 Featuresmith Contributors. Released under the Apache 2.0 License.

Built by Aditya Gangwani in the open.