Skip to content

Enforce TDD on Angular files and bring Windsurf to Angular parity - #26

Merged
loiane merged 1 commit into
mainfrom
loiane/angular-tdd-windsurf-parity
Nov 4, 2026
Merged

loiane merged 1 commit into
mainfrom
loiane/angular-tdd-windsurf-parity

Conversation

@loiane

@loiane loiane commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Summary

Step 5b of the review: Angular TDD enforcement and Windsurf parity for the Angular agents.

TDD hooks now cover Angular

Before, block-impl-without-failing-test.sh only fired on */src/main/*, so Angular production code could be edited without a failing test.

  • Production files (*.ts, *.html, *.scss, *.css under src/, except *.spec.ts / *.test.ts) now need a recorded red step (red_at, red_failure_excerpt) and must be in files_in_scope. This includes src/main.ts and src/styles.css.
  • Test files: enforce-files-in-scope.sh now checks *.spec.ts as well as src/test/**.
  • Ignored: node_modules/, plus files outside src/ such as angular.json and package.json.
  • The angular-test-engineer agent (all three platforms) now lists the .tdd-state.json fields the hook requires.

Windsurf parity

  • Added .windsurf/workflows/angular-{architect,test-engineer,implementer,validator,code-reviewer}.md. The bodies are identical to the Claude agents. Windsurf's /build already delegated to these agents, but they didn't exist.
  • Added .windsurf/rules/frontend-code.md, which mirrors the Copilot frontend instructions.
  • The Copilot frontend-code.instructions.md gained an explicit TDD-precondition block, like production-code.instructions.md.

Guardrail globs

Copilot applyTo and Windsurf globs were src/main/**, src/test/** and src/**, which match only at the repo root. Guardrails therefore never applied in multi-module repos or to an Angular app under frontend/. They now use **/src/....

Parity check

tools/check-parity.sh now also checks that every agent, slash command and guardrail exists on all three platforms (Claude agents/commands ↔ Copilot chatmodes/prompts ↔ Windsurf workflows; Copilot instructions ↔ Windsurf rules). It would have caught the missing Windsurf Angular workflows.

Testing

  • tests/run.sh: 12 new Angular hook cases, 91 total. They pass on bash 3.2 and 5.
  • Parity is OK; I confirmed it fails when frontend-code.md is removed.
  • shellcheck is clean, markdownlint reports 0 issues, and lychee reports 0 errors.

- TDD hooks cover Angular production files (*.ts/html/scss/css under src/,
  except *.spec.ts); files-in-scope hook covers *.spec.ts
- Windsurf: five Angular agent workflows and a frontend-code rule
- Copilot frontend instructions gain the TDD precondition
- guardrail globs use a **/ prefix so they apply in multi-module repos and
  frontend/ subdirectories
- check-parity.sh also checks agents, commands and guardrails per platform
- tests, docs and changelog updated
@loiane
loiane merged commit f145fe9 into main Nov 4, 2026
6 checks passed
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.

1 participant