con un clic
telemetrylog-work
Generates a U.Work record for an action (Pattern A.15.1).
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Generates a U.Work record for an action (Pattern A.15.1).
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Issues a proxy audit verdict for a session.
Verifies Definition of Done checks and generates a DoD report.
FPF Pattern F.18: Local‑First Unification Naming Protocol
Initializes a bounded context skeleton under runtime/contexts/<context>.
Mints a new F.18 Name Card with strict Twin-Label and Sense-Seed validation.
Records a formal Design-Rationale Record (DRR) for architectural decisions.
| name | telemetry/log-work |
| description | Generates a U.Work record for an action (Pattern A.15.1). |
| license | Apache-2.0 |
| metadata | {"fpf_id":"A.15.1","fpf_title":"U.Work: The Record of Occurrence","family":"telemetry"} |
| allowed-tools | ["write_to_file","run_command"] |
Implementation note (local tooling): When
POSTHOG_API_KEYandPOSTHOG_DISTINCT_IDare set, the reference implementation emits a PostHog event namedu_work_loggedwith spec/context metadata. SetPOSTHOG_INCLUDE_ACTION=1to include the action text and role. Implementation note (local tooling): Whenagent_session,agent_model, oragent_typeinputs are provided, the reference implementation adds anagent_metadatablock to the U.Work record.
After we have agreed who is assigned (via Role assignment), what they can do (via Capability), and how in principle it should be done (via Method/MethodDescription), we still need a precise concept for what actually happened in real time and space.
That concept is U.Work: the dated run‑time occurrence of enacting a MethodDescription by a specific performer under a Role assignment, with concrete parameter bindings, resource consumption, and outcomes, anchored to a domain referent that actually changes (asset/product/dataset) — not merely the manipulation of records about that referent. Managers care about Work because it is the only place where cost, time, defects, and evidence are real. Architects care because Work ties plans and specs to accountable execution.
| Force | Tension we resolve |
|---|---|
| Universality vs. domain detail | One Work notion for surgery, welding, ETL, proofs, lab cycles—while letting each keep its vocabulary. |
| Granularity vs. aggregation | Atomic runs vs. composite operations; we need roll‑up without double‑count. |
| Concurrency vs. order | Parallel/overlapped activities need clear part/overlap semantics. |
| Identity vs. retries | A failed attempt, a retry, and a resumed episode—what is “the same” work? |
| Time realism vs. simplicity | We need intervals and coverage but cannot bury users in temporal logic notation. |
U.Work as the accountable, dated occurrenceU.Work is a 4D occurrence holon: a dated run‑time enactment of a U.MethodDescription by a performer designated through a U.RoleAssignment, executed within a concrete U.System/SubSystem, inside a U.BoundedContext, that binds concrete parameters, consumes/produces resources, and leaves an auditable trace.
Each U.Work is a morphism Δ on a declared state‑plane (StatePlaneRef), mapping ⟨pre‑state, inputs⟩ to ⟨post‑state, outputs⟩ for one or more affected referents.
Memory aid: Work = “how it went this time” (dated, resourced, accountable).
When you describe a Work instance in a review, answer these prompts:
isExecutionOf → U.MethodDescription (the description actually followed; edition pinned if applicable).performedBy → U.RoleAssignment (which holder#role:context acted).affected → {referent(s)} + pre‑state anchor and post‑state anchor (or a declared Δ‑predicate evaluated on evidence) on the declared state‑plane (StatePlaneRef).executedWithin → U.System (the operational system/sub‑system accountable for the occurrence; mandatory).| You are pointing at… | The right FPF concept | Litmus |
|---|---|---|
| The recipe/code/diagram | MethodDescription | Is it knowledge on a carrier? |
| The semantic “way of doing” | Method | Same Standard across notations? |
| The assignment (“who is being what”) | Role → RoleAssigning | Can be reassigned without changing the system? |
| The ability (“can do within bounds”) | Capability | Would remain even if not assigned? |
| The dated occurrence with logs, resources | Work | Did it happen at (t₀, t₁), consume resources, produce outcomes? |
| The state change caused this time | Work.Δ | Did the referent move from pre→post on the declared state‑plane? |
U.Work) — normativePublication of U.Work across MVPK faces must be a typed projection that does not mutate intensional semantics (A.7; E.17). Concretely:
U.Work intensional arrow; they project presence‑pins only (time window, performer, spec, parameter‑binding occurrence, resource ledger presence, acceptance verdict presence). Numeric/comparable content appears only with pins (see 4.4‑4.5 below); “signature” is banned on faces.U.Work face presents any comparison or ranking across runs (e.g., acceptance classes, parity/benchmark inserts), the face must: (i) compare after mapping via a declared ComparatorSet; (ii) return sets (Pareto/Archive) when order is partial; (iii) forbid hidden scalarization/ordinal means (cf. G.9).U.Work face MUST pin the CG‑Spec/ComparatorSet edition(s) and, where scale/plane conversion occurs, the UNM.TransportRegistry edition (Φ/Φ^plane policy‑ids). Cross‑context/plane crossings route penalties to R‑lane only (Bridge id + Φ) (cf. E.17; G.9).U.Work face (different DesignRunTag, ReferencePlane, or CtxState.locus) MUST carry BridgeCard + UTS row (with locus/plane notes and CL routing).U.Work instances that meet Δ‑anchoring in §4.2/§8.U.Work is a run-time occurrence (DesignRunTag = run). Any face that cites design-time artefacts (e.g., ComparatorSet, CG-Spec editions, TransportRegistryΦ) is making a cross-stance/cross-Context reference and therefore MUST publish a BridgeCard + UTS row and record Φ(CL)/Φ^plane policy-ids; penalties reduce R_eff only.We adopt a 4D extensional stance for occurrences: a Work is identified primarily by its spatiotemporal extent and its execution anchors (spec used, performer, parameterization). This avoids double‑counting and keeps aggregation sound. FPF adapts insights from BORO/constructive ontologies to Work while staying practical.
TemporalPartOf_work). A proper time‑slice of a Work (e.g., the first 10 minutes of a 2‑hour run). Useful for monitoring and SLAs.EpisodeOf_work). A resumption fragment after an interruption (same run identity if policy deems it one episode; see 5.5).OperationalPartOf_work). A sub‑run that enacts a factor of the Method/Spec (e.g., “incision” run within “appendectomy” run), possibly overlapping with others in time.ConcurrentPartOf_work). Two sub‑runs that overlap in their windows, coordinated by the same higher‑level run.Didactic rule: Method composition ≠ proof of Work decomposition. Sub‑runs often map to method factors, but retries, batching, pipelining, and failures make the mapping non‑isomorphic.
precedes/happensBefore — strict partial order on Work windows.overlaps — intervals intersect but neither contains the other.contains/within — one Work’s window contains another’s.causedBy/causes — pragmatic causal links (e.g., a rework caused by a failed inspection run).retryOf — a new Work instance re‑attempting the same MethodDescription with revised parameters.resumptionOf — a Work episode that continues an interrupted run (policy decides identity; see 5.5).These relations are run‑time facts, not design assumptions.
Temporal coverage — Γ_time(S)
For a set S of Work parts, returns a coverage interval set (union of intervals) or, when required, the convex hull [min t₀, max t₁]. Use union for utilization; use hull for lead time.
Properties: idempotent, commutative, monotone under set inclusion.
Resource aggregation — Γ_work(S)
For a set S of Work parts, returns the aggregated resource ledger (materials, energy, time, money) with de‑duplication rules for shared/overlapped parts (context‑declared).
Properties: additive on disjoint parts; requires overlap policy otherwise (e.g., attribute costs to the parent once, not to each child).
Manager’s tip: Pick the coverage operator that matches your KPI: union for machine utilization; hull for calendar elapsed; never mix silently.
Two Work records refer to the same Work iff, in the relevant context:
MethodDescription,U.RoleAssignment), andIf any of these differ (or the context declares equivalence absent), they are distinct Work instances (e.g., a retry).
retryOf.causedBy.Why it matters: plans, costs, and quality stats depend on whether you treat a disruption as one episode or a new run. Declare the policy in the bounded context.
For any Work with parts, the effect of the whole must be the rules‑declared composition of the effects of its parts plus any declared overheads/residuals. Composition must align with the overlap rules used by Γ_work (e.g., no double‑count of shared fixed costs, and consistent attribution of variable deltas).
Appendectomy_Case#2025‑08‑10T09:05–11:42.Appendectomy_v5 (MethodDescription).OR_Team_A#SurgicalTeamRole:Hospital_2025 (RoleAssigning).Incision (09:15–09:22), Exploration (overlaps with monitoring), Closure (11:10–11:35).ETL_Nightly_2025‑08‑11T01:00–01:47.ETL_v12.bpmn.ETL_Runtime#TransformerRole:DataOps_2025.Extract_A ‖ Extract_B; Transform starts when either completes (overlap).Load failed at 01:36; retried with batch size ↓ — new Work linked via retryOf.Carnot_Cycle_Run#2025‑08‑09T13:00–13:06.Carnot_Cycle_Spec (MethodDescription with Dynamics model).LabRig_7#TransformerRole:ThermoLab.Prag, Arch, Did, Epist.U.BoundedContext.U.RoleAssignment / Role Enactment (A.2.1; A.15) and with 4D extensional thinking, so that costing, quality, and audit rest on runs, not on plans or recipes.CC‑A15.1‑1 (Strict distinction).
U.Work is a dated run‑time occurrence. It is not a U.Method (semantic way), not a U.MethodDescription (description), not a U.Role/RoleAssigning (assignment), and not a U.WorkPlan (plan/schedule).
CC‑A15.1‑2 (Required links).
Every U.Work MUST reference:
(a) isExecutionOf → U.MethodDescription (the spec followed; edition pinned),
(b) performedBy → U.RoleAssignment (the assigned performer in context), and
(c) executedWithin → U.System/SubSystem (the operational system accountable for the occurrence).
CC‑A15.1‑3 (Time window).
Every U.Work MUST carry a closed interval [t_start, t_end] (or an explicitly marked open end for in‑flight work) and, where relevant, location/asset.
CC‑A15.1‑4 (Context anchoring & judgement).
A U.Work MUST be judged inside a declared U.BoundedContext (the judgement context).
performedBy references a RoleAssigning in a different context, there MUST exist an explicit Bridge (U.Alignment) or policy stating cross‑context acceptance. Otherwise, the Work is non‑conformant in that context.CC‑A15.1‑4b (State‑plane anchoring).
Each U.Work MUST declare a StatePlaneRef for its Δ‑judgement.
CC‑A15.1‑5 (RoleAssigning validity).
The performedBy RoleAssigning’s timespan MUST cover the Work interval. If it does not, the Work is invalid or must be re‑judged in a context that allows retroactive assignments.
CC‑A15.1‑6 (Parameter binding). Parameters declared by the MethodDescription MUST have concrete values bound at Work creation/start and recorded with the Work. Defaults in the spec do not satisfy this requirement.
CC‑A15.1‑7 (Capability check).
All capability thresholds stated by the Method/MethodDescription MUST be checked against the holder in performedBy at the time of execution (or at defined checkpoints). Violations must be flagged on the Work outcome.
CC‑A15.1‑8 (Acceptance criteria). Success/failure and quality grades MUST be determined by the acceptance criteria declared (or referenced) by the MethodDescription/CG‑Spec in the judgment context. The verdict is recorded on the Work.
CC‑A15.1‑9 (Resource honesty).
All consumptions and costs (energy, materials, machine‑time, money, tool wear) SHALL be booked only to U.Work (not to Method, MethodDescription, Role, or Capability). Estimates may live in specs; actuals live in Work.
CC‑A15.1‑10 (Mereology declared). If a Work has parts, the chosen part relation(s) must be declared (temporal‑part, episode‑part, operational‑part, concurrent‑part). Ambiguous mixtures are forbidden.
CC‑A15.1‑11 (Γ_time selection). For any roll‑up, the judgement context MUST declare which temporal coverage operator applies: union (utilization) or convex hull (lead time). Silent mixing is prohibited.
CC‑A15.1‑12 (Γ_work aggregation). Aggregation of resource ledgers across Work parts MUST specify an overlap policy (e.g., “attribute shared machine‑time to parent only”) to prevent double‑counting.
CC‑A15.1‑13 (Identity & retries).
A retry MUST be modeled as a new Work linked via retryOf. Interruptions that are treated as the same run must be modeled as episodes (resumptionOf) per a context‑declared episode policy.
CC‑A15.1‑14 (Concurrency & ordering).
Overlaps and precedences among Work MUST use interval relations (overlaps, precedes, contains/within). Implicit “step order” claims are not admissible evidence.
CC‑A15.1‑15 (Cross‑context evidence). If a Work is to be accepted in multiple contexts (e.g., regulatory + operational), either: (a) re‑judge it in each context, or (b) provide Bridges that map acceptance criteria/units/roles; never assume cross‑context identity by name.
CC‑A15.1‑16 (Spec changes during run). If the MethodDescription version changes mid‑run, the Work MUST either: (a) split into episodes bound to respective specs, or (b) record an explicit spec override event in the judgement context. Silent substitution is forbidden.
CC‑A15.1‑17 (Distributed performers). If multiple RoleAssignings jointly perform the same top‑level Work (e.g., multi‑agent orchestration), the Work MUST either: (a) designate a lead RoleAssigning and list others as concurrent parts, or (b) be modeled as a parent Work with child Works per RoleAssigning.
CC‑A15.1‑18 (Logs ≠ Work by themselves). Logs/telemetry are evidence for a Work; they do not constitute a Work unless bound to (spec, performer, time window) and judged in a context.
CC‑A15.1‑19 (Affected referent). Each U.Work MUST name at least one affected referent (e.g., U.Asset, product/batch, dataset/document) via affected → {…}.
CC‑A15.1‑20 (State‑change witness). Each U.Work MUST carry either (a) explicit pre‑state/post‑state anchors on the declared state‑plane or (b) a Δ‑predicate that can be evaluated on evidence. Trivial “no‑op” runs MUST be flagged as such.
CC‑A15.1‑21 (World anchoring vs. record‑handling). A run whose only effect is copying/reformatting records does not qualify as U.Work unless the judgment context declares those records to be the product referent (e.g., data‑product manufacture).
CC‑A15.1‑22 (System anchoring). Each U.Work MUST declare executedWithin → U.System/SubSystem; if different from the asset of change, keep affected explicit.
CC‑A15.1‑23 (Compositionality of Δ). For composite Work, the parent effect MUST be the declared composition of child effects under the same overlap policy as Γ_work.
CC‑A15.1‑24 (No new claims on faces). MVPK faces for U.Work SHALL NOT add properties/claims beyond the intensional arrow; numeric/comparable content MUST include unit/scale/reference‑plane/EditionId pins; the term “signature” is banned on faces.
CC‑A15.1‑25 (No Γ‑leakage). Faces MUST reference Γ operators/policies by id when showing aggregates; they MUST NOT encode aggregation semantics in prose or imply defaults. Γ lives in Part B; faces carry pinned references only.
CC‑A15.1‑26 (No I/O re‑listing). Faces MUST NOT restate intensional I/O; publish presence‑pins and anchors only (per MVPK §5.4).
CC‑A15.1‑27 (Lawful orders; return sets). Any across‑run comparison presented on a U.Work face MUST use a declared ComparatorSet (map‑then‑compare), return sets when order is partial, and forbid hidden scalarization/ordinal means.
CC‑A15.1‑28 (Comparator/Transport pins). Any numeric/comparable acceptance or KPI on a U.Work face MUST pin ComparatorSet.edition, CG‑Spec.edition, and (where conversions occur) TransportRegistry.edition with Φ/Φ^plane policy‑ids; Bridge ids are mandatory for cross‑context/plane reuse; penalties → R only.
CC‑A15.1‑29 (Telemetry hooks, when applicable). If a Work instance feeds G.11 or QD/OEE portfolios, it SHALL cite PathId/PathSliceId and the active policy‑id in its evidence; illumination remains report‑only telemetry unless CAL explicitly promotes it.
Γ_timeInput: a finite set S of Work instances or Work parts.
Output: either (a) the union of their intervals, or (b) the convex hull [min t_start, max t_end]—as declared by context and KPI.
Invariants:
Γ_time(S ∪ S) = Γ_time(S)S ⊆ T then coverage(S) ⊆ coverage(T) (for union) or hull(S) ⊆ hull(T) (for hull)Usage guidance:
Γ_workInput: a finite set S of Work instances or parts with resource ledgers.
Output: an aggregated ledger (materials, energy, machine‑time, money, tool wear) with explicit overlap policy.
Invariants:
Typical policies:
When a Work is recorded, perform these three quick checks:
Spec–Context Check. Does isExecutionOf refer to a MethodDescription defined in the judgement context (or bridged to it)?
RoleAssigning–Context Check. Is performedBy’s RoleAssigning valid in the same context (or bridged)?
Standard–Outcome Check. Do the Work’s inputs/outputs and metrics satisfy the acceptance criteria from the spec as interpreted in that context?
Manager’s mnemonic: Context, assignment, Standard → CAC. Fail any → the Work is not acceptable here (perhaps acceptable elsewhere).
U.WorkPlan/operations‑support.Γ_time policy per KPI.isExecutionOf and performedBy.U.WorkPlan; let Work record actuals.| Benefits | Trade‑offs / mitigations |
|---|---|
| Auditable reality. Costs, time, and quality attach to concrete runs; root‑cause analysis and accountability improve. | More records. You create Work instances; mitigate with templates and automation. |
| Sound roll‑ups. Γ_time/Γ_work turn roll‑ups from hand‑waving into declared policy; KPIs become comparable. | Policy discipline. You must choose union vs hull and an overlap policy; write it once. |
| Cross‑context clarity. CAC checks prevent silent model drift; bridges make acceptance explicit. | Bridge upkeep. Keep mappings short and focused; review at releases. |
| 4D extensional coherence. Parts/overlaps/retries stop double‑counting and identity confusion. | Learning curve. Teach episode vs retry; include examples in onboarding. |
U.BoundedContext; U.System; A.2 U.Role; A.2.1 U.RoleAssignment; A.2.2 U.Capability; A.3.1 U.Method; A.3.2 U.MethodDescription.U.WorkPlan ↔ U.Work deltas).Γ_time = union (utilization) or hull (lead time); Γ_work with a declared overlap policy.