Meta-Cognition Parallel Analysis (Experimental)
Status: Experimental | Version: 0.2.0 | Last Updated: 2025-01-27
This skill tests parallel three-layer cognitive analysis.
Concept
Instead of sequential analysis, this skill launches three parallel analyzers - one for each cognitive layer - then synthesizes their results.
User Question
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β meta-cognition-parallel β
β (Coordinator) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
ββββ Layer 1 βββΊ Language Mechanics βββΊ L1 Result
β
ββββ Layer 2 βββΊ Design Choices βββΊ L2 Result
β βββ Parallel (Agent Mode)
β β or Sequential (Inline)
ββββ Layer 3 βββΊ Domain Constraints βββΊ L3 Result
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Cross-Layer Synthesis β
β (In main context with all results) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
Domain-Correct Architectural Solution
Usage
/meta-parallel <your Rust question>
Example:
/meta-parallel ζηδΊ€ζη³»η»ζ₯ E0382 ιθ――οΌεΊθ―₯η¨ clone εοΌ
Execution Mode Detection
CRITICAL: Check agent file availability first to determine execution mode.
Try to read layer analyzer files:
../../agents/layer1-analyzer.md
../../agents/layer2-analyzer.md
../../agents/layer3-analyzer.md
Agent Mode (Plugin Install) - Parallel Execution
When all layer analyzer files exist at ../../agents/:
Step 1: Parse User Query
Extract from $ARGUMENTS:
- The original question
- Any code snippets
- Domain hints (trading, web, embedded, etc.)
Step 2: Launch Three Parallel Agents
CRITICAL: Launch all three Tasks in a SINGLE message to enable parallel execution.
Read agent files, then launch in parallel:
Task(
subagent_type: "general-purpose",
run_in_background: true,
prompt: <content of ../../agents/layer1-analyzer.md>
+ "\n\n## User Query\n" + $ARGUMENTS
)
Task(
subagent_type: "general-purpose",
run_in_background: true,
prompt: <content of ../../agents/layer2-analyzer.md>
+ "\n\n## User Query\n" + $ARGUMENTS
)
Task(
subagent_type: "general-purpose",
run_in_background: true,
prompt: <content of ../../agents/layer3-analyzer.md>
+ "\n\n## User Query\n" + $ARGUMENTS
)
Step 3: Collect Results
Wait for all three agents to complete. Each returns structured analysis.
Step 4: Cross-Layer Synthesis
With all three results, perform synthesis per template below.
Inline Mode (Skills-only Install) - Sequential Execution
When layer analyzer files are NOT available, execute analysis directly:
Step 1: Parse User Query
Same as Agent Mode - extract question, code, and domain hints from $ARGUMENTS.
Step 2: Execute Layer 1 - Language Mechanics
Analyze the Rust language mechanics involved:
## Layer 1: Language Mechanics
**Error/Pattern Identified:**
- Error code: E0XXX (if applicable)
- Pattern: ownership/borrowing/lifetime/etc.
**Root Cause:**
[Explain why this error occurs in terms of Rust's ownership model]
**Language-Level Solutions:**
1. [Solution 1]: description
2. [Solution 2]: description
**Confidence:** HIGH | MEDIUM | LOW
**Reasoning:** [Why this confidence level]
Focus areas:
- Ownership rules (move, copy, borrow)
- Lifetime annotations
- Borrowing rules (shared vs mutable)
- Error codes and their meanings
Step 3: Execute Layer 2 - Design Choices
Analyze the design patterns and trade-offs:
## Layer 2: Design Choices
**Design Pattern Context:**
- Current approach: [What pattern is being used]
- Problem: [Why it conflicts with Rust's rules]
**Design Alternatives:**
|---------|------|------|-------------|
| Pattern A | ... | ... | ... |
| Pattern B | ... | ... | ... |
**Recommended Pattern:**
[Which pattern fits best and why]
**Confidence:** HIGH | MEDIUM | LOW
**Reasoning:** [Why this confidence level]
Focus areas:
- Smart pointer choices (Box, Rc, Arc)
- Interior mutability patterns (Cell, RefCell, Mutex)
- Ownership transfer vs sharing
- Cloning vs references
Step 4: Execute Layer 3 - Domain Constraints
Analyze domain-specific requirements:
## Layer 3: Domain Constraints
**Domain Identified:** [trading/fintech | web | CLI | embedded | etc.]
**Domain-Specific Requirements:**
- [ ] Performance: [requirements]
- [ ] Safety: [requirements]
- [ ] Concurrency: [requirements]
- [ ] Auditability: [requirements]
**Domain Best Practices:**
1. [Best practice 1]
2. [Best practice 2]
**Constraints on Solution:**
- MUST: [hard requirements]
- SHOULD: [soft requirements]
- AVOID: [anti-patterns for this domain]
**Confidence:** HIGH | MEDIUM | LOW
**Reasoning:** [Why this confidence level]
Focus areas:
- Industry requirements (FinTech regulations, web scalability, etc.)
- Performance constraints
- Safety and correctness requirements
- Common patterns in the domain
Step 5: Cross-Layer Synthesis
Combine all three layers:
## Cross-Layer Synthesis
### Layer Results Summary
|-------|-------------|------------|
| L1 (Mechanics) | [Summary] | [Level] |
| L2 (Design) | [Summary] | [Level] |
| L3 (Domain) | [Summary] | [Level] |
### Cross-Layer Reasoning
1. **L3 β L2:** [How domain constraints affect design choice]
2. **L2 β L1:** [How design choice determines mechanism]
3. **L1 β L3:** [Direct domain impact on language features]
### Synthesized Recommendation
**Problem:** [Restated with full context]
**Solution:** [Domain-correct architectural solution]
**Rationale:**
- Domain requires: [L3 constraint]
- Design pattern: [L2 pattern]
- Mechanism: [L1 implementation]
### Confidence Assessment
- **Overall:** HIGH | MEDIUM | LOW
- **Limiting Factor:** [Which layer had lowest confidence]
Output Template
Both modes produce the same output format:
# Three-Layer Meta-Cognition Analysis
> Query: [User's question]
---
## Layer 1: Language Mechanics
[L1 analysis result]
---
## Layer 2: Design Choices
[L2 analysis result]
---
## Layer 3: Domain Constraints
[L3 analysis result]
---
## Cross-Layer Synthesis
### Reasoning Chain
L3 Domain: [Constraint]
β implies
L2 Design: [Pattern]
β implemented via
L1 Mechanism: [Feature]
### Final Recommendation
**Do:** [Recommended approach]
**Don't:** [What to avoid]
**Code Pattern:**
```rust
// Recommended implementation
Analysis performed by meta-cognition-parallel v0.2.0 (experimental)
---
## Test Scenarios
### Test 1: Trading System E0382
/meta-parallel δΊ€ζη³»η»ζ₯ E0382οΌtrade record θ’« move δΊ
Expected: L3 identifies FinTech