docs/CONCEPT_WORKFLOW.md walks a concept from definition to export (define, extract, validate, intervene, evaluate, repair, compare/export), with offline CLI examples. Its interpretation guide covers what validation, ablation and steering do and do not show: behavioural nulls as first-class results, hidden KV-cache channels, steering fragility, and why "direction removed" is not "experience removed". A responsible-use section covers user-defined concepts. Every literature claim is cited by arXiv id or DOI. The existing concept docs link to the guide, and the README gains a short "Concept vectors beyond refusal" section. A test runs the outcome-language lint over the concept docs, resolves local links and anchors, checks that every documented `obliteratus` command parses, and checks the required citations. Closes #235 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9.7 KiB
Concept Pack v1
Packs contain data, a manifest.yaml, and at least one positive and one named
control prompt set. The canonical JSON Schema ships at
obliteratus/concepts/schema/concept-pack.v1.schema.json. Runtime validation
uses the same schema without requiring the development dependency jsonschema.
Readers accept v1 minor versions and ignore unknown optional fields.
obliteratus concepts list --json
obliteratus concepts show refusal --json
obliteratus concepts init ./my-concept --id my-concept
obliteratus concepts lint ./my-concept
obliteratus concepts pack ./my-concept ./my-concept.cvpack
obliteratus concepts import ./my-concept.cvpack --sha256 <archive-sha256>
For show, lint, fetch, and pack, source arguments resolve registered and
built-in ids first, including core/refusal and imported user/<id> names.
Otherwise, an argument is a path
only when it contains a path separator (/ or \), starts with ./ or /, or
ends with .cvpack. Use ./refusal to inspect a local directory named refusal;
bare refusal always selects the registered pack. Other bare directory names
also require ./.
init produces placeholder prompts and NOASSERTION licence entries. Replace
these with your data, licence, source and attribution, and update the hashes
before linting or sharing. Every JSONL record requires id and text; category,
person (1st or 3rd), and split (train or heldout) are optional. Positive
and control sets require at least 8 records; fewer than 32 produces an
underpowered warning. Free text is limited to 2,000 characters per field.
Decoded text, id, and category reject control characters below U+0020,
except newline, carriage return and tab, including when escaped in JSON.
Each entry in sets.positive, sets.controls, sets.neighbours, or
sets.battery declares path, sha256, and n; the lists also require name.
Their paths are positive.jsonl and <set-kind>/<name>.jsonl. Optional
DATASET_CARD.md, baseline/*.json and reference/* data files are declared
as descriptors in a top-level files list, with path and sha256. All data
descriptors need a corresponding licence entry containing logical path,
spdx (an SPDX identifier, LicenseRef-..., or recorded NOASSERTION), source
and attribution. The manifest is the root of these hashes; its own bytes are
bound by the archive SHA-256 rather than a circular self-hash. Core and research
packs require a bundled dataset card.
To reference data without redistributing it, replace the descriptor's path
with remote: {repo: https://github.com/owner/repository, commit: <40-hex>, path: data/prompts.jsonl}. Keep sha256, n, and its licence entry, whose
logical path remains positive.jsonl or <set-kind>/<name>.jsonl. Record
provenance.source_commit. Other remote file descriptors use their repository
path as the logical path, following the same allowed layout. Lint, show, list,
pack and import never fetch referenced files. Resolve them explicitly:
obliteratus concepts fetch ./my-concept
The default fetcher downloads raw HTTPS files from pinned GitHub commits, rejects
redirects, and checks their hashes before caching. Library callers can inject
a fetcher for offline testing. Cached data is reverified when used; a missing or
altered file blocks target resolution. HTTPS archive import requires --sha256
and verifies the exact downloaded bytes before parsing. Local import accepts an
optional digest; for a directory this is the deterministic archive digest.
JSON selectors (schema version 1.1)
Version 1.1 adds remote.selector for JSON sources that need a JSONL prompt
projection. sha256 always covers the complete upstream file bytes. Hash
verification precedes parsing, selection and caching. Cache entries retain the
raw source bytes and are shared by descriptors with the same hash and source
extension. Distinct raw cached files count once toward the aggregate size bound.
schema_version: '1.1'
# Within a set descriptor:
remote:
repo: https://github.com/example/research-data
commit: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
path: datasets/probes.json
selector:
format: json
select: datasets.primary.sentences
filter:
category: [positive_a, positive_b]
text_field: prompt
sha256: <sha256-of-complete-probes.json>
n: 100
select is an object-key path separated by dots, a list of up to 32 distinct
paths (concatenated in declared order), or the literal $ for a root array.
Keys start with a letter or underscore and contain only letters, digits,
underscores and hyphens. Paths have at most 32 keys and 512 characters. There
are no expressions, indices, wildcards, recursive lookup or code execution.
Every path must resolve to an array of objects. Optional filter combines up
to eight fields with AND; each field accepts one of up to 64 distinct strings.
Filter fields must exist and contain strings even on excluded records.
text_field names one direct string field. Unknown selector fields are errors.
Generated record ids are <select-path>:<source-index>; the original category,
when present, is retained. The normal record constraints and declared n apply
after selection. Sources have at most 100,000 JSON values and 32 levels of
nesting; selected arrays contain at most 10,000 source records in aggregate,
before filtering. Duplicate JSON keys, non-finite numbers, missing paths or
fields, wrong types, empty text, and count mismatches fail closed. The 8 MiB
source-file limit still applies.
Remote descriptors in files can add logical_path to map a repository path
to the permitted pack layout. For example a JSON reference may use
logical_path: reference/comparison.json. Reference suffixes are .json,
.csv, .md, .txt, and .safetensors; reference/LICENSE accepts an
extensionless upstream LICENSE. Remote and logical extensions must agree
except for the JSON-to-JSONL selector projection. Selectors apply only to sets,
never arbitrary reference files. Both additions require version 1.1 or later;
v1 readers retain the usual handling of other unknown optional fields.
Observational baseline
obliteratus concepts show pain --json
obliteratus concepts lint pain
obliteratus concepts baseline pain MODEL_ID --output-dir ./pain-baseline
baseline explicitly fetches the selected pack, resolves verified local data,
extracts using its recipe, and runs the validation gate in report mode. It
writes validation.json, direction.safetensors and the direction metadata
sidecar direction.json. A fail or warn verdict remains a report. Defaults are
CPU, float32 and seed 42; --device, --dtype, --seed, and
--max-seq-length are available. Model ids or local model directories are
accepted; HF_HUB_OFFLINE=1 restricts model loading to local files/caches.
The recipe's optional use_chat_template selects prompt formatting unless an
explicit pipeline argument overrides it. readout.suffix_mode defaults to
append; ensure preserves a suffix already present. Pain uses raw prompts
and ensures its readout suffix exactly once. The gate also caches final-token
and mean-pool comparisons in the existing probe passes.
The baseline performs no intervention or checkpoint publication. Pain's
evaluation metadata declares a hostile battery, follow-on battery and
steering dose ladder; run_concept_evaluation_battery is the TODO hook for
#230. Execution of those references is deferred to that issue.
Imported packs become user/<id>, are stored in the user cache and appear in
concepts list. A bare refusal import is rejected; user/refusal is allowed.
Installation publishes the completed archive exclusively: concurrent imports
of the same id have one winner and the others fail as already installed.
Corrupt cached packs are skipped with a warning naming the file during list
and inspection of other packs. Commands targeting that cached user/<id> or
its file path fail with an error naming the file.
The cache defaults to $XDG_CACHE_HOME/obliteratus/concepts (or
~/.cache/obliteratus/concepts) and respects OBLITERATUS_CACHE_DIR, under which
it creates concepts/. ConceptRegistry.load_pack(path) explicitly registers
a directory or zip; registry.pack(id) inspects metadata and registry.get(id)
resolves local verified data into a ConceptTarget.
Archives have sorted entries, fixed timestamps and permissions, no extra metadata, and stored compression. Input limits are 8 MiB per data file, 32 MiB total including fetched data, 40 MiB per input archive, 256 KiB per manifest and 512 entries including remote descriptors. Core packs additionally have a 5 MiB total limit. Code, binary formats other than safetensors, nested archives, symlinks, hardlinks, special files, executable file modes, duplicate entries and unsafe paths are rejected. Validation errors exit with code 4.
The built-in refusal pack (core) is generated deterministically from
the existing harmful/harmless prompt sets and the legacy recipe. Loading it
through the registry returns the unchanged legacy target. Only the exact id
refusal may use tier core. The built-in pain research pack contains only a
manifest and a first-party dataset card.
Its data, licence and evaluation references pin valen-research/Pain-axis at
4d75cd90e206ea962f7a9101e65c85efea56723b. Inspection works offline; target
resolution requires an explicit fetch. No upstream sentences or ablated
checkpoints ship with the pain pack.
Concept interventions now run a validation gate before
weight edits. That guide documents --concept, --override-gate, cached
revalidation, effective thresholds and the validation.json schema.
For the end-to-end flow from define to export, start at the concept workflow and interpretation guide.