Skip to content

Add Copilot instructions for workflow_ocr repository - #348

Merged
R0Wi merged 2 commits into
masterfrom
copilot/set-up-copilot-instructions
Jan 10, 2026
Merged

R0Wi merged 2 commits into
masterfrom
copilot/set-up-copilot-instructions

Conversation

Copilot AI commented Jan 10, 2026 •

Copy link
Copy Markdown
Contributor

Configures repository-specific guidance for GitHub Copilot coding agent as per best practices documentation.

Changes

Created .github/copilot-instructions.md documenting:

  • Architecture: Dual backend modes (local ocrmypdf CLI vs. external workflow_ocr_backend ExApp)
  • Critical constraints: App requires full Nextcloud Server instance; cannot run standalone
  • Version compatibility: Map appinfo/info.xml target to appropriate NC Server branch (stable## or master)
  • Tech stack: PHP 8.1-8.4, Vue 3, Node 24, rspack, vitest, phpunit
  • Build/test commands: make build, make test, make lint workflows
  • Code organization: OcrProcessors, BackgroundJobs, Settings, Workflow Operations
  • Branching strategy: Mirrors Nextcloud Server (master = unreleased, stable## = released versions)
  • Development context: Tests execute within NC environment; check implementations against target NC version

Key Guidance for AI

  1. Never assume standalone operation
  2. Verify changes against target Nextcloud Server version code
  3. Both processing backends (local + external) must be considered
  4. Follow existing patterns in lib/OcrProcessors, lib/Service, lib/Controller
Original prompt

This section details on the original issue you should resolve

<issue_title>✨ Set up Copilot instructions</issue_title>
<issue_description>Configure instructions for this repository as documented in Best practices for Copilot coding agent in your repository.

This repo contains the workflow_ocr Nextcloud app. The basic idea of this app is to use the Nextcloud workflowengine to be able to configure flexible OCR task runs. The OCR tasks is nothing else than a scheduled background task which uses ocrmypdf to read and transform the input file and finally save a new version of the file to the Nextcloud server instance.

Right now there are two options how this app can be set up in terms of "where ocrmypdf runs":

  • ocrmypdf can run on the same server as Nextcloud. IN that case the app just calls the ocrmypdf CLI and interacts with it using stdin/stdout
  • An admin can set up the workflow_ocr_backend app, which is a so called ExApp for Nextcloud. The idea as that the workflow_ocr_backend app runs in a separate Docker container which is connected to the Nextcloud instance. The workflow_ocr app will send the file data and some parameters across to the workflow_ocr_backend via it's REST interface if a file needs OCR processing

When working on this code it's always important to keep a few things in mind:

  • The app itself cannot run standalone. Even for development purposes the developer always needs to set up a Nextcloud Server instance and install this app so that everything works correctly. Also most tests cannot be executed without embedding into a working Nextcloud instance (see CI/CD pipelines for examples)
  • A developer should always check the implementation against the appropriate Nextcloud Server code. The Nextcloud target version can be determined by checking appinfo/info.xml. Note: if the referenced server version does not yet exist (for example right now there is Nextcloud 33 on the current master branch of this app but NC33 is not yet released) this means the code needs to be checked agains the Nextcloud Server code branch master.
  • We're mostly using the same branching strategie as the Nextcloud Server repo. The code in master should be compatible to the Nextcloud Server repos master whereas "stable" version (which are already released) should also be compliant to the stable versions of Nextcloud. For example stable32 in this repo should target Nextcloud version 32 which is released already and the code can be found in the NC server repo under stable32. The releases can be checked here
    </issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: R0Wi <19730957+R0Wi@users.noreply.github.com>
Copilot AI changed the title [WIP] Configure instructions for Copilot integration Add Copilot instructions for workflow_ocr repository Jan 10, 2026
Copilot AI requested a review from R0Wi January 10, 2026 09:54
@R0Wi
R0Wi marked this pull request as ready for review January 10, 2026 10:04
@R0Wi
R0Wi merged commit 02097d0 into master Jan 10, 2026
@R0Wi
R0Wi deleted the copilot/set-up-copilot-instructions branch January 10, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ Set up Copilot instructions

2 participants