add-feature

Add new features to Syncpack including commands and validation logic. Use when implementing new CLI commands, adding InstanceState variants, or extending version group behaviour.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "add-feature" with this command: npx skills add jamiemason/syncpack/jamiemason-syncpack-add-feature

Add Feature

Guide for adding new functionality to Syncpack.

Quick Decision

What are you adding?

Prerequisites

Before adding any feature:

  1. Understand the 3-phase pattern: Create Context → Inspect Context → Run Command
  2. Know which phase your feature affects
  3. Check if similar code exists (use ast-grep -p 'PATTERN' src/)

Feature Types

Commands

Commands are user-facing operations (syncpack lint, syncpack fix, etc.).

When to create a new command:

  • New user-facing operation that doesn't fit existing commands
  • Different output format or behaviour needed

Registration points (all three required):

  1. src/cli.rs - Add to Subcommand enum
  2. src/main.rs - Add match arm for dispatch
  3. src/commands/*.rs - Implement pub fn run(ctx: Context) -> i32

→ Full guide: adding-command.md

Instance States

InstanceState variants describe validation results (valid, fixable, unfixable, suspect).

When to add a new state:

  • New validation rule needed
  • New type of error/warning to report
  • New auto-fix capability

Location: src/instance_state.rs + src/visit_packages/*.rs

→ Full guide: adding-instance-state.md

Common Workflow

  1. Write failing test using TestBuilder
  2. Implement minimal code to pass
  3. Run cargo clippy and fix warnings
  4. Refactor if needed
  5. Update documentation

Checklist

Before submitting:

  • Tests pass (just test)
  • Zero clippy warnings
  • Follows existing patterns
  • Registered in all required places (for commands)
  • Uses TDD approach

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

write-code

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

search-code

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

document-code

No summary provided by upstream source.

Repository SourceNeeds Review