Skip to content
Open
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
1 change: 1 addition & 0 deletions collaborative-glossary-acronym-guard/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
reports/frames/
42 changes: 42 additions & 0 deletions collaborative-glossary-acronym-guard/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Collaborative Glossary and Acronym Guard

Self-contained reviewer artifact for SCIBASE issue #12, focused on terminology consistency inside a real-time collaborative research editor.

This slice is intentionally narrow. It validates glossary and acronym readiness before manuscript export rather than duplicating existing editor, notebook, citation, equation, table, clipboard, accessibility, data-availability, or mode-toggle submissions.

## What It Checks

- First-use acronym expansion before publication export.
- Acronym collisions when collaborators use the same abbreviation for different concepts.
- Missing, draft, or incomplete glossary definitions.
- Export manifest completeness for terms that appear in manuscript sections.
- Locked-section terminology edits that lack current collaborator approval.
- Stale term anchors after section version changes.
- Private reviewer, anonymous-review, local-path, or collaborator-only terminology notes leaking into public exports.
- Blocking terminology review comments.

## Local Verification

```sh
npm run check
npm test
npm run demo
npm run verify-video
```

`npm run demo` writes reviewer artifacts to `reports/`:

- `clean-audit.json`
- `risky-audit.json`
- `risky-review.md`
- `summary.svg`
- `manifest.json`
- `demo.mp4`

## Requirement Mapping

- Real-time collaboration: proposed terminology edits are evaluated against section locks, current section hashes, and collaborator approvals.
- Research editor interface: glossary entries bind to manuscript sections and export manifests.
- Scientific writing support: acronyms, first-use expansion, discipline-specific definitions, and term collisions are checked deterministically.
- Export readiness: public glossary output is separated from private notes and unresolved terminology comments.
- Reviewer demonstration: synthetic clean and risky packets produce JSON, Markdown, SVG, and MP4 artifacts without credentials or external services.
52 changes: 52 additions & 0 deletions collaborative-glossary-acronym-guard/demo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
"use strict";

const fs = require("node:fs");
const path = require("node:path");
const {
evaluateGlossaryAcronymPacket,
renderMarkdownReport,
renderSvgSummary
} = require("./index");
const { cleanPacket, riskyPacket } = require("./sample-data");

const reportsDir = path.join(__dirname, "reports");
fs.mkdirSync(reportsDir, { recursive: true });

const clean = evaluateGlossaryAcronymPacket(cleanPacket, { now: "2026-06-01T10:00:00.000Z" });
const risky = evaluateGlossaryAcronymPacket(riskyPacket, { now: "2026-06-01T10:00:00.000Z" });
const manifest = {
module: "collaborative-glossary-acronym-guard",
issue: 12,
generatedAt: "2026-06-01T10:00:00.000Z",
scenarios: [
{
name: "clean",
status: clean.status,
fingerprint: clean.fingerprint,
findings: clean.findings.length
},
{
name: "risky",
status: risky.status,
fingerprint: risky.fingerprint,
findings: risky.findings.length
}
],
artifacts: [
"reports/clean-audit.json",
"reports/risky-audit.json",
"reports/risky-review.md",
"reports/summary.svg",
"reports/demo.mp4"
]
};

fs.writeFileSync(path.join(reportsDir, "clean-audit.json"), `${JSON.stringify(clean, null, 2)}\n`);
fs.writeFileSync(path.join(reportsDir, "risky-audit.json"), `${JSON.stringify(risky, null, 2)}\n`);
fs.writeFileSync(path.join(reportsDir, "risky-review.md"), renderMarkdownReport(risky, riskyPacket));
fs.writeFileSync(path.join(reportsDir, "summary.svg"), renderSvgSummary(risky));
fs.writeFileSync(path.join(reportsDir, "manifest.json"), `${JSON.stringify(manifest, null, 2)}\n`);

console.log(`Clean status: ${clean.status} (${clean.fingerprint})`);
console.log(`Risky status: ${risky.status} (${risky.fingerprint})`);
console.log(`Wrote reviewer artifacts to ${reportsDir}`);
Loading