add-feature
Add a sub-feature within an existing Shell extension
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Add a sub-feature within an existing Shell extension
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Scaffold a REST API endpoint with hexagonal layers and integration tests
Scaffold a React component with Vitest tests (TDD-first)
Scaffold a new Shell extension with hexagonal layers and TDD
Add a sub-feature within an existing Shell extension
Scaffold a SQL migration with RLS policy, rollback plan, and test seed data
Scaffold a Tauri IPC command with full round-trip (Rust handler, TS types, React hook, tests)
| name | add-feature |
| description | Add a sub-feature within an existing Shell extension |
| user_invocable | true |
Add a sub-feature within an existing Shell extension, placing code in the correct hexagonal layer with test-driven development.
Ask the user (or extract from $ARGUMENTS) for:
| Field | Required | Description |
|---|---|---|
| parent extension | yes | Existing extension under src/features/<name>/ |
| feature name | yes | Name for the sub-feature (e.g., createPersonaForm) |
| layers needed | yes | Which layers: domain, application, adapters, ui |
Verify the parent extension exists by checking src/features/<parent>/.
Route the feature to the correct hexagonal layer:
| What you are building | Layer | Path |
|---|---|---|
| Pure types, interfaces, business rules | domain/ | src/features/<parent>/domain/ |
| Hooks, Zustand stores, orchestration | application/ | src/features/<parent>/application/ |
| API clients, Tauri invoke wrappers | adapters/ | src/features/<parent>/adapters/ |
| React components, forms, views | ui/ | src/features/<parent>/ui/ |
Dependency rules (inward only):
ui/ may import from application/ only (never domain/ or adapters/ directly)application/ may import from domain/adapters/ may import from domain/domain/ may not import from any other layerCreate the test file in the appropriate layer:
| Layer | Test file pattern |
|---|---|
| domain | src/features/<parent>/domain/<feature>.test.ts |
| application | src/features/<parent>/application/<feature>.test.ts |
| adapters | src/features/<parent>/adapters/<feature>.test.ts |
| ui | src/features/<parent>/ui/<Feature>.test.tsx |
The test must:
Create the implementation file in the correct layer:
| Layer | File pattern |
|---|---|
| domain | src/features/<parent>/domain/<feature>.ts |
| application | src/features/<parent>/application/<feature>.ts |
| adapters | src/features/<parent>/adapters/<feature>.ts |
| ui | src/features/<parent>/ui/<Feature>.tsx |
Implementation rules:
use prefix--grove-* tokens only, no raw CSS valuesIf the feature needs to be registered with the Shell (new route, command, panel):
src/features/<parent>/extension.tsx to register the contributionpnpm check # TypeScript + ESLint — must pass
pnpm test # All tests — must pass
Before marking complete, verify:
pnpm test)--grove-* design tokens onlypnpm check passessrc/features/shared/application/ — never in domain/--grove-* design tokens, never raw CSS values