agentleFS
emilianoeloiemilianoeloi/ios-WK-UI-WebView/.github/copilot-instructions.md

ios-WK-UI-WebView

Copilot instructions3 starsChanged 4 months agoMITView on GitHub

Copilot instructions for this legacy Objective-C iOS project focused on WKWebView/UIWebView behavior and JavaScript bridge integration.

The file

Show its rules and text

We split this copilot-instructions.md into the rules it gives an agent

14 rules. About 0 are common, 10 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Keep changes minimal and localized in legacy code.

    line 18
  2. Distinctive:

    Prefer Objective-C patterns already used in the project.

    line 19
  3. Distinctive:

    Do not introduce SwiftUI, Combine, or large architectural rewrites unless explicitly requested.

    line 20
  4. Distinctive:

    Keep public bridge APIs and protocol constants backward compatible.

    line 21
  5. Very specific:

    Treat WebViewJavascriptBridge.js.txt and WebViewJavascriptBridgeBase.* as a protocol pair.

    line 26
  6. Very specific:

    Keep Constants.h values centralized.

    line 30
  7. Distinctive:

    Prefer focused unit tests when touching parsing, routing, or bridge message transformations.

    line 36
  8. Distinctive:

    Add comments only where behavior is subtle (navigation edge cases, bridge queue logic).

    line 37
  9. Distinctive:

    Keep naming stable and explicit for maintainability in an old codebase.

    line 38
  10. Distinctive:

    Default tone is concise.

    line 42
  11. Distinctive:

    No long summaries unless requested

    line 47
  12. Distinctive:

    Keep explanations practical and code-linked

    line 48
  13. Very specific:

    When the request is educational/historical or asks for best practices around Apple WebView, load skills/webview-legacy-reference/SKILL.md.

    line 52
  14. Very specific:

    When the request asks for latest Apple/WebKit changes, policy updates, or browser engine scope changes, load …

    line 53

≈ “Common” is an estimate: at least 1 in 5 of the 3,779 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

Copilot Instructions

Project Intent

This repository is an iOS legacy playground (Objective-C, circa iOS 8/9 era) created to explore:

  1. WKWebView configuration and lifecycle
  2. UIWebView fallback behavior
  3. ObjC <-> JS communication using WebViewJavascriptBridge and WKWebViewJavascriptBridge

Primary source of truth for scope is the root README.md and existing code under ios-WK-UI-Webview/.

Workflow Rules

  • Keep changes minimal and localized in legacy code.
  • Prefer Objective-C patterns already used in the project.
  • Do not introduce SwiftUI, Combine, or large architectural rewrites unless explicitly requested.
  • Keep public bridge APIs and protocol constants backward compatible.
  • Validate behavior through flow reasoning around load lifecycle and delegate callbacks.

Guardrails For This Codebase

  • Treat WebViewJavascriptBridge.js.txt and WebViewJavascriptBridgeBase.* as a protocol pair.
  • Preserve wvjbscheme and queue host semantics unless migration is explicitly requested.
  • Be careful with observer/delegate lifecycle (avoid leaks/crashes from KVO or delegate replacement).
  • Maintain fallback pathways when editing WebView controllers.
  • Keep Constants.h values centralized; avoid scattering literals.

Quality Baseline

  • Changes should compile in Objective-C context (no mixed-language assumptions).
  • The canonical build command (with the deployment-target override modern Xcode requires) lives in AGENTS.md.
  • Prefer focused unit tests when touching parsing, routing, or bridge message transformations.
  • Add comments only where behavior is subtle (navigation edge cases, bridge queue logic).
  • Keep naming stable and explicit for maintainability in an old codebase.

Communication Efficiency

Default tone is concise.

Rules:

  • Skip affirmations and filler
  • Respond directly
  • No long summaries unless requested
  • Keep explanations practical and code-linked

For maximum token compression, load skills/concise-output/SKILL.md.

When the request is educational/historical or asks for best practices around Apple WebView, load skills/webview-legacy-reference/SKILL.md. When the request asks for latest Apple/WebKit changes, policy updates, or browser engine scope changes, load skills/update-apple-webview-landscape/SKILL.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.