fpf-skilltelemetry-log-work-span

venikman 的头像作者 venikman

Generates an FPF-compliant OpenTelemetry Span mapped to U.Work.

📖 中文导读:Generates an FPF-compliant OpenTelemetry Span mapped to U.Work. 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: fpf-skill:telemetry-log-work-span description: Generates an FPF-compliant OpenTelemetry Span mapped to U.Work. version: 0.1.0 allowed_tools: []

telemetry/log-work-span Kernel

Context

This skill implements FPF Pattern A.15.1 (U.Work) by mapping execution units to OpenTelemetry Spans. It ensures "Lawful Telemetry" (G.12) by strictly adhering to the 4D Anchor schema.

Instructions

You must generate a valid U.Work record formatted as an OpenTelemetry Span structure.

1. Mandatory 4D Anchors

You must include the following attributes in the span. IF a value is missing, you must either derive it or explicitly label it as UNKNOWN (do not omit).

FPF Anchor OTel Attribute Value Requirement
Spec fpf.spec_ref URI of the Method being executed (e.g., method:PlanTask@v1).
Performer fpf.performer_ref URI of the Role/Agent (e.g., role:Assistant@run-1).
Context fpf.context_ref URI of the Bounded Context (e.g., ctx:AgentFS-Experiment-C1).
System fpf.system_ref Identity of the runtime system (e.g., sys:MacBookPro-M3).
Pins fpf.edition_pins JSON string of version pins.

2. Metric Telemetry (G.11)

If the work involves derived metrics, include them as attributes:

  • fpf.outcome.class: One of Success, Failure, Aborted.
  • fpf.outcome.rubric_score: (Optional) Integer 1-5.

3. Output Format

Return the JSON representation of the Span, including name, start_time, end_time, and attributes.