Skill Tracer
Skills › Scientific Agent Skills › treatment-plans › documentation_workflow.md

documentation_workflow.md

169 lines · skills/treatment-plans/references/documentation_workflow.md at 5f2bc03

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1# Documentation Package Workflow
2
3Last reviewed: **2026-10-01**
4

Documentation Package Workflow

Last reviewed: 2026-10-01

Raw lines 1 to 4
5## Package contract
6
7A complete package contains exactly one JSON object for each document type:
8
9- `source_fact_manifest`
10- `clinician_authored_intervention_record`
11- `goals_monitoring_checkpoint_record`
12- `informed_preference_shared_decision_record`
13- `transition_reconciliation_record`
14- `intended_use_handoff_record`
16All six must use schema version `2.0` and the same `subject_ref`, `data_classification`, draft status, and notice.

Package contract

A complete package contains exactly one JSON object for each document type:

  • source_fact_manifest
  • clinician_authored_intervention_record
  • goals_monitoring_checkpoint_record
  • informed_preference_shared_decision_record
  • transition_reconciliation_record
  • intended_use_handoff_record

All six must use schema version 2.0 and the same subject_ref, data_classification, draft status, and notice.

Raw lines 5 to 17
18## 1. Intended-use gate
20Complete the intended-use/handoff record first:
22- purpose and authorized users;
23- local setting and accountable roles;
24- prohibited-use list;
25- privacy and processing attestations;
26- local policy, retention, change-control, and reporting routes;
27- local emergency-process reference;
28- handoff sender, recipient, and acknowledgment;
29- clinician sign-off and documentation-handoff release gate.
31Do not remove prohibited uses. The generator restores the complete list in every new package.

1. Intended-use gate

Complete the intended-use/handoff record first:

  • purpose and authorized users;
  • local setting and accountable roles;
  • prohibited-use list;
  • privacy and processing attestations;
  • local policy, retention, change-control, and reporting routes;
  • local emergency-process reference;
  • handoff sender, recipient, and acknowledgment;
  • clinician sign-off and documentation-handoff release gate.

Do not remove prohibited uses. The generator restores the complete list in every new package.

Raw lines 18 to 32
33## 2. Source-fact manifest
35Every clinical or process statement used elsewhere must have a source fact. A fact records:
37- a stable fact ID;
38- fact kind;
39- the exact bounded statement supplied;
40- source type, title, local locator, and version/date;
41- verification status, verifier role, and time;
42- applicability status when an official source or policy is involved.
44Allowed source categories distinguish signed local records, authorized EHR records, current FDA labeling, current REMS materials, current official guidance, and local policy.
46The manifest does not decide which source applies. An authorized professional must confirm applicability.

2. Source-fact manifest

Every clinical or process statement used elsewhere must have a source fact. A fact records:

  • a stable fact ID;
  • fact kind;
  • the exact bounded statement supplied;
  • source type, title, local locator, and version/date;
  • verification status, verifier role, and time;
  • applicability status when an official source or policy is involved.

Allowed source categories distinguish signed local records, authorized EHR records, current FDA labeling, current REMS materials, current official guidance, and local policy.

The manifest does not decide which source applies. An authorized professional must confirm applicability.

Raw lines 33 to 47
48## 3. Clinician-authored interventions
50Each intervention record must:
52- state that the decision was supplied and verified by an authorized licensed professional;
53- preserve the clinician-authored action without rewriting it into a recommendation;
54- link to at least one verified source fact;
55- record parameters only as supplied;
56- identify the responsible role;
57- preserve explicit start/end dates when supplied;
58- include verifier role and time.
60The validator checks structure and provenance only. It does not parse or judge a medication, procedure, therapy, device, referral, or instruction.

3. Clinician-authored interventions

Each intervention record must:

  • state that the decision was supplied and verified by an authorized licensed professional;
  • preserve the clinician-authored action without rewriting it into a recommendation;
  • link to at least one verified source fact;
  • record parameters only as supplied;
  • identify the responsible role;
  • preserve explicit start/end dates when supplied;
  • include verifier role and time.

The validator checks structure and provenance only. It does not parse or judge a medication, procedure, therapy, device, referral, or instruction.

Raw lines 48 to 61
62## 4. Goals, monitoring, and checkpoints
64Separate:
66- goals — statement, measurement, target, target date, and source facts;
67- monitoring items — item, method, supplied frequency text, explicit next due date, owner, and source facts;
68- checkpoints — exact supplied date, purpose, owner, linked records, and source facts.
70Do not convert a narrative frequency into dates. Do not infer a checkpoint from a target, medication, intervention type, standard interval, or prior appointment.

4. Goals, monitoring, and checkpoints

Separate:

  • goals — statement, measurement, target, target date, and source facts;
  • monitoring items — item, method, supplied frequency text, explicit next due date, owner, and source facts;
  • checkpoints — exact supplied date, purpose, owner, linked records, and source facts.

Do not convert a narrative frequency into dates. Do not infer a checkpoint from a target, medication, intervention type, standard interval, or prior appointment.

Raw lines 62 to 71
72## 5. Informed preferences and shared decisions
74Record only what the authorized clinician documented:
76- decision topic;
77- options actually presented;
78- whether benefits, harms, and uncertainty were documented;
79- the person's stated preference;
80- the clinician-documented outcome;
81- participant and author roles;
82- source facts, time, and acknowledgment status.
84Do not generate missing options, risk estimates, benefit claims, alternatives, or consent language.

5. Informed preferences and shared decisions

Record only what the authorized clinician documented:

  • decision topic;
  • options actually presented;
  • whether benefits, harms, and uncertainty were documented;
  • the person's stated preference;
  • the clinician-documented outcome;
  • participant and author roles;
  • source facts, time, and acknowledgment status.

Do not generate missing options, risk estimates, benefit claims, alternatives, or consent language.

Raw lines 72 to 85
86## 6. Transition and reconciliation
88Record:
90- sending and receiving settings and roles;
91- exact handoff date;
92- medication-reconciliation status;
93- source and destination list fact references;
94- discrepancy status and authorized reviewer;
95- handoff items, owners, recipients, and acknowledgment;
96- unresolved items and their local route.
98`completed_by_authorized_clinician` is a declaration to be verified against the local record. The script does not perform reconciliation.

6. Transition and reconciliation

Record:

  • sending and receiving settings and roles;
  • exact handoff date;
  • medication-reconciliation status;
  • source and destination list fact references;
  • discrepancy status and authorized reviewer;
  • handoff items, owners, recipients, and acknowledgment;
  • unresolved items and their local route.

completed_by_authorized_clinician is a declaration to be verified against the local record. The script does not perform reconciliation.

Raw lines 86 to 99
100## 7. Deterministic checks
102Run in this order:
104```bash
105python3 scripts/validate_treatment_plan.py PACKAGE_DIRECTORY
106python3 scripts/validate_traceability.py PACKAGE_DIRECTORY
107python3 scripts/check_completeness.py PACKAGE_DIRECTORY
108python3 scripts/privacy_process_check.py PACKAGE_DIRECTORY
109python3 scripts/check_consistency.py PACKAGE_DIRECTORY
110python3 scripts/timeline_generator.py PACKAGE_DIRECTORY --output SCHEDULE.json
111```
113Run these commands from the skill directory. New empty templates pass structural validation but intentionally fail completeness and schedule generation until supplied records and dates exist.
115The checks answer different questions:
117- structural validator — are document types, fields, types, enums, bounds, and dates valid?
118- traceability validator — do all clinical/process records point to existing verified facts?
119- completeness checker — are required records, reviews, routes, acknowledgments, sign-off, and release declarations complete?
120- privacy/process checker — are local authorization, minimization, external-tool prohibition, qualified review, retention, and direct-identifier safeguards documented?
121- consistency checker — do package IDs, statuses, classifications, references, and explicit date order agree?
122- timeline generator — after structural and cross-record consistency checks, what events occur on dates already supplied?
124Run every check again after any change. A pass evaluates declarations, not their authenticity. The completeness output is `documentation_declarations_complete`; `handoff_authorized_by_script` is always false. The fixed completeness profile requires at least one intervention, goal, monitoring item, checkpoint, shared-decision entry, and handoff item. These are package constraints, not universal care requirements. If the supplied workflow does not have such records, leave it blocked and retain the authorized source workflow; never invent care or consent documentation merely to pass.
126Dates use full `YYYY-MM-DD` form. Timestamps use `YYYY-MM-DDTHH:MM:SS`, optional 1-6 fractional digits, and `Z` or `±HH:MM`. A schedule keeps the calendar date in the supplied offset, without converting timezones. It omits clinical text and subject IDs but is still sensitive when derived from patient data.

7. Deterministic checks

Run in this order:

python3 scripts/validate_treatment_plan.py PACKAGE_DIRECTORY
python3 scripts/validate_traceability.py PACKAGE_DIRECTORY
python3 scripts/check_completeness.py PACKAGE_DIRECTORY
python3 scripts/privacy_process_check.py PACKAGE_DIRECTORY
python3 scripts/check_consistency.py PACKAGE_DIRECTORY
python3 scripts/timeline_generator.py PACKAGE_DIRECTORY --output SCHEDULE.json

Run these commands from the skill directory. New empty templates pass structural validation but intentionally fail completeness and schedule generation until supplied records and dates exist.

The checks answer different questions:

  • structural validator — are document types, fields, types, enums, bounds, and dates valid?
  • traceability validator — do all clinical/process records point to existing verified facts?
  • completeness checker — are required records, reviews, routes, acknowledgments, sign-off, and release declarations complete?
  • privacy/process checker — are local authorization, minimization, external-tool prohibition, qualified review, retention, and direct-identifier safeguards documented?
  • consistency checker — do package IDs, statuses, classifications, references, and explicit date order agree?
  • timeline generator — after structural and cross-record consistency checks, what events occur on dates already supplied?

Run every check again after any change. A pass evaluates declarations, not their authenticity. The completeness output is documentation_declarations_complete; handoff_authorized_by_script is always false. The fixed completeness profile requires at least one intervention, goal, monitoring item, checkpoint, shared-decision entry, and handoff item. These are package constraints, not universal care requirements. If the supplied workflow does not have such records, leave it blocked and retain the authorized source workflow; never invent care or consent documentation merely to pass.

Dates use full YYYY-MM-DD form. Timestamps use YYYY-MM-DDTHH:MM:SS, optional 1-6 fractional digits, and Z or ±HH:MM. A schedule keeps the calendar date in the supplied offset, without converting timezones. It omits clinical text and subject IDs but is still sensitive when derived from patient data.

Raw lines 100 to 127
Runs code python3 scripts/validate_treatment_plan.py :105
Runs code python3 scripts/validate_traceability.py :106
Runs code python3 scripts/check_completeness.py :107
Runs code python3 scripts/privacy_process_check.py :108
Runs code python3 scripts/check_consistency.py :109
Runs code python3 scripts/timeline_generator.py :110
128## 8. Minimized issue handling
130Reports use known field paths, not values; unknown field names and unrecognized document-type values are suppressed. For example, a report may identify `interventions[0].verification.status` without printing the action text.
132Resolve each issue in the authoritative local record:
1341. Locate the field path.
1352. Compare with the signed source.
1363. Ask the responsible authorized role to supply or verify the missing value.
1374. Update provenance.
1385. Re-run all checks.
140Never correct clinical content from memory or general guidance.

8. Minimized issue handling

Reports use known field paths, not values; unknown field names and unrecognized document-type values are suppressed. For example, a report may identify interventions[0].verification.status without printing the action text.

Resolve each issue in the authoritative local record:

  1. Locate the field path.
  2. Compare with the signed source.
  3. Ask the responsible authorized role to supply or verify the missing value.
  4. Update provenance.
  5. Re-run all checks.

Never correct clinical content from memory or general guidance.

Raw lines 128 to 141
142## 9. Sign-off and handoff
144Before releasing for authorized documentation handoff:
146- all source facts are verified;
147- source applicability is confirmed where required;
148- interventions are verified;
149- reconciliation is completed or explicitly not applicable by an authorized reviewer;
150- unresolved items are routed and acknowledged;
151- privacy/process review is complete;
152- local policy and reporting routes are populated;
153- the recipient is identified;
154- the authorized licensed signer completes the attestation;
155- the release gate is set to `released_for_authorized_documentation_handoff`;
156- blocker codes are empty.
158The visible draft/not-medical-advice notice remains. Release does not authorize implementation by an agent.

9. Sign-off and handoff

Before releasing for authorized documentation handoff:

  • all source facts are verified;
  • source applicability is confirmed where required;
  • interventions are verified;
  • reconciliation is completed or explicitly not applicable by an authorized reviewer;
  • unresolved items are routed and acknowledged;
  • privacy/process review is complete;
  • local policy and reporting routes are populated;
  • the recipient is identified;
  • the authorized licensed signer completes the attestation;
  • the release gate is set to released_for_authorized_documentation_handoff;
  • blocker codes are empty.

The visible draft/not-medical-advice notice remains. Release does not authorize implementation by an agent.

Raw lines 142 to 159
160## 10. Change control
162For every revision:
164- preserve the prior authorized version according to local records policy;
165- update source versions and verification times;
166- re-run every check;
167- obtain new sign-off when clinical content, recipient, classification, purpose, or governing source changes;
168- record disposition of superseded local copies;
169- never overwrite a source record or silently reuse an old approval.

10. Change control

For every revision:

  • preserve the prior authorized version according to local records policy;
  • update source versions and verification times;
  • re-run every check;
  • obtain new sign-off when clinical content, recipient, classification, purpose, or governing source changes;
  • record disposition of superseded local copies;
  • never overwrite a source record or silently reuse an old approval.
Raw lines 160 to 169