Plan tracking: codex 无 TaskCreate/TaskUpdate/TodoWrite 任务板。进度清单用 update_plan({ explanation?, plan: [{ step, status }] }) 维护(整体提交步骤数组,status: pending | in_progress | completed),权威状态始终在 session 工件中;依赖/认领(addBlockedBy/owner)是工件字段,不是工具参数。
Skill Simplify
Three-phase pipeline: analyze functional inventory, apply optimization rules, verify integrity.
Phase Reference Documents (read on-demand):
| Phase |
Document |
Purpose |
| 1 |
phases/01-analysis.md |
Extract functional inventory, identify redundancy, validate pseudo-code format |
| 2 |
phases/02-optimize.md |
Apply simplification rules, fix format issues |
| 3 |
phases/03-check.md |
Verify functional integrity, validate format |
Pre-load (before execution)
- Codebase docs: If
.workflow/codebase/ARCHITECTURE.md exists, read for project context
- Specs:
maestro load --type spec --category coding — load coding conventions
- Wiki knowledge:
maestro search "skill design optimization" --json — top 5 entries as prior context
- All optional — proceed without if unavailable
Input Processing
const targetPath = input.trim()
const targetFile = targetPath.endsWith('.md') ? targetPath : `${targetPath}/SKILL.md`
const originalContent = Read(targetFile)
const originalLineCount = originalContent.split('\n').length
update_plan Pattern
update_plan({ todos: [
{ content: `Phase 1: Analyzing ${targetFile}`, status: "in_progress", activeForm: "Extracting functional inventory" },
{ content: "Phase 2: Optimize", status: "pending" },
{ content: "Phase 3: Integrity Check", status: "pending" }
]})
Core Rules
- Preserve ALL functional elements: Code blocks with logic, agent calls, data structures, routing, error handling, input/output specs
- Only reduce descriptive content: Flowcharts, verbose comments, duplicate sections, examples that repeat logic
- Never summarize algorithm logic: If-else branches, function bodies, schemas must remain verbatim
- Classify code blocks: Distinguish
functional (logic, routing, schemas) from descriptive (ASCII art, examples, display templates) — only descriptive blocks may be deleted
- Merge equivalent variants: Single/multi-perspective templates differing only by a parameter → one template with variant comment
- Fix format issues: Nested backtick template literals in code fences → convert to prose; hardcoded option lists → flag for dynamic generation; workflow handoff references → ensure execution steps present
- Validate pseudo-code: Check bracket matching, variable consistency, structural completeness
- Quantitative verification: Phase 3 counts must match Phase 1 counts for functional categories; descriptive block decreases are expected
Error Handling
| Error |
Resolution |
| Target file not found |
Report error, stop |
| Check FAIL (missing functional elements) |
Show delta, revert to original, report which elements lost |
| Check WARN (descriptive decrease or merge) |
Show delta with justification |
| Format issues found |
Report in check, fix in Phase 2 |
1---2name: skill-simplify3description: SKILL.md simplification with functional integrity verification. Analyze redundancy, optimize content, check no functionality lost. Triggers on "simplify skill", "optimize skill", "skill-simplify".4---56> **Plan tracking**: codex 无 TaskCreate/TaskUpdate/TodoWrite 任务板。进度清单用 `update_plan({ explanation?, plan: [{ step, status }] })` 维护(整体提交步骤数组,status: `pending` | `in_progress` | `completed`),权威状态始终在 session 工件中;依赖/认领(addBlockedBy/owner)是工件字段,不是工具参数。78# Skill Simplify910Three-phase pipeline: analyze functional inventory, apply optimization rules, verify integrity.1112**Phase Reference Documents** (read on-demand):1314| Phase | Document | Purpose |15|-------|----------|---------|16| 1 | [phases/01-analysis.md](phases/01-analysis.md) | Extract functional inventory, identify redundancy, validate pseudo-code format |17| 2 | [phases/02-optimize.md](phases/02-optimize.md) | Apply simplification rules, fix format issues |18| 3 | [phases/03-check.md](phases/03-check.md) | Verify functional integrity, validate format |1920## Pre-load (before execution)21221. **Codebase docs**: If `.workflow/codebase/ARCHITECTURE.md` exists, read for project context232. **Specs**: `maestro load --type spec --category coding` — load coding conventions243. **Wiki knowledge**: `maestro search "skill design optimization" --json` — top 5 entries as prior context254. All optional — proceed without if unavailable2627## Input Processing2829```javascript30const targetPath = input.trim()31const targetFile = targetPath.endsWith('.md') ? targetPath : `${targetPath}/SKILL.md`32const originalContent = Read(targetFile)33const originalLineCount = originalContent.split('\n').length34```3536## update_plan Pattern3738```javascript39update_plan({ todos: [40 { content: `Phase 1: Analyzing ${targetFile}`, status: "in_progress", activeForm: "Extracting functional inventory" },41 { content: "Phase 2: Optimize", status: "pending" },42 { content: "Phase 3: Integrity Check", status: "pending" }43]})44```4546## Core Rules47481. **Preserve ALL functional elements**: Code blocks with logic, agent calls, data structures, routing, error handling, input/output specs492. **Only reduce descriptive content**: Flowcharts, verbose comments, duplicate sections, examples that repeat logic503. **Never summarize algorithm logic**: If-else branches, function bodies, schemas must remain verbatim514. **Classify code blocks**: Distinguish `functional` (logic, routing, schemas) from `descriptive` (ASCII art, examples, display templates) — only descriptive blocks may be deleted525. **Merge equivalent variants**: Single/multi-perspective templates differing only by a parameter → one template with variant comment536. **Fix format issues**: Nested backtick template literals in code fences → convert to prose; hardcoded option lists → flag for dynamic generation; workflow handoff references → ensure execution steps present547. **Validate pseudo-code**: Check bracket matching, variable consistency, structural completeness558. **Quantitative verification**: Phase 3 counts must match Phase 1 counts for functional categories; descriptive block decreases are expected5657## Error Handling5859| Error | Resolution |60|-------|------------|61| Target file not found | Report error, stop |62| Check FAIL (missing functional elements) | Show delta, revert to original, report which elements lost |63| Check WARN (descriptive decrease or merge) | Show delta with justification |64| Format issues found | Report in check, fix in Phase 2 |