diff --git a/SKILL.md b/SKILL.md index 38f9a75..29ffc6b 100644 --- a/SKILL.md +++ b/SKILL.md @@ -211,6 +211,8 @@ the material: [governance.md](references/governance.md). - Legal-regulatory prose (contracts, advice, affidavits, notices): read [legal.md](references/legal.md) with governance. +- Creative or narrative prose: read + [creative.md](references/creative.md). - 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 @@ -219,7 +221,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, clinical, legal, or governance rules. +technical, academic, clinical, legal, creative, or governance rules. For low-density or clearly human-authored prose, make only the smallest defensible edits. @@ -234,6 +236,7 @@ Read these files for the full pattern catalog, examples, and remediation guidanc - [Clinical and patient-safety prose](references/clinical.md) - [Policy, governance, and compliance prose](references/governance.md) - [Legal and regulatory prose](references/legal.md) +- [Creative and narrative prose](references/creative.md) - [Reasoning failures and self-contradictions](references/reasoning-failures.md) - [FOI-O final editorial workflow and evidence receipt](references/foio-editorial.md) diff --git a/SKILL_PROFESSIONAL.md b/SKILL_PROFESSIONAL.md index 770c32c..c52a7b4 100644 --- a/SKILL_PROFESSIONAL.md +++ b/SKILL_PROFESSIONAL.md @@ -18,6 +18,7 @@ Use this variant for technical, policy, academic, and client-facing prose. Keep - [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 +- [Creative module](references/creative.md) — fiction and narrative prose - [Reasoning module](references/reasoning-failures.md) — reasoning failures and contradictions - [FOI-O editorial workflow](references/foio-editorial.md) — final manuscript pass and receipt @@ -29,6 +30,7 @@ Use this variant for technical, policy, academic, and client-facing prose. Keep * 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 + * Creative or narrative prose -> Core + Creative * Reasoning failures or self-contradictions -> Core + Reasoning * FOI-O final manuscript editing -> Core + Academic + Governance + FOI-O * Otherwise -> Core only @@ -85,4 +87,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, clinical.md, governance.md, legal.md, reasoning-failures.md, foio-editorial.md. +Available reference files: core-patterns.md, technical.md, academic.md, clinical.md, governance.md, legal.md, creative.md, reasoning-failures.md, foio-editorial.md. diff --git a/docs/citation-manager-boundary.md b/docs/citation-manager-boundary.md index 762921f..5099c17 100644 --- a/docs/citation-manager-boundary.md +++ b/docs/citation-manager-boundary.md @@ -2,25 +2,56 @@ ## Status -Superseded on 2026-06-10 by sourceright extraction (track `modernization_20260610`). +Active handoff contract for Authentext (updated 2026-08-12 on track +`domain-and-citation_20260811`). Supersedes the 2026-06-10 sourceright-only +extraction note from track `modernization_20260610`. ## Decision -Citation and reference management no longer lives in this repository. The former experimental tree (`experiments/citation_ref_manager/`), the `humanizer-cite` MCP tool, the `scripts/research/citation-normalize.js` helper, and the `src/references.json` / `src/research_references.md` bibliography files have been removed. +Citation and reference management does not live in this repository. Authentext +**detects** bibliography or reference-list work, **refuses** to generate, +complete, reformat, or "fix" those lists, and **hands off** to the citation +authority when one is present. -**Permanent home:** the standalone **sourceright** project for citation normalization, reference verification, and bibliography maintenance. +**Citation authority (optional integration):** -## What stays in Humanizer +- [edithatogo/sourceright](https://github.com/edithatogo/sourceright) — + reference triage and verification infrastructure (CSL canonicalisation, + provider evidence, review queues, bibliography exports). +- [edithatogo/citeweft](https://github.com/edithatogo/citeweft) — neutral, + auditable scholarly document extraction core (span-preserving reference and + citation-callout extraction). CiteWeft does not assert bibliographic truth. -Humanizer-next remains a writing-skill repository. Academic **content patterns** that detect fake or malformed AI citations (for example patterns A9/A10 in the academic module) are part of the humanizer skill contract and are **not** citation-manager tooling. +Discovery is optional: a sibling clone, `AUTHENTXT_SOURCERIGHT_PATH` / +`AUTHENTXT_CITEWEFT_PATH`, or a configured local skill directory. When those +tools are absent, Authentext still refuses bibliography edits and points at the +GitHub homes above. See `scripts/lib/citation-handoff.js`. + +Do not install sourceright or citeweft into this repository. Do not rebuild a +citation database here. + +## What stays in Authentext + +Authentext remains a writing-skill repository. Academic **content patterns** +that detect fake or malformed AI citations (for example patterns A9/A10 in the +academic module) are part of the skill contract and are **not** citation-manager +tooling. Clinical and legal modules likewise refuse reference-list edits and +keep citations unverified by construction. ## Rationale -- The maintained surface is `SKILL.md`, `SKILL_PROFESSIONAL.md`, and the `src/` fragments that compile them. -- Citation-manager code did not feed the compiled skill outputs and duplicated work now owned by sourceright. -- Removing it narrows the repo contract and avoids implying that Humanizer installs or maintains a reference database. +- The maintained surface is `SKILL.md`, `SKILL_PROFESSIONAL.md`, and the `src/` + fragments that compile them. +- Citation-manager code did not feed the compiled skill outputs and duplicated + work now owned by sourceright / citeweft. +- Refusing locally either way avoids implying that Authentext installs or + maintains a reference database. ## History -- **2026-03-14:** Citation manager moved from `src/` to `experiments/citation_ref_manager/` (see prior version of this document). -- **2026-06-10:** Full extraction to sourceright; all citation-manager paths deleted from humanizer-next. +- **2026-03-14:** Citation manager moved from `src/` to + `experiments/citation_ref_manager/` (see prior version of this document). +- **2026-06-10:** Full extraction to sourceright; all citation-manager paths + deleted from humanizer-next. +- **2026-08-12:** Authentext duty restated as detect / refuse / hand off; + citeweft named beside sourceright. diff --git a/references/academic.md b/references/academic.md index 9496010..cb7e55e 100644 --- a/references/academic.md +++ b/references/academic.md @@ -253,7 +253,7 @@ Keep "ANOVA" only if the source already names it. ## CITATION AND REFERENCING -Reference lists are **out of scope**. Do not generate, complete, reformat, or "fix" a bibliography. Do not invent missing references, DOIs, PMIDs, page ranges, or author lists. Leave the reference list untouched and report the gap. +Reference lists are **out of scope**. Do not generate, complete, reformat, or "fix" a bibliography. Do not invent missing references, DOIs, PMIDs, page ranges, or author lists. Leave the reference list untouched and report the gap. Hand bibliography work to sourceright / citeweft when present (sibling clone, AUTHENTXT_SOURCERIGHT_PATH / AUTHENTXT_CITEWEFT_PATH, or configured skill); when absent, refuse locally and point to https://github.com/edithatogo/sourceright and https://github.com/edithatogo/citeweft. In-text citation tokens that already exist in the source are protected spans. You may flag a vague attribution (Pattern A1) or a padded span (Pattern A10). You may not rewrite the reference list to match. diff --git a/references/clinical.md b/references/clinical.md index 79b726b..3833b21 100644 --- a/references/clinical.md +++ b/references/clinical.md @@ -151,7 +151,7 @@ Keep the effect size, interval, and limitation already in the source. Do not upg - Invent a dose, interval, or contraindication - Swap `serious` and `severe` -- Generate, complete, or reformat a reference list +- Generate, complete, or reformat a reference list (hand off to sourceright / citeweft when present; refuse locally either way) - Claim the pass makes the document clinically safe --- diff --git a/references/creative.md b/references/creative.md new file mode 100644 index 0000000..46686d8 --- /dev/null +++ b/references/creative.md @@ -0,0 +1,187 @@ +# Module: Creative + +## Description + +This module applies to creative and narrative prose: fiction, narrative +non-fiction, profiles, speeches, and personal essays. It repairs editorial +defects with verified diffs. It does not optimise against detector scores and +does not claim undetectability. + +Prefer subtractive and reordering edits over generative ones. Diagnose +**structural** tells before surface style. Surface vocabulary and punctuation +tells are low-weight here. + +**When to Apply:** + +- Fiction and short stories +- Narrative non-fiction and personal essays +- Profiles and speeches with a narrative arc +- Creative-narrative document profiles + +**When NOT to Apply:** + +- Clinical, legal, or regulatory instruments +- Submitted academic manuscripts that are not creative work +- Technical reference documentation + +Authentext does not invent biographical facts for non-fiction. For fiction, +invented detail is the work only when the author is writing new fiction; do not +invent plot, setting, or character specifics the author has not supplied when +the task is editorial repair of an existing draft. + +--- + +## STRUCTURAL TELLS FIRST + +About nine in ten of the useful human-versus-AI fiction signal is narrative +structure, not surface style. Diagnose these before scrubbing diction: + +1. **Thematic over-explanation** — the text names its theme instead of letting + scenes carry it. +2. **Single-track plots** — every scene advances one plot line; no digression, + countercurrent, or wasted motion. +3. **Tidy resolution** — conflicts close cleanly; moral ambiguity is flattened. +4. **Low moral ambiguity** — characters are sorted into neat virtues and vices. +5. **Specificity deficit** — places, objects, and bodies stay generic + ("a small town", "her eyes", "the old house"). + +Report structural findings with passage anchors. Prefer cuts and reordering +over new invented scenes. + +--- + +## SPECIFICITY: ASK, DO NOT INVENT + +When a specificity gap blocks a good edit, **ask the author**. Do not invent +the missing detail to make the prose sound human. + +- Non-fiction / memoir / profile: inventing a street name, employer, diagnosis, + or quotation is a Critical failure. +- Fiction draft under editorial repair: do not invent plot beats, names, or + sensory specifics the author did not write. Ask, or leave the generic span + and report it. +- Fiction drafting when the user explicitly asks you to write new fiction is + outside this repair module's invent-nothing rule for story content; still + do not invent real-world citations or living persons' private facts. + +--- + +## SURFACE TELLS (LOW WEIGHT) + +Core patterns still apply, but weight them lightly for creative prose. +Intentional fragments, repetition, tonal shifts, and unusual punctuation can +be voice. Prefer leaving a deliberate quirk over flattening it into "clean" +prose. + +--- + +## MARKET POLICY AT EXPORT + +When the user is preparing a submission or export, surface relevant market +policy if it changes what they must disclose. Do not invent a market's rule. + +Documented examples (check the named market before treating these as current): + +- **Clarkesworld** bans AI-assisted submissions. +- **Authors Guild** certification is de minimis for some disclosure contexts. + +Authentext does not file the disclosure, certify compliance, or claim the +pass makes a manuscript market-ready. + +--- + +## CITATION AND REFERENCE LISTS + +Creative work that includes a bibliography or works-cited list still follows +the Authentext refuse path: do not generate, complete, reformat, or "fix" a +reference list. Hand that work to sourceright / citeweft when present; when +absent, refuse locally and point to those projects +(`https://github.com/edithatogo/sourceright`, +`https://github.com/edithatogo/citeweft`). + +--- + +## CREATIVE PATTERNS + +### Pattern R1: Thematic Billboarding + +**Problem:** AI announces the theme in thesis language. + +**Severity:** High + +**Before:** + +> This story explores the profound nature of grief and the human condition. + +**After:** + +> Cut the billboard. Keep the scene that already shows the grief. Do not invent +> a new elegiac paragraph to replace the summary. + +### Pattern R2: Tidy Moral Closure + +**Problem:** AI resolves every tension into a neat lesson. + +**Severity:** Medium + +**Action:** Prefer leaving unresolved tension the source already has. Do not +add a moral coda the author did not write. + +### Pattern R3: Invented Specificity + +**Problem:** AI fills a generic noun with a plausible proper noun or sensory +detail that is not in the source. + +**Severity:** Critical for non-fiction; Critical for repair-of-draft fiction +when the detail is new invention. + +**Action:** Ask the author, or leave the generic span and report the gap. + +--- + +## SEVERITY CLASSIFICATION + +### Critical + +- Invented biographical or factual specifics in non-fiction +- Invented plot, names, or sensory detail during editorial repair of a draft +- Bibliography generation or "fixing" + +### High + +- Pattern R1: Thematic billboarding that replaces scene +- Structural single-track flattening that drops an existing countercurrent + +### Medium + +- Pattern R2: Tidy moral closure +- Over-smoothing of intentional fragments + +### Low + +- Surface vocabulary tells without a structural cluster + +--- + +## BEST PRACTICES + +### Do + +- Diagnose structure before diction +- Ask the author when specificity is missing +- Keep intentional roughness that reads as voice +- Surface named market AI policies at export time when relevant + +### Don't + +- Invent the missing detail to beat a detector +- Flatten moral ambiguity the source already holds +- Generate or repair reference lists +- Treat Clarkesworld or Authors Guild notes as universal law without checking + the named market + +--- + +_Module Version: 3.2.0_ +_Last Updated: 2026-08-12_ +_Applies to: Fiction, narrative non-fiction, profiles, speeches, personal essays_ diff --git a/references/governance.md b/references/governance.md index 7afd52d..9e9c148 100644 --- a/references/governance.md +++ b/references/governance.md @@ -24,7 +24,7 @@ This module applies to governance writing: policies, risk assessments, complianc **When NOT to Apply:** -- Creative writing +- Creative writing (load [creative.md](creative.md) when that module is present) - Marketing materials - Informal communications diff --git a/references/legal.md b/references/legal.md index 7fef9a4..14cb0c9 100644 --- a/references/legal.md +++ b/references/legal.md @@ -143,7 +143,7 @@ Prefer the smaller edit. If either risk is present, leave the span and report it - Report omission-versus-invention for the edit set - Keep quotations and pinpoints exactly -- Point citation verification at sourceright or citeweft when those tools are in scope; otherwise refuse bibliography work locally +- Point citation verification at sourceright or citeweft (https://github.com/edithatogo/sourceright, https://github.com/edithatogo/citeweft) when those tools are in scope; otherwise refuse bibliography work locally ### Don't diff --git a/scripts/check-sync-clean.js b/scripts/check-sync-clean.js index 35aad51..f7cf6c6 100644 --- a/scripts/check-sync-clean.js +++ b/scripts/check-sync-clean.js @@ -16,6 +16,7 @@ const TARGET_FILES = [ 'references/clinical.md', 'references/governance.md', 'references/legal.md', + 'references/creative.md', 'references/reasoning-failures.md', ]; diff --git a/scripts/compile-skill.js b/scripts/compile-skill.js index 4570b24..aab1eba 100644 --- a/scripts/compile-skill.js +++ b/scripts/compile-skill.js @@ -33,6 +33,7 @@ const MODULES = { clinical: 'src/modules/SKILL_CLINICAL.md', governance: 'src/modules/SKILL_GOVERNANCE.md', legal: 'src/modules/SKILL_LEGAL.md', + creative: 'src/modules/SKILL_CREATIVE.md', reasoning: 'src/modules/SKILL_REASONING.md', foio: 'src/modules/SKILL_FOIO.md', }; @@ -51,6 +52,7 @@ const REFERENCE_FILES = { clinical: 'clinical.md', governance: 'governance.md', legal: 'legal.md', + creative: 'creative.md', reasoning: 'reasoning-failures.md', foio: 'foio-editorial.md', }; @@ -335,6 +337,7 @@ function compileStandardSkill(modules) { modules.clinical && '- [Clinical and patient-safety prose](references/clinical.md)', modules.governance && '- [Policy, governance, and compliance prose](references/governance.md)', modules.legal && '- [Legal and regulatory prose](references/legal.md)', + modules.creative && '- [Creative and narrative prose](references/creative.md)', modules.reasoning && '- [Reasoning failures and self-contradictions](references/reasoning-failures.md)', modules.foio && @@ -379,6 +382,8 @@ the material: [governance.md](references/governance.md). - Legal-regulatory prose (contracts, advice, affidavits, notices): read [legal.md](references/legal.md) with governance. +- Creative or narrative prose: read + [creative.md](references/creative.md). - 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 @@ -387,7 +392,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, clinical, legal, or governance rules. +technical, academic, clinical, legal, creative, or governance rules. For low-density or clearly human-authored prose, make only the smallest defensible edits. @@ -437,6 +442,8 @@ function compileProfessionalSkill(modules) { modules.governance && '- [Governance module](references/governance.md) — policy and compliance', modules.legal && '- [Legal module](references/legal.md) — contracts, advice, and regulatory filings', + modules.creative && + '- [Creative module](references/creative.md) — fiction and narrative prose', modules.reasoning && '- [Reasoning module](references/reasoning-failures.md) — reasoning failures and contradictions', modules.foio && @@ -469,6 +476,7 @@ ${moduleLinks} * 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 + * Creative or narrative prose -> Core + Creative * Reasoning failures or self-contradictions -> Core + Reasoning * FOI-O final manuscript editing -> Core + Academic + Governance + FOI-O * Otherwise -> Core only @@ -548,6 +556,7 @@ function compile() { clinical: readModule(MODULES.clinical), governance: readModule(MODULES.governance), legal: readModule(MODULES.legal), + creative: readModule(MODULES.creative), reasoning: readModule(MODULES.reasoning), foio: readModule(MODULES.foio), }; diff --git a/scripts/lib/citation-handoff.js b/scripts/lib/citation-handoff.js new file mode 100644 index 0000000..b2a1c13 --- /dev/null +++ b/scripts/lib/citation-handoff.js @@ -0,0 +1,84 @@ +/** + * Optional discovery helpers for sourceright / citeweft citation authority. + * Authentext never imports citation-manager code; it only detects presence + * so refuse-and-point messaging can name a local tool when one exists. + */ + +import fs from 'fs'; +import path from 'path'; + +const DEFAULT_SIBLING_NAMES = { + sourceright: ['sourceright'], + citeweft: ['citeweft'], +}; + +/** + * @param {string} tool + * @param {{ cwd?: string, env?: NodeJS.ProcessEnv, siblingRoot?: string }} [options] + * @returns {{ tool: string, present: boolean, path: string|null, reason: string }} + */ +export function discoverCitationTool(tool, options = {}) { + const env = options.env ?? process.env; + const cwd = options.cwd ?? process.cwd(); + const siblingRoot = options.siblingRoot ?? path.dirname(cwd); + const key = String(tool || '').toLowerCase(); + + if (key !== 'sourceright' && key !== 'citeweft') { + return { tool: key, present: false, path: null, reason: 'unknown-tool' }; + } + + const envKey = key === 'sourceright' ? 'AUTHENTXT_SOURCERIGHT_PATH' : 'AUTHENTXT_CITEWEFT_PATH'; + const fromEnv = env[envKey]; + if (fromEnv && fs.existsSync(fromEnv)) { + return { tool: key, present: true, path: path.resolve(fromEnv), reason: 'env' }; + } + + for (const name of DEFAULT_SIBLING_NAMES[key]) { + const candidate = path.join(siblingRoot, name); + if (fs.existsSync(candidate)) { + return { tool: key, present: true, path: path.resolve(candidate), reason: 'sibling-clone' }; + } + } + + const skillHints = [path.join(cwd, '.agents', 'skills', key), path.join(cwd, 'skills', key)]; + for (const candidate of skillHints) { + if (fs.existsSync(candidate)) { + return { + tool: key, + present: true, + path: path.resolve(candidate), + reason: 'configured-skill', + }; + } + } + + return { + tool: key, + present: false, + path: null, + reason: 'absent', + }; +} + +/** + * @param {{ cwd?: string, env?: NodeJS.ProcessEnv, siblingRoot?: string }} [options] + */ +export function resolveCitationHandoff(options = {}) { + const sourceright = discoverCitationTool('sourceright', options); + const citeweft = discoverCitationTool('citeweft', options); + const present = [sourceright, citeweft].filter((entry) => entry.present); + + return { + authority: present.length > 0 ? 'external' : 'refuse-locally', + present, + absent: [sourceright, citeweft].filter((entry) => !entry.present), + message: + present.length > 0 + ? 'Reference-list work belongs to the discovered citation authority; Authentext refuses bibliography edits.' + : 'Reference-list work is out of scope here. Use edithatogo/sourceright and edithatogo/citeweft when available; refuse bibliography edits either way.', + remotes: { + sourceright: 'https://github.com/edithatogo/sourceright', + citeweft: 'https://github.com/edithatogo/citeweft', + }, + }; +} diff --git a/src/document-intelligence/profile-registry.json b/src/document-intelligence/profile-registry.json index 37012d4..27ac96b 100644 --- a/src/document-intelligence/profile-registry.json +++ b/src/document-intelligence/profile-registry.json @@ -144,7 +144,7 @@ { "id": "creative-narrative", "subtypes": ["profile", "speech", "personal-essay", "narrative-non-fiction"], - "references": ["references/core-patterns.md"], + "references": ["references/core-patterns.md", "references/creative.md"], "checks": ["voice", "rhythm", "narrative-purpose", "factual-boundary"], "false_positive_risks": ["intentional fragments, repetition, punctuation, and tonal shifts"], "source_resolvers": ["project-style", "voice-sample"], diff --git a/src/modules/SKILL_ACADEMIC.md b/src/modules/SKILL_ACADEMIC.md index b84a469..3135a17 100644 --- a/src/modules/SKILL_ACADEMIC.md +++ b/src/modules/SKILL_ACADEMIC.md @@ -253,7 +253,7 @@ Keep "ANOVA" only if the source already names it. ## CITATION AND REFERENCING -Reference lists are **out of scope**. Do not generate, complete, reformat, or "fix" a bibliography. Do not invent missing references, DOIs, PMIDs, page ranges, or author lists. Leave the reference list untouched and report the gap. +Reference lists are **out of scope**. Do not generate, complete, reformat, or "fix" a bibliography. Do not invent missing references, DOIs, PMIDs, page ranges, or author lists. Leave the reference list untouched and report the gap. Hand bibliography work to sourceright / citeweft when present (sibling clone, AUTHENTXT_SOURCERIGHT_PATH / AUTHENTXT_CITEWEFT_PATH, or configured skill); when absent, refuse locally and point to https://github.com/edithatogo/sourceright and https://github.com/edithatogo/citeweft. In-text citation tokens that already exist in the source are protected spans. You may flag a vague attribution (Pattern A1) or a padded span (Pattern A10). You may not rewrite the reference list to match. diff --git a/src/modules/SKILL_CLINICAL.md b/src/modules/SKILL_CLINICAL.md index 6634a02..dd0a9e2 100644 --- a/src/modules/SKILL_CLINICAL.md +++ b/src/modules/SKILL_CLINICAL.md @@ -163,7 +163,7 @@ Keep the effect size, interval, and limitation already in the source. Do not upg - Invent a dose, interval, or contraindication - Swap `serious` and `severe` -- Generate, complete, or reformat a reference list +- Generate, complete, or reformat a reference list (hand off to sourceright / citeweft when present; refuse locally either way) - Claim the pass makes the document clinically safe --- diff --git a/src/modules/SKILL_CREATIVE.md b/src/modules/SKILL_CREATIVE.md new file mode 100644 index 0000000..b59b25a --- /dev/null +++ b/src/modules/SKILL_CREATIVE.md @@ -0,0 +1,199 @@ +--- +module_id: creative +version: 3.2.0 +description: Creative module for narrative prose and authorial voice +applies_to: fiction, narrative non-fiction, profiles, speeches, personal essays +severity_levels: + - Critical + - High + - Medium + - Low +--- + +# Module: Creative + +## Description + +This module applies to creative and narrative prose: fiction, narrative +non-fiction, profiles, speeches, and personal essays. It repairs editorial +defects with verified diffs. It does not optimise against detector scores and +does not claim undetectability. + +Prefer subtractive and reordering edits over generative ones. Diagnose +**structural** tells before surface style. Surface vocabulary and punctuation +tells are low-weight here. + +**When to Apply:** + +- Fiction and short stories +- Narrative non-fiction and personal essays +- Profiles and speeches with a narrative arc +- Creative-narrative document profiles + +**When NOT to Apply:** + +- Clinical, legal, or regulatory instruments +- Submitted academic manuscripts that are not creative work +- Technical reference documentation + +Authentext does not invent biographical facts for non-fiction. For fiction, +invented detail is the work only when the author is writing new fiction; do not +invent plot, setting, or character specifics the author has not supplied when +the task is editorial repair of an existing draft. + +--- + +## STRUCTURAL TELLS FIRST + +About nine in ten of the useful human-versus-AI fiction signal is narrative +structure, not surface style. Diagnose these before scrubbing diction: + +1. **Thematic over-explanation** — the text names its theme instead of letting + scenes carry it. +2. **Single-track plots** — every scene advances one plot line; no digression, + countercurrent, or wasted motion. +3. **Tidy resolution** — conflicts close cleanly; moral ambiguity is flattened. +4. **Low moral ambiguity** — characters are sorted into neat virtues and vices. +5. **Specificity deficit** — places, objects, and bodies stay generic + ("a small town", "her eyes", "the old house"). + +Report structural findings with passage anchors. Prefer cuts and reordering +over new invented scenes. + +--- + +## SPECIFICITY: ASK, DO NOT INVENT + +When a specificity gap blocks a good edit, **ask the author**. Do not invent +the missing detail to make the prose sound human. + +- Non-fiction / memoir / profile: inventing a street name, employer, diagnosis, + or quotation is a Critical failure. +- Fiction draft under editorial repair: do not invent plot beats, names, or + sensory specifics the author did not write. Ask, or leave the generic span + and report it. +- Fiction drafting when the user explicitly asks you to write new fiction is + outside this repair module's invent-nothing rule for story content; still + do not invent real-world citations or living persons' private facts. + +--- + +## SURFACE TELLS (LOW WEIGHT) + +Core patterns still apply, but weight them lightly for creative prose. +Intentional fragments, repetition, tonal shifts, and unusual punctuation can +be voice. Prefer leaving a deliberate quirk over flattening it into "clean" +prose. + +--- + +## MARKET POLICY AT EXPORT + +When the user is preparing a submission or export, surface relevant market +policy if it changes what they must disclose. Do not invent a market's rule. + +Documented examples (check the named market before treating these as current): + +- **Clarkesworld** bans AI-assisted submissions. +- **Authors Guild** certification is de minimis for some disclosure contexts. + +Authentext does not file the disclosure, certify compliance, or claim the +pass makes a manuscript market-ready. + +--- + +## CITATION AND REFERENCE LISTS + +Creative work that includes a bibliography or works-cited list still follows +the Authentext refuse path: do not generate, complete, reformat, or "fix" a +reference list. Hand that work to sourceright / citeweft when present; when +absent, refuse locally and point to those projects +(`https://github.com/edithatogo/sourceright`, +`https://github.com/edithatogo/citeweft`). + +--- + +## CREATIVE PATTERNS + +### Pattern R1: Thematic Billboarding + +**Problem:** AI announces the theme in thesis language. + +**Severity:** High + +**Before:** + +> This story explores the profound nature of grief and the human condition. + +**After:** + +> Cut the billboard. Keep the scene that already shows the grief. Do not invent +> a new elegiac paragraph to replace the summary. + +### Pattern R2: Tidy Moral Closure + +**Problem:** AI resolves every tension into a neat lesson. + +**Severity:** Medium + +**Action:** Prefer leaving unresolved tension the source already has. Do not +add a moral coda the author did not write. + +### Pattern R3: Invented Specificity + +**Problem:** AI fills a generic noun with a plausible proper noun or sensory +detail that is not in the source. + +**Severity:** Critical for non-fiction; Critical for repair-of-draft fiction +when the detail is new invention. + +**Action:** Ask the author, or leave the generic span and report the gap. + +--- + +## SEVERITY CLASSIFICATION + +### Critical + +- Invented biographical or factual specifics in non-fiction +- Invented plot, names, or sensory detail during editorial repair of a draft +- Bibliography generation or "fixing" + +### High + +- Pattern R1: Thematic billboarding that replaces scene +- Structural single-track flattening that drops an existing countercurrent + +### Medium + +- Pattern R2: Tidy moral closure +- Over-smoothing of intentional fragments + +### Low + +- Surface vocabulary tells without a structural cluster + +--- + +## BEST PRACTICES + +### Do + +- Diagnose structure before diction +- Ask the author when specificity is missing +- Keep intentional roughness that reads as voice +- Surface named market AI policies at export time when relevant + +### Don't + +- Invent the missing detail to beat a detector +- Flatten moral ambiguity the source already holds +- Generate or repair reference lists +- Treat Clarkesworld or Authors Guild notes as universal law without checking + the named market + +--- + +_Module Version: 3.2.0_ +_Last Updated: 2026-08-12_ +_Applies to: Fiction, narrative non-fiction, profiles, speeches, personal essays_ diff --git a/src/modules/SKILL_GOVERNANCE.md b/src/modules/SKILL_GOVERNANCE.md index 7b63b16..2eeeb68 100644 --- a/src/modules/SKILL_GOVERNANCE.md +++ b/src/modules/SKILL_GOVERNANCE.md @@ -27,7 +27,7 @@ This module applies to governance writing: policies, risk assessments, complianc **When NOT to Apply:** -- Creative writing +- Creative writing (load [creative.md](creative.md) when that module is present) - Marketing materials - Informal communications diff --git a/src/modules/SKILL_LEGAL.md b/src/modules/SKILL_LEGAL.md index e823f45..1f889ec 100644 --- a/src/modules/SKILL_LEGAL.md +++ b/src/modules/SKILL_LEGAL.md @@ -155,7 +155,7 @@ Prefer the smaller edit. If either risk is present, leave the span and report it - Report omission-versus-invention for the edit set - Keep quotations and pinpoints exactly -- Point citation verification at sourceright or citeweft when those tools are in scope; otherwise refuse bibliography work locally +- Point citation verification at sourceright or citeweft (https://github.com/edithatogo/sourceright, https://github.com/edithatogo/citeweft) when those tools are in scope; otherwise refuse bibliography work locally ### Don't diff --git a/test/domain-citation-creative-handoff.test.js b/test/domain-citation-creative-handoff.test.js new file mode 100644 index 0000000..7404760 --- /dev/null +++ b/test/domain-citation-creative-handoff.test.js @@ -0,0 +1,104 @@ +import assert from 'node:assert/strict'; +import fs from 'node:fs'; +import os from 'node:os'; +import path from 'node:path'; +import test from 'node:test'; +import { resolveProfileRoute } from '../scripts/lib/document-profile-registry.js'; +import { discoverCitationTool, resolveCitationHandoff } from '../scripts/lib/citation-handoff.js'; + +const compiler = fs.readFileSync('scripts/compile-skill.js', 'utf8'); +const skill = fs.readFileSync('SKILL.md', 'utf8'); +const professional = fs.readFileSync('SKILL_PROFESSIONAL.md', 'utf8'); +const creative = fs.existsSync('src/modules/SKILL_CREATIVE.md') + ? fs.readFileSync('src/modules/SKILL_CREATIVE.md', 'utf8') + : ''; +const creativeRef = fs.existsSync('references/creative.md') + ? fs.readFileSync('references/creative.md', 'utf8') + : ''; +const academic = fs.readFileSync('src/modules/SKILL_ACADEMIC.md', 'utf8'); +const clinical = fs.readFileSync('src/modules/SKILL_CLINICAL.md', 'utf8'); +const legal = fs.readFileSync('src/modules/SKILL_LEGAL.md', 'utf8'); +const boundary = fs.readFileSync('docs/citation-manager-boundary.md', 'utf8'); +const registry = JSON.parse( + fs.readFileSync('src/document-intelligence/profile-registry.json', 'utf8') +); + +function profile(id) { + return registry.profiles.find((entry) => entry.id === id); +} + +test('compiler emits and routes the creative reference', () => { + assert.match(compiler, /SKILL_CREATIVE\.md/); + assert.match(compiler, /creative: 'creative\.md'/); + assert.ok(fs.existsSync('references/creative.md'), 'references/creative.md missing'); + assert.match(skill, /references\/creative\.md/); + assert.match(professional, /references\/creative\.md/); +}); + +test('creative module diagnoses structure first and never invents specificity', () => { + for (const source of [creative, creativeRef]) { + assert.match(source, /structural/i); + assert.match(source, /thematic over-explanation|billboard/i); + assert.match(source, /single-track/i); + assert.match(source, /tidy resolution|tidy moral/i); + assert.match(source, /moral ambiguity/i); + assert.match(source, /specificity/i); + assert.match(source, /ask the author/i); + assert.match(source, /Do not invent/i); + assert.match(source, /Clarkesworld/); + assert.match(source, /Authors Guild/); + assert.match(source, /low-weight|low weight/i); + } +}); + +test('creative-narrative profile loads creative.md', () => { + assert.ok(profile('creative-narrative').references.includes('references/creative.md')); + assert.deepEqual(resolveProfileRoute({ archetype: 'creative-narrative' }).references, [ + 'references/core-patterns.md', + 'references/creative.md', + ]); +}); + +test('academic clinical and legal modules refuse bibliographies and point at sourceright/citeweft', () => { + for (const source of [academic, clinical, legal, creative]) { + assert.match(source, /sourceright/i); + assert.match(source, /citeweft/i); + // Different modules use slightly different refusal phrasing; the intent + // must remain that reference-list work is refused locally. + assert.match( + source, + /Do not generate, complete, reformat|Generate, complete, or reformat/i + ); + } +}); + +test('citation boundary doc makes Authentext duty detect-refuse-hand-off', () => { + assert.match(boundary, /sourceright/i); + assert.match(boundary, /citeweft/i); + assert.match(boundary, /detects|detect,/i); + assert.match(boundary, /refuses|refuse/i); + assert.match(boundary, /hands off|hand off/i); + assert.match(boundary, /edithatogo\/sourceright/); + assert.match(boundary, /edithatogo\/citeweft/); +}); + +test('citation handoff discovery reports present tools', () => { + const siblingRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'auth-cite-present-')); + fs.mkdirSync(path.join(siblingRoot, 'sourceright')); + fs.mkdirSync(path.join(siblingRoot, 'citeweft')); + const handoff = resolveCitationHandoff({ cwd: process.cwd(), siblingRoot, env: {} }); + assert.equal(handoff.authority, 'external'); + assert.equal(handoff.present.length, 2); + assert.match(handoff.message, /discovered citation authority/i); + assert.equal(discoverCitationTool('sourceright', { siblingRoot, env: {} }).present, true); +}); + +test('citation handoff discovery refuses locally when tools are absent', () => { + const siblingRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'auth-cite-absent-')); + const handoff = resolveCitationHandoff({ cwd: process.cwd(), siblingRoot, env: {} }); + assert.equal(handoff.authority, 'refuse-locally'); + assert.equal(handoff.present.length, 0); + assert.match(handoff.message, /out of scope/i); + assert.match(handoff.remotes.sourceright, /edithatogo\/sourceright/); + assert.match(handoff.remotes.citeweft, /edithatogo\/citeweft/); +}); diff --git a/test/identity-metadata.test.js b/test/identity-metadata.test.js index c45a980..a65019e 100644 --- a/test/identity-metadata.test.js +++ b/test/identity-metadata.test.js @@ -46,6 +46,7 @@ test('canonical modules use the package version and Authentext identity', () => 'SKILL_CLINICAL.md', 'SKILL_GOVERNANCE.md', 'SKILL_LEGAL.md', + 'SKILL_CREATIVE.md', 'SKILL_REASONING.md', ]) { const source = fs.readFileSync(`src/modules/${filename}`, 'utf8');