Develop a feature

From compartmentdev/compartment · View interactive version

Develop a feature is an AI agent skill from the GitHub repository compartmentdev/compartment. Implement repo changes by starting with preflight feature review, then editing the smallest owning surface on one canonical path and running only diff-triggered checks.

How to use this skill

Skill file

Develop a Feature

Use for implementation work in this repo.

Read

Algorithm

  1. If you are creating a branch from main, update local main first, then create the feature branch from that updated main.
  2. Run $preflight-feature-review with the request, intended outcome, known scope, and visible constraints. Let that skill own its review agents. Do not edit before its brief returns.
  3. Treat product behavior as CLI-first. Before adding or changing UI behavior, find the matching CLI command and its existing SDK/API contract. The UI must reuse that existing method, or reuse and extend that same shared method/contract when the feature genuinely needs more data. Do not add a new UI-only API route, browser-only SDK method, or parallel contract for behavior that duplicates a CLI feature.
  4. Resolve blockers from the brief first. Then implement only in the returned owner, boundary, and canonical path.
  5. When the feature adds or changes permissions, make the default-grant and rollout decision explicit in the same change instead of leaving it implicit.
  6. Change the smallest owning surface. Do not add fallback branches, compatibility glue, silent env defaults, public/internal URL mixing, export drift, or test-only seams.
  7. Update tests in the same diff. Prefer behavior, boundary, integration, or e2e coverage. Delete or rewrite plumbing-mirror tests instead of shaping production code around them.
  8. After implementation, run owning-package pnpm lint, pnpm typecheck, and pnpm test when applicable, plus only the diff-triggered special checks. Do not manually run repo-wide pnpm check, pnpm check:unused, pnpm check:unused:runtime, or pnpm check:ci unless the task explicitly requires them.
  9. Close out with the entry file to read first, checks run, remaining unrun validation, and the user-visible verification flow.
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.