بنقرة واحدة
pwrl-learnings-classify
Classify and prioritize learnings by type, domain, severity, and applicability.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Classify and prioritize learnings by type, domain, severity, and applicability.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Extract, classify, deduplicate, structure, and save learnings from code, commits, tasks, and documentation
Create structured implementation plans with three tiers (Fast/Standard/Deep). Pure skill pipeline orchestrator—no agent routing.
Review code changes through 4-phase micro-skill pipeline (scope, prepare, analyze, report)
Execute implementation work efficiently through 4-phase micro-skill pipeline
Verify repository state and confirm session completion before committing.
Create a clear session commit with state and next steps. Orchestrates checkpoint and commit micro-skills, optionally chains to pwrl-learnings.
| name | pwrl-learnings-classify |
| description | Classify and prioritize learnings by type, domain, severity, and applicability. |
| argument-hint | [extraction artifact from pwrl-learnings-extract] |
Purpose: Phase 2 of learnings workflow. Refines preliminary classifications from extraction phase and assigns priority, domain, applicability scores, and tags. Enables effective filtering and retrieval of learnings.
Expects artifact from pwrl-learnings-extract with:
extract_id: YYYY-MM-DD-NNN-extract
learnings: [array of extracted learning candidates]
Each learning has: type, title, problem, application, source, confidence.
Emit classification artifact (YAML + markdown):
---
format: pwrl-learnings-classify-artifact
version: "1.0"
classify_id: YYYY-MM-DD-NNN-classify
created: ISO-8601-timestamp
source_extract_id: YYYY-MM-DD-NNN-extract
---
# Learning Classification Results
## Summary
- **Total Classified:** [count]
- **By Type:**
- Gotchas: [count]
- Patterns: [count]
- Decisions: [count]
- Technical Fixes: [count]
- Workflows: [count]
- **By Domain:**
- Backend: [count]
- Frontend: [count]
- Architecture: [count]
- DevOps: [count]
- Security: [count]
- Performance: [count]
- Process: [count]
- Testing: [count]
- **By Priority:**
- Critical: [count]
- Important: [count]
- Nice to Know: [count]
## Classified Learnings
### Learning 1
- **Type:** [refined type]
- **Domain:** [backend | frontend | architecture | devops | security | performance | process | testing]
- **Priority:** [critical | important | nice_to_know]
- **Applicability:** [0-10] (current project relevance)
- **General Applicability:** [0-10] (general relevance)
- **Tags:** [language, framework, topic, difficulty]
- **Title:** [Learning title]
- **Problem:** [What problem does this address?]
- **Application:** [How to apply this learning]
- **Related Learnings:** [If duplicates or related learnings found]
[Additional classified learnings...]
## Quality Metrics
- **Average Applicability:** [0-10 score]
- **High Priority Count:** [critical + important]
- **Low Confidence Count:** [learnings with medium/low confidence]
- **Duplicate Count:** [potential duplicates found]
## Classification Status
- **Status:** success
- **Ambiguous Classifications:** [count]
- **Manual Review Needed:** [true/false]
## Ready for Deduplication
- **Next Skill:** pwrl-learnings-structure
- **Artifacts Passed:** This classification artifact
Artifact passed to pwrl-learnings-structure.
For complete step-by-step instructions, see classify-learnings-detailed-workflow.md.
This SKILL.md provides an overview. The detailed workflow document contains:
This phase includes early duplicate detection to improve coverage:
docs/learnings/.index.jsonSee duplicate-handling-consolidated.md for detailed early detection logic.
After completing this phase, run quality gate validation:
/pwrl-phase-checkpoint learnings 2 [artifact-path]
See pwrl-phase-checkpoint for validation rules.
Check that input artifact has:
extract_idlearnings array populatedIf verification fails:
Improve preliminary types from extraction with higher confidence:
| Preliminary | Refinement Heuristics | Refined Type |
|---|---|---|
| Gotcha | Warning, "beware", trap, edge case | Gotcha |
| Pattern | "Use X for Y", reusable approach, best practice | Pattern |
| Decision | "Why X?", "Why not Y?", architectural choice, tradeoff | Decision |
| Technical Fix | "How to solve X", bug workaround, debugging technique | Technical Fix |
| Workflow | Process, checklist, sequence of steps | Workflow |
Ambiguous cases:
Categorize learning by technology/area:
Domain Heuristics:
Backend: Node.js, Python, Java, databases, APIs, auth
Frontend: React, Vue, TypeScript, CSS, UI, browsers
Architecture: System design, scalability, patterns, microservices
DevOps: Docker, CI/CD, deployment, infrastructure, monitoring
Security: Vulnerabilities, injection, XSS, auth, secrets, validation
Performance: Optimization, caching, algorithms, memory, benchmarks
Process: Git workflow, code review, planning, documentation
Testing: Unit tests, mocking, coverage, integration tests
Assignment logic:
Examples:
Determine severity level:
| Priority | Criteria |
|---|---|
| CRITICAL | Security risk, data loss, blocking issue, prevents shipping |
| IMPORTANT | Best practice, common mistake, performance, should know |
| NICE_TO_KNOW | Edge case, rare, optimization, nice-to-have knowledge |
Priority rules:
Rate relevance to current project and general use:
Current Project Applicability (0-10):
- 9-10: Tech/framework/domain directly used in project
- 7-8: Related to project's architecture/goals
- 5-6: Somewhat relevant; might apply in future
- 3-4: Peripherally relevant; useful to know
- 0-2: Niche; unlikely to use in this project
General Applicability (0-10):
- 9-10: Universal principle; applies to most projects
- 7-8: Widely applicable; most projects benefit
- 5-6: Moderately useful; specialized but not niche
- 3-4: Niche; applies to specific tech/domain
- 0-2: Very niche; rarely needed outside context
Scoring heuristics:
Check source context:
Check generality of problem:
Check tech/domain:
Add searchable tags to each learning:
Tag Categories:
Language: javascript, typescript, python, java, sql, bash, etc.
Framework: react, express, nextjs, django, fastapi, docker, etc.
Topic: performance, security, architecture, testing, deployment, etc.
Difficulty: beginner, intermediate, advanced, expert
Severity: critical, high, medium, low (for security/performance issues)
Tagging rules:
Examples:
[typescript, architecture, critical, intermediate][javascript, react, beginner, nice-to-know][sql, security, critical, intermediate]Detect duplicates and complementary learnings:
Duplicate detection:
Complementary detection:
Format:
Related Learnings:
- [duplicate]: "Title of duplicate"
- [complements]: "Title of related learning"
- [prevented_by]: "Learning that prevents this issue"
Emit artifact with:
Ambiguous Type Refinements:
Learning: "Use async/await instead of callbacks"
→ Could be Pattern or Workflow
→ Rule: If "how to do X", it's Pattern. If "step 1, step 2", it's Workflow.
→ Classification: Pattern (shows best practice approach)
Cross-Domain Learnings:
Learning: "Always validate user input to prevent SQL injection"
→ Primary Domain: Security
→ Secondary: Backend (where validation happens)
→ Tags: [security, backend, validation, critical]
Applicability Edge Case:
Learning from DevOps error: "Docker image optimization technique"
→ If project uses Docker: applicability 9/10
→ If project uses Kubernetes only: applicability 5/10
→ General applicability: 8/10 (Docker is widespread)
| Error | Recovery |
|---|---|
| Extraction artifact invalid | Return error; direct to pwrl-learnings-extract |
| Ambiguous learning | Flag for manual review; use default classification |
| No learnings to classify | Return empty artifact; continue to next skill |
| Domain/priority unclear | Use heuristic; flag for review |
Test file: tests/pwrl-learnings/classify-learnings.test.ts
Happy Path Tests:
Edge Cases:
Output Validation Tests: