bstack P17 — Lens-Routed Request Articulation: the typed routing layer above P5 parallel-agent dispatch. Substantive context grounding, no 'act as X' persona theater.
SaferSkills independently audited role-x (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.
Primitive: P17 in the Broomva Stack. See broomva/workspace AGENTS.md §P17 for the full reflexive trigger rule and the design spec at docs/superpowers/specs/2026-05-13-role-x-primitive-design.md.
roles/_meta.md (always-loaded base) + roles/<name>.md per-domain lenses. Each lens has YAML frontmatter (signals, context_loaders, quality_bar, prompt_improvement_patterns, default_mode, mode_escalation, out_of_scope) and a prose body.extends: chain.augment (silent context load — default), rewrite (surfaced prompt refinement), decompose (P5 parallel-agent plan, user-approved). Mode escalation per the lens's mode_escalation field.scripts/role-x.py):role-x list — list all available lenses with status + extends + default_moderole-x validate <path> — validate lens YAML frontmatter against schemarole-x index — regenerate roles/_index.md discovery filerole-x intake (v0.2.0) — UserPromptSubmit hook entry pointrole-x suggest (v0.4.0) — analyze events.jsonl; surface fire-rate + drift + emergent clustersrole-x init <name> (v0.4.0) — scaffold a status: candidate lens from CLI flagsrole-x coverage (v0.4.1) — brief registry-health summary; silent when healthy (SessionStart hook entry point)scripts/*-hook.sh):role-x-intake-hook.sh (v0.2.0) — UserPromptSubmit wrapperrole-x-coverage-hook.sh (v0.4.1) — SessionStart wrapper with 24h cooldownreferences/):lens-schema.md — YAML frontmatter field referenceselection-algorithm.md — scoring algorithm in detailmode-selection.md — augment/rewrite/decompose decision treefeedback-loop.md — Nous-pattern telemetry + P13 consolidation (M2+)Always — at the start of every session, before responding to substantive user input. P17 is a reflexive primitive. The skill exists to make the lens registry and CLI helpers discoverable; the behavior is enforced by reasoning + the UserPromptSubmit hook.
Carve-outs (no role-x intake needed): single-line typo fixes, pure read questions ("what does this function do?"), conversation continuation without new substantive request.
The intake reflex routes prompts in real-time. The meta-progression discipline ensures the registry itself grows from real telemetry:
| When | Action | Cadence |
|---|---|---|
| SessionStart in a workspace with the role-x coverage hook wired | role-x coverage --since 7d fires automatically; surfaces fire-rate + config hints when registry health drops | ≤1 nudge per 24h |
| Per substantive prompt | If intake routes to _meta only AND prompt is domain-rich (≥8 words, ≥4 distinct meaningful tokens) | Agent sees a 1-line role-x init <slug> suggestion appended to the intake context |
| When the agent observes a recurring `_meta`-only pattern within a session (e.g. 3+ unrouted prompts about the same domain) | Propose role-x init <name> to the user as the rule-of-three trigger | At the agent's discretion, surfaced as a one-line note |
| Weekly (or after collecting ~50+ events) | Run role-x suggest --since 7d for the full report — fire-rate, per-lens drift, emergent keyword clusters (requires sanitized capture on) | Manual, with telemetry signal from the SessionStart nudge |
| After ≥3 positive-outcome uses of a `status: candidate` lens | Author promotes the lens to status: active (P16 rule-of-three) | Manual, candidate ledger tracks instances |
role-x tune <lens> (v0.5.0+) surfaces concrete drift signalssuperpowers:brainstorming instead; role-x kicks in once implementation begins)| Primitive | How role-x composes |
|---|---|
| P5 parallel agents | role-x decompose mode produces the dispatch plan; each sub-agent runs role-x at its scope (typed edges in the reasoning graph) |
| P13 dream cycle | lens consolidation via role-x-replay.py (M4) — gather → replay → prune → consolidate → index |
| P14 dep-chain | the lens's quality_bar IS the domain-specific P14 enumeration template |
| P15 state snapshot | feeds the selection algorithm's signals |
| P16 bstack engine | new lenses get promoted via per-lens rule-of-three (≥3 positive-outcome uses → status: active) |
/autonomous | seeds roles/_meta.md content; remains invocable for the full reflex pipeline |
persona-* skills | referenceable from lenses via context_loaders.skills:; not replaced |
roles/_meta.md + all roles/*.md (cached in working context). At UserPromptSubmit for substantive work, agent reasons through:git diff --name-only), prompt content, Linear ticket if anyextends: chain; merge context_loaders + quality_bardefault_mode + mode_escalation rulesroles/<name>.md following the schema in references/lens-schema.md; run role-x validate roles/<name>.md; run role-x index to regenerate roles/_index.md; commit on a worktree branch; PR.python3 scripts/role-x-replay.py <lens-name> runs the P13 dream cycle against ~/.config/broomva/role/events.jsonl.No `act as X` persona rewrites. Lenses load substantive context (files, conventions, checklists, optional suggestions). They do not insert persona declarations into the model's working context. The 2026 research (PRISM USC, Zheng et al. arXiv 2311.10054, Anthropic best-practices) is clear: persona declarations don't add expertise and frequently hurt accuracy for code/factual tasks (MMLU drops 71.6% → 66.3% with long expert personas).
roles/_meta.md — always-loaded base lens (the workspace's implicit "bstack-aware autonomous senior engineer" contract made addressable). Lives in the consuming workspace, not in this skill repo.roles/<name>.md — per-domain lenses. Live in the consuming workspace.roles/<name>.eval.yaml — resolver-eval fixture (should_fire / should_not_fire intents) asserting the lens's trigger actually routes. Run via role-x.py eval; gate in CI. The skillify "resolver eval" step — a trigger that says "phrase X selects lens Y" is only trustworthy once a test proves it. Live in the consuming workspace alongside the lens.roles/_index.md — auto-generated discovery index.scripts/role-x.py — CLI helpers (validate, list, index, intake, coverage, suggest, init, eval).references/*.md — schema + algorithm reference docs.~/.config/broomva/role/events.jsonl — telemetry log (M2).~/.config/broomva/role/status.json — per-lens stats cache (M2).~/.config/broomva/role/consolidation-runs/ — dream-cycle snapshots (M4).broomva/workspace/docs/superpowers/specs/2026-05-13-role-x-primitive-design.mdbroomva/workspace/docs/superpowers/plans/2026-05-13-role-x-primitive-implementation.mdbroomva/workspace/research/entities/pattern/role-x.mdbroomva/workspace/AGENTS.md §P17broomva/workspace/research/entities/pattern/bstack-engine.md (P17 in Promoted Patterns)broomva/autonomous — /autonomous skill embeds the universal role contract~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.