@erclx/aitk 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +99 -0
- package/claude/.claude-plugin/plugin.json +19 -0
- package/claude/skills/bash-script/SKILL.md +96 -0
- package/claude/skills/bash-script/references/patterns.md +349 -0
- package/claude/skills/ci-workflow/SKILL.md +52 -0
- package/claude/skills/ci-workflow/references/workflows.md +74 -0
- package/claude/skills/claude-address-review/SKILL.md +107 -0
- package/claude/skills/claude-autoship/SKILL.md +137 -0
- package/claude/skills/claude-design-extract/SKILL.md +69 -0
- package/claude/skills/claude-design-propose/SKILL.md +75 -0
- package/claude/skills/claude-diagram/SKILL.md +126 -0
- package/claude/skills/claude-docs/SKILL.md +204 -0
- package/claude/skills/claude-feature/REQUIREMENT.md +35 -0
- package/claude/skills/claude-feature/SKILL.md +148 -0
- package/claude/skills/claude-groundwork/SKILL.md +148 -0
- package/claude/skills/claude-groundwork/references/folder-format.md +107 -0
- package/claude/skills/claude-memory-capture/SKILL.md +80 -0
- package/claude/skills/claude-memory-review/REQUIREMENT.md +37 -0
- package/claude/skills/claude-memory-review/SKILL.md +206 -0
- package/claude/skills/claude-orchestrate/SKILL.md +125 -0
- package/claude/skills/claude-pr-review/SKILL.md +150 -0
- package/claude/skills/claude-review/SKILL.md +136 -0
- package/claude/skills/claude-roadmap/SKILL.md +61 -0
- package/claude/skills/claude-roadmap/references/roadmap.md +52 -0
- package/claude/skills/claude-screencast/SKILL.md +160 -0
- package/claude/skills/claude-seed-sync/SKILL.md +141 -0
- package/claude/skills/claude-slides-draft/SKILL.md +62 -0
- package/claude/skills/claude-standards-audit/REQUIREMENT.md +33 -0
- package/claude/skills/claude-standards-audit/SKILL.md +79 -0
- package/claude/skills/claude-standards-audit/references/branch.md +49 -0
- package/claude/skills/claude-standards-audit/references/pr.md +124 -0
- package/claude/skills/claude-tasks/SKILL.md +123 -0
- package/claude/skills/claude-ui-test/SKILL.md +75 -0
- package/claude/skills/claude-ux-audit/SKILL.md +78 -0
- package/claude/skills/claude-worktree/SKILL.md +79 -0
- package/claude/skills/cli-script/SKILL.md +47 -0
- package/claude/skills/cli-script/references/template.md +43 -0
- package/claude/skills/create-rule/SKILL.md +68 -0
- package/claude/skills/create-skill/REQUIREMENT.md +30 -0
- package/claude/skills/create-skill/SKILL.md +24 -0
- package/claude/skills/create-snippet/SKILL.md +28 -0
- package/claude/skills/create-snippet/references/snippets.md +57 -0
- package/claude/skills/create-standard/SKILL.md +31 -0
- package/claude/skills/create-standard/references/standard.md +52 -0
- package/claude/skills/docs-sync/SKILL.md +87 -0
- package/claude/skills/git-branch/REQUIREMENT.md +38 -0
- package/claude/skills/git-branch/SKILL.md +60 -0
- package/claude/skills/git-branch/references/branch.md +49 -0
- package/claude/skills/git-commit/REQUIREMENT.md +33 -0
- package/claude/skills/git-commit/SKILL.md +51 -0
- package/claude/skills/git-commit/references/commit.md +63 -0
- package/claude/skills/git-followup/REQUIREMENT.md +38 -0
- package/claude/skills/git-followup/SKILL.md +35 -0
- package/claude/skills/git-issue/REQUIREMENT.md +38 -0
- package/claude/skills/git-issue/SKILL.md +69 -0
- package/claude/skills/git-issue/references/issue.md +84 -0
- package/claude/skills/git-pr/REQUIREMENT.md +37 -0
- package/claude/skills/git-pr/SKILL.md +119 -0
- package/claude/skills/git-pr/references/branch.md +49 -0
- package/claude/skills/git-pr/references/pr.md +124 -0
- package/claude/skills/git-ship/REQUIREMENT.md +34 -0
- package/claude/skills/git-ship/SKILL.md +39 -0
- package/claude/skills/git-split/REQUIREMENT.md +38 -0
- package/claude/skills/git-split/SKILL.md +160 -0
- package/claude/skills/git-split/references/branch.md +49 -0
- package/claude/skills/git-split/references/pr.md +124 -0
- package/claude/skills/git-stage/REQUIREMENT.md +36 -0
- package/claude/skills/git-stage/SKILL.md +74 -0
- package/claude/skills/git-stage/references/commit.md +63 -0
- package/claude/skills/git-worktree/REQUIREMENT.md +37 -0
- package/claude/skills/git-worktree/SKILL.md +120 -0
- package/claude/skills/migration-claude-md/SKILL.md +74 -0
- package/claude/skills/migration-context/SKILL.md +93 -0
- package/claude/skills/migration-standards/SKILL.md +75 -0
- package/claude/skills/project-commands/SKILL.md +73 -0
- package/claude/skills/session-resume/SKILL.md +36 -0
- package/claude/skills/setup-gov/SKILL.md +71 -0
- package/claude/skills/setup-indexes/SKILL.md +148 -0
- package/claude/skills/setup-init/SKILL.md +114 -0
- package/claude/skills/setup-plugins/SKILL.md +81 -0
- package/claude/skills/setup-plugins/references/plugin-catalog.md +53 -0
- package/claude/skills/setup-verify/SKILL.md +51 -0
- package/claude/skills/systematic-debugging/SKILL.md +70 -0
- package/claude/skills/toolkit-cli/SKILL.md +38 -0
- package/claude/skills/toolkit-feedback/SKILL.md +80 -0
- package/claude/skills/toolkit-operator/SKILL.md +45 -0
- package/claude/skills/toolkit-triage/SKILL.md +63 -0
- package/claude/skills/youtube-transcripts/SKILL.md +34 -0
- package/docs/agents.md +371 -0
- package/docs/ai-workflow.md +157 -0
- package/docs/index.md +20 -0
- package/docs/operating-model.md +106 -0
- package/docs/target-projects.md +183 -0
- package/docs/visual-design-workflow.md +136 -0
- package/docs/zshrc-aliases.md +65 -0
- package/governance/rules/claude/500-prose.md +12 -0
- package/governance/rules/claude/510-context.md +16 -0
- package/governance/rules/claude/520-wireframes.md +12 -0
- package/governance/rules/claude/530-requirements.md +11 -0
- package/governance/rules/claude/540-architecture.md +11 -0
- package/governance/rules/claude/550-design.md +11 -0
- package/governance/rules/claude/555-tasks.md +12 -0
- package/governance/rules/claude/560-diagrams.md +11 -0
- package/governance/rules/claude/570-skill.md +18 -0
- package/governance/rules/claude/580-readme.md +11 -0
- package/governance/rules/claude/590-rule-authoring.md +12 -0
- package/governance/rules/core/000-constitution.md +30 -0
- package/governance/rules/core/010-testing.md +35 -0
- package/governance/rules/core/020-concurrency.md +22 -0
- package/governance/rules/core/030-error-handling.md +31 -0
- package/governance/rules/core/040-performance.md +20 -0
- package/governance/rules/core/050-logging.md +20 -0
- package/governance/rules/core/060-naming.md +19 -0
- package/governance/rules/core/070-planning.md +13 -0
- package/governance/rules/core/080-config-comments.md +22 -0
- package/governance/rules/framework/200-react.md +51 -0
- package/governance/rules/framework/210-astro.md +41 -0
- package/governance/rules/framework/220-fastapi.md +43 -0
- package/governance/rules/framework/230-nextjs.md +48 -0
- package/governance/rules/framework/250-tailwind.md +32 -0
- package/governance/rules/framework/260-shadcn.md +34 -0
- package/governance/rules/lang/100-typescript.md +40 -0
- package/governance/rules/lang/110-python.md +42 -0
- package/governance/rules/lib/300-testing-ts.md +38 -0
- package/governance/rules/lib/310-zod.md +25 -0
- package/governance/rules/lib/320-tanstack-query.md +32 -0
- package/governance/rules/lib/330-testing-py.md +44 -0
- package/governance/rules/lib/340-pydantic.md +38 -0
- package/governance/rules/lib/350-security-web.md +31 -0
- package/governance/rules/ui/400-ui.md +34 -0
- package/governance/rules/ui/410-a11y.md +44 -0
- package/governance/rules/ui/420-forms.md +34 -0
- package/governance/rules/ui/430-ux-completeness.md +62 -0
- package/governance/stacks/astro.toml +2 -0
- package/governance/stacks/base.toml +2 -0
- package/governance/stacks/node.toml +2 -0
- package/governance/stacks/python-fastapi.toml +2 -0
- package/governance/stacks/python.toml +2 -0
- package/governance/stacks/react.toml +2 -0
- package/package.json +67 -0
- package/scripts/config.sh +11 -0
- package/scripts/core/bootstrap.sh +81 -0
- package/scripts/core/check-plugin-boundary.sh +45 -0
- package/scripts/core/check-skill-paths.sh +25 -0
- package/scripts/core/clean.sh +36 -0
- package/scripts/core/install-check.sh +93 -0
- package/scripts/core/regen-claude-copies.sh +26 -0
- package/scripts/core/regen-indexes.sh +10 -0
- package/scripts/core/regen-skill-references.sh +27 -0
- package/scripts/core/snapshot.sh +132 -0
- package/scripts/core/update.sh +35 -0
- package/scripts/core/verify.sh +201 -0
- package/scripts/docs/list.sh +129 -0
- package/scripts/gov/list.sh +234 -0
- package/scripts/lib/frontmatter.sh +30 -0
- package/scripts/lib/gov.sh +14 -0
- package/scripts/lib/sandbox-fixtures.sh +109 -0
- package/scripts/lib/sandbox-git.sh +73 -0
- package/scripts/lib/tooling.sh +24 -0
- package/scripts/lib/ui.sh +173 -0
- package/scripts/lib/worktree.sh +20 -0
- package/scripts/manage-sandbox.sh +453 -0
- package/scripts/snippets/create.sh +156 -0
- package/scripts/standards/list.sh +91 -0
- package/scripts/tooling/create.sh +109 -0
- package/scripts/tooling/ref.sh +141 -0
- package/scripts/tooling/verify.sh +179 -0
- package/snippets/claude/decision-memo.md +39 -0
- package/snippets/claude/feature-recap.md +19 -0
- package/snippets/claude/figma-steps.md +18 -0
- package/snippets/claude/orchestrator-resume.md +23 -0
- package/snippets/claude/orchestrator-sweep.md +10 -0
- package/snippets/compact-summary.md +5 -0
- package/snippets/create-snippet.md +7 -0
- package/snippets/decision-help.md +6 -0
- package/snippets/meta-prompt.md +14 -0
- package/snippets/research-prompt.md +7 -0
- package/snippets/session-notes.md +11 -0
- package/snippets/snippets.toml +6 -0
- package/snippets/step-by-step.md +10 -0
- package/snippets/web-research.md +21 -0
- package/src/claude/gitignore.ts +51 -0
- package/src/claude/seeds-list.ts +47 -0
- package/src/claude/seeds.ts +124 -0
- package/src/claude/settings.ts +151 -0
- package/src/cli-run.ts +43 -0
- package/src/cli.ts +111 -0
- package/src/commands/claude.ts +349 -0
- package/src/commands/design.ts +39 -0
- package/src/commands/docs.ts +59 -0
- package/src/commands/feedback-format.ts +23 -0
- package/src/commands/feedback.ts +103 -0
- package/src/commands/gov.ts +268 -0
- package/src/commands/indexes.ts +182 -0
- package/src/commands/init.ts +117 -0
- package/src/commands/pass-through.ts +39 -0
- package/src/commands/sandbox.ts +315 -0
- package/src/commands/slides.ts +106 -0
- package/src/commands/snippets.ts +236 -0
- package/src/commands/standards.ts +89 -0
- package/src/commands/sync.ts +211 -0
- package/src/commands/tasks.ts +185 -0
- package/src/commands/tooling.ts +432 -0
- package/src/commands/transcripts.ts +48 -0
- package/src/commands/wiki.ts +101 -0
- package/src/copy.ts +30 -0
- package/src/design/parse.ts +79 -0
- package/src/design/render.ts +170 -0
- package/src/docs/read.ts +59 -0
- package/src/exec.ts +17 -0
- package/src/frontmatter.ts +13 -0
- package/src/github-format.ts +13 -0
- package/src/github.ts +20 -0
- package/src/gov/adapter.ts +73 -0
- package/src/gov/install.ts +103 -0
- package/src/gov/payload.ts +39 -0
- package/src/gov/stacks.ts +124 -0
- package/src/indexes/frontmatter.ts +46 -0
- package/src/indexes/regen.ts +84 -0
- package/src/indexes/render.ts +181 -0
- package/src/indexes/walk.ts +111 -0
- package/src/init/flags.ts +66 -0
- package/src/init/plan.ts +128 -0
- package/src/init/run.ts +46 -0
- package/src/init/steps.ts +91 -0
- package/src/sandbox/coverage.ts +115 -0
- package/src/sandbox/expect.ts +412 -0
- package/src/slides/layouts.ts +391 -0
- package/src/slides/open.ts +18 -0
- package/src/slides/parse.ts +84 -0
- package/src/slides/render.ts +88 -0
- package/src/slides/styles.ts +44 -0
- package/src/snippets/adapter.ts +34 -0
- package/src/snippets/categories.ts +59 -0
- package/src/snippets/install.ts +125 -0
- package/src/snippets/list.ts +32 -0
- package/src/snippets/presets.ts +50 -0
- package/src/standards/adapter.ts +51 -0
- package/src/standards/index-refresh.ts +44 -0
- package/src/standards/install.ts +52 -0
- package/src/sync/check.ts +269 -0
- package/src/sync/engine.ts +416 -0
- package/src/sync/git.ts +204 -0
- package/src/sync/stamp.ts +202 -0
- package/src/sync/target.ts +79 -0
- package/src/sync/workflow.ts +201 -0
- package/src/target.ts +43 -0
- package/src/tasks/archive.ts +304 -0
- package/src/tooling/gitignore.ts +122 -0
- package/src/tooling/inject.ts +214 -0
- package/src/tooling/list.ts +39 -0
- package/src/tooling/manifest.ts +178 -0
- package/src/tooling/package.ts +166 -0
- package/src/tooling/scan.ts +186 -0
- package/src/transcripts/fetch.ts +156 -0
- package/src/transcripts/metadata.ts +54 -0
- package/src/transcripts/vtt.ts +114 -0
- package/src/ui.ts +187 -0
- package/src/wiki/init.ts +85 -0
- package/standards/architecture.md +41 -0
- package/standards/bundled/branch.md +49 -0
- package/standards/bundled/commit.md +63 -0
- package/standards/bundled/issue.md +84 -0
- package/standards/bundled/pr.md +124 -0
- package/standards/bundled/roadmap.md +52 -0
- package/standards/bundled/snippets.md +57 -0
- package/standards/bundled/standard.md +52 -0
- package/standards/context.md +132 -0
- package/standards/design.md +31 -0
- package/standards/diagrams.md +55 -0
- package/standards/index.md +21 -0
- package/standards/prose.md +122 -0
- package/standards/readme.md +163 -0
- package/standards/requirements.md +61 -0
- package/standards/rule.md +79 -0
- package/standards/skill.md +257 -0
- package/standards/tasks.md +140 -0
- package/standards/versioning.md +47 -0
- package/standards/wireframes.md +67 -0
- package/tooling/astro/configs/astro.config.mjs +17 -0
- package/tooling/astro/configs/eslint.config.js +79 -0
- package/tooling/astro/configs/playwright.config.ts +25 -0
- package/tooling/astro/configs/tsconfig.json +12 -0
- package/tooling/astro/configs/vitest.config.ts +22 -0
- package/tooling/astro/manifest.toml +32 -0
- package/tooling/astro/reference.md +60 -0
- package/tooling/base/configs/.editorconfig +5 -0
- package/tooling/base/configs/.github/pull_request_template.md +18 -0
- package/tooling/base/configs/.github/workflows/verify.yml +35 -0
- package/tooling/base/configs/.husky/commit-msg +1 -0
- package/tooling/base/configs/.husky/post-merge +61 -0
- package/tooling/base/configs/.husky/post-rewrite +21 -0
- package/tooling/base/configs/.husky/pre-commit +1 -0
- package/tooling/base/configs/.husky/pre-push +1 -0
- package/tooling/base/configs/.prettierrc +12 -0
- package/tooling/base/configs/.shellcheckrc +1 -0
- package/tooling/base/configs/.vscode/extensions.json +9 -0
- package/tooling/base/configs/.vscode/settings.json +3 -0
- package/tooling/base/configs/commitlint.config.js +11 -0
- package/tooling/base/configs/scripts/clean.sh +45 -0
- package/tooling/base/configs/scripts/update.sh +49 -0
- package/tooling/base/configs/scripts/verify.sh +64 -0
- package/tooling/base/manifest.toml +32 -0
- package/tooling/base/reference.md +114 -0
- package/tooling/base/seeds/.claude/context/ci.md +27 -0
- package/tooling/base/seeds/.claude/context/development.md +32 -0
- package/tooling/base/seeds/.cspell/project-terms.txt +0 -0
- package/tooling/base/seeds/.cspell/tech-stack.txt +19 -0
- package/tooling/base/seeds/.lintstagedrc +8 -0
- package/tooling/base/seeds/.prettierignore +0 -0
- package/tooling/base/seeds/cspell.json +20 -0
- package/tooling/claude/manifest.toml +11 -0
- package/tooling/claude/reference.md +62 -0
- package/tooling/claude/seeds/.claude/ARCHITECTURE.md +13 -0
- package/tooling/claude/seeds/.claude/DESIGN.md +62 -0
- package/tooling/claude/seeds/.claude/REQUIREMENTS.md +18 -0
- package/tooling/claude/seeds/.claude/context/index.md +8 -0
- package/tooling/claude/seeds/.claude/hooks/index-reminder.sh +43 -0
- package/tooling/claude/seeds/.claude/hooks/scratch-guard.sh +45 -0
- package/tooling/claude/seeds/.claude/hooks/standards-audit.sh +61 -0
- package/tooling/claude/seeds/.claude/hooks/tasks-index.sh +60 -0
- package/tooling/claude/seeds/.claude/settings.json +39 -0
- package/tooling/claude/seeds/.claude/tasks/index.md +8 -0
- package/tooling/claude/seeds/.claude/wireframes/index.md +8 -0
- package/tooling/claude/seeds/CLAUDE.md +87 -0
- package/tooling/claude/user/settings.template.json +10 -0
- package/tooling/claude/user/statusline-command.sh +53 -0
- package/tooling/python/configs/.coveragerc +14 -0
- package/tooling/python/configs/.python-version +1 -0
- package/tooling/python/configs/mypy.ini +6 -0
- package/tooling/python/configs/pytest.ini +4 -0
- package/tooling/python/configs/ruff.toml +15 -0
- package/tooling/python/configs/scripts/verify.sh +77 -0
- package/tooling/python/manifest.toml +16 -0
- package/tooling/python/reference.md +66 -0
- package/tooling/python/seeds/.cspell/tech-stack.txt +19 -0
- package/tooling/python/seeds/tests/test_smoke.py +2 -0
- package/tooling/vite-react/configs/playwright.config.ts +25 -0
- package/tooling/vite-react/configs/tsconfig.json +35 -0
- package/tooling/vite-react/configs/vite.config.ts +14 -0
- package/tooling/vite-react/configs/vitest.config.ts +26 -0
- package/tooling/vite-react/manifest.toml +21 -0
- package/tooling/vite-react/reference.md +55 -0
- package/tooling/vite-react/seeds/.cspell/project-terms.txt +1 -0
- package/tooling/vite-react/seeds/.cspell/tech-stack.txt +1 -0
- package/tooling/web/configs/.github/workflows/verify.yml +134 -0
- package/tooling/web/configs/.vscode/extensions.json +13 -0
- package/tooling/web/configs/.vscode/settings.json +10 -0
- package/tooling/web/configs/e2e/home.spec.ts +6 -0
- package/tooling/web/configs/e2e/screenshot.ts +41 -0
- package/tooling/web/configs/eslint.config.js +82 -0
- package/tooling/web/configs/scripts/screenshot.sh +28 -0
- package/tooling/web/configs/scripts/verify.sh +80 -0
- package/tooling/web/configs/src/test/setup.ts +8 -0
- package/tooling/web/manifest.toml +57 -0
- package/tooling/web/reference.md +95 -0
- package/tooling/web/seeds/.cspell/tech-stack.txt +18 -0
- package/tsconfig.json +14 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Enforce shadcn/ui v4 component patterns, semantic tokens, and composition rules
|
|
3
|
+
paths:
|
|
4
|
+
- '**/*.tsx'
|
|
5
|
+
- '**/*.jsx'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# shadcn/ui standards
|
|
9
|
+
|
|
10
|
+
## Source files
|
|
11
|
+
|
|
12
|
+
- Do not edit component files installed by the shadcn CLI. Treat them as vendored.
|
|
13
|
+
- Check `components.json` for the install path.
|
|
14
|
+
- Extend behavior via wrapper components over modifying installed files.
|
|
15
|
+
|
|
16
|
+
## Component authoring
|
|
17
|
+
|
|
18
|
+
- Use `React.ComponentProps<typeof Primitive>` over `React.forwardRef`.
|
|
19
|
+
- Add `data-slot="component-name"` to every primitive root for Tailwind targeting.
|
|
20
|
+
|
|
21
|
+
## Tokens and styling
|
|
22
|
+
|
|
23
|
+
- Use semantic color tokens (`bg-background`, `text-foreground`, `border-border`) over hardcoded colors.
|
|
24
|
+
- Use `cn()` from `@/lib/utils` for all className merging and conditional classes.
|
|
25
|
+
- Do not override shadcn component internals with arbitrary classes.
|
|
26
|
+
- Extend via `className` prop only.
|
|
27
|
+
|
|
28
|
+
## Composition
|
|
29
|
+
|
|
30
|
+
- Compose shadcn primitives as documented.
|
|
31
|
+
- Do not destructure or restructure internal component trees.
|
|
32
|
+
- Use `asChild` prop with `<Slot>` for polymorphic rendering.
|
|
33
|
+
- Do not wrap primitives in extra DOM elements.
|
|
34
|
+
- Use `sonner` for toasts over the deprecated `toast` component.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Enforce strict TypeScript type safety and patterns
|
|
3
|
+
paths:
|
|
4
|
+
- '**/*.ts'
|
|
5
|
+
- '**/*.tsx'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# TypeScript standards
|
|
9
|
+
|
|
10
|
+
## Casing conventions
|
|
11
|
+
|
|
12
|
+
- Use `kebab-case` for filenames and directories.
|
|
13
|
+
- Use `camelCase` for variables, functions, and methods.
|
|
14
|
+
- Use `PascalCase` for types, interfaces, classes, and components.
|
|
15
|
+
- Use `UPPER_SNAKE_CASE` for constants and environment variables.
|
|
16
|
+
|
|
17
|
+
## Type declarations
|
|
18
|
+
|
|
19
|
+
- Enforce explicit types or strict inference.
|
|
20
|
+
- Use `unknown` over `any`.
|
|
21
|
+
- Use `interface` for object shapes and component props.
|
|
22
|
+
- Use `type` for unions, intersections, and utility types.
|
|
23
|
+
- Do not prefix interfaces with `I`.
|
|
24
|
+
- Use constant objects or union types instead of `enum`.
|
|
25
|
+
|
|
26
|
+
## Type safety
|
|
27
|
+
|
|
28
|
+
- Use type guards and narrowing over type assertions.
|
|
29
|
+
- Use discriminated unions for error handling over throwing exceptions.
|
|
30
|
+
- Use built-in utility types (`Partial`, `Pick`, `Omit`) over manual type manipulation.
|
|
31
|
+
- Prefer `readonly` properties for data objects.
|
|
32
|
+
- Do not use non-null assertions.
|
|
33
|
+
- Use `Promise.all()` for independent async operations.
|
|
34
|
+
|
|
35
|
+
## Imports and configuration
|
|
36
|
+
|
|
37
|
+
- Use absolute imports mapping `@/` to `src/`.
|
|
38
|
+
- Import from the module's source file directly over barrel `index` re-exports.
|
|
39
|
+
- Use `import type` for type-only imports.
|
|
40
|
+
- Enable `strict: true` in tsconfig.json with no exceptions.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Enforce strict Python type hints, casing, and import patterns
|
|
3
|
+
paths:
|
|
4
|
+
- '**/*.py'
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Python standards
|
|
8
|
+
|
|
9
|
+
## Casing conventions
|
|
10
|
+
|
|
11
|
+
- Use `snake_case` for modules, functions, variables, and methods.
|
|
12
|
+
- Use `PascalCase` for classes, type aliases, `TypeVar`, and `ParamSpec`.
|
|
13
|
+
- Use `UPPER_SNAKE_CASE` for module-level constants and environment variables.
|
|
14
|
+
- Use `_leading_underscore` for module-private names. Reserve `__dunder__` for the standard protocol.
|
|
15
|
+
|
|
16
|
+
## Type hints
|
|
17
|
+
|
|
18
|
+
- Annotate all public functions, methods, and class attributes.
|
|
19
|
+
- Use `X | None` over `Optional[X]` and `X | Y` over `Union[X, Y]`.
|
|
20
|
+
- Use built-in generics (`list[str]`, `dict[str, int]`) over `typing.List` and `typing.Dict`.
|
|
21
|
+
- Avoid `from __future__ import annotations` in modules that pydantic, FastAPI, or other libraries introspect at runtime.
|
|
22
|
+
- Use `typing.Protocol` for structural typing over abstract base classes for interfaces.
|
|
23
|
+
- Do not use `Any`. Reach for `object` or `typing.cast` at boundaries instead.
|
|
24
|
+
|
|
25
|
+
## Errors
|
|
26
|
+
|
|
27
|
+
- Raise specific built-in exceptions over bare `Exception`.
|
|
28
|
+
- Define a project-rooted exception hierarchy for domain errors.
|
|
29
|
+
- Catch the narrowest exception class. Never use bare `except:`.
|
|
30
|
+
- Re-raise with `raise ... from err` to preserve the cause chain.
|
|
31
|
+
|
|
32
|
+
## Data shapes
|
|
33
|
+
|
|
34
|
+
- Use `dataclasses.dataclass(frozen=True, slots=True)` for internal value objects.
|
|
35
|
+
- Use `enum.Enum` or `enum.StrEnum` for closed sets over module-level constants.
|
|
36
|
+
- Prefer `pathlib.Path` over `os.path` for filesystem paths.
|
|
37
|
+
|
|
38
|
+
## Imports and modules
|
|
39
|
+
|
|
40
|
+
- Use absolute imports rooted at the package. Do not use parent-relative (`from ..pkg`) imports.
|
|
41
|
+
- Do not alias imports to shorten internal names. Ecosystem conventions (`numpy as np`, `pandas as pd`) are exceptions.
|
|
42
|
+
- Do not place executable code at module scope. Guard with `if __name__ == "__main__":`.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Enforce Vitest, Playwright, and Testing Library patterns for TypeScript test files
|
|
3
|
+
paths:
|
|
4
|
+
- '**/*.test.ts'
|
|
5
|
+
- '**/*.test.tsx'
|
|
6
|
+
- '**/*.spec.ts'
|
|
7
|
+
- '**/*.spec.tsx'
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# TypeScript/JavaScript testing tooling
|
|
11
|
+
|
|
12
|
+
## Unit and integration
|
|
13
|
+
|
|
14
|
+
- Use Vitest for unit and integration tests.
|
|
15
|
+
- Co-locate unit tests with their respective components.
|
|
16
|
+
- Use `userEvent` over synthetic events for interaction simulation.
|
|
17
|
+
- Use MSW for network mocking. Do not mock fetch or axios manually.
|
|
18
|
+
- Select elements by accessibility attributes first (`getByRole`, `getByLabelText`).
|
|
19
|
+
|
|
20
|
+
## End-to-end
|
|
21
|
+
|
|
22
|
+
- Use Playwright for end-to-end tests.
|
|
23
|
+
- Place all Playwright tests within the `e2e/` directory.
|
|
24
|
+
- Never place Playwright tests inside `src/`.
|
|
25
|
+
|
|
26
|
+
## Timers and async
|
|
27
|
+
|
|
28
|
+
- Never use `vi.useFakeTimers()` in `beforeEach` when tests use `waitFor`, `act`, or `userEvent`.
|
|
29
|
+
- Scope fake timers to the individual test that needs them.
|
|
30
|
+
- Restore real timers with `vi.useRealTimers()` in a matching `afterEach`.
|
|
31
|
+
|
|
32
|
+
## Conventions
|
|
33
|
+
|
|
34
|
+
- Use `.test.ts` / `.test.tsx` for unit tests.
|
|
35
|
+
- Use `.spec.ts` / `.spec.tsx` for integration tests.
|
|
36
|
+
- Do not make real network calls in unit tests.
|
|
37
|
+
- `describe()` labels use the exact identifier of the subject under test in its natural casing.
|
|
38
|
+
- `it()` descriptions use "should" + sentence case.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Enforce zod schema validation and type inference
|
|
3
|
+
paths:
|
|
4
|
+
- '**/*.ts'
|
|
5
|
+
- '**/*.tsx'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Zod validation standards
|
|
9
|
+
|
|
10
|
+
## Type inference
|
|
11
|
+
|
|
12
|
+
- Use `z.infer<typeof Schema>` to generate TypeScript types (Single Source of Truth).
|
|
13
|
+
- Do not manually declare interfaces that duplicate Zod schemas.
|
|
14
|
+
- Do not export the runtime Schema if only the inferred Type is required by consumers.
|
|
15
|
+
|
|
16
|
+
## Boundary validation
|
|
17
|
+
|
|
18
|
+
- Use `.strict()` for untrusted external API boundaries to prevent data pollution.
|
|
19
|
+
- Use `.parse()` for blocking validation (env vars) and `.safeParse()` for recoverable flows (forms).
|
|
20
|
+
- Restrict `z.coerce` to I/O boundaries (e.g., URL params). Never use it for internal data flow.
|
|
21
|
+
|
|
22
|
+
## Schema safety
|
|
23
|
+
|
|
24
|
+
- Use `z.unknown()` for truly ambiguous inputs instead of `z.any()`.
|
|
25
|
+
- Prefer `.strict()` at boundaries or explicit `.pick()`/`.omit()` over `.passthrough()`.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Enforce tanstack query data fetching and cache patterns
|
|
3
|
+
paths:
|
|
4
|
+
- '**/*.ts'
|
|
5
|
+
- '**/*.tsx'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# TanStack Query standards
|
|
9
|
+
|
|
10
|
+
## Query conventions
|
|
11
|
+
|
|
12
|
+
- Define query keys as `readonly` tuple constants.
|
|
13
|
+
- Co-locate query keys with their query functions.
|
|
14
|
+
- Encapsulate each query in a custom `use*Query` hook over calling `useQuery` inline in components.
|
|
15
|
+
- Set explicit `staleTime` per query based on data volatility over relying on the default.
|
|
16
|
+
|
|
17
|
+
## Mutations
|
|
18
|
+
|
|
19
|
+
- Use `useMutation` for all write operations.
|
|
20
|
+
- Never mutate data outside the mutation lifecycle.
|
|
21
|
+
- Invalidate related query keys in `onSuccess` over manual cache updates unless optimistic UI is required.
|
|
22
|
+
- Handle `onError` at the mutation site with user-facing feedback.
|
|
23
|
+
|
|
24
|
+
## Cache management
|
|
25
|
+
|
|
26
|
+
- Use `queryClient.invalidateQueries` over `queryClient.setQueryData` unless implementing optimistic updates.
|
|
27
|
+
- Prefetch predictable navigations with `queryClient.prefetchQuery` at route boundaries.
|
|
28
|
+
|
|
29
|
+
## Separation of concerns
|
|
30
|
+
|
|
31
|
+
- Keep query functions as pure async data fetchers with no UI logic or side effects.
|
|
32
|
+
- Use the query `enabled` option for conditional fetching over `useEffect`.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Enforce pytest fixtures, parametrize, and async patterns for Python tests
|
|
3
|
+
paths:
|
|
4
|
+
- 'tests/**/*.py'
|
|
5
|
+
- '**/test_*.py'
|
|
6
|
+
- '**/*_test.py'
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Python testing tooling
|
|
10
|
+
|
|
11
|
+
## Framework
|
|
12
|
+
|
|
13
|
+
- Use `pytest` for all tests. Do not use `unittest.TestCase`.
|
|
14
|
+
- Place tests under `tests/`, mirroring the `src/` package layout.
|
|
15
|
+
- Name files `test_*.py` and test functions `test_*`.
|
|
16
|
+
|
|
17
|
+
## Fixtures
|
|
18
|
+
|
|
19
|
+
- Use `@pytest.fixture` over setup and teardown methods.
|
|
20
|
+
- Place shared fixtures in `conftest.py` at the narrowest scope that needs them.
|
|
21
|
+
- Set `scope=` (`"session"`, `"module"`, `"function"`) explicitly when reuse matters.
|
|
22
|
+
- Use `tmp_path` and `monkeypatch` over hand-rolled temp directories or env stashes.
|
|
23
|
+
|
|
24
|
+
## Parametrize
|
|
25
|
+
|
|
26
|
+
- Use `@pytest.mark.parametrize` for table-driven cases over per-case test functions.
|
|
27
|
+
- Use `ids=` to label parametrized cases when their repr is unclear.
|
|
28
|
+
|
|
29
|
+
## Async
|
|
30
|
+
|
|
31
|
+
- Mark async tests with `@pytest.mark.asyncio` or configure `asyncio_mode = "auto"`.
|
|
32
|
+
- Do not start a fresh event loop inside tests.
|
|
33
|
+
|
|
34
|
+
## Assertions and mocks
|
|
35
|
+
|
|
36
|
+
- Use plain `assert` over `self.assertEqual`. Pytest rewrites assertions for readable diffs.
|
|
37
|
+
- Use `pytest.raises(...)` over `try/except` for expected exceptions.
|
|
38
|
+
- Use `monkeypatch.setattr` or `unittest.mock.patch` over ad hoc module rewrites.
|
|
39
|
+
- Do not make real network calls. Use `responses`, `httpx_mock`, or fakes.
|
|
40
|
+
|
|
41
|
+
## Conventions
|
|
42
|
+
|
|
43
|
+
- Arrange, act, assert per test, with one logical assertion group.
|
|
44
|
+
- Use descriptive `test_*` names that read as the assertion. Do not prefix with `should_`.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Enforce pydantic v2 patterns for validation and serialization
|
|
3
|
+
paths:
|
|
4
|
+
- '**/*.py'
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Pydantic standards
|
|
8
|
+
|
|
9
|
+
## Models
|
|
10
|
+
|
|
11
|
+
- Use `pydantic.BaseModel` over `dataclass` at I/O and API boundaries.
|
|
12
|
+
- Use `model_config = ConfigDict(...)` over the legacy nested `Config` class.
|
|
13
|
+
- Set `extra="forbid"` on models receiving external input to prevent data pollution.
|
|
14
|
+
- Use `Field(...)` for defaults, descriptions, and constraints over docstring conventions.
|
|
15
|
+
|
|
16
|
+
## Validation
|
|
17
|
+
|
|
18
|
+
- Use `Model.model_validate(data)` over `Model(**data)` for untrusted dict input.
|
|
19
|
+
- Use `Model.model_validate_json(s)` over `json.loads` followed by validation.
|
|
20
|
+
- Use `@field_validator` over the legacy `@validator`.
|
|
21
|
+
- Use `@model_validator(mode="after")` for cross-field invariants.
|
|
22
|
+
|
|
23
|
+
## Types
|
|
24
|
+
|
|
25
|
+
- Use `AnyUrl`, `EmailStr`, `SecretStr`, and `PositiveInt` over hand-rolled regex constraints.
|
|
26
|
+
- Use `Annotated[T, Field(...)]` over default-value `Field(...)` for reusable constrained types.
|
|
27
|
+
- Do not use `Any` in fields. Reach for `JsonValue` or a `Union` of concrete types.
|
|
28
|
+
|
|
29
|
+
## Settings
|
|
30
|
+
|
|
31
|
+
- Use `pydantic_settings.BaseSettings` for env-driven configuration.
|
|
32
|
+
- Load environment through a single `Settings` model. Do not read `os.environ` directly elsewhere.
|
|
33
|
+
|
|
34
|
+
## Serialization
|
|
35
|
+
|
|
36
|
+
- Use `model.model_dump(mode="json")` over the legacy `.dict()`.
|
|
37
|
+
- Use `model.model_dump_json()` over `json.dumps(model.dict())`.
|
|
38
|
+
- Use `by_alias=True` when serializing to external schemas with non-Python field names.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Enforce web frontend security and XSS prevention
|
|
3
|
+
paths:
|
|
4
|
+
- '**/*.tsx'
|
|
5
|
+
- '**/*.jsx'
|
|
6
|
+
- '**/*.html'
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Web security standards
|
|
10
|
+
|
|
11
|
+
## Link safety
|
|
12
|
+
|
|
13
|
+
- Add `rel="noopener noreferrer"` to all external links with `target="_blank"`.
|
|
14
|
+
|
|
15
|
+
## Content sanitization
|
|
16
|
+
|
|
17
|
+
- Sanitize all user-generated content rendered via `dangerouslySetInnerHTML` using DOMPurify or equivalent.
|
|
18
|
+
- Never use `dangerouslySetInnerHTML` without sanitization.
|
|
19
|
+
|
|
20
|
+
## Input validation
|
|
21
|
+
|
|
22
|
+
- Validate all URL parameters and query strings using schema validation before use.
|
|
23
|
+
|
|
24
|
+
## Storage and tokens
|
|
25
|
+
|
|
26
|
+
- Do not store sensitive data (tokens, passwords, PII) in `localStorage` or `sessionStorage`.
|
|
27
|
+
- Store authentication tokens in httpOnly cookies over exposing them to JavaScript.
|
|
28
|
+
|
|
29
|
+
## Third-party scripts
|
|
30
|
+
|
|
31
|
+
- Audit and pin versions for all third-party scripts loaded in the browser.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Enforce UI copy and text standards for rendered strings in React components
|
|
3
|
+
paths:
|
|
4
|
+
- '**/*.tsx'
|
|
5
|
+
- '**/*.jsx'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# UI copy standards
|
|
9
|
+
|
|
10
|
+
## Casing
|
|
11
|
+
|
|
12
|
+
- Use sentence case for all rendered UI text: headings, labels, nav items, tab titles, and dialog titles.
|
|
13
|
+
- Retain original casing for proper nouns and product names: `GitHub`, `macOS`, `TypeScript`.
|
|
14
|
+
|
|
15
|
+
## Punctuation
|
|
16
|
+
|
|
17
|
+
- Do not use em dashes (`—`). Use a comma or period, or restructure the sentence.
|
|
18
|
+
- Do not add punctuation to button labels or short action strings.
|
|
19
|
+
|
|
20
|
+
## Button copy
|
|
21
|
+
|
|
22
|
+
- Use imperative verbs for actions: `Save`, `Delete`, `Connect`, `Cancel`.
|
|
23
|
+
- Avoid padded phrasing: `Save` over `Save changes`, `Delete` over `Click to delete`.
|
|
24
|
+
|
|
25
|
+
## Error messages
|
|
26
|
+
|
|
27
|
+
- State what to do, not what went wrong: `Enter a valid email` over `Email is invalid`.
|
|
28
|
+
- Keep messages short and actionable.
|
|
29
|
+
- One sentence maximum.
|
|
30
|
+
|
|
31
|
+
## Placeholder text
|
|
32
|
+
|
|
33
|
+
- Show format examples over instructions: `name@example.com` over `Enter your email here`.
|
|
34
|
+
- Reserve instructions for labels or helper text below the input.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Keyboard interaction, focus management, and ARIA accessibility for React UI
|
|
3
|
+
paths:
|
|
4
|
+
- '**/*.tsx'
|
|
5
|
+
- '**/*.jsx'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Accessibility and keyboard standards
|
|
9
|
+
|
|
10
|
+
## Focus styles
|
|
11
|
+
|
|
12
|
+
- All interactive elements must use the project focus ring. Do not define per-component focus styles.
|
|
13
|
+
- Never apply `outline-none` without a custom focus ring in the same rule.
|
|
14
|
+
- Focus ring must have 3:1 contrast against its background in both light and dark modes.
|
|
15
|
+
|
|
16
|
+
## Keyboard interaction model
|
|
17
|
+
|
|
18
|
+
- Tab / Shift+Tab: move focus sequentially through interactive elements in DOM order.
|
|
19
|
+
- Enter: activates buttons and links, submits forms.
|
|
20
|
+
- Space: activates buttons and checkboxes, toggles selection in listboxes.
|
|
21
|
+
- Arrow keys: navigate within composite widgets. Do not let them exit the widget.
|
|
22
|
+
- Escape: closes any overlay, popover, dialog, or dropdown. Cancels in-progress edits.
|
|
23
|
+
- Do not introduce non-standard key bindings for common actions.
|
|
24
|
+
|
|
25
|
+
## Composite widgets
|
|
26
|
+
|
|
27
|
+
- Roving tabindex for interactive collections: one item in the tab sequence at a time.
|
|
28
|
+
- Combobox: arrow keys navigate options, Enter selects, Escape closes, typing filters.
|
|
29
|
+
|
|
30
|
+
## Focus management
|
|
31
|
+
|
|
32
|
+
- Move focus into any overlay, popover, or dialog on open. Return focus to the trigger on close.
|
|
33
|
+
- Never move focus on hover. Only on keyboard input or explicit pointer activation.
|
|
34
|
+
|
|
35
|
+
## ARIA semantics
|
|
36
|
+
|
|
37
|
+
- Use semantic HTML over custom elements: `<button>` over `<div onClick>`, `<a>` over `<span onClick>`.
|
|
38
|
+
- A `<div>` with `onClick` requires `role`, `tabIndex="0"`, and keyboard handlers. Use `<button>` instead.
|
|
39
|
+
- Set role on custom controls: `role="combobox"`, `role="listbox"`, `role="menu"`, `role="option"`.
|
|
40
|
+
- Synchronize state attributes with visual state: `aria-expanded`, `aria-selected`, `aria-checked`, `aria-disabled`.
|
|
41
|
+
- Add `aria-label` or `aria-labelledby` to interactive elements with no visible text label.
|
|
42
|
+
- Always provide `alt` on `<img>`. Use `alt=""` for decorative images.
|
|
43
|
+
- Describe the content or function of the image, not its appearance. Do not prefix with "Image of" or "Photo of".
|
|
44
|
+
- Alt text for functional images (icons, buttons) should describe the action, not the graphic.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Form validation timing, save-blocking, and derived state for React forms
|
|
3
|
+
paths:
|
|
4
|
+
- '**/*.tsx'
|
|
5
|
+
- '**/*.jsx'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Form standards
|
|
9
|
+
|
|
10
|
+
## Validation timing
|
|
11
|
+
|
|
12
|
+
- Validate on blur, not on every keystroke. Exception: realtime feedback that is explicitly part of the feature (e.g. character count, live search).
|
|
13
|
+
- After a field shows its first error (on blur), re-validate on every change so the error clears as soon as the input becomes valid.
|
|
14
|
+
- Apply the same validation timing to all fields in a form. Do not mix blur-only and change-only validation within one form.
|
|
15
|
+
- Do not show an error on a field the user has never touched.
|
|
16
|
+
|
|
17
|
+
## Save blocking
|
|
18
|
+
|
|
19
|
+
- Block save when any required field is empty, invalid, or has never been touched.
|
|
20
|
+
- Treat whitespace-only values as empty for required fields.
|
|
21
|
+
|
|
22
|
+
## Error placement
|
|
23
|
+
|
|
24
|
+
- Show the error directly under the field that caused it, not under an unrelated field.
|
|
25
|
+
- When a change to field A causes a conflict involving field B, show the error under field A (the field the user just edited), not under field B.
|
|
26
|
+
|
|
27
|
+
## Input sanitization
|
|
28
|
+
|
|
29
|
+
- Trim leading and trailing whitespace from text inputs on blur or submit, not on every keystroke.
|
|
30
|
+
- If a field is case-sensitive, surface that constraint near the field. Do not silently treat `Foo` and `foo` as different values without warning.
|
|
31
|
+
|
|
32
|
+
## Derived display state
|
|
33
|
+
|
|
34
|
+
- Reset status indicators, counts, and derived display values when their source input changes.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: UX completeness checklist for interactive React components and views
|
|
3
|
+
paths:
|
|
4
|
+
- '**/*.tsx'
|
|
5
|
+
- '**/*.jsx'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# UX completeness standards
|
|
9
|
+
|
|
10
|
+
## Mutation feedback
|
|
11
|
+
|
|
12
|
+
- Every user-initiated mutation (save, delete, sync, import, export) must show inline feedback on success.
|
|
13
|
+
- Feedback must be transient: auto-dismiss after 2-3 seconds without requiring user action.
|
|
14
|
+
- Show inline error feedback when a mutation fails. Do not fail silently.
|
|
15
|
+
|
|
16
|
+
## Empty states
|
|
17
|
+
|
|
18
|
+
- Every list, table, or collection view must handle the empty state explicitly.
|
|
19
|
+
- Empty states must include a next action: a button, link, or instruction that tells the user what to do.
|
|
20
|
+
- Distinguish between "nothing exists yet" (onboarding) and "nothing matches your filter" (recovery). Use different copy for each.
|
|
21
|
+
- Filter-driven empty states must include a way to clear the filter (link or button).
|
|
22
|
+
|
|
23
|
+
## Loading states
|
|
24
|
+
|
|
25
|
+
- Every async operation visible to the user must show a loading indicator (spinner, skeleton, or disabled state).
|
|
26
|
+
- Do not show stale content while new content is loading. Either show a loading state or keep the previous content with a progress indicator.
|
|
27
|
+
|
|
28
|
+
## Destructive actions
|
|
29
|
+
|
|
30
|
+
- Destructive actions (delete, disconnect, discard) must require confirmation before executing.
|
|
31
|
+
- Confirmation UI must be dismissible via Escape in addition to a cancel button.
|
|
32
|
+
|
|
33
|
+
## Inline confirmations
|
|
34
|
+
|
|
35
|
+
- All inline confirmation rows (delete, discard, cancel) must be dismissible via Escape.
|
|
36
|
+
- Confirmation labels and destructive buttons must have sufficient contrast in both light and dark modes.
|
|
37
|
+
|
|
38
|
+
## Status indicators
|
|
39
|
+
|
|
40
|
+
- Status indicators (dots, badges, connection status) must reset to a neutral state when their source input changes.
|
|
41
|
+
- Do not show optimistic status (green dot, "connected") while unsaved edits are pending.
|
|
42
|
+
|
|
43
|
+
## State transitions
|
|
44
|
+
|
|
45
|
+
- Do not flash intermediate states during transitions (e.g., white flash on theme load, layout jump before data arrives).
|
|
46
|
+
- Use CSS transitions or deferred rendering to prevent visible flicker between states.
|
|
47
|
+
|
|
48
|
+
## Interactive element states
|
|
49
|
+
|
|
50
|
+
- All interactive elements must visually respond to hover, active, focus, and disabled states.
|
|
51
|
+
- Disabled elements must use reduced opacity or muted colors and `cursor: not-allowed`.
|
|
52
|
+
- Do not rely on a single state (e.g., focus only) to communicate interactivity.
|
|
53
|
+
|
|
54
|
+
## Overflow and truncation
|
|
55
|
+
|
|
56
|
+
- Long text in constrained containers must truncate with ellipsis, not overflow or wrap unexpectedly.
|
|
57
|
+
- Truncated text must be accessible via `title` attribute or expandable interaction.
|
|
58
|
+
|
|
59
|
+
## Scroll and clipping
|
|
60
|
+
|
|
61
|
+
- Focus rings and interactive borders must not be clipped by parent `overflow: hidden` or `overflow: auto` containers.
|
|
62
|
+
- Add padding or adjust overflow to prevent clipping on edge items in scrollable lists.
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
extends = ""
|
|
2
|
+
rules = ["000-constitution", "010-testing", "020-concurrency", "030-error-handling", "040-performance", "050-logging", "060-naming", "070-planning", "080-config-comments", "500-prose", "510-context", "520-wireframes", "530-requirements", "540-architecture", "550-design", "555-tasks", "560-diagrams", "570-skill", "580-readme", "590-rule-authoring"]
|
package/package.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@erclx/aitk",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.8.0",
|
|
5
|
+
"description": "Infrastructure and quality tooling for developer workflows",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"bin": {
|
|
8
|
+
"aitk": "./src/cli.ts"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"src",
|
|
12
|
+
"scripts",
|
|
13
|
+
"standards",
|
|
14
|
+
"snippets",
|
|
15
|
+
"governance",
|
|
16
|
+
"tooling",
|
|
17
|
+
"claude",
|
|
18
|
+
"docs",
|
|
19
|
+
"tsconfig.json",
|
|
20
|
+
"!scripts/sandbox",
|
|
21
|
+
"!scripts/eval",
|
|
22
|
+
"!**/*.test.ts"
|
|
23
|
+
],
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"check:spell": "cspell '**' '.*/**' '.*' --no-progress --color --show-context",
|
|
29
|
+
"format": "prettier --write --log-level warn --ignore-path .gitignore --ignore-path .prettierignore . && shfmt --write --indent 2 scripts/ tooling/",
|
|
30
|
+
"check:format": "prettier --check --log-level warn --ignore-path .gitignore --ignore-path .prettierignore . && shfmt --diff --indent 2 scripts/ tooling/",
|
|
31
|
+
"check:shell": "find scripts tooling .claude/hooks -name '*.sh' -exec shellcheck --severity=warning {} +",
|
|
32
|
+
"check:types": "tsc --noEmit",
|
|
33
|
+
"check:install": "./scripts/core/install-check.sh",
|
|
34
|
+
"test": "bun --bun vitest run",
|
|
35
|
+
"prepare": "husky",
|
|
36
|
+
"check": "./scripts/core/verify.sh",
|
|
37
|
+
"check:ci": "VERIFY_WRITE=false ./scripts/core/verify.sh --all",
|
|
38
|
+
"update": "./scripts/core/update.sh",
|
|
39
|
+
"clean": "./scripts/core/clean.sh",
|
|
40
|
+
"snapshot": "./scripts/core/snapshot.sh",
|
|
41
|
+
"bootstrap": "./scripts/core/bootstrap.sh",
|
|
42
|
+
"aitk:sandbox": "aitk sandbox",
|
|
43
|
+
"aitk:sandbox:reset": "aitk sandbox reset"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"commander": "^13.1.0",
|
|
47
|
+
"execa": "^9.5.2",
|
|
48
|
+
"pptxgenjs": "^4.0.1"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@astrojs/check": "^0.9.8",
|
|
52
|
+
"@astrojs/react": "^5.0.4",
|
|
53
|
+
"@commitlint/cli": "^20.4.1",
|
|
54
|
+
"@commitlint/config-conventional": "^20.4.1",
|
|
55
|
+
"@playwright/test": "^1.59.1",
|
|
56
|
+
"@tailwindcss/vite": "^4.2.4",
|
|
57
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
58
|
+
"@types/bun": "^1.2.10",
|
|
59
|
+
"astro": "^6.1.9",
|
|
60
|
+
"cspell": "^8.17.1",
|
|
61
|
+
"husky": "^9.1.7",
|
|
62
|
+
"prettier": "^3.8.1",
|
|
63
|
+
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
64
|
+
"typescript": "^5.9.3",
|
|
65
|
+
"vitest": "^4.1.5"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
if [ -z "${GITHUB_ORG:-}" ]; then
|
|
4
|
+
_origin_url="$(git config --get remote.origin.url 2>/dev/null || true)"
|
|
5
|
+
if [ -n "$_origin_url" ]; then
|
|
6
|
+
GITHUB_ORG="$(echo "$_origin_url" | sed -nE 's#^(git@github\.com:|https://github\.com/)([^/]+)/.+#\2#p')"
|
|
7
|
+
fi
|
|
8
|
+
unset _origin_url
|
|
9
|
+
fi
|
|
10
|
+
|
|
11
|
+
export GITHUB_ORG="${GITHUB_ORG:-}"
|