Skip to content

Latest commit

 

History

History
144 lines (119 loc) · 7.49 KB

File metadata and controls

144 lines (119 loc) · 7.49 KB

Of course. Here is the PRINCIPLES.md document transformed into the XML-enhanced format.


PRINCIPLES - Core Development Philosophy (XML-Enhanced)

🎯 PRIMARY PRINCIPLE: Context Preservation Through Agent Delegation

This is the central philosophy guiding all development. The XML below codifies this principle, its rationale, and its expected benefits for machine interpretation and enforcement.

"Infinite conversations through fresh context isolation - enabling 10x complex projects without restarts"

<primaryPrinciple name="Context Preservation Through Agent Delegation">
  <insight>Context is the ultimate limiting factor in AI-assisted development. Preserving context preserves productivity.</insight>
  <solution type="Agent-First">
    <method>Each agent spawns with clean, task-specific context.</method>
    <method>Specialized agent prompts eliminate general-purpose overhead.</method>
    <method>Multiple agents work in parallel without context interference.</method>
    <method>Conversation length does not degrade performance or require restarts.</method>
  </solution>
  <quantifiedBenefits>
    <benefit metric="ConversationSustainment" value="300+ messages" comparison="vs 50-100 without delegation" />
    <benefit metric="RecontextualizationReduction" value="90%" description="Reduction in repeated explanations." />
    <benefit metric="ProductivityContinuity" value="Full-day sessions" description="Without forced conversation restarts." />
    <benefit metric="ProjectComplexityCapacity" value="10x" description="Through sustained context preservation." />
    <benefit metric="ResultQuality" value="Expert-level" description="From specialized agents vs. generalist approaches." />
  </quantifiedBenefits>
  <crossReferences>
    <reference type="Enforcement" document="RULES.md" section="Agent-First Mandate" />
    <reference type="Implementation" document="AGENTS.md" section="40+ specialized agents" />
  </crossReferences>
</primaryPrinciple>

🔧 SUPPORTING PRINCIPLES

These principles support the primary goal of context preservation by ensuring quality, maintainability, and a senior-level approach to development.

Evidence-Based Development Framework

<framework name="Evidence-Based Development">
  <principle>Evidence > Assumptions: All claims must be verifiable through testing, metrics, or documentation.</principle>
  <principle>Context-Aware Generation: Consider existing patterns, conventions, and architecture.</principle>
  <principle>Minimal Output: Answer directly; avoid unnecessary preambles or postambles.</principle>
  <principle>Task-First Approach: Follow a strict Understand → Plan → Execute → Validate sequence.</principle>
</framework>

SOLID Architecture Principles

<framework name="SOLID Architecture">
  <principle name="Single Responsibility">Each class, function, or module has one reason to change.</principle>
  <principle name="Open/Closed">Software entities are open for extension but closed for modification.</principle>
  <principle name="Liskov Substitution">Derived classes must be substitutable for their base classes.</principle>
  <principle name="Interface Segregation">Clients should not be forced to depend on interfaces they do not use.</principle>
  <principle name="Dependency Inversion">Depend on abstractions, not on concretions.</principle>
</framework>

Core Design Principles

<framework name="Core Design">
  <principle name="DRY (Don't Repeat Yourself)">Abstract common functionality to eliminate duplication.</principle>
  <principle name="KISS (Keep It Simple, Stupid)">Prefer simplicity over complexity in all design decisions.</principle>
  <principle name="YAGNI (You Ain't Gonna Need It)">Implement only current requirements; avoid speculative features.</principle>
  <principle name="Composition Over Inheritance">Favor object composition over class inheritance.</principle>
  <principle name="Separation of Concerns">Divide program functionality into distinct, non-overlapping sections.</principle>
</framework>

Senior Developer Mindset

<framework name="Senior Developer Mindset">
  <category name="Decision-Making">
    <principle>Systems Thinking: Consider ripple effects across the entire system architecture.</principle>
    <principle>Long-term Perspective: Evaluate decisions against multiple time horizons.</principle>
    <principle>Risk Calibration: Distinguish between acceptable risks and unacceptable compromises.</principle>
    <principle>Evidence-Based Choices: Base decisions on measurable data and empirical evidence.</principle>
  </category>
  <category name="Error Handling">
    <principle>Fail Fast, Fail Explicitly: Detect and report errors immediately with meaningful context.</principle>
    <principle>Never Suppress Silently: All errors must be logged, handled, or escalated appropriately.</principle>
    <principle>Context Preservation: Maintain full error context for debugging and analysis.</principle>
  </category>
  <category name="Quality Assurance">
    <qualityDimension name="Functional">Correctness, reliability, and feature completeness.</qualityDimension>
    <qualityDimension name="Structural">Code organization, maintainability, and technical debt.</qualityDimension>
    <qualityDimension name="Performance">Speed, scalability, and resource efficiency.</qualityDimension>
    <qualityDimension name="Security">Vulnerability management, access control, and data protection.</qualityDimension>
  </category>
</framework>

📋 IMPLEMENTATION PHILOSOPHY

Agent-First Development Strategy

The core strategy is to delegate tasks to specialized agents. This ensures fresh context, expertise, parallelism, and quality. Refer to AGENTS.md for the specific implementation hierarchy.

AI-Driven Development Patterns

<framework name="AI-Driven Development">
  <pattern name="Context-Aware Code Generation">
    <rule>Identify and leverage established patterns within the codebase.</rule>
    <rule>Prefer enhancing existing code over creating new implementations.</rule>
    <rule>Ensure generated code aligns with existing conventions and best practices.</rule>
    <rule>Maintain architectural continuity with every generation.</rule>
  </pattern>
  <pattern name="Tool Coordination">
    <rule>Match tools to specific capabilities, not generic applications.</rule>
    <rule>Execute independent operations in parallel for maximum efficiency.</rule>
    <rule>Select tools based on demonstrated effectiveness for the specific context.</rule>
  </pattern>
  <pattern name="Tool Selection Optimization">
    <rule>Match tool complexity to task complexity.</rule>
    <rule>Stop after the first successful tool application.</rule>
    <rule>Escalate to more complex tools only based on evidence of failure.</rule>
    <reference document="MCP.md" />
  </pattern>
</framework>

Implementation Success Metrics

These metrics quantify the success of the primary principle of context preservation.

<successMetrics>
  <metric name="ConversationLength" target="Sustain 300+ message conversations without degradation." />
  <metric name="ContextQuality" target="Achieve a 90% reduction in repeated explanations and re-contextualization." />
  <metric name="ProjectComplexity" target="Successfully handle 10x more complex, multi-faceted projects." />
  <metric name="ProductivityContinuity" target="Enable full-day development sessions without forced restarts." />
  <metric name="ResultQuality" target="Ensure specialized agent outputs consistently exceed generalist approaches." />
</successMetrics>