front-end-dev-standards
v1.1.0
Published
Company-wide Angular coding standards for Cursor AI and GitHub Copilot
Downloads
326
Maintainers
Readme
front-end-dev-standards
Company-wide Angular coding standards packaged for Cursor AI and GitHub Copilot.
What It Does
When installed in an Angular project, the postinstall script automatically:
- Creates
.ai-standards/with standards markdown files - Creates
.cursor/rules/company.mdcfor Cursor - Creates
.github/copilot-instructions.mdfor GitHub Copilot
npm install -D front-end-dev-standards
↓
postinstall runs setup.js
↓
.ai-standards/ ← standards source of truth (local copy)
.cursor/rules/ ← Cursor reads this automatically
.github/ ← Copilot reads copilot-instructions.md
↓
AI tools generate standardized Angular codeInstallation
From npm registry (production)
npm install -D front-end-dev-standardsLocal development (this monorepo)
# Already wired via file: dependency in root package.json
npm install
npm run standards:setupManual Commands
# Idempotent setup (skips existing files)
npm run standards:setup
# Force overwrite all generated files
npm run standards:setup:force
# Preview changes without writing
node packages/dev-standards/scripts/setup.js --dry-runConfiguration
Create .standardsrc.json in your project root:
{
"overwrite": false,
"targets": {
"standardsDir": ".ai-standards",
"cursorRulesFile": ".cursor/rules/company.mdc",
"copilotInstructionsFile": ".github/copilot-instructions.md"
}
}| Option | Default | Description |
|---|---|---|
| overwrite | false | When true, replaces existing generated files |
| targets.standardsDir | .ai-standards | Where standards MD files are copied |
| targets.cursorRulesFile | .cursor/rules/company.mdc | Cursor rules output path |
| targets.copilotInstructionsFile | .github/copilot-instructions.md | Copilot instructions path |
CLI flag --force overrides overwrite to true for a single run.
Adding a New Standards File
- Create any
*.mdfile inpackages/dev-standards/standards/(e.g.security.md) - Run
npm run standards:setup(ornpm install— postinstall runs automatically)
All .md files in standards/ are auto-discovered — no need to edit config/default.json.
When a new file is added, Cursor and Copilot config files are refreshed automatically.
To update existing standards content, run npm run standards:setup:force.
Standards Files
| File | Purpose |
|---|---|
| standards/angular.md | Angular 20+ patterns: standalone, signals, inject, forms |
| standards/architecture.md | Feature-based folder structure, layers, data flow |
| standards/coding-style.md | TypeScript naming, formatting, review checklist |
| standards/testing.md | Vitest conventions, coverage expectations |
How Cursor Reads Rules
Cursor automatically loads .cursor/rules/*.mdc files from your project.
The generated company.mdc has alwaysApply: true, so every AI interaction in the project follows your standards.
How GitHub Copilot Reads Standards
Copilot reads .github/copilot-instructions.md at the repository root.
It does not read .cursor/rules/ — that's why the postinstall script generates a separate Copilot file from the same standards.
Versioning & Upgrades
npm update front-end-dev-standards
npm run standards:setup:force # refresh generated filesPublishing as npm Package
Registry: https://registry.npmjs.org/ (configured in .npmrc and publishConfig)
# From repo root
npm login
npm run standards:validate
npm run standards:pack
npm run standards:publish
# Version bumps + publish
npm run standards:publish:patch
npm run standards:publish:minor
npm run standards:publish:majorConsumer projects install with:
{
"devDependencies": {
"front-end-dev-standards": "^1.0.0"
}
}The package's own postinstall hook runs setup.js automatically on npm install.
Package Structure
packages/dev-standards/
├── config/
│ └── default.json
├── scripts/
│ └── setup.js
├── standards/
│ ├── angular.md
│ ├── architecture.md
│ ├── coding-style.md
│ └── testing.md
├── templates/
│ ├── company.mdc.template
│ └── copilot-instructions.md.template
├── package.json
└── README.mdLicense
UNLICENSED — internal company use only.
