Skip to content

feat: replace legacy taxonomy and tag logic with facets - #4

Merged
Flatts3000 merged 2 commits into
developfrom
feature/embeddings
Oct 2, 2025
Merged

feat: replace legacy taxonomy and tag logic with facets#4
Flatts3000 merged 2 commits into
developfrom
feature/embeddings

Conversation

@Flatts3000

Copy link
Copy Markdown
Owner

Replaced the outdated taxonomy system with facet-based filtering (topics, feelings, meanings) stored as post meta. Removed TaxonomyRoute and TaxonomyService classes. Added migrations for facets and embeddings, enhancing semantic search capabilities. Updated related services to leverage facet-based logic and introduced the EmbeddingService for similarity matching. Refined attachment sync and metadata processing workflows for better integration.

Replaced the outdated taxonomy system with facet-based filtering (topics, feelings, meanings) stored as post meta. Removed `TaxonomyRoute` and `TaxonomyService` classes. Added migrations for facets and embeddings, enhancing semantic search capabilities. Updated related services to leverage facet-based logic and introduced the `EmbeddingService` for similarity matching. Refined attachment sync and metadata processing workflows for better integration.
@Flatts3000
Flatts3000 requested a review from Copilot October 2, 2025 01:03
@Flatts3000 Flatts3000 self-assigned this Oct 2, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR replaces the legacy taxonomy and tag system with a facet-based approach for categorizing PostSecret content. The system now uses three distinct facet types (topics, feelings, meanings) stored as post meta, enabling more semantic search capabilities and better AI classification.

  • Migrated from single tag-based taxonomy to structured facets (topics, feelings, meanings)
  • Added embedding service for semantic similarity matching using OpenAI embeddings
  • Updated AI prompt and schema to generate facet-based classifications instead of generic tags

Reviewed Changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
single-secret.php Updates template to display facets organized by type instead of generic tags
parts/card.php Modifies card display to show combined facets with type-aware styling
SchemaGuard.php Updates schema validation to handle facets and removes handwriting field
Prompt.php Major refactor of AI prompt to generate structured facets instead of tags
Metadata.php Adds color filtering for palette generation using perceptual distance
Ingress.php Updates result storage to save facets separately as post meta
EmbeddingService.php New service for generating and managing text embeddings for semantic search
AttachmentSync.php Updates sync logic to use combined facets for captions
AdminMetaBox.php Enhances admin interface to display facets by type with re-classify functionality
postsecret-ai.php Adds embedding generation to processing workflow and re-classify action
TaxonomyService.php Removes legacy taxonomy service (no longer needed)
SearchService.php Updates search to use facet-based filtering instead of tags
ModerationService.php Adds facet management methods for content moderation
TaxonomyRoute.php Removes legacy taxonomy REST route
Secret.php Updates model to use facets instead of tags
run-migrations.php Adds migration runner script
postsecret-admin.php Removes TaxonomyRoute registration
003_embeddings.php Creates embeddings table for semantic search
002_facets.php Migration to remove tag alias table

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread wp-content/plugins/postsecret-ai/src/EmbeddingService.php
Comment thread wp-content/plugins/postsecret-ai/src/EmbeddingService.php
Introduced the PostSecret AI plugin for advanced classification, metadata extraction, and semantic embeddings. Updated admin features to support facet-based classification (topics, feelings, meanings), similarity search, and enhanced moderation workflows. Added migrations for facets and embeddings, integrating them into search and backfill processes. Refined public search with facet filters and enhanced editor capabilities for managing facets.
@Flatts3000
Flatts3000 merged commit 9166b22 into develop Oct 2, 2025
@Flatts3000
Flatts3000 deleted the feature/embeddings branch October 2, 2025 01:08
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