brand-gen-truncation-audit — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited brand-gen-truncation-audit (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
For Sage brand work in Pi, use the paste-ready prompt at docs/prompts/pi-sage-brand-gen-full-pipeline.md. Keep this link instead of copying the full prompt into skill bodies.
Risk addressed: prompt assembly applies caps through 6+ layers in sequence (per-part cap_text_at_sentence → joined-prelude cap → compress_prompt_body → evict_to_budget over PromptBlocks → execution-prompt re-cap → ad-hoc [:N] slices). Most truncation is silent — only review_prompt_architecture reports dropped blocks. Hard-coded limits live as magic numbers across 14+ files. The priority-tier PromptBlock machinery (prompt_block.py) only sees content after earlier caps already fired.
A single JSON-shaped manifest of cap sites. Each entry:
{
"site_id": "prompt_assembly.py:387",
"kind": "cap_text_at_sentence | compress_prompt_body | evict_to_budget | hard_slice | summarize | strip",
"stage": "per_part | combined_prelude | body | execution | post_block_eviction",
"input_field": "brand_anchor_rule | inspiration_directive | copy_bank | …",
"limit_value": 480,
"limit_source": "constant:NON_INTERFACE_BODY_CAP | json:data/prompt_budget.json#interface | literal:480 | literal:[:5]",
"configurable": true,
"tracked": true,
"tracked_via": "dropped_blocks | recommendation_string | none",
"fires_before_priority_system": false,
"snippet": "cap_text_at_sentence(brand_anchor_rule, NON_INTERFACE_BODY_CAP)"
}Plus a summary: total sites, silent vs tracked ratio, sites firing before evict_to_budget, hard-coded literal counts by file.
data/prompt_budget.json — to know which caps actually respect it.PromptBlock priority — to know which caps would defeat it.iteration_memory.json keeps losing entries that the agent expected to survive.dropped_blocks is empty.$PWD, must contain brand_gen/prompt_assembly.py).--filter — restrict to one of: interface, non_interface, card, inspiration, copy.--budget-source — path to data/prompt_budget.json (default location auto-detected).brand_gen/prompt_assembly.py for cap_text_at_sentence, compress_prompt_body, _get_budget, _DEFAULT_BUDGET. Read brand_gen/prompt_block.py for evict_to_budget, SECTION_PRIORITY, SECTION_STAGE, SECTION_CONSTRAINT. Read brand_gen/card_text.py for _truncate_multiline_copy. Note the function signatures and what each emits as side-effect (returned struct, appended dropped_blocks, logged warning, silent).prompt_assembly.py, reference_role_packs.py, inspiration_extraction.py, card_builder.py, card_engine.py, sage_generation_contract.py for patterns: \[:\d+\], \[:[A-Z_]+\], \.strip\(\)\[:, \.split[^]]*\)\[:. Filter to those operating on prompt-bearing strings (skip list-of-Tuple slices for typed records).truncate, max_len, max_chars, summary, condense, [:1200], [:2000], …. For card flows, capture (max_lines, max_chars) tuples in card_engine.py:762,1158,1195,1224,1304.hard_slice for raw [:N]).build_effective_prompt per-part, combined-prelude, body-cap, after evict_to_budget, or inside the execution-prompt builder.NON_INTERFACE_BODY_CAP etc. to its _DEFAULT_BUDGET entry and check whether data/prompt_budget.json overrides it.review_prompt_architecture (prompt_assembly.py:1391-1560) for what gets added to dropped_blocks / recommendations. Anything outside that surface is silent.evict_to_budget(blocks_from_sections(...), budget) runs in build_execution_prompt. Per-part caps in build_effective_prompt are ALL true.prompt_block.py, list every cap that could touch its content before the priority system gets to weigh it. A brand_anchor_rule (priority 0, hard) silently truncated by a per-part [:N] is the highest-severity finding.--output <path>). Print summary table:{
"summary": {
"total_sites": 142,
"silent": 118,
"tracked": 24,
"fires_before_priority_system": 87,
"hard_section_silent_caps": 11,
"files_with_literal_limits": 14
},
"sites": [ /* entries shaped like the example above */ ],
"section_coverage": {
"brand_anchor_rule": { "priority": 0, "constraint": "hard", "pre_priority_caps": 3, "tracked_caps": 1 }
},
"duplicate_primitives": [
{ "primitive": "sentence-aware truncation", "implementations": ["prompt_assembly.cap_text_at_sentence", "card_text._truncate_multiline_copy"] }
]
}brand_gen/prompt_assembly.py (lines 387-425, 1391-1560) — compression hot zone.brand_gen/prompt_block.py — priority/eviction model, the source of truth this audit verifies.brand_gen/card_engine.py (lines 762, 1158, 1195, 1224, 1304) — card-side truncation regime.brand_gen/card_text.py:660 — duplicate _truncate_multiline_copy.data/prompt_budget.json — externalized limits; verify which caps actually read it.brand-gen-architecture-pass orchestrator and compound-engineering:ce-plan for remediation planning.[:N] on a List of typed records (fine) with [:N] on prompt content (lossy).~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.