@mohammadhprp/system-prompt 0.10.1
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 +35 -0
- package/bin/system-prompt.js +8 -0
- package/framework/README.md +163 -0
- package/framework/agents/README.md +49 -0
- package/framework/agents/backend-architect.md +146 -0
- package/framework/agents/researcher.md +79 -0
- package/framework/agents/reviewer.md +183 -0
- package/framework/agents/security-auditor.md +131 -0
- package/framework/commands/README.md +43 -0
- package/framework/commands/changelog.md +44 -0
- package/framework/commands/commit.md +31 -0
- package/framework/commands/learn.md +24 -0
- package/framework/commands/mr.md +46 -0
- package/framework/commands/pr.md +39 -0
- package/framework/commands/release.md +34 -0
- package/framework/commands/review.md +24 -0
- package/framework/commands/summarize-changes.md +49 -0
- package/framework/mcps/README.md +78 -0
- package/framework/mcps/excalidraw/README.md +37 -0
- package/framework/mcps/excalidraw/capabilities.md +54 -0
- package/framework/mcps/excalidraw/configs/opencode.json +8 -0
- package/framework/mcps/excalidraw/install.md +92 -0
- package/framework/mcps/excalidraw/troubleshooting.md +67 -0
- package/framework/mcps/figma-mcp-go/README.md +51 -0
- package/framework/mcps/figma-mcp-go/capabilities.md +190 -0
- package/framework/mcps/figma-mcp-go/configs/opencode.json +9 -0
- package/framework/mcps/figma-mcp-go/install.md +74 -0
- package/framework/mcps/figma-mcp-go/troubleshooting.md +99 -0
- package/framework/mcps/github-mcp/README.md +51 -0
- package/framework/mcps/github-mcp/capabilities.md +83 -0
- package/framework/mcps/github-mcp/configs/.env.example +1 -0
- package/framework/mcps/github-mcp/configs/opencode.json +13 -0
- package/framework/mcps/github-mcp/install.md +60 -0
- package/framework/mcps/github-mcp/troubleshooting.md +79 -0
- package/framework/mcps/gitlab-mcp/README.md +54 -0
- package/framework/mcps/gitlab-mcp/capabilities.md +216 -0
- package/framework/mcps/gitlab-mcp/configs/.env.example +2 -0
- package/framework/mcps/gitlab-mcp/configs/opencode.json +13 -0
- package/framework/mcps/gitlab-mcp/install.md +99 -0
- package/framework/mcps/gitlab-mcp/troubleshooting.md +116 -0
- package/framework/mcps/jira-mcp/README.md +53 -0
- package/framework/mcps/jira-mcp/capabilities.md +79 -0
- package/framework/mcps/jira-mcp/configs/.env.example +2 -0
- package/framework/mcps/jira-mcp/configs/opencode.json +13 -0
- package/framework/mcps/jira-mcp/install.md +94 -0
- package/framework/mcps/jira-mcp/troubleshooting.md +113 -0
- package/framework/mcps/laravel-boost/README.md +53 -0
- package/framework/mcps/laravel-boost/capabilities.md +92 -0
- package/framework/mcps/laravel-boost/configs/opencode.json +9 -0
- package/framework/mcps/laravel-boost/install.md +106 -0
- package/framework/mcps/laravel-boost/troubleshooting.md +119 -0
- package/framework/mcps/notion-mcp/README.md +58 -0
- package/framework/mcps/notion-mcp/capabilities.md +118 -0
- package/framework/mcps/notion-mcp/configs/opencode.json +9 -0
- package/framework/mcps/notion-mcp/install.md +70 -0
- package/framework/mcps/notion-mcp/troubleshooting.md +95 -0
- package/framework/mcps/playwright-mcp/README.md +50 -0
- package/framework/mcps/playwright-mcp/capabilities.md +149 -0
- package/framework/mcps/playwright-mcp/configs/opencode.json +9 -0
- package/framework/mcps/playwright-mcp/install.md +136 -0
- package/framework/mcps/playwright-mcp/troubleshooting.md +154 -0
- package/framework/mcps/supabase-mcp/README.md +66 -0
- package/framework/mcps/supabase-mcp/capabilities.md +127 -0
- package/framework/mcps/supabase-mcp/configs/opencode.json +9 -0
- package/framework/mcps/supabase-mcp/install.md +85 -0
- package/framework/mcps/supabase-mcp/troubleshooting.md +113 -0
- package/framework/memory/README.md +17 -0
- package/framework/memory/codebase-insights.md +6 -0
- package/framework/memory/user-preferences.md +5 -0
- package/framework/modes/README.md +52 -0
- package/framework/modes/audit.md +88 -0
- package/framework/plugins/README.md +65 -0
- package/framework/plugins/opencode-goal-plugin/README.md +45 -0
- package/framework/plugins/opencode-goal-plugin/capabilities.md +127 -0
- package/framework/plugins/opencode-goal-plugin/install.md +71 -0
- package/framework/plugins/opencode-goal-plugin/troubleshooting.md +112 -0
- package/framework/plugins/ponytail/README.md +44 -0
- package/framework/plugins/ponytail/capabilities.md +112 -0
- package/framework/plugins/ponytail/install.md +77 -0
- package/framework/plugins/ponytail/troubleshooting.md +116 -0
- package/framework/references/standards/api.md +44 -0
- package/framework/references/standards/architecture.md +43 -0
- package/framework/references/standards/database.md +43 -0
- package/framework/references/standards/debugging.md +44 -0
- package/framework/references/standards/documentation.md +43 -0
- package/framework/references/standards/logging.md +43 -0
- package/framework/references/standards/naming.md +43 -0
- package/framework/references/standards/observability.md +43 -0
- package/framework/references/standards/performance.md +43 -0
- package/framework/references/standards/pull-requests.md +43 -0
- package/framework/references/standards/security.md +43 -0
- package/framework/references/standards/testing.md +43 -0
- package/framework/references/templates/adr.md +28 -0
- package/framework/references/templates/api-spec.md +56 -0
- package/framework/references/templates/design-document.md +39 -0
- package/framework/references/templates/incident-report.md +38 -0
- package/framework/references/templates/postmortem.md +41 -0
- package/framework/references/templates/pull-request.md +34 -0
- package/framework/references/templates/runbook.md +48 -0
- package/framework/references/templates/task.md +27 -0
- package/framework/skills/README.md +68 -0
- package/framework/skills/agent-browser/SKILL.md +51 -0
- package/framework/skills/backend-best-practices/SKILL.md +136 -0
- package/framework/skills/backend-best-practices/examples.md +31 -0
- package/framework/skills/backend-best-practices/references/api-design.md +79 -0
- package/framework/skills/backend-best-practices/references/architecture-review.md +77 -0
- package/framework/skills/backend-best-practices/references/database-design.md +78 -0
- package/framework/skills/backend-best-practices/references/debugging.md +76 -0
- package/framework/skills/backend-best-practices/references/observability.md +78 -0
- package/framework/skills/backend-best-practices/references/performance.md +78 -0
- package/framework/skills/backend-best-practices/references/refactoring.md +77 -0
- package/framework/skills/backend-best-practices/references/security.md +80 -0
- package/framework/skills/backend-best-practices/references/testing.md +77 -0
- package/framework/skills/backend-engineer/SKILL.md +76 -0
- package/framework/skills/backend-engineer/examples.md +31 -0
- package/framework/skills/brainstorming/SKILL.md +159 -0
- package/framework/skills/brainstorming/examples.md +49 -0
- package/framework/skills/brainstorming/scripts/frame-template.html +213 -0
- package/framework/skills/brainstorming/scripts/helper.js +167 -0
- package/framework/skills/brainstorming/scripts/server.cjs +723 -0
- package/framework/skills/brainstorming/scripts/start-server.sh +209 -0
- package/framework/skills/brainstorming/scripts/stop-server.sh +120 -0
- package/framework/skills/brainstorming/visual-companion.md +291 -0
- package/framework/skills/brand-guidelines/LICENSE.txt +202 -0
- package/framework/skills/brand-guidelines/SKILL.md +73 -0
- package/framework/skills/code-review/SKILL.md +72 -0
- package/framework/skills/code-review/examples.md +31 -0
- package/framework/skills/design/SKILL.md +399 -0
- package/framework/skills/design/examples.md +34 -0
- package/framework/skills/diagram-design/SKILL.md +485 -0
- package/framework/skills/diagram-design/assets/example-architecture-dark.html +180 -0
- package/framework/skills/diagram-design/assets/example-architecture-full.html +192 -0
- package/framework/skills/diagram-design/assets/example-architecture.html +181 -0
- package/framework/skills/diagram-design/assets/example-bar-dark.html +127 -0
- package/framework/skills/diagram-design/assets/example-bar-full.html +103 -0
- package/framework/skills/diagram-design/assets/example-bar.html +127 -0
- package/framework/skills/diagram-design/assets/example-data-flow-dark.html +143 -0
- package/framework/skills/diagram-design/assets/example-data-flow-full.html +185 -0
- package/framework/skills/diagram-design/assets/example-data-flow.html +143 -0
- package/framework/skills/diagram-design/assets/example-datalake-dark.html +241 -0
- package/framework/skills/diagram-design/assets/example-datalake-full.html +246 -0
- package/framework/skills/diagram-design/assets/example-datalake.html +267 -0
- package/framework/skills/diagram-design/assets/example-dp-integration-dark.html +78 -0
- package/framework/skills/diagram-design/assets/example-dp-integration-full.html +88 -0
- package/framework/skills/diagram-design/assets/example-dp-integration.html +78 -0
- package/framework/skills/diagram-design/assets/example-dp-security-matrix-dark.html +31 -0
- package/framework/skills/diagram-design/assets/example-dp-security-matrix-full.html +32 -0
- package/framework/skills/diagram-design/assets/example-dp-security-matrix.html +88 -0
- package/framework/skills/diagram-design/assets/example-er-dark.html +200 -0
- package/framework/skills/diagram-design/assets/example-er-full.html +203 -0
- package/framework/skills/diagram-design/assets/example-er.html +200 -0
- package/framework/skills/diagram-design/assets/example-flowchart-dark.html +154 -0
- package/framework/skills/diagram-design/assets/example-flowchart-full.html +157 -0
- package/framework/skills/diagram-design/assets/example-flowchart.html +154 -0
- package/framework/skills/diagram-design/assets/example-gantt-dark.html +135 -0
- package/framework/skills/diagram-design/assets/example-gantt-full.html +125 -0
- package/framework/skills/diagram-design/assets/example-gantt.html +135 -0
- package/framework/skills/diagram-design/assets/example-high-level-dark.html +249 -0
- package/framework/skills/diagram-design/assets/example-high-level-full.html +245 -0
- package/framework/skills/diagram-design/assets/example-high-level-vertical-dark.html +272 -0
- package/framework/skills/diagram-design/assets/example-high-level-vertical-full.html +250 -0
- package/framework/skills/diagram-design/assets/example-high-level-vertical.html +323 -0
- package/framework/skills/diagram-design/assets/example-high-level.html +299 -0
- package/framework/skills/diagram-design/assets/example-it-state-dark.html +90 -0
- package/framework/skills/diagram-design/assets/example-it-state-full.html +69 -0
- package/framework/skills/diagram-design/assets/example-it-state.html +128 -0
- package/framework/skills/diagram-design/assets/example-layers-dark.html +121 -0
- package/framework/skills/diagram-design/assets/example-layers-full.html +124 -0
- package/framework/skills/diagram-design/assets/example-layers.html +121 -0
- package/framework/skills/diagram-design/assets/example-line-dark.html +109 -0
- package/framework/skills/diagram-design/assets/example-line-full.html +103 -0
- package/framework/skills/diagram-design/assets/example-line.html +109 -0
- package/framework/skills/diagram-design/assets/example-loop-dark.html +100 -0
- package/framework/skills/diagram-design/assets/example-loop-full.html +137 -0
- package/framework/skills/diagram-design/assets/example-loop-terminal.html +347 -0
- package/framework/skills/diagram-design/assets/example-loop.html +100 -0
- package/framework/skills/diagram-design/assets/example-medallion-dark.html +159 -0
- package/framework/skills/diagram-design/assets/example-medallion-full.html +201 -0
- package/framework/skills/diagram-design/assets/example-medallion.html +159 -0
- package/framework/skills/diagram-design/assets/example-nested-dark.html +130 -0
- package/framework/skills/diagram-design/assets/example-nested-full.html +133 -0
- package/framework/skills/diagram-design/assets/example-nested.html +134 -0
- package/framework/skills/diagram-design/assets/example-org-chart-dark.html +45 -0
- package/framework/skills/diagram-design/assets/example-org-chart-full.html +45 -0
- package/framework/skills/diagram-design/assets/example-org-chart.html +45 -0
- package/framework/skills/diagram-design/assets/example-process-dark.html +62 -0
- package/framework/skills/diagram-design/assets/example-process-full.html +72 -0
- package/framework/skills/diagram-design/assets/example-process.html +62 -0
- package/framework/skills/diagram-design/assets/example-pyramid-dark.html +117 -0
- package/framework/skills/diagram-design/assets/example-pyramid-full.html +120 -0
- package/framework/skills/diagram-design/assets/example-pyramid.html +117 -0
- package/framework/skills/diagram-design/assets/example-quadrant-consultant.html +164 -0
- package/framework/skills/diagram-design/assets/example-quadrant-dark.html +133 -0
- package/framework/skills/diagram-design/assets/example-quadrant-full.html +136 -0
- package/framework/skills/diagram-design/assets/example-quadrant.html +133 -0
- package/framework/skills/diagram-design/assets/example-radar-dark.html +137 -0
- package/framework/skills/diagram-design/assets/example-radar-full.html +133 -0
- package/framework/skills/diagram-design/assets/example-radar.html +137 -0
- package/framework/skills/diagram-design/assets/example-scatter-dark.html +139 -0
- package/framework/skills/diagram-design/assets/example-scatter-full.html +114 -0
- package/framework/skills/diagram-design/assets/example-scatter.html +139 -0
- package/framework/skills/diagram-design/assets/example-sequence-dark.html +220 -0
- package/framework/skills/diagram-design/assets/example-sequence-full.html +386 -0
- package/framework/skills/diagram-design/assets/example-sequence.html +220 -0
- package/framework/skills/diagram-design/assets/example-state-dark.html +145 -0
- package/framework/skills/diagram-design/assets/example-state-full.html +148 -0
- package/framework/skills/diagram-design/assets/example-state.html +145 -0
- package/framework/skills/diagram-design/assets/example-swimlane-dark.html +170 -0
- package/framework/skills/diagram-design/assets/example-swimlane-full.html +173 -0
- package/framework/skills/diagram-design/assets/example-swimlane.html +170 -0
- package/framework/skills/diagram-design/assets/example-timeline-dark.html +133 -0
- package/framework/skills/diagram-design/assets/example-timeline-full.html +136 -0
- package/framework/skills/diagram-design/assets/example-timeline.html +133 -0
- package/framework/skills/diagram-design/assets/example-tree-dark.html +171 -0
- package/framework/skills/diagram-design/assets/example-tree-full.html +174 -0
- package/framework/skills/diagram-design/assets/example-tree.html +171 -0
- package/framework/skills/diagram-design/assets/example-venn-dark.html +130 -0
- package/framework/skills/diagram-design/assets/example-venn-full.html +133 -0
- package/framework/skills/diagram-design/assets/example-venn.html +108 -0
- package/framework/skills/diagram-design/assets/icons.html +230 -0
- package/framework/skills/diagram-design/assets/index.html +333 -0
- package/framework/skills/diagram-design/assets/template-dark.html +82 -0
- package/framework/skills/diagram-design/assets/template-full.html +410 -0
- package/framework/skills/diagram-design/assets/template-terminal.html +170 -0
- package/framework/skills/diagram-design/assets/template.html +83 -0
- package/framework/skills/diagram-design/references/export.md +107 -0
- package/framework/skills/diagram-design/references/onboarding.md +268 -0
- package/framework/skills/diagram-design/references/primitive-annotation.md +36 -0
- package/framework/skills/diagram-design/references/primitive-icons.md +821 -0
- package/framework/skills/diagram-design/references/primitive-sketchy.md +43 -0
- package/framework/skills/diagram-design/references/primitive-terminal.md +76 -0
- package/framework/skills/diagram-design/references/style-guide.md +139 -0
- package/framework/skills/diagram-design/references/type-architecture.md +78 -0
- package/framework/skills/diagram-design/references/type-bar.md +48 -0
- package/framework/skills/diagram-design/references/type-data-flow.md +374 -0
- package/framework/skills/diagram-design/references/type-dp-integration.md +410 -0
- package/framework/skills/diagram-design/references/type-dp-security-matrix.md +379 -0
- package/framework/skills/diagram-design/references/type-er.md +23 -0
- package/framework/skills/diagram-design/references/type-flowchart.md +23 -0
- package/framework/skills/diagram-design/references/type-gantt.md +45 -0
- package/framework/skills/diagram-design/references/type-high-level.md +458 -0
- package/framework/skills/diagram-design/references/type-it-state.md +470 -0
- package/framework/skills/diagram-design/references/type-layers.md +26 -0
- package/framework/skills/diagram-design/references/type-line.md +44 -0
- package/framework/skills/diagram-design/references/type-loop.md +223 -0
- package/framework/skills/diagram-design/references/type-medallion.md +356 -0
- package/framework/skills/diagram-design/references/type-nested.md +22 -0
- package/framework/skills/diagram-design/references/type-org-chart.md +44 -0
- package/framework/skills/diagram-design/references/type-process.md +495 -0
- package/framework/skills/diagram-design/references/type-pyramid.md +33 -0
- package/framework/skills/diagram-design/references/type-quadrant.md +81 -0
- package/framework/skills/diagram-design/references/type-radar.md +80 -0
- package/framework/skills/diagram-design/references/type-scatter.md +39 -0
- package/framework/skills/diagram-design/references/type-sequence.md +35 -0
- package/framework/skills/diagram-design/references/type-state.md +21 -0
- package/framework/skills/diagram-design/references/type-swimlane.md +20 -0
- package/framework/skills/diagram-design/references/type-timeline.md +20 -0
- package/framework/skills/diagram-design/references/type-tree.md +24 -0
- package/framework/skills/diagram-design/references/type-venn.md +26 -0
- package/framework/skills/documentation/SKILL.md +74 -0
- package/framework/skills/documentation/examples.md +31 -0
- package/framework/skills/find-skills/SKILL.md +141 -0
- package/framework/skills/find-skills/examples.md +35 -0
- package/framework/skills/gitlab-mcp/SKILL.md +83 -0
- package/framework/skills/gitlab-mcp/examples.md +31 -0
- package/framework/skills/gitlab-mcp/references/code-review.md +110 -0
- package/framework/skills/gitlab-mcp/references/issues.md +141 -0
- package/framework/skills/gitlab-mcp/references/merge-requests.md +120 -0
- package/framework/skills/gitlab-mcp/references/pipelines.md +67 -0
- package/framework/skills/gitlab-mcp/references/search.md +17 -0
- package/framework/skills/gitlab-mcp/references/webhooks.md +32 -0
- package/framework/skills/gitlab-mcp/references/work-items.md +50 -0
- package/framework/skills/jira-mcp/SKILL.md +57 -0
- package/framework/skills/jira-mcp/examples.md +31 -0
- package/framework/skills/jira-mcp/references/comments.md +27 -0
- package/framework/skills/jira-mcp/references/issues.md +97 -0
- package/framework/skills/jira-mcp/references/projects.md +39 -0
- package/framework/skills/laravel-best-practices/SKILL.md +229 -0
- package/framework/skills/laravel-best-practices/examples.md +31 -0
- package/framework/skills/laravel-best-practices/references/advanced-queries.md +106 -0
- package/framework/skills/laravel-best-practices/references/architecture.md +202 -0
- package/framework/skills/laravel-best-practices/references/blade-views.md +36 -0
- package/framework/skills/laravel-best-practices/references/caching.md +70 -0
- package/framework/skills/laravel-best-practices/references/collections.md +44 -0
- package/framework/skills/laravel-best-practices/references/config.md +73 -0
- package/framework/skills/laravel-best-practices/references/db-performance.md +192 -0
- package/framework/skills/laravel-best-practices/references/eloquent.md +148 -0
- package/framework/skills/laravel-best-practices/references/error-handling.md +72 -0
- package/framework/skills/laravel-best-practices/references/events-notifications.md +52 -0
- package/framework/skills/laravel-best-practices/references/http-client.md +160 -0
- package/framework/skills/laravel-best-practices/references/mail.md +27 -0
- package/framework/skills/laravel-best-practices/references/migrations.md +121 -0
- package/framework/skills/laravel-best-practices/references/passport.md +197 -0
- package/framework/skills/laravel-best-practices/references/pennant.md +61 -0
- package/framework/skills/laravel-best-practices/references/pest-testing.md +166 -0
- package/framework/skills/laravel-best-practices/references/pulse.md +196 -0
- package/framework/skills/laravel-best-practices/references/queue-jobs.md +144 -0
- package/framework/skills/laravel-best-practices/references/routing.md +99 -0
- package/framework/skills/laravel-best-practices/references/scheduling.md +39 -0
- package/framework/skills/laravel-best-practices/references/scout.md +176 -0
- package/framework/skills/laravel-best-practices/references/security.md +198 -0
- package/framework/skills/laravel-best-practices/references/spatie-laravel-backup.md +222 -0
- package/framework/skills/laravel-best-practices/references/spatie-laravel-permission.md +272 -0
- package/framework/skills/laravel-best-practices/references/spatie-medialibrary.md +672 -0
- package/framework/skills/laravel-best-practices/references/style.md +125 -0
- package/framework/skills/laravel-best-practices/references/tailwindcss.md +112 -0
- package/framework/skills/laravel-best-practices/references/testing.md +43 -0
- package/framework/skills/laravel-best-practices/references/validation.md +75 -0
- package/framework/skills/lavish/SKILL.md +67 -0
- package/framework/skills/lavish/examples.md +31 -0
- package/framework/skills/notion-mcp/SKILL.md +57 -0
- package/framework/skills/notion-mcp/examples.md +31 -0
- package/framework/skills/notion-mcp/references/comments.md +112 -0
- package/framework/skills/notion-mcp/references/databases.md +193 -0
- package/framework/skills/notion-mcp/references/pages.md +235 -0
- package/framework/skills/skill-creator/LICENSE.txt +202 -0
- package/framework/skills/skill-creator/SKILL.md +485 -0
- package/framework/skills/skill-creator/agents/analyzer.md +274 -0
- package/framework/skills/skill-creator/agents/comparator.md +202 -0
- package/framework/skills/skill-creator/agents/grader.md +223 -0
- package/framework/skills/skill-creator/assets/eval_review.html +146 -0
- package/framework/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/framework/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/framework/skills/skill-creator/examples.md +31 -0
- package/framework/skills/skill-creator/references/schemas.md +430 -0
- package/framework/skills/skill-creator/scripts/__init__.py +0 -0
- package/framework/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/framework/skills/skill-creator/scripts/generate_report.py +326 -0
- package/framework/skills/skill-creator/scripts/improve_description.py +247 -0
- package/framework/skills/skill-creator/scripts/package_skill.py +136 -0
- package/framework/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/framework/skills/skill-creator/scripts/run_eval.py +310 -0
- package/framework/skills/skill-creator/scripts/run_loop.py +328 -0
- package/framework/skills/skill-creator/scripts/utils.py +47 -0
- package/framework/styles/README.md +35 -0
- package/framework/styles/linear/DESIGN.md +478 -0
- package/framework/styles/linear/README.md +36 -0
- package/framework/styles/linear/assets/preview.jpg +0 -0
- package/framework/styles/raycast/DESIGN.md +495 -0
- package/framework/styles/raycast/README.md +35 -0
- package/framework/styles/raycast/assets/preview.jpg +0 -0
- package/package.json +33 -0
- package/src/agent-configs.js +96 -0
- package/src/catalog.js +145 -0
- package/src/cli.js +254 -0
- package/src/installer.js +303 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Conventions & Style
|
|
2
|
+
|
|
3
|
+
## Follow Laravel Naming Conventions
|
|
4
|
+
|
|
5
|
+
| What | Convention | Good | Bad |
|
|
6
|
+
|------|-----------|------|-----|
|
|
7
|
+
| Controller | singular | `ArticleController` | `ArticlesController` |
|
|
8
|
+
| Model | singular | `User` | `Users` |
|
|
9
|
+
| Table | plural, snake_case | `article_comments` | `articleComments` |
|
|
10
|
+
| Pivot table | singular alphabetical | `article_user` | `user_article` |
|
|
11
|
+
| Column | snake_case, no model name | `meta_title` | `article_meta_title` |
|
|
12
|
+
| Foreign key | singular model + `_id` | `article_id` | `articles_id` |
|
|
13
|
+
| Route | plural | `articles/1` | `article/1` |
|
|
14
|
+
| Route name | snake_case with dots | `users.show_active` | `users.show-active` |
|
|
15
|
+
| Method | camelCase | `getAll` | `get_all` |
|
|
16
|
+
| Variable | camelCase | `$articlesWithAuthor` | `$articles_with_author` |
|
|
17
|
+
| Collection | descriptive, plural | `$activeUsers` | `$data` |
|
|
18
|
+
| Object | descriptive, singular | `$activeUser` | `$users` |
|
|
19
|
+
| View | kebab-case | `show-filtered.blade.php` | `showFiltered.blade.php` |
|
|
20
|
+
| Config | snake_case | `google_calendar.php` | `googleCalendar.php` |
|
|
21
|
+
| Enum | singular | `UserType` | `UserTypes` |
|
|
22
|
+
|
|
23
|
+
## Prefer Shorter Readable Syntax
|
|
24
|
+
|
|
25
|
+
| Verbose | Shorter |
|
|
26
|
+
|---------|---------|
|
|
27
|
+
| `Session::get('cart')` | `session('cart')` |
|
|
28
|
+
| `$request->session()->get('cart')` | `session('cart')` |
|
|
29
|
+
| `$request->input('name')` | `$request->name` |
|
|
30
|
+
| `return Redirect::back()` | `return back()` |
|
|
31
|
+
| `Carbon::now()` | `now()` |
|
|
32
|
+
| `App::make('Class')` | `app('Class')` |
|
|
33
|
+
| `->where('column', '=', 1)` | `->where('column', 1)` |
|
|
34
|
+
| `->orderBy('created_at', 'desc')` | `->latest()` |
|
|
35
|
+
| `->orderBy('created_at', 'asc')` | `->oldest()` |
|
|
36
|
+
| `->first()->name` | `->value('name')` |
|
|
37
|
+
|
|
38
|
+
## Use Laravel String & Array Helpers
|
|
39
|
+
|
|
40
|
+
Laravel provides `Str`, `Arr`, `Number`, and `Uri` helper classes that are more readable, chainable, and UTF-8 safe than raw PHP functions. Always prefer them.
|
|
41
|
+
|
|
42
|
+
Strings — use `Str` and fluent `Str::of()` over raw PHP:
|
|
43
|
+
```php
|
|
44
|
+
// Incorrect
|
|
45
|
+
$slug = strtolower(str_replace(' ', '-', $title));
|
|
46
|
+
$short = substr($text, 0, 100) . '...';
|
|
47
|
+
$class = substr(strrchr('App\Models\User', '\'), 1);
|
|
48
|
+
|
|
49
|
+
// Correct
|
|
50
|
+
$slug = Str::slug($title);
|
|
51
|
+
$short = Str::limit($text, 100);
|
|
52
|
+
$class = class_basename('App\Models\User');
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Fluent strings — chain operations for complex transformations:
|
|
56
|
+
```php
|
|
57
|
+
// Incorrect
|
|
58
|
+
$result = strtolower(trim(str_replace('_', '-', $input)));
|
|
59
|
+
|
|
60
|
+
// Correct
|
|
61
|
+
$result = Str::of($input)->trim()->replace('_', '-')->lower();
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Key `Str` methods to prefer: `Str::slug()`, `Str::limit()`, `Str::contains()`, `Str::before()`, `Str::after()`, `Str::between()`, `Str::camel()`, `Str::snake()`, `Str::kebab()`, `Str::headline()`, `Str::squish()`, `Str::mask()`, `Str::uuid()`, `Str::ulid()`, `Str::random()`, `Str::is()`.
|
|
65
|
+
|
|
66
|
+
Arrays — use `Arr` over raw PHP:
|
|
67
|
+
```php
|
|
68
|
+
// Incorrect
|
|
69
|
+
$name = isset($array['user']['name']) ? $array['user']['name'] : 'default';
|
|
70
|
+
|
|
71
|
+
// Correct
|
|
72
|
+
$name = Arr::get($array, 'user.name', 'default');
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Key `Arr` methods: `Arr::get()`, `Arr::has()`, `Arr::only()`, `Arr::except()`, `Arr::first()`, `Arr::flatten()`, `Arr::pluck()`, `Arr::where()`, `Arr::wrap()`.
|
|
76
|
+
|
|
77
|
+
Numbers — use `Number` for display formatting:
|
|
78
|
+
```php
|
|
79
|
+
Number::format(1000000); // "1,000,000"
|
|
80
|
+
Number::currency(1500, 'USD'); // "$1,500.00"
|
|
81
|
+
Number::abbreviate(1000000); // "1M"
|
|
82
|
+
Number::fileSize(1024 * 1024); // "1 MB"
|
|
83
|
+
Number::percentage(75.5); // "75.5%"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
URIs — use `Uri` for URL manipulation:
|
|
87
|
+
```php
|
|
88
|
+
$uri = Uri::of('https://example.com/search')
|
|
89
|
+
->withQuery(['q' => 'laravel', 'page' => 1]);
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Use `$request->string('name')` to get a fluent `Stringable` directly from request input for immediate chaining.
|
|
93
|
+
|
|
94
|
+
Use `search-docs` for the full list of available methods — these helpers are extensive.
|
|
95
|
+
|
|
96
|
+
## No Inline JS/CSS in Blade
|
|
97
|
+
|
|
98
|
+
Do not put JS or CSS in Blade templates. Do not put HTML in PHP classes.
|
|
99
|
+
|
|
100
|
+
Incorrect:
|
|
101
|
+
```blade
|
|
102
|
+
let article = `{{ json_encode($article) }}`;
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Correct:
|
|
106
|
+
```blade
|
|
107
|
+
<button class="js-fav-article" data-article='@json($article)'>{{ $article->name }}</button>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Pass data to JS via data attributes or use a dedicated PHP-to-JS package.
|
|
111
|
+
|
|
112
|
+
## No Unnecessary Comments
|
|
113
|
+
|
|
114
|
+
Code should be readable on its own. Use descriptive method and variable names instead of comments. The only exception is config files, where descriptive comments are expected.
|
|
115
|
+
|
|
116
|
+
Incorrect:
|
|
117
|
+
```php
|
|
118
|
+
// Check if there are any joins
|
|
119
|
+
if (count((array) $builder->getQuery()->joins) > 0)
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Correct:
|
|
123
|
+
```php
|
|
124
|
+
if ($this->hasJoins())
|
|
125
|
+
```
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
|
|
2
|
+
# Tailwind CSS Development
|
|
3
|
+
|
|
4
|
+
## Documentation
|
|
5
|
+
|
|
6
|
+
Use `search-docs` for detailed Tailwind CSS v4 patterns and documentation.
|
|
7
|
+
|
|
8
|
+
## Basic Usage
|
|
9
|
+
|
|
10
|
+
- Use Tailwind CSS classes to style HTML. Check and follow existing Tailwind conventions in the project before introducing new patterns.
|
|
11
|
+
- Offer to extract repeated patterns into components that match the project's conventions (e.g., Blade, JSX, Vue).
|
|
12
|
+
- Consider class placement, order, priority, and defaults. Remove redundant classes, add classes to parent or child elements carefully to reduce repetition, and group elements logically.
|
|
13
|
+
|
|
14
|
+
## Tailwind CSS v4 Specifics
|
|
15
|
+
|
|
16
|
+
- Always use Tailwind CSS v4 and avoid deprecated utilities.
|
|
17
|
+
- `corePlugins` is not supported in Tailwind v4.
|
|
18
|
+
|
|
19
|
+
### CSS-First Configuration
|
|
20
|
+
|
|
21
|
+
In Tailwind v4, configuration is CSS-first using the `@theme` directive — no separate `tailwind.config.js` file is needed:
|
|
22
|
+
|
|
23
|
+
<!-- CSS-First Config -->
|
|
24
|
+
```css
|
|
25
|
+
@theme {
|
|
26
|
+
--color-brand: oklch(0.72 0.11 178);
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Import Syntax
|
|
31
|
+
|
|
32
|
+
In Tailwind v4, import Tailwind with a regular CSS `@import` statement instead of the `@tailwind` directives used in v3:
|
|
33
|
+
|
|
34
|
+
<!-- v4 Import Syntax -->
|
|
35
|
+
```diff
|
|
36
|
+
- @tailwind base;
|
|
37
|
+
- @tailwind components;
|
|
38
|
+
- @tailwind utilities;
|
|
39
|
+
+ @import "tailwindcss";
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Replaced Utilities
|
|
43
|
+
|
|
44
|
+
Tailwind v4 removed deprecated utilities. Use the replacements shown below. Opacity values remain numeric.
|
|
45
|
+
|
|
46
|
+
| Deprecated | Replacement |
|
|
47
|
+
|------------|-------------|
|
|
48
|
+
| bg-opacity-* | bg-black/* |
|
|
49
|
+
| text-opacity-* | text-black/* |
|
|
50
|
+
| border-opacity-* | border-black/* |
|
|
51
|
+
| divide-opacity-* | divide-black/* |
|
|
52
|
+
| ring-opacity-* | ring-black/* |
|
|
53
|
+
| placeholder-opacity-* | placeholder-black/* |
|
|
54
|
+
| flex-shrink-* | shrink-* |
|
|
55
|
+
| flex-grow-* | grow-* |
|
|
56
|
+
| overflow-ellipsis | text-ellipsis |
|
|
57
|
+
| decoration-slice | box-decoration-slice |
|
|
58
|
+
| decoration-clone | box-decoration-clone |
|
|
59
|
+
|
|
60
|
+
## Spacing
|
|
61
|
+
|
|
62
|
+
Use `gap` utilities instead of margins for spacing between siblings:
|
|
63
|
+
|
|
64
|
+
<!-- Gap Utilities -->
|
|
65
|
+
```html
|
|
66
|
+
<div class="flex gap-8">
|
|
67
|
+
<div>Item 1</div>
|
|
68
|
+
<div>Item 2</div>
|
|
69
|
+
</div>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Dark Mode
|
|
73
|
+
|
|
74
|
+
If existing pages and components support dark mode, new pages and components must support it the same way, typically using the `dark:` variant:
|
|
75
|
+
|
|
76
|
+
<!-- Dark Mode -->
|
|
77
|
+
```html
|
|
78
|
+
<div class="bg-white dark:bg-gray-900 text-gray-900 dark:text-white">
|
|
79
|
+
Content adapts to color scheme
|
|
80
|
+
</div>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Common Patterns
|
|
84
|
+
|
|
85
|
+
### Flexbox Layout
|
|
86
|
+
|
|
87
|
+
<!-- Flexbox Layout -->
|
|
88
|
+
```html
|
|
89
|
+
<div class="flex items-center justify-between gap-4">
|
|
90
|
+
<div>Left content</div>
|
|
91
|
+
<div>Right content</div>
|
|
92
|
+
</div>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Grid Layout
|
|
96
|
+
|
|
97
|
+
<!-- Grid Layout -->
|
|
98
|
+
```html
|
|
99
|
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
100
|
+
<div>Card 1</div>
|
|
101
|
+
<div>Card 2</div>
|
|
102
|
+
<div>Card 3</div>
|
|
103
|
+
</div>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Common Pitfalls
|
|
107
|
+
|
|
108
|
+
- Using deprecated v3 utilities (bg-opacity-*, flex-shrink-*, etc.)
|
|
109
|
+
- Using `@tailwind` directives instead of `@import "tailwindcss"`
|
|
110
|
+
- Trying to use `tailwind.config.js` instead of CSS `@theme` directive
|
|
111
|
+
- Using margins for spacing between siblings instead of gap utilities
|
|
112
|
+
- Forgetting to add dark mode variants when the project uses dark mode
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Testing Best Practices
|
|
2
|
+
|
|
3
|
+
## Use `LazilyRefreshDatabase` Over `RefreshDatabase`
|
|
4
|
+
|
|
5
|
+
`RefreshDatabase` migrates once per process and wraps each test in a rolled-back transaction. `LazilyRefreshDatabase` skips even that first migration if the schema is already up to date.
|
|
6
|
+
|
|
7
|
+
## Use Model Assertions Over Raw Database Assertions
|
|
8
|
+
|
|
9
|
+
Incorrect: `$this->assertDatabaseHas('users', ['id' => $user->id]);`
|
|
10
|
+
|
|
11
|
+
Correct: `$this->assertModelExists($user);`
|
|
12
|
+
|
|
13
|
+
More expressive, type-safe, and fails with clearer messages.
|
|
14
|
+
|
|
15
|
+
## Use Factory States and Sequences
|
|
16
|
+
|
|
17
|
+
Named states make tests self-documenting. Sequences eliminate repetitive setup.
|
|
18
|
+
|
|
19
|
+
Incorrect: `User::factory()->create(['email_verified_at' => null]);`
|
|
20
|
+
|
|
21
|
+
Correct: `User::factory()->unverified()->create();`
|
|
22
|
+
|
|
23
|
+
## Use `Exceptions::fake()` to Assert Exception Reporting
|
|
24
|
+
|
|
25
|
+
Instead of `withoutExceptionHandling()`, use `Exceptions::fake()` to assert the correct exception was reported while the request completes normally.
|
|
26
|
+
|
|
27
|
+
## Call `Event::fake()` After Factory Setup
|
|
28
|
+
|
|
29
|
+
Model factories rely on model events (e.g., `creating` to generate UUIDs). Calling `Event::fake()` before factory calls silences those events, producing broken models.
|
|
30
|
+
|
|
31
|
+
Incorrect: `Event::fake(); $user = User::factory()->create();`
|
|
32
|
+
|
|
33
|
+
Correct: `$user = User::factory()->create(); Event::fake();`
|
|
34
|
+
|
|
35
|
+
## Use `recycle()` to Share Relationship Instances Across Factories
|
|
36
|
+
|
|
37
|
+
Without `recycle()`, nested factories create separate instances of the same conceptual entity.
|
|
38
|
+
|
|
39
|
+
```php
|
|
40
|
+
Ticket::factory()
|
|
41
|
+
->recycle(Airline::factory()->create())
|
|
42
|
+
->create();
|
|
43
|
+
```
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Validation & Forms Best Practices
|
|
2
|
+
|
|
3
|
+
## Use Form Request Classes
|
|
4
|
+
|
|
5
|
+
Extract validation from controllers into dedicated Form Request classes.
|
|
6
|
+
|
|
7
|
+
Incorrect:
|
|
8
|
+
```php
|
|
9
|
+
public function store(Request $request)
|
|
10
|
+
{
|
|
11
|
+
$request->validate([
|
|
12
|
+
'title' => 'required|max:255',
|
|
13
|
+
'body' => 'required',
|
|
14
|
+
]);
|
|
15
|
+
}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Correct:
|
|
19
|
+
```php
|
|
20
|
+
public function store(StorePostRequest $request)
|
|
21
|
+
{
|
|
22
|
+
Post::create($request->validated());
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Array vs. String Notation for Rules
|
|
27
|
+
|
|
28
|
+
Array syntax is more readable and composes cleanly with `Rule::` objects. Prefer it in new code, but check existing Form Requests first and match whatever notation the project already uses.
|
|
29
|
+
|
|
30
|
+
```php
|
|
31
|
+
// Preferred for new code
|
|
32
|
+
'email' => ['required', 'email', Rule::unique('users')],
|
|
33
|
+
|
|
34
|
+
// Follow existing convention if the project uses string notation
|
|
35
|
+
'email' => 'required|email|unique:users',
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Always Use `validated()`
|
|
39
|
+
|
|
40
|
+
Get only validated data. Never use `$request->all()` for mass operations.
|
|
41
|
+
|
|
42
|
+
Incorrect:
|
|
43
|
+
```php
|
|
44
|
+
Post::create($request->all());
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Correct:
|
|
48
|
+
```php
|
|
49
|
+
Post::create($request->validated());
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Use `Rule::when()` for Conditional Validation
|
|
53
|
+
|
|
54
|
+
```php
|
|
55
|
+
'company_name' => [
|
|
56
|
+
Rule::when($this->account_type === 'business', ['required', 'string', 'max:255']),
|
|
57
|
+
],
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Use the `after()` Method for Custom Validation
|
|
61
|
+
|
|
62
|
+
Use `after()` instead of `withValidator()` for custom validation logic that depends on multiple fields.
|
|
63
|
+
|
|
64
|
+
```php
|
|
65
|
+
public function after(): array
|
|
66
|
+
{
|
|
67
|
+
return [
|
|
68
|
+
function (Validator $validator) {
|
|
69
|
+
if ($this->quantity > Product::find($this->product_id)?->stock) {
|
|
70
|
+
$validator->errors()->add('quantity', 'Not enough stock.');
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
];
|
|
74
|
+
}
|
|
75
|
+
```
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lavish
|
|
3
|
+
description: Turn complex or visual agent responses into rich, reviewable HTML artifacts the user can annotate and send feedback on, using the lavish-axi CLI. Use when about to give a plan, comparison, diagram, table, code diff, report, or anything easier to grasp visually than as prose.
|
|
4
|
+
argument-hint: <what the artifact should show>
|
|
5
|
+
author: Kun Chen (kunchenguid)
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Lavish Editor
|
|
9
|
+
|
|
10
|
+
Lavish Editor helps agents turn rich HTML artifacts into collaborative human review surfaces. Whenever you are about to give user a complex response that will be easier to understand via a rich / interactive page, consider using Lavish Editor. First generate an interactive HTML artifact according to user request, then run `npx -y lavish-axi <html-file>` so the user can visually review it, annotate elements or selected text, queue prompts, and send feedback back through `npx -y lavish-axi poll`.
|
|
11
|
+
|
|
12
|
+
You do not need lavish-axi installed globally - invoke it with `npx -y lavish-axi <html-file>`.
|
|
13
|
+
If lavish-axi output shows a follow-up command starting with `lavish-axi`, run it as `npx -y lavish-axi ...` instead.
|
|
14
|
+
|
|
15
|
+
## Request
|
|
16
|
+
|
|
17
|
+
$ARGUMENTS
|
|
18
|
+
|
|
19
|
+
If the request above is non-empty, the user invoked `/lavish` explicitly - build an HTML artifact for that request now, following the workflow below.
|
|
20
|
+
If it is empty, infer what to visualize from the conversation.
|
|
21
|
+
|
|
22
|
+
## When to use
|
|
23
|
+
|
|
24
|
+
Use lavish-axi when the user asks for a visual artifact, HTML explainer, interactive prototype, review surface, product or technical plan, comparison, report, or browser-based feedback loop
|
|
25
|
+
|
|
26
|
+
## Workflow
|
|
27
|
+
|
|
28
|
+
1. Create the HTML artifact (default location `.opencode/output/lavish/<name>.html` in the working directory).
|
|
29
|
+
2. Run `npx -y lavish-axi <html-file>` to open or resume a review session in the browser.
|
|
30
|
+
3. Run `npx -y lavish-axi poll <html-file>` to long-poll for the user's annotations, queued prompts, and browser-reported `layout_warnings`.
|
|
31
|
+
The poll stays silent until the user acts or the real browser reports fresh layout warnings - leave it running, never kill it.
|
|
32
|
+
If your harness limits how long a foreground command may run, run the poll as a background task; if it gets killed or times out anyway, just re-run it - queued feedback is never lost.
|
|
33
|
+
4. If poll returns `layout_warnings`, fix overflow, clipped text, or overlapping unreadable content and re-check before involving the human.
|
|
34
|
+
5. Apply human feedback, then poll again with `--agent-reply "<message>"` to reply in the browser and keep the loop going.
|
|
35
|
+
6. Run `npx -y lavish-axi end <html-file>` when the review is finished.
|
|
36
|
+
|
|
37
|
+
## Visual guidance
|
|
38
|
+
|
|
39
|
+
- Use visual hierarchy to make the most important decisions, risks, tradeoffs, and next actions obvious at a glance
|
|
40
|
+
- Use visual structure such as sections, cards, tables, diagrams, annotated snippets, and side-by-side comparisons instead of long prose
|
|
41
|
+
- Choose typography, spacing, color, and layout deliberately so the artifact has a clear point of view
|
|
42
|
+
- Prevent horizontal overflow at every nesting level: nested grid/flex children also need minmax(0, 1fr) tracks and min-width: 0, especially when badges, labels, or status text use wide pixel or monospace fonts; wrap, truncate, or contain long unbreakable text deliberately
|
|
43
|
+
|
|
44
|
+
## Playbooks
|
|
45
|
+
|
|
46
|
+
Run `npx -y lavish-axi playbook <id>` for focused, detailed guidance on any of these.
|
|
47
|
+
One artifact often combines several playbooks (for example a plan that includes a comparison and a diagram), so read every playbook relevant to your artifact, not just one, for the best quality:
|
|
48
|
+
|
|
49
|
+
- `diagram` - Map relationships, flows, state, and architecture
|
|
50
|
+
- `table` - Turn dense records into scan-friendly review surfaces
|
|
51
|
+
- `comparison` - Show options, tradeoffs, and current vs target behavior
|
|
52
|
+
- `plan` - Explain a product or technical plan before implementation
|
|
53
|
+
- `code` - Render source code, code files, patches, PR diffs, and before/after code inside Lavish artifacts
|
|
54
|
+
- `input` - Must be used when the agent needs to collect user input on decisions, choices, preferences, triage, scope, or other structured feedback from within the artifact
|
|
55
|
+
- `slides` - Create a deliberate presentation when slides are requested
|
|
56
|
+
|
|
57
|
+
## Commands & rules
|
|
58
|
+
|
|
59
|
+
- Run `npx -y lavish-axi <html-file>` to open or resume a Lavish Editor session
|
|
60
|
+
- Unless the user specifies another location, create HTML artifacts in the current working directory under `.opencode/output/lavish/`
|
|
61
|
+
- Lavish serves the html file through a local express.js server. If your html needs to reference other filesystem assets such as images, CSS, fonts, and local scripts, copy them into the same directory as the HTML file, then reference them with relative paths from that directory. Never prepend `/` to those asset paths - root paths won't work
|
|
62
|
+
- Run `npx -y lavish-axi poll <html-file>` to wait for user feedback or browser-reported layout_warnings. It long-polls and stays silent until the user sends feedback, ends the session, or the real browser reports fresh layout_warnings, so leave it running - never kill it. Fix layout_warnings before involving the human. If your harness limits how long a foreground command may run, run the poll as a background task; if it gets killed or times out anyway, just re-run it - queued feedback is never lost
|
|
63
|
+
- Run `npx -y lavish-axi end <html-file>` to end a session
|
|
64
|
+
- Run `npx -y lavish-axi stop` to shut down the background server (it also self-stops when idle or after the last session ends with nothing connected)
|
|
65
|
+
- Run `npx -y lavish-axi playbook <playbook_id>` for focused artifact guidance. One artifact often combines several playbooks (for example a plan that includes a comparison and a diagram), so read every playbook relevant to the artifact, not just one, for the best quality
|
|
66
|
+
- Lavish does not auto-inject any design system - artifacts stay portable so they render identically when opened directly without lavish-axi running. Before writing any HTML, decide the design direction in this strict priority order, and only move to the next step when the current one truly yields nothing: (1) if the user asked for a specific look or named design system, use that; (2) otherwise you must first inspect the project the artifact is about - the subject or product whose content or UI it represents, which may differ from your current working directory - and match that project's design system: Tailwind or theme config, shared CSS variables or design tokens, component library, brand assets, or existing styled pages. If the artifact previews, proposes, or mocks a specific app's UI, render it in that app's own design system so it faithfully shows the product, even when you are running in a different repo; (3) only when both steps come up empty, use the Lavish-recommended Tailwind CSS browser runtime v4 + DaisyUI v5, available via CDN - run `npx -y lavish-axi design` for a copy-pasteable CDN snippet plus component reference, and prefer that CDN snippet over hand-writing styles unless explicitly instructed otherwise by the user. When you deliver the artifact, state which of the three design sources you used and why.
|
|
67
|
+
- Use lavish-axi when the user asks for a visual artifact, HTML explainer, interactive prototype, review surface, product or technical plan, comparison, report, or browser-based feedback loop
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Lavish Examples
|
|
2
|
+
|
|
3
|
+
## Example 1: Architecture Diagram
|
|
4
|
+
|
|
5
|
+
Visualize a proposed microservices migration for team review. Good agent behavior:
|
|
6
|
+
|
|
7
|
+
- Generate an HTML artifact with a clear SVG or Mermaid diagram showing the current monolith, proposed services, and data flow arrows.
|
|
8
|
+
- Use color coding: blue for existing components, green for new services, orange for shared infrastructure.
|
|
9
|
+
- Include a legend and numbered annotations explaining each architectural decision.
|
|
10
|
+
- Annotate key interfaces and data contracts at each boundary.
|
|
11
|
+
- Run `npx -y lavish-axi <html-file>` to let the team review and leave feedback on specific elements.
|
|
12
|
+
|
|
13
|
+
## Example 2: Code Diff Comparison
|
|
14
|
+
|
|
15
|
+
Present a side-by-side comparison of refactored code for review. Good agent behavior:
|
|
16
|
+
|
|
17
|
+
- Generate an HTML artifact with two panels showing before and after code with syntax highlighting.
|
|
18
|
+
- Highlight changed lines in yellow, added lines in green, removed lines in red.
|
|
19
|
+
- Add inline annotations explaining why each change was made.
|
|
20
|
+
- Include a summary section at the top listing the number of files changed, lines added, and lines removed.
|
|
21
|
+
- Run `npx -y lavish-axi <html-file>` so reviewers can annotate specific code sections.
|
|
22
|
+
|
|
23
|
+
## Example 3: Performance Benchmark Report
|
|
24
|
+
|
|
25
|
+
Display benchmark results comparing caching strategies. Good agent behavior:
|
|
26
|
+
|
|
27
|
+
- Generate an HTML artifact with a bar chart comparing response times across strategies (no cache, Redis, in-memory, database).
|
|
28
|
+
- Include a table with exact measurements: p50, p95, p99 latency, throughput, and memory usage.
|
|
29
|
+
- Add a recommendation section with the preferred strategy highlighted and a rationale.
|
|
30
|
+
- Include interactive tooltips showing sample size and confidence intervals.
|
|
31
|
+
- Run `npx -y lavish-axi <html-file>` so the team can annotate concerns or ask questions about specific benchmarks.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: notion-mcp
|
|
3
|
+
description: Use this skill when working with the Notion MCP server tools for pages, databases, comments, search, users, and related Notion workflows.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# notion-mcp
|
|
7
|
+
|
|
8
|
+
Notion MCP server providing 14 tools for interacting with your Notion workspace via the Notion API.
|
|
9
|
+
|
|
10
|
+
## Tools
|
|
11
|
+
|
|
12
|
+
| Category | Tools | Default |
|
|
13
|
+
|------------------|--------------------------------------------------------------------------------------------------------------------------------------------|---------|
|
|
14
|
+
| Pages (6 tools) | `fetch`, `create-pages`, `update-page`, `duplicate-page`, `move-pages`, `search` | yes |
|
|
15
|
+
| Databases (4) | `create-database`, `update-data-source`, `create-view`, `update-view` | yes |
|
|
16
|
+
| Comments (2) | `create-comment`, `get-comments` | yes |
|
|
17
|
+
| Users & Teams (2)| `get-users`, `get-teams` | yes |
|
|
18
|
+
|
|
19
|
+
All tools are available by default — there are no opt-in toolsets for this server.
|
|
20
|
+
|
|
21
|
+
## Key Workflows
|
|
22
|
+
|
|
23
|
+
### Page Lifecycle (see references/pages.md)
|
|
24
|
+
|
|
25
|
+
`fetch` → `create-pages` → `update-page` / `duplicate-page` / `move-pages` → `search`
|
|
26
|
+
|
|
27
|
+
### Database Schema (see references/databases.md)
|
|
28
|
+
|
|
29
|
+
`fetch` → `create-database` → `update-data-source` → `create-view` → `update-view`
|
|
30
|
+
|
|
31
|
+
### Comment Threads (see references/comments.md)
|
|
32
|
+
|
|
33
|
+
`fetch` (with `include_discussions`) → `create-comment` → `get-comments`
|
|
34
|
+
|
|
35
|
+
### Search & Discovery
|
|
36
|
+
|
|
37
|
+
`search` → `fetch` → `get-users` / `get-teams`
|
|
38
|
+
|
|
39
|
+
## Parameter Hints
|
|
40
|
+
|
|
41
|
+
- **page_id / database_id**: UUID (with or without dashes) or full Notion URL. Extract from Notion page URLs or from `<page>` / `<database>` tags in fetch output.
|
|
42
|
+
- **data_source_id**: Found in `<data-source url="collection://...">` tags in fetch output. Used for `create-pages`, `update-data-source`, `create-view`.
|
|
43
|
+
- **Markdown content**: Notion-flavored Markdown. Supports inline formatting (bold, italic, code, links), inline math (`$Equation$`), and mention tags (`<mention-date>`, `<mention-user>`, `<mention-page>`, `<mention-database>`). Do not use `@today`, `@name`, `[[page]]` UI shortcuts.
|
|
44
|
+
- **Properties**: JSON map of property names to SQLite values. Date/place properties use expanded key format (e.g., `date:Due:start`, `place:Office:latitude`).
|
|
45
|
+
- **SQL DDL**: Used for `create-database` and `update-data-source` statements. Column names double-quoted, options single-quoted.
|
|
46
|
+
|
|
47
|
+
## Irreversible Tools
|
|
48
|
+
|
|
49
|
+
`move-pages` — permanently relocates pages. Cannot be undone programmatically. Use with caution.
|
|
50
|
+
|
|
51
|
+
## Advanced
|
|
52
|
+
|
|
53
|
+
- **Enhanced Markdown spec**: Read `notion://docs/enhanced-markdown-spec` through your MCP client's resource reader before writing page content.
|
|
54
|
+
- **View DSL spec**: Read `notion://docs/view-dsl-spec` through your MCP client's resource reader before configuring views.
|
|
55
|
+
- **Templates**: `create-pages` and `update-page` support applying page templates (template IDs shown in `<templates>` section of fetch output).
|
|
56
|
+
- **Multi-source databases**: Some databases have multiple data sources. Use `fetch` to identify the correct `data_source_id`.
|
|
57
|
+
- **Verification**: `update-page` with `update_verification` command supports verifying pages as reviewed (Business/Enterprise plan required).
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Notion MCP Examples
|
|
2
|
+
|
|
3
|
+
## Example 1: Create Project Documentation
|
|
4
|
+
|
|
5
|
+
A new feature needs documentation in the team's Notion workspace. Good agent behavior:
|
|
6
|
+
|
|
7
|
+
- Use `notion-get-teams` to verify which team space the project docs live in.
|
|
8
|
+
- Use `notion-search` to find the existing project folder page.
|
|
9
|
+
- Use `notion-fetch` on the folder page to understand its structure and available templates.
|
|
10
|
+
- Use `notion-create-pages` with the parent, title, properties, and content matching the folder's page template.
|
|
11
|
+
- Use `notion-create-comment` to notify the team about the new documentation.
|
|
12
|
+
|
|
13
|
+
## Example 2: Track Bug Reports
|
|
14
|
+
|
|
15
|
+
A production bug needs to be filed in the team's bug tracking database. Good agent behavior:
|
|
16
|
+
|
|
17
|
+
- Use `notion-search` to find the bug tracking database.
|
|
18
|
+
- Use `notion-fetch` on the database to see its schema, properties, and available templates.
|
|
19
|
+
- Use `notion-create-pages` with the database parent, filling in title, severity, status, assignee, and reproduction steps.
|
|
20
|
+
- Use `notion-get-users` to look up the correct assignee's user ID.
|
|
21
|
+
- Use `notion-create-comment` on the new bug page to add environment details.
|
|
22
|
+
|
|
23
|
+
## Example 3: Query Tasks and Update Status
|
|
24
|
+
|
|
25
|
+
Review all in-progress tasks and update their status. Good agent behavior:
|
|
26
|
+
|
|
27
|
+
- Use `notion-fetch` on the tasks database to see its views and schema.
|
|
28
|
+
- Use `notion-query-database-view` on the "In Progress" view to filter active tasks.
|
|
29
|
+
- Use `notion-fetch` on each task page URL to review full details.
|
|
30
|
+
- Use `notion-update-page` to transition completed tasks to "Done" with a summary of what was completed.
|
|
31
|
+
- Use `notion-create-comment` on blocked tasks to document the blocker.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Comments & Discussions
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Notion supports page-level comments, content-targeted comments on specific blocks, and discussion threads with replies. Use `fetch` with `include_discussions: true` first to see where discussions are anchored, then `get-comments` for full threads.
|
|
6
|
+
|
|
7
|
+
## Create Comment
|
|
8
|
+
|
|
9
|
+
### Page-level comment
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
create-comment
|
|
13
|
+
page_id: "abc123..."
|
|
14
|
+
markdown: "Comment with **important** context and a [link](https://example.com)."
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Comment on specific content
|
|
18
|
+
|
|
19
|
+
Target content by providing a unique start/end snippet:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
create-comment
|
|
23
|
+
page_id: "abc123..."
|
|
24
|
+
markdown: "This section needs updating."
|
|
25
|
+
selection_with_ellipsis: "# Meeting No...es heading"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The snippet format: first ~10 characters, `...`, last ~10 characters. Must uniquely identify the content.
|
|
29
|
+
|
|
30
|
+
### Reply to discussion thread
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
create-comment
|
|
34
|
+
page_id: "abc123..."
|
|
35
|
+
discussion_id: "discussion://pageId/blockId/discussionId"
|
|
36
|
+
markdown: "Fixed this in the latest update."
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Get `discussion_id` from `fetch` (with `include_discussions`) or `get-comments` output.
|
|
40
|
+
|
|
41
|
+
### Using rich_text instead of markdown
|
|
42
|
+
|
|
43
|
+
For features that markdown cannot express (mentions, custom emoji, colors):
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
create-comment
|
|
47
|
+
page_id: "abc123..."
|
|
48
|
+
rich_text:
|
|
49
|
+
- text:
|
|
50
|
+
content: "Assigned to "
|
|
51
|
+
- mention:
|
|
52
|
+
type: "user"
|
|
53
|
+
user:
|
|
54
|
+
id: "user-uuid"
|
|
55
|
+
- text:
|
|
56
|
+
content: " for review"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Comment formatting
|
|
60
|
+
|
|
61
|
+
- **Markdown**: inline formatting only (bold, italic, strikethrough, underline, code, links)
|
|
62
|
+
- **Inline math**: `$Equation$`
|
|
63
|
+
- **Mention tags**: `<mention-date start="2024-12-25"/>`, `<mention-page id="..."/>`, `<mention-user id="..."/>`, `<mention-database id="..."/>`
|
|
64
|
+
- ❌ No block-level markdown (headings, lists, tables, blockquotes) — these render as plain text
|
|
65
|
+
- ❌ No UI shortcuts like `@today`, `@name`, `[[page]]`
|
|
66
|
+
|
|
67
|
+
## Read Comments
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
get-comments
|
|
71
|
+
page_id: "abc123..."
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Returns all discussions on the page with full thread content.
|
|
75
|
+
|
|
76
|
+
### Include child block comments
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
get-comments
|
|
80
|
+
page_id: "abc123..."
|
|
81
|
+
include_all_blocks: true
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Include resolved discussions
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
get-comments
|
|
88
|
+
page_id: "abc123..."
|
|
89
|
+
include_resolved: true
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Get specific discussion by ID
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
get-comments
|
|
96
|
+
page_id: "abc123..."
|
|
97
|
+
discussion_id: "discussion://pageId/blockId/discussionId"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Workflow
|
|
101
|
+
|
|
102
|
+
1. `fetch` with `include_discussions: true` — see discussion anchors and `<page-discussions>` summary
|
|
103
|
+
2. `get-comments` with `discussion_id` — read full thread
|
|
104
|
+
3. `create-comment` with `discussion_id` — reply
|
|
105
|
+
4. `create-comment` with `selection_with_ellipsis` — start a new thread on specific content
|
|
106
|
+
5. `create-comment` with just `page_id` — add a general page-level comment
|
|
107
|
+
|
|
108
|
+
## Limitations
|
|
109
|
+
|
|
110
|
+
- **No edit/update** — comments cannot be modified after creation
|
|
111
|
+
- **No delete** — comments cannot be removed via this server
|
|
112
|
+
- **No resolution** — cannot mark discussions as resolved via this server
|