Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
adapter_metadata:
skill_name: authentext
skill_version: 3.2.0
last_synced: 2026-08-11
last_synced: 2026-08-12
source_path: SKILL.md
adapter_id: codex-cli
adapter_format: AGENTS.md
Expand Down
11 changes: 9 additions & 2 deletions SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,13 @@ the material:
[technical.md](references/technical.md).
- Papers, manuscripts, citations, or research prose: read
[academic.md](references/academic.md).
- Policy, governance, legal, risk, or compliance prose: read
- Health-research or clinical-safety prose: read
[clinical.md](references/clinical.md), plus academic or governance
references the material also requires.
- Policy, governance, risk, or compliance prose: read
[governance.md](references/governance.md).
- Legal-regulatory prose (contracts, advice, affidavits, notices): read
[legal.md](references/legal.md) with governance.
- Claims with contradictions or reasoning failures: read
[reasoning-failures.md](references/reasoning-failures.md).
- FOI-O final manuscript editing after semantic and citation review: read
Expand All @@ -214,7 +219,7 @@ the material:

Load more than one content reference only when the material genuinely crosses
domains. Reasoning guidance supplements a content reference; it does not replace
technical, academic, or governance rules.
technical, academic, clinical, legal, or governance rules.

For low-density or clearly human-authored prose, make only the smallest
defensible edits.
Expand All @@ -226,7 +231,9 @@ Read these files for the full pattern catalog, examples, and remediation guidanc
- [Core patterns (40 patterns, before/after examples)](references/core-patterns.md)
- [Technical writing and literal preservation](references/technical.md)
- [Academic and research prose](references/academic.md)
- [Clinical and patient-safety prose](references/clinical.md)
- [Policy, governance, and compliance prose](references/governance.md)
- [Legal and regulatory prose](references/legal.md)
- [Reasoning failures and self-contradictions](references/reasoning-failures.md)
- [FOI-O final editorial workflow and evidence receipt](references/foio-editorial.md)

Expand Down
6 changes: 5 additions & 1 deletion SKILL_PROFESSIONAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ Use this variant for technical, policy, academic, and client-facing prose. Keep
- [Core patterns](references/core-patterns.md) — always apply
- [Technical module](references/technical.md) — code and technical docs
- [Academic module](references/academic.md) — papers and formal research
- [Clinical module](references/clinical.md) — health research and patient-safety prose
- [Governance module](references/governance.md) — policy and compliance
- [Legal module](references/legal.md) — contracts, advice, and regulatory filings
- [Reasoning module](references/reasoning-failures.md) — reasoning failures and contradictions
- [FOI-O editorial workflow](references/foio-editorial.md) — final manuscript pass and receipt

Expand All @@ -24,7 +26,9 @@ Use this variant for technical, policy, academic, and client-facing prose. Keep
1. Analyze input context:
* Code or technical docs -> Core + Technical
* Papers, essays, or formal research -> Core + Academic
* Health research or clinical-safety prose -> Core + Clinical, plus Academic or Governance as required
* Policy, risk, or compliance writing -> Core + Governance
* Legal-regulatory prose -> Core + Governance + Legal
* Reasoning failures or self-contradictions -> Core + Reasoning
* FOI-O final manuscript editing -> Core + Academic + Governance + FOI-O
* Otherwise -> Core only
Expand Down Expand Up @@ -81,4 +85,4 @@ Vary sentence rhythm with short and long lines. Use specific details instead of

For severity tiers and false-positive guidance, read [Core patterns](references/core-patterns.md) (sections **SEVERITY CLASSIFICATION** and **DETECTION GUIDANCE**).

Available reference files: core-patterns.md, technical.md, academic.md, governance.md, reasoning-failures.md, foio-editorial.md.
Available reference files: core-patterns.md, technical.md, academic.md, clinical.md, governance.md, legal.md, reasoning-failures.md, foio-editorial.md.
4 changes: 3 additions & 1 deletion conductor/tracks/domain-and-citation_20260811/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
- **Priority:** P0
- **Status:** In progress
- **Depends on:** `editorial-safety-invariants_20260811`
- **Current phase:** Phase 1Positioning and academic upgrade
- **Current phase:** Phase 4Creative reference
- **GitHub track:** [#277](https://github.com/edithatogo/authentext/issues/277)
- **Merged:** academic upgrade [PR #297](https://github.com/edithatogo/authentext/pull/297)
- **In flight:** clinical + legal modules (this branch)

## Artifacts

Expand Down
10 changes: 7 additions & 3 deletions conductor/tracks/domain-and-citation_20260811/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@
"status": "in_progress",
"created_at": "2026-08-11",
"updated_at": "2026-08-12",
"current_phase": "Phase 1: Positioning and academic upgrade",
"current_phase": "Phase 4: Creative reference",
"parallel_safe": false,
"depends_on": ["editorial-safety-invariants_20260811"],
"coordinates_with": ["pattern-registry-contracts_20260811"],
"depends_on": [
"editorial-safety-invariants_20260811"
],
"coordinates_with": [
"pattern-registry-contracts_20260811"
],
"github": {
"project_number": 36,
"project_url": "https://github.com/users/edithatogo/projects/36",
Expand Down
40 changes: 23 additions & 17 deletions conductor/tracks/domain-and-citation_20260811/plan.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,37 @@
# Implementation Plan: Domain and Citation Coverage

## Phase 1: Positioning and academic upgrade
## Phase 1: Positioning and academic upgrade [checkpoint: aa18c2b]

- [x] Task: Write failing tests for detector-evasion refusal wording and for
academic disclosure / interface-artefact / tortured-phrase / bibliography
refuse rules.
refuse rules. [aa18c2b]
- [x] Task: Update `conductor/product.md` and the compiled skill description
so Authentext is editorial defect repair with verified diffs, not a
humanizer that chases detector scores. `product.md` already stated the
refusal; the compiled skill description now matches.
refusal; the compiled skill description now matches. [aa18c2b]
- [x] Task: Upgrade `src/modules/SKILL_ACADEMIC.md` with publisher-branching
disclosure, interface-artefact hard errors, tortured-phrase lexicon,
and out-of-scope reference lists.
- [ ] Task: Phase Verification & Checkpoint (Refer to `workflow.md`).
and out-of-scope reference lists. [aa18c2b]
- [x] Task: Phase Verification & Checkpoint (Refer to `workflow.md`). [aa18c2b]
Evidence: merged as PR #297. Local command `CI=true npm test` green on
the clinical/legal follow-on branch after rebase onto main.

## Phase 2: Clinical reference
## Phase 2: Clinical reference [checkpoint: faebf1a]

- [ ] Task: Write failing compile, routing, and locked-span tests for
clinical material, including patient-facing FKGL report-not-rewrite.
- [ ] Task: Add `src/modules/SKILL_CLINICAL.md` and teach the compiler to
emit `references/clinical.md`.
- [ ] Task: Phase Verification & Checkpoint (Refer to `workflow.md`).
- [x] Task: Write failing compile, routing, and locked-span tests for
clinical material, including patient-facing FKGL report-not-rewrite. [122b772]
- [x] Task: Add `src/modules/SKILL_CLINICAL.md` and teach the compiler to
emit `references/clinical.md`. [122b772]
- [x] Task: Phase Verification & Checkpoint (Refer to `workflow.md`). [faebf1a]
Evidence: `npm run sync`; `CI=true npm test` — 286 pass, integration green.

## Phase 3: Legal reference
## Phase 3: Legal reference [checkpoint: faebf1a]

- [ ] Task: Write failing tests for modal, defined-term, carve-out, temporal,
and citation-unverified locks, plus omission-versus-invention reporting.
- [ ] Task: Add `src/modules/SKILL_LEGAL.md` and emit `references/legal.md`.
- [ ] Task: Phase Verification & Checkpoint (Refer to `workflow.md`).
- [x] Task: Write failing tests for modal, defined-term, carve-out, temporal,
and citation-unverified locks, plus omission-versus-invention reporting. [122b772]
- [x] Task: Add `src/modules/SKILL_LEGAL.md` and emit `references/legal.md`. [122b772]
- [x] Task: Phase Verification & Checkpoint (Refer to `workflow.md`). [faebf1a]
Evidence: same as Phase 2; governance pointer to `legal.md` only.

## Phase 4: Creative reference

Expand All @@ -39,9 +43,11 @@

## Phase 5: Profile registry routing

- [ ] Task: Point `health-research` and `clinical-safety` at `clinical.md`,
- [~] Task: Point `health-research` and `clinical-safety` at `clinical.md`,
`legal-regulatory` at `legal.md`, and `creative-narrative` at
`creative.md`. Update registry tests.
Clinical and legal family routing landed in [122b772]; creative remains
for Phase 4 / PR 3.
- [ ] Task: Phase Verification & Checkpoint (Refer to `workflow.md`).

## Phase 6: Sourceright and citeweft handoff
Expand Down
161 changes: 161 additions & 0 deletions references/clinical.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
# Module: Clinical

## Description

This module applies to health-research manuscripts and clinical-safety prose: trial reports, observational studies, protocols, guidelines, handovers, incident reviews, and patient-facing material. It repairs editorial defects with verified diffs. It does not certify clinical safety, submission readiness, or detector evasion.

Load this reference with academic and governance guidance when the document is a study report. Load it with governance guidance when the document is a guideline, handover, or incident review.

**When to Apply:**

- Randomised trials, observational studies, systematic reviews, protocols, case reports
- Clinical guidelines and safety notices
- Handovers and incident reviews
- Patient information and consent materials

**When NOT to Apply:**

- Creative writing
- Purely technical software documentation
- Marketing or commercial claims about products

Authentext does not prove that a protocol, label, or patient leaflet is safe or compliant.

---

## HARD-LOCKED SPANS

These spans cannot be edited as prose. Changing them changes the clinical claim.

### Doses, units, and modifiers

Lock the numeral, the unit, and any modifier that changes the dose:

- `5 mg`, `5mg`, `5 mg/kg`, `once daily`, `bd`, `PRN`
- Frequency words tied to a dose (`every 8 hours`, `three times daily`)
- Concentration and strength (`1:1000`, `0.9%`, `1000 micrograms`)

Do not normalise `micrograms` to `mcg` or `µg` unless the source already uses that form. Do not convert `5 mg/kg` into a flat milligram figure.

### Drug names

Do not swap brand and generic names. Do not "correct" spelling of a drug token. If the source says `adrenaline`, keep `adrenaline`; do not silently write `epinephrine`. If two names appear, keep both in the order given.

### Route and formulation

Lock route and formulation tokens: `IV`, `IM`, `PO`, `subcutaneous`, `modified-release`, `oral solution`, `nebulised`. Do not infer a missing route.

### Negation

Lock polarity. `no evidence of infection` is not `evidence of no infection`. `should not` is not `may`. Do not drop `not`, `never`, `absent`, or `negative`.

### Adverse-event language

`serious` is not `severe`. CIOMS frequency words have defined meanings and are locked:

| Word | Meaning in CIOMS frequency language |
| ----------- | ----------------------------------- |
| very common | ≥ 1/10 |
| common | ≥ 1/100 to < 1/10 |
| uncommon | ≥ 1/1,000 to < 1/100 |
| rare | ≥ 1/10,000 to < 1/1,000 |
| very rare | < 1/10,000 |

Do not replace `uncommon` with `rare`, or `serious` with `severe`, to sound more natural.

### Population scope and prognostic framing

Lock who the claim applies to (`adults ≥18 years`, `children under 5`, `pregnant people`) and prognostic framing (`associated with`, `predicts`, `does not predict`, `median survival`). Do not widen a subgroup into a general population.

---

## PATIENT-FACING MATERIAL

For patient-facing subtypes (`patient-material` and close relatives), **report** Flesch–Kincaid Grade Level (FKGL) and SMOG. Do not silently simplify. If a reading-age target exists, say whether the text meets it. Confirm key-message retention: every instruction, dose, warning, and "when to seek help" claim in the source must survive. If simplification would drop a warning, leave the sentence and report the conflict.

---

## CLINICAL PATTERNS

### Pattern C1: Softened Safety Language

**Problem:** AI hedges a locked clinical instruction until it no longer tells anyone what to do.

**Severity:** Critical

**Before:**

> Staff should generally consider escalating if the patient might potentially deteriorate.

**After:**

> Escalate if the source already names the trigger. Keep the named observation, threshold, and action. Do not invent a NEWS2 cut-off.

---

### Pattern C2: Brand/Generic Swap

**Problem:** AI "corrects" a drug name into the other naming system.

**Severity:** Critical

**Action:** Leave the token. Report the ambiguity. Do not add the other name unless it is already in the source.

---

### Pattern C3: Promotional Trial Abstracts

**Problem:** AI writes trial abstracts as product copy.

**Severity:** High

**Words to watch:** "groundbreaking", "game-changing", "life-saving", "robust evidence"

Keep the effect size, interval, and limitation already in the source. Do not upgrade `may reduce` to `reduces`.

---

## SEVERITY CLASSIFICATION

### Critical (must fix)

- Edits to doses, units, drug names, route, formulation, negation, or CIOMS frequency words
- Pattern C1: Softened safety language
- Pattern C2: Brand/generic swap

### High (strong AI signals)

- Pattern C3: Promotional trial abstracts
- Widened population or prognostic framing

### Medium

- Patient-facing text that was silently simplified without an FKGL/SMOG report

### Low

- Filler around otherwise intact methods or handover structure

---

## BEST PRACTICES

### Do

- Prefer cuts over new clinical sentences
- Report FKGL and SMOG for patient-facing material
- Keep every warning and "when to seek help" claim
- Load academic guidance for study reports and governance guidance for policies

### Don't

- Invent a dose, interval, or contraindication
- Swap `serious` and `severe`
- Generate, complete, or reformat a reference list
- Claim the pass makes the document clinically safe

---

_Module Version: 3.2.0_
_Last Updated: 2026-08-12_
_Applies to: Health research, guidelines, handovers, incident reviews, patient materials_
4 changes: 4 additions & 0 deletions references/governance.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ This module applies to governance writing: policies, risk assessments, complianc
- Marketing materials
- Informal communications

Legal-regulatory instruments (contracts, advice, affidavits, notices) still
load this module, then also load [legal.md](legal.md) for modal, defined-term,
carve-out, and temporal locks. Do not rewrite `shall` as `must` from Pattern G1.

---

## GOVERNANCE VOICE
Expand Down
Loading
Loading