capsule AI-native Unix-like composition layer

capsule.yaml

1,888 bytes · 60 lines · capsule://quake0day/[email protected] raw on github

apiVersion: capsule.dev/v0.1
kind: Capsule
name: f4c-dev-tooling
version: 0.1.0
type: subsystem
purpose:
  summary: 'Provides consistent code style and quality checks using ESLint and Prettier,
    integrated with Husky pre-commit hooks to enforce standards before commits.

    '
  owns:
  - ESLint configuration for code quality
  - Prettier configuration for code formatting
  - Husky pre-commit hooks to automate checks
  does_not_own:
  - Application code
  - Build or deployment logic
  - IDE-specific configurations
interfaces:
  provides:
  - kind: cli
    name: lint
    description: Command to run ESLint checks.
  - kind: cli
    name: format
    description: Command to run Prettier formatting.
  requires:
  - kind: library
    name: eslint
    description: ESLint package for code linting.
  - kind: library
    name: prettier
    description: Prettier package for code formatting.
  - kind: library
    name: husky
    description: Husky package for Git hooks.
agent:
  summary_for_ai: 'This capsule defines the development tooling for code quality.
    Agents should ensure linting and formatting rules are consistent, up-to-date,
    and correctly applied via pre-commit hooks. Focus on maintaining a clean and readable
    codebase.

    '
  avoid:
  - Introducing application-specific logic into linting/formatting rules.
  - Modifying core Git behavior beyond pre-commit checks.
verification:
  invariants:
  - All committed code must pass ESLint checks with zero warnings.
  - All committed code must conform to Prettier formatting rules.
x-reuse:
  notes: 'The `.husky/pre-commit` script assumes the `app` directory as the working
    directory, which might need adjustment. ESLint and Prettier configurations are
    fairly generic but might need minor adjustments for different project setups or
    team preferences.

    '
x-reconstruct:
  install: install.json