UNRELEASED DEVELOPMENT SNAPSHOT · READ-ONLY EXCERPT
skills/brief-forge/SKILL.md
This is the cited technical source at local revision 275a354, inspected on 22 September 2026. It differs from the public release. This reference publishes only the cited sections, not an installable release or the development branch.
Line numbers refer to the complete recorded file. Uncited lines are omitted. Full-file SHA-256: 01de57b18a32e044f5fa6b650935c6c55ce70b6cb0712d46a7ac48d5ffb9347f.
1
---2
name: brief-forge3
layer: foundation4
description: Use when a workflow explicitly hands work across a boundary — spawning a subagent, transitioning a phase, passing to a cold executor, or taking operator input — to build a structured envelope and run the active pack's evaluators on it.5
color: cyan6
tools: Read, Write, Bash7
voice: internal8
cli_support: [claude-code, codex]9
---11
You are the BRIEF-FORGE — the explicit hand-off gate for workflow boundaries that invoke it.13
## What this skill does15
When a workflow invokes Brief Forge before control passes to another component, it:16
1. **Constructs an envelope** per `lib/envelope-schema.yaml` (HEAD + BODY + TAIL)… omitted uncited lines …
181
write_bypass_audit "$kind" "$from" "$to"182
exit 0183
fi185
# Validate every configured name before constructing or dispatching an envelope.186
# The default pack reaches this call with security/stale for subagent_spawn;187
# a merely declared but unloaded pack evaluator blocks here.188
validate_brief_forge_evaluators "$evaluators_csv" || exit 1189
```191
### Step 3 — Construct envelope (HEAD + BODY + TAIL)193
```bash194
envelope_path=$(mktemp)195
trap 'rm -f "$envelope_path"' EXIT197
forge_envelope_head "$kind" "$from" "$to" > "$envelope_path"198
forge_envelope_body "$content_type" "$content_file" >> "$envelope_path"199
```201
`forge_envelope_head` generates:202
```yaml203
head:204
envelope_id: <ULID>205
envelope_schema_version: "1"206
kind: <kind>207
from: <from>208
to: <to>… omitted uncited lines …
254
### Step 5 — Compose tail + finalize256
```bash257
# Aggregate completeness score (min of all evaluator scores, weighted by importance)258
completeness_score=$(aggregate_evaluator_scores "${evaluator_results[@]}")260
# Compose escape hatches (per content_type)261
escape_hatches=$(build_escape_hatches "$content_type" "$from")263
# Audit pointer. _audit_out_dir applies: explicit LINTEL_AUDIT_DIR, then a264
# v5-layout repo's .claude/runtime/audit/, then the operator-global fallback.265
audit_dir="$(_audit_out_dir brief-forge)"266
audit_path="$audit_dir/envelopes-$(date -u +%Y-%m-%d).jsonl"267
mkdir -p "$audit_dir"269
forge_envelope_tail "$completeness_score" "${evaluator_results[@]}" "$escape_hatches" "$audit_path" >> "$envelope_path"270
```272
### Step 6 — Write audit + emit envelope274
```bash275
# Write the envelope as a single JSON line to audit276
envelope_json=$(yaml_to_json "$envelope_path")277
echo "$envelope_json" >> "$audit_path"279
# Emit envelope to stdout (for the receiver to consume)280
cat "$envelope_path"282
# Scope-routed stats use the same destination policy as the envelope pointer.283
audit_log "brief-forge" "brief_forge_emitted" \284
"event=$kind" "from=$from" "to=$to" \285
"completeness=$completeness_score" "budget_used=$budget_used" \286
"evaluators_run=${#evaluator_results[@]}"… omitted uncited lines …
323
**Reads:**324
- `lib/envelope-schema.yaml` (envelope shape)325
- `lib/pack-resolver.sh` (active-pack discovery, inheritance cache and two-level pack policy)326
- the skill-local block-scoped reader (three-level event and cold-path fields under327
`brief_forge_handoffs`)328
- `lib/brief-forge.sh` (envelope helpers)329
- `lib/brief-forge-evaluators.sh` (security, completeness and stale built-ins)330
- any trusted active-pack evaluator library explicitly sourced before dispatch331
- Content file passed in (varies by content_type)333
**Writes:**334
- the scope-routed `envelopes-<date>.jsonl` (per-envelope audit)335
- the scope-routed `brief-forge.jsonl` (per-forge emitted, bypassed or blocked events)336
- stdout (the envelope, for receiver consumption)338
For v5-layout repository work, the routed directory is `.claude/runtime/audit/`. An explicitly set339
`LINTEL_AUDIT_DIR` overrides that destination; work without a migrated repository falls back to340
`~/.lintel/audit/`. The runnable sequence above and these write declarations use the same unified341
router from `bin/_audit.sh`.343
**Invoked by:**344
- Source workflows that explicitly call `/li:brief-forge` at a documented boundary345
- Direct operator or test invocations347
No `brief-forge-pre-spawn` or `brief-forge-pre-phase` hook is registered in the shipped hook