fix: add MANDATORY prefix to all 8 core skill descriptions
- Add MANDATORY — always active to engineering-principles, testing, error-handling, security, git-workflow, api-design - Update hook output with explicit EXTREMELY_IMPORTANT instruction - Skills now explicitly state they apply to every session
This commit is contained in:
@@ -42,8 +42,10 @@ MANDATORY="engineering-principles clean-code clean-architecture testing error-ha
|
||||
SKILL_NAMES="${SKILL_NAMES#, }"
|
||||
|
||||
# --- output: plain text only, no emoji, no JSON ---
|
||||
echo "[hub-guide] detected: ${PROJECT_DIR}"
|
||||
echo "[hub-guide] session: ${PROJECT_DIR}"
|
||||
echo "[hub-guide] mandatory: ${MANDATORY}"
|
||||
if [ -n "$SKILL_NAMES" ]; then
|
||||
echo "[hub-guide] active: ${SKILL_NAMES}"
|
||||
fi
|
||||
echo ""
|
||||
echo "EXTREMELY_IMPORTANT: The hub-guide skills listed above are loaded and active. They apply to every code decision in this session. Never suppress lints. Never assume — show evidence. All skills work regardless of spoken language."
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: api-design
|
||||
description: Best practices for API design — REST, GraphQL, RPC conventions, versioning, status codes, pagination, error responses, and documentation. Use when designing new endpoints, reviewing API contracts. Detects from code context and project files — not dependent on specific language keywords."
|
||||
description: MANDATORY — always active. Best practices for API design — REST, GraphQL, RPC conventions, versioning, status codes, pagination, error responses, and documentation. Use when designing new endpoints, reviewing API contracts. Detects from code context and project files — not dependent on specific language keywords."
|
||||
---
|
||||
|
||||
# API Design
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: engineering-principles
|
||||
description: Foundational software engineering principles that apply across all languages, frameworks, and project types — correctness, simplicity, YAGNI, KISS, DRY, root-cause fixes, least astonishment, explicit over implicit, fail fast, professional craftsmanship, and multi-agent orchestration for complex tasks. This skill is a baseline: apply these principles to every code decision, review, and architecture discussion, regardless of language or framework. Engage proactively whenever writing, reviewing, or designing code — especially when the user's request seems to violate one of these fundamentals. Detects from code context, project files, and task complexity — not dependent on specific language keywords. Triggers regardless of spoken language when the task is complex, multi-step, or large in scope (see §26 — Workflow orchestration).
|
||||
description: MANDATORY — always active. Foundational software engineering principles that apply to every code decision, review, and architecture discussion, regardless of language or framework. 29 principles covering correctness, simplicity, YAGNI, KISS, DRY, root-cause fixes, professionalism, never suppress lints, never assume (show evidence), and multi-agent orchestration for complex tasks. Engage proactively whenever writing, reviewing, or designing code — especially when the user's request violates one of these fundamentals. Detects from code context, project files, and task complexity — not dependent on specific language keywords. Use Workflow orchestration for complex multi-step tasks (see §26).
|
||||
---
|
||||
|
||||
# Engineering Principles
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: error-handling
|
||||
description: Best practices for error handling across languages — exceptions, Result types, input validation, error boundaries, null safety, and observability. Use when designing error strategies, writing validation logic, handling API errors. Detects from code context and project files — not dependent on specific language keywords."
|
||||
description: MANDATORY — always active. Best practices for error handling across languages — exceptions, Result types, input validation, error boundaries, null safety, and observability. Use when designing error strategies, writing validation logic, handling API errors. Detects from code context and project files — not dependent on specific language keywords."
|
||||
---
|
||||
|
||||
# Error Handling
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: git-workflow
|
||||
description: Git workflow best practices — commit conventions, branching strategies, PR conventions, rebase vs merge, and code review. Use when writing commit messages, reviewing PRs, planning branching strategy. Detects from code context and project files — not dependent on specific language keywords."
|
||||
description: MANDATORY — always active. Git workflow best practices — commit conventions, branching strategies, PR conventions, rebase vs merge, and code review. Use when writing commit messages, reviewing PRs, planning branching strategy. Detects from code context and project files — not dependent on specific language keywords."
|
||||
---
|
||||
|
||||
# Git Workflow
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: security
|
||||
description: Security best practices for software development — input validation, authentication, authorization, secrets management, OWASP Top 10, and secure coding patterns. Use when handling user input, designing auth flows, storing secrets, configuring CORS/headers. Detects from code context and project files — not dependent on specific language keywords."
|
||||
description: MANDATORY — always active. Security best practices for software development — input validation, authentication, authorization, secrets management, OWASP Top 10, and secure coding patterns. Use when handling user input, designing auth flows, storing secrets, configuring CORS/headers. Detects from code context and project files — not dependent on specific language keywords."
|
||||
---
|
||||
|
||||
# Security Best Practices
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: testing
|
||||
description: Best practices for software testing — TDD, test pyramid, F.I.R.S.T. principles, mocking strategies, and test organization. Use when writing tests, designing test strategy, refactoring under test. Detects from code context and project files — not dependent on specific language keywords."
|
||||
description: MANDATORY — always active. Best practices for software testing — TDD, test pyramid, F.I.R.S.T. principles, mocking strategies, and test organization. Use when writing tests, designing test strategy, refactoring under test. Detects from code context and project files — not dependent on specific language keywords."
|
||||
---
|
||||
|
||||
# Testing Best Practices
|
||||
|
||||
Reference in New Issue
Block a user