Phase 1 · Word / Excel / PPT

An intranet AI assistant that lives in WPS

The native add-in owns UI, document extraction, preview, and write-back. Rules, templates, configuration, logs, diagnostics, and model calls stay in the local adapter. Current scope is the platform foundation plus three hosts, targeting Kylin V10 ARM, Python 3.8, and offline install.

v0.25.3-alpha candidate Issue #59 remains manual-pending
3 Separate host add-ins; Ribbon never cross-displays
8 Write, review, analysis, and summary tasks
127.0.0.1 Local adapter, default port 18100
3.8 Target Python, offline installer

Features

Model output is previewed before any write-back. Review and analysis tasks are read-only by default. Workflow-platform access uses /chat-messages; direct-model access uses OpenAI-compatible /chat/completions. Runtime requests do not fall back to a unified URL or key.

Word

5 entries

Smart Write

Rewrite, continue, summarize, custom write. Preview / compare / plain text, then write-back.

Smart Imitation

Template-based imitation. Preview, plain text, copy; no write-back.

Document Review

Typos, expression, logic, fluency, professionalism. Selection or limited full document.

Format Review

Against the technical-document format rules. Format-issue cards, caption-association conclusions, image-semantics supplement. No format write-back.

Read-only · visual-off degrade

Writing policy

Four preset packs plus a local organization library. Available to write / imitate / review.

Excel

2 entries

Smart Analysis

Selected or used range. Structured report and briefing paragraph; no cell writes.

Read-only

Formula Assistant

Explicit selection, max 30×20. Generate or explain; copy only.

Copy only

PPT

2 entries

Smart Summary

Current slide, or one .md / .docx (≤10 MB) for a full-deck outline. Preview and copy only.

Preview / copy only

Structure Review

Up to 60 slides. Page-role list first, then rule exemptions. Read-only.

Read-only

Production mock output stays off unless explicitly enabled. Image-semantics supplement is default-on; probe failure or a closed master switch is visual-off degrade — never claim the model saw the picture. Automated gates still yield only candidate.

Architecture

Each layer has one job. Documents travel as structured payloads. Health state decides whether config changes and new model jobs are allowed.

  1. 01 User in WPS

    Works from Word / Excel / PPT without leaving the document.

  2. 02 JS/HTML add-in

    UI, extraction, preview, write-back. Separate packages so Ribbon buttons never cross-display.

  3. 03 Document bridge

    Paragraphs, headings, fonts, sizes, alignment, outline levels stay on the payload.

  4. 04 Local adapter

    127.0.0.1:18100. Rules, templates, config, logs, model calls.

  5. 05 Enterprise AI API

    Workflow platform or direct model. Keys live in local reference files, not in config text.

Preview, then write

Word writing tasks preview first. Review, analysis, and summary do not change the source by default.

Four health states

Live, ready, degraded, recovery. Recovery blocks config changes and new model jobs.

Per-task config

Eight tasks keep their own access method and key references. No unified URL fallback at runtime.

Release notes

Current v0.25.3-alpha. Version rule AI-WPS-P{phase}-{scope}-{major.minor.patch}-{yyyymmdd}. Major is a compatibility boundary, minor is user-visible capability, patch covers fixes, UI, packaging, and docs.

  1. v0.25.3-alpha candidate · d1a346b
    • Result preview: restricted Markdown for headings, lists, tables, and bold
    • Format issues become cards with a separate action bar; caption association is linked / orphan / missing / ambiguous
    • Structure review adds slide page roles (cover, TOC, transition, body, end, unconfirmed)
    • Keeps the Phase 1 installer; does not enter a Preview install generation
  2. v0.25.2-alpha frozen candidate · 850871c
    • Image-semantics supplement default-on; overlay upgrade rewrites direct-model bindings
    • Probe failure, export failure, or a closed master switch is visual-off degrade
    • PPT structure review recognizes Chinese template shape names “标题 1 / 标题 3” and color-bar subtitles
  3. v0.25.1-alpha frozen candidate · d7a1dd8
    • Format-review v2 cross-runtime hash contract (JS and Python recompute independently)
    • Allowlist assembly and Python 3.8 lifecycle gate
  4. v0.25.0-alpha Phase 1 capability baseline
    • Deterministic-first format review, restricted semantics DSL, unified three-host package
    • Image semantics shipped dormant; master switch default-off

Current kit ai-wps-phase1-delivery-20260826-d1a346b-v0253.tar.gz · SHA-256 120a2cfd…258cb7. Rejected predecessors, gate numbers, and lineage live in v0253, v0252, v0251.

Install

For local development, start the adapter then load the add-in. Intranet terminals use the offline kit. Overwrite installs keep existing config, keys, the writing-policy database, and backups.

01

Start the local adapter

/health/live does not read business data. /health/ready returns 503 in recovery. Without FastAPI deps: python adapter_service/standalone_adapter.py 18100.

cd adapter_service
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --host 127.0.0.1 --port 18100
02

Build or import the add-in

Output is wps-addon/dist/. Formal terminals should import formal-plugin-kit/.

cd wps-addon
npm install
npm test
npm run build
03

Configure the enterprise AI provider

adapter.json stores access method, URL, model parameters, and key references. Keys live under run/provider_api_keys/<ref>.

cp config/adapter.example.json config/adapter.json
export ENTERPRISE_AI_API_KEY="your-api-key"

For developers

Source, tests, and operations docs stay in separate trees. Read the repo handoff before changing code.

Repository map

  • wps-addon/Add-in source (Vite + TypeScript)
  • adapter_service/Local adapter (FastAPI, rules, provider, tests)
  • formal-plugin-kit/Formal WPS manual-import kit
  • templates/Office templates and review rules
  • packaging/Offline install, diagnostics, kit build
  • phase1-delivery-kit/Phase 1 installer and acceptance materials
  • docs/Design, operations, acceptance

Tests: cd adapter_service && pytest; cd wps-addon && npm test. Target-machine regression uses Python 3.8 on Kylin V10 ARM64. Later work on the same adapter can add multi-sheet Excel flows, multi-file compare, governed PPT generation, and richer policy governance — outside current Phase 1.