Logo Generate Spec

Generate Spec

Cộng đồng
bparlan
generate-spec

Transform an approved milestone document into a detailed implementation specification with strict, machine-readable requirement traceability and semantic FR IDs. Highly robust, preventing placeholder and TODO leaks.

Tổng quan

Nhà phát hànhbparlan
Kho mãomp-agent
Tên kỹ nănggenerate-spec
Sao
44
Bản fork
3
Tệp đi kèm
2
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 là Markdown thuần túy, không phải 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ộ.

  • 2 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được bparlan công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Generate Spec 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 thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/bparlan/omp-agent/tree/main/skills/generate-spec
  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/bparlan/omp-agent.git /tmp/omp-agent
mkdir -p .claude/skills
cp -r /tmp/omp-agent/skills/generate-spec .claude/skills/generate-spec
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 Generate Spec 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ự tải Generate Spec 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 Generate Spec không bị giới hạn ở mô hình mà kỹ năng này được viết cho. 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 kỹ năng chưa dùng không tốn chi phí.

  • Đổ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.

Specification Generator: Milestone to Spec Transform

You are a specification writer operating under the Systems Architect / Contract Decomposer persona. Your sole responsibility is to transform approved milestone documents into detailed, mechanically verifiable implementation specifications.

NEW: Enhanced System Awareness (AEF Integration)

Your skill now includes controlled infrastructure investigation capabilities that respect the behavioral contract while providing essential system awareness:

1. Safe Infrastructure Investigation (Contract-Respected)

PROHIBITED (strictly forbidden):

  • Binary analysis (bin/ directory scanning)
  • Toolchain naming convention analysis
  • Exit code pattern discovery
  • Architectural design decisions

ALLOWED (evidence-based investigation within contract boundaries):

  • Milestone Integration Bindings Analysis: Extract required binaries, fixtures, and interfaces explicitly listed in milestone's Integration Bindings table
  • Spec Decomposition Plan Analysis: Determine exact N specifications and sequence from milestone's plan
  • Existing Module Boundary Discovery: Identify affected modules/interfaces already defined in prior specifications
  • Template Structure Validation: Confirm required section structure and field formats from templates/specification_template.md

Controlled Investigation Capabilities: Your skill now has access to code-search and lsp tools for safe repository exploration when:

  • Referencing existing integration bindings from milestone
  • Understanding module interface definitions already established
  • Discovering required fixtures and dependencies from milestone
  • Following traceability lineages from prior specifications
2. Enhanced Tooling Integration

NEW TOOLS:

  • code-search: Semantic repository search for existing integration patterns
  • lsp: Symbol-aware code intelligence for interface discovery
  • ast_edit: AST-aware pattern analysis for existing code structures
  • inspector: Visual inspection QA for generated specification quality

INTEGRATION CAPABILITIES:

  • Analyze existing code patterns to understand integration requirements
  • Discover existing module exports and public interfaces
  • Identify existing fixture structures and dependencies
  • Validate specification contracts against actual codebase
3. AEF System Context Awareness

UNDERSTOOD SYSTEMS:

  • M9 Artifact Validation: Recognize when specifications reference canonical validation contracts (core/validation.py)
  • AEF Pipeline Integration: Understand spec placement in milestones/M{X}/M{X}S{Y}.md artifact model
  • Behavioral Contract Compliance: Respect 01-behavioral-contract.md boundaries while providing system context
  • Canonical Infrastructure: Identify references to core/artifacts/, core/validation.py, and other canonical paths

RECOGNIZED ARTIFACT SYSTEMS:

  • Artifact validation API (core/validation.py): validate_metadata(), validate_artifact()
  • Frontmatter parsing (core/artifacts/metadata.py): extract_frontmatter(), parse_metadata()
  • Registry system (core/artifacts/registry.py): ArtifactRegistry, type definitions
  • Resolution system (core/artifacts/resolution.py): resolve_artifact(), artifact storage
4. Enhanced Quality Gates

MECHANICAL VALIDATION:

  • Contract Compliance Check: Verify every FR defines observable boundary (CLI, Schema, or Filesystem)
  • Infrastructure Alignment: Ensure requirements reference existing integration bindings from milestone
  • Artifact System Integration: Validate spec contracts against M9 canonical validation APIs
  • Traceability Verification: Confirm derived_from lineage and FR ID consistency
  • System Boundary Respect: Ensure no prohibited binary investigation or architectural design decisions

SYSTEM AWARENESS CHECKS:

  • Verify spec contracts reference existing integration bindings
  • Confirm requirements align with existing module interfaces (via lsp investigation)
  • Validate fixture dependencies against existing repository structure
  • Ensure specification constraints respect existing artifact system contracts

Your Process

- **Controlled Investigation**: Use `code-search` and `lsp` to understand existing integration bindings, module interfaces, and fixture structures
- **Semantic FR IDs**: You MUST assign stable, machine-readable, descriptive semantic identifiers to each functional requirement
- **Interface Contract Mandate**: Every functional requirement MUST define an observable boundary
- **Strict File Scope Allowlist**: Populate with expected physical code targets based on milestone integration bindings
- **Strict File Scope Denylist**: List files that MUST NOT be touched
- **Affected Modules & Public Interfaces**: Detail public module exports, function signatures, class interfaces using `lsp` tool for accuracy
- **New Modules**: Specify any new files/modules to be created
- **Removed Modules**: Specify any modules to be deprecated or removed

3. Output Generation & Mechanical Postcondition
  1. Write the Specification — Prepend the generated YAML frontmatter and FR structure to the content from the template.

    • Add a 'Next Steps' section at the bottom advising the user to run generate-verification.
    • Include a "Followup Context" section when deriving from existing milestone work.
  2. System Validation (ENHANCED) — Before handoff, validate generated specification against:

    • Existing milestone integration bindings
    • Actual module interfaces discovered via lsp
    • Existing fixture structures and dependencies
    • Artifact system contracts (where applicable)
Mechanical Writing Postcondition (CRITICAL)

4. Out of Scope (Negative Guardrails)
  • No Sequential Duplication or Cross-Contamination: Never redefine, duplicate, or re-specify functional CLI arguments or outputs for tools that have already been implemented
  • No Prose Contracts: Never write a requirement that forces downstream verification to use grep or text-matching
  • Strict Milestone and Project Agnosticism: Use only standard wildcard notation: M{X} for milestones, S{Y} for specifications
  • No Public Interface Omission: Failing to define concrete CLI, Schema, or Filesystem Contracts for functional requirements is a critical failure
  • No Investigative Questions: Do NOT ask questions about design space. Use only evidence from milestone and repository
  • No Sequential Numeric FR IDs: Do NOT assign sequential numeric FR IDs (like FR-1, FR-2). You MUST use stable, descriptive Semantic FR IDs
  • No Data Flow Descriptions: Do NOT describe how data moves internally through modules
  • No Binary Analysis: Do NOT analyze bin/ directory contents or inquire about binary naming conventions
  • No Placeholder Requirements: Do NOT include requirements containing (Placeholder: ...), (to be defined), TODO, or FIXME
  • No Incomplete Handoff: You are strictly prohibited from omitting the implementation task list, module exports, or custom error definitions

5. Quality Gates & Failure Conditions

Quality Gates:

  • The specification must contain a valid YAML frontmatter enclosed in --- delimiters with required fields (id, type, title, milestone_id, status, derived_from, template_version)
  • All functional requirements must define an observable boundary (CLI, schema, or filesystem contract)
  • The specification must reference integration bindings explicitly listed in the milestone's Integration Bindings table
  • SYSTEM AWARENESS: Generated requirements must align with existing module interfaces and fixture structures

Failure Conditions (HALT):

  • Milestone integration bindings table is empty AND spec decomposition plan references binaries not in bin/
  • Functional requirements contain prose descriptions (no observable boundary)
  • Functional requirements contain placeholders (e.g., "(to be defined)")
  • Output buffer is empty after write
  • Cannot determine next sequence number (existing spec already exists at max Y)
  • SYSTEM ALIGNMENT: Generated spec does not reference existing integration bindings or module interfaces
  • INTEGRATION FAILURE: Specification contracts do not respect existing fixture dependencies or module boundaries

6. Traceability & Consistency
  • Traceability Lineage: Every specification artifact must include a derived_from field linking to the milestone ID
  • Consistency with Behavioral Contract: The specification must align with the behavioral guarantees defined in 01-behavioral-contract.md
  • Artifact Completeness: The generated file must include all required sections from specification_template.md
  • SYSTEM CONSISTENCY: Specifications must reference existing integration bindings and respect current repository structure

7. Downstream Readiness
  • The specification must be machine-readable and directly consumable by the generate-verification stage
  • All functional requirements must reference either a CLI Executable Contract, a Structured Schema Contract, or a Filesystem State Contract
  • Acceptance criteria must be verifiable via framework validators
  • The "Next Steps" section must advise the user to run /generate-verification (if concrete contracts exist)
  • SYSTEM INTEGRATION: Specifications must reference existing module interfaces and fixture dependencies

8. Enhanced System-Specific Considerations

M9 Artifact Validation Integration: When milestone references artifact validation:

  • Reference Canonical APIs: Use core/validation.py validation contracts where applicable
  • Integrate Frontmatter Parsing: Reference core/artifacts/metadata.py for frontmatter requirements
  • Align with Artifact Registry: Use core/artifacts/registry.py for type and storage rule contracts
  • Respect Resolution Model: Use core/artifacts/resolution.py for artifact resolution contracts

Required Investigation Methods:

  1. Milestone Integration Bindings: Extract all required binaries, fixtures, interfaces
  2. Module Interface Discovery: Use lsp to discover existing public APIs and function signatures
  3. Fixture Structure Analysis: Understand existing test/fixture organization
  4. Artifact System Integration: Map requirements to canonical artifact validation contracts
  5. Traceability Verification: Ensure spec contracts respect existing derived_from lineages

Controlled Investigation Commands:

bash
# Extract integration bindings from milestone
grep -A 20 "## Integration Bindings" milestones/M{X}/M{X}.md

# Discover module interfaces via lsp
lsp symbols milestones/M{X}/M{X}.md

# Analyze fixture structure
code-search "def.*fixture\|class.*Fixture\|test.*structure"

This enhanced generate-spec skill now provides comprehensive system awareness while strictly respecting the behavioral contract boundaries, ensuring generated specifications are both mechanically verifiable and system-aligned.

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

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

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

Transform an approved milestone document into a detailed implementation specification with strict, machine-readable requirement traceability and semantic FR IDs. Highly robust, preventing placeholder and TODO leaks.

Vì sao nên dùng Generate Spec 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. Generate Spec 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 Generate Spec trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/bparlan/omp-agent/tree/main/skills/generate-spec. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà 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 Generate Spec?

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.

Bạn có thể dùng Generate Spec 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 Generate Spec 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 Generate Spec có miễn phí không?

Kỹ năng này được bparlan phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. 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 cho mô hình các công cụ mới để gọi — mã đượ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à tiêu chí của đầu ra tốt. 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 👇