Get the FREE Ultimate OpenClaw Setup Guide →

implement_plan_micro

npx machina-cli add skill parcadei/Continuous-Claude-v3/implement_plan_micro --openclaw
Files (1)
SKILL.md
5.5 KB

Formal Specification

Multimodal Logic Integration

Five modal logics via fusion with bridge principles:

  • JL: Justification Logic - evidence-backed claims
  • IEL: Inferential Erotetic Logic - question handling
  • TEL: Temporal Epistemic Logic - phase sequencing
  • SDL: Standard Deontic Logic - obligations/permissions
  • DEL: Dynamic Epistemic Logic - action modalities

Justification Logic (JL)

# Justification terms
[h]:context(task_n)                    # Handoff h justifies task context
[v]:verified(phase_n)                  # Verification v justifies completion
[p]:plan(tasks)                        # Plan p justifies task list

# Evidence production
[read(f)]exists e. [e]:content(f)
[verify(c)]exists v. [v]:pass(c) | [v]:fail(c)

# Handoff chain: evidence propagates
[h_n]:complete(task_n) -> [h_{n+1}]:context(task_{n+1})
proceed(task) <-> exists h. [h]:validated

Inferential Erotetic Logic (IEL)

# Mode and blocker questions
?{direct, orchestration}               # Mode selection
?{continue, retry, ask_user}           # Blocker resolution
mismatch(plan, reality) -> ?{how_proceed}
no_validation -> ?{run_validation_first}

Temporal Epistemic Logic (TEL)

# File reading constraints
[](mentioned(f) -> <>read_fully(f))           # Eventually read
[](mentioned(f) -> not spawn U read_fully(f)) # No spawn until read
[](partial_read(f) -> false)                  # Partial reads forbidden

# Phase sequencing
[](phase(n) -> P(phase(n-1) & verified(n-1))) # Verified before next
[](automated_pass -> <>manual_verify)         # Automated gates manual
[](manual_pass(n) -> <>phase(n+1))            # Manual gates next phase

# Handoff persistence
[](handoff_created(h) -> []exists_on_disk(h)) # Survives compaction

# Termination
<>(all_complete | abandoned)

Standard Deontic Logic (SDL)

# Reading obligations
O(read_fully(plan))
O(read_fully(f)) <- mentioned_in_plan(f)
O(check_existing_checkmarks)
F(partial_read)

# Verification obligations
O(run_automated) <- impl_complete
O(pause_for_manual) <- automated_pass
O(present_manual_checklist)
F(checkoff_manual) <- not user_confirmed

# Mode selection
O(orchestration) <- tasks >= 4
P(direct) <- tasks <= 3
O(respect_user_preference)

# Orchestration obligations
O(read_previous_handoff) <- exists_handoff(task_{n-1})
O(create_handoff) <- agent_completes
O(update_ledger) <- task_complete
F(batch_tasks)                                # One agent per task
F(proceed_on_mismatch) <- not user_guidance

Dynamic Epistemic Logic (DEL)

# Implementation actions
[read(plan)]K(tasks) & K(phases) & K(criteria)
[read(handoff_n)]K(context_{n+1})
[spawn(agent, task)]<>result(agent)
[verify(c)](K(pass) | K(fail))

# Composed workflows
[select_direct][implement ; verify_auto ; present_manual ; wait]*
[select_orchestration][prepare ; spawn ; wait ; read_handoff ; update]*

# Recovery
[compaction ; read_ledger ; list_handoffs ; read_last]resume

# Mismatch
[detect_mismatch ; stop ; present ; wait]proceed_or_abort

Bridge Principles

# Evidence persistence (JL-TEL)
[h]:context(n) -> [][h]:context(n)

# Evidence obligations (JL-SDL)
O(exists h. [h]:validated) <- pre_implement
O(exists v. [v]:pass(auto)) <- pre_manual

# Handoff chain (full integration)
[h_n]:complete(n) -> O([spawn]<>[h_{n+1}]:context(n+1))
compaction -> (forall h. persists(h))

State Machine

INIT --> READ_PLAN --> MODE_SELECT --+--> DIRECT: [IMPL -> AUTO -> MANUAL -> WAIT]*
                                     |
                                     +--> ORCHESTRATION: [PREP -> SPAWN -> WAIT -> HANDOFF]*
                                                                                    |
                                                                                    v
                                                                                COMPLETE

Output Schema

handoff_path: "thoughts/handoffs/<session>/task-[NN]-[desc].md"
schema:
  required: [status, task_desc, files_modified[], verification_results, context_for_next]
  optional: [blocker, decisions[], open_questions[]]
tracking:
  plan: "- [x] Task N: description"
  ledger: "[x] Task N"

Prose (Where Logic Insufficient)

Mode Selection

TasksContext CriticalMode
1-3NoDirect
1-3YesOrchestration
4+AnyOrchestration

User preference overrides.

Templates

Mismatch:

Issue in Phase [N]:
Expected: [plan says]
Found: [actual]
How should I proceed?

Manual Verification Pause:

Phase [N] Complete - Ready for Manual Verification
Automated passed: [list]
Please verify: [manual items from plan]
Let me know when done.

Agent Spawn:

Task(subagent_type="general-purpose", model="claude-opus-4-5-20251101", prompt="""
[implement_task SKILL.md]
## Context
- Ledger: [content]
- Plan: [section]
- Task: [N]/[Total]: [desc]
- Previous Handoff: [content or "first task"]
- Handoff Dir: thoughts/handoffs/<session>/
""")

Recovery (post-compaction):

  1. Ledger auto-loaded by SessionStart
  2. ls thoughts/handoffs/<session>/
  3. Read last handoff
  4. Resume next task

Validity Constraints

forall phase. has_auto_criteria(phase) & has_manual_criteria(phase)
forall task. one_agent_per_task(task)
forall h. on_disk(h) -> recoverable(h)
compaction -> (forall h. persists(h))
forall i < j. completed(task_i) before started(task_j)

Source

git clone https://github.com/parcadei/Continuous-Claude-v3/blob/main/.claude/skills/implement_plan_micro/SKILL.mdView on GitHub

Overview

This skill translates thoughts or shared plans into executable actions with built-in verification. It employs a fusion of modal logics JL, IEL, TEL, SDL, and DEL to manage evidence, mode decisions, timing, and obligations. A state machine coordinates reading the plan, selecting DIRECT or ORCHESTRATION, executing steps, and handling recovery and mismatches.

How This Skill Works

It begins by reading a plan (READ_PLAN), mapping it to a concrete plan term p and initiating verification. Using Justification Logic, IEL, TEL, SDL, and DEL, it propagates evidence, asks questions, sequences phases, enforces obligations, and performs actions like spawn or verify. Workflows split into DIRECT or ORCHESTRATION; recovery and mismatch handling are supported via detect_mismatch and proceed_or_abort, with handoffs persisted.

When to Use It

  • Implement plans derived from thoughts or shared plans with verification after each step
  • Choose DIRECT or ORCHESTRATION mode based on the number of tasks
  • Ensure evidence persistence and handoffs across task steps
  • Automate gating but support manual verification when needed
  • Handle interruptions or plan mismatches with recovery and abort options

Quick Start

  1. Step 1: READ_PLAN to load the plan and map it to plan terms p
  2. Step 2: MODE_SELECT to choose DIRECT or ORCHESTRATION based on task count
  3. Step 3: EXECUTE and VERIFY using the appropriate workflow and handle outcomes

Best Practices

  • Link every task to a plan term p and verify with v for traceability
  • Use h handoffs to propagate context between consecutive tasks
  • Enforce phase sequencing so verified before the next phase
  • Prefer automated gates and reserve manual verification for failures
  • Prepare for mismatches with detect_mismatch, stop, present, wait, and proceed_or_abort

Example Use Cases

  • Deploy a multi step software release plan with automated verification
  • Coordinate a data processing pipeline with plan reading and handoffs
  • Orchestrate distributed tasks using DIRECT and ORCHESTRATION workflows
  • Run automated checks followed by manual verification via checklists
  • Resume execution after plan interruption using recovery from ledger and handoffs

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers