docs: check for existing Nextcloud capabilities before writing new logic - #104
Merged
Merged
Conversation
"Reuse before you write" only covered UI: an @nextcloud/vue component, a design token, an existing src/ pattern. It said nothing about checking whether the server already exposes the behaviour (an OCP interface, or a raw protocol feature) or whether a non-UI @nextcloud/* package already covers it — exactly the reuse that made #100's DAV orderby/limit fix a one-file request change instead of custom client-side pagination. Broaden the ladder to four steps (server capability, then the wider @nextcloud/* npm scope, then vue components/tokens, then src/ patterns), wire a partial-fit escape valve into the existing contestable-call rule so the new instruction can't be forced past a bad fit, and fold its PR-description disclosure into the existing pre-PR checklist instead of adding another scattered "say X in the description" instance. Went through an adversarial review pass before landing: an earlier version hardcoded this app's @nextcloud/* dependency list (stale the moment a dependency changes, and a direct contradiction of the token guidance two paragraphs below it, which explicitly refuses to enumerate for that same reason), gave no verifiable method for the OCP check ("say you checked" is not auditable), and used "capability" for two different things four lines apart. All three are fixed here — the OCP check now points at a real, grep-able local path, `vendor/nextcloud/ocp/OCP/`. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
Every other rule in this file explains its motivating incident in the commit message or PR body, never inside the instructional text itself — #79, #83, #84, and #100's own diagnosis are all discussed there, not quoted in AGENTS.md. "see #100" broke that pattern and adds nothing: the DAV SEARCH orderby/limit example is already self-contained, and a bare PR number means nothing to a future reader without the context this conversation had. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
Aiiaiiio
approved these changes
Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #88. "Reuse before you write" only covered UI reuse — an
@nextcloud/vuecomponent, a design token, an existingsrc/pattern. It said nothing about checking whether the server already exposes the behaviour, or whether a non-UI@nextcloud/*package already covers it.@nextcloud/*npm scope, not just@nextcloud/vue→@nextcloud/vuecomponents/tokens → existingsrc/patterns.composer require-dev(nextcloud/ocp→vendor/nextcloud/ocp/OCP/), so "check for an existing interface" is a real local grep, not an appeal to background knowledge an agent may not have.#100's DAV
orderby/limitfix is the motivating example: the server already supported both via the DAVSEARCHgrammar, so the fix was a one-file request change instead of custom client-side pagination. This rule is meant to make checking for that kind of existing capability the default first move, not a lucky diagnosis.Process note
This draft went through an adversarial review pass before being opened. An earlier version hardcoded this app's
@nextcloud/*dependency list (stale the moment a dependency changes — and a direct contradiction of the token guidance two paragraphs below it, which explicitly refuses to enumerate for that same reason), gave no verifiable method for the OCP check ("say you checked" isn't auditable), and used "capability" for two different things four lines apart. All three are fixed in this version.Test plan