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
Directory packages/tasks/src/
Directory agent/
Directory ci/
auto-update.ts ci.ts release.tsDirectory codegen/
Directory deps/
Directory editor/
vscode.ts vscode-extensions.tsDirectory lint/
Directory monorepo/
Directory quality/
Directory release/
cat-version.ts commitlint.ts czg.tsDirectory scripts/
Directory ts/
Directory vite/
Task ID Description Applicable When lint/biomeInstall Biome, write biome.json Always (TS/JS projects) lint/ultraciteApply Ultracite’s opinionated Biome config layer When Biome is configured
Task ID Description Applicable When ts/incrementalPatch tsconfig.json with incremental: true and tsBuildInfoFile TypeScript detected
Task ID Description Applicable When vite/checkerInject vite-plugin-checker into vite.config.ts via AST Bundler is Vite vite/visualizerInject rollup-plugin-visualizer into vite.config.ts via AST Bundler is Vite
Task ID Description Applicable When ci/releaseWrite .github/workflows/release.yml — triggers on tag push GitHub detected ci/auto-updateWrite .github/workflows/auto-update.yml — weekly dependency updates GitHub detected ci/ciWrite .github/workflows/ci.yml — lint, typecheck, test on PR GitHub detected
Task ID Description Applicable When deps/renovateWrite renovate.json with opinionated automerge config Always
Task ID Description Applicable When release/commitlintInstall commitlint, write commitlint.config.ts Git detected release/czgInstall czg, add commit script to package.json Always release/cat-versionInstall commit-and-tag-version, write .versionrc Always
Task ID Description Applicable When quality/knipInstall knip, write knip.json with framework-aware entry points TypeScript detected
Task ID Description Applicable When codegen/plopInstall plop, write plopfile.ts with framework-specific generators Always
Task ID Description Applicable When monorepo/turboInstall turbo, write turbo.json with build/lint/test pipeline Monorepo detected
Task ID Description Applicable When editor/vscodeWrite/merge .vscode/settings.json with Biome formatter Always editor/vscode-extensionsWrite/merge .vscode/extensions.json with recommended extensions Always
Task ID Description Applicable When agent/agents-mdWrite AGENTS.md with framework-specific AI agent instructions Always agent/skillsScaffold .agents/skills/ directory with project context TypeScript detected
Task ID Description Applicable 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:
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 →