Instruction file imported from mako10k/workspace-template (
.github/instructions/node-cli.instructions.md). Copyright stays with the author.
Apply this instruction only after the Node CLI pack has been selected.
In this template repository, stack instructions are on-demand baselines rather than always-on auto-applied rules. After narrowing a real workspace, keep the selected instruction file and add repo-specific applyTo globs only if automatic loading is still desired.
Defaults
- Prefer TypeScript unless the user explicitly wants plain JavaScript.
- Prefer
npmand Node 24 LTS as the initial assumption unless compatibility requires something else. - For focused CLIs on modern Node, prefer direct
.tsexecution when erasable syntax is enough; add a build step only when packaging, distribution, or non-erasable syntax requires it. - Keep CLI entry points under
bin/orsrc/cli/. - Separate user-facing command parsing from domain logic.
- Prefer one explicit invocation style over mixed aliases unless compatibility requires both.
Common shapes in this user's repositories
- single CLI package
- CLI plus MCP or LSP server
- CLI plus VS Code extension or other secondary surface
Start with the CLI boundary first and add the secondary surfaces only when they are explicit requirements.
Validation
- Validate the smallest command that exercises the changed path.
- When a CLI has subcommands, add at least one smoke path per major command family.
- When TypeScript is used, default to
typecheckas a separate check instead of hiding it inside build.