mcpField
I
implement_plan_micro

implement_plan_micro

github.com/parcadei开发3.9k479 次安装39 周前更新
代码仓库

关于 implement_plan_micro

一个以形式化逻辑描述软件实现计划执行流程的规范,面向分阶段实施与协作任务。它结合证据、提问、时序、义务和行动逻辑,规定计划读取、验证、交接与恢复要求。

主要功能

  1. 01融合五类模态逻辑
  2. 02规定计划与文件的完整读取
  3. 03定义阶段顺序和验证要求
  4. 04描述直接执行与编排模式
  5. 05规定交接信息与追踪格式
  6. 06提供阻塞处理和恢复流程

适用场景

  1. 01制定分阶段实现流程
  2. 02在阶段间交接任务上下文
  3. 03规范自动与人工验证步骤
  4. 04从会话压缩后恢复工作

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/parcadei/continuous-claude-v3 --skill implement_plan_micro

安装后在 Claude Code 中输入/implement_plan_micro确认已加载。

详细介绍

形式化规范

多模态逻辑集成

通过融合桥接原则整合五种模态逻辑:

  • JL:正当化逻辑——有证据支持的主张
  • IEL:推论疑问逻辑——问题处理
  • TEL:时态认知逻辑——阶段排序
  • SDL:标准道义逻辑——义务/许可
  • DEL:动态认知逻辑——行动模态

正当化逻辑(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

推论疑问逻辑(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}

时态认知逻辑(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)

标准道义逻辑(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

动态认知逻辑(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

桥接原则

# 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))

状态机

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

输出架构

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"

文字说明(逻辑不足之处)

模式选择

任务上下文是否关键模式
1-3否直接
1-3是编排
4+任意编排

用户偏好优先。

模板

不匹配:

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

暂停以供人工验证:

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

启动 Agent:

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>/
""")

恢复(压缩后):

  1. SessionStart 自动加载账本
  2. ls thoughts/handoffs/<session>/
  3. 阅读最后一份交接记录
  4. 继续下一个任务

有效性约束

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)

评论

支持 Markdown