Full-Stack Feature Orchestration (Meta-Skill)
Coordinate the entire lifecycle of a feature — from understanding who it's for, through design, implementation, testing, and documentation. This meta-skill routes to the right skill, command, or agent at each stage and enforces stage gates so nothing ships half-baked.
Installation
OpenClaw / Moltbot / Clawbot
CODEBLOCK0
When to Use
- - Building a new feature end-to-end — you need the full pipeline from research to production
- Frontend + backend work together — the feature spans UI, API, and data layers
- User research should inform implementation — you want personas and specs before writing code
- Coordinating multiple skills — you're unsure which skill or command to invoke at each step
- Onboarding a new feature area — you need a structured approach, not ad hoc implementation
- Teaching a junior developer — walk through the complete feature development process
Orchestration Flow
Every feature moves through eight stages. Small features skip stages (see Complexity Assessment below); large features complete all of them.
CODEBLOCK1
Stage Details
Stage 1 — Persona Research
Understand who the feature is for before designing anything. Define the target user, their goals, pain points, and the journey this feature supports.
Invoke: /create-persona command → ai/commands/docs/create-persona.md
Skill: persona-docs → INLINECODE3
Output: Persona document describing the target user, their context, and success criteria for this feature.
Stage 2 — Feature Specification
Translate persona insights into a concrete feature spec — scope, acceptance criteria, edge cases, and technical constraints.
Invoke: feature-specification skill → INLINECODE5
Output: Feature spec with user stories, acceptance criteria, out-of-scope items, and technical notes.
Stage 3 — UX/UI Design
Design the interface informed by the persona and spec. Choose the right visual style, layout, and interaction patterns.
Output: Component hierarchy, layout decisions, style selections, and responsive behavior plan.
Stage 4 — API Design
Define the contract between frontend and backend. Design endpoints, request/response shapes, error codes, and authentication requirements.
Command: /create-api-route → INLINECODE7
Output: API contract (OpenAPI spec or typed route definitions) with validation rules and error handling.
Stage 5 — Frontend Implementation
Build the UI components, pages, and client-side logic. Use the appropriate framework skill for the project's stack.
Command: /create-component → INLINECODE9
Output: Working UI components wired to the API contract, with loading/error states and responsive layout.
Stage 6 — Backend Implementation
Build the API routes, business logic, data access layer, and background jobs.
Command: /new-feature → INLINECODE11
Output: Implemented API routes, data models, migrations, and business logic passing unit tests.
Stage 7 — Testing
Validate the feature across unit, integration, and end-to-end layers. Verify acceptance criteria from Stage 2.
Command: /test-feature → INLINECODE13
Output: Passing test suite covering happy paths, edge cases, and error scenarios from the spec.
Stage 8 — Documentation
Generate user-facing docs, API references, and internal technical documentation.
Command: /generate-docs → INLINECODE15
Output: Updated README, API docs, component storybook entries, and changelog.
Skill Routing Table
| Stage | Primary Skill | Command | Agent |
|---|
| 1. Persona Research | INLINECODE16 | INLINECODE17 | — |
| 2. Feature Spec |
feature-specification | — | — |
| 3. UX/UI Design | UI/UX skill | — | — |
| 4. API Design |
api-design-principles |
/create-api-route |
ai/agents/api/ |
| 5. Frontend | Framework skill (Next.js, React, etc.) |
/create-component | — |
| 6. Backend |
api-development,
database-migration-patterns |
/new-feature |
ai/agents/migration/ |
| 7. Testing |
testing-workflow,
e2e-testing-patterns |
/test-feature |
ai/agents/testing/ |
| 8. Documentation | — |
/generate-docs | — |
Stage Gate Checks
Each stage must pass its gate before proceeding. Gates prevent wasted work by catching gaps early.
| Gate | Required Before | Criteria | Blocking? |
|---|
| Persona defined | Stage 2 | Target user identified with goals and pain points | Yes |
| Spec approved |
Stage 3 | Acceptance criteria written, scope defined, edge cases listed | Yes |
| Design reviewed | Stage 4 | Component hierarchy defined, responsive plan in place | Yes |
| API contract locked | Stage 5 + 6 | Endpoints defined, request/response types agreed, error codes set | Yes |
| Frontend renders | Stage 6 | UI components display with mock data, loading/error states work | No (parallel OK) |
| Backend passes tests | Stage 7 | All API routes return expected responses, validations enforced | Yes |
| Tests pass | Stage 8 | Unit + integration + E2E tests green, acceptance criteria verified | Yes |
| Docs complete | Deploy | API documented, user-facing docs updated, changelog entry added | Yes |
Vertical Slice Strategy
Start with the thinnest possible end-to-end slice, then widen.
Phase 1 — Thin Slice
Build one happy path through all layers: a single user action from UI click to database write and back. This proves the architecture works and gives stakeholders something to demo.
CODEBLOCK2
Phase 2 — Widen
Add validation, error handling, edge cases, and secondary flows. Each addition follows the same vertical path — never build an entire layer in isolation.
Phase 3 — Polish
Loading states, optimistic updates, animations, accessibility, performance optimization, and comprehensive error messages.
Complexity Assessment
Not every feature needs all eight stages. Use this table to determine which stages to include.
| Feature Size | Examples | Stages to Include | Estimated Time |
|---|
| Trivial | Rename a label, fix copy, adjust spacing | 5 only | < 1 hour |
| Small |
Add a filter, new form field, simple toggle | 4 → 5 → 6 → 7 | 2-4 hours |
|
Medium | New CRUD entity, dashboard widget, search feature | 2 → 3 → 4 → 5 → 6 → 7 | 1-3 days |
|
Large | New user-facing feature area, multi-page flow | All 8 stages | 1-2 weeks |
|
Epic | New product vertical, major redesign, platform migration | All 8 + ADR + phased rollout | 2-6 weeks |
How to Assess Complexity
- 1. Count the layers touched — UI only (trivial), UI + API (small), UI + API + DB (medium+)
- Count the user flows — one path (small), 2-3 paths (medium), many paths with branching (large)
- Check for unknowns — known patterns (smaller), new integrations or unfamiliar tech (bump up one size)
- Consider blast radius — isolated change (smaller), cross-cutting concern (bump up one size)
Coordination Patterns
Frontend and Backend in Parallel
Once the API contract is locked (Stage 4 gate), frontend and backend can proceed simultaneously:
- - Frontend uses mock data matching the API contract types
- Backend implements against the same contract with unit tests
- Integration happens when both sides are ready — contract guarantees compatibility
Handoff Points
Use the /handoff-and-resume command when:
- - Switching between frontend and backend work
- Pausing mid-feature and resuming later
- Passing work to another developer or agent
Progress Tracking
Use the /progress command to check which stage you're in and what remains.
NEVER Do
- 1. NEVER skip persona research for user-facing features — building without understanding the user leads to features nobody wants
- NEVER start coding before the API contract is defined — frontend and backend will diverge, causing costly rework at integration
- NEVER build an entire layer before connecting it end-to-end — always use vertical slices to prove the architecture first
- NEVER skip stage gates to move faster — gates exist to catch problems when they're cheap to fix, not after they've compounded
- NEVER treat testing as a separate phase you can cut — tests are part of implementation, not an afterthought bolted on at the end
- NEVER ship without documentation — undocumented features become maintenance burdens that slow down every future change
全栈功能编排(元技能)
协调功能的完整生命周期——从理解目标用户,到设计、实现、测试和文档编写。这项元技能在每个阶段路由到正确的技能、命令或智能体,并强制执行阶段关卡,确保没有任何半成品交付。
安装
OpenClaw / Moltbot / Clawbot
bash
npx clawhub@latest install full-stack-feature
使用时机
- - 端到端构建新功能——你需要从调研到上线的完整流程
- 前端+后端协同工作——功能跨越UI、API和数据层
- 用户调研应指导实现——在编写代码前需要用户画像和规格说明
- 协调多个技能——你不确定每一步该调用哪个技能或命令
- 接手新的功能领域——你需要结构化方法,而非临时实现
- 指导初级开发者——完整走一遍功能开发流程
编排流程
每个功能经历八个阶段。小型功能会跳过部分阶段(见下方复杂度评估),大型功能则完成全部阶段。
1. 用户画像调研
↓
2. 功能规格说明
↓
3. UX/UI设计
↓
4. API设计
↓
5. 前端实现
↓
6. 后端实现
↓
7. 测试
↓
8. 文档编写
阶段详情
阶段1 — 用户画像调研
在设计任何内容之前,先理解功能的目标用户。定义目标用户、他们的目标、痛点和该功能支持的用户旅程。
调用: /create-persona 命令 → ai/commands/docs/create-persona.md
技能: persona-docs → ai/skills/writing/persona-docs/SKILL.md
输出: 描述目标用户、用户上下文以及该功能成功标准的用户画像文档。
阶段2 — 功能规格说明
将用户画像洞察转化为具体的功能规格——范围、验收标准、边界情况和技术约束。
调用: feature-specification 技能 → ai/skills/meta/feature-specification/SKILL.md
输出: 包含用户故事、验收标准、范围外事项和技术说明的功能规格文档。
阶段3 — UX/UI设计
根据用户画像和规格说明设计界面。选择合适的视觉风格、布局和交互模式。
输出: 组件层级结构、布局决策、样式选择和响应式行为方案。
阶段4 — API设计
定义前端和后端之间的契约。设计端点、请求/响应结构、错误码和认证要求。
命令: /create-api-route → ai/commands/development/create-api-route.md
输出: 包含验证规则和错误处理的API契约(OpenAPI规范或类型化路由定义)。
阶段5 — 前端实现
构建UI组件、页面和客户端逻辑。根据项目技术栈使用相应的框架技能。
命令: /create-component → ai/commands/development/create-component.md
输出: 连接到API契约的可工作UI组件,包含加载/错误状态和响应式布局。
阶段6 — 后端实现
构建API路由、业务逻辑、数据访问层和后台任务。
命令: /new-feature → ai/commands/development/new-feature.md
输出: 已实现的API路由、数据模型、数据库迁移和通过单元测试的业务逻辑。
阶段7 — 测试
在单元测试、集成测试和端到端测试层面验证功能。验证阶段2中的验收标准。
命令: /test-feature → ai/commands/development/test-feature.md
输出: 覆盖规格说明中正常路径、边界情况和错误场景的通过测试套件。
阶段8 — 文档编写
生成面向用户的文档、API参考和内部技术文档。
命令: /generate-docs → ai/commands/documentation/generate-docs.md
输出: 更新后的README、API文档、组件Storybook条目和变更日志。
技能路由表
| 阶段 | 主要技能 | 命令 | 智能体 |
|---|
| 1. 用户画像调研 | persona-docs | /create-persona | — |
| 2. 功能规格说明 |
feature-specification | — | — |
| 3. UX/UI设计 | UI/UX技能 | — | — |
| 4. API设计 | api-design-principles | /create-api-route | ai/agents/api/ |
| 5. 前端 | 框架技能(Next.js、React等) | /create-component | — |
| 6. 后端 | api-development、database-migration-patterns | /new-feature | ai/agents/migration/ |
| 7. 测试 | testing-workflow、e2e-testing-patterns | /test-feature | ai/agents/testing/ |
| 8. 文档编写 | — | /generate-docs | — |
阶段关卡检查
每个阶段在进入下一阶段前必须通过其关卡。关卡通过及早发现缺口来防止浪费工作。
| 关卡 | 前置要求 | 标准 | 是否阻塞? |
|---|
| 用户画像已定义 | 阶段2 | 已识别目标用户及其目标和痛点 | 是 |
| 规格说明已批准 |
阶段3 | 验收标准已编写、范围已定义、边界情况已列出 | 是 |
| 设计已评审 | 阶段4 | 组件层级结构已定义、响应式方案已就位 | 是 |
| API契约已锁定 | 阶段5+6 | 端点已定义、请求/响应类型已达成一致、错误码已设置 | 是 |
| 前端可渲染 | 阶段6 | UI组件使用模拟数据显示、加载/错误状态正常工作 | 否(可并行) |
| 后端通过测试 | 阶段7 | 所有API路由返回预期响应、验证已强制执行 | 是 |
| 测试通过 | 阶段8 | 单元+集成+端到端测试通过、验收标准已验证 | 是 |
| 文档完成 | 部署 | API已文档化、面向用户的文档已更新、变更日志条目已添加 | 是 |
垂直切片策略
从最薄的端到端切片开始,然后逐步扩展。
阶段1 — 薄切片
构建一个贯穿所有层的正常路径:从UI点击到数据库写入再返回的单一用户操作。这证明了架构的有效性,并为利益相关者提供了可演示的内容。
示例:用户可以创建新项目
UI: 包含名称字段和提交按钮的一个表单
API: POST /api/projects { name: string }
数据库: INSERT INTO projects (name) VALUES ($1)
测试: 端到端测试:填写表单 → 提交 → 在列表中看到项目
阶段2 — 扩展
添加验证、错误处理、边界情况和次要流程。每次添加都遵循相同的垂直路径——绝不孤立地构建整个层。
阶段3 — 打磨
加载状态、乐观更新、动画、无障碍、性能优化和全面的错误消息。
复杂度评估
并非每个功能都需要全部八个阶段。使用此表确定应包含哪些阶段。
| 功能规模 | 示例 | 应包含的阶段 | 预估时间 |
|---|
| 微小 | 重命名标签、修改文案、调整间距 | 仅阶段5 | < 1小时 |
| 小型 |
添加筛选器、新表单字段、简单开关 | 4 → 5 → 6 → 7 | 2-4小时 |
|
中型 | 新增CRUD实体、仪表盘组件、搜索功能 | 2 → 3 → 4 → 5 → 6 → 7 | 1-3天 |
|
大型 | 新的面向用户功能区域、多页面流程 | 全部8个阶段 | 1-2周 |
|
史诗级 | 新产品线、重大改版、平台迁移 | 全部8个阶段+架构决策记录+分阶段上线 | 2-6周 |
如何评估复杂度
- 1. 统计涉及的层级 — 仅UI(微小)、UI+API(小型)、UI+API+数据库(中型以上)
- 统计用户流程 — 单一路径(小型)、2-3条路径(中型)、多条带分支路径(大型)
- 检查未知因素 — 已知模式(较小)、新集成或不熟悉的技术(提升一个级别)
- 考虑影响范围 — 孤立变更(较小)、横切关注点(提升一个级别)
协调模式
前后端并行开发
一旦API契约锁定(阶段4关卡),前端和后端可以同时进行:
- - 前端 使用匹配API契约类型的模拟数据
- 后端 针对同一契约进行实现并编写单元测试
- 集成 在双方都准备好时进行——契约保证兼容性
###