fpf-skilltelemetry-log-work-span

venikman's avatarfrom venikman

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

0stars🔀0forks📁View on GitHub🕐Updated Jan 10, 2026

When & Why to Use This Skill

This Claude skill automates the generation of FPF-compliant OpenTelemetry Spans mapped to the U.Work pattern. It ensures 'Lawful Telemetry' by strictly adhering to the 4D Anchor schema—capturing Spec, Performer, Context, and System attributes—to provide standardized, high-fidelity observability for AI agent execution units and performance tracking.

Use Cases

  • Standardizing Agent Logs: Automatically generate structured OpenTelemetry spans for every task an agent performs to ensure consistent monitoring across distributed systems.
  • Compliance and Auditing: Implement 'Lawful Telemetry' by capturing mandatory 4D anchors, providing a clear audit trail of which agent performed what action in which context.
  • Performance Analytics: Track execution outcomes (Success, Failure, Aborted) and rubric scores to analyze agent efficiency and improve workflow reliability.
  • Debugging Complex Workflows: Use detailed span attributes to trace errors back to specific methods, versions, or runtime environments in agentic architectures.
namefpf-skill:telemetry-log-work-span
descriptionGenerates an FPF-compliant OpenTelemetry Span mapped to U.Work.
version0.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.