Skip to content

Add comprehensive documentation and Claude skills for backend development - #15

Merged
R0Wi merged 1 commit into
masterfrom
claude/update-claude-md-docs-oq4xcu
Sep 9, 2026
Merged

R0Wi merged 1 commit into
masterfrom
claude/update-claude-md-docs-oq4xcu

Conversation

@R0Wi

@R0Wi R0Wi commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

This change adds comprehensive documentation and Claude AI skills to guide development of the workflow_ocr_backend ExApp. It establishes clear contracts, deployment procedures, and quality gates for maintaining the REST API that serves the workflow_ocr Nextcloud app.

Key Changes

  • CLAUDE.md: Core reference document covering the ExApp's critical constraints, stack, API surface, Docker deployment, and development conventions. Emphasizes that the API is a hand-written contract with the PHP client with no build-time validation.

  • Claude Skills (in .claude/skills/):

    • sync-backend-contract/: Verification checklist for the six-point contract between this backend and the PHP client (endpoints, multipart fields, JSON aliases, status codes, parameter parsing, versions)
    • run-local/: Instructions for running the backend locally or in Docker and registering it as an ExApp against a Nextcloud instance
    • add-endpoint/: Step-by-step guide for adding new REST endpoints, including response models, handlers, tests, and required PHP-side changes
    • preflight/: Quality gate checklist covering unit tests, Docker builds, HaRP integration tests, and contract verification
  • Claude Agents (in .claude/agents/):

    • exapp-reviewer.md: Code review guidelines for ExApp correctness, contract compliance, error handling, OCRmyPDF usage, deployment, logging, and test coverage
    • pytest-author.md: Test authoring conventions for the TestClient, .env-based auth headers, fixture organization, and coverage requirements

Notable Implementation Details

  • Documentation emphasizes that the API surface is a load-bearing contract with the PHP app — endpoint names, multipart field names, and camelCase JSON aliases cannot change without coordinated updates in workflow_ocr
  • All skills and agents reference CLAUDE.md as the authoritative source, creating a coherent knowledge base
  • The preflight skill explicitly calls out that Docker builds are required for any infrastructure change, and HaRP integration tests must be run when deployment details change
  • Test conventions require TestClient to be used inside a with block to ensure lifespan handlers run, and auth headers must be built from .env values

https://claude.ai/code/session_01F9n81aZgDyY6jdBC4yxyW6

Document the current state of the ExApp for AI-assisted development and add
reusable Claude Code tooling for it.

- CLAUDE.md: the ExApp/AppAPI execution model, the API surface and its
  camelCase wire aliases, the ocrmypdf_parameters string contract with the
  workflow_ocr PHP app, error/status-code handling, the Docker build stages
  and the HaRP/FRP deployment path in start.sh.
- .claude/skills/: add-endpoint, preflight (tests + image build + HaRP),
  sync-backend-contract (mirrors the skill in workflow_ocr) and run-local.
- .claude/agents/: exapp-reviewer and pytest-author.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F9n81aZgDyY6jdBC4yxyW6
@R0Wi
R0Wi marked this pull request as ready for review September 9, 2026 18:59
@R0Wi
R0Wi merged commit 7c5d213 into master Sep 9, 2026
2 checks passed
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Code Coverage

Package Line Rate Health
. 95% ✔
model 100% ✔
Summary 95% (97 / 102) ✔

Minimum allowed line rate is 60%

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.

2 participants