CLAUDE.md@plugins/lore/templates/docs-layer/.claude · git:20260826.a0581b1 · 2026-08-26 · sha256 161dd3479baef915
CLAUDE.md@plugins/lore/templates/docs-layer/.claude git:20260826.a0581b1A
Immutable. This exact content never changes and is served at /api/v1/blob/161dd3479baef915.
# {{PRODUCT_NAME}} Product Documentation System
You are responsible for writing and maintaining product documentation for {{PRODUCT_NAME}}.
All documentation is written for the product team and must be suitable for long-term maintenance.
Before writing or editing any document, you must strictly follow the Documentation Writing Guidelines and use the Definition of Done (DoD) — the always-on methodology rules imported below — to validate task completion.
**⛔ Failure to comply with any blocking rule means the task is NOT COMPLETE.**
> **Generated by `/lore:init`.** `/lore:init` fills the essentials (product name, language). Run **`/lore:config`** anytime to define or edit the product layer — the project site URL, product description, **§1 Trusted Sources**, the document-writing template, and the brand color. **§3 User Roles** and the **Documentation Structure** you fill in by hand if your product needs them. Until then, those sections carry sensible source-agnostic defaults.
---
## Methodology Rules (managed by the Lore plugin)
The always-on documentation rules — the **General Rules (Rule 1–5)** and the **Definition of Done (§0, §2, §4–§8)** — are product-agnostic and maintained in the Lore plugin. They are imported here from a plugin-owned file that stays up to date automatically (a `SessionStart` hook re-syncs it on `/plugin update`):
@lore-methodology.md
> **Do not edit `lore-methodology.md`** — it is overwritten on plugin update. This `CLAUDE.md` is *yours*: it holds the product-specific layer (below) plus any custom project rules you want to add. The DoD's product-layer sections — **§1 Trusted Sources** and **§3 User Roles** — live here; the rest of the DoD lives in the imported methodology file. Section numbers are unique across both files, so any "§N" reference resolves regardless of which file it is in.
---
## Product Overview — PRODUCT LAYER
> The canonical one-line description of the product (Rule 4). `/lore:config` sets it, and derives the Docusaurus `tagline` and the `docs/intro.md` home page from it. Keep it to one or two sentences here; the expanded, reader-facing version lives in `docs/intro.md`.
_One-line product description not set yet — add it via `/lore:config`._
---
## Prerequisite: Lore Plugin (Documentation Factory)
The documentation **methodology** — the four skills (`lore:figma-to-doc`, `lore:brief-to-doc`, `lore:site-to-doc`, `lore:doc-reviewer`), the supporting subagents (`lore:doc-validator`, `lore:doc-reviser`, `lore:figma-extractor`, `lore:site-explorer`), the BLOCKING-rule enforcement hooks, and the always-on rules in `lore-methodology.md` — is provided by the shared **Lore** plugin, not by this repo. This file (`CLAUDE.md`) carries the product-specific layer (trusted sources §1, user roles §3, product overview, documentation structure) and imports the plugin's methodology rules.
The plugin is wired into this repo at project scope in `.claude/settings.json` (`extraKnownMarketplaces` → `hamidpl/lore`, `enabledPlugins` → `lore@lore-marketplace`), so anyone who clones and trusts this repo gets it automatically. For manual install/enable/update steps, see the [Lore README](https://github.com/hamidpl/lore) — it is the single source of truth for those commands (Rule 4).
---
## Quick Reference
A pointer to the canonical rules — don't restate them here (Rule 4):
- **Image paths** → Rule 1 + §6.
- **Content language ({{DOC_LANGUAGE}}) & file/directory naming** → §7.
- **Before delivery:** always run `npm run build` to validate (only if Docusaurus is installed).
### Essential Commands
```bash
npm install # Install dependencies
npm start # Dev server (http://localhost:3000)
npm run build # Production build — must pass before delivery
npm run serve # Preview production build
npm run clear # Clear Docusaurus cache
```
---
## Definition of Done — Product-Layer Sections
> These two sections complete the DoD; the rest (§0, §2, §4–§8 + Auto-Validation) lives in the imported `lore-methodology.md`. **Violation of any Blocking section means the work is NOT DONE.**
### Section 1 — Trusted Sources — PRODUCT LAYER
Base documentation on the materials the user provides and on any trusted sources configured below. Do not invent facts or rely on assumptions or unverified third-party sources (Wikipedia, other platforms, industry standards). If information is unclear or missing, ask for clarification first; if you get no answer, mark it `[CLARIFICATION NEEDED: ...]` and continue.
This section defines *what* the trusted sources are and how to treat them; the obligation to **read all of them** for the page being documented lives in §0 (Exhaust Every Source).
**Configured trusted sources:**
_None yet — define them via `/lore:config`._
> When trusted sources are configured here, treat them as authoritative: prefer them over external knowledge, and do not deliver documentation that contradicts them.
### Section 3 — User Roles — PRODUCT LAYER
Where a feature behaves differently depending on the user's role, document every relevant role and use the product's approved role names — don't invent new ones. If behavior is identical for all roles, state that explicitly **in plain product language** in the document (e.g. "All users see the same behavior") — never by citing this section or the `.claude/CLAUDE.md` path in the reader-facing doc (Rule 5).
If your product has distinct roles, add a roles table here (name + optional localized name + description); those become the approved names to use. If behavior is identical for all roles, leave this as-is.
---
## Documentation Structure — PRODUCT LAYER
> Define your product's section hierarchy here, and mirror it in `sidebars.ts` and `static/img/`. Replace this example.
```
docs/
├── intro.md # Home page
├── section-name/
│ └── index.md # single-page section
└── large-section/ # split per §2 split rule
├── index.md # overview/hub (sidebar_position: 1)
├── sub-topic-a.md # sibling sub-page (sidebar_position: 2)
└── sub-topic-b.md # sibling sub-page (sidebar_position: 3)
```
Image storage mirrors docs: `static/img/section-name/`, `static/img/large-section/`, …
---
## Docusaurus Architecture (generic)
> Present only if Docusaurus was installed (via `/lore:init` or `/lore:add-docusaurus`). A docs-only project has no `docusaurus.config.ts`.
Docusaurus v3. Key files: `docusaurus.config.ts` (site metadata, i18n, navbar/footer), `sidebars.ts` (must mirror `docs/`), `src/css/custom.css` (shared doc components; plus `custom-rtl.css` for RTL languages), `static/` (served at root — `static/img/x.png` → `/img/x.png`), `docs/` (markdown → pages).
**Locale:** `{{LOCALE}}` · **Direction:** `{{DIRECTION}}` · **Language tag:** `{{HTML_LANG}}`.
---
## Deployment (generic)
**Build:** `npm run build` → static output in `build/`. Deploy that folder to any static host (e.g. Cloudflare Pages, Netlify, Vercel, GitHub Pages). Most common build failure: image path uses `/static/img/` instead of `/img/` → fix the markdown reference.