# ─────────────────────────────────────────────────────────────
# F&B Content Engine — Plugin Manifest
# OpenClaw Plugin · Git Starter Kit
# ─────────────────────────────────────────────────────────────

name: git-plugin-amc
slug: git-plugin-amc          # matches GitHub repo name and openclaw extensions folder
display_name: "F&B Content Engine"
version: "0.9.35"
description: >
  A complete social media operations plugin for F&B brands.
  Manages content from idea to publish across 7 platforms,
  with bilingual support, compliance gates, owner escalation,
  and automated daily/weekly/monthly reporting.
author: "12eat AI Lab"
license: MIT
min_openclaw_version: "1.0.0"

# ── Plugin Categories ─────────────────────────────────────────
tags:
  - f&b
  - restaurant
  - social-media
  - content-engine
  - bilingual
  - chinese-cuisine

# ── Skills Included ──────────────────────────────────────────
skills:
  core:
    - repurpose-chain     # IG-first 7-step repurpose chain
    - hook-engine         # 6 hook types × platform compatibility matrix
    - scheduling          # posting windows + batch workflow
    - content-types       # format specs per platform

  compliance:
    - fda-ftc-rules       # health claims, price truth, promotions
    - allergen-gate       # 9 major allergens checker
    - platform-policies   # TikTok/Meta/GMB specific rules
    - image-rights        # photo licensing and consent rules
    - de-ai-gate          # scrubs robotic phrasing and AI-isms
    - vision-gate         # visual compliance for image/video outputs

  localization:
    - bilingual-gate      # EN/ZH decision tree + canonical dish map
    - brand-voice         # personality, vocabulary, phrase rules

  platforms:
    - instagram           # PRIMARY — 7-slide carousel, reels
    - tiktok              # raw video, 15-60s, hook in 2s
    - rednote             # authentic storytelling, 300-600 chars
    - xiaohongshu         # RedNote execution layer: search/detail/publish/comment workflow
    - facebook            # community-focused, discussion questions
    - youtube             # SEO-optimized, 8-12 min long-form
    - googlemap           # reputation layer, 24h review response
    - x                   # contrarian angle, 280 chars

  operations:
    - kanban-integration  # AMC Kanban system-level operating contract
    - fallback-execution  # mandatory API failure fallback via browser/RPA/manual paths
    - owner-approval      # crisis protocol + compliance hard stops (no approval gate for regular posts)
    - feedback-loop       # team feedback collection, weekly self-assessment, self-improvement
    - vault-manager       # vault file creation and maintenance
    - cron-jobs           # daily 06:30-23:45 automation schedule
    - update-plugin       # handles 'update plugin' command to manually trigger bash update.sh

  bootstrap:
    - onboarding-flow     # self-configuring interview + SOUL.md writer

# ── Skills Discovery ─────────────────────────────────────────
# Tells OpenClaw where to find skills (for `openclaw skills list`)
skills_index: "SKILL.md"
skills_path:
  - "skills/core/"
  - "skills/compliance/"
  - "skills/localization/"
  - "skills/platforms/"
  - "skills/operations/"
  - "bootstrap/"

# ── Skill Packs ──────────────────────────────────────────────
# Skill packs are NOT bundled with this plugin.
# They live in a separate open-source repository and are installed on demand.
#
# Registry:  https://github.com/alextiannus/acm-skill-packs
# Premium:   @12eat-ai/skill-packs-premium (npm private)
#
# Install a pack:
#   openclaw skill-packs install \
#     --repo https://github.com/alextiannus/acm-skill-packs \
#     community/copywriting/aida-engine
skill_packs_registry: "https://github.com/alextiannus/acm-skill-packs"

# ── Agent Template ───────────────────────────────────────────
# When user runs `openclaw plugins install` or `openclaw new-agent --plugin git-plugin-amc`,
# OpenClaw MERGES this block into the agent's existing SOUL.md.
# It does NOT replace the full SOUL.md — only the plugins.git-plugin-amc section is added.
# The agent's own Identity, Channels, model config, and other plugins are untouched.
agent_template:
  soul: "SOUL.md.template"
  merge: true                 # MERGE into existing SOUL.md, do not replace
  merge_key: "plugins.git-plugin-amc"  # only writes to this nested key

# ── Tools Required ────────────────────────────────────────────
tools_required:
  - mcp.web_search
  - mcp.lark.message
  - mcp.lark.drive
  - mcp.calendar

tools_optional:
  - mcp.gbp                 # Google Business Profile: posts + review replies + insights
                            # lightweight custom MCP wrapping free GBP API
  - mcp.analytics           # cross-platform metrics aggregation (Metricool API)
  - mcp.image_gen           # enable if brand allows AI-generated visuals

# ── Config Schema (brand-specific values) ────────────────────
# These are the ONLY values the brand SOUL.md needs to provide.
# Everything else is handled by the plugin.
config_schema:
  brand_name:
    type: string
    required: false
    description: "Official brand name, exact casing (e.g. 12eat唐人街外卖)"

  brand_slug:
    type: string
    required: false
    pattern: "^[a-z0-9]+$"
    description: "Lowercase alphanumeric slug for file paths (e.g. 12eat)"

  brand_niche:
    type: string
    required: false
    description: "One-sentence brand positioning (≤20 words)"

  brand_mission:
    type: string
    required: false
    description: "AI agent's core mission statement"

  markets:
    type: string
    required: false
    description: "Target markets and languages (e.g. North America (en) + 海外华人社区 (zh))"

  active_platforms:
    type: array
    required: false
    items: [instagram, tiktok, rednote, xiaohongshu, facebook, youtube, googlemap, x]
    description: "Platforms with confirmed credentials — agent can auto-publish"

  pending_platforms:
    type: array
    required: false
    default: []
    items: [instagram, tiktok, rednote, xiaohongshu, facebook, youtube, googlemap, x]
    description: "Platforms brand wants but credentials not yet connected — agent plans content, manual publish"

  # owner_lark_id: REMOVED
  # All Lark users who message this bot are treated as brand team members.
  # No single approver — the whole team can send feedback and commands.

  trending_radar_url:
    type: string
    required: false
    default: "https://12eat-ai.sg.larksuite.com/docx/TPb8d2B7Yo16SXxdBDwljnJAg2e"
    description: "Shared Trending Radar Lark Doc URL"

  lark_workspaces_url:
    type: string
    required: false
    default: "https://12eat-ai.sg.larksuite.com/drive/folder/PbugfutjllCDM0dqMiIlN0orgZd"
    description: "AI Workspaces folder URL for vault creation"

# ── Schedule (22 tasks) ───────────────────────────────────────
# Declarative manifest — OpenClaw reads this to display schedule without
# executing the plugin JS. Authoritative registration is done programmatically
# via api.registerSchedule() in src/index.ts on every gateway_start.
# Cron: minute hour dom month dow (UTC). Suspended automatically during Bootstrap.
schedule:
  daily:
    - { cron: "0 8 * * *",  task: topic-discovery }
    - { cron: "0 10 * * *", task: google-maps-actions }
    - { cron: "0 11 * * *", task: lunch-publish-window }
    - { cron: "0 13 * * *", task: lunch-snapshot }
    - { cron: "0 17 * * *", task: dinner-publish-window }
    - { cron: "0 19 * * *", task: dinner-snapshot }
    - { cron: "0 20 * * *", task: comment-dm-reply }
    # - { cron: "30 23 * * *",task: daily-metrics-snapshot } # Paused: daily backup
  weekly:
    - { cron: "30 6 * * 1,4", task: trending-radar-refresh }
    - { cron: "0 8 * * 1",  task: self-improvement-report }
    - { cron: "0 9 * * 1",  task: plugin-version-check }
    - { cron: "5 9 * * 1",  task: pending-platform-reminder }
    - { cron: "10 9 * * 1", task: allergen-pending-check }
    - { cron: "0 10 * * 1", task: weekly-report }
    - { cron: "0 18 * * 5", task: weekly-performance-review }
    - { cron: "0 20 * * 0", task: weekly-content-batch }
  monthly:
    - { cron: "0 10 1 * *", task: monthly-report }
    - { cron: "5 10 1 * *", task: compliance-review }
    - { cron: "10 10 1 * *",task: voice-drift-check }
    - { cron: "15 10 1 * *",task: kpi-reset }

# ── Update Policy ─────────────────────────────────────────────
update:
  channel: stable           # stable | beta | edge
  check_interval: weekly    # daily | weekly | manual
  auto_apply: true          # apply automatically — post_update hook sends Lark confirmation
  notify_via: lark          # how to notify owner of available updates

# ── Vault Templates ───────────────────────────────────────────
vault_templates:
  - vault-index.md
  - brandcontext.md
  - media/media-index.md
  - post/YYYYMMDD-post.md
