agentleFS
buildpad-aibuildpad-ai/skills/create-feature/SKILL.md

create-feature

Skill1 starsChanged 4 months agoMITView on GitHub

Plan and implement a complete feature using spec-driven development. Analyzes requirements, designs data model, selects Buildpad components, and produces spec artifacts (requirements.md, design.md, tasks.md) with a testing strategy. Use when the user wants to add a new feature, module, or capability to an existing DaaS project.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every feature gets spec artifacts in .kiro/specs/<feature-name>/ before implementation.

    line 15
  2. Very specific:

    When the design includes a list page, you MUST use CollectionList with the full-featured pattern.

    line 68
  3. Very specific:

    Do NOT create custom tables with Mantine <Table> or raw HTML for collection records.

    line 69
  4. Distinctive:

    When the design includes a form page, you MUST follow the VForm controlled component pattern.

    line 96
  5. Very specific:

    Consider CollectionForm as an all-in-one alternative to VForm for CRUD pages

    line 104
  6. Distinctive:

    When implementing a new context/provider that fetches from DaaS:

    line 110
  7. Very specific:

    After generating ANY .tsx files for this feature, run the Buildpad-First violation check:

    line 155

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Create Feature

Plan and coordinate implementation of a complete feature using spec-driven development (see the spec-driven-development skill).

BEFORE generating ANY .tsx files (pages, components, forms, lists), you MUST read_file the Buildpad component reference at .github/skills/buildpad-reference/SKILL.md. This loads the full 40+ component catalog with import paths and usage patterns. Skipping this step leads to raw Mantine usage violations.

Spec Workflow

Every feature gets spec artifacts in .kiro/specs/<feature-name>/ before implementation. In Kiro, use native specs; in other IDEs, run /buildpad-spec-init → /buildpad-spec-requirements → /buildpad-spec-design → /buildpad-spec-tasks → /buildpad-impl. The DaaS-specific planning below feeds those artifacts:

StageFocusArtifact
RequirementsProblem, users, acceptance criteria (EARS)requirements.md
DesignData model, API, UI, Buildpad componentsdesign.md
TasksOrdered, verifiable tasks with teststasks.md
ImplementTask-by-task with reviewWorking code

Planning Process

  1. Understand Requirements — What problem does this solve? Who are the users?
  2. Check Built-In DaaS Features — Before designing anything, review the Built-in DaaS features reference. If DaaS provides it natively (audit trail, workflow, versioning, file management, cron, RBAC, scoping, import/export), use it — do NOT rebuild it.
  3. Design Data Model — Collections, fields, types, relationships, permissions. For every collection, follow the Standard Fields decision tree: always include audit fields, add workflow fields if approval/lifecycle needed, add scope field if multi-tenancy needed.
  4. Plan API Endpoints — CRUD routes with request/response formats
  5. Design UI — Pages, components, user flows
  6. Select Components (Buildpad-First MANDATORY) — Check Buildpad's 40+ components before creating custom
  7. Plan Implementation — Numbered tasks with estimates
  8. Plan Testing — API tests, page tests, component tests, E2E tests

Feature Planning Checklist

For each collection in the feature, answer these questions during the design stage:

  • Audit fields included? → ALWAYS yes (Group A: user_created, date_created, user_updated, date_updated)
  • Needs workflow/approval? → Add Group B fields + plan create-workflow skill invocation
  • Needs multi-tenancy? → Add Group C field + plan manage-scope skill invocation
  • Needs versioning? → Plan DaaS versioning API integration (NOT custom version tables)
  • Needs scheduled tasks? → Plan DaaS cron jobs (NOT Next.js cron routes)
  • Needs capability/role gating? → Plan Module-Level Access Keys (grant-module-access skill): register key in daas_module_access_keys, grant on policy module_access JSONB, check in React with usePermissions().hasModuleAccess(key). NEVER check role names directly — this applies to every button, section, page, or nav item that is conditionally shown/hidden based on role.
  • Needs audit/change tracking? → Already built-in via GET /api/activity (do NOT build custom)

Buildpad Component Selection

NeedBuildpad Component
Text inputInput, Textarea
Rich textRichTextHtml, RichTextMarkdown
Select/dropdownSelectDropdown, SelectRadio
Multi-selectSelectMultipleDropdown, Tags
ToggleToggle, Boolean
Date/timeDateTime
File uploadFileInterface, FileImage, Files
RelationsListM2O, ListM2M, ListO2M, ListM2A
Dynamic formVForm, CollectionForm
Listing recordsCollectionList (with search, filter, pagination, permissions)
Filtering recordsFilterPanel (field-type-aware, DaaS-compatible JSON output)
Aggregate/statsDaaS aggregate API (aggregate[count]=id&groupBy=status)

Custom components allowed ONLY for: app-specific layouts, dashboards, specialized visualizations.

CollectionList Usage (MANDATORY for list pages)

When the design includes a list page, you MUST use CollectionList with the full-featured pattern. Do NOT create custom tables with Mantine <Table> or raw HTML for collection records.

import { CollectionList } from "@/components/ui";

<CollectionList
  collection="articles"
  enableSearch
  enableFilter // Integrated FilterPanel with badge count
  enableSelection // Row selection with bulk actions
  enableCreate // Permission-gated create button
  enableDelete // Built-in delete with confirmation modal
  enableSort
  enableResize
  enableReorder
  enableHeaderMenu
  limit={25}
  onCreate={() => router.push("/content/articles/+")}
  onItemClick={(item) => router.push(`/content/articles/${item.id}`)}
/>;

Key features: integrated search + FilterPanel toggle with badge, permission-gated create/bulk actions, pagination (25/50/100/250), field-type-aware cell rendering, column management.

VForm Usage (CRITICAL)

When the design includes a form page, you MUST follow the VForm controlled component pattern. See VForm usage reference for the required pattern.

Key rules:

  • VForm has NO onSubmit prop — pass modelValue + onUpdate for controlled state
  • VForm renders a <div>, NOT a <form> — do NOT use type="submit" or form="vform"
  • Handle submission externally via onClick on a Button
  • Consider CollectionForm as an all-in-one alternative to VForm for CRUD pages

Scope-Aware Context Pattern (REQUIRED when feature has tenant-scoped data)

Bug 26: Any React context or component that calls DaaS on mount AND lives inside ScopeProvider must wait for the scope to be ready before fetching. Firing the request before the daas_resource_uri cookie is set results in a 401. The .catch() handler will have set state to false/empty, and the effect will NOT re-run unless scopeLoading is in the dependency array.

When implementing a new context/provider that fetches from DaaS:

import { useScope } from '@/lib/contexts/ScopeContext';

const { resourceUri, isLoading: scopeLoading } = useScope();

useEffect(() => {
  if (scopeLoading) return; // ← REQUIRED guard — do not remove

  apiRequest('/api/...')
    .then(...)
    .catch(...);

  // Re-fetch when tenant changes (policies/data may differ per scope)
}, [version, resourceUri, scopeLoading]);
//             ^^^^^^^^^^  ^^^^^^^^^^^  ← REQUIRED deps

Output Format

Provide a structured plan with:

  • Overview and requirements
  • Data model design
  • API design
  • UI design with Buildpad components
  • Capability matrix (required for role-gated features):
    • module key (domain:capability)
    • granted policies
    • UI guard points (hasModuleAccess)
    • API guard points (policy module_access OR-merge)
  • Implementation tasks in tasks.md, ordered by dependency layer
  • Testing strategy per layer
  • Time estimates

Testing Strategy (per layer)

  • Schema: API tests for all endpoints
  • UI: Page tests for all pages
  • Logic: Integration tests for business rules
  • Hardening: E2E tests for user flows

Post-Generation Validation (MANDATORY)

After generating ANY .tsx files for this feature, run the Buildpad-First violation check:

# Scan generated files for forbidden raw Mantine form/input imports
grep -rn "from '@mantine/form'\|from '@mantine/dates'\|from '@mantine/dropzone'\|<TextInput\|<NumberInput\|<Select \|<Switch \|<Checkbox \|<DatePicker\|<Dropzone" app/ components/ 2>/dev/null

If any matches are found, replace them with Buildpad equivalents before proceeding.

Then run module-access anti-pattern checks (UI + API):

grep -rn "role === \|roleName\|user\.role\|is_manager\|is_admin\|isManager\b\|currentUser\.role" app/ components/ 2>/dev/null
grep -rn "detectAdminFromMe\|checkAdmin\|roleObj\.name === 'Administrator'\|admin_access\s*===\s*true\|\bisAdmin\b" app/ components/ 2>/dev/null

Any match used for capability gating must be replaced with Module-Level Access Keys checks.

Quick fix reference:

ViolationReplace With
<TextInput> / <Textarea>Input / Textarea from @/components/ui
<Select>SelectDropdown from @/components/ui
<DatePicker>DateTime from @/components/ui
<Switch> / <Checkbox>Toggle / Boolean / SelectMultipleCheckbox
<Dropzone>Upload / Files from @/components/ui
useForm (@mantine/form)VForm or CollectionForm from @/components/ui
Custom <Table> for recordsCollectionList from @/components/ui

For capability gating rules, load and follow:

  • ../grant-module-access/SKILL.md
  • ../../references/module-access-checklist.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.