/foundationskills:fskills-refusal-surfacefrom foundationskills
Attribution skill that maps RED/REFUSED findings to declared rule IDs from registered skills. Invented or missing IDs are flagged as RS-HO-001 or RS-HO-002. Never drops or invents findings.
Ships in foundationskills. 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.
None: SKILL.md is the whole skill.
Turn RED/REFUSED findings into a sealed finding_set whose every entry cites a
rule id that a registered skill actually declares. Attribution is pure and
deterministic over a list of findings: no FoundationScale call, no GPU, no job is
emitted. An entry that cites an id nobody declares is an invented id and makes
the whole sealing RED (RS-HO-001); an entry with no usable id is attributed as
RS-HO-002 instead of being dropped. The skill never invents a rule id (an
invented id lives only in evidence.source_rule_id and in payload data) and
never silently drops a finding.
finding_set in which every entry is traceable to a SKILL.md rule.MADE-UP-1) and you need to know what happens to it.| Field | Required | Meaning |
|---|---|---|
findings | yes | list of finding objects; per entry only message (string ≥1) is required, plus optional rule_id (string), severity (BLOCK/WARN/INFO), evidence (object), recovery (string). No minItems: emptiness must reach the input check (RS-IN-001) |
source_skill | no | skill that produced the findings; recorded as source_skill in the sealed set (default "") |
result_status | no | status of the run the findings came from (PASS/RED/UNMEASURED/REFUSED), recorded as result_status (default REFUSED, findings arrive from a failed run) |
out | no | directory to write finding_set.<artifact_id>.json into (a *.json path uses its parent); relative paths resolve under the workdir. Default <workdir>/artifacts |
artifact_id | no | id of the sealed artifact; default rs-<sha256_json(findings)[:12]> (content id of the normalized entries) |
finding_set.<artifact_id>.json (artifact type finding_set, written atomically, with provenance) and the
same payload on result.payload: source_skill, result_status, findings. Every normalized entry
has the shape {"rule_id", "severity", "message", "evidence", "recovery", "cited_by"}:
rule_id is always a declared id: the original when the finding cites one, else RS-HO-001 (an
invented/undeclared id) or RS-HO-002 (an unattributed or malformed finding). evidence.source_rule_id
keeps what arrived (never a dropped finding), so the original id survives on the entry that cites it.severity is passed through, and normalized to BLOCK when what arrived is unknown.cited_by names the registered skill whose SKILL.md declares rule_id (refusal_surface for RS-*),
so every entry is traceable to a SKILL.md rule.Exit codes (this skill's exit set: 0/5/96): 0 PASS (every entry attributed; unattributed or malformed
findings carry an RS-HO-002 WARN), 5 RED (an id was invented — RS-HO-001; the set is still sealed and
written, the sealed entry cites RS-HO-001), 96 REFUSED (nothing to surface — RS-IN-001, no artifact).
Nothing to run on GB200: this skill is "attribution only; no FoundationScale call"
(fs_interface.apits == (), it emits a finding_set and no fs_launch_spec), so it
emits and submits no job. File the sealed finding_set.<artifact_id>.json into whatever
chain needs a traceable failure surface; fskills has no emit/launch step here.
Any LLM/VLM family and every training stage (pretrain/cpt/sft/preference/rl), full or adapter work on GB200/H100/local — the scope comes with the findings, not with this skill. Pure attribution over a finding list; it needs no dataset, checkpoint, probe report or confirmation record.
Outcome semantics (from core/contract.py, the same for every skill): an input-phase BLOCK refuses
before any work — status REFUSED, exit 96, nothing written. A handoff-phase BLOCK does not refuse:
the work ran, and the result is RED (exit 5), never PASS. WARN and INFO findings never block; they travel
with the result. Every finding must use self.finding(rule_id, …) with a declared id. An undeclared-rule
finding (a Finding whose rule_id no skill declares) is appended as CORE-UNDECLARED-RULE and forces
RED (docs/ARCHITECTURE.md:31) — this skill therefore never emits a Finding with an undeclared id:
invented ids live only in Finding.evidence (invented_rule_ids, source_rule_id) and in the sealed
payload data. Phase by prefix: RS-IN-* rules are input phase, RS-HO-* rules are handoff phase.
| Rule | Severity | Fires when |
|---|---|---|
| RS-IN-001 | BLOCK | findings is empty or not a finding set — nothing to surface (refuse rather than emit an empty surface); no artifact is written |
| RS-HO-001 | BLOCK | an incoming finding cites a rule id no registered skill declares (e.g. PF-IN-999, made-up-id) — invent rule ids ⇒ RED (exit 5); also when the sealed entries cannot be shown to cite declared ids at handoff |
| RS-HO-002 | WARN | an incoming finding is unattributed or malformed — has no usable rule id, or an unknown severity: attributed in the emitted set (id cited as RS-HO-002; unknown severity normalized to BLOCK) |
finding_set is written.evidence.invented_rule_ids; the
sealed entry cites RS-HO-001 and keeps the original in evidence.source_rule_id. Recover by citing
the declared id or declaring it with a MUST_FIRE fixture, then reseal.RS-HO-002 and the finding is kept (attributed), never dropped.CORE-UNDECLARED-RULE (docs/ARCHITECTURE.md:31), which is
why this skill only ever emits RS-IN-001/RS-HO-001/RS-HO-002.None. entries=(), emits=("finding_set",), apis=(). Notes: "attribution only; no FoundationScale
call". It consumes finding lists (RED/REFUSED findings from any skill) and emits one finding_set
artifact; it never calls FoundationScale, reads a checkpoint or submits anything.
Host portability (A1.5). On a host where the fskills CLI or the foundationskills package is missing, do not improvise a plan or simulate a result: report REFUSED with the install step (pip install -e <FoundationScale repo>/FoundationSkills, or run where it is installed), and report every check that could not run as UNMEASURED, never PASS.
from pathlib import Path
from foundationskills.core.contract import SkillContext
from foundationskills.skills.refusal_surface import RefusalSurfaceSkill
request = {
"findings": [{"rule_id": "MADE-UP-1", "severity": "BLOCK", "message": "failure output with an invented id"}],
"result_status": "REFUSED",
}
result = RefusalSurfaceSkill().execute(request, SkillContext(workdir=Path("artifacts/rs-demo")))
assert result.exit_code == 5 # RED: an invented id -> RS-HO-001
entry = result.payload["findings"][0]
assert entry["rule_id"] == "RS-HO-001" # the entry cites a declared id ...
assert entry["evidence"]["source_rule_id"] == "MADE-UP-1" # ... and still keeps what arrived
assert all(f.rule_id != "MADE-UP-1" for f in result.findings) # never a Finding with an undeclared id
print(result.artifacts[0].path) # artifacts/rs-demo/finding_set.rs-<hash>.json
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
21 skills in this plugin
/fs-dataUser-invoked slash command: run ONLY when the user types /fs-data; never choose it on your own. Slash-command data preparation workflow (/fs-data) that composes the model skill data_engine to turn raw data refs into a dataset, data_pipeline_spec and readiness_report. Inputs: the data_engine request fields (sources, target_format, tokenizer, chat_template_family, out_dir, requirements, pipeline, reasoning_unsupported, benchmarks, ...) passed through unchanged, plus optional goal_spec (a path recorded in outputs, not interpreted). The workflow record says which step ran, what it produced and the verdict (PASS/RED/UNMEASURED). Do NOT use for explaining fskills results (use /fs-status), fixing data problems yourself, or training a model (use /fs-training): this composes data_engine and produces data artifacts only./fs-evalUser-invoked slash command: run ONLY when the user types /fs-eval; never choose it on your own. /fs-eval is the A3.2 user-invoked workflow skill: it takes the evaluation request (checkpoint, run_manifest, base, benchmarks, policy, eval_cache, out, baseline_cache, ...) and forwards it UNCHANGED to the ONE composed model skill `evaluation`, run through foundationskills.skills._workflow, then writes one workflow_record {workflow, steps, outputs, verdict} whose outputs name the eval_report BY PATH. Outcome mapping (PASS 0 / RED 5 / UNMEASURED 95 / REFUSED 96): inner REFUSED -> FE-IN-002 REFUSED; inner RED -> FE-HO-001 RED; inner UNMEASURED -> FE-HO-002 UNMEASURED (never PASS). Do NOT use for fixing a regression, running a bare lm-eval harness or judging launch-readiness: /fs-eval records the evaluation verdict, it never repairs a benchmark or tunes a policy./fs-goalUser-invoked slash command: run ONLY when the user types /fs-goal; never choose it on your own. Grilling composer (/fs-goal) for one FoundationSkills goal_spec: takes the intake answers so far ({objective, goal?, domain?, preserve_general?, base_model {name_or_path, size_b?, arch?}, sources [{uri, kind, ...}], hardware {gpu, gpus_per_node, nodes}, data_facts {has_verifiable_answers, has_pairs, has_instructions}, rl_algorithm?}), asks ONLY for the facts intake.missing_facts still names and then one confirm question, and writes one goal_spec artifact only when the frontier is empty AND confirmed is true. Do NOT use to plan, train, launch, fix or explain a run: this skill only collects and confirms intake facts (fskills-training plans). Side-effect free: composes and invokes nothing (invokes is empty) and writes only its own goal_spec./fs-handoffUser-invoked slash command: run ONLY when the user types /fs-handoff; never choose it on your own. Slash-command closer (/fs-handoff) for a FoundationSkills session: takes this session's artifact JSON paths, optional notes and next_steps and writes ONE handoff artifact that references every artifact BY PATH ({path, type, id, sha256}, payload never copied) with notes and next_steps redacted of secrets (sk-, ghp_, AKIA, Bearer, NAME=KEY/TOKEN/SECRET/PASSWORD values) and PII (email, phone, credit_card, ssn, national_id). Do NOT use for re-running a skill, fixing findings or deciding what to run next: it hands a session off, it does not act./fskills-auto-researchManages a hash-chained auto-research campaign (M0): validates the campaign spec, opens one human approval envelope (campaign_confirm hash), authorises launches with derived tokens, records immutable trial results, proposes ideas from the ideas catalog and closes with statistical acceptance against a calibrated noise floor (guardrails, keep/discard/crash TSV view) writing auto_research_report. Do NOT use for single training runs (fskills-training), nor for evaluation alone (fskills-evaluation). M1 submits emitted trials (`envelope`/`submit`/`cancel`) behind the envelope budget gate and the IMEX fabric probe./fskills-compressionModel compression and quantization of a HF checkpoint (v1 method: RTN weight-only quantize-dequantize, int4 or int8, group-wise). Use it to preflight a host for compression (vendored preflight.py; classifies FAIL, UNKN and PROBE_ERROR results), to plan a probe-first run that emits an fs_launch_spec running rtn_worker.py on one GPU (launched only with the plan hash the user types back), and to verify the measured perplexity ratio (harness A vs B instrument certification, no-op check) against a pre-registered budget into a compression_report. Also route here any GPTQ, AWQ, NVFP4, MXFP4, FP8, modelopt, llm-compressor or quantized-speedup request: this skill answers it with a deferral refusal (CP-IN-003). Do NOT use for serving a checkpoint, already-quantized ones included, or asking whether it fits the serving envelope (fskills-deployment), LoRA merges (fskills-merging), benchmark accuracy suites (fskills-evaluation) or fine-tuning (fskills-training).npx claudepluginhub trannhiem/foundationscale --plugin foundationskillsOther plugins' skills for the same job