Skip to content

Conversation

@jthurlburt
Copy link

@jthurlburt jthurlburt commented Nov 3, 2025

Summary

Integrates opt-in knowledge management patterns from Microsoft Amplifier project: Architecture Decision Records (ADR) and DISCOVERIES pattern for tracking non-obvious problems and solutions. These complement personal mem usage with project-level, git-tracked documentation.

Changes

  • New slash command: /setup-knowledge-management with embedded templates for ADR and DISCOVERIES setup
  • 9 skills updated with opt-in integration checks:
    • systematic-debugging - Document discoveries after finding non-obvious root causes
    • root-cause-tracing - Record complete trace paths and solutions
    • when-stuck - Check known issues before investigating
    • predict-issues - Track predictions in ADRs or DISCOVERIES
    • documentation-management - Include ADRs and DISCOVERIES in documentation types
    • writing-plans - Review relevant ADRs during planning
    • brainstorming - Check decisions during research and document architectural choices
    • enhancing-superpowers - Document integration decisions
    • extracting-patterns-from-projects - Record pattern extraction decisions
  • Fallback to mem: All skills gracefully fall back to mem add when patterns not enabled
  • Dogfooding: Superpowers repo now uses own pattern with ADR 001 documenting this decision
  • Documentation: README and CHANGELOG updated to reflect new capabilities

Architectural Approach

  • Opt-in philosophy: Only enabled in projects where valuable, no forcing on teams
  • Skill integration: Skills check test -d docs/decisions and test -f docs/discoveries/DISCOVERIES.md before using
  • Git-tracked: Decisions and discoveries preserved in version control for team visibility
  • Complements mem: Personal knowledge (mem) for solo work, files for team sharing

Implementation Details

Based on comprehensive analysis of Microsoft Amplifier project patterns (see docs/amplifier-analysis.md), extracted and adapted for superpowers philosophy. Complete implementation plan in docs/plans/2025-11-03-knowledge-management-implementation-plan.md.

18 files changed, 3005 insertions(+), 18 deletions(-)

Summary by CodeRabbit

  • New Features

    • Added knowledge management system with Architecture Decision Records (ADRs) and Discoveries patterns for team-facing documentation.
    • Introduced /setup-knowledge-management slash command to initialize opt-in documentation structures.
    • Added new problem-solving and workflow skills including collision-zone thinking, pattern extraction, and issue prediction.
    • Implemented pre-commit hooks to enforce code quality standards.
  • Documentation

    • Expanded and reorganized skill library with new categories and enhanced guidance.
    • Added comprehensive CHANGELOG and implementation planning documents.
  • Chores

    • Updated plugin marketplace metadata.
    • Added code formatting and linting configuration.

jthurlburt and others added 30 commits October 21, 2025 14:00
Systematic approach to consolidate 5 repositories into superpowers plugin:
- Sequential deep analysis (repo-by-repo, feature-by-feature)
- Fill gaps, minimize bloat, eliminate ambiguity
- Preserve dependencies, convert to first-class primitives
- Document rejections, commit after each decision

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Detailed task breakdown for consolidating 5 repositories:
- Setup phase (rejected features log, inventory script)
- Sequential repository processing
- Feature-by-feature evaluation with user decision gates
- Completion phase (summary, dependency verification)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Research skill for understanding technical decision evolution.
Updated to reference memory system instead of remembering-conversations.

Source: superpowers-skills/skills/research/tracing-knowledge-lineages
Redundant with local-semantic-memory MCP server.
Will be incorporated into memory server V2 as plugin.
- simplification-cascades: Collapse complexity via unifying abstractions
- collision-zone-thinking: Force unrelated concepts together for innovation
- meta-pattern-recognition: Spot universal patterns across 3+ domains
- inversion-exercise: Flip assumptions to reveal alternatives
- scale-game: Test at extremes to expose fundamental truths
- when-stuck: Dispatch router to right problem-solving technique

Source: superpowers-skills/skills/problem-solving/
Architecture skill for recognizing when to preserve multiple valid
approaches vs forcing premature resolution. Teaches trade-off
preservation patterns via configuration/parallel implementations.

Source: superpowers-skills/skills/architecture/preserving-productive-tensions
Architecture mismatch with Claude Code plugin system.
Architecture mismatch - designed for single upstream tracking.
Preserve source attribution for skills derived from microsoft/amplifier:
- Problem-solving skills (6 skills from insight-synthesizer agent)
- Research skills (tracing-knowledge-lineages from knowledge-archaeologist)
- Architecture skills (preserving-productive-tensions from ambiguity-guardian)

Source: superpowers-skills/skills/*/ABOUT.md
Valuable concepts for enhancing existing planning workflow.
Continuous validation and migration tracking concepts valuable.
Automatic issue discovery and context detection concepts valuable.
Holistic documentation management across README, CHANGELOG, API docs, and guides.
Four modes: overview, smart update, session documentation, context-aware updates.
Includes smart CHANGELOG with version suggestions and custom content preservation.

Source: CCPlugins/commands/docs.md
Test troubleshooting and auto-fix patterns valuable.
Pattern discovery and convention replication concepts valuable.
Vulnerability assessment and risk prioritization concepts valuable.
Systematic codebase discovery and pattern recognition concepts valuable.
Proactive problem identification with risk assessment framework.
Analyzes likelihood, impact, timeline, and effort for future issues.
Complements reactive debugging with forward-looking prevention.

Source: CCPlugins/commands/predict-issues.md
GitHub-specific utility automation, not teachable technique.
Pre-commit quality gates and message generation concepts valuable.
Redundant with existing code review infrastructure.
Unified cleanup skill covering:
- Code cleanup: comment assessment (WHY vs WHAT), debug statement removal
- Project cleanup: artifact identification, safe deletion patterns
- Safety patterns: git checkpoints, protected directories, verification

Extracted concepts from remove-comments and cleanproject commands.

Source: CCPlugins/commands/remove-comments.md + cleanproject.md
Replace inline documentation checklist with mandatory documentation-management
skill invocation. This prevents documentation drift by eliminating judgment
calls about whether changes warrant documentation updates.

Changes:
- Step 2 now requires invoking documentation-management skill (no exceptions)
- Uses authority + social proof persuasion principles
- Fast path when docs are synchronized, comprehensive when updates needed
- Treats documentation verification as non-negotiable as passing tests
Moved commit guidelines from standalone skill to base.md Git Workflow section.
Writing-commits was a style guide, not a workflow skill - never invoked, only
referenced. Style guides belong with other coding preferences.

Changes:
- Add Git Workflow section to base.md with persuasion principles (authority + social proof)
- Remove writing-commits skill directory
- Update README.md and CHANGELOG.md to remove references
- Emphasize absolute co-authorship prohibition
Merged obra/superpowers v3.3.1 improvements for better efficiency:
- Prep phase: research project state before asking questions
- Share synthesized understanding first, ask only for gaps
- Lead with recommendations when presenting alternatives
- Own prioritization when repo context is clear

Preserved custom Phase 1.5 (external reference analysis) and Phase 4.5 (design challenge).

Source: obra/superpowers commits c88b0d6..e3208f1
Integrated upstream proactive research improvements
Applied Strunk & White principles to custom skills:
- Use positive form ("Skip when" vs "Don't use when")
- Omit needless words ("Why" vs "Why mandatory", remove "likely")
- Replace "NEVER" with "AVOID" for consistency
- Convert negative directives to positive actions

Skills improved:
- extracting-patterns-from-projects
- enhancing-superpowers
- documentation-management
- predict-issues

Follows upstream v3.3.1 brainstorming skill clarity pattern
- Added comprehensive updates on Amplifier's design intelligence capability and new agents
- Documented notable changes in both Amplifier and Claude-Settings projects
- Revised recommendations and priority assessments based on new findings
- Updated document version and change log for clarity
PostToolUse hook running 'prek run --all-files' caused crashes by modifying
files Claude wasn't working on, creating file state mismatches.

Created hook_run_prek.py that:
- Runs prek only on specific file being edited/written
- Reports output only when prek returns non-zero
- Uses hookEventName field for proper additionalContext display
- Never blocks, just informs Claude of formatting/errors

Updated hooks.json to use new script and removed Task/MultiEdit from matcher
since those don't have file_path in tool_input.

Also fixed import order in hook_enforce_modern_tools.py (auto-formatted by prek).
The branch check is only relevant for actual git commits, not for
file edits during development.
…s-from-projects skills

# Conflicts:
#	skills/brainstorming/SKILL.md
#	skills/documentation-management/SKILL.md
#	skills/predict-issues/SKILL.md
- Create docs/decisions/ with README and ADR template
- Create docs/discoveries/ with DISCOVERIES template
- Document decision to adopt pattern in ADR 001
- Superpowers now dogfoods own pattern
@coderabbitai
Copy link

coderabbitai bot commented Nov 3, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

A comprehensive plugin update introducing knowledge management infrastructure (ADRs/DISCOVERIES), reorganized skills library with new problem-solving techniques, pre-commit tooling configuration, enforcement hooks for modern tooling, and extensive documentation restructuring including README, CHANGELOG, and inline skill guides. Plugin metadata updated with new ownership. Legacy initialization script removed.

Changes

Cohort / File(s) Summary
Plugin & Package Configuration
.claude-plugin/marketplace.json, .claude-plugin/plugin.json, .gitignore, .pre-commit-config.yaml
Updated plugin name/description and ownership; reformatted keywords array; added /node_modules/ to gitignore; introduced comprehensive pre-commit hooks (prettier, ruff, gitleaks, blacken-docs, flynt, actionlint).
Core Documentation Updates
README.md, CHANGELOG.md, RELEASE-NOTES.md
Restructured README with new skill categories and attribution; added CHANGELOG documenting fork details, knowledge-management integration, and skill updates; deleted RELEASE-NOTES.md.
Knowledge Management Framework
commands/setup-knowledge-management.md, docs/decisions/, docs/discoveries/
Introduced opt-in knowledge management with ADR and DISCOVERIES patterns; added setup command with pre-flight checks and templates; created decision documentation structure with READMEs and first ADR (001-adopt-knowledge-management.md).
Knowledge Management Planning & Analysis
docs/plans/2025-11-03-knowledge-management-*.md, docs/amplifier-analysis.md, docs/upstream-analysis-2025-10-30.md
Added comprehensive implementation and design plans for knowledge management; documented Amplifier project analysis and upstream merge strategy.
Tool Enforcement & Formatting Hooks
hooks/hook_enforce_modern_tools.py, hooks/hook_run_prek.py, hooks/hooks.json
Implemented PreToolUse hook enforcing modern tools over legacy commands (grep/find/sed/awk); added PostToolUse hook running prettier on edited files; updated hooks.json configuration.
Repository Utilities
lib/initialize-skills.sh, scripts/inventory-repo.sh
Removed legacy skill initialization script; added new repository inventory script for cataloging skills, commands, hooks, agents, and scripts.
Problem-Solving & Cognitive Skills
skills/when-stuck/, skills/collision-zone-thinking/, skills/inversion-exercise/, skills/meta-pattern-recognition/, skills/scale-game/, skills/simplification-cascades/, skills/preserving-productive-tensions/, skills/tracing-knowledge-lineages/
Added eight new skill guides covering problem-solving dispatch, cognitive techniques (inversion, collision-zone thinking, meta-pattern recognition), scalability testing, simplification, design tension preservation, and knowledge lineage tracing.
Development Workflow Skills (Enhanced)
skills/brainstorming/, skills/writing-plans/, skills/executing-plans/, skills/subagent-driven-development/
Substantially rewrote brainstorming skill with new prep phases and emphasis on research-first approach; expanded writing-plans with pattern survey and structured header requirements; enhanced executing-plans with quick validation phases; enriched subagent-driven-development with explicit task workflows and required sub-skills.
Code Review & Collaboration Skills (Enhanced)
skills/requesting-code-review/, skills/receiving-code-review/, skills/sharing-skills/
Expanded guidance on PR workflow, branch analysis, and reviewer communication; added pattern alignment checks for feedback; minor formatting and examples enhancements.
Debugging & Verification Skills (Enhanced)
skills/systematic-debugging/, skills/root-cause-tracing/, skills/verification-before-completion/, skills/testing-skills-with-subagents/
Added common test failure patterns to systematic-debugging; expanded tracing steps and stack trace instrumentation in root-cause-tracing; restructured verification tables and key patterns; enhanced testing-skills documentation with TDD mappings and pressure scenarios.
Infrastructure & Process Skills (New/Enhanced)
skills/code-and-project-cleanup/, skills/condition-based-waiting/, skills/defense-in-depth/, skills/documentation-management/, skills/enhancing-superpowers/, skills/extracting-patterns-from-projects/, skills/finishing-a-development-branch/, skills/dispatching-parallel-agents/, skills/test-driven-development/, skills/using-git-worktrees/, skills/using-superpowers/
Introduced documentation-management skill; substantially rewrote finishing-a-development-branch with mandatory documentation sync and enhanced PR guidance; expanded enhancing-superpowers and extracting-patterns-from-projects; refactored dispatching-parallel-agents from failure-centric to task-centric; minor formatting and guidance updates across others.
Skill Utilities & Examples
skills/testing-anti-patterns/, skills/writing-skills/, skills/condition-based-waiting/example.ts, skills/systematic-debugging/CREATION-LOG.md, skills/systematic-debugging/test-pressure-*.md
Updated test-driven-development and writing-skills with formatting and principle enhancements; minor example formatting in condition-based-waiting; expanded systematic-debugging creation log and pressure test scenarios with cost annotations.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant SetupCommand as /setup-knowledge-management<br/>Command
    participant Preflight as Pre-flight Checks
    participant Templates as Template Generator
    participant Git as Git Commit
    
    User->>SetupCommand: Trigger setup-knowledge-management
    SetupCommand->>Preflight: Verify docs/decisions & docs/discoveries exist
    
    alt Directories Missing
        Preflight-->>User: Present options (skip/create/show templates)
        User->>SetupCommand: Choose action (create)
    end
    
    SetupCommand->>Templates: Generate docs/decisions/README.md
    Templates-->>SetupCommand: ADR template created
    
    SetupCommand->>Templates: Generate docs/discoveries/DISCOVERIES.md
    Templates-->>SetupCommand: Discovery template created
    
    SetupCommand->>Templates: Create example ADR (001-adopt-knowledge-management.md)
    Templates-->>SetupCommand: Example ADR created
    
    SetupCommand->>Git: Stage & commit knowledge-management structure
    Git-->>User: Setup complete ✓
Loading
sequenceDiagram
    participant Agent as Claude Agent
    participant PreTool as PreToolUse Hook<br/>(hook_enforce_modern_tools)
    participant Command as Command Execution
    participant PostTool as PostToolUse Hook<br/>(hook_run_prek)
    
    Agent->>PreTool: Attempt: grep -r "pattern" src/
    PreTool->>PreTool: Check if code search detected
    
    alt Legacy Tool Detected
        PreTool-->>Agent: ❌ Denial: Use ripgrep (rg) instead<br/>Reason: Modern alternative available
        Agent->>Agent: Acknowledge & reformulate
        Agent->>Command: Execute: rg "pattern" src/
    else Modern Tool
        PreTool-->>Command: ✓ Allow command
    end
    
    Command->>PostTool: Tool modified file.ts
    PostTool->>PostTool: Check .pre-commit-config.yaml exists
    PostTool->>PostTool: Run: prek --skip no-commit-to-branch --files file.ts
    
    alt Formatting Changes Applied
        PostTool-->>Agent: Output: Prek formatting applied
    else No Changes
        PostTool-->>Agent: Formatted file ready
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Areas requiring extra attention:

  • hooks/hook_enforce_modern_tools.py: Verify logic for detecting code-search patterns (looks_like_code_search function), ensure TOOL_RULES cover intended legacy commands, and test JSON denial payload structure matches expected hook contract.
  • docs/plans/2025-11-03-knowledge-management-implementation-plan.md and docs/plans/2025-11-03-knowledge-management-integration-design.md: Validate that the design and implementation plan are internally consistent and that all prescribed skill updates are coherent (cross-reference with skill modifications).
  • skills/brainstorming/SKILL.md: Substantial rewrite with new prep phases and process flow; verify consistency with other enhanced workflow skills (writing-plans, executing-plans, subagent-driven-development).
  • skills/finishing-a-development-branch/SKILL.md: Major restructuring with mandatory documentation-management invocation and enhanced PR body requirements; ensure integration with documentation-management skill is clear.
  • skills/enhancing-superpowers/SKILL.md: Complex guidance on skill creation and modification; cross-verify compliance expectations against actual skill examples in the diff.
  • .pre-commit-config.yaml: Confirm hook versions and configurations align with intended tool updates; verify no conflicting rules between prettier, ruff, and other formatters.

Possibly related PRs

  • Add problem-solving skills from amplifier patterns #1: Directly related — both PRs add overlapping problem-solving skills (collision-zone-thinking, inversion-exercise, meta-pattern-recognition, scale-game, simplification-cascades, when-stuck, preserving-productive-tensions, tracing-knowledge-lineages) and share dispatch/research architecture patterns.

Poem

🐰 A rabbit hops through organized skill trees,
Knowledge captured in decisions and discoveries with ease,
Hooks enforce modern tools, pre-commit guides the way,
New patterns bloom in when-stuck, inversion holds the day,
From chaos springs clarity—superpowers take their flight!

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b187e75 and 1585e8c.

⛔ Files ignored due to path filters (1)
  • skills/writing-skills/graphviz-conventions.dot is excluded by !**/*.dot
📒 Files selected for processing (62)
  • .claude-plugin/marketplace.json (2 hunks)
  • .claude-plugin/plugin.json (1 hunks)
  • .gitignore (1 hunks)
  • .pre-commit-config.yaml (1 hunks)
  • CHANGELOG.md (1 hunks)
  • README.md (4 hunks)
  • RELEASE-NOTES.md (0 hunks)
  • commands/setup-knowledge-management.md (1 hunks)
  • docs/amplifier-analysis.md (1 hunks)
  • docs/decisions/001-adopt-knowledge-management.md (1 hunks)
  • docs/decisions/README.md (1 hunks)
  • docs/discoveries/DISCOVERIES.md (1 hunks)
  • docs/plans/2025-11-03-knowledge-management-implementation-plan.md (1 hunks)
  • docs/plans/2025-11-03-knowledge-management-integration-design.md (1 hunks)
  • docs/upstream-analysis-2025-10-30.md (1 hunks)
  • hooks/hook_enforce_modern_tools.py (1 hunks)
  • hooks/hook_run_prek.py (1 hunks)
  • hooks/hooks.json (1 hunks)
  • lib/initialize-skills.sh (0 hunks)
  • scripts/inventory-repo.sh (1 hunks)
  • skills/brainstorming/SKILL.md (4 hunks)
  • skills/code-and-project-cleanup/SKILL.md (1 hunks)
  • skills/collision-zone-thinking/SKILL.md (1 hunks)
  • skills/condition-based-waiting/SKILL.md (5 hunks)
  • skills/condition-based-waiting/example.ts (7 hunks)
  • skills/defense-in-depth/SKILL.md (7 hunks)
  • skills/dispatching-parallel-agents/SKILL.md (7 hunks)
  • skills/documentation-management/SKILL.md (1 hunks)
  • skills/enhancing-superpowers/SKILL.md (1 hunks)
  • skills/executing-plans/SKILL.md (3 hunks)
  • skills/extracting-patterns-from-projects/SKILL.md (1 hunks)
  • skills/finishing-a-development-branch/SKILL.md (10 hunks)
  • skills/inversion-exercise/SKILL.md (1 hunks)
  • skills/meta-pattern-recognition/SKILL.md (1 hunks)
  • skills/predict-issues/SKILL.md (1 hunks)
  • skills/preserving-productive-tensions/SKILL.md (1 hunks)
  • skills/receiving-code-review/SKILL.md (10 hunks)
  • skills/requesting-code-review/SKILL.md (4 hunks)
  • skills/requesting-code-review/code-reviewer.md (4 hunks)
  • skills/root-cause-tracing/SKILL.md (8 hunks)
  • skills/scale-game/SKILL.md (1 hunks)
  • skills/sharing-skills/SKILL.md (6 hunks)
  • skills/simplification-cascades/SKILL.md (1 hunks)
  • skills/subagent-driven-development/SKILL.md (7 hunks)
  • skills/systematic-debugging/CREATION-LOG.md (6 hunks)
  • skills/systematic-debugging/SKILL.md (11 hunks)
  • skills/systematic-debugging/test-pressure-1.md (2 hunks)
  • skills/systematic-debugging/test-pressure-2.md (4 hunks)
  • skills/systematic-debugging/test-pressure-3.md (4 hunks)
  • skills/test-driven-development/SKILL.md (15 hunks)
  • skills/testing-anti-patterns/SKILL.md (12 hunks)
  • skills/testing-skills-with-subagents/SKILL.md (14 hunks)
  • skills/testing-skills-with-subagents/examples/CLAUDE_MD_TESTING.md (9 hunks)
  • skills/tracing-knowledge-lineages/SKILL.md (1 hunks)
  • skills/using-git-worktrees/SKILL.md (5 hunks)
  • skills/using-superpowers/SKILL.md (6 hunks)
  • skills/verification-before-completion/SKILL.md (6 hunks)
  • skills/when-stuck/SKILL.md (1 hunks)
  • skills/writing-plans/SKILL.md (6 hunks)
  • skills/writing-skills/SKILL.md (30 hunks)
  • skills/writing-skills/anthropic-best-practices.md (45 hunks)
  • skills/writing-skills/persuasion-principles.md (3 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jthurlburt
Copy link
Author

Wrong target repo - reopening against fork

@jthurlburt jthurlburt closed this Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants