AGENT SKILL

validation-authority

Treat upstream validators as authoritative. Align local config to them. Use when validation fails unexpectedly, before modifying validator behavior, or when tempted to change upstream tool code.

License 许可
MIT
所属仓库
loriensleafs/brain
最近更新
2026-03-11
Stars
★ 0
Forks
0

01 前言 Front Matter

name
validation-authority
model
claude-sonnet-4-5
agents
[ "implementer", "architect", "analyst" ]
license
MIT
metadata
{ "version": "1.0.0" }
description
Treat upstream validators as authoritative. Align local config to them. Use when validation fails unexpectedly, before modifying validator behavior, or when tempted to change upstream tool code.

02 资源文件 3

03 SKILL.md 正文

Validation Authority

When integrating external validators (PSScriptAnalyzer, markdownlint, ESLint, etc.), respect upstream defaults. Modify local configuration to match upstream behavior. Do not modify upstream tool code.

Triggers

Activate when:

  • Validation fails unexpectedly
  • Before modifying validator behavior or configuration
  • When tempted to change upstream tool source code
  • When adding a new external validator to the project
  • When suppressing validator warnings without rationale

Decision Tree

Validation failure occurred
        |
        v
Is the validator upstream (external tool)?
        |               |
       YES              NO (local/custom)
        |               |
        v               v
Modify LOCAL config   Modify tool as needed
to align with tool    (you own the code)
        |
        v
Document override rationale
in config comments

Process

  1. Classify the validator: Determine if the tool is upstream (external) or local (project-owned).
  2. Identify the conflict: Find the specific rule or default causing the failure.
  3. Check upstream defaults: Read the tool's documentation for the default behavior.
  4. Align local config: Update project configuration files to match or explicitly override upstream defaults.
  5. Document overrides: Add comments explaining why any override differs from the upstream default.

Trigger Table

Scenario Action Example
PSScriptAnalyzer rule fails Update .psscriptanalyzerrc.psd1 Suppress PSAvoidUsingWriteHost with rationale
markdownlint rule fails Update .markdownlint.yaml Disable MD013 line-length for generated docs
ESLint rule conflicts Update .eslintrc Override no-console for CLI tools
Upstream tool has a bug File issue upstream, add workaround in config Pin tool version, suppress specific rule
Tool default changed after upgrade Review and align local config to new default Update config after major version bump

Anti-Patterns

Avoid Why Instead
Forking upstream tools to change behavior Creates maintenance burden, diverges from community Configure locally, file upstream issues
Patching tool source to suppress warnings Hides real issues, breaks on updates Use tool's suppression mechanism
Disabling entire rule categories Loses protection the rules provide Suppress specific rules with rationale
Suppressing without rationale Future maintainers cannot evaluate the override Always document why in config comments
Copying tool defaults into local config Config drift when upstream updates Only override what you need to change

Verification

After applying this skill:

  • [ ] Validator is classified as upstream or local
  • [ ] Local config aligns with upstream defaults
  • [ ] Any overrides include documented rationale
  • [ ] No upstream tool source code was modified
  • [ ] Validation passes with the updated config

Examples

Example 1: PSScriptAnalyzer Rule Failure

Problem: PSAvoidUsingWriteHost fails on a CLI script that intentionally uses Write-Host.

Wrong approach: Modify PSScriptAnalyzer source or remove the rule globally.

Correct approach:

# .psscriptanalyzerrc.psd1
# Rationale: CLI scripts use Write-Host for user-facing output
@{
    Rules = @{
        PSAvoidUsingWriteHost = @{
            Enable = $false
        }
    }
}

Example 2: markdownlint Conflict

Problem: MD013 (line length) fails on auto-generated documentation.

Wrong approach: Fork markdownlint to increase default line length.

Correct approach:

# .markdownlint.yaml
# Rationale: Generated docs have long lines from tool output
MD013:
  line_length: 200
  tables: false

Example 3: New Tool Integration

Problem: Adding ruff to a Python project. Several existing files fail.

Wrong approach: Disable all failing rules immediately.

Correct approach:

  1. Run ruff check with defaults to see all violations.
  2. Fix violations that align with project standards.
  3. Suppress remaining rules per-file with # noqa and rationale.
  4. Document any project-wide overrides in pyproject.toml.

Related Skills

Skill Relationship
style-enforcement Enforces style rules that this skill governs
code-qualities-assessment Quality assessment, not validator config
incoherence Detects contradictions between config and behavior

Timelessness: 9/10

External tool integration is a universal software engineering concern. The principle of respecting upstream authority applies to any validator, linter, or static analysis tool regardless of language or framework.

04 同仓库更多 Skills

loriensleafs
loriensleafs/brain

using-brain-memory

Guidance for using Brain semantic memory effectively. Applies Zettelkasten atomic note principles with observations and relations. Use when deciding whether to query or create notes, structuring note content, or understanding the semantic knowledge graph.

★ 0
loriensleafs
loriensleafs/brain

threat-modeling

Structured security analysis using OWASP Four-Question Framework and STRIDE methodology. Generates threat matrices with risk ratings, mitigations, and prioritization. Use for attack surface analysis, security architecture review, or when asking what can go wrong.

★ 0
loriensleafs
loriensleafs/brain

taste-lints

Custom lints with agent-readable remediation instructions. Enforces taste invariants (file size, naming conventions, structured logging, complexity) and surfaces errors that agents can act on directly. Use when writing or reviewing code to catch style violations early.

Skill与智能体开发
★ 0
loriensleafs
loriensleafs/brain

style-enforcement

Validate code against style rules from .editorconfig, StyleCop.json, and Directory.Build.props. Detects line ending violations, naming convention issues, indentation problems, and charset mismatches across C#, Python, TypeScript, and JavaScript. Produces JSON reports for pre-commit hooks and CI pipelines.

★ 0
loriensleafs
loriensleafs/brain

steering-matcher

Match file paths against steering file glob patterns to determine applicable steering guidance. Use when orchestrator needs to inject context-aware guidance based on files being modified.

★ 0
loriensleafs
loriensleafs/brain

slashcommandcreator

Autonomous meta-skill for creating high-quality custom slash commands using 5-phase workflow with multi-agent validation and quality gates. Use when user requests new slash command, reusable prompt automation, or wants to convert repetitive workflows into documented commands.

Skill与智能体开发
★ 0