Skip to content

V1]individual] auto label suggestion#1279

Open
clintjeff2 wants to merge 2 commits into
Stellar-Mail:mainfrom
clintjeff2:V1]individual]-Auto-Label-Suggestion
Open

V1]individual] auto label suggestion#1279
clintjeff2 wants to merge 2 commits into
Stellar-Mail:mainfrom
clintjeff2:V1]individual]-Auto-Label-Suggestion

Conversation

@clintjeff2

Copy link
Copy Markdown

Motivation

  • Provide an isolated, deterministic V1 core engine for the Auto Label Suggestion tool so the feature can be reviewed and iterated on without touching the main app.
  • Offer a small, folder-local API and types that capture inputs, outputs, loading/error states, and privacy constraints for future UI integration.

Description

  • Added a folder-local deterministic label engine in tools/v1/individual/auto-label-suggestion/ including services.ts, types.ts, and an index.ts export surface that exposes suggestAutoLabels and validateAutoLabelEmail.
  • Implemented a documented label taxonomy (AUTO_LABEL_TAXONOMY) and rule-based matching using local regex patterns, evidence extraction, scoring, priority-based ranking, and a MAX_SUGGESTIONS cap of three.
  • Returned explainable suggestions with label, confidence (high|medium|low), reason, and evidence, and preserved existing user labels separately from suggestions.
  • Added folder-local Vitest tests (services.test.ts) and a vitest config plus README and review notes that document the API, inputs/outputs, and privacy/no-network guarantees.

Testing

  • Added fixture-backed unit tests that validate the taxonomy, fixture expectations, ranking, explainability, existing-label preservation, and deterministic validation paths using fixtures/email-label-cases.json and services.test.ts (tests are present but not executed to completion in this environment).
  • Attempted to run npm exec vitest run -- --config tools/v1/individual/auto-label-suggestion/vitest.config.ts, but the run failed due to registry access returning 403 Forbidden when fetching vitest (dependencies are not installed here).
  • Attempted to run npx tsc --noEmit --pretty false, but type checking failed in this environment because local dependency type definitions (e.g., vite/client) are not installed.

Closes #325

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.

[V1][individual] Auto Label Suggestion - Core feature engine

1 participant