frontend-rules

A set of required rules for building frontend interfaces, covering how components, assets, accessibility, styling, runtime behavior, and UI states should be handled.

In plain words
What is it for?
Guiding frontend implementation decisions such as component structure, responsive layout, browser state, loading and error handling, and accessibility.
Why use it?
It gives coding agents consistent project conventions and limits which rules different types of agents can use.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/thuandiep1707/codex-harness-javascript/frontend-rules
Clone the repo
git clone --depth 1 https://github.com/thuandiep1707/codex-harness-javascript
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 478 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00478
Opus 5 $0.00000 $0.00239
Sonnet 5 $0.00000 $0.00096
Haiku 4.5 $0.00000 $0.00048

Measured 2d ago against content hash b16390ae7c0d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

frontend-rules scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.docs/agents/frontend-rules.md · 48 lines

How it starts

The opening of the file, as written. The whole thing — 48 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Frontend rule architecture

Rule định nghĩa convention hoặc hành vi bắt buộc. Rule không phải workflow và không tự cấp authority để mở rộng scope.

Ownership

Coding specialist dùng:

.agents/specialists/coding/rules/component-decomposition-gate.md
.agents/rules/frontend-coding.md
.agents/rules/frontend/*.md

Testing specialist dùng .agents/rules/testing.md cùng local rule của chính nó. Brain, Orchestrator, Design và Test Plan chỉ load rule được manifest của mình allow.

Frontend topic rules

Topic Trigger
atomic-components.md Component placement, API, composition, variant
icons-images-assets.md Icon, SVG, image, logo, marker, asset
semantics-accessibility.md Interactive semantics, heading, form, ARIA, table
styling-layout.md CSS, Tailwind, token, layout, responsive behavior
react-state-runtime.md Server/client boundary, hook, state, provider, browser API
async-states.md Loading, error, empty, permission, missing configuration
generated-ui-validation.md Final validation for UI derived from design evidence

Coding luôn load decomposition gate nhỏ. Gate chỉ load full atomic-components.md khi Subtask thật sự đụng component/page/screen structure. Sau đó Coding chỉ load các topic rule khác khi trigger có trong transient handoff hoặc source evidence. Không load toàn bộ topic rules cho mọi task.

Specialist context boundary

Frontend/testing rules không được dùng làm lý do để đọc .docs/. Requirement của specialist chỉ đến từ transient issue-handoff và dependency evidence được Orchestrator cung cấp.

Nếu rule xung đột với handoff, specialist trả blocker. Specialist không tự sửa Jira, parent Task hoặc workflow scope.

Khi thêm rule

Chỉ tạo rule mới khi có trigger ổn định, nhiều quyết định liên quan và owner rõ ràng. Micro-rule nên được thêm vào topic hiện có, trừ khi cần một always-loaded gate ngắn để bảo vệ flow. Khi policy xuất hiện ở nhiều nơi, chọn một normative owner và dùng cross-reference ngắn ở nơi còn lại.

Read the full file on GitHub · 48 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 48 lines · 0 tokens per session scan A b16390ae7c0d

Subscribe to this mod's changes

frontend-rules is an agent published in the GitHub repository thuandiep1707/codex-harness-javascript (7 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 478 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.