Skip to content
Agentic Feature Design logo

Agentic Feature Design

Designing features for the "Action Era" that are AI-accessible by default

SKILL.md

Full skill instructions

Agentic Feature Design

Features in LivestockAI must now be designed for dual consumption: Humans (UI) and Agents (MCP/​API).

1. The "Headless First" Rule

Every feature must be fully functional via Server Functions before any UI is built.

Test: Can an agent complete the entire user story using only bun run check-feature-x.ts (a script calling server functions)? If yes -> Agent Ready. If no (logic lives in React components) -> Refactor immediately.

2. Agent-Ready Server Functions

Server functions are the tools we give to agents. Document them accordingly.

export const createBatchFn = createServerFn({ method: 'POST' })
  .inputValidator(batchSchema)
  .handler(async ({ data }) => {
    /​* ... */
  })

/​**
 * @description Creates a new livestock batch.
 * @workflow
 * 1. Check `getFarmFacilities` for space.
 * 2. `createBatchFn`
 * 3. Log initial `feed_record` if applicable.
 */

3. The "Intention" Pattern

Agents operate on Intent, not just data. Instead of generic CRUD (updateBatch), expose semantic actions (graduateBatch, quarantineBatch).

// ❌ Generic
updateBatch(id, { status: 'sold' })

// ✅ Semantic (Agent Friendly)
markBatchAsSold(id, { date, price, customer })

Semantic actions allow agents to:

  1. Understand the consequences of the action.
  2. Perform specialized validation (e.g. "Can't sell a quarantined batch").

4. Approval Loops (Human-in-the-Loop)

Agents need a standard way to ask for permission for high-stakes actions (e.g., ordering feed, selling stock).

The ApprovalRequest Entity:

  • agentId: Who is asking?
  • action: JSON payload of the server function to call.
  • summary: Human-readable explanation ("I want to order 50 bags of Starter Feed").
  • status: PENDING | APPROVED | REJECTED

5. Metadata for Context

All major entities (Batches, Sales) should have an ai_metadata JSONB column. Agents use this to store reasoning ("Predicted harvest date change due to low feed intake"). Do not show this raw JSON to users, but use it to power UI "Insights".

Related Skills

  • three-layer-architecture - Where the logic lives
  • feature-structure - How to organize the files

More Sales & marketing skills

revops logo
Sales & marketing

revops

Design and optimize systems connecting marketing, sales, and customer success into a unified revenue engine.

53.3K 104.9K
View
lead-magnets logo
Sales & marketing

lead-magnets

Strategic planning and optimization for email capture offers and gated content.

53.3K 103.4K
View
directory-submissions logo
Sales & marketing

directory-submissions

Directory submissions: the foundation layer of distribution that passes backlinks and discovery surface area into your marketing pages.

53.3K 76.3K
View
gsap-timeline logo
Sales & marketing

gsap-timeline

Sequence and choreograph multi-step animations with precise timing control and nested timelines.

15.9K 58.4K
View
launch-strategy logo
Sales & marketing

launch-strategy

Structured framework for planning product launches, feature announcements, and go-to-market strategies.

53.3K 56.8K
View
gws-drive-upload logo
Sales & marketing

gws-drive-upload

Upload files to Google Drive with automatic MIME type detection and metadata.

31.2K 47.2K
View
ci-cd-and-automation logo
Sales & marketing

ci-cd-and-automation

Automates CI/CD pipeline setup. Use when setting up or modifying build and deployment pipelines. Use when you need to automate quality gates, configure test runners in CI, or establish deployment strategies.

101.4K 43.2K
View
persona-team-lead logo
Sales & marketing

persona-team-lead

Team leadership persona with standup coordination, meeting prep, task delegation, and team communication.

31.2K 29.3K
View
recipe-find-large-files logo
Sales & marketing

recipe-find-large-files

Identify large Google Drive files consuming storage quota.

31.2K 29.2K
View

Sales & marketing AI tools

KreadoAI logo
Sales & marketing

KreadoAI

Revolutionize Video Creation with AI-Generated Avatars and Voices

Paid
View
Followr logo
Sales & marketing

Followr

Social media on autopilot

Paid
View
Logodiffusion logo
Sales & marketing

Logodiffusion

Design custom logos instantly with AI.

Paid
View
I
Sales & marketing

Ideogram

Text-heavy marketing and design images

Freemium
View
Prompt Silo logo
Sales & marketing

Prompt Silo

Boost Your SEO with Content and SEO Silos

Free
View
Marketing Blocks logo
Sales & marketing

Marketing Blocks

Revolutionize Your Marketing with AI-Powered MarketingBlocks!

Paid
View
Scrip AI logo
Sales & marketing

Scrip AI

10X faster & free AI content creation for 100+ use cases

Free
View
T
Sales & marketing

Tribescaler

Tribescaler | Make Your Tweets Go Viral

Paid
View