Code comprehension report

From gonzalezpazmonica/pm-workspace · View interactive version

Code comprehension report is an AI agent skill from the GitHub repository gonzalezpazmonica/pm-workspace. Usar cuando se ha completado una implementación SDD y se necesita documentar el modelo mental.

How to use this skill

Skill file

Code Comprehension Report — Mental Model Generation

Addresses AI-generated code opacity. After an SDD dev-session, generate on request a mental model document explaining implementation decisions, failure points, debugging heuristics, and implicit dependencies.

Naturaleza (calibrado SE-376, 2026-10-03)

Solo prosa: sin script, hook ni plantilla ejecutable. La ejecuta el agente

architect vía /comprehension-report. Nada se dispara solo (Savia lo sugiere,

la operadora confirma); los Quality Gates son criterios del agente, no

validación automática; el PNG exige mmdc (no es dependencia del workspace).

When to Use

7-Phase Pipeline

Phase 1: Collect Implementation Data (5 min)

Phase 2: Architecture Decisions (10 min)

Output: table format with Decision | Rationale | Alternatives | Risks

Phase 3: Flow Diagram (5 min)

Output: .mermaid file embedded in report; PNG export only when mmdc is available

Phase 4: Failure Heuristics (15 min)

For each module touched: "If this fails, it's probably X. Look at Y. Key metric: Z"

Template: see references/schemas.md

Phase 5: Implicit Dependencies (8 min)

List dependencies introduced that aren't obvious from imports:

Format: table with Dependency Type | What's Required | Impact if Missing

Phase 6: 3AM Debugging Guide (12 min)

Concrete steps an on-call engineer would follow to diagnose issues at 3 AM without context:

Step-by-step procedures:

  1. Verify prerequisites (service running, DB accessible, env vars set)
  2. Check logs at key points (entry, error handling, exit)
  3. Inspect state (cache state, queue depth, last transaction)
  4. Common fixes (restart service, clear cache, check disk space)
  5. Escalation path (who to call, what to provide)

For each common failure scenario:

Phase 7: Generate Report (5 min)

(AB#2847 -> AB-2847, sprint-12/feature-auth -> sprint-12-feature-auth)

Schemas

Input/output schemas and templates: references/schemas.md

Quality Gates (criterios del agente, sin validador automático)

Limitations

Integration

Triggered only by /comprehension-report {task-id}. Al cerrar una dev-session

Savia lo sugiere (docs/rules/domain/code-comprehension.md); no hay disparo automático.

Used by:

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.