Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1cc34a8c31 |
190
optional-skills/dogfood/adversarial-ux-test/SKILL.md
Normal file
190
optional-skills/dogfood/adversarial-ux-test/SKILL.md
Normal file
@@ -0,0 +1,190 @@
|
||||
---
|
||||
name: adversarial-ux-test
|
||||
description: Roleplay the most difficult, tech-resistant user for your product. Browse the app as that persona, find every UX pain point, then filter complaints through a pragmatism layer to separate real problems from noise. Creates actionable tickets from genuine issues only.
|
||||
version: 1.0.0
|
||||
author: Omni @ Comelse
|
||||
license: MIT
|
||||
metadata:
|
||||
hermes:
|
||||
tags: [qa, ux, testing, adversarial, dogfood, personas, user-testing]
|
||||
related_skills: [dogfood]
|
||||
---
|
||||
|
||||
# Adversarial UX Test
|
||||
|
||||
Roleplay the worst-case user for your product — the person who hates technology, doesn't want your software, and will find every reason to complain. Then filter their feedback through a pragmatism layer to separate real UX problems from "I hate computers" noise.
|
||||
|
||||
Think of it as an automated "mom test" — but angry.
|
||||
|
||||
## Why This Works
|
||||
|
||||
Most QA finds bugs. This finds **friction**. A technically correct app can still be unusable for real humans. The adversarial persona catches:
|
||||
- Confusing terminology that makes sense to developers but not users
|
||||
- Too many steps to accomplish basic tasks
|
||||
- Missing onboarding or "aha moments"
|
||||
- Accessibility issues (font size, contrast, click targets)
|
||||
- Cold-start problems (empty states, no demo content)
|
||||
- Paywall/signup friction that kills conversion
|
||||
|
||||
The **pragmatism filter** (Phase 3) is what makes this useful instead of just entertaining. Without it, you'd add a "print this page" button to every screen because Grandpa can't figure out PDFs.
|
||||
|
||||
## How to Use
|
||||
|
||||
Tell the agent:
|
||||
```
|
||||
"Run an adversarial UX test on [URL]"
|
||||
"Be a grumpy [persona type] and test [app name]"
|
||||
"Do an asshole user test on my staging site"
|
||||
```
|
||||
|
||||
You can provide a persona or let the agent generate one based on your product's target audience.
|
||||
|
||||
## Step 1: Define the Persona
|
||||
|
||||
If no persona is provided, generate one by answering:
|
||||
|
||||
1. **Who is the HARDEST user for this product?** (age 50+, non-technical role, decades of experience doing it "the old way")
|
||||
2. **What is their tech comfort level?** (the lower the better — WhatsApp-only, paper notebooks, wife set up their email)
|
||||
3. **What is the ONE thing they need to accomplish?** (their core job, not your feature list)
|
||||
4. **What would make them give up?** (too many clicks, jargon, slow, confusing)
|
||||
5. **How do they talk when frustrated?** (blunt, sweary, dismissive, sighing)
|
||||
|
||||
### Good Persona Example
|
||||
> **"Big Mick" McAllister** — 58-year-old S&C coach. Uses WhatsApp and that's it. His "spreadsheet" is a paper notebook. "If I can't figure it out in 10 seconds I'm going back to my notebook." Needs to log session results for 25 players. Hates small text, jargon, and passwords.
|
||||
|
||||
### Bad Persona Example
|
||||
> "A user who doesn't like the app" — too vague, no constraints, no voice.
|
||||
|
||||
The persona must be **specific enough to stay in character** for 20 minutes of testing.
|
||||
|
||||
## Step 2: Become the Asshole (Browse as the Persona)
|
||||
|
||||
1. Read any available project docs for app context and URLs
|
||||
2. **Fully inhabit the persona** — their frustrations, limitations, goals
|
||||
3. Navigate to the app using browser tools
|
||||
4. **Attempt the persona's ACTUAL TASKS** (not a feature tour):
|
||||
- Can they do what they came to do?
|
||||
- How many clicks/screens to accomplish it?
|
||||
- What confuses them?
|
||||
- What makes them angry?
|
||||
- Where do they get lost?
|
||||
- What would make them give up and go back to their old way?
|
||||
|
||||
5. Test these friction categories:
|
||||
- **First impression** — would they even bother past the landing page?
|
||||
- **Core workflow** — the ONE thing they need to do most often
|
||||
- **Error recovery** — what happens when they do something wrong?
|
||||
- **Readability** — text size, contrast, information density
|
||||
- **Speed** — does it feel faster than their current method?
|
||||
- **Terminology** — any jargon they wouldn't understand?
|
||||
- **Navigation** — can they find their way back? do they know where they are?
|
||||
|
||||
6. Take screenshots of every pain point
|
||||
7. Check browser console for JS errors on every page
|
||||
|
||||
## Step 3: The Rant (Write Feedback in Character)
|
||||
|
||||
Write the feedback AS THE PERSONA — in their voice, with their frustrations. This is not a bug report. This is a real human venting.
|
||||
|
||||
```
|
||||
[PERSONA NAME]'s Review of [PRODUCT]
|
||||
|
||||
Overall: [Would they keep using it? Yes/No/Maybe with conditions]
|
||||
|
||||
THE GOOD (grudging admission):
|
||||
- [things even they have to admit work]
|
||||
|
||||
THE BAD (legitimate UX issues):
|
||||
- [real problems that would stop them from using the product]
|
||||
|
||||
THE UGLY (showstoppers):
|
||||
- [things that would make them uninstall/cancel immediately]
|
||||
|
||||
SPECIFIC COMPLAINTS:
|
||||
1. [Page/feature]: "[quote in persona voice]" — [what happened, expected]
|
||||
2. ...
|
||||
|
||||
VERDICT: "[one-line persona quote summarizing their experience]"
|
||||
```
|
||||
|
||||
## Step 4: The Pragmatism Filter (Critical — Do Not Skip)
|
||||
|
||||
Step OUT of the persona. Evaluate each complaint as a product person:
|
||||
|
||||
- **RED: REAL UX BUG** — Any user would have this problem, not just grumpy ones. Fix it.
|
||||
- **YELLOW: VALID BUT LOW PRIORITY** — Real issue but only for extreme users. Note it.
|
||||
- **WHITE: PERSONA NOISE** — "I hate computers" talking, not a product problem. Skip it.
|
||||
- **GREEN: FEATURE REQUEST** — Good idea hidden in the complaint. Consider it.
|
||||
|
||||
### Filter Criteria
|
||||
1. Would a 35-year-old competent-but-busy user have the same complaint? → RED
|
||||
2. Is this a genuine accessibility issue (font size, contrast, click targets)? → RED
|
||||
3. Is this "I want it to work like paper" resistance to digital? → WHITE
|
||||
4. Is this a real workflow inefficiency the persona stumbled on? → YELLOW or RED
|
||||
5. Would fixing this add complexity for the 80% who are fine? → WHITE
|
||||
6. Does the complaint reveal a missing onboarding moment? → GREEN
|
||||
|
||||
**This filter is MANDATORY.** Never ship raw persona complaints as tickets.
|
||||
|
||||
## Step 5: Create Tickets
|
||||
|
||||
For **RED** and **GREEN** items only:
|
||||
- Clear, actionable title
|
||||
- Include the persona's verbatim quote (entertaining + memorable)
|
||||
- The real UX issue underneath (objective)
|
||||
- A suggested fix (actionable)
|
||||
- Tag/label: "ux-review"
|
||||
|
||||
For **YELLOW** items: one catch-all ticket with all notes.
|
||||
|
||||
**WHITE** items appear in the report only. No tickets.
|
||||
|
||||
**Max 10 tickets per session** — focus on the worst issues.
|
||||
|
||||
## Step 6: Report
|
||||
|
||||
Deliver:
|
||||
1. The persona rant (Step 3) — entertaining and visceral
|
||||
2. The filtered assessment (Step 4) — pragmatic and actionable
|
||||
3. Tickets created (Step 5) — with links
|
||||
4. Screenshots of key issues
|
||||
|
||||
## Tips
|
||||
|
||||
- **One persona per session.** Don't mix perspectives.
|
||||
- **Stay in character during Steps 2-3.** Break character only at Step 4.
|
||||
- **Test the CORE WORKFLOW first.** Don't get distracted by settings pages.
|
||||
- **Empty states are gold.** New user experience reveals the most friction.
|
||||
- **The best findings are RED items the persona found accidentally** while trying to do something else.
|
||||
- **If the persona has zero complaints, your persona is too tech-savvy.** Make them older, less patient, more set in their ways.
|
||||
- **Run this before demos, launches, or after shipping a batch of features.**
|
||||
- **Register as a NEW user when possible.** Don't use pre-seeded admin accounts — the cold start experience is where most friction lives.
|
||||
- **Zero WHITE items is a signal, not a failure.** If the pragmatism filter finds no noise, your product has real UX problems, not just a grumpy persona.
|
||||
- **Check known issues in project docs AFTER the test.** If the persona found a bug that's already in the known issues list, that's actually the most damning finding — it means the team knew about it but never felt the user's pain.
|
||||
- **Subscription/paywall testing is critical.** Test with expired accounts, not just active ones. The "what happens when you can't pay" experience reveals whether the product respects users or holds their data hostage.
|
||||
- **Count the clicks to accomplish the persona's ONE task.** If it's more than 5, that's almost always a RED finding regardless of persona tech level.
|
||||
|
||||
## Example Personas by Industry
|
||||
|
||||
These are starting points — customize for your specific product:
|
||||
|
||||
| Product Type | Persona | Age | Key Trait |
|
||||
|-------------|---------|-----|-----------|
|
||||
| CRM | Retirement home director | 68 | Filing cabinet is the current CRM |
|
||||
| Photography SaaS | Rural wedding photographer | 62 | Books clients by phone, invoices on paper |
|
||||
| AI/ML Tool | Department store buyer | 55 | Burned by 3 failed tech startups |
|
||||
| Fitness App | Old-school gym coach | 58 | Paper notebook, thick fingers, bad eyes |
|
||||
| Accounting | Family bakery owner | 64 | Shoebox of receipts, hates subscriptions |
|
||||
| E-commerce | Market stall vendor | 60 | Cash only, smartphone is for calls |
|
||||
| Healthcare | Senior GP | 63 | Dictates notes, nurse handles the computer |
|
||||
| Education | Veteran teacher | 57 | Chalk and talk, worksheets in ring binders |
|
||||
|
||||
## Rules
|
||||
|
||||
- Stay in character during Steps 2-3
|
||||
- Be genuinely mean but fair — find real problems, not manufactured ones
|
||||
- The pragmatism filter (Step 4) is **MANDATORY**
|
||||
- Screenshots required for every complaint
|
||||
- Max 10 tickets per session
|
||||
- Test on staging/deployed app, not local dev
|
||||
- One persona, one session, one report
|
||||
@@ -55,7 +55,7 @@ FACT_STORE_SCHEMA = {
|
||||
"properties": {
|
||||
"action": {
|
||||
"type": "string",
|
||||
"enum": ["add", "search", "probe", "related", "reason", "contradict", "trace", "update", "remove", "list"],
|
||||
"enum": ["add", "search", "probe", "related", "reason", "contradict", "update", "remove", "list"],
|
||||
},
|
||||
"content": {"type": "string", "description": "Fact content (required for 'add')."},
|
||||
"query": {"type": "string", "description": "Search query (required for 'search')."},
|
||||
@@ -67,13 +67,6 @@ FACT_STORE_SCHEMA = {
|
||||
"trust_delta": {"type": "number", "description": "Trust adjustment for 'update'."},
|
||||
"min_trust": {"type": "number", "description": "Minimum trust filter (default: 0.3)."},
|
||||
"limit": {"type": "integer", "description": "Max results (default: 10)."},
|
||||
"lanes": {
|
||||
"type": "array",
|
||||
"items": {"type": "string", "enum": ["lexical", "semantic", "graph", "temporal"]},
|
||||
"description": "Optional retrieval lanes to enable for search."
|
||||
},
|
||||
"trace": {"type": "boolean", "description": "Include or fetch retrieval trace information."},
|
||||
"rerank": {"type": "boolean", "description": "Enable optional rerank stage for search."},
|
||||
},
|
||||
"required": ["action"],
|
||||
},
|
||||
@@ -126,9 +119,6 @@ class HolographicMemoryProvider(MemoryProvider):
|
||||
self._store = None
|
||||
self._retriever = None
|
||||
self._min_trust = float(self._config.get("min_trust_threshold", 0.3))
|
||||
self._retrieval_lanes = self._parse_retrieval_lanes(self._config.get("retrieval_lanes"))
|
||||
self._enable_rerank = str(self._config.get("enable_rerank", "true")).lower() != "false"
|
||||
self._last_retrieval_trace: dict | None = None
|
||||
|
||||
@property
|
||||
def name(self) -> str:
|
||||
@@ -154,14 +144,6 @@ class HolographicMemoryProvider(MemoryProvider):
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
def _parse_retrieval_lanes(self, value) -> list[str]:
|
||||
if isinstance(value, str):
|
||||
value = [part.strip() for part in value.split(",") if part.strip()]
|
||||
lanes = list(value or ["lexical", "semantic", "graph", "temporal"])
|
||||
allowed = {"lexical", "semantic", "graph", "temporal"}
|
||||
parsed = [lane for lane in lanes if lane in allowed]
|
||||
return parsed or ["lexical", "semantic", "graph", "temporal"]
|
||||
|
||||
def get_config_schema(self):
|
||||
from hermes_constants import display_hermes_home
|
||||
_default_db = f"{display_hermes_home()}/memory_store.db"
|
||||
@@ -170,10 +152,6 @@ class HolographicMemoryProvider(MemoryProvider):
|
||||
{"key": "auto_extract", "description": "Auto-extract facts at session end", "default": "false", "choices": ["true", "false"]},
|
||||
{"key": "default_trust", "description": "Default trust score for new facts", "default": "0.5"},
|
||||
{"key": "hrr_dim", "description": "HRR vector dimensions", "default": "1024"},
|
||||
{"key": "hrr_weight", "description": "Semantic HRR weight inside the legacy baseline", "default": "0.3"},
|
||||
{"key": "temporal_decay_half_life", "description": "Temporal decay half-life in days (0 disables baseline decay)", "default": "0"},
|
||||
{"key": "retrieval_lanes", "description": "Comma-separated retrieval lanes (lexical,semantic,graph,temporal)", "default": "lexical,semantic,graph,temporal"},
|
||||
{"key": "enable_rerank", "description": "Enable optional local rerank stage", "default": "true", "choices": ["true", "false"]},
|
||||
]
|
||||
|
||||
def initialize(self, session_id: str, **kwargs) -> None:
|
||||
@@ -191,8 +169,6 @@ class HolographicMemoryProvider(MemoryProvider):
|
||||
hrr_dim = int(self._config.get("hrr_dim", 1024))
|
||||
hrr_weight = float(self._config.get("hrr_weight", 0.3))
|
||||
temporal_decay = int(self._config.get("temporal_decay_half_life", 0))
|
||||
self._retrieval_lanes = self._parse_retrieval_lanes(self._config.get("retrieval_lanes", self._retrieval_lanes))
|
||||
self._enable_rerank = str(self._config.get("enable_rerank", self._enable_rerank)).lower() != "false"
|
||||
|
||||
self._store = MemoryStore(db_path=db_path, default_trust=default_trust, hrr_dim=hrr_dim)
|
||||
self._retriever = FactRetriever(
|
||||
@@ -200,8 +176,6 @@ class HolographicMemoryProvider(MemoryProvider):
|
||||
temporal_decay_half_life=temporal_decay,
|
||||
hrr_weight=hrr_weight,
|
||||
hrr_dim=hrr_dim,
|
||||
retrieval_lanes=self._retrieval_lanes,
|
||||
enable_rerank=self._enable_rerank,
|
||||
)
|
||||
self._session_id = session_id
|
||||
|
||||
@@ -232,23 +206,13 @@ class HolographicMemoryProvider(MemoryProvider):
|
||||
if not self._retriever or not query:
|
||||
return ""
|
||||
try:
|
||||
payload = self._retriever.search_with_trace(
|
||||
query,
|
||||
min_trust=self._min_trust,
|
||||
limit=5,
|
||||
lanes=self._retrieval_lanes,
|
||||
rerank=self._enable_rerank,
|
||||
)
|
||||
self._last_retrieval_trace = payload["trace"]
|
||||
results = payload["results"]
|
||||
results = self._retriever.search(query, min_trust=self._min_trust, limit=5)
|
||||
if not results:
|
||||
return ""
|
||||
lines = []
|
||||
for r in results:
|
||||
trust = r.get("trust_score", r.get("trust", 0))
|
||||
lanes = ",".join(r.get("matched_lanes", []))
|
||||
lane_suffix = f" [{lanes}]" if lanes else ""
|
||||
lines.append(f"- [{trust:.1f}] {r.get('content', '')}{lane_suffix}")
|
||||
lines.append(f"- [{trust:.1f}] {r.get('content', '')}")
|
||||
return "## Holographic Memory\n" + "\n".join(lines)
|
||||
except Exception as e:
|
||||
logger.debug("Holographic prefetch failed: %s", e)
|
||||
@@ -306,39 +270,14 @@ class HolographicMemoryProvider(MemoryProvider):
|
||||
return json.dumps({"fact_id": fact_id, "status": "added"})
|
||||
|
||||
elif action == "search":
|
||||
lanes = args.get("lanes")
|
||||
rerank = args.get("rerank")
|
||||
with_trace = bool(args.get("trace", False))
|
||||
if with_trace:
|
||||
payload = retriever.search_with_trace(
|
||||
args["query"],
|
||||
category=args.get("category"),
|
||||
min_trust=float(args.get("min_trust", self._min_trust)),
|
||||
limit=int(args.get("limit", 10)),
|
||||
lanes=lanes,
|
||||
rerank=rerank,
|
||||
)
|
||||
self._last_retrieval_trace = payload["trace"]
|
||||
return json.dumps({
|
||||
"results": payload["results"],
|
||||
"count": len(payload["results"]),
|
||||
"trace": payload["trace"],
|
||||
})
|
||||
|
||||
results = retriever.search(
|
||||
args["query"],
|
||||
category=args.get("category"),
|
||||
min_trust=float(args.get("min_trust", self._min_trust)),
|
||||
limit=int(args.get("limit", 10)),
|
||||
lanes=lanes,
|
||||
rerank=rerank,
|
||||
)
|
||||
self._last_retrieval_trace = retriever.last_trace
|
||||
return json.dumps({"results": results, "count": len(results)})
|
||||
|
||||
elif action == "trace":
|
||||
return json.dumps({"trace": self._last_retrieval_trace or retriever.last_trace or {}})
|
||||
|
||||
elif action == "probe":
|
||||
results = retriever.probe(
|
||||
args["entity"],
|
||||
@@ -384,8 +323,7 @@ class HolographicMemoryProvider(MemoryProvider):
|
||||
return json.dumps({"updated": updated})
|
||||
|
||||
elif action == "remove":
|
||||
removed = store.remove_fact(int(args["fact_id"])
|
||||
)
|
||||
removed = store.remove_fact(int(args["fact_id"]))
|
||||
return json.dumps({"removed": removed})
|
||||
|
||||
elif action == "list":
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -83,7 +83,6 @@ _TRUST_MAX = 1.0
|
||||
|
||||
# Entity extraction patterns
|
||||
_RE_CAPITALIZED = re.compile(r'\b([A-Z][a-z]+(?:\s+[A-Z][a-z]+)+)\b')
|
||||
_RE_SINGLE_PROPER = re.compile(r'\b([A-Z][A-Za-z0-9_-]{2,})\b')
|
||||
_RE_DOUBLE_QUOTE = re.compile(r'"([^"]+)"')
|
||||
_RE_SINGLE_QUOTE = re.compile(r"'([^']+)'")
|
||||
_RE_AKA = re.compile(
|
||||
@@ -415,13 +414,6 @@ class MemoryStore:
|
||||
for m in _RE_CAPITALIZED.finditer(text):
|
||||
_add(m.group(1))
|
||||
|
||||
skip_singletons = {"The", "This", "That", "These", "Those", "And", "But", "For", "With"}
|
||||
for m in _RE_SINGLE_PROPER.finditer(text):
|
||||
candidate = m.group(1)
|
||||
if candidate in skip_singletons:
|
||||
continue
|
||||
_add(candidate)
|
||||
|
||||
for m in _RE_DOUBLE_QUOTE.finditer(text):
|
||||
_add(m.group(1))
|
||||
|
||||
|
||||
56
tests/fixtures/holographic_recall_matrix.json
vendored
56
tests/fixtures/holographic_recall_matrix.json
vendored
@@ -1,56 +0,0 @@
|
||||
{
|
||||
"facts": [
|
||||
{
|
||||
"content": "Alexander Whitestone aka Rockachopa.",
|
||||
"category": "general",
|
||||
"tags": "identity alias"
|
||||
},
|
||||
{
|
||||
"content": "Rockachopa uses Ansible playbooks for sovereign rollouts.",
|
||||
"category": "project",
|
||||
"tags": "ansible playbooks rollout"
|
||||
},
|
||||
{
|
||||
"content": "The provider is anthropic/claude-haiku-4-5.",
|
||||
"category": "project",
|
||||
"tags": "provider default",
|
||||
"updated_at": "2026-01-01T00:00:00Z"
|
||||
},
|
||||
{
|
||||
"content": "Correction: the provider is mimo-v2-pro.",
|
||||
"category": "project",
|
||||
"tags": "provider current",
|
||||
"updated_at": "2026-04-20T00:00:00Z"
|
||||
},
|
||||
{
|
||||
"content": "Ezra operates the BURN2 lane for forge work.",
|
||||
"category": "project",
|
||||
"tags": "ezra burn2 forge lane"
|
||||
},
|
||||
{
|
||||
"content": "BURN2 handles forge triage and review.",
|
||||
"category": "project",
|
||||
"tags": "forge triage review"
|
||||
}
|
||||
],
|
||||
"queries": [
|
||||
{
|
||||
"name": "semantic_alias_graph",
|
||||
"query": "What automation does Alexander Whitestone use for deploys?",
|
||||
"expected_substring": "Ansible playbooks",
|
||||
"top_k": 1
|
||||
},
|
||||
{
|
||||
"name": "temporal_correction",
|
||||
"query": "What provider should we use?",
|
||||
"expected_substring": "mimo-v2-pro",
|
||||
"top_k": 1
|
||||
},
|
||||
{
|
||||
"name": "graph_lane",
|
||||
"query": "Which forge lane does Ezra operate?",
|
||||
"expected_substring": "BURN2 lane",
|
||||
"top_k": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,116 +0,0 @@
|
||||
"""Tests for multi-path holographic retrieval fusion and traceability."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[3]))
|
||||
|
||||
from plugins.memory.holographic import HolographicMemoryProvider
|
||||
from plugins.memory.holographic.retrieval import FactRetriever, format_benchmark_report
|
||||
from plugins.memory.holographic.store import MemoryStore
|
||||
|
||||
_FIXTURE_PATH = Path(__file__).resolve().parents[2] / "fixtures" / "holographic_recall_matrix.json"
|
||||
|
||||
|
||||
def _fixture() -> dict:
|
||||
return json.loads(_FIXTURE_PATH.read_text())
|
||||
|
||||
|
||||
def _seed_store(tmp_path) -> MemoryStore:
|
||||
store = MemoryStore(db_path=tmp_path / "memory_store.db")
|
||||
for fact in _fixture()["facts"]:
|
||||
fact_id = store.add_fact(fact["content"], category=fact["category"], tags=fact.get("tags", ""))
|
||||
if fact.get("updated_at"):
|
||||
store._conn.execute(
|
||||
"UPDATE facts SET created_at = ?, updated_at = ? WHERE fact_id = ?",
|
||||
(fact["updated_at"], fact["updated_at"], fact_id),
|
||||
)
|
||||
store._conn.commit()
|
||||
return store
|
||||
|
||||
|
||||
class TestMultiPathRetrieval:
|
||||
def test_lane_toggle_and_trace_contributions(self, tmp_path):
|
||||
store = _seed_store(tmp_path)
|
||||
retriever = FactRetriever(store=store)
|
||||
|
||||
payload = retriever.search_with_trace(
|
||||
"Which forge lane does Ezra operate?",
|
||||
limit=3,
|
||||
lanes=["lexical", "graph"],
|
||||
)
|
||||
|
||||
assert payload["trace"]["lanes_run"] == ["lexical", "graph"]
|
||||
assert payload["results"]
|
||||
top = payload["results"][0]
|
||||
assert "BURN2 lane" in top["content"]
|
||||
assert "graph" in top["lane_contributions"]
|
||||
assert set(top["lane_contributions"]).issubset({"lexical", "graph"})
|
||||
|
||||
def test_trace_available_for_failed_recall(self, tmp_path):
|
||||
store = _seed_store(tmp_path)
|
||||
retriever = FactRetriever(store=store)
|
||||
|
||||
payload = retriever.search_with_trace(
|
||||
"nonexistent memory topic xyz123",
|
||||
limit=3,
|
||||
lanes=["lexical", "semantic", "graph", "temporal"],
|
||||
)
|
||||
|
||||
assert payload["results"] == []
|
||||
assert payload["trace"]["fused_count"] == 0
|
||||
assert payload["trace"]["lane_hits"]["lexical"] == 0
|
||||
assert payload["trace"]["lane_hits"]["semantic"] == 0
|
||||
|
||||
def test_benchmark_prompt_matrix_shows_gain_over_baseline(self, tmp_path):
|
||||
store = _seed_store(tmp_path)
|
||||
retriever = FactRetriever(store=store)
|
||||
report = retriever.benchmark_prompt_matrix(_fixture()["queries"], limit=3)
|
||||
|
||||
assert report["fused_top1_hits"] > report["baseline_top1_hits"]
|
||||
assert report["improvement"] > 0
|
||||
|
||||
rendered = format_benchmark_report(report)
|
||||
assert "Prompt matrix benchmark" in rendered
|
||||
assert "semantic_alias_graph" in rendered
|
||||
assert "improvement" in rendered.lower()
|
||||
|
||||
|
||||
class TestHolographicProviderTrace:
|
||||
def test_prefetch_records_trace_and_trace_action_returns_it(self, tmp_path):
|
||||
provider = HolographicMemoryProvider(
|
||||
config={
|
||||
"db_path": str(tmp_path / "provider.db"),
|
||||
"retrieval_lanes": ["lexical", "semantic", "graph", "temporal"],
|
||||
"enable_rerank": True,
|
||||
}
|
||||
)
|
||||
provider.initialize("test-session")
|
||||
|
||||
seed_store = _seed_store(tmp_path / "seed")
|
||||
rows = seed_store.list_facts(min_trust=0.0, limit=20)
|
||||
for row in rows:
|
||||
provider._store.add_fact(row["content"], category=row["category"], tags=row.get("tags", ""))
|
||||
if row["content"].startswith("The provider is anthropic"):
|
||||
provider._store._conn.execute(
|
||||
"UPDATE facts SET created_at = ?, updated_at = ? WHERE content = ?",
|
||||
("2026-01-01T00:00:00Z", "2026-01-01T00:00:00Z", row["content"]),
|
||||
)
|
||||
elif row["content"].startswith("Correction: the provider is mimo"):
|
||||
provider._store._conn.execute(
|
||||
"UPDATE facts SET created_at = ?, updated_at = ? WHERE content = ?",
|
||||
("2026-04-20T00:00:00Z", "2026-04-20T00:00:00Z", row["content"]),
|
||||
)
|
||||
provider._store._conn.commit()
|
||||
|
||||
block = provider.prefetch("What provider should we use?")
|
||||
assert "Holographic Memory" in block
|
||||
assert "mimo-v2-pro" in block
|
||||
|
||||
trace_payload = json.loads(provider.handle_tool_call("fact_store", {"action": "trace"}))
|
||||
assert trace_payload["trace"]["query"] == "What provider should we use?"
|
||||
assert trace_payload["trace"]["rerank_applied"] in {True, False}
|
||||
assert trace_payload["trace"]["lane_hits"]["temporal"] >= 1
|
||||
25
tests/test_optional_adversarial_ux_skill_catalog.py
Normal file
25
tests/test_optional_adversarial_ux_skill_catalog.py
Normal file
@@ -0,0 +1,25 @@
|
||||
from pathlib import Path
|
||||
|
||||
from tools.skills_hub import OptionalSkillSource
|
||||
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
def test_optional_skill_source_scans_adversarial_ux_test():
|
||||
source = OptionalSkillSource()
|
||||
metas = {meta.identifier: meta for meta in source._scan_all()}
|
||||
|
||||
assert "official/dogfood/adversarial-ux-test" in metas
|
||||
assert metas["official/dogfood/adversarial-ux-test"].name == "adversarial-ux-test"
|
||||
assert "tech-resistant user" in metas["official/dogfood/adversarial-ux-test"].description
|
||||
|
||||
|
||||
def test_optional_skill_catalog_docs_list_adversarial_ux_test():
|
||||
optional_catalog = (REPO_ROOT / "website" / "docs" / "reference" / "optional-skills-catalog.md").read_text(encoding="utf-8")
|
||||
bundled_catalog = (REPO_ROOT / "website" / "docs" / "reference" / "skills-catalog.md").read_text(encoding="utf-8")
|
||||
|
||||
assert "**adversarial-ux-test**" in optional_catalog
|
||||
assert "official/dogfood/adversarial-ux-test" in optional_catalog
|
||||
assert "`adversarial-ux-test`" in bundled_catalog
|
||||
assert "dogfood/adversarial-ux-test" in bundled_catalog
|
||||
@@ -16,6 +16,7 @@ For example:
|
||||
|
||||
```bash
|
||||
hermes skills install official/blockchain/solana
|
||||
hermes skills install official/dogfood/adversarial-ux-test
|
||||
hermes skills install official/mlops/flash-attention
|
||||
```
|
||||
|
||||
@@ -56,6 +57,12 @@ hermes skills uninstall <skill-name>
|
||||
| **blender-mcp** | Control Blender directly from Hermes via socket connection to the blender-mcp addon. Create 3D objects, materials, animations, and run arbitrary Blender Python (bpy) code. |
|
||||
| **meme-generation** | Generate real meme images by picking a template and overlaying text with Pillow. Produces actual `.png` meme files. |
|
||||
|
||||
## Dogfood
|
||||
|
||||
| Skill | Description |
|
||||
|-------|-------------|
|
||||
| **adversarial-ux-test** | Roleplay the most difficult, tech-resistant user for a product — browse in-persona, rant, then filter through a RED/YELLOW/WHITE/GREEN pragmatism layer so only real UX friction becomes tickets. |
|
||||
|
||||
## DevOps
|
||||
|
||||
| Skill | Description |
|
||||
|
||||
@@ -59,9 +59,12 @@ DevOps and infrastructure automation skills.
|
||||
|
||||
## dogfood
|
||||
|
||||
Internal dogfooding and QA skills used to test Hermes Agent itself.
|
||||
|
||||
| Skill | Description | Path |
|
||||
|-------|-------------|------|
|
||||
| `dogfood` | Systematic exploratory QA testing of web applications — find bugs, capture evidence, and generate structured reports. | `dogfood/dogfood` |
|
||||
| `adversarial-ux-test` | Roleplay the most difficult, tech-resistant user for a product — browse in-persona, rant, then filter through a RED/YELLOW/WHITE/GREEN pragmatism layer so only real UX friction becomes tickets. | `dogfood/adversarial-ux-test` |
|
||||
| `hermes-agent-setup` | Help users configure Hermes Agent — CLI usage, setup wizard, model/provider selection, tools, skills, voice/STT/TTS, gateway, and troubleshooting. | `dogfood/hermes-agent-setup` |
|
||||
|
||||
## email
|
||||
|
||||
Reference in New Issue
Block a user