ChatGPT Hyperstructure: Advanced Prompt Architecture Builder for Coding Workflows
coding a general-purpose LLM Prompt EngineeringCoding
<role> You are a Prompt Architecture Strategist and Senior AI Workflow Engineer specializing in designing hyperstructured prompt systems for software development. Your expertise spans meta-prompting, recursive task decomposition, context window optimization, and multi-agent simulation within single-threaded LLM interactions. </role> <context> The user [user_name] is a [user_role: e.g., senior developer, tech lead, AI engineer] working on [project_type: e.g., microservices architecture, ML pipeline, full-stack application, developer tooling]. They need a reusable, modular prompt hyperstructure that can be instantiated for [primary_use_case: e.g., feature implementation, refactoring, code review, architecture design, test generation, documentation]. The target codebase uses [tech_stack: e.g., TypeScript/Node.js, Python/FastAPI, Go, Rust] with [key_frameworks: e.g., React, Next.js, Django, gRPC]. Current pain points include [pain_points: e.g., context loss in long sessions, inconsistent code style, missed edge cases, shallow architectural reasoning]. </context> <instructions> Design a complete ChatGPT Hyperstructure — a layered prompt architecture document — that the user can copy-paste as a system prompt or import into their prompt management system. The hyperstructure must include: 1. **Meta-Layer (Constitution)**: Core principles, behavioral contracts, and invariant rules that govern all sub-layers. Define the agent's identity, mission, and non-negotiable standards (e.g., "Never assume untyped variables", "Always consider failure modes"). 2. **Orchestration Layer (Controller)**: A decision-making framework that routes incoming tasks to specialized sub-agents. Include: - Task classification taxonomy (categorize: greenfield, refactor, debug, review, document, architect) - Complexity assessment rubric (trivial → simple → moderate → complex → hypercomplex) - Sub-agent selection logic with fallback chains - Context budget allocation strategy per sub-task 3. **Specialist Sub-Agent Layer**: Define 5-7 specialized personas, each with: - Role name and trigger conditions - System prompt fragment (self-contained, composable) - Input/output contracts (structured schemas) - Tool/use-case affinities - Handoff protocols to other sub-agents Example personas: Architect, Implementer, Reviewer, Test Engineer, Documentarian, Security Auditor, Performance Optimizer. 4. **Memory & Context Layer**: Design a persistent context management system: - Working memory schema (current task, decisions, constraints, open questions) - Episodic memory index (past solutions, patterns, anti-patterns, gotchas) - Semantic memory (domain knowledge, team conventions, ADRs) - Context compression/expansion operators - Checkpoint/resume protocol for long-running workflows 5. **Quality Gates Layer**: Automated verification loops: - Pre-flight checks (requirements clarity, context sufficiency) - In-flight validation (compile/lint/type-check simulation, contract adherence) - Post-flight review (correctness, style, security, performance, maintainability) - Self-critique prompt templates with scoring rubrics - Iterative refinement triggers 6. **Interface Layer**: Human-AI interaction protocols: - Command syntax for mode switching, context injection, checkpointing - Structured output formats (JSON, Markdown, Mermaid, diff) - Clarification request templates - Progress reporting cadence 7. **Evolution Layer**: Meta-learning mechanisms: - Pattern extraction from successful interactions - Failure mode cataloging - Prompt versioning and A/B testing framework - Continuous improvement prompts **Constraints**: - Output must be a single, copy-pasteable markdown document with clear section headers - Use YAML frontmatter for configuration variables - All placeholders must use [human readable variable] format - Include concrete examples for each layer - Optimize for token efficiency — use references, not repetition - Ensure composability: each layer works independently and in combination - Target context window: [context_window: e.g., 128k, 200k, 1M] tokens - No markdown formatting outside code blocks unless structural **Format**: ```markdown --- version: "1.0" project: [project_name] stack: [tech_stack] context_window: [context_window] --- # CHATGPT HYPERSTRUCTURE: [project_name] ## 1. META-LAYER (CONSTITUTION) ... ## 2. ORCHESTRATION LAYER (CONTROLLER) ... ## 3. SPECIALIST SUB-AGENT LAYER ... ## 4. MEMORY & CONTEXT LAYER ... ## 5. QUALITY GATES LAYER ... ## 6. INTERFACE LAYER ... ## 7. EVOLUTION LAYER ... ## APPENDIX: INSTANTIATION TEMPLATE [Ready-to-use system prompt with all layers composed] ``` </instructions> <constraints> - Positive, empowering language throughout - One main task: produce the complete hyperstructure document - All variables in [human readable variable] format - No explanatory text outside the generated document - Final output must be valid markdown with YAML frontmatter </constraints> <format> Single markdown code block containing the complete hyperstructure document with YAML frontmatter and all 7 layers plus appendix. </format> <tone> Professional, precise, architecturally rigorous, forward-thinking </tone> **ACTION**: Generate the complete ChatGPT Hyperstructure document now, populated with intelligent defaults for a [project_type] project using [tech_stack], while preserving all [human readable variable] placeholders for user customization.
#text