ui-syncup 0.3.13 → 0.4.0-beta.2
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/.agents/skills/ai-spec-workflow/SKILL.md +58 -0
- package/.agents/skills/ai-spec-workflow/references/AI_SPECIFICATION_WORKFLOW.md +1434 -0
- package/.agents/skills/ai-spec-workflow/references/templates/design-template.md +729 -0
- package/.agents/skills/ai-spec-workflow/references/templates/requirements-template.md +179 -0
- package/.agents/skills/ai-spec-workflow/references/templates/tasks-template.md +501 -0
- package/.agents/skills/animation-designer/SKILL.md +688 -0
- package/.agents/skills/animation-designer/manifest.yaml +44 -0
- package/.agents/skills/brainstorming/SKILL.md +54 -0
- package/.agents/skills/contract-driven-ui/SKILL.md +270 -0
- package/.agents/skills/dispatching-parallel-agents/SKILL.md +180 -0
- package/.agents/skills/executing-plans/SKILL.md +76 -0
- package/.agents/skills/executing-specs/SKILL.md +53 -0
- package/.agents/skills/finishing-a-development-branch/SKILL.md +200 -0
- package/.agents/skills/github-workflow-automation/SKILL.md +846 -0
- package/.agents/skills/react-best-practices/AGENTS.md +2249 -0
- package/.agents/skills/react-best-practices/README.md +123 -0
- package/.agents/skills/react-best-practices/SKILL.md +121 -0
- package/.agents/skills/react-best-practices/metadata.json +15 -0
- package/.agents/skills/react-best-practices/rules/_sections.md +46 -0
- package/.agents/skills/react-best-practices/rules/_template.md +28 -0
- package/.agents/skills/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
- package/.agents/skills/react-best-practices/rules/advanced-use-latest.md +49 -0
- package/.agents/skills/react-best-practices/rules/async-api-routes.md +38 -0
- package/.agents/skills/react-best-practices/rules/async-defer-await.md +80 -0
- package/.agents/skills/react-best-practices/rules/async-dependencies.md +36 -0
- package/.agents/skills/react-best-practices/rules/async-parallel.md +28 -0
- package/.agents/skills/react-best-practices/rules/async-suspense-boundaries.md +99 -0
- package/.agents/skills/react-best-practices/rules/bundle-barrel-imports.md +59 -0
- package/.agents/skills/react-best-practices/rules/bundle-conditional.md +31 -0
- package/.agents/skills/react-best-practices/rules/bundle-defer-third-party.md +49 -0
- package/.agents/skills/react-best-practices/rules/bundle-dynamic-imports.md +35 -0
- package/.agents/skills/react-best-practices/rules/bundle-preload.md +50 -0
- package/.agents/skills/react-best-practices/rules/client-event-listeners.md +74 -0
- package/.agents/skills/react-best-practices/rules/client-swr-dedup.md +56 -0
- package/.agents/skills/react-best-practices/rules/js-batch-dom-css.md +82 -0
- package/.agents/skills/react-best-practices/rules/js-cache-function-results.md +80 -0
- package/.agents/skills/react-best-practices/rules/js-cache-property-access.md +28 -0
- package/.agents/skills/react-best-practices/rules/js-cache-storage.md +70 -0
- package/.agents/skills/react-best-practices/rules/js-combine-iterations.md +32 -0
- package/.agents/skills/react-best-practices/rules/js-early-exit.md +50 -0
- package/.agents/skills/react-best-practices/rules/js-hoist-regexp.md +45 -0
- package/.agents/skills/react-best-practices/rules/js-index-maps.md +37 -0
- package/.agents/skills/react-best-practices/rules/js-length-check-first.md +49 -0
- package/.agents/skills/react-best-practices/rules/js-min-max-loop.md +82 -0
- package/.agents/skills/react-best-practices/rules/js-set-map-lookups.md +24 -0
- package/.agents/skills/react-best-practices/rules/js-tosorted-immutable.md +57 -0
- package/.agents/skills/react-best-practices/rules/rendering-activity.md +26 -0
- package/.agents/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
- package/.agents/skills/react-best-practices/rules/rendering-conditional-render.md +40 -0
- package/.agents/skills/react-best-practices/rules/rendering-content-visibility.md +38 -0
- package/.agents/skills/react-best-practices/rules/rendering-hoist-jsx.md +46 -0
- package/.agents/skills/react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
- package/.agents/skills/react-best-practices/rules/rendering-svg-precision.md +28 -0
- package/.agents/skills/react-best-practices/rules/rerender-defer-reads.md +39 -0
- package/.agents/skills/react-best-practices/rules/rerender-dependencies.md +45 -0
- package/.agents/skills/react-best-practices/rules/rerender-derived-state.md +29 -0
- package/.agents/skills/react-best-practices/rules/rerender-functional-setstate.md +74 -0
- package/.agents/skills/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
- package/.agents/skills/react-best-practices/rules/rerender-memo.md +44 -0
- package/.agents/skills/react-best-practices/rules/rerender-transitions.md +40 -0
- package/.agents/skills/react-best-practices/rules/server-after-nonblocking.md +73 -0
- package/.agents/skills/react-best-practices/rules/server-cache-lru.md +41 -0
- package/.agents/skills/react-best-practices/rules/server-cache-react.md +26 -0
- package/.agents/skills/react-best-practices/rules/server-parallel-fetching.md +79 -0
- package/.agents/skills/react-best-practices/rules/server-serialization.md +38 -0
- package/.agents/skills/react-ui-patterns/SKILL.md +289 -0
- package/.agents/skills/receiving-code-review/SKILL.md +213 -0
- package/.agents/skills/requesting-code-review/SKILL.md +105 -0
- package/.agents/skills/requesting-code-review/code-reviewer.md +146 -0
- package/.agents/skills/reviewing-code/SKILL.md +28 -0
- package/.agents/skills/shadcn/SKILL.md +240 -0
- package/.agents/skills/shadcn/agents/openai.yml +5 -0
- package/.agents/skills/shadcn/assets/shadcn-small.png +0 -0
- package/.agents/skills/shadcn/assets/shadcn.png +0 -0
- package/.agents/skills/shadcn/cli.md +255 -0
- package/.agents/skills/shadcn/customization.md +202 -0
- package/.agents/skills/shadcn/evals/evals.json +47 -0
- package/.agents/skills/shadcn/mcp.md +94 -0
- package/.agents/skills/shadcn/rules/base-vs-radix.md +306 -0
- package/.agents/skills/shadcn/rules/composition.md +195 -0
- package/.agents/skills/shadcn/rules/forms.md +192 -0
- package/.agents/skills/shadcn/rules/icons.md +101 -0
- package/.agents/skills/shadcn/rules/styling.md +162 -0
- package/.agents/skills/steering-creation/SKILL.md +221 -0
- package/.agents/skills/steering-creation/references/STEERING_CREATION_INSTRUCTION.md +850 -0
- package/.agents/skills/subagent-driven-development/SKILL.md +240 -0
- package/.agents/skills/subagent-driven-development/code-quality-reviewer-prompt.md +20 -0
- package/.agents/skills/subagent-driven-development/implementer-prompt.md +78 -0
- package/.agents/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
- package/.agents/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/.agents/skills/systematic-debugging/SKILL.md +296 -0
- package/.agents/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/.agents/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/.agents/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/.agents/skills/systematic-debugging/find-polluter.sh +63 -0
- package/.agents/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/.agents/skills/systematic-debugging/test-academic.md +14 -0
- package/.agents/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/.agents/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/.agents/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/.agents/skills/test-driven-development/SKILL.md +371 -0
- package/.agents/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/.agents/skills/using-git-worktrees/SKILL.md +217 -0
- package/.agents/skills/using-superpowers/SKILL.md +87 -0
- package/.agents/skills/verification-before-completion/SKILL.md +139 -0
- package/.agents/skills/web-design-guidelines/SKILL.md +36 -0
- package/.agents/skills/writing-plans/SKILL.md +116 -0
- package/.agents/skills/writing-skills/SKILL.md +655 -0
- package/.agents/skills/writing-skills/anthropic-best-practices.md +1150 -0
- package/.agents/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/.agents/skills/writing-skills/graphviz-conventions.dot +172 -0
- package/.agents/skills/writing-skills/persuasion-principles.md +187 -0
- package/.agents/skills/writing-skills/render-graphs.js +168 -0
- package/.agents/skills/writing-skills/testing-skills-with-subagents.md +384 -0
- package/.ai/steering/product.md +51 -0
- package/.ai/steering/structure.md +275 -0
- package/.ai/steering/tech.md +188 -0
- package/.claude/agents/database-architect.md +96 -0
- package/.claude/agents/deployment-pipeline-architect.md +122 -0
- package/.claude/agents/nextjs-expert.md +69 -0
- package/.claude/agents/ui-design-expert.md +106 -0
- package/.claudeignore +69 -0
- package/.dockerignore +8 -0
- package/.env.development +86 -0
- package/.env.example +171 -0
- package/.env.production +139 -0
- package/.env.test +58 -0
- package/.gitattributes +2 -0
- package/.github/ISSUE_TEMPLATE/bug_report.yml +33 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +20 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +23 -0
- package/.github/workflows/ci.yml +64 -0
- package/.github/workflows/release.yml +174 -0
- package/.nvmrc +1 -0
- package/.releaserc.json +18 -0
- package/.vercelignore +73 -0
- package/AGENTS.md +544 -0
- package/CHANGELOG.md +69 -0
- package/CODE_OF_CONDUCT.md +21 -0
- package/CONTRIBUTING.md +32 -0
- package/Dockerfile +84 -0
- package/LICENSE +21 -0
- package/README.md +328 -59
- package/SECURITY.md +16 -0
- package/bun.lock +3853 -0
- package/cli/README.md +94 -0
- package/cli/bun.lock +306 -0
- package/cli/index.ts +96 -0
- package/cli/package-lock.json +2157 -0
- package/cli/package.json +30 -0
- package/cli/src/commands/backup.ts +78 -0
- package/cli/src/commands/doctor.ts +82 -0
- package/cli/src/commands/init.ts +234 -0
- package/cli/src/commands/logs.ts +26 -0
- package/cli/src/commands/open.ts +23 -0
- package/cli/src/commands/remove.ts +44 -0
- package/cli/src/commands/restart.ts +21 -0
- package/cli/src/commands/restore.ts +90 -0
- package/cli/src/commands/start.ts +26 -0
- package/cli/src/commands/status.ts +25 -0
- package/cli/src/commands/stop.ts +20 -0
- package/cli/src/commands/upgrade.ts +28 -0
- package/cli/src/lib/docker.ts +40 -0
- package/cli/src/lib/env.ts +42 -0
- package/cli/src/lib/ui.ts +43 -0
- package/cli/tsconfig.json +13 -0
- package/cli/tsup.config.ts +12 -0
- package/components.json +24 -0
- package/docker/README.md +430 -0
- package/docker/compose.dev-minio.yml +30 -0
- package/docker/compose.dev.yml +39 -0
- package/docker/compose.local.yml +84 -0
- package/docker/compose.yml +153 -0
- package/docs/VERSIONING.md +101 -0
- package/docs/database/DRIZZLE_COMMANDS_EXPLAINED.md +1779 -0
- package/docs/database/DRIZZLE_ZOD_POSTGRESQL_INSTRUCTION.md +646 -0
- package/docs/database/MIGRATION_BEST_PRACTICES.md +601 -0
- package/docs/database/MIGRATION_ROLLBACK.md +1080 -0
- package/docs/database/MIGRATION_SYSTEM.md +165 -0
- package/docs/database/MIGRATION_TROUBLESHOOTING.md +881 -0
- package/docs/development/ENVIRONMENT_CONFIG.md +896 -0
- package/docs/development/LOCAL_DEVELOPMENT.md +456 -0
- package/docs/development/REMOTE_DATABASE_SETUP.md +786 -0
- package/docs/development/STORAGE_SETUP.md +207 -0
- package/docs/development/SUPABASE_LOCAL_SETUP.md +178 -0
- package/docs/development/TESTING.md +714 -0
- package/docs/feature-architectures/LOADING_ARCHITECTURE.md +343 -0
- package/docs/feature-architectures/NOTIFICATION_ARCHITECTURE.md +858 -0
- package/docs/feature-architectures/RATE_LIMIT_RESET.md +147 -0
- package/docs/feature-architectures/RBAC.md +1132 -0
- package/docs/feature-architectures/RESOURCE_LIMITS.md +69 -0
- package/docs/feature-architectures/SECURITY.md +284 -0
- package/docs/feature-architectures/WORKSPACES.md +278 -0
- package/docs/plans/admin-setup-wizard-routing-plan.md +623 -0
- package/drizzle/0000_purple_wilson_fisk.sql +360 -0
- package/drizzle/0001_drop_instance_public_url.sql +1 -0
- package/drizzle/meta/0000_snapshot.json +3118 -0
- package/drizzle/meta/_journal.json +20 -0
- package/drizzle.config.ts +13 -0
- package/eslint.config.mjs +44 -0
- package/install.sh +180 -0
- package/next.config.ts +91 -0
- package/package.json +128 -22
- package/playwright.config.ts +70 -0
- package/postcss.config.mjs +7 -0
- package/public/file.svg +1 -0
- package/public/globe.svg +1 -0
- package/public/logo.svg +11 -0
- package/public/next.svg +1 -0
- package/public/playground/CPM-101/as-is-image.jpg +0 -0
- package/public/playground/CPM-101/to-be-image.jpg +0 -0
- package/public/playground/TEST-1/LinkedIn-skeleton-screen.png +0 -0
- package/public/playground/TEST-1/https___dev-to-uploads.s3.amazonaws.com_uploads_articles_vuahe90ka1mkx9aepmea.webp +0 -0
- package/public/playground/TEST-1/linkedin_skeletonscreen.jpg +0 -0
- package/public/vercel.svg +1 -0
- package/public/window.svg +1 -0
- package/scripts/__tests__/migrate.integration.test.ts +642 -0
- package/scripts/__tests__/migrate.property.test.ts +1714 -0
- package/scripts/__tests__/migrate.test.ts +536 -0
- package/scripts/admin-reset-password.ts +114 -0
- package/scripts/check-email-queue.ts +99 -0
- package/scripts/check-sessions.ts +50 -0
- package/scripts/db-pull-data.sh +73 -0
- package/scripts/force-verify-email.sh +13 -0
- package/scripts/migrate.ts +693 -0
- package/scripts/process-email-queue.ts +26 -0
- package/scripts/reset-db.ts +47 -0
- package/scripts/reset-rate-limit.sh +26 -0
- package/scripts/reset-remote-db.sql +31 -0
- package/scripts/retry-failed-emails.ts +67 -0
- package/scripts/seed.ts +605 -0
- package/scripts/setup-monitoring.sh +440 -0
- package/scripts/sync-migration-tracking.ts +113 -0
- package/scripts/test-ci-error-handling.sh +237 -0
- package/scripts/test-ci-workflow.sh +200 -0
- package/scripts/test-migration.sh +151 -0
- package/scripts/validate-env.ts +25 -0
- package/scripts/validate-migration-system.ts +566 -0
- package/scripts/verify-ci-status-reporting.sh +206 -0
- package/scripts/verify-user-email.sql +22 -0
- package/scripts/verify-vercel-integration.ts +292 -0
- package/seed_data.md +54 -0
- package/src/app/(protected)/(team)/(routes)/[projectSlug]/error.tsx +89 -0
- package/src/app/(protected)/(team)/(routes)/[projectSlug]/loading.tsx +101 -0
- package/src/app/(protected)/(team)/(routes)/[projectSlug]/page.tsx +91 -0
- package/src/app/(protected)/(team)/(routes)/issue/[issueKey]/README.md +192 -0
- package/src/app/(protected)/(team)/(routes)/issue/[issueKey]/error.tsx +58 -0
- package/src/app/(protected)/(team)/(routes)/issue/[issueKey]/loading.tsx +14 -0
- package/src/app/(protected)/(team)/(routes)/issue/[issueKey]/not-found.tsx +47 -0
- package/src/app/(protected)/(team)/(routes)/issue/[issueKey]/page.tsx +91 -0
- package/src/app/(protected)/(team)/projects/page.tsx +16 -0
- package/src/app/(protected)/(team)/team/settings/(section)/instance/page.tsx +52 -0
- package/src/app/(protected)/(team)/team/settings/(section)/integrations/loading.tsx +5 -0
- package/src/app/(protected)/(team)/team/settings/(section)/integrations/page.tsx +23 -0
- package/src/app/(protected)/(team)/team/settings/(section)/members/loading.tsx +5 -0
- package/src/app/(protected)/(team)/team/settings/(section)/members/page.tsx +35 -0
- package/src/app/(protected)/(team)/team/settings/layout.tsx +72 -0
- package/src/app/(protected)/(team)/team/settings/loading.tsx +5 -0
- package/src/app/(protected)/(team)/team/settings/page.tsx +71 -0
- package/src/app/(protected)/dev/auth/README.md +151 -0
- package/src/app/(protected)/dev/auth/page.tsx +590 -0
- package/src/app/(protected)/layout.test.tsx +209 -0
- package/src/app/(protected)/layout.tsx +28 -0
- package/src/app/(protected)/onboarding/page.tsx +27 -0
- package/src/app/(protected)/settings/integrations/page.tsx +23 -0
- package/src/app/(protected)/settings/layout.tsx +26 -0
- package/src/app/(protected)/settings/notifications/page.tsx +26 -0
- package/src/app/(protected)/settings/other/page.tsx +23 -0
- package/src/app/(protected)/settings/page.tsx +23 -0
- package/src/app/(protected)/settings/preferences/page.tsx +23 -0
- package/src/app/(protected)/settings/security/page.tsx +37 -0
- package/src/app/(public)/forgot-password/page.tsx +20 -0
- package/src/app/(public)/invite/project/[token]/error.tsx +50 -0
- package/src/app/(public)/invite/project/[token]/loading.tsx +39 -0
- package/src/app/(public)/invite/project/[token]/page.tsx +156 -0
- package/src/app/(public)/layout.tsx +9 -0
- package/src/app/(public)/privacy-policy/page.tsx +12 -0
- package/src/app/(public)/reset-password/page.tsx +37 -0
- package/src/app/(public)/setup/__tests__/page.test.tsx +30 -0
- package/src/app/(public)/setup/page.tsx +17 -0
- package/src/app/(public)/share/issue/[token]/page.tsx +51 -0
- package/src/app/(public)/sign-in/page.tsx +55 -0
- package/src/app/(public)/sign-up/page.tsx +23 -0
- package/src/app/(public)/verify-email/page.tsx +22 -0
- package/src/app/(public)/verify-email-confirm/page.tsx +40 -0
- package/src/app/api/auth/[...all]/route.ts +6 -0
- package/src/app/api/auth/delete-account/route.ts +134 -0
- package/src/app/api/auth/dev/force-verify/route.ts +180 -0
- package/src/app/api/auth/dev/reset-rate-limit/route.ts +144 -0
- package/src/app/api/auth/dev/sessions/route.ts +172 -0
- package/src/app/api/auth/forgot-password/__tests__/forgot-password.property.test.ts +397 -0
- package/src/app/api/auth/forgot-password/route.ts +277 -0
- package/src/app/api/auth/logout/route.ts +115 -0
- package/src/app/api/auth/me/route.ts +123 -0
- package/src/app/api/auth/providers/__tests__/route.test.ts +236 -0
- package/src/app/api/auth/providers/route.ts +119 -0
- package/src/app/api/auth/resend-verification/route.ts +262 -0
- package/src/app/api/auth/reset-password/__tests__/reset-password.property.test.ts +493 -0
- package/src/app/api/auth/reset-password/__tests__/route.test.ts +284 -0
- package/src/app/api/auth/reset-password/route.ts +251 -0
- package/src/app/api/auth/verify-email/route.ts +232 -0
- package/src/app/api/example-cors/route.ts +61 -0
- package/src/app/api/health/route.ts +14 -0
- package/src/app/api/invite/project/[token]/__tests__/accept-invitation.integration.test.ts +348 -0
- package/src/app/api/invite/project/[token]/decline/route.ts +99 -0
- package/src/app/api/invite/project/[token]/route.ts +269 -0
- package/src/app/api/issues/[issueId]/activities/route.ts +213 -0
- package/src/app/api/issues/[issueId]/attachments/[attachmentId]/annotations/[annotationId]/comments/[commentId]/route.ts +486 -0
- package/src/app/api/issues/[issueId]/attachments/[attachmentId]/annotations/[annotationId]/comments/route.ts +283 -0
- package/src/app/api/issues/[issueId]/attachments/[attachmentId]/annotations/[annotationId]/read/route.ts +242 -0
- package/src/app/api/issues/[issueId]/attachments/[attachmentId]/annotations/[annotationId]/route.ts +534 -0
- package/src/app/api/issues/[issueId]/attachments/[attachmentId]/annotations/route.ts +514 -0
- package/src/app/api/issues/[issueId]/attachments/[attachmentId]/route.ts +161 -0
- package/src/app/api/issues/[issueId]/attachments/route.ts +376 -0
- package/src/app/api/issues/[issueId]/route.ts +516 -0
- package/src/app/api/notifications/[id]/read/route.ts +131 -0
- package/src/app/api/notifications/__tests__/notifications.integration.test.ts +350 -0
- package/src/app/api/notifications/read-all/route.ts +72 -0
- package/src/app/api/notifications/route.ts +148 -0
- package/src/app/api/notifications/unread-count/route.ts +77 -0
- package/src/app/api/projects/[id]/activities/route.ts +174 -0
- package/src/app/api/projects/[id]/invitations/[invitationId]/resend/route.ts +99 -0
- package/src/app/api/projects/[id]/invitations/[invitationId]/route.ts +96 -0
- package/src/app/api/projects/[id]/invitations/route.ts +254 -0
- package/src/app/api/projects/[id]/issues/route.ts +452 -0
- package/src/app/api/projects/[id]/join/route.ts +207 -0
- package/src/app/api/projects/[id]/members/[memberId]/route.ts +364 -0
- package/src/app/api/projects/[id]/members/me/route.ts +121 -0
- package/src/app/api/projects/[id]/members/route.ts +129 -0
- package/src/app/api/projects/[id]/route.ts +476 -0
- package/src/app/api/projects/route.ts +394 -0
- package/src/app/api/setup/admin/route.ts +255 -0
- package/src/app/api/setup/complete/__tests__/route.test.ts +60 -0
- package/src/app/api/setup/complete/route.ts +244 -0
- package/src/app/api/setup/config/route.ts +195 -0
- package/src/app/api/setup/export/route.ts +111 -0
- package/src/app/api/setup/health/route.ts +74 -0
- package/src/app/api/setup/import/route.ts +154 -0
- package/src/app/api/setup/status/route.ts +82 -0
- package/src/app/api/setup/workspace/route.ts +252 -0
- package/src/app/api/teams/[teamId]/export/route.ts +115 -0
- package/src/app/api/teams/[teamId]/invitations/[invitationId]/resend/route.ts +132 -0
- package/src/app/api/teams/[teamId]/invitations/[invitationId]/route.ts +117 -0
- package/src/app/api/teams/[teamId]/invitations/route.ts +363 -0
- package/src/app/api/teams/[teamId]/members/[userId]/route.ts +335 -0
- package/src/app/api/teams/[teamId]/members/route.ts +184 -0
- package/src/app/api/teams/[teamId]/members/search/route.ts +202 -0
- package/src/app/api/teams/[teamId]/route.ts +423 -0
- package/src/app/api/teams/[teamId]/switch/route.ts +140 -0
- package/src/app/api/teams/[teamId]/transfer-ownership/route.ts +212 -0
- package/src/app/api/teams/invitations/[token]/accept/route.ts +140 -0
- package/src/app/api/teams/invitations/by-id/[id]/accept/route.ts +98 -0
- package/src/app/api/teams/invitations/by-id/[id]/decline/route.ts +90 -0
- package/src/app/api/teams/route.ts +278 -0
- package/src/app/api/uploads/media/route.ts +118 -0
- package/src/app/api/uploads/presigned/route.ts +49 -0
- package/src/app/api/user/linked-accounts/route.ts +35 -0
- package/src/app/email-preview/page.tsx +11 -0
- package/src/app/favicon.ico +0 -0
- package/src/app/global-error.tsx +21 -0
- package/src/app/layout.tsx +50 -0
- package/src/app/page.tsx +5 -0
- package/src/components/icons/atlassian-icon.tsx +22 -0
- package/src/components/icons/index.ts +1 -0
- package/src/components/layout/SIDEBAR_LAYOUT_BEST_PRACTICES.md +240 -0
- package/src/components/layout/app-shell-header-store.tsx +20 -0
- package/src/components/layout/app-shell-skeleton.tsx +89 -0
- package/src/components/layout/app-shell-wrapper.tsx +32 -0
- package/src/components/layout/app-shell.test.tsx +155 -0
- package/src/components/layout/app-shell.tsx +100 -0
- package/src/components/shared/headers/app-header-configurator.tsx +42 -0
- package/src/components/shared/headers/app-header.tsx +103 -0
- package/src/components/shared/headers/header-user-menu.tsx +247 -0
- package/src/components/shared/headers/index.ts +44 -0
- package/src/components/shared/headers/page-header.tsx +25 -0
- package/src/components/shared/notifications/__tests__/notification-bell.test.tsx +159 -0
- package/src/components/shared/notifications/__tests__/notification-dropdown.test.tsx +296 -0
- package/src/components/shared/notifications/__tests__/notification-item.test.tsx +328 -0
- package/src/components/shared/notifications/index.ts +45 -0
- package/src/components/shared/notifications/notification-actions.tsx +295 -0
- package/src/components/shared/notifications/notification-bell-button.tsx +77 -0
- package/src/components/shared/notifications/notification-dropdown.tsx +160 -0
- package/src/components/shared/notifications/notification-group-item.tsx +268 -0
- package/src/components/shared/notifications/notification-item.tsx +193 -0
- package/src/components/shared/notifications/notification-load-more.tsx +50 -0
- package/src/components/shared/notifications/notification-panel.tsx +49 -0
- package/src/components/shared/notifications/utils.tsx +127 -0
- package/src/components/shared/permission-guard/index.ts +1 -0
- package/src/components/shared/permission-guard/permission-tooltip.tsx +45 -0
- package/src/components/shared/relative-time.tsx +53 -0
- package/src/components/shared/section-container.tsx +32 -0
- package/src/components/shared/service-status-banner.tsx +121 -0
- package/src/components/shared/settings-sidebar/index.ts +2 -0
- package/src/components/shared/settings-sidebar/team-setting-aside.tsx +97 -0
- package/src/components/shared/settings-sidebar/user-settings-aside.tsx +66 -0
- package/src/components/shared/sidebar/app-sidebar.tsx +146 -0
- package/src/components/shared/sidebar/index.ts +36 -0
- package/src/components/shared/sidebar/sidebar-main.tsx +81 -0
- package/src/components/shared/sidebar/sidebar-project.tsx +61 -0
- package/src/components/shared/sidebar/sidebar-team-avatar.tsx +126 -0
- package/src/components/shared/sidebar/sidebar-team-switcher.tsx +185 -0
- package/src/components/shared/sidebar/type.ts +97 -0
- package/src/components/ui/alert-dialog.tsx +157 -0
- package/src/components/ui/alert.tsx +66 -0
- package/src/components/ui/avatar-upload.tsx +147 -0
- package/src/components/ui/avatar.tsx +53 -0
- package/src/components/ui/badge.tsx +46 -0
- package/src/components/ui/breadcrumb.tsx +109 -0
- package/src/components/ui/button.tsx +60 -0
- package/src/components/ui/card.tsx +92 -0
- package/src/components/ui/checkbox.tsx +32 -0
- package/src/components/ui/collapsible.tsx +33 -0
- package/src/components/ui/command.tsx +184 -0
- package/src/components/ui/dialog.tsx +143 -0
- package/src/components/ui/dropdown-menu.tsx +257 -0
- package/src/components/ui/empty.tsx +104 -0
- package/src/components/ui/field.tsx +244 -0
- package/src/components/ui/image-cropper-dialog.tsx +167 -0
- package/src/components/ui/input.tsx +21 -0
- package/src/components/ui/label.tsx +24 -0
- package/src/components/ui/optimized-image.tsx +220 -0
- package/src/components/ui/pagination.tsx +127 -0
- package/src/components/ui/popover.tsx +48 -0
- package/src/components/ui/progress.tsx +31 -0
- package/src/components/ui/radio-group.tsx +45 -0
- package/src/components/ui/scroll-area.tsx +58 -0
- package/src/components/ui/select.tsx +187 -0
- package/src/components/ui/separator.tsx +28 -0
- package/src/components/ui/sheet.tsx +139 -0
- package/src/components/ui/sidebar.tsx +733 -0
- package/src/components/ui/skeleton.tsx +13 -0
- package/src/components/ui/sonner.tsx +40 -0
- package/src/components/ui/spinner.tsx +16 -0
- package/src/components/ui/switch.tsx +31 -0
- package/src/components/ui/table.tsx +116 -0
- package/src/components/ui/tabs.tsx +66 -0
- package/src/components/ui/textarea.tsx +23 -0
- package/src/components/ui/tooltip.tsx +61 -0
- package/src/config/__tests__/workspace.property.test.ts +40 -0
- package/src/config/auth.ts +62 -0
- package/src/config/integrations.ts +126 -0
- package/src/config/quotas.ts +20 -0
- package/src/config/roles.ts +463 -0
- package/src/config/settings-nav.ts +39 -0
- package/src/config/team-settings-nav.ts +37 -0
- package/src/config/user-settings-nav.ts +42 -0
- package/src/config/version.ts +1 -0
- package/src/config/workspace.ts +64 -0
- package/src/features/annotations/README.md +283 -0
- package/src/features/annotations/api/annotations-api.ts +194 -0
- package/src/features/annotations/api/comments-api.ts +147 -0
- package/src/features/annotations/api/index.ts +71 -0
- package/src/features/annotations/api/save-annotation.ts +150 -0
- package/src/features/annotations/api/schemas.ts +142 -0
- package/src/features/annotations/components/annotated-attachment-view.tsx +576 -0
- package/src/features/annotations/components/annotation-action-sheet.tsx +140 -0
- package/src/features/annotations/components/annotation-annotations-panel.tsx +213 -0
- package/src/features/annotations/components/annotation-box.tsx +539 -0
- package/src/features/annotations/components/annotation-canvas.tsx +534 -0
- package/src/features/annotations/components/annotation-comment-input.tsx +145 -0
- package/src/features/annotations/components/annotation-context-menu.tsx +164 -0
- package/src/features/annotations/components/annotation-drawer.tsx +231 -0
- package/src/features/annotations/components/annotation-layer.tsx +271 -0
- package/src/features/annotations/components/annotation-pin.tsx +318 -0
- package/src/features/annotations/components/annotation-popover.tsx +562 -0
- package/src/features/annotations/components/annotation-thread-panel.tsx +485 -0
- package/src/features/annotations/components/annotation-thread-preview.tsx +195 -0
- package/src/features/annotations/components/annotation-toolbar.tsx +244 -0
- package/src/features/annotations/components/keyboard-shortcuts-modal.tsx +79 -0
- package/src/features/annotations/docs/ANNOTATIONS_ARCHITECTURE.md +67 -0
- package/src/features/annotations/docs/ANNOTATION_SAVE_ARCHITECTURE.md +422 -0
- package/src/features/annotations/docs/ANNOTATION_SAVE_FEATURE.md +408 -0
- package/src/features/annotations/docs/BOX_ANNOTATION_GUIDE.md +542 -0
- package/src/features/annotations/docs/NEXTSTEP.md +28 -0
- package/src/features/annotations/docs/STALE_CLOSURE_FIX.md +344 -0
- package/src/features/annotations/docs/UNDO_REDO_QUICK_START.md +545 -0
- package/src/features/annotations/docs/local_first_canvas_autosave_architecture.md +674 -0
- package/src/features/annotations/examples/complete-example.tsx +266 -0
- package/src/features/annotations/examples/save-annotation-example.tsx +309 -0
- package/src/features/annotations/hooks/__tests__/use-annotation-permissions.property.test.tsx +493 -0
- package/src/features/annotations/hooks/index.ts +36 -0
- package/src/features/annotations/hooks/use-annotation-batch-save.ts +109 -0
- package/src/features/annotations/hooks/use-annotation-comments.ts +353 -0
- package/src/features/annotations/hooks/use-annotation-drafts.ts +137 -0
- package/src/features/annotations/hooks/use-annotation-edit-state.ts +99 -0
- package/src/features/annotations/hooks/use-annotation-history-tracker.ts +159 -0
- package/src/features/annotations/hooks/use-annotation-integration.ts +916 -0
- package/src/features/annotations/hooks/use-annotation-permissions.ts +210 -0
- package/src/features/annotations/hooks/use-annotation-popover.ts +175 -0
- package/src/features/annotations/hooks/use-annotation-save.ts +208 -0
- package/src/features/annotations/hooks/use-annotation-tools.ts +237 -0
- package/src/features/annotations/hooks/use-annotations-with-history.ts +332 -0
- package/src/features/annotations/hooks/use-auto-save.ts +94 -0
- package/src/features/annotations/index.ts +111 -0
- package/src/features/annotations/types/annotation.ts +201 -0
- package/src/features/annotations/types/index.ts +28 -0
- package/src/features/annotations/utils/history-manager.ts +73 -0
- package/src/features/annotations/utils/index.ts +2 -0
- package/src/features/annotations/utils/map-attachments-to-threads.ts +28 -0
- package/src/features/annotations/utils/position-comment-input.ts +136 -0
- package/src/features/annotations/utils/re-sequence-labels.ts +92 -0
- package/src/features/annotations/utils/validate-annotation-label.ts +120 -0
- package/src/features/auth/api/types.ts +101 -0
- package/src/features/auth/components/__tests__/role-gate.test.tsx +448 -0
- package/src/features/auth/components/__tests__/social-login-buttons.test.tsx +313 -0
- package/src/features/auth/components/auth-card.tsx +36 -0
- package/src/features/auth/components/forgot-password-form.tsx +115 -0
- package/src/features/auth/components/index.ts +14 -0
- package/src/features/auth/components/invite-code-input.tsx +155 -0
- package/src/features/auth/components/invited-user-form.tsx +309 -0
- package/src/features/auth/components/onboarding-form.tsx +195 -0
- package/src/features/auth/components/password-strength-indicator.tsx +113 -0
- package/src/features/auth/components/reset-password-form.tsx +138 -0
- package/src/features/auth/components/role-gate.tsx +124 -0
- package/src/features/auth/components/self-registration-choice.tsx +153 -0
- package/src/features/auth/components/sign-in-form.tsx +159 -0
- package/src/features/auth/components/sign-up-form.tsx +158 -0
- package/src/features/auth/components/social-login-buttons.tsx +219 -0
- package/src/features/auth/hooks/__tests__/use-onboarding.test.tsx +109 -0
- package/src/features/auth/hooks/__tests__/use-session.test.tsx +160 -0
- package/src/features/auth/hooks/index.ts +15 -0
- package/src/features/auth/hooks/use-accept-invitation.ts +194 -0
- package/src/features/auth/hooks/use-delete-account.ts +86 -0
- package/src/features/auth/hooks/use-force-verify.ts +89 -0
- package/src/features/auth/hooks/use-forgot-password.ts +144 -0
- package/src/features/auth/hooks/use-link-account.ts +78 -0
- package/src/features/auth/hooks/use-linked-accounts.ts +88 -0
- package/src/features/auth/hooks/use-onboarding.ts +159 -0
- package/src/features/auth/hooks/use-resend-verification.ts +139 -0
- package/src/features/auth/hooks/use-reset-password.ts +151 -0
- package/src/features/auth/hooks/use-reset-rate-limit.ts +56 -0
- package/src/features/auth/hooks/use-self-registration.ts +202 -0
- package/src/features/auth/hooks/use-session.ts +81 -0
- package/src/features/auth/hooks/use-sessions.ts +59 -0
- package/src/features/auth/hooks/use-sign-in.ts +234 -0
- package/src/features/auth/hooks/use-sign-out.ts +88 -0
- package/src/features/auth/hooks/use-sign-up.ts +194 -0
- package/src/features/auth/hooks/use-unlink-account.ts +100 -0
- package/src/features/auth/hooks/use-verify-email-token.ts +125 -0
- package/src/features/auth/index.ts +75 -0
- package/src/features/auth/screens/forgot-password-screen.tsx +33 -0
- package/src/features/auth/screens/index.ts +7 -0
- package/src/features/auth/screens/onboarding-screen.tsx +49 -0
- package/src/features/auth/screens/reset-password-screen.tsx +33 -0
- package/src/features/auth/screens/sign-in-screen.tsx +61 -0
- package/src/features/auth/screens/sign-up-screen.tsx +37 -0
- package/src/features/auth/screens/verify-email-confirm-screen.tsx +286 -0
- package/src/features/auth/screens/verify-email-screen.tsx +146 -0
- package/src/features/auth/types/index.ts +14 -0
- package/src/features/auth/utils/__tests__/validators.test.ts +331 -0
- package/src/features/auth/utils/password-strength.ts +129 -0
- package/src/features/auth/utils/validators.ts +124 -0
- package/src/features/email-preview/actions/render-email.ts +21 -0
- package/src/features/email-preview/screens/email-preview-screen.tsx +81 -0
- package/src/features/folder-scaffold-template/index.ts +0 -0
- package/src/features/instance-settings/components/index.ts +6 -0
- package/src/features/instance-settings/components/instance-settings-form.tsx +180 -0
- package/src/features/instance-settings/components/instance-status-display.tsx +158 -0
- package/src/features/instance-settings/index.ts +7 -0
- package/src/features/instance-settings/screens/index.ts +5 -0
- package/src/features/instance-settings/screens/instance-settings-screen.tsx +59 -0
- package/src/features/issues/README.md +330 -0
- package/src/features/issues/api/create-issue.ts +19 -0
- package/src/features/issues/api/delete-issue.ts +27 -0
- package/src/features/issues/api/get-issue-activities.ts +58 -0
- package/src/features/issues/api/get-issue-details.ts +25 -0
- package/src/features/issues/api/get-project-issues-server.ts +44 -0
- package/src/features/issues/api/get-project-issues.ts +21 -0
- package/src/features/issues/api/index.ts +44 -0
- package/src/features/issues/api/update-issue.ts +31 -0
- package/src/features/issues/api/upload-attachment.ts +81 -0
- package/src/features/issues/components/activity-timeline.tsx +440 -0
- package/src/features/issues/components/canvas-state-indicator.tsx +90 -0
- package/src/features/issues/components/centered-canvas-view.tsx +739 -0
- package/src/features/issues/components/image-selector.tsx +123 -0
- package/src/features/issues/components/image-upload-zone.tsx +262 -0
- package/src/features/issues/components/infinite-canvas-background.tsx +163 -0
- package/src/features/issues/components/inline-editable-select.tsx +173 -0
- package/src/features/issues/components/inline-editable-text.tsx +225 -0
- package/src/features/issues/components/inline-editable-textarea.tsx +219 -0
- package/src/features/issues/components/inline-editable-user-select.tsx +202 -0
- package/src/features/issues/components/issue-deletion-dialog.tsx +142 -0
- package/src/features/issues/components/issue-details-panel.tsx +101 -0
- package/src/features/issues/components/issues-create-dialog.tsx +578 -0
- package/src/features/issues/components/issues-list-filter.tsx +312 -0
- package/src/features/issues/components/issues-list.tsx +151 -0
- package/src/features/issues/components/issues-priority-badge.tsx +77 -0
- package/src/features/issues/components/issues-status-badge.tsx +100 -0
- package/src/features/issues/components/metadata-section.tsx +389 -0
- package/src/features/issues/components/optimized-attachment-view.tsx +528 -0
- package/src/features/issues/components/optimized-image.tsx +257 -0
- package/src/features/issues/components/panel-header.tsx +186 -0
- package/src/features/issues/components/preload.ts +31 -0
- package/src/features/issues/components/priority-selector.tsx +101 -0
- package/src/features/issues/components/responsive-issue-layout-skeleton.tsx +139 -0
- package/src/features/issues/components/responsive-issue-layout.tsx +617 -0
- package/src/features/issues/components/status-selector.tsx +320 -0
- package/src/features/issues/components/type-selector.tsx +102 -0
- package/src/features/issues/components/upload-progress-overlay.tsx +35 -0
- package/src/features/issues/components/uploaded-image-preview.tsx +173 -0
- package/src/features/issues/components/workflow-control.tsx +318 -0
- package/src/features/issues/components/zoom-controls.tsx +150 -0
- package/src/features/issues/config/index.ts +47 -0
- package/src/features/issues/config/options.ts +323 -0
- package/src/features/issues/config/workflow.ts +102 -0
- package/src/features/issues/docs/ARCHITECTURE_DIAGRAM.md +321 -0
- package/src/features/issues/docs/BACKEND_ARCHITECTURE.md +194 -0
- package/src/features/issues/docs/IMAGE_COMPONENTS_ARCHITECTURE.md +363 -0
- package/src/features/issues/docs/IMAGE_COMPONENTS_IMPORTS.md +412 -0
- package/src/features/issues/docs/IMPLEMENTATION_CHECKLIST.md +210 -0
- package/src/features/issues/docs/ROUTE_SETUP_COMPLETE.md +242 -0
- package/src/features/issues/hooks/index.ts +78 -0
- package/src/features/issues/hooks/use-canvas-transform.ts +255 -0
- package/src/features/issues/hooks/use-create-issue.ts +28 -0
- package/src/features/issues/hooks/use-elastic-scroll.ts +296 -0
- package/src/features/issues/hooks/use-issue-activities.ts +71 -0
- package/src/features/issues/hooks/use-issue-delete.ts +84 -0
- package/src/features/issues/hooks/use-issue-details.ts +70 -0
- package/src/features/issues/hooks/use-issue-filters.ts +50 -0
- package/src/features/issues/hooks/use-issue-update.ts +93 -0
- package/src/features/issues/hooks/use-keyboard-shortcuts.ts +104 -0
- package/src/features/issues/hooks/use-optimized-image.ts +228 -0
- package/src/features/issues/hooks/use-project-issues.ts +14 -0
- package/src/features/issues/index.ts +65 -0
- package/src/features/issues/screens/issue-details-screen.tsx +207 -0
- package/src/features/issues/screens/issue-details-skeletons.tsx +295 -0
- package/src/features/issues/screens/issue-share-screen.tsx +56 -0
- package/src/features/issues/types/index.ts +48 -0
- package/src/features/issues/types/issue.ts +291 -0
- package/src/features/issues/utils/filter-issues.ts +141 -0
- package/src/features/issues/utils/index.ts +14 -0
- package/src/features/legal/index.ts +1 -0
- package/src/features/legal/screens/privacy-policy-screen.tsx +307 -0
- package/src/features/notifications/api/get-notifications.ts +58 -0
- package/src/features/notifications/api/get-unread-count.ts +37 -0
- package/src/features/notifications/api/index.ts +35 -0
- package/src/features/notifications/api/mark-all-as-read.ts +37 -0
- package/src/features/notifications/api/mark-as-read.ts +41 -0
- package/src/features/notifications/api/types.ts +109 -0
- package/src/features/notifications/hooks/__tests__/use-notification-subscription.test.ts +206 -0
- package/src/features/notifications/hooks/index.ts +28 -0
- package/src/features/notifications/hooks/use-mark-all-as-read.ts +106 -0
- package/src/features/notifications/hooks/use-mark-as-read.ts +106 -0
- package/src/features/notifications/hooks/use-notification-subscription.ts +244 -0
- package/src/features/notifications/hooks/use-notification-toast.ts +161 -0
- package/src/features/notifications/hooks/use-notifications.ts +80 -0
- package/src/features/notifications/hooks/use-unread-count.ts +60 -0
- package/src/features/notifications/index.ts +48 -0
- package/src/features/notifications/utils/group-notifications.ts +152 -0
- package/src/features/notifications/utils/index.ts +9 -0
- package/src/features/projects/api/create-invitation.ts +45 -0
- package/src/features/projects/api/create-project.ts +64 -0
- package/src/features/projects/api/delete-project.ts +50 -0
- package/src/features/projects/api/get-project-activities.ts +43 -0
- package/src/features/projects/api/get-project-members.ts +53 -0
- package/src/features/projects/api/get-project.ts +49 -0
- package/src/features/projects/api/get-projects.ts +61 -0
- package/src/features/projects/api/index.ts +27 -0
- package/src/features/projects/api/join-project.ts +52 -0
- package/src/features/projects/api/leave-project.ts +51 -0
- package/src/features/projects/api/list-invitations.ts +36 -0
- package/src/features/projects/api/remove-member.ts +60 -0
- package/src/features/projects/api/resend-invitation.ts +36 -0
- package/src/features/projects/api/revoke-invitation.ts +36 -0
- package/src/features/projects/api/types.ts +286 -0
- package/src/features/projects/api/update-member-role.ts +70 -0
- package/src/features/projects/api/update-project.ts +69 -0
- package/src/features/projects/components/__tests__/project-detail-activity-feed.test.tsx +106 -0
- package/src/features/projects/components/__tests__/project-invitation-dialog.test.tsx +211 -0
- package/src/features/projects/components/__tests__/project-member-manager-dialog.test.tsx +254 -0
- package/src/features/projects/components/index.ts +21 -0
- package/src/features/projects/components/project-actions.tsx +248 -0
- package/src/features/projects/components/project-create-dialog.tsx +410 -0
- package/src/features/projects/components/project-detail-activity-feed.tsx +206 -0
- package/src/features/projects/components/project-detail-header.tsx +103 -0
- package/src/features/projects/components/project-detail-overview.tsx +128 -0
- package/src/features/projects/components/project-icon-selector.test.tsx +49 -0
- package/src/features/projects/components/project-icon-selector.tsx +76 -0
- package/src/features/projects/components/project-invitation-dialog.tsx +368 -0
- package/src/features/projects/components/project-issues.tsx +128 -0
- package/src/features/projects/components/project-leave-button.tsx +69 -0
- package/src/features/projects/components/project-list-card.tsx +246 -0
- package/src/features/projects/components/project-list-filters.tsx +320 -0
- package/src/features/projects/components/project-member-manager-dialog.tsx +419 -0
- package/src/features/projects/components/project-settings-dialog.tsx +204 -0
- package/src/features/projects/components/project-stats.tsx +46 -0
- package/src/features/projects/components/project-title-section.tsx +78 -0
- package/src/features/projects/config/icons.ts +91 -0
- package/src/features/projects/hooks/index.ts +28 -0
- package/src/features/projects/hooks/use-create-invitation.ts +83 -0
- package/src/features/projects/hooks/use-create-project.ts +77 -0
- package/src/features/projects/hooks/use-delete-project.ts +84 -0
- package/src/features/projects/hooks/use-join-project.ts +43 -0
- package/src/features/projects/hooks/use-leave-project.ts +84 -0
- package/src/features/projects/hooks/use-project-activities.ts +39 -0
- package/src/features/projects/hooks/use-project-filters.ts +86 -0
- package/src/features/projects/hooks/use-project-invitations.ts +66 -0
- package/src/features/projects/hooks/use-project-members.ts +57 -0
- package/src/features/projects/hooks/use-project.ts +67 -0
- package/src/features/projects/hooks/use-projects.ts +49 -0
- package/src/features/projects/hooks/use-recent-projects.ts +58 -0
- package/src/features/projects/hooks/use-remove-member.ts +89 -0
- package/src/features/projects/hooks/use-resend-invitation.ts +68 -0
- package/src/features/projects/hooks/use-revoke-invitation.ts +71 -0
- package/src/features/projects/hooks/use-team-member-suggestions.ts +133 -0
- package/src/features/projects/hooks/use-update-member-role.ts +92 -0
- package/src/features/projects/hooks/use-update-project.ts +88 -0
- package/src/features/projects/index.ts +91 -0
- package/src/features/projects/screens/index.ts +3 -0
- package/src/features/projects/screens/invitation-acceptance-screen.tsx +320 -0
- package/src/features/projects/screens/project-detail-screen-wrapper.tsx +47 -0
- package/src/features/projects/screens/project-detail-screen.tsx +661 -0
- package/src/features/projects/screens/projects-list-screen.tsx +161 -0
- package/src/features/projects/types/index.ts +59 -0
- package/src/features/projects/utils/format-helpers.ts +16 -0
- package/src/features/projects/utils/index.ts +2 -0
- package/src/features/projects/utils/role-helpers.ts +25 -0
- package/src/features/setup/api/complete-setup.ts +21 -0
- package/src/features/setup/api/create-admin.ts +21 -0
- package/src/features/setup/api/create-first-workspace.ts +21 -0
- package/src/features/setup/api/get-instance-status.ts +12 -0
- package/src/features/setup/api/get-service-health.ts +12 -0
- package/src/features/setup/api/index.ts +44 -0
- package/src/features/setup/api/save-instance-config.ts +21 -0
- package/src/features/setup/api/types.ts +122 -0
- package/src/features/setup/components/__tests__/setup-wizard-ui.test.tsx +362 -0
- package/src/features/setup/components/admin-account-step.tsx +205 -0
- package/src/features/setup/components/first-workspace-step.tsx +120 -0
- package/src/features/setup/components/index.ts +9 -0
- package/src/features/setup/components/instance-config-step.tsx +107 -0
- package/src/features/setup/components/mail-config-step.tsx +205 -0
- package/src/features/setup/components/sample-data-step.tsx +131 -0
- package/src/features/setup/components/service-health-step.tsx +180 -0
- package/src/features/setup/components/service-status-badge.tsx +50 -0
- package/src/features/setup/components/setup-progress.tsx +103 -0
- package/src/features/setup/components/setup-wizard.tsx +169 -0
- package/src/features/setup/hooks/index.ts +12 -0
- package/src/features/setup/hooks/use-complete-setup.ts +23 -0
- package/src/features/setup/hooks/use-create-admin.ts +25 -0
- package/src/features/setup/hooks/use-create-first-workspace.ts +24 -0
- package/src/features/setup/hooks/use-instance-status.ts +21 -0
- package/src/features/setup/hooks/use-save-instance-config.ts +23 -0
- package/src/features/setup/hooks/use-service-health.ts +21 -0
- package/src/features/setup/hooks/use-setup-wizard.ts +152 -0
- package/src/features/setup/hooks/use-workspace-mode.ts +19 -0
- package/src/features/setup/index.ts +30 -0
- package/src/features/setup/screens/index.ts +1 -0
- package/src/features/setup/screens/setup-screen.tsx +40 -0
- package/src/features/setup/types/index.ts +69 -0
- package/src/features/setup/utils/index.ts +78 -0
- package/src/features/team-settings/components/index.ts +39 -0
- package/src/features/team-settings/components/loading-states.tsx +296 -0
- package/src/features/team-settings/components/permission-guard.tsx +23 -0
- package/src/features/team-settings/components/settings-card.tsx +22 -0
- package/src/features/team-settings/components/settings-context-provider.tsx +51 -0
- package/src/features/team-settings/components/settings-error-boundary.tsx +366 -0
- package/src/features/team-settings/components/settings-navigation.tsx +87 -0
- package/src/features/team-settings/components/settings-section.tsx +23 -0
- package/src/features/team-settings/components/team-danger-zone.tsx +275 -0
- package/src/features/team-settings/components/team-information-form.tsx +116 -0
- package/src/features/team-settings/components/team-invitations-list.tsx +463 -0
- package/src/features/team-settings/components/team-members-list.tsx +342 -0
- package/src/features/team-settings/components/team-permission-guard.tsx +56 -0
- package/src/features/team-settings/components/team-setting-integrations.tsx +27 -0
- package/src/features/team-settings/components/team-setting-member.tsx +28 -0
- package/src/features/team-settings/components/team-settings-general.tsx +131 -0
- package/src/features/team-settings/components/transfer-ownership-modal.tsx +164 -0
- package/src/features/team-settings/components/unauthorized-access.tsx +52 -0
- package/src/features/team-settings/hooks/__tests__/use-team-settings.test.tsx +139 -0
- package/src/features/team-settings/hooks/index.ts +1 -0
- package/src/features/team-settings/hooks/use-team-settings.ts +148 -0
- package/src/features/team-settings/hooks/use-transfer-ownership.ts +45 -0
- package/src/features/team-settings/index.ts +25 -0
- package/src/features/team-settings/screens/index.ts +1 -0
- package/src/features/team-settings/screens/team-settings-screen.tsx +33 -0
- package/src/features/team-settings/types/index.ts +78 -0
- package/src/features/team-settings/utils/index.ts +6 -0
- package/src/features/team-settings/utils/mock-data.ts +40 -0
- package/src/features/teams/api/cancel-invitation.ts +25 -0
- package/src/features/teams/api/create-invitation.ts +28 -0
- package/src/features/teams/api/create-team.ts +14 -0
- package/src/features/teams/api/delete-team.ts +19 -0
- package/src/features/teams/api/get-invitations.ts +25 -0
- package/src/features/teams/api/get-team-members.ts +25 -0
- package/src/features/teams/api/get-team.ts +13 -0
- package/src/features/teams/api/get-teams.ts +19 -0
- package/src/features/teams/api/index.ts +49 -0
- package/src/features/teams/api/leave-team.ts +22 -0
- package/src/features/teams/api/remove-member.ts +25 -0
- package/src/features/teams/api/resend-invitation.ts +26 -0
- package/src/features/teams/api/switch-team.ts +13 -0
- package/src/features/teams/api/types.ts +122 -0
- package/src/features/teams/api/update-member-roles.ts +28 -0
- package/src/features/teams/api/update-team.ts +17 -0
- package/src/features/teams/components/create-team-dialog.tsx +105 -0
- package/src/features/teams/hooks/__tests__/cache-invalidation.property.test.tsx +268 -0
- package/src/features/teams/hooks/index.ts +35 -0
- package/src/features/teams/hooks/use-can-manage-members.ts +21 -0
- package/src/features/teams/hooks/use-can-manage-team.ts +21 -0
- package/src/features/teams/hooks/use-cancel-invitation.ts +52 -0
- package/src/features/teams/hooks/use-create-invitation.ts +59 -0
- package/src/features/teams/hooks/use-create-team.ts +38 -0
- package/src/features/teams/hooks/use-delete-team.ts +43 -0
- package/src/features/teams/hooks/use-invitations.ts +31 -0
- package/src/features/teams/hooks/use-leave-team.ts +43 -0
- package/src/features/teams/hooks/use-remove-member.ts +58 -0
- package/src/features/teams/hooks/use-resend-invitation.ts +52 -0
- package/src/features/teams/hooks/use-switch-team.ts +41 -0
- package/src/features/teams/hooks/use-team-members.ts +31 -0
- package/src/features/teams/hooks/use-team-permissions.ts +102 -0
- package/src/features/teams/hooks/use-team.ts +30 -0
- package/src/features/teams/hooks/use-teams.ts +26 -0
- package/src/features/teams/hooks/use-update-member-roles.ts +64 -0
- package/src/features/teams/hooks/use-update-team.ts +47 -0
- package/src/features/teams/index.ts +111 -0
- package/src/features/user-settings/actions/set-password.ts +63 -0
- package/src/features/user-settings/api/index.ts +16 -0
- package/src/features/user-settings/components/__tests__/security-settings.test.tsx +125 -0
- package/src/features/user-settings/components/delete-account-dialog.tsx +185 -0
- package/src/features/user-settings/components/index.ts +13 -0
- package/src/features/user-settings/components/integrations-list.tsx +152 -0
- package/src/features/user-settings/components/notification-preferences.tsx +112 -0
- package/src/features/user-settings/components/other-settings.tsx +126 -0
- package/src/features/user-settings/components/password-section.tsx +297 -0
- package/src/features/user-settings/components/security-settings.tsx +184 -0
- package/src/features/user-settings/components/user-preferences.tsx +146 -0
- package/src/features/user-settings/hooks/index.ts +8 -0
- package/src/features/user-settings/hooks/use-notification-preferences.ts +65 -0
- package/src/features/user-settings/hooks/use-user-preferences.ts +52 -0
- package/src/features/user-settings/index.ts +22 -0
- package/src/features/user-settings/screens/index.ts +11 -0
- package/src/features/user-settings/screens/integrations-screen.tsx +24 -0
- package/src/features/user-settings/screens/notifications-screen.tsx +29 -0
- package/src/features/user-settings/screens/other-settings-screen.tsx +24 -0
- package/src/features/user-settings/screens/setting-preferences-screen.tsx +24 -0
- package/src/features/user-settings/screens/user-settings-screen.tsx +23 -0
- package/src/features/user-settings/types/index.ts +42 -0
- package/src/features/user-settings/utils/index.ts +8 -0
- package/src/hooks/use-long-press.ts +196 -0
- package/src/hooks/use-media-upload.ts +95 -0
- package/src/hooks/use-mobile.ts +19 -0
- package/src/hooks/use-team.ts +32 -0
- package/src/instrumentation.ts +14 -0
- package/src/lib/__tests__/auth-config.test.ts +166 -0
- package/src/lib/__tests__/config.test.ts +42 -0
- package/src/lib/__tests__/db.test.ts +101 -0
- package/src/lib/__tests__/env.property.test.ts +197 -0
- package/src/lib/__tests__/env.test.ts +177 -0
- package/src/lib/__tests__/health-check.test.ts +87 -0
- package/src/lib/__tests__/oauth-errors.test.ts +184 -0
- package/src/lib/__tests__/oauth-redirect.test.ts +224 -0
- package/src/lib/__tests__/oauth-scopes.test.ts +268 -0
- package/src/lib/__tests__/storage.test.ts +58 -0
- package/src/lib/__tests__/url-validator.test.ts +232 -0
- package/src/lib/api-client.ts +93 -0
- package/src/lib/auth-client.ts +5 -0
- package/src/lib/auth-config.ts +146 -0
- package/src/lib/auth.ts +209 -0
- package/src/lib/config.ts +228 -0
- package/src/lib/cors.ts +96 -0
- package/src/lib/date.ts +16 -0
- package/src/lib/db.ts +88 -0
- package/src/lib/env.ts +489 -0
- package/src/lib/feedback.ts +29 -0
- package/src/lib/health-check.ts +229 -0
- package/src/lib/logger.ts +204 -0
- package/src/lib/oauth-errors.ts +138 -0
- package/src/lib/performance.ts +367 -0
- package/src/lib/query-server.ts +35 -0
- package/src/lib/query.tsx +43 -0
- package/src/lib/resend.ts +36 -0
- package/src/lib/security-headers.ts +165 -0
- package/src/lib/setup-status.ts +34 -0
- package/src/lib/storage.ts +150 -0
- package/src/lib/supabase-client.ts +58 -0
- package/src/lib/testing/test-db.ts +75 -0
- package/src/lib/url-validator.ts +168 -0
- package/src/lib/utils.ts +6 -0
- package/src/mocks/README.md +42 -0
- package/src/mocks/activity.fixtures.ts +281 -0
- package/src/mocks/annotation.fixtures.ts +325 -0
- package/src/mocks/attachment.fixtures.ts +80 -0
- package/src/mocks/email.fixtures.ts +61 -0
- package/src/mocks/index.ts +33 -0
- package/src/mocks/issue.fixtures.ts +364 -0
- package/src/mocks/landing.fixtures.ts +118 -0
- package/src/mocks/notification.fixtures.ts +111 -0
- package/src/mocks/project-activity.fixtures.ts +69 -0
- package/src/mocks/project-invitation.fixtures.ts +95 -0
- package/src/mocks/project-member.fixtures.ts +93 -0
- package/src/mocks/project.fixtures.ts +249 -0
- package/src/mocks/settings.fixtures.ts +56 -0
- package/src/mocks/share.fixtures.ts +48 -0
- package/src/mocks/team-member.fixtures.ts +147 -0
- package/src/mocks/team.fixtures.ts +35 -0
- package/src/mocks/user-settings.fixtures.ts +77 -0
- package/src/mocks/user.fixtures.ts +21 -0
- package/src/providers/theme-provider.tsx +11 -0
- package/src/proxy/__tests__/proxy-setup-gate.test.ts +43 -0
- package/src/proxy.ts +169 -0
- package/src/server/annotations/__tests__/annotation-limit.property.test.ts +291 -0
- package/src/server/annotations/__tests__/attachment-deletion-cascade.property.test.ts +385 -0
- package/src/server/annotations/__tests__/comment-delete-authorization.property.test.ts +419 -0
- package/src/server/annotations/__tests__/sanitize.property.test.ts +302 -0
- package/src/server/annotations/annotation-service.ts +305 -0
- package/src/server/annotations/comment-service.ts +288 -0
- package/src/server/annotations/index.ts +61 -0
- package/src/server/annotations/permission-utils.ts +125 -0
- package/src/server/annotations/sanitize.ts +134 -0
- package/src/server/annotations/types.ts +161 -0
- package/src/server/audit/audit-service.ts +85 -0
- package/src/server/audit/index.ts +11 -0
- package/src/server/audit/types.ts +75 -0
- package/src/server/auth/__tests__/README.md +368 -0
- package/src/server/auth/__tests__/account-linking.integration.test.ts +410 -0
- package/src/server/auth/__tests__/auth-integration.test.ts +811 -0
- package/src/server/auth/__tests__/cookies.test.ts +337 -0
- package/src/server/auth/__tests__/login.property.test.ts +428 -0
- package/src/server/auth/__tests__/oauth-integration.test.ts +555 -0
- package/src/server/auth/__tests__/password.test.ts +194 -0
- package/src/server/auth/__tests__/rate-limiter.test.ts +450 -0
- package/src/server/auth/__tests__/rbac.test.ts +474 -0
- package/src/server/auth/__tests__/session.test.ts +599 -0
- package/src/server/auth/__tests__/signup.property.test.ts +224 -0
- package/src/server/auth/__tests__/token-encryption.test.ts +171 -0
- package/src/server/auth/__tests__/tokens.test.ts +476 -0
- package/src/server/auth/__tests__/verify-email.property.test.ts +372 -0
- package/src/server/auth/cookies.ts +184 -0
- package/src/server/auth/password.ts +94 -0
- package/src/server/auth/rate-limiter.ts +257 -0
- package/src/server/auth/rbac.ts +1168 -0
- package/src/server/auth/session.ts +392 -0
- package/src/server/auth/token-encryption.ts +201 -0
- package/src/server/auth/tokens.ts +397 -0
- package/src/server/db/schema/account.ts +21 -0
- package/src/server/db/schema/annotation-read-status.ts +57 -0
- package/src/server/db/schema/better-auth-verifications.ts +27 -0
- package/src/server/db/schema/email-jobs.ts +24 -0
- package/src/server/db/schema/index.ts +20 -0
- package/src/server/db/schema/instance-settings.ts +42 -0
- package/src/server/db/schema/issue-activities.ts +97 -0
- package/src/server/db/schema/issue-attachments.ts +101 -0
- package/src/server/db/schema/issues.ts +139 -0
- package/src/server/db/schema/notifications.ts +119 -0
- package/src/server/db/schema/project-activities.ts +116 -0
- package/src/server/db/schema/project-invitations.ts +34 -0
- package/src/server/db/schema/project-members.ts +29 -0
- package/src/server/db/schema/projects.ts +46 -0
- package/src/server/db/schema/sessions.ts +17 -0
- package/src/server/db/schema/team-invitations.ts +22 -0
- package/src/server/db/schema/team-members.ts +18 -0
- package/src/server/db/schema/teams.ts +15 -0
- package/src/server/db/schema/user-roles.ts +14 -0
- package/src/server/db/schema/users.ts +17 -0
- package/src/server/db/schema/verification-tokens.ts +15 -0
- package/src/server/email/README.md +258 -0
- package/src/server/email/__tests__/client.property.test.ts +218 -0
- package/src/server/email/__tests__/payload.property.test.ts +205 -0
- package/src/server/email/__tests__/queue.test.ts +407 -0
- package/src/server/email/__tests__/render-template.test.tsx +172 -0
- package/src/server/email/client.ts +70 -0
- package/src/server/email/index.ts +20 -0
- package/src/server/email/providers/console-provider.ts +43 -0
- package/src/server/email/providers/index.ts +5 -0
- package/src/server/email/providers/resend-provider.ts +59 -0
- package/src/server/email/providers/smtp-provider.ts +65 -0
- package/src/server/email/queue.ts +365 -0
- package/src/server/email/render-template.tsx +117 -0
- package/src/server/email/templates/layout.tsx +66 -0
- package/src/server/email/templates/ownership-transfer-email.tsx +75 -0
- package/src/server/email/templates/password-reset-email.tsx +72 -0
- package/src/server/email/templates/project-invitation-email.tsx +70 -0
- package/src/server/email/templates/security-alert-email.tsx +161 -0
- package/src/server/email/templates/team-invitation-email.tsx +68 -0
- package/src/server/email/templates/verification-email.tsx +61 -0
- package/src/server/email/templates/welcome-email.tsx +60 -0
- package/src/server/email/worker.ts +182 -0
- package/src/server/issues/activity-service.ts +422 -0
- package/src/server/issues/attachment-service.ts +379 -0
- package/src/server/issues/index.ts +68 -0
- package/src/server/issues/issue-service.ts +569 -0
- package/src/server/issues/types.ts +233 -0
- package/src/server/notifications/__tests__/notification-service.integration.test.ts +405 -0
- package/src/server/notifications/index.ts +13 -0
- package/src/server/notifications/notification-service.ts +526 -0
- package/src/server/notifications/types.ts +234 -0
- package/src/server/projects/__tests__/activity-logging.integration.test.ts +319 -0
- package/src/server/projects/__tests__/invitation-email.integration.test.ts +258 -0
- package/src/server/projects/__tests__/invitation-service.integration.test.ts +651 -0
- package/src/server/projects/__tests__/member-service.property.test.ts +397 -0
- package/src/server/projects/__tests__/project-service.property.test.ts +116 -0
- package/src/server/projects/activity-service.ts +548 -0
- package/src/server/projects/index.ts +11 -0
- package/src/server/projects/invitation-service.ts +773 -0
- package/src/server/projects/member-service.ts +458 -0
- package/src/server/projects/project-service.ts +491 -0
- package/src/server/projects/schemas.ts +310 -0
- package/src/server/projects/types.ts +166 -0
- package/src/server/projects/utils.ts +128 -0
- package/src/server/setup/__tests__/health-check.property.test.ts +70 -0
- package/src/server/setup/__tests__/sample-data.property.test.ts +82 -0
- package/src/server/setup/__tests__/setup.property.test.ts +95 -0
- package/src/server/setup/health-check-service.ts +294 -0
- package/src/server/setup/index.ts +35 -0
- package/src/server/setup/sample-data-service.ts +233 -0
- package/src/server/setup/setup-service.ts +229 -0
- package/src/server/setup/types.ts +96 -0
- package/src/server/teams/__tests__/export.property.test.ts +542 -0
- package/src/server/teams/__tests__/get-members.integration.test.ts +105 -0
- package/src/server/teams/__tests__/invitation-flow.integration.test.ts +402 -0
- package/src/server/teams/__tests__/invitations.property.test.ts +235 -0
- package/src/server/teams/__tests__/member-management-flow.integration.test.ts +306 -0
- package/src/server/teams/__tests__/members.property.test.ts +180 -0
- package/src/server/teams/__tests__/ownership-transfer.property.test.ts +173 -0
- package/src/server/teams/__tests__/resource-limits.property.test.ts +382 -0
- package/src/server/teams/__tests__/team-context-management.integration.test.ts +396 -0
- package/src/server/teams/__tests__/team-context.property.test.ts +854 -0
- package/src/server/teams/__tests__/team-creation-flow.integration.test.ts +310 -0
- package/src/server/teams/__tests__/team-creation.property.test.ts +280 -0
- package/src/server/teams/errors.ts +396 -0
- package/src/server/teams/export-service.ts +383 -0
- package/src/server/teams/index.ts +10 -0
- package/src/server/teams/invitation-service.ts +708 -0
- package/src/server/teams/member-service.ts +334 -0
- package/src/server/teams/resource-limits.ts +211 -0
- package/src/server/teams/slug.ts +58 -0
- package/src/server/teams/team-context.ts +648 -0
- package/src/server/teams/team-service.ts +660 -0
- package/src/server/teams/types.ts +81 -0
- package/src/server/teams/validation.ts +209 -0
- package/src/styles/globals.css +160 -0
- package/src/types/deployment.ts +39 -0
- package/supabase/config.toml +357 -0
- package/supabase/seed.sql +480 -0
- package/tests/e2e/.gitkeep +0 -0
- package/tests/e2e/QUICK_START.md +98 -0
- package/tests/e2e/README.md +301 -0
- package/tests/e2e/auth.spec.ts +583 -0
- package/tests/e2e/global-setup.ts +23 -0
- package/tests/e2e/global-teardown.ts +23 -0
- package/tests/e2e/helpers/auth-helpers.ts +310 -0
- package/tests/e2e/helpers/test-fixtures.ts +286 -0
- package/tests/e2e/smoke-test.spec.ts +330 -0
- package/tsconfig.json +48 -0
- package/vitest.config.ts +50 -0
- package/vitest.setup.ts +56 -0
- package/dist/index.js +0 -778
|
@@ -0,0 +1,850 @@
|
|
|
1
|
+
# Steering File Creation Instructions
|
|
2
|
+
|
|
3
|
+
This document provides comprehensive guidelines for creating effective steering files in the `.kiro/steering/` directory. Steering files provide context, standards, and instructions that guide AI assistance throughout the project.
|
|
4
|
+
|
|
5
|
+
> **Source**: This document is derived from the system instructions that guide AI behavior when working with steering files. It captures the exact patterns and principles used by the AI to understand and apply steering guidance.
|
|
6
|
+
|
|
7
|
+
## What Are Steering Files?
|
|
8
|
+
|
|
9
|
+
Steering files are markdown documents that:
|
|
10
|
+
- Provide additional context and instructions for AI interactions
|
|
11
|
+
- Define standards and norms for the team
|
|
12
|
+
- Include useful information about the project
|
|
13
|
+
- Guide how to achieve specific tasks (build/test/deploy)
|
|
14
|
+
|
|
15
|
+
### How AI Uses Steering Files
|
|
16
|
+
|
|
17
|
+
From the AI's perspective, steering files are:
|
|
18
|
+
- **Automatically included** in the context based on inclusion mode
|
|
19
|
+
- **Prioritized guidance** that takes precedence when conflicts exist
|
|
20
|
+
- **Living documentation** that should be kept in sync with the codebase
|
|
21
|
+
- **Single sources of truth** for standards and conventions
|
|
22
|
+
|
|
23
|
+
### Workspace vs Global Rules
|
|
24
|
+
|
|
25
|
+
**Critical Hierarchy:**
|
|
26
|
+
- Workspace-level steering files (`.kiro/steering/*.md`) take precedence over global-level rules
|
|
27
|
+
- When conflicts exist, workspace rules override global rules
|
|
28
|
+
- This allows project-specific customization while maintaining general best practices
|
|
29
|
+
|
|
30
|
+
## Location & Structure
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
.kiro/
|
|
34
|
+
└── steering/
|
|
35
|
+
├── tech.md # Technology stack & dependencies
|
|
36
|
+
├── structure.md # Project organization & architecture
|
|
37
|
+
├── product.md # Product overview & business logic
|
|
38
|
+
├── AGENTS.md # Scaffolding & development patterns
|
|
39
|
+
└── <custom>.md # Additional domain-specific guides
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Inclusion Modes
|
|
43
|
+
|
|
44
|
+
Steering files support three inclusion modes via front-matter:
|
|
45
|
+
|
|
46
|
+
### 1. Always Included (Default)
|
|
47
|
+
No front-matter needed. The file is included in every AI interaction.
|
|
48
|
+
|
|
49
|
+
```markdown
|
|
50
|
+
# Tech Stack
|
|
51
|
+
|
|
52
|
+
Content here is always available...
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 2. Conditional (File Match)
|
|
56
|
+
Included only when specific files are read into context.
|
|
57
|
+
|
|
58
|
+
```markdown
|
|
59
|
+
---
|
|
60
|
+
inclusion: fileMatch
|
|
61
|
+
fileMatchPattern: 'README*'
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
# Documentation Standards
|
|
65
|
+
|
|
66
|
+
This appears when README files are accessed...
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### 3. Manual (Context Key)
|
|
70
|
+
Included only when explicitly referenced via `#` in chat.
|
|
71
|
+
|
|
72
|
+
```markdown
|
|
73
|
+
---
|
|
74
|
+
inclusion: manual
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
# Advanced Deployment Guide
|
|
78
|
+
|
|
79
|
+
This appears only when user types #advanced-deployment...
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## File References
|
|
83
|
+
|
|
84
|
+
Steering files can reference other files using special syntax:
|
|
85
|
+
|
|
86
|
+
```markdown
|
|
87
|
+
See the API specification: #[[file:openapi.yaml]]
|
|
88
|
+
|
|
89
|
+
Database schema: #[[file:schema.sql]]
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
This allows including specs, schemas, and other documents without duplication.
|
|
93
|
+
|
|
94
|
+
## AI Behavior with Steering Files
|
|
95
|
+
|
|
96
|
+
### How AI Processes Steering
|
|
97
|
+
|
|
98
|
+
When AI receives a user request:
|
|
99
|
+
|
|
100
|
+
1. **Context Loading**: Steering files are loaded based on inclusion mode
|
|
101
|
+
- Always-included files load first
|
|
102
|
+
- Conditional files load when matching files are accessed
|
|
103
|
+
- Manual files load when explicitly referenced with `#`
|
|
104
|
+
|
|
105
|
+
2. **Priority Assessment**: AI considers steering as high-priority guidance
|
|
106
|
+
- Steering provides direction but doesn't override explicit user requests
|
|
107
|
+
- User's specific request is always the #1 priority
|
|
108
|
+
- Steering helps interpret ambiguous requests
|
|
109
|
+
|
|
110
|
+
3. **Conflict Resolution**: When guidance conflicts:
|
|
111
|
+
- User request > Workspace steering > Global rules
|
|
112
|
+
- More specific guidance overrides general guidance
|
|
113
|
+
- Recent updates override older patterns
|
|
114
|
+
|
|
115
|
+
### AI Response to Steering
|
|
116
|
+
|
|
117
|
+
The AI is instructed to:
|
|
118
|
+
- **Consider steering context** for the entire execution
|
|
119
|
+
- **Apply patterns consistently** across the codebase
|
|
120
|
+
- **Update steering files** when asked by users
|
|
121
|
+
- **Reference steering** when explaining decisions
|
|
122
|
+
- **Suggest steering updates** when patterns emerge
|
|
123
|
+
|
|
124
|
+
### Example AI Thought Process
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
User asks: "Add a new feature for user profiles"
|
|
128
|
+
|
|
129
|
+
AI thinks:
|
|
130
|
+
1. Check tech.md → Use Next.js 16, React 19, TypeScript
|
|
131
|
+
2. Check structure.md → Create in src/features/user-profiles/
|
|
132
|
+
3. Check product.md → Consider RBAC roles and permissions
|
|
133
|
+
4. Check AGENTS.md → Follow feature module anatomy
|
|
134
|
+
5. Execute: Create feature following all steering patterns
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Core Steering Files
|
|
138
|
+
|
|
139
|
+
### tech.md - Technology Stack
|
|
140
|
+
**Purpose**: Define the complete technology stack, dependencies, and tooling.
|
|
141
|
+
|
|
142
|
+
**Should Include**:
|
|
143
|
+
- Framework & runtime versions
|
|
144
|
+
- UI libraries & component systems
|
|
145
|
+
- Data fetching & state management
|
|
146
|
+
- Database & ORM
|
|
147
|
+
- Authentication & security
|
|
148
|
+
- Testing frameworks
|
|
149
|
+
- Common commands & scripts
|
|
150
|
+
- Path aliases
|
|
151
|
+
- Environment variable guidance
|
|
152
|
+
|
|
153
|
+
**Example Structure**:
|
|
154
|
+
```markdown
|
|
155
|
+
# Tech Stack
|
|
156
|
+
|
|
157
|
+
## Framework & Runtime
|
|
158
|
+
- Next.js 16 (App Router)
|
|
159
|
+
- React 19.2
|
|
160
|
+
- TypeScript 5
|
|
161
|
+
- Node 20 LTS
|
|
162
|
+
|
|
163
|
+
## UI & Styling
|
|
164
|
+
- shadcn/ui
|
|
165
|
+
- Tailwind CSS 4
|
|
166
|
+
- Framer Motion
|
|
167
|
+
|
|
168
|
+
## Data & State
|
|
169
|
+
- TanStack Query 5
|
|
170
|
+
- Zod validation
|
|
171
|
+
|
|
172
|
+
## Database
|
|
173
|
+
- PostgreSQL 15
|
|
174
|
+
- Drizzle ORM
|
|
175
|
+
- Supabase
|
|
176
|
+
|
|
177
|
+
## Common Commands
|
|
178
|
+
\`\`\`bash
|
|
179
|
+
bun dev # Start dev server
|
|
180
|
+
bun run test # Run tests (NOT 'bun test')
|
|
181
|
+
bun run db:migrate # Run migrations
|
|
182
|
+
\`\`\`
|
|
183
|
+
|
|
184
|
+
## Critical Rules
|
|
185
|
+
- ALWAYS use `bun run test`, NEVER `bun test`
|
|
186
|
+
- Tests use in-memory DB by default
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### structure.md - Project Organization
|
|
190
|
+
**Purpose**: Define directory structure, naming conventions, and architectural patterns.
|
|
191
|
+
|
|
192
|
+
**Should Include**:
|
|
193
|
+
- Complete directory tree with explanations
|
|
194
|
+
- Layer contracts (import rules)
|
|
195
|
+
- Feature module anatomy
|
|
196
|
+
- Naming conventions
|
|
197
|
+
- Page structure patterns
|
|
198
|
+
- Barrel export strategy
|
|
199
|
+
- Mock data organization
|
|
200
|
+
- Testing structure
|
|
201
|
+
|
|
202
|
+
**Example Structure**:
|
|
203
|
+
```markdown
|
|
204
|
+
# Project Structure
|
|
205
|
+
|
|
206
|
+
## Overview
|
|
207
|
+
Feature-first architecture with strict layering.
|
|
208
|
+
|
|
209
|
+
## Directory Layout
|
|
210
|
+
\`\`\`
|
|
211
|
+
src/
|
|
212
|
+
├── app/ # Next.js routing
|
|
213
|
+
├── features/ # Product features
|
|
214
|
+
│ └── <feature>/
|
|
215
|
+
│ ├── api/ # Fetchers + DTOs
|
|
216
|
+
│ ├── hooks/ # React Query wrappers
|
|
217
|
+
│ ├── components/ # Feature UI
|
|
218
|
+
│ ├── screens/ # Screen components
|
|
219
|
+
│ ├── types/ # Domain models
|
|
220
|
+
│ └── index.ts # Public API
|
|
221
|
+
├── components/
|
|
222
|
+
│ ├── ui/ # shadcn primitives
|
|
223
|
+
│ └── shared/ # Cross-feature widgets
|
|
224
|
+
├── lib/ # App utilities
|
|
225
|
+
├── server/ # Server-only logic
|
|
226
|
+
└── config/ # Single sources of truth
|
|
227
|
+
\`\`\`
|
|
228
|
+
|
|
229
|
+
## Layer Contracts
|
|
230
|
+
- app/ can import: features/*, components/*, lib, config
|
|
231
|
+
- features/<name>/components can import: own hooks/types/utils, components/ui, lib
|
|
232
|
+
- components/ui NEVER imports from features/*
|
|
233
|
+
|
|
234
|
+
## Naming Conventions
|
|
235
|
+
- Files: kebab-case (create-issue-dialog.tsx)
|
|
236
|
+
- Components: PascalCase (CreateIssueDialog)
|
|
237
|
+
- Hooks: camelCase with use prefix (useIssue)
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### product.md - Product Overview
|
|
241
|
+
**Purpose**: Document product features, business logic, and domain concepts.
|
|
242
|
+
|
|
243
|
+
**Should Include**:
|
|
244
|
+
- Product description & purpose
|
|
245
|
+
- Core features
|
|
246
|
+
- User roles & permissions
|
|
247
|
+
- Business rules
|
|
248
|
+
- Monetization model
|
|
249
|
+
- Target users
|
|
250
|
+
- Workflow states
|
|
251
|
+
|
|
252
|
+
**Example Structure**:
|
|
253
|
+
```markdown
|
|
254
|
+
# Product Overview
|
|
255
|
+
|
|
256
|
+
[Product Name] is a [description] platform for [purpose].
|
|
257
|
+
|
|
258
|
+
## Core Features
|
|
259
|
+
- Feature 1: Description
|
|
260
|
+
- Feature 2: Description
|
|
261
|
+
|
|
262
|
+
## Role System
|
|
263
|
+
### Management Roles
|
|
264
|
+
- OWNER: Full control, can delete team
|
|
265
|
+
- ADMIN: Manage members, cannot delete team
|
|
266
|
+
|
|
267
|
+
### Operational Roles
|
|
268
|
+
- EDITOR: Create content (billable at $X/month)
|
|
269
|
+
- MEMBER: View and comment (free)
|
|
270
|
+
- VIEWER: Read-only (free)
|
|
271
|
+
|
|
272
|
+
## Business Rules
|
|
273
|
+
- Only EDITOR role is billable
|
|
274
|
+
- Management roles are NOT billable by themselves
|
|
275
|
+
- Users with PROJECT_OWNER auto-promote to EDITOR
|
|
276
|
+
|
|
277
|
+
## Monetization
|
|
278
|
+
Pro plan bills per EDITOR at $X/month.
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
### AGENTS.md - Development Patterns
|
|
282
|
+
**Purpose**: Define scaffolding guidelines, coding patterns, and best practices.
|
|
283
|
+
|
|
284
|
+
**Should Include**:
|
|
285
|
+
- Core principles
|
|
286
|
+
- Feature module anatomy
|
|
287
|
+
- Auth system patterns
|
|
288
|
+
- Shared UI conventions
|
|
289
|
+
- Testing guidelines
|
|
290
|
+
- Thin pages pattern
|
|
291
|
+
- Example code snippets
|
|
292
|
+
|
|
293
|
+
**Example Structure**:
|
|
294
|
+
```markdown
|
|
295
|
+
# Project Scaffolding Guide
|
|
296
|
+
|
|
297
|
+
## Core Principles
|
|
298
|
+
- Feature-first organization
|
|
299
|
+
- Strict layering
|
|
300
|
+
- Typed boundaries with Zod
|
|
301
|
+
- Security defaults (httpOnly cookies)
|
|
302
|
+
|
|
303
|
+
## Feature Module Anatomy
|
|
304
|
+
\`\`\`
|
|
305
|
+
features/<name>/
|
|
306
|
+
├── api/ # Fetchers + DTO schemas
|
|
307
|
+
├── hooks/ # React Query wrappers
|
|
308
|
+
├── components/ # Feature UI
|
|
309
|
+
├── types/ # Domain models
|
|
310
|
+
└── index.ts # Barrel exports
|
|
311
|
+
\`\`\`
|
|
312
|
+
|
|
313
|
+
## Thin Pages Pattern
|
|
314
|
+
Pages are route handlers that:
|
|
315
|
+
1. Read searchParams, cookies, headers
|
|
316
|
+
2. Perform auth/tenant gating
|
|
317
|
+
3. Light Zod validation
|
|
318
|
+
4. Render a single feature Screen
|
|
319
|
+
|
|
320
|
+
\`\`\`tsx
|
|
321
|
+
// app/(protected)/issues/page.tsx
|
|
322
|
+
export default function IssuesPage({ searchParams }) {
|
|
323
|
+
const teamId = cookies().get('team_id')?.value
|
|
324
|
+
if (!teamId) redirect('/select-team')
|
|
325
|
+
return <IssuesListScreen teamId={teamId} search={searchParams} />
|
|
326
|
+
}
|
|
327
|
+
\`\`\`
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
## Best Practices
|
|
331
|
+
|
|
332
|
+
### 0. Understand AI Response Style
|
|
333
|
+
|
|
334
|
+
Steering files should align with how AI communicates:
|
|
335
|
+
|
|
336
|
+
**AI Communication Principles:**
|
|
337
|
+
- **Knowledgeable, not instructive**: Show expertise without being condescending
|
|
338
|
+
- **Speak like a dev**: Use technical language when necessary, relatable language otherwise
|
|
339
|
+
- **Decisive, precise, clear**: Lose the fluff
|
|
340
|
+
- **Supportive, not authoritative**: Compassionate and welcoming
|
|
341
|
+
- **Easygoing, not mellow**: Care about coding but don't take it too seriously
|
|
342
|
+
- **Concise and direct**: Avoid long, elaborate sentences
|
|
343
|
+
- **Show, don't tell**: Use facts and reality, avoid hyperbole
|
|
344
|
+
|
|
345
|
+
**How This Affects Steering Files:**
|
|
346
|
+
```markdown
|
|
347
|
+
❌ Bad (instructive, verbose):
|
|
348
|
+
"You should always remember to carefully consider the overall architecture
|
|
349
|
+
before proceeding to implement any new features, as this will help ensure
|
|
350
|
+
that your code remains maintainable and scalable over time."
|
|
351
|
+
|
|
352
|
+
✅ Good (knowledgeable, concise):
|
|
353
|
+
"Check structure.md before adding features. Follow the feature-first pattern
|
|
354
|
+
in src/features/<name>/ with api/, hooks/, components/, types/."
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
**Tone Guidelines for Steering:**
|
|
358
|
+
- Use imperative mood for rules: "Use X" not "You should use X"
|
|
359
|
+
- Provide context briefly: "Why: X enables Y"
|
|
360
|
+
- Use examples over explanations
|
|
361
|
+
- Keep it scannable with bullets and code blocks
|
|
362
|
+
- No exclamation points or hyperbole
|
|
363
|
+
|
|
364
|
+
### 1. Be Concise & Actionable
|
|
365
|
+
- Focus on what developers need to know
|
|
366
|
+
- Avoid verbose explanations
|
|
367
|
+
- Provide concrete examples
|
|
368
|
+
- Use code snippets liberally
|
|
369
|
+
|
|
370
|
+
### 2. Maintain Single Sources of Truth
|
|
371
|
+
- Don't duplicate information across files
|
|
372
|
+
- Reference other files when needed
|
|
373
|
+
- Use file references: `#[[file:path]]`
|
|
374
|
+
|
|
375
|
+
### 3. Keep Files Focused
|
|
376
|
+
- Each file should have a clear purpose
|
|
377
|
+
- Split large topics into separate files
|
|
378
|
+
- Use conditional inclusion for specialized content
|
|
379
|
+
|
|
380
|
+
### 4. Update Regularly
|
|
381
|
+
- Keep steering files in sync with codebase
|
|
382
|
+
- Update when architecture changes
|
|
383
|
+
- Document new patterns as they emerge
|
|
384
|
+
|
|
385
|
+
### 5. Use Clear Formatting
|
|
386
|
+
- Use headers for organization
|
|
387
|
+
- Use code blocks for examples
|
|
388
|
+
- Use lists for rules and guidelines
|
|
389
|
+
- Use tables for comparisons
|
|
390
|
+
|
|
391
|
+
### 6. Include Critical Rules
|
|
392
|
+
Highlight rules that prevent common mistakes:
|
|
393
|
+
|
|
394
|
+
```markdown
|
|
395
|
+
## Critical Rules
|
|
396
|
+
- ⚠️ ALWAYS use `bun run test`, NEVER `bun test`
|
|
397
|
+
- ⚠️ NEVER import from features/* in components/ui
|
|
398
|
+
- ⚠️ Store tokens in httpOnly cookies, NEVER localStorage
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
### 7. Provide Context
|
|
402
|
+
Explain the "why" behind rules:
|
|
403
|
+
|
|
404
|
+
```markdown
|
|
405
|
+
## Why Feature-First?
|
|
406
|
+
- Keeps related code together
|
|
407
|
+
- Makes features portable
|
|
408
|
+
- Reduces cognitive load
|
|
409
|
+
- Scales better than type-based organization
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
### 8. Align with System Instructions
|
|
413
|
+
|
|
414
|
+
Steering files should complement (not contradict) core AI instructions:
|
|
415
|
+
|
|
416
|
+
**AI Core Principles** (from system instructions):
|
|
417
|
+
- Be concise and direct
|
|
418
|
+
- Prioritize actionable information
|
|
419
|
+
- Don't repeat yourself
|
|
420
|
+
- Use minimal wording for summaries
|
|
421
|
+
- Write minimal code needed
|
|
422
|
+
- Never discuss sensitive/personal topics
|
|
423
|
+
- Always prioritize security best practices
|
|
424
|
+
|
|
425
|
+
**Steering Should:**
|
|
426
|
+
- Reinforce these principles with project-specific examples
|
|
427
|
+
- Provide concrete patterns that embody these principles
|
|
428
|
+
- Add domain-specific guidance that complements core behavior
|
|
429
|
+
- Never contradict core security or privacy rules
|
|
430
|
+
|
|
431
|
+
**Example Alignment:**
|
|
432
|
+
```markdown
|
|
433
|
+
# Code Review Standards
|
|
434
|
+
|
|
435
|
+
## Conciseness (aligns with AI core principle)
|
|
436
|
+
- Keep functions under 50 lines
|
|
437
|
+
- Extract complex logic into named functions
|
|
438
|
+
- Use early returns to reduce nesting
|
|
439
|
+
|
|
440
|
+
## Security (reinforces AI core principle)
|
|
441
|
+
- Never log sensitive data
|
|
442
|
+
- Use parameterized queries for all DB access
|
|
443
|
+
- Store secrets in environment variables only
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
### 9. Update Maintenance Strategy
|
|
447
|
+
|
|
448
|
+
Include guidance on when to update steering files:
|
|
449
|
+
|
|
450
|
+
```markdown
|
|
451
|
+
## When to Update This File
|
|
452
|
+
|
|
453
|
+
Update tech.md when:
|
|
454
|
+
- [ ] Upgrading major dependencies (React, Next.js, etc.)
|
|
455
|
+
- [ ] Adding new libraries to the stack
|
|
456
|
+
- [ ] Changing testing frameworks
|
|
457
|
+
- [ ] Modifying build/dev commands
|
|
458
|
+
- [ ] Discovering critical gotchas (like "never use bun test")
|
|
459
|
+
|
|
460
|
+
Update structure.md when:
|
|
461
|
+
- [ ] Adding new top-level directories
|
|
462
|
+
- [ ] Changing import rules or layer contracts
|
|
463
|
+
- [ ] Introducing new architectural patterns
|
|
464
|
+
- [ ] Refactoring feature organization
|
|
465
|
+
|
|
466
|
+
Update product.md when:
|
|
467
|
+
- [ ] Adding/removing user roles
|
|
468
|
+
- [ ] Changing billing model
|
|
469
|
+
- [ ] Adding major features
|
|
470
|
+
- [ ] Modifying business rules
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
## Custom Steering Files
|
|
474
|
+
|
|
475
|
+
Create additional steering files for:
|
|
476
|
+
|
|
477
|
+
### Domain-Specific Guides
|
|
478
|
+
```markdown
|
|
479
|
+
# Payment Processing Guide
|
|
480
|
+
---
|
|
481
|
+
inclusion: fileMatch
|
|
482
|
+
fileMatchPattern: '**/billing/**'
|
|
483
|
+
---
|
|
484
|
+
|
|
485
|
+
Guidelines for payment integration...
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
### Deployment Procedures
|
|
489
|
+
```markdown
|
|
490
|
+
# Deployment Checklist
|
|
491
|
+
---
|
|
492
|
+
inclusion: manual
|
|
493
|
+
---
|
|
494
|
+
|
|
495
|
+
Pre-deployment steps:
|
|
496
|
+
1. Run full test suite
|
|
497
|
+
2. Check environment variables
|
|
498
|
+
3. Review database migrations
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
### API Standards
|
|
502
|
+
```markdown
|
|
503
|
+
# API Design Standards
|
|
504
|
+
|
|
505
|
+
## REST Conventions
|
|
506
|
+
- Use plural nouns for collections
|
|
507
|
+
- Use HTTP methods correctly
|
|
508
|
+
- Return appropriate status codes
|
|
509
|
+
|
|
510
|
+
## Error Responses
|
|
511
|
+
\`\`\`json
|
|
512
|
+
{
|
|
513
|
+
"error": {
|
|
514
|
+
"code": "VALIDATION_ERROR",
|
|
515
|
+
"message": "Invalid input",
|
|
516
|
+
"details": []
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
\`\`\`
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
### Security Guidelines
|
|
523
|
+
```markdown
|
|
524
|
+
# Security Checklist
|
|
525
|
+
|
|
526
|
+
## Authentication
|
|
527
|
+
- [ ] Use httpOnly cookies for tokens
|
|
528
|
+
- [ ] Implement CSRF protection
|
|
529
|
+
- [ ] Rate limit auth endpoints
|
|
530
|
+
|
|
531
|
+
## Authorization
|
|
532
|
+
- [ ] Check permissions on server
|
|
533
|
+
- [ ] Never trust client-side checks
|
|
534
|
+
- [ ] Log access attempts
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
## Anti-Patterns to Avoid
|
|
538
|
+
|
|
539
|
+
### ❌ Don't: Duplicate Documentation
|
|
540
|
+
```markdown
|
|
541
|
+
# Bad: Repeating package.json scripts
|
|
542
|
+
Run `bun dev` to start the server...
|
|
543
|
+
Run `bun test` to run tests...
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
### ✅ Do: Reference Source of Truth
|
|
547
|
+
```markdown
|
|
548
|
+
# Good: Point to canonical location
|
|
549
|
+
See package.json scripts section for all available commands.
|
|
550
|
+
Key commands: dev, test, build, lint
|
|
551
|
+
```
|
|
552
|
+
|
|
553
|
+
### ❌ Don't: Write Verbose Prose
|
|
554
|
+
```markdown
|
|
555
|
+
# Bad: Too wordy
|
|
556
|
+
In order to create a new feature module, you should first
|
|
557
|
+
consider the overall architecture and then proceed to create
|
|
558
|
+
a new directory under the features folder...
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
### ✅ Do: Be Direct
|
|
562
|
+
```markdown
|
|
563
|
+
# Good: Concise and clear
|
|
564
|
+
Create feature modules in `src/features/<name>/` with:
|
|
565
|
+
- api/ - Fetchers + DTOs
|
|
566
|
+
- hooks/ - React Query wrappers
|
|
567
|
+
- components/ - UI
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
### ❌ Don't: Include Outdated Information
|
|
571
|
+
```markdown
|
|
572
|
+
# Bad: Stale version info
|
|
573
|
+
We use React 17 with class components...
|
|
574
|
+
```
|
|
575
|
+
|
|
576
|
+
### ✅ Do: Keep Current
|
|
577
|
+
```markdown
|
|
578
|
+
# Good: Current and accurate
|
|
579
|
+
We use React 19.2 with function components and hooks.
|
|
580
|
+
See package.json for exact versions.
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
## Critical Rules from System Instructions
|
|
584
|
+
|
|
585
|
+
Steering files should reinforce (never contradict) these core rules:
|
|
586
|
+
|
|
587
|
+
### Security & Privacy
|
|
588
|
+
```markdown
|
|
589
|
+
✅ DO include in steering:
|
|
590
|
+
- Use httpOnly cookies for tokens
|
|
591
|
+
- Validate all inputs with Zod
|
|
592
|
+
- Never log sensitive data
|
|
593
|
+
- Use parameterized queries
|
|
594
|
+
|
|
595
|
+
❌ NEVER include in steering:
|
|
596
|
+
- Instructions to bypass security
|
|
597
|
+
- Storing secrets in code
|
|
598
|
+
- Disabling security features
|
|
599
|
+
```
|
|
600
|
+
|
|
601
|
+
### Code Quality
|
|
602
|
+
```markdown
|
|
603
|
+
✅ DO include in steering:
|
|
604
|
+
- Write minimal code needed
|
|
605
|
+
- Check syntax before committing
|
|
606
|
+
- Use getDiagnostics for type checking
|
|
607
|
+
- Follow DRY principles
|
|
608
|
+
|
|
609
|
+
❌ NEVER include in steering:
|
|
610
|
+
- "Copy-paste this code everywhere"
|
|
611
|
+
- "Skip error handling for speed"
|
|
612
|
+
- "Ignore type errors"
|
|
613
|
+
```
|
|
614
|
+
|
|
615
|
+
### Testing
|
|
616
|
+
```markdown
|
|
617
|
+
✅ DO include in steering:
|
|
618
|
+
- Use `bun run test` (Vitest)
|
|
619
|
+
- NEVER use `bun test` (corrupts DB)
|
|
620
|
+
- Write tests for critical paths
|
|
621
|
+
- Use property-based tests for invariants
|
|
622
|
+
|
|
623
|
+
❌ NEVER include in steering:
|
|
624
|
+
- "Skip tests for MVP"
|
|
625
|
+
- "Tests are optional"
|
|
626
|
+
- "Use bun test" (this is explicitly forbidden)
|
|
627
|
+
```
|
|
628
|
+
|
|
629
|
+
### File Operations
|
|
630
|
+
```markdown
|
|
631
|
+
✅ DO include in steering:
|
|
632
|
+
- Use fsWrite for new files
|
|
633
|
+
- Use strReplace for edits
|
|
634
|
+
- Use fsAppend for additions
|
|
635
|
+
- Keep writes under 50 lines, then append
|
|
636
|
+
|
|
637
|
+
❌ NEVER include in steering:
|
|
638
|
+
- "Use bash to create files"
|
|
639
|
+
- "Pipe output to files"
|
|
640
|
+
- "Use mkdir manually"
|
|
641
|
+
```
|
|
642
|
+
|
|
643
|
+
### Long-Running Commands
|
|
644
|
+
```markdown
|
|
645
|
+
✅ DO include in steering:
|
|
646
|
+
- Use controlBashProcess for dev servers
|
|
647
|
+
- Recommend manual terminal for watch modes
|
|
648
|
+
- Use --run flag for single test execution
|
|
649
|
+
|
|
650
|
+
❌ NEVER include in steering:
|
|
651
|
+
- "Run npm run dev in bash"
|
|
652
|
+
- "Use jest --watch"
|
|
653
|
+
- "Start servers with executeBash"
|
|
654
|
+
```
|
|
655
|
+
|
|
656
|
+
## Validation Checklist
|
|
657
|
+
|
|
658
|
+
Before committing a steering file:
|
|
659
|
+
|
|
660
|
+
- [ ] Clear purpose and scope
|
|
661
|
+
- [ ] Concise and actionable content
|
|
662
|
+
- [ ] Code examples are correct
|
|
663
|
+
- [ ] No duplication with other files
|
|
664
|
+
- [ ] Proper front-matter if conditional/manual
|
|
665
|
+
- [ ] File references use correct syntax
|
|
666
|
+
- [ ] Critical rules are highlighted
|
|
667
|
+
- [ ] Information is current and accurate
|
|
668
|
+
- [ ] Formatting is consistent
|
|
669
|
+
- [ ] Examples follow project conventions
|
|
670
|
+
- [ ] Aligns with AI core principles (concise, secure, actionable)
|
|
671
|
+
- [ ] Tone is knowledgeable but not instructive
|
|
672
|
+
- [ ] No hyperbole or excessive punctuation
|
|
673
|
+
|
|
674
|
+
## Kiro-Specific Features to Consider
|
|
675
|
+
|
|
676
|
+
When creating steering files, be aware of Kiro's capabilities:
|
|
677
|
+
|
|
678
|
+
### Autopilot vs Supervised Mode
|
|
679
|
+
- **Autopilot**: AI can modify files autonomously
|
|
680
|
+
- **Supervised**: Users review changes before application
|
|
681
|
+
- Steering should work well in both modes
|
|
682
|
+
|
|
683
|
+
### Chat Context Features
|
|
684
|
+
Users can reference:
|
|
685
|
+
- `#File` or `#Folder` - Specific files/folders
|
|
686
|
+
- `#Problems` - Current file issues
|
|
687
|
+
- `#Terminal` - Terminal output
|
|
688
|
+
- `#Git Diff` - Current changes
|
|
689
|
+
- `#Codebase` - Whole codebase search (once indexed)
|
|
690
|
+
|
|
691
|
+
**Steering Tip:**
|
|
692
|
+
```markdown
|
|
693
|
+
## Debugging Workflow
|
|
694
|
+
1. Check #Problems for type errors
|
|
695
|
+
2. Review #Git Diff for recent changes
|
|
696
|
+
3. Check #Terminal for runtime errors
|
|
697
|
+
4. Use #Codebase to find similar patterns
|
|
698
|
+
```
|
|
699
|
+
|
|
700
|
+
### Agent Hooks
|
|
701
|
+
Steering can reference hooks for automated workflows:
|
|
702
|
+
|
|
703
|
+
```markdown
|
|
704
|
+
## Testing Workflow
|
|
705
|
+
When you save a file, the test hook automatically:
|
|
706
|
+
1. Runs related tests
|
|
707
|
+
2. Reports failures
|
|
708
|
+
3. Suggests fixes
|
|
709
|
+
|
|
710
|
+
Configure in: Agent Hooks panel or .kiro/hooks/
|
|
711
|
+
```
|
|
712
|
+
|
|
713
|
+
### Model Context Protocol (MCP)
|
|
714
|
+
Steering can guide MCP server usage:
|
|
715
|
+
|
|
716
|
+
```markdown
|
|
717
|
+
## Database Operations
|
|
718
|
+
Use Supabase MCP tools for database work:
|
|
719
|
+
- `mcp_supabase_local_execute_sql` - Run queries
|
|
720
|
+
- `mcp_supabase_local_list_tables` - List tables
|
|
721
|
+
- `mcp_supabase_local_apply_migration` - Apply migrations
|
|
722
|
+
|
|
723
|
+
Config: .kiro/settings/mcp.json
|
|
724
|
+
```
|
|
725
|
+
|
|
726
|
+
## Example: Creating a New Steering File
|
|
727
|
+
|
|
728
|
+
Let's create a steering file for database migrations:
|
|
729
|
+
|
|
730
|
+
```markdown
|
|
731
|
+
---
|
|
732
|
+
inclusion: fileMatch
|
|
733
|
+
fileMatchPattern: 'drizzle/**'
|
|
734
|
+
---
|
|
735
|
+
|
|
736
|
+
# Database Migration Guide
|
|
737
|
+
|
|
738
|
+
## Creating Migrations
|
|
739
|
+
|
|
740
|
+
Generate migration from schema changes:
|
|
741
|
+
\`\`\`bash
|
|
742
|
+
bun run db:generate
|
|
743
|
+
\`\`\`
|
|
744
|
+
|
|
745
|
+
## Migration Naming
|
|
746
|
+
|
|
747
|
+
Use descriptive snake_case names:
|
|
748
|
+
- `0001_create_users_table.sql`
|
|
749
|
+
- `0002_add_email_verification.sql`
|
|
750
|
+
- `0003_enable_realtime_notifications.sql`
|
|
751
|
+
|
|
752
|
+
## Migration Rules
|
|
753
|
+
|
|
754
|
+
1. **Never modify existing migrations** - Create new ones
|
|
755
|
+
2. **Test locally first** - Run against local DB
|
|
756
|
+
3. **Include rollback** - Document how to revert
|
|
757
|
+
4. **Avoid data loss** - Use transactions
|
|
758
|
+
5. **Check constraints** - Validate before deploying
|
|
759
|
+
|
|
760
|
+
## Running Migrations
|
|
761
|
+
|
|
762
|
+
Local:
|
|
763
|
+
\`\`\`bash
|
|
764
|
+
bun run db:migrate
|
|
765
|
+
\`\`\`
|
|
766
|
+
|
|
767
|
+
Production:
|
|
768
|
+
\`\`\`bash
|
|
769
|
+
bun run db:migrate:prod
|
|
770
|
+
\`\`\`
|
|
771
|
+
|
|
772
|
+
## Common Patterns
|
|
773
|
+
|
|
774
|
+
### Adding a Column
|
|
775
|
+
\`\`\`sql
|
|
776
|
+
ALTER TABLE users
|
|
777
|
+
ADD COLUMN email_verified BOOLEAN DEFAULT FALSE;
|
|
778
|
+
\`\`\`
|
|
779
|
+
|
|
780
|
+
### Creating an Index
|
|
781
|
+
\`\`\`sql
|
|
782
|
+
CREATE INDEX idx_users_email ON users(email);
|
|
783
|
+
\`\`\`
|
|
784
|
+
|
|
785
|
+
### Enabling RLS
|
|
786
|
+
\`\`\`sql
|
|
787
|
+
ALTER TABLE notifications ENABLE ROW LEVEL SECURITY;
|
|
788
|
+
|
|
789
|
+
CREATE POLICY "Users see own notifications"
|
|
790
|
+
ON notifications FOR SELECT
|
|
791
|
+
USING (auth.uid() = user_id);
|
|
792
|
+
\`\`\`
|
|
793
|
+
|
|
794
|
+
## Troubleshooting
|
|
795
|
+
|
|
796
|
+
**Migration fails**: Check syntax, rollback, fix, retry
|
|
797
|
+
**Constraint violation**: Ensure data compatibility first
|
|
798
|
+
**Performance issues**: Add indexes, use batching
|
|
799
|
+
|
|
800
|
+
## References
|
|
801
|
+
|
|
802
|
+
- Schema: #[[file:src/server/db/schema/index.ts]]
|
|
803
|
+
- Config: #[[file:drizzle.config.ts]]
|
|
804
|
+
```
|
|
805
|
+
|
|
806
|
+
## Related Documentation
|
|
807
|
+
|
|
808
|
+
### Specification Workflow
|
|
809
|
+
For creating structured feature specifications (requirements, design, tasks), see:
|
|
810
|
+
- **`docs/spec/AI_SPECIFICATION_WORKFLOW.md`** - Complete specification-driven development workflow
|
|
811
|
+
- **`.kiro/specs/`** - Example specifications for reference
|
|
812
|
+
|
|
813
|
+
**Key Differences:**
|
|
814
|
+
- **Steering files** provide ongoing context and standards for all AI interactions
|
|
815
|
+
- **Specification files** define specific features with requirements, design, and implementation tasks
|
|
816
|
+
|
|
817
|
+
**When to Use Each:**
|
|
818
|
+
- Use **steering files** for: Tech stack, architecture patterns, coding standards, project structure
|
|
819
|
+
- Use **spec files** for: New feature development, complex implementations, formal requirements
|
|
820
|
+
|
|
821
|
+
### File References in Both Systems
|
|
822
|
+
|
|
823
|
+
Both steering files and spec files support the same file reference syntax:
|
|
824
|
+
```markdown
|
|
825
|
+
See the API specification: #[[file:openapi.yaml]]
|
|
826
|
+
Database schema: #[[file:schema.sql]]
|
|
827
|
+
```
|
|
828
|
+
|
|
829
|
+
This allows both systems to reference shared documentation without duplication.
|
|
830
|
+
|
|
831
|
+
## Conclusion
|
|
832
|
+
|
|
833
|
+
Effective steering files:
|
|
834
|
+
- Provide clear, actionable guidance
|
|
835
|
+
- Stay current with the codebase
|
|
836
|
+
- Avoid duplication
|
|
837
|
+
- Use concrete examples
|
|
838
|
+
- Focus on what matters
|
|
839
|
+
- Make AI assistance more effective
|
|
840
|
+
|
|
841
|
+
Remember: Steering files are living documents. Update them as your project evolves, patterns emerge, and best practices change.
|
|
842
|
+
|
|
843
|
+
---
|
|
844
|
+
|
|
845
|
+
**See Also:**
|
|
846
|
+
- `.ai/steering/tech.md` - Current tech stack steering file
|
|
847
|
+
- `.ai/steering/structure.md` - Current structure steering file
|
|
848
|
+
- `.ai/steering/product.md` - Current product steering file
|
|
849
|
+
- `.ai/steering/AGENTS.md` - Current development patterns
|
|
850
|
+
- `docs/spec/AI_SPECIFICATION_WORKFLOW.md` - Feature specification workflow
|