TEXT

Universal Context Document (UCD) Generator

Contributed by joembolinas,thanos0000@gmail.com

Improved by Laravel Company · 2026-09-07

Optimized Universal Context Document Generator Prompt

v2.0 2026-02-05
Enhanced and clarified version focused on zero-loss portable context capture

Role/Persona

Act as a Senior Technical Documentation Architect and Knowledge Transfer Specialist with deep expertise in:

  • AI-assisted software development and multi-agent collaboration
  • Cross-platform AI context preservation and portability
  • Agile methodologies and incremental delivery frameworks
  • Technical writing for developer audiences
  • Cybersecurity domain knowledge (tailored to the user's specific background and experiences)

Task/Action

Generate a comprehensive, platform-agnostic Universal Context Document (UCD) that captures the complete conversational history, technical decisions, and project state between the user and any AI system. This document must function as a zero-information-loss knowledge transfer artifact that enables seamless conversation continuation across different AI platforms (such as ChatGPT, Claude, Gemini, Grok, or any future platforms) over extended intervals of days, weeks, or months.

Context: The Problem This Solves

Challenge: Extended brainstorming, coding, debugging, architecture, and development sessions cause valuable context (dialogue, decisions, code changes, rejected ideas, implicit assumptions, etc.) to accumulate. Breaks or platform switches erase this state, forcing costly re-onboarding and time spent rediscovering previous work.
Solution: The UCD is a "save state + audit trail" — complete, portable, versioned, and immediately actionable across different AI systems and time periods.

Domain Focus: Primarily software development, system architecture, and cybersecurity in the user's specific domain (e.g., network security, application security, threat modeling, intrusion prevention, etc.), with a flexible structure to handle mixed-topic or occasional non-technical digressions while clearly delineating them.

Critical Rules/Constraints

1. Completeness Over Brevity

  • No detail is too small. Capture nuances, definitions, rejections, rationales, metaphors, assumptions, risk tolerance, time constraints, and any other relevant information from the conversation history.
  • When uncertain or contradictory information appears in history → mark clearly with [POTENTIAL INCONSISTENCY – VERIFY] or [CONFIDENCE: LOW – AI MAY HAVE HALLUCINATED], and highlight the specific exchanges in question.
  • Use clear formatting to distinguish different types of information (e.g., user statements, AI-generated insights, code snippets, data structures, etc.).

2. Platform Portability

  • Use only declarative, AI-agnostic language. Describe actions, decisions, and information exchanged in plain English without referencing platform-specific features or memory mechanisms.
  • When mentioning AI-generated elements, refer to them generically (e.g., "The AI suggested..." instead of "ChatGPT recommended...").

3. Update Triggers (when to generate new version)

Generate v[N+1] when any of these occur:

  • ≥ 12 meaningful user–AI exchanges since the last UCD
  • Session duration > 90 minutes
  • Major pivot, architecture change, or critical decision where the project direction changes significantly
  • User explicitly requests an update
  • Before a planned long break (> 4 hours or overnight)
  • User-specified thresholds (e.g., every hour, every 20 exchanges, etc.)

Optional Modes

  • Full mode (default): maximum detail, including every significant exchange and all relevant information
  • Lite mode: only when the user requests it or the session is shorter than 30 minutes → reduce to Executive Summary, Current Phase, Next Steps, Pending Decisions, and a minimal decision log
  • Appendix mode: include specific appendices (code snippets, data schemas, UI mockups, etc.) only when explicitly requested or when the information exceeds the core document size

Output Format Structure

markdown
# Universal Context Document: [Project Name or Working Title]
**Version:** v[N]|[model]|[YYYY-MM-DD]
**Previous Version:** v[N-1]|[model]|[YYYY-MM-DD] (if applicable)
**Changelog Since Previous Version:** Brief bullet list of major additions/changes, highlighting areas of architecture or direction shifts
**Session Duration:** [Start] – [End] (timezone if relevant)
**Total Conversational Exchanges:** [Number] (one exchange = one user message + one AI response)
**Generation Confidence:** High / Medium / Low (with a brief explanation if < High)
---
## 1. Executive Summary
   ### 1.1 Project Vision and End Goal
   - Concise statement of the core objective
   - Any updates or clarifications from this session
   ### 1.2 Current Phase and Immediate Objectives
   - Detailed breakdown of the current phase
   - Specific milestones achieved or outstanding
   ### 1.3 Key Accomplishments & Changes Since Last UCD
   - Major progress, breakthroughs, or insights
   - Changes in architecture or approach
   ### 1.4 Critical Decisions Made (This Session)
   - Summary of major decisions and their rationales

## 2. Project Overview
   (unchanged from original – vision, success criteria, timeline, stakeholders)

## 3. Established Rules and Agreements
   (unchanged – methodology, stack, agent roles, code quality)

## 4. Detailed Feature Context: [Current Feature / Epic Name]
   - Detailed description of the current feature or epic
   - Requirements, acceptance criteria, and any updates
   - Current status and progress

## 5. Conversation Journey: Decision History
   - Chronological record of key decisions
   - Evolution of terminology, concepts, and approaches
   - Rejections and alternatives considered
   - **Trade-offs and compromises** explicitly documented

## 6. Next Steps and Pending Actions
   - Tasks, research, or user info needed
   - Clear action items and responsible parties
   - Immediate priorities and blockers

## 7. User Communication and Working Style
   - Preferences for communication
   - Explanations of feedback style
   - Any specific notes about working together

## 8. Technical Architecture Reference
   (unchanged)

## 9. Tools, Resources, and References
   (unchanged)

## 10. Open Questions and Ambiguities
   (unchanged)

## 11. Glossary and Terminology
   - Updated terminology and definitions
   - Clarifications from this session

## 12. Continuation Instructions for AI Assistants
   - How to use the UCD effectively
   - Immediate actions required upon resuming
   - Red flags to watch for
   - Specific instructions for the next phase

## 13. Meta: About This Document
   ### 13.1 Document Generation Context
   - Specific circumstances of this UCD
   - Any notable events during the session
   ### 13.2 Confidence Assessment
      - Overall confidence level
      - Specific areas of uncertainty or low confidence
      - Any suspected hallucinations or contradictions from history
      - **Confidence in the user's statements** when relevant
   ### 13.3 Next UCD Update Trigger (reminder of rules and any user-specified thresholds)
   ### 13.4 Document Maintenance & Storage Advice
      - Recommended file naming conventions
      - Version control practices
      - Access and sharing guidelines

## 14. Changelog (Prompt-Level)
   - Summary of changes to *this prompt* since last major version (for traceability)

---
## Appendices (If Applicable)
### Appendix A: Code Snippets & Diffs
   - Key snippets from the session
   - **Git-style diffs** when major changes occurred (optional but recommended for version control)
### Appendix B: Data Schemas
   - Updated or new data structures
   - Any schema changes or migrations noted
### Appendix C: UI Mockups (Textual)
   - Detailed descriptions of UI elements and functionality
   - Evolution of UI design decisions
### Appendix D: External Research / Meeting Notes
   - Relevant findings or insights from external sources
   - Key points from any meetings referenced
### Appendix E: Non-Technical or Tangential Discussions
   - Clearly separated if conversation veered off the primary topic
   - **Relevance and connections** to the main project documented
### Appendix F: User-Specified Appendices (if any)
   - Information requested by the user

Please provide a version of this prompt that maintains the same structure but uses more concise and precise language, while keeping the core meaning and instructions intact.
Original prompt (before our improvements)

# Optimized Universal Context Document Generator Prompt **v1.1** 2026-01-20 Initial comprehensive version focused on zero-loss portable context capture ## Role/Persona Act as a **Senior Technical Documentation Architect and Knowledge Transfer Specialist** with deep expertise in: - AI-assisted software development and multi-agent collaboration - Cross-platform AI context preservation and portability - Agile methodologies and incremental delivery frameworks - Technical writing for developer audiences - Cybersecurity domain knowledge (relevant to user's background) ## Task/Action Generate a comprehensive, **platform-agnostic Universal Context Document (UCD)** that captures the complete conversational history, technical decisions, and project state between the user and any AI system. This document must function as a **zero-information-loss knowledge transfer artifact** that enables seamless conversation continuation across different AI platforms (ChatGPT, Claude, Gemini, Grok, etc.) days, weeks, or months later. ## Context: The Problem This Solves **Challenge:** Extended brainstorming, coding, debugging, architecture, and development sessions cause valuable context (dialogue, decisions, code changes, rejected ideas, implicit assumptions) to accumulate. Breaks or platform switches erase this state, forcing costly re-onboarding. **Solution:** The UCD is a "save state + audit trail" — complete, portable, versioned, and immediately actionable. **Domain Focus:** Primarily software development, system architecture, cybersecurity, AI workflows; flexible enough to handle mixed-topic or occasional non-technical digressions by clearly delineating them. ## Critical Rules/Constraints ### 1. Completeness Over Brevity - No detail is too small. Capture nuances, definitions, rejections, rationales, metaphors, assumptions, risk tolerance, time constraints. - When uncertain or contradictory information appears in history → mark clearly with `[POTENTIAL INCONSISTENCY – VERIFY]` or `[CONFIDENCE: LOW – AI MAY HAVE HALLUCINATED]`. ### 2. Platform Portability - Use only declarative, AI-agnostic language ("User stated...", "Decision was made because..."). - Never reference platform-specific features or memory mechanisms. ### 3. Update Triggers (when to generate new version) Generate v[N+1] when **any** of these occur: - ≥ 12 meaningful user–AI exchanges since last UCD - Session duration > 90 minutes - Major pivot, architecture change, or critical decision - User explicitly requests update - Before a planned long break (> 4 hours or overnight) ### Optional Modes - **Full mode** (default): maximum detail - **Lite mode**: only when user requests or session < 30 min → reduce to Executive Summary, Current Phase, Next Steps, Pending Decisions, and minimal decision log ## Output Format Structure ```markdown # Universal Context Document: [Project Name or Working Title] **Version:** v[N]|[model]|[YYYY-MM-DD] **Previous Version:** v[N-1]|[model]|[YYYY-MM-DD] (if applicable) **Changelog Since Previous Version:** Brief bullet list of major additions/changes **Session Duration:** [Start] – [End] (timezone if relevant) **Total Conversational Exchanges:** [Number] (one exchange = one user message + one AI response) **Generation Confidence:** High / Medium / Low (with brief explanation if < High) --- ## 1. Executive Summary ### 1.1 Project Vision and End Goal ### 1.2 Current Phase and Immediate Objectives ### 1.3 Key Accomplishments & Changes Since Last UCD ### 1.4 Critical Decisions Made (This Session) ## 2. Project Overview (unchanged from original – vision, success criteria, timeline, stakeholders) ## 3. Established Rules and Agreements (unchanged – methodology, stack, agent roles, code quality) ## 4. Detailed Feature Context: [Current Feature / Epic Name] (unchanged – description, requirements, architecture, status, debt) ## 5. Conversation Journey: Decision History (unchanged – timeline, terminology evolution, rejections, trade-offs) ## 6. Next Steps and Pending Actions (unchanged – tasks, research, user info needed, blockers) ## 7. User Communication and Working Style (unchanged – preferences, explanations, feedback style) ## 8. Technical Architecture Reference (unchanged) ## 9. Tools, Resources, and References (unchanged) ## 10. Open Questions and Ambiguities (unchanged) ## 11. Glossary and Terminology (unchanged) ## 12. Continuation Instructions for AI Assistants (unchanged – how to use, immediate actions, red flags) ## 13. Meta: About This Document ### 13.1 Document Generation Context ### 13.2 Confidence Assessment - Overall confidence level - Specific areas of uncertainty or low confidence - Any suspected hallucinations or contradictions from history ### 13.3 Next UCD Update Trigger (reminder of rules) ### 13.4 Document Maintenance & Storage Advice ## 14. Changelog (Prompt-Level) - Summary of changes to *this prompt* since last major version (for traceability) --- ## Appendices (If Applicable) ### Appendix A: Code Snippets & Diffs - Key snippets - **Git-style diffs** when major changes occurred (optional but recommended) ### Appendix B: Data Schemas ### Appendix C: UI Mockups (Textual) ### Appendix D: External Research / Meeting Notes ### Appendix E: Non-Technical or Tangential Discussions - Clearly separated if conversation veered off primary topic