diff --git a/.claude/skills/textile-design b/.claude/skills/textile-design new file mode 120000 index 0000000..5e52fe7 --- /dev/null +++ b/.claude/skills/textile-design @@ -0,0 +1 @@ +../../.opencode/skills/textile-design \ No newline at end of file diff --git a/.claude/skills/textile-plan/SKILL.md b/.claude/skills/textile-plan/SKILL.md new file mode 100644 index 0000000..9e6c535 --- /dev/null +++ b/.claude/skills/textile-plan/SKILL.md @@ -0,0 +1,111 @@ +--- +name: textile-plan +description: Write an implementation plan for work in the textile_proj repos to the Textile Plans folder. Produces a short, scannable plan covering architecture, modules changed, and downstream dependents. Use when asked to plan, spec, or design an implementation before writing code. +--- + +# Textile plan + +Plans are read to make decisions, not to be executed line by line. Optimize for a +reader skimming in 60 seconds. If a section can't be skimmed, it's too long. + +## Output + +- Write to `/Users/ethan/Documents/Textile Plans/plans/-plan.md`. +- Kebab-case topic, no date prefix. Overwrite an existing plan on the same topic + rather than adding `-v2`. +- **Hard budget: 120 lines.** Blowing past it means the plan is doing the + implementation's job. Cut, don't append. + +## Structure + +Exactly three sections, in this order. No preamble, no "Context", no phased +rollout, no testing strategy, no open questions dump. + +### 1. Architecture + +The shape of the solution and the one idea that makes it work. + +- Open with a **single bolded sentence** naming the key design decision. +- Then an ASCII diagram or ≤5 bullets showing how the pieces relate. +- Name the choke point: the one place a change lands so the rest is free. +- If you rejected an alternative, one line: `Not X, because Y.` + +### 2. Modules changed + +A table. One row per file. Nothing else. + +| File | Change | +| ----------------- | -------------------------------------------------- | +| `path/to/file.ts` | One clause. What it does now → what it does after. | + +Rules: + +- New files marked `(new)` after the path. +- One clause per row — no code blocks, no signatures, no line numbers. +- If a row needs a paragraph, the design is wrong or the row is two rows. +- Files that are deliberately _not_ touched go in one line under the table: + `Untouched: ...` — this is often the most valuable line in the plan. + +### 3. Downstream dependents + +Who breaks or behaves differently because of section 2. This is the section +that gets skipped and shouldn't be. + +| Dependent | Impact | Action | +| ---------------------------- | ------------------- | ----------------------- | +| Consumer / package / surface | What it sees change | Migrate / none / verify | + +Cover: other packages in the monorepo, persisted state and schemas, saved user +data, public exports and IPC surfaces, and existing tests that encode the old +behavior. Write `None.` if there genuinely are none — an empty section reads as +"didn't check." + +## Style + +- Prose only where a table can't carry it. Never both. +- No motivational framing, no restating the request back. +- Code only when the exact string matters (a token name, an enum value). Never + full function bodies. +- Assume the reader knows the codebase. + +## Anti-patterns + +- Recapping context the reader already has. +- Step-by-step instructions to yourself ("A1", "A2", "Part B") — that's a task + list, not a plan. +- Repeating a file's changes in both prose and the table. +- Hedging every decision. Pick one and say why in a clause. + +## Skeleton + +```markdown +# + +## Architecture + +**** + +- → : +- Choke point: `` — + +Not , because . + +## Modules changed + +| File | Change | +| ------ | ------ | +| `a.ts` | ... | + +Untouched: `b.ts`, `c.ts` — . + +## Downstream dependents + +| Dependent | Impact | Action | +| --------- | ------ | ------ | +| ... | ... | ... | +``` + +## Related + +UI work in `textile/` follows the [textile-design](../textile-design/SKILL.md) +skill — cite the token/component rules rather than restating them in a plan. diff --git a/.opencode/skills/README.md b/.opencode/skills/README.md index e5b7b78..67ff43f 100644 --- a/.opencode/skills/README.md +++ b/.opencode/skills/README.md @@ -9,3 +9,10 @@ mkdir -p .cursor/skills && ln -sf ../../.opencode/skills/textile-design .cursor/ ``` Run from the repository root (`textile/`). + +**Claude Code:** no setup needed — `.claude/skills/` is committed, and its +`textile-design` entry is a symlink back to the canonical skill here. + +Claude-only skills live in `.claude/skills/` directly: + +- `textile-plan` — writing implementation plans to the Textile Plans folder.