---
name: vault-manager
description: "Vault file creation and maintenance"
plugin: git-plugin-amc
---

# Skill · Vault Manager
# F&B Content Engine · operations/vault-manager.md
# ─────────────────────────────────────────────────

## Purpose

Define the vault structure, file naming conventions, and maintenance rules.
The vault is the brand's operational memory. 
While the folder structure is managed identically to a file system, the core databases (Schedule and Media) are implemented as native **Lark Bitables (多维表格)**, and post records are native **Lark Docx (飞书文档)** to enable rich UI collaboration.

---

## Vault Structure

```
vault-{brand}/
│
├── vault-index.md               ← Master index and quick-reference (converted to Docx)
│
├── brand/
│   ├── ownerreview.md           ← Owner feedback ledger (converted to Docx)
│   └── owner-profile.md         ← Owner Lark ID, contact preferences, SLA, timezone
│
├── media/
│   ├── Media Index              ← Native Lark Bitable (Generated by create-vault.js)
│   └── YYYY-MM-DD_{slug}/       ← One folder per topic or shoot
│       ├── raw/                 ← Original files, never edited
│       ├── edited/              ← Final versions used in posts
│       └── consent/             ← Consent screenshots for customer/third-party media
│
├── post/
│   ├── Content Schedule         ← Native Lark Bitable (Generated by create-vault.js)
│   └── YYYY-MM-DD_{slug}        ← Native Lark Docx Record per published topic
│
└── report/
    ├── report-rules.md          ← KPI definitions and reporting standards
    ├── analytics/               ← On-demand analytics reports
    │   └── YYYY-MM-DD_{slug}    ← Native Lark Docx
    ├── weekly/                  ← Auto-generated every Monday
    │   └── YYYY-Www             ← Native Lark Docx
    └── monthly/                 ← Auto-generated 1st of every month
        └── YYYY-MM              ← Native Lark Docx
```

---

## Tooling Requirements

To interact with the Vault, use your Feishu OpenClaw tools:
- `lark.bitable.search` and `lark.bitable.update` for reading/updating the Post Schedule and Media Index.
- `lark.docs.create` and `lark.docs.read` for writing drafts and reading owner feedback.
- `lark.message.send` (interactive card) for escalations.

---

## 1. Content Schedule (Native Bitable)

The `Content Schedule` is a native Lark Bitable generated during setup.
It contains the following columns:
- `Date` (DateTime)
- `Time` (Text)
- `Platform` (Single Select)
- `Topic Slug` (Text)
- `Format` (Text)
- `Status` (Single Select: `draft`, `pending-approval`, `approved`, `published`, `rejected`, `held`)
- `Post Record` (URL: Link to the Post Record Docx)

**Rules:**
- Read the Bitable every morning at 08:00 to find posts marked as `approved`.
- Once a post is published, update the status to `published`.
- Never delete rows. Use the `held` or `rejected` status instead.

---

## 2. Post Records (Native Docx)

When drafting a new post idea, generate a new Lark Docx via `lark.docs.create`.
Name it: `YYYY-MM-DD_{slug}`

The Docx must be structured with Headers:

```markdown
# [Topic Slug] - Content Draft

## Platforms
- Instagram: [Format]
- TikTok: [Format]

## Draft Copy
[Write the localized drafts here]

## Owner Feedback
[Leave this blank for the owner to write their feedback, or use the native Docx comments feature]
```

**Feedback Loop:**
When the owner asks for a revision, use `lark.docs.read` to fetch the current Docx, parse their inline comments or text additions, and rewrite the draft directly in the Docx using `lark.docs.update`.

---

## 3. Media Index (Native Bitable)

The `Media Index` Bitable tracks visual assets.
It contains the following columns:
- `Date` (DateTime)
- `Folder` (Text)
- `Content` (Text: e.g. "Dish hero shot")
- `Source` (Single Select: `Brand-owned`, `Customer`, `Stock`)
- `License` (Text)
- `Used In` (Multiple Select: Platforms)
- `File` (Attachment)

**Rules:**
- When preparing an `approved` post, fetch the corresponding media attachment from the Bitable using the Lark Drive API to upload it to the social platform.

---

## Vault Maintenance Rules

1. **Keep Bitable Statuses Synced:** Always ensure the `Status` column in the Post Schedule matches reality.
2. **Never hallucinate URLs:** If creating a new Docx, use the URL returned by the `lark.docs.create` tool and insert it into the `Post Record` column of the Bitable.
3. **Respect Owner Feedback:** If an owner leaves a comment in a Docx, immediately fetch it, modify the content, and ping the owner via Lark chat: "草稿已根据您的文档批注更新，请查看！"
4. **ownerreview is append-only.** Never edit past entries in the owner review Docx.
