Skip to content

Commit 8978d3b

Browse files
committed
docs
1 parent 271f04a commit 8978d3b

589 files changed

Lines changed: 815 additions & 523 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/AGENTS.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
- Answer in English by default. Switch languages only when the user explicitly asks for another language.
44
- Prefer the best long-term architecture fix over the nearest local patch. If the real fix is an API or abstraction change, do that.
55

6-
- Internal agent docs live under `.claude/docs/`, not `docs/`. Put solution docs in `.claude/docs/solutions/` and plans in `.claude/docs/plans/`.
6+
- Internal agent docs live under `docs/`, not `docs/`. Put solution docs in `docs/solutions/` and plans in `docs/plans/`.
77

88
## Git
99

@@ -19,7 +19,7 @@
1919
## Packages
2020

2121
- DX: Optimize for the absolute best developer experience. JSDoc must be first-class for agents. Every API surface should be intuitive for both humans and AI agents.
22-
- Docs: NEVER write changelog-style language ("has been removed", "new feature", "previously", "now supports"). Docs are user-facing reference for the LATEST state only. Write as if no prior version exists. No migration notes, no "what changed" — just document what IS. Follow .claude/docs/solutions/style.md for writing tone/structure.
22+
- Docs: NEVER write changelog-style language ("has been removed", "new feature", "previously", "now supports"). Docs are user-facing reference for the LATEST state only. Write as if no prior version exists. No migration notes, no "what changed" — just document what IS. Follow docs/solutions/style.md for writing tone/structure.
2323
- Templates: `templates/**` is CI-controlled output. Never manually edit or commit template source, manifests, or lockfiles during package/app work. If local verification rewrites template files, restore them before handoff. Only change `templates/**` when the user explicitly asks for template work.
2424
- Do not write TDD cases for dead code/legacy removal assertions (for example: "should not contain old API X anymore"). Remove the dead path directly and keep tests focused on current behavior.
2525
- Prefer inline when used once; extract constants only when reused.
@@ -43,9 +43,9 @@ When using the following skills, override the default behavior.
4343

4444
`planning-with-files`:
4545

46-
- Do not create `task_plan.md`, `findings.md`, or `progress.md` at repo root. Merge that content into one file under `.claude/docs/plans/`.
47-
- For issue-backed work, start the filename with the ticket number instead of `date+ticket`. Example: `.claude/docs/plans/4510-fix-schema.md`
48-
- For non-ticket work, keep the date-based format. Example: `.claude/docs/plans/2026-02-07-fix-schema.md`
46+
- Do not create `task_plan.md`, `findings.md`, or `progress.md` at repo root. Merge that content into one file under `docs/plans/`.
47+
- For issue-backed work, start the filename with the ticket number instead of `date+ticket`. Example: `docs/plans/4510-fix-schema.md`
48+
- For non-ticket work, keep the date-based format. Example: `docs/plans/2026-02-07-fix-schema.md`
4949

5050
`dev-browser`:
5151

.agents/rules/create-app-design.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ alwaysApply: true
316316

317317
### 5. Save and Next Steps
318318

319-
- Create directories: `mkdir -p .claude/docs .claude/skills`
319+
- Create directories: `mkdir -p docs .claude/skills`
320320
- Save design document: `.agents/rules/1-app-design-document.mdc`
321321
- Update Claude rule: `.agents/rules/status.mdc`
322322
- Suggest: "Would you like me to create a technical stack document next?"

.agents/rules/create-tech-stack.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ The language should be technical, precise, and include specific version numbers
282282

283283
```bash
284284
# Create directory and save
285-
mkdir -p .claude/docs
285+
mkdir -p docs
286286
# Save to .agents/rules/2-tech-stack.mdc
287287
```
288288

.agents/rules/major-task.mdc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Handle $ARGUMENTS. Use this for architectural, comparative, benchmark, migration
6868
7. Load `planning-with-files` immediately.
6969
8. Load `ce:plan` when the work needs a real implementation plan, phased rollout, or a plan artifact.
7070
9. Load `learnings-researcher` early when the domain smells repeated or the repo has prior decisions worth mining.
71-
10. If the work is editor-framework-facing, start from `@.claude/docs/analysis/editor-architecture-candidates.md` as the candidate map instead of widening the field randomly.
71+
10. If the work is editor-framework-facing, start from `@docs/analysis/editor-architecture-candidates.md` as the candidate map instead of widening the field randomly.
7272
11. For library or framework questions, inspect the local clone in `..` first per AGENTS. If missing, clone it. Only then reach for official docs.
7373
12. Pick the smallest justified helper stack for the lane.
7474
13. For any tracker source, restate for yourself:
@@ -203,7 +203,7 @@ Apply this section only when the task source is a tracker item.
203203
- intuition
204204
7. If the question is comparative, compare equivalent workloads, not vibes or marketing claims.
205205
8. For editor-framework performance comparisons:
206-
- start from `@.claude/docs/analysis/editor-architecture-candidates.md`
206+
- start from `@docs/analysis/editor-architecture-candidates.md`
207207
- prefer `Plate vs Slate` first for direct inheritance pressure
208208
- use `ProseMirror` and `Lexical` when questioning deeper runtime or architecture direction
209209
- use `Tiptap` more for product-layer or packaging cost than raw engine performance
@@ -212,7 +212,7 @@ Apply this section only when the task source is a tracker item.
212212

213213
### Framework Comparison Or Migration
214214

215-
1. For editor-framework comparisons, begin with `@.claude/docs/analysis/editor-architecture-candidates.md`.
215+
1. For editor-framework comparisons, begin with `@docs/analysis/editor-architecture-candidates.md`.
216216
2. Narrow the candidate set based on the actual decision, not curiosity.
217217
3. Read local clone/source first, then official docs if the clone does not settle the question.
218218
4. Read official docs before blogs or random benchmark posts.

.agents/rules/testing-review.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ When recommending the next batch:
105105

106106
Write:
107107

108-
- a markdown map under `.claude/docs/plans/`
108+
- a markdown map under `docs/plans/`
109109
- a package TSV
110110
- a file TSV
111111
- a locked roadmap markdown file when this is the first meaningful pass for the current phase, or update that roadmap if it already exists

.agents/skills/create-app-design/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ alwaysApply: true
320320

321321
### 5. Save and Next Steps
322322

323-
- Create directories: `mkdir -p .claude/docs .claude/skills`
323+
- Create directories: `mkdir -p docs .claude/skills`
324324
- Save design document: `.agents/rules/1-app-design-document.mdc`
325325
- Update Claude rule: `.agents/rules/status.mdc`
326326
- Suggest: "Would you like me to create a technical stack document next?"

.agents/skills/create-tech-stack/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ The language should be technical, precise, and include specific version numbers
286286

287287
```bash
288288
# Create directory and save
289-
mkdir -p .claude/docs
289+
mkdir -p docs
290290
# Save to .agents/rules/2-tech-stack.mdc
291291
```
292292

.agents/skills/major-task/SKILL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Handle $ARGUMENTS. Use this for architectural, comparative, benchmark, migration
7272
7. Load `planning-with-files` immediately.
7373
8. Load `ce:plan` when the work needs a real implementation plan, phased rollout, or a plan artifact.
7474
9. Load `learnings-researcher` early when the domain smells repeated or the repo has prior decisions worth mining.
75-
10. If the work is editor-framework-facing, start from `@.claude/docs/analysis/editor-architecture-candidates.md` as the candidate map instead of widening the field randomly.
75+
10. If the work is editor-framework-facing, start from `@docs/analysis/editor-architecture-candidates.md` as the candidate map instead of widening the field randomly.
7676
11. For library or framework questions, inspect the local clone in `..` first per AGENTS. If missing, clone it. Only then reach for official docs.
7777
12. Pick the smallest justified helper stack for the lane.
7878
13. For any tracker source, restate for yourself:
@@ -207,7 +207,7 @@ Apply this section only when the task source is a tracker item.
207207
- intuition
208208
7. If the question is comparative, compare equivalent workloads, not vibes or marketing claims.
209209
8. For editor-framework performance comparisons:
210-
- start from `@.claude/docs/analysis/editor-architecture-candidates.md`
210+
- start from `@docs/analysis/editor-architecture-candidates.md`
211211
- prefer `Plate vs Slate` first for direct inheritance pressure
212212
- use `ProseMirror` and `Lexical` when questioning deeper runtime or architecture direction
213213
- use `Tiptap` more for product-layer or packaging cost than raw engine performance
@@ -216,7 +216,7 @@ Apply this section only when the task source is a tracker item.
216216

217217
### Framework Comparison Or Migration
218218

219-
1. For editor-framework comparisons, begin with `@.claude/docs/analysis/editor-architecture-candidates.md`.
219+
1. For editor-framework comparisons, begin with `@docs/analysis/editor-architecture-candidates.md`.
220220
2. Narrow the candidate set based on the actual decision, not curiosity.
221221
3. Read local clone/source first, then official docs if the clone does not settle the question.
222222
4. Read official docs before blogs or random benchmark posts.

.agents/skills/testing-review/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ When recommending the next batch:
109109

110110
Write:
111111

112-
- a markdown map under `.claude/docs/plans/`
112+
- a markdown map under `docs/plans/`
113113
- a package TSV
114114
- a file TSV
115115
- a locked roadmap markdown file when this is the first meaningful pass for the current phase, or update that roadmap if it already exists
Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
name: SlateDepsSync
2+
3+
on:
4+
schedule:
5+
- cron: '0 6 * * *'
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
11+
concurrency:
12+
group: slate-deps-sync
13+
cancel-in-progress: false
14+
15+
jobs:
16+
update:
17+
name: Update Slate deps
18+
runs-on: ubuntu-latest
19+
if: ${{ github.repository == 'udecode/plate' }}
20+
21+
steps:
22+
- name: 📥 Checkout Repo
23+
uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
token: ${{ secrets.API_TOKEN_GITHUB || secrets.GITHUB_TOKEN }}
27+
28+
- name: Install bun
29+
uses: oven-sh/setup-bun@v2
30+
with:
31+
bun-version: 1.3.9
32+
33+
- name: ⚙️ Install pnpm
34+
uses: pnpm/action-setup@v4
35+
36+
- name: ♻️ Setup Node.js
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: 22
40+
cache: pnpm
41+
42+
- name: ⬆️ Update Slate manifests
43+
run: >
44+
npx npm-check-updates@latest
45+
'/^(slate|slate-dom|slate-react|slate-hyperscript)$/'
46+
--configFileName .ncurc.yml
47+
--configFilePath tooling/config
48+
--mergeConfig
49+
--packageManager pnpm
50+
--root
51+
--upgrade
52+
--workspaces
53+
54+
- name: 📦 Install updated deps
55+
run: pnpm install --no-frozen-lockfile
56+
env:
57+
HUSKY: '0'
58+
59+
- name: 🔍 Detect Slate update changes
60+
id: slate-changes
61+
run: |
62+
node <<'EOF'
63+
const { execFileSync } = require('node:child_process');
64+
const { appendFileSync, readFileSync } = require('node:fs');
65+
66+
const files = [
67+
'apps/www/package.json',
68+
'packages/core/package.json',
69+
'packages/slate/package.json',
70+
'packages/test-utils/package.json',
71+
];
72+
const sections = [
73+
'dependencies',
74+
'devDependencies',
75+
'peerDependencies',
76+
'optionalDependencies',
77+
];
78+
const targets = [
79+
'slate',
80+
'slate-dom',
81+
'slate-react',
82+
'slate-hyperscript',
83+
];
84+
const changed = new Set();
85+
86+
const readHeadPackageJson = (file) => {
87+
try {
88+
return JSON.parse(
89+
execFileSync('git', ['show', `HEAD:${file}`], {
90+
encoding: 'utf8',
91+
})
92+
);
93+
} catch {
94+
return {};
95+
}
96+
};
97+
98+
for (const file of files) {
99+
const current = JSON.parse(readFileSync(file, 'utf8'));
100+
const previous = readHeadPackageJson(file);
101+
102+
for (const section of sections) {
103+
for (const dependency of targets) {
104+
const currentVersion = current[section]?.[dependency];
105+
const previousVersion = previous[section]?.[dependency];
106+
107+
if (currentVersion !== previousVersion) {
108+
changed.add(dependency);
109+
}
110+
}
111+
}
112+
}
113+
114+
const packages = [...changed];
115+
appendFileSync(
116+
process.env.GITHUB_OUTPUT,
117+
`changed=${packages.length > 0}\n`
118+
);
119+
appendFileSync(
120+
process.env.GITHUB_OUTPUT,
121+
`packages_json<<EOF\n${JSON.stringify(packages)}\nEOF\n`
122+
);
123+
EOF
124+
125+
- name: 📝 Sync Slate changeset
126+
if: ${{ steps.slate-changes.outputs.changed == 'true' }}
127+
env:
128+
CHANGED_PACKAGES_JSON: ${{ steps.slate-changes.outputs.packages_json }}
129+
run: |
130+
if [ -f .changeset/slate.md ]; then
131+
echo "Updating existing .changeset/slate.md"
132+
else
133+
echo "Creating .changeset/slate.md"
134+
fi
135+
136+
node <<'EOF'
137+
const { writeFileSync } = require('node:fs');
138+
139+
const packages = JSON.parse(process.env.CHANGED_PACKAGES_JSON);
140+
const message = `Updated ${packages.map((name) => `\`${name}\``).join(', ')}.`;
141+
142+
writeFileSync(
143+
'.changeset/slate.md',
144+
`---\n"@platejs/slate": patch\n---\n\n${message}\n`
145+
);
146+
EOF
147+
148+
- name: 🔧 Configure git
149+
if: ${{ steps.slate-changes.outputs.changed == 'true' }}
150+
run: |
151+
git config user.name "github-actions[bot]"
152+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
153+
154+
- name: ⬆️ Push Slate update
155+
if: ${{ steps.slate-changes.outputs.changed == 'true' }}
156+
run: |
157+
git add .
158+
159+
if git diff --cached --quiet; then
160+
echo "No staged changes."
161+
exit 0
162+
fi
163+
164+
git commit -m "chore: update Slate deps"
165+
git push origin HEAD:main

0 commit comments

Comments
 (0)