docs: add-block skill, extend add-component, root CLAUDE.md - #10
Merged
Conversation
Process docs formalized from lessons paid during the 3->8 components
expansion and the first block (ds-block-empty-state).
1. .claude/skills/add-block/SKILL.md (new)
Parallel to add-component, for ds-block-* items. Five-surface
pattern (showcase tree, consumer tree, registry.json, audit drift,
aggregator) instead of four. Captures:
- type: registry:block (not registry:ui)
- registryDependencies[] for cross-item refs
- target uses @/components/ prefix, not @ui/
- BlockEntry requires Demo export (otherwise preview tab shows
the no-props default rendering)
- rootDir requirement in packages/registry/tsconfig.json when a
block does self-references via @workspace/registry/components/*
- The two block pages that render blocks directly ([category_id]
and [category_id]/[block_id]) must use <item.Demo /> /
<block.Demo />, not the direct Block
2. .claude/skills/add-component/SKILL.md (extended)
Two new Common pitfalls:
- New npm peer dep in registry.json dependencies[] requires
updating the hardcoded install list in
apps/web/scripts/contract-test.mjs. Cross-references
feedback_registry_deps_coupling.md.
- For compositions of multiple ds-* items, use add-block skill
instead of add-component. The two have different aggregator
entry shapes (ComponentEntry vs BlockEntry).
3. CLAUDE.md (new, repo root)
Concise reference for the project conventions that don't fit in
AGENTS.md (which is auto-generated by Next.js with just the
version warning):
- Branch workflow: main is protected, always work on a feature
branch + PR
- Commit messages: use heredoc /tmp/commit-msg.txt because bash
interprets backticks as command substitution (paths like @ui/,
@components/ get silently broken)
- Don't push without explicit confirmation
- Build pipeline order (registry package -> build-sources ->
build-registry -> next build)
- Validation commands (drift, contract-test, tsc, build)
- Index of skills and memories
- Index of plan docs
Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three process docs from lessons paid in this session's catalog expansion (3→8 components + 1 block).
What's new
1.
.claude/skills/add-block/SKILL.md— parallel toadd-componentfords-block-*items. Five-surface pattern (showcase tree, consumer tree, registry.json, audit drift, aggregator) instead of four. Captures:type: registry:block(notregistry:ui)registryDependencies[]for cross-item refstargetuses@/components/prefix, not@ui/BlockEntryrequiresDemoexport (otherwise preview tab shows the no-props default rendering)rootDirrequirement inpackages/registry/tsconfig.jsonwhen a block does self-references via@workspace/registry/components/*<item.Demo />/<block.Demo />, not the directBlock2.
.claude/skills/add-component/SKILL.md(extended) — two new Common pitfalls:registry.jsondependencies[]requires updating the hardcoded install list inapps/web/scripts/contract-test.mjs. Cross-referencesfeedback_registry_deps_coupling.md.add-blockskill instead ofadd-component.3.
CLAUDE.md(repo root) — concise reference for conventions that don't fit inAGENTS.md(which is auto-generated by Next.js):mainis protected, always work on a feature branch + PR/tmp/commit-msg.txtbecause bash interprets backticks as command substitution🤖 Generated with Claude Code