Loading...
Loading...
Upgrade any skill to v5 Hybrid format using decision theory + modal logic
npx skill4agent add parcadei/continuous-claude-v3 skill-upgraderSESSION=$(date +%Y%m%d-%H%M%S)-upgrade-{skill_name}
mkdir -p thoughts/skill-builds/${SESSION}thoughts/skill-builds/{session}/00-blackboard.md# Skill Upgrade: {skill_name}
Started: {timestamp}
## Input Skill
{path_to_skill}
## Target Format
Decision Theory v5 Hybrid
## Agent Findings
(Agents append below)
---Task(
subagent_type="general-purpose",
prompt="""
INPUT SKILL: {path}
BLACKBOARD: thoughts/skill-builds/{session}/00-blackboard.md
YOUR BOOK: LaValle's "Planning Algorithms" in Ragie partition 'decision-theory'
TASK: Identify MDP structure in the skill.
Query Ragie:
```bash
uv run python scripts/ragie_query.py -q "MDP state space definition" -p decision-theory
uv run python scripts/ragie_query.py -q "action space sequential decisions" -p decision-theory
uv run python scripts/ragie_query.py -q "POMDP partial observability" -p decision-theory
---
## Agent 2: Sutton & Barto Optimizer
**Book:** Sutton & Barto's "Reinforcement Learning" (decision-theory partition)
**Focus:** Policy, Termination, Value
**Depends on:** Agent 1
uv run python scripts/ragie_query.py -q "policy deterministic stochastic" -p decision-theory
uv run python scripts/ragie_query.py -q "episodic termination conditions" -p decision-theory
uv run python scripts/ragie_query.py -q "reward function design" -p decision-theory
---
## Agent 3: Blackburn Modal Logician
**Book:** Blackburn's "Modal Logic" (modal-logic partition)
**Focus:** Constraints (temporal, epistemic, deontic)
uv run python scripts/ragie_query.py -q "temporal logic LTL operators" -p modal-logic
uv run python scripts/ragie_query.py -q "epistemic logic knowledge" -p modal-logic
uv run python scripts/ragie_query.py -q "deontic logic obligations" -p modal-logic
---
## Agent 4: Huth & Ryan Verifier
**Book:** Huth & Ryan's "Logic in Computer Science" (modal-logic partition)
**Focus:** Validation, Safety, Liveness
**Depends on:** Agents 1-3
uv run python scripts/ragie_query.py -q "safety properties verification" -p modal-logic
uv run python scripts/ragie_query.py -q "liveness properties eventually" -p modal-logic
uv run python scripts/ragie_query.py -q "model checking CTL" -p modal-logic
---
## Step 4: Synthesize Final Skill
After all agents complete, read the blackboard and create:
**Output:** `thoughts/skill-builds/{session}/SKILL-upgraded.md`
Use v5 Hybrid template:
```yaml
---
name: {original_name}
description: {original_description}
version: 5.1-hybrid
---
# Option: {name}
## Initiation (I)
[From original + Agent 1 state analysis]
## Observation Space (Y)
[From Agent 1 POMDP analysis]
## Action Space (U)
[From Agent 1 actions]
## Policy (pi)
[From Agent 2 state→action rules]
## Termination (beta)
[From Agent 2 episode structure]
## Q-Heuristics
[From Agent 2 value guidance]
## Constraints
[From Agent 3 modal logic]
## Verification
[From Agent 4 safety/liveness]User: "Upgrade .claude/skills/implement_plan/SKILL.md to v5 Hybrid"
Claude:
1. Creates session directory
2. Initializes blackboard
3. Launches 4 agents in parallel (Task tool)
4. Waits for completion
5. Reads blackboard
6. Synthesizes upgraded skill
7. Reports: "Upgraded skill at thoughts/skill-builds/.../SKILL-upgraded.md"# Decision theory partition
uv run python scripts/ragie_query.py -q "your question" -p decision-theory
# Modal logic partition
uv run python scripts/ragie_query.py -q "your question" -p modal-logic
# With reranking for better results
uv run python scripts/ragie_query.py -q "your question" -p decision-theory --rerankthoughts/skill-builds/{session}/
├── 00-blackboard.md # Agent collaboration
├── SKILL-upgraded.md # Final v5 Hybrid skill
└── validation-report.md # Agent 4 verification