diff --git a/resources/instructions/engineering-best-practices.instructions.md b/resources/instructions/engineering-best-practices.instructions.md new file mode 100644 index 0000000..3073f7f --- /dev/null +++ b/resources/instructions/engineering-best-practices.instructions.md @@ -0,0 +1,9 @@ +--- +name: "Global Engineering Best Practices" +description: "Umbrella baseline for cross-project engineering guidance." +applyTo: "**" +--- + +- Use `engineering-core-defaults.instructions.md` for global engineering behavior. +- Use `language-and-tooling-defaults.instructions.md` for file-type and tooling baselines. +- When project-local instructions are present, treat them as the authoritative source. diff --git a/resources/instructions/engineering-core-defaults.instructions.md b/resources/instructions/engineering-core-defaults.instructions.md new file mode 100644 index 0000000..4dced05 --- /dev/null +++ b/resources/instructions/engineering-core-defaults.instructions.md @@ -0,0 +1,17 @@ +--- +name: "Engineering Core Defaults" +description: "Cross-project baseline for maintainable, predictable, and secure engineering decisions." +applyTo: "**" +--- + +- Prioritize maintainability, readability, and predictability over novelty. +- Prefer explicit behavior and descriptive names over implicit shortcuts. +- Reuse existing project patterns and utilities before introducing abstractions. +- Keep implementations modular and scoped; avoid monolithic files and deep nesting. +- Remove dead code, unused imports, and duplicate logic when touching related areas. +- Add comments only for non-obvious intent, trade-offs, or constraints. +- Favor composition over inheritance and use early returns to simplify control flow. +- Default to secure practices: validate inputs, isolate secrets, and avoid hardcoded credentials. +- Keep dependencies minimal and add new ones only with clear justification. +- Optimize for practical performance without reducing clarity or maintainability. +- Treat project-local instructions as authoritative when they conflict with global defaults. diff --git a/resources/instructions/env-config.instructions.md b/resources/instructions/env-config.instructions.md new file mode 100644 index 0000000..609b12c --- /dev/null +++ b/resources/instructions/env-config.instructions.md @@ -0,0 +1,12 @@ +--- +name: "Environment and Config Standards" +description: "Cross-project standards for env and conf files, with secure configuration defaults." +applyTo: "**/*.env,**/*.env.*,**/*.conf" +--- + +- Keep secrets out of source-controlled env files. +- Use environment-specific overrides instead of duplicating large config blocks. +- Keep `.example` templates free of real credentials. +- Document required variables and reasonable defaults. +- Prefer least-privilege and secret isolation practices. +- Ensure runtime/deploy scripts fail clearly when required variables are missing. diff --git a/resources/instructions/html.instructions.md b/resources/instructions/html.instructions.md new file mode 100644 index 0000000..bc3d3fa --- /dev/null +++ b/resources/instructions/html.instructions.md @@ -0,0 +1,11 @@ +--- +name: "HTML Standards" +description: "Cross-project HTML standards for semantic structure and accessibility." +applyTo: "**/*.html" +--- + +- Prefer semantic elements over generic wrappers. +- Maintain accessible heading order and labels. +- Keep layouts responsive and avoid inline styling where possible. +- Avoid deprecated or non-semantic patterns. +- Ensure keyboard and screen-reader-friendly markup for interactive elements. diff --git a/resources/instructions/javascript.instructions.md b/resources/instructions/javascript.instructions.md new file mode 100644 index 0000000..75f5323 --- /dev/null +++ b/resources/instructions/javascript.instructions.md @@ -0,0 +1,15 @@ +--- +name: "JavaScript Standards" +description: "Cross-project JavaScript and MJS standards for clarity, maintainability, and performance-aware code." +applyTo: "**/*.js,**/*.mjs" +--- + +- Prefer `const` over `let`, and avoid `var`. +- Use async/await for asynchronous flows. +- Keep modules focused and avoid monolithic files. +- Remove dead code and unused imports during related edits. +- Use early returns to reduce branching complexity. +- Keep behavior explicit; avoid implicit coercion and hidden side effects. +- Favor composition and reusable utilities over duplicated logic. +- Avoid deep nesting, callback-heavy control flow, and blocking sync work in user-facing paths. +- Validate with the project's JavaScript lint, test, and build commands. diff --git a/resources/instructions/json.instructions.md b/resources/instructions/json.instructions.md new file mode 100644 index 0000000..d465fe5 --- /dev/null +++ b/resources/instructions/json.instructions.md @@ -0,0 +1,12 @@ +--- +name: "JSON Standards" +description: "Cross-project JSON standards for stable structure and deterministic formatting." +applyTo: "**/*.json" +--- + +- Keep JSON formatting consistent and deterministic. +- Avoid duplicate keys and ambiguous nesting. +- Prefer stable, explicit property names. +- Remove unused configuration fields during related edits. +- Preserve existing data contracts unless intentional changes are documented. +- Validate JSON syntax before commit. diff --git a/resources/instructions/language-and-tooling-defaults.instructions.md b/resources/instructions/language-and-tooling-defaults.instructions.md new file mode 100644 index 0000000..4bd62b6 --- /dev/null +++ b/resources/instructions/language-and-tooling-defaults.instructions.md @@ -0,0 +1,16 @@ +--- +name: "Language and Tooling Defaults" +description: "Cross-project language and file-type guidance for JS, Vue, SCSS, Markdown, JSON, HTML, Shell, YAML, and config files." +applyTo: "**/*.js,**/*.mjs,**/*.vue,**/*.scss,**/*.md,**/*.json,**/*.html,**/*.sh,**/*.yml,**/*.yaml,**/*.env,**/*.conf" +--- + +- Use `javascript.instructions.md` for JavaScript and MJS files. +- Use `vue.instructions.md` for Vue SFC files. +- Use `scss.instructions.md` for SCSS stylesheets. +- Use `markdown.instructions.md` for Markdown docs. +- Use `json.instructions.md` for JSON data/config files. +- Use `html.instructions.md` for HTML templates/pages. +- Use `shell.instructions.md` for shell scripts. +- Use `yaml.instructions.md` for YAML configs. +- Use `env-config.instructions.md` for env and conf files. +- Prefer project-local instructions when they provide more specific guidance. diff --git a/resources/instructions/markdown.instructions.md b/resources/instructions/markdown.instructions.md new file mode 100644 index 0000000..6aab4f9 --- /dev/null +++ b/resources/instructions/markdown.instructions.md @@ -0,0 +1,12 @@ +--- +name: "Markdown Standards" +description: "Cross-project Markdown standards for concise, scan-friendly documentation." +applyTo: "**/*.md" +--- + +- Keep documents concise, structured, and easy to scan. +- Use consistent heading hierarchy. +- Prefer bullet lists and tables for structured content. +- Avoid large unbroken paragraphs. +- Use examples where they improve clarity. +- Keep formatting markdownlint-compatible when possible. diff --git a/resources/instructions/scss.instructions.md b/resources/instructions/scss.instructions.md new file mode 100644 index 0000000..30db0b5 --- /dev/null +++ b/resources/instructions/scss.instructions.md @@ -0,0 +1,13 @@ +--- +name: "SCSS Standards" +description: "Cross-project SCSS standards for modular styling and maintainable selector design." +applyTo: "**/*.scss" +--- + +- Keep selectors shallow and specificity low. +- Reuse variables and mixins instead of repeating style constants. +- Keep style modules focused; avoid monolithic stylesheet files. +- Avoid deep nesting and `!important` except as a last resort. +- Remove duplicated selectors and dead style rules during related edits. +- Prefer design-token reuse before adding new primitives. +- Validate with project style lint/build commands when available. diff --git a/resources/instructions/shell.instructions.md b/resources/instructions/shell.instructions.md new file mode 100644 index 0000000..3f26654 --- /dev/null +++ b/resources/instructions/shell.instructions.md @@ -0,0 +1,12 @@ +--- +name: "Shell Standards" +description: "Cross-project shell scripting standards for safety and predictable automation." +applyTo: "**/*.sh" +--- + +- Use defensive scripting with explicit error handling. +- Quote variables and paths. +- Validate inputs before using them in commands. +- Keep scripts modular and avoid hidden side effects. +- Avoid unsafe deletion patterns, silent failures, and hardcoded environment-specific paths. +- Keep scripts ShellCheck-compatible where feasible. diff --git a/resources/instructions/vue.instructions.md b/resources/instructions/vue.instructions.md new file mode 100644 index 0000000..f094611 --- /dev/null +++ b/resources/instructions/vue.instructions.md @@ -0,0 +1,14 @@ +--- +name: "Vue Standards" +description: "Cross-project Vue standards for component structure, state derivation, and rendering efficiency." +applyTo: "**/*.vue" +--- + +- Prefer Composition API with `