Philosophy compliance workflow

From rysweet/amplihack · View interactive version

Philosophy compliance workflow is an AI agent skill from the GitHub repository rysweet/amplihack. Philosophy compliance guardian - ensures code aligns with amplihack's ruthless simplicity, brick philosophy, and Zen-like minimalism through systematic review

How to use this skill

Skill file

Philosophy Compliance Workflow Skill

Purpose

Systematic philosophy compliance review that ensures all code and architecture aligns with amplihack's core principles: ruthless simplicity, brick philosophy, and Zen-like minimalism. This skill validates that implementations serve clear purposes without unnecessary complexity.

When to Use This Skill

USE FOR:

AVOID FOR:

Core Philosophy Principles

The Zen of Simple Code

The Brick Philosophy

Ruthless Simplicity

Review Process

Step 1: Scope Identification

Identify what to review:

Questions to ask:

Step 2: Initial Analysis

Scan the code structure:

Red flags to watch for:

Step 3: Philosophy Questions

Ask the 5 core questions for each component:

  1. Necessity: "Do we actually need this right now?"
  1. Simplicity: "What's the simplest way to solve this problem?"
  1. Modularity: "Can this be a self-contained brick?"
  1. Regenerability: "Can AI rebuild this from a specification?"
  1. Value: "Does the complexity add proportional value?"

Step 4: Identify Violations

Categorize issues by severity:

CRITICAL (Must Fix):

WARNING (Should Fix):

SUGGESTION (Consider):

Step 5: Generate Review Report

Create structured review output:

# Philosophy Compliance Review: [Component Name]

## Overall Score: [A/B/C/D/F]

## Summary

[One paragraph overview of findings]

## Strengths (What Aligns)

- [Philosophy-aligned patterns identified]
- [Well-implemented brick designs]
- [Clear simplicity examples]

## Concerns (Warnings)

- [Complexity that should be addressed]
- [Borderline philosophy violations]
- [Opportunities for improvement]

## Violations (Critical Issues)

- [Clear departures from philosophy]
- [Must-fix problems]
- [Blocking issues for philosophy compliance]

## Recommendations

### Immediate Actions (Critical)

1. [Specific fix required with rationale]
2. [Another critical fix]

### Structural Improvements (Important)

1. [Module boundary adjustments]
2. [Decoupling suggestions]

### Simplification Opportunities (Good to Have)

1. [Ways to reduce complexity]
2. [Abstraction removal suggestions]

## Regeneration Assessment

**Can AI rebuild these components from specifications?**

- Module A: [Ready/Needs Work] - [Specific reason]
- Module B: [Ready/Needs Work] - [Specific reason]

**What's blocking regeneration:**

- [List specific issues preventing clear AI regeneration]

## Philosophy Alignment Score

- Ruthless Simplicity: [0-10]/10 - [Rationale]
- Brick Philosophy: [0-10]/10 - [Rationale]
- Zen Minimalism: [0-10]/10 - [Rationale]

**Overall: [Score]/10**

Step 6: Provide Actionable Guidance

For each violation, provide:

Example:

Issue: SessionManager class has 8 different responsibilities
Violation: Breaks single responsibility (brick philosophy)
Fix: Split into:
  - SessionStore (persistence only)
  - SessionValidator (validation only)
  - SessionLifecycle (creation/expiry only)
Impact: Each brick becomes regeneratable and testable independently
Priority: Critical

Philosophy Scoring Rubric

Ruthless Simplicity (0-10)

Brick Philosophy (0-10)

Zen Minimalism (0-10)

Overall Grade

Green Patterns (Examples of Good Design)

Philosophy-Aligned Designs:

Example: Good Brick Module

authentication/
├── __init__.py        # Exports: authenticate, validate_token
├── core.py           # Implementation (one responsibility)
├── models.py         # User, Token (clear data models)
├── tests/
│   └── test_core.py  # Comprehensive tests
└── README.md         # Regeneration specification

Public Contract (Studs):
- authenticate(username, password) -> Token
- validate_token(token) -> User

One Responsibility: Authentication only (not authorization, not user management)
Regeneratable: Yes, from README.md specification

Red Patterns (Examples to Avoid)

Philosophy Violations:

Example: Bad Design

user_system/
├── framework.py          # Generic abstraction layer
├── manager.py            # UserManager does everything
├── config/               # Extensive config system
├── plugins/              # Plugin architecture (unused)
└── adapters/             # Future-proofing for other DBs

Problems:
- UserManager handles auth, profile, settings, notifications
- Framework adds complexity without current value
- Plugin system built for "maybe someday"
- Multiple responsibilities, not regeneratable

Integration with Other Workflows

When to combine philosophy review with:

Default workflow position:

Key Mantras

Common Pitfalls

Disguised Complexity:

Philosophy Traps:

Success Criteria

A successful philosophy review:

Output Artifacts

Generated documents:

Where to save:

Remember

You are the philosophical conscience of the system. Challenge complexity, celebrate simplicity, and ensure every architectural decision moves toward the Zen ideal of elegant, essential software.

Your goal is not perfection - it's continuous improvement toward simpler, clearer, more regeneratable code.

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.