Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Grep: pattern="email" path=docs/solutions/ output_mode=files_with_matches -i=tru
**Regardless of Grep results**, always read the critical patterns file:

```bash
Read: docs/solutions/patterns/cora-critical-patterns.md
Read: docs/solutions/patterns/critical-patterns.md
```

This file contains must-know patterns that apply across all work - high-severity issues promoted to required reading. Scan for patterns relevant to the current feature/task.
Expand Down Expand Up @@ -182,7 +182,7 @@ Structure your findings as:
- **Relevant Matches**: [Y files]

### Critical Patterns (Always Check)
[Any matching patterns from cora-critical-patterns.md]
[Any matching patterns from critical-patterns.md]

### Relevant Learnings

Expand Down
6 changes: 3 additions & 3 deletions plugins/compound-engineering/commands/workflows/compound.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ This command launches multiple specialized subagents IN PARALLEL to maximize eff
### 1. **Context Analyzer** (Parallel)
- Extracts conversation history
- Identifies problem type, component, symptoms
- Validates against CORA schema
- Validates against solution schema
- Returns: YAML frontmatter skeleton

### 2. **Solution Extractor** (Parallel)
Expand Down Expand Up @@ -66,7 +66,7 @@ This command launches multiple specialized subagents IN PARALLEL to maximize eff
- **performance_issue** → `performance-oracle`
- **security_issue** → `security-sentinel`
- **database_issue** → `data-integrity-guardian`
- **test_failure** → `cora-test-reviewer`
- **test_failure** → `test-quality-reviewer`
- Any code-heavy issue → `kieran-rails-reviewer` + `code-simplicity-reviewer`

## What It Captures
Expand Down Expand Up @@ -184,7 +184,7 @@ Based on problem type, these agents can enhance documentation:
### Specific Domain Experts
- **performance-oracle**: Analyzes performance_issue category solutions
- **security-sentinel**: Reviews security_issue solutions for vulnerabilities
- **cora-test-reviewer**: Creates test cases for prevention strategies
- **test-quality-reviewer**: Creates test cases for prevention strategies
- **data-integrity-guardian**: Reviews database_issue migrations and queries

### Enhancement & Documentation
Expand Down
2 changes: 1 addition & 1 deletion plugins/compound-engineering/commands/workflows/work.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ This command takes a work document (plan, specification, or todo file) and execu
- **kieran-rails-reviewer**: Verify Rails conventions (Rails projects)
- **performance-oracle**: Check for performance issues
- **security-sentinel**: Scan for security vulnerabilities
- **cora-test-reviewer**: Review test quality (CORA projects)
- **test-quality-reviewer**: Review test quality (Rails projects with comprehensive test coverage)

Run reviewers in parallel with Task tool:

Expand Down
16 changes: 8 additions & 8 deletions plugins/compound-engineering/skills/compound-docs/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Extract from conversation history:

**Required information:**

- **Module name**: Which CORA module had the problem
- **Module name**: Which module or component had the problem
- **Symptom**: Observable error/behavior (exact error messages)
- **Investigation attempts**: What didn't work and why
- **Root cause**: Technical explanation of actual problem
Expand Down Expand Up @@ -249,7 +249,7 @@ But **NEVER auto-promote**. User decides via decision menu (Option 2).

**Template for critical pattern addition:**

When user selects Option 2 (Add to Required Reading), use the template from `assets/critical-pattern-template.md` to structure the pattern entry. Number it sequentially based on existing patterns in `docs/solutions/patterns/cora-critical-patterns.md`.
When user selects Option 2 (Add to Required Reading), use the template from `assets/critical-pattern-template.md` to structure the pattern entry. Number it sequentially based on existing patterns in `docs/solutions/patterns/critical-patterns.md`.
</step>

</critical_sequence>
Expand All @@ -270,7 +270,7 @@ File created:

What's next?
1. Continue workflow (recommended)
2. Add to Required Reading - Promote to critical patterns (cora-critical-patterns.md)
2. Add to Required Reading - Promote to critical patterns (critical-patterns.md)
3. Link related issues - Connect to similar problems
4. Add to existing skill - Add to a learning skill (e.g., hotwire-native)
5. Create new skill - Extract into new learning skill
Expand All @@ -295,7 +295,7 @@ User selects this when:
Action:
1. Extract pattern from the documentation
2. Format as ❌ WRONG vs ✅ CORRECT with code examples
3. Add to `docs/solutions/patterns/cora-critical-patterns.md`
3. Add to `docs/solutions/patterns/critical-patterns.md`
4. Add cross-reference back to this doc
5. Confirm: "✓ Added to Required Reading. All subagents will see this pattern before code generation."

Expand All @@ -317,7 +317,7 @@ Action:
4. Confirm: "✓ Added to [skill-name] skill in [file]"

Example: For Hotwire Native Tailwind variants solution:
- Add to `hotwire-native/references/resources.md` under "CORA-Specific Resources"
- Add to `hotwire-native/references/resources.md` under "Project-Specific Resources"
- Add to `hotwire-native/references/examples.md` with link to solution doc

**Option 5: Create new skill**
Expand Down Expand Up @@ -397,11 +397,11 @@ Documentation is successful when ALL of the following are true:
- Present multiple matches
- Let user choose: new doc, update existing, or link as duplicate

**Module not in CORA-MODULES.md:**
**Module not in modules documentation:**

- Warn but don't block
- Proceed with documentation
- Suggest: "Add [Module] to CORA-MODULES.md if not there"
- Suggest: "Add [Module] to modules documentation if not there"

---

Expand Down Expand Up @@ -488,7 +488,7 @@ File created:

What's next?
1. Continue workflow (recommended)
2. Add to Required Reading - Promote to critical patterns (cora-critical-patterns.md)
2. Add to Required Reading - Promote to critical patterns (critical-patterns.md)
3. Link related issues - Connect to similar problems
4. Add to existing skill - Add to a learning skill (e.g., hotwire-native)
5. Create new skill - Extract into new learning skill
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Critical Pattern Template

Use this template when adding a pattern to `docs/solutions/patterns/cora-critical-patterns.md`:
Use this template when adding a pattern to `docs/solutions/patterns/critical-patterns.md`:

---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
module: [Module name or "CORA" for system-wide]
module: [Module name or "System" for system-wide]
date: [YYYY-MM-DD]
problem_type: [build_error|test_failure|runtime_error|performance_issue|database_issue|security_issue|ui_bug|integration_issue|logic_error]
component: [rails_model|rails_controller|rails_view|service_object|background_job|database|frontend_stimulus|hotwire_turbo|email_processing|brief_system|assistant|authentication|payments]
Expand All @@ -19,7 +19,7 @@ tags: [keyword1, keyword2, keyword3]
[1-2 sentence clear description of the issue and what the user experienced]

## Environment
- Module: [Name or "CORA system"]
- Module: [Name or "System-wide"]
- Rails Version: [e.g., 7.1.2]
- Affected Component: [e.g., "Email Processing model", "Brief System service", "Authentication controller"]
- Date: [YYYY-MM-DD when this was solved]
Expand Down Expand Up @@ -78,7 +78,7 @@ tags: [keyword1, keyword2, keyword3]

## Prevention

[How to avoid this problem in future CORA development:]
[How to avoid this problem in future development:]
- [Specific coding practice, check, or pattern to follow]
- [What to watch out for]
- [How to catch this early]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Required Fields

- **module** (string): Module name (e.g., "EmailProcessing") or "CORA" for system-wide issues
- **module** (string): Module name (e.g., "EmailProcessing") or "System" for system-wide issues
- **date** (string): ISO 8601 date (YYYY-MM-DD)
- **problem_type** (enum): One of [build_error, test_failure, runtime_error, performance_issue, database_issue, security_issue, ui_bug, integration_issue, logic_error, developer_experience, workflow_issue, best_practice, documentation_gap]
- **component** (enum): One of [rails_model, rails_controller, rails_view, service_object, background_job, database, frontend_stimulus, hotwire_turbo, email_processing, brief_system, assistant, authentication, payments, development_workflow, testing_framework, documentation, tooling]
Expand Down
8 changes: 4 additions & 4 deletions plugins/compound-engineering/skills/compound-docs/schema.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# CORA Documentation Schema
# Documentation Schema
# This schema MUST be validated before writing any documentation file

required_fields:
module:
type: string
description: "Module/area of CORA (e.g., 'Email Processing', 'Brief System', 'Authentication')"
description: "Module/area (e.g., 'Email Processing', 'Brief System', 'Authentication')"
examples:
- "Email Processing"
- "Brief System"
Expand Down Expand Up @@ -54,7 +54,7 @@ required_fields:
- testing_framework # Test setup, fixtures, VCR
- documentation # README, guides, inline docs
- tooling # Scripts, generators, CLI tools
description: "CORA component involved"
description: "Component involved"

symptoms:
type: array[string]
Expand Down Expand Up @@ -133,7 +133,7 @@ optional_fields:
- "turbo-stream"

validation_rules:
- "module must be a valid CORA module name"
- "module must be a valid module name"
- "date must be in YYYY-MM-DD format"
- "problem_type must match one of the enum values"
- "component must match one of the enum values"
Expand Down