| name | bootstrap-mise-oxc-and-ast-grep |
| description | Bootstrap or improve a repository's mise, hk/Pkl, ast-grep, React Doctor, Oxlint, and Oxfmt setup |
| disable-model-invocation | true |
Bootstrap Mise, Oxc, and ast-grep
Build a repo-native toolchain around exactly mise, hk/Pkl, ast-grep, React
Doctor, Oxlint, and Oxfmt. Use the bootstrap branch when the repository lacks
the toolchain; use the reconcile branch when any of it already exists. In
both branches, preserve working commands and improve the smallest coherent
seam.
For this skill, every supported invocation must adopt or reconcile mise and
provide one ordinary-install developer setup task. Every supported Git
repository must also adopt or reconcile hk/Pkl, staged checks, setup-owned hook
installation, and Conventional Commit validation. These are invariants, not
benefit-based applicability choices. A non-Git directory may mark hk/Pkl
inapplicable; a Git repository may not.
Read references/tool-patterns.md before designing
or changing the toolchain. Verify current syntax in official documentation
before introducing a command or option that the repository does not already
exercise, except for the exact locally resolved hk bootstrap fallback described
below.
Non-compensable simplicity contract
Give each capability one authoritative implementation. A missing local
executable is not a reason to omit a checked-in developer setup path when the
repository identifies its package manager and the complete task graph parses.
Nor is unavailable execution a reason to omit a complete checked-in mise,
hk/Pkl, or applicable standalone React Doctor graph whose versions and syntax
are verified by current documentation. In that case, implement the graph and
label the unavailable execution evidence as blocked. This allowance does not
apply to semantic Oxlint/Oxfmt enforcement: follow the deterministic Oxc
migration state machine below. It also does not weaken the React Doctor plugin's
atomic owner-transfer proof.
Do not compensate for missing tools by adding duplicate package scripts,
parallel configs, placeholder rules, or CI-only install semantics to developer
setup. New repository automation that mise can express belongs directly in
mise.toml. Before deleting a conventional root command, classify package
publication metadata, contributor and release documentation, hosting and IDE
contracts, and named downstream interfaces. Retain the root name only for a
package-manager-defined automatic lifecycle, a concretely evidenced public
compatibility surface, or a genuinely external, uneditable caller whose
compatibility cannot be migrated; keep it as a thin root-to-mise wrapper rather
than a second implementation. A checked-in executable caller—including CI,
hooks, and repository scripts—is editable migration scope, not retention
evidence: rewrite it to call the mise task directly. A script's presence,
familiar name, or undocumented convention is not compatibility evidence.
Preserve an orchestrator-selected workspace leaf at that leaf boundary, but do
not use it to justify a duplicate ordinary root task implementation.
Before any completion claim, perform the mechanical duplicate-edge audit in
Tool Patterns.
Enumerate every root package.json script and every resolved mise task command,
then account for every mise-to-root-script edge. Reject every edge from mise to
an ordinary root task script: a lifecycle, public-interface, or external
compatibility entry must delegate into mise, never make mise delegate back into
the root script. This audit is non-compensable: parsed configuration, passing
tasks, compatibility, or a conventional script name cannot substitute for a
complete ledger with zero unexplained edges.
Perform the mechanical caller-rewrite audit in
Tool Patterns
as a separate final hard gate. For every task moved to mise, rewrite every
checked-in executable caller—especially CI—from npm, pnpm, yarn, or bun
root-script invocation to the owning mise task. Retain a root compatibility
entry only for an automatic package-manager lifecycle, a cited public
compatibility surface, or a genuinely external, uneditable caller that cannot
migrate. Checked-in executable callers still migrate, and mise never delegates
back to the wrapper. The final checked-in caller scan must contain zero
package-manager invocations of mise-owned root tasks.
Also perform the independent mechanical developer-setup audit in
Tool Patterns
against the final files. Fully resolve the developer setup task through task
dependencies, task invocations, package-script delegations, and checked-in
helper commands. Require the ordinary install selected by repository
package-manager evidence, and reject npm ci, frozen, immutable,
lockfile-only, or equivalent CI-only install semantics anywhere in that
resolved developer path. A frozen or immutable install may remain only on a
separate route with a searched, established CI caller. Attach the resolved
setup command sequence, package-manager evidence, rejected-token scan, and CI
separation evidence to the report. This audit is non-compensable: an unresolved
delegation or noncompliant install is a hard failure even when setup parses or
other validation passes.
Finally, perform the non-compensable project-isolated runtime audit in
Tool Patterns.
Every executable reached by the resolved developer setup task—including the
selected package manager and the runtime that provides or runs it—must trace to
a versioned declaration in checked-in project mise configuration or an
intentional checked-in project config included from it. Accidental user/global
mise state, a globally working shim, and package-manager manifest metadata
without its runtime pin are not evidence. Before completion, validate mise task
discovery and setup resolution with global configuration disabled, or provide
an equivalent isolated inventory proving the same config provenance for every
executable. An unresolved provider or missing runtime pin is a hard failure.
Optional skill delegation
Check the active skill catalog for $ast-grep. When it is available, use it to
design, debug, and test ast-grep searches and rules for any adopted or improved
ast-grep row. Keep adoption, ownership, command routing, hook/CI integration,
and cross-tool ordering in this skill. If $ast-grep is unavailable, continue
with this skill's ast-grep patterns and current official documentation; do not
hard-code a checkout-specific path or block unrelated tool rows.
Workflow
-
Establish the baseline.
- Read repository guidance, manifests, lockfiles, CI, hooks, nested workspace
guidance, and the dirty state.
- Inventory existing setup, check, fix, hook, and CI commands. Mark each as
read-only or mutating and record reproducible pre-existing failures.
- Resolve every executable in the developer setup graph to its providing
tool/runtime and checked-in project mise declaration. Record intentional
project-config include chains separately from user/global mise state.
- Mechanically enumerate every root manifest script and every resolved mise
task command. Search checked-in non-generated callers, classify each as
editable migration scope, and record any automatic package lifecycle,
public compatibility surface, external/uneditable contract, or
workspace-leaf orchestrator requirement. For each conventional root
command, inspect publication metadata, contributor/release documentation,
hosting/IDE contracts, and named downstream interfaces. Do not treat names
such as
build or test as evidence by themselves.
- Select bootstrap only when no meaningful setup exists; otherwise select
reconcile and treat existing behavior as evidence.
Completion criterion: the branch choice, authorities, dirty files, public
commands, mutation boundaries, baseline failures, and initial command-edge
ledger are explicit.
-
Create this six-row decision matrix before editing:
| Tool | Applicability | Ownership boundary | Version source(s) | Baseline | Decision | Integration seam | Validation |
|---|
| mise | | | | | adopt / improve / retain | | |
| hk/Pkl | | | | | adopt / improve / retain; skip only when non-Git | | |
| ast-grep | | | | | adopt / improve / retain / skip / blocked | | |
| React Doctor | | | | | adopt / improve / retain / skip / blocked | | |
| Oxlint | | | | | adopt / improve / retain / skip / blocked | | |
| Oxfmt | | | | | adopt / improve / retain / skip / blocked | | |
Completion criterion: every cell is resolved from repository evidence, and
every skip or block has a concrete reason. The mise decision is always
, , or . In a Git repository, the hk/Pkl decision is
also always , , or ; environment limitations belong
in Validation and do not change applicability or implementation decisions.
Safety
Keep unrelated changes intact. Prefer narrow samples and changed-file checks.
Do not replace the repository's package manager, run broad format/fix commands,
or commit or push as part of bootstrapping. Treat global shims as availability,
not repository configuration. Keep the skill portable: express every pattern as
generic guidance.