HK-hub/AgentSkills / ax-audit
ax-audit
VerifiedAudits agentic applications for architecture and trust: tool parity, tool granularity, context injection, completion signals, approval gates, confidence cues, escape hatches, intent handshakes, memory visibility, and adaptive canvases. Produces a ship-readiness verdict plus an AX Relationship Summary. Use when reviewing agentic feature PRs or asking "is this agent-native", "AX review", "critique this AI feature", "does this earn user trust", or "audit this for AX". For traditional frontend UX use ui-audit.
rules-ax/context-under-contextual.md
View on GitHub---
title: Agent ignores available context it should use
slug: context-under-contextual
category: context
defaultTier: backlog
surfaces: agent-chat, agent-tool-execution
ax-pattern: Under-contextual (anti-pattern)
detection: hybrid
related: context-memory-not-visible, context-starvation
---
## Agent ignores available context it should use
The system has the user's project history, preferences, recent activity, and team context, but the agent's prompt includes none of it. The agent asks questions it should already know the answer to, wasting time and making it feel stupid.
## What goes wrong
User opens a project page and asks "help me write a status update." Agent responds: "What project are you working on?" The project name, recent commits, and open tickets are all in app state, but the prompt ignores them. Every needless question erodes confidence.
## Detection
**Surfaces:** agent-chat, agent-tool-execution
**Auditability:** hybrid
**Static signals:**
1. Catalog available context sources (user profile, project state, recent activity, team info).
2. Find agent prompt/context assembly functions.
3. Check whether available sources are referenced in context injection.
4. Flag significant context sources never passed to the agent.
**Concrete commands:**
```bash
rg '(useUser|useProject|useTeam|useActivity|currentProject|activeWorkspace)' --type=ts -l src/
rg '(buildPrompt|systemPrompt|assembleContext|getAgentContext)' --type=ts -l src/
rg -A 15 '(buildPrompt|assembleContext|getAgentContext)' --type=ts src/
```
**Judgment signals:**
- Would a human assistant in this position already know the answer?
- Is the missing context high-signal (project name, recent activity) or low-signal?
**False-positive guards:**
- Skip files with `// ax-audit-ignore:context-under-contextual`.
- Skip test/Storybook fixtures and generic agent surfaces with no page-specific context.
## Fix
Inject relevant context at session start using the context.md pattern: "What I Know About This User," "What Exists," "Recent Activity." Update dynamically during the session.
## Default tier and overrides
**Defaults to:** `backlog`
| Surface | Tier |
|---|---|
| Agent tool execution | fix-this-sprint |
| Agent chat | backlog |
## Examples
**Anti-pattern (fails):**
```tsx
// User is on /projects/acme-redesign but agent gets no project context
export function ProjectAgent() {
const { sendMessage } = useAgent({ system: "You are a helpful assistant." });
return <AgentChat onSend={sendMessage} />;
}
```
**Applied (passes):**
```tsx
export function ProjectAgent() {
const project = useProject();
const activity = useRecentActivity(project.id);
const { sendMessage } = useAgent({
system: `Assistant for ${project.name}. Recent: ${activity.map((a) => a.summary).join("; ")}`,
});
return <AgentChat onSend={sendMessage} />;
}
```
## Suppression
```tsx
{/* ax-audit-ignore:context-under-contextual, generic help chat, no page context needed */}
<HelpAgent />
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |