frontend-code

frontend-code is a cursor rule for Windsurf from loiane/specs-driven-development-spring-angular. It costs 0 tokens per session (457 once invoked), scanned A, original, MIT.

A set of rules for editing Angular frontend files that requires test-first development and checks accessibility and Angular coding conventions. Test-first development, often called TDD, means writing a failing test before writing the code that makes it pass.

In plain words
What is it for?
Use it when building or changing Angular components, templates, styles, and their tests. It helps enforce test-first work, typed models, component boundaries, and accessibility practices.
Why use it?
It prevents production code from being changed without a related failing test and stops tests from being weakened just to get a passing result. It also provides consistent guidance for Angular structure and accessible interfaces.

Cursor rule for Windsurf

Written for Windsurf: installed under .windsurf/.

Good fit Use it when building or changing Angular components, templates, styles, and their tests. It helps enforce test-first work, typed models, component boundaries, and accessibility practices.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/loiane/specs-driven-development-spring-angular/frontend-code
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.

Clone the repo
git clone --depth 1 https://github.com/loiane/specs-driven-development-spring-angular

Made for: Windsurf.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for frontend-code

README.md
[![agentmods](https://agentmods.dev/badge/rules/loiane/specs-driven-development-spring-angular/frontend-code/github.svg)](https://agentmods.dev/rules/loiane/specs-driven-development-spring-angular/frontend-code)
Your own site
<a href="https://agentmods.dev/rules/loiane/specs-driven-development-spring-angular/frontend-code"><img src="https://agentmods.dev/badge/rules/loiane/specs-driven-development-spring-angular/frontend-code/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for frontend-code

Your own site · 80×15
<a href="https://agentmods.dev/rules/loiane/specs-driven-development-spring-angular/frontend-code"><img src="https://agentmods.dev/badge/rules/loiane/specs-driven-development-spring-angular/frontend-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 457 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.00457
Opus 5.5 $0.00000 $0.00183
Sonnet 5.5 $0.00000 $0.00091
Haiku 4.5 $0.00000 $0.00046

Measured 25d ago against content hash d1e41c96e7d2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

frontend-code 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 25d 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.

.windsurf/rules/frontend-code.md · 42 lines

What it actually says

Frontend code rule (Angular)

When about to edit an Angular source file (*.ts, *.html, *.scss, *.css under src/):

  1. Read .specs/<active-feature>/.tdd-state.json.
  2. For production files (anything except *.spec.ts), verify tasks[<active-task>].phase is red, green, refactor, or simplify, red_at is set, red_failure_excerpt is non-empty, AND the file appears in files_in_scope.
  3. For *.spec.ts files, verify the file appears in files_in_scope.
  4. If verification fails, stop and tell the user: "No failing test for task <task-id>. Invoke /build <task-id> to write the test first."

Build-phase rules (TDD)

  • Test-first: write/extend failing tests before implementing behavior.
  • Never skip frontend tests to force green.
  • Never remove assertions from existing tests.

Angular implementation rules

Apply skills: .windsurf/skills/angular-developer/SKILL.md, .windsurf/skills/clarity-over-cleverness/SKILL.md.

  • Prefer standalone components and typed interfaces/models.
  • Keep smart/container logic separate from presentational components where practical.
  • Avoid hardcoded API URLs in components; route all calls through services.
  • Keep templates accessible: semantic buttons/inputs, labels, and keyboard-operable controls.

Test rules

  • Add/maintain component/service tests for new behavior.
  • Every user-input validation rule needs a negative-path test.
  • For optimistic-update flows, test both success and rollback paths.

Validate/review rules

  • During /validate and /review, never modify production code or tests.
  • Missing frontend validation outputs (lint/test/build for changed UI scope) is an error.
  • Any waiver must reference an ADR.
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. 25d ago First seen · 42 lines · 0 tokens per session scan A d1e41c96e7d2

Subscribe to this mod's changes

frontend-code is a cursor rule published in the GitHub repository loiane/specs-driven-development-spring-angular (66 stars, last pushed 22d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 457 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-11-05.

Related

frontend-code compared with cursor rules from other repositories

frontend-code next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
frontend-codeloiane/specs-driven-development-spring-angularCursor rule6622d agoMITA0Windsurf
scopesgetsentry/sentry-javaCursor rule1.4ktodayMITA7Cursor
metricsgetsentry/sentry-javaCursor rule1.4ktodayMITA2Cursor
sddpattilaszasz/sdd-pilotCursor rule991mo agoMITA15Windsurf
project-modules-and-stackSiborne/YiSmart-CloudCursor rule511d agoMITA418Cursor
backend-mapper-conventionsSiborne/YiSmart-CloudCursor rule511d agoMITA0Cursor
front-vue-page-conventionsSiborne/YiSmart-CloudCursor rule511d agoMITA0Cursor