<?php
declare(strict_types=1);

namespace Ekesto\CacheInvalidator\Integrations\Builders;

/**
 * Contract for builder detection and scan profile details.
 */
interface BuilderInterface
{
    /**
     * Return unique builder key.
     *
     * @return string
     */
    public function key(): string;

    /**
     * Detect whether this builder applies to the given post.
     *
     * @param \WP_Post $post Post object.
     * @return array{detected:bool,confidence:string,signals:string[]}
     */
    public function detect(\WP_Post $post): array;

    /**
     * Return additional fields to scan beyond post_content.
     *
     * @return string[]
     */
    public function additionalFieldsToScan(): array;
}
