Optional [taxonomy] + [lineage] TOML sections on capability.toml and atom .md frontmatter. Backward-compat — all fields optional, existing files parse unchanged. TaxonomyFacets struct (7 facets): kingdom, mechanism, domain, layer, stage, stability, language. Lineage struct: parents[], creator, created, fork_from. AtomMeta extended with taxonomy: Option<TaxonomyFacets> + lineage: Option<Lineage>. docs/TAXONOMY.md — canonical vocabulary. Graph-based (DAG with typed edges), not tree. Multi-faceted nodes allowed. 3 pilot primitives tagged: policy::no-git-ops, quality::cargo-check-green, tools::bash-allowlist. Tests: 16/16 (was 12, +4: full/partial/no-facets/parents-array). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
42 lines
1.2 KiB
TOML
42 lines
1.2 KiB
TOML
[capability]
|
|
name = "tools::bash-allowlist"
|
|
category = "tools"
|
|
version = "1.0"
|
|
description = "Allowlist patterns for Bash — deny every command not matching one of the configured regex patterns (default set covers cargo, rustc, rustup, mkdir, ls, pwd, and /tmp cleanup)."
|
|
rationale = "Bash is the highest-blast-radius tool. An explicit allowlist keeps agents on safe loops and prevents accidental `curl | sh`, `npm install`, or `sudo` escalation. Renamed from `tools::cargo-only-bash` (v0.17) — 'bash-allowlist' describes the mechanism (allowlist regex match over argv), while 'cargo-only' was a specific instance of the default pattern set."
|
|
|
|
[restricts]
|
|
tool-patterns = [
|
|
'^cargo( |$)',
|
|
'^rustc( |$)',
|
|
'^rustup( |$)',
|
|
'^mkdir( |$)',
|
|
'^ls( |$)',
|
|
'^pwd( |$)',
|
|
'^rm -rf /tmp/',
|
|
]
|
|
tools-denied = []
|
|
|
|
[parameterized]
|
|
accepts = []
|
|
|
|
[text]
|
|
path = "text.md"
|
|
|
|
[gate]
|
|
rust-module = "gates::tools_bash_allowlist"
|
|
event = "PreToolUse:Bash"
|
|
severity = "block"
|
|
|
|
[taxonomy]
|
|
kingdom = "capability"
|
|
mechanism = "gate"
|
|
domain = "tools"
|
|
layer = "agent-substrate"
|
|
stability = "stable"
|
|
language = "rust"
|
|
|
|
[lineage]
|
|
parents = []
|
|
creator = "ag-orchestrator-human"
|
|
created = "2026-04-23"
|