diff --git a/SKILL.md b/SKILL.md index 57b8c95..d76b000 100644 --- a/SKILL.md +++ b/SKILL.md @@ -82,6 +82,9 @@ the material: [governance.md](references/governance.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 + [foio-editorial.md](references/foio-editorial.md), plus the academic and + governance references it requires. Load more than one content reference only when the material genuinely crosses domains. Reasoning guidance supplements a content reference; it does not replace @@ -99,6 +102,7 @@ Read these files for the full pattern catalog, examples, and remediation guidanc - [Academic and research prose](references/academic.md) - [Policy, governance, and compliance prose](references/governance.md) - [Reasoning failures and self-contradictions](references/reasoning-failures.md) +- [FOI-O final editorial workflow and evidence receipt](references/foio-editorial.md) Apply the relevant patterns from the selected reference files. This root skill keeps workflow, severity tiers, and detection guardrails; the references hold diff --git a/SKILL_PROFESSIONAL.md b/SKILL_PROFESSIONAL.md index 7bfacd8..5683ecc 100644 --- a/SKILL_PROFESSIONAL.md +++ b/SKILL_PROFESSIONAL.md @@ -17,6 +17,7 @@ Use this variant for technical, policy, academic, and client-facing prose. Keep - [Academic module](references/academic.md) — papers and formal research - [Governance module](references/governance.md) — policy and compliance - [Reasoning module](references/reasoning-failures.md) — reasoning failures and contradictions +- [FOI-O editorial workflow](references/foio-editorial.md) — final manuscript pass and receipt ## ROUTING LOGIC @@ -24,7 +25,8 @@ Use this variant for technical, policy, academic, and client-facing prose. Keep * Code or technical docs -> Core + Technical * Papers, essays, or formal research -> Core + Academic * Policy, risk, or compliance writing -> Core + Governance - * Reasoning failures or self-contradictions -> Core + Reasoning + * Reasoning failures or self-contradictions -> Core + Reasoning + * FOI-O final manuscript editing -> Core + Academic + Governance + FOI-O * Otherwise -> Core only 2. Open the linked reference files for the selected modules and apply their patterns. @@ -79,4 +81,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. +Available reference files: core-patterns.md, technical.md, academic.md, governance.md, reasoning-failures.md, foio-editorial.md. diff --git a/conductor/github-mapping.json b/conductor/github-mapping.json index 671127f..903c23f 100644 --- a/conductor/github-mapping.json +++ b/conductor/github-mapping.json @@ -1,6 +1,6 @@ { "schema_version": 1, - "generated_at": "2026-08-01T05:57:41.665Z", + "generated_at": "2026-08-01T08:00:00.000Z", "repository": "edithatogo/authentext", "project": { "number": 36, @@ -8,11 +8,11 @@ "url": "https://github.com/users/edithatogo/projects/36" }, "counts": { - "tracks": 31, - "phases": 128, - "repository_issues": 168, - "open_tracks": 0, - "historical_tracks": 31 + "tracks": 33, + "phases": 132, + "repository_issues": 174, + "open_tracks": 1, + "historical_tracks": 32 }, "verification": { "verified_at": "2026-08-01", @@ -20,9 +20,93 @@ "duplicate_phase_markers": 0, "native_parent_child_relationships": "verified", "issue_states": "verified", - "project_membership": "159/159" + "project_membership": "165/165" }, "tracks": [ + { + "track_id": "renovate-codecov-verification_20260801", + "title": "Renovate and Codecov Verification", + "path": "conductor/tracks/renovate-codecov-verification_20260801", + "priority": "P1", + "historical": false, + "metadata_status": "in_progress", + "parent_issue": { + "number": 234, + "node_id": "I_kwDORAMgA88AAAABLCgAGQ", + "url": "https://github.com/edithatogo/authentext/issues/234", + "state": "open" + }, + "phases": [ + { + "phase_id": "renovate-codecov-verification_20260801.phase1", + "number": 1, + "title": "Repository integration", + "source": "conductor/tracks/renovate-codecov-verification_20260801/plan.md", + "reconstructed": false, + "issue": { + "number": 235, + "node_id": "I_kwDORAMgA88AAAABLCgAqQ", + "url": "https://github.com/edithatogo/authentext/issues/235", + "state": "closed" + } + }, + { + "phase_id": "renovate-codecov-verification_20260801.phase2", + "number": 2, + "title": "Hosted verification", + "source": "conductor/tracks/renovate-codecov-verification_20260801/plan.md", + "reconstructed": false, + "issue": { + "number": 236, + "node_id": "I_kwDORAMgA88AAAABLCgBLw", + "url": "https://github.com/edithatogo/authentext/issues/236", + "state": "open" + } + } + ] + }, + { + "track_id": "foio-editorial-workflow_20260801", + "title": "FOI-O Editorial Workflow", + "path": "conductor/tracks/archive/foio-editorial-workflow_20260801", + "priority": "P1", + "historical": true, + "metadata_status": "archived", + "parent_issue": { + "number": 237, + "node_id": "I_kwDORAMgA88AAAABLChMvg", + "url": "https://github.com/edithatogo/authentext/issues/237", + "state": "closed" + }, + "phases": [ + { + "phase_id": "foio-editorial-workflow_20260801.phase1", + "number": 1, + "title": "Portable workflow contract", + "source": "conductor/tracks/archive/foio-editorial-workflow_20260801/plan.md", + "reconstructed": false, + "issue": { + "number": 238, + "node_id": "I_kwDORAMgA88AAAABLChNqA", + "url": "https://github.com/edithatogo/authentext/issues/238", + "state": "closed" + } + }, + { + "phase_id": "foio-editorial-workflow_20260801.phase2", + "number": 2, + "title": "Hosted reconciliation and closeout", + "source": "conductor/tracks/archive/foio-editorial-workflow_20260801/plan.md", + "reconstructed": false, + "issue": { + "number": 239, + "node_id": "I_kwDORAMgA88AAAABLChOpw", + "url": "https://github.com/edithatogo/authentext/issues/239", + "state": "closed" + } + } + ] + }, { "track_id": "post-release-security-quality-frontier_20260801", "title": "Post-Release Security and Quality Frontier", diff --git a/conductor/index.md b/conductor/index.md index 4248c71..620970b 100644 --- a/conductor/index.md +++ b/conductor/index.md @@ -20,6 +20,7 @@ than guessing paths. - [Roadmap](./roadmap.md) - [Tracks Registry](./tracks.md) - [Active Renovate and Codecov Track](./tracks/renovate-codecov-verification_20260801/index.md) +- [Archived FOI-O Editorial Workflow Track](./tracks/archive/foio-editorial-workflow_20260801/index.md) - [Archived Security and Quality Track](./tracks/archive/post-release-security-quality-frontier_20260801/index.md) - [Released Bleeding-Edge Track](./tracks/archive/bleeding-edge-agent-skills-conductor_20260731/index.md) - [GitHub Issue Mapping](./github-mapping.json) diff --git a/conductor/roadmap.md b/conductor/roadmap.md index ff3be1d..3a95b80 100644 --- a/conductor/roadmap.md +++ b/conductor/roadmap.md @@ -7,6 +7,18 @@ Local Conductor files define scope and evidence. GitHub issues, subissues, and Project fields mirror that state; they do not establish implementation, publication, or release. +## Active: hosted dependency closeout + +- Verify Renovate hosted access while retaining Dependabot until health is + evidenced; retain Codecov OIDC alongside repository-owned coverage gates. + +## Completed: FOI-O editorial workflow + +- Implement the FOI-O final editorial workflow with deterministic preservation + checks and evidence receipts. +- Keep manuscript acceptance, submission, and publication as explicit human + gates outside repository completion. + ## Completed: post-release security and quality frontier - Move maintained automation from EOL Node 20 to Node 24 LTS. diff --git a/conductor/tracks.md b/conductor/tracks.md index e389b88..93dbfa1 100644 --- a/conductor/tracks.md +++ b/conductor/tracks.md @@ -29,6 +29,12 @@ This file tracks all major tracks for the project. Each track has its own detail **Latest archives:** +- [x] **foio-editorial-workflow_20260801** - Portable, fail-closed FOI-O final + editorial workflow with privacy-conscious evidence receipts and retained + human acceptance/publication gates. See + [`tracks/archive/foio-editorial-workflow_20260801/`](./tracks/archive/foio-editorial-workflow_20260801/index.md) + and GitHub [#237](https://github.com/edithatogo/authentext/issues/237). + - [x] **post-release-security-quality-frontier_20260801** - Node 24 and audited dependencies, native coverage evidence, solo-maintainer safeguards, and reconciled hosted/backlog state. See diff --git a/conductor/tracks/archive/foio-editorial-workflow_20260801/design.md b/conductor/tracks/archive/foio-editorial-workflow_20260801/design.md new file mode 100644 index 0000000..96be12e --- /dev/null +++ b/conductor/tracks/archive/foio-editorial-workflow_20260801/design.md @@ -0,0 +1,22 @@ +# Design: FOI-O Editorial Workflow + +```mermaid +flowchart TD + A["Editorial intake"] --> B["Capture protected material"] + B --> C["Restrained Authentext edit"] + C --> D["Deterministic preservation checks"] + D -->|"pass"| E["Write evidence receipt"] + D -->|"fail"| F["Reject output and report drift"] + E --> G["Human editorial acceptance gate"] + G -->|"approved externally"| H["Separate submission or publication process"] + G -->|"not approved"| I["Retain as unpublished draft"] +``` + +## Components + +- Canonical academic guidance describes when and how the workflow is invoked. +- A repository script compares protected semantic tokens between source and + edited text and emits a deterministic JSON receipt. +- Tests exercise valid preservation and each fail-closed boundary. +- Conductor and GitHub retain implementation evidence; they do not confer + editorial or publication approval. diff --git a/conductor/tracks/archive/foio-editorial-workflow_20260801/index.md b/conductor/tracks/archive/foio-editorial-workflow_20260801/index.md new file mode 100644 index 0000000..3b35177 --- /dev/null +++ b/conductor/tracks/archive/foio-editorial-workflow_20260801/index.md @@ -0,0 +1,7 @@ +# FOI-O Editorial Workflow + +- [Specification](./spec.md) +- [MoSCoW requirements](./requirements.md) +- [Design](./design.md) +- [Plan](./plan.md) +- [Metadata](./metadata.json) diff --git a/conductor/tracks/archive/foio-editorial-workflow_20260801/metadata.json b/conductor/tracks/archive/foio-editorial-workflow_20260801/metadata.json new file mode 100644 index 0000000..9ed6c87 --- /dev/null +++ b/conductor/tracks/archive/foio-editorial-workflow_20260801/metadata.json @@ -0,0 +1,10 @@ +{ + "track_id": "foio-editorial-workflow_20260801", + "title": "FOI-O Editorial Workflow", + "type": "feature", + "priority": "P1", + "status": "archived", + "created_at": "2026-08-01", + "updated_at": "2026-08-01", + "current_phase": "Complete" +} diff --git a/conductor/tracks/archive/foio-editorial-workflow_20260801/plan.md b/conductor/tracks/archive/foio-editorial-workflow_20260801/plan.md new file mode 100644 index 0000000..037c5e9 --- /dev/null +++ b/conductor/tracks/archive/foio-editorial-workflow_20260801/plan.md @@ -0,0 +1,17 @@ +# Plan: FOI-O Editorial Workflow + +## Phase 1: Portable workflow contract [checkpoint: 49dfe89] + +- [x] Add failing tests for protected-material validation and evidence receipts. +- [x] Implement the portable validator and receipt contract. +- [x] Integrate the workflow into canonical academic guidance and regenerate. +- [x] Phase verification and checkpoint per `conductor/workflow.md`. + +## Phase 2: Hosted reconciliation and closeout [checkpoint: e3bc8b6] + +- [x] Run sync, validation, lint, coverage, and full tests. +- [x] Mirror the track and phases as a GitHub issue hierarchy in Project 36. +- [x] Reconcile and close issue #61 with repository evidence while preserving + the external editorial-acceptance and publication gates. +- [x] Formal review and governed archive. +- [x] Phase verification and checkpoint per `conductor/workflow.md`. diff --git a/conductor/tracks/archive/foio-editorial-workflow_20260801/requirements.md b/conductor/tracks/archive/foio-editorial-workflow_20260801/requirements.md new file mode 100644 index 0000000..fa52aa8 --- /dev/null +++ b/conductor/tracks/archive/foio-editorial-workflow_20260801/requirements.md @@ -0,0 +1,34 @@ +# Requirements: FOI-O Editorial Workflow + +## Must + +- **FOIO-MUST-001:** Preserve citations, URLs, numerical meaning, epistemic + qualifiers, legal boundaries, and authorial stance. +- **FOIO-MUST-002:** Provide deterministic verification with a failing result + for protected-material drift. +- **FOIO-MUST-003:** Produce a portable evidence receipt containing tool, + skill/profile, version, input/output hashes, checks, and human-gate status. +- **FOIO-MUST-004:** Keep editorial acceptance, submission, and publication as + explicit human decisions. +- **FOIO-MUST-005:** Integrate through canonical source fragments and generated + artifacts. + +## Should + +- **FOIO-SHOULD-001:** Supply a reusable example receipt and workflow checklist. +- **FOIO-SHOULD-002:** Cover success and failure paths in automated tests. +- **FOIO-SHOULD-003:** Link repository evidence to the Conductor and GitHub + issue hierarchy. + +## Could + +- **FOIO-COULD-001:** Support additional receipt consumers through the stable + JSON contract. +- **FOIO-COULD-002:** Add domain-specific protected-token classes in later + tracks. + +## Won't this track + +- **FOIO-WONT-001:** Publish, submit, or certify an FOI-O manuscript. +- **FOIO-WONT-002:** Infer factual or legal correctness from token preservation. +- **FOIO-WONT-003:** Depend on host-only metadata or experimental APIs. diff --git a/conductor/tracks/archive/foio-editorial-workflow_20260801/spec.md b/conductor/tracks/archive/foio-editorial-workflow_20260801/spec.md new file mode 100644 index 0000000..2e2e640 --- /dev/null +++ b/conductor/tracks/archive/foio-editorial-workflow_20260801/spec.md @@ -0,0 +1,41 @@ +# Specification: FOI-O Editorial Workflow + +## Outcome + +Provide a portable Authentext workflow for final editorial processing of an +FOI-O manuscript after semantic and citation integrity have been established, +without claiming editorial acceptance or publishing the manuscript. + +## Functional requirements + +- Define a discoverable workflow for intake, protected-literal capture, + restrained editing, verification, and evidence recording. +- Preserve citations, URLs, numerical meaning, epistemic qualifiers, legal + boundaries, and authorial stance. +- Record tool, skill, prompt/profile, version, and verification evidence in a + portable machine-readable receipt. +- Fail closed when protected material changes or required evidence is absent. +- Keep final editorial acceptance, submission, and publication as human gates. + +## Non-functional requirements + +- Keep the portable Agent Skill independent of a particular host. +- Generate maintained root artifacts from canonical `src/` fragments. +- Add deterministic tests for positive and failure paths. +- Avoid authorship-detection or publication-certification claims. + +## Acceptance criteria + +- The workflow is discoverable from the canonical skill and academic guidance. +- Automated validation detects changed citations, URLs, numbers, qualifiers, + or legal boundary statements. +- A versioned evidence receipt schema and example are documented and tested. +- Full sync, validation, lint, coverage, and tests pass. +- GitHub issue #61 is linked to this track and closed only after repository + acceptance is evidenced; publication approval remains external. + +## Out of scope + +- Submitting or publishing a manuscript. +- Certifying factual, legal, semantic, or citation correctness. +- Replacing domain, legal, author, or journal editorial review. diff --git a/conductor/tracks/renovate-codecov-verification_20260801/evidence.md b/conductor/tracks/renovate-codecov-verification_20260801/evidence.md new file mode 100644 index 0000000..006e621 --- /dev/null +++ b/conductor/tracks/renovate-codecov-verification_20260801/evidence.md @@ -0,0 +1,49 @@ +# Hosted Verification Evidence + +Verified on 2026-08-01 against `edithatogo/authentext`. + +## Repository and Codecov + +- Pull request [#233](https://github.com/edithatogo/authentext/pull/233) merged + commit `780d07ff953bbe6b6d323eaa4428fb71edab5860` after the complete pull-request + matrix passed: CI, CodeQL, workflow lint, behavioral evaluation, portable + specification validation, GitHub publication preview, and skill validation on + Ubuntu, macOS, and Windows. +- The PR CI run + [30687665180](https://github.com/edithatogo/authentext/actions/runs/30687665180) + ran the pinned `codecov/codecov-action` commit with `use_oidc: true`, found + `coverage/lcov.info`, acquired the OIDC upload token, and queued the upload + successfully. The hosted `codecov/patch` check completed successfully. +- The default-branch CI run + [30687786382](https://github.com/edithatogo/authentext/actions/runs/30687786382) + repeated the OIDC upload for merge commit `780d07f`; Codecov accepted 23,377 + bytes and returned the commit result URL. +- Native LCOV/JSON evidence, local thresholds, and the GitHub Actions coverage + artifact remain in place. + +## Renovate + +- `renovate.json` inherits the public + [`github>edithatogo/renovate-config`](https://github.com/edithatogo/renovate-config) + preset and enables the Dependency Dashboard. +- A paginated search of all repository issues and pull requests found no item + authored by `renovate[bot]` or another Renovate bot identity. +- The authenticated GitHub CLI token can administer the repository but cannot + install or enumerate user-account GitHub App installations. GitHub returned + `403` for the user-installations endpoint because it requires a GitHub-App + authorized user token. The repository-installation endpoint requires an App + JWT and therefore cannot establish the Renovate installation from a normal + repository token. +- Browser-assisted installation was attempted at + , but the available + browser-control bridge could not initialize in this session. No installation + click or authorization is claimed. + +## Remaining gate + +The repository owner must install or grant the Renovate GitHub App access to +`edithatogo/authentext` at +. After installation, +trigger Renovate if offered and verify a Renovate-authored Dependency Dashboard +or pull request. Until that evidence exists, `.github/dependabot.yml` remains +the fail-closed update path and this track remains in progress. diff --git a/conductor/tracks/renovate-codecov-verification_20260801/index.md b/conductor/tracks/renovate-codecov-verification_20260801/index.md index ff044d9..8d47679 100644 --- a/conductor/tracks/renovate-codecov-verification_20260801/index.md +++ b/conductor/tracks/renovate-codecov-verification_20260801/index.md @@ -4,4 +4,5 @@ - [MoSCoW requirements](./requirements.md) - [Design](./design.md) - [Plan](./plan.md) +- [Hosted verification evidence](./evidence.md) - [Metadata](./metadata.json) diff --git a/conductor/tracks/renovate-codecov-verification_20260801/metadata.json b/conductor/tracks/renovate-codecov-verification_20260801/metadata.json index abccfdb..e34b3b1 100644 --- a/conductor/tracks/renovate-codecov-verification_20260801/metadata.json +++ b/conductor/tracks/renovate-codecov-verification_20260801/metadata.json @@ -6,5 +6,5 @@ "status": "in_progress", "created_at": "2026-08-01", "updated_at": "2026-08-01", - "current_phase": "Phase 1: Repository integration" + "current_phase": "Phase 2: Hosted verification" } diff --git a/conductor/tracks/renovate-codecov-verification_20260801/plan.md b/conductor/tracks/renovate-codecov-verification_20260801/plan.md index f0b1bc0..fec82b5 100644 --- a/conductor/tracks/renovate-codecov-verification_20260801/plan.md +++ b/conductor/tracks/renovate-codecov-verification_20260801/plan.md @@ -1,18 +1,22 @@ # Plan: Renovate and Codecov Verification -## Phase 1: Repository integration +## Phase 1: Repository integration [checkpoint: ed741b8] - [x] Add failing integrity tests for Renovate fallback and Codecov OIDC. - [x] Inherit the shared Renovate preset and remove obsolete legacy rules. - [x] Add pinned Codecov OIDC upload without replacing native evidence. - [x] Run validation, coverage, audit, and full tests. -- [ ] Phase verification and checkpoint per `conductor/workflow.md`. +- [x] Phase verification and checkpoint per `conductor/workflow.md`. ## Phase 2: Hosted verification -- [ ] Verify the pull-request matrix and Codecov upload result. +- [x] Verify the pull-request matrix and Codecov upload result. - [ ] Verify Renovate app access and a Dashboard or pull request. -- [ ] Remove Dependabot only if Renovate is proven healthy. -- [ ] Record external authorization blockers without overstating completion. +- [x] Retain Dependabot because Renovate is not yet proven healthy. +- [x] Record external authorization blockers without overstating completion. - [ ] Formal review and governed archive. - [ ] Phase verification and checkpoint per `conductor/workflow.md`. + +Hosted receipts and the remaining owner-authorized UI gate are recorded in +[`evidence.md`](./evidence.md). Phase 2 remains incomplete until a +Renovate-authored Dependency Dashboard or pull request exists. diff --git a/references/foio-editorial.md b/references/foio-editorial.md new file mode 100644 index 0000000..1f79a3f --- /dev/null +++ b/references/foio-editorial.md @@ -0,0 +1,87 @@ +# Module: FOI-O final editorial workflow + +Use this workflow only after the manuscript owner has established semantic and +citation integrity. It is a final prose-editing pass, not a fact-check, +legal review, citation verifier, or publication system. + +## Preconditions + +- The input is a versioned manuscript snapshot. +- Citation and semantic-integrity review is complete. +- Unresolved factual, citation, authorship, confidentiality, or legal questions + are recorded for a human and are not silently resolved during rewriting. + +If a precondition is not met, return a review finding and stop before rewriting +the affected passage. + +## Portable workflow + +1. Record the input identifier or hash, Authentext version, tool or host name + and version, and the exact editorial prompt. Do not record manuscript text or + secrets in a receipt unless the user explicitly permits it. +2. Review first. Identify only concrete writing patterns and tie every finding + to a passage. Load both [academic.md](academic.md) and + [governance.md](governance.md) when legal or policy boundaries are present. +3. Rewrite only accepted findings. Preserve citation markers, URLs, identifiers, + numerical values and units, mathematical expressions, named legal + instruments, attributed statements, negation, and epistemic qualifiers. +4. Compare the source and revision. Treat any changed protected item as a + blocking error, not an editorial improvement. Escalate apparent source + errors rather than correcting them silently. +5. Record the output identifier or hash, protected-item comparison, unresolved + findings, and human decision state. A receipt describes the pass; it does + not certify the manuscript's truth, legality, originality, or fitness for + publication. +6. Return the revision, change notes, unresolved findings, and receipt. Mark + editorial acceptance and manuscript publication approval as pending until a + named human makes those decisions. + +## Protected meaning + +Preserve exact citation syntax wherever practical. Never add a citation to make +a claim appear supported, remove a citation because it seems unnecessary, or +change author, year, locator, DOI, or URL data during this pass. + +Preserve numbers, signs, ranges, dates, percentages, denominators, units, and +comparators. A stylistic rewrite must not turn association into causation, +possibility into probability, or a reported allegation into an established +fact. Keep qualifiers such as _may_, _could_, _suggests_, _estimated_, +_reported_, _alleged_, _subject to_, and _not established_ unless a human +editor explicitly approves a semantic change outside this workflow. + +Preserve legal boundaries, including confidentiality restrictions, privilege, +publication embargoes, jurisdictional limits, consent conditions, and statements +about what the authors do or do not know. Flag possible legal problems for +human review; do not provide legal clearance. + +## Evidence receipt + +Use a structured receipt with these fields: + +```json +{ + "schema_version": 1, + "workflow": "foio-final-editorial", + "input_sha256": "...", + "output_sha256": "...", + "authentext_version": "3.2.0", + "tool": { "name": "...", "version": "..." }, + "prompt_sha256": "...", + "protected_items": { "passed": false, "differences": [] }, + "unresolved_findings": [], + "human_gate": { + "editorial_acceptance": "pending", + "publication_approval": "pending" + } +} +``` + +Hashing the exact prompt gives reproducibility without placing potentially +sensitive prompt content in the receipt. A controlled evidence store may retain +the full prompt separately. + +## Authority boundary + +Authentext may prepare and document a revision. It must not submit or publish a +manuscript, claim that citations have been independently verified, certify any +claim, provide legal approval, or mark either human gate approved. diff --git a/scripts/compile-skill.js b/scripts/compile-skill.js index c60e7c5..af63fc2 100644 --- a/scripts/compile-skill.js +++ b/scripts/compile-skill.js @@ -26,6 +26,7 @@ const MODULES = { academic: 'src/modules/SKILL_ACADEMIC.md', governance: 'src/modules/SKILL_GOVERNANCE.md', reasoning: 'src/modules/SKILL_REASONING.md', + foio: 'src/modules/SKILL_FOIO.md', }; const OUTPUT = { @@ -41,6 +42,7 @@ const REFERENCE_FILES = { academic: 'academic.md', governance: 'governance.md', reasoning: 'reasoning-failures.md', + foio: 'foio-editorial.md', }; const STANDARD_DESCRIPTION = `Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's "Signs of AI writing" guide. Detects and fixes inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary, negative parallelisms, reasoning failures, and LLM artifacts. Includes severity classification, technical literal preservation, and density-aware detection guidance.`; @@ -317,6 +319,8 @@ function compileStandardSkill(modules) { modules.governance && '- [Policy, governance, and compliance prose](references/governance.md)', modules.reasoning && '- [Reasoning failures and self-contradictions](references/reasoning-failures.md)', + modules.foio && + '- [FOI-O final editorial workflow and evidence receipt](references/foio-editorial.md)', ].filter(Boolean); const body = `${intro} @@ -350,6 +354,9 @@ the material: [governance.md](references/governance.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 + [foio-editorial.md](references/foio-editorial.md), plus the academic and + governance references it requires. Load more than one content reference only when the material genuinely crosses domains. Reasoning guidance supplements a content reference; it does not replace @@ -401,6 +408,8 @@ function compileProfessionalSkill(modules) { modules.governance && '- [Governance module](references/governance.md) — policy and compliance', modules.reasoning && '- [Reasoning module](references/reasoning-failures.md) — reasoning failures and contradictions', + modules.foio && + '- [FOI-O editorial workflow](references/foio-editorial.md) — final manuscript pass and receipt', ] .filter(Boolean) .join('\n'); @@ -427,7 +436,8 @@ ${moduleLinks} * Code or technical docs -> Core + Technical * Papers, essays, or formal research -> Core + Academic * Policy, risk, or compliance writing -> Core + Governance - * Reasoning failures or self-contradictions -> Core + Reasoning + * Reasoning failures or self-contradictions -> Core + Reasoning + * FOI-O final manuscript editing -> Core + Academic + Governance + FOI-O * Otherwise -> Core only 2. Open the linked reference files for the selected modules and apply their patterns. @@ -504,6 +514,7 @@ function compile() { academic: readModule(MODULES.academic), governance: readModule(MODULES.governance), reasoning: readModule(MODULES.reasoning), + foio: readModule(MODULES.foio), }; const skillVersion = extractFrontmatter(modules.core)?.version ?? '3.0.0'; diff --git a/scripts/lib/foio-editorial.js b/scripts/lib/foio-editorial.js new file mode 100644 index 0000000..638c9c7 --- /dev/null +++ b/scripts/lib/foio-editorial.js @@ -0,0 +1,62 @@ +import { createHash } from 'node:crypto'; + +const PROTECTED_PATTERNS = { + citation: /\([^()\n]*\b(?:19|20)\d{2}[a-z]?[^()\n]*\)|\[[0-9,;\-\s]+\]/g, + url: /https?:\/\/[^\s)>\]]+/g, + number: /(? [ + type, + [...text.matchAll(pattern)].map(([value]) => value), + ]) + ); +} + +/** Compare protected manuscript items and create a privacy-conscious receipt. */ +export function createFoioEditorialReceipt({ + input, + output, + prompt, + authentextVersion, + tool, + unresolvedFindings = [], +}) { + const before = collectProtectedItems(input); + const after = collectProtectedItems(output); + const differences = Object.keys(before) + .filter((type) => JSON.stringify(before[type]) !== JSON.stringify(after[type])) + .map((type) => ({ + type, + before_count: before[type].length, + after_count: after[type].length, + before_sha256: hash(JSON.stringify(before[type])), + after_sha256: hash(JSON.stringify(after[type])), + })); + + return { + schema_version: 1, + workflow: 'foio-final-editorial', + input_sha256: hash(input), + output_sha256: hash(output), + authentext_version: authentextVersion, + tool, + prompt_sha256: hash(prompt), + protected_items: { passed: differences.length === 0, differences }, + unresolved_findings: unresolvedFindings, + human_gate: { + editorial_acceptance: 'pending', + publication_approval: 'pending', + }, + }; +} diff --git a/src/modules/SKILL_FOIO.md b/src/modules/SKILL_FOIO.md new file mode 100644 index 0000000..af68e3a --- /dev/null +++ b/src/modules/SKILL_FOIO.md @@ -0,0 +1,93 @@ +--- +name: authentext-foio +version: 3.2.0 +applies_to: FOI-O manuscripts after semantic and citation integrity review +--- + +# Module: FOI-O final editorial workflow + +Use this workflow only after the manuscript owner has established semantic and +citation integrity. It is a final prose-editing pass, not a fact-check, +legal review, citation verifier, or publication system. + +## Preconditions + +- The input is a versioned manuscript snapshot. +- Citation and semantic-integrity review is complete. +- Unresolved factual, citation, authorship, confidentiality, or legal questions + are recorded for a human and are not silently resolved during rewriting. + +If a precondition is not met, return a review finding and stop before rewriting +the affected passage. + +## Portable workflow + +1. Record the input identifier or hash, Authentext version, tool or host name + and version, and the exact editorial prompt. Do not record manuscript text or + secrets in a receipt unless the user explicitly permits it. +2. Review first. Identify only concrete writing patterns and tie every finding + to a passage. Load both [academic.md](academic.md) and + [governance.md](governance.md) when legal or policy boundaries are present. +3. Rewrite only accepted findings. Preserve citation markers, URLs, identifiers, + numerical values and units, mathematical expressions, named legal + instruments, attributed statements, negation, and epistemic qualifiers. +4. Compare the source and revision. Treat any changed protected item as a + blocking error, not an editorial improvement. Escalate apparent source + errors rather than correcting them silently. +5. Record the output identifier or hash, protected-item comparison, unresolved + findings, and human decision state. A receipt describes the pass; it does + not certify the manuscript's truth, legality, originality, or fitness for + publication. +6. Return the revision, change notes, unresolved findings, and receipt. Mark + editorial acceptance and manuscript publication approval as pending until a + named human makes those decisions. + +## Protected meaning + +Preserve exact citation syntax wherever practical. Never add a citation to make +a claim appear supported, remove a citation because it seems unnecessary, or +change author, year, locator, DOI, or URL data during this pass. + +Preserve numbers, signs, ranges, dates, percentages, denominators, units, and +comparators. A stylistic rewrite must not turn association into causation, +possibility into probability, or a reported allegation into an established +fact. Keep qualifiers such as _may_, _could_, _suggests_, _estimated_, +_reported_, _alleged_, _subject to_, and _not established_ unless a human +editor explicitly approves a semantic change outside this workflow. + +Preserve legal boundaries, including confidentiality restrictions, privilege, +publication embargoes, jurisdictional limits, consent conditions, and statements +about what the authors do or do not know. Flag possible legal problems for +human review; do not provide legal clearance. + +## Evidence receipt + +Use a structured receipt with these fields: + +```json +{ + "schema_version": 1, + "workflow": "foio-final-editorial", + "input_sha256": "...", + "output_sha256": "...", + "authentext_version": "3.2.0", + "tool": { "name": "...", "version": "..." }, + "prompt_sha256": "...", + "protected_items": { "passed": false, "differences": [] }, + "unresolved_findings": [], + "human_gate": { + "editorial_acceptance": "pending", + "publication_approval": "pending" + } +} +``` + +Hashing the exact prompt gives reproducibility without placing potentially +sensitive prompt content in the receipt. A controlled evidence store may retain +the full prompt separately. + +## Authority boundary + +Authentext may prepare and document a revision. It must not submit or publish a +manuscript, claim that citations have been independently verified, certify any +claim, provide legal approval, or mark either human gate approved. diff --git a/test/foio-editorial.test.js b/test/foio-editorial.test.js new file mode 100644 index 0000000..4b27831 --- /dev/null +++ b/test/foio-editorial.test.js @@ -0,0 +1,41 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { createFoioEditorialReceipt } from '../scripts/lib/foio-editorial.js'; + +const base = { + prompt: 'Make the final prose less formulaic without changing meaning.', + authentextVersion: '3.2.0', + tool: { name: 'test-editor', version: '1.0.0' }, +}; + +test('FOI-O receipt passes a style-only edit and retains human gates', () => { + const receipt = createFoioEditorialReceipt({ + ...base, + input: 'The reported estimate may be 14.2% (Smith, 2024), subject to section 8.', + output: 'The reported estimate may be 14.2% (Smith, 2024), subject to section 8.', + }); + + assert.equal(receipt.protected_items.passed, true); + assert.equal(receipt.human_gate.editorial_acceptance, 'pending'); + assert.equal(receipt.human_gate.publication_approval, 'pending'); + assert.match(receipt.prompt_sha256, /^[a-f0-9]{64}$/); + assert.equal(JSON.stringify(receipt).includes(base.prompt), false); +}); + +test('FOI-O receipt blocks numerical, citation, qualifier, and legal-boundary drift', () => { + const receipt = createFoioEditorialReceipt({ + ...base, + input: + 'The result may be 14.2% (Smith, 2024). The appendix is confidential and not for publication.', + output: 'The result is 16.2% (Jones, 2025). The appendix is available.', + }); + + assert.equal(receipt.protected_items.passed, false); + assert.deepEqual( + receipt.protected_items.differences.map(({ type }) => type), + ['citation', 'number', 'qualifier', 'legal_boundary'] + ); + assert.equal(JSON.stringify(receipt).includes('Smith'), false); + assert.equal(JSON.stringify(receipt).includes('confidential'), false); + assert.match(receipt.protected_items.differences[0].before_sha256, /^[a-f0-9]{64}$/); +});