Skip to content

Commit 1607fc5

Browse files
dj4oCoc-tmuellerclaude
authored
docs(ospo): community health rollout v2 — README, agents.md, health files (#601)
* docs(ospo): community health rollout v2 — README, agents.md, health files Introduced by the Kiteworks Open Source Program Office (OSPO) on May 5, 2026. Changes: - README.md: rewritten with OSPO v2 template — license-specific migration guidance, Community & Support section, Contributing workflow, Security section pointing to security.owncloud.com + YesWeHack bug bounty - agents.md: AI agent context file with architecture, build commands, and OSPO Policy Constraints (GitHub Actions, Dependabot, Git Workflow) - CODE_OF_CONDUCT.md: redirect to https://owncloud.com/contribute/code-of-conduct/ - CONTRIBUTING.md: redirect to https://owncloud.com/contribute/ - SECURITY.md: redirect to https://security.owncloud.com + YesWeHack - SUPPORT.md: redirect to https://owncloud.com/contact-us/ + channels OSPO: https://kiteworks.com/opensource Signed-off-by: David Walter <david.walter@kiteworks.com> * docs: rename agents.md to AGENTS.md and add a CLAUDE.md symlink Aligns this repository with the convention already merged across the ownCloud organisation (core, oauth2, user_ldap, activity, contacts and others): AGENTS.md as a regular file, plus CLAUDE.md as a symlink pointing at it so Claude Code reads the same content as every other agent. The file is also rewritten to the template used by the sibling app repos, which answers both review comments, and the statements that did not match this repository are corrected: - js/ holds hand-written classic frontend code; only js/web/richdocuments.js is generated, from src/, and must not be edited by hand - src/ is Vue plus TypeScript, built with @ownclouders/extension-sdk - tests/ contains PHPUnit unit tests and Behat webUI acceptance tests, not integration tests - the make targets that actually exist are documented instead of a bare phpunit invocation, together with the constraint that make test-php-unit resolves PHPUnit at ../../lib/composer/bin/phpunit and therefore needs the app checked out as apps/richdocuments inside an ownCloud Server tree - make appstore is the signed-release target and needs certificates in ~/.owncloud/certificates; make dist is the local build. A bare make only prints help, since .DEFAULT_GOAL is help - the app is AGPL-3.0, as declared in appinfo/info.xml and in the header of every source file, rather than of an undetermined license - master targets ownCloud 11 on PHP 8.3 while branch 4.2 targets ownCloud 10.11 and later on PHP 7.4 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Thomas Müller <323649642+oc-tmueller@users.noreply.github.com> * docs: correct the license statement and restore dropped README content The rewritten README claimed the license was "Not detected" and linked a LICENSE file that does not exist in this repository, so both the badge and the License section were dead links. The app is AGPL-3.0: appinfo/info.xml declares it and every source file carries an AGPL-3.0 header. The License section now says so and the migration section uses the same "Category X per Apache policy" wording as the already merged core and oauth2 READMEs. That this repository still has no root LICENSE/COPYING file is called out as OSPO follow-up work, and listed as a migration prerequisite, instead of being presented as an unknown license. The rewrite also dropped documentation that only existed in the old README. The instructions for registering the connector in the ownCloud Web config.json are restored, along with the Collabora admin interface URL, the admin settings path and the note that Collabora and ownCloud must be able to reach each other. The SonarCloud badges are restored as well. Two further fixes: - the Docker Hub badge URL was missing its repository segment and rendered as "404: badge not found"; it now points at owncloud/server - the manual installation snippet ran occ from inside apps/, where it does not exist, so the clone target is now given explicitly and occ is run from the server root The heading no longer says OC10, because master targets ownCloud 11. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Thomas Müller <323649642+oc-tmueller@users.noreply.github.com> --------- Signed-off-by: David Walter <david.walter@kiteworks.com> Signed-off-by: Thomas Müller <323649642+oc-tmueller@users.noreply.github.com> Co-authored-by: Thomas Müller <323649642+oc-tmueller@users.noreply.github.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 7015bcf commit 1607fc5

7 files changed

Lines changed: 326 additions & 68 deletions

File tree

‎AGENTS.md‎

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# AI Agent Guidelines for Collabora Online (richdocuments)
2+
3+
This file provides context for AI coding agents (Claude Code, GitHub Copilot, Cursor, etc.) working in this repository.
4+
5+
## Repository Overview
6+
7+
`richdocuments` is the ownCloud Server app that integrates Collabora Online for real-time
8+
collaborative editing of documents, spreadsheets and presentations. ownCloud acts as the WOPI host;
9+
Collabora Online is the WOPI client. The app ships in two flavours: a classic server-rendered
10+
frontend and a connector for ownCloud Web.
11+
12+
- **Product family:** Classic (ownCloud Server)
13+
- **Supported server versions:** `master` targets ownCloud 11 with PHP 8.3; branch `4.2` targets ownCloud 10.11+ with PHP 7.4 (see `appinfo/info.xml`)
14+
- **Primary language(s):** PHP, TypeScript/Vue, JavaScript
15+
- **Build system:** Composer, Make, pnpm + Vite
16+
- **Test framework:** PHPUnit (unit), Behat (webUI acceptance)
17+
- **CI system:** GitHub Actions
18+
- **License:** AGPL-3.0
19+
20+
## Architecture & Key Paths
21+
22+
- `appinfo/` - App metadata and registration (`info.xml`, `routes.php`, `app.php`, `Migrations/`)
23+
- `lib/` - PHP backend: `Controller/` (WOPI, document, settings, federation endpoints), `Db/` (WOPI token storage), `Panels/` (admin and personal settings), `BackgroundJob/` (expired WOPI token cleanup), plus the `DiscoveryService`, `DocumentService`, `FederationService` and `FileService` classes
24+
- `src/` - Vue/TypeScript source of the ownCloud Web connector (`index.ts`, `editor.vue`), built with `@ownclouders/extension-sdk`
25+
- `js/` - Classic frontend JavaScript, hand-written (`documents.js`, `settings-admin.js`, `settings-personal.js`, `viewer/`). `js/web/richdocuments.js` is the committed Vite build output of `src/` - do not edit it by hand
26+
- `css/` - Stylesheets
27+
- `templates/` - Server-side PHP templates
28+
- `assets/` - Empty office document templates used when creating new files
29+
- `img/` - App icons and images
30+
- `l10n/` - Translations
31+
- `tests/` - PHPUnit and acceptance tests (`tests/unit/`, `tests/acceptance/`)
32+
- `admin.php` / `settings.php` - Settings entry points
33+
- `Makefile` - Build and test automation
34+
- `composer.json` - PHP dependencies
35+
- `package.json` - JavaScript dependencies
36+
- `vite.config.ts` - Vite build configuration for the Web connector
37+
- `phpunit.xml` - PHPUnit configuration (single `unit` test suite)
38+
- `phpcs.xml` - PHP_CodeSniffer configuration
39+
- `.php-cs-fixer.dist.php` - php-cs-fixer configuration
40+
- `phpstan.neon` - PHPStan configuration
41+
- `.phan/` - Phan static analysis configuration
42+
- `sonar-project.properties` - SonarCloud configuration
43+
- `vendor-bin/` - Isolated tool dependencies (phpunit, php-cs-fixer, phpcs, phan, phpstan, behat)
44+
45+
## Development Conventions
46+
47+
- **Branching:** `master` for the ownCloud 11 line, `4.2` for the ownCloud 10.x line. Fixes that apply to both need a PR per branch.
48+
- **Commit messages:** DCO sign-off required (`git commit -s`). Must follow [Conventional Commits](https://www.conventionalcommits.org/) format - enforced by CI via `owncloud/reusable-workflows/.github/workflows/semantic-git-message.yml`. The repository squash-merges and takes the PR title as the commit subject, so the PR title must follow the same format.
49+
- **Code style:** php-cs-fixer with the ownCloud coding standard, plus PHP_CodeSniffer (`phpcs.xml`) for the backend; ESLint and Prettier for the frontend.
50+
- **Static analysis:** Phan and PHPStan.
51+
- **PR process:** Open a PR against the target branch. All CI checks must pass.
52+
- **Quality gate:** SonarCloud analyses the repository.
53+
54+
## Build & Test Commands
55+
56+
```bash
57+
# Show all available targets
58+
make help
59+
60+
# Build distribution tarball
61+
make dist
62+
63+
# Install PHP dependencies
64+
composer install
65+
66+
# Build the ownCloud Web connector (src/ -> js/web/)
67+
pnpm install
68+
pnpm build
69+
70+
# Test (PHPUnit)
71+
make test-php-unit
72+
73+
# Test (WebUI Acceptance)
74+
make test-acceptance-webui
75+
76+
# Lint (PHP code style)
77+
make test-php-style
78+
79+
# Fix code style
80+
make test-php-style-fix
81+
82+
# Lint (JavaScript/TypeScript)
83+
pnpm lint
84+
85+
# Static analysis
86+
make test-php-phan
87+
make test-php-phpstan
88+
89+
# Clean build artifacts and dependencies
90+
make clean
91+
```
92+
93+
## Important Constraints
94+
95+
- **Tests need a core checkout:** `make test-php-unit` resolves PHPUnit at `../../lib/composer/bin/phpunit`, so the app must be checked out as `apps/richdocuments` inside an ownCloud Server tree. It cannot be run from a standalone clone.
96+
- **`make appstore` is release-only:** it unconditionally calls `occ integrity:sign-app` and needs a signing key and certificate in `~/.owncloud/certificates/`. Use `make dist` for a local build; `make dist` skips signing when no certificate is present.
97+
- **WOPI dependency:** Requires a running Collabora Online server that the ownCloud server can reach, and that can reach the ownCloud server in turn.
98+
- **Dual frontend:** Has both a classic frontend (`js/`) and an ownCloud Web connector (`src/`, built with Vite into `js/web/`). Frontend changes usually need to be made in both places.
99+
- **Generated frontend bundle is committed:** regenerate `js/web/richdocuments.js` with `pnpm build` and commit the result; never hand-edit it.
100+
- **License:** AGPL-3.0, as declared in `appinfo/info.xml` and in the header of every source file. All contributions must be compatible with it. Note that this repository has no root `LICENSE`/`COPYING` file yet; adding one is tracked as OSPO follow-up work.
101+
- **Copyleft + Apache 2.0 migration:** The broader ownCloud organization is migrating repositories to Apache 2.0. AGPL-3.0 is Category X under Apache policy, so migration requires full relicensing. Do not introduce new copyleft dependencies without discussion in an issue first.
102+
- **Translations:** Must be submitted via Transifex, not as pull requests.
103+
104+
105+
## OSPO Policy Constraints
106+
107+
### GitHub Actions
108+
- **Only** use actions owned by `owncloud`, created by GitHub (`actions/*`), verified on the GitHub Marketplace, or verified by the ownCloud Maintainers.
109+
- Pin all actions to their full commit SHA (not tags): `uses: actions/checkout@<SHA> # vX.Y.Z`
110+
- Never introduce actions from unverified third parties.
111+
112+
### Dependency Management
113+
- Dependabot is configured for automated dependency updates.
114+
- Review and merge Dependabot PRs as part of regular maintenance.
115+
- Do not introduce new dependencies without discussion in an issue first.
116+
117+
### Git Workflow
118+
- **Rebase policy**: Always rebase; never create merge commits. Use `git pull --rebase` and `git rebase` before pushing.
119+
- **Signed commits**: All commits **must** be PGP/GPG signed (`git commit -S -s`).
120+
- **DCO sign-off**: Every commit needs a `Signed-off-by` line (`git commit -s`).
121+
- **Conventional Commits & Squash Merge**: Use the [Conventional Commits](https://www.conventionalcommits.org/) format where the repository enforces it. Many repos use squash merge, where the PR title becomes the commit message on the default branch — apply Conventional Commits format to PR titles as well. A reusable GitHub Actions workflow enforces this.
122+
123+
## Context for AI Agents
124+
125+
- This is an ownCloud Server app (the Classic product line), not an oCIS extension.
126+
- The PHP backend implements the WOPI host side of the protocol; Collabora Online is the WOPI client.
127+
- WOPI access tokens live in the app's own `richdocuments_wopi` table (created by `appinfo/Migrations/`) and are cleaned up by the `CleanupExpiredWopiTokens` background job - be careful with their lifetime and validation when touching `lib/Controller/WopiController.php`.
128+
- Secure View (watermarking, restricted download) is gated behind an enterprise license via `ILicenseManager`, see `AppConfig::enterpriseFeaturesEnabled()`. Its acceptance coverage lives in `tests/acceptance/features/webUISecureView/`, which is the only acceptance suite in this repo - `make test-acceptance-api` exists but has no features to run here.
129+
- Runtime configuration is done via `occ config:app:set richdocuments <key> --value <value>`; see `lib/AppConfig.php` for the supported keys.
130+
- Match existing code style, keep PRs focused, and do not refactor unrelated code in the same PR.
131+
- Write tests for new functionality.

‎CLAUDE.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
AGENTS.md

‎CODE_OF_CONDUCT.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Code of Conduct
2+
3+
This project follows the ownCloud Code of Conduct.
4+
5+
Please read the full Code of Conduct at:
6+
**<https://owncloud.com/contribute/code-of-conduct/>**
7+
8+
By participating in this project, you agree to abide by its terms.

‎CONTRIBUTING.md‎

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,9 @@
1-
## Submitting issues
1+
# Contributing
22

3-
If you have questions about how to install or use ownCloud, please direct these to the [mailing list][mailinglist] or our [forum][forum]. We are also available on [IRC][irc].
3+
Thank you for your interest in contributing to this project!
44

5-
### Short version
5+
Please read the full contributing guidelines at:
6+
**<https://owncloud.com/contribute/>**
67

7-
* The [**issue template can be found here**][template]. Please always use the issue template when reporting issues.
8-
9-
### Guidelines
10-
* Please search the existing issues first, it's likely that your issue was already reported or even fixed.
11-
- Go to one of the repositories, click "issues" and type any word in the top search/command bar.
12-
- You can also filter by appending e. g. "state:open" to the search string.
13-
- More info on [search syntax within github](https://help.github.com/articles/searching-issues)
14-
* This repository ([documents](https://github.com/owncloud/contacts/issues)) is *only* for issues within the ownCloud documents code.
15-
* __SECURITY__: Report any potential security bug to security@owncloud.com following our [security policy](https://owncloud.org/security/) instead of filing an issue in our bug tracker
16-
* Report the issue using our [template][template], it includes all the information we need to track down the issue.
17-
18-
Help us to maximize the effort we can spend fixing issues and adding new features, by not reporting duplicate issues.
19-
20-
[template]: https://raw.github.com/owncloud/core/master/issue_template.md
21-
[mailinglist]: https://mailman.owncloud.org/mailman/listinfo/owncloud
22-
[forum]: https://forum.owncloud.org/
23-
[irc]: https://webchat.freenode.net/?channels=owncloud&uio=d4
24-
25-
### Contribute Code and translations
26-
Please check [core's contribution guidelines](https://github.com/owncloud/core/blob/master/CONTRIBUTING.md) for further information about contributing code and translations.
8+
For development setup, coding standards, and pull request process,
9+
see the README in this repository.

0 commit comments

Comments
 (0)