Thank you for your interest in contributing to WordAgent!
WordAgent is an open-source AI writing agent for WPS Office and Microsoft Word. We welcome all kinds of contributions, including bug fixes, new features, documentation improvements, built-in Skills, model integrations, UI enhancements, and test cases.
Please read this guide before submitting an Issue or Pull Request.
You can contribute to the project in the following ways:
- Report bugs
- Suggest new features
- Improve the English or Chinese documentation
- Fix backend or frontend issues
- Add integrations for model providers
- Improve Single Agent or Multi Agent workflows
- Submit new built-in Skills
- Add test cases
- Improve the WPS or Microsoft Word add-ins
- Improve the packaging process for Windows, Linux, or macOS
We recommend the following environment:
- Python 3.11 or later
- Node.js 22 or later
- uv
- pnpm 10
- Git
- WPS Office or Microsoft Word for testing add-in functionality
Clone the repository:
git clone https://github.com/visresearch/WordAgent.git
cd WordAgentWe recommend forking the repository first and creating a development branch from your fork.
Create a feature branch from the latest master branch:
git checkout master
git pull origin master
git checkout -b feat/your-featureWe recommend the following branch prefixes:
| Type | Example |
|---|---|
| Feature | feat/add-model-provider |
| Bug fix | fix/skill-loading-error |
| Documentation | docs/update-installation-guide |
| Refactoring | refactor/agent-runtime |
| Tests | test/add-skill-tests |
| Built-in Skill | skill/academic-writing |
| Build and CI | build/update-pyinstaller |
Avoid developing directly on the master branch.
Go to the backend directory:
cd backendInstall production and development dependencies:
uv sync --extra devStart the backend:
uv run python main.pyRun tests:
uv run pytestRun Ruff:
uv run ruff check .Automatically fix issues that Ruff can handle:
uv run ruff check . --fixCheck code formatting:
uv run black --check .Automatically format the code:
uv run black .Run type checks:
uv run mypy appBefore submitting backend changes, run at least:
uv run ruff check .
uv run black --check .
uv run pytest- Add type annotations to new public functions and methods whenever practical.
- Avoid unnecessary mutable global state.
- Keep asynchronous call chains asynchronous, and avoid long-running blocking operations in the event loop.
- Prefer explicit data models for tool inputs and outputs.
- Do not hard-code API keys, access tokens, passwords, or user-specific paths.
- New features should include appropriate error handling and logging.
- Do not change frontend-backend communication fields casually. If a change is necessary, update both frontends accordingly.
- Explain the purpose of new dependencies and avoid introducing unnecessarily large packages.
Go to the WPS add-in directory:
cd frontend/wps_word_pluginInstall dependencies:
pnpm installStart the development server:
pnpm devBuild the add-in:
pnpm buildRun lint checks:
pnpm lintFormat the code:
pnpm formatDo not manually modify build artifacts in the dist/ directory.
Go to the Microsoft Word add-in directory:
cd frontend/microsoft_word_pluginInstall dependencies:
pnpm installStart the development server:
pnpm dev-serverCreate a development build:
pnpm build:devCreate a production build:
pnpm buildRun lint checks:
pnpm lintValidate the add-in manifest:
pnpm validateFormat the code:
pnpm prettierStart Microsoft Word debugging:
pnpm startStop debugging:
pnpm stop- Features shared by WPS and Microsoft Word should behave consistently whenever practical.
- When changing the frontend-backend API, check whether both add-ins need corresponding updates.
- Include screenshots or screen recordings for UI changes.
- Do not include unrelated formatting changes.
- Do not manually edit generated files in
dist/. - Preserve the existing UI design and interaction style whenever practical.
- After changing an add-in manifest, run its corresponding validation command.
Built-in Skills should be stored in:
backend/app/resources/builtin_skills/
Recommended structure:
builtin_skills/
├── manifest.json
└── academic-writing/
├── SKILL.md
├── examples.md
└── terminology.md
At runtime, built-in Skills are synchronized to the shared user Skill directory:
wence_data/project/skills/
Skill directory names must meet the following requirements:
- Use lowercase English letters.
- Use
kebab-case. - Keep the name stable after release.
- Do not use spaces or special characters.
- Choose a name that clearly describes the Skill's purpose.
Recommended:
academic-writing
humanizer-zh
technical-report
meeting-summary
Not recommended:
Skill 1
new_skill
test
My Skill
Every Skill must contain a SKILL.md file:
---
name: Academic Writing
description: Write, expand, and refine academic papers, research reports, and related content.
---
# Academic Writing
## Use Cases
Use this Skill when the user needs to write academic papers, research reports, experimental analyses, or related formal content.
## Workflow
1. Understand the user's research topic and writing requirements.
2. Analyze the current document structure.
3. Conduct research first when information is missing.
4. Generate well-structured content with complete reasoning.
5. Check terminology, logic, and formatting for consistency.
## Constraints
- Do not fabricate experimental data or references.
- Clearly identify uncertain information.
- Maintain accurate and objective academic language.- A Pull Request should generally add or modify only one Skill.
- The
descriptionshould clearly identify the triggering scenarios instead of providing only a broad overview. - A Skill should provide an actionable workflow and explicit constraints.
- Move lengthy examples, glossaries, and reference material into separate Markdown files.
- Do not include API keys, user data, or private information.
- Skills containing executable Python, Shell, or JavaScript scripts are not accepted by default.
- Before including third-party content, ensure that its license permits redistribution and retain any required notices.
- When modifying a built-in Skill, update its version number in
manifest.jsonaccordingly. - Do not overwrite or delete locally created user Skills.
- Test Skill discovery, activation, deactivation, and context-loading behavior.
When submitting a Skill, include the following information in the Pull Request:
- The purpose of the Skill.
- Applicable scenarios.
- Triggering examples.
- How it was tested.
- Content sources and licenses.
- Whether it will overwrite an existing Skill.
We recommend using the Conventional Commits format:
<type>(<scope>): <description>
Common types:
| Type | Purpose |
|---|---|
feat |
New feature |
fix |
Bug fix |
docs |
Documentation change |
refactor |
Code refactoring that does not change behavior |
test |
Test-related change |
style |
Formatting-only change |
build |
Build system or dependency change |
ci |
CI workflow change |
chore |
Other maintenance work |
Examples:
feat(skill): add built-in academic writing skill
fix(agent): prevent disabled skills from loading
docs: add contribution guide
refactor(frontend): unify skill settings components
test(skill): add built-in skill synchronization tests
Commit messages should be concise, specific, and describe the actual change.
Before submitting, ensure that your branch is based on the latest master:
git fetch upstream
git rebase upstream/masterPush your branch:
git push origin feat/your-featureThen create a Pull Request targeting WordAgent's master branch.
Include the following in your Pull Request:
- The purpose and background of the change.
- The main implementation approach.
- Test methods and results.
- Affected platforms, such as Windows, Linux, macOS, WPS, or Microsoft Word.
- Screenshots or screen recordings for UI changes.
- Related Issues, such as
Closes #123. - The reason for any new dependencies.
- Any potential compatibility impact.
Recommended Pull Request description:
## Changes
Briefly describe the problem addressed by this change.
## Implementation
Describe the main approach and key changes.
## Testing
- [ ] Backend tests pass
- [ ] Ruff checks pass
- [ ] Black formatting checks pass
- [ ] WPS add-in builds successfully
- [ ] Microsoft Word add-in builds successfully
- [ ] Tested in the actual office application
## Scope
Describe the affected modules and platforms.
## Screenshots
If the change affects the UI, include screenshots or a screen recording.
## Related Issue
Closes #123Before submitting, confirm that:
- The changes are consistent with the Pull Request's stated purpose.
- No API keys, passwords, or other sensitive information are included.
- No unrelated generated files are included.
- Relevant documentation has been updated.
- Applicable tests and checks have been run.
- New code includes appropriate error handling.
- Frontend-backend API changes have been synchronized.
- Shared WPS and Microsoft Word functionality has been checked for consistency.
- New third-party content complies with its license.
- Commit messages are clear and specific.
A bug report should include as much of the following information as possible:
- WordAgent version.
- Operating system and version.
- WPS Office or Microsoft Word version.
- Python and Node.js versions.
- Model and API provider used.
- Complete reproduction steps.
- Expected behavior.
- Actual behavior.
- Relevant logs and error messages.
- Screenshots or screen recordings, when needed.
Before submitting logs, remove:
- API keys
- Access tokens
- Cookies
- User document content
- Personal information
- Sensitive local paths
A feature request should explain:
- The current problem.
- The intended use case.
- The proposed interaction.
- Modules that may be affected.
- Whether you are willing to help implement it.
When adding or upgrading Python dependencies:
cd backend
uv add package-name
uv lock
uv sync --extra devCommit the relevant changes to:
backend/pyproject.toml
backend/uv.lock
When updating frontend dependencies, use pnpm and commit the corresponding:
package.json
pnpm-lock.yaml
Do not mix npm, Yarn, and pnpm, and do not refresh the entire lockfile unless necessary.
The project includes English and Chinese README files as well as a separate documentation site.
When modifying user-visible functionality, check whether the following also need to be updated:
README.md
README.zh-CN.md
web/docs/
When documenting commands, paths, or configuration, ensure that the documentation matches the actual code.
Do not publish the following in a public Issue:
- Working API keys
- Credentials
- Exploit details for undisclosed vulnerabilities
- User documents containing personal data
- Other sensitive information
If you discover a security issue, use GitHub's private vulnerability reporting feature or contact the project maintainers.
Be friendly, professional, and respectful.
We do not tolerate the following behavior:
- Personal attacks or discriminatory language.
- Malicious harassment of other participants.
- Deliberately submitting destructive code.
- Publishing another person's private information without authorization.
- Submitting large numbers of irrelevant Issues or Pull Requests.
Maintainers reserve the right to close Issues and Pull Requests that do not meet the project's goals, quality standards, or code of conduct.
WordAgent is licensed under the Apache License 2.0.
By submitting code, documentation, or other content to this project, you agree to license your contribution under the Apache License 2.0 used by the project.
Thank you for contributing to WordAgent!