# Pastiche Sync

> Use when refreshing `pastiche/FACT.md` after a design-system upgrade, refactor, or token change — re-runs the extractor and surfaces drift via lint. FACT-only; never touches KNOWLEDGE/WISDOM/config and never walks the user through remediation.

- **Type:** Skill
- **Install:** `agentstack add skill-retz8-pastiche-pastiche-sync`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [retz8](https://agentstack.voostack.com/s/retz8)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [retz8](https://github.com/retz8)
- **Source:** https://github.com/retz8/pastiche/tree/main/dist/claude-code/skills/pastiche-sync

## Install

```sh
agentstack add skill-retz8-pastiche-pastiche-sync
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Pastiche — sync

Refresh FACT after the user's DS changes. Extractor regenerates `pastiche/FACT.md`; lint surfaces orphaned tags in KNOWLEDGE/WISDOM. The user remediates manually.

## Preflight

1. Resolve repo root: `git rev-parse --show-toplevel`; on failure, fall back silently to cwd. Print: *"Syncing `/pastiche/FACT.md`."*
2. If `/pastiche/config.yaml` does not exist, stop:
   > `/pastiche/config.yaml` not found. Run `/pastiche-init` first.

## Extract FACT

Shell: `extract-fact` (cwd = ``). It is on PATH via the plugin's `bin/` — do not search for it. Block on completion.

On non-zero exit, print stderr verbatim and stop. Do not run lint — FACT may be stale or unwritten. The extractor's own message (config parse error, missing input file, etc.) is the actionable surface.

On success, the extractor prints `"Wrote pastiche/FACT.md:  components,  tokens."` to stdout. Forward it as-is.

## Lint self-check

Shell: `pastiche-lint` (cwd = ``). It is on PATH via the plugin's `bin/` — do not search for it. Block on completion.

Forward stdout (summary) verbatim. If exit is non-zero, also forward stderr (violations) verbatim. No reformatting.

Classify the outcome by exit code + stdout shape:
- **Clean** — exit 0.
- **Drift** — non-zero exit, stdout summary present.
- **Crash** — non-zero exit, no stdout summary. The lint script itself broke; this is not user-visible drift.

Sync itself never exits non-zero on lint output. Carry the classification into Close.

## Close

Print exactly one of:

**Clean:**
> Pastiche synced. FACT.md regenerated; no drift detected.
>
> Run `git diff pastiche/FACT.md` to inspect changes.

**Drift:**
> Pastiche synced — FACT.md regenerated, lint surfaced drift (see violations above).
>
> Remediate by editing `pastiche/WISDOM.md` / `pastiche/KNOWLEDGE.md` directly, or use `/pastiche-write-wisdom` / `/pastiche-write-knowledge` to add or replace rules. Run `git diff pastiche/FACT.md` to inspect the FACT changes that triggered the drift.

**Crash:**
> Pastiche synced. FACT.md was regenerated successfully, but the lint script crashed unexpectedly (output above). Report this to the pastiche maintainers.
>
> Run `git diff pastiche/FACT.md` to inspect changes.

Do not invoke another skill. Do not suggest `/pastiche-setup` — it is curation, not remediation.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [retz8](https://github.com/retz8)
- **Source:** [retz8/pastiche](https://github.com/retz8/pastiche)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-retz8-pastiche-pastiche-sync
- Seller: https://agentstack.voostack.com/s/retz8
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
