Skip to content

Latest commit

 

History

History
58 lines (36 loc) · 2.04 KB

File metadata and controls

58 lines (36 loc) · 2.04 KB

Agent Instructions for clones-cli

Intent Layer

Before modifying code in a subdirectory, read its AGENTS.md first to understand local patterns and invariants.

  • Source: src/AGENTS.md - CLI entrypoint, commands, and shared lib modules.

Global Invariants

  • Do not edit dist/ by hand; it is generated by npm run build.
  • Use jj for commits in this repo.

Verification Loop (Required)

Every batch of changes must follow this verification-gated loop. Run gates in order (cheapest to most expensive), stop on first failure, fix, then restart from step 1.

Verification Harness (Required)

For every new piece of software, layer of enablement, utility, routine, or sub-routine, design a verification harness that gives a clear, high-confidence signal that it works correctly and aligns with the intended scope. Treat this harness as scaffolding for intent and focus; do not proceed to subsequent work without establishing it.

Verification Order

Step Command Purpose
1. Format check npm run format:check Prettier formatting compliance
2. Lint npm run lint ESLint static checks
3. Typecheck npm run typecheck TS type safety
4. Test npm run test Unit tests

After All Gates Pass

  1. Build: npm run build
  2. Commit (jj): jj commit -m "<message>"

No shortcuts: Do not skip steps, do not reorder, and do not commit if any gate fails.

Fixing Common Issues

  • Format: npm run format
  • Lint autofix: npm run lint:fix

Step Contract (for multi-file or risky changes)

Before implementing a multi-file change, declare:

Step: <description>

Scope:
  - path/to/file.ts (what changes)
  - path/to/new_file.ts (new file)

Tests:
  - npm run test

Verification: npm run format:check -> npm run lint -> npm run typecheck -> npm run test -> npm run build -> jj commit