Reviews an implemented module or agent against the PRD spec to identify gaps, deviations, or missing requirements. Invoke when the user says "review this against the PRD", "check this implementation against the spec", "does this match the PRD", "audit this module", "is this compliant with the spec", "what am I missing from the spec", "review my implementation", "PRD compliance check", or "spec review". Also triggers on "does this match CLAUDE.md".
Instalación
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Reviews an implemented module or agent against the PRD spec to identify gaps, deviations, or missing requirements. Invoke when the user says "review this against the PRD", "check this implementation against the spec", "does this match the PRD", "audit this module", "is this compliant with the spec", "what am I missing from the spec", "review my implementation", "PRD compliance check", or "spec review". Also triggers on "does this match CLAUDE.md".
triggers
["review against the PRD","check against the spec","does this match the PRD","audit this module","is this compliant with the spec","what am I missing from the spec","review my implementation","PRD compliance check","spec review","does this match CLAUDE.md"]
Review Implementation Against PRD Spec
You are auditing an implementation of django-ai-sdk against its PRD specification.
Step 1 — Re-Read the Spec
Always re-read these files before auditing (do not rely on memory):
Fallback path uses model.model_validate_json() on raw response text
response.structured returns a Pydantic model instance or None
ORM Models
Conversation model has fields: id, created_at, updated_at, metadata (JSONField)
Message model has fields: id, conversation (FK to Conversation), role (choices: user/assistant/system/tool), content, tool_calls (JSONField, nullable), created_at
Both models have __str__ methods
DRF serializers cover both models
Testing Utilities
FakeProvider implements all four AbstractProvider methods
FakeProvider.call_log records all AgentRequest objects (list, in order)
assert_tool_called(provider, tool_name) checks call_log for tool by name
Both assertion functions raise AssertionError with a clear message on failure
Settings and App Config
ai_settings from conf.py is a lazy accessor (does not access settings at import time)
ImproperlyConfigured raised on startup if required keys are missing from AI_SDK
AiSdkConfig.ready() calls ProviderRegistry.build_from_settings() then imports signals
Management command ai_sdk_check tests connectivity for each configured provider
Management command ai_sdk_publish writes the AI_SDK block to stdout
Signals
agent_started fires before provider.complete() (kwargs: request)
agent_completed fires after successful response (kwargs: response)
agent_failed fires when provider raises an exception (kwargs: exception)
cache_hit fires when usage.cache_read_tokens > 0
cache_miss fires when usage.cache_read_tokens == 0
All signals use django.dispatch.Signal() (not providing_args which is deprecated)
DRF Views
ChatAPIView accepts POST /chat/ with {"message": "...", "conversation_id": "..."} body
StreamingChatAPIView returns SyncSSEResponse or AsyncSSEResponse
Both views use DRF authentication/permission classes (configurable)
Step 3 — Report Format
## PRD Compliance Report — [module path]
### PASS (N items)
- [item]: [brief explanation of how it satisfies the requirement]
### FAIL (N items)
- [item]: [what is missing or wrong]
→ Fix: [specific code change needed]
### N/A (N items)
- [item]: [why not applicable to this module]
### Recommended Next Steps
1. [highest priority fix — blocking other modules]
2. [second priority fix]
3. ...
Step 4 — Concrete Fixes Required
For every FAIL item, provide the minimal code change as a diff or code snippet — not just a description. Show exactly what line(s) need to change to achieve compliance.