Skip to content

Conformance Tasks

Xtarterize applies conformance configuration through discrete, independently applicable tasks. Each task detects whether it’s needed and only applies changes if necessary.

classDiagram
    class Task {
        +string id
        +string label
        +string group
        +applicable(profile) boolean
        +check(cwd, profile) TaskStatus
        +dryRun(cwd, profile) FileDiff[]
        +apply(cwd, profile) void
    }
    class TaskStatus {
        <<enumeration>>
        new
        patch
        skip
        conflict
    }
    class FileDiff {
        +string filepath
        +string before
        +string after
    }
    class ProjectProfile {
        +Framework framework
        +Bundler bundler
        +PackageManager packageManager
        +boolean typescript
        +boolean monorepo
        +boolean hasGitHub
    }
    Task --> TaskStatus
    Task --> FileDiff
    Task --> ProjectProfile
  • Directorypackages/tasks/src/
    • Directoryagent/
      • agents-md.ts
      • skills.ts
    • Directoryci/
      • auto-update.ts
      • ci.ts
      • release.ts
    • Directorycodegen/
      • plop.ts
    • Directorydeps/
      • renovate.ts
    • Directoryeditor/
      • vscode.ts
      • vscode-extensions.ts
    • Directorylint/
      • biome.ts
      • ultracite.ts
    • Directorymonorepo/
      • turbo.ts
    • Directoryquality/
      • knip.ts
    • Directoryrelease/
      • cat-version.ts
      • commitlint.ts
      • czg.ts
    • Directoryscripts/
      • package-scripts.ts
    • Directoryts/
      • incremental.ts
    • Directoryvite/
      • checker.ts
      • visualizer.ts
Task IDDescriptionApplicable When
lint/biomeInstall Biome, write biome.jsonAlways (TS/JS projects)
lint/ultraciteApply Ultracite’s opinionated Biome config layerWhen Biome is configured
Task IDDescriptionApplicable When
ts/incrementalPatch tsconfig.json with incremental: true and tsBuildInfoFileTypeScript detected
Task IDDescriptionApplicable When
vite/checkerInject vite-plugin-checker into vite.config.ts via ASTBundler is Vite
vite/visualizerInject rollup-plugin-visualizer into vite.config.ts via ASTBundler is Vite
Task IDDescriptionApplicable When
ci/releaseWrite .github/workflows/release.yml — triggers on tag pushGitHub detected
ci/auto-updateWrite .github/workflows/auto-update.yml — weekly dependency updatesGitHub detected
ci/ciWrite .github/workflows/ci.yml — lint, typecheck, test on PRGitHub detected
Task IDDescriptionApplicable When
deps/renovateWrite renovate.json with opinionated automerge configAlways
Task IDDescriptionApplicable When
release/commitlintInstall commitlint, write commitlint.config.tsGit detected
release/czgInstall czg, add commit script to package.jsonAlways
release/cat-versionInstall commit-and-tag-version, write .versionrcAlways
Task IDDescriptionApplicable When
quality/knipInstall knip, write knip.json with framework-aware entry pointsTypeScript detected
Task IDDescriptionApplicable When
codegen/plopInstall plop, write plopfile.ts with framework-specific generatorsAlways
Task IDDescriptionApplicable When
monorepo/turboInstall turbo, write turbo.json with build/lint/test pipelineMonorepo detected
Task IDDescriptionApplicable When
editor/vscodeWrite/merge .vscode/settings.json with Biome formatterAlways
editor/vscode-extensionsWrite/merge .vscode/extensions.json with recommended extensionsAlways
Task IDDescriptionApplicable When
agent/agents-mdWrite AGENTS.md with framework-specific AI agent instructionsAlways
agent/skillsScaffold .agents/skills/ directory with project contextTypeScript detected
Task IDDescriptionApplicable When
scripts/package-scriptsPatch package.json scripts with lint, format, typecheck, etc.Always

Each task implements:

  • check() — Returns new, patch, skip, or conflict based on current state
  • dryRun() — Returns exact diffs without writing anything
  • apply() — Writes changes, backing up files first

Tasks implement the Task interface from @xtarterize/core:

interface Task {
id: string
label: string
group: string
applicable: (profile: ProjectProfile) => boolean
check: (cwd: string, profile: ProjectProfile) => Promise<TaskStatus>
dryRun: (cwd: string, profile: ProjectProfile) => Promise<FileDiff[]>
apply: (cwd: string, profile: ProjectProfile) => Promise<void>
}

To add a new task, create a file in packages/tasks/src/ and register it in packages/tasks/src/index.ts.

Learn about the architecture →