author-decision-mapping
v4 sub-skill #3. Adds the `decisions:` block to the brief and emits one Cypher precedent-query file per HITL phase under `api/server/services/precedent_queries/<workflow_type>_<phase>.cypher`.
- License 许可
- MIT
- 最近更新
- 2026-09-28
- Stars
- ★ 1
- Forks
- 2
01 前言 Front Matter
- name
- author-decision-mapping
- inputs
- [ { "brief.phases (kind": "hitl entries)" }, "brief.entities (so decided_on_entities can resolve)" ]
- outputs
- [ "brief.decisions", "<sandbox>/api/server/services/precedent_queries/<wt>_<phase>.cypher" ]
- audience
- design-time-only
- description
- v4 sub-skill #3. Adds the `decisions:` block to the brief and emits one Cypher precedent-query file per HITL phase under `api/server/services/precedent_queries/<workflow_type>_<phase>.cypher`.
- hands_off_to
- author-function-membership
- forbidden-runtime
- true
02 资源文件 3
- 脚本__init__.py—
- 脚本codegen.py1.4 KB
- 脚本validator.py3.3 KB
03 SKILL.md 正文
author-decision-mapping
This sub-skill encodes the persona-precedent contract: every HITL
phase that wants to surface "what did this persona decide last time
on a similar entity?" gets a Cypher template that the Phase 3
persona reasoning loop will run with bind params
$entity_id and $limit.
Procedure
-
Read the v1 brief (now carrying
entities). -
Propose
decisions:. One entry per HITL phase that should record a precedent. Schema:decisions: - phase: <hitl-phase-name> # must exist in phases & be kind: hitl persona: <role> # must exist in api/server/personae/ source_event: <FleetEvent type> # default: workflow.hitl.requested decided_on_entities: [payload.X.id] # optional refs from entities[] attributes_from_context: # optional context map for Decision.attributes <key>: payload.<path> -
Validate. Run
validator.py:validate(brief, ...). STOP onSchemaError. -
Render. For each decision, call
codegen.render_cypher(brief, decision). Write each to<sandbox>/api/server/services/precedent_queries/<workflow_type>_<phase>.cypher. -
Hand off to
author-function-membership.
Cypher template (replicated from blueprint §10 decision #4)
// Auto-generated by compose-domain v4 author-decision-mapping codegen.
MATCH (d:Decision)-[:DECIDED_ON]->(e {id: $entity_id})
WHERE d.persona_role = '<persona>'
AND d.workflow_type = '<workflow_type>'
RETURN d
ORDER BY d.decided_at DESC
LIMIT $limit
The persona reasoning loop binds $entity_id from the current
workflow's entity ref and $limit from the per-call cap.
Constraints
- Exactly one decision per HITL phase (the dedupe triple
(workflow_id, phase, persona_role)is enforced by Phase 1's reflector). - Persona names must reference an existing folder under
api/server/personae/. source_eventdefaults toworkflow.hitl.requestedwhen omitted.
04 同仓库更多 Skills
proactive-customer-care
Proactively notifies and, where warranted, extends a small bounded goodwill gesture to a customer whose itinerary materially changed.
payment-exception
Resolves a failed balance payment by retrying it to complete the booking, or releasing the booking's inventory when retry is not viable.
hotel-supplier-recovery
Restores accommodation for a shortfall-hit hotel allotment by moving contracted rooms from a donor allotment with headroom, resolving the reported supplier shortfall.
holiday-sales-booking
暂无简介
flight-disruption-recovery
暂无简介
destination-operations
Dispatches a replacement resort transfer when an arrival is at risk, rebinding any travellers on the at-risk transfer to the replacement.