AGENT SKILL

new-feature

Scaffold a new feature package the canonical way and wire it into the app. This is the ONLY correct way to start a feature (ARCHITECTURE.md §5, §10.2 "one way to do a thing").

License 许可
MIT
所属仓库
AfanasievN/appkeel
最近更新
2026-07-16
Stars
★ 0
Forks
0

01 前言 Front Matter

name
new-feature
description
Scaffold a new feature package the canonical way and wire it into the app. This is the ONLY correct way to start a feature (ARCHITECTURE.md §5, §10.2 "one way to do a thing").

03 SKILL.md 正文

New feature

pnpm new-feature <kebab-name>     # e.g. pnpm new-feature order-history
pnpm install                      # link the new workspace package

The generator prints the exact two lines to register the route in apps/app/src/router.tsx (import + the replacement routeTree line). Apply them.

Then, per the Definition of Done (ARCHITECTURE.md §5):

  1. Spec docs/specs/FEAT-xxxx-<name>.md exists; update the feature's CLAUDE.md with the real id.
  2. Screen contract use<Pascal>Screen implements the spec; tests cover its acceptance criteria (Given/When/Then → test names).
  3. Server state via generated query hooks only; errors as values (Result, §7.2); no if (platform).
  4. UI uses @app/ui components; new DS components need stories (§8.1).
  5. pnpm verify green; visually verify the screen (skill: screenshot-verify).

Structure produced (never hand-roll or copy-paste a feature):

packages/features/<name>/
├── package.json / tsconfig.json / vitest.config.ts / CLAUDE.md
└── src/ index.ts (public entry) · routes.tsx · screens/<Pascal>Screen.tsx
    · screens/use<Pascal>Screen.ts · __tests__/

Features may import other features ONLY via their package entry (@app/feature-*), never deep paths — the boundaries linter enforces this.

04 同仓库更多 Skills