agentleFS
vlad-ryzhkovvlad-ryzhkov/ai-context-engineering-for-frontend/.cursor/rules/00-project-context.mdc

ai-context-engineering-for-frontend / rules

Cursor rule2 starsChanged 8 months agoUnlicenseView on GitHub

Frontend Context Engineering — project context for Cursor IDE

  • Reads credentials

The file

We split this 00-project-context.mdc into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    ALWAYS prioritize the context defined in CLAUDE.md and .claude/frontend_agent.md.

    line 8

≈ “Common” is an estimate: at least 1 in 5 of the 6,668 Cursor rule 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
00-project-context.mdc
---
description: Frontend Context Engineering — project context for Cursor IDE
alwaysApply: true
---

# Frontend Context Engineering

ALWAYS prioritize the context defined in `CLAUDE.md` and `.claude/frontend_agent.md`.

## Context

- **Project:** AI Context Engineering Template for Vue 3 / React 18
- **Role:** Frontend Lead (Orchestrator)
- **Frameworks:** React 18 + Vue 3 (both supported via framework parameter)
- **Documentation:** in English

> **Tech Stack, Core Principles, Safety Protocols:** see `CLAUDE.md` at root (SSOT)

## Anti-Patterns (BANNED)

| Problem | What to do instead |
|---------|--------------------|
| `: any` or `as any` in TypeScript | Explicit interface or `unknown` |
| Business logic in JSX/template | Extract to custom hook or composable |
| `useEffect` without deps (React) | Explicit dependency array |
| `v-for` without `:key` (Vue) | `:key="item.id"` always |
| Hardcoded API URLs | `import.meta.env.VITE_API_BASE_URL` |
| Missing loading/error state | All 4 states: loading / error / empty / success |
| `div onClick` without role | Use `<button type="button">` |

## Skills (How to Use in Cursor)

To run a skill, add the SKILL.md file to context and describe the task.

| Task | Add to context |
|------|----------------|
| Generate component (+ FSD scaffold) | `.claude/skills/component-gen/SKILL.md` |
| Bind API | `.claude/skills/api-bind/SKILL.md` |
| Write tests + a11y audit | `.claude/skills/component-tests/SKILL.md` |
| E2E tests | `.claude/skills/e2e-tests/SKILL.md` |
| Explore repo | `.claude/skills/fe-repo-scout/SKILL.md` |
| Init project | `.claude/skills/init-project/SKILL.md` |
| Explore backend repo | `.claude/skills/be-repo-scout/SKILL.md` |
| Browser check (verify running UI) | `.claude/skills/browser-check/SKILL.md` |
| Generate Next.js component | `.claude/skills/component-gen-next/SKILL.md` |
| Create PR | `.claude/skills/pr/SKILL.md` |

## Workflow

```text
/component-gen → /api-bind → /component-tests
```

> Full project context: `CLAUDE.md`
> Agent and skills: `.claude/frontend_agent.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.