Logo Spec Driven Dev

Spec Driven Dev

Cộng đồng
korchard333
spec-driven-dev

Mô hình phát triển theo đặc tả cho Power Platform. Dùng khi: lập kế hoạch cho dự án phức tạp, viết đặc tả tổng thể, chia nhỏ đặc tả thành phần, xác định thứ tự xây dựng, soạn tài liệu yêu cầu, tài liệu thiết kế và mẫu đặc tả.

Add to TypingMind

Tổng quan

Nhà phát hànhkorchard333
Kho mãclaude-power-platform-community
Tên kỹ năngspec-driven-dev
Sao
50
Bản fork
6
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được korchard333 công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Spec Driven Dev trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/korchard333/claude-power-platform-community/tree/main/.claude/skills/spec-driven-dev
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/korchard333/claude-power-platform-community.git /tmp/claude-power-platform-community
mkdir -p .claude/skills
cp -r /tmp/claude-power-platform-community/.claude/skills/spec-driven-dev .claude/skills/spec-driven-dev
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Spec Driven Dev trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Spec Driven Dev ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Spec Driven Dev với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Skill: Spec-Driven Development

When to Use

Trigger when planning non-trivial Power Platform projects that need structured requirements, component specifications, dependency ordering, and coordinated multi-agent builds. Also trigger when the user mentions "spec", "specification", "master spec", "component spec", "requirements document", or "design document".


Philosophy

Spec before code. Every build has three parts:

  • Spec (what) — the requirement and design document
  • Agent (who) — Laura plans, Sean designs, Scott builds, Razor reviews
  • Skill (how) — the technical knowledge loaded for the task

Without a spec, agents build what they assume. With a spec, agents build what was agreed.


Master Spec Structure

The master specification is the single source of truth for a project. Laura generates it during the planning phase, Sean refines the technical sections.

markdown
# [Project Name] — Master Specification

## 1. Project Overview
- Business problem being solved
- Target users and their roles
- Success criteria (measurable outcomes)
- Constraints (timeline, budget, licensing, compliance)

## 2. Functional Requirements
| ID | Requirement | Priority | Acceptance Criteria |
|----|-------------|----------|---------------------|
| FR-001 | [Requirement description] | Must | Given [context], When [action], Then [outcome] |
| FR-002 | ... | Should | ... |

## 3. Non-Functional Requirements
- Performance targets (page load, query response, concurrent users)
- Accessibility standard (WCAG 2.2 AA minimum)
- Browser/device support matrix
- Data retention and archival policy
- Availability target (uptime SLA)

## 4. Data Model
- Entity Relationship Diagram (Mermaid erDiagram)
- Table descriptions with ownership type and key columns
- Relationship descriptions with cascade behavior
- Option set definitions (with specific values)

## 5. Security Model
- User roles and permission levels
- Row-level security strategy (BU hierarchy, team ownership)
- Column-level security (sensitive fields)
- App-level security (Conditional Access, Managed Environments)

## 6. Integration Points
- External systems and data flow direction
- Authentication method per integration
- Error handling and retry strategy
- Data transformation requirements

## 7. ALM Strategy
- Environment topology (dev/test/UAT/prod)
- Solution segmentation (single vs multi-solution)
- CI/CD pipeline approach
- Deployment approval gates

## 8. Component Inventory
| Component | Type | Agent | Spec File | Dependencies |
|-----------|------|-------|-----------|--------------|
| [Tables + Columns] | Dataverse schema | Scott | spec-tables.md | None |
| [Views + Forms] | Customizations | Scott | spec-views-forms.md | Tables |
| [App Module] | MDA | Scott | spec-app.md | Views, Forms |
| [Flows] | Power Automate | Scott | spec-flows.md | Tables |
| ... | ... | ... | ... | ... |

Component Spec Splitting

The master spec is split into buildable component specs. Each component spec is a self-contained document that Scott can execute without referring back to the master spec.

Standard Component Specs

Spec FileContainsBuilt By
spec-tables.mdTables, columns, relationships, option sets, alternate keysScott (Web API)
spec-views-forms.mdSystem views, main forms, quick view formsScott (Web API)
spec-app.mdApp module, sitemap, navigationScott (Web API)
spec-flows.mdCloud flows, triggers, actions, error handlingScott (Power Automate)
spec-plugins.mdPlugin steps, messages, stages, logicScott (C# + registration)
spec-code-app.mdReact components, hooks, routes, state managementScott (pac code)
spec-pcf.mdPCF control manifest, properties, renderingScott (pac pcf)
spec-security.mdSecurity roles, column security profiles, BU structureScott (Web API)
spec-web-resources.mdForm scripts, ribbon customizations, HTML web resourcesScott (Web API)
spec-integration.mdCustom connectors, Azure Functions, webhooksScott

Component Spec Template

markdown
# Component Spec: [Component Name]

## Overview
[What this component does and why it exists]

## Dependencies
- Requires: [list of components that must exist before this one]
- Required by: [list of components that depend on this one]

## Detailed Requirements

### [Requirement Group 1]
[Specific implementation details — exact column names, data types, values]

### [Requirement Group 2]
[...]

## Acceptance Criteria
- [ ] [Specific, testable criterion]
- [ ] [...]

## Notes
[Edge cases, constraints, decisions made during design]

Dependency Ordering

Build Order (Sequential)

Components must be built in dependency order. The standard order is:

Phase 1: Foundation (sequential, blocking)
  1. Publisher + Solution
  2. Tables (all tables, no columns beyond primary name)
  3. Columns (all columns for all tables)
  4. Relationships (all relationships — tables must exist first)

Phase 2: UI Components (can be parallelized per table)
  5. Views (reference columns — columns must exist)
  6. Forms (reference columns — columns must exist)
  7. Business rules (reference columns)

Phase 3: App Shell (sequential)
  8. App module
  9. Sitemap
  10. PublishAllXml

Phase 4: Independent Components (fully parallel)
  11. Web resources
  12. PCF controls
  13. Plugin assemblies
  14. Power BI reports
  15. Connection references
  16. Environment variables

Phase 5: Dependent Components (after schema + app exist)
  17. Flows (need tables + connection refs)
  18. Security roles (need tables)
  19. Dashboards

Identifying Parallel Work

Ask these questions for each component:

  1. Does it reference a table or column? -> Must wait for schema (Phase 1)
  2. Does it reference a form or view? -> Must wait for UI (Phase 2)
  3. Does it reference the app module? -> Must wait for app shell (Phase 3)
  4. Does it have no schema dependencies? -> Can run in parallel (Phase 4)

Spec-to-Build Handoff

What Laura Passes to Scott

  1. The component spec file (complete, with all details)
  2. The solution unique name and publisher prefix
  3. The environment URL and auth method
  4. Any decisions flagged as "PERMANENT" (table names, column types, ownership)

What Scott Needs Before Starting

  • Component spec is marked as "APPROVED" by Sean
  • All dependency components are built (check dependency list)
  • Solution exists in the target environment
  • Authentication is working (Azure CLI token or service principal)

What Scott Delivers

  • All components created via Web API (with MSCRM.SolutionUniqueName header)
  • PublishXml called for any UI customizations
  • Self-review checklist completed
  • Ready for Razor review

Verification

How Razor Validates Implementation Against Spec

For each component spec, Razor checks:

  1. Completeness — Every item in the spec exists in the environment
  2. Correctness — Column types, relationship cascade configs, view filters match spec
  3. Solution membership — All components are in the correct solution (not Default)
  4. Naming compliance — All logical names follow naming conventions
  5. Security — Roles and column security match the security model
  6. Publishability — All customizations are published and accessible

Verification queries (Web API)

http
# Check all components in solution
GET /api/data/v9.2/solutioncomponents
  ?$filter=_solutionid_value eq [solution-guid]
  &$select=componenttype,objectid

# Check table exists with correct columns
GET /api/data/v9.2/EntityDefinitions(LogicalName='prefix_tablename')
  ?$expand=Attributes($select=LogicalName,AttributeType,RequiredLevel)

# Check views exist
GET /api/data/v9.2/savedqueries
  ?$filter=returnedtypecode eq 'prefix_tablename'
  &$select=name,fetchxml,layoutxml

Anti-Patterns

  • Building without a spec — "Just start coding" leads to rework when requirements were ambiguous
  • Monolithic spec — One giant document that no agent can fully consume. Split into component specs.
  • Spec without acceptance criteria — If you can't test it, you can't verify it
  • Skipping dependency ordering — Creating views before columns exist causes silent failures
  • Not marking permanent decisions — Table names and column types need explicit user confirmation
  • Spec drift — Spec says one thing, implementation does another. Razor catches this.

Executable Master Spec Template

Copy-paste this template to start a new project specification:

markdown
# [Project Name] -- Master Specification

## Project Overview
- **Business problem:** [What pain point does this solve?]
- **Target users:** [Role 1 (X users), Role 2 (Y users)]
- **Success criteria:** [Measurable outcome 1], [Measurable outcome 2]
- **Timeline:** [Target go-live date]
- **Licensing:** [Power Apps Premium / per-app / existing entitlements]

## Stakeholders
| Name | Role | Responsibility | Sign-off authority? |
|---|---|---|---|
| [Name] | Product Owner | Requirements, UAT approval | Yes |
| [Name] | IT Admin | Environment, licensing, DLP | Yes |
| [Name] | End User Rep | Acceptance testing | No |

## Functional Requirements
| ID | User Story | Priority | Acceptance Criteria |
|---|---|---|---|
| FR-001 | As a [role], I want to [action], so that [outcome] | Must | Given [context], When [action], Then [outcome] |
| FR-002 | ... | Should | ... |
| FR-003 | ... | Could | ... |

## Non-Functional Requirements
- **Performance:** Page load < 3s, query response < 2s, support X concurrent users
- **Accessibility:** WCAG 2.2 AA compliance
- **Browser support:** Edge, Chrome (latest 2 versions)
- **Data retention:** [X years, then archive/delete]
- **Availability:** [99.9% during business hours]

## Data Model Summary
[Mermaid erDiagram or table list with key columns, relationships, ownership type]

## Integration Points
| System | Direction | Method | Auth | Error Handling |
|---|---|---|---|---|
| [System A] | Inbound | Custom Connector / HTTP | OAuth 2.0 | Retry 3x, then queue |
| [System B] | Outbound | Power Automate flow | Service Principal | Dead letter table |

## Security Requirements
- Roles: [Role 1 -- CRUD on own records], [Role 2 -- Read all, Create own]
- Row-level security: [BU hierarchy / Team ownership / None]
- Column security: [SSN, salary columns restricted to Role X]
- Authentication: [Entra ID, conditional access required]

## Build Order (Dependency Graph)
1. Publisher + Solution
2. Tables (schema only, primary name columns)
3. Columns (all columns for all tables)
4. Relationships (lookups, N:N)
5. Option sets (global and local)
6. Views + Forms
7. Security roles + column security profiles
8. Flows (after tables + connection references exist)
9. App module + sitemap
10. PublishAllXml

## Acceptance Criteria Summary
[Each FR maps to a testable Given/When/Then that Ava uses for UAT scripts]

Worked Example: Case Management

A simplified spec showing how the template maps to real requirements.

Project Overview

  • Business problem: Support team tracks cases in spreadsheets. No visibility, no SLAs, no escalation.
  • Target users: Support Agents (15), Support Managers (3), Customers (external portal)
  • Success criteria: 90% of cases resolved within SLA, manager dashboard shows real-time status

User Stories (3 examples)

IDUser StoryPriorityAcceptance Criteria
FR-001As a support agent, I want to log a new case with customer details and descriptionMustGiven I am on the case form, When I fill required fields and save, Then a case record is created with status "New" and auto-numbered case ID
FR-002As a support manager, I want to see all cases approaching SLA breachMustGiven cases have an SLA deadline, When I open the "SLA At Risk" view, Then I see cases where deadline is within 4 hours and status is not "Resolved"
FR-003As a customer, I want to check my case status on a portalShouldGiven I am logged into the portal, When I navigate to "My Cases", Then I see my open cases with status and last update date

Data Model (4 tables)

TableOwnershipKey ColumnsRelationships
contoso_caseUsercase_number (autonumber), title, description, status, priority, sla_deadlineLookup to contact, lookup to contoso_category
contoso_categoryOrganizationname, sla_hours, escalation_team1:N to contoso_case
contoso_caseactivityUseractivity_type, notes, created_byLookup to contoso_case
contactUser(standard)1:N to contoso_case

Build Order

1. Publisher (contoso) + Solution (CaseManagement)
2. Tables: contoso_case, contoso_category, contoso_caseactivity
3. Columns: all columns per table
4. Relationships: case->contact, case->category, caseactivity->case
5. Views: "Active Cases", "My Cases", "SLA At Risk", "Cases by Category"
6. Forms: Case main form (3 tabs), Category quick create
7. Security roles: "Support Agent" (CRUD own cases), "Support Manager" (Read all, manage team)
8. Flows: "Set SLA Deadline on Create", "Escalate SLA Breach", "Notify Customer on Update"
9. App module: "Case Management" with sitemap
10. PublishAllXml

Agent Delegation

PhaseAgentSkills Loaded
PlanningLauraarchitecture, spec-driven-dev
ArchitectureSeanarchitecture, dataverse, security, power-pages
Build (schema)Scottdataverse-web-api
Build (UI)Scottdataverse-web-api (customizations)
Build (flows)Scottpower-automate
Build (portal)Scottpower-pages
ReviewRazordataverse, power-automate, security, power-pages
InfrastructureParvezalm, env-strategy
UATAvatesting

Spec-to-Acceptance-Criteria Mapping

Every functional requirement in the spec maps to a testable Given/When/Then statement that Ava uses to generate UAT scripts.

Mapping Pattern

Spec Requirement (FR-XXX)
  -> Given/When/Then (acceptance criteria)
    -> UAT Script Step (Ava generates)
      -> Pass/Fail (Ava records during UAT)

Example Mappings

Spec RequirementGivenWhenThen
FR-001: Log new caseAgent is on case formAgent fills title, description, priority, customer and savesCase record created with status "New", auto-number assigned, SLA deadline calculated
FR-002: SLA at-risk view3 cases exist: 1 within SLA, 1 within 4 hours of breach, 1 already breachedManager opens "SLA At Risk" viewOnly the 2 at-risk/breached cases appear; case within SLA is not shown
FR-003: Portal case statusCustomer has 2 open cases and 1 closed caseCustomer logs into portal and opens "My Cases"2 open cases shown with status and last update; closed case not shown

Ava's UAT Script Format

markdown
## UAT Script: FR-001 -- Log New Case

**Preconditions:**
- Logged in as user with "Support Agent" role
- At least 1 contact record exists

**Steps:**
1. Navigate to Case Management app
2. Click "+ New Case"
3. Fill: Title = "Test Case 001", Description = "Test description"
4. Set Priority = "High", Customer = [existing contact]
5. Click Save

**Expected Results:**
- [ ] Case record is created
- [ ] Case Number is auto-generated (format: CASE-XXXXX)
- [ ] Status = "New"
- [ ] SLA Deadline is set to [now + category SLA hours]
- [ ] Created By = current user
- [ ] Owner = current user

Related Skills

  • dataverse-web-api -- Primary build tool for executing specs
  • architecture -- Sean's skill for designing the architecture that specs describe
  • alm -- ALM strategy section of the master spec
  • security -- Security model section of the master spec
  • testing -- Test plans derived from acceptance criteria

Câu hỏi thường gặp

Kỹ năng AI Spec Driven Dev làm được gì?

Mô hình phát triển theo đặc tả cho Power Platform. Dùng khi: lập kế hoạch cho dự án phức tạp, viết đặc tả tổng thể, chia nhỏ đặc tả thành phần, xác định thứ tự xây dựng, soạn tài liệu yêu cầu, tài liệu thiết kế và mẫu đặc tả.

Vì sao nên dùng Spec Driven Dev trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Spec Driven Dev là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Spec Driven Dev trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/korchard333/claude-power-platform-community/tree/main/.claude/skills/spec-driven-dev. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Spec Driven Dev?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Spec Driven Dev với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Spec Driven Dev với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Spec Driven Dev có miễn phí không?

Có. Kỹ năng này được korchard333 phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇