@nextsparkjs/ai-workflow 0.1.0-beta.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +115 -0
- package/claude/_docs/workflows-optimizations.md +359 -0
- package/claude/agents/api-tester.md +634 -0
- package/claude/agents/architecture-supervisor.md +1351 -0
- package/claude/agents/backend-developer.md +997 -0
- package/claude/agents/backend-validator.md +417 -0
- package/claude/agents/bdd-docs-writer.md +737 -0
- package/claude/agents/block-developer.md +677 -0
- package/claude/agents/code-reviewer.md +1432 -0
- package/claude/agents/db-developer.md +721 -0
- package/claude/agents/db-validator.md +407 -0
- package/claude/agents/demo-video-generator.md +493 -0
- package/claude/agents/documentation-writer.md +1268 -0
- package/claude/agents/frontend-developer.md +1234 -0
- package/claude/agents/frontend-validator.md +777 -0
- package/claude/agents/functional-validator.md +630 -0
- package/claude/agents/mock-analyst.md +387 -0
- package/claude/agents/product-manager.md +963 -0
- package/claude/agents/qa-automation.md +1762 -0
- package/claude/agents/release-manager.md +634 -0
- package/claude/agents/selectors-translator.md +262 -0
- package/claude/agents/unit-test-writer.md +785 -0
- package/claude/agents/visual-comparator.md +329 -0
- package/claude/agents/workflow-maintainer.md +352 -0
- package/claude/commands/do/README.md +88 -0
- package/claude/commands/do/create-api.md +64 -0
- package/claude/commands/do/create-entity.md +66 -0
- package/claude/commands/do/create-migration.md +64 -0
- package/claude/commands/do/create-plugin.md +56 -0
- package/claude/commands/do/create-theme.md +70 -0
- package/claude/commands/do/mock-data.md +67 -0
- package/claude/commands/do/reset-db.md +71 -0
- package/claude/commands/do/setup-scheduled-action.md +75 -0
- package/claude/commands/do/sync-code-review.md +117 -0
- package/claude/commands/do/update-selectors.md +112 -0
- package/claude/commands/do/use-skills.md +90 -0
- package/claude/commands/do/validate-blocks.md +69 -0
- package/claude/commands/how-to/README.md +261 -0
- package/claude/commands/how-to/add-metadata.md +692 -0
- package/claude/commands/how-to/add-taxonomies.md +806 -0
- package/claude/commands/how-to/add-translations.md +571 -0
- package/claude/commands/how-to/create-api.md +577 -0
- package/claude/commands/how-to/create-block.md +575 -0
- package/claude/commands/how-to/create-child-entities.md +771 -0
- package/claude/commands/how-to/create-entity.md +597 -0
- package/claude/commands/how-to/create-migrations.md +605 -0
- package/claude/commands/how-to/create-plugin.md +654 -0
- package/claude/commands/how-to/customize-app.md +481 -0
- package/claude/commands/how-to/customize-dashboard.md +553 -0
- package/claude/commands/how-to/customize-theme.md +438 -0
- package/claude/commands/how-to/define-features-flows.md +632 -0
- package/claude/commands/how-to/deploy.md +507 -0
- package/claude/commands/how-to/handle-file-uploads.md +746 -0
- package/claude/commands/how-to/implement-search.md +1001 -0
- package/claude/commands/how-to/install-plugins.md +352 -0
- package/claude/commands/how-to/manage-test-coverage.md +984 -0
- package/claude/commands/how-to/run-tests.md +400 -0
- package/claude/commands/how-to/set-app-languages.md +601 -0
- package/claude/commands/how-to/set-plans-and-permissions.md +575 -0
- package/claude/commands/how-to/set-scheduled-actions.md +527 -0
- package/claude/commands/how-to/set-user-roles-and-permissions.md +550 -0
- package/claude/commands/how-to/setup-authentication.md +388 -0
- package/claude/commands/how-to/setup-claude-code.md +440 -0
- package/claude/commands/how-to/setup-database.md +274 -0
- package/claude/commands/how-to/setup-email-providers.md +598 -0
- package/claude/commands/how-to/setup-mobile-dev.md +627 -0
- package/claude/commands/how-to/start.md +500 -0
- package/claude/commands/how-to/use-devtools.md +639 -0
- package/claude/commands/how-to/use-superadmin.md +622 -0
- package/claude/commands/session/README.md +193 -0
- package/claude/commands/session/block-create.md +190 -0
- package/claude/commands/session/block-list.md +203 -0
- package/claude/commands/session/block-update.md +192 -0
- package/claude/commands/session/block-validate.md +218 -0
- package/claude/commands/session/changelog.md +115 -0
- package/claude/commands/session/close.md +225 -0
- package/claude/commands/session/commit.md +174 -0
- package/claude/commands/session/db-entity.md +206 -0
- package/claude/commands/session/db-fix.md +212 -0
- package/claude/commands/session/db-sample.md +206 -0
- package/claude/commands/session/demo.md +178 -0
- package/claude/commands/session/doc-bdd.md +207 -0
- package/claude/commands/session/doc-feature.md +218 -0
- package/claude/commands/session/doc-read.md +225 -0
- package/claude/commands/session/execute.md +204 -0
- package/claude/commands/session/explain.md +202 -0
- package/claude/commands/session/fix-bug.md +210 -0
- package/claude/commands/session/fix-build.md +182 -0
- package/claude/commands/session/fix-test.md +189 -0
- package/claude/commands/session/pending.md +232 -0
- package/claude/commands/session/refine.md +188 -0
- package/claude/commands/session/resume.md +192 -0
- package/claude/commands/session/review.md +192 -0
- package/claude/commands/session/scope-change.md +181 -0
- package/claude/commands/session/start-blocks.md +347 -0
- package/claude/commands/session/start.md +604 -0
- package/claude/commands/session/status.md +169 -0
- package/claude/commands/session/test-fix.md +221 -0
- package/claude/commands/session/test-run.md +203 -0
- package/claude/commands/session/test-write.md +242 -0
- package/claude/commands/session/validate.md +162 -0
- package/claude/config/context.json +40 -0
- package/claude/config/github.json +69 -0
- package/claude/config/github.schema.json +106 -0
- package/claude/config/team.json +46 -0
- package/claude/config/team.schema.json +106 -0
- package/claude/config/workspace.json +43 -0
- package/claude/config/workspace.schema.json +75 -0
- package/claude/skills/README.md +228 -0
- package/claude/skills/accessibility/SKILL.md +573 -0
- package/claude/skills/api-bypass-layers/SKILL.md +550 -0
- package/claude/skills/asana-integration/SKILL.md +499 -0
- package/claude/skills/better-auth/SKILL.md +666 -0
- package/claude/skills/billing-subscriptions/SKILL.md +660 -0
- package/claude/skills/block-decision-matrix/SKILL.md +359 -0
- package/claude/skills/clickup-integration/SKILL.md +434 -0
- package/claude/skills/core-theme-responsibilities/SKILL.md +485 -0
- package/claude/skills/create-plugin/SKILL.md +425 -0
- package/claude/skills/create-theme/SKILL.md +331 -0
- package/claude/skills/cypress-api/SKILL.md +511 -0
- package/claude/skills/cypress-api/scripts/generate-api-controller.py +329 -0
- package/claude/skills/cypress-api/scripts/generate-api-test.py +930 -0
- package/claude/skills/cypress-e2e/SKILL.md +526 -0
- package/claude/skills/cypress-e2e/scripts/extract-selectors.py +383 -0
- package/claude/skills/cypress-e2e/scripts/generate-uat-test.py +788 -0
- package/claude/skills/cypress-selectors/SKILL.md +309 -0
- package/claude/skills/cypress-selectors/scripts/extract-missing.py +243 -0
- package/claude/skills/cypress-selectors/scripts/generate-block-selectors.py +283 -0
- package/claude/skills/cypress-selectors/scripts/validate-selectors.py +145 -0
- package/claude/skills/database-migrations/SKILL.md +335 -0
- package/claude/skills/database-migrations/scripts/generate-sample-data.py +284 -0
- package/claude/skills/database-migrations/scripts/validate-migration.py +323 -0
- package/claude/skills/design-system/SKILL.md +682 -0
- package/claude/skills/documentation/SKILL.md +540 -0
- package/claude/skills/entity-api/SKILL.md +482 -0
- package/claude/skills/entity-system/SKILL.md +635 -0
- package/claude/skills/entity-system/scripts/generate-child-migration.py +298 -0
- package/claude/skills/entity-system/scripts/generate-metas-migration.py +233 -0
- package/claude/skills/entity-system/scripts/generate-migration.py +382 -0
- package/claude/skills/entity-system/scripts/generate-sample-data.py +418 -0
- package/claude/skills/entity-system/scripts/scaffold-entity.py +661 -0
- package/claude/skills/github/SKILL.md +467 -0
- package/claude/skills/i18n-nextintl/SKILL.md +302 -0
- package/claude/skills/i18n-nextintl/scripts/add-translation.py +243 -0
- package/claude/skills/i18n-nextintl/scripts/extract-hardcoded.py +246 -0
- package/claude/skills/i18n-nextintl/scripts/validate-translations.py +260 -0
- package/claude/skills/impact-analysis/SKILL.md +203 -0
- package/claude/skills/jest-unit/SKILL.md +306 -0
- package/claude/skills/jest-unit/references/component-testing.md +371 -0
- package/claude/skills/jest-unit/references/mocking-patterns.md +380 -0
- package/claude/skills/jest-unit/references/service-hook-testing.md +454 -0
- package/claude/skills/jira-integration/SKILL.md +539 -0
- package/claude/skills/media-library/SKILL.md +743 -0
- package/claude/skills/mock-analysis/SKILL.md +276 -0
- package/claude/skills/monorepo-architecture/SKILL.md +162 -0
- package/claude/skills/nextjs-api-development/SKILL.md +364 -0
- package/claude/skills/nextjs-api-development/scripts/generate-crud-tests.py +456 -0
- package/claude/skills/nextjs-api-development/scripts/scaffold-endpoint.py +481 -0
- package/claude/skills/nextjs-api-development/scripts/validate-api.py +283 -0
- package/claude/skills/notion-integration/SKILL.md +641 -0
- package/claude/skills/npm-development-workflow/SKILL.md +480 -0
- package/claude/skills/page-builder-blocks/SKILL.md +530 -0
- package/claude/skills/page-builder-blocks/scripts/scaffold-block.py +444 -0
- package/claude/skills/permissions-system/SKILL.md +619 -0
- package/claude/skills/plugins/SKILL.md +340 -0
- package/claude/skills/plugins/references/plugin-templates.md +414 -0
- package/claude/skills/plugins/references/plugin-testing.md +353 -0
- package/claude/skills/plugins/references/plugin-types.md +198 -0
- package/claude/skills/plugins/scripts/scaffold-plugin.py +443 -0
- package/claude/skills/pom-patterns/SKILL.md +452 -0
- package/claude/skills/pom-patterns/scripts/generate-pom.py +392 -0
- package/claude/skills/rate-limiting/SKILL.md +342 -0
- package/claude/skills/react-best-practices/AGENTS.md +2410 -0
- package/claude/skills/react-best-practices/README.md +123 -0
- package/claude/skills/react-best-practices/SKILL.md +125 -0
- package/claude/skills/react-best-practices/metadata.json +15 -0
- package/claude/skills/react-best-practices/rules/_sections.md +46 -0
- package/claude/skills/react-best-practices/rules/_template.md +28 -0
- package/claude/skills/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
- package/claude/skills/react-best-practices/rules/advanced-use-latest.md +49 -0
- package/claude/skills/react-best-practices/rules/async-api-routes.md +38 -0
- package/claude/skills/react-best-practices/rules/async-defer-await.md +80 -0
- package/claude/skills/react-best-practices/rules/async-dependencies.md +36 -0
- package/claude/skills/react-best-practices/rules/async-parallel.md +28 -0
- package/claude/skills/react-best-practices/rules/async-suspense-boundaries.md +99 -0
- package/claude/skills/react-best-practices/rules/bundle-barrel-imports.md +59 -0
- package/claude/skills/react-best-practices/rules/bundle-conditional.md +31 -0
- package/claude/skills/react-best-practices/rules/bundle-defer-third-party.md +49 -0
- package/claude/skills/react-best-practices/rules/bundle-dynamic-imports.md +35 -0
- package/claude/skills/react-best-practices/rules/bundle-preload.md +50 -0
- package/claude/skills/react-best-practices/rules/client-event-listeners.md +74 -0
- package/claude/skills/react-best-practices/rules/client-localstorage-schema.md +71 -0
- package/claude/skills/react-best-practices/rules/client-passive-event-listeners.md +48 -0
- package/claude/skills/react-best-practices/rules/client-swr-dedup.md +56 -0
- package/claude/skills/react-best-practices/rules/js-batch-dom-css.md +82 -0
- package/claude/skills/react-best-practices/rules/js-cache-function-results.md +80 -0
- package/claude/skills/react-best-practices/rules/js-cache-property-access.md +28 -0
- package/claude/skills/react-best-practices/rules/js-cache-storage.md +70 -0
- package/claude/skills/react-best-practices/rules/js-combine-iterations.md +32 -0
- package/claude/skills/react-best-practices/rules/js-early-exit.md +50 -0
- package/claude/skills/react-best-practices/rules/js-hoist-regexp.md +45 -0
- package/claude/skills/react-best-practices/rules/js-index-maps.md +37 -0
- package/claude/skills/react-best-practices/rules/js-length-check-first.md +49 -0
- package/claude/skills/react-best-practices/rules/js-min-max-loop.md +82 -0
- package/claude/skills/react-best-practices/rules/js-set-map-lookups.md +24 -0
- package/claude/skills/react-best-practices/rules/js-tosorted-immutable.md +57 -0
- package/claude/skills/react-best-practices/rules/rendering-activity.md +26 -0
- package/claude/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
- package/claude/skills/react-best-practices/rules/rendering-conditional-render.md +40 -0
- package/claude/skills/react-best-practices/rules/rendering-content-visibility.md +38 -0
- package/claude/skills/react-best-practices/rules/rendering-hoist-jsx.md +46 -0
- package/claude/skills/react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
- package/claude/skills/react-best-practices/rules/rendering-svg-precision.md +28 -0
- package/claude/skills/react-best-practices/rules/rerender-defer-reads.md +39 -0
- package/claude/skills/react-best-practices/rules/rerender-dependencies.md +45 -0
- package/claude/skills/react-best-practices/rules/rerender-derived-state.md +29 -0
- package/claude/skills/react-best-practices/rules/rerender-functional-setstate.md +74 -0
- package/claude/skills/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
- package/claude/skills/react-best-practices/rules/rerender-memo.md +44 -0
- package/claude/skills/react-best-practices/rules/rerender-transitions.md +40 -0
- package/claude/skills/react-best-practices/rules/server-after-nonblocking.md +73 -0
- package/claude/skills/react-best-practices/rules/server-cache-lru.md +41 -0
- package/claude/skills/react-best-practices/rules/server-cache-react.md +76 -0
- package/claude/skills/react-best-practices/rules/server-parallel-fetching.md +83 -0
- package/claude/skills/react-best-practices/rules/server-serialization.md +38 -0
- package/claude/skills/react-patterns/SKILL.md +688 -0
- package/claude/skills/registry-system/SKILL.md +331 -0
- package/claude/skills/scheduled-actions/SKILL.md +671 -0
- package/claude/skills/scope-enforcement/SKILL.md +542 -0
- package/claude/skills/scope-enforcement/scripts/validate-scope.py +357 -0
- package/claude/skills/server-actions/SKILL.md +493 -0
- package/claude/skills/service-layer/SKILL.md +587 -0
- package/claude/skills/session-management/SKILL.md +266 -0
- package/claude/skills/session-management/scripts/create-session.py +166 -0
- package/claude/skills/session-management/scripts/iteration-close.sh +105 -0
- package/claude/skills/session-management/scripts/iteration-init.sh +180 -0
- package/claude/skills/session-management/scripts/session-archive.sh +87 -0
- package/claude/skills/session-management/scripts/session-close.sh +133 -0
- package/claude/skills/session-management/scripts/session-init.sh +225 -0
- package/claude/skills/session-management/scripts/session-list.sh +163 -0
- package/claude/skills/session-management/scripts/split-plan.sh +116 -0
- package/claude/skills/shadcn-components/SKILL.md +586 -0
- package/claude/skills/shadcn-theming/SKILL.md +446 -0
- package/claude/skills/suspense-loading/SKILL.md +280 -0
- package/claude/skills/tailwind-theming/SKILL.md +507 -0
- package/claude/skills/tanstack-query/SKILL.md +608 -0
- package/claude/skills/test-coverage/SKILL.md +239 -0
- package/claude/skills/web-design-guidelines/SKILL.md +39 -0
- package/claude/skills/zod-validation/SKILL.md +537 -0
- package/claude/templates/blocks/progress.md +86 -0
- package/claude/templates/iteration/changes.md +61 -0
- package/claude/templates/iteration/progress.md +55 -0
- package/claude/templates/log.md +31 -0
- package/claude/templates/story/context.md +77 -0
- package/claude/templates/story/pendings.md +37 -0
- package/claude/templates/story/plan.md +299 -0
- package/claude/templates/story/requirements.md +109 -0
- package/claude/templates/story/scope.json +10 -0
- package/claude/templates/story/tests.md +91 -0
- package/claude/templates/task/progress.md +58 -0
- package/claude/templates/task/requirements.md +54 -0
- package/claude/workflows/README.md +154 -0
- package/claude/workflows/blocks.md +614 -0
- package/claude/workflows/story.md +1207 -0
- package/claude/workflows/task.md +927 -0
- package/claude/workflows/tweak.md +527 -0
- package/cursor/.gitkeep +0 -0
- package/package.json +35 -0
- package/scripts/postinstall.mjs +198 -0
- package/scripts/setup.mjs +282 -0
- package/scripts/sync.mjs +209 -0
|
@@ -0,0 +1,540 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: documentation
|
|
3
|
+
description: |
|
|
4
|
+
Documentation patterns for this Next.js application.
|
|
5
|
+
Covers documentation structure, numbered hierarchy, frontmatter, BDD format, and feature documentation.
|
|
6
|
+
Use this skill when creating or maintaining project documentation.
|
|
7
|
+
allowed-tools: Read, Glob, Grep
|
|
8
|
+
version: 1.0.0
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Documentation Skill
|
|
12
|
+
|
|
13
|
+
Patterns for creating and maintaining project documentation.
|
|
14
|
+
|
|
15
|
+
## Architecture Overview
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
DOCUMENTATION STRUCTURE:
|
|
19
|
+
|
|
20
|
+
Core Documentation:
|
|
21
|
+
core/docs/
|
|
22
|
+
├── 01-fundamentals/ # Project basics
|
|
23
|
+
├── 02-architecture/ # System architecture
|
|
24
|
+
├── 03-registry-system/ # Registry patterns
|
|
25
|
+
├── 04-entities/ # Entity system
|
|
26
|
+
├── 05-api/ # API documentation
|
|
27
|
+
├── 06-authentication/ # Auth patterns
|
|
28
|
+
├── 07-authorization/ # Permissions
|
|
29
|
+
├── 08-database/ # Database patterns
|
|
30
|
+
├── 09-frontend/ # Frontend patterns
|
|
31
|
+
├── 10-blocks/ # Page builder blocks
|
|
32
|
+
├── 11-themes/ # Theming system
|
|
33
|
+
├── 12-testing/ # Testing guides
|
|
34
|
+
├── 13-i18n/ # Internationalization
|
|
35
|
+
├── 14-deployment/ # Deployment guides
|
|
36
|
+
├── 15-performance/ # Performance
|
|
37
|
+
├── 16-billing/ # Billing system
|
|
38
|
+
├── 17-devtools/ # Developer tools
|
|
39
|
+
├── 18-guides/ # How-to guides
|
|
40
|
+
└── 19-appendix/ # Reference materials
|
|
41
|
+
|
|
42
|
+
Theme Documentation:
|
|
43
|
+
contents/themes/{theme}/docs/
|
|
44
|
+
├── 01-overview/
|
|
45
|
+
├── 02-configuration/
|
|
46
|
+
├── 03-customization/
|
|
47
|
+
└── ...
|
|
48
|
+
|
|
49
|
+
Plugin Documentation:
|
|
50
|
+
contents/plugins/{plugin}/docs/
|
|
51
|
+
└── ...
|
|
52
|
+
|
|
53
|
+
Development Rules:
|
|
54
|
+
.rules/
|
|
55
|
+
├── core.md # Core development principles
|
|
56
|
+
├── testing.md # Testing guidelines
|
|
57
|
+
├── components.md # Component patterns
|
|
58
|
+
├── api.md # API standards
|
|
59
|
+
├── auth.md # Authentication
|
|
60
|
+
├── i18n.md # Internationalization
|
|
61
|
+
├── plugins.md # Plugin development
|
|
62
|
+
├── migrations.md # Database migrations
|
|
63
|
+
├── documentation.md # Documentation standards
|
|
64
|
+
└── ...
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## When to Use This Skill
|
|
68
|
+
|
|
69
|
+
- Creating feature documentation
|
|
70
|
+
- Writing BDD test documentation
|
|
71
|
+
- Structuring new documentation files
|
|
72
|
+
- Understanding documentation standards
|
|
73
|
+
- Following numbered hierarchy patterns
|
|
74
|
+
|
|
75
|
+
## Numbered Hierarchy Pattern
|
|
76
|
+
|
|
77
|
+
Documentation uses numbered prefixes for ordering:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
{NN}-{category}/
|
|
81
|
+
├── {NN}-{topic}.md
|
|
82
|
+
├── {NN}-{topic}.md
|
|
83
|
+
└── {NN}-{topic}/
|
|
84
|
+
├── {NN}-{subtopic}.md
|
|
85
|
+
└── {NN}-{subtopic}.md
|
|
86
|
+
|
|
87
|
+
Examples:
|
|
88
|
+
01-fundamentals/
|
|
89
|
+
├── 01-project-overview.md
|
|
90
|
+
├── 02-getting-started.md
|
|
91
|
+
└── 03-quick-start.md
|
|
92
|
+
|
|
93
|
+
04-entities/
|
|
94
|
+
├── 01-introduction.md
|
|
95
|
+
├── 02-entity-config.md
|
|
96
|
+
├── 03-api-endpoints.md
|
|
97
|
+
└── 04-entity-types/
|
|
98
|
+
├── 01-core-entities.md
|
|
99
|
+
└── 02-theme-entities.md
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Numbering Rules
|
|
103
|
+
|
|
104
|
+
1. **Categories**: Start at `01-`, increment by 1
|
|
105
|
+
2. **Topics within category**: Start at `01-`, increment by 1
|
|
106
|
+
3. **New content**: Add at the end with next number
|
|
107
|
+
4. **Renumbering**: Only when reorganizing (rare)
|
|
108
|
+
|
|
109
|
+
## File Naming Conventions
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
Correct:
|
|
113
|
+
- 01-project-overview.md
|
|
114
|
+
- 02-getting-started.md
|
|
115
|
+
- auth-testing-guide.md
|
|
116
|
+
- entity-creation-guide.md
|
|
117
|
+
|
|
118
|
+
Incorrect:
|
|
119
|
+
- ProjectOverview.md # Use kebab-case
|
|
120
|
+
- getting_started.md # Use hyphens, not underscores
|
|
121
|
+
- 1-overview.md # Use two-digit prefix: 01-
|
|
122
|
+
- overview.md # Need category context
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Documentation Types
|
|
126
|
+
|
|
127
|
+
### 1. Core Documentation (core/docs/)
|
|
128
|
+
|
|
129
|
+
Comprehensive project documentation for developers.
|
|
130
|
+
|
|
131
|
+
```markdown
|
|
132
|
+
# [Topic Title]
|
|
133
|
+
|
|
134
|
+
## Overview
|
|
135
|
+
[Brief description and context]
|
|
136
|
+
|
|
137
|
+
## [Main Section]
|
|
138
|
+
[Content with examples]
|
|
139
|
+
|
|
140
|
+
### [Subsection]
|
|
141
|
+
[Detailed content]
|
|
142
|
+
|
|
143
|
+
## Usage Examples
|
|
144
|
+
[Practical code examples]
|
|
145
|
+
|
|
146
|
+
## Best Practices
|
|
147
|
+
[Recommended approaches]
|
|
148
|
+
|
|
149
|
+
## Troubleshooting
|
|
150
|
+
[Common issues and solutions]
|
|
151
|
+
|
|
152
|
+
## Related Documentation
|
|
153
|
+
- [Related Doc 1](./path/to/doc.md)
|
|
154
|
+
- [Related Doc 2](./path/to/doc.md)
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### 2. Development Rules (.rules/)
|
|
158
|
+
|
|
159
|
+
Guidelines for Claude Code development.
|
|
160
|
+
|
|
161
|
+
```markdown
|
|
162
|
+
# [Rule Category] Rules
|
|
163
|
+
|
|
164
|
+
## Overview
|
|
165
|
+
[What this rule file covers]
|
|
166
|
+
|
|
167
|
+
## MANDATORY Practices
|
|
168
|
+
[Required patterns]
|
|
169
|
+
|
|
170
|
+
## FORBIDDEN Patterns
|
|
171
|
+
[Anti-patterns to avoid]
|
|
172
|
+
|
|
173
|
+
## Examples
|
|
174
|
+
|
|
175
|
+
### Good Example
|
|
176
|
+
```typescript
|
|
177
|
+
// ✅ CORRECT
|
|
178
|
+
[correct code pattern]
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### Bad Example
|
|
182
|
+
```typescript
|
|
183
|
+
// ❌ WRONG
|
|
184
|
+
[incorrect code pattern]
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Checklist
|
|
188
|
+
- [ ] [Verification item 1]
|
|
189
|
+
- [ ] [Verification item 2]
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### 3. Theme Documentation (contents/themes/{theme}/docs/)
|
|
193
|
+
|
|
194
|
+
Theme-specific documentation.
|
|
195
|
+
|
|
196
|
+
```markdown
|
|
197
|
+
# [Theme Name] Theme
|
|
198
|
+
|
|
199
|
+
## Overview
|
|
200
|
+
[Theme description and purpose]
|
|
201
|
+
|
|
202
|
+
## Configuration
|
|
203
|
+
[How to configure the theme]
|
|
204
|
+
|
|
205
|
+
## Customization
|
|
206
|
+
[How to customize]
|
|
207
|
+
|
|
208
|
+
## Components
|
|
209
|
+
[Theme-specific components]
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### 4. BDD Test Documentation (*.bdd.md)
|
|
213
|
+
|
|
214
|
+
Behavior-Driven Development documentation for tests.
|
|
215
|
+
|
|
216
|
+
```markdown
|
|
217
|
+
# BDD: [Feature Name]
|
|
218
|
+
|
|
219
|
+
**Test File:** `cypress/e2e/uat/[feature].cy.ts`
|
|
220
|
+
**Last Updated:** [YYYY-MM-DD]
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Feature: [Feature Name]
|
|
225
|
+
|
|
226
|
+
### Scenario: [Scenario Name]
|
|
227
|
+
|
|
228
|
+
**Given** [precondition]
|
|
229
|
+
**When** [action]
|
|
230
|
+
**Then** [expected result]
|
|
231
|
+
|
|
232
|
+
**Test ID:** `[test-id]`
|
|
233
|
+
**Tags:** `@[tag1]`, `@[tag2]`
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
### Scenario: [Another Scenario]
|
|
238
|
+
|
|
239
|
+
**Given** [precondition]
|
|
240
|
+
**When** [action]
|
|
241
|
+
**Then** [expected result]
|
|
242
|
+
**And** [additional expectation]
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Edge Cases
|
|
247
|
+
|
|
248
|
+
### Scenario: [Edge Case]
|
|
249
|
+
|
|
250
|
+
**Given** [edge case condition]
|
|
251
|
+
**When** [action]
|
|
252
|
+
**Then** [expected behavior]
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
## Frontmatter (Optional)
|
|
256
|
+
|
|
257
|
+
Some documentation files use YAML frontmatter:
|
|
258
|
+
|
|
259
|
+
```markdown
|
|
260
|
+
---
|
|
261
|
+
title: Entity System Overview
|
|
262
|
+
description: How the entity system works
|
|
263
|
+
category: entities
|
|
264
|
+
order: 1
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
# Entity System Overview
|
|
268
|
+
[Content...]
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
## Code Example Standards
|
|
272
|
+
|
|
273
|
+
### TypeScript Examples
|
|
274
|
+
|
|
275
|
+
```markdown
|
|
276
|
+
```typescript
|
|
277
|
+
// ✅ CORRECT: Include imports when relevant
|
|
278
|
+
import { useAuth } from '@/core/hooks/useAuth'
|
|
279
|
+
|
|
280
|
+
// ✅ CORRECT: Add comments for complex logic
|
|
281
|
+
const { user, isAuthenticated } = useAuth()
|
|
282
|
+
|
|
283
|
+
// ✅ CORRECT: Show practical usage
|
|
284
|
+
if (isAuthenticated) {
|
|
285
|
+
console.log(`Welcome, ${user.name}`)
|
|
286
|
+
}
|
|
287
|
+
```
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Bash Examples
|
|
291
|
+
|
|
292
|
+
```markdown
|
|
293
|
+
```bash
|
|
294
|
+
# Install dependencies
|
|
295
|
+
pnpm install
|
|
296
|
+
|
|
297
|
+
# Run development server
|
|
298
|
+
pnpm dev
|
|
299
|
+
|
|
300
|
+
# Run tests
|
|
301
|
+
pnpm test
|
|
302
|
+
```
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
### JSON Examples
|
|
306
|
+
|
|
307
|
+
```markdown
|
|
308
|
+
```json
|
|
309
|
+
{
|
|
310
|
+
"name": "example",
|
|
311
|
+
"version": "1.0.0",
|
|
312
|
+
"description": "Example configuration"
|
|
313
|
+
}
|
|
314
|
+
```
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
## Documentation Templates
|
|
318
|
+
|
|
319
|
+
### Feature Documentation Template
|
|
320
|
+
|
|
321
|
+
```markdown
|
|
322
|
+
# [Feature Name]
|
|
323
|
+
|
|
324
|
+
## Overview
|
|
325
|
+
[Brief description of the feature]
|
|
326
|
+
|
|
327
|
+
## Quick Start
|
|
328
|
+
[Fastest way to get started]
|
|
329
|
+
|
|
330
|
+
## Configuration
|
|
331
|
+
[How to configure the feature]
|
|
332
|
+
|
|
333
|
+
## Usage
|
|
334
|
+
|
|
335
|
+
### Basic Usage
|
|
336
|
+
[Simple example]
|
|
337
|
+
|
|
338
|
+
### Advanced Usage
|
|
339
|
+
[Complex example]
|
|
340
|
+
|
|
341
|
+
## API Reference
|
|
342
|
+
|
|
343
|
+
### [Function/Method Name]
|
|
344
|
+
|
|
345
|
+
| Parameter | Type | Required | Description |
|
|
346
|
+
|-----------|------|----------|-------------|
|
|
347
|
+
| `param1` | string | Yes | Description |
|
|
348
|
+
| `param2` | number | No | Description |
|
|
349
|
+
|
|
350
|
+
**Returns:** `ReturnType`
|
|
351
|
+
|
|
352
|
+
**Example:**
|
|
353
|
+
```typescript
|
|
354
|
+
const result = functionName(param1, param2)
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
## Best Practices
|
|
358
|
+
- [Practice 1]
|
|
359
|
+
- [Practice 2]
|
|
360
|
+
|
|
361
|
+
## Troubleshooting
|
|
362
|
+
|
|
363
|
+
### [Common Issue]
|
|
364
|
+
**Problem:** [Description]
|
|
365
|
+
**Solution:** [How to fix]
|
|
366
|
+
|
|
367
|
+
## Related
|
|
368
|
+
- [Related Doc 1](./path.md)
|
|
369
|
+
- [Related Doc 2](./path.md)
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
### API Endpoint Documentation
|
|
373
|
+
|
|
374
|
+
```markdown
|
|
375
|
+
## [HTTP Method] [Endpoint Path]
|
|
376
|
+
|
|
377
|
+
### Description
|
|
378
|
+
[What this endpoint does]
|
|
379
|
+
|
|
380
|
+
### Authentication
|
|
381
|
+
- **API Key**: Requires `[scope]` scope
|
|
382
|
+
- **Session**: Dashboard access required
|
|
383
|
+
|
|
384
|
+
### Parameters
|
|
385
|
+
|
|
386
|
+
| Parameter | Type | Location | Required | Description |
|
|
387
|
+
|-----------|------|----------|----------|-------------|
|
|
388
|
+
| `id` | string | path | Yes | Resource ID |
|
|
389
|
+
| `limit` | number | query | No | Page size (default: 20) |
|
|
390
|
+
|
|
391
|
+
### Request Example
|
|
392
|
+
```bash
|
|
393
|
+
curl -X POST https://api.example.com/v1/resource \
|
|
394
|
+
-H "Authorization: Bearer sk_xxx" \
|
|
395
|
+
-H "Content-Type: application/json" \
|
|
396
|
+
-d '{"name": "Example"}'
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
### Response Example
|
|
400
|
+
```json
|
|
401
|
+
{
|
|
402
|
+
"success": true,
|
|
403
|
+
"data": {
|
|
404
|
+
"id": "resource_123",
|
|
405
|
+
"name": "Example"
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
### Error Responses
|
|
411
|
+
|
|
412
|
+
| Status | Code | Description |
|
|
413
|
+
|--------|------|-------------|
|
|
414
|
+
| 400 | VALIDATION_ERROR | Invalid input |
|
|
415
|
+
| 401 | UNAUTHORIZED | Missing auth |
|
|
416
|
+
| 404 | NOT_FOUND | Resource not found |
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
## Documentation Agent
|
|
420
|
+
|
|
421
|
+
The `documentation-writer` agent creates documentation:
|
|
422
|
+
|
|
423
|
+
```typescript
|
|
424
|
+
// Only create documentation when explicitly requested
|
|
425
|
+
await launchAgent('documentation-writer', {
|
|
426
|
+
feature: 'entity_system',
|
|
427
|
+
includeExamples: true,
|
|
428
|
+
includeApiDocs: true,
|
|
429
|
+
includeTroubleshooting: true
|
|
430
|
+
})
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
### NEVER Create Documentation Proactively
|
|
434
|
+
|
|
435
|
+
```typescript
|
|
436
|
+
// ❌ WRONG - Don't create docs unless requested
|
|
437
|
+
// Claude Code should NOT create documentation automatically
|
|
438
|
+
|
|
439
|
+
// ✅ RIGHT - Only when explicitly requested
|
|
440
|
+
if (userRequestsDocumentation) {
|
|
441
|
+
await launchAgent('documentation-writer', { task: 'create_docs' })
|
|
442
|
+
}
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
## Documentation Quality Checklist
|
|
446
|
+
|
|
447
|
+
### Before Publishing
|
|
448
|
+
|
|
449
|
+
- [ ] All code examples are tested and working
|
|
450
|
+
- [ ] Links are valid and accessible
|
|
451
|
+
- [ ] Screenshots are current (if any)
|
|
452
|
+
- [ ] Grammar and spelling correct
|
|
453
|
+
- [ ] Table of contents accurate (for long docs)
|
|
454
|
+
- [ ] Examples cover common use cases
|
|
455
|
+
- [ ] Error scenarios documented
|
|
456
|
+
- [ ] Prerequisites stated
|
|
457
|
+
- [ ] Related docs linked
|
|
458
|
+
|
|
459
|
+
### Maintenance Schedule
|
|
460
|
+
|
|
461
|
+
- **Daily**: Fix reported documentation bugs
|
|
462
|
+
- **Weekly**: Update changed API endpoints
|
|
463
|
+
- **Monthly**: Review and update examples
|
|
464
|
+
- **Quarterly**: Comprehensive documentation audit
|
|
465
|
+
- **Release**: Update all affected documentation
|
|
466
|
+
|
|
467
|
+
## Anti-Patterns
|
|
468
|
+
|
|
469
|
+
```markdown
|
|
470
|
+
# NEVER: Document obvious code
|
|
471
|
+
// ❌ BAD: Set the variable to true
|
|
472
|
+
const isActive = true
|
|
473
|
+
|
|
474
|
+
# NEVER: Include auto-generated files in docs
|
|
475
|
+
# core/lib/registries/*.ts - DO NOT DOCUMENT
|
|
476
|
+
|
|
477
|
+
# NEVER: Create documentation without explicit request
|
|
478
|
+
# Only create when user asks
|
|
479
|
+
|
|
480
|
+
# NEVER: Duplicate information
|
|
481
|
+
# Link to authoritative sources instead
|
|
482
|
+
|
|
483
|
+
# NEVER: Skip code examples
|
|
484
|
+
# Always include practical examples
|
|
485
|
+
|
|
486
|
+
# NEVER: Use outdated screenshots
|
|
487
|
+
# Update or remove if outdated
|
|
488
|
+
|
|
489
|
+
# NEVER: Leave TODO comments in published docs
|
|
490
|
+
# TODO: Add example later ❌
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
## Core Documentation Statistics
|
|
494
|
+
|
|
495
|
+
```
|
|
496
|
+
core/docs/
|
|
497
|
+
├── 01-fundamentals/ # ~5 files
|
|
498
|
+
├── 02-architecture/ # ~3 files
|
|
499
|
+
├── 03-registry-system/ # ~4 files
|
|
500
|
+
├── 04-entities/ # ~8 files
|
|
501
|
+
├── 05-api/ # ~10 files
|
|
502
|
+
├── 06-authentication/ # ~6 files
|
|
503
|
+
├── 07-authorization/ # ~4 files
|
|
504
|
+
├── 08-database/ # ~5 files
|
|
505
|
+
├── 09-frontend/ # ~12 files
|
|
506
|
+
├── 10-blocks/ # ~6 files
|
|
507
|
+
├── 11-themes/ # ~4 files
|
|
508
|
+
├── 12-testing/ # ~15 files
|
|
509
|
+
├── 13-i18n/ # ~3 files
|
|
510
|
+
├── 14-deployment/ # ~4 files
|
|
511
|
+
├── 15-performance/ # ~3 files
|
|
512
|
+
├── 16-billing/ # ~5 files
|
|
513
|
+
├── 17-devtools/ # ~4 files
|
|
514
|
+
├── 18-guides/ # ~6 files
|
|
515
|
+
└── 19-appendix/ # ~3 files
|
|
516
|
+
|
|
517
|
+
Total: ~100+ documentation files
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
## Checklist
|
|
521
|
+
|
|
522
|
+
Before finalizing documentation:
|
|
523
|
+
|
|
524
|
+
- [ ] File uses correct naming convention (kebab-case)
|
|
525
|
+
- [ ] Numbered prefix matches category order
|
|
526
|
+
- [ ] Content follows appropriate template
|
|
527
|
+
- [ ] Code examples are syntax-highlighted
|
|
528
|
+
- [ ] All links work correctly
|
|
529
|
+
- [ ] No hardcoded paths (use relative)
|
|
530
|
+
- [ ] Examples are tested and working
|
|
531
|
+
- [ ] Related documentation linked
|
|
532
|
+
- [ ] BDD docs use Given/When/Then format
|
|
533
|
+
- [ ] No TODO comments left in content
|
|
534
|
+
|
|
535
|
+
## Related Skills
|
|
536
|
+
|
|
537
|
+
- `session-management` - Session documentation patterns
|
|
538
|
+
- `cypress-e2e` - BDD test documentation
|
|
539
|
+
- `pom-patterns` - Test documentation in tests.md
|
|
540
|
+
- `i18n-nextintl` - Documentation translations
|