---
schema: "1.0"
name: creative-check
version: "1.0.0"
description: Generic quality checking engine for creative works (novel, screenplay, game narrative)
domain: creative
triggers:
  keywords:
    primary: [creative-check, quality-check, qa-check]
    secondary: [consistency, logic, style, pacing]
  context_boost: [quality, check, review, qa]
  context_penalty: [code, api, database]
  priority: high
dependencies:
  software-skills: []
author: ai-novel-system
---

# Creative Quality Check Skill

## Overview

This Skill provides multi-dimensional quality checking for creative works. It loads domain-specific rules and adapts to different creative formats (novel, screenplay, game narrative, etc.).

## Core Functionality

1. Domain-aware quality checking
2. Multi-dimensional evaluation
3. Detailed quality reports
4. Auto-fix suggestions
5. Status tracking

---

## Prerequisites (Domain Loading)

1. Read `.creative/config.yaml` to get the `domain` value
2. If config doesn't exist, prompt user to run `/creative-init`
3. Calculate PLUGIN_ROOT from Skill header's `Base directory`
   - PLUGIN_ROOT = Base directory minus `/skills/creative-check` suffix
4. Set DOMAIN_DIR = $PLUGIN_ROOT/shared/domains/{domain}/
5. Read $DOMAIN_DIR/domain.yaml to get quality dimensions and path mappings
6. Read $DOMAIN_DIR/check-guide.md to get domain-specific checking rules
7. Follow the workflow below using loaded rules

---

## Workflow

### Stage 0: Initialization

```markdown
1. Parse target
   - Single item: `creative-check chapter-005`
   - Range: `creative-check chapter-001 chapter-010`
   - Latest: `creative-check` (check most recently completed item)

2. Determine content paths
   - Read domain.yaml → content.paths.drafts
   - Build target file path based on domain conventions
   - Example: drafts/chapter-NNN/chapter-NNN-final.md

3. Load knowledge base
   - Read domain.yaml → content.paths.knowledge
   - Load character/world/plot/style files
   - Build context for checking

4. Load context
   - Read previous/next content for continuity checks
   - Read outlines for comparison
   - Build full checking context
```

### Stage 1: Multi-Dimensional Checking

For each dimension defined in domain.yaml → quality.dimensions:

```markdown
1. Extract dimension configuration
   - name: Dimension name
   - weight: Score weight (e.g., 30 points)
   - checks: List of check items

2. Execute checks
   - Follow domain-specific rules from check-guide.md
   - Apply severity levels: critical, warning, suggestion
   - Collect issues with locations and details

3. Calculate dimension score
   - Base score = weight
   - Deduct for each issue:
     - Critical: -10 points (or per domain rules)
     - Warning: -3 points
     - Suggestion: -0 points (logged but not deducted)
```

### Stage 2: Score Calculation

```markdown
1. Sum all dimension scores
2. Calculate total: sum(dimension_scores)
3. Determine rating:
   - 80-100: Excellent (ready for publication)
   - 60-79: Good (minor adjustments suggested)
   - <60: Needs revision (significant issues)
```

### Stage 3: Report Generation

Generate report at path specified in domain.yaml → content.paths.qa:

```markdown
# Quality Report: [Item Title]

Generated: YYYY-MM-DD HH:MM:SS

---

## Overall Score: XX/100

[For each dimension from domain.yaml]
- [Dimension Name]: XX/[Weight]

**Rating:**
- [ ] Excellent (80-100): Ready for publication
- [ ] Good (60-79): Minor adjustments suggested
- [ ] Needs Revision (<60): Significant issues found

---

## Passed Checks

[List of checks that passed, grouped by dimension]

---

## Critical Issues (Must Fix)

### [Dimension] Issue Description

**Location:** Paragraph X / Line Y

**Problem:**
"Quote original text"

**Reason:**
Explain why this is a problem

**Suggested Fix:**
Provide specific revision guidance

---

## Warnings (Suggested Fixes)

### [Dimension] Issue Description

**Location:** Paragraph X

**Problem:**
Brief description

**Suggestion:**
Revision guidance

---

## Suggestions (Improvements)

### [Dimension] Improvement Idea

**Location:** Paragraph X

**Current:**
Current state

**Suggestion:**
Better approach or direction

---

## Statistics

[Domain-specific statistics from check-guide.md]
- Total word count: X,XXX
- [Additional metrics per domain]

---

## Next Steps

1. [ ] Fix critical issues (required)
2. [ ] Address warnings (recommended)
3. [ ] Consider suggestions (optional)
4. [ ] Re-run `creative-check` to verify fixes
```

### Stage 4: Auto-Fix (Optional)

```markdown
1. Identify auto-fixable issues
   - Read auto-fix rules from check-guide.md
   - Collect fixable items with proposed changes

2. Ask user for confirmation
   "Found X auto-fixable issues. Execute auto-fix? (y/n)"

3. If user agrees:
   - Backup original file: [original-path].backup.md
   - Apply fixes
   - Generate fix report: [qa-path]/[item]-fixes.md
   - Re-run check and generate new report

4. If user declines:
   - List fixable issues in report
   - User can manually address them
```

### Stage 5: Status Update

Update `.creative/status.json`:

```json
{
  "items": {
    "[item-id]": {
      "status": "qa_completed",
      "qa_score": 85,
      "qa_report": "[path-to-report]",
      "qa_date": "YYYY-MM-DD",
      "issues": {
        "critical": 0,
        "warning": 2,
        "suggestion": 5
      }
    }
  }
}
```

---

## Output Format

```
Quality check completed for [item]

Overall Score: 78/100 (Good)

[For each dimension]
- [Dimension]: XX/YY [Status indicator]

Critical issues: 0
Warnings: 3
Suggestions: 2

Detailed report: [absolute-path-to-report]

Recommended actions:
1. Review warnings and consider revisions
2. Re-run check after making changes

Execute auto-fix for fixable issues? (y/n)
```

---

## Usage Examples

### Example 1: Check Single Item

```
User: /creative-check chapter-005
Assistant:
1. Load domain configuration
2. Read chapter content
3. Execute checks based on domain rules
4. Generate quality report
5. Output summary
```

### Example 2: Check Range

```
User: /creative-check chapter-001 chapter-010

Assistant:
1. Batch check chapters 1-10
2. Generate individual and summary reports
3. Summary report: qa/reports/batch-001-010-summary.md
```

### Example 3: Check Latest

```
User: /creative-check

Assistant:
1. Read .creative/status.json to find latest completed item
2. Execute check
3. Generate report
```

---

## Important Notes

1. **Domain-Agnostic Framework**: This Skill does not hardcode any domain-specific logic. All checks are defined in check-guide.md.
2. **Flexible Dimensions**: Quality dimensions are loaded from domain.yaml, allowing different domains to define their own evaluation criteria.
3. **Respect Creative Freedom**: Suggestions should be guidance, not commands. Only critical errors require fixes.
4. **Context-Aware**: Always consider the full context of the work, not just isolated sections.
5. **Style-Adaptive**: Different creative formats have different conventions. Use domain rules to adapt.

---

## Path Configuration

All paths are read from domain.yaml:
- Content files: content.paths.drafts
- Quality reports: content.paths.qa
- Status file: .creative/status.json
- Knowledge base: content.paths.knowledge

All paths should be handled as absolute paths.
