Skip to content

Add AGENTS.md with project conventions#874

Open
lukaskroepfl wants to merge 9 commits into
developfrom
docs/agents-md
Open

Add AGENTS.md with project conventions#874
lukaskroepfl wants to merge 9 commits into
developfrom
docs/agents-md

Conversation

@lukaskroepfl

@lukaskroepfl lukaskroepfl commented May 18, 2026

Copy link
Copy Markdown
Member

Description

Adds a repo-level AGENTS.md with concise guidance for working in bitmovin-player-ui.

This PR originally started as a longer project-conventions document. After review, the content was narrowed to repo-wide steering rather than component-specific or user-specific workflow notes. The current version focuses on how to work with the UI framework structure and keeps detailed feature documentation out of the agent file.

The guidance now covers:

  • engineering judgment and editing guardrails for working in an existing, potentially dirty checkout
  • UIFactory, UIManager, UIInstanceManager, component ownership, lifecycle cleanup, and Shadow DOM/root-sensitive behavior
  • Player Web API usage, the Player Web API reference, Android/iOS SDK bridge parity, and explicit MobileV3PlayerAPI boundaries
  • component construction, config timing, SCSS ownership, stored-setting normalization, and public component export expectations
  • public API/TypeDoc readability, runtime collection APIs, production-name stability, changelog wording, PR shape, and verification expectations

The current structure came from three cleanup passes:

  • Compared the original PR text against the repo-specific lessons we actually wanted to keep, and removed broad checklist-style agent workflow.
  • Audited the last 30 merged PRs to pull out only reusable decisions that were not already covered, such as stored-setting normalization and public collection API behavior.
  • Reworked the top-level format to follow a decision-first style: engineering judgment first, then repo architecture, public API, workflow, and verification.

Checklist (for PR submitter and reviewers)

  • CHANGELOG entry

Captures the conventions that have come up repeatedly in PR reviews but
weren't written down anywhere (CONTRIBUTING.md only covers code-style
basics). Topics include: reusing existing utilities (Timeout, Button,
DismissClickOverlay, LiveStreamDetector, …), Player ↔ UI boundary rules
(player.exports, source of truth, no defensive try/catch), component
design (no Component without DOM, shared state on UIManager, stable
subscription refs, prefer derived values, no reparenting), iOS reality
check, default-on caution, "Player vs UI" scope questions, anti-patterns
(bandaid timers, vague names), CHANGELOG hygiene, and a pre-commit
checklist.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@stonko1994 stonko1994 marked this pull request as draft July 1, 2026 14:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new AGENTS.md at the repository root to document project-specific conventions and review heuristics for bitmovin-player-ui, intended to reduce repeated review feedback and standardize patterns across contributions.

Changes:

  • Introduces AGENTS.md with guidance on UI structure boundaries (UIFactory/UIManager), player API usage, component patterns, and verification habits.
  • Documents mobile SDK considerations (Android/iOS WebView/native-bridge constraints) for UI changes that depend on platform behavior.
  • Adds checklists and conventions around PR shape, changelog hygiene, and common anti-patterns.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md
@stonko1994 stonko1994 changed the title docs: add AGENTS.md with project conventions Add AGENTS.md with project conventions Jul 2, 2026
@stonko1994 stonko1994 marked this pull request as ready for review July 2, 2026 08:15
@stonko1994 stonko1994 requested a review from matamegger July 2, 2026 08:16

@matamegger matamegger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit on the longer side. I think it could probably be more concise in it's phrasing.
But most important is that it works when working on the project.

Should we also add a CLAUDE.md symlinking to the AGENTS.md.
AFAIK claude is not automatically injecting AGENTS.md in the context.

Comment thread AGENTS.md Outdated

## Scope

These notes apply to `bitmovin-player-ui` checkouts and worktrees. Keep the guidance focused on how this UI framework is structured.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
These notes apply to `bitmovin-player-ui` checkouts and worktrees. Keep the guidance focused on how this UI framework is structured.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread AGENTS.md Outdated
Comment on lines +13 to +14
- When you search for text or files, you reach first for rg or rg --files; they are much faster than alternatives like grep. If rg is unavailable, you use the next best tool without fuss.
- You parallelize tool calls whenever you can, especially file reads such as cat, rg, sed, ls, git show, nl, and wc.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is such guidance still needed for commonly used agent harnesses?

I fill like such instructions are not needed on project level, if at all.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread AGENTS.md Outdated
Comment on lines +30 to +35
- You may be in a dirty git worktree.
- While working, you may encounter changes you did not make. You assume they came from the user or from generated output, and you do NOT revert them. If they are unrelated to your task, you ignore them. If they affect your task, you work with them instead of undoing them. Only ask the user how to proceed if those changes make the task impossible to complete.
- NEVER revert existing changes you did not make unless explicitly requested, since these changes were made by the user.
- If asked to make a commit or code edits and there are unrelated changes to your work or changes that you didn't make in those files, don't revert those changes.
- If the changes are in files you've touched recently, you should read carefully and understand how you can work with the changes rather than reverting them.
- If the changes are in unrelated files, just ignore them and don't revert them.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if needed on project level or if that should be part of personal or global agent guidance.
Generally the content seems fine/good.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought the same! My reasoning for adding it was that I still regularly experience this when working, and I thought, why not add it? One regular use case in the UI actually is modifying the index.html for testing.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stonko1994 stonko1994 requested a review from matamegger July 2, 2026 11:03
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.

4 participants