/project-toolkit:validation-authorityfrom project-toolkit
Treats upstream validators (ESLint, markdownlint, PSScriptAnalyzer) as authoritative, guiding users to align local config rather than modifying tool code. Activates on validation failures or before changing validator behavior.
Ships in project-toolkit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
When integrating external validators (PSScriptAnalyzer, markdownlint, ESLint, etc.), respect upstream defaults. Modify local configuration to match upstream behavior. Do not modify upstream tool code.
Say validation failed unexpectedly, should I change the validator, or
is this validator authoritative. Activate when:
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
| 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 | Flag the bug to the owner with a repro, 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 |
/build Phase 2b invokes this skill after analysis-provenance classifies
every path validation_trigger.py flagged as a validation target. This mode
writes the decision record; it does not replace the general decision-tree
guidance above, which still applies whenever a human asks how to treat an
upstream validator.
analysis-provenance's category, owner, and
evidence with a diagnosis of what actually happened:
implementation-defect (the local check has a real bug), local-config-defect
(only the project's own config needs to change), stale-generated-output
(a generated mirror drifted from its template or source), baseline-update
(a ratchet or baseline needs new entries), upstream-defect (the vendored
or upstream tool itself is wrong), relocation-no-semantic-change (a test
file moved or split under tests/ with the same collected tests; see
rule 9 below), or unknown (evidence is insufficient).permitted_change_location Phase 3 may edit. GENERATED
always permits only the canonical source, never the mirror. VENDOR and
UPSTREAM never permit the target itself; point at the local override or
config instead. unknown diagnosis or UNKNOWN category permits nothing:
the record blocks further semantic edits until ownership evidence exists.baseline-update, cite the existing policy that authorizes the
refresh (baseline_justification.policy_source, a path that exists on
disk), state the reason, and justify every added entry individually.<record-path> (see "Validation Change Record" below
for where that resolves) and run
( for d in "${CLAUDE_PLUGIN_ROOT}" "${COPILOT_PLUGIN_ROOT}" .claude; do if [ -n "$d" ] && [ -f "$d/lib/ptk_run.py" ]; then exec python3 "$d/lib/ptk_run.py" skills/validation-authority/scripts/validation_record.py --record <record-path> --changed-path <path>; fi; done; echo "ptk_run: no plugin root holds lib/ptk_run.py" >&2; exit 2 )
for every changed path (one --changed-path <path> each, inside the locator). Exit 0 clears Phase 3 to edit the permitted
locations; exit 1 names the blocking targets; exit 2 is a
configuration error in the record or the invocation.| Script | Purpose | Exit codes |
|---|---|---|
validation_record.py (this skill's script directory) | Checks the Phase 2b decision record: field shape, provenance/authority rules, and changed-path coverage. Emits a JSON summary of target count, counts by category, defects, and checks (whether the trigger recheck ran, and how many targets real collection checked). | 0 record passed, 1 the record has defects, 2 config error (unreadable file, invalid JSON, the sibling build trigger could not be loaded or could not read its inputs when --changed-path needed it, or pytest is not installed) |
<record-path> above means: resolve a scratch directory the way
paths.artifact_dir does, take its scratch/ subdirectory, then
validation-authority-record.json inside it. That directory is agent PR
scratch space in the consumer's own workspace (git-ignored in this repo's own
checkout); the PR body carries the record's summary instead of a commit.
{
"trigger": { "...": "the validation_trigger.py output, carried through unchanged" },
"targets": [
{
"target": "<path>",
"component": "<human label for the tool or config>",
"provenance": {
"category": "LOCAL | GENERATED | VENDOR | UPSTREAM | UNKNOWN",
"owner": "<non-empty>",
"evidence": "<non-empty>",
"canonical_source": "<required, and equal to permitted_change_location, when category is GENERATED>"
},
"authority": {
"contract": "<non-empty; the validator's own exit-code or pass/fail contract>",
"diagnosis": "implementation-defect | local-config-defect | stale-generated-output | baseline-update | upstream-defect | relocation-no-semantic-change | unknown",
"permitted_change_location": "<non-empty; never the target itself for VENDOR or UPSTREAM>",
"escalation": "<required, non-empty, when diagnosis is upstream-defect>"
},
"baseline_justification": {
"policy_source": "<repository-relative path to an existing file; required when diagnosis is baseline-update>",
"reason": "<non-empty>",
"added_entries": [{ "justification": "<non-empty per entry>" }]
},
"relocation_evidence": {
"collect_command": "<required when diagnosis is relocation-no-semantic-change; the command that listed the tests>",
"moved_from": ["<test module path the tests left, non-empty list>"],
"moved_to": ["<test module path the tests landed in, non-empty list; includes this target>"],
"tests_before": ["<collected test id at the base, from the moved_from files only>"],
"tests_after": ["<collected test id after the move, from the moved_to files only>"]
}
}
]
}
Rules validation_record.py enforces:
target, component, provenance, and authority.
trigger holds the trigger's JSON object, and its decision is activate
or skip. A skip that lists effects or targets is a contradiction. When
the trigger activated, the record needs at least one target, and each path
the trigger named needs a record target.
An activated trigger must carry an effects list; a record without one is a
defect. The validator cannot recompute effects from paths: they are
diff-verified declarations, and an empty list is trusted. With
--changed-path, the validator reruns the trigger on those paths and
refuses a skip the trigger would activate.UNKNOWN category or unknown diagnosis is always a blocking defect: stop
semantic edits and request ownership evidence.GENERATED needs provenance.canonical_source, and
authority.permitted_change_location must equal it.VENDOR or UPSTREAM: authority.permitted_change_location must not
equal target. upstream-defect needs a non-empty authority.escalation.baseline-update needs baseline_justification with a policy_source
that is a relative path to an existing file inside the repository, a non-empty reason, and a non-empty justification on
every entry in added_entries.--changed-path supplied: every path the sibling build trigger's
path cues alone would flag needs a record target; a VENDOR or UPSTREAM
target must not itself be a changed path; a changed GENERATED target
needs its canonical source changed too, never edited as a standalone
mirror../a/b.py, a\\b.py, and a/b.py are
the same target.relocation-no-semantic-change needs LOCAL provenance, a test module
target under tests/ (test_*.py or *_test.py, so conftest.py and
other support files are refused), and a relocation_evidence block with
moved_from and moved_to path lists. moved_to lists the target, and
the before and after ids must name exactly the moved_from and moved_to
files. List the collected test ids (for example pytest --collect-only -q)
at the base and after the move. The ids compare without their file path, so
the part after the first :: must form equal multisets (order does not
matter, counts do). A dropped, added, or renamed test is a defect: use a real diagnosis. The names do not show an edited
assertion, so declare --effect fixture-redefines-case (or the matching
effect) to the trigger when an assertion changed. A record that pairs
this diagnosis with any trigger effect is a defect.
Every moved_from and moved_to path follows the same rule as the target:
under tests/, no .., a test module name. The CLI also runs a fixed
pytest --collect-only -q over the moved_to files and compares the real
ids with tests_after. It never runs the record's own collect_command.
A collection that fails or finds no tests is a defect.
Trust model: collection imports each moved_to module, every
conftest.py from the pytest rootdir down to it (the repository root one
included), and every installed pytest plugin. The path checks bound which
test modules load, not what code runs. Run the CLI only on a checkout you
trust, as you would run its test suite.| 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 |
After applying this skill:
echo "exit=$?" output after running the validator command) to confirm the updated config passes; a claim of "validation passes" without pasted output does not countProblem: 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
}
}
}
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
Problem: Adding ruff to a Python project. Several existing files fail.
Wrong approach: Disable all failing rules immediately.
Correct approach:
ruff check with defaults to see all violations.# noqa and rationale.pyproject.toml.| Skill | Relationship |
|---|---|
| style-enforcement | Enforces style rules that this skill governs |
| code-qualities-assessment | Quality assessment, not validator config |
| doc-accuracy | Detects contradictions between docs/config and behavior |
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.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (rjmurillo/ai-agents) — no native marketplace selected
npx claudepluginhub p/rjmurillo-copilot-cli-agents-src-copilot-cli104 skills in this plugin
/adr-generatorCreate comprehensive Architectural Decision Records (ADRs). Researches the destination directory to detect existing template conventions, gathers context, determines next ADR number, generates the ADR, validates completeness, and saves. Supports multiple ADR formats (MADR, Nygard, Alexandrian, project canonical). Use when documenting technical decisions, creating new ADR files, or capturing rationale so future readers can revisit a choice. Use when you say "write an ADR", "document this decision", "document these design choices", "record why we chose this", "capture the rationale", or "for future maintainers", or when creating an ADR-like markdown file under docs/decisions/, docs/adr/, docs/architecture/, architecture/decisions/, or .project-toolkit/architecture/. Do NOT use to debate or review an existing ADR (use adr-review)./adr-reviewMulti-agent debate orchestration for Architecture Decision Records. Automatically triggers on ADR create/edit/delete. Coordinates architect, critic, independent-thinker, security, analyst, and high-level-advisor agents in structured debate rounds until consensus. Use when you say "review this ADR", when an ADR is created/edited/deleted, or when reviewing, accepting, or updating a decision file under .project-toolkit/architecture/, docs/architecture/, docs/decisions/, docs/adr/, or architecture/decisions/, including intent like "review this decision record" or "check this rationale for future maintainers". Do NOT use to author a new ADR (use adr-generator).2 plugins in one repository ship this exact skill · first indexed Nov 13, 2026
Other plugins' skills for the same job