Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
e7aaf4d
chore(docs): relocate doc sources via git mv for the docs pipeline
interacsean Jul 24, 2026
2ab5dd5
feat(docs): docs-management pipeline (docs-kit, outlines, AppShell re…
interacsean Jul 24, 2026
2c09db2
fix(docs-kit): strip leading body H1 to avoid double header
interacsean Jul 28, 2026
ba99a63
feat(docs): render live examples inline at their doc position
interacsean Jul 28, 2026
771815e
refactor(docs): colocate authored sources in src; docs/ is pure output
interacsean Jul 28, 2026
8fc0c52
refactor(docs): move the docs browser to top-level /docs-browser
interacsean Jul 28, 2026
168865c
feat(docs-kit): generate per-unit docs-browser route stubs from the m…
interacsean Jul 28, 2026
f72bb40
docs(resync-docs): correct authored-source filenames to .docs.outline…
interacsean Jul 29, 2026
135c419
docs(decision-record): align with implemented architecture
interacsean Jul 29, 2026
069fb0e
feat(docs): add route-driven modal variant to the form-modal pattern POC
interacsean Jul 29, 2026
3b4ab95
docs(styling): derive styling concept from the original styling-themi…
interacsean Jul 29, 2026
68bec7a
feat(docs-browser): render markdown tables with the AppShell Table
interacsean Jul 29, 2026
5c045de
feat(docs-browser): styled headings + Preview/Code tabs for examples
interacsean Jul 29, 2026
e2266c4
feat(docs-browser): consistent code-block styling (no highlighting yet)
interacsean Jul 29, 2026
7d2b9c7
fix(docs): drop `Layout fill` from the dense-scan example so the docs…
interacsean Jul 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .agents/skills/resync-docs/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
name: resync-docs
description: Regenerate component/pattern documentation when docs-kit reports drift. Use when `docs-kit check` (or CI) fails with interface-drift, outline-changed, or missing-output findings, or when the user asks to "resync docs", "update the docs for X", or "/resync-docs". This is the ONLY sanctioned way to change generated docs — never hand-edit files under docs/.
---

# Resync docs

The docs pipeline is one-way: **outlines + source → generated docs**. Humans (and this skill) edit only two things — the `*.docs.outline.md` (intent) and the `*.docs.examples.tsx` (runnable examples), both authored SOURCE colocated in `src`. Everything under `docs/` is generated by `docs-kit` and must never be hand-edited. See [decisions/documentation-management-overhaul.md](../../../decisions/documentation-management-overhaul.md).

## When to run

- `docs-kit check` fails (locally or in CI) with a blocking finding.
- A component's interface changed and its docs need to catch up.
- The user asks to add or revise a documented example.

## Inputs

An optional list of unit slugs. If omitted, run `docs-kit check` first and act on every blocking unit it names.

## Procedure

For each drifting unit:

1. **Identify what changed.** Run the gate and read the finding:

```bash
node packages/docs-kit/dist/cli.mjs check --root .
```

- `interface (type surface) drifted` → the exported API changed. Re-read the unit's `sources` and update the outline prose + `*.docs.examples.tsx` so they still match. Check whether any example now uses a removed/renamed prop.
- `outline edited` → expected after you edit the outline; just resync.
- `… was hand-edited or is stale` → someone edited a generated file directly. Do **not** keep that edit; move the intent into the outline/examples, then regenerate.

2. **Edit intent only** — the two authorable surfaces:
- `*.docs.outline.md` (colocated with the component, or under `docs-src/` for concepts/patterns/references): prose is copied verbatim; example segments are keyed English tokens `<!-- example: kebab-key | instruction -->`.
- `*.docs.examples.tsx` (colocated with the outline in `src`, a sibling of the `*.docs.outline.md`): one exported component per token, named in PascalCase matching the token (`basic-usage` → `BasicUsage`). Keep every example **compiling against `@tailor-platform/app-shell`** and minimal. When iterating, treat the current file as the baseline and change only what the interface change forces — do not rewrite untouched examples.

3. **Regenerate deterministically** (no hand-editing of `.md`):

```bash
node packages/docs-kit/dist/cli.mjs sync --root .
```

This rewrites the `.md`, extracts fences from `*.docs.examples.tsx`, refreshes the API section, updates `docs/docs-manifest.json` hashes, and (re)generates each unit's docs-browser route stub under `docs-browser/src/pages/<category>/<slug>/page.tsx` — so a brand-new unit appears in the browser with no manual wiring.

4. **Verify green:**

```bash
node packages/docs-kit/dist/cli.mjs check --root . # expect exit 0
```

5. **Review the diff.** Confirm prose reads well, examples are idiomatic, and the manifest changes are limited to the units you touched.

## Rules

- Never edit files under `docs/` by hand — only `*.docs.outline.md` and `*.docs.examples.tsx`. The docs-browser route stubs (`docs-browser/src/pages/**/page.tsx`, except the authored app-shell files: `App.tsx`, `_lib/`, and the home `pages/page.tsx`) are likewise generated by `sync` — never hand-edit them.
- One example export per token; keep them runnable (they are type-checked in CI).
- Regenerate only what changed; a clean tree must produce a zero-diff `sync`.
- Also refresh the generated `app-shell-patterns` consumer skill when component interfaces change (future: `docs-kit sync` will emit it).

## Related

- `packages/docs-kit` — the extractor / gate / assembler.
- `docs.config.json` — roots, categories, coverage enforcement, exclusions.
50 changes: 0 additions & 50 deletions catalogue/src/pattern/form/modal/modal-form.tsx

This file was deleted.

42 changes: 0 additions & 42 deletions catalogue/src/pattern/list/dense-scan/dense-scan.tsx

This file was deleted.

Loading